Lines Matching +full:cs +full:- +full:0

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
37 * First, the stuff that ends up in the outside-world include file
43 = struct re_guts *re_g; // none of your business :-)
64 * - OPLUS_ and O_PLUS are *inside* the loop they create.
65 * - OQUEST_ and O_QUEST are *outside* the bypass they create.
66 * - OCH_ and O_CH are *outside* the multi-way branch they create, while
76 #define OPRMASK 0xf8000000L
77 #define OPDMASK 0x07ffffffL
84 #define OEND (1L<<OPSHIFT) /* endmarker - */
86 #define OBOL (3L<<OPSHIFT) /* left anchor - */
87 #define OEOL (4L<<OPSHIFT) /* right anchor - */
88 #define OANY (5L<<OPSHIFT) /* . - */
102 #define OBOW (19L<<OPSHIFT) /* begin word - */
103 #define OEOW (20L<<OPSHIFT) /* end word - */
104 #define OBOS (21L<<OPSHIFT) /* begin subj. - */
105 #define OEOS (22L<<OPSHIFT) /* end subj. - */
106 #define OWBND (23L<<OPSHIFT) /* word bound - */
107 #define ONWBND (24L<<OPSHIFT) /* not bound - */
110 * Structures for [] character-set representation.
129 CHIN1(cset *cs, wint_t ch) in CHIN1() argument
133 assert(ch >= 0); in CHIN1()
135 return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^ in CHIN1()
136 cs->invert); in CHIN1()
137 for (i = 0; i < cs->nwides; i++) { in CHIN1()
138 if (cs->icase) { in CHIN1()
139 if (ch == towlower(cs->wides[i]) || in CHIN1()
140 ch == towupper(cs->wides[i])) in CHIN1()
141 return (!cs->invert); in CHIN1()
142 } else if (ch == cs->wides[i]) in CHIN1()
143 return (!cs->invert); in CHIN1()
145 for (i = 0; i < cs->nranges; i++) in CHIN1()
146 if (cs->ranges[i].min <= ch && ch <= cs->ranges[i].max) in CHIN1()
147 return (!cs->invert); in CHIN1()
148 for (i = 0; i < cs->ntypes; i++) in CHIN1()
149 if (iswctype(ch, cs->types[i])) in CHIN1()
150 return (!cs->invert); in CHIN1()
151 return (cs->invert); in CHIN1()
155 CHIN(cset *cs, wint_t ch) in CHIN() argument
158 assert(ch >= 0); in CHIN()
160 return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^ in CHIN()
161 cs->invert); in CHIN()
162 else if (cs->icase) in CHIN()
163 return (CHIN1(cs, ch) || CHIN1(cs, towlower(ch)) || in CHIN()
164 CHIN1(cs, towupper(ch))); in CHIN()
166 return (CHIN1(cs, ch)); in CHIN()
170 * main compiled-expression structure
177 cset *sets; /* -> cset [ncsets] */
180 sopno firststate; /* the initial OEND (normally 0) */
190 int *charjump; /* Boyer-Moore char jump table */
191 int *matchjump; /* Boyer-Moore match jump table */
199 #define OUT (CHAR_MIN - 1) /* a non-character value */
200 #define IGN (CHAR_MIN - 2)