andrei Thu May 4 00:01:34 2006 UTC Modified files: /php-src/ext/unicode php_property.h property.c unicode.c Log: Change prefix to char_ and rename some functions.
http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/php_property.h?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/unicode/php_property.h diff -u php-src/ext/unicode/php_property.h:1.2 php-src/ext/unicode/php_property.h:1.3 --- php-src/ext/unicode/php_property.h:1.2 Wed May 3 22:03:10 2006 +++ php-src/ext/unicode/php_property.h Thu May 4 00:01:34 2006 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_property.h,v 1.2 2006/05/03 22:03:10 andrei Exp $ */ +/* $Id: php_property.h,v 1.3 2006/05/04 00:01:34 andrei Exp $ */ #ifndef PHP_PROPERTY_H #define PHP_PROPERTY_H @@ -22,48 +22,56 @@ /* * C/POSIX migration functions */ -PHP_FUNCTION(unicode_is_lower); -PHP_FUNCTION(unicode_is_upper); -PHP_FUNCTION(unicode_is_digit); -PHP_FUNCTION(unicode_is_alpha); -PHP_FUNCTION(unicode_is_alnum); -PHP_FUNCTION(unicode_is_xdigit); -PHP_FUNCTION(unicode_is_punct); -PHP_FUNCTION(unicode_is_graph); -PHP_FUNCTION(unicode_is_blank); -PHP_FUNCTION(unicode_is_space); -PHP_FUNCTION(unicode_is_cntrl); -PHP_FUNCTION(unicode_is_print); +PHP_FUNCTION(char_is_lower); +PHP_FUNCTION(char_is_upper); +PHP_FUNCTION(char_is_digit); +PHP_FUNCTION(char_is_alpha); +PHP_FUNCTION(char_is_alnum); +PHP_FUNCTION(char_is_xdigit); +PHP_FUNCTION(char_is_punct); +PHP_FUNCTION(char_is_graph); +PHP_FUNCTION(char_is_blank); +PHP_FUNCTION(char_is_space); +PHP_FUNCTION(char_is_cntrl); +PHP_FUNCTION(char_is_print); /* * Additional binary property functions */ -PHP_FUNCTION(unicode_is_title); -PHP_FUNCTION(unicode_is_defined); -PHP_FUNCTION(unicode_is_id_start); -PHP_FUNCTION(unicode_is_id_part); -PHP_FUNCTION(unicode_is_id_ignorable); -PHP_FUNCTION(unicode_is_iso_control); -PHP_FUNCTION(unicode_is_mirrored); -PHP_FUNCTION(unicode_is_base); -PHP_FUNCTION(unicode_is_whitespace); -PHP_FUNCTION(unicode_is_u_whitespace); -PHP_FUNCTION(unicode_is_u_alphabetic); -PHP_FUNCTION(unicode_is_u_uppercase); -PHP_FUNCTION(unicode_is_u_lowercase); +PHP_FUNCTION(char_is_defined); +PHP_FUNCTION(char_is_id_start); +PHP_FUNCTION(char_is_id_part); +PHP_FUNCTION(char_is_id_ignorable); +PHP_FUNCTION(char_is_iso_control); +PHP_FUNCTION(char_is_mirrored); +PHP_FUNCTION(char_is_base); +PHP_FUNCTION(char_is_whitespace); +PHP_FUNCTION(char_is_alphabetic); +PHP_FUNCTION(char_is_uppercase); +PHP_FUNCTION(char_is_lowercase); +PHP_FUNCTION(char_is_titlecase); /* * Single character property functions. */ -PHP_FUNCTION(unicode_get_numeric_value); -PHP_FUNCTION(unicode_get_combining_class); -PHP_FUNCTION(unicode_get_digit_value); -PHP_FUNCTION(unicode_get_mirror); -PHP_FUNCTION(unicode_get_direction); -PHP_FUNCTION(unicode_get_char_type); -PHP_FUNCTION(unicode_is_char_valid); +PHP_FUNCTION(char_get_numeric_value); +PHP_FUNCTION(char_get_combining_class); +PHP_FUNCTION(char_get_digit_value); +PHP_FUNCTION(char_get_mirrored); +PHP_FUNCTION(char_get_direction); +PHP_FUNCTION(char_get_type); +PHP_FUNCTION(char_is_valid); + +/* + * Other functions + */ + +PHP_FUNCTION(char_to_digit); +PHP_FUNCTION(char_from_digit); +PHP_FUNCTION(char_from_name); +PHP_FUNCTION(char_get_name); #endif /* PHP_PROPERTY_H */ http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/property.c?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/unicode/property.c diff -u php-src/ext/unicode/property.c:1.5 php-src/ext/unicode/property.c:1.6 --- php-src/ext/unicode/property.c:1.5 Wed May 3 22:03:10 2006 +++ php-src/ext/unicode/property.c Thu May 4 00:01:34 2006 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: property.c,v 1.5 2006/05/03 22:03:10 andrei Exp $ */ +/* $Id: property.c,v 1.6 2006/05/04 00:01:34 andrei Exp $ */ #include "php_unicode.h" @@ -47,62 +47,62 @@ /* {{{ C/POSIX migration functions */ -PHP_FUNCTION(unicode_is_lower) +PHP_FUNCTION(char_is_lower) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_islower); } -PHP_FUNCTION(unicode_is_upper) +PHP_FUNCTION(char_is_upper) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isupper); } -PHP_FUNCTION(unicode_is_digit) +PHP_FUNCTION(char_is_digit) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isdigit); } -PHP_FUNCTION(unicode_is_alpha) +PHP_FUNCTION(char_is_alpha) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isalpha); } -PHP_FUNCTION(unicode_is_alnum) +PHP_FUNCTION(char_is_alnum) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isalnum); } -PHP_FUNCTION(unicode_is_xdigit) +PHP_FUNCTION(char_is_xdigit) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isxdigit); } -PHP_FUNCTION(unicode_is_punct) +PHP_FUNCTION(char_is_punct) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_ispunct); } -PHP_FUNCTION(unicode_is_graph) +PHP_FUNCTION(char_is_graph) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isgraph); } -PHP_FUNCTION(unicode_is_blank) +PHP_FUNCTION(char_is_blank) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isblank); } -PHP_FUNCTION(unicode_is_space) +PHP_FUNCTION(char_is_space) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isspace); } -PHP_FUNCTION(unicode_is_cntrl) +PHP_FUNCTION(char_is_cntrl) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_iscntrl); } -PHP_FUNCTION(unicode_is_print) +PHP_FUNCTION(char_is_print) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isprint); } @@ -111,76 +111,72 @@ /* {{{ Additional binary property functions */ -PHP_FUNCTION(unicode_is_title) -{ - check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_istitle); -} - -PHP_FUNCTION(unicode_is_defined) +PHP_FUNCTION(char_is_defined) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isdefined); } -PHP_FUNCTION(unicode_is_id_start) +PHP_FUNCTION(char_is_id_start) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDStart); } -PHP_FUNCTION(unicode_is_id_part) +PHP_FUNCTION(char_is_id_part) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDPart); } -PHP_FUNCTION(unicode_is_id_ignorable) +PHP_FUNCTION(char_is_id_ignorable) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDIgnorable); } -PHP_FUNCTION(unicode_is_iso_control) +PHP_FUNCTION(char_is_iso_control) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isISOControl); } -PHP_FUNCTION(unicode_is_mirrored) +PHP_FUNCTION(char_is_mirrored) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isMirrored); } -PHP_FUNCTION(unicode_is_base) +PHP_FUNCTION(char_is_base) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isbase); } -PHP_FUNCTION(unicode_is_whitespace) -{ - check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isWhitespace); -} - -PHP_FUNCTION(unicode_is_u_whitespace) +PHP_FUNCTION(char_is_whitespace) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUWhiteSpace); } -PHP_FUNCTION(unicode_is_u_alphabetic) +PHP_FUNCTION(char_is_alphabetic) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUAlphabetic); } -PHP_FUNCTION(unicode_is_u_uppercase) +PHP_FUNCTION(char_is_uppercase) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUUppercase); } -PHP_FUNCTION(unicode_is_u_lowercase) +PHP_FUNCTION(char_is_lowercase) { check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isULowercase); } +PHP_FUNCTION(char_is_titlecase) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_istitle); +} + + /* }}} */ /* {{{ Single character properties */ -PHP_FUNCTION(unicode_get_numeric_value) +PHP_FUNCTION(char_get_numeric_value) { UChar *str; int str_len; @@ -199,7 +195,7 @@ RETURN_DOUBLE(u_getNumericValue(ch)); } -PHP_FUNCTION(unicode_get_combining_class) +PHP_FUNCTION(char_get_combining_class) { UChar *str; int str_len; @@ -218,7 +214,7 @@ RETURN_LONG((long)u_getCombiningClass(ch)); } -PHP_FUNCTION(unicode_get_digit_value) +PHP_FUNCTION(char_get_digit_value) { UChar *str; int str_len; @@ -237,7 +233,7 @@ RETURN_LONG(u_charDigitValue(ch)); } -PHP_FUNCTION(unicode_get_mirror) +PHP_FUNCTION(char_get_mirrored) { UChar *str; int str_len; @@ -258,7 +254,7 @@ RETURN_UNICODEL(buf, buf_len, 1); } -PHP_FUNCTION(unicode_get_direction) +PHP_FUNCTION(char_get_direction) { UChar *str; int str_len; @@ -277,7 +273,7 @@ RETURN_LONG((long)u_charDirection(ch)); } -PHP_FUNCTION(unicode_get_char_type) +PHP_FUNCTION(char_get_type) { UChar *str; int str_len; @@ -296,7 +292,7 @@ RETURN_LONG(u_charType(ch)); } -PHP_FUNCTION(unicode_is_char_valid) +PHP_FUNCTION(char_is_valid) { UChar *str; int str_len; http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode.c?r1=1.26&r2=1.27&diff_format=u Index: php-src/ext/unicode/unicode.c diff -u php-src/ext/unicode/unicode.c:1.26 php-src/ext/unicode/unicode.c:1.27 --- php-src/ext/unicode/unicode.c:1.26 Wed May 3 22:03:10 2006 +++ php-src/ext/unicode/unicode.c Thu May 4 00:01:34 2006 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unicode.c,v 1.26 2006/05/03 22:03:10 andrei Exp $ */ +/* $Id: unicode.c,v 1.27 2006/05/04 00:01:34 andrei Exp $ */ #include "php_unicode.h" #include "zend_unicode.h" @@ -249,40 +249,39 @@ PHP_FE(collator_set_default, NULL) /* character property functions */ - PHP_FE(unicode_is_lower, NULL) - PHP_FE(unicode_is_upper, NULL) - PHP_FE(unicode_is_digit, NULL) - PHP_FE(unicode_is_alpha, NULL) - PHP_FE(unicode_is_alnum, NULL) - PHP_FE(unicode_is_xdigit, NULL) - PHP_FE(unicode_is_punct, NULL) - PHP_FE(unicode_is_graph, NULL) - PHP_FE(unicode_is_blank, NULL) - PHP_FE(unicode_is_space, NULL) - PHP_FE(unicode_is_cntrl, NULL) - PHP_FE(unicode_is_print, NULL) - - PHP_FE(unicode_is_title, NULL) - PHP_FE(unicode_is_defined, NULL) - PHP_FE(unicode_is_id_start, NULL) - PHP_FE(unicode_is_id_part, NULL) - PHP_FE(unicode_is_id_ignorable, NULL) - PHP_FE(unicode_is_iso_control, NULL) - PHP_FE(unicode_is_mirrored, NULL) - PHP_FE(unicode_is_base, NULL) - PHP_FE(unicode_is_whitespace, NULL) - PHP_FE(unicode_is_u_whitespace, NULL) - PHP_FE(unicode_is_u_alphabetic, NULL) - PHP_FE(unicode_is_u_uppercase, NULL) - PHP_FE(unicode_is_u_lowercase, NULL) - - PHP_FE(unicode_get_numeric_value, NULL) - PHP_FE(unicode_get_combining_class, NULL) - PHP_FE(unicode_get_digit_value, NULL) - PHP_FE(unicode_get_mirror, NULL) - PHP_FE(unicode_get_direction, NULL) - PHP_FE(unicode_get_char_type, NULL) - PHP_FE(unicode_is_char_valid, NULL) + PHP_FE(char_is_lower, NULL) + PHP_FE(char_is_upper, NULL) + PHP_FE(char_is_digit, NULL) + PHP_FE(char_is_alpha, NULL) + PHP_FE(char_is_alnum, NULL) + PHP_FE(char_is_xdigit, NULL) + PHP_FE(char_is_punct, NULL) + PHP_FE(char_is_graph, NULL) + PHP_FE(char_is_blank, NULL) + PHP_FE(char_is_space, NULL) + PHP_FE(char_is_cntrl, NULL) + PHP_FE(char_is_print, NULL) + + PHP_FE(char_is_defined, NULL) + PHP_FE(char_is_id_start, NULL) + PHP_FE(char_is_id_part, NULL) + PHP_FE(char_is_id_ignorable, NULL) + PHP_FE(char_is_iso_control, NULL) + PHP_FE(char_is_mirrored, NULL) + PHP_FE(char_is_base, NULL) + PHP_FE(char_is_whitespace, NULL) + PHP_FE(char_is_alphabetic, NULL) + PHP_FE(char_is_uppercase, NULL) + PHP_FE(char_is_lowercase, NULL) + PHP_FE(char_is_titlecase, NULL) + + PHP_FE(char_get_numeric_value, NULL) + PHP_FE(char_get_combining_class, NULL) + PHP_FE(char_get_digit_value, NULL) + PHP_FE(char_get_mirrored, NULL) + PHP_FE(char_get_direction, NULL) + PHP_FE(char_get_type, NULL) + PHP_FE(char_is_valid, NULL) { NULL, NULL, NULL } };
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php