summaryrefslogtreecommitdiff
path: root/src/options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.h')
-rw-r--r--src/options.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/options.h b/src/options.h
index ba43084..5ded73a 100644
--- a/src/options.h
+++ b/src/options.h
@@ -15,10 +15,23 @@ struct options {
char *depfilename;
FILE *depfilehandle;
char *idlpath;
- bool verbose;
- bool debug;
+ bool verbose; /* verbose processing */
+ bool debug; /* debug enabled */
+ unsigned int warnings; /* warning flags */
};
extern struct options *options;
+enum opt_warnings {
+ WARNING_UNIMPLEMENTED = 1,
+};
+
+#define WARNING_ALL (WARNING_UNIMPLEMENTED)
+
+#define WARN(flags, msg, args...) do { \
+ if ((options->warnings & flags) != 0) { \
+ fprintf(stderr, "%s: warning:"msg"\n", __func__, ## args); \
+ } \
+ } while(0)
+
#endif