unictype/category-byname: Recognize long names as well.
authorBruno Haible <bruno@clisp.org>
Fri, 25 Mar 2011 22:23:09 +0000 (23:23 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 25 Mar 2011 22:23:09 +0000 (23:23 +0100)
commit90656bd76c6dc0ca59a12715b2d92e580f9e2eae
tree4b3a2a9afc80f243302c16db3f31679b31347378
parentf3ddcf09c09c463254ba5b1021c92775f586f5ad
unictype/category-byname: Recognize long names as well.

* lib/unictype.in.h (uc_general_category_byname): Allow argument to be
a long name.
* lib/unictype/categ_byname.c: Include <stdlib.h>, <string.h>,
unictype/categ_byname.h.
(UC_CATEGORY_INDEX_*): New enumeration values.
(uc_general_category_byname): Use uc_general_category_lookup and
convert from index to value.
* lib/unictype/categ_byname.gperf: New file.
* modules/unictype/category-byname (Files): Add
lib/unictype/categ_byname.gperf.
(Depends-on): Add gperf.
(Makefile.am): Add rule for generating unictype/categ_byname.h.
* tests/unictype/test-categ_byname.c (main): Test the recognition of
long names.
ChangeLog
lib/unictype.in.h
lib/unictype/categ_byname.c
lib/unictype/categ_byname.gperf [new file with mode: 0644]
modules/unictype/category-byname
tests/unictype/test-categ_byname.c