This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/include/error.h

23 lines
458 B
C

#ifndef ERROR_H_
#include <stdio.h>
#define ERR(ret,msg) \
do { fputs(PROGN ": " msg "\n", stderr); return (ret); } while (0)
#define ERRFMT(ret,fmt,...) \
do { fprintf(stderr, PROGN ": " fmt "\n", __VA_ARGS__); return (ret); } while (0)
#define PERROR(ret) \
do { perror(PROGN); return (ret); } while (0)
#define ERRMSG(msg) \
fputs(msg "\n", stderr)
#define DB_ERROR 100
#define IRC_ERROR 101
#define CREDS_ERROR 102
#define ERROR_H_
#endif