#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <errno.h>#include "php_java.h"#include "parser.h"Defines | |
| #define | APPEND(c) |
| #define | PUSH(t) |
| #define | RESET() |
| #define | CALL_BEGIN() |
| #define | CALL_END() |
Functions | |
| short | parse (proxyenv *env, parser_cb_t *cb) |
| short | parse_header (proxyenv *env, parser_cb_t *cb) |
|
|
Value: { \
if(i>=(*env)->len-1) { \
unsigned char* s1=realloc(s, (*env)->len*=2); \
if(!s1) exit(9); else s=(*env)->s=s1; \
} \
s[i++]=c; \
}
|
|
|
Value: { \
if(cb->begin) (*cb->begin)(tag, cb); \
}
|
|
|
Value: { \
if(cb->end) (*cb->end)(tag[0].strings, cb); \
}
|
|
|
Value: { \
parser_string_t *str = tag[t].strings; \
short n = tag[t].n; \
assert((t!=0) || (t==0 && !tag[0].n)); \
s[i]=0; \
str[n].string=&((*env)->s); \
str[n].off=i0; \
str[n].length=i-i0; \
++tag[t].n; \
APPEND(0); \
i0=i; \
}
|
|
|
Value: { \
type=VOJD;\
level=0; \
eor=0; \
blen=0; \
in_dquote=0; \
i=0; \
i0=0; \
(*env)->c=0; (*env)->pos=0; \
}
|
|
||||||||||||
|
|
|
||||||||||||
|
|
1.4.2