Character Set Definition
Globals and other support for a 8 bit representation of characters.
- Define character set properties
Segment Element
Constant definition
- 39: #ifdef HAVE_LIMITS_H
40: #include <limits.h>
41: #else
42: #ifndef UCHAR_MAX
43: #define UCHAR_MAX 255
44: #endif
45: #endif
Segment Element
Constant definition
-
56: #define UCHAR_LIM (UCHAR_MAX + 1)
Segment Element
Macro definition- Notes
- Provides a type casting method.
-
57: #define UCHAR(c) ((unsigned char) (c))
58:
- Declare blank characters (blanks[])
-
Array declaration
- Segment Source
- 133: static int blanks[UCHAR_LIM];
- Declare (non)printable characters (nonprinting[])
- Array declaration
- Segment Source
- 136: static int nonprinting[UCHAR_LIM];
- Declare (non)dictionary characters (nondictionary[])
- Array declaration
- Segment Source
- 139: static int nondictionary[UCHAR_LIM];
- Declare uppercase translation table (fold_toupper[])
- Array declaration
- Segment Source
- 142: static char fold_toupper[UCHAR_LIM];
- Convert to character class
Segment Element
Code insertion
-
1097: while (texta < lima && ignore[UCHAR (*texta)]) \
Segment Element
Code insertion
-
1099: while (textb < limb && ignore[UCHAR (*textb)]) \
Segment Element
Code insertion
-
1112: if (texta == lima && textb < limb && !ignore[UCHAR (*textb)]) \
Segment Element
Code insertion
-
1115: && !ignore[UCHAR (*texta)]) \
Segment Element
Code insertion
-
1121: while (texta < lima && ignore[UCHAR (*texta)]) \
Segment Element
Code insertion
-
1123: while (textb < limb && ignore[UCHAR (*textb)]) \
Segment Element
Code insertion
-
1139: CMP_WITH_IGNORE (translate[UCHAR (*texta)], translate[UCHAR (*textb)]);
Segment Element
Code insertion
-
1141: CMP_WITH_IGNORE (UCHAR (*texta), UCHAR (*textb));
Segment Element
Code insertion
-
1145: if (translate[UCHAR (*texta++)] != translate[UCHAR (*textb++)])
Segment Element
Code insertion
-
1147: diff = (translate[UCHAR (*--texta)]
1148: - translate[UCHAR (*--textb)]);
- Convert to character class
-
Code insertion
- Segment Source
-
1194: diff = UCHAR (*ap) - UCHAR (*bp);