From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Wed, 12 Nov 2008 17:04:21 +0100 From: Michael Schutte To: Linux console tools development discussion Message-ID: <20081112160421.GA16696@graeme.homenet> Mail-Followup-To: Linux console tools development discussion References: <20081109124226.GA16538@graeme.homenet> <49184B3C.5090709@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <49184B3C.5090709@gmail.com> Jabber-ID: schm@yne.at User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: [kbd] U+f000 and above X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 16:04:27 -0000 Archived-At: List-Archive: --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=3D 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=3Dstrtol(yytext+1,NULL,16);return(UNUMBER);} +{Unicode} {yylval=3Dstrtol(yytext+1,NULL,16);if(yylval>=3D0xf= 000)lkfatal1("unicode keysym out of range: %s",yytext);return(UNUMBER);} {Decimal}|{Octal}|{Hex} {yylval=3Dstrtol(yytext,NULL,0);return(NUMB= ER);} {Literal} {return((yylval=3Dksymtocode(yytext))=3D=3D-1?ERROR= :LITERAL);} Sorry for the ugliness, I just sticked to the prevailing coding style in analyze.l. Re-format as you wish :-) --=20 Michael Schutte --T4sUOijqQbZv57TR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBAgAGBQJJGv5+AAoJEPPkEi8djCYa/ycH/3gMmJAG1RLjR+srpUb3HkLk 69SZqtPNQJVTBAZK0R0GvuLcOBX6vfTAsIhsl4REk587wH6T0bgEIIl+YQt+oYq3 I6kC1bZUN9Lyqmpz1StmVPyo0d/BXnVkvtD3jemM9O3RL4kjTs7FMRL+Dh3lZLLT QTMY4bcRGVwa4hk2EiKaYUbRs6ArDZgoiJFN3Jq4/Zd6qpT0EX4lTkjeWLjryLex tRo0o0ISCAYplgyQseLGtVg4B/nuTPL4DAGTdOlkdDdu98jlydqVe2cApqpsnr7u RmT4tVdE9T6ZXl4n+Fvv7eq7lbCgpLLWFB0po4yOJ3qqgXBtQg0miEZHJO8nbMk= =zZe8 -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--