From: Antony Dovgal Date: Tue, 26 Jun 2007 21:37:14 +0000 (+0000) Subject: fix ws & folding X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~379 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc2cf012129597c7d1be5726536c29ee93dd2b0b;p=php fix ws & folding --- diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 1507ff06e8..539d92c874 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -18,12 +18,14 @@ /* $Id$ */ -/* {{{ includes/startup/misc */ +/* {{{ includes */ #include "php.h" #include "php_assert.h" #include "php_ini.h" +/* }}} */ + ZEND_BEGIN_MODULE_GLOBALS(assert) long active; long bail; @@ -51,7 +53,7 @@ enum { ASSERT_QUIET_EVAL }; -static PHP_INI_MH(OnChangeCallback) +static PHP_INI_MH(OnChangeCallback) /* {{{ */ { if (EG(in_execution)) { if (ASSERTG(callback)) { @@ -75,6 +77,7 @@ static PHP_INI_MH(OnChangeCallback) } return SUCCESS; } +/* }}} */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("assert.active", "1", PHP_INI_ALL, OnUpdateLong, active, zend_assert_globals, assert_globals) @@ -84,13 +87,14 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("assert.quiet_eval", "0", PHP_INI_ALL, OnUpdateLong, quiet_eval, zend_assert_globals, assert_globals) PHP_INI_END() -static void php_assert_init_globals(zend_assert_globals *assert_globals_p TSRMLS_DC) +static void php_assert_init_globals(zend_assert_globals *assert_globals_p TSRMLS_DC) /* {{{ */ { assert_globals_p->callback = NULL; assert_globals_p->cb = NULL; } +/* }}} */ -PHP_MINIT_FUNCTION(assert) +PHP_MINIT_FUNCTION(assert) /* {{{ */ { ZEND_INIT_MODULE_GLOBALS(assert, php_assert_init_globals, NULL); @@ -104,8 +108,9 @@ PHP_MINIT_FUNCTION(assert) return SUCCESS; } +/* }}} */ -PHP_MSHUTDOWN_FUNCTION(assert) +PHP_MSHUTDOWN_FUNCTION(assert) /* {{{ */ { if (ASSERTG(cb)) { pefree(ASSERTG(cb), 1); @@ -113,8 +118,9 @@ PHP_MSHUTDOWN_FUNCTION(assert) } return SUCCESS; } +/* }}} */ -PHP_RSHUTDOWN_FUNCTION(assert) +PHP_RSHUTDOWN_FUNCTION(assert) /* {{{ */ { if (ASSERTG(callback)) { zval_ptr_dtor(&ASSERTG(callback)); @@ -123,15 +129,14 @@ PHP_RSHUTDOWN_FUNCTION(assert) return SUCCESS; } +/* }}} */ -PHP_MINFO_FUNCTION(assert) +PHP_MINFO_FUNCTION(assert) /* {{{ */ { DISPLAY_INI_ENTRIES(); } - -/* }}} */ -/* {{{ internal functions */ /* }}} */ + /* {{{ proto int assert(string|bool assertion) U Checks if assertion is false */ @@ -256,6 +261,7 @@ PHP_FUNCTION(assert) } /* }}} */ + /* {{{ proto mixed assert_options(int what [, mixed value]) U Set/get the various assert flags */ diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 3e8f4f0c18..fc156dbcfa 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -22,7 +22,7 @@ #include "php.h" #include "base64.h" -/* {{{ */ +/* {{{ base64 tables */ static const char base64_table[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', @@ -53,8 +53,7 @@ static const short base64_reverse_table[256] = { }; /* }}} */ -/* {{{ php_base64_encode */ -PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_length) +PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_length) /* {{{ */ { const unsigned char *current = str; unsigned char *p; @@ -135,14 +134,13 @@ void php_base64_init() */ /* }}} */ -PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_length) +PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_length) /* {{{ */ { return php_base64_decode_ex(str, length, ret_length, 0); } +/* }}} */ -/* {{{ php_base64_decode */ -/* as above, but backwards. :) */ -PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length, int *ret_length, zend_bool strict) +PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length, int *ret_length, zend_bool strict) /* {{{ */ { const unsigned char *current = str; int ch, i = 0, j = 0, k; @@ -223,7 +221,6 @@ PHP_FUNCTION(base64_encode) } /* }}} */ - /* {{{ proto binary base64_decode(binary str[, bool strict]) U Decodes string using MIME base64 algorithm */ PHP_FUNCTION(base64_decode) @@ -245,7 +242,6 @@ PHP_FUNCTION(base64_decode) } /* }}} */ - /* * Local variables: * tab-width: 4 diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 7d3a2e22ff..a103be6bb3 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -33,7 +33,7 @@ static zval *current_section; /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */ -static void browscap_entry_dtor(zval **zvalue) +static void browscap_entry_dtor(zval **zvalue) /* {{{ */ { if (Z_TYPE_PP(zvalue) == IS_ARRAY) { zend_hash_destroy(Z_ARRVAL_PP(zvalue)); @@ -45,10 +45,9 @@ static void browscap_entry_dtor(zval **zvalue) } free(*zvalue); } +/* }}} */ -/* {{{ convert_browscap_pattern - */ -static void convert_browscap_pattern(zval *pattern) +static void convert_browscap_pattern(zval *pattern) /* {{{ */ { register int i, j; char *t; @@ -86,9 +85,7 @@ static void convert_browscap_pattern(zval *pattern) } /* }}} */ -/* {{{ php_browscap_parser_cb - */ -static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg) +static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg) /* {{{ */ { if (!arg1) { return; @@ -148,9 +145,7 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, vo } /* }}} */ -/* {{{ PHP_MINIT_FUNCTION - */ -PHP_MINIT_FUNCTION(browscap) +PHP_MINIT_FUNCTION(browscap) /* {{{ */ { char *browscap = INI_STR("browscap"); @@ -178,9 +173,7 @@ PHP_MINIT_FUNCTION(browscap) } /* }}} */ -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ -PHP_MSHUTDOWN_FUNCTION(browscap) +PHP_MSHUTDOWN_FUNCTION(browscap) /* {{{ */ { char *browscap = INI_STR("browscap"); if (browscap && browscap[0]) { @@ -190,10 +183,7 @@ PHP_MSHUTDOWN_FUNCTION(browscap) } /* }}} */ - -/* {{{ browser_reg_compare - */ -static int browser_reg_compare(zval **browser, int num_args, va_list args, zend_hash_key *key) +static int browser_reg_compare(zval **browser, int num_args, va_list args, zend_hash_key *key) /* {{{ */ { zval **browser_regex, **previous_match; regex_t r; diff --git a/ext/standard/credits.c b/ext/standard/credits.c index fec4ef0a5e..07437c597d 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -28,9 +28,7 @@ #define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors) #define CREDIT_PUTS(s) php_output_write_utf8((s), strlen(s) TSRMLS_CC) -/* {{{ php_print_credits - */ -PHPAPI void php_print_credits(int flag TSRMLS_DC) +PHPAPI void php_print_credits(int flag TSRMLS_DC) /* {{{ */ { if (!sapi_module.phpinfo_as_text && flag & PHP_CREDITS_FULLPAGE) { php_print_info_htmlhead(TSRMLS_C); diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index b5d4683ccc..027afe398e 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -92,7 +92,7 @@ extern char *crypt(char *__key, char *__salt); #define PHP_CRYPT_RAND php_rand(TSRMLS_C) -PHP_MINIT_FUNCTION(crypt) +PHP_MINIT_FUNCTION(crypt) /* {{{ */ { REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", PHP_MAX_SALT_LEN, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CRYPT_STD_DES", PHP_STD_DES_CRYPT, CONST_CS | CONST_PERSISTENT); @@ -102,17 +102,18 @@ PHP_MINIT_FUNCTION(crypt) return SUCCESS; } - +/* }}} */ static unsigned char itoa64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -static void php_to64(char *s, long v, int n) +static void php_to64(char *s, long v, int n) /* {{{ */ { while (--n >= 0) { *s++ = itoa64[v&0x3f]; v >>= 6; } } +/* }}} */ /* {{{ proto string crypt(string str [, string salt]) U Hash a string */ diff --git a/ext/standard/css.c b/ext/standard/css.c index 603be3f303..680c3e103f 100644 --- a/ext/standard/css.c +++ b/ext/standard/css.c @@ -21,10 +21,7 @@ #include "php.h" #include "info.h" - -/* {{{ php_info_print_css - */ -PHPAPI void php_info_print_css(TSRMLS_D) +PHPAPI void php_info_print_css(TSRMLS_D) /* {{{ */ { PUTS("body {background-color: #ffffff; color: #000000;}\n"); PUTS("body, td, th, h1, h2 {font-family: sans-serif;}\n"); diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index 09cf45a469..3f95f5f3dd 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -187,7 +187,7 @@ _cyr_mac = { }; /* }}} */ -/* {{{ php_convert_cyr_string +/* {{{ static char * php_convert_cyr_string(unsigned char *str, int length, char from, char to TSRMLS_DC) * This is the function that performs real in-place conversion of the string * between charsets. * Parameters: diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 38e64388e2..f967d0bd61 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -49,7 +49,7 @@ char *day_short_names[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; -/* {{{ php_std_date +/* {{{ PHPAPI char *php_std_date(time_t t TSRMLS_DC) Return date string in standard format for http headers */ PHPAPI char *php_std_date(time_t t TSRMLS_DC) { @@ -85,7 +85,6 @@ PHPAPI char *php_std_date(time_t t TSRMLS_DC) } /* }}} */ - #if HAVE_STRPTIME #ifndef HAVE_STRPTIME_DECL_FAILS char *strptime(const char *s, const char *format, struct tm *tm); @@ -155,6 +154,7 @@ PHP_FUNCTION(strptime) } } /* }}} */ + #endif /*