Document the alternative APIs for character classification.
authorBruno Haible <bruno@clisp.org>
Sun, 18 Oct 2009 19:49:38 +0000 (21:49 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 18 Oct 2009 19:49:38 +0000 (21:49 +0200)
14 files changed:
ChangeLog
doc/posix-functions/isalnum.texi
doc/posix-functions/isalpha.texi
doc/posix-functions/isascii.texi
doc/posix-functions/isblank.texi
doc/posix-functions/iscntrl.texi
doc/posix-functions/isdigit.texi
doc/posix-functions/isgraph.texi
doc/posix-functions/islower.texi
doc/posix-functions/isprint.texi
doc/posix-functions/ispunct.texi
doc/posix-functions/isspace.texi
doc/posix-functions/isupper.texi
doc/posix-functions/isxdigit.texi

index e4541a12b00219ee48266f3ff86a9dc10c59cfdb..0500aaf8c8de7406b706f492a07b156e611e9475 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2009-10-18  Reuben Thomas  <rrt@sc3d.org>
+            Bruno Haible  <bruno@clisp.org>
+
+       * doc/posix-functions/isascii.texi: Document the 2 alternative APIs.
+       * doc/posix-functions/isalnum.texi: Document the 4 alternative APIs.
+       * doc/posix-functions/isalpha.texi: Likewise.
+       * doc/posix-functions/isblank.texi: Likewise.
+       * doc/posix-functions/iscntrl.texi: Likewise.
+       * doc/posix-functions/isdigit.texi: Likewise.
+       * doc/posix-functions/isgraph.texi: Likewise.
+       * doc/posix-functions/islower.texi: Likewise.
+       * doc/posix-functions/isprint.texi: Likewise.
+       * doc/posix-functions/ispunct.texi: Likewise.
+       * doc/posix-functions/isspace.texi: Likewise.
+       * doc/posix-functions/isupper.texi: Likewise.
+       * doc/posix-functions/isxdigit.texi: Likewise.
+
 2009-10-18  Bruno Haible  <bruno@clisp.org>
 
        Tests for module 'isblank'.
index 5147b7cae6ae5bcdb3d4ee5b2c2ca4133af9d018..313c58e4c0028e21cda25b4beb5b94a1172a6b73 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isalnum
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswalnum
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isalnum
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_alnum
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-alnum}.
+@end table
index 4ba099796aac7a23962e6ccb44a5ebc7a511b783..6d0a58a8f6aae82051011d9feb8612852c7c7167 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isalpha
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswalpha
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isalpha
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_alpha
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-alpha}.
+@end table
index 4dd419a913a3d07fc23f405a68cec741079736af..d4ab2c22ffedd2888a28d9ce7f8879137ecd7f5c 100644 (file)
@@ -13,3 +13,18 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but requires special
+handling for the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are two alternative APIs:
+
+@table @code
+@item c_isascii
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item mb_isascii
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+@end table
index 12bcd9112c842665db3f9a1ab4ec1569957de46e..626bc7db1366ffd780fcd151e0cee7de59d4bb1f 100644 (file)
@@ -16,3 +16,28 @@ AIX 4.3.2, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw.
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isblank
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswblank
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isblank
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_blank
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-blank}.
+@end table
index 5b89943b393b5798a1cdb5604c217053c131aaf4..b01d3e32aff654cd1dff19cf25cb3bedbcf831a6 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_iscntrl
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswcntrl
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_iscntrl
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_cntrl
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-cntrl}.
+@end table
index 3939cd49f848ae00114692c999c55769839050e5..51fcc4bd53f01b22e0ffda818ca0646c3771bfbe 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isdigit
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswdigit
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isdigit
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_digit
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-digit}.
+@end table
index 27f901fdff14e3c3c7b00e62f26b2d38d48fb0da..8832580b4f76cf513b4bfce9b734192b5d44ce32 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isgraph
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswgraph
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isgraph
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_graph
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-graph}.
+@end table
index d6c3e4c0f6877c5f6c974554b0eca412a0b1cc4f..bfd347199f1083117fa1462e66251d12513b3857 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_islower
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswlower
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_islower
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_lower
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-lower}.
+@end table
index ad3076b611defacbd0557f057c10ed67dc207827..695371928f21342478601942862b746994e55e11 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isprint
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswprint
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isprint
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_print
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-print}.
+@end table
index e6f9bb7db4b79e4ec717f7ddd2947279469a3b3c..da9a23b2107399a0bd179cb77fec4b36f28dac30 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_ispunct
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswpunct
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_ispunct
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_punct
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-punct}.
+@end table
index 408ffb010cb0277bf513cb77cec4cc32c3a8ae90..a4cc3f30385d4a7d034d6ad04b318d1cd2c48572 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isspace
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswspace
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isspace
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_space
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-space}.
+@end table
index 378c83045743c2db9dd51945453db86755e32369..f629f1377f15891bfe4e1eaa636cff2d1388eb21 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isupper
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswupper
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isupper
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_upper
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-upper}.
+@end table
index e03106c945130a029d85030784b4a4a9e5d51b0c..cc6133c8204d4db01557839c21d083ad343ba6fd 100644 (file)
@@ -13,3 +13,28 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: This function's behaviour depends on the locale, but does not support
+the multibyte characters that occur in strings in locales with
+@code{MB_CUR_MAX > 1} (this includes all the common UTF-8 locales).
+There are four alternative APIs:
+
+@table @code
+@item c_isxdigit
+This function operates in a locale independent way and returns true only for
+ASCII characters.  It is provided by the Gnulib module @samp{c-ctype}.
+
+@item iswxdigit
+This function operates in a locale dependent way, on wide characters.  In
+order to use it, you first have to convert from multibyte to wide characters,
+using the @code{mbrtowc} function.  It is provided by the Gnulib module
+@samp{wctype}.
+
+@item mb_isxdigit
+This function operates in a locale dependent way, on multibyte characters.
+It is provided by the Gnulib module @samp{mbchar}.
+
+@item uc_is_xdigit
+This function operates in a locale independent way, on Unicode characters.
+It is provided by the Gnulib module @samp{unictype/ctype-xdigit}.
+@end table