The information supplied in the specification file consists of lines in the following format:
char type conv
The three fields, which are separated by space or tab characters, have the following meanings and syntax:
Other ctype macros use combinations of these 7 basic classifications.
Zero, one or more of these classification letters can be specified,
in any order,
although only certain combinations are logically reasonable, as follows:
C control character
CS spacing control character
U uppercase alphabetic
UX uppercase alphabetic hex digit
UL dual case character
L lowercase alphabetic
LX lowercase alphabetic hex digit
DX decimal and hex digit
S spacing character
P punctuation (all other printing chars)
blank undefined (all classifications false)
The syntax is as for the char field.
The initial LC_CTYPE table used is that for the ascii(M) character set, with the entries for the higher 128 characters (0x80 - 0xff) set to zero (that is, all classifications false). Thus an empty specification file will result in a table for US ASCII. Any specifications found in the input to chrtbl will overwrite the specifications for that character only, thus additions and modifications to the ASCII table can be made without respecifying those characters which are unchanged.
The binary table output is placed in a file named ctype, within the current directory. This file should be copied or linked to the correct place in the setlocale file tree (see locale(M)). To prevent accidental corruption of the output data, the file is created with no write permission; if the chrtbl utility is run in a directory containing a write-protected ``ctype'' file, the utility will ask if the existing file should be replaced; any response other than ``yes'' or ``y'' will cause chrtbl to terminate without overwriting the existing file.
If the specfile argument is missing,
the specification information is read from the standard input.
# # chrtbl file for TVI 7-bit Spanish character set # Note that only non-ASCII characters need be specified # ´@' P # inverted ? ´[' L ']' # n tilde ´\\' P # inverted ! ´]' U '[' # N tilde ´~' P # degree sign
Any lines in the specification file which are syntactically incorrect will cause an error message to be issued to the standard error output, specifying the line number on which the error was detected. The line will be ignored, and processing will continue.
If the output file, ``ctype'', cannot be opened for writing, processing will terminate with the error message, ``Cannot create table file.''