Searched refs:pattern (Results 1 - 25 of 253) sorted by relevance

1234567891011

/freebsd-current/usr.bin/primes/
H A Dpattern.c34 * pattern - the Eratosthenes sieve on odd numbers for 3,5,7,11 and 13
49 const char pattern[] = { variable
436 const size_t pattern_size = (sizeof(pattern)/sizeof(pattern[0]));
H A Dprimes.h67 extern const char pattern[];
68 extern const size_t pattern_size; /* length of pattern array */
H A DMakefile3 SRCS= pattern.c pr_tbl.c primes.c spsp.c
/freebsd-current/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Dmkerrno.sh37 pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$'
40 sed -n "s/$pattern/$replace/p" | tr '@' '\n'
H A Dmkerrtags.sh40 pattern='^ \(D_[A-Z0-9_]*\),*'
43 sed -n "s/$pattern/$replace/p" || exit 1
H A Dmksignal.sh37 pattern='^#define[ ]*_*\(SIG[A-Z0-9]*\)[ ]\{1,\}\([A-Z0-9]*\).*$'
40 sed -n "s/$pattern/$replace/p;/SIGRTMAX/q" | tr '@' '\n'
/freebsd-current/crypto/openssh/openbsd-compat/
H A Dfnmatch.c51 * Filename pattern matches defined in section 2.13, "Pattern Matching Notation"
59 * number of consecutive slashes within pattern and string will NOT match;
71 * Supports BSD extensions FNM_LEADING_DIR to match pattern to the end of one
81 * state of pattern and string (rewinding pattern and string repeatedly).
104 classmatch(const char *pattern, char test, int foldcase, const char **ep) argument
106 const char * const mismatch = pattern;
112 if (pattern[0] != '[' || pattern[1] != ':') {
116 pattern
149 fnmatch_ch(const char **pattern, const char **string, int flags) argument
289 fnmatch(const char *pattern, const char *string, int flags) argument
[all...]
H A Dbsd-cygwin_util.c124 * Returns true if the given string matches the pattern (which may contain ?
132 __match_pattern (const wchar_t *s, const wchar_t *pattern) argument
135 /* If at end of pattern, accept if also at end of string. */
136 if (!*pattern)
139 if (*pattern == '*') {
141 pattern++;
143 /* If at end of pattern, accept immediately. */
144 if (!*pattern)
147 /* If next character in pattern is known, optimize. */
148 if (*pattern !
190 _match_pattern(const char *s, const char *pattern) argument
218 cygwin_ug_match_pattern_list(const char *string, const char *pattern) argument
[all...]
/freebsd-current/crypto/heimdal/lib/roken/
H A Dfnmatch.c45 * Compares a filename or pathname to a pattern.
62 rk_fnmatch(const char *pattern, const char *string, int flags) argument
68 switch (c = *pattern++) {
83 c = *pattern;
86 c = *++pattern;
93 /* Optimize for pattern with * at end or before /. */
108 if (!rk_fnmatch(pattern, string, flags & ~FNM_PERIOD))
120 if ((pattern =
121 rangematch(pattern, *string, flags)) == NULL)
127 if ((c = *pattern
142 rangematch(const char *pattern, int test, int flags) argument
[all...]
/freebsd-current/contrib/less/
H A Dpattern.c11 * Routines to do pattern matching.
21 * Compile a search pattern, for future use by match_pattern.
23 static int compile_pattern2(char *pattern, int search_type, PATTERN_TYPE *comp_pattern, int show_error) argument
32 if (re_compile_pattern(pattern, strlen(pattern), comp))
36 error("Invalid pattern", NULL_PARG);
48 if (regcomp(comp, pattern, REGCOMP_FLAG | (is_caseless ? REG_ICASE : 0)))
52 error("Invalid pattern", NULL_PARG);
66 pcre *comp = pcre_compile(pattern,
83 pcre2_code *comp = pcre2_compile((PCRE2_SPTR)pattern, strle
145 compile_pattern(char *pattern, int search_type, int show_error, PATTERN_TYPE *comp_pattern) argument
166 uncompile_pattern(PATTERN_TYPE *pattern) argument
230 is_null_pattern(PATTERN_TYPE pattern) argument
261 match(char *pattern, int pattern_len, char *buf, int buf_len, char ***sp, char ***ep, int nsubs) 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) 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) argument
[all...]
/freebsd-current/sys/libkern/
H A Dfnmatch.c38 * Compares a filename or pathname to a pattern.
54 fnmatch(const char *pattern, const char *string, int flags) argument
61 switch (c = *pattern++) {
78 c = *pattern;
81 c = *++pattern;
88 /* Optimize for pattern with * at end or before /. */
104 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
121 switch (rangematch(pattern, *string, flags, &newp)) {
125 pattern = newp;
134 if ((c = *pattern
157 rangematch(const char *pattern, char test, int flags, char **newp) argument
[all...]
/freebsd-current/contrib/libevent/sample/
H A Dhostcheck.c155 * Match a hostname against a wildcard pattern.
163 static int hostmatch(const char *hostname, const char *pattern) argument
168 pattern_wildcard = strchr(pattern, '*');
170 return Curl_raw_equal(pattern, hostname) ?
173 /* We require at least 2 dots in pattern to avoid too wide wildcard
176 pattern_label_end = strchr(pattern, '.');
179 Curl_raw_nequal(pattern, "xn--", 4)) {
183 return Curl_raw_equal(pattern, hostname) ?
193 of the pattern. */
194 if(hostname_label_end - hostname < pattern_label_end - pattern)
[all...]
/freebsd-current/contrib/ntp/sntp/libevent/sample/
H A Dhostcheck.c155 * Match a hostname against a wildcard pattern.
163 static int hostmatch(const char *hostname, const char *pattern) argument
168 pattern_wildcard = strchr(pattern, '*');
170 return Curl_raw_equal(pattern, hostname) ?
173 /* We require at least 2 dots in pattern to avoid too wide wildcard
176 pattern_label_end = strchr(pattern, '.');
179 Curl_raw_nequal(pattern, "xn--", 4)) {
183 return Curl_raw_equal(pattern, hostname) ?
193 of the pattern. */
194 if(hostname_label_end - hostname < pattern_label_end - pattern)
[all...]
/freebsd-current/lib/libc/gen/
H A Dfnmatch.c42 * Compares a filename or pathname to a pattern.
75 fnmatch(const char *pattern, const char *string, int flags) argument
79 return (fnmatch1(pattern, string, string, flags, initial, initial));
83 fnmatch1(const char *pattern, const char *string, const char *stringstart, argument
95 pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs);
98 pattern += pclen;
124 c = *pattern;
127 c = *++pattern;
134 /* Optimize for pattern with * at end or before /. */
154 bt_pattern = pattern, bt_patmb
231 rangematch(const char *pattern, wchar_t test, int flags, char **newp, mbstate_t *patmbs) argument
[all...]
/freebsd-current/crypto/openssh/
H A Dmatch.c6 * Simple pattern matching, with '*' and '?' as wildcards.
53 * Returns true if the given string matches the pattern (which may contain ?
57 match_pattern(const char *s, const char *pattern) argument
60 /* If at end of pattern, accept if also at end of string. */
61 if (!*pattern)
64 if (*pattern == '*') {
66 while (*pattern == '*')
67 pattern++;
69 /* If at end of pattern, accept immediately. */
70 if (!*pattern)
122 match_pattern_list(const char *string, const char *pattern, int dolower) argument
176 match_usergroup_pattern_list(const char *string, const char *pattern) argument
194 match_hostname(const char *host, const char *pattern) argument
236 match_user(const char *user, const char *host, const char *ipaddr, const char *pattern) argument
[all...]
/freebsd-current/contrib/diff/lib/
H A Dexclude.c73 /* An exclude pattern-options pair. The options are fnmatch options
78 char const *pattern; member in struct:patopts
82 /* An exclude list, of pattern-options pairs. */
112 fnmatch_no_wildcards (char const *pattern, char const *f, int options) argument
116 ? strcasecmp (pattern, f)
117 : strcmp (pattern, f));
120 size_t patlen = strlen (pattern);
122 ? strncasecmp (pattern, f, patlen)
123 : strncmp (pattern, f, patlen));
156 char const *pattern local
183 add_exclude(struct exclude *ex, char const *pattern, int options) argument
210 char const *pattern; local
[all...]
/freebsd-current/contrib/one-true-awk/
H A Dawkgram.y65 %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: label
222 var ASGNOP pattern { $$ = op2($2, $1, $3); }
223 | pattern '?' pattern '
[all...]
/freebsd-current/contrib/bmake/unit-tests/
H A Dvarmod-match.exp1 make: "varmod-match.mk" line 290: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M'
2 make: "varmod-match.mk" line 298: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M'
3 make: "varmod-match.mk" line 306: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M'
4 make: "varmod-match.mk" line 314: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M'
5 make: "varmod-match.mk" line 323: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M'
6 make: "varmod-match.mk" line 337: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M'
7 make: "varmod-match.mk" line 345: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M'
8 make: "varmod-match.mk" line 357: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M'
9 make: "varmod-match.mk" line 365: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M'
H A Dcond-func-make.exp1 make: "cond-func-make.mk" line 24: warning: Unfinished character list in pattern argument '[' to function 'make'
/freebsd-current/contrib/netbsd-tests/lib/libc/string/
H A Dt_bm.c48 const char *pattern; member in struct:__anon5218
77 bm_pat *pattern; local
80 ATF_CHECK(pattern = bm_comp((const u_char *)testcases[ts].pattern,
81 strlen(testcases[ts].pattern), (const u_char *)testcases[ts].freq));
84 off = bm_exec(pattern, (u_char *)text, strlen(text));
92 bm_free(pattern);
/freebsd-current/sys/contrib/zstd/programs/
H A Dzstdgrep56 pattern="$2"
87 # pattern to grep for
93 # if no -e option was found, take next argument as grep-pattern
96 pattern="$1"
99 pattern="-"
101 printf '%s: missing pattern\n' "${prog}" >&2
112 "${zcat}" - | "${grep}" ${grep_args} -- "${pattern}" -
126 "${zcat}" -- "$1" | "${grep}" --label="${1}" ${grep_args} -- "${pattern}" -
/freebsd-current/lib/libc/tests/gen/
H A Dtest-fnmatch.c57 if (strchr(t->pattern, '\'') != NULL ||
60 if (t->flags == 0 && strcmp(t->pattern, "\\") == 0)
65 t->pattern, t->string);
67 (t->flags == 0 && strchr(t->pattern, '\\') == NULL)))
70 t->pattern, t->string);
H A Dfnmatch_test.c82 result = fnmatch(t->pattern, t->string, flags);
85 if (strchr(t->pattern, '\\') == NULL &&
88 result = fnmatch(t->pattern, t->string, flags);
93 if (strchr(t->pattern, '\\') != NULL &&
98 result = fnmatch(t->pattern, t->string, flags);
103 if ((t->string[0] != '.' || t->pattern[0] == '.' ||
107 result = fnmatch(t->pattern, t->string, flags);
116 result = fnmatch(t->pattern, t->string, flags);
121 if ((((t->string[0] != '.' || t->pattern[0] == '.') &&
126 result = fnmatch(t->pattern,
[all...]
/freebsd-current/usr.bin/grep/
H A Dzgrep.sh88 pattern="${1#--regexp=}"
111 pattern="$2"
138 # pattern to grep for
144 # if no -e option was found, take next argument as grep-pattern
148 pattern="$1"
151 pattern="-"
153 echo "${prg}: missing pattern" >&2
164 ${cattool} ${catargs} - | ${grep} ${grep_args} -- "${pattern}" -
179 ${grep} --label="${file}" ${grep_args} -- "${pattern}" -
/freebsd-current/tools/tools/usbtest/
H A Dusbtest.c196 char pattern[G_AUDIO_MAX_STRLEN] = {"0123456789abcdef"}; local
213 printf("WARNING: Could not set pattern interval "
225 error = sysctlbyname("hw.usb.g_audio.pattern", NULL, NULL,
226 &pattern, strlen(pattern));
229 printf("WARNING: Could not set audio pattern "
230 "to '%s' (error=%d)\n", pattern, errno);
237 "5) Change DTMF pattern: '%s'\n"
238 "6) Change pattern advance interval: %d ms\n"
246 pattern, pattern_interva
317 char pattern[G_KEYBOARD_MAX_STRLEN] = {"abcdefpattern"}; local
525 char pattern[G_MODEM_MAX_STRLEN] = {"abcdefpattern"}; local
[all...]

Completed in 184 milliseconds

1234567891011