Home
last modified time | relevance | path

Searched refs:re (Results 1 – 25 of 261) sorted by relevance

1234567891011

/illumos-gate/usr/src/contrib/ast/src/lib/libast/comp/
H A Dregcmp.c39 regex_t re; member
53 if (data || (size = roundof(size, ALIGN_BOUND2)) > (re->buf + re->size - re->cur)) in block()
56 re->cur += size; in block()
161 re = 0; in regcmp()
165 if ((n += INC) > TOT || !(re = newof(re, Regex_t, 0, n))) in regcmp()
167 if (re) in regcmp()
168 free(re); in regcmp()
172 re->cur = re->buf; in regcmp()
175 c = regcomp(&re->re, s, REG_EXTENDED|REG_LENIENT|REG_NULL); in regcmp()
181 free(re); in regcmp()
[all …]
H A Dregexp.c36 regex_t re; member
55 _re_comp(regexp_t* re, const char* pattern, char* handle, unsigned int size) in _re_comp() argument
65 n = regcomp(&env->re, pattern, REG_LENIENT|REG_NULL); in _re_comp()
89 re->re_nbra = env->re.re_nsub; in _re_comp()
94 _re_exec(regexp_t* re, const char* subject, const char* handle, int anchor) in _re_exec() argument
98 regmatch_t match[elementsof(re->re_braslist)+1]; in _re_exec()
102 re->re_loc1 = (char*)subject + match[0].rm_so; in _re_exec()
103 re->re_loc2 = (char*)subject + match[0].rm_eo; in _re_exec()
104 for (n = 1; n <= env->re.re_nsub; n++) in _re_exec()
106 re->re_braslist[n-1] = (char*)subject + match[n].rm_so; in _re_exec()
[all …]
H A Dfnmatch.c57 regex_t re; in fnmatch() local
65 if (!(reflags = regcomp(&re, pattern, reflags))) in fnmatch()
67 reflags = regexec(&re, subject, 1, &match, 0); in fnmatch()
68 regfree(&re); in fnmatch()
73 else if (!(reflags = regcomp(&re, pattern, reflags|REG_RIGHT))) in fnmatch()
75 reflags = regexec(&re, subject, 0, NiL, 0); in fnmatch()
76 regfree(&re); in fnmatch()
H A Dregexp.h79 _re_read(register regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof) in _re_read() argument
89 re->re_nodelim = 0; in _re_read()
95 re->re_nodelim = 1; in _re_read()
97 if (!re->re_sed && !prev) in _re_read()
107 if (re->re_sed) in _re_read()
110 re->re_nodelim = 1; in _re_read()
121 if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep)) in _re_read()
H A Dre_comp.c37 regex_t re; member
57 regfree(&state.re); in re_comp()
59 if (!(r = regcomp(&state.re, pattern, REG_LENIENT|REG_NOSUB|REG_NULL))) in re_comp()
65 regerror(r, &state.re, state.error, sizeof(state.error)); in re_comp()
73 switch (regexec(&state.re, subject, 0, NiL, 0)) in re_exec()
/illumos-gate/usr/src/lib/libc/port/locale/
H A Dnextwctype.c47 const _RuneEntry *base, *re; in nextwctype_l() local
71 re = base + (lim >> 1); in nextwctype_l()
72 if (re->__min <= wc && wc <= re->__max) in nextwctype_l()
74 else if (wc > re->__max) { in nextwctype_l()
75 base = re + 1; in nextwctype_l()
83 if (re->__min <= wc && wc <= re->__max) { in nextwctype_l()
84 if (re->__types != NULL) { in nextwctype_l()
86 if (re->__types[wc - re->__min] & wct) in nextwctype_l()
92 wc = re->__min; in nextwctype_l()
93 if (re->__types != NULL) { in nextwctype_l()
[all …]
H A Drunetype.c45 const _RuneEntry *base, *re; in __runetype() local
53 re = base + (lim >> 1); in __runetype()
54 if (re->__min <= c && c <= re->__max) { in __runetype()
55 if (re->__types) in __runetype()
56 return (re->__types[c - re->__min]); in __runetype()
58 return (re->__map); in __runetype()
59 } else if (c > re->__max) { in __runetype()
60 base = re + 1; in __runetype()
H A Dtowlower.c52 const _RuneEntry *base, *re; in change_case_ext() local
63 re = base + (lim >> 1); in change_case_ext()
64 if (re->__min <= c && c <= re->__max) { in change_case_ext()
65 return (re->__map + c - re->__min); in change_case_ext()
66 } else if (c > re->__max) { in change_case_ext()
67 base = re + 1; in change_case_ext()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/regex/
H A Dregnexec.c256 if (rex->re.group.number <= 0 || (num = rex->re.group.last - rex->re.group.number + 1) <= 0) in _matchpush()
1025 rex->re.conj_left.cont->re.conj_right.end = s; in parse()
1186 …catcher.re.group_catch.eo = rex->re.group.number ? &env->match[rex->re.group.number].rm_eo : (rego… in parse()
1304 …else if (!rex->re.group.size || rex->re.group.size > 0 && env->match[rex->re.group.size].rm_so >= … in parse()
1323 catcher.re.group_catch.cont = rex->re.cond_catch.cont; in parse()
1457 bitset(rex->re.neg_catch.index, s - rex->re.neg_catch.beg); in parse()
1681 if (s == rex->re.rep_catch.beg && rex->re.rep_catch.n > rex->re.rep_catch.ref->lo) in parse()
1687 …LINE__, rex->re.rep_catch.ref->re.group.expr.rex, rex->re.rep_catch.ref->re.group.expr.rex->re.gro… in parse()
1688 …if (!env->stack || s != rex->re.rep_catch.ref->re.rep_catch.beg && !rex->re.rep_catch.ref->re.grou… in parse()
1699 r = parserep(env, rex->re.rep_catch.ref, rex->re.rep_catch.cont, s, rex->re.rep_catch.n); in parse()
[all …]
H A Dregcomp.c611 if (!env->stats.x || env->stats.x->re.string.size < e->re.string.size) in stats()
628 if (!env->stats.y || env->stats.y->re.trie.min < e->re.trie.min) in stats()
2488 … e->re.exec.data = (*env->disc->re_compf)(env->regex, e->re.exec.text, e->re.exec.size, env->disc); in grp()
2958 if (z == HIT || !a->re.bm.skip[c] || a->re.bm.skip[c] > z && a->re.bm.skip[c] < HIT) in bmstr()
2969 if (z == HIT || !a->re.bm.skip[c] || a->re.bm.skip[c] > z && a->re.bm.skip[c] < HIT) in bmstr()
3033 if (x->re.string.size >= t->re.trie.min) in special()
3070 a->re.bm.size = n; in special()
3071 a->re.bm.back = (y == e || y == e->re.group.expr.rex) ? (m - n) : -1; in special()
3074 …a->re.bm.complete = (env->stats.e || y != e && (e->type != REX_GROUP || y != e->re.group.expr.rex)… in special()
3077 a->re.bm.fail = &a->re.bm.skip[UCHAR_MAX + 1]; in special()
[all …]
H A Dregdecomp.c97 …if (e->re.group.expr.binary.right && decomp(e->re.group.expr.binary.right, sp, type, delimiter, fl… in decomp()
147 if (decomp(e->re.group.expr.rex, sp, type, delimiter, flags)) in decomp()
157 if (settst(e->re.charclass, m)) in decomp()
265 meta(sp, e->re.onechar, type, 0, delimiter); in decomp()
300 t = (s = e->re.string.base) + e->re.string.size; in decomp()
310 if (e->re.trie.root[c]) in decomp()
324 if (decomp(e->re.group.expr.rex, sp, type, delimiter, flags)) in decomp()
359 …if (e->re.group.expr.binary.left && decomp(e->re.group.expr.binary.left, sp, type, delimiter, flag… in decomp()
361 if (q = e->re.group.expr.binary.right) in decomp()
364 …if (q->re.group.expr.binary.left && decomp(q->re.group.expr.binary.left, sp, type, delimiter, flag… in decomp()
[all …]
H A Dregrexec.c64 mid = (len < e->re.bm.right) ? 0 : (len - e->re.bm.right); in regrexec()
65 skip = e->re.bm.skip; in regrexec()
66 fail = e->re.bm.fail; in regrexec()
67 mask = e->re.bm.mask; in regrexec()
68 complete = e->re.bm.complete && !nmatch; in regrexec()
69 exactlen = e->re.bm.size; in regrexec()
70 leftlen = e->re.bm.left + exactlen; in regrexec()
71 rightlen = exactlen + e->re.bm.right; in regrexec()
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/tests/
H A Dquoting.sh307 [[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working'
308 [[ ${subject/${re}/'\3'} != '\3' ]] && err_exit 'string replacement with '"'\3'"' not working'
309 [[ ${subject/${re}/"\\3"} != '\3' ]] && err_exit 'string replacement with "\\3" not working'
310 [[ ${subject/${re}/"\3"} != '\3' ]] && err_exit 'string replacement with "\3" not working'
312 [[ ${subject/${re}/${string}} != words ]] && err_exit 'string replacement with $string not working …
314 [[ ${subject/${re}/"${string}"} != '\3' ]] && err_exit 'string replacement with "$string" not worki…
317 [[ ${subject/${re}/${string}} != '\3' ]] && err_exit 'string replacement with $string not working w…
319 [[ ${subject/${re}/\4} != '\4' ]] && err_exit 'string replacement with \4 not working'
320 [[ ${subject/${re}/'\4'} != '\4' ]] && err_exit 'string replacement with '\4' not working'
322 [[ ${subject/${re}/${string}} != '\4' ]] && err_exit 'string replacement with $string not working w…
[all …]
/illumos-gate/usr/src/cmd/vi/port/
H A Dex_re.c333 if (re == NULL || re->Expbuf[1] == 0) in compsub()
788 if (re == NULL || re->Expbuf[1] == 0) in vi_compile()
1022 if (re == NULL || re == scanre || re == subre) { in vi_compile()
1036 (char *)(re->Expbuf + sizeof (re->Expbuf)), 1); in vi_compile()
1062 if (re) { in cerror()
1063 re->Expbuf[0] = re->Expbuf[1] = 0; in cerror()
1078 if (re == NULL || re->Expbuf[0]) in execute()
1182 *a = re; in savere()
1212 re = a; in resre()
1217 if ((re != scanre) && (re != subre)) { in resre()
[all …]
/illumos-gate/usr/src/lib/libdwarf/common/
H A Ddwarf_ranges.c315 struct ranges_entry * re = 0; in dwarf_get_ranges_a() local
336 if (!re) { in dwarf_get_ranges_a()
342 free(re); in dwarf_get_ranges_a()
356 free(re); in dwarf_get_ranges_a()
364 free(re); in dwarf_get_ranges_a()
370 base = re; in dwarf_get_ranges_a()
371 last = re; in dwarf_get_ranges_a()
373 last->next = re; in dwarf_get_ranges_a()
374 last = re; in dwarf_get_ranges_a()
376 if (re->cur.dwr_addr1 == 0 && re->cur.dwr_addr2 == 0) { in dwarf_get_ranges_a()
[all …]
H A Ddwarf_groups.c147 struct Dwarf_Group_Map_Entry_s *re = 0; in _dwarf_insert_in_group_map() local
148 re = *(struct Dwarf_Group_Map_Entry_s **)entry2; in _dwarf_insert_in_group_map()
149 if (re != entry3) { in _dwarf_insert_in_group_map()
224 struct Dwarf_Group_Map_Entry_s *re = 0; in grp_walk_map() local
226 re = *(struct Dwarf_Group_Map_Entry_s **)nodep; in grp_walk_map()
231 temp_map_data[map_reccount].section = re->gm_key; in grp_walk_map()
232 temp_map_data[map_reccount].name = re->gm_section_name; in grp_walk_map()
356 struct Dwarf_Group_Map_Entry_s *re = 0; in grp_walk_for_name() local
358 re = *(struct Dwarf_Group_Map_Entry_s **)nodep; in grp_walk_for_name()
362 if (re->gm_group_number == target_group) { in grp_walk_for_name()
[all …]
/illumos-gate/usr/src/tools/onbld/Checks/
H A DHdrChk.py70 import re, os, sys
110 if self.lenient and re.search(r'^\s*//', line):
114 if not re.search(r'^\s*/\*', line):
117 while not re.search(r'\*/', line):
153 IDENT = re.compile(r'(%s)' % '|'.join(idents))
187 match = re.search(r'^#ifndef\s([a-zA-Z0-9_]+)$', line)
206 if not re.search(r'^_.*%s[_]?$' % guardname, guard):
212 if not re.search(r'#define\s%s$' % guard, line):
247 match = re.search(r'^#include(.*)$', line)
253 if not lenient and not re.search(r'\s<.*>',
[all …]
H A DMapfile.py42 import re, sys
56 CmtRE = re.compile(r'#.*$')
57 LeadingWSRE = re.compile(r'^\s+')
58 VersionRE = re.compile(r'^\$mapfile_version\s+2\s*$')
78 SymVerRE = re.compile(r'^\s*symbol_version\s+', re.IGNORECASE)
H A DSpellCheck.py27 import re, sys
266 regex = re.compile(r'\b%s\b' % (misspelling), re.IGNORECASE)
271 regex = re.compile(r'\b%s\b' % (alternate), re.IGNORECASE)
276 regex = re.compile(r'\b%s\b' % (alternate))
H A DComments.py39 import re, sys
44 bugre = re.compile(r'^(\d{2,7}) (.*)$')
63 bugnospcre = re.compile(r'^(\d{2,7})([^ ].*)')
64 ignorere = re.compile(r'^(' +
147 if not re.search(r'^' + re.escape(synopsis) +
/illumos-gate/usr/src/cmd/sort/common/
H A Dinternal.c122 r = re = n - 1; in tqs_algorithm()
150 p = MIN(re - r, n - re - 1); in tqs_algorithm()
157 q = re - r; in tqs_algorithm()
220 r = re = n - 1; in rqs_algorithm()
238 X[r] = X[re]; in rqs_algorithm()
239 X[re] = t; in rqs_algorithm()
240 (re)--; in rqs_algorithm()
260 p = MIN(re - r, n - re - 1); in rqs_algorithm()
266 p = re - r; in rqs_algorithm()
274 if (le + n - re - 1 <= 1) in rqs_algorithm()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/regex/
H A Dtestregex.c659 if (re) in report()
1116 quote(re, -1, test); in extract()
1242 char* re; in main() local
1804 if (re = field[1]) in main()
1806 if (streq(re, "SAME")) in main()
1808 re = ppat; in main()
1814 escape(re); in main()
1815 re = expand(re, patbuf); in main()
1816 strcpy(ppat = pat, re); in main()
1955 p = re + preg.re_npat; in main()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/disc/
H A Dsfkeyprintf.c48 regex_t* re[2]; member
287 if (fp->re[x]) in getfmt()
288 regfree(fp->re[x]); in getfmt()
290 fp->re[x] = &fp->red[x]; in getfmt()
293 f.next += fp->re[x]->re_npat; in getfmt()
296 f.next += fp->re[x]->re_npat; in getfmt()
297 …if (!regexec(fp->re[x], s, elementsof(match), match, 0) && !regsubexec(fp->re[x], s, elementsof(ma… in getfmt()
299 s = fp->re[x]->re_sub->re_buf; in getfmt()
358 for (i = 0; i < elementsof(fmt.re); i++) in sfkeyprintf()
359 if (fmt.re[i]) in sfkeyprintf()
[all …]
/illumos-gate/usr/src/cmd/devfsadm/
H A Ddcam1394_link.c102 devfsadm_enumerate_t re[1]; in dcam1394_process() local
120 re[0].re = restring0; in dcam1394_process()
121 re[0].subexp = 1; in dcam1394_process()
122 re[0].flags = MATCH_ALL; in dcam1394_process()
137 if (devfsadm_enumerate_int(p_path, 0, &buf, re, 1)) { in dcam1394_process()
/illumos-gate/usr/src/tools/onbld/Scm/
H A DIgnore.py30 import re
33 RE_SYNTAX = re.compile(r'^syntax:\s*(.*)\s*$')
61 ignore_list.append(re.compile('.*' + fnmatch.translate(l)))
63 ignore_list.append(re.compile(l))

1234567891011