SETCHRCLASS(3X) SysV SETCHRCLASS(3X)
NAME
setchrclass - classify characters
SYNOPSIS
#include <ctype.h>
int setchrclass (chrclass)
char *chrclass;
DESCRIPTION
setchrclass is obsoleted by the standard-compliant (ANS X3.159, POSIX
1003.1, XPG/3, SVID '89) setlocale(3) function. We strongly recommend
that you use setlocale(3) in place of setchrclass.
setchrclass initializes the table used by the ctype(3c) functions to a
specific character classification set. setchrclass uses the value of its
argument or the value of the environment variable CHRCLASS as the name of
the data file for the desired character set. These data files must
reside in the directory /usr/lib/chrclass. setchrclass is implemented in
the bindable library /usr/lib/libc.a.
If chrclass is (char *)0, the value of the environment variable CHRCLASS
is used. If CHRCLASS is not set or is undefined, the table retains its
current value, initialized to ascii.
NOTES
To implement the setchrclass function, you must bind in /usr/lib/libc.a
(or /sys5.3/usr/lib/libc.a), or use the -lc option with the ld command.
/usr/lib/libc.a is an archive library that defines setchrclass and the
_ctype table.
Binding this library in may make the program non-standard conformant.
FILES
Directory containing language-specific character classification tables:
/usr/lib/chrclass
Language-specific character classification tables:
/usr/lib/chrclass/ascii
/usr/lib/chrclass/danish
/usr/lib/chrclass/finnish
/usr/lib/chrclass/french
/usr/lib/chrclass/german
/usr/lib/chrclass/italian
/usr/lib/chrclass/norwegian
/usr/lib/chrclass/spanish
/usr/lib/chrclass/swedish
Bindable library containing setchrclass:
/usr/lib/libc.a
SEE ALSO
ctype(3c) chrtbl(1M), stdio(3S), ascii(5), environ(5).
DIAGNOSTICS
If setchrclass does not successfully fill the table, it leaves the
existing table unaffected and returns -1. A successful call to
setchrclass returns zero.
NOTES
To be compatible with common C usage, you must add the following
directive when you use setchrclass.
#define _CLASSIC_CTYPE_MACROS
before any #include directives in your program.