Lines Matching refs:states

108     int nbState;		/* number of states in the automata */
109 int maxState; /* allocated number of states */
111 int *states; /* the array of step indexes */
147 xmlStepStatePtr states;
460 xmlPatPushState(xmlStepStates *states, int step, xmlNodePtr node) {
461 if ((states->states == NULL) || (states->maxstates <= 0)) {
462 states->maxstates = 4;
463 states->nbstates = 0;
464 states->states = xmlMalloc(4 * sizeof(xmlStepState));
466 else if (states->maxstates <= states->nbstates) {
469 tmp = (xmlStepStatePtr) xmlRealloc(states->states,
470 2 * states->maxstates * sizeof(xmlStepState));
473 states->states = tmp;
474 states->maxstates *= 2;
476 states->states[states->nbstates].step = step;
477 states->states[states->nbstates++].node = node;
497 xmlStepStates states = {0, 0, NULL}; /* // may require backtrack */
656 xmlPatPushState(&states, i, node);
658 xmlPatPushState(&states, i - 1, node);
680 if (states.states != NULL) {
681 /* Free the rollback states */
682 xmlFree(states.states);
687 if (states.states == NULL)
689 if (states.nbstates <= 0) {
690 xmlFree(states.states);
693 states.nbstates--;
694 i = states.states[states.nbstates].step;
695 node = states.states[states.nbstates].node;
1458 printf("Stream: level %d, %d states: ", ctxt->level, ctxt->nbState);
1464 if (ctxt->states[2 * i] < 0)
1467 printf(" %d: step %d, level %d", i, ctxt->states[2 * i],
1468 ctxt->states[(2 * i) + 1]);
1469 if (ctxt->comp->steps[ctxt->states[2 * i]].flags &
1748 * @size: the number of expected states
1765 cur->states = (int *) xmlMalloc(4 * 2 * sizeof(int));
1766 if (cur->states == NULL) {
1792 if (stream->states != NULL)
1793 xmlFree(stream->states);
1812 if (comp->states[2 * i] < 0) {
1813 comp->states[2 * i] = idx;
1814 comp->states[2 * i + 1] = level;
1821 cur = (int *) xmlRealloc(comp->states,
1828 comp->states = cur;
1831 comp->states[2 * comp->nbState] = idx;
1832 comp->states[2 * comp->nbState++ + 1] = level;
1947 * Check evolution of existing states
1957 stepNr = stream->states[2 * (stream->nbState -1)];
1961 if (stream->states[(2 * (stream->nbState -1)) + 1] <
1971 * occuring in the states, plus any other state for this
1974 stepNr = stream->states[2 * i];
1976 /* TODO: should not happen anymore: dead states */
1980 tmp = stream->states[(2 * i) + 1];
1982 /* skip new states just added */
1986 /* skip states at ancestor levels, except if "//" */
2292 * Check evolution of existing states
2295 /* discard obsoleted states */
2296 lev = stream->states[(2 * i) + 1];