diff options
author | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-11-08 17:17:52 +0000 |
---|---|---|
committer | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-11-08 17:17:52 +0000 |
commit | a3bf3977d82f6dcd54c2a38bffe63858fd4da24c (patch) | |
tree | e824881251aa3d82ff25307dba8620176292cc0d /src/options.h | |
parent | 6893fcf829e928881c1bd05a541b33443078ea9c (diff) | |
download | nsgenbind-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.h | 17 |
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 |