nsgenbind
Loading...
Searching...
No Matches
options.h
Go to the documentation of this file.
1/* binding generator options
2 *
3 * This file is part of nsgenbind.
4 * Licensed under the MIT License,
5 * http://www.opensource.org/licenses/mit-license.php
6 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
7 */
8
9#ifndef nsgenbind_options_h
10#define nsgenbind_options_h
11
13struct options {
14 char *infilename;
15 char *outdirname;
16 char *idlpath;
18 bool verbose;
19 bool debug;
20 bool dbglog;
21 bool dryrun;
23 unsigned int warnings;
24};
25
26extern struct options *options;
27
34
35#define WARNING_ALL (WARNING_UNIMPLEMENTED | WARNING_DUPLICATED | WARNING_WEBIDL)
36
37#define WARN(flags, msg, args...) do { \
38 if ((options->warnings & flags) != 0) { \
39 fprintf(stderr, "%s: warning: "msg"\n", __func__, ## args); \
40 } \
41 } while(0)
42
43#endif
opt_warnings
Definition options.h:28
@ WARNING_UNIMPLEMENTED
Definition options.h:29
@ WARNING_GENERATED
Definition options.h:32
@ WARNING_DUPLICATED
Definition options.h:30
@ WARNING_WEBIDL
Definition options.h:31
char * outdirname
Definition options.h:15
bool debug
Definition options.h:19
char * idlpath
Definition options.h:16
bool verbose
Definition options.h:18
bool dryrun
Definition options.h:21
unsigned int warnings
Definition options.h:23
char * infilename
Definition options.h:14
bool dbglog
Definition options.h:20