Home | History | Annotate | Download | only in libxml2

Lines Matching defs:states

319     int nbState;                /* the number of states */
372 xmlRelaxNGStatesPtr states; /* the accumulated state list */
374 xmlRelaxNGStatesPtr freeState; /* the pool of free valid states */
1023 xmlRngVErrMemory(ctxt, "allocating states\n");
1032 xmlRngVErrMemory(ctxt, "allocating states\n");
1042 * @states: the states container
1052 xmlRelaxNGStatesPtr states,
1058 if (states->nbState >= states->maxState) {
1062 size = states->maxState * 2;
1063 tmp = (xmlRelaxNGValidStatePtr *) xmlRealloc(states->tabState,
1068 xmlRngVErrMemory(ctxt, "adding states\n");
1071 states->tabState = tmp;
1072 states->maxState = size;
1074 states->tabState[states->nbState++] = state;
1081 * @states: the states container
1090 xmlRelaxNGStatesPtr states,
1098 if (states->nbState >= states->maxState) {
1102 size = states->maxState * 2;
1103 tmp = (xmlRelaxNGValidStatePtr *) xmlRealloc(states->tabState,
1108 xmlRngVErrMemory(ctxt, "adding states\n");
1111 states->tabState = tmp;
1112 states->maxState = size;
1114 for (i = 0; i < states->nbState; i++) {
1115 if (xmlRelaxNGEqualValidState(ctxt, state, states->tabState[i])) {
1120 states->tabState[states->nbState++] = state;
1127 * @states: teh container
1133 xmlRelaxNGStatesPtr states)
1135 if (states == NULL)
1143 xmlRngVErrMemory(ctxt, "storing states\n");
1154 xmlRngVErrMemory(ctxt, "storing states\n");
1155 xmlFree(states->tabState);
1156 xmlFree(states);
1163 xmlFree(states->tabState);
1164 xmlFree(states);
1166 ctxt->freeStates[ctxt->freeStatesNr++] = states;
1210 xmlRngVErrMemory(ctxt, "allocating states\n");
1234 xmlRngVErrMemory(ctxt, "allocating states\n");
1243 xmlRngVErrMemory(ctxt, "allocating states\n");
1292 xmlRngVErrMemory(ctxt, "allocating states\n");
1308 xmlRngVErrMemory(ctxt, "allocating states\n");
1318 xmlRngVErrMemory(ctxt, "allocating states\n");
1337 * Compare the validation states for equality
8102 } else if (ctxt->states != NULL) {
8107 for (i = 0; i < ctxt->states->nbState; i++) {
8108 state = ctxt->states->tabState[i];
8124 for (i = 0; i < ctxt->states->nbState; i++) {
8125 xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[i]);
8127 xmlRelaxNGFreeStates(ctxt, ctxt->states);
8128 ctxt->states = NULL;
9042 if ((ctxt->state != NULL) || (ctxt->states != NULL)) {
9276 } else if (ctxt->states != NULL) {
9286 for (j = 0; j < ctxt->states->nbState; j++) {
9287 cur = ctxt->states->tabState[j]->seq;
9291 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9295 if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
9297 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9304 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9307 if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
9309 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9317 if (ctxt->states->nbState > 0) {
9320 oldstate = ctxt->states->tabState[best];
9321 ctxt->states->tabState[best] = NULL;
9324 ctxt->states->tabState[ctxt->states->nbState - 1];
9325 ctxt->states->tabState[ctxt->states->nbState - 1] = NULL;
9328 for (j = 0; j < ctxt->states->nbState ; j++) {
9329 xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[j]);
9331 xmlRelaxNGFreeStates(ctxt, ctxt->states);
9332 ctxt->states = NULL;
9401 if ((ctxt->state != NULL) || (ctxt->states != NULL)) {
9534 * Find the "best" state in the ctxt->states list of states to report
9549 if ((ctxt == NULL) || (ctxt->states == NULL) ||
9550 (ctxt->states->nbState <= 0))
9553 for (i = 0; i < ctxt->states->nbState; i++) {
9554 state = ctxt->states->tabState[i];
9577 * Find the "best" state in the ctxt->states list of states to report
9585 if ((ctxt == NULL) || (ctxt->states == NULL) ||
9586 (ctxt->states->nbState <= 0))
9590 if ((best >= 0) && (best < ctxt->states->nbState)) {
9591 ctxt->state = ctxt->states->tabState[best];
9780 xmlRelaxNGStatesPtr tmpstates = ctxt->states;
9785 ctxt->states = NULL;
9792 ctxt->states = tmpstates;
9803 if (ctxt->states != NULL) {
9806 for (i = 0; i < ctxt->states->nbState; i++) {
9807 state = ctxt->states->tabState[i];
9823 for (i = 0; i < ctxt->states->nbState; i++) {
9825 ctxt->states->
9828 xmlRelaxNGFreeStates(ctxt, ctxt->states);
9830 ctxt->states = NULL;
9860 if (ctxt->states != NULL) {
9863 for (i = 0; i < ctxt->states->nbState; i++) {
9864 state = ctxt->states->tabState[i];
9879 for (i = 0; i < ctxt->states->nbState; i++) {
9881 ctxt->states->
9884 xmlRelaxNGFreeStates(ctxt, ctxt->states);
9886 ctxt->states = NULL;
9951 if (ctxt->states != NULL) {
9952 xmlRelaxNGAddStates(ctxt, ctxt->states, oldstate);
9954 ctxt->states = xmlRelaxNGNewStates(ctxt, 1);
9955 if (ctxt->states == NULL) {
9963 states, oldstate);
9964 xmlRelaxNGAddStates(ctxt, ctxt->states, ctxt->state);
9984 xmlRelaxNGStatesPtr states = NULL, res = NULL;
9994 * All the input states are also exit states
10002 for (j = 0; j < ctxt->states->nbState; j++) {
10006 states->
10017 if (ctxt->states != NULL) {
10018 states = ctxt->states;
10019 for (i = 0; i < states->nbState; i++) {
10020 ctxt->state = states->tabState[i];
10021 ctxt->states = NULL;
10032 } else if (ctxt->states != NULL) {
10033 for (j = 0; j < ctxt->states->nbState;
10038 states->
10045 ctxt->states);
10046 ctxt->states = NULL;
10071 } else if (ctxt->states != NULL) {
10072 for (j = 0; j < ctxt->states->nbState; j++) {
10075 states->
10080 if (states == NULL) {
10081 states = ctxt->states;
10084 ctxt->states);
10086 ctxt->states = NULL;
10101 if (states == NULL) {
10104 states = ctxt->states;
10105 if (states == NULL) {
10110 states->nbState = 0;
10112 xmlRelaxNGAddStates(ctxt, states,
10116 ctxt->states = states;
10120 if (states != NULL) {
10121 xmlRelaxNGFreeStates(ctxt, states);
10123 ctxt->states = res;
10137 xmlRelaxNGStatesPtr states = NULL;
10195 if (states == NULL) {
10196 states = xmlRelaxNGNewStates(ctxt, 1);
10199 xmlRelaxNGAddStates(ctxt, states, ctxt->state);
10200 } else if (ctxt->states != NULL) {
10201 for (i = 0; i < ctxt->states->nbState; i++) {
10202 xmlRelaxNGAddStates(ctxt, states,
10203 ctxt->states->
10206 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10207 ctxt->states = NULL;
10215 if (states != NULL) {
10217 ctxt->states = states;
10221 ctxt->states = NULL;
10427 xmlRelaxNGStatesPtr states, res;
10431 * We should NOT have both ctxt->state and ctxt->states
10433 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10438 if ((ctxt->states == NULL) || (ctxt->states->nbState == 1)) {
10439 if (ctxt->states != NULL) {
10440 ctxt->state = ctxt->states->tabState[0];
10441 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10442 ctxt->states = NULL;
10445 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10449 if ((ctxt->states != NULL) && (ctxt->states->nbState == 1)) {
10450 ctxt->state = ctxt->states->tabState[0];
10451 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10452 ctxt->states = NULL;
10457 states = ctxt->states;
10458 ctxt->states = NULL;
10463 for (i = 0; i < states->nbState; i++) {
10464 ctxt->state = states->tabState[i];
10465 ctxt->states = NULL;
10468 * We should NOT have both ctxt->state and ctxt->states
10470 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10475 if (ctxt->states == NULL) {
10481 /* add the state directly in states */
10482 states->tabState[j++] = ctxt->state;
10488 res = ctxt->states;
10489 ctxt->states = NULL;
10492 states->tabState[k]);
10495 for (k = 0; k < ctxt->states->nbState; k++)
10497 ctxt->states->tabState[k]);
10498 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10499 ctxt->states = NULL;
10506 } else if (ctxt->states != NULL) {
10507 for (k = 0; k < ctxt->states->nbState; k++)
10509 ctxt->states->tabState[k]);
10510 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10511 ctxt->states = NULL;
10517 xmlRelaxNGFreeStates(ctxt, states);
10518 ctxt->states = res;
10521 states->nbState = j;
10522 ctxt->states = states;
10525 ctxt->state = states->tabState[0];
10526 xmlRelaxNGFreeStates(ctxt, states);
10530 xmlRelaxNGFreeStates(ctxt, states);
10531 if (ctxt->states != NULL) {
10532 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10533 ctxt->states = NULL;
10536 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10584 } else if (ctxt->states != NULL) {
10588 for (i = 0; i < ctxt->states->nbState; i++) {
10589 state = ctxt->states->tabState[i];
10671 ret->states = NULL;
10691 if (ctxt->states != NULL)
10692 xmlRelaxNGFreeStates(NULL, ctxt->states);