Advertisement
rfmonk

error_function.h

Dec 26th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.69 KB | None | 0 0
  1. #ifndef ERROR_FUNCTIONS_H
  2. #define ERROR_FUNCTIONS_H
  3.  
  4. void errMsg(const char *format, ...);
  5.  
  6. #ifdef __GNUC__
  7.  
  8. /* This macro stops 'gcc -Wall' complaining that "control reaches
  9.  *      end of non-void function" if we use the following functions to
  10.  *      terminate main() or some other non-void function. */
  11.  
  12. #define NORETURN __attribute__ ((__noreturn__))
  13. #else
  14. #define NORETURN
  15. #endif
  16.  
  17. void errExit(const char *format, ...) NORETURN ;
  18. void err_exit(const char *format, ...) NORETURN ;
  19. void errExitEN(int, errnum, const char *format, ...) NORETURN ;
  20. void fatal(const char *format, ...) NORETURN ;
  21. void usageErr(const char *format, ...) NORETURN ;
  22. void cmdLineErr(const char *format, ...) NORETURN ;
  23. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement