Skip to content

Commit

Permalink
Function renaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
Moriyoshi Koizumi committed Oct 23, 2002
1 parent 83fd27e commit afa9f42
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 43 deletions.
42 changes: 2 additions & 40 deletions ext/mbstring/mbstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ php_mbregex_free_cache(mb_regex_t *pre)
/* }}} */
#endif


/* {{{ php.ini directive handler */
static PHP_INI_MH(OnUpdate_mbstring_language)
{
Expand Down Expand Up @@ -1019,7 +1018,6 @@ PHP_MINFO_FUNCTION(mbstring)
}
/* }}} */


/* {{{ proto string mb_language([string language])
Sets the current language or Returns the current language as a string */
PHP_FUNCTION(mb_language)
Expand Down Expand Up @@ -1051,8 +1049,6 @@ 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 */
PHP_FUNCTION(mb_internal_encoding)
Expand Down Expand Up @@ -1087,7 +1083,6 @@ PHP_FUNCTION(mb_internal_encoding)
}
/* }}} */


/* {{{ proto false|string mb_http_input([string type])
Returns the input encoding */
PHP_FUNCTION(mb_http_input)
Expand Down Expand Up @@ -1180,7 +1175,6 @@ 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 */
PHP_FUNCTION(mb_http_output)
Expand Down Expand Up @@ -1212,7 +1206,6 @@ 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 */
PHP_FUNCTION(mb_detect_order)
Expand Down Expand Up @@ -1273,7 +1266,6 @@ PHP_FUNCTION(mb_detect_order)
}
/* }}} */


/* {{{ proto mixed mb_substitute_character([mixed substchar])
Sets the current substitute_character or returns the current substitute_character */
PHP_FUNCTION(mb_substitute_character)
Expand Down Expand Up @@ -1324,7 +1316,6 @@ PHP_FUNCTION(mb_substitute_character)
}
/* }}} */


/* {{{ proto string mb_preferred_mime_name(string encoding)
Return the preferred MIME name (charset) as a string */
PHP_FUNCTION(mb_preferred_mime_name)
Expand Down Expand Up @@ -1519,8 +1510,8 @@ SAPI_POST_HANDLER_FUNC(php_mbstr_post_handler)
#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)

/* {{{ char *mbstr_strrchr() */
char *mbstr_strrchr(const char *s, char c TSRMLS_DC){
/* {{{ PHPAPI char *php_mb_strrchr() */
PHPAPI char *php_mb_strrchr(const char *s, char c TSRMLS_DC){
unsigned char *p = (unsigned char *)s, *last = NULL;
while(*p++) {
if (*p == c) {
Expand Down Expand Up @@ -1852,8 +1843,6 @@ 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 */
PHP_FUNCTION(mb_output_handler)
Expand Down Expand Up @@ -1948,8 +1937,6 @@ PHP_FUNCTION(mb_output_handler)
}
/* }}} */



/* {{{ proto int mb_strlen(string str [, string encoding])
Get character numbers of a string */
PHP_FUNCTION(mb_strlen)
Expand Down Expand Up @@ -2000,8 +1987,6 @@ PHP_FUNCTION(mb_strlen)
}
/* }}} */



/* {{{ proto int mb_strpos(string haystack, string needle [, int offset [, string encoding]])
Find position of first occurrence of a string within another */
PHP_FUNCTION(mb_strpos)
Expand Down Expand Up @@ -2088,8 +2073,6 @@ PHP_FUNCTION(mb_strpos)
}
/* }}} */



/* {{{ proto int mb_strrpos(string haystack, string needle [, string encoding])
Find the last occurrence of a character in a string within another */
PHP_FUNCTION(mb_strrpos)
Expand Down Expand Up @@ -2148,8 +2131,6 @@ PHP_FUNCTION(mb_strrpos)
}
/* }}} */



/* {{{ proto string mb_substr(string str, int start [, int length [, string encoding]])
Returns part of a string */
PHP_FUNCTION(mb_substr)
Expand Down Expand Up @@ -2237,8 +2218,6 @@ PHP_FUNCTION(mb_substr)
}
/* }}} */



