All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: Linux console tools development discussion <kbd@lists.altlinux.org>
Subject: Re: [kbd] Pull request for auto-convert-keymaps
Date: Fri, 08 May 2009 14:58:40 +0400	[thread overview]
Message-ID: <4A041060.5000604@gmail.com> (raw)
In-Reply-To: <20090506190608.GA4840@graeme>

On 06.05.2009 23:06, Michael Schutte wrote:
> Hey,
> 
> May I ask you to
> 
>     git pull git://git.debian.org/pkg-kbd/kbd.git auto-convert-keymaps
> 
> into your auto-convert-keymaps branch?  This is the one-line log:
> 
>     5aa247b Regenerate analyze.c and loadkeys.c
>     18eadfe Support Unicode compose tables
>     b9f77f5 Support bidirectional conversion of keysyms

+/* Directions for converting keysyms */
+#define TO_AUTO (-1)           /* use prefer_unicode */
+#define TO_8BIT 0
+#define TO_UNICODE 1
...
+       else if (direction == (code >= 0x1000))
+               result = code;          /* no conversion necessary */
+       else if (code < 0x80)
+               result = direction ? (code ^ 0xf000) : code;
+       else if ((code ^ 0xf000) < 0x80)
+               result = direction ? code : (code ^ 0xf000);

I almost broke the brain by reading it. You call convert_code() with
TO_{AUTO,8BIT,UNICODE} , but you do not using these definition in this
function.

>     68cbd1c Fix two problems with the keymap auto-conversion patch

@@ -1695,6 +1696,8 @@ set_charset(const char *charset) {
                                if(p->name[0])
                                        syms[0].table[i] = p->name;
                        }
+                       if (chosen_charset)
+                               free(chosen_charset);
                        chosen_charset = strdup(charset);
                        return 0;
                }

You fixed memory leak, but still have not released memory in all the
programs that use set_charset().

-- 
Rgrds, legion



  reply	other threads:[~2009-05-08 10:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 19:06 [kbd] Pull request for auto-convert-keymaps Michael Schutte
2009-05-08 10:58 ` Alexey Gladkov [this message]
2009-05-09 17:57   ` Michael Schutte
2009-05-18 21:02     ` 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=4A041060.5000604@gmail.com \
    --to=gladkov.alexey@gmail.com \
    --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.