Lines Matching defs:state
53 struct ParserStruct *state = (struct ParserStruct *) userData;
54 state->tags++;
55 state->depth++;
58 free(state->characters.memory);
59 state->characters.memory = NULL;
60 state->characters.size = 0;
65 struct ParserStruct *state = (struct ParserStruct *) userData;
66 struct MemoryStruct *mem = &state->characters;
72 state->ok = 0;
83 struct ParserStruct *state = (struct ParserStruct *) userData;
84 state->depth--;
86 printf("%5lu %10lu %s\n", state->depth, state->characters.size, name);
93 struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser);
95 /* Only parse if we're not already in a failure state. */
96 if (state->ok && XML_Parse(parser, contents, real_size, 0) == 0) {
100 state->ok = 0;
111 struct ParserStruct state;
113 /* Initialize the state structure for parsing. */
114 memset(&state, 0, sizeof(struct ParserStruct));
115 state.ok = 1;
119 XML_SetUserData(parser, &state);
138 else if (state.ok) {
147 printf(" %lu tags total\n", state.tags);
152 free(state.characters.memory);