/freebsd/crypto/openssh/openbsd-compat/ |
H A D | fnmatch.c | 104 classmatch(const char *pattern, char test, int foldcase, const char **ep) in classmatch() argument 106 const char * const mismatch = pattern; in classmatch() 112 if (pattern[0] != '[' || pattern[1] != ':') { in classmatch() 116 pattern += 2; in classmatch() 118 if ((colon = strchr(pattern, ':')) == NULL || colon[1] != ']') { in classmatch() 123 len = (size_t)(colon - pattern); in classmatch() 125 if (foldcase && strncmp(pattern, "upper:]", 7) == 0) in classmatch() 126 pattern = "lower:]"; in classmatch() 128 if (!strncmp(pattern, cc->name, len) && cc->name[len] == '\0') { in classmatch() 149 static int fnmatch_ch(const char **pattern, const char **string, int flags) in fnmatch_ch() argument [all …]
|
H A D | bsd-cygwin_util.c | 132 __match_pattern (const wchar_t *s, const wchar_t *pattern) in __match_pattern() argument 136 if (!*pattern) in __match_pattern() 139 if (*pattern == '*') { in __match_pattern() 141 pattern++; in __match_pattern() 144 if (!*pattern) in __match_pattern() 148 if (*pattern != '?' && *pattern != '*') { in __match_pattern() 155 if (*s == *pattern && in __match_pattern() 156 __match_pattern(s + 1, pattern + 1)) in __match_pattern() 166 if (__match_pattern(s, pattern)) in __match_pattern() 179 if (*pattern != '?' && towlower(*pattern) != towlower(*s)) in __match_pattern() [all …]
|
/freebsd/contrib/less/ |
H A D | pattern.c | 11 * Routines to do pattern matching. 21 * Compile a search pattern, for future use by match_pattern. 23 static int compile_pattern2(constant char *pattern, int search_type, PATTERN_TYPE *comp_pattern, int show_error) in compile_pattern2() argument 32 if (re_compile_pattern(pattern, strlen(pattern), comp)) in compile_pattern2() 36 error("Invalid pattern", NULL_PARG); in compile_pattern2() 48 if (regcomp(comp, pattern, REGCOMP_FLAG | (is_caseless ? REG_ICASE : 0))) in compile_pattern2() 52 error("Invalid pattern", NULL_PARG); in compile_pattern2() 66 pcre *comp = pcre_compile(pattern, in compile_pattern2() 83 pcre2_code *comp = pcre2_compile((PCRE2_SPTR)pattern, strle in compile_pattern2() 145 compile_pattern(char * pattern,int search_type,int show_error,PATTERN_TYPE * comp_pattern) compile_pattern() argument 166 uncompile_pattern(PATTERN_TYPE * pattern) uncompile_pattern() argument 230 is_null_pattern(PATTERN_TYPE pattern) is_null_pattern() argument 261 match(char * pattern,int pattern_len,char * buf,int buf_len,char *** sp,char *** ep,int nsubs) match() argument 297 match_pattern1(PATTERN_TYPE pattern,char * tpattern,char * line,int line_len,char ** sp,char ** ep,int nsp,int notbol,int search_type) match_pattern1() argument 445 match_pattern(PATTERN_TYPE pattern,char * tpattern,char * line,int line_len,char ** sp,char ** ep,int nsp,int notbol,int search_type) match_pattern() argument [all...] |
/freebsd/lib/libc/gen/ |
H A D | fnmatch.c | 75 fnmatch(const char *pattern, const char *string, int flags) in fnmatch() argument 79 return (fnmatch1(pattern, string, string, flags, initial, initial)); in fnmatch() 83 fnmatch1(const char *pattern, const char *string, const char *stringstart, in fnmatch1() argument 95 pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); in fnmatch1() 98 pattern += pclen; in fnmatch1() 124 c = *pattern; in fnmatch1() 127 c = *++pattern; in fnmatch1() 154 bt_pattern = pattern, bt_patmbs = patmbs; in fnmatch1() 167 switch (rangematch(pattern, sc, flags, &newp, in fnmatch1() 172 pattern = newp; in fnmatch1() [all …]
|
/freebsd/crypto/openssh/ |
H A D | match.c | 57 match_pattern(const char *s, const char *pattern) in match_pattern() argument 61 if (!*pattern) in match_pattern() 64 if (*pattern == '*') { in match_pattern() 66 while (*pattern == '*') in match_pattern() 67 pattern++; in match_pattern() 70 if (!*pattern) in match_pattern() 74 if (*pattern != '?' && *pattern != '*') { in match_pattern() 81 if (*s == *pattern && in match_pattern() 82 match_pattern(s + 1, pattern + 1)) in match_pattern() 92 if (match_pattern(s, pattern)) in match_pattern() [all …]
|
/freebsd/contrib/one-true-awk/ |
H A D | awkgram.y | 65 %type <p> pas pattern ppattern plist pplist patlist prarg term re 125 FOR '(' opt_simple_stmt ';' opt_nl pattern ';' opt_nl opt_simple_stmt rparen {inloop++;} stmt 139 IF '(' pattern rparen { $$ = notnull($3); } 172 pattern { $$ = notnull($1); } 195 pattern 196 | patlist comma pattern { $$ = linkum($1, $3); } 221 pattern: 222 var ASGNOP pattern { $$ = op2($2, $1, $3); } 223 | pattern '?' pattern ':' pattern %prec '?' 225 | pattern bor pattern %prec BOR [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/MSP430/ |
H A D | MSP430InstrFormats.td | 47 dag outs, dag ins, string asmstr, list<dag> pattern> 49 let Pattern = pattern; 64 dag outs, dag ins, string asmstr, list<dag> pattern> 65 : IForm<opcode, dest, 1, src, size, outs, ins, asmstr, pattern>; 68 dag outs, dag ins, string asmstr, list<dag> pattern> 69 : IForm8<opcode, DstReg, SrcReg, 2, outs, ins, asmstr, pattern> { 74 dag outs, dag ins, string asmstr, list<dag> pattern> 75 : IForm8<opcode, DstReg, SrcImm, 4, outs, ins, asmstr, pattern> { 83 dag outs, dag ins, string asmstr, list<dag> pattern> 86 let Pattern = pattern; [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/XCore/ |
H A D | XCoreInstrFormats.td | 12 class InstXCore<int sz, dag outs, dag ins, string asmstr, list<dag> pattern> 20 let Pattern = pattern; 26 class PseudoInstXCore<dag outs, dag ins, string asmstr, list<dag> pattern> 27 : InstXCore<0, outs, ins, asmstr, pattern> { 35 class _F3R<bits<5> opc, dag outs, dag ins, string asmstr, list<dag> pattern> 36 : InstXCore<2, outs, ins, asmstr, pattern> { 44 class _F3RImm<bits<5> opc, dag outs, dag ins, string asmstr, list<dag> pattern> 45 : _F3R<opc, outs, ins, asmstr, pattern> { 49 class _FL3R<bits<9> opc, dag outs, dag ins, string asmstr, list<dag> pattern> 50 : InstXCore<4, outs, ins, asmstr, pattern> { [all …]
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | fnmatch.c | 62 rk_fnmatch(const char *pattern, const char *string, int flags) in rk_fnmatch() argument 68 switch (c = *pattern++) { in rk_fnmatch() 83 c = *pattern; in rk_fnmatch() 86 c = *++pattern; in rk_fnmatch() 108 if (!rk_fnmatch(pattern, string, flags & ~FNM_PERIOD)) in rk_fnmatch() 120 if ((pattern = in rk_fnmatch() 121 rangematch(pattern, *string, flags)) == NULL) in rk_fnmatch() 127 if ((c = *pattern++) == EOS) { in rk_fnmatch() 129 --pattern; in rk_fnmatch() 142 rangematch(const char *pattern, int test, int flags) in rangematch() argument [all …]
|
H A D | glob.c | 168 glob(const char *pattern, in glob() argument 177 patnext = (const u_char *) pattern; in glob() 219 static int globexp1(const Char *pattern, glob_t *pglob) in globexp1() argument 221 const Char* ptr = pattern; in globexp1() 225 if (pattern[0] == CHAR_LBRACE && pattern[1] == CHAR_RBRACE && pattern[2] == CHAR_EOS) in globexp1() 226 return glob0(pattern, pglob); in globexp1() 229 if (!globexp2(ptr, pattern, pglob, &rv)) in globexp1() 232 return glob0(pattern, pglob); in globexp1() 241 static int globexp2(const Char *ptr, const Char *pattern, in globexp2() argument 250 for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++) in globexp2() [all …]
|
/freebsd/sys/libkern/ |
H A D | fnmatch.c | 54 fnmatch(const char *pattern, const char *string, int flags) in fnmatch() argument 61 switch (c = *pattern++) { in fnmatch() 78 c = *pattern; in fnmatch() 81 c = *++pattern; in fnmatch() 104 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD)) in fnmatch() 121 switch (rangematch(pattern, *string, flags, &newp)) { in fnmatch() 125 pattern = newp; in fnmatch() 134 if ((c = *pattern++) == EOS) { in fnmatch() 136 --pattern; in fnmatch() 157 rangematch(const char *pattern, char test, int flags, char **newp) in rangematch() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/LoongArch/ |
H A D | LoongArchLASXInstrFormats.td | 22 list<dag> pattern = []> 23 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 35 list<dag> pattern = []> 36 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 47 list<dag> pattern = []> 48 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 59 list<dag> pattern = []> 60 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 72 list<dag> pattern = []> 73 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { [all …]
|
H A D | LoongArchLSXInstrFormats.td | 22 list<dag> pattern = []> 23 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 35 list<dag> pattern = []> 36 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 47 list<dag> pattern = []> 48 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 59 list<dag> pattern = []> 60 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 72 list<dag> pattern = []> 73 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { [all …]
|
H A D | LoongArchInstrFormats.td | 20 list<dag> pattern = []> 34 let Pattern = pattern; 38 class Pseudo<dag outs, dag ins, list<dag> pattern = [], string opcstr = "", 40 : LAInst<outs, ins, opcstr, opnstr, pattern> { 52 list<dag> pattern = []> 53 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 65 list<dag> pattern = []> 66 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { 80 list<dag> pattern = []> 81 : LAInst<outs, ins, deriveInsnMnemonic<NAME>.ret, opnstr, pattern> { [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AVR/ |
H A D | AVRInstrFormats.td | 14 class AVRInst<dag outs, dag ins, string asmstr, list<dag> pattern> 21 let Pattern = pattern; 27 class AVRInst16<dag outs, dag ins, string asmstr, list<dag> pattern> 28 : AVRInst<outs, ins, asmstr, pattern> { 35 class AVRInst32<dag outs, dag ins, string asmstr, list<dag> pattern> 36 : AVRInst<outs, ins, asmstr, pattern> { 50 class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern> 51 : AVRInst16<outs, ins, asmstr, pattern> { 52 let Pattern = pattern; 67 list<dag> pattern> [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCInstrFormats.td | 130 InstrItinClass itin, list<dag> pattern> 132 let Pattern = pattern; 225 list<dag> pattern> 229 let Pattern = pattern; 238 InstrItinClass itin, list<dag> pattern> 244 let Pattern = pattern; 252 InstrItinClass itin, list<dag> pattern> 253 : DForm_base<opcode, OOL, IOL, asmstr, itin, pattern> { 257 InstrItinClass itin, list<dag> pattern> 258 : DForm_base<opcode, OOL, IOL, asmstr, itin, pattern> { [all...] |
/freebsd/contrib/diff/lib/ |
H A D | exclude.c | 78 char const *pattern; member 112 fnmatch_no_wildcards (char const *pattern, char const *f, int options) in fnmatch_no_wildcards() argument 116 ? strcasecmp (pattern, f) in fnmatch_no_wildcards() 117 : strcmp (pattern, f)); in fnmatch_no_wildcards() 120 size_t patlen = strlen (pattern); in fnmatch_no_wildcards() 122 ? strncasecmp (pattern, f, patlen) in fnmatch_no_wildcards() 123 : strncmp (pattern, f, patlen)); in fnmatch_no_wildcards() 156 char const *pattern = exclude[i].pattern; in excluded_filename() local 164 bool matched = ((*matcher) (pattern, f, options) == 0); in excluded_filename() 170 matched = ((*matcher) (pattern, p + 1, options) == 0); in excluded_filename() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Xtensa/ |
H A D | XtensaInstrFormats.td | 12 class XtensaInst<int size, dag outs, dag ins, string asmstr, list<dag> pattern, 23 let Pattern = pattern; 29 class XtensaInst24<dag outs, dag ins, string asmstr, list<dag> pattern, 31 : XtensaInst<3, outs, ins, asmstr, pattern, itin> { 37 class XtensaInst16<dag outs, dag ins, string asmstr, list<dag> pattern, 39 : XtensaInst<2, outs, ins, asmstr, pattern, itin> { 46 string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> 47 : XtensaInst24<outs, ins, asmstr, pattern, itin> { 61 string asmstr, list<dag> pattern, InstrItinClass itin = NoItinerary> 62 : XtensaInst24<outs, ins, asmstr, pattern, itin> { [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Sparc/ |
H A D | SparcInstrFormats.td | 9 class InstSP<dag outs, dag ins, string asmstr, list<dag> pattern, 23 let Pattern = pattern; 36 class F2<dag outs, dag ins, string asmstr, list<dag> pattern, 38 : InstSP<outs, ins, asmstr, pattern, itin> { 48 class F2_1<bits<3> op2Val, dag outs, dag ins, string asmstr, list<dag> pattern, 50 : F2<outs, ins, asmstr, pattern, itin> { 59 list<dag> pattern, InstrItinClass itin = NoItinerary> 60 : F2<outs, ins, asmstr, pattern, itin> { 69 dag outs, dag ins, string asmstr, list<dag> pattern, 71 : InstSP<outs, ins, asmstr, pattern, iti [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
H A D | Mips16InstrFormats.td | 35 class MipsInst16_Base<dag outs, dag ins, string asmstr, list<dag> pattern, 45 let Pattern = pattern; 54 class MipsInst16<dag outs, dag ins, string asmstr, list<dag> pattern, 56 MipsInst16_Base<outs, ins, asmstr, pattern, itin> 71 class MipsInst16_32<dag outs, dag ins, string asmstr, list<dag> pattern, 73 MipsInst16_Base<outs, ins, asmstr, pattern, itin> 81 class MipsInst16_EXTEND<dag outs, dag ins, string asmstr, list<dag> pattern, 83 MipsInst16_32<outs, ins, asmstr, pattern, itin> 91 class MipsPseudo16<dag outs, dag ins, string asmstr, list<dag> pattern>: 92 MipsInst16<outs, ins, asmstr, pattern, IIPseudo> { [all …]
|
/freebsd/lib/libc/tests/gen/ |
H A D | fnmatch_test.c | 82 result = fnmatch(t->pattern, t->string, flags); in ATF_TC_BODY() 85 if (strchr(t->pattern, '\\') == NULL && in ATF_TC_BODY() 88 result = fnmatch(t->pattern, t->string, flags); in ATF_TC_BODY() 93 if (strchr(t->pattern, '\\') != NULL && in ATF_TC_BODY() 98 result = fnmatch(t->pattern, t->string, flags); in ATF_TC_BODY() 103 if ((t->string[0] != '.' || t->pattern[0] == '.' || in ATF_TC_BODY() 107 result = fnmatch(t->pattern, t->string, flags); in ATF_TC_BODY() 116 result = fnmatch(t->pattern, t->string, flags); in ATF_TC_BODY() 121 if ((((t->string[0] != '.' || t->pattern[0] == '.') && in ATF_TC_BODY() 126 result = fnmatch(t->pattern, t->string, flags); in ATF_TC_BODY() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | ARMInstrFormats.td | 508 class PseudoInst<dag oops, dag iops, InstrItinClass itin, list<dag> pattern> 513 let Pattern = pattern; 520 list<dag> pattern> 521 : PseudoInst<oops, iops, itin, pattern> { 528 list<dag> pattern> 529 : PseudoInst<oops, iops, itin, pattern> { 536 list<dag> pattern> 537 : PseudoInst<oops, iops, itin, pattern> { 544 list<dag> pattern> 545 : PseudoInst<oops, iops, itin, pattern> { [all …]
|
/freebsd/sys/cam/ |
H A D | cam.c | 205 cam_strmatch(const uint8_t *str, const uint8_t *pattern, int str_len) in cam_strmatch() argument 208 while (*pattern != '\0' && str_len > 0) { in cam_strmatch() 209 if (*pattern == '*') { in cam_strmatch() 210 pattern++; in cam_strmatch() 211 if (*pattern == '\0') in cam_strmatch() 214 if (cam_strmatch(str, pattern, str_len) == 0) in cam_strmatch() 220 } else if (*pattern == '[') { in cam_strmatch() 228 pattern++; in cam_strmatch() 229 if ((negate_range = (*pattern == '^')) != 0) in cam_strmatch() 230 pattern++; in cam_strmatch() [all …]
|
/freebsd/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_utility.cpp | 247 void __kmp_expand_file_name(char *result, size_t rlen, char *pattern) { in __kmp_expand_file_name() argument 261 if (pattern != NULL) { in __kmp_expand_file_name() 262 while (*pattern != '\0' && pos < end) { in __kmp_expand_file_name() 263 if (*pattern != '%') { in __kmp_expand_file_name() 264 *pos++ = *pattern++; in __kmp_expand_file_name() 266 char *old_pattern = pattern; in __kmp_expand_file_name() 270 ++pattern; in __kmp_expand_file_name() 272 if (*pattern >= '0' && *pattern <= '9') { in __kmp_expand_file_name() 275 width = (width * 10) + *pattern++ - '0'; in __kmp_expand_file_name() 276 } while (*pattern >= '0' && *pattern <= '9'); in __kmp_expand_file_name() [all …]
|
/freebsd/usr.bin/grep/ |
H A D | zgrep.sh | 89 grep_args="${grep_args} -e ${pattern}" 91 pattern="${1#--regexp=}" 123 grep_args="${grep_args} -e ${pattern}" 125 pattern="$2" 144 grep_args="${grep_args} -e ${pattern}" 146 pattern="${post}" 183 pattern="$1" 186 pattern="-" 202 ${cattool} ${catargs} - | ${grep} ${grep_args} -e "${pattern}" -- - 217 ${grep} --label="${file}" ${grep_args} -e "${pattern}" -- -
|