Commit 43da4e84 authored by Niels Möller's avatar Niels Möller
Browse files

Moved function attribute macros.

New functions debug(), debug_safe() and werror_safe(). New global
variables quiet_flag and debug_flag.

Rev: src/werror.h:1.2
parent 7ad3ce42
......@@ -5,15 +5,17 @@
#ifndef LSH_ERROR_H_INCLUDED
#define LSH_ERROR_H_INCLUDED
#ifdef __GNUC__
#define NORETURN __attribute__ ((noreturn))
#define PRINTF_STYLE(f, a) __attribute__ ((format(printf, f, a)))
#else
#define NORETURN
#define PRINTF_STYLE(f, a)
#endif
/* Global variables */
extern int debug_flag;
extern int quite_flag;
void werror(char *format, ...) PRINTF_STYLE(1,2);
void debug(char *format, ...) PRINTF_STYLE(1,2);
/* For outputting data recieved from the other end */
void werror_safe(UINT32 length, UINT8 *msg);
void debug_safe(UINT32 length, UINT8 *msg);
void fatal(char *format, ...) PRINTF_STYLE(1,2) NORETURN;
#endif /* LSH_ERROR_H_INCLUDED */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment