cvs: php4 /ext/standard array.c basic_functions.c url_scanner.c /ext/wddx wddx.c
| From: | Zeev Suraski | Date: | Tue, 19 Sep 2000 17:37:35 +0000 |
| Subject: | cvs: php4 /ext/standard array.c basic_functions.c url_scanner.c /ext/wddx wddx.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1783@lists.php.net to get a copy of this message | ||
zeev Tue Sep 19 10:37:35 2000 EDT
Modified files:
/php4/ext/standard array.c basic_functions.c url_scanner.c
/php4/ext/wddx wddx.c
Log:
- Fix warnings
- Fix URL scanner startup crash
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.73 php4/ext/standard/array.c:1.74
--- php4/ext/standard/array.c:1.73 Tue Sep 12 12:04:50 2000
+++ php4/ext/standard/array.c Tue Sep 19 10:37:32 2000
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.73 2000/09/12 19:04:50 andrei Exp $ */
+/* $Id: array.c,v 1.74 2000/09/19 17:37:32 zeev Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -2017,7 +2017,7 @@
if (ZEND_NUM_ARGS() > 1) {
convert_to_boolean_ex(z_preserve_keys);
- preserve_keys = Z_LVAL_PP(z_preserve_keys);
+ preserve_keys = (zend_bool) Z_LVAL_PP(z_preserve_keys);
}
/* Initialize return array */
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.259 php4/ext/standard/basic_functions.c:1.260
--- php4/ext/standard/basic_functions.c:1.259 Tue Sep 19 10:32:27 2000
+++ php4/ext/standard/basic_functions.c Tue Sep 19 10:37:33 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.259 2000/09/19 17:32:27 sas Exp $ */
+/* $Id: basic_functions.c,v 1.260 2000/09/19 17:37:33 zeev Exp $ */
#include "php.h"
#include "php_main.h"
@@ -26,6 +26,7 @@
#include "php_standard.h"
#include "php_math.h"
#include "ext/standard/info.h"
+#include "ext/standard/url_scanner.h"
#include "zend_operators.h"
#include <stdarg.h>
#include <stdlib.h>
@@ -645,6 +646,11 @@
BG(user_tick_functions) = NULL;
zend_hash_init(&BG(sm_protected_env_vars), 5, NULL, NULL, 1);
BG(sm_allowed_env_vars) = NULL;
+
+#ifdef TRANS_SID
+ memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state)));
+#endif
+
#ifdef PHP_WIN32
CoInitialize(NULL);
#endif
Index: php4/ext/standard/url_scanner.c
diff -u php4/ext/standard/url_scanner.c:1.26 php4/ext/standard/url_scanner.c:1.27
--- php4/ext/standard/url_scanner.c:1.26 Tue Sep 19 10:21:26 2000
+++ php4/ext/standard/url_scanner.c Tue Sep 19 10:37:34 2000
@@ -16,7 +16,7 @@
| Hartmut Holzgraefe <hartmut@six.de> |
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner.c,v 1.26 2000/09/19 17:21:26 sas Exp $ */
+/* $Id: url_scanner.c,v 1.27 2000/09/19 17:37:34 zeev Exp $ */
#include "php.h"
@@ -35,22 +35,26 @@
#define BUFSIZE 256
#endif
-PHP_RINIT_FUNCTION(url_scanner) {
+PHP_RINIT_FUNCTION(url_scanner)
+{
url_adapt(NULL,0,NULL,NULL);
return SUCCESS;
}
+
-PHP_RSHUTDOWN_FUNCTION(url_scanner) {
+PHP_RSHUTDOWN_FUNCTION(url_scanner)
+{
url_adapt(NULL,0,NULL,NULL);
return SUCCESS;
}
-static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf) {
+static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf)
+{
int flag = 0;
PLS_FETCH();
- if(!strcasecmp(tag,"a")&&!strcasecmp(attr,"href")) {
+ if(!strcasecmp(tag,"a") && !strcasecmp(attr,"href")) {
flag = 1;
} else if(!strcasecmp(tag,"area" ) && !strcasecmp(attr,"href" )) {
flag = 1;
@@ -100,9 +104,9 @@
if(src==NULL) {
US.state=STATE_NORMAL;
- if(US.tag) {efree(US.tag); US.tag =NULL; }
- if(US.attr) {efree(US.attr); US.attr=NULL; }
- if(US.val) {efree(US.val); US.val =NULL; }
+ if(US.tag) { efree(US.tag); US.tag =NULL; }
+ if(US.attr) { efree(US.attr); US.attr=NULL; }
+ if(US.val) { efree(US.val); US.val =NULL; }
return NULL;
}
Index: php4/ext/wddx/wddx.c
diff -u php4/ext/wddx/wddx.c:1.55 php4/ext/wddx/wddx.c:1.56
--- php4/ext/wddx/wddx.c:1.55 Wed Sep 13 13:58:19 2000
+++ php4/ext/wddx/wddx.c Tue Sep 19 10:37:34 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx.c,v 1.55 2000/09/13 20:58:19 andrei Exp $ */
+/* $Id: wddx.c,v 1.56 2000/09/19 17:37:34 zeev Exp $ */
#include "php.h"
#include "php_wddx.h"
@@ -39,6 +39,7 @@
#include "ext/xml/php_xml.h"
#include "ext/standard/php_incomplete_class.h"
#include "ext/standard/base64.h"
+#include "ext/standard/info.h"
#define WDDX_BUF_LEN 256
#define PHP_CLASS_NAME_VAR "php_class_name"
@@ -241,6 +242,7 @@
return SUCCESS;
}
/* }}} */
+
PHP_MINFO_FUNCTION(wddx)
{