All of lore.kernel.org
 help / color / mirror / Atom feed
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	[thread overview]
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 --]

  reply	other threads:[~2008-11-12 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 12:42 [kbd] U+f000 and above 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
     [not found] <CACnij5edOguVuJiYFvvFhfot1SCOAkegxg3gK+kfi7fW4ZDKHA@mail.gmail.com>
2021-03-20  9:28 ` Alexey Gladkov
2021-03-20 13:31   ` Random832
2021-03-20 15:58     ` Alexey Gladkov
     [not found]   ` <CACnij5cRGP51cXjMCs8TgnVhFg7TObUquH2q7XnDA0HjY2pknQ@mail.gmail.com>
2021-03-22  9:54     ` 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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.