#include <stdio.h>
#include <inttypes.h>
#include <ctype.h>
#include <string.h>
#include "parse.h"
#include "parse_string.h"
Go to the source code of this file.
Defines | |
#define | MULTISTRING_HELP PSTR("Mul-choice STRING") |
#define | ANYSTRING_HELP PSTR("Any STRING") |
#define | FIXEDSTRING_HELP PSTR("Fixed STRING") |
Functions | |
int8_t | parse_string (parse_pgm_token_hdr_t *tk, const char *buf, void *res) |
int8_t | complete_get_nb_string (parse_pgm_token_hdr_t *tk) |
int8_t | complete_get_elt_string (parse_pgm_token_hdr_t *tk, int8_t idx, char *dstbuf, uint8_t size) |
int8_t | get_help_string (parse_pgm_token_hdr_t *tk, char *dstbuf, uint8_t size) |
Variables | |
struct token_ops | token_string_ops |
#define ANYSTRING_HELP PSTR("Any STRING") |
#define FIXEDSTRING_HELP PSTR("Fixed STRING") |
#define MULTISTRING_HELP PSTR("Mul-choice STRING") |
int8_t complete_get_elt_string | ( | parse_pgm_token_hdr_t * | tk, | |
int8_t | idx, | |||
char * | dstbuf, | |||
uint8_t | size | |||
) |
int8_t complete_get_nb_string | ( | parse_pgm_token_hdr_t * | tk | ) |
int8_t get_help_string | ( | parse_pgm_token_hdr_t * | tk, | |
char * | dstbuf, | |||
uint8_t | size | |||
) |
Definition at line 146 of file parse_string.c.
References ANYSTRING_HELP, FIXEDSTRING_HELP, MULTISTRING_HELP, and token_string_data::str.
int8_t parse_string | ( | parse_pgm_token_hdr_t * | tk, | |
const char * | buf, | |||
void * | res | |||
) |
Definition at line 45 of file parse_string.c.
References isendoftoken(), token_string_data::str, and STR_TOKEN_SIZE.
struct token_ops token_string_ops |
Initial value:
{ .parse = parse_string, .complete_get_nb = complete_get_nb_string, .complete_get_elt = complete_get_elt_string, .get_help = get_help_string, }
Definition at line 9 of file parse_string.c.