|
|
|
@ -2089,7 +2089,7 @@ PHP_FUNCTION(mb_output_handler) |
|
|
|
{ |
|
|
|
char *arg_string; |
|
|
|
zend_str_size_int arg_string_len; |
|
|
|
long arg_status; |
|
|
|
php_int_t arg_status; |
|
|
|
mbfl_string string, result; |
|
|
|
const char *charset; |
|
|
|
char *p; |
|
|
|
@ -2098,7 +2098,7 @@ PHP_FUNCTION(mb_output_handler) |
|
|
|
unsigned char send_text_mimetype = 0; |
|
|
|
char *s, *mimetype = NULL; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl", &arg_string, &arg_string_len, &arg_status) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si", &arg_string, &arg_string_len, &arg_status) == FAILURE) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -2223,7 +2223,7 @@ PHP_FUNCTION(mb_strlen) |
|
|
|
PHP_FUNCTION(mb_strpos) |
|
|
|
{ |
|
|
|
int n, reverse = 0; |
|
|
|
long offset; |
|
|
|
php_int_t offset; |
|
|
|
mbfl_string haystack, needle; |
|
|
|
char *enc_name = NULL; |
|
|
|
zend_str_size_int enc_name_len; |
|
|
|
@ -2236,7 +2236,7 @@ PHP_FUNCTION(mb_strpos) |
|
|
|
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; |
|
|
|
offset = 0; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|lS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|iS", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) { |
|
|
|
RETURN_FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
@ -2385,14 +2385,14 @@ PHP_FUNCTION(mb_strrpos) |
|
|
|
PHP_FUNCTION(mb_stripos) |
|
|
|
{ |
|
|
|
int n; |
|
|
|
long offset; |
|
|
|
php_int_t offset; |
|
|
|
mbfl_string haystack, needle; |
|
|
|
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; |
|
|
|
zend_str_size_int from_encoding_len; |
|
|
|
n = -1; |
|
|
|
offset = 0; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|lS", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|iS", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { |
|
|
|
RETURN_FALSE; |
|
|
|
} |
|
|
|
if (needle.len == 0) { |
|
|
|
@ -2414,14 +2414,14 @@ PHP_FUNCTION(mb_stripos) |
|
|
|
PHP_FUNCTION(mb_strripos) |
|
|
|
{ |
|
|
|
int n; |
|
|
|
long offset; |
|
|
|
php_int_t offset; |
|
|
|
mbfl_string haystack, needle; |
|
|
|
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; |
|
|
|
zend_str_size_int from_encoding_len; |
|
|
|
n = -1; |
|
|
|
offset = 0; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|lS", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|iS", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { |
|
|
|
RETURN_FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
@ -2715,13 +2715,13 @@ PHP_FUNCTION(mb_substr) |
|
|
|
{ |
|
|
|
size_t argc = ZEND_NUM_ARGS(); |
|
|
|
char *str, *encoding; |
|
|
|
long from, len; |
|
|
|
php_int_t from, len; |
|
|
|
int mblen; |
|
|
|
zend_str_size_int str_len, encoding_len; |
|
|
|
zval **z_len = NULL; |
|
|
|
mbfl_string string, result, *ret; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|ZS", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|ZS", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -2793,7 +2793,7 @@ PHP_FUNCTION(mb_strcut) |
|
|
|
{ |
|
|
|
size_t argc = ZEND_NUM_ARGS(); |
|
|
|
char *encoding; |
|
|
|
long from, len; |
|
|
|
php_int_t from, len; |
|
|
|
zend_str_size_int encoding_len; |
|
|
|
zval **z_len = NULL; |
|
|
|
mbfl_string string, result, *ret; |
|
|
|
@ -2802,7 +2802,7 @@ PHP_FUNCTION(mb_strcut) |
|
|
|
string.no_language = MBSTRG(language); |
|
|
|
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|ZS", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|ZS", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -2894,11 +2894,11 @@ PHP_FUNCTION(mb_strwidth) |
|
|
|
PHP_FUNCTION(mb_strimwidth) |
|
|
|
{ |
|
|
|
char *str, *trimmarker, *encoding; |
|
|
|
long from, width; |
|
|
|
php_int_t from, width; |
|
|
|
zend_str_size_int str_len, trimmarker_len, encoding_len; |
|
|
|
mbfl_string string, result, marker, *ret; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sll|SS", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding, &encoding_len) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sii|SS", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding, &encoding_len) == FAILURE) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -3115,12 +3115,12 @@ PHP_FUNCTION(mb_convert_case) |
|
|
|
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; |
|
|
|
char *str; |
|
|
|
zend_str_size_int str_len, from_encoding_len; |
|
|
|
long case_mode = 0; |
|
|
|
php_int_t case_mode = 0; |
|
|
|
char *newstr; |
|
|
|
size_t ret_len; |
|
|
|
|
|
|
|
RETVAL_FALSE; |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|S!", &str, &str_len, |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Si|S!", &str, &str_len, |
|
|
|
&case_mode, &from_encoding, &from_encoding_len) == FAILURE) |
|
|
|
RETURN_FALSE; |
|
|
|
|
|
|
|
@ -3314,13 +3314,13 @@ PHP_FUNCTION(mb_encode_mimeheader) |
|
|
|
zend_str_size_int trans_enc_name_len; |
|
|
|
char *linefeed = "\r\n"; |
|
|
|
zend_str_size_int linefeed_len; |
|
|
|
long indent = 0; |
|
|
|
php_int_t indent = 0; |
|
|
|
|
|
|
|
mbfl_string_init(&string); |
|
|
|
string.no_language = MBSTRG(language); |
|
|
|
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; |
|
|
|
|
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SSSl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) { |
|
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|SSSi", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|