summaryrefslogtreecommitdiff
path: root/include/err.h
blob: 5bd51ea0d6abb2b7fecd3d8c43457804dc9e45a5 (plain)
1
2
3
4
5
6
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__ */