summaryrefslogtreecommitdiff
path: root/include/err.h
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-05-14 04:16:35 +0000
committerErik Andersen <andersen@codepoet.org>2000-05-14 04:16:35 +0000
commit64bc6412188b141c010ac3b8e813b837dd991e80 (patch)
treeffa12b79ea4b13191754f54b872eb1a4f9e3a04b /include/err.h
Initial revision
Diffstat (limited to 'include/err.h')
-rw-r--r--include/err.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/err.h b/include/err.h
new file mode 100644
index 000000000..5bd51ea0d
--- /dev/null
+++ b/include/err.h
@@ -0,0 +1,7 @@
+#ifndef __ERR_H__
+#define __ERR_H__
+
+#define warn(X,args...) ({char _buf[128]; sprintf(_buf, X,args); perror(_buf);})
+#define err(X,Y,args...) ({char _buf[128]; sprintf(_buf, Y,##args); perror(_buf); exit(X);})
+
+#endif /* __ERR_H__ */