After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 104862 - gtkimcontextsimple.c compose table is not completely sorted
gtkimcontextsimple.c compose table is not completely sorted
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
2.2.x
Other All
: Normal normal
: ---
Assigned To: Hidetoshi Tajima
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-01-30 23:21 UTC by Vasilis Vasaitis
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch that corrects the order of elements for the compose table (4.32 KB, patch)
2003-01-30 23:26 UTC, Vasilis Vasaitis
none Details | Review
code that can check the compose table for ascending order (569 bytes, text/plain)
2003-01-30 23:28 UTC, Vasilis Vasaitis
  Details

Description Vasilis Vasaitis 2003-01-30 23:21:45 UTC
Hello,

  In gtkimcontextsimple.c, it appears that the table of compose sequences
needs to be sorted, since it is passed to bsearch() at some point. However,
there are a few spots that this is not the case, so this might create problems.

  I've written some simple code that can be appended to the file, which
creates an autonomous executable that prints the table and checks that it
is in ascending order. Using said code, I've corrected all problematic
spots, and created a patch. I'm going to submit both as attachments to this
bug report.

  The code is used as follows: it prints out all entries from the compose
tables, and prints "not sorted!" for each entry that isn't greater than its
previous one (it also prints it for the first entry, because it's compared
with itself, so don't worry about that). It should be fairly
straightforward. Note that I'm not really sending this for inclusion; just
in case someone wants to perform this check in the future.

Thanks,
Vasilis
Comment 1 Vasilis Vasaitis 2003-01-30 23:26:29 UTC
Created attachment 13971 [details] [review]
patch that corrects the order of elements for the compose table
Comment 2 Vasilis Vasaitis 2003-01-30 23:28:28 UTC
Created attachment 13972 [details]
code that can check the compose table for ascending order
Comment 3 Hidetoshi Tajima 2003-05-14 23:45:17 UTC
A patch looks good, except:

  -  GDK_Multi_key,	GDK_t,	GDK_less,	0,	0,	0x0165,	/*
LATIN_SMALL_LETTER_T_WITH_CARON */
  +  GDK_Multi_key,	GDK_T,	GDK_less,	0,	0,	0x0164,	/*
LATIN_CAPITAL_LETTER_T_WITH_CARON */

This is a different bug fix although a fix
itself looks correct.

Owen - okay to commit to the HEAD?
Comment 4 Owen Taylor 2003-05-21 18:59:10 UTC
Looks good to me for gtk-2-2 and HEAD, including the T< change.
Comment 5 Hidetoshi Tajima 2003-05-21 19:18:28 UTC
	* gtk/gtkimcontextsimple.c:
	code that can check the compose table for ascending order,
	by Vasilis Vasaitis (#104862).

commit to the gtk-2-2 and HEAD.