/* {{{ proto string mb_strcut(string str, int start [, int length [, string encoding]])
Returns part of a string */
PHP_FUNCTION(mb_strcut)
Expand Down Expand Up @@ -2320,8 +2299,6 @@ PHP_FUNCTION(mb_strcut)
}
/* }}} */



/* {{{ proto int mb_strwidth(string str [, string encoding])
Gets terminal width of a string */
PHP_FUNCTION(mb_strwidth)
Expand Down Expand Up @@ -2361,8 +2338,6 @@ PHP_FUNCTION(mb_strwidth)
}
/* }}} */



/* {{{ proto string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])
Trim the string in terminal width */
PHP_FUNCTION(mb_strimwidth)
Expand Down Expand Up @@ -2525,8 +2500,6 @@ PHPAPI char * php_mb_convert_encoding(char *input, size_t length, char *_to_enco
}
/* }}} */



/* {{{ proto string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])
Returns converted string in desired encoding */
PHP_FUNCTION(mb_convert_encoding)
Expand Down Expand Up @@ -2602,7 +2575,6 @@ PHP_FUNCTION(mb_convert_encoding)
}
/* }}} */


/* {{{ proto string mb_convert_case(string sourcestring, int mode [, string encoding])
Returns a case-folded version of sourcestring */
PHP_FUNCTION(mb_convert_case)
Expand Down Expand Up @@ -2674,7 +2646,6 @@ PHP_FUNCTION(mb_strtolower)
}
/* }}} */


/* {{{ proto string mb_detect_encoding(string str [, mixed encoding_list])
Encodings of the given string is returned (as a string) */
PHP_FUNCTION(mb_detect_encoding)
Expand Down Expand Up @@ -2749,8 +2720,6 @@ PHP_FUNCTION(mb_detect_encoding)
}
/* }}} */



/* {{{ proto string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed]]])
Converts the string to MIME "encoded-word" in the format of =?charset?(B|Q)?encoded_string?= */
PHP_FUNCTION(mb_encode_mimeheader)
Expand Down Expand Up @@ -2820,8 +2789,6 @@ PHP_FUNCTION(mb_encode_mimeheader)
}
/* }}} */



/* {{{ proto string mb_decode_mimeheader(string string)
Decodes the MIME "encoded-word" in the string */
PHP_FUNCTION(mb_decode_mimeheader)
Expand All @@ -2848,8 +2815,6 @@ 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) */
PHP_FUNCTION(mb_convert_kana)
Expand Down Expand Up @@ -3196,7 +3161,6 @@ PHP_FUNCTION(mb_convert_variables)
}
/* }}} */


/* {{{ HTML numeric entity */
/* {{{ static void php_mbstr_numericentity_exec() */
static void
Expand Down Expand Up @@ -3281,15 +3245,13 @@ PHP_FUNCTION(mb_encode_numericentity)
}
/* }}} */


/* {{{ proto string mb_decode_numericentity(string string, array convmap [, string encoding])
Converts HTML numeric entities to character code */
PHP_FUNCTION(mb_decode_numericentity)
{
php_mbstr_numericentity_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
}
/* }}} */

/* }}} */

/* {{{ proto int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
Expand Down
4 changes: 2 additions & 2 deletions ext/mbstring/mbstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ PHP_FUNCTION(mb_decode_numericentity);
PHP_FUNCTION(mb_send_mail);
PHP_FUNCTION(mb_get_info);

char *mbstr_strrchr(const char *s, char c TSRMLS_DC);
int php_mb_is_leadbyte(const char *s TSRMLS_DC);
PHPAPI char *php_mb_strrchr(const char *s, char c TSRMLS_DC);
PHPAPI int php_mb_is_leadbyte(const char *s TSRMLS_DC);
PHPAPI int php_mb_encoding_translation(TSRMLS_D);

ZEND_BEGIN_MODULE_GLOBALS(mbstring)
Expand Down
2 changes: 1 addition & 1 deletion main/rfc1867.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)

#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
if (php_mb_encoding_translation(TSRMLS_C)) {
s = mbstr_strrchr(filename, '\\' TSRMLS_CC);
s = php_mb_strrchr(filename, '\\' TSRMLS_CC);
} else {
s = strrchr(filename, '\\');
}
Expand Down

0 comments on commit afa9f42

Please sign in to comment.