summaryrefslogtreecommitdiff
path: root/doc/uniname.texi
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-04-05 13:41:08 +0200
committerBruno Haible <bruno@clisp.org>2009-04-05 13:41:08 +0200
commiteb8be2f56530a578c7af2f1579036dfc5154ce28 (patch)
treec901f0f94d70a0f0ec7ef6fb236aa44823c9cbc6 /doc/uniname.texi
parent9ce48f91a0a71ff03966a35f8e11ba501480a962 (diff)
downloadlibunistring-eb8be2f56530a578c7af2f1579036dfc5154ce28.tar.gz
Documentation of <uniname.h>.
Diffstat (limited to 'doc/uniname.texi')
-rw-r--r--doc/uniname.texi31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/uniname.texi b/doc/uniname.texi
new file mode 100644
index 0000000..4124158
--- /dev/null
+++ b/doc/uniname.texi
@@ -0,0 +1,31 @@
+@node uniname.h
+@chapter Names of Unicode characters @code{<uniname.h>}
+
+This include file implements the association between a Unicode character and
+its name.
+
+The name of a Unicode character allows to distinguish it from other, similar
+looking characters. For example, the character @samp{x} has tha name
+@code{"LATIN SMALL LETTER X"} and is therefore different from the character
+named @code{"MULTIPLICATION SIGN"}.
+
+@deftypevr Macro {unsigned int} UNINAME_MAX
+This macro expands to a constant that is the required size of buffer for a
+Unicode character name.
+@end deftypevr
+
+@deftypefun {char *} unicode_character_name (ucs4_t @var{uc}, char *@var{buf})
+Looks up the name of a Unicode character, in uppercase ASCII.
+@var{buf} must point to a buffer, at least @code{UNINAME_MAX} bytes in size.
+Returns the filled @var{buf}, or NULL if the character does not have a name.
+@end deftypefun
+
+@deftypefun ucs4_t unicode_name_character (const char *@var{name})
+Looks up the Unicode character with a given name, in upper- or lowercase
+ASCII. Returns the character if found, or @code{UNINAME_INVALID} if not found.
+@end deftypefun
+
+@deftypevr Macro ucs4_t UNINAME_INVALID
+This macro expands to a constant that is a special return value of the
+@code{unicode_name_character} function.
+@end deftypevr