1 #ifndef _PARSE_STRING_H_
2 #define _PARSE_STRING_H_
6 /* size of a parsed string */
7 #define STR_TOKEN_SIZE 32
9 typedef char fixed_string_t[STR_TOKEN_SIZE];
11 struct token_string_data {
17 struct token_string_data string_data;
19 typedef struct token_string parse_token_string_t;
21 extern struct token_ops token_string_ops;
23 int8_t parse_string(PGM_P tk, const char * srcbuf, void * res);
24 int8_t complete_get_nb_string(PGM_P tk);
25 int8_t complete_get_elt_string(PGM_P tk, int8_t idx,
26 char * dstbuf, uint8_t size);
27 int8_t get_help_string(PGM_P tk, char * dstbuf, uint8_t size);
29 #define TOKEN_STRING_INITIALIZER(structure, field, string) \
32 .ops = &token_string_ops, \
33 .offset = offsetof(structure, field), \
40 #endif /* _PARSE_STRING_H_ */