Changeset d906dc in git for Singular/iparith.cc
- Timestamp:
- Jun 4, 2019, 2:33:32 PM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- d4cec6ab781a81162945ff680935242fcccc952a
- Parents:
- 56ff8efc45f5392a6e465782a66a5df5a54180f01708fac9cfbd392cceea00167eaa2746d291cd98
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r56ff8ef rd906dc 4769 4769 if (currRing==NULL) 4770 4770 { 4771 WerrorS("no ring active ");4771 WerrorS("no ring active (1)"); 4772 4772 return TRUE; 4773 4773 } … … 5390 5390 if (currRing==NULL) 5391 5391 { 5392 WerrorS("no ring active ");5392 WerrorS("no ring active (2)"); 5393 5393 return TRUE; 5394 5394 } … … 7685 7685 { 7686 7686 Werror("%s(`ideal`,`ideal`,`matrix`,`string`)\n" 7687 "or (`module`,`module`,`matrix`,`string`) expected",7687 "or (`module`,`module`,`matrix`,`string`) expected", 7688 7688 Tok2Cmdname(iiOp)); 7689 7689 return TRUE; … … 7692 7692 static BOOLEAN jjLIFTSTD_4(leftv res, leftv U) 7693 7693 { 7694 const short t1[]={4,IDEAL_CMD, IDEAL_CMD,MATRIX_CMD,STRING_CMD};7695 const short t2[]={4,MODUL_CMD,M ODUL_CMD,MATRIX_CMD,STRING_CMD};7694 const short t1[]={4,IDEAL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD}; 7695 const short t2[]={4,MODUL_CMD,MATRIX_CMD,MODUL_CMD,STRING_CMD}; 7696 7696 leftv u=U; 7697 7697 leftv v=u->next; … … 7716 7716 else 7717 7717 { 7718 Werror("%s(`ideal`,` ideal`,`matrix`,`string`)\n"7719 "or (`module`,`m odule`,`matrix`,`string`)expected",7718 Werror("%s(`ideal`,`matrix`,`module`,`string`)\n" 7719 "or (`module`,`matrix`,`module`,`string`) expected", 7720 7720 Tok2Cmdname(iiOp)); 7721 7721 return TRUE; … … 7930 7930 return FALSE; 7931 7931 } 7932 7933 static BOOLEAN jjRESERVEDLIST0(leftv res, leftv) 7934 { 7935 unsigned i=1; 7936 int l = 0; 7937 int k = 0; 7938 lists L = (lists)omAllocBin(slists_bin); 7939 struct blackbox_list *bb_list = NULL; 7940 unsigned nCount = (sArithBase.nCmdUsed-1) / 3; 7941 if ((3*nCount) < sArithBase.nCmdUsed) { 7942 nCount++; 7943 } 7944 bb_list = getBlackboxTypes(); 7945 // count the number of entries; 7946 for (i=0; i<nCount; i++) { 7947 l++; 7948 if (i + 1 + nCount < sArithBase.nCmdUsed) { 7949 l++; 7950 } 7951 if(i+1+2*nCount<sArithBase.nCmdUsed) { 7952 l++; 7953 } 7954 } 7955 for (i = 0; i < bb_list->count; i++) { 7956 if (bb_list->list[i] != NULL) { 7957 l++; 7958 } 7959 } 7960 // initiate list 7961 L->Init(l); 7962 k = 0; 7963 for (i=0; i<nCount; i++) { 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 L->m[k].rtyp = STRING_CMD; 7970 L->m[k].data = omStrDup(sArithBase.sCmds[i+1+nCount].name); 7971 k++; 7972 // Print("%-20s", sArithBase.sCmds[i+1 + nCount].name); 7973 } 7974 if(i+1+2*nCount<sArithBase.nCmdUsed) { 7975 L->m[k].rtyp = STRING_CMD; 7976 L->m[k].data = omStrDup(sArithBase.sCmds[i+1+2*nCount].name); 7977 k++; 7978 // Print("%-20s", sArithBase.sCmds[i+1+2*nCount].name); 7979 } 7980 // PrintLn(); 7981 } 7982 7983 // assign blackbox types 7984 for (i = 0; i < bb_list->count; i++) { 7985 if (bb_list->list[i] != NULL) { 7986 L->m[k].rtyp = STRING_CMD; 7987 // already used strdup in getBlackBoxTypes 7988 L->m[k].data = bb_list->list[i]; 7989 k++; 7990 } 7991 } 7992 // free the struct (not the list itself) 7993 omfree(bb_list); 7994 7995 // pass the resultant list to the res datastructure 7996 res->data=(void *)L; 7997 7998 return FALSE; 7999 } 7932 8000 static BOOLEAN jjSTRING_PL(leftv res, leftv v) 7933 8001 { … … 8152 8220 leftv w = v->next; 8153 8221 if (w==NULL) return TRUE; 8154 leftv rest = w->next; ;8222 leftv rest = w->next; 8155 8223 8156 8224 u->next = NULL; … … 8355 8423 if (RingDependend(dA2[i].res)) 8356 8424 { 8357 WerrorS("no ring active ");8425 WerrorS("no ring active (3)"); 8358 8426 break; 8359 8427 } … … 8399 8467 if (RingDependend(dA2[i].res)) 8400 8468 { 8401 WerrorS("no ring active ");8469 WerrorS("no ring active (4)"); 8402 8470 break; 8403 8471 } … … 8582 8650 if (RingDependend(dA1[i].res)) 8583 8651 { 8584 WerrorS("no ring active ");8652 WerrorS("no ring active (5)"); 8585 8653 break; 8586 8654 } … … 8625 8693 if (RingDependend(dA1[i].res)) 8626 8694 { 8627 WerrorS("no ring active ");8695 WerrorS("no ring active (6)"); 8628 8696 break; 8629 8697 } … … 9757 9825 int at=a->Typ(); 9758 9826 leftv b=(leftv)bb; 9759 int bt=b->Typ(); ;9827 int bt=b->Typ(); 9760 9828 if (at < bt) return -1; 9761 9829 if (at > bt) return 1;
Note: See TracChangeset
for help on using the changeset viewer.