|
|
@ -19,7 +19,7 @@ struct yajl_gen_t *gen = NULL; |
|
|
|
void (*select_handler(int))(int); |
|
|
|
void (*select_handler(int))(int); |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
get_integer(char chr) |
|
|
|
get_integer(int chr) |
|
|
|
{ /* 'chr' always 'i' in this case */ |
|
|
|
{ /* 'chr' always 'i' in this case */ |
|
|
|
int c = '\0'; |
|
|
|
int c = '\0'; |
|
|
|
bool cont = true; |
|
|
|
bool cont = true; |
|
|
@ -50,7 +50,7 @@ get_integer(char chr) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
get_string(char chr) |
|
|
|
get_string(int chr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/* in this case 'chr' first digit of string lenght */ |
|
|
|
/* in this case 'chr' first digit of string lenght */ |
|
|
|
unsigned int len = (unsigned char) chr - '0'; |
|
|
|
unsigned int len = (unsigned char) chr - '0'; |
|
|
@ -137,6 +137,7 @@ void (*select_handler(int chr))(int) |
|
|
|
int |
|
|
|
int |
|
|
|
main(int argc, char **argv) |
|
|
|
main(int argc, char **argv) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
void (*handler)(int) = NULL; |
|
|
|
int chr = '\0'; |
|
|
|
int chr = '\0'; |
|
|
|
const unsigned char *buf = NULL; |
|
|
|
const unsigned char *buf = NULL; |
|
|
|
size_t len = 0; |
|
|
|
size_t len = 0; |
|
|
|