summaryrefslogtreecommitdiff
path: root/manual/ctype.texi
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-16 15:44:59 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-16 15:44:59 +0000
commitbc938d3de936a8e429b16237180c046139be8247 (patch)
treec827f8afd95d339455d1f551e50eb1425385d8dc /manual/ctype.texi
parent2972264e210a742ac9a6d862e3976d93ddc38529 (diff)
Update.
1999-06-16 Ulrich Drepper <drepper@cygnus.com> * manual/errno.texi: Fix typos. * manual/memory.texi: Likewise. * manual/ctype.texi: Likewise. Patches by Brian Youmans <3diff@gnu.org>.
Diffstat (limited to 'manual/ctype.texi')
-rw-r--r--manual/ctype.texi50
1 files changed, 25 insertions, 25 deletions
diff --git a/manual/ctype.texi b/manual/ctype.texi
index fde864b647..b5ab6bae3d 100644
--- a/manual/ctype.texi
+++ b/manual/ctype.texi
@@ -17,7 +17,7 @@ by the locale currently selected for character classification---the
The @w{ISO C} standard specifies two different sets of functions. The
one set works on @code{char} type characters, the other one on
-@code{wchar_t} wide character (@pxref{Extended Char Intro}).
+@code{wchar_t} wide characters (@pxref{Extended Char Intro}).
@menu
* Classification of Characters:: Testing whether characters are
@@ -266,20 +266,21 @@ with the SVID.
@section Character class determination for wide characters
The second amendment to @w{ISO C89} defines functions to classify wide
-character. Although the original @w{ISO C89} standard already defined
-the type @code{wchar_t} but no functions operating on them were defined.
+characters. The original @w{ISO C89} standard defined the type
+@code{wchar_t} but failed to define any functions to operate on wide
+characters.
The general design of the classification functions for wide characters
-is more general. It allows to extend the set of available
-classification beyond the set which is always available. The POSIX
-standard specifies a way how the extension can be done and this is
-already implemented in the GNU C library implementation of the
-@code{localedef} program.
+is more general. It allows extending the set of available
+classifications beyond the set which is always available. The POSIX
+standard specifies how the extension can be done and this is already
+implemented in the GNU C library implementation of the @code{localedef}
+program.
The character class functions are normally implemented using bitsets.
I.e., for the character in question the appropriate bitset is read from
-a table and a test is performed whether a certain bit is set in this
-bitset. Which bit is tested for is determined by the class.
+a table and a test is performed to determine whether a certain bit is
+set in this bitset. Which bit is tested for is determined by the class.
For the wide character classification functions this is made visible.
There is a type representing the classification, a function to retrieve
@@ -338,11 +339,11 @@ by a successful call to @code{wctype}.
This function is declared in @file{wctype.h}.
@end deftypefun
-The make it easier to use the commonly used classification functions
-they are defined in the C library. There is no need to use
-@code{wctype} is the property string is one of the known character
+This makes it easier to use the commonly-used classification functions
+that are defined in the C library. There is no need to use
+@code{wctype} if the property string is one of the known character
classes. In some situations it is desirable to construct the property
-string and then it gets important that @code{wctype} can also handle the
+string and then it becomes important that @code{wctype} can also handle the
standard classes.
@cindex alphanumeric character
@@ -588,7 +589,7 @@ iswctype (wc, wctype ("xdigit"))
It is declared in @file{wctype.h}.
@end deftypefun
-The GNu C library provides also a function which is not defined in the
+The GNU C library also provides a function which is not defined in the
@w{ISO C} standard but which is available as a version for single byte
characters as well.
@@ -610,10 +611,9 @@ available as real functions but when the @file{wctype.h} header is
included the macros will be used. This is nothing new compared to the
@code{char} type versions of these functions.
-The second notes covers something which is new. It can be best
-illustrated by a (real-world) example. The first piece of code is an
-excerpt from the original code. It is truncated a bit but the intention
-should be clear.
+The second note covers something new. It can be best illustrated by a
+(real-world) example. The first piece of code is an excerpt from the
+original code. It is truncated a bit but the intention should be clear.
@smallexample
int
@@ -642,7 +642,7 @@ is_in_class (int c, const char *class)
@}
@end smallexample
-The problem is that it is not guarateed that the wide character
+The problem is that it is not guaranteed that the wide character
representation of a single-byte character can be found using casting.
In fact, usually this fails miserably. The correct solution for this
problem is to write the code as follows:
@@ -669,9 +669,9 @@ function is probably not the final one.
@node Wide Character Case Conversion, , Using Wide Char Classes, Character Handling
@section Mapping of wide characters.
-As for the classification functions the @w{ISO C} standard also
+As for the classification functions, the @w{ISO C} standard also
generalizes the mapping functions. Instead of only allowing the two
-standard mappings the locale can contain others. Again, the
+standard mappings, the locale can contain others. Again, the
@code{localedef} program already supports generating such locale data
files.
@@ -680,7 +680,7 @@ files.
@deftp {Data Type} wctrans_t
This data type is defined as a scalar type which can hold a value
representing the locale-dependent character mapping. There is no way to
-construct such a value beside using the return value of the
+construct such a value except using the return value of the
@code{wctrans} function.
@pindex wctype.h
@@ -715,7 +715,7 @@ This function is declared in @file{wctype.h}.
@deftypefun wint_t towctrans (wint_t @var{wc}, wctrans_t @var{desc})
The @code{towctrans} function maps the input character @var{wc}
according to the rules of the mapping for which @var{desc} is an
-descriptor and returns the so found value. The @var{desc} value must be
+descriptor and returns the value so found. The @var{desc} value must be
obtained by a successful call to @code{wctrans}.
@pindex wctype.h
@@ -765,6 +765,6 @@ This function is declared in @file{wctype.h}.
@end deftypefun
The same warnings given in the last section for the use of the wide
-character classiffication function applies here. It is not possible to
+character classification function applies here. It is not possible to
simply cast a @code{char} type value to a @code{wint_t} and use it as an
argument for @code{towctrans} calls.