diff options
author | Max Semenik <maxsem.wiki@gmail.com> | 2020-07-01 16:32:55 +0300 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-06 21:13:34 +0200 |
commit | 2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c (patch) | |
tree | f23a5c00a96f30a62ddcf626b4c6a6d53809d14f /ext/mbstring | |
parent | 47579986504022d3eab38e24fff5861d5e4eadad (diff) | |
download | php-git-2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c.tar.gz |
Remove proto comments from C files
Closes GH-5758
Diffstat (limited to 'ext/mbstring')
-rw-r--r-- | ext/mbstring/mbstring.c | 132 | ||||
-rw-r--r-- | ext/mbstring/php_mbregex.c | 48 |
2 files changed, 60 insertions, 120 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index f68c1f3c34..4f2533ada5 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1299,8 +1299,7 @@ PHP_MINFO_FUNCTION(mbstring) } /* }}} */ -/* {{{ proto string mb_language([string language]) - Sets the current language or Returns the current language as a string */ +/* {{{ Sets the current language or Returns the current language as a string */ PHP_FUNCTION(mb_language) { zend_string *name = NULL; @@ -1324,8 +1323,7 @@ PHP_FUNCTION(mb_language) } /* }}} */ -/* {{{ proto string mb_internal_encoding([string encoding]) - Sets the current internal encoding or Returns the current internal encoding as a string */ +/* {{{ Sets the current internal encoding or Returns the current internal encoding as a string */ PHP_FUNCTION(mb_internal_encoding) { const char *name = NULL; @@ -1353,8 +1351,7 @@ PHP_FUNCTION(mb_internal_encoding) } /* }}} */ -/* {{{ proto mixed mb_http_input([string type]) - Returns the input encoding */ +/* {{{ Returns the input encoding */ PHP_FUNCTION(mb_http_input) { char *typ = NULL; @@ -1448,8 +1445,7 @@ PHP_FUNCTION(mb_http_input) } /* }}} */ -/* {{{ proto string mb_http_output([string encoding]) - Sets the current output_encoding or returns the current output_encoding as a string */ +/* {{{ Sets the current output_encoding or returns the current output_encoding as a string */ PHP_FUNCTION(mb_http_output) { const char *name = NULL; @@ -1478,8 +1474,7 @@ PHP_FUNCTION(mb_http_output) } /* }}} */ -/* {{{ proto bool|array mb_detect_order([mixed encoding-list]) - Sets the current detect_order or Return the current detect_order as a array */ +/* {{{ Sets the current detect_order or Return the current detect_order as a array */ PHP_FUNCTION(mb_detect_order) { zend_string *order_str = NULL; @@ -1547,8 +1542,7 @@ static inline int php_mb_check_code_point(zend_long cp) return 1; } -/* {{{ proto string|int|true mb_substitute_character([string|int|null substitute_character]) - Sets the current substitute_character or returns the current substitute_character */ +/* {{{ Sets the current substitute_character or returns the current substitute_character */ PHP_FUNCTION(mb_substitute_character) { zend_string *substitute_character = NULL; @@ -1602,8 +1596,7 @@ PHP_FUNCTION(mb_substitute_character) } /* }}} */ -/* {{{ proto string mb_preferred_mime_name(string encoding) - Return the preferred MIME name (charset) as a string */ +/* {{{ Return the preferred MIME name (charset) as a string */ PHP_FUNCTION(mb_preferred_mime_name) { enum mbfl_no_encoding no_encoding; @@ -1633,8 +1626,7 @@ PHP_FUNCTION(mb_preferred_mime_name) #define IS_SJIS1(c) ((((c)>=0x81 && (c)<=0x9f) || ((c)>=0xe0 && (c)<=0xf5)) ? 1 : 0) #define IS_SJIS2(c) ((((c)>=0x40 && (c)<=0x7e) || ((c)>=0x80 && (c)<=0xfc)) ? 1 : 0) -/* {{{ proto bool mb_parse_str(string encoded_string, array &result) - Parses GET/POST/COOKIE data and sets global variables */ +/* {{{ Parses GET/POST/COOKIE data and sets global variables */ PHP_FUNCTION(mb_parse_str) { zval *track_vars_array; @@ -1674,8 +1666,7 @@ PHP_FUNCTION(mb_parse_str) } /* }}} */ -/* {{{ proto string mb_output_handler(string contents, int status) - Returns string in output buffer converted to the http_output encoding */ +/* {{{ Returns string in output buffer converted to the http_output encoding */ PHP_FUNCTION(mb_output_handler) { char *arg_string; @@ -1778,8 +1769,7 @@ PHP_FUNCTION(mb_output_handler) } /* }}} */ -/* {{{ proto array mb_str_split(string str [, int split_length] [, string encoding]) - Convert a multibyte string to an array. If split_length is specified, +/* {{{ Convert a multibyte string to an array. If split_length is specified, break the string down into chunks each split_length characters long. */ /* structure to pass split params to the callback */ @@ -1941,8 +1931,7 @@ PHP_FUNCTION(mb_str_split) } /* }}} */ -/* {{{ proto int mb_strlen(string str [, string encoding]) - Get character numbers of a string */ +/* {{{ Get character numbers of a string */ PHP_FUNCTION(mb_strlen) { size_t n; @@ -1988,8 +1977,7 @@ static void handle_strpos_error(size_t error) { } } -/* {{{ proto int mb_strpos(string haystack, string needle [, int offset [, string encoding]]) - Find position of first occurrence of a string within another */ +/* {{{ Find position of first occurrence of a string within another */ PHP_FUNCTION(mb_strpos) { int reverse = 0; @@ -2017,8 +2005,7 @@ PHP_FUNCTION(mb_strpos) } /* }}} */ -/* {{{ proto int mb_strrpos(string haystack, string needle [, int offset [, string encoding]]) - Find position of last occurrence of a string within another */ +/* {{{ Find position of last occurrence of a string within another */ PHP_FUNCTION(mb_strrpos) { mbfl_string haystack, needle; @@ -2044,8 +2031,7 @@ PHP_FUNCTION(mb_strrpos) } /* }}} */ -/* {{{ proto int mb_stripos(string haystack, string needle [, int offset [, string encoding]]) - Finds position of first occurrence of a string within another, case insensitive */ +/* {{{ Finds position of first occurrence of a string within another, case insensitive */ PHP_FUNCTION(mb_stripos) { size_t n = (size_t) -1; @@ -2074,8 +2060,7 @@ PHP_FUNCTION(mb_stripos) } /* }}} */ -/* {{{ proto int mb_strripos(string haystack, string needle [, int offset [, string encoding]]) - Finds position of last occurrence of a string within another, case insensitive */ +/* {{{ Finds position of last occurrence of a string within another, case insensitive */ PHP_FUNCTION(mb_strripos) { size_t n = (size_t) -1; @@ -2158,32 +2143,28 @@ static void php_mb_strstr_variants(INTERNAL_FUNCTION_PARAMETERS, unsigned int va } } -/* {{{ proto string mb_strstr(string haystack, string needle[, bool part[, string encoding]]) - Finds first occurrence of a string within another */ +/* {{{ Finds first occurrence of a string within another */ PHP_FUNCTION(mb_strstr) { php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRSTR); } /* }}} */ -/* {{{ proto string mb_strrchr(string haystack, string needle[, bool part[, string encoding]]) - Finds the last occurrence of a character in a string within another */ +/* {{{ Finds the last occurrence of a character in a string within another */ PHP_FUNCTION(mb_strrchr) { php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRRCHR); } /* }}} */ -/* {{{ proto string mb_stristr(string haystack, string needle[, bool part[, string encoding]]) - Finds first occurrence of a string within another, case insensitive */ +/* {{{ Finds first occurrence of a string within another, case insensitive */ PHP_FUNCTION(mb_stristr) { php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRISTR); } /* }}} */ -/* {{{ proto string mb_strrichr(string haystack, string needle[, bool part[, string encoding]]) - Finds the last occurrence of a character in a string within another, case insensitive */ +/* {{{ Finds the last occurrence of a character in a string within another, case insensitive */ PHP_FUNCTION(mb_strrichr) { php_mb_strstr_variants(INTERNAL_FUNCTION_PARAM_PASSTHRU, MB_STRRICHR); @@ -2195,8 +2176,7 @@ PHP_FUNCTION(mb_strrichr) #undef MB_STRISTR #undef MB_STRRICHR -/* {{{ proto int mb_substr_count(string haystack, string needle [, string encoding]) - Count the number of substring occurrences */ +/* {{{ Count the number of substring occurrences */ PHP_FUNCTION(mb_substr_count) { size_t n; @@ -2227,8 +2207,7 @@ PHP_FUNCTION(mb_substr_count) } /* }}} */ -/* {{{ proto string mb_substr(string str, int start [, int length [, string encoding]]) - Returns part of a string */ +/* {{{ Returns part of a string */ PHP_FUNCTION(mb_substr) { char *str; @@ -2290,8 +2269,7 @@ PHP_FUNCTION(mb_substr) } /* }}} */ -/* {{{ proto string mb_strcut(string str, int start [, int length [, string encoding]]) - Returns part of a string */ +/* {{{ Returns part of a string */ PHP_FUNCTION(mb_strcut) { zend_string *encoding = NULL; @@ -2346,8 +2324,7 @@ PHP_FUNCTION(mb_strcut) } /* }}} */ -/* {{{ proto int mb_strwidth(string str [, string encoding]) - Gets terminal width of a string */ +/* {{{ Gets terminal width of a string */ PHP_FUNCTION(mb_strwidth) { size_t n; @@ -2369,8 +2346,7 @@ PHP_FUNCTION(mb_strwidth) } /* }}} */ -/* {{{ proto string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]]) - Trim the string in terminal width */ +/* {{{ Trim the string in terminal width */ PHP_FUNCTION(mb_strimwidth) { char *str, *trimmarker = NULL; @@ -2592,8 +2568,7 @@ MBSTRING_API HashTable *php_mb_convert_encoding_recursive(HashTable *input, cons /* }}} */ -/* {{{ proto string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding]) - Returns converted string in desired encoding */ +/* {{{ Returns converted string in desired encoding */ PHP_FUNCTION(mb_convert_encoding) { zend_string *to_encoding_name; @@ -2674,8 +2649,7 @@ static char *mbstring_convert_case( MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); } -/* {{{ proto string mb_convert_case(string source_string, int mode [, string encoding]) - Returns a case-folded version of source_string */ +/* {{{ Returns a case-folded version of source_string */ PHP_FUNCTION(mb_convert_case) { zend_string *from_encoding = NULL; @@ -2711,9 +2685,7 @@ PHP_FUNCTION(mb_convert_case) } /* }}} */ -/* {{{ proto string mb_strtoupper(string source_string [, string encoding]) - * Returns a upper cased version of source_string - */ +/* {{{ Returns a upper cased version of source_string */ PHP_FUNCTION(mb_strtoupper) { zend_string *from_encoding = NULL; @@ -2742,9 +2714,7 @@ PHP_FUNCTION(mb_strtoupper) } /* }}} */ -/* {{{ proto string mb_strtolower(string source_string [, string encoding]) - * Returns a lower cased version of source_string - */ +/* {{{ Returns a lower cased version of source_string */ PHP_FUNCTION(mb_strtolower) { zend_string *from_encoding = NULL; @@ -2773,8 +2743,7 @@ PHP_FUNCTION(mb_strtolower) } /* }}} */ -/* {{{ proto string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]]) - Encodings of the given string is returned (as a string) */ +/* {{{ Encodings of the given string is returned (as a string) */ PHP_FUNCTION(mb_detect_encoding) { char *str; @@ -2840,8 +2809,7 @@ PHP_FUNCTION(mb_detect_encoding) } /* }}} */ -/* {{{ proto mixed mb_list_encodings() - Returns an array of all supported entity encodings */ +/* {{{ Returns an array of all supported entity encodings */ PHP_FUNCTION(mb_list_encodings) { const mbfl_encoding **encodings; @@ -2861,8 +2829,7 @@ PHP_FUNCTION(mb_list_encodings) } /* }}} */ -/* {{{ proto array mb_encoding_aliases(string encoding) - Returns an array of the aliases of a given encoding name */ +/* {{{ Returns an array of the aliases of a given encoding name */ PHP_FUNCTION(mb_encoding_aliases) { const mbfl_encoding *encoding; @@ -2887,8 +2854,7 @@ PHP_FUNCTION(mb_encoding_aliases) } /* }}} */ -/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]]) - Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */ +/* {{{ Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */ PHP_FUNCTION(mb_encode_mimeheader) { const mbfl_encoding *charset, *transenc; @@ -2939,8 +2905,7 @@ PHP_FUNCTION(mb_encode_mimeheader) } /* }}} */ -/* {{{ proto string mb_decode_mimeheader(string string) - Decodes the MIME "encoded-word" in the string */ +/* {{{ Decodes the MIME "encoded-word" in the string */ PHP_FUNCTION(mb_decode_mimeheader) { mbfl_string string, result, *ret; @@ -2960,8 +2925,7 @@ PHP_FUNCTION(mb_decode_mimeheader) } /* }}} */ -/* {{{ proto string mb_convert_kana(string str [, string option] [, string encoding]) - Conversion between full-width character and half-width character (Japanese) */ +/* {{{ Conversion between full-width character and half-width character (Japanese) */ PHP_FUNCTION(mb_convert_kana) { int opt; @@ -3147,8 +3111,7 @@ static int mb_recursive_convert_variable(mbfl_buffer_converter *convd, zval *var return 0; } /* }}} */ -/* {{{ proto string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...]) - Converts the string resource in variables to desired encoding */ +/* {{{ Converts the string resource in variables to desired encoding */ PHP_FUNCTION(mb_convert_variables) { zval *args; @@ -3322,16 +3285,14 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) } /* }}} */ -/* {{{ proto string mb_encode_numericentity(string string, array convmap [, string encoding [, bool is_hex]]) - Converts specified characters to HTML numeric entities */ +/* {{{ Converts specified characters to HTML numeric entities */ PHP_FUNCTION(mb_encode_numericentity) { php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto string mb_decode_numericentity(string string, array convmap [, string encoding]) - Converts HTML numeric entities to character code */ +/* {{{ Converts HTML numeric entities to character code */ PHP_FUNCTION(mb_decode_numericentity) { php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); @@ -3339,9 +3300,7 @@ PHP_FUNCTION(mb_decode_numericentity) /* }}} */ /* }}} */ -/* {{{ proto int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) - * Sends an email message with MIME scheme - */ +/* {{{ Sends an email message with MIME scheme */ #define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos) \ if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) { \ @@ -3810,8 +3769,7 @@ PHP_FUNCTION(mb_send_mail) #undef PHP_MBSTR_MAIL_MIME_HEADER4 /* }}} */ -/* {{{ proto mixed mb_get_info([string type]) - Returns the current settings of mbstring */ +/* {{{ Returns the current settings of mbstring */ PHP_FUNCTION(mb_get_info) { char *typ = NULL; @@ -4074,8 +4032,7 @@ static int php_mb_check_encoding_recursive(HashTable *vars, const mbfl_encoding } -/* {{{ proto bool mb_check_encoding([mixed var[, string encoding]]) - Check if the string is valid for the specified encoding */ +/* {{{ Check if the string is valid for the specified encoding */ PHP_FUNCTION(mb_check_encoding) { zend_string *input_str = NULL, *enc = NULL; @@ -4160,7 +4117,7 @@ static inline zend_long php_mb_ord(const char *str, size_t str_len, zend_string } -/* {{{ proto int|false mb_ord([string str[, string encoding]]) */ +/* {{{ */ PHP_FUNCTION(mb_ord) { char *str; @@ -4277,7 +4234,7 @@ static inline zend_string *php_mb_chr(zend_long cp, zend_string *enc_name, uint3 } -/* {{{ proto string|false mb_chr([int cp[, string encoding]]) */ +/* {{{ */ PHP_FUNCTION(mb_chr) { zend_long cp; @@ -4299,7 +4256,7 @@ PHP_FUNCTION(mb_chr) } /* }}} */ -/* {{{ proto string mb_scrub([string str[, string encoding]]) */ +/* {{{ */ PHP_FUNCTION(mb_scrub) { const mbfl_encoding *enc; @@ -4436,8 +4393,7 @@ MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nby } /* }}} */ -/* {{{ MBSTRING_API int php_mb_stripos() - */ +/* {{{ MBSTRING_API int php_mb_stripos() */ MBSTRING_API size_t php_mb_stripos(int mode, const char *old_haystack, size_t old_haystack_len, const char *old_needle, size_t old_needle_len, zend_long offset, const mbfl_encoding *enc) { size_t n = (size_t) -1; diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index b3c37826b1..a797efbf7b 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -846,8 +846,7 @@ static inline void mb_regex_substitute( * php functions */ -/* {{{ proto string mb_regex_encoding([string encoding]) - Returns the current encoding for regex as a string. */ +/* {{{ Returns the current encoding for regex as a string. */ PHP_FUNCTION(mb_regex_encoding) { char *encoding = NULL; @@ -982,16 +981,14 @@ out: } /* }}} */ -/* {{{ proto int mb_ereg(string pattern, string string [, array registers]) - Regular expression match for multibyte string */ +/* {{{ Regular expression match for multibyte string */ PHP_FUNCTION(mb_ereg) { _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto int mb_eregi(string pattern, string string [, array registers]) - Case-insensitive regular expression match for multibyte string */ +/* {{{ Case-insensitive regular expression match for multibyte string */ PHP_FUNCTION(mb_eregi) { _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); @@ -1178,32 +1175,28 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp } /* }}} */ -/* {{{ proto string mb_ereg_replace(string pattern, string replacement, string string [, string option]) - Replace regular expression for multibyte string */ +/* {{{ Replace regular expression for multibyte string */ PHP_FUNCTION(mb_ereg_replace) { _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); } /* }}} */ -/* {{{ proto string mb_eregi_replace(string pattern, string replacement, string string) - Case insensitive replace regular expression for multibyte string */ +/* {{{ Case insensitive replace regular expression for multibyte string */ PHP_FUNCTION(mb_eregi_replace) { _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, ONIG_OPTION_IGNORECASE, 0); } /* }}} */ -/* {{{ proto string mb_ereg_replace_callback(string pattern, string callback, string string [, string option]) - regular expression for multibyte string using replacement callback */ +/* {{{ regular expression for multibyte string using replacement callback */ PHP_FUNCTION(mb_ereg_replace_callback) { _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); } /* }}} */ -/* {{{ proto array mb_split(string pattern, string string [, int limit]) - split multibyte string into array by regular expression */ +/* {{{ split multibyte string into array by regular expression */ PHP_FUNCTION(mb_split) { char *arg_pattern; @@ -1285,8 +1278,7 @@ PHP_FUNCTION(mb_split) } /* }}} */ -/* {{{ proto bool mb_ereg_match(string pattern, string string [,string option]) - Regular expression match for multibyte string */ +/* {{{ Regular expression match for multibyte string */ PHP_FUNCTION(mb_ereg_match) { char *arg_pattern; @@ -1463,32 +1455,28 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode) } /* }}} */ -/* {{{ proto bool mb_ereg_search([string pattern[, string option]]) - Regular expression search for multibyte string */ +/* {{{ Regular expression search for multibyte string */ PHP_FUNCTION(mb_ereg_search) { _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto array mb_ereg_search_pos([string pattern[, string option]]) - Regular expression search for multibyte string */ +/* {{{ Regular expression search for multibyte string */ PHP_FUNCTION(mb_ereg_search_pos) { _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } /* }}} */ -/* {{{ proto array mb_ereg_search_regs([string pattern[, string option]]) - Regular expression search for multibyte string */ +/* {{{ Regular expression search for multibyte string */ PHP_FUNCTION(mb_ereg_search_regs) { _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2); } /* }}} */ -/* {{{ proto bool mb_ereg_search_init(string string [, string pattern[, string option]]) - Initialize string and regular expression for search. */ +/* {{{ Initialize string and regular expression for search. */ PHP_FUNCTION(mb_ereg_search_init) { zend_string *arg_str; @@ -1546,8 +1534,7 @@ PHP_FUNCTION(mb_ereg_search_init) } /* }}} */ -/* {{{ proto array mb_ereg_search_getregs(void) - Get matched substring of the last time */ +/* {{{ Get matched substring of the last time */ PHP_FUNCTION(mb_ereg_search_getregs) { size_t n, i, len; @@ -1589,8 +1576,7 @@ PHP_FUNCTION(mb_ereg_search_getregs) } /* }}} */ -/* {{{ proto int mb_ereg_search_getpos(void) - Get search start position */ +/* {{{ Get search start position */ PHP_FUNCTION(mb_ereg_search_getpos) { if (zend_parse_parameters_none() == FAILURE) { @@ -1601,8 +1587,7 @@ PHP_FUNCTION(mb_ereg_search_getpos) } /* }}} */ -/* {{{ proto bool mb_ereg_search_setpos(int position) - Set search start position */ +/* {{{ Set search start position */ PHP_FUNCTION(mb_ereg_search_setpos) { zend_long position; @@ -1641,8 +1626,7 @@ static void _php_mb_regex_set_options(OnigOptionType options, OnigSyntaxType *sy } /* }}} */ -/* {{{ proto string mb_regex_set_options([string options]) - Set or get the default options for mbregex functions */ +/* {{{ Set or get the default options for mbregex functions */ PHP_FUNCTION(mb_regex_set_options) { OnigOptionType opt, prev_opt; |