w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

utype.h
Go to the documentation of this file.
1 #ifndef _UTYPE_H
2 #define _UTYPE_H
3 /* Copyright: 2001 George Williams */
4 /* License: BSD-3-clause */
5 /* Contributions: Joe Da Silva */
6 
7 /* This file was generated using the program 'makeutype' */
8 
9 #include <ctype.h> /* Include here so we can control it. If a system header includes it later bad things happen */
10 #include <basics.h> /* Include here so we can use pre-defined int types to correctly size constant data arrays. */
11 #ifdef tolower
12 # undef tolower
13 #endif
14 #ifdef toupper
15 # undef toupper
16 #endif
17 #ifdef islower
18 # undef islower
19 #endif
20 #ifdef isupper
21 # undef isupper
22 #endif
23 #ifdef isalpha
24 # undef isalpha
25 #endif
26 #ifdef isdigit
27 # undef isdigit
28 #endif
29 #ifdef isalnum
30 # undef isalnum
31 #endif
32 #ifdef isspace
33 # undef isspace
34 #endif
35 #ifdef ispunct
36 # undef ispunct
37 #endif
38 #ifdef ishexdigit
39 # undef ishexdigit
40 #endif
41 
42 extern const unsigned short ____tolower[];
43 extern const unsigned short ____toupper[];
44 extern const unsigned short ____totitle[];
45 extern const unsigned short ____tomirror[];
46 extern const unsigned char ____digitval[];
47 
48 /* utype[] holds binary flags used for features of each unicode.org character */
49 #define ____L 0x1
50 #define ____U 0x2
51 #define ____TITLE 0x4
52 #define ____D 0x8
53 #define ____S 0x10
54 #define ____P 0x20
55 #define ____X 0x40
56 #define ____ZW 0x80
57 #define ____L2R 0x100
58 #define ____R2L 0x200
59 #define ____ENUM 0x400
60 #define ____ANUM 0x800
61 #define ____ENS 0x1000
62 #define ____CS 0x2000
63 #define ____ENT 0x4000
64 #define ____COMBINE 0x8000
65 #define ____BB 0x10000
66 #define ____BA 0x20000
67 #define ____NS 0x40000
68 #define ____NE 0x80000
69 #define ____UB 0x100000
70 #define ____NB 0x8000000
71 #define ____AL 0x200000
72 #define ____ID 0x400000
73 #define ____INITIAL 0x800000
74 #define ____MEDIAL 0x1000000
75 #define ____FINAL 0x2000000
76 #define ____ISOLATED 0x4000000
77 #define ____DECOMPNORM 0x10000000
78 
79 #define islower(ch) (____utype[(ch)+1]&____L)
80 #define isupper(ch) (____utype[(ch)+1]&____U)
81 #define istitle(ch) (____utype[(ch)+1]&____TITLE)
82 #define isalpha(ch) (____utype[(ch)+1]&(____L|____U|____TITLE|____AL))
83 #define isdigit(ch) (____utype[(ch)+1]&____D)
84 #define isalnum(ch) (____utype[(ch)+1]&(____L|____U|____TITLE|____AL|____D))
85 #define isideographic(ch) (____utype[(ch)+1]&____ID)
86 #define isideoalpha(ch) (____utype[(ch)+1]&(____ID|____L|____U|____TITLE|____AL))
87 #define isspace(ch) (____utype[(ch)+1]&____S)
88 #define ispunct(ch) (____utype[(ch)+1]&_____P)
89 #define ishexdigit(ch) (____utype[(ch)+1]&____X)
90 #define iszerowidth(ch) (____utype[(ch)+1]&____ZW)
91 #define islefttoright(ch) (____utype[(ch)+1]&____L2R)
92 #define isrighttoleft(ch) (____utype[(ch)+1]&____R2L)
93 #define iseuronumeric(ch) (____utype[(ch)+1]&____ENUM)
94 #define isarabnumeric(ch) (____utype[(ch)+1]&____ANUM)
95 #define iseuronumsep(ch) (____utype[(ch)+1]&____ENS)
96 #define iscommonsep(ch) (____utype[(ch)+1]&____CS)
97 #define iseuronumterm(ch) (____utype[(ch)+1]&____ENT)
98 #define iscombining(ch) (____utype[(ch)+1]&____COMBINE)
99 #define isbreakbetweenok(ch1,ch2) (((____utype[(ch1)+1]&____BA) && !(____utype[(ch2)+1]&____NS)) || ((____utype[(ch2)+1]&____BB) && !(____utype[(ch1)+1]&____NE)) || (!(____utype[(ch2)+1]&____D) && ch1=='/'))
100 #define isnobreak(ch) (____utype[(ch)+1]&____NB)
101 #define isarabinitial(ch) (____utype[(ch)+1]&____INITIAL)
102 #define isarabmedial(ch) (____utype[(ch)+1]&____MEDIAL)
103 #define isarabfinal(ch) (____utype[(ch)+1]&____FINAL)
104 #define isarabisolated(ch) (____utype[(ch)+1]&____ISOLATED)
105 
106 #define isdecompositionnormative(ch) (____utype[(ch)+1]&____DECOMPNORM)
107 
108 extern const uint32 ____utype[]; /* hold character type features for each Unicode.org defined character */
109 
110 /* utype2[] binary flags used for position/layout of each unicode.org character */
111 #define ____COMBININGCLASS 0xff
112 #define ____ABOVE 0x100
113 #define ____BELOW 0x200
114 #define ____OVERSTRIKE 0x400
115 #define ____LEFT 0x800
116 #define ____RIGHT 0x1000
117 #define ____JOINS2 0x2000
118 #define ____CENTERLEFT 0x4000
119 #define ____CENTERRIGHT 0x8000
120 #define ____CENTEREDOUTSIDE 0x10000
121 #define ____OUTSIDE 0x20000
122 #define ____LEFTEDGE 0x80000
123 #define ____RIGHTEDGE 0x40000
124 #define ____TOUCHING 0x100000
125 #define ____COMBININGPOSMASK 0x1fff00
126 #define ____NOPOSDATAGIVEN (uint32)(-1) /* -1 == no position data given */
127 
128 #define combiningclass(ch) (____utype2[(ch)+1]&____COMBININGCLASS)
129 #define combiningposmask(ch) (____utype2[(ch)+1]&____COMBININGPOSMASK)
130 
131 extern const uint32 ____utype2[]; /* hold position boolean flags for each Unicode.org defined character */
132 
133 #define isunicodepointassigned(ch) (____codepointassigned[(ch)/32]&(1<<((ch)%32)))
134 
135 extern const uint32 ____codepointassigned[]; /* 1bit_boolean_flag x 32 = exists in Unicode.org character chart list. */
136 
137 #define tolower(ch) (____tolower[(ch)+1])
138 #define toupper(ch) (____toupper[(ch)+1])
139 #define totitle(ch) (____totitle[(ch)+1])
140 #define tomirror(ch) (____tomirror[(ch)+1])
141 #define tovalue(ch) (____digitval[(ch)+1])
142 
143 
144 extern struct arabicforms {
145  unsigned short initial, medial, final, isolated;
146  unsigned int isletter: 1;
147  unsigned int joindual: 1;
148  unsigned int required_lig_with_alef: 1;
149 } ArabicForms[256]; /* for chars 0x600-0x6ff, subtract 0x600 to use array */
150 
151 #define _SOFT_HYPHEN 0xad
152 
153 #define _DOUBLE_S 0xdf
154 
155 #endif
unsigned long uint32
Definition: tiff.h:68
const unsigned short ____totitle[]
Definition: utype.c:16395
struct arabicforms ArabicForms[256]
const unsigned short ____tomirror[]
Definition: utype.c:8204
const unsigned char ____digitval[]
Definition: utype.c:32785
const unsigned short ____toupper[]
Definition: utype.c:8200
const uint32 ____utype2[]
Definition: utype.c:49175
const uint32 ____codepointassigned[]
Definition: utype.c:57371
const unsigned short ____tolower[]
Definition: utype.c:9
const uint32 ____utype[]
Definition: utype.c:16399
unsigned int joindual
Definition: utype.h:147
unsigned int required_lig_with_alef
Definition: utype.h:148
unsigned int isletter
Definition: utype.h:146
unsigned short isolated
Definition: utype.h:145
unsigned short initial
Definition: utype.h:145
unsigned short medial
Definition: utype.h:145