Home | History | Annotate | Download | only in examples

Lines Matching refs:state

57   struct ParserStruct *state = (struct ParserStruct *) userData;
58 state->tags++;
59 state->depth++;
62 free(state->characters.memory);
63 state->characters.memory = NULL;
64 state->characters.size = 0;
69 struct ParserStruct *state = (struct ParserStruct *) userData;
70 struct MemoryStruct *mem = &state->characters;
76 state->ok = 0;
87 struct ParserStruct *state = (struct ParserStruct *) userData;
88 state->depth--;
90 printf("%5lu %10lu %s\n", state->depth, state->characters.size, name);
98 struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser);
100 /* Only parse if we're not already in a failure state. */
101 if(state->ok && XML_Parse(parser, contents, real_size, 0) == 0) {
106 state->ok = 0;
117 struct ParserStruct state;
119 /* Initialize the state structure for parsing. */
120 memset(&state, 0, sizeof(struct ParserStruct));
121 state.ok = 1;
125 XML_SetUserData(parser, &state);
145 else if(state.ok) {
154 printf(" %lu tags total\n", state.tags);
159 free(state.characters.memory);