* Clean up some function definitions to comply with strict
[alpine.git] / pith / debug.h
blob230ec642d7f453081a805c3eb5f4fae50b969cdc
1 /*
2 * $Id: debug.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2022 Eduardo Chappa
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_DEBUG_INCLUDED
18 #define PITH_DEBUG_INCLUDED
21 /*======================================================================
22 Macros for debug printfs
23 n is debugging level:
24 1 logs only highest level events and errors
25 2 logs events like file writes
27 4 logs each command
30 7 logs details of command execution (7 is highest to run any production)
31 allows core dumps without cleaning up terminal modes
33 9 logs gross details of command execution
35 ====*/
38 #ifdef DEBUG
40 #define dprint(x) { output_debug_msg x ; }
42 /* global debugging level */
43 extern int debug;
45 /* mandatory to implement stubs */
46 void output_debug_msg(int, char *fmt, ...);
47 void dump_configuration(int);
48 void dump_contexts(void);
52 #else /* !DEBUG */
54 #define dprint(x)
56 #endif /* !DEBUG */
59 #endif /* PITH_DEBUG_INCLUDED */