Lines Matching refs:state
58 struct ParserStruct *state = (struct ParserStruct *) userData; in startElement() local
59 state->tags++; in startElement()
60 state->depth++; in startElement()
63 free(state->characters.memory); in startElement()
64 state->characters.memory = NULL; in startElement()
65 state->characters.size = 0; in startElement()
70 struct ParserStruct *state = (struct ParserStruct *) userData; in characterDataHandler() local
71 struct MemoryStruct *mem = &state->characters; in characterDataHandler()
77 state->ok = 0; in characterDataHandler()
89 struct ParserStruct *state = (struct ParserStruct *) userData; in endElement() local
90 state->depth--; in endElement()
92 printf("%5lu %10lu %s\n", state->depth, state->characters.size, name); in endElement()
100 struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser); in parseStreamCallback() local
103 if(state->ok && XML_Parse(parser, contents, real_size, 0) == 0) { in parseStreamCallback()
108 state->ok = 0; in parseStreamCallback()
119 struct ParserStruct state; in main() local
122 memset(&state, 0, sizeof(struct ParserStruct)); in main()
123 state.ok = 1; in main()
127 XML_SetUserData(parser, &state); in main()
147 else if(state.ok) { in main()
156 printf(" %lu tags total\n", state.tags); in main()
161 free(state.characters.memory); in main()