summaryrefslogtreecommitdiff
path: root/src/options.h
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-11-08 17:17:52 +0000
committerVincent Sanders <vincent.sanders@collabora.co.uk>2012-11-08 17:17:52 +0000
commita3bf3977d82f6dcd54c2a38bffe63858fd4da24c (patch)
treee824881251aa3d82ff25307dba8620176292cc0d /src/options.h
parent6893fcf829e928881c1bd05a541b33443078ea9c (diff)
downloadnsgenbind-a3bf3977d82f6dcd54c2a38bffe63858fd4da24c.tar.gz
nsgenbind-a3bf3977d82f6dcd54c2a38bffe63858fd4da24c.tar.bz2
add warning switch to control warning output at generation time
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