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

/PHP_5_4/ext/pcre/pcrelib/
H A Dpcredemo.c50 char *pattern; local
80 /* After the options, we require exactly two arguments, which are the pattern,
89 pattern = argv[i];
95 * Now we are going to compile the regular expression pattern, and handle *
100 pattern, /* the pattern */
117 * pattern match against the subject string. This does just ONE match. If *
122 re, /* the compiled pattern */
123 NULL, /* no extra data - we didn't study the pattern */
143 pcre_free(re); /* Release memory used for the compiled pattern */
[all...]
H A Dpcreposix.c74 REG_EESCAPE, /* \ at end of pattern */
75 REG_EESCAPE, /* \c at end of pattern */
185 "pattern error", /* BADPAT */
260 pattern the pattern to compile
268 regcomp(regex_t *preg, const char *pattern, int cflags) argument
284 preg->re_pcre = pcre_compile2(pattern, options, &errorcode, &errorptr,
H A Dpcre_compile.c50 #define PSSTART start_pattern /* Field containing pattern start */
51 #define PSEND end_pattern /* Field containing pattern end */
74 holds the compiled pattern length does not overflow. We make it a bit less than
450 "\\ at end of pattern\0"
451 "\\c at end of pattern\0"
981 ptrptr points to the pattern position pointer
1008 /* If backslash is at the end of the pattern, it's an error. */
1482 ptrptr points to the pattern position pointer
1697 fails, the error message can point to the correct place in the pattern.
1703 code points to the start of the pattern (th
8834 pcre_compile(const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables) argument
8858 pcre_compile2(const char *pattern, int options, int *errorcodeptr, const char **errorptr, int *erroroffset, const unsigned char *tables) argument
[all...]
/PHP_5_4/win32/
H A Dfnmatch.c46 * Compares a filename or pathname to a pattern.
59 PHPAPI int fnmatch(const char *pattern, const char *string, int flags) argument
65 switch (c = *pattern++) {
82 c = *pattern;
85 c = *++pattern;
92 /* Optimize for pattern with * at end or before /. */
108 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
120 if ((pattern =
121 rangematch(pattern, *string, flags)) == NULL)
127 if ((c = *pattern
153 rangematch(const char *pattern, char test, int flags) argument
[all...]
/PHP_5_4/ext/intl/formatter/
H A Dformatter_main.c31 char* pattern = NULL; local
40 &locale, &locale_len, &style, &pattern, &pattern_len ) == FAILURE )
52 /* Convert pattern (if specified) to UTF-16. */
53 if(pattern && pattern_len) {
54 intl_convert_utf8_to_utf16(&spattern, &spattern_len, pattern, pattern_len, &INTL_DATA_ERROR_CODE(nfo));
55 INTL_CTOR_CHECK_STATUS(nfo, "numfmt_create: error converting pattern to UTF-16");
73 /* {{{ proto NumberFormatter NumberFormatter::create( string $locale, int style[, string $pattern ] )
75 /* {{{ proto NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )
85 /* {{{ proto void NumberFormatter::__construct( string $locale, int style[, string $pattern ] )
/PHP_5_4/ext/intl/msgformat/
H A Dmsgformat.c32 char* pattern; local
43 &locale, &locale_len, &pattern, &pattern_len ) == FAILURE )
54 /* Convert pattern (if specified) to UTF-16. */
55 if(pattern && pattern_len) {
56 intl_convert_utf8_to_utf16(&spattern, &spattern_len, pattern, pattern_len, &INTL_DATA_ERROR_CODE(mfo));
57 INTL_CTOR_CHECK_STATUS(mfo, "msgfmt_create: error converting pattern to UTF-16");
69 INTL_CTOR_CHECK_STATUS(mfo, "msgfmt_create: error converting pattern to quote-friendly format");
77 (mfo)->mf_data.orig_format = estrndup(pattern, pattern_len);
91 /* {{{ proto MessageFormatter MesssageFormatter::create( string $locale, string $pattern )
93 /* {{{ proto MessageFormatter msgfmt_create( string $locale, string $pattern )
[all...]
H A Dmsgformat_format.c111 /* {{{ proto mixed MessageFormatter::formatMessage( string $locale, string $pattern, array $args )
113 /* {{{ proto mixed msgfmt_format_message( string $locale, string $pattern, array $args )
121 char *pattern = NULL; local
130 &slocale, &slocale_len, &pattern, &pattern_len, &args ) == FAILURE )
140 if(pattern && pattern_len) {
141 intl_convert_utf8_to_utf16(&spattern, &spattern_len, pattern, pattern_len, &INTL_DATA_ERROR_CODE(mfo));
145 "msgfmt_format_message: error converting pattern to UTF-16", 0 TSRMLS_CC );
160 "msgfmt_format_message: error converting pattern to quote-friendly format", 0 TSRMLS_CC );
H A Dmsgformat_parse.c85 /* {{{ proto array MessageFormatter::formatMessage( string $locale, string $pattern, string $source )
87 /* {{{ proto array numfmt_parse_message( string $locale, string $pattern, string $source )
94 char *pattern = NULL; local
105 &slocale, &slocale_len, &pattern, &pattern_len, &source, &src_len ) == FAILURE )
115 if(pattern && pattern_len) {
116 intl_convert_utf8_to_utf16(&spattern, &spattern_len, pattern, pattern_len, &INTL_DATA_ERROR_CODE(mfo));
120 "msgfmt_parse_message: error converting pattern to UTF-16", 0 TSRMLS_CC );
135 "msgfmt_parse_message: error converting pattern to quote-friendly format", 0 TSRMLS_CC );
/PHP_5_4/ext/mbstring/oniguruma/
H A Dregcomp.c2257 /* fixed size pattern node only */
5132 onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, argument
5147 print_enc_string(stderr, reg->enc, pattern, pattern_end);
5151 init_size = (pattern_end - pattern) * 2;
5168 r = onig_parse_make_tree(&root, pattern, pattern_end, reg, &scan_env);
5319 onig_recompile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, argument
5326 r = onig_new(&new_reg, pattern, pattern_end, option, enc, syntax, einfo);
5387 onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end, argument
5399 r = onig_compile(*reg, pattern, pattern_end, einfo);
H A Dregext.c163 onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end, argument
172 r = conv_encoding(ci->pattern_enc, ci->target_enc, pattern, pattern_end,
177 cpat = (UChar* )pattern;
192 if (cpat != pattern) xfree(cpat);
199 onig_recompile_deluxe(regex_t* reg, const UChar* pattern, const UChar* pattern_end, argument
205 r = onig_new_deluxe(&new_reg, pattern, pattern_end, ci, einfo);
H A Dreggnu.c82 re_compile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf) argument
87 r = onig_compile(reg, (UChar* )pattern, (UChar* )(pattern + size), &einfo);
98 re_recompile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf) argument
109 r = onig_recompile(reg, (UChar* )pattern, (UChar* )(pattern + size),
H A Dregparse.c256 /* scan pattern methods */
532 narg.enc = reg->enc; /* should be pattern encoding. */
2659 env->pattern, env->pattern_end,
2673 (env)->pattern, (env)->pattern_end,
3521 if (*src > env->pattern) /* /].../ is allowed. */
4661 env->pattern, env->pattern_end,
4671 env->pattern, env->pattern_end,
5258 onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_t* reg, argument
5273 env->pattern = (UChar* )pattern;
[all...]
H A Dregparse.h268 UChar* pattern; member in struct:__anon114
320 extern int onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env));
H A Dregposix.c134 regcomp(regex_t* reg, const char* pattern, int posix_options) argument
153 ENC_STRING_LEN(OnigEncDefaultCharEncoding, pattern, len);
154 r = onig_new(PONIG_C(reg), (UChar* )pattern, (UChar* )(pattern + len),
/PHP_5_4/ext/soap/
H A Dphp_sdl.h149 sdlRestrictionCharPtr pattern; member in struct:_sdlRestrictions
/PHP_5_4/ext/standard/
H A Dbrowscap.c85 static void convert_browscap_pattern(zval *pattern, int persistent) /* {{{ */ argument
90 php_strtolower(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern));
92 t = (char *) safe_pemalloc(Z_STRLEN_P(pattern), 2, 5, persistent);
97 for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
98 switch (Z_STRVAL_P(pattern)[i]) {
127 t[j] = Z_STRVAL_P(pattern)[i];
136 Z_STRVAL_P(pattern) = t;
137 Z_STRLEN_P(pattern) = j;
439 /* Pick which browser pattern replace
[all...]
H A Ddir.c421 /* {{{ proto array glob(string pattern [, int flags])
422 Find pathnames matching a pattern */
431 char *pattern = NULL; local
439 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &pattern, &pattern_len, &flags) == FAILURE) {
454 if (!IS_ABSOLUTE_PATH(pattern, pattern_len)) {
460 if (IS_SLASH(*pattern)) {
466 snprintf(work_pattern, MAXPATHLEN, "%s%c%s", cwd, DEFAULT_SLASH, pattern);
467 pattern = work_pattern;
474 if (0 != (ret = glob(pattern, flags & GLOB_FLAGMASK, NULL, &globbuf))) {
501 if (php_check_open_basedir_ex(pattern,
[all...]
H A Dfile.c2423 /* {{{ proto bool fnmatch(string pattern, string filename [, int flags])
2424 Match filename against pattern */
2427 char *pattern, *filename; local
2431 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "pp|l", &pattern, &pattern_len, &filename, &filename_len, &flags) == FAILURE) {
2444 RETURN_BOOL( ! fnmatch( pattern, filename, flags ));
/PHP_5_4/ext/zip/
H A Dphp_zip.c519 int php_zip_glob(char *pattern, int pattern_len, long flags, zval *return_value TSRMLS_DC) /* {{{ */ argument
543 if (!IS_ABSOLUTE_PATH(pattern, pattern_len)) {
549 if (IS_SLASH(*pattern)) {
555 snprintf(work_pattern, MAXPATHLEN, "%s%c%s", cwd, DEFAULT_SLASH, pattern);
556 pattern = work_pattern;
561 if (0 != (ret = glob(pattern, flags & GLOB_FLAGMASK, NULL, &globbuf))) {
585 /* we assume that any glob pattern will match files from one directory only
1653 char *pattern; local
1671 &pattern, &pattern_len, &flags, &options) == FAILURE) {
1676 &pattern,
[all...]
/PHP_5_4/main/streams/
H A Dglob_wrapper.c46 char *pattern; member in struct:__anon303
76 if (pglob && pglob->pattern) {
81 return estrndup(pglob->pattern, pglob->pattern_len);
83 return pglob->pattern;
174 if (pglob->pattern) {
175 efree(pglob->pattern);
250 pglob->pattern = estrndup(pos, pglob->pattern_len);
/PHP_5_4/ext/ereg/
H A Dereg.c31 ZEND_ARG_INFO(0, pattern)
37 ZEND_ARG_INFO(0, pattern)
43 ZEND_ARG_INFO(0, pattern)
139 static int _php_regcomp(regex_t *preg, const char *pattern, int cflags TSRMLS_DC) argument
142 int patlen = strlen(pattern);
156 if(zend_hash_find(&EREG(ht_rc), (char *) pattern, patlen+1, (void **) &rc) == SUCCESS
161 * is, we flush it and compile the pattern from scratch.
172 r = regcomp(preg, pattern, cflags);
185 zend_hash_update(&EREG(ht_rc), (char *) pattern, patlen+1,
191 r = regcomp(preg, pattern, cflag
403 php_ereg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended TSRMLS_DC) argument
554 char *pattern, *arg_string; local
[all...]
/PHP_5_4/ext/mbstring/
H A Dphp_mbregex.c448 static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patlen, OnigOptionType options, OnigEncoding enc, OnigSyntaxType *syntax TSRMLS_DC) argument
456 found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
458 if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
464 zend_hash_update(&MBREX(ht_rc), (char *) pattern, patlen + 1, (void *) &retval, sizeof(retval), NULL);
723 php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern");
770 /* {{{ proto int mb_ereg(string pattern, string string [, array registers])
778 /* {{{ proto int mb_eregi(string pattern, string string [, array registers])
869 /* create regex pattern buffer */
1025 /* {{{ proto string mb_ereg_replace(string pattern, strin
[all...]
/PHP_5_4/ext/pcre/
H A Dphp_pcre.c241 char *pattern; local
261 back the compiled pattern, otherwise go on and compile it. */
265 * is, we flush it and compile the pattern from scratch.
307 /* We need to iterate through the pattern, searching for the ending delimiter,
317 /* We iterate through the pattern, searching for the matching ending
320 * reach the end of the pattern without matching, display a warning.
344 /* Make a copy of the actual pattern. */
345 pattern = estrndup(p, pp-p);
388 efree(pattern);
398 /* Compile pattern an
[all...]
H A Dupgrade-pcre.php5 $pattern = 'pcre-*.tar.*'; variable
6 $newpcre = glob($pattern);
9 echo "more than one '$pattern' file. aborting\n";
15 die("need one '$pattern' file. aborting.\n");
/PHP_5_4/ext/fileinfo/libmagic/
H A Dsoftmagic.c1853 convert_libmagic_pattern(zval *pattern, int options) argument
1858 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
1862 for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
1863 switch (Z_STRVAL_P(pattern)[i]) {
1869 t[j] = Z_STRVAL_P(pattern)[i];
1883 Z_STRVAL_P(pattern) = t;
1884 Z_STRLEN_P(pattern) = j;
2047 zval *pattern; local
2052 MAKE_STD_ZVAL(pattern);
2053 ZVAL_STRINGL(pattern, (cha
[all...]

Completed in 86 milliseconds