cvs: php4 /ext/xslt sablot.c xslt.c
| From: | Sterling Hughes | Date: | Thu, 23 Aug 2001 21:56:29 +0000 |
| Subject: | cvs: php4 /ext/xslt sablot.c xslt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7037@lists.php.net to get a copy of this message | ||
sterling Thu Aug 23 17:56:29 2001 EDT
Modified files:
/php4/ext/xslt xslt.c sablot.c
Log:
noet
Index: php4/ext/xslt/xslt.c
diff -u php4/ext/xslt/xslt.c:1.13 php4/ext/xslt/xslt.c:1.14
--- php4/ext/xslt/xslt.c:1.13 Mon Jul 30 04:24:39 2001
+++ php4/ext/xslt/xslt.c Thu Aug 23 17:56:28 2001
@@ -29,25 +29,25 @@
#include <string.h>
#include <stdarg.h>
-static int debug = 0;
+#define XSLT_DEBUG 0
/* {{{ xslt_debug()
Output a debug message if debugging is enabled */
extern void xslt_debug(char *function_name, char *format, ...)
{
- if (debug) {
- va_list argv;
- char buffer[1024];
-
- va_start(argv, format);
- vsnprintf(buffer, sizeof(buffer) - 1, format, argv);
- va_end(argv);
+#if DEBUG
+ va_list argv;
+ char buffer[1024];
+
+ va_start(argv, format);
+ vsnprintf(buffer, sizeof(buffer) - 1, format, argv);
+ va_end(argv);
- buffer[sizeof(buffer) - 1] = '\0';
+ buffer[sizeof(buffer) - 1] = '\0';
- php_printf("<b>XSLT Debug</b>: %s: %s<br>\n",
- function_name, buffer);
- }
+ php_printf("<b>XSLT Debug</b>: %s: %s<br>\n",
+ function_name, buffer);
+#endif
}
/* }}} */
@@ -58,16 +58,19 @@
char **ptr; /* Pointer to the passed char ** array */
char *return_value = NULL; /* Value to return from the function */
+ if (! argv)
+ return;
+
/* Loop through the array searching for the value */
ptr = (char **) argv;
- while (ptr && *ptr) {
+ while (*ptr) {
/* If we have a match, save the value and exit out */
if (! strcmp(*ptr, key)) {
return_value = estrdup(*ptr);
break;
}
- ptr++;
+ ++ptr;
}
return return_value;
@@ -91,7 +94,7 @@
}
*carr = emalloc(((zend_hash_num_elements(arr) * 2) + 1) * sizeof(char *));
-
+
for (zend_hash_internal_pointer_reset(arr);
zend_hash_get_current_data(arr, (void **) ¤t) == SUCCESS;
zend_hash_move_forward(arr)) {
@@ -252,6 +255,6 @@
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim600: sw=4 ts=4 tw=78 fdm=marker
- * vim<600: sw=4 ts=4 tw=78
+ * vim600: noet sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: noet sw=4 ts=4 tw=78
*/
Index: php4/ext/xslt/sablot.c
diff -u php4/ext/xslt/sablot.c:1.20 php4/ext/xslt/sablot.c:1.21
--- php4/ext/xslt/sablot.c:1.20 Thu Aug 23 17:22:37 2001
+++ php4/ext/xslt/sablot.c Thu Aug 23 17:56:28 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sablot.c,v 1.20 2001/08/23 21:22:37 sterling Exp $ */
+/* $Id: sablot.c,v 1.21 2001/08/23 21:56:28 sterling Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -128,9 +128,9 @@
/* Error handlers, automatically registered */
static MessageHandler message_handler = {
- error_makecode,
- error_log,
- error_print
+ error_makecode,
+ error_log,
+ error_print
};
/* Scheme handlers automatically registered */
@@ -1323,7 +1323,6 @@
fields++;
}
}
-
/* If no error line is given, then place none in the
file */
@@ -1560,6 +1559,6 @@
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim600: sw=4 ts=4 tw=78 fdm=marker
- * vim<600: sw=4 ts=4 tw=78
+ * vim600: noet sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: noet sw=4 ts=4 tw=78
*/