expr: remove support for evaluating string as integer
authorRan Benita <ran234@gmail.com>
Fri, 27 Jul 2012 11:15:39 +0000 (14:15 +0300)
committerRan Benita <ran234@gmail.com>
Fri, 27 Jul 2012 11:15:39 +0000 (14:15 +0300)
commit6917901f8103d6ab766e76280404e64a2b9cf70a
treec2922dcadfa6a225ba7c2e703f372f6f59ba6c18
parentdd0f3c6dc234b1b8b4a3943cbba212de7dadbd76
expr: remove support for evaluating string as integer

As the comment nicely puts it, this is a bit weird. When you try to
evaluate an expression of type string into an integer, what it does is:
    "" -> 0
    "c" -> (ascii value, i.e. like a char literal)
    more than one char -> error
The first one is obviously not very useful; why not just write 0?
The second one might be useful (though I don't see where in a keymap
it would be), but I don't think anyone would consider trying "X" for
that anyway.

A look through xkeyboard-config shows "" only used once as a string, and
"X" also only used as strings (and mostly in geometry which we don't
evaluate anyway). And I seriously doubt it's used (purposely) anywhere
else. So remove it.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/expr.c