On Mon, Nov 10, 2008 at 05:54:52PM +0300, Alexey Gladkov wrote: >> Do you agree with me that it would make sense to make loadkeys fail (or >> at least warn the user) on U+xxxx keysym specifications >= 0xf000? > > I agree. This is a good idea. Okay then, this does the trick: diff --git a/src/analyze.l b/src/analyze.l index f55c676..392c9aa 100644 --- a/src/analyze.l +++ b/src/analyze.l @@ -90,7 +90,7 @@ To to|To|TO \- {return(DASH);} \, {return(COMMA);} \+ {return(PLUS);} -{Unicode} {yylval=strtol(yytext+1,NULL,16);return(UNUMBER);} +{Unicode} {yylval=strtol(yytext+1,NULL,16);if(yylval>=0xf000)lkfatal1("unicode keysym out of range: %s",yytext);return(UNUMBER);} {Decimal}|{Octal}|{Hex} {yylval=strtol(yytext,NULL,0);return(NUMBER);} {Literal} {return((yylval=ksymtocode(yytext))==-1?ERROR:LITERAL);} Sorry for the ugliness, I just sticked to the prevailing coding style in analyze.l. Re-format as you wish :-) -- Michael Schutte