Linux console tools development discussion
 help / color / mirror / Atom feed
* [kbd] Pull request for auto-convert-keymaps
@ 2009-05-06 19:06 Michael Schutte
  2009-05-08 10:58 ` Alexey Gladkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Schutte @ 2009-05-06 19:06 UTC (permalink / raw)
  To: kbd

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

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
    68cbd1c Fix two problems with the keymap auto-conversion patch

Cheers,
-- 
Michael Schutte <michi@uiae.at>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbd] Pull request for auto-convert-keymaps
  2009-05-06 19:06 [kbd] Pull request for auto-convert-keymaps Michael Schutte
@ 2009-05-08 10:58 ` Alexey Gladkov
  2009-05-09 17:57   ` Michael Schutte
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Gladkov @ 2009-05-08 10:58 UTC (permalink / raw)
  To: Linux console tools development discussion

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbd] Pull request for auto-convert-keymaps
  2009-05-08 10:58 ` Alexey Gladkov
@ 2009-05-09 17:57   ` Michael Schutte
  2009-05-18 21:02     ` Alexey Gladkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Schutte @ 2009-05-09 17:57 UTC (permalink / raw)
  To: Linux console tools development discussion

[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]

On Fri, May 08, 2009 at 02:58:40PM +0400, Alexey Gladkov wrote:
> On 06.05.2009 23:06, Michael Schutte wrote:
> >     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().

You’re right on both counts, of course :-)  I’ve added two more commits
to address this stuff.  URL and branch are still

    git pull git://git.debian.org/pkg-kbd/kbd.git auto-convert-keymaps

If you spot any other problems, feel free to complain.

All the best,
-- 
Michael Schutte <michi@uiae.at>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbd] Pull request for auto-convert-keymaps
  2009-05-09 17:57   ` Michael Schutte
@ 2009-05-18 21:02     ` Alexey Gladkov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Gladkov @ 2009-05-18 21:02 UTC (permalink / raw)
  To: Linux console tools development discussion

On 09.05.2009 21:57, Michael Schutte wrote:
> You’re right on both counts, of course :-)  I’ve added two more commits
> to address this stuff.  URL and branch are still
> 
>     git pull git://git.debian.org/pkg-kbd/kbd.git auto-convert-keymaps

This branch looks good. I merge it to master.

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-18 21:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-06 19:06 [kbd] Pull request for auto-convert-keymaps Michael Schutte
2009-05-08 10:58 ` Alexey Gladkov
2009-05-09 17:57   ` Michael Schutte
2009-05-18 21:02     ` Alexey Gladkov

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