ref: c2ae93aefedd1cdb29d09d900b62d3127b14677f
parent: 89a06a82109d27cccbf135a4931265d8d80d46fc
author: qwx <qwx@sciops.net>
date: Fri Apr 1 00:53:44 EDT 2022
dprint: correct use of log levels
--- a/asif.h
+++ b/asif.h
@@ -99,5 +99,5 @@
};
extern int debuglevel;
-void dprint(char *, ...);
-#pragma varargck argpos dprint 1
+void dprint(int, char *, ...);
+#pragma varargck argpos dprint 2
--- a/dprint.c
+++ b/dprint.c
@@ -5,12 +5,12 @@
int debuglevel;
void
-dprint(char *fmt, ...)
+dprint(int level, char *fmt, ...)
{
char s[256];
va_list arg;
- if(debuglevel == Lognone)
+ if(level < debuglevel)
return;
va_start(arg, fmt);
vseprint(s, s+sizeof s, fmt, arg);