3 * converts a list of modules into a resolution */
| 3247 | * converts a list of modules into a resolution |
| 3248 | */ |
| 3249 | syStrategy syConvList(lists li) |
| 3250 | { |
| 3251 | int typ0; |
| 3252 | syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy)); |
| 3253 | |
| 3254 | resolvente fr = liFindRes(li,&(result->length),&typ0,&(result->weights)); |
| 3255 | if (fr != NULL) |
| 3256 | { |
| 3257 | |
| 3258 | result->fullres = (resolvente)omAlloc0((result->length+1)*sizeof(ideal)); |
| 3259 | for (int i=result->length-1;i>=0;i--) |
| 3260 | { |
| 3261 | if (fr[i]!=NULL) |
| 3262 | result->fullres[i] = idCopy(fr[i]); |
| 3263 | } |
| 3264 | result->list_length=result->length; |
| 3265 | omFreeSize((ADDRESS)fr,(result->length)*sizeof(ideal)); |
| 3266 | } |
| 3267 | else |
| 3268 | { |
| 3269 | omFreeSize(result, sizeof(ssyStrategy)); |
| 3270 | result = NULL; |
| 3271 | } |
| 3272 | return result; |
| 3273 | } |
| 3274 | |
| 3275 | #if 0 |
| 3276 | /*3 |