struct value_pair {
const char *ival; /* string option */
unsigned int oval; /* output value */
+ const char *help; /* help text for sub option */
};
#define PARSE_MAX_VP 16
const char *help; /* help text for option */
const char *def; /* default setting */
const struct value_pair posval[PARSE_MAX_VP];/* possible values */
+ const char *parent; /* parent option */
};
typedef int (str_cb_fn)(void *, char *);
extern void strip_blank_front(char **);
extern void strip_blank_end(char *);
+extern int str_to_decimal(const char *, long long *, int);
/*
* Handlers for the options
#define td_var(start, offset) ((void *) start + (offset))
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef max
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#endif
+
#endif