cvs: pecl /htscanner htscanner.c
| From: | Pierre-Alain Joye | Date: | Fri, 08 Dec 2006 00:59:14 +0000 |
| Subject: | cvs: pecl /htscanner htscanner.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-6776@lists.php.net to get a copy of this message | ||
pajoye Fri Dec 8 00:59:14 2006 UTC
Modified files:
/pecl/htscanner htscanner.c
Log:
- remove the debug code, does not need it anymore
http://cvs.php.net/viewvc.cgi/pecl/htscanner/htscanner.c?r1=1.5&r2=1.6&diff_format=u
Index: pecl/htscanner/htscanner.c
diff -u pecl/htscanner/htscanner.c:1.5 pecl/htscanner/htscanner.c:1.6
--- pecl/htscanner/htscanner.c:1.5 Thu Dec 7 19:41:10 2006
+++ pecl/htscanner/htscanner.c Fri Dec 8 00:59:14 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: htscanner.c,v 1.5 2006/12/07 19:41:10 pajoye Exp $ */
+/* $Id: htscanner.c,v 1.6 2006/12/08 00:59:14 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -39,26 +39,24 @@
#define HTSCANNER_ENABLE_CACHE 1
#if HTSCANNER_DEBUG
-/* {{{ debug */
-static void debug(char *format, ...) {
- char output_buf[512];
- va_list args;
- char *debug;
-
- debug = getenv("PHP_HTSCANNER_DEBUG");
- if (debug == NULL)
- return;
-
- va_start (args, format);
- vsnprintf (output_buf, sizeof (output_buf), format, args);
- va_end (args);
-
- fputs (output_buf, stderr);
- fflush (stderr);
+static void htscanner_debug(char *format, ...) /* {{{ */
+{
+ char output_buf[512];
+ va_list args;
+ char *debug;
+
+ debug = getenv("PHP_HTSCANNER_DEBUG");
+ if (debug == NULL)
+ return;
+
+ va_start (args, format);
+ vsnprintf (output_buf, sizeof (output_buf), format, args);
+ va_end (args);
+
+ fputs (output_buf, stderr);
+ fflush (stderr);
}
/* }}} */
-#else
-#define debug
#endif
#define PHP_HTSCANNER_LTRIM(p) { \
@@ -116,7 +114,6 @@
value = "";
}
}
- debug("\tParsed: %s = %s\n", name, value);
#define _CHECK_PATH(var, ini) php_htscanner_ini_check_path(var, strlen(var), ini, sizeof(ini))
/* safe_mode & basedir check */
@@ -154,7 +151,6 @@
return;
}
#if HTSCANNER_ENABLE_CACHE
- debug("in:%s||%s||\n", name, value);
zend_hash_update(ini_entries, name, strlen(name), value, strlen(value), NULL);
#endif
}
@@ -393,10 +389,6 @@
zend_hash_init(ini_entries, 0, NULL, NULL, 1);
#endif
- debug("\nStarting request %s (%i)... \n", cwd, cwd_len);
- debug("\ndoc root %s (%i)... \n", doc_root, doc_root_len);
- debug("\ncwd %s (%i)... \n", cwd, cwd_len);
-
if (cwd != NULL && doc_root != NULL) {
size_t i, ht_len, tmp;
@@ -412,9 +404,7 @@
/* add a trailing 0 */
file[i + 1] = '\0';
strcat(file, HTG(config_file));
- debug("Going to parse: %s\n", file);
parse_config_file(file, ini_entries TSRMLS_CC);
- debug("Done parsing: %s (%d = %d)\n", file, strlen(file), tmp);
}
}
}
@@ -429,7 +419,6 @@
PHP_RSHUTDOWN_FUNCTION(htscanner) /* {{{ */
{
- debug("rshutdown\n");
return SUCCESS;
}
/* }}} */
@@ -439,7 +428,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "htscanner support", "enabled");
- php_info_print_table_row(2, "Extension Version","$Id: htscanner.c,v 1.5
2006/12/07 19:41:10 pajoye Exp $");
+ php_info_print_table_row(2, "Extension Version","$Id: htscanner.c,v 1.6
2006/12/08 00:59:14 pajoye Exp $");
php_info_print_table_row(2, "htaccess version", "0.5.0-dev");
php_info_print_table_end();