summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-22 16:15:23 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-22 16:15:23 +0000
commit5e8c5a4bf97b76bf1fa34f2d82352975bb35d1ab (patch)
treee145b2422b58a2fcaea218d008194eb7f1794606
parent0387eb47aae29b00a87b4abf9d0e7aacac7ace11 (diff)
downloadlasso-5e8c5a4bf97b76bf1fa34f2d82352975bb35d1ab.tar.gz
lasso-5e8c5a4bf97b76bf1fa34f2d82352975bb35d1ab.tar.xz
lasso-5e8c5a4bf97b76bf1fa34f2d82352975bb35d1ab.zip
*** empty log message ***
-rw-r--r--lasso/xml/debug.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lasso/xml/debug.c b/lasso/xml/debug.c
index dc7a1680..b65d9b49 100644
--- a/lasso/xml/debug.c
+++ b/lasso/xml/debug.c
@@ -23,6 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
@@ -38,7 +39,7 @@
int debug_line;
char debug_filename[512];
char debug_function[512];
-static const char *errorcode[4] = {
+static const char *levels[4] = {
"DEBUG:",
"INFO:",
"WARNING:",
@@ -63,12 +64,12 @@ _debug(unsigned int level,
char new_debug_string[2048];
time_t ts;
char date[20];
- char *color;
+ char *color = NULL;
va_list args;
if ((level < 0) || (level > 3)) {
- printf("DEBUG LEVEL level=%d, must be 0<=x<=3 !!!\n");
+ printf("DEBUG LEVEL level=%d, must be 0<=x<=3 !!!\n", level);
return;
}
@@ -97,7 +98,7 @@ _debug(unsigned int level,
sprintf(new_debug_string,
"%s%s%s %s (%s/%s:%d)\t%s",
color,
- errorcode[level],
+ levels[level],
normal,
date,
debug_filename, debug_function,