/freebsd-10-stable/games/primes/ |
H A D | pattern.c | 35 static char sccsid[] = "@(#)pattern.c 8.1 (Berkeley) 5/31/93"; 42 * pattern - the Eratosthenes sieve on odd numbers for 3,5,7,11 and 13 57 const char pattern[] = { variable 444 const size_t pattern_size = (sizeof(pattern)/sizeof(pattern[0]));
|
H A D | primes.h | 65 extern const char pattern[]; 66 extern const size_t pattern_size; /* length of pattern array */
|
H A D | Makefile | 5 SRCS= pattern.c pr_tbl.c primes.c
|
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | mkerrno.sh | 37 pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$' 40 sed -n "s/$pattern/$replace/p" | tr '@' '\n'
|
H A D | mksignal.sh | 37 pattern='^#define[ ]*_*\(SIG[A-Z0-9]*\)[ ]\{1,\}\([A-Z0-9]*\).*$' 40 sed -n "s/$pattern/$replace/p;/SIGRTMAX/q" | tr '@' '\n'
|
H A D | mkerrtags.sh | 43 pattern='^ \(D_[A-Z0-9_]*\),*' 46 sed -n "s/$pattern/$replace/p" || exit 1
|
/freebsd-10-stable/contrib/apr/strings/ |
H A D | apr_fnmatch.c | 22 * Filename pattern matches defined in section 2.13, "Pattern Matching Notation" 30 * number of consecutive slashes within pattern and string will NOT match; 49 * state of pattern and string (rewinding pattern and string repeatedly). 71 * Both pattern and string are **char to support pointer increment of arbitrary 74 static APR_INLINE int fnmatch_ch(const char **pattern, const char **string, int flags) argument 76 const char * const mismatch = *pattern; 84 if (**pattern == '[') 86 ++*pattern; 89 negate = ((**pattern 194 apr_fnmatch(const char *pattern, const char *string, int flags) argument 405 apr_fnmatch_test(const char *pattern) argument [all...] |
/freebsd-10-stable/contrib/less/ |
H A D | pattern.c | 11 * Routines to do pattern matching. 19 * Compile a search pattern, for future use by match_pattern. 22 compile_pattern2(pattern, search_type, comp_pattern, show_error) 23 char *pattern; 35 if (re_compile_pattern(pattern, strlen(pattern), comp)) 39 error("Invalid pattern", NULL_PARG); 51 if (regcomp(comp, pattern, REGCOMP_FLAG)) 55 error("Invalid pattern", NULL_PARG); 70 comp = pcre_compile(pattern, [all...] |
/freebsd-10-stable/contrib/apr-util/include/ |
H A D | apr_strmatch.h | 41 * Precompiled search pattern 47 const char *pattern; /**< Current pattern */ member in struct:apr_strmatch_pattern 54 * Search for a precompiled pattern within a string 55 * @param pattern The pattern 56 * @param s The string in which to search for the pattern 58 * @return A pointer to the first instance of the pattern in s, or 61 APU_DECLARE(const char *) apr_strmatch(const apr_strmatch_pattern *pattern, 64 #define apr_strmatch(pattern, [all...] |
/freebsd-10-stable/crypto/heimdal/lib/roken/ |
H A D | fnmatch.c | 45 * 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-10-stable/contrib/bmake/ |
H A D | str.c | 322 * See if a particular string matches a particular pattern. 324 * Results: Non-zero is returned if string matches pattern, 0 otherwise. The 326 * pattern: *?\[] (see the man page for details on what these mean). 333 Str_Match(const char *string, const char *pattern) argument 339 * See if we're at the end of both the pattern and the 341 * pattern but not at the end of the string, we failed. 343 if (*pattern == 0) 345 if (*string == 0 && *pattern != '*') 348 * Check for a "*" as the next pattern character. It matches 353 if (*pattern 453 Str_SYSVMatch(const char *word, const char *pattern, int *len) argument [all...] |
/freebsd-10-stable/contrib/apr-util/strmatch/ |
H A D | apr_strmatch.c | 41 const char *p_start = this_pattern->pattern; 65 const char *p_start = this_pattern->pattern; 86 apr_strmatch_pattern *pattern; local 90 pattern = apr_palloc(p, sizeof(*pattern)); 91 pattern->pattern = s; 92 pattern->length = strlen(s); 93 if (pattern->length == 0) { 94 pattern [all...] |
/freebsd-10-stable/sys/libkern/ |
H A D | fnmatch.c | 38 * 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-10-stable/usr.bin/csup/ |
H A D | fnmatch.c | 44 * Compares a filename or pathname to a pattern. 58 fnmatch(const char *pattern, const char *string, int flags) argument 64 switch (c = *pattern++) { 81 c = *pattern; 84 c = *++pattern; 91 /* Optimize for pattern with * at end or before /. */ 107 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD)) 119 if ((pattern = 120 rangematch(pattern, *string, flags)) == NULL) 126 if ((c = *pattern 152 rangematch(const char *pattern, char test, int flags) argument [all...] |
/freebsd-10-stable/crypto/openssh/ |
H A D | match.c | 6 * Simple pattern matching, with '*' and '?' as wildcards. 50 * Returns true if the given string matches the pattern (which may contain ? 55 match_pattern(const char *s, const char *pattern) argument 58 /* If at end of pattern, accept if also at end of string. */ 59 if (!*pattern) 62 if (*pattern == '*') { 64 pattern++; 66 /* If at end of pattern, accept immediately. */ 67 if (!*pattern) 70 /* If next character in pattern i 119 match_pattern_list(const char *string, const char *pattern, int dolower) argument 178 match_hostname(const char *host, const char *pattern) argument 213 match_user(const char *user, const char *host, const char *ipaddr, const char *pattern) argument [all...] |
/freebsd-10-stable/lib/libc/gen/ |
H A D | fnmatch.c | 46 * Compares a filename or pathname to a pattern. 79 fnmatch(pattern, string, flags) 80 const char *pattern, *string; 85 return (fnmatch1(pattern, string, string, flags, initial, initial)); 89 fnmatch1(pattern, string, stringstart, flags, patmbs, strmbs) 90 const char *pattern, *string, *stringstart; 103 pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); 106 pattern += pclen; 132 c = *pattern; 135 c = *++pattern; [all...] |
/freebsd-10-stable/contrib/subversion/subversion/include/private/ |
H A D | svn_cert.h | 40 /* Return TRUE iff @a pattern matches @a hostname as defined 42 * 6125 the pattern is the domain name portion of the presented 61 svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname);
|
/freebsd-10-stable/contrib/apr/include/ |
H A D | apr_fnmatch.h | 66 * Try to match the string to the given pattern, return APR_SUCCESS if 68 * an illegal pattern. 70 * With all flags unset, a pattern is interpreted as such: 86 * PATTERN: Any character other than \?*[ or a \ at the end of the pattern<br/> 99 * beginning. The pattern matches a single character if it 107 * just find a substring matching the pattern. 109 * @param pattern The pattern to match to 120 APR_DECLARE(apr_status_t) apr_fnmatch(const char *pattern, 124 * Determine if the given pattern i [all...] |
/freebsd-10-stable/contrib/diff/lib/ |
H A D | exclude.c | 73 /* 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-10-stable/usr.bin/make/ |
H A D | str.c | 379 * See if a particular string matches a particular pattern. 381 * Results: Non-zero is returned if string matches pattern, 0 otherwise. The 383 * pattern: *?\[] (see the man page for details on what these mean). 388 Str_Match(const char *string, const char *pattern) argument 394 * See if we're at the end of both the pattern and the 396 * pattern but not at the end of the string, we failed. 398 if (*pattern == 0) 400 if (*string == 0 && *pattern != '*') 403 * Check for a "*" as the next pattern character. It matches 408 if (*pattern 485 Str_SYSVMatch(const char *word, const char *pattern, int *len) argument [all...] |
/freebsd-10-stable/contrib/netbsd-tests/lib/libc/string/ |
H A D | t_bm.c | 48 const char *pattern; member in struct:__anon3978 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-10-stable/contrib/apr-util/test/ |
H A D | teststrmatch.c | 32 const apr_strmatch_pattern *pattern; local 38 const char *input2 = "string that contains a pattern..."; 39 const char *input3 = "pattern at the start of a string"; 40 const char *input4 = "string that ends with a pattern"; 42 const char *input6 = "patter\200n, negative chars, contains pattern..."; 44 pattern = apr_strmatch_precompile(pool, "pattern", 1); 45 ABTS_PTR_NOTNULL(tc, pattern); 47 pattern_nocase = apr_strmatch_precompile(pool, "pattern", 0); 56 match = apr_strmatch(pattern, input [all...] |
/freebsd-10-stable/contrib/one-true-awk/ |
H A D | awkgram.y | 65 %type <p> pas pattern ppattern plist pplist patlist prarg term re 124 FOR '(' opt_simple_stmt ';' opt_nl pattern ';' opt_nl opt_simple_stmt rparen {inloop++;} stmt 138 IF '(' pattern rparen { $$ = notnull($3); } 171 pattern { $$ = notnull($1); } 194 pattern 195 | patlist comma pattern { $$ = linkum($1, $3); } 219 pattern: label 220 var ASGNOP pattern { $$ = op2($2, $1, $3); } 221 | pattern '?' pattern ' [all...] |
/freebsd-10-stable/contrib/binutils/libiberty/ |
H A D | mkstemps.c | 58 @deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len}) 60 Generate a unique temporary file name from @var{pattern}. 61 @var{pattern} has the form: 68 length). The last six characters of @var{pattern} before @var{suffix} 78 mkstemps (char *pattern, int suffix_len) argument 90 len = strlen (pattern); 93 || strncmp (&pattern[len - 6 - suffix_len], "XXXXXX", 6)) 98 XXXXXX = &pattern[len - 6 - suffix_len]; 126 fd = open (pattern, O_BINARY|O_RDWR|O_CREAT|O_EXCL, 0600); 138 pattern[ [all...] |
/freebsd-10-stable/contrib/gcclibs/libiberty/ |
H A D | mkstemps.c | 58 @deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len}) 60 Generate a unique temporary file name from @var{pattern}. 61 @var{pattern} has the form: 68 length). The last six characters of @var{pattern} before @var{suffix} 78 mkstemps (char *pattern, int suffix_len) argument 90 len = strlen (pattern); 93 || strncmp (&pattern[len - 6 - suffix_len], "XXXXXX", 6)) 98 XXXXXX = &pattern[len - 6 - suffix_len]; 126 fd = open (pattern, O_BINARY|O_RDWR|O_CREAT|O_EXCL, 0600); 138 pattern[ [all...] |