Ethereal-dev: [Ethereal-dev] packet-x11-keysym.h cleanup
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Motonori Shindo <mshindo@xxxxxxxxxxx>
Date: Thu, 04 Oct 2001 00:02:48 +0900 (JST)
Hi, Today I looked at packet-x11-keysym.h and found that it embeds a raw 8-bit character in a string, which is not a good idea generally. It is less editable and, even worse, some compiler (notably Japanized version of MS Visual C++) fail to compile it because a character with MSB being set is recognized as the 1st byte of 2-byte character (Kanji) and subsequent byte (double-quote) is recognized as the second half of Kanji character, ending up with an open-ended string. To avoid this problem, a character with MSB=1 should be expressed using an octal notation in a string (i.e. \xxx). I enclosed a patch that does it. I confirmed that a new code generates exactly the same object file as before, and hence there's no change in the executable. Regards, =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--= +----+----+ |.. .| | Motonori Shindo |_~__| | | .. |~~_~| Sr. Systems Engineer | . | | CoSine Communications Inc. +----+----+ C o S i n e e-mail: mshindo@xxxxxxxxxxxxx Communications =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
Index: packet-x11-keysym.h =================================================================== RCS file: /cvsroot/ethereal/packet-x11-keysym.h,v retrieving revision 1.3 diff -u -r1.3 packet-x11-keysym.h --- packet-x11-keysym.h 2001/06/18 02:17:54 1.3 +++ packet-x11-keysym.h 2001/10/03 14:42:15 @@ -33,31 +33,31 @@ { 0x073, "s" }, { 0x074, "t" }, { 0x075, "u" }, { 0x076, "v" }, { 0x077, "w" }, { 0x078, "x" }, { 0x079, "y" }, { 0x07a, "z" }, { 0x07b, "{" }, { 0x07c, "|" }, { 0x07d, ", HFILL }" }, { 0x07e, "~" }, - { 0x0a0, "nobreakspace" }, { 0x0a1, "¡" }, { 0x0a2, "¢" }, { 0x0a3, "£" }, - { 0x0a4, "¤" }, { 0x0a5, "¥" }, { 0x0a6, "¦" }, { 0x0a7, "§" }, - { 0x0a8, "¨" }, { 0x0a9, "©" }, { 0x0aa, "ª" }, { 0x0ab, "«" }, - { 0x0ac, "¬" }, { 0x0ad, "" }, { 0x0ae, "®" }, { 0x0af, "¯" }, - { 0x0b0, "°" }, { 0x0b1, "±" }, { 0x0b2, "²" }, { 0x0b3, "³" }, - { 0x0b4, "´" }, { 0x0b5, "µ" }, { 0x0b6, "¶" }, { 0x0b7, "·" }, - { 0x0b8, "¸" }, { 0x0b9, "¹" }, { 0x0ba, "º" }, { 0x0bb, "»" }, - { 0x0bc, "¼" }, { 0x0bd, "½" }, { 0x0be, "¾" }, { 0x0bf, "¿" }, - { 0x0c0, "À" }, { 0x0c1, "Á" }, { 0x0c2, "Â" }, { 0x0c3, "Ã" }, - { 0x0c4, "Ä" }, { 0x0c5, "Å" }, { 0x0c6, "Æ" }, { 0x0c7, "Ç" }, - { 0x0c8, "È" }, { 0x0c9, "É" }, { 0x0ca, "Ê" }, { 0x0cb, "Ë" }, - { 0x0cc, "Ì" }, { 0x0cd, "Í" }, { 0x0ce, "Î" }, { 0x0cf, "Ï" }, - { 0x0d0, "Ð" }, { 0x0d0, "Ñ" }, { 0x0d1, "Ñ" }, { 0x0d2, "Ò" }, - { 0x0d3, "Ó" }, { 0x0d4, "Ô" }, { 0x0d5, "Õ" }, { 0x0d6, "Ö" }, - { 0x0d7, "×" }, { 0x0d8, "Ø" }, { 0x0d9, "Ù" }, { 0x0da, "Ú" }, - { 0x0db, "Û" }, { 0x0dc, "Ü" }, { 0x0dd, "Ý" }, { 0x0de, "Þ" }, - { 0x0df, "ß" }, { 0x0e0, "à" }, { 0x0e1, "á" }, { 0x0e2, "â" }, - { 0x0e3, "ã" }, { 0x0e4, "ä" }, { 0x0e5, "å" }, { 0x0e6, "æ" }, - { 0x0e7, "ç" }, { 0x0e8, "è" }, { 0x0e9, "é" }, { 0x0ea, "ê" }, - { 0x0eb, "ë" }, { 0x0ec, "ì" }, { 0x0ed, "í" }, { 0x0ee, "î" }, - { 0x0ef, "ï" }, { 0x0f0, "ð" }, { 0x0f1, "ñ" }, { 0x0f2, "ò" }, - { 0x0f3, "ó" }, { 0x0f4, "ô" }, { 0x0f5, "õ" }, { 0x0f6, "ö" }, - { 0x0f7, "÷" }, { 0x0f8, "ø" }, { 0x0f9, "ù" }, { 0x0fa, "ú" }, - { 0x0fb, "û" }, { 0x0fc, "ü" }, { 0x0fd, "ý" }, { 0x0fe, "þ" }, - { 0x0ff, "ÿ" }, { 0x13bc, "OE" }, { 0x13bd, "oe" }, { 0x13be, "Ydiaeresis" }, + { 0x0a0, "nobreakspace" }, { 0x0a1, "\241" }, { 0x0a2, "\242" }, { 0x0a3, "\243" }, + { 0x0a4, "\244" }, { 0x0a5, "\245" }, { 0x0a6, "\246" }, { 0x0a7, "\247" }, + { 0x0a8, "\250" }, { 0x0a9, "\251" }, { 0x0aa, "\252" }, { 0x0ab, "\253" }, + { 0x0ac, "\254" }, { 0x0ad, "\255" }, { 0x0ae, "\256" }, { 0x0af, "\257" }, + { 0x0b0, "\260" }, { 0x0b1, "\261" }, { 0x0b2, "\262" }, { 0x0b3, "\263" }, + { 0x0b4, "\264" }, { 0x0b5, "\265" }, { 0x0b6, "\266" }, { 0x0b7, "\267" }, + { 0x0b8, "\270" }, { 0x0b9, "\271" }, { 0x0ba, "\272" }, { 0x0bb, "\273" }, + { 0x0bc, "\274" }, { 0x0bd, "\275" }, { 0x0be, "\276" }, { 0x0bf, "\277" }, + { 0x0c0, "\300" }, { 0x0c1, "\301" }, { 0x0c2, "\302" }, { 0x0c3, "\303" }, + { 0x0c4, "\304" }, { 0x0c5, "\305" }, { 0x0c6, "\306" }, { 0x0c7, "\307" }, + { 0x0c8, "\310" }, { 0x0c9, "\311" }, { 0x0ca, "\312" }, { 0x0cb, "\313" }, + { 0x0cc, "\314" }, { 0x0cd, "\315" }, { 0x0ce, "\316" }, { 0x0cf, "\317" }, + { 0x0d0, "\320" }, { 0x0d0, "\321" }, { 0x0d1, "\321" }, { 0x0d2, "\322" }, + { 0x0d3, "\323" }, { 0x0d4, "\324" }, { 0x0d5, "\325" }, { 0x0d6, "\326" }, + { 0x0d7, "\327" }, { 0x0d8, "\330" }, { 0x0d9, "\331" }, { 0x0da, "\332" }, + { 0x0db, "\333" }, { 0x0dc, "\334" }, { 0x0dd, "\335" }, { 0x0de, "\336" }, + { 0x0df, "\337" }, { 0x0e0, "\340" }, { 0x0e1, "\341" }, { 0x0e2, "\342" }, + { 0x0e3, "\343" }, { 0x0e4, "\344" }, { 0x0e5, "\345" }, { 0x0e6, "\346" }, + { 0x0e7, "\347" }, { 0x0e8, "\350" }, { 0x0e9, "\351" }, { 0x0ea, "\352" }, + { 0x0eb, "\353" }, { 0x0ec, "\354" }, { 0x0ed, "\355" }, { 0x0ee, "\356" }, + { 0x0ef, "\357" }, { 0x0f0, "\360" }, { 0x0f1, "\361" }, { 0x0f2, "\362" }, + { 0x0f3, "\363" }, { 0x0f4, "\364" }, { 0x0f5, "\365" }, { 0x0f6, "\366" }, + { 0x0f7, "\367" }, { 0x0f8, "\370" }, { 0x0f9, "\371" }, { 0x0fa, "\372" }, + { 0x0fb, "\373" }, { 0x0fc, "\374" }, { 0x0fd, "\375" }, { 0x0fe, "\376" }, + { 0x0ff, "\377" }, { 0x13bc, "OE" }, { 0x13bd, "oe" }, { 0x13be, "Ydiaeresis" }, { 0x1a1, "Aogonek" }, { 0x1a2, "breve" }, { 0x1a3, "Lstroke" }, { 0x1a5, "Lcaron" }, { 0x1a6, "Sacute" }, { 0x1a9, "Scaron" }, { 0x1aa, "Scedilla" }, { 0x1ab, "Tcaron" }, { 0x1ac, "Zacute" }, { 0x1ae, "Zcaron" }, { 0x1af, "Zabovedot" }, { 0x1b1, "aogonek" },
- Follow-Ups:
- Re: [Ethereal-dev] packet-x11-keysym.h cleanup
- From: Richard Sharpe
- Re: [Ethereal-dev] packet-x11-keysym.h cleanup
- From: Ron Flory
- Re: [Ethereal-dev] packet-x11-keysym.h cleanup
- From: Andrew C. Feren
- Re: [Ethereal-dev] packet-x11-keysym.h cleanup
- Prev by Date: [Ethereal-dev] [Fwd: [Bug 54161] New - libpcap hangs if no filter set, pcap_next loses every other packet]
- Next by Date: Re: [Ethereal-dev] packet-x11-keysym.h cleanup
- Previous by thread: Re: [Ethereal-dev] [Fwd: [Bug 54161] New - libpcap hangs if no filter set, pcap_next loses every other packet]
- Next by thread: Re: [Ethereal-dev] packet-x11-keysym.h cleanup
- Index(es):