summaryrefslogtreecommitdiff
path: root/diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'diag.c')
-rw-r--r--diag.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/diag.c b/diag.c
index 1650f81..d9bb5a5 100644
--- a/diag.c
+++ b/diag.c
@@ -22,6 +22,38 @@
unsigned verbose = 0;
+void fatal(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ exit(1); /* @@@ for now ... */
+}
+
+
+void error(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+}
+
+
+void warning(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ fprintf(stderr, "warning: ");
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+}
+
+
void progress(unsigned level, const char *fmt, ...)
{
va_list ap;