Lines Matching full:states
111 int nbState; /* number of states in the automata */
112 int maxState; /* allocated number of states */
114 int *states; /* the array of step indexes */
150 xmlStepStatePtr states;
464 xmlPatPushState(xmlStepStates *states, int step, xmlNodePtr node) {
465 if ((states->states == NULL) || (states->maxstates <= 0)) {
466 states->maxstates = 4;
467 states->nbstates = 0;
468 states->states = xmlMalloc(4 * sizeof(xmlStepState));
470 else if (states->maxstates <= states->nbstates) {
473 tmp = (xmlStepStatePtr) xmlRealloc(states->states,
474 2 * states->maxstates * sizeof(xmlStepState));
477 states->states = tmp;
478 states->maxstates *= 2;
480 states->states[states->nbstates].step = step;
481 states->states[states->nbstates++].node = node;
501 xmlStepStates states = {0, 0, NULL}; /* // may require backtrack */
660 xmlPatPushState(&states, i, node);
662 xmlPatPushState(&states, i - 1, node);
684 if (states.states != NULL) {
685 /* Free the rollback states */
686 xmlFree(states.states);
691 if (states.states == NULL)
693 if (states.nbstates <= 0) {
694 xmlFree(states.states);
697 states.nbstates--;
698 i = states.states[states.nbstates].step;
699 node = states.states[states.nbstates].node;
1462 printf("Stream: level %d, %d states: ", ctxt->level, ctxt->nbState);
1468 if (ctxt->states[2 * i] < 0)
1471 printf(" %d: step %d, level %d", i, ctxt->states[2 * i],
1472 ctxt->states[(2 * i) + 1]);
1473 if (ctxt->comp->steps[ctxt->states[2 * i]].flags &
1752 * @size: the number of expected states
1769 cur->states = (int *) xmlMalloc(4 * 2 * sizeof(int));
1770 if (cur->states == NULL) {
1796 if (stream->states != NULL)
1797 xmlFree(stream->states);
1816 if (comp->states[2 * i] < 0) {
1817 comp->states[2 * i] = idx;
1818 comp->states[2 * i + 1] = level;
1825 cur = (int *) xmlRealloc(comp->states,
1832 comp->states = cur;
1835 comp->states[2 * comp->nbState] = idx;
1836 comp->states[2 * comp->nbState++ + 1] = level;
1951 * Check evolution of existing states
1961 stepNr = stream->states[2 * (stream->nbState -1)];
1965 if (stream->states[(2 * (stream->nbState -1)) + 1] <
1975 * occuring in the states, plus any other state for this
1978 stepNr = stream->states[2 * i];
1980 /* TODO: should not happen anymore: dead states */
1984 tmp = stream->states[(2 * i) + 1];
1986 /* skip new states just added */
1990 /* skip states at ancestor levels, except if "//" */
2300 * Check evolution of existing states
2303 /* discard obsoleted states */
2304 lev = stream->states[(2 * i) + 1];