aboutsummaryrefslogtreecommitdiff
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/awk.h b/awk.h
index 4e01325..cc30249 100644
--- a/awk.h
+++ b/awk.h
@@ -25,7 +25,11 @@ THIS SOFTWARE.
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
+#if __STDC_VERSION__ <= 199901L
+#define noreturn
+#else
#include <stdnoreturn.h>
+#endif
typedef double Awkfloat;
@@ -40,14 +44,13 @@ typedef unsigned char uschar;
*/
#define setptr(ptr, a) (*(char *)(intptr_t)(ptr)) = (a)
-#define NN(p) ((p) ? (p) : "(null)") /* guaranteed non-null for dprintf
+#define NN(p) ((p) ? (p) : "(null)") /* guaranteed non-null for DPRINTF
*/
#define DEBUG
#ifdef DEBUG
- /* uses have to be doubly parenthesized */
-# define dprintf(x) if (dbg) printf x
+# define DPRINTF(...) if (dbg) printf(__VA_ARGS__)
#else
-# define dprintf(x)
+# define DPRINTF(...)
#endif
extern enum compile_states {