3 * copy o->T to n->T, assumes that n->S is already copied */
| 23 | * copy o->T to n->T, assumes that n->S is already copied |
| 24 | */ |
| 25 | static void copyT (kStrategy o,kStrategy n) |
| 26 | { |
| 27 | int i,j; |
| 28 | poly p; |
| 29 | TSet t=(TSet)omAlloc0(o->tmax*sizeof(TObject)); |
| 30 | TObject** r = (TObject**)omAlloc0(o->tmax*sizeof(TObject*)); |
| 31 | |
| 32 | for (j=0; j<=o->tl; j++) |
| 33 | { |
| 34 | t[j] = o->T[j]; |
| 35 | r[t[j].i_r] = &t[j]; |
| 36 | p = o->T[j].p; |
| 37 | i = -1; |
| 38 | loop |
| 39 | { |
| 40 | i++; |
| 41 | if (i>o->sl) |
| 42 | { |
| 43 | t[j].p=pCopy(p); |
| 44 | break; |
| 45 | } |
| 46 | if (p == o->S[i]) |
| 47 | { |
| 48 | t[j].p=n->S[i]; |
| 49 | break; |
| 50 | } |
| 51 | } |
| 52 | t[j].t_p = NULL; // ?? or t[j].p ?? |
| 53 | t[j].max_exp = NULL; // ?? or p_GetMaxExpP(t[j].t_p,o->tailRing); ?? |
| 54 | t[j].pLength = pLength(p); |
| 55 | } |
| 56 | n->T=t; |
| 57 | n->R=r; |
| 58 | } |
no test coverage detected