fwcutter/make: Avoid _DEFAULT_SOURCE warning
[b43-tools.git] / disassembler / args.h
1 #ifndef B43_DASM_ARGS_H_
2 #define B43_DASM_ARGS_H_
3
4 enum fwformat {
5         FMT_RAW_LE32,   /* Raw microcode. No headers. 32bit little endian chunks. */
6         FMT_RAW_BE32,   /* Raw microcode. No headers. 32bit big endian chunks. */
7         FMT_B43,        /* b43/b43legacy headers. */
8 };
9
10 struct cmdline_args {
11         int debug;                      /* Debug level. */
12         unsigned int arch;              /* The architecture we're disassembling. */
13         enum fwformat informat;         /* The input file format. */
14         int print_addresses;            /* Print a comment with instruction address. */
15         int unknown_decode;             /* Decode operands of unknown instructions. */
16 };
17
18 int parse_args(int argc, char **argv);
19
20 int open_input_file(void);
21 void close_input_file(void);
22 int open_output_file(void);
23 void close_output_file(void);
24
25 extern struct cmdline_args cmdargs;
26
27 #define IS_DEBUG                (cmdargs.debug > 0)
28 #define IS_VERBOSE_DEBUG        (cmdargs.debug > 1)
29 #define IS_INSANE_DEBUG         (cmdargs.debug > 2)
30
31 #endif /* B43_DASM_ARGS_H_ */