34 |
void __attribute__((__noreturn__)) shutdown (void); |
void __attribute__((__noreturn__)) shutdown (void); |
35 |
|
|
36 |
|
|
37 |
|
/* The program name. */ |
38 |
|
extern char program_name[]; |
39 |
|
|
40 |
/* True if debug mode is enabled. */ |
/* True if debug mode is enabled. */ |
41 |
extern int output_debug; |
extern int output_debug; |
42 |
|
|
43 |
/* Print a debug message. */ |
/* Print a debug message. */ |
44 |
#define debug(...) \ |
#define debug(fmt, ...) \ |
45 |
({ \ |
({ \ |
46 |
if (output_debug) \ |
if (output_debug) \ |
47 |
printf (__VA_ARGS__); \ |
printf ("%s:%s: " fmt, program_name, \ |
48 |
|
__FUNCTION__, __VA_ARGS__); \ |
49 |
}) |
}) |
50 |
|
|
|
|
|
|
/* The program name. */ |
|
|
extern char program_name[]; |
|
|
|
|
51 |
/* Print an error message and fail. */ |
/* Print an error message and fail. */ |
52 |
#define panic(...) \ |
#define panic(...) \ |
53 |
({ \ |
({ \ |