blob: d5206cf03142798f4c4dd25287ba96ded669c41d [file] [log] [blame]
Nicholas Flintham1e3d3112013-04-10 10:48:38 +01001
2
3struct match_token {
4 int token;
5 const char *pattern;
6};
7
8typedef struct match_token match_table_t[];
9
10enum {MAX_OPT_ARGS = 3};
11
12typedef struct {
13 char *from;
14 char *to;
15} substring_t;
16
17int match_token(char *, const match_table_t table, substring_t args[]);
18int match_int(substring_t *, int *result);
19int match_octal(substring_t *, int *result);
20int match_hex(substring_t *, int *result);
21size_t match_strlcpy(char *, const substring_t *, size_t);
22char *match_strdup(const substring_t *);