Changeset 10ea86a in git
- Timestamp:
- Feb 10, 2021, 2:21:22 PM (2 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 128f6e114bf15118ac5e6486fce5d0b0c7b5d099
- Parents:
- ad3ce5bc5a80205609240191f75599c26d8da182
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rad3ce5b r10ea86a 2152 2152 int par_perm_size=0; 2153 2153 BOOLEAN bo; 2154 if ((nMap=n_SetMap(r->cf,currRing->cf))==NULL) 2154 nMap=n_SetMap(r->cf,currRing->cf); 2155 if (nMap==NULL) 2155 2156 { 2156 2157 // Allow imap/fetch to be make an exception only for: … … 2165 2166 goto err_fetch; 2166 2167 } 2168 } 2169 else 2170 { 2171 par_perm_size=rPar(r); 2167 2172 } 2168 2173 if ((iiOp!=FETCH_CMD) || (r->N!=currRing->N) || (rPar(r)!=rPar(currRing))) … … 2211 2216 } 2212 2217 } 2213 if ( (iiOp==FETCH_CMD) &&(BVERBOSE(V_IMAP)))2218 if (BVERBOSE(V_IMAP)) 2214 2219 { 2215 2220 unsigned i; … … 7920 7925 static BOOLEAN jjRESERVEDLIST0(leftv res, leftv) 7921 7926 { 7922 unsigned i=1; 7923 int l = 0; 7924 int k = 0; 7925 lists L = (lists)omAllocBin(slists_bin); 7926 struct blackbox_list *bb_list = NULL; 7927 unsigned nCount = (sArithBase.nCmdUsed-1) / 3; 7928 7929 if ((3*nCount) < sArithBase.nCmdUsed) { 7930 nCount++; 7931 } 7932 bb_list = getBlackboxTypes(); 7933 // count the number of entries; 7934 for (i=0; i<nCount; i++) { 7935 l++; 7936 if (i + 1 + nCount < sArithBase.nCmdUsed) { 7937 l++; 7938 } 7939 if(i+1+2*nCount<sArithBase.nCmdUsed) { 7940 l++; 7941 } 7942 } 7943 for (i = 0; i < bb_list->count; i++) { 7944 if (bb_list->list[i] != NULL) { 7945 l++; 7946 } 7947 } 7948 // initiate list 7949 L->Init(l); 7950 k = 0; 7951 for (i=0; i<nCount; i++) { 7952 L->m[k].rtyp = STRING_CMD; 7953 L->m[k].data = omStrDup(sArithBase.sCmds[i+1].name); 7954 k++; 7955 // Print("%-20s", sArithBase.sCmds[i+1].name); 7956 if (i + 1 + nCount < sArithBase.nCmdUsed) { 7957 L->m[k].rtyp = STRING_CMD; 7958 L->m[k].data = omStrDup(sArithBase.sCmds[i+1+nCount].name); 7959 k++; 7960 // Print("%-20s", sArithBase.sCmds[i+1 + nCount].name); 7961 } 7962 if(i+1+2*nCount<sArithBase.nCmdUsed) { 7963 L->m[k].rtyp = STRING_CMD; 7964 L->m[k].data = omStrDup(sArithBase.sCmds[i+1+2*nCount].name); 7965 k++; 7966 // Print("%-20s", sArithBase.sCmds[i+1+2*nCount].name); 7967 } 7968 // PrintLn(); 7969 } 7970 7971 // assign blackbox types 7972 for (i = 0; i < bb_list->count; i++) { 7973 if (bb_list->list[i] != NULL) { 7974 L->m[k].rtyp = STRING_CMD; 7975 // already used strdup in getBlackBoxTypes 7976 L->m[k].data = bb_list->list[i]; 7977 k++; 7978 } 7979 } 7980 // free the struct (not the list entries itself, which were allocated 7981 // by strdup) 7982 omfree(bb_list->list); 7983 omfree(bb_list); 7984 7985 // pass the resultant list to the res datastructure 7986 res->data=(void *)L; 7987 7988 return FALSE; 7927 unsigned i=1; 7928 int l = 0; 7929 int k = 0; 7930 lists L = (lists)omAllocBin(slists_bin); 7931 struct blackbox_list *bb_list = NULL; 7932 unsigned nCount = (sArithBase.nCmdUsed-1) / 3; 7933 7934 if ((3*nCount) < sArithBase.nCmdUsed) 7935 { 7936 nCount++; 7937 } 7938 bb_list = getBlackboxTypes(); 7939 // count the number of entries; 7940 for (i=0; i<nCount; i++) 7941 { 7942 l++; 7943 if (i + 1 + nCount < sArithBase.nCmdUsed) 7944 { 7945 l++; 7946 } 7947 if(i+1+2*nCount<sArithBase.nCmdUsed) 7948 { 7949 l++; 7950 } 7951 } 7952 for (i = 0; i < bb_list->count; i++) 7953 { 7954 if (bb_list->list[i] != NULL) 7955 { 7956 l++; 7957 } 7958 } 7959 // initiate list 7960 L->Init(l); 7961 k = 0; 7962 for (i=0; i<nCount; i++) 7963 { 7964 L->m[k].rtyp = STRING_CMD; 7965 L->m[k].data = omStrDup(sArithBase.sCmds[i+1].name); 7966 k++; 7967 // Print("%-20s", sArithBase.sCmds[i+1].name); 7968 if (i + 1 + nCount < sArithBase.nCmdUsed) 7969 { 7970 L->m[k].rtyp = STRING_CMD; 7971 L->m[k].data = omStrDup(sArithBase.sCmds[i+1+nCount].name); 7972 k++; 7973 // Print("%-20s", sArithBase.sCmds[i+1 + nCount].name); 7974 } 7975 if(i+1+2*nCount<sArithBase.nCmdUsed) 7976 { 7977 L->m[k].rtyp = STRING_CMD; 7978 L->m[k].data = omStrDup(sArithBase.sCmds[i+1+2*nCount].name); 7979 k++; 7980 // Print("%-20s", sArithBase.sCmds[i+1+2*nCount].name); 7981 } 7982 // PrintLn(); 7983 } 7984 7985 // assign blackbox types 7986 for (i = 0; i < bb_list->count; i++) 7987 { 7988 if (bb_list->list[i] != NULL) 7989 { 7990 L->m[k].rtyp = STRING_CMD; 7991 // already used strdup in getBlackBoxTypes 7992 L->m[k].data = bb_list->list[i]; 7993 k++; 7994 } 7995 } 7996 // free the struct (not the list entries itself, which were allocated 7997 // by strdup) 7998 omfree(bb_list->list); 7999 omfree(bb_list); 8000 8001 // pass the resultant list to the res datastructure 8002 res->data=(void *)L; 8003 8004 return FALSE; 7989 8005 } 7990 8006 static BOOLEAN jjSTRING_PL(leftv res, leftv v)
Note: See TracChangeset
for help on using the changeset viewer.