Lines Matching refs:states
111 int *states; /* the array of step indexes */ member
147 xmlStepStatePtr states; member
460 xmlPatPushState(xmlStepStates *states, int step, xmlNodePtr node) { in xmlPatPushState() argument
461 if ((states->states == NULL) || (states->maxstates <= 0)) { in xmlPatPushState()
462 states->maxstates = 4; in xmlPatPushState()
463 states->nbstates = 0; in xmlPatPushState()
464 states->states = xmlMalloc(4 * sizeof(xmlStepState)); in xmlPatPushState()
466 else if (states->maxstates <= states->nbstates) { in xmlPatPushState()
469 tmp = (xmlStepStatePtr) xmlRealloc(states->states, in xmlPatPushState()
470 2 * states->maxstates * sizeof(xmlStepState)); in xmlPatPushState()
473 states->states = tmp; in xmlPatPushState()
474 states->maxstates *= 2; in xmlPatPushState()
476 states->states[states->nbstates].step = step; in xmlPatPushState()
477 states->states[states->nbstates++].node = node; in xmlPatPushState()
497 xmlStepStates states = {0, 0, NULL}; /* // may require backtrack */ in xmlPatMatch() local
656 xmlPatPushState(&states, i, node); in xmlPatMatch()
658 xmlPatPushState(&states, i - 1, node); in xmlPatMatch()
680 if (states.states != NULL) { in xmlPatMatch()
682 xmlFree(states.states); in xmlPatMatch()
687 if (states.states == NULL) in xmlPatMatch()
689 if (states.nbstates <= 0) { in xmlPatMatch()
690 xmlFree(states.states); in xmlPatMatch()
693 states.nbstates--; in xmlPatMatch()
694 i = states.states[states.nbstates].step; in xmlPatMatch()
695 node = states.states[states.nbstates].node; in xmlPatMatch()
1464 if (ctxt->states[2 * i] < 0) in xmlDebugStreamCtxt()
1467 printf(" %d: step %d, level %d", i, ctxt->states[2 * i], in xmlDebugStreamCtxt()
1468 ctxt->states[(2 * i) + 1]); in xmlDebugStreamCtxt()
1469 if (ctxt->comp->steps[ctxt->states[2 * i]].flags & in xmlDebugStreamCtxt()
1765 cur->states = (int *) xmlMalloc(4 * 2 * sizeof(int)); in xmlNewStreamCtxt()
1766 if (cur->states == NULL) { in xmlNewStreamCtxt()
1792 if (stream->states != NULL) in xmlFreeStreamCtxt()
1793 xmlFree(stream->states); in xmlFreeStreamCtxt()
1812 if (comp->states[2 * i] < 0) { in xmlStreamCtxtAddState()
1813 comp->states[2 * i] = idx; in xmlStreamCtxtAddState()
1814 comp->states[2 * i + 1] = level; in xmlStreamCtxtAddState()
1821 cur = (int *) xmlRealloc(comp->states, in xmlStreamCtxtAddState()
1828 comp->states = cur; in xmlStreamCtxtAddState()
1831 comp->states[2 * comp->nbState] = idx; in xmlStreamCtxtAddState()
1832 comp->states[2 * comp->nbState++ + 1] = level; in xmlStreamCtxtAddState()
1957 stepNr = stream->states[2 * (stream->nbState -1)]; in xmlStreamPushInternal()
1961 if (stream->states[(2 * (stream->nbState -1)) + 1] < in xmlStreamPushInternal()
1974 stepNr = stream->states[2 * i]; in xmlStreamPushInternal()
1980 tmp = stream->states[(2 * i) + 1]; in xmlStreamPushInternal()
2300 lev = stream->states[(2 * i) + 1]; in xmlStreamPop()