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

#include <stdio.h>
#include <inttypes.h>
#include <ctype.h>
#include <string.h>
#include "parse.h"
#include "parse_num.h"

Go to the source code of this file.

Defines

#define debug_printf(args...)   do {} while(0)
#define U08_MIN   0x00
#define U08_MAX   0xFF
#define U16_MIN   0x0000
#define U16_MAX   0xFFFF
#define U32_MIN   0x00000000
#define U32_MAX   0xFFFFFFFF
#define S08_MIN   0x80
#define S08_MAX   0x7F
#define S16_MIN   0x8000
#define S16_MAX   0x7FFF
#define S32_MIN   0x80000000
#define S32_MAX   0x7FFFFFFF

Enumerations

enum  num_parse_state_t {
  START, DEC_NEG, BIN, HEX,
  FLOAT_POS, FLOAT_NEG, ERROR, FIRST_OK,
  ZERO_OK, HEX_OK, OCTAL_OK, BIN_OK,
  DEC_NEG_OK, DEC_POS_OK, FLOAT_POS_OK, FLOAT_NEG_OK
}

Functions

int8_t parse_num (parse_pgm_token_hdr_t *tk, const char *srcbuf, void *res)
int8_t get_help_num (parse_pgm_token_hdr_t *tk, char *dstbuf, uint8_t size)

Variables

struct token_ops token_num_ops


Define Documentation

#define debug_printf ( args...   )     do {} while(0)

Definition at line 10 of file parse_num.c.

#define S08_MAX   0x7F

Definition at line 20 of file parse_num.c.

#define S08_MIN   0x80

Definition at line 19 of file parse_num.c.

#define S16_MAX   0x7FFF

Definition at line 22 of file parse_num.c.

#define S16_MIN   0x8000

Definition at line 21 of file parse_num.c.

#define S32_MAX   0x7FFFFFFF

Definition at line 24 of file parse_num.c.

#define S32_MIN   0x80000000

Definition at line 23 of file parse_num.c.

#define U08_MAX   0xFF

Definition at line 14 of file parse_num.c.

#define U08_MIN   0x00

Definition at line 13 of file parse_num.c.

#define U16_MAX   0xFFFF

Definition at line 16 of file parse_num.c.

#define U16_MIN   0x0000

Definition at line 15 of file parse_num.c.

#define U32_MAX   0xFFFFFFFF

Definition at line 18 of file parse_num.c.

#define U32_MIN   0x00000000

Definition at line 17 of file parse_num.c.


Enumeration Type Documentation

Enumerator:
START 
DEC_NEG 
BIN 
HEX 
FLOAT_POS 
FLOAT_NEG 
ERROR 
FIRST_OK 
ZERO_OK 
HEX_OK 
OCTAL_OK 
BIN_OK 
DEC_NEG_OK 
DEC_POS_OK 
FLOAT_POS_OK 
FLOAT_NEG_OK 

Definition at line 35 of file parse_num.c.


Function Documentation

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

Definition at line 423 of file parse_num.c.

References token_num_data::type.

int8_t parse_num ( parse_pgm_token_hdr_t tk,
const char *  srcbuf,
void *  res 
)


Variable Documentation

Initial value:

 {
        .parse = parse_num,
        .complete_get_nb = NULL,
        .complete_get_elt = NULL,
        .get_help = get_help_num,
}

Definition at line 27 of file parse_num.c.


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