diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2001-06-05 13:12:10 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2001-06-05 13:12:10 +0000 |
commit | 25c3a3a39d7aebdce95825e6af2ad8c62905b7cc (patch) | |
tree | 4d8f1ff9644c880e3b7a63a361a0db2280d8058f /ext/standard | |
parent | 4efe6f7e6b53496fb1c4f6990b3ad0771bd9be67 (diff) | |
download | php-git-25c3a3a39d7aebdce95825e6af2ad8c62905b7cc.tar.gz |
vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
Diffstat (limited to 'ext/standard')
50 files changed, 264 insertions, 41 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 4e35c9e269..e69dc6e597 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3122,4 +3122,5 @@ PHP_FUNCTION(key_exists) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 91eb3fde4e..e5988f3a90 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -329,4 +329,5 @@ PHP_FUNCTION(assert_options) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/base64.c b/ext/standard/base64.c index f5f3d48272..21864431fe 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -196,4 +196,5 @@ PHP_FUNCTION(base64_decode) { * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 5dc26a3f98..3f14dc599c 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2623,4 +2623,5 @@ PHP_FUNCTION(is_callable) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 3976613a79..9e39af959c 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -253,4 +253,5 @@ PHP_FUNCTION(get_browser) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index 3048e366a7..e7b754d92f 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -131,4 +131,5 @@ PHP_NAMED_FUNCTION(php_if_crc32) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/credits.c b/ext/standard/credits.c index 226ef54090..7a65ab09b3 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -109,3 +109,10 @@ PHPAPI void php_print_credits(int flag) PUTS("</body></html>\n"); } } +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 011242acc0..8d749e90fb 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -182,4 +182,5 @@ PHP_FUNCTION(crypt) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index 8652fcaef2..0869dd056a 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -288,3 +288,11 @@ PHP_FUNCTION(convert_cyr_string) RETVAL_STRING((char *)str, 0) } /* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 8fb839ca86..d5e1f180e5 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -804,4 +804,5 @@ PHP_FUNCTION(strtotime) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 2e1b4605c1..23060fd365 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -364,4 +364,5 @@ PHP_NAMED_FUNCTION(php_if_readdir) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index cfd3bd429b..7f10f5ac96 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -227,4 +227,5 @@ PHP_MINFO_FUNCTION(dl) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/dns.c b/ext/standard/dns.c index d9878eaa53..5ff093995d 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -324,4 +324,5 @@ PHP_FUNCTION(getmxrr) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 56f2c6481a..f85c40a98f 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -480,4 +480,5 @@ PHP_FUNCTION(shell_exec) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/file.c b/ext/standard/file.c index f86be131eb..e52feda63f 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2447,7 +2447,5 @@ php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int * * tab-width: 4 * c-basic-offset: 4 * End: - * vim: tw=78 sw=4 ts=4 + * vim: tw=78 sw=4 ts=4 fdm=marker */ - - diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index c700403463..41d0603e44 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -868,4 +868,5 @@ FileFunction(php_if_stat,17) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index 1ab7f676c3..6395df992c 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -216,3 +216,11 @@ int inet_aton(const char *cp, struct in_addr *ap) } #endif /* !HAVE_INET_ATON */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index e5e5708c92..67791bbe23 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -665,4 +665,5 @@ PHP_FUNCTION(user_printf) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index ebd176f9e4..c3334f8969 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -761,5 +761,5 @@ PHP_RSHUTDOWN_FUNCTION(fsock) * tab-width: 4 * c-basic-offset: 4 * End: - * vim: sw=4 ts=4 tw=78 + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 678b77661d..62efc0c413 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -311,3 +311,11 @@ FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, i *socketd = 0; return NULL; } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/head.c b/ext/standard/head.c index d05d0c7bc7..c10c9ba261 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -279,4 +279,5 @@ PHP_FUNCTION(headers_sent) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/html.c b/ext/standard/html.c index 8921663633..3df62a4eae 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -471,4 +471,5 @@ PHP_FUNCTION(get_html_translation_table) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 78c263f79d..37c229705c 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -302,3 +302,11 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, } return (fp); } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/image.c b/ext/standard/image.c index 6ede7aa0c5..8d4934e77b 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -494,3 +494,11 @@ PHP_FUNCTION(getimagesize) } } /* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 948de9f219..e9967fc784 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -119,3 +119,11 @@ void php_store_class_name(zval *object, const char *name, size_t len) zend_hash_update(object->value.obj.properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val), NULL); } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/info.c b/ext/standard/info.c index 76265e41d8..16ee26bfa6 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -558,4 +558,5 @@ PHP_FUNCTION(php_uname) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index c32ae918c9..675291f252 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -282,6 +282,7 @@ PHP_FUNCTION(iptcembed) RETURN_TRUE; } } +/* }}} */ /* {{{ proto array iptcparse(string iptcdata) Parse binary IPTC-data into associative array */ @@ -374,4 +375,5 @@ PHP_FUNCTION(iptcparse) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/mail.c b/ext/standard/mail.c index dbac68ed45..3079659d34 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -70,6 +70,7 @@ PHP_FUNCTION(ezmlm_hash) RETURN_LONG((int) h); } +/* }}} */ /* {{{ proto int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) Send an email message */ @@ -129,6 +130,8 @@ PHP_FUNCTION(mail) } /* }}} */ +/* {{{ php_mail + */ int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd) { #ifdef PHP_WIN32 @@ -186,7 +189,10 @@ int php_mail(char *to, char *subject, char *message, char *headers, char *extra_ #endif return 1; } +/* }}} */ +/* {{{ PHP_MINFO_FUNCTION + */ PHP_MINFO_FUNCTION(mail) { #ifdef PHP_WIN32 @@ -195,6 +201,7 @@ PHP_MINFO_FUNCTION(mail) php_info_print_table_row(2, "Path to sendmail", INI_STR("sendmail_path") ); #endif } +/* }}} */ #else @@ -203,9 +210,10 @@ PHP_MINFO_FUNCTION(mail) {} #endif - /* * Local variables: * tab-width: 4 + * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/math.c b/ext/standard/math.c index 8df2393c91..63a7c0a050 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -725,4 +725,5 @@ PHP_FUNCTION(number_format) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 389d6705c6..e22c46a124 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -360,4 +360,5 @@ unsigned int len; * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index d1643debb4..383e67476e 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -466,4 +466,5 @@ static int metaphone(char *word, int max_phonemes, char **phoned_word, int tradi * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 442ae3d395..1eb10d49f6 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -146,4 +146,5 @@ PHP_FUNCTION(getrusage) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/output.c b/ext/standard/output.c index d406b7e2ca..1f3f5f9f17 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -613,11 +613,10 @@ PHPAPI int php_get_output_start_lineno() return OG(output_start_lineno); } - - /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 7319997c3c..b114131a4f 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -863,10 +863,10 @@ PHP_MINIT_FUNCTION(pack) return SUCCESS; } - - /* * Local variables: * tab-width: 4 + * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index d25e7666a2..3f6fb09f8b 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -123,3 +123,11 @@ PHP_FUNCTION(getlastmod) } } /* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index d917bfd741..f70447904d 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -45,3 +45,11 @@ FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, i return NULL; } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index 26309f6e1a..067417a9bc 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -127,3 +127,11 @@ PHP_FUNCTION(quoted_printable_decode) RETVAL_STRINGL(str_out, j, 0); } /* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/rand.c b/ext/standard/rand.c index c91e1a123f..d2a632b128 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -333,7 +333,6 @@ PHP_FUNCTION(getrandmax) } /* }}} */ - /* {{{ proto int mt_getrandmax(void) Returns the maximum value a random number from Mersenne Twister can have */ PHP_FUNCTION(mt_getrandmax) @@ -346,9 +345,11 @@ PHP_FUNCTION(mt_getrandmax) return_value->value.lval = MT_RAND_MAX; /* 2^^31 */ } /* }}} */ + /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/reg.c b/ext/standard/reg.c index 86bdec78a7..e8896f5f7d 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -609,7 +609,6 @@ PHP_FUNCTION(spliti) /* }}} */ - /* {{{ proto string sql_regcase(string string) Make regular expression for case insensitive match */ PHPAPI PHP_FUNCTION(sql_regcase) @@ -646,11 +645,10 @@ PHPAPI PHP_FUNCTION(sql_regcase) } /* }}} */ - - /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index a8ed8c9f51..98ba84f75f 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -1242,3 +1242,10 @@ inline void scan_set_error_return(int numVars,pval **return_value) { } +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c index 254d8fed9e..107088dc2f 100644 --- a/ext/standard/soundex.c +++ b/ext/standard/soundex.c @@ -117,4 +117,5 @@ PHP_FUNCTION(soundex) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/string.c b/ext/standard/string.c index c213fb95ee..cb84c9511e 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -113,7 +113,8 @@ static char *php_bin2hex(const unsigned char *old, const size_t oldlen, size_t * } #ifdef HAVE_LOCALECONV -/* glibc's localeconv is not reentrant, so lets make it so ... sorta */ +/* {{{ localeconv_r + * glibc's localeconv is not reentrant, so lets make it so ... sorta */ struct lconv *localeconv_r(struct lconv *out) { struct lconv *res; @@ -133,15 +134,21 @@ struct lconv *localeconv_r(struct lconv *out) return out; } +/* }}} */ # ifdef ZTS +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(localeconv) { locale_mutex = tsrm_mutex_alloc(); return SUCCESS; } +/* }}} */ +/* {{{ PHP_MSHUTDOWN_FUNCTION + */ PHP_MSHUTDOWN_FUNCTION(localeconv) { tsrm_mutex_free( locale_mutex ); @@ -150,6 +157,7 @@ PHP_MSHUTDOWN_FUNCTION(localeconv) return SUCCESS; } +/* }}} */ # endif #endif @@ -227,8 +235,11 @@ PHP_FUNCTION(strcoll) RETURN_LONG(strcoll((const char *)(*s1)->value.str.val, (const char *)(*s2)->value.str.val)); } +/* }}} */ #endif +/* {{{ php_trim + */ PHPAPI void php_trim(zval *str, zval * return_value, int mode) /* mode 1 : trim left mode 2 : trim right @@ -264,6 +275,7 @@ PHPAPI void php_trim(zval *str, zval * return_value, int mode) } RETVAL_STRINGL(c, len, 1); } +/* }}} */ /* {{{ proto string rtrim(string str) An alias for chop */ @@ -325,7 +337,6 @@ PHP_FUNCTION(ltrim) } /* }}} */ - /* {{{ proto string wordwrap(string str [, int width [, string break [, int cut]]]) Wrap buffer to selected number of characters using string break char */ PHP_FUNCTION(wordwrap) @@ -483,7 +494,8 @@ PHP_FUNCTION(wordwrap) } /* }}} */ - +/* {{{ php_explode + */ PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit) { char *p1, *p2, *endp; @@ -506,6 +518,7 @@ PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit) add_next_index_stringl(return_value, p1, endp-p1, 1); } } +/* }}} */ /* {{{ proto array explode(string separator, string str [, int limit]) Split a string on string separator and return array of components */ @@ -550,10 +563,12 @@ PHP_FUNCTION(explode) } /* }}} */ - /* {{{ proto string join(array src, string glue) An alias for implode */ /* }}} */ + +/* {{{ php_implode + */ PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value) { zval **tmp; @@ -592,7 +607,7 @@ PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value) return_value->type = IS_STRING; return_value->value.str.len = len; } - +/* }}} */ /* {{{ proto string implode(array src, string glue) Join array elements placing glue string between items and return one string */ @@ -623,7 +638,6 @@ PHP_FUNCTION(implode) } /* }}} */ - /* {{{ proto string strtok([string str,] string token) Tokenize a string */ PHP_FUNCTION(strtok) @@ -682,6 +696,8 @@ PHP_FUNCTION(strtok) } /* }}} */ +/* {{{ php_strtoupper + */ PHPAPI char *php_strtoupper(char *s, size_t len) { char *c; @@ -695,6 +711,7 @@ PHPAPI char *php_strtoupper(char *s, size_t len) } return (s); } +/* }}} */ /* {{{ proto string strtoupper(string str) Make a string uppercase */ @@ -713,7 +730,8 @@ PHP_FUNCTION(strtoupper) } /* }}} */ - +/* {{{ php_strtolower + */ PHPAPI char *php_strtolower(char *s, size_t len) { register int ch; @@ -727,6 +745,7 @@ PHPAPI char *php_strtolower(char *s, size_t len) } return (s); } +/* }}} */ /* {{{ proto string strtolower(string str) Make a string lowercase */ @@ -746,6 +765,8 @@ PHP_FUNCTION(strtolower) } /* }}} */ +/* {{{ php_basename + */ PHPAPI char *php_basename(char *s, size_t len) { char *ret=NULL, *c, *p=NULL, buf='\0'; @@ -776,6 +797,7 @@ PHPAPI char *php_basename(char *s, size_t len) if(buf) *p = buf; return (ret); } +/* }}} */ /* {{{ proto string basename(string path) Return the filename component of the path */ @@ -793,7 +815,9 @@ PHP_FUNCTION(basename) } /* }}} */ -/* This function doesn't work with absolute paths in Win32 such as C:\foo +/* {{{ php_dirname + * + * This function doesn't work with absolute paths in Win32 such as C:\foo * (and it didn't before either). This needs to be fixed */ PHPAPI void php_dirname(char *path, int len) @@ -838,6 +862,7 @@ PHPAPI void php_dirname(char *path, int len) } *(end+1) = '\0'; } +/* }}} */ /* {{{ proto string dirname(string path) Return the directory name component of the path */ @@ -922,7 +947,8 @@ PHP_FUNCTION(pathinfo) } /* }}} */ -/* case insensitve strstr */ +/* {{{ php_stristr + * case insensitve strstr */ PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, size_t s_len, size_t t_len) { @@ -930,7 +956,10 @@ PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, php_strtolower(t, t_len); return php_memnstr(s, t, t_len, s + s_len); } +/* }}} */ +/* {{{ php_strspn + */ PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end) { register const char *p = s1, *spanp; @@ -944,7 +973,10 @@ cont: } return (p - s1); } +/* }}} */ +/* {{{ php_strcspn + */ PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end) { register const char *p, *spanp; @@ -960,6 +992,7 @@ PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end) } /* NOTREACHED */ } +/* }}} */ /* {{{ proto string stristr(string haystack, string needle) Find first occurrence of a string within another, case insensitive */ @@ -1178,6 +1211,8 @@ PHP_FUNCTION(strrchr) } /* }}} */ +/* {{{ php_chunk_split + */ static char *php_chunk_split(char *src, int srclen, char *end, int endlen, int chunklen, int *destlen) { @@ -1213,6 +1248,7 @@ static char *php_chunk_split(char *src, int srclen, char *end, int endlen, return(dest); } +/* }}} */ /* {{{ proto string chunk_split(string str [, int chunklen [, string ending]]) Return split line */ @@ -1323,7 +1359,6 @@ PHP_FUNCTION(substr) } /* }}} */ - /* {{{ proto string substr_replace(string str, string repl, int start [, int length]) Replace part of a string with another string */ PHP_FUNCTION(substr_replace) @@ -1396,7 +1431,6 @@ PHP_FUNCTION(substr_replace) } /* }}} */ - /* {{{ proto string quotemeta(string str) Quote meta characters */ PHP_FUNCTION(quotemeta) @@ -1526,6 +1560,8 @@ PHP_FUNCTION(ucwords) } /* }}} */ +/* {{{ php_strtr + */ PHPAPI char *php_strtr(char *str, int len, char *str_from, char *str_to, int trlen) { @@ -1548,7 +1584,10 @@ PHPAPI char *php_strtr(char *str, int len, char *str_from, return str; } +/* }}} */ +/* {{{ php_strtr_array + */ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *hash) { zval *entry; @@ -1636,6 +1675,7 @@ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *has smart_str_0(&result); RETVAL_STRINGL(result.c,result.len,0); } +/* }}} */ /* {{{ proto string strtr(string str, string from, string to) Translate characters in str using given translation tables */ @@ -1678,7 +1718,6 @@ PHP_FUNCTION(strtr) } /* }}} */ - /* {{{ proto string strrev(string str) Reverse a string */ PHP_FUNCTION(strrev) @@ -1706,6 +1745,8 @@ PHP_FUNCTION(strrev) } /* }}} */ +/* {{{ php_similar_str + */ static void php_similar_str(const char *txt1, int len1, const char *txt2, int len2, int *pos1, int *pos2, int *max) { @@ -1727,7 +1768,10 @@ static void php_similar_str(const char *txt1, int len1, const char *txt2, } } } +/* }}} */ +/* {{{ php_similar_char + */ static int php_similar_char(const char *txt1, int len1, const char *txt2, int len2) { @@ -1744,6 +1788,7 @@ static int php_similar_char(const char *txt1, int len1, } return sum; } +/* }}} */ /* {{{ proto int similar_text(string str1, string str2 [, double percent]) Calculates the similarity between two strings */ @@ -1781,9 +1826,10 @@ PHP_FUNCTION(similar_text) RETURN_LONG(sim); } /* }}} */ - -/* be careful, this edits the string in-place */ +/* {{{ php_stripslashes + * + * be careful, this edits the string in-place */ PHPAPI void php_stripslashes(char *str, int *len) { char *s, *t; @@ -1831,6 +1877,7 @@ PHPAPI void php_stripslashes(char *str, int *len) *s = '\0'; } } +/* }}} */ /* {{{ proto string addcslashes(string str, string charlist) Escape all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\n', '\r', '\t' etc...) */ @@ -1912,6 +1959,8 @@ PHP_FUNCTION(stripslashes) /* }}} */ #ifndef HAVE_STRERROR +/* {{{ php_strerror + */ char *php_strerror(int errnum) { extern int sys_nerr; @@ -1922,8 +1971,11 @@ char *php_strerror(int errnum) (void)sprintf(BG(str_ebuf), "Unknown error: %d", errnum); return(BG(str_ebuf)); } +/* }}} */ #endif +/* {{{ php_stripcslashes + */ PHPAPI void php_stripcslashes(char *str, int *len) { char *source,*target,*end; @@ -1981,8 +2033,10 @@ PHPAPI void php_stripcslashes(char *str, int *len) *len = nlen; } +/* }}} */ - +/* {{{ php_addcslashes + */ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_free, char *what, int wlength) { char flags[256]; @@ -2042,7 +2096,10 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_ } return new_str; } +/* }}} */ +/* {{{ php_addslashes + */ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_free) { /* maximum string length, worst case situation */ @@ -2091,7 +2148,7 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f } return new_str; } - +/* }}} */ #define _HEB_BLOCK_TYPE_ENG 1 #define _HEB_BLOCK_TYPE_HEB 2 @@ -2099,6 +2156,8 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f #define _isblank(c) (((((unsigned char) c)==' ' || ((unsigned char) c)=='\t')) ? 1 : 0) #define _isnewline(c) (((((unsigned char) c)=='\n' || ((unsigned char) c)=='\r')) ? 1 : 0) +/* {{{ php_char_to_str + */ PHPAPI void php_char_to_str(char *str,uint len,char from,char *to,int to_len,zval *result) { int char_count=0; @@ -2134,7 +2193,10 @@ PHPAPI void php_char_to_str(char *str,uint len,char from,char *to,int to_len,zva } *target = 0; } +/* }}} */ +/* {{{ php_str_to_str + */ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length) { @@ -2159,8 +2221,10 @@ PHPAPI char *php_str_to_str(char *haystack, int length, return result.c; } +/* }}} */ - +/* {{{ php_str_replace_in_subject + */ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subject, zval *result) { zval **search_entry, @@ -2258,7 +2322,7 @@ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subje } } } - +/* }}} */ /* {{{ proto mixed str_replace(mixed search, mixed replace, mixed subject) Replace all occurrences of search in haystack with replace */ @@ -2315,8 +2379,9 @@ PHP_FUNCTION(str_replace) } /* }}} */ - -/* Converts Logical Hebrew text (Hebrew Windows style) to Visual text +/* {{{ php_hebrev + * + * Converts Logical Hebrew text (Hebrew Windows style) to Visual text * Cheers/complaints/flames - Zeev Suraski <zeev@php.net> */ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines) @@ -2481,7 +2546,7 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines) return_value->type = IS_STRING; } } - +/* }}} */ /* {{{ proto string hebrev(string str [, int max_chars_per_line]) Convert logical Hebrew text to visual text */ @@ -2659,7 +2724,9 @@ PHP_FUNCTION(parse_str) #define PHP_TAG_BUF_SIZE 1023 -/* Check if tag is in a set of tags +/* {{{ php_tag_find + * + * Check if tag is in a set of tags * * states: * @@ -2715,8 +2782,11 @@ int php_tag_find(char *tag, int len, char *set) { efree(norm); return done; } +/* }}} */ -/* A simple little state-machine to strip out html and php tags +/* {{{ php_strip_tags + + A simple little state-machine to strip out html and php tags State 0 is the output state, State 1 means we are inside a normal html tag and state 2 means we are inside a php tag. @@ -2851,6 +2921,7 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allo efree(buf); if(allow) efree(tbuf); } +/* }}} */ /* {{{ proto string str_repeat(string input, int mult) Returns the input string repeat mult times */ @@ -2977,6 +3048,8 @@ PHP_FUNCTION(count_chars) } /* }}} */ +/* {{{ php_strnatcmp + */ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case) { zval **s1, **s2; @@ -2992,7 +3065,7 @@ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case) (*s2)->value.str.val, (*s2)->value.str.len, fold_case)); } - +/* }}} */ /* {{{ proto int strnatcmp(string s1, string s2) Returns the result of string comparison using 'natural' algorithm */ @@ -3090,7 +3163,7 @@ PHP_FUNCTION(localeconv) zend_hash_update(return_value->value.ht, "grouping", 9, &grouping, sizeof(zval *), NULL); zend_hash_update(return_value->value.ht, "mon_grouping", 13, &mon_grouping, sizeof(zval *), NULL); } - +/* }}} */ /* {{{ proto int strnatcasecmp(string s1, string s2) Returns the result of case-insensitive string comparison using 'natural' algorithm */ @@ -3100,7 +3173,6 @@ PHP_FUNCTION(strnatcasecmp) } /* }}} */ - /* {{{ proto int substr_count(string haystack, string needle) Returns the number of times a substring occurs in the string */ PHP_FUNCTION(substr_count) @@ -3145,7 +3217,6 @@ PHP_FUNCTION(substr_count) } /* }}} */ - /* {{{ proto string str_pad(string input, int pad_length [, string pad_string [, int pad_type]]) Returns input string padded on the left or right to specified length with pad_string */ PHP_FUNCTION(str_pad) @@ -3243,7 +3314,6 @@ PHP_FUNCTION(str_pad) RETURN_STRINGL(result, result_len, 0); } /* }}} */ - /* {{{ proto mixed sscanf(string str, string format [, string ...]) Implements an ANSI C compatible sscanf */ @@ -3290,4 +3360,5 @@ PHP_FUNCTION(sscanf) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index 42c26ce1cd..00455cfa41 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -156,3 +156,11 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len return 1; } } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 9295be3b59..3efe2b3710 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -199,6 +199,7 @@ PHP_FUNCTION(define_syslog_variables) start_syslog(BLS_C); } } +/* }}} */ /* {{{ proto int openlog(string ident, int option, int facility) Open connection to system logger */ @@ -271,4 +272,5 @@ PHP_FUNCTION(syslog) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/type.c b/ext/standard/type.c index caeabdeeae..76371ce6a2 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -96,3 +96,11 @@ char *php_get_ident_index(char *str) } return (temp); } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 6ffce2a73c..9bbc4f5f7d 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -92,9 +92,11 @@ function_entry uniqid_functions[] = { {NULL, NULL, NULL} }; + /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/url.c b/ext/standard/url.c index 3f5ea0aad8..b71414b6c2 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -439,4 +439,5 @@ int php_raw_url_decode(char *str, int len) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c index aacfcff8e8..5371b7b308 100644 --- a/ext/standard/url_scanner.c +++ b/ext/standard/url_scanner.c @@ -367,3 +367,11 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen } #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index 562e314af5..dbdf55149e 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -747,3 +747,11 @@ PHP_MSHUTDOWN_FUNCTION(url_scanner) } #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ diff --git a/ext/standard/var.c b/ext/standard/var.c index c369f47681..112ceda3fb 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -671,4 +671,5 @@ PHP_FUNCTION(unserialize) * tab-width: 4 * c-basic-offset: 4 * End: + * vim: sw=4 ts=4 tw=78 fdm=marker */ |