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: Sat, 9 May 2009 19:57:50 +0200 From: Michael Schutte To: Linux console tools development discussion Message-ID: <20090509175750.GA4812@graeme> Mail-Followup-To: Linux console tools development discussion References: <20090506190608.GA4840@graeme> <4A041060.5000604@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <4A041060.5000604@gmail.com> Jabber-ID: schm@yne.at User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: [kbd] Pull request for auto-convert-keymaps X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 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: Sat, 09 May 2009 17:58:10 -0000 Archived-At: List-Archive: --huq684BweRXVnRxX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > +/* Directions for converting keysyms */ > +#define TO_AUTO (-1) /* use prefer_unicode */ > +#define TO_8BIT 0 > +#define TO_UNICODE 1 > ... > + else if (direction =3D=3D (code >=3D 0x1000)) > + result =3D code; /* no conversion necessary */ > + else if (code < 0x80) > + result =3D direction ? (code ^ 0xf000) : code; > + else if ((code ^ 0xf000) < 0x80) > + result =3D direction ? code : (code ^ 0xf000); >=20 > 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. >=20 > > 68cbd1c Fix two problems with the keymap auto-conversion patch >=20 > @@ -1695,6 +1696,8 @@ set_charset(const char *charset) { > if(p->name[0]) > syms[0].table[i] =3D p->name; > } > + if (chosen_charset) > + free(chosen_charset); > chosen_charset =3D strdup(charset); > return 0; > } >=20 > You fixed memory leak, but still have not released memory in all the > programs that use set_charset(). You=E2=80=99re right on both counts, of course :-) I=E2=80=99ve 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, --=20 Michael Schutte --huq684BweRXVnRxX 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) iQEcBAEBAgAGBQJKBcQWAAoJEPPkEi8djCYaDs0H/1dp386humR8UifGxKacNJOf 1ddcnR8VBfVe/NCxVY4ZaPjIpbASknbFGatwZJI1gCixuj76lBo1Knqs19h3GMy+ TpqVF/VACM5ePHqQcRdBBsmA11K+zoUeBv6RXzHifspxvpSQZ0bUcDQTTa/odGg9 czSVQChf/vwfVn/RgOgEzBIdXtBbqzvx04od1vr1edTzJk41G/U76n4twsq9YhXT /pFO2BqXR8xbGyZHcrKfPtQgQGkoiZ1OnI/MAU7oVo3VOMVDSJh667cmE8hORFxz saeEfni5Jo6EqmFrnZ/8qUAPvI4xd17wXkdAbi4OgbuqGzfi62COT/GyfmuarHw= =Hm6k -----END PGP SIGNATURE----- --huq684BweRXVnRxX--