1 /******************************* 2 * OPTION LISTS * 3 *******************************/ 4 5 #define OPT_BOOL (0) /* types */ 6 #define OPT_INT (1) 7 #define OPT_STRING (2) 8 #define OPT_ATOM (3) 9 #define OPT_TERM (4) /* arbitrary term */ 10 #define OPT_LONG (5) 11 #define OPT_NATLONG (6) /* > 0 */ 12 #define OPT_TYPE_MASK 0xff 13 #define OPT_INF 0x100 /* allow 'inf' */ 14 15 #define OPT_ALL 0x1 /* flags */ 16 17 typedef struct 18 { atom_t name; /* Name of option */ 19 int type; /* Type of option */ 20 } opt_spec, *OptSpec; 21 22 extern bool scan_options(term_t options, int flags, atom_t optype, 23 const opt_spec *specs, ...); 24 25