From f7f4cd99ff9ce8efee94aafdd5980cb4bb1d1395 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 18 Oct 2009 21:49:38 +0200 Subject: [PATCH] Document the alternative APIs for character classification. --- ChangeLog | 17 +++++++++++++++++ doc/posix-functions/isalnum.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isalpha.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isascii.texi | 15 +++++++++++++++ doc/posix-functions/isblank.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/iscntrl.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isdigit.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isgraph.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/islower.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isprint.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/ispunct.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isspace.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isupper.texi | 25 +++++++++++++++++++++++++ doc/posix-functions/isxdigit.texi | 25 +++++++++++++++++++++++++ 14 files changed, 332 insertions(+) diff --git a/ChangeLog b/ChangeLog index e4541a12b..0500aaf8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2009-10-18 Reuben Thomas + Bruno Haible + + * 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 Tests for module 'isblank'. diff --git a/doc/posix-functions/isalnum.texi b/doc/posix-functions/isalnum.texi index 5147b7cae..313c58e4c 100644 --- a/doc/posix-functions/isalnum.texi +++ b/doc/posix-functions/isalnum.texi @@ -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 diff --git a/doc/posix-functions/isalpha.texi b/doc/posix-functions/isalpha.texi index 4ba099796..6d0a58a8f 100644 --- a/doc/posix-functions/isalpha.texi +++ b/doc/posix-functions/isalpha.texi @@ -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 diff --git a/doc/posix-functions/isascii.texi b/doc/posix-functions/isascii.texi index 4dd419a91..d4ab2c22f 100644 --- a/doc/posix-functions/isascii.texi +++ b/doc/posix-functions/isascii.texi @@ -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 diff --git a/doc/posix-functions/isblank.texi b/doc/posix-functions/isblank.texi index 12bcd9112..626bc7db1 100644 --- a/doc/posix-functions/isblank.texi +++ b/doc/posix-functions/isblank.texi @@ -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 diff --git a/doc/posix-functions/iscntrl.texi b/doc/posix-functions/iscntrl.texi index 5b89943b3..b01d3e32a 100644 --- a/doc/posix-functions/iscntrl.texi +++ b/doc/posix-functions/iscntrl.texi @@ -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 diff --git a/doc/posix-functions/isdigit.texi b/doc/posix-functions/isdigit.texi index 3939cd49f..51fcc4bd5 100644 --- a/doc/posix-functions/isdigit.texi +++ b/doc/posix-functions/isdigit.texi @@ -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 diff --git a/doc/posix-functions/isgraph.texi b/doc/posix-functions/isgraph.texi index 27f901fdf..8832580b4 100644 --- a/doc/posix-functions/isgraph.texi +++ b/doc/posix-functions/isgraph.texi @@ -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 diff --git a/doc/posix-functions/islower.texi b/doc/posix-functions/islower.texi index d6c3e4c0f..bfd347199 100644 --- a/doc/posix-functions/islower.texi +++ b/doc/posix-functions/islower.texi @@ -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 diff --git a/doc/posix-functions/isprint.texi b/doc/posix-functions/isprint.texi index ad3076b61..695371928 100644 --- a/doc/posix-functions/isprint.texi +++ b/doc/posix-functions/isprint.texi @@ -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 diff --git a/doc/posix-functions/ispunct.texi b/doc/posix-functions/ispunct.texi index e6f9bb7db..da9a23b21 100644 --- a/doc/posix-functions/ispunct.texi +++ b/doc/posix-functions/ispunct.texi @@ -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 diff --git a/doc/posix-functions/isspace.texi b/doc/posix-functions/isspace.texi index 408ffb010..a4cc3f303 100644 --- a/doc/posix-functions/isspace.texi +++ b/doc/posix-functions/isspace.texi @@ -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 diff --git a/doc/posix-functions/isupper.texi b/doc/posix-functions/isupper.texi index 378c83045..f629f1377 100644 --- a/doc/posix-functions/isupper.texi +++ b/doc/posix-functions/isupper.texi @@ -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 diff --git a/doc/posix-functions/isxdigit.texi b/doc/posix-functions/isxdigit.texi index e03106c94..cc6133c82 100644 --- a/doc/posix-functions/isxdigit.texi +++ b/doc/posix-functions/isxdigit.texi @@ -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 -- 2.11.0