moriyoshi Fri Sep 12 23:56:07 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c mbstring.h Log: - Remove unexposed functions. http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.39&r2=1.224.2.22.2.40&diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.39 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.40 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.39 Fri Sep 12 23:37:21 2008 +++ php-src/ext/mbstring/mbstring.c Fri Sep 12 23:56:06 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.39 2008/09/12 23:37:21 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.40 2008/09/12 23:56:06 moriyoshi Exp $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -2733,122 +2733,6 @@ } /* }}} */ -/* {{{ proto array mb_list_encodings_alias_names([string encoding]) - Returns an array of all supported alias encodings */ -PHP_FUNCTION(mb_list_encodings_alias_names) -{ - const mbfl_encoding **encodings; - const mbfl_encoding *encoding; - enum mbfl_no_encoding no_encoding; - int i, j; - zval *row; - char *name = NULL; - int name_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, &name_len) == FAILURE) { - RETURN_FALSE; - } - - if (name == NULL) { - array_init(return_value); - i = 0; - encodings = mbfl_get_supported_encodings(); - while ((encoding = encodings[i++]) != NULL) { - MAKE_STD_ZVAL(row); - array_init(row); - if (encoding->aliases != NULL) { - j = 0; - while ((*encoding->aliases)[j] != NULL) { - add_next_index_string(row, (char *)(*encoding->aliases)[j], 1); - j++; - } - } - add_assoc_zval(return_value, (char *) encoding->name, row); - } - } else { - no_encoding = mbfl_name2no_encoding(name); - if (no_encoding == mbfl_no_encoding_invalid) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", name); - RETURN_FALSE; - } - - name = (char *)mbfl_no_encoding2name(no_encoding); - if (name != NULL) { - i = 0; - encodings = mbfl_get_supported_encodings(); - while ((encoding = encodings[i++]) != NULL) { - if (strcmp(encoding->name, name) != 0){ continue; } - - array_init(return_value); - if (encoding->aliases != NULL) { - j = 0; - while ((*encoding->aliases)[j] != NULL) { - add_next_index_string(return_value, (char *)(*encoding->aliases)[j], 1); - j++; - } - } - - break; - } - } else { - RETURN_FALSE; - } - } -} -/* }}} */ - -/* {{{ proto mixed mb_list_mime_names([string encoding]) - Returns an array or string of all supported mime names */ -PHP_FUNCTION(mb_list_mime_names) -{ - const mbfl_encoding **encodings; - const mbfl_encoding *encoding; - enum mbfl_no_encoding no_encoding; - int i; - char *name = NULL; - int name_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, &name_len) == FAILURE) { - RETURN_FALSE; - } - - if (name == NULL) { - array_init(return_value); - i = 0; - encodings = mbfl_get_supported_encodings(); - while ((encoding = encodings[i++]) != NULL) { - if(encoding->mime_name != NULL) { - add_assoc_string(return_value, (char *) encoding->name, (char *) encoding->mime_name, 1); - } else{ - add_assoc_string(return_value, (char *) encoding->name, "", 1); - } - } - } else { - no_encoding = mbfl_name2no_encoding(name); - if (no_encoding == mbfl_no_encoding_invalid) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", name); - RETURN_FALSE; - } - - name = (char *)mbfl_no_encoding2name(no_encoding); - if (name != NULL) { - i = 0; - encodings = mbfl_get_supported_encodings(); - while ((encoding = encodings[i++]) != NULL) { - if (strcmp(encoding->name, name) != 0){ continue; } - if(encoding->mime_name != NULL) { - RETURN_STRING((char *) encoding->mime_name, 1); - } - break; - } - RETURN_STRING("", 1); - } else { - RETURN_FALSE; - } - } -} -/* }}} */ - /* {{{ 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?= */ PHP_FUNCTION(mb_encode_mimeheader) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.h?r1=1.66.2.4.2.7&r2=1.66.2.4.2.8&diff_format=u Index: php-src/ext/mbstring/mbstring.h diff -u php-src/ext/mbstring/mbstring.h:1.66.2.4.2.7 php-src/ext/mbstring/mbstring.h:1.66.2.4.2.8 --- php-src/ext/mbstring/mbstring.h:1.66.2.4.2.7 Sat Aug 2 20:49:48 2008 +++ php-src/ext/mbstring/mbstring.h Fri Sep 12 23:56:06 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.h,v 1.66.2.4.2.7 2008/08/02 20:49:48 moriyoshi Exp $ */ +/* $Id: mbstring.h,v 1.66.2.4.2.8 2008/09/12 23:56:06 moriyoshi Exp $ */ /* * PHP 4 Multibyte String module "mbstring" (currently only for Japanese) @@ -118,8 +118,6 @@ PHP_FUNCTION(mb_convert_encoding); PHP_FUNCTION(mb_detect_encoding); PHP_FUNCTION(mb_list_encodings); -PHP_FUNCTION(mb_list_encodings_alias_names); -PHP_FUNCTION(mb_list_mime_names); PHP_FUNCTION(mb_convert_kana); PHP_FUNCTION(mb_encode_mimeheader); PHP_FUNCTION(mb_decode_mimeheader);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php