Home
last modified time | relevance | path

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

12345678910

/titanic_41/usr/src/lib/libast/common/comp/
H A Dregcmp.c39 regex_t re; member
51 register Regex_t* re = (Regex_t*)handle; in block() local
53 if (data || (size = roundof(size, ALIGN_BOUND2)) > (re->buf + re->size - re->cur)) in block()
55 data = (void*)re->cur; in block()
56 re->cur += size; in block()
64 register Regex_t* re; in regcmp() local
154 re = 0; in regcmp()
158 if ((n += INC) > TOT || !(re = newof(re, Regex_t, 0, n))) in regcmp()
160 if (re) in regcmp()
161 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()
100 if (regexec(&env->re, subject, elementsof(match), match, 0) || anchor && match[0].rm_so) 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()
[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()
/titanic_41/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()
85 for (; wc <= re->__max; wc++) in nextwctype_l()
86 if (re->__types[wc - re->__min] & wct) in nextwctype_l()
88 } else if (re->__map & wct) 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()
/titanic_41/usr/src/lib/libast/common/regex/
H A Dregnexec.c238 #define matchpush(e,x) ((x)->re.group.number?_matchpush(e,x):0)
239 #define matchcopy(e,x) ((x)->re.group.number?memcpy(matchframe->match,matchframe->save,matchframe->…
240 #define matchpop(e,x) ((x)->re.group.number?memcpy(matchframe->match,matchframe->save,matchframe->s…
257 if (rex->re.group.number <= 0 || (num = rex->re.group.last - rex->re.group.number + 1) <= 0) in _matchpush()
265 f->match = m = env->match + rex->re.group.number; in _matchpush()
409 … %s %d %d %d %d `%-.*s'\n", __LINE__, debug_flag, rexname(rex->re.group.expr.rex), rex->re.group.n… in parserep()
432 catcher.re.rep_catch.ref = rex; in parserep()
433 catcher.re.rep_catch.cont = cont; in parserep()
434 catcher.re.rep_catch.beg = s; in parserep()
435 catcher.re.rep_catch.n = n + 1; in parserep()
[all …]
H A Dregcomp.c157 e->re.data = (char*)e + sizeof(Rex_t); in node()
194 drop(disc, e->re.group.expr.binary.left); in drop()
195 drop(disc, e->re.group.expr.binary.right); in drop()
205 drop(disc, e->re.group.expr.rex); in drop()
209 triedrop(disc, e->re.trie.root[i]); in drop()
237 if (e->re.group.expr.binary.left) in mark()
238 mark(e->re.group.expr.binary.left, set); in mark()
239 if (e->re.group.expr.binary.right) in mark()
240 mark(e->re.group.expr.binary.right, set); in mark()
251 mark(e->re.group.expr.rex, set); in mark()
[all …]
H A Dregdecomp.c94 if (decomp(e->re.group.expr.binary.left, sp, type, delimiter, flags)) in decomp()
97 …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()
318 detrie(e->re.trie.root[c], sp, pfx, pfx, &pfx[sizeof(pfx)], delimiter); in decomp()
324 if (decomp(e->re.group.expr.rex, sp, type, delimiter, flags)) in decomp()
332 if (decomp(e->re.group.expr.binary.left, sp, type, delimiter, flags)) 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()
/titanic_41/usr/src/tools/ctf/dwarf/common/
H A Ddwarf_ranges.c90 struct ranges_entry * re = calloc(sizeof(struct ranges_entry),1); in dwarf_get_ranges_a() local
91 if(!re) { in dwarf_get_ranges_a()
103 READ_UNALIGNED(dbg,re->cur.dwr_addr1, in dwarf_get_ranges_a()
107 READ_UNALIGNED(dbg,re->cur.dwr_addr2 , in dwarf_get_ranges_a()
112 base = re; in dwarf_get_ranges_a()
113 last = re; in dwarf_get_ranges_a()
115 last->next = re; in dwarf_get_ranges_a()
116 last = re; in dwarf_get_ranges_a()
118 if(re->cur.dwr_addr1 == 0 && re->cur.dwr_addr2 == 0) { in dwarf_get_ranges_a()
119 re->cur.dwr_type = DW_RANGES_END; in dwarf_get_ranges_a()
[all …]
/titanic_41/usr/src/lib/libshell/common/tests/
H A Dquoting.sh306 [[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working'
307 [[ ${subject/${re}/'\3'} != '\3' ]] && 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'
311 [[ ${subject/${re}/${string}} != words ]] && err_exit 'string replacement with $string not working …
312 [[ $(print -r "${subject/${re}/${string}}") != words ]] && err_exit 'string replacement with $strin…
313 [[ ${subject/${re}/"${string}"} != '\3' ]] && err_exit 'string replacement with "$string" not worki…
314 [[ $(print -r "${subject/${re}/"${string}"}") != '\3' ]] && err_exit 'string replacement with "$str…
316 [[ ${subject/${re}/${string}} != '\3' ]] && err_exit 'string replacement with $string not working w…
317 [[ ${subject/${re}/"${string}"} != '\\3' ]] && err_exit 'string replacement with "$string" not work…
[all …]
/titanic_41/usr/src/cmd/vi/port/
H A Dex_re.c333 if (re == NULL || re->Expbuf[1] == 0) in compsub()
641 if(re != NULL && c >= '1' && c < re->Nbra + '1') { in dosub()
788 if (re == NULL || re->Expbuf[1] == 0) in vi_compile()
1024 if (re == NULL || re == scanre || re == subre) { in vi_compile()
1025 if ((re = calloc(1, sizeof(struct regexp))) == NULL) { in vi_compile()
1030 regex_comp_free(&re->Expbuf); in vi_compile()
1031 memset(re, 0, sizeof(struct regexp)); in vi_compile()
1034 compile((char *) genbuf, (char *) re->Expbuf, (char *) re->Expbuf in vi_compile()
1037 (void) _compile((const char *)genbuf, (char *)re->Expbuf, in vi_compile()
1038 (char *)(re->Expbuf + sizeof (re->Expbuf)), 1); in vi_compile()
[all …]
/titanic_41/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.py41 import re, sys, CmtBlk
54 CmtRE = re.compile(r'#.*$')
55 LeadingWSRE = re.compile(r'^\s+')
56 VersionRE = re.compile(r'^\$mapfile_version\s+2\s*$')
77 SymVerRE = re.compile(r'^\s*symbol_version\s+', re.IGNORECASE)
/titanic_41/usr/src/lib/libast/amd64/include/ast/
H A Dregexp.h90 …regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, en… in __OTORP__()
99 re->re_nodelim = 0;
105 re->re_nodelim = 1;
107 if (!re->re_sed && !prev)
117 if (re->re_sed)
120 re->re_nodelim = 1;
131 if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
/titanic_41/usr/src/lib/libast/sparcv9/include/ast/
H A Dregexp.h90 …regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, en… in __OTORP__()
99 re->re_nodelim = 0;
105 re->re_nodelim = 1;
107 if (!re->re_sed && !prev)
117 if (re->re_sed)
120 re->re_nodelim = 1;
131 if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
/titanic_41/usr/src/lib/libast/i386/include/ast/
H A Dregexp.h90 …regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, en… in __OTORP__()
99 re->re_nodelim = 0;
105 re->re_nodelim = 1;
107 if (!re->re_sed && !prev)
117 if (re->re_sed)
120 re->re_nodelim = 1;
131 if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
/titanic_41/usr/src/lib/libast/sparc/include/ast/
H A Dregexp.h90 …regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, en… in __OTORP__()
99 re->re_nodelim = 0;
105 re->re_nodelim = 1;
107 if (!re->re_sed && !prev)
117 if (re->re_sed)
120 re->re_nodelim = 1;
131 if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
/titanic_41/usr/src/cmd/sort/common/
H A Dinternal.c96 ssize_t re; /* boundary of right equal partition */ in tqs_algorithm() local
122 r = re = n - 1; in tqs_algorithm()
135 swap((void **)&X[r], (void **)&X[re--]); in tqs_algorithm()
150 p = MIN(re - r, n - re - 1); in tqs_algorithm()
157 q = re - r; in tqs_algorithm()
194 ssize_t re; /* boundary of right equal partition */ in rqs_algorithm() local
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()
[all …]
/titanic_41/usr/src/lib/libast/common/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()
291 if (regcomp(fp->re[x], f.next, REG_DELIMITED|REG_NULL)) in getfmt()
293 f.next += fp->re[x]->re_npat; in getfmt()
294 if (regsubcomp(fp->re[x], f.next, NiL, 0, 0)) 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()
[all …]
/titanic_41/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()
/titanic_41/usr/src/lib/libcmd/common/
H A Dgrep.c125 regex_t re; /* compiled re */ member
148 List_t re; /* re list */ member
210 if (c = regcomp(&x->re, s, state->options|REG_MULTIPLE)) in addre()
211 regfatal(&x->re, 3, c); in addre()
217 if (state->number || !regrecord(&x->re)) in addre()
220 else if (state->label || regcomb(&p->tail->re, &x->re)) in addre()
223 if (!state->byline && (state->number || !state->label || !regrecord(&x->re))) in addre()
257 addre(state, &state->re, x->string); in compile()
284 addre(state, &state->re, s); in compile()
291 addre(state, &state->re, s); in compile()
[all …]

12345678910