From: Michael Schutte <michi@uiae.at> To: Linux console tools development discussion <kbd@lists.altlinux.org> Subject: Re: [kbd] U+f000 and above Date: Wed, 12 Nov 2008 17:04:21 +0100 Message-ID: <20081112160421.GA16696@graeme.homenet> (raw) In-Reply-To: <49184B3C.5090709@gmail.com> [-- Attachment #1: Type: text/plain, Size: 1116 bytes --] 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);} <RVALUE>{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 <michi@uiae.at> [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 489 bytes --]
next prev parent reply other threads:[~2008-11-12 16:04 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-09 12:42 Michael Schutte 2008-11-10 14:54 ` Alexey Gladkov 2008-11-12 16:04 ` Michael Schutte [this message] 2008-11-18 14:55 ` Alexey Gladkov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081112160421.GA16696@graeme.homenet \ --to=michi@uiae.at \ --cc=kbd@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux console tools development discussion This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \ kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com public-inbox-index kbd Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.kbd AGPL code for this site: git clone https://public-inbox.org/public-inbox.git