Lines Matching refs: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
8100 } else if (ctxt->states != NULL) {
8105 for (i = 0; i < ctxt->states->nbState; i++) {
8106 state = ctxt->states->tabState[i];
8122 for (i = 0; i < ctxt->states->nbState; i++) {
8123 xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[i]);
8125 xmlRelaxNGFreeStates(ctxt, ctxt->states);
8126 ctxt->states = NULL;
9038 if ((ctxt->state != NULL) || (ctxt->states != NULL)) {
9272 } else if (ctxt->states != NULL) {
9282 for (j = 0; j < ctxt->states->nbState; j++) {
9283 cur = ctxt->states->tabState[j]->seq;
9287 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9291 if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
9293 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9300 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9303 if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
9305 lowattr = ctxt->states->tabState[j]->nbAttrLeft;
9313 if (ctxt->states->nbState > 0) {
9316 oldstate = ctxt->states->tabState[best];
9317 ctxt->states->tabState[best] = NULL;
9320 ctxt->states->tabState[ctxt->states->nbState - 1];
9321 ctxt->states->tabState[ctxt->states->nbState - 1] = NULL;
9324 for (j = 0; j < ctxt->states->nbState ; j++) {
9325 xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[j]);
9327 xmlRelaxNGFreeStates(ctxt, ctxt->states);
9328 ctxt->states = NULL;
9397 if ((ctxt->state != NULL) || (ctxt->states != NULL)) {
9530 * Find the "best" state in the ctxt->states list of states to report
9545 if ((ctxt == NULL) || (ctxt->states == NULL) ||
9546 (ctxt->states->nbState <= 0))
9549 for (i = 0; i < ctxt->states->nbState; i++) {
9550 state = ctxt->states->tabState[i];
9573 * Find the "best" state in the ctxt->states list of states to report
9581 if ((ctxt == NULL) || (ctxt->states == NULL) ||
9582 (ctxt->states->nbState <= 0))
9586 if ((best >= 0) && (best < ctxt->states->nbState)) {
9587 ctxt->state = ctxt->states->tabState[best];
9776 xmlRelaxNGStatesPtr tmpstates = ctxt->states;
9781 ctxt->states = NULL;
9788 ctxt->states = tmpstates;
9799 if (ctxt->states != NULL) {
9802 for (i = 0; i < ctxt->states->nbState; i++) {
9803 state = ctxt->states->tabState[i];
9819 for (i = 0; i < ctxt->states->nbState; i++) {
9821 ctxt->states->
9824 xmlRelaxNGFreeStates(ctxt, ctxt->states);
9826 ctxt->states = NULL;
9855 if (ctxt->states != NULL) {
9858 for (i = 0; i < ctxt->states->nbState; i++) {
9859 state = ctxt->states->tabState[i];
9874 for (i = 0; i < ctxt->states->nbState; i++) {
9876 ctxt->states->
9879 xmlRelaxNGFreeStates(ctxt, ctxt->states);
9881 ctxt->states = NULL;
9944 if (ctxt->states != NULL) {
9945 xmlRelaxNGAddStates(ctxt, ctxt->states, oldstate);
9947 ctxt->states = xmlRelaxNGNewStates(ctxt, 1);
9948 if (ctxt->states == NULL) {
9956 xmlRelaxNGAddStates(ctxt, ctxt->states, oldstate);
9957 xmlRelaxNGAddStates(ctxt, ctxt->states, ctxt->state);
9977 xmlRelaxNGStatesPtr states = NULL, res = NULL;
9987 * All the input states are also exit states
9995 for (j = 0; j < ctxt->states->nbState; j++) {
9999 states->
10010 if (ctxt->states != NULL) {
10011 states = ctxt->states;
10012 for (i = 0; i < states->nbState; i++) {
10013 ctxt->state = states->tabState[i];
10014 ctxt->states = NULL;
10025 } else if (ctxt->states != NULL) {
10026 for (j = 0; j < ctxt->states->nbState;
10031 states->
10038 ctxt->states);
10039 ctxt->states = NULL;
10064 } else if (ctxt->states != NULL) {
10065 for (j = 0; j < ctxt->states->nbState; j++) {
10068 states->
10073 if (states == NULL) {
10074 states = ctxt->states;
10077 ctxt->states);
10079 ctxt->states = NULL;
10094 if (states == NULL) {
10097 states = ctxt->states;
10098 if (states == NULL) {
10103 states->nbState = 0;
10105 xmlRelaxNGAddStates(ctxt, states,
10109 ctxt->states = states;
10113 if (states != NULL) {
10114 xmlRelaxNGFreeStates(ctxt, states);
10116 ctxt->states = res;
10130 xmlRelaxNGStatesPtr states = NULL;
10188 if (states == NULL) {
10189 states = xmlRelaxNGNewStates(ctxt, 1);
10192 xmlRelaxNGAddStates(ctxt, states, ctxt->state);
10193 } else if (ctxt->states != NULL) {
10194 for (i = 0; i < ctxt->states->nbState; i++) {
10195 xmlRelaxNGAddStates(ctxt, states,
10196 ctxt->states->
10199 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10200 ctxt->states = NULL;
10208 if (states != NULL) {
10210 ctxt->states = states;
10214 ctxt->states = NULL;
10420 xmlRelaxNGStatesPtr states, res;
10424 * We should NOT have both ctxt->state and ctxt->states
10426 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10431 if ((ctxt->states == NULL) || (ctxt->states->nbState == 1)) {
10432 if (ctxt->states != NULL) {
10433 ctxt->state = ctxt->states->tabState[0];
10434 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10435 ctxt->states = NULL;
10438 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10442 if ((ctxt->states != NULL) && (ctxt->states->nbState == 1)) {
10443 ctxt->state = ctxt->states->tabState[0];
10444 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10445 ctxt->states = NULL;
10450 states = ctxt->states;
10451 ctxt->states = NULL;
10456 for (i = 0; i < states->nbState; i++) {
10457 ctxt->state = states->tabState[i];
10458 ctxt->states = NULL;
10461 * We should NOT have both ctxt->state and ctxt->states
10463 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10468 if (ctxt->states == NULL) {
10474 /* add the state directly in states */
10475 states->tabState[j++] = ctxt->state;
10481 res = ctxt->states;
10482 ctxt->states = NULL;
10485 states->tabState[k]);
10488 for (k = 0; k < ctxt->states->nbState; k++)
10490 ctxt->states->tabState[k]);
10491 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10492 ctxt->states = NULL;
10499 } else if (ctxt->states != NULL) {
10500 for (k = 0; k < ctxt->states->nbState; k++)
10502 ctxt->states->tabState[k]);
10503 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10504 ctxt->states = NULL;
10510 xmlRelaxNGFreeStates(ctxt, states);
10511 ctxt->states = res;
10514 states->nbState = j;
10515 ctxt->states = states;
10518 ctxt->state = states->tabState[0];
10519 xmlRelaxNGFreeStates(ctxt, states);
10523 xmlRelaxNGFreeStates(ctxt, states);
10524 if (ctxt->states != NULL) {
10525 xmlRelaxNGFreeStates(ctxt, ctxt->states);
10526 ctxt->states = NULL;
10529 if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
10577 } else if (ctxt->states != NULL) {
10581 for (i = 0; i < ctxt->states->nbState; i++) {
10582 state = ctxt->states->tabState[i];
10664 ret->states = NULL;
10684 if (ctxt->states != NULL)
10685 xmlRelaxNGFreeStates(NULL, ctxt->states);