[PHP-CVS] cvs: php-src /ext/xsl php_xsl.c
chregu Wed Dec 10 17:32:37 2003 EDT Modified files: /php-src/ext/xslphp_xsl.c Log: fix crashes when you call php:functionString() with a non-string handler (by adam) Index: php-src/ext/xsl/php_xsl.c diff -u php-src/ext/xsl/php_xsl.c:1.15 php-src/ext/xsl/php_xsl.c:1.16 --- php-src/ext/xsl/php_xsl.c:1.15 Tue Dec 9 15:12:39 2003 +++ php-src/ext/xsl/php_xsl.c Wed Dec 10 17:32:36 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xsl.c,v 1.15 2003/12/09 20:12:39 rrichards Exp $ */ +/* $Id: php_xsl.c,v 1.16 2003/12/10 22:32:36 chregu Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -247,6 +247,16 @@ fci.function_table = EG(function_table); obj = valuePop(ctxt); + if (obj->stringval == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Handler name must be a string"); + xmlXPathFreeObject(obj); + for (i = 0; i < nargs - 1; i++) { + zval_ptr_dtor(&args[i]); + } + efree(args); + efree(fci.params); + return; + } INIT_PZVAL(&handler); ZVAL_STRING(&handler, obj->stringval, 1); xmlXPathFreeObject(obj); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/exif exif.c /ext/standard ftp_fopen_wrapper.c php_string.h string.c
iliaa Wed Dec 10 16:23:36 2003 EDT Modified files: /php-src/ext/exif exif.c /php-src/ext/standard ftp_fopen_wrapper.c string.c php_string.h Log: Fixed ZTS build. Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.158 php-src/ext/exif/exif.c:1.159 --- php-src/ext/exif/exif.c:1.158 Mon Sep 22 19:27:51 2003 +++ php-src/ext/exif/exif.c Wed Dec 10 16:23:33 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $ */ +/* $Id: exif.c,v 1.159 2003/12/10 21:23:33 iliaa Exp $ */ /* ToDos * @@ -111,7 +111,7 @@ }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.158 2003/09/22 23:27:51 iliaa Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.159 2003/12/10 21:23:33 iliaa Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -3712,7 +3712,7 @@ return FALSE; } - php_basename(FileName, strlen(FileName), NULL, 0, &(ImageInfo->FileName), NULL); + php_basename(FileName, strlen(FileName), NULL, 0, &(ImageInfo->FileName), NULL TSRMLS_CC); ImageInfo->read_thumbnail = read_thumbnail; ImageInfo->read_all = read_all; ImageInfo->Thumbnail.filetype = IMAGE_FILETYPE_UNKNOWN; Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.67 php-src/ext/standard/ftp_fopen_wrapper.c:1.68 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.67 Wed Dec 10 02:15:28 2003 +++ php-src/ext/standard/ftp_fopen_wrapper.cWed Dec 10 16:23:34 2003 @@ -18,7 +18,7 @@ | Sara Golemon <[EMAIL PROTECTED]> | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.67 2003/12/10 07:15:28 moriyoshi Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.68 2003/12/10 21:23:34 iliaa Exp $ */ #include "php.h" #include "php_globals.h" @@ -576,7 +576,7 @@ return 0; } - php_basename(ent->d_name, tmp_len, NULL, 0, &basename, &basename_len); + php_basename(ent->d_name, tmp_len, NULL, 0, &basename, &basename_len TSRMLS_CC); if (!basename) { return 0; } Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.406 php-src/ext/standard/string.c:1.407 --- php-src/ext/standard/string.c:1.406 Wed Dec 10 02:15:28 2003 +++ php-src/ext/standard/string.c Wed Dec 10 16:23:35 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.406 2003/12/10 07:15:28 moriyoshi Exp $ */ +/* $Id: string.c,v 1.407 2003/12/10 21:23:35 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1068,7 +1068,7 @@ /* {{{ php_basename */ -PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len) +PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len TSRMLS_DC) { char *ret = NULL, *c, *comp, *cend; size_t inc_len, cnt; @@ -1146,7 +1146,7 @@ return; } - php_basename(string, string_len, suffix, suffix_len, &ret, &ret_len); + php_basename(string, string_len, suffix, suffix_len, &ret, &ret_len TSRMLS_CC); RETURN_STRINGL(ret, (int)ret_len, 0); } /* }}} */ @@ -1265,7 +1265,7 @@ } if ((opt & PHP_PATHINFO_BASENAME) == PHP_PATHINFO_BASENAME) { - php_basename(path, path_len, NULL, 0, &ret, &ret_len); + php_basename(path, path_len, NULL, 0, &ret, &ret_len TSRMLS_CC); add_assoc_stringl(tmp, "basename", ret, ret_len, 0); } @@ -1276,7 +1276,7 @@ /* Have we alrady looked up the basename? */ if (!have_basename) { - php_basename(path, path_len, NULL, 0, &ret, &ret_len); + php_basename(path, path_len, NULL, 0, &ret, &ret_len TSRMLS_CC); } p = strrchr(ret, '.'); Index: php-src/ext/standard/php_string.h diff -u php-src/ext/standard/php_string.h:1.82 php-src/ext/standard/php_string.h:1.83 --- php-src/ext/standard/php_string.h:1.82 Wed Dec 10 02:15:28 2003 +++ php-src/ext/standard/php_string.h Wed Dec 10 16:23:35 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.82 2003/12/10 07:15:28 moriyoshi Exp $ */ +/* $Id: php_string.h,v 1.83 2003/12/10 21:23:35 iliaa Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -122,7 +122,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what, int wlength TSRMLS_DC); PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC); PHPAPI void php_stripcslashes(char *str, int *len); -PHPAPI vo
[PHP-CVS] cvs: php-src /ext/standard html.c
derick Wed Dec 10 16:02:34 2003 EDT Modified files: /php-src/ext/standard html.c Log: - Test before commit - test before commit Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.92 php-src/ext/standard/html.c:1.93 --- php-src/ext/standard/html.c:1.92Wed Dec 10 13:17:23 2003 +++ php-src/ext/standard/html.c Wed Dec 10 16:02:33 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.92 2003/12/10 18:17:23 derick Exp $ */ +/* $Id: html.c,v 1.93 2003/12/10 21:02:33 derick Exp $ */ /* * HTML entity resources: @@ -56,7 +56,7 @@ enum entity_charset { cs_terminator, cs_8859_1, cs_cp1252, cs_8859_15, cs_utf_8, cs_big5, cs_gb2312, cs_big5hkscs, cs_sjis, cs_eucjp, cs_koi8r, - cs_cp1251, cs_8859_5, cs_cp866 + cs_cp1251, cs_8859_5, cs_cp866, cs_macroman }; typedef const char *entity_table_t; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
moriyoshi Wed Dec 10 14:02:36 2003 EDT Modified files: /php-srcNEWS Log: oops. Index: php-src/NEWS diff -u php-src/NEWS:1.1528 php-src/NEWS:1.1529 --- php-src/NEWS:1.1528 Wed Dec 10 14:01:52 2003 +++ php-src/NEWSWed Dec 10 14:02:34 2003 @@ -7,7 +7,8 @@ . ext/db (Jani, Derick) . ext/mcal (Jani, Derick) . ext/qtdom (Jani, Derick) -- Added support for MacRoman encoding to htmlentities(). (Marcus Bointon) +- Added support for MacRoman encoding to htmlentities(). + (Derick, Marcus Bointon) - Added possibility to call PHP functions as XSLT-functions. (Christian) - Added possibility to prevent PHP from registering variables when input filter support is used. (Derick) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
moriyoshi Wed Dec 10 14:01:54 2003 EDT Modified files: /php-srcNEWS Log: NFN Index: php-src/NEWS diff -u php-src/NEWS:1.1527 php-src/NEWS:1.1528 --- php-src/NEWS:1.1527 Mon Dec 8 05:12:42 2003 +++ php-src/NEWSWed Dec 10 14:01:52 2003 @@ -7,6 +7,7 @@ . ext/db (Jani, Derick) . ext/mcal (Jani, Derick) . ext/qtdom (Jani, Derick) +- Added support for MacRoman encoding to htmlentities(). (Marcus Bointon) - Added possibility to call PHP functions as XSLT-functions. (Christian) - Added possibility to prevent PHP from registering variables when input filter support is used. (Derick) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sqlite sqlite.c /ext/sqlite/tests sqlite_oo_027.phpt
iliaa Wed Dec 10 13:56:06 2003 EDT Added files: /php-src/ext/sqlite/tests sqlite_oo_027.phpt Modified files: /php-src/ext/sqlite sqlite.c Log: The changes() method should be that of the database object not that of a result. Added a test case for this bug. Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.102 php-src/ext/sqlite/sqlite.c:1.103 --- php-src/ext/sqlite/sqlite.c:1.102 Tue Dec 9 20:02:19 2003 +++ php-src/ext/sqlite/sqlite.c Wed Dec 10 13:56:04 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +--+ - $Id: sqlite.c,v 1.102 2003/12/10 01:02:19 iliaa Exp $ + $Id: sqlite.c,v 1.103 2003/12/10 18:56:04 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -206,6 +206,7 @@ PHP_ME_MAPPING(single_query, sqlite_single_query, NULL) PHP_ME_MAPPING(unbuffered_query, sqlite_unbuffered_query, NULL) PHP_ME_MAPPING(last_insert_rowid, sqlite_last_insert_rowid, NULL) + PHP_ME_MAPPING(changes, sqlite_changes, NULL) PHP_ME_MAPPING(create_aggregate, sqlite_create_aggregate, NULL) PHP_ME_MAPPING(create_function, sqlite_create_function, NULL) PHP_ME_MAPPING(busy_timeout, sqlite_busy_timeout, NULL) @@ -221,7 +222,6 @@ PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL) PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL) PHP_ME_MAPPING(column, sqlite_column, NULL) - PHP_ME_MAPPING(changes, sqlite_changes, NULL) PHP_ME_MAPPING(num_fields, sqlite_num_fields, NULL) PHP_ME_MAPPING(field_name, sqlite_field_name, NULL) /* spl_forward */ @@ -244,7 +244,6 @@ PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL) PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL) PHP_ME_MAPPING(column, sqlite_column, NULL) - PHP_ME_MAPPING(changes, sqlite_changes, NULL) PHP_ME_MAPPING(num_fields, sqlite_num_fields, NULL) PHP_ME_MAPPING(field_name, sqlite_field_name, NULL) /* spl_forward */ @@ -1072,7 +1071,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.102 2003/12/10 01:02:19 iliaa Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.103 2003/12/10 18:56:04 iliaa Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); Index: php-src/ext/sqlite/tests/sqlite_oo_027.phpt +++ php-src/ext/sqlite/tests/sqlite_oo_027.phpt --TEST-- sqlite-oo: changes --INI-- sqlite.assoc_case=0 --SKIPIF-- --FILE-- query("CREATE TABLE strings(a VARCHAR)"); foreach ($data as $str) { $db->query("INSERT INTO strings VALUES('$str')"); echo $db->changes() . "\n"; } $db->query("UPDATE strings SET a='foo' WHERE a!='two'"); echo $db->changes() . "\n"; $db->query("DELETE FROM strings WHERE 1"); echo $db->changes() . "\n"; $str = ''; foreach ($data as $s) { $str .= "INSERT INTO strings VALUES('".$s."');"; } $db->query($str); echo $db->changes() . "\n"; ?> --EXPECT-- 1 1 1 2 3 3 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard html.c
derick Wed Dec 10 13:17:24 2003 EDT Modified files: /php-src/ext/standard html.c Log: - Added support for MacRoman encoding to htmlentities(). (Marcus Bointon) Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.91 php-src/ext/standard/html.c:1.92 --- php-src/ext/standard/html.c:1.91Mon Oct 20 21:46:54 2003 +++ php-src/ext/standard/html.c Wed Dec 10 13:17:23 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.91 2003/10/21 01:46:54 moriyoshi Exp $ */ +/* $Id: html.c,v 1.92 2003/12/10 18:17:23 derick Exp $ */ /* * HTML entity resources: @@ -340,6 +340,47 @@ "#160" }; +/* MacRoman has a couple of low-ascii chars that need mapping too */ +/* Vertical tab (ASCII 11) is often used to store line breaks inside */ +/* DB exports, this mapping changes it to a space */ +static entity_table_t ent_macroman[] = { + "sp", NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, "quot", NULL, + NULL, NULL, "amp", NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, "lt", NULL, "gt", NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, "Auml", "Aring", "Ccedil", "Eacute", "Ntilde", "Ouml", + "Uuml", "aacute", "agrave", "acirc", "auml", "atilde", "aring", + "ccedil", "eacute", "egrave", "ecirc", "euml", "iacute", "igrave", + "icirc", "iuml", "ntilde", "oacute", "ograve", "ocirc", "ouml", + "otilde", "uacute", "ugrave", "ucirc", "uuml", "dagger", "deg", + "cent", "pound", "sect", "bull", "para", "szlig", "reg", + "copy", "trade", "acute", "uml", "ne", "AElig", "Oslash", + "infin", "plusmn", "le", "ge", "yen", "micro", "part", + "sum", "prod", "pi", "int", "ordf", "ordm", "Omega", + "aelig", "oslash", "iquest", "iexcl", "not", "radic", "fnof", + "asymp", "#8710", "laquo", "raquo", "hellip", "nbsp", "Agrave", + "Atilde", "Otilde", "OElig", "oelig", "ndash", "mdash", "ldquo", + "rdquo", "lsquo", "rsquo", "divide", "loz", "yuml", "Yuml", + "frasl", "euro", "lsaquo", "rsaquo", "#xFB01", "#xFB02", "Dagger", + "middot", "sbquo", "bdquo", "permil", "Acirc", "Ecirc", "Aacute", + "Euml", "Egrave", "Iacute", "Icirc", "Iuml", "Igrave", "Oacute", + "Ocirc", "#xF8FF", "Ograve", "Uacute", "Ucirc", "Ugrave", "#305", + "circ", "tilde", "macr", "#728", "#729", "#730", "cedil", + "#733", "#731", "#711" +}; struct html_entity_map { enum entity_charset charset;/* charset identifier */ @@ -372,6 +413,7 @@ { cs_cp1251,0x80, 0xff, ent_cp_1251 }, { cs_8859_5,0xc0, 0xff, ent_iso_8859_5 }, { cs_cp866, 0xc0, 0xff, ent_cp_866 }, + { cs_macroman, 0x0b, 0xff, ent_macroman }, { cs_terminator } }; @@ -408,6 +450,7 @@ { "cp866", cs_cp866 }, { "866",cs_cp866 }, { "ibm866", cs_cp866 }, + { "MacRoman", cs_macroman }, { NULL } }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring mbstring.c
moriyoshi Wed Dec 10 12:44:13 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring mbstring.c Log: Eliminate compiler warnings. Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.142.2.40 php-src/ext/mbstring/mbstring.c:1.142.2.41 --- php-src/ext/mbstring/mbstring.c:1.142.2.40 Wed Dec 10 12:36:05 2003 +++ php-src/ext/mbstring/mbstring.c Wed Dec 10 12:44:12 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.142.2.40 2003/12/10 17:36:05 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.142.2.41 2003/12/10 17:44:12 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -1755,7 +1755,8 @@ { pval **arg_str, **arg_array, *track_vars_array; char *var, *val, *encstr, *strtok_buf, **str_list, *separator; - int n, num, val_len, *len_list, *elist, elistsz, old_rg, argc; + int n, num, val_len, *len_list, elistsz, old_rg, argc; + enum mbfl_no_encoding *elist; enum mbfl_no_encoding from_encoding, to_encoding; mbfl_string string, resvar, resval; mbfl_encoding_detector *identd; @@ -2573,7 +2574,8 @@ mbfl_string string, result, *ret = NULL; enum mbfl_no_encoding from_encoding, to_encoding; mbfl_buffer_converter *convd; - int size, *list; + int size; + enum mbfl_no_encoding *list; char *output=NULL; if (output_len) { @@ -2804,7 +2806,8 @@ mbfl_string string; const char *ret; enum mbfl_no_encoding *elist; - int size, *list, strict = 0; + int size, strict = 0; + enum mbfl_no_encoding *list; if (ZEND_NUM_ARGS() == 1) { if (zend_get_parameters_ex(1, &arg_str) == FAILURE) { @@ -3093,7 +3096,8 @@ enum mbfl_no_encoding from_encoding, to_encoding; mbfl_encoding_detector *identd; mbfl_buffer_converter *convd; - int n, argc, stack_level, stack_max, *elist, elistsz; + int n, argc, stack_level, stack_max, elistsz; + enum mbfl_no_encoding *elist; char *name; void *ptmp; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c
moriyoshi Wed Dec 10 12:38:46 2003 EDT Modified files: /php-src/ext/mbstring mbstring.c Log: Eliminate compiler warnings. Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.204 php-src/ext/mbstring/mbstring.c:1.205 --- php-src/ext/mbstring/mbstring.c:1.204 Tue Nov 11 12:35:32 2003 +++ php-src/ext/mbstring/mbstring.c Wed Dec 10 12:38:45 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.204 2003/11/11 17:35:32 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.205 2003/12/10 17:38:45 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -331,7 +331,7 @@ } size = n + identify_list_size; /* make list */ - list = (int *)pecalloc(size, sizeof(int), persistent); + list = (enum mbfl_no_encoding *)pecalloc(size, sizeof(int), persistent); if (list != NULL) { entry = list; n = 0; @@ -439,7 +439,7 @@ zend_hash_internal_pointer_reset(target_hash); i = zend_hash_num_elements(target_hash); size = i + identify_list_size; - list = (int *)pecalloc(size, sizeof(int), persistent); + list = (enum mbfl_no_encoding *)pecalloc(size, sizeof(int), persistent); if (list != NULL) { entry = list; bauto = 0; @@ -540,7 +540,8 @@ /* {{{ static PHP_INI_MH(OnUpdate_mbstring_detect_order) */ static PHP_INI_MH(OnUpdate_mbstring_detect_order) { - int *list, size; + enum mbfl_no_encoding *list; + int size; if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { if (MBSTRG(detect_order_list) != NULL) { @@ -559,7 +560,8 @@ /* {{{ static PHP_INI_MH(OnUpdate_mbstring_http_input) */ static PHP_INI_MH(OnUpdate_mbstring_http_input) { - int *list, size; + enum mbfl_no_encoding *list; + int size; if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { if (MBSTRG(http_input_list) != NULL) { @@ -827,7 +829,8 @@ /* {{{ PHP_RINIT_FUNCTION(mbstring) */ PHP_RINIT_FUNCTION(mbstring) { - int n, *list=NULL, *entry; + int n; + enum mbfl_no_encoding *list=NULL, *entry; zend_function *func, *orig; const struct mb_overload_def *p; @@ -884,7 +887,7 @@ list = MBSTRG(default_detect_order_list); n = MBSTRG(default_detect_order_list_size); } - entry = (int *)safe_emalloc(n, sizeof(int), 0); + entry = (enum mbfl_no_encoding *)safe_emalloc(n, sizeof(int), 0); MBSTRG(current_detect_order_list) = entry; MBSTRG(current_detect_order_list_size) = n; while (n > 0) { @@ -1069,8 +1072,9 @@ { char *typ = NULL; int typ_len; - int retname, n, *entry; + int retname, n; char *name, *list, *temp; + enum mbfl_no_encoding *entry; enum mbfl_no_encoding result = mbfl_no_encoding_invalid; retname = 1; @@ -1194,7 +1198,8 @@ PHP_FUNCTION(mb_detect_order) { zval **arg1; - int n, size, *list, *entry; + int n, size; + enum mbfl_no_encoding *list, *entry; char *name; if (ZEND_NUM_ARGS() == 0) { @@ -2426,7 +2431,8 @@ enum mbfl_no_encoding from_encoding, to_encoding; mbfl_encoding_detector *identd; mbfl_buffer_converter *convd; - int n, argc, stack_level, stack_max, *elist, elistsz; + int n, argc, stack_level, stack_max, elistsz; + enum mbfl_no_encoding *elist; char *name; void *ptmp; @@ -3398,7 +3404,8 @@ enum mbfl_no_encoding encoding = mbfl_no_encoding_invalid; mbfl_encoding_detector *identd = NULL; - int size, *list; + int size; + enum mbfl_no_encoding *list; if (MBSTRG(http_input_list_size) == 1 && MBSTRG(http_input_list)[0] == mbfl_no_encoding_pass) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring mbstring.c
moriyoshi Wed Dec 10 12:36:07 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring mbstring.c Log: Eliminate compiler warnings. Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.142.2.39 php-src/ext/mbstring/mbstring.c:1.142.2.40 --- php-src/ext/mbstring/mbstring.c:1.142.2.39 Tue Nov 11 17:18:24 2003 +++ php-src/ext/mbstring/mbstring.c Wed Dec 10 12:36:05 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.142.2.39 2003/11/11 22:18:24 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.142.2.40 2003/12/10 17:36:05 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -405,7 +405,7 @@ } size = n + identify_list_size; /* make list */ - list = (int *)pecalloc(size, sizeof(int), persistent); + list = (enum mbfl_no_encoding *)pecalloc(size, sizeof(int), persistent); if (list != NULL) { entry = list; n = 0; @@ -513,7 +513,7 @@ zend_hash_internal_pointer_reset(target_hash); i = zend_hash_num_elements(target_hash); size = i + identify_list_size; - list = (int *)pecalloc(size, sizeof(int), persistent); + list = (enum mbfl_no_encoding *)pecalloc(size, sizeof(int), persistent); if (list != NULL) { entry = list; bauto = 0; @@ -624,7 +624,8 @@ /* {{{ static PHP_INI_MH(OnUpdate_mbstring_detect_order) */ static PHP_INI_MH(OnUpdate_mbstring_detect_order) { - int *list, size; + enum mbfl_no_encoding *list; + int size; if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { if (MBSTRG(detect_order_list) != NULL) { @@ -643,7 +644,8 @@ /* {{{ static PHP_INI_MH(OnUpdate_mbstring_http_input) */ static PHP_INI_MH(OnUpdate_mbstring_http_input) { - int *list, size; + enum mbfl_no_encoding *list; + int size; if (php_mb_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) { if (MBSTRG(http_input_list) != NULL) { @@ -939,7 +941,8 @@ /* {{{ PHP_RINIT_FUNCTION(mbstring) */ PHP_RINIT_FUNCTION(mbstring) { - int n, *list=NULL, *entry; + int n; + enum mbfl_no_encoding *list=NULL, *entry; zend_function *func, *orig; const struct mb_overload_def *p; @@ -996,7 +999,7 @@ list = MBSTRG(default_detect_order_list); n = MBSTRG(default_detect_order_list_size); } - entry = (int *)safe_emalloc(n, sizeof(int), 0); + entry = (enum mbfl_no_encoding *)safe_emalloc(n, sizeof(int), 0); MBSTRG(current_detect_order_list) = entry; MBSTRG(current_detect_order_list_size) = n; while (n > 0) { @@ -1201,7 +1204,8 @@ PHP_FUNCTION(mb_http_input) { pval **arg1; - int result=0, retname, n, *entry; + int result=0, retname, n; + enum mbfl_no_encoding *entry; char *name, *list, *temp; retname = 1; @@ -1326,7 +1330,8 @@ PHP_FUNCTION(mb_detect_order) { pval **arg1; - int n, size, *list, *entry; + int n, size; + enum mbfl_no_encoding *list, *entry; char *name; if (ZEND_NUM_ARGS() == 0) { @@ -1467,8 +1472,8 @@ char *var, *val, *s1, *s2; char *strtok_buf = NULL, **val_list; zval *array_ptr = (zval *) arg; - int n, num, val_len, *len_list, *elist, elistsz; - enum mbfl_no_encoding from_encoding, to_encoding; + int n, num, val_len, *len_list, elistsz; + enum mbfl_no_encoding from_encoding, to_encoding, *elist; mbfl_string string, resvar, resval; mbfl_encoding_detector *identd = NULL; mbfl_buffer_converter *convd = NULL; @@ -3792,7 +3797,8 @@ enum mbfl_no_encoding encoding = mbfl_no_encoding_invalid; mbfl_encoding_detector *identd = NULL; - int size, *list; + int size; + enum mbfl_no_encoding *list; if (MBSTRG(http_input_list_size) == 1 && MBSTRG(http_input_list)[0] == mbfl_no_encoding_pass) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring mbstring.dsp
moriyoshi Wed Dec 10 12:26:24 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring mbstring.dsp Log: DOS line endings... Index: php-src/ext/mbstring/mbstring.dsp diff -u php-src/ext/mbstring/mbstring.dsp:1.12.2.4 php-src/ext/mbstring/mbstring.dsp:1.12.2.5 --- php-src/ext/mbstring/mbstring.dsp:1.12.2.4 Wed Dec 10 12:25:40 2003 +++ php-src/ext/mbstring/mbstring.dsp Wed Dec 10 12:26:24 2003 @@ -1,804 +1,804 @@ -# Microsoft Developer Studio Project File - Name="mbstring" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=mbstring - Win32 Debug_TS -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "mbstring.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mbstring.mak" CFG="mbstring - Win32 Debug_TS" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mbstring - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "mbstring - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mbstring - Win32 Release_TS" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "mbstring___Win32_Release_TS" -# PROP BASE Intermediate_Dir "mbstring___Win32_Release_TS" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release_TS" -# PROP Intermediate_Dir "Release_TS" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MBSTRING_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "libmbfl" /I "libmbfl\mbfl" /I "mbregex" /D ZEND_DEBUG=0 /D "_MBCS" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MBSTRING" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_CONFIG_H=1 /D MBFL_DLL_EXPORT=1 /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 php4ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_mbstring.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" - -!ELSEIF "$(CFG)" == "mbstring - Win32 Debug_TS" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "mbstring___Win32_Debug_TS" -# PROP BASE Intermediate_Dir "mbstring___Win32_Debug_TS" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "mbstring___Win32_Debug_TS" -# PROP Intermediate_Dir "mbstring___Win32_Debug_TS" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MBSTRING_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "libmbfl" /I "libmbfl\mbfl" /I "mbregex" /D ZEND_DEBUG=1 /D "MBSTRING_EXPORTS" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MBSTRING" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_CONFIG_H=1 /D MBFL_DLL_EXPORT=1 /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 php4ts_debug.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_mbstring.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" - -!ENDIF - -#
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring mbstring.dsp
moriyoshi Wed Dec 10 12:25:44 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring mbstring.dsp Log: Fix win32 build. Index: php-src/ext/mbstring/mbstring.dsp diff -u php-src/ext/mbstring/mbstring.dsp:1.12.2.3 php-src/ext/mbstring/mbstring.dsp:1.12.2.4 --- php-src/ext/mbstring/mbstring.dsp:1.12.2.3 Sat Oct 25 08:41:54 2003 +++ php-src/ext/mbstring/mbstring.dsp Wed Dec 10 12:25:40 2003 @@ -1,804 +1,804 @@ -# Microsoft Developer Studio Project File - Name="mbstring" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=mbstring - Win32 Debug_TS -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "mbstring.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mbstring.mak" CFG="mbstring - Win32 Debug_TS" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mbstring - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "mbstring - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mbstring - Win32 Release_TS" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "mbstring___Win32_Release_TS" -# PROP BASE Intermediate_Dir "mbstring___Win32_Release_TS" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release_TS" -# PROP Intermediate_Dir "Release_TS" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MBSTRING_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "libmbfl" /I "libmbfl\mbfl" /I "mbregex" /D ZEND_DEBUG=0 /D "_MBCS" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MBSTRING" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_MBSTR_CN=1 /D HAVE_MBSTR_JA=1 /D HAVE_MBSTR_KR=1 /D HAVE_MBSTR_RU=1 /D HAVE_MBSTR_TW=1 /FR /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 php4ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_mbstring.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" - -!ELSEIF "$(CFG)" == "mbstring - Win32 Debug_TS" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "mbstring___Win32_Debug_TS" -# PROP BASE Intermediate_Dir "mbstring___Win32_Debug_TS" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "mbstring___Win32_Debug_TS" -# PROP Intermediate_Dir "mbstring___Win32_Debug_TS" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MBSTRING_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "libmbfl" /I "libmbfl\mbfl" /I "mbregex" /D ZEND_DEBUG=1 /D "MBSTRING_EXPORTS" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MBSTRING" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D MBSTRING_EXPORTS=1 /D HAVE_MBSTRING=1 /D HAVE_MBREGEX=1 /D HAVE_MBSTR_CN=1 /D HAVE_MBSTR_JA=1 /D HAVE_MBSTR_KR=1 /D HAVE_MBSTR_RU=1 /D HAVE_MBSTR_TW=1 /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 php4ts_debug.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring/libmbfl/filters mbfilter_htmlent.c
moriyoshi Wed Dec 10 12:10:06 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring/libmbfl/filters mbfilter_htmlent.c Log: MFH(1.4): Remove leftover Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.3.2.1 php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.3.2.2 --- php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.3.2.1 Sat Oct 25 07:58:42 2003 +++ php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c Wed Dec 10 12:10:05 2003 @@ -27,8 +27,6 @@ * */ -#include "php.h" - #ifdef HAVE_CONFIG_H #include "config.h" #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/libmbfl/filters mbfilter_htmlent.c
moriyoshi Wed Dec 10 12:09:16 2003 EDT Modified files: /php-src/ext/mbstring/libmbfl/filters mbfilter_htmlent.c Log: Remove leftover Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.3 php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.4 --- php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.3 Mon Sep 22 22:42:46 2003 +++ php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c Wed Dec 10 12:09:14 2003 @@ -27,8 +27,6 @@ * */ -#include "php.h" - #ifdef HAVE_CONFIG_H #include "config.h" #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard parsedate.y
sniper Wed Dec 10 09:09:46 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard parsedate.y /php-srcNEWS Log: MFH: Fixed bug #26565 (strtotime("this month") resolving to the wrong month) Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.34.2.4 php-src/ext/standard/parsedate.y:1.34.2.5 --- php-src/ext/standard/parsedate.y:1.34.2.4 Wed Nov 19 11:22:10 2003 +++ php-src/ext/standard/parsedate.yWed Dec 10 09:09:42 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.34.2.4 2003/11/19 16:22:10 hholzgra Exp $ */ +/* $Id: parsedate.y,v 1.34.2.5 2003/12/10 14:09:42 sniper Exp $ */ #include "php.h" @@ -513,7 +513,7 @@ { "today", tDAY_UNIT, 0 }, { "now", tDAY_UNIT, 0 }, { "last", tUNUMBER, -1 }, -{ "this", tMINUTE_UNIT, 0 }, +{ "this", tUNUMBER, 0 }, { "next", tUNUMBER, 2 }, { "first", tUNUMBER, 1 }, /* { "second",tUNUMBER, 2 }, */ Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.495 php-src/NEWS:1.1247.2.496 --- php-src/NEWS:1.1247.2.495 Tue Dec 9 15:33:21 2003 +++ php-src/NEWSWed Dec 10 09:09:44 2003 @@ -5,6 +5,8 @@ (Jani) - Fixed header handler in NSAPI SAPI module (header->replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) +- Fixed bug #26565 (strtotime("this month") resolving to the wrong month). + (Jani) - Fixed bug #26564 (ncurses5 has headers in PREFIX/include/ncurses/). (Jani) - Fixed bug #26548 (ext/session: Malformed HTTP dates headers). (Derick) - Fixed bug #26531 (ext/domxml: get_elements_by_tag_name() wildcard fails). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
sniper Wed Dec 10 09:08:08 2003 EDT Modified files: /php-src/ext/standard parsedate.y Log: Fixed bug #26565 (strtotime("this month") resolving to the wrong month) Index: php-src/ext/standard/parsedate.y diff -u php-src/ext/standard/parsedate.y:1.49 php-src/ext/standard/parsedate.y:1.50 --- php-src/ext/standard/parsedate.y:1.49 Mon Dec 8 17:22:57 2003 +++ php-src/ext/standard/parsedate.yWed Dec 10 09:08:06 2003 @@ -8,7 +8,7 @@ ** This code is in the public domain and has no copyright. */ -/* $Id: parsedate.y,v 1.49 2003/12/08 22:22:57 hholzgra Exp $ */ +/* $Id: parsedate.y,v 1.50 2003/12/10 14:08:06 sniper Exp $ */ #include "php.h" @@ -568,7 +568,7 @@ { "today", tDAY_UNIT, 0 }, { "now", tDAY_UNIT, 0 }, { "last", tUNUMBER, -1 }, -{ "this", tMINUTE_UNIT, 0 }, +{ "this", tUNUMBER, 0 }, { "next", tUNUMBER, 2 }, { "first", tUNUMBER, 1 }, /* { "second",tUNUMBER, 2 }, */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
georg Wed Dec 10 05:06:08 2003 EDT Modified files: /php-src/ext/mysqli mysqli.c Log: freeing result and stmt properties in MSHUTDOWN Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.20 php-src/ext/mysqli/mysqli.c:1.21 --- php-src/ext/mysqli/mysqli.c:1.20Mon Nov 24 06:31:26 2003 +++ php-src/ext/mysqli/mysqli.c Wed Dec 10 05:06:07 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]>| +--+ - $Id: mysqli.c,v 1.20 2003/11/24 11:31:26 georg Exp $ + $Id: mysqli.c,v 1.21 2003/12/10 10:06:07 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -343,9 +343,6 @@ mysqli_object_handlers.read_property = mysqli_read_property; mysqli_object_handlers.write_property = mysqli_write_property; mysqli_object_handlers.get_property_ptr_ptr = NULL; -// mysqli_object_handlers.call_method = php_mysqli_connect; - -/* todo: call method */ zend_hash_init(&classes, 0, NULL, NULL, 1); @@ -464,6 +461,8 @@ PHP_MSHUTDOWN_FUNCTION(mysqli) { zend_hash_destroy(&mysqli_link_properties); + zend_hash_destroy(&mysqli_result_properties); + zend_hash_destroy(&mysqli_stmt_properties); zend_hash_destroy(&classes); UNREGISTER_INI_ENTRIES(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard ftp_fopen_wrapper.c php_string.h string.c
moriyoshi Wed Dec 10 02:15:29 2003 EDT Modified files: /php-src/ext/standard ftp_fopen_wrapper.c php_string.h string.c Log: Fix bug #26574 (basename() doesn't work properly with multibyte characters) Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.66 php-src/ext/standard/ftp_fopen_wrapper.c:1.67 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.66 Sat Nov 29 15:01:00 2003 +++ php-src/ext/standard/ftp_fopen_wrapper.cWed Dec 10 02:15:28 2003 @@ -18,7 +18,7 @@ | Sara Golemon <[EMAIL PROTECTED]> | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.66 2003/11/29 20:01:00 pollita Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.67 2003/12/10 07:15:28 moriyoshi Exp $ */ #include "php.h" #include "php_globals.h" @@ -562,7 +562,7 @@ php_stream *innerstream = (php_stream *)stream->abstract; size_t tmp_len; char *basename; - int basename_len; + size_t basename_len; if (count != sizeof(php_stream_dirent)) { return 0; @@ -586,8 +586,9 @@ return 0; } - memcpy(ent->d_name, basename, MIN((int)sizeof(ent->d_name), basename_len)-1); - ent->d_name[sizeof(ent->d_name)-1] = '\0'; + tmp_len = MIN(sizeof(ent->d_name), basename_len) - 1; + memcpy(ent->d_name, basename, tmp_len); + ent->d_name[tmp_len] = '\0'; efree(basename); return sizeof(php_stream_dirent); Index: php-src/ext/standard/php_string.h diff -u php-src/ext/standard/php_string.h:1.81 php-src/ext/standard/php_string.h:1.82 --- php-src/ext/standard/php_string.h:1.81 Wed Dec 10 01:08:39 2003 +++ php-src/ext/standard/php_string.h Wed Dec 10 02:15:28 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.81 2003/12/10 06:08:39 moriyoshi Exp $ */ +/* $Id: php_string.h,v 1.82 2003/12/10 07:15:28 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -122,7 +122,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what, int wlength TSRMLS_DC); PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC); PHPAPI void php_stripcslashes(char *str, int *len); -PHPAPI void php_basename(char *str, size_t len , char *suffix, size_t sufflen, char **p_ret, int *p_len); +PHPAPI void php_basename(char *str, size_t len , char *suffix, size_t sufflen, char **p_ret, size_t *p_len); PHPAPI size_t php_dirname(char *str, size_t len); PHPAPI char *php_stristr(unsigned char *s, unsigned char *t, size_t s_len, size_t t_len); PHPAPI char *php_str_to_str_ex(char *haystack, int length, char *needle, Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.405 php-src/ext/standard/string.c:1.406 --- php-src/ext/standard/string.c:1.405 Wed Dec 10 01:04:15 2003 +++ php-src/ext/standard/string.c Wed Dec 10 02:15:28 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.405 2003/12/10 06:04:15 moriyoshi Exp $ */ +/* $Id: string.c,v 1.406 2003/12/10 07:15:28 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1068,56 +1068,69 @@ /* {{{ php_basename */ -PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, int *p_len) +PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len) { - char *ret=NULL, *c; - c = s + len - 1; - - /* strip trailing slashes */ - while (*c == '/' + char *ret = NULL, *c, *comp, *cend; + size_t inc_len, cnt; + int state; + + c = comp = cend = s; + cnt = len; + state = 0; + while (cnt > 0) { + inc_len = (*c == '\0' ? 1: php_mblen(c, cnt)); + + switch (inc_len) { + case -2: + case -1: + inc_len = 1; + php_mblen(NULL, 0); + break; + case 0: + goto quit_loop; + case 1: #ifdef PHP_WIN32 - || (*c == '\\' && !IsDBCSLeadByte(*(c-1))) + if (*c == '/' || *c == '\\') { +#else + if (*c == '/') { #endif - ) { - c--; - len--; + if (state == 1) { + state = 0; + cend = c; + } + } else { + if (state == 0) { +