2 * @file ATcodec_Memory.h
3 * @author aurelien.morelle@parrot.fr
7 #ifndef _AT_CODEC_MEMORY_INCLUDE_
8 #define _AT_CODEC_MEMORY_INCLUDE_
11 typedef int (*ATcodec_Getchar)(char **str);
12 typedef void (*ATcodec_Putchar)(char **str, int c);
15 typedef struct _ATcodec_Memory_s_
32 ATcodec_Memory_Init (ATcodec_Memory_t *mem, const char *start, int size, int char_size, ATcodec_Getchar get, ATcodec_Putchar put);
38 ATcodec_Memory_Put_Char (ATcodec_Memory_t *mem, int character);
41 ATcodec_Memory_Put_String (ATcodec_Memory_t *mem, const char *str);
44 ATcodec_Memory_Raw_Put_Int (ATcodec_Memory_t *mem, int value);
47 ATcodec_Memory_Str_Put_Int (ATcodec_Memory_t *mem, int value);
53 ATcodec_Memory_Get_Char (ATcodec_Memory_t *mem);
56 ATcodec_Memory_Unget_Char (ATcodec_Memory_t *mem);
59 ATcodec_Memory_Get_String (ATcodec_Memory_t *mem, char *dst);
62 ATcodec_Memory_Raw_Get_Int (ATcodec_Memory_t *mem);
65 ATcodec_Memory_Str_Get_Int (ATcodec_Memory_t *mem);
68 #endif // ! _AT_CODEC_MEMORY_INCLUDE_