Changeset d906dc in git for Singular/iparith.cc


Ignore:
Timestamp:
Jun 4, 2019, 2:33:32 PM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d4cec6ab781a81162945ff680935242fcccc952a
Parents:
56ff8efc45f5392a6e465782a66a5df5a54180f01708fac9cfbd392cceea00167eaa2746d291cd98
Message:
Merge branch 'spielwiese' into stable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r56ff8ef rd906dc  
    47694769  if (currRing==NULL)
    47704770  {
    4771     WerrorS("no ring active");
     4771    WerrorS("no ring active (1)");
    47724772    return TRUE;
    47734773  }
     
    53905390  if (currRing==NULL)
    53915391  {
    5392     WerrorS("no ring active");
     5392    WerrorS("no ring active (2)");
    53935393    return TRUE;
    53945394  }
     
    76857685  {
    76867686    Werror("%s(`ideal`,`ideal`,`matrix`,`string`)\n"
    7687            "or (`module`,`module`,`matrix`,`string`)expected",
     7687           "or (`module`,`module`,`matrix`,`string`) expected",
    76887688           Tok2Cmdname(iiOp));
    76897689    return TRUE;
     
    76927692static BOOLEAN jjLIFTSTD_4(leftv res, leftv U)
    76937693{
    7694   const short t1[]={4,IDEAL_CMD,IDEAL_CMD,MATRIX_CMD,STRING_CMD};
    7695   const short t2[]={4,MODUL_CMD,MODUL_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};
    76967696  leftv u=U;
    76977697  leftv v=u->next;
     
    77167716  else
    77177717  {
    7718     Werror("%s(`ideal`,`ideal`,`matrix`,`string`)\n"
    7719            "or (`module`,`module`,`matrix`,`string`)expected",
     7718    Werror("%s(`ideal`,`matrix`,`module`,`string`)\n"
     7719           "or (`module`,`matrix`,`module`,`string`) expected",
    77207720           Tok2Cmdname(iiOp));
    77217721    return TRUE;
     
    79307930  return FALSE;
    79317931}
     7932
     7933static 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}
    79328000static BOOLEAN jjSTRING_PL(leftv res, leftv v)
    79338001{
     
    81528220  leftv w = v->next;
    81538221  if (w==NULL) return TRUE;
    8154   leftv rest = w->next;;
     8222  leftv rest = w->next;
    81558223
    81568224  u->next = NULL;
     
    83558423          if (RingDependend(dA2[i].res))
    83568424          {
    8357             WerrorS("no ring active");
     8425            WerrorS("no ring active (3)");
    83588426            break;
    83598427          }
     
    83998467                if (RingDependend(dA2[i].res))
    84008468                {
    8401                   WerrorS("no ring active");
     8469                  WerrorS("no ring active (4)");
    84028470                  break;
    84038471                }
     
    85828650          if (RingDependend(dA1[i].res))
    85838651          {
    8584             WerrorS("no ring active");
     8652            WerrorS("no ring active (5)");
    85858653            break;
    85868654          }
     
    86258693              if (RingDependend(dA1[i].res))
    86268694              {
    8627                 WerrorS("no ring active");
     8695                WerrorS("no ring active (6)");
    86288696                break;
    86298697              }
     
    97579825  int at=a->Typ();
    97589826  leftv b=(leftv)bb;
    9759   int bt=b->Typ();;
     9827  int bt=b->Typ();
    97609828  if (at < bt) return -1;
    97619829  if (at > bt) return 1;
Note: See TracChangeset for help on using the changeset viewer.