aversive_10-03-12/modules/ihm/parse/parse_string.c File Reference

#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 Documentation

#define ANYSTRING_HELP   PSTR("Any STRING")

Definition at line 17 of file parse_string.c.

Referenced by get_help_string().

#define FIXEDSTRING_HELP   PSTR("Fixed STRING")

Definition at line 18 of file parse_string.c.

Referenced by get_help_string().

#define MULTISTRING_HELP   PSTR("Mul-choice STRING")

Definition at line 16 of file parse_string.c.

Referenced by get_help_string().


Function Documentation

int8_t complete_get_elt_string ( parse_pgm_token_hdr_t tk,
int8_t  idx,
char *  dstbuf,
uint8_t  size 
)

Definition at line 119 of file parse_string.c.

References token_string_data::str.

int8_t complete_get_nb_string ( parse_pgm_token_hdr_t tk  ) 

Definition at line 103 of file parse_string.c.

References token_string_data::str.

int8_t get_help_string ( parse_pgm_token_hdr_t tk,
char *  dstbuf,
uint8_t  size 
)

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.


Variable Documentation

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.


Generated on Fri Mar 12 06:32:07 2010 for AVR by  doxygen 1.5.6