Changeset 5c5b5f in git


Ignore:
Timestamp:
Oct 7, 2014, 4:13:45 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
2455ae6fe3bbd5214d1e2de1edd1ff163ac16d75
Parents:
df34b172db2946b2ec01ead72293e38991e6bc087a979beb4fba275a95a03fbc0afbbfaa3aea04e4
Message:
Merge pull request #645 from surface-smoothers/fix.proposal.tr595

Fix.proposal.tr595
Files:
12 added
4 deleted
36 edited

Legend:

Unmodified
Added
Removed
  • COPYING

    r7a979b r5c5b5f  
    1414
    1515Some single files have a copyright given within the file:
    16 Singular/links/ndbm.* (BSD), Singular/htmlhelp.h (LGPL 2.1+)
     16Singular/links/ndbm.* (BSD)
    1717
    1818The following software modules shipped with SINGULAR have their own
  • Singular/COPYING

    r7a979b r5c5b5f  
    1818
    1919Some single files have a copyright given within the file:
    20 Singular/ndbm.* (BSD), Singular/htmlhelp.h (LGPL 2.1+)
     20Singular/ndbm.* (BSD).
    2121
    2222This program is distributed in the hope that it will be useful, but
  • Singular/LIB/help.cnf

    r7a979b r5c5b5f  
    99#  h- requires html dir
    1010#  D- requires the enviroment variable DISPLAY
    11 #  C- requires Windows-help: Manual.chm
    1211#  E:executable:- requires the named exectable
    1312#  O:`uname -m`-`uname -s`:- requires the named uname
     
    2524# the default help browsers builtin, dummy and emacs are always
    2625#   available and should NOT be mentioned here
    27 # ix86_Win: has additional default browsers: htmlhelp, html and winhlp
    28 #   also not mentioned here
    2926#----------------------------------------------------
    3027htmlview!xDhE:htmlview:!htmlview %h &
     
    3633galeon!xDhE:galeon:!galeon -n %h &
    3734netscape!xDhE:netscape:!(netscape -remote "openURL(%h)")||(netscape %h) &
     35cygwin!xhE:cygstart:!cygstart "%h" &
     36cygwin-www!E:cygstart:!cygstart "%H" &
    3837safari!xhE:/Applications/Safari.app:!open /Applications/Safari.app %h
    3938tkinfo!xDiE:tkinfo:!tkinfo '(%i)%n' &
  • Singular/LIB/normal.lib

    rdf34b17 r5c5b5f  
    40184018        for ( jj = n(ii-1)+1; jj<=n(ii); jj++)
    40194019        {
    4020           if( Le[4][jj] !=0 )     //jj=index of var which was not substituted
     4020          if(  Le[4][jj] !=0 or                                             // jj=index of var which was not substituted
     4021               (  (ii==n3-1) and ( jj==n(ii) ) and  (size(newg2)==0) )      // or we have no variables yet in the new ring and
     4022                                                                            // want to keep at least the last one!
     4023            )
    40214024          {
    40224025            kk=kk+1;
     
    40834086      export(normap);
    40844087      list L = newBAS;
     4088      setring BAS;
    40854089      return(L);
    40864090
  • Singular/LIB/primdecint.lib

    r7a979b r5c5b5f  
    6767
    6868
    69    if(deg(I[1]) == 0)
     69   if(size(I)==1 && deg(I[1]) == 0)
    7070   {
    7171      ideal J = I;
     
    9595      number q=imap(R,q);
    9696      //=== computes the primes occuring in a generator of I intersect Z
    97 
    9897      list L = primefactors(q);
    9998
     
    171170            i_sleep = system("sh", "sleep "+string(t));
    172171         }
    173 
    174172      }
    175173      else
     
    177175         for(j=1;j<=size(L[2]);j++)
    178176         {
    179             A[size(A)+1] = modp(J, L[1][j], L[2][j]);
     177            p=int(L[1][j]);
     178            nu=int(L[2][j]);
     179            A[size(A)+1] = modp(J, p,nu );
    180180         }
    181181      }
  • Singular/LIB/schreyer.lib

    r7a979b r5c5b5f  
    135135  def @save = basering;
    136136 
    137   int @DEBUG = !system("with", "ndebug");
     137  int @DEBUG = 0; // !system("with", "ndebug");
    138138  if( @DEBUG )
    139139  {
     
    223223static proc Sstep()
    224224{
    225   int @DEBUG = !system("with", "ndebug");
     225  int @DEBUG = 0; // !system("with", "ndebug");
    226226
    227227  if( @DEBUG )
     
    566566  def @save = basering;
    567567 
    568   int @DEBUG = !system("with", "ndebug");
     568  int @DEBUG = 0; // !system("with", "ndebug");
    569569
    570570  if( typeof( attrib(SSinit, "DEBUG") ) == "int" )
     
    573573  }
    574574
    575   int @SYZCHECK = @DEBUG;
     575  int @SYZCHECK = 0; // @DEBUG;
    576576
    577577  if( typeof( attrib(SSinit, "SYZCHECK") ) == "int" )
     
    767767  } else
    768768  {
    769     attrib(S, "LEAD2SYZ", 1);
     769    attrib(S, "LEAD2SYZ", 0);
    770770  }
    771771
     
    784784  } else
    785785  {
    786     attrib(S, "HYBRIDNF", 2);
     786    attrib(S, "HYBRIDNF", 0);
    787787  }
    788788 
     
    848848  } else
    849849  {
    850     int @DEBUG = !system("with", "ndebug");
     850    int @DEBUG = 0; // !system("with", "ndebug");
    851851  }
    852852
     
    967967  } else
    968968  {
    969     int @DEBUG = !system("with", "ndebug");
     969    int @DEBUG = 0; // !system("with", "ndebug");
    970970  }
    971971
     
    11901190  } else
    11911191  {
    1192     int @DEBUG = !system("with", "ndebug");
     1192    int @DEBUG = 0; // !system("with", "ndebug");
    11931193  }
    11941194
     
    13211321  } else
    13221322  {
    1323     int @DEBUG = !system("with", "ndebug");
     1323    int @DEBUG = 0; // !system("with", "ndebug");
    13241324  }
    13251325
     
    14311431  } else
    14321432  {
    1433     int @DEBUG = !system("with", "ndebug");
     1433    int @DEBUG = 0; // !system("with", "ndebug");
    14341434  }
    14351435
     
    15121512  } else
    15131513  {
    1514     int @DEBUG = !system("with", "ndebug");
     1514    int @DEBUG = 0; // !system("with", "ndebug");
    15151515  }
    15161516
     
    21172117static proc loadme()
    21182118{
    2119   int @DEBUG = !system("with", "ndebug");
     2119  int @DEBUG = 0; // !system("with", "ndebug");
    21202120
    21212121  if( @DEBUG )
    21222122  {
    21232123   
    2124     "ndebug?: ", system("with", "ndebug");
    2125     "om_ndebug?: ", system("with", "om_ndebug");
     2124//    "ndebug?: ", system("with", "ndebug");
     2125//    "om_ndebug?: ", system("with", "om_ndebug");
    21262126
    21272127    listvar(Top);
     
    21342134    if( 1 )
    21352135    {
    2136 
     2136/*
    21372137      if( @DEBUG )
    21382138      {
     
    21422142        "Loading the Release version!";
    21432143      }
    2144      
     2144*/     
    21452145      load("syzextra.so");
    21462146
     
    21902190      exportto(Schreyer, Syzextra::ComputeResolution);     
    21912191    }
    2192 /*
    2193     else
    2194     {
    2195 
    2196       load("syzextra.so");
    2197 
    2198       if( @DEBUG )
    2199       {     
    2200         listvar(Syzextra_g);
    2201       }
    2202      
    2203       exportto(Top, Syzextra_g::ClearContent);
    2204       exportto(Top, Syzextra_g::ClearDenominators);
    2205 
    2206       exportto(Schreyer, Syzextra_g::m2_end);
    2207 
    2208 //      export Syzextra_g;
    2209 //      exportto(Schreyer, Syzextra_g::noop);
    2210       exportto(Schreyer, Syzextra_g::DetailedPrint);
    2211       exportto(Schreyer, Syzextra_g::leadmonomial);
    2212       exportto(Schreyer, Syzextra_g::leadcomp);
    2213 //      exportto(Schreyer, Syzextra_g::leadrawexp);
    2214 //      exportto(Schreyer, Syzextra_g::ISUpdateComponents);
    2215       exportto(Schreyer, Syzextra_g::SetInducedReferrence);
    2216       exportto(Schreyer, Syzextra_g::GetInducedData);
    2217 //      exportto(Schreyer, Syzextra_g::GetAMData);
    2218 //      exportto(Schreyer, Syzextra_g::SetSyzComp);
    2219       exportto(Schreyer, Syzextra_g::MakeInducedSchreyerOrdering);
    2220 //      exportto(Schreyer, Syzextra_g::MakeSyzCompOrdering);
    2221       exportto(Schreyer, Syzextra_g::idPrepare);
    2222 //      exportto(Schreyer, Syzextra_g::reduce_syz);
    2223 //      exportto(Schreyer, Syzextra_g::p_Content);
    2224 
    2225       exportto(Schreyer, Syzextra_g::ProfilerStart); exportto(Schreyer, Syzextra_g::ProfilerStop);
    2226 
    2227       exportto(Schreyer, Syzextra_g::Tail);
    2228       exportto(Schreyer, Syzextra_g::ComputeLeadingSyzygyTerms);
    2229       exportto(Schreyer, Syzextra_g::Compute2LeadingSyzygyTerms);
    2230       exportto(Schreyer, Syzextra_g::Sort_c_ds);
    2231 
    2232       exportto(Schreyer, Syzextra_g::FindReducer);
    2233      
    2234       exportto(Schreyer, Syzextra_g::ReduceTerm);
    2235       exportto(Schreyer, Syzextra_g::TraverseTail);
    2236 
    2237       exportto(Schreyer, Syzextra_g::SchreyerSyzygyNF);
    2238       exportto(Schreyer, Syzextra_g::ComputeSyzygy);
    2239 
    2240       exportto(Schreyer, Syzextra_g::ComputeResolution);     
    2241     }
    2242 */
    22432192
    22442193    exportto(Top, DetailedPrint);
  • Singular/Makefile.am

    r7a979b r5c5b5f  
    5555   links/silink.cc\
    5656   links/sing_dbm.cc\
    57    sing_win.cc\
    5857   links/slInit_Static.cc\
    5958   links/ssiLink.cc\
     
    108107   links/silink.h \
    109108   links/sing_dbm.h \
    110    sing_win.h \
    111109   links/slInit.h \
    112110   links/ssiLink.h \
  • Singular/cntrlc.h

    r7a979b r5c5b5f  
    88*/
    99#include <setjmp.h>
     10#include <misc/auxiliary.h>
    1011#include <kernel/structs.h>
    1112
  • Singular/dyn_modules/gfanlib/Makefile.am

    r7a979b r5c5b5f  
    2323gfanlib_la_SOURCES  = $(SOURCES)
    2424
    25 gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON}
     25gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON} ${CDDGMPCPPFLAGS}
    2626gfanlib_la_LDFLAGS  = ${P_PROCS_MODULE_LDFLAGS}
    2727
  • Singular/emacs.cc

    r7a979b r5c5b5f  
    99
    1010
     11#ifdef __CYGWIN__
     12#define BOOLEAN boolean
     13#endif
    1114#include <kernel/mod2.h>
    1215
     
    2326#include <string.h>
    2427
    25 #ifdef ix86_Win
     28#ifdef __CYGWIN__
    2629#include <windows.h>
    2730#endif
     
    3942#endif
    4043
    41 #ifndef BOOLEAN
    42 #define BOOLEAN int
    43 #endif
    4444#ifndef FALSE
    4545#define FALSE 0
     
    5555#  define  UP_DIR ".."
    5656
    57 #ifndef ix86_Win
     57#ifndef __CYGWIN__
    5858void error(const char *fmt, ...)
    5959{
     
    212212  }
    213213
    214 #ifdef ix86_Win
     214#ifdef __CYGWIN__
    215215#define EXTRA_XTERM_ARGS "+vb -sl 2000 -fb Courier-bold-12 -tn xterm -cr Red3"
    216216#else
     
    269269      // look in home-dir
    270270      emacs_load = getenv("HOME");
    271 #ifdef ix86_Win
     271#ifdef __CYGWIN__
    272272      if ((emacs_load==NULL)||(!access(emacs_load,X_OK)))
    273273        emacs_load = getenv("SINGHOME");
  • Singular/extra.cc

    • Property mode changed from 100644 to 100755
    r7a979b r5c5b5f  
    88#define HAVE_WALK 1
    99
    10 
    11 
    12 
    1310#include <kernel/mod2.h>
    1411#include <misc/auxiliary.h>
     
    1613
    1714#include <factory/factory.h>
    18 
    1915
    2016#include <stdlib.h>
     
    120116#endif
    121117
    122 
    123118#ifdef HAVE_SPECTRUM
    124119#include <kernel/spectrum/spectrum.h>
     
    136131#endif
    137132
    138 #ifdef ix86_Win /* only for the DLLTest */
     133#ifdef __CYGWIN__ /* only for the DLLTest */
    139134/* #include "WinDllTest.h" */
    140135#ifdef HAVE_DL
     
    145140
    146141// Define to enable many more system commands
    147 #undef MAKE_DISTRIBUTION
     142//#undef MAKE_DISTRIBUTION
    148143#ifndef MAKE_DISTRIBUTION
    149144#define HAVE_EXTENDED_SYSTEM 1
     
    181176//#endif /* not HAVE_DYNAMIC_LOADING */
    182177
    183 #ifdef ix86_Win
     178#ifdef __CYGWIN__
    184179//#include <Python.h>
    185180//#include <python_wrapper.h>
     
    190185#endif
    191186
    192 #ifdef ix86_Win  /* PySingular initialized? */
     187#ifdef __CYGWIN__  /* PySingular initialized? */
    193188static int PyInitialized = 0;
    194189#endif
     
    314309    else
    315310
    316 
    317 
    318 
    319311/*==================== gen ==================================*/
    320312// // This seems to be obsolette...?!
     
    330322    if(strcmp(sys_cmd,"sh")==0)
    331323    {
    332       if (feOptValue(FE_OPT_NO_SHELL)) {
    333        WerrorS("shell execution is disallowed in restricted mode");
    334        return TRUE;
    335        }
     324      if (feOptValue(FE_OPT_NO_SHELL))
     325      {
     326        WerrorS("shell execution is disallowed in restricted mode");
     327        return TRUE;
     328      }
    336329      res->rtyp=INT_CMD;
    337330      if (h==NULL) res->data = (void *)(long) system("sh");
     
    420413      else if (h->Typ()==STRING_CMD)
    421414      {
    422           #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else
    423           char *s=(char *)h->Data();
    424           res->rtyp=INT_CMD;
    425           #ifdef HAVE_DBM
    426             TEST_FOR("DBM")
    427           #endif
    428           #ifdef HAVE_DLD
    429             TEST_FOR("DLD")
    430           #endif
    431             //TEST_FOR("factory")
    432             //TEST_FOR("libfac")
    433           #ifdef HAVE_READLINE
    434             TEST_FOR("readline")
    435           #endif
    436           #ifdef TEST_MAC_ORDER
    437             TEST_FOR("MAC_ORDER")
    438           #endif
    439           // unconditional since 3-1-0-6
    440             TEST_FOR("Namespaces")
    441           #ifdef HAVE_DYNAMIC_LOADING
    442             TEST_FOR("DynamicLoading")
    443           #endif
    444           #ifdef HAVE_EIGENVAL
    445             TEST_FOR("eigenval")
    446           #endif
    447           #ifdef HAVE_GMS
    448             TEST_FOR("gms")
    449           #endif
    450           #ifdef OM_NDEBUG
    451             TEST_FOR("om_ndebug")
    452           #endif
    453           #ifdef SING_NDEBUG
    454             TEST_FOR("ndebug")
    455           #endif
    456             {};
     415        #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else
     416        char *s=(char *)h->Data();
     417        res->rtyp=INT_CMD;
     418        #ifdef HAVE_DBM
     419          TEST_FOR("DBM")
     420        #endif
     421        #ifdef HAVE_DLD
     422          TEST_FOR("DLD")
     423        #endif
     424          //TEST_FOR("factory")
     425          //TEST_FOR("libfac")
     426        #ifdef HAVE_READLINE
     427          TEST_FOR("readline")
     428        #endif
     429        #ifdef TEST_MAC_ORDER
     430          TEST_FOR("MAC_ORDER")
     431        #endif
     432        // unconditional since 3-1-0-6
     433          TEST_FOR("Namespaces")
     434        #ifdef HAVE_DYNAMIC_LOADING
     435          TEST_FOR("DynamicLoading")
     436        #endif
     437        #ifdef HAVE_EIGENVAL
     438          TEST_FOR("eigenval")
     439        #endif
     440        #ifdef HAVE_GMS
     441          TEST_FOR("gms")
     442        #endif
     443        #ifdef OM_NDEBUG
     444          TEST_FOR("om_ndebug")
     445        #endif
     446        #ifdef SING_NDEBUG
     447          TEST_FOR("ndebug")
     448        #endif
     449          {};
    457450          return FALSE;
    458           #undef TEST_FOR
    459         }
     451        #undef TEST_FOR
     452      }
     453      return TRUE;
     454    }
     455    else
     456  /*==================== browsers ==================================*/
     457    if (strcmp(sys_cmd,"browsers")==0)
     458    {
     459      res->rtyp = STRING_CMD;
     460      StringSetS("");
     461      feStringAppendBrowsers(0);
     462      res->data = StringEndS();
     463      return FALSE;
     464    }
     465    else
     466  /*==================== pid ==================================*/
     467    if (strcmp(sys_cmd,"pid")==0)
     468    {
     469      res->rtyp=INT_CMD;
     470      res->data=(void *)(long) getpid();
     471      return FALSE;
     472    }
     473    else
     474  /*==================== getenv ==================================*/
     475    if (strcmp(sys_cmd,"getenv")==0)
     476    {
     477      if ((h!=NULL) && (h->Typ()==STRING_CMD))
     478      {
     479        res->rtyp=STRING_CMD;
     480        const char *r=getenv((char *)h->Data());
     481        if (r==NULL) r="";
     482        res->data=(void *)omStrDup(r);
     483        return FALSE;
     484      }
     485      else
     486      {
     487        WerrorS("string expected");
    460488        return TRUE;
    461489      }
    462       else
    463   /*==================== browsers ==================================*/
    464       if (strcmp(sys_cmd,"browsers")==0)
    465       {
    466         res->rtyp = STRING_CMD;
    467         StringSetS("");
    468         feStringAppendBrowsers(0);
    469         res->data = StringEndS();
    470         return FALSE;
    471       }
    472       else
    473   /*==================== pid ==================================*/
    474       if (strcmp(sys_cmd,"pid")==0)
    475       {
    476         res->rtyp=INT_CMD;
    477         res->data=(void *)(long) getpid();
    478         return FALSE;
    479       }
    480       else
    481   /*==================== getenv ==================================*/
    482       if (strcmp(sys_cmd,"getenv")==0)
    483       {
    484         if ((h!=NULL) && (h->Typ()==STRING_CMD))
    485         {
    486           res->rtyp=STRING_CMD;
    487           const char *r=getenv((char *)h->Data());
    488           if (r==NULL) r="";
    489           res->data=(void *)omStrDup(r);
     490    }
     491    else
     492  /*==================== setenv ==================================*/
     493    if (strcmp(sys_cmd,"setenv")==0)
     494    {
     495  #ifdef HAVE_SETENV
     496      if (h!=NULL && h->Typ()==STRING_CMD && h->Data() != NULL &&
     497          h->next != NULL && h->next->Typ() == STRING_CMD
     498          && h->next->Data() != NULL)
     499      {
     500        res->rtyp=STRING_CMD;
     501        setenv((char *)h->Data(), (char *)h->next->Data(), 1);
     502        res->data=(void *)omStrDup((char *)h->next->Data());
     503        feReInitResources();
     504        return FALSE;
     505      }
     506      else
     507      {
     508        WerrorS("two strings expected");
     509        return TRUE;
     510      }
     511  #else
     512      WerrorS("setenv not supported on this platform");
     513      return TRUE;
     514  #endif
     515    }
     516    else
     517  /*==================== Singular ==================================*/
     518    if (strcmp(sys_cmd, "Singular") == 0)
     519    {
     520      res->rtyp=STRING_CMD;
     521      const char *r=feResource("Singular");
     522      if (r == NULL) r="";
     523      res->data = (void*) omStrDup( r );
     524      return FALSE;
     525    }
     526    else
     527    if (strcmp(sys_cmd, "SingularLib") == 0)
     528    {
     529      res->rtyp=STRING_CMD;
     530      const char *r=feResource("SearchPath");
     531      if (r == NULL) r="";
     532      res->data = (void*) omStrDup( r );
     533      return FALSE;
     534    }
     535    else
     536  /*==================== options ==================================*/
     537    if (strstr(sys_cmd, "--") == sys_cmd)
     538    {
     539      if (strcmp(sys_cmd, "--") == 0)
     540      {
     541        fePrintOptValues();
     542        return FALSE;
     543      }
     544      feOptIndex opt = feGetOptIndex(&sys_cmd[2]);
     545      if (opt == FE_OPT_UNDEF)
     546      {
     547        Werror("Unknown option %s", sys_cmd);
     548        WerrorS("Use 'system(\"--\");' for listing of available options");
     549        return TRUE;
     550      }
     551      // for Untyped Options (help version),
     552      // setting it just triggers action
     553      if (feOptSpec[opt].type == feOptUntyped)
     554      {
     555        feSetOptValue(opt,0);
     556        return FALSE;
     557      }
     558      if (h == NULL)
     559      {
     560        if (feOptSpec[opt].type == feOptString)
     561        {
     562          res->rtyp = STRING_CMD;
     563          const char *r=(const char*)feOptSpec[opt].value;
     564          if (r == NULL) r="";
     565          res->data = omStrDup(r);
     566        }
     567        else
     568        {
     569          res->rtyp = INT_CMD;
     570          res->data = feOptSpec[opt].value;
     571        }
     572        return FALSE;
     573      }
     574      if (h->Typ() != STRING_CMD &&
     575          h->Typ() != INT_CMD)
     576      {
     577        WerrorS("Need string or int argument to set option value");
     578        return TRUE;
     579      }
     580      const char* errormsg;
     581      if (h->Typ() == INT_CMD)
     582      {
     583        if (feOptSpec[opt].type == feOptString)
     584        {
     585          Werror("Need string argument to set value of option %s", sys_cmd);
     586          return TRUE;
     587        }
     588        errormsg = feSetOptValue(opt, (int)((long) h->Data()));
     589        if (errormsg != NULL)
     590          Werror("Option '--%s=%d' %s", sys_cmd, (int) ((long)h->Data()), errormsg);
     591      }
     592      else
     593      {
     594        errormsg = feSetOptValue(opt, (char*) h->Data());
     595        if (errormsg != NULL)
     596          Werror("Option '--%s=%s' %s", sys_cmd, (char*) h->Data(), errormsg);
     597      }
     598      if (errormsg != NULL) return TRUE;
     599      return FALSE;
     600    }
     601    else
     602  /*==================== HC ==================================*/
     603    if (strcmp(sys_cmd,"HC")==0)
     604    {
     605      res->rtyp=INT_CMD;
     606      res->data=(void *)(long) HCord;
     607      return FALSE;
     608    }
     609    else
     610  /*==================== random ==================================*/
     611    if(strcmp(sys_cmd,"random")==0)
     612    {
     613      if ((h!=NULL) &&(h->Typ()==INT_CMD))
     614      {
     615        siRandomStart=(int)((long)h->Data());
     616        siSeed=siRandomStart;
     617        factoryseed(siRandomStart);
     618        return FALSE;
     619      }
     620      else if (h != NULL)
     621      {
     622        WerrorS("int expected");
     623        return TRUE;
     624      }
     625      res->rtyp=INT_CMD;
     626      res->data=(void*)(long) siRandomStart;
     627      return FALSE;
     628    }
     629    else
     630  /*==================== complexNearZero ======================*/
     631    if(strcmp(sys_cmd,"complexNearZero")==0)
     632    {
     633      if (h->Typ()==NUMBER_CMD )
     634      {
     635        if ( h->next!=NULL && h->next->Typ()==INT_CMD )
     636        {
     637          if ( !rField_is_long_C(currRing) )
     638          {
     639            WerrorS( "unsupported ground field!");
     640            return TRUE;
     641          }
     642          else
     643          {
     644            res->rtyp=INT_CMD;
     645            res->data=(void*)complexNearZero((gmp_complex*)h->Data(),
     646                               (int)((long)(h->next->Data())));
     647            return FALSE;
     648          }
     649        }
     650        else
     651        {
     652          WerrorS( "expected <int> as third parameter!");
     653          return TRUE;
     654        }
     655      }
     656      else
     657      {
     658        WerrorS( "expected <number> as second parameter!");
     659        return TRUE;
     660      }
     661    }
     662    else
     663  /*==================== getPrecDigits ======================*/
     664    if(strcmp(sys_cmd,"getPrecDigits")==0)
     665    {
     666      if ( !rField_is_long_C(currRing) && !rField_is_long_R(currRing) )
     667      {
     668        WerrorS( "unsupported ground field!");
     669        return TRUE;
     670      }
     671      res->rtyp=INT_CMD;
     672      res->data=(void*)(long)gmp_output_digits;
     673      //if (gmp_output_digits!=getGMPFloatDigits())
     674      //{ Print("%d, %d\n",getGMPFloatDigits(),gmp_output_digits);}
     675      return FALSE;
     676    }
     677    else
     678  /*==================== mpz_t loader ======================*/
     679    if(strcmp(sys_cmd, "GNUmpLoad")==0)
     680    {
     681      if ((h != NULL) && (h->Typ() == STRING_CMD))
     682      {
     683        char* filename = (char*)h->Data();
     684        FILE* f = fopen(filename, "r");
     685        if (f == NULL)
     686        {
     687          WerrorS( "invalid file name (in paths use '/')");
    490688          return FALSE;
    491689        }
    492         else
    493         {
    494           WerrorS("string expected");
    495           return TRUE;
    496         }
    497       }
    498       else
    499   /*==================== setenv ==================================*/
    500       if (strcmp(sys_cmd,"setenv")==0)
    501       {
    502   #ifdef HAVE_SETENV
    503         if (h!=NULL && h->Typ()==STRING_CMD && h->Data() != NULL &&
    504             h->next != NULL && h->next->Typ() == STRING_CMD
    505             && h->next->Data() != NULL)
    506         {
    507           res->rtyp=STRING_CMD;
    508           setenv((char *)h->Data(), (char *)h->next->Data(), 1);
    509           res->data=(void *)omStrDup((char *)h->next->Data());
    510           feReInitResources();
    511           return FALSE;
    512         }
    513         else
    514         {
    515           WerrorS("two strings expected");
    516           return TRUE;
    517         }
    518   #else
    519         WerrorS("setenv not supported on this platform");
     690        mpz_t m; mpz_init(m);
     691        mpz_inp_str(m, f, 10);
     692        fclose(f);
     693        number n = n_InitMPZ(m, coeffs_BIGINT);
     694        res->rtyp = BIGINT_CMD;
     695        res->data = (void*)n;
     696        return FALSE;
     697      }
     698      else
     699      {
     700        WerrorS( "expected valid file name as a string");
    520701        return TRUE;
    521   #endif
    522       }
    523       else
    524   /*==================== Singular ==================================*/
    525       if (strcmp(sys_cmd, "Singular") == 0)
    526       {
    527         res->rtyp=STRING_CMD;
    528         const char *r=feResource("Singular");
    529         if (r == NULL) r="";
    530         res->data = (void*) omStrDup( r );
    531         return FALSE;
    532       }
    533       else
    534       if (strcmp(sys_cmd, "SingularLib") == 0)
    535       {
    536         res->rtyp=STRING_CMD;
    537         const char *r=feResource("SearchPath");
    538         if (r == NULL) r="";
    539         res->data = (void*) omStrDup( r );
    540         return FALSE;
    541       }
    542       else
    543   /*==================== options ==================================*/
    544       if (strstr(sys_cmd, "--") == sys_cmd)
    545       {
    546         if (strcmp(sys_cmd, "--") == 0)
    547         {
    548           fePrintOptValues();
    549           return FALSE;
    550         }
    551 
    552         feOptIndex opt = feGetOptIndex(&sys_cmd[2]);
    553         if (opt == FE_OPT_UNDEF)
    554         {
    555           Werror("Unknown option %s", sys_cmd);
    556           Werror("Use 'system(\"--\");' for listing of available options");
    557           return TRUE;
    558         }
    559 
    560         // for Untyped Options (help version),
    561         // setting it just triggers action
    562         if (feOptSpec[opt].type == feOptUntyped)
    563         {
    564           feSetOptValue(opt,0);
    565           return FALSE;
    566         }
    567 
    568         if (h == NULL)
    569         {
    570           if (feOptSpec[opt].type == feOptString)
    571           {
    572             res->rtyp = STRING_CMD;
    573             const char *r=(const char*)feOptSpec[opt].value;
    574             if (r == NULL) r="";
    575             res->data = omStrDup(r);
    576           }
    577           else
    578           {
    579             res->rtyp = INT_CMD;
    580             res->data = feOptSpec[opt].value;
    581           }
    582           return FALSE;
    583         }
    584 
    585         if (h->Typ() != STRING_CMD &&
    586             h->Typ() != INT_CMD)
    587         {
    588           Werror("Need string or int argument to set option value");
    589           return TRUE;
    590         }
    591         const char* errormsg;
    592         if (h->Typ() == INT_CMD)
    593         {
    594           if (feOptSpec[opt].type == feOptString)
    595           {
    596             Werror("Need string argument to set value of option %s", sys_cmd);
    597             return TRUE;
    598           }
    599           errormsg = feSetOptValue(opt, (int)((long) h->Data()));
    600           if (errormsg != NULL)
    601             Werror("Option '--%s=%d' %s", sys_cmd, (int) ((long)h->Data()), errormsg);
    602         }
    603         else
    604         {
    605           errormsg = feSetOptValue(opt, (char*) h->Data());
    606           if (errormsg != NULL)
    607             Werror("Option '--%s=%s' %s", sys_cmd, (char*) h->Data(), errormsg);
    608         }
    609         if (errormsg != NULL) return TRUE;
    610         return FALSE;
    611       }
    612       else
    613   /*==================== HC ==================================*/
    614       if (strcmp(sys_cmd,"HC")==0)
    615       {
    616         res->rtyp=INT_CMD;
    617         res->data=(void *)(long) HCord;
    618         return FALSE;
    619       }
    620       else
    621   /*==================== random ==================================*/
    622       if(strcmp(sys_cmd,"random")==0)
    623       {
    624         if ((h!=NULL) &&(h->Typ()==INT_CMD))
    625         {
    626           siRandomStart=(int)((long)h->Data());
    627           siSeed=siRandomStart;
    628           factoryseed(siRandomStart);
    629           return FALSE;
    630         }
    631         else if (h != NULL)
    632         {
    633           WerrorS("int expected");
    634           return TRUE;
    635         }
    636         res->rtyp=INT_CMD;
    637         res->data=(void*)(long) siRandomStart;
    638         return FALSE;
    639       }
    640   /*==================== complexNearZero ======================*/
    641       if(strcmp(sys_cmd,"complexNearZero")==0)
    642       {
    643         if (h->Typ()==NUMBER_CMD )
    644         {
    645           if ( h->next!=NULL && h->next->Typ()==INT_CMD )
    646           {
    647             if ( !rField_is_long_C(currRing) )
    648               {
    649                 Werror( "unsupported ground field!");
    650                 return TRUE;
    651               }
    652             else
    653               {
    654                 res->rtyp=INT_CMD;
    655                 res->data=(void*)complexNearZero((gmp_complex*)h->Data(),
    656                                (int)((long)(h->next->Data())));
    657                 return FALSE;
    658               }
    659           }
    660           else
    661           {
    662             Werror( "expected <int> as third parameter!");
    663             return TRUE;
    664           }
    665         }
    666         else
    667         {
    668           Werror( "expected <number> as second parameter!");
    669           return TRUE;
    670         }
    671       }
    672   /*==================== getPrecDigits ======================*/
    673       if(strcmp(sys_cmd,"getPrecDigits")==0)
    674       {
    675         if ( !rField_is_long_C(currRing) && !rField_is_long_R(currRing) )
    676         {
    677           Werror( "unsupported ground field!");
    678           return TRUE;
    679         }
    680         res->rtyp=INT_CMD;
    681         res->data=(void*)(long)gmp_output_digits;
    682         //if (gmp_output_digits!=getGMPFloatDigits())
    683         //{ Print("%d, %d\n",getGMPFloatDigits(),gmp_output_digits);}
    684         return FALSE;
    685       }
    686   /*==================== mpz_t loader ======================*/
    687       if(strcmp(sys_cmd, "GNUmpLoad")==0)
    688       {
    689         if ((h != NULL) && (h->Typ() == STRING_CMD))
    690         {
    691           char* filename = (char*)h->Data();
    692           FILE* f = fopen(filename, "r");
    693           if (f == NULL)
    694           {
    695             Werror( "invalid file name (in paths use '/')");
    696             return FALSE;
    697           }
    698           mpz_t m; mpz_init(m);
    699           mpz_inp_str(m, f, 10);
    700           fclose(f);
    701           number n = n_InitMPZ(m, coeffs_BIGINT);
    702           res->rtyp = BIGINT_CMD;
    703           res->data = (void*)n;
    704           return FALSE;
    705         }
    706         else
    707         {
    708           Werror( "expected valid file name as a string");
    709           return TRUE;
    710         }
    711       }
     702      }
     703    }
     704    else
    712705  /*==================== intvec matching ======================*/
    713       /* Given two non-empty intvecs, the call
     706    /* Given two non-empty intvecs, the call
    714707            'system("intvecMatchingSegments", ivec, jvec);'
    715708         computes all occurences of jvec in ivec, i.e., it returns
     
    717710         If no such k exists (e.g. when ivec is shorter than jvec), an
    718711         intvec with the single entry 0 is being returned. */
    719       if(strcmp(sys_cmd, "intvecMatchingSegments")==0)
    720       {
    721         if ((h       != NULL) && (h->Typ()       == INTVEC_CMD) &&
    722             (h->next != NULL) && (h->next->Typ() == INTVEC_CMD) &&
    723             (h->next->next == NULL))
    724         {
    725           intvec* ivec = (intvec*)h->Data();
    726           intvec* jvec = (intvec*)h->next->Data();
    727           intvec* r = new intvec(1); (*r)[0] = 0;
    728           int validEntries = 0;
    729           for (int k = 0; k <= ivec->rows() - jvec->rows(); k++)
    730           {
    731             if (memcmp(&(*ivec)[k], &(*jvec)[0],
     712    if(strcmp(sys_cmd, "intvecMatchingSegments")==0)
     713    {
     714      if ((h       != NULL) && (h->Typ()       == INTVEC_CMD) &&
     715          (h->next != NULL) && (h->next->Typ() == INTVEC_CMD) &&
     716          (h->next->next == NULL))
     717      {
     718        intvec* ivec = (intvec*)h->Data();
     719        intvec* jvec = (intvec*)h->next->Data();
     720        intvec* r = new intvec(1); (*r)[0] = 0;
     721        int validEntries = 0;
     722        for (int k = 0; k <= ivec->rows() - jvec->rows(); k++)
     723        {
     724          if (memcmp(&(*ivec)[k], &(*jvec)[0],
    732725                       sizeof(int) * jvec->rows()) == 0)
     726          {
     727            if (validEntries == 0)
     728              (*r)[0] = k + 1;
     729            else
    733730            {
    734               if (validEntries == 0)
    735                 (*r)[0] = k + 1;
    736               else
    737               {
    738                 r->resize(validEntries + 1);
    739                 (*r)[validEntries] = k + 1;
    740               }
    741               validEntries++;
     731              r->resize(validEntries + 1);
     732              (*r)[validEntries] = k + 1;
    742733            }
    743           }
    744           res->rtyp = INTVEC_CMD;
    745           res->data = (void*)r;
    746           return FALSE;
    747         }
    748         else
    749         {
    750           Werror("expected two non-empty intvecs as arguments");
    751           return TRUE;
    752         }
    753       }
    754       /* Given two non-empty intvecs, the call
     734            validEntries++;
     735          }
     736        }
     737        res->rtyp = INTVEC_CMD;
     738        res->data = (void*)r;
     739        return FALSE;
     740      }
     741      else
     742      {
     743        WerrorS("expected two non-empty intvecs as arguments");
     744        return TRUE;
     745      }
     746    }
     747    else
     748  /* ================== intvecOverlap ======================= */ 
     749    /* Given two non-empty intvecs, the call
    755750            'system("intvecOverlap", ivec, jvec);'
    756751         computes the longest intvec kvec such that ivec ends with kvec
    757752         and jvec starts with kvec. The length of this overlap is being
    758753         returned. If there is no overlap at all, then 0 is being returned. */
    759       if(strcmp(sys_cmd, "intvecOverlap")==0)
    760       {
    761         if ((h       != NULL) && (h->Typ()       == INTVEC_CMD) &&
     754    if(strcmp(sys_cmd, "intvecOverlap")==0)
     755    {
     756      if ((h       != NULL) && (h->Typ()       == INTVEC_CMD) &&
    762757            (h->next != NULL) && (h->next->Typ() == INTVEC_CMD) &&
    763758            (h->next->next == NULL))
    764         {
    765           intvec* ivec = (intvec*)h->Data();
    766           intvec* jvec = (intvec*)h->next->Data();
    767           int ir = ivec->rows(); int jr = jvec->rows();
    768           int r = jr; if (ir < jr) r = ir;   /* r = min{ir, jr} */
    769           while ((r >= 1) && (memcmp(&(*ivec)[ir - r], &(*jvec)[0],
     759      {
     760        intvec* ivec = (intvec*)h->Data();
     761        intvec* jvec = (intvec*)h->next->Data();
     762        int ir = ivec->rows(); int jr = jvec->rows();
     763        int r = jr; if (ir < jr) r = ir;   /* r = min{ir, jr} */
     764        while ((r >= 1) && (memcmp(&(*ivec)[ir - r], &(*jvec)[0],
    770765                                     sizeof(int) * r) != 0))
    771             r--;
    772           res->rtyp = INT_CMD;
    773           res->data = (void*)(long)r;
    774           return FALSE;
    775         }
    776         else
    777         {
    778           Werror("expected two non-empty intvecs as arguments");
    779           return TRUE;
    780         }
    781       }
     766          r--;
     767        res->rtyp = INT_CMD;
     768        res->data = (void*)(long)r;
     769        return FALSE;
     770      }
     771      else
     772      {
     773        WerrorS("expected two non-empty intvecs as arguments");
     774        return TRUE;
     775      }
     776    }
     777    else
    782778  /*==================== Hensel's lemma ======================*/
    783       if(strcmp(sys_cmd, "henselfactors")==0)
    784       {
    785         if ((h != NULL) && (h->Typ() == INT_CMD) &&
    786             (h->next != NULL) && (h->next->Typ() == INT_CMD) &&
    787             (h->next->next != NULL) && (h->next->next->Typ() == POLY_CMD) &&
    788             (h->next->next->next != NULL) &&
    789                (h->next->next->next->Typ() == POLY_CMD) &&
    790             (h->next->next->next->next != NULL) &&
    791                (h->next->next->next->next->Typ() == POLY_CMD) &&
    792             (h->next->next->next->next->next != NULL) &&
    793                (h->next->next->next->next->next->Typ() == INT_CMD) &&
    794             (h->next->next->next->next->next->next == NULL))
    795         {
    796           int xIndex = (int)(long)h->Data();
    797           int yIndex = (int)(long)h->next->Data();
    798           poly hh    = (poly)h->next->next->Data();
    799           poly f0    = (poly)h->next->next->next->Data();
    800           poly g0    = (poly)h->next->next->next->next->Data();
    801           int d      = (int)(long)h->next->next->next->next->next->Data();
    802           poly f; poly g;
    803           henselFactors(xIndex, yIndex, hh, f0, g0, d, f, g);
    804           lists L = (lists)omAllocBin(slists_bin);
    805           L->Init(2);
    806           L->m[0].rtyp = POLY_CMD; L->m[0].data=(void*)f;
    807           L->m[1].rtyp = POLY_CMD; L->m[1].data=(void*)g;
    808           res->rtyp = LIST_CMD;
    809           res->data = (char *)L;
    810           return FALSE;
    811         }
    812         else
    813         {
    814           Werror( "expected argument list (int, int, poly, poly, poly, int)");
    815           return TRUE;
    816         }
    817       }
     779    if(strcmp(sys_cmd, "henselfactors")==0)
     780    {
     781      if ((h != NULL) && (h->Typ() == INT_CMD) &&
     782        (h->next != NULL) && (h->next->Typ() == INT_CMD) &&
     783        (h->next->next != NULL) && (h->next->next->Typ() == POLY_CMD) &&
     784        (h->next->next->next != NULL) &&
     785        (h->next->next->next->Typ() == POLY_CMD) &&
     786        (h->next->next->next->next != NULL) &&
     787        (h->next->next->next->next->Typ() == POLY_CMD) &&
     788        (h->next->next->next->next->next != NULL) &&
     789        (h->next->next->next->next->next->Typ() == INT_CMD) &&
     790        (h->next->next->next->next->next->next == NULL))
     791      {
     792        int xIndex = (int)(long)h->Data();
     793        int yIndex = (int)(long)h->next->Data();
     794        poly hh    = (poly)h->next->next->Data();
     795        poly f0    = (poly)h->next->next->next->Data();
     796        poly g0    = (poly)h->next->next->next->next->Data();
     797        int d      = (int)(long)h->next->next->next->next->next->Data();
     798        poly f; poly g;
     799        henselFactors(xIndex, yIndex, hh, f0, g0, d, f, g);
     800        lists L = (lists)omAllocBin(slists_bin);
     801        L->Init(2);
     802        L->m[0].rtyp = POLY_CMD; L->m[0].data=(void*)f;
     803        L->m[1].rtyp = POLY_CMD; L->m[1].data=(void*)g;
     804        res->rtyp = LIST_CMD;
     805        res->data = (char *)L;
     806        return FALSE;
     807      }
     808      else
     809      {
     810        WerrorS( "expected argument list (int, int, poly, poly, poly, int)");
     811        return TRUE;
     812      }
     813    }
     814    else
    818815  /*==================== lduDecomp ======================*/
    819       if(strcmp(sys_cmd, "lduDecomp")==0)
    820       {
    821         if ((h != NULL) && (h->Typ() == MATRIX_CMD) && (h->next == NULL))
    822         {
    823           matrix aMat = (matrix)h->Data();
    824           matrix pMat; matrix lMat; matrix dMat; matrix uMat;
    825           poly l; poly u; poly prodLU;
    826           lduDecomp(aMat, pMat, lMat, dMat, uMat, l, u, prodLU);
    827           lists L = (lists)omAllocBin(slists_bin);
    828           L->Init(7);
    829           L->m[0].rtyp = MATRIX_CMD; L->m[0].data=(void*)pMat;
    830           L->m[1].rtyp = MATRIX_CMD; L->m[1].data=(void*)lMat;
    831           L->m[2].rtyp = MATRIX_CMD; L->m[2].data=(void*)dMat;
    832           L->m[3].rtyp = MATRIX_CMD; L->m[3].data=(void*)uMat;
    833           L->m[4].rtyp = POLY_CMD; L->m[4].data=(void*)l;
    834           L->m[5].rtyp = POLY_CMD; L->m[5].data=(void*)u;
    835           L->m[6].rtyp = POLY_CMD; L->m[6].data=(void*)prodLU;
    836           res->rtyp = LIST_CMD;
    837           res->data = (char *)L;
    838           return FALSE;
    839         }
    840         else
    841         {
    842           Werror( "expected argument list (int, int, poly, poly, poly, int)");
    843           return TRUE;
    844         }
    845       }
     816    if(strcmp(sys_cmd, "lduDecomp")==0)
     817    {
     818      if ((h != NULL) && (h->Typ() == MATRIX_CMD) && (h->next == NULL))
     819      {
     820        matrix aMat = (matrix)h->Data();
     821        matrix pMat; matrix lMat; matrix dMat; matrix uMat;
     822        poly l; poly u; poly prodLU;
     823        lduDecomp(aMat, pMat, lMat, dMat, uMat, l, u, prodLU);
     824        lists L = (lists)omAllocBin(slists_bin);
     825        L->Init(7);
     826        L->m[0].rtyp = MATRIX_CMD; L->m[0].data=(void*)pMat;
     827        L->m[1].rtyp = MATRIX_CMD; L->m[1].data=(void*)lMat;
     828        L->m[2].rtyp = MATRIX_CMD; L->m[2].data=(void*)dMat;
     829        L->m[3].rtyp = MATRIX_CMD; L->m[3].data=(void*)uMat;
     830        L->m[4].rtyp = POLY_CMD; L->m[4].data=(void*)l;
     831        L->m[5].rtyp = POLY_CMD; L->m[5].data=(void*)u;
     832        L->m[6].rtyp = POLY_CMD; L->m[6].data=(void*)prodLU;
     833        res->rtyp = LIST_CMD;
     834        res->data = (char *)L;
     835        return FALSE;
     836      }
     837      else
     838      {
     839        WerrorS( "expected argument list (int, int, poly, poly, poly, int)");
     840        return TRUE;
     841      }
     842    }
     843    else
    846844  /*==================== lduSolve ======================*/
    847       if(strcmp(sys_cmd, "lduSolve")==0)
    848       {
    849         /* for solving a linear equation system A * x = b, via the
     845    if(strcmp(sys_cmd, "lduSolve")==0)
     846    {
     847      /* for solving a linear equation system A * x = b, via the
    850848           given LDU-decomposition of the matrix A;
    851849           There is one valid parametrisation:
     
    865863           The method produces an error if matrix and vector sizes do not
    866864           fit. */
    867         if ((h == NULL) || (h->Typ() != MATRIX_CMD) ||
    868             (h->next == NULL) || (h->next->Typ() != MATRIX_CMD) ||
    869             (h->next->next == NULL) || (h->next->next->Typ() != MATRIX_CMD) ||
    870             (h->next->next->next == NULL) ||
    871               (h->next->next->next->Typ() != MATRIX_CMD) ||
    872             (h->next->next->next->next == NULL) ||
    873               (h->next->next->next->next->Typ() != POLY_CMD) ||
    874             (h->next->next->next->next->next == NULL) ||
    875               (h->next->next->next->next->next->Typ() != POLY_CMD) ||
    876             (h->next->next->next->next->next->next == NULL) ||
    877               (h->next->next->next->next->next->next->Typ() != POLY_CMD) ||
    878             (h->next->next->next->next->next->next->next == NULL) ||
    879               (h->next->next->next->next->next->next->next->Typ()
    880                 != MATRIX_CMD) ||
    881             (h->next->next->next->next->next->next->next->next != NULL))
    882         {
    883           Werror("expected input (matrix, matrix, matrix, matrix, %s",
     865      if ((h == NULL) || (h->Typ() != MATRIX_CMD) ||
     866        (h->next == NULL) || (h->next->Typ() != MATRIX_CMD) ||
     867        (h->next->next == NULL) || (h->next->next->Typ() != MATRIX_CMD) ||
     868        (h->next->next->next == NULL) ||
     869        (h->next->next->next->Typ() != MATRIX_CMD) ||
     870        (h->next->next->next->next == NULL) ||
     871        (h->next->next->next->next->Typ() != POLY_CMD) ||
     872        (h->next->next->next->next->next == NULL) ||
     873        (h->next->next->next->next->next->Typ() != POLY_CMD) ||
     874        (h->next->next->next->next->next->next == NULL) ||
     875        (h->next->next->next->next->next->next->Typ() != POLY_CMD) ||
     876        (h->next->next->next->next->next->next->next == NULL) ||
     877        (h->next->next->next->next->next->next->next->Typ() != MATRIX_CMD) ||
     878        (h->next->next->next->next->next->next->next->next != NULL))
     879      {
     880        WerrorS("expected input (matrix, matrix, matrix, matrix, "
    884881                                 "poly, poly, poly, matrix)");
    885           return TRUE;
    886         }
    887         matrix pMat  = (matrix)h->Data();
    888         matrix lMat  = (matrix)h->next->Data();
    889         matrix dMat  = (matrix)h->next->next->Data();
    890         matrix uMat  = (matrix)h->next->next->next->Data();
    891         poly l       = (poly)  h->next->next->next->next->Data();
    892         poly u       = (poly)  h->next->next->next->next->next->Data();
    893         poly lTimesU = (poly)  h->next->next->next->next->next->next
    894                                                               ->Data();
    895         matrix bVec  = (matrix)h->next->next->next->next->next->next
    896                                                         ->next->Data();
    897         matrix xVec; int solvable; matrix homogSolSpace;
    898         if (pMat->rows() != pMat->cols())
    899         {
    900           Werror("first matrix (%d x %d) is not quadratic",
     882        return TRUE;
     883      }
     884      matrix pMat  = (matrix)h->Data();
     885      matrix lMat  = (matrix)h->next->Data();
     886      matrix dMat  = (matrix)h->next->next->Data();
     887      matrix uMat  = (matrix)h->next->next->next->Data();
     888      poly l       = (poly)  h->next->next->next->next->Data();
     889      poly u       = (poly)  h->next->next->next->next->next->Data();
     890      poly lTimesU = (poly)  h->next->next->next->next->next->next->Data();
     891      matrix bVec  = (matrix)h->next->next->next->next->next->next->next->Data();
     892      matrix xVec; int solvable; matrix homogSolSpace;
     893      if (pMat->rows() != pMat->cols())
     894      {
     895        Werror("first matrix (%d x %d) is not quadratic",
    901896                 pMat->rows(), pMat->cols());
    902           return TRUE;
    903         }
    904         if (lMat->rows() != lMat->cols())
    905         {
    906           Werror("second matrix (%d x %d) is not quadratic",
     897        return TRUE;
     898      }
     899      if (lMat->rows() != lMat->cols())
     900      {
     901        Werror("second matrix (%d x %d) is not quadratic",
    907902                 lMat->rows(), lMat->cols());
    908           return TRUE;
    909         }
    910         if (dMat->rows() != dMat->cols())
    911         {
    912           Werror("third matrix (%d x %d) is not quadratic",
     903        return TRUE;
     904      }
     905      if (dMat->rows() != dMat->cols())
     906      {
     907        Werror("third matrix (%d x %d) is not quadratic",
    913908                 dMat->rows(), dMat->cols());
    914           return TRUE;
    915         }
    916         if (dMat->cols() != uMat->rows())
    917         {
    918           Werror("third matrix (%d x %d) and fourth matrix (%d x %d) %s",
     909        return TRUE;
     910      }
     911      if (dMat->cols() != uMat->rows())
     912      {
     913        Werror("third matrix (%d x %d) and fourth matrix (%d x %d) %s",
    919914                 dMat->rows(), dMat->cols(), uMat->rows(), uMat->cols(),
    920915                 "do not t");
    921           return TRUE;
    922         }
    923         if (uMat->rows() != bVec->rows())
    924         {
    925           Werror("fourth matrix (%d x %d) and vector (%d x 1) do not fit",
     916        return TRUE;
     917      }
     918      if (uMat->rows() != bVec->rows())
     919      {
     920        Werror("fourth matrix (%d x %d) and vector (%d x 1) do not fit",
    926921                 uMat->rows(), uMat->cols(), bVec->rows());
    927           return TRUE;
    928         }
    929         solvable = luSolveViaLDUDecomp(pMat, lMat, dMat, uMat, l, u, lTimesU,
     922        return TRUE;
     923      }
     924      solvable = luSolveViaLDUDecomp(pMat, lMat, dMat, uMat, l, u, lTimesU,
    930925                                       bVec, xVec, homogSolSpace);
    931926
    932         /* build the return structure; a list with either one or
     927      /* build the return structure; a list with either one or
    933928           three entries */
    934         lists ll = (lists)omAllocBin(slists_bin);
    935         if (solvable)
    936         {
    937           ll->Init(3);
    938           ll->m[0].rtyp=INT_CMD;    ll->m[0].data=(void *)(long)solvable;
    939           ll->m[1].rtyp=MATRIX_CMD; ll->m[1].data=(void *)xVec;
    940           ll->m[2].rtyp=MATRIX_CMD; ll->m[2].data=(void *)homogSolSpace;
    941         }
    942         else
    943         {
    944           ll->Init(1);
    945           ll->m[0].rtyp=INT_CMD;    ll->m[0].data=(void *)(long)solvable;
    946         }
    947         res->rtyp = LIST_CMD;
    948         res->data=(char*)ll;
    949         return FALSE;
    950       }
    951       else
     929      lists ll = (lists)omAllocBin(slists_bin);
     930      if (solvable)
     931      {
     932        ll->Init(3);
     933        ll->m[0].rtyp=INT_CMD;    ll->m[0].data=(void *)(long)solvable;
     934        ll->m[1].rtyp=MATRIX_CMD; ll->m[1].data=(void *)xVec;
     935        ll->m[2].rtyp=MATRIX_CMD; ll->m[2].data=(void *)homogSolSpace;
     936      }
     937      else
     938      {
     939        ll->Init(1);
     940        ll->m[0].rtyp=INT_CMD;    ll->m[0].data=(void *)(long)solvable;
     941      }
     942      res->rtyp = LIST_CMD;
     943      res->data=(char*)ll;
     944      return FALSE;
     945    }
     946    else
    952947  /*==================== neworder =============================*/
    953948  // should go below
    954       if(strcmp(sys_cmd,"neworder")==0)
    955       {
    956         if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))
    957         {
    958           res->rtyp=STRING_CMD;
    959           res->data=(void *)singclap_neworder((ideal)h->Data(), currRing);
     949    if(strcmp(sys_cmd,"neworder")==0)
     950    {
     951      if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))
     952      {
     953        res->rtyp=STRING_CMD;
     954        res->data=(void *)singclap_neworder((ideal)h->Data(), currRing);
     955        return FALSE;
     956      }
     957      else
     958        WerrorS("ideal expected");
     959    }
     960    else
     961  /*==== countedref: reference and shared ====*/
     962    if (strcmp(sys_cmd, "shared") == 0)
     963    {
     964      #ifndef SI_COUNTEDREF_AUTOLOAD
     965      void countedref_shared_load();
     966      countedref_shared_load();
     967      #endif
     968      res->rtyp = NONE;
     969      return FALSE;
     970    }
     971    else if (strcmp(sys_cmd, "reference") == 0)
     972    {
     973      #ifndef SI_COUNTEDREF_AUTOLOAD
     974      void countedref_reference_load();
     975      countedref_reference_load();
     976      #endif
     977      res->rtyp = NONE;
     978      return FALSE;
     979    }
     980    else
     981/*==================== semaphore =================*/
     982#ifdef HAVE_SIMPLEIPC
     983    if (strcmp(sys_cmd,"semaphore")==0)
     984    {
     985      if((h!=NULL) && (h->Typ()==STRING_CMD) && (h->next!=NULL) && (h->next->Typ()==INT_CMD))
     986      {
     987        int v=1;
     988        if ((h->next->next!=NULL)&& (h->next->next->Typ()==INT_CMD))
     989          v=(int)(long)h->next->next->Data();
     990        res->data=(char *)(long)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);
     991        res->rtyp=INT_CMD;
     992        return FALSE;
     993      }
     994      else
     995      {
     996        WerrorS("Usage: system(\"semaphore\",<cmd>,int)");
     997        return TRUE;
     998      }
     999    }
     1000    else
     1001#endif
     1002/*==================== reserved port =================*/
     1003    if (strcmp(sys_cmd,"reserve")==0)
     1004    {
     1005      int ssiReservePort(int clients);
     1006      if ((h!=NULL) && (h->Typ()==INT_CMD))
     1007      {
     1008        res->rtyp=INT_CMD;
     1009        int p=ssiReservePort((int)(long)h->Data());
     1010        res->data=(void*)(long)p;
     1011        return (p==0);
     1012      }
     1013      else
     1014      {
     1015        WerrorS("system(\"reserve\",<int>)");
     1016      }
     1017      return TRUE;
     1018    }
     1019    else
     1020/*==================== reserved link =================*/
     1021    if (strcmp(sys_cmd,"reservedLink")==0)
     1022    {
     1023      extern si_link ssiCommandLink();
     1024      res->rtyp=LINK_CMD;
     1025      si_link p=ssiCommandLink();
     1026      res->data=(void*)p;
     1027      return (p==NULL);
     1028    }
     1029    else
     1030/*==================== install newstruct =================*/
     1031    if (strcmp(sys_cmd,"install")==0)
     1032    {
     1033      if ((h!=NULL) && (h->Typ()==STRING_CMD)
     1034      && (h->next!=NULL) && (h->next->Typ()==STRING_CMD)
     1035      && (h->next->next!=NULL) && (h->next->next->Typ()==PROC_CMD)
     1036      && (h->next->next->next!=NULL) && (h->next->next->next->Typ()==INT_CMD))
     1037      {
     1038        return newstruct_set_proc((char*)h->Data(),(char*)h->next->Data(),
     1039                                (int)(long)h->next->next->next->Data(),
     1040                                (procinfov)h->next->next->Data());
     1041      }
     1042      return TRUE;
     1043    }
     1044    else
     1045/*==================== newstruct =================*/
     1046    if (strcmp(sys_cmd,"newstruct")==0)
     1047    {
     1048      if ((h!=NULL) && (h->Typ()==STRING_CMD))
     1049      {
     1050        int id=0;
     1051        blackboxIsCmd((char*)h->Data(),id);
     1052        if (id>0)
     1053        {
     1054          blackbox *bb=getBlackboxStuff(id);
     1055          if (BB_LIKE_LIST(bb))
     1056          {
     1057            newstruct_desc desc=(newstruct_desc)bb->data;
     1058            newstructShow(desc);
     1059            return FALSE;
     1060          }
     1061        }
     1062      }
     1063      return TRUE;
     1064    }
     1065    else
     1066/*==================== blackbox =================*/
     1067    if (strcmp(sys_cmd,"blackbox")==0)
     1068    {
     1069      printBlackboxTypes();
     1070      return FALSE;
     1071    }
     1072    else
     1073  /*================= absBiFact ======================*/
     1074    if (strcmp(sys_cmd, "absFact") == 0)
     1075    {
     1076      if (h!=NULL)
     1077      {
     1078        res->rtyp=LIST_CMD;
     1079        if (h->Typ()==POLY_CMD)
     1080        {
     1081          intvec *v=NULL;
     1082          ideal mipos= NULL;
     1083          int n= 0;
     1084          ideal f=singclap_absFactorize((poly)(h->Data()), mipos, &v, n, currRing);
     1085          if (f==NULL) return TRUE;
     1086          ivTest(v);
     1087          lists l=(lists)omAllocBin(slists_bin);
     1088          l->Init(4);
     1089          l->m[0].rtyp=IDEAL_CMD;
     1090          l->m[0].data=(void *)f;
     1091          l->m[1].rtyp=INTVEC_CMD;
     1092          l->m[1].data=(void *)v;
     1093          l->m[2].rtyp=IDEAL_CMD;
     1094          l->m[2].data=(void*) mipos;
     1095          l->m[3].rtyp=INT_CMD;
     1096          l->m[3].data=(void*) (long) n;
     1097          res->data=(void *)l;
    9601098          return FALSE;
    9611099        }
    962         else
    963           WerrorS("ideal expected");
    964       }
    965       else
     1100        else return TRUE;
     1101      }
     1102      else return TRUE;
     1103    }
     1104    else
     1105  /* =================== LLL via NTL ==============================*/   
     1106  #ifdef HAVE_NTL
     1107    if (strcmp(sys_cmd, "LLL") == 0)
     1108    {
     1109      if (h!=NULL)
     1110      {
     1111        res->rtyp=h->Typ();
     1112        if (h->Typ()==MATRIX_CMD)
     1113        {
     1114          res->data=(char *)singntl_LLL((matrix)h->Data(), currRing);
     1115          return FALSE;
     1116        }
     1117        else if (h->Typ()==INTMAT_CMD)
     1118        {
     1119          res->data=(char *)singntl_LLL((intvec*)h->Data(), currRing);
     1120          return FALSE;
     1121        }
     1122        else return TRUE;
     1123      }
     1124      else return TRUE;
     1125    }
     1126    else
     1127  #endif
     1128  /*==================== shift-test for freeGB  =================*/
     1129  #ifdef HAVE_SHIFTBBA
     1130    if (strcmp(sys_cmd, "stest") == 0)
     1131    {
     1132      poly p;
     1133      int sh,uptodeg, lVblock;
     1134      if ((h!=NULL) && (h->Typ()==POLY_CMD))
     1135      {
     1136        p=(poly)h->CopyD();
     1137        h=h->next;
     1138      }
     1139      else return TRUE;
     1140      if ((h!=NULL) && (h->Typ()==INT_CMD))
     1141      {
     1142        sh=(int)((long)(h->Data()));
     1143        h=h->next;
     1144      }
     1145      else return TRUE;
     1146
     1147      if ((h!=NULL) && (h->Typ()==INT_CMD))
     1148      {
     1149        uptodeg=(int)((long)(h->Data()));
     1150        h=h->next;
     1151      }
     1152      else return TRUE;
     1153      if ((h!=NULL) && (h->Typ()==INT_CMD))
     1154      {
     1155        lVblock=(int)((long)(h->Data()));
     1156        res->data = pLPshift(p,sh,uptodeg,lVblock);
     1157        res->rtyp = POLY_CMD;
     1158      }
     1159      else return TRUE;
     1160      return FALSE;
     1161    }
     1162    else
     1163  #endif
     1164  /*==================== block-test for freeGB  =================*/
     1165  #ifdef HAVE_SHIFTBBA
     1166    if (strcmp(sys_cmd, "btest") == 0)
     1167    {
     1168      poly p;
     1169      int lV;
     1170      if ((h!=NULL) && (h->Typ()==POLY_CMD))
     1171      {
     1172        p=(poly)h->CopyD();
     1173        h=h->next;
     1174      }
     1175      else return TRUE;
     1176      if ((h!=NULL) && (h->Typ()==INT_CMD))
     1177      {
     1178        lV=(int)((long)(h->Data()));
     1179        res->rtyp = INT_CMD;
     1180        res->data = (void*)(long)pLastVblock(p, lV);
     1181      }
     1182      else return TRUE;
     1183      return FALSE;
     1184    }
     1185    else
     1186  #endif
     1187  /*==================== shrink-test for freeGB  =================*/
     1188  #ifdef HAVE_SHIFTBBA
     1189    if (strcmp(sys_cmd, "shrinktest") == 0)
     1190    {
     1191      poly p;
     1192      int lV;
     1193      if ((h!=NULL) && (h->Typ()==POLY_CMD))
     1194      {
     1195        p=(poly)h->CopyD();
     1196        h=h->next;
     1197      }
     1198      else return TRUE;
     1199      if ((h!=NULL) && (h->Typ()==INT_CMD))
     1200      {
     1201        lV=(int)((long)(h->Data()));
     1202        res->rtyp = POLY_CMD;
     1203        //        res->data = p_mShrink(p, lV, currRing);
     1204        //        kStrategy strat=new skStrategy;
     1205        //        strat->tailRing = currRing;
     1206        res->data = p_Shrink(p, lV, currRing);
     1207      }
     1208      else return TRUE;
     1209      return FALSE;
     1210    }
     1211    else
     1212  #endif
    9661213  //#ifndef HAVE_DYNAMIC_LOADING
    9671214  /*==================== pcv ==================================*/
    9681215  #ifdef HAVE_PCV
    969       if(strcmp(sys_cmd,"pcvLAddL")==0)
    970       {
    971         return pcvLAddL(res,h);
    972       }
    973       else
    974       if(strcmp(sys_cmd,"pcvPMulL")==0)
    975       {
    976         return pcvPMulL(res,h);
    977       }
    978       else
    979       if(strcmp(sys_cmd,"pcvMinDeg")==0)
    980       {
    981         return pcvMinDeg(res,h);
    982       }
    983       else
    984       if(strcmp(sys_cmd,"pcvP2CV")==0)
    985       {
    986         return pcvP2CV(res,h);
    987       }
    988       else
    989       if(strcmp(sys_cmd,"pcvCV2P")==0)
    990       {
    991         return pcvCV2P(res,h);
    992       }
    993       else
    994       if(strcmp(sys_cmd,"pcvDim")==0)
    995       {
    996         return pcvDim(res,h);
    997       }
    998       else
    999       if(strcmp(sys_cmd,"pcvBasis")==0)
    1000       {
    1001         return pcvBasis(res,h);
    1002       }
    1003       else
     1216    if(strcmp(sys_cmd,"pcvLAddL")==0)
     1217    {
     1218      return pcvLAddL(res,h);
     1219    }
     1220    else
     1221    if(strcmp(sys_cmd,"pcvPMulL")==0)
     1222    {
     1223      return pcvPMulL(res,h);
     1224    }
     1225    else
     1226    if(strcmp(sys_cmd,"pcvMinDeg")==0)
     1227    {
     1228      return pcvMinDeg(res,h);
     1229    }
     1230    else
     1231    if(strcmp(sys_cmd,"pcvP2CV")==0)
     1232    {
     1233      return pcvP2CV(res,h);
     1234    }
     1235    else
     1236    if(strcmp(sys_cmd,"pcvCV2P")==0)
     1237    {
     1238      return pcvCV2P(res,h);
     1239    }
     1240    else
     1241    if(strcmp(sys_cmd,"pcvDim")==0)
     1242    {
     1243      return pcvDim(res,h);
     1244    }
     1245    else
     1246    if(strcmp(sys_cmd,"pcvBasis")==0)
     1247    {
     1248      return pcvBasis(res,h);
     1249    }
     1250    else
    10041251  #endif
    10051252  /*==================== eigenvalues ==================================*/
    10061253  #ifdef HAVE_EIGENVAL
    1007       if(strcmp(sys_cmd,"hessenberg")==0)
    1008       {
    1009         return evHessenberg(res,h);
    1010       }
    1011       else
    1012       if(strcmp(sys_cmd,"eigenvals")==0)
    1013       {
    1014         return evEigenvals(res,h);
    1015       }
    1016       else
     1254    if(strcmp(sys_cmd,"hessenberg")==0)
     1255    {
     1256      return evHessenberg(res,h);
     1257    }
     1258    else
     1259    if(strcmp(sys_cmd,"eigenvals")==0)
     1260    {
     1261      return evEigenvals(res,h);
     1262    }
     1263    else
    10171264  #endif
    10181265  /*==================== Gauss-Manin system ==================================*/
    10191266  #ifdef HAVE_GMS
    1020       if(strcmp(sys_cmd,"gmsnf")==0)
    1021       {
    1022         return gmsNF(res,h);
    1023       }
    1024       else
     1267    if(strcmp(sys_cmd,"gmsnf")==0)
     1268    {
     1269      return gmsNF(res,h);
     1270    }
     1271    else
    10251272  #endif
    10261273  //#endif /* HAVE_DYNAMIC_LOADING */
    10271274  /*==================== contributors =============================*/
    1028      if(strcmp(sys_cmd,"contributors") == 0)
    1029      {
    1030        res->rtyp=STRING_CMD;
    1031        res->data=(void *)omStrDup(
     1275    if(strcmp(sys_cmd,"contributors") == 0)
     1276    {
     1277      res->rtyp=STRING_CMD;
     1278      res->data=(void *)omStrDup(
    10321279         "Olaf Bachmann, Michael Brickenstein, Hubert Grassmann, Kai Krueger, Victor Levandovskyy, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Mathias Schulze, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann");
    1033        return FALSE;
    1034      }
    1035      else
     1280      return FALSE;
     1281    }
     1282    else
    10361283  /*==================== spectrum =============================*/
    1037      #ifdef HAVE_SPECTRUM
    1038      if(strcmp(sys_cmd,"spectrum") == 0)
    1039      {
    1040        if (h->Typ()!=POLY_CMD)
    1041        {
    1042          WerrorS("poly expected");
    1043          return TRUE;
    1044        }
    1045        if (h->next==NULL)
    1046          return spectrumProc(res,h);
    1047        if (h->next->Typ()!=INT_CMD)
    1048        {
    1049          WerrorS("poly,int expected");
    1050          return TRUE;
    1051        }
    1052        if(((long)h->next->Data())==1L)
     1284    #ifdef HAVE_SPECTRUM
     1285    if(strcmp(sys_cmd,"spectrum") == 0)
     1286    {
     1287      if (h->Typ()!=POLY_CMD)
     1288      {
     1289        WerrorS("poly expected");
     1290        return TRUE;
     1291      }
     1292      if (h->next==NULL)
     1293        return spectrumProc(res,h);
     1294      if (h->next->Typ()!=INT_CMD)
     1295      {
     1296        WerrorS("poly,int expected");
     1297        return TRUE;
     1298      }
     1299      if(((long)h->next->Data())==1L)
    10531300         return spectrumfProc(res,h);
    1054        return spectrumProc(res,h);
    1055      }
    1056      else
     1301      return spectrumProc(res,h);
     1302    }
     1303    else
    10571304  /*==================== semic =============================*/
    1058      if(strcmp(sys_cmd,"semic") == 0)
    1059      {
    1060        if ((h->next!=NULL)
    1061        && (h->Typ()==LIST_CMD)
    1062        && (h->next->Typ()==LIST_CMD))
    1063        {
    1064          if (h->next->next==NULL)
    1065            return semicProc(res,h,h->next);
    1066          else if (h->next->next->Typ()==INT_CMD)
    1067            return semicProc3(res,h,h->next,h->next->next);
    1068        }
    1069        return TRUE;
    1070      }
    1071      else
     1305    if(strcmp(sys_cmd,"semic") == 0)
     1306    {
     1307      if ((h->next!=NULL)
     1308      && (h->Typ()==LIST_CMD)
     1309      && (h->next->Typ()==LIST_CMD))
     1310      {
     1311        if (h->next->next==NULL)
     1312          return semicProc(res,h,h->next);
     1313        else if (h->next->next->Typ()==INT_CMD)
     1314          return semicProc3(res,h,h->next,h->next->next);
     1315      }
     1316      return TRUE;
     1317    }
     1318    else
    10721319  /*==================== spadd =============================*/
    1073      if(strcmp(sys_cmd,"spadd") == 0)
    1074      {
    1075        if ((h->next!=NULL)
    1076        && (h->Typ()==LIST_CMD)
    1077        && (h->next->Typ()==LIST_CMD))
    1078        {
    1079          if (h->next->next==NULL)
    1080            return spaddProc(res,h,h->next);
    1081        }
    1082        return TRUE;
    1083      }
    1084      else
     1320    if(strcmp(sys_cmd,"spadd") == 0)
     1321    {
     1322      if ((h->next!=NULL)
     1323      && (h->Typ()==LIST_CMD)
     1324      && (h->next->Typ()==LIST_CMD))
     1325      {
     1326        if (h->next->next==NULL)
     1327          return spaddProc(res,h,h->next);
     1328      }
     1329      return TRUE;
     1330    }
     1331    else
    10851332  /*==================== spmul =============================*/
    1086      if(strcmp(sys_cmd,"spmul") == 0)
    1087      {
    1088        if ((h->next!=NULL)
    1089        && (h->Typ()==LIST_CMD)
    1090        && (h->next->Typ()==INT_CMD))
    1091        {
    1092          if (h->next->next==NULL)
    1093            return spmulProc(res,h,h->next);
    1094        }
    1095        return TRUE;
    1096      }
    1097      else
    1098   #endif
    1099 
     1333    if(strcmp(sys_cmd,"spmul") == 0)
     1334    {
     1335      if ((h->next!=NULL)
     1336      && (h->Typ()==LIST_CMD)
     1337      && (h->next->Typ()==INT_CMD))
     1338      {
     1339        if (h->next->next==NULL)
     1340          return spmulProc(res,h,h->next);
     1341      }
     1342      return TRUE;
     1343    }
     1344    else
     1345  #endif
     1346/*==================== tensorModuleMult ========================= */
    11001347  #define HAVE_SHEAFCOH_TRICKS 1
    11011348
    11021349  #ifdef HAVE_SHEAFCOH_TRICKS
    1103       if(strcmp(sys_cmd,"tensorModuleMult")==0)
    1104       {
     1350    if(strcmp(sys_cmd,"tensorModuleMult")==0)
     1351    {
    11051352  //      WarnS("tensorModuleMult!");
    1106         if (h!=NULL && h->Typ()==INT_CMD && h->Data() != NULL &&
     1353      if (h!=NULL && h->Typ()==INT_CMD && h->Data() != NULL &&
    11071354            h->next != NULL && h->next->Typ() == MODUL_CMD
    11081355            && h->next->Data() != NULL)
    1109         {
    1110           int m = (int)( (long)h->Data() );
    1111           ideal M = (ideal)h->next->Data();
    1112 
    1113           res->rtyp=MODUL_CMD;
    1114           res->data=(void *)id_TensorModuleMult(m, M, currRing);
    1115           return FALSE;
    1116         }
    1117         WerrorS("system(\"tensorModuleMult\", int, module) expected");
    1118         return TRUE;
    1119       } else
    1120   #endif
    1121 
     1356      {
     1357        int m = (int)( (long)h->Data() );
     1358        ideal M = (ideal)h->next->Data();
     1359        res->rtyp=MODUL_CMD;
     1360        res->data=(void *)id_TensorModuleMult(m, M, currRing);
     1361        return FALSE;
     1362      }
     1363      WerrorS("system(\"tensorModuleMult\", int, module) expected");
     1364      return TRUE;
     1365    }
     1366    else
     1367  #endif
    11221368  ////////////////////////////////////////////////////////////////////////
    11231369  /// Additional interface functions to non-commutative subsystem (PLURAL)
     
    11251371
    11261372
     1373  /*==================== Approx_Step  =================*/
    11271374  #ifdef HAVE_PLURAL
    1128   /*==================== Approx_Step  =================*/
    1129        if (strcmp(sys_cmd, "astep") == 0)
    1130        {
     1375    if (strcmp(sys_cmd, "astep") == 0)
     1376    {
    11311377         ideal I;
    11321378         if ((h!=NULL) && (h->Typ()==IDEAL_CMD))
     
    11401386         else return TRUE;
    11411387         return FALSE;
    1142        }
     1388    }
     1389    else
     1390  #endif
    11431391  /*==================== PrintMat  =================*/
    1144       if (strcmp(sys_cmd, "PrintMat") == 0)
    1145       {
     1392  #ifdef HAVE_PLURAL
     1393    if (strcmp(sys_cmd, "PrintMat") == 0)
     1394    {
    11461395          int a;
    11471396          int b;
     
    11731422          else res->data=NULL;
    11741423          return FALSE;
    1175         }
     1424    }
     1425    else
     1426  #endif
    11761427  /*==================== twostd  =================*/
    1177         if (strcmp(sys_cmd, "twostd") == 0)
    1178         {
     1428  #ifdef HAVE_PLURAL
     1429    if (strcmp(sys_cmd, "twostd") == 0)
     1430    {
    11791431          ideal I;
    11801432          if ((h!=NULL) && (h->Typ()==IDEAL_CMD))
     
    11891441          else return TRUE;
    11901442          return FALSE;
    1191         }
     1443    }
     1444    else
     1445  #endif
    11921446  /*==================== lie bracket =================*/
    1193       if (strcmp(sys_cmd, "bracket") == 0)
    1194       {
     1447  #ifdef HAVE_PLURAL
     1448    if (strcmp(sys_cmd, "bracket") == 0)
     1449    {
    11951450        poly p;
    11961451        poly q;
     
    12101465        else res->data=NULL;
    12111466        return FALSE;
    1212       }
    1213       if(strcmp(sys_cmd,"NCUseExtensions")==0)
    1214       {
    1215 
     1467    }
     1468    else
     1469  #endif
     1470/* ============ NCUseExtensions ======================== */
     1471  #ifdef HAVE_PLURAL
     1472    if(strcmp(sys_cmd,"NCUseExtensions")==0)
     1473    {
    12161474        if ((h!=NULL) && (h->Typ()==INT_CMD))
    12171475          res->data=(void *)(long)setNCExtensions( (int)((long)(h->Data())) );
    12181476        else
    12191477          res->data=(void *)(long)getNCExtensions();
    1220 
    12211478        res->rtyp=INT_CMD;
    12221479        return FALSE;
    1223       }
    1224 
    1225 
    1226       if(strcmp(sys_cmd,"NCGetType")==0)
    1227       {
     1480    }
     1481    else
     1482  #endif
     1483/* ============ NCGetType ======================== */
     1484  #ifdef HAVE_PLURAL
     1485    if(strcmp(sys_cmd,"NCGetType")==0)
     1486    {
    12281487        res->rtyp=INT_CMD;
    1229 
    12301488        if( rIsPluralRing(currRing) )
    12311489          res->data=(void *)(long)ncRingType(currRing);
    12321490        else
    12331491          res->data=(void *)(-1L);
    1234 
    1235         return FALSE;
    1236       }
    1237 
    1238 
    1239       if(strcmp(sys_cmd,"ForceSCA")==0)
    1240       {
     1492        return FALSE;
     1493    }
     1494    else
     1495  #endif
     1496/* ============ ForceSCA ======================== */
     1497  #ifdef HAVE_PLURAL
     1498    if(strcmp(sys_cmd,"ForceSCA")==0)
     1499    {
    12411500        if( !rIsPluralRing(currRing) )
    12421501          return TRUE;
    1243 
    12441502        int b, e;
    1245 
    12461503        if ((h!=NULL) && (h->Typ()==INT_CMD))
    12471504        {
     
    12501507        }
    12511508        else return TRUE;
    1252 
    12531509        if ((h!=NULL) && (h->Typ()==INT_CMD))
    12541510        {
     
    12561512        }
    12571513        else return TRUE;
    1258 
    1259 
    12601514        if( !sca_Force(currRing, b, e) )
    12611515          return TRUE;
    1262 
    1263         return FALSE;
    1264       }
    1265 
    1266       if(strcmp(sys_cmd,"ForceNewNCMultiplication")==0)
    1267       {
     1516        return FALSE;
     1517    }
     1518    else
     1519  #endif
     1520/* ============ ForceNewNCMultiplication ======================== */
     1521  #ifdef HAVE_PLURAL
     1522    if(strcmp(sys_cmd,"ForceNewNCMultiplication")==0)
     1523    {
    12681524        if( !rIsPluralRing(currRing) )
    12691525          return TRUE;
    1270 
    12711526        if( !ncInitSpecialPairMultiplication(currRing) ) // No Plural!
    12721527          return TRUE;
    12731528
    12741529        return FALSE;
    1275       }
    1276 
    1277       if(strcmp(sys_cmd,"ForceNewOldNCMultiplication")==0)
    1278       {
     1530    }
     1531    else
     1532  #endif
     1533/* ============ ForceNewOldNCMultiplication ======================== */
     1534  #ifdef HAVE_PLURAL
     1535    if(strcmp(sys_cmd,"ForceNewOldNCMultiplication")==0)
     1536    {
    12791537        if( !rIsPluralRing(currRing) )
    12801538          return TRUE;
    1281 
    12821539        if( !ncInitSpecialPowersMultiplication(currRing) ) // Enable Formula for Plural (depends on swiches)!
    12831540          return TRUE;
    1284 
    1285         return FALSE;
    1286       }
    1287 
    1288 
    1289 
    1290 
    1291       /*==================== PLURAL =================*/
    1292   /*==================== opp ==================================*/
    1293       if (strcmp(sys_cmd, "opp")==0)
    1294       {
    1295         if ((h!=NULL) && (h->Typ()==RING_CMD))
    1296         {
    1297           ring r=(ring)h->Data();
    1298           res->data=rOpposite(r);
    1299           res->rtyp=RING_CMD;
    1300           return FALSE;
    1301         }
    1302         else
    1303         {
    1304           WerrorS("`system(\"opp\",<ring>)` expected");
    1305           return TRUE;
    1306         }
    1307       }
    1308       else
     1541        return FALSE;
     1542    }
     1543    else
     1544  #endif
     1545/* ============ opp ======================== */
     1546  #ifdef HAVE_PLURAL
     1547    if (strcmp(sys_cmd, "opp")==0)
     1548    {
     1549      if ((h!=NULL) && (h->Typ()==RING_CMD))
     1550      {
     1551        ring r=(ring)h->Data();
     1552        res->data=rOpposite(r);
     1553        res->rtyp=RING_CMD;
     1554        return FALSE;
     1555      }
     1556      else
     1557      {
     1558        WerrorS("`system(\"opp\",<ring>)` expected");
     1559        return TRUE;
     1560      }
     1561    }
     1562    else
     1563  #endif
    13091564  /*==================== env ==================================*/
    1310       if (strcmp(sys_cmd, "env")==0)
    1311       {
     1565  #ifdef HAVE_PLURAL
     1566    if (strcmp(sys_cmd, "env")==0)
     1567    {
    13121568        if ((h!=NULL) && (h->Typ()==RING_CMD))
    13131569        {
     
    13221578          return TRUE;
    13231579        }
    1324       }
    1325       else
     1580    }
     1581    else
     1582  #endif 
    13261583  /*==================== oppose ==================================*/
    1327       if (strcmp(sys_cmd, "oppose")==0)
    1328       {
    1329         if ((h!=NULL) && (h->Typ()==RING_CMD)
    1330         && (h->next!= NULL))
    1331         {
    1332           ring Rop = (ring)h->Data();
    1333           h   = h->next;
    1334           idhdl w;
    1335           if ((w=Rop->idroot->get(h->Name(),myynest))!=NULL)
    1336           {
    1337             poly p = (poly)IDDATA(w);
    1338             res->data = pOppose(Rop, p, currRing); // into CurrRing?
    1339             res->rtyp = POLY_CMD;
    1340             return FALSE;
    1341           }
    1342         }
    1343         else
    1344         {
    1345           WerrorS("`system(\"oppose\",<ring>,<poly>)` expected");
    1346           return TRUE;
    1347         }
    1348       }
    1349       else
     1584  #ifdef HAVE_PLURAL
     1585    if (strcmp(sys_cmd, "oppose")==0)
     1586    {
     1587      if ((h!=NULL) && (h->Typ()==RING_CMD)
     1588      && (h->next!= NULL))
     1589      {
     1590        ring Rop = (ring)h->Data();
     1591        h   = h->next;
     1592        idhdl w;
     1593        if ((w=Rop->idroot->get(h->Name(),myynest))!=NULL)
     1594        {
     1595          poly p = (poly)IDDATA(w);
     1596          res->data = pOppose(Rop, p, currRing); // into CurrRing?
     1597          res->rtyp = POLY_CMD;
     1598          return FALSE;
     1599        }
     1600      }
     1601      else
     1602      {
     1603        WerrorS("`system(\"oppose\",<ring>,<poly>)` expected");
     1604        return TRUE;
     1605      }
     1606    }
     1607    else
     1608  #endif
    13501609  /*==================== freeGB, twosided GB in free algebra =================*/
     1610  #ifdef HAVE_PLURAL
    13511611  #ifdef HAVE_SHIFTBBA
    1352       if (strcmp(sys_cmd, "freegb") == 0)
    1353       {
     1612    if (strcmp(sys_cmd, "freegb") == 0)
     1613    {
    13541614        ideal I;
    13551615        int uptodeg, lVblock;
     
    13791639        else return TRUE;
    13801640        return FALSE;
    1381       }
    1382       else
     1641    }
     1642    else
    13831643  #endif /*SHIFTBBA*/
    13841644  #endif /*PLURAL*/
    13851645  /*==================== walk stuff =================*/
     1646  /*==================== walkNextWeight =================*/
    13861647  #ifdef HAVE_WALK
    13871648  #ifdef OWNW
    1388       if (strcmp(sys_cmd, "walkNextWeight") == 0)
    1389       {
     1649    if (strcmp(sys_cmd, "walkNextWeight") == 0)
     1650    {
    13901651        if (h == NULL || h->Typ() != INTVEC_CMD ||
    13911652            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    13921653            h->next->next == NULL || h->next->next->Typ() != IDEAL_CMD)
    13931654        {
    1394           Werror("system(\"walkNextWeight\", intvec, intvec, ideal) expected");
     1655          WerrorS("system(\"walkNextWeight\", intvec, intvec, ideal) expected");
    13951656          return TRUE;
    13961657        }
     
    14151676        }
    14161677        return FALSE;
    1417       }
    1418       else if (strcmp(sys_cmd, "walkInitials") == 0)
    1419       {
     1678    }
     1679    else
     1680  /*==================== walkNextWeight =================*/
     1681    if (strcmp(sys_cmd, "walkInitials") == 0)
     1682    {
    14201683        if (h == NULL || h->Typ() != IDEAL_CMD)
    14211684        {
     
    14271690        res->rtyp = IDEAL_CMD;
    14281691        return FALSE;
    1429       }
    1430       else
    1431   #endif
     1692    }
     1693    else
     1694  #endif
     1695  /*==================== walkAddIntVec =================*/
    14321696  #ifdef WAIV
    1433       if (strcmp(sys_cmd, "walkAddIntVec") == 0)
    1434       {
     1697    if (strcmp(sys_cmd, "walkAddIntVec") == 0)
     1698    {
    14351699        if (h == NULL || h->Typ() != INTVEC_CMD ||
    14361700            h->next == NULL || h->next->Typ() != INTVEC_CMD)
     
    14461710        res->rtyp = INTVEC_CMD;
    14471711        return FALSE;
    1448       }
    1449       else
    1450   #endif
     1712    }
     1713    else
     1714  #endif
     1715  /*==================== MwalkNextWeight =================*/
    14511716  #ifdef MwaklNextWeight
    1452       if (strcmp(sys_cmd, "MwalkNextWeight") == 0)
    1453       {
     1717    if (strcmp(sys_cmd, "MwalkNextWeight") == 0)
     1718    {
    14541719        if (h == NULL || h->Typ() != INTVEC_CMD ||
    14551720            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    14561721            h->next->next == NULL || h->next->next->Typ() != IDEAL_CMD)
    14571722        {
    1458           Werror("system(\"MwalkNextWeight\", intvec, intvec, ideal) expected");
     1723          WerrorS("system(\"MwalkNextWeight\", intvec, intvec, ideal) expected");
    14591724          return TRUE;
    14601725        }
     
    14771742
    14781743        return FALSE;
    1479       }
    1480       else
     1744    }
     1745    else
    14811746  #endif //MWalkNextWeight
    1482       if(strcmp(sys_cmd, "Mivdp") == 0)
    1483       {
     1747  /*==================== Mivdp =================*/
     1748    if(strcmp(sys_cmd, "Mivdp") == 0)
     1749    {
    14841750        if (h == NULL || h->Typ() != INT_CMD)
    14851751        {
    1486           Werror("system(\"Mivdp\", int) expected");
     1752          WerrorS("system(\"Mivdp\", int) expected");
    14871753          return TRUE;
    14881754        }
     
    15011767
    15021768        return FALSE;
    1503       }
    1504 
    1505       else if(strcmp(sys_cmd, "Mivlp") == 0)
    1506       {
     1769    }
     1770    else
     1771  /*==================== Mivlp =================*/
     1772    if(strcmp(sys_cmd, "Mivlp") == 0)
     1773    {
    15071774        if (h == NULL || h->Typ() != INT_CMD)
    15081775        {
    1509           Werror("system(\"Mivlp\", int) expected");
     1776          WerrorS("system(\"Mivlp\", int) expected");
    15101777          return TRUE;
    15111778        }
     
    15241791
    15251792        return FALSE;
    1526       }
    1527      else
     1793    }
     1794    else
     1795  /*==================== MpDiv =================*/
    15281796  #ifdef MpDiv
    1529         if(strcmp(sys_cmd, "MpDiv") == 0)
    1530         {
     1797    if(strcmp(sys_cmd, "MpDiv") == 0)
     1798    {
    15311799          if(h==NULL || h->Typ() != POLY_CMD ||
    15321800             h->next == NULL || h->next->Typ() != POLY_CMD)
    15331801          {
    1534             Werror("system(\"MpDiv\",poly, poly) expected");
     1802            WerrorS("system(\"MpDiv\",poly, poly) expected");
    15351803            return TRUE;
    15361804          }
     
    15431811          res->data = result;
    15441812          return FALSE;
    1545         }
    1546       else
    1547   #endif
     1813    }
     1814    else
     1815  #endif
     1816  /*==================== MpMult =================*/
    15481817  #ifdef MpMult
    1549         if(strcmp(sys_cmd, "MpMult") == 0)
    1550         {
     1818    if(strcmp(sys_cmd, "MpMult") == 0)
     1819    {
    15511820          if(h==NULL || h->Typ() != POLY_CMD ||
    15521821             h->next == NULL || h->next->Typ() != POLY_CMD)
    15531822          {
    1554             Werror("system(\"MpMult\",poly, poly) expected");
     1823            WerrorS("system(\"MpMult\",poly, poly) expected");
    15551824            return TRUE;
    15561825          }
     
    15621831          res->data = result;
    15631832          return FALSE;
    1564         }
    1565     else
    1566   #endif
    1567      if (strcmp(sys_cmd, "MivSame") == 0)
    1568       {
     1833    }
     1834    else
     1835  #endif
     1836  /*==================== MivSame =================*/
     1837    if (strcmp(sys_cmd, "MivSame") == 0)
     1838    {
    15691839        if(h == NULL || h->Typ() != INTVEC_CMD ||
    15701840           h->next == NULL || h->next->Typ() != INTVEC_CMD )
    15711841        {
    1572           Werror("system(\"MivSame\", intvec, intvec) expected");
     1842          WerrorS("system(\"MivSame\", intvec, intvec) expected");
    15731843          return TRUE;
    15741844        }
     
    15931863        res->data = (void*)(long) MivSame(arg1, arg2);
    15941864        return FALSE;
    1595       }
    1596     else
    1597      if (strcmp(sys_cmd, "M3ivSame") == 0)
    1598       {
     1865    }
     1866    else
     1867  /*==================== M3ivSame =================*/
     1868    if (strcmp(sys_cmd, "M3ivSame") == 0)
     1869    {
    15991870        if(h == NULL || h->Typ() != INTVEC_CMD ||
    16001871           h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    16011872           h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD  )
    16021873        {
    1603           Werror("system(\"M3ivSame\", intvec, intvec, intvec) expected");
     1874          WerrorS("system(\"M3ivSame\", intvec, intvec, intvec) expected");
    16041875          return TRUE;
    16051876        }
     
    16261897        res->data = (void*)(long) M3ivSame(arg1, arg2, arg3);
    16271898        return FALSE;
    1628       }
    1629     else
    1630         if(strcmp(sys_cmd, "MwalkInitialForm") == 0)
    1631         {
     1899    }
     1900    else
     1901  /*==================== MwalkInitialForm =================*/
     1902    if(strcmp(sys_cmd, "MwalkInitialForm") == 0)
     1903    {
    16321904          if(h == NULL || h->Typ() != IDEAL_CMD ||
    16331905             h->next == NULL || h->next->Typ() != INTVEC_CMD)
    16341906          {
    1635             Werror("system(\"MwalkInitialForm\", ideal, intvec) expected");
     1907            WerrorS("system(\"MwalkInitialForm\", ideal, intvec) expected");
    16361908            return TRUE;
    16371909          }
     
    16491921          res->data = result;
    16501922          return FALSE;
    1651         }
    1652     else
    1653       /************** Perturbation walk **********/
    1654        if(strcmp(sys_cmd, "MivMatrixOrder") == 0)
    1655         {
     1923    }
     1924    else
     1925  /*==================== MivMatrixOrder =================*/
     1926    /************** Perturbation walk **********/
     1927    if(strcmp(sys_cmd, "MivMatrixOrder") == 0)
     1928    {
    16561929          if(h==NULL || h->Typ() != INTVEC_CMD)
    16571930          {
    1658             Werror("system(\"MivMatrixOrder\",intvec) expected");
     1931            WerrorS("system(\"MivMatrixOrder\",intvec) expected");
    16591932            return TRUE;
    16601933          }
     
    16661939          res->data =  result;
    16671940          return FALSE;
    1668         }
    1669       else
    1670        if(strcmp(sys_cmd, "MivMatrixOrderdp") == 0)
    1671         {
     1941    }
     1942    else
     1943  /*==================== MivMatrixOrderdp =================*/
     1944    if(strcmp(sys_cmd, "MivMatrixOrderdp") == 0)
     1945    {
    16721946          if(h==NULL || h->Typ() != INT_CMD)
    16731947          {
    1674             Werror("system(\"MivMatrixOrderdp\",intvec) expected");
     1948            WerrorS("system(\"MivMatrixOrderdp\",intvec) expected");
    16751949            return TRUE;
    16761950          }
     
    16831957          return FALSE;
    16841958        }
    1685       else
    1686       if(strcmp(sys_cmd, "MPertVectors") == 0)
    1687         {
    1688 
     1959    else
     1960  /*==================== MPertVectors =================*/
     1961    if(strcmp(sys_cmd, "MPertVectors") == 0)
     1962    {
    16891963          if(h==NULL || h->Typ() != IDEAL_CMD ||
    16901964             h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    16911965             h->next->next == NULL || h->next->next->Typ() != INT_CMD)
    16921966          {
    1693             Werror("system(\"MPertVectors\",ideal, intvec, int) expected");
     1967            WerrorS("system(\"MPertVectors\",ideal, intvec, int) expected");
    16941968            return TRUE;
    16951969          }
     
    17041978          res->data =  result;
    17051979          return FALSE;
    1706         }
    1707       else
    1708       if(strcmp(sys_cmd, "MPertVectorslp") == 0)
    1709         {
    1710 
     1980    }
     1981    else
     1982  /*==================== MPertVectorslp =================*/
     1983    if(strcmp(sys_cmd, "MPertVectorslp") == 0)
     1984    {
    17111985          if(h==NULL || h->Typ() != IDEAL_CMD ||
    17121986             h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    17131987             h->next->next == NULL || h->next->next->Typ() != INT_CMD)
    17141988          {
    1715             Werror("system(\"MPertVectorslp\",ideal, intvec, int) expected");
     1989            WerrorS("system(\"MPertVectorslp\",ideal, intvec, int) expected");
    17161990            return TRUE;
    17171991          }
     
    17262000          res->data =  result;
    17272001          return FALSE;
    1728         }
    1729           /************** fractal walk **********/
    1730       else
    1731         if(strcmp(sys_cmd, "Mfpertvector") == 0)
    1732         {
     2002    }
     2003    /************** fractal walk **********/
     2004    else
     2005    if(strcmp(sys_cmd, "Mfpertvector") == 0)
     2006    {
    17332007          if(h==NULL || h->Typ() != IDEAL_CMD ||
    17342008            h->next==NULL || h->next->Typ() != INTVEC_CMD  )
    17352009          {
    1736             Werror("system(\"Mfpertvector\", ideal,intvec) expected");
     2010            WerrorS("system(\"Mfpertvector\", ideal,intvec) expected");
    17372011            return TRUE;
    17382012          }
     
    17442018          res->data =  result;
    17452019          return FALSE;
    1746         }
    1747       else
    1748        if(strcmp(sys_cmd, "MivUnit") == 0)
    1749         {
     2020    }
     2021    else
     2022    if(strcmp(sys_cmd, "MivUnit") == 0)
     2023    {
    17502024          int arg1 = (int) ((long)(h->Data()));
    17512025
     
    17552029          res->data =  result;
    17562030          return FALSE;
    1757         }
    1758        else
    1759          if(strcmp(sys_cmd, "MivWeightOrderlp") == 0)
    1760          {
     2031    }
     2032    else
     2033    if(strcmp(sys_cmd, "MivWeightOrderlp") == 0)
     2034    {
    17612035          if(h==NULL || h->Typ() != INTVEC_CMD)
    17622036          {
    1763             Werror("system(\"MivWeightOrderlp\",intvec) expected");
     2037            WerrorS("system(\"MivWeightOrderlp\",intvec) expected");
    17642038            return TRUE;
    17652039          }
     
    17702044          res->data =  result;
    17712045          return FALSE;
    1772         }
    1773        else
    1774       if(strcmp(sys_cmd, "MivWeightOrderdp") == 0)
    1775         {
     2046    }
     2047    else
     2048    if(strcmp(sys_cmd, "MivWeightOrderdp") == 0)
     2049    {
    17762050          if(h==NULL || h->Typ() != INTVEC_CMD)
    17772051          {
    1778             Werror("system(\"MivWeightOrderdp\",intvec) expected");
     2052            WerrorS("system(\"MivWeightOrderdp\",intvec) expected");
    17792053            return TRUE;
    17802054          }
     
    17872061          res->data =  result;
    17882062          return FALSE;
    1789         }
    1790       else
    1791        if(strcmp(sys_cmd, "MivMatrixOrderlp") == 0)
    1792         {
     2063    }
     2064    else
     2065    if(strcmp(sys_cmd, "MivMatrixOrderlp") == 0)
     2066    {
    17932067          if(h==NULL || h->Typ() != INT_CMD)
    17942068          {
    1795             Werror("system(\"MivMatrixOrderlp\",int) expected");
     2069            WerrorS("system(\"MivMatrixOrderlp\",int) expected");
    17962070            return TRUE;
    17972071          }
     
    18032077          res->data =  result;
    18042078          return FALSE;
    1805         }
    1806       else
    1807       if (strcmp(sys_cmd, "MkInterRedNextWeight") == 0)
    1808       {
     2079    }
     2080    else
     2081    if (strcmp(sys_cmd, "MkInterRedNextWeight") == 0)
     2082    {
    18092083        if (h == NULL || h->Typ() != INTVEC_CMD ||
    18102084            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    18112085            h->next->next == NULL || h->next->next->Typ() != IDEAL_CMD)
    18122086        {
    1813           Werror("system(\"MkInterRedNextWeight\", intvec, intvec, ideal) expected");
     2087          WerrorS("system(\"MkInterRedNextWeight\", intvec, intvec, ideal) expected");
    18142088          return TRUE;
    18152089        }
     
    18322106
    18332107        return FALSE;
    1834       }
    1835       else
     2108    }
     2109    else
    18362110  #ifdef MPertNextWeight
    1837       if (strcmp(sys_cmd, "MPertNextWeight") == 0)
    1838       {
     2111    if (strcmp(sys_cmd, "MPertNextWeight") == 0)
     2112    {
    18392113        if (h == NULL || h->Typ() != INTVEC_CMD ||
    18402114            h->next == NULL || h->next->Typ() != IDEAL_CMD ||
    18412115            h->next->next == NULL || h->next->next->Typ() != INT_CMD)
    18422116        {
    1843           Werror("system(\"MPertNextWeight\", intvec, ideal, int) expected");
     2117          WerrorS("system(\"MPertNextWeight\", intvec, ideal, int) expected");
    18442118          return TRUE;
    18452119        }
     
    18612135
    18622136        return FALSE;
    1863       }
    1864       else
     2137    }
     2138    else
    18652139  #endif //MPertNextWeight
    18662140  #ifdef Mivperttarget
    18672141    if (strcmp(sys_cmd, "Mivperttarget") == 0)
    1868       {
     2142    {
    18692143        if (h == NULL || h->Typ() != IDEAL_CMD ||
    18702144            h->next == NULL || h->next->Typ() != INT_CMD )
    18712145        {
    1872           Werror("system(\"Mivperttarget\", ideal, int) expected");
     2146          WerrorS("system(\"Mivperttarget\", ideal, int) expected");
    18732147          return TRUE;
    18742148        }
     
    18832157
    18842158        return FALSE;
    1885       }
    1886       else
     2159    }
     2160    else
    18872161  #endif //Mivperttarget
    1888       if (strcmp(sys_cmd, "Mwalk") == 0)
    1889       {
     2162    if (strcmp(sys_cmd, "Mwalk") == 0)
     2163    {
    18902164        if (h == NULL || h->Typ() != IDEAL_CMD ||
    18912165            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    18922166            h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD)
    18932167        {
    1894           Werror("system(\"Mwalk\", ideal, intvec, intvec) expected");
     2168          WerrorS("system(\"Mwalk\", ideal, intvec, intvec) expected");
    18952169          return TRUE;
    18962170        }
     
    19142188
    19152189        return FALSE;
    1916       }
    1917       else
     2190    }
     2191    else
    19182192  #ifdef MPWALK_ORIG
    1919       if (strcmp(sys_cmd, "Mpwalk") == 0)
    1920       {
     2193    if (strcmp(sys_cmd, "Mpwalk") == 0)
     2194    {
    19212195        if (h == NULL || h->Typ() != IDEAL_CMD ||
    19222196            h->next == NULL || h->next->Typ() != INT_CMD ||
     
    19272201              h->next->next->next->next->Typ() != INTVEC_CMD)
    19282202        {
    1929           Werror("system(\"Mpwalk\", ideal, int, int, intvec, intvec) expected");
     2203          WerrorS("system(\"Mpwalk\", ideal, int, int, intvec, intvec) expected");
    19302204          return TRUE;
    19312205        }
     
    19512225
    19522226        return FALSE;
    1953       }
    1954       else
    1955   #endif
    1956       if (strcmp(sys_cmd, "Mpwalk") == 0)
    1957       {
     2227    }
     2228    else
     2229  #endif
     2230    if (strcmp(sys_cmd, "Mpwalk") == 0)
     2231    {
    19582232        if (h == NULL || h->Typ() != IDEAL_CMD ||
    19592233            h->next == NULL || h->next->Typ() != INT_CMD ||
     
    19662240              h->next->next->next->next->next->Typ() != INT_CMD)
    19672241        {
    1968           Werror("system(\"Mpwalk\", ideal, int, int, intvec, intvec, int) expected");
     2242          WerrorS("system(\"Mpwalk\", ideal, int, int, intvec, intvec, int) expected");
    19692243          return TRUE;
    19702244        }
     
    19912265
    19922266        return FALSE;
    1993       }
    1994       else
    1995       if (strcmp(sys_cmd, "Mrwalk") == 0)
    1996       { // Random Walk
     2267    }
     2268    else
     2269    if (strcmp(sys_cmd, "Mrwalk") == 0)
     2270    { // Random Walk
    19972271        if (h == NULL || h->Typ() != IDEAL_CMD ||
    19982272            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
     
    20012275            h->next->next->next->next == NULL || h->next->next->next->next->Typ() != INT_CMD)
    20022276        {
    2003           Werror("system(\"Mrwalk\", ideal, intvec, intvec, int, int) expected");
     2277          WerrorS("system(\"Mrwalk\", ideal, intvec, intvec, int, int) expected");
    20042278          return TRUE;
    20052279        }
     
    20252299
    20262300        return FALSE;
    2027       }
    2028       else
    2029       if (strcmp(sys_cmd, "MAltwalk1") == 0)
    2030       {
     2301    }
     2302    else
     2303    if (strcmp(sys_cmd, "MAltwalk1") == 0)
     2304    {
    20312305        if (h == NULL || h->Typ() != IDEAL_CMD ||
    20322306            h->next == NULL || h->next->Typ() != INT_CMD ||
     
    20372311              h->next->next->next->next->Typ() != INTVEC_CMD)
    20382312        {
    2039           Werror("system(\"MAltwalk1\", ideal, int, int, intvec, intvec) expected");
     2313          WerrorS("system(\"MAltwalk1\", ideal, int, int, intvec, intvec) expected");
    20402314          return TRUE;
    20412315        }
     
    20612335
    20622336        return FALSE;
    2063       }
     2337    }
    20642338  #ifdef MFWALK_ALT
    2065       else
    2066       if (strcmp(sys_cmd, "Mfwalk_alt") == 0)
    2067       {
     2339    else
     2340    if (strcmp(sys_cmd, "Mfwalk_alt") == 0)
     2341    {
    20682342        if (h == NULL || h->Typ() != IDEAL_CMD ||
    20692343            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
     
    20712345            h->next->next->next == NULL || h->next->next->next->Typ() !=INT_CMD)
    20722346        {
    2073           Werror("system(\"Mfwalk\", ideal, intvec, intvec,int) expected");
     2347          WerrorS("system(\"Mfwalk\", ideal, intvec, intvec,int) expected");
    20742348          return TRUE;
    20752349        }
     
    20932367
    20942368        return FALSE;
    2095       }
    2096   #endif
    2097       else
    2098       if (strcmp(sys_cmd, "Mfwalk") == 0)
    2099       {
     2369    }
     2370  #endif
     2371    else
     2372    if (strcmp(sys_cmd, "Mfwalk") == 0)
     2373    {
    21002374        if (h == NULL || h->Typ() != IDEAL_CMD ||
    21012375            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    21022376            h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD)
    21032377        {
    2104           Werror("system(\"Mfwalk\", ideal, intvec, intvec) expected");
     2378          WerrorS("system(\"Mfwalk\", ideal, intvec, intvec) expected");
    21052379          return TRUE;
    21062380        }
     
    21232397
    21242398        return FALSE;
    2125       }
    2126       else
    2127       if (strcmp(sys_cmd, "Mfrwalk") == 0)
    2128       {
     2399    }
     2400    else
     2401    if (strcmp(sys_cmd, "Mfrwalk") == 0)
     2402    {
    21292403        if (h == NULL || h->Typ() != IDEAL_CMD ||
    21302404            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
     
    21322406            h->next->next->next == NULL || h->next->next->next->Typ() != INT_CMD)
    21332407        {
    2134           Werror("system(\"Mfrwalk\", ideal, intvec, intvec, int) expected");
     2408          WerrorS("system(\"Mfrwalk\", ideal, intvec, intvec, int) expected");
    21352409          return TRUE;
    21362410        }
     
    21542428
    21552429        return FALSE;
    2156       }
    2157       else
     2430    }
     2431    else
    21582432
    21592433  #ifdef TRAN_Orig
    2160       if (strcmp(sys_cmd, "TranMImprovwalk") == 0)
    2161       {
     2434    if (strcmp(sys_cmd, "TranMImprovwalk") == 0)
     2435    {
    21622436        if (h == NULL || h->Typ() != IDEAL_CMD ||
    21632437            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    21642438            h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD)
    21652439        {
    2166           Werror("system(\"TranMImprovwalk\", ideal, intvec, intvec) expected");
     2440          WerrorS("system(\"TranMImprovwalk\", ideal, intvec, intvec) expected");
    21672441          return TRUE;
    21682442        }
     
    21862460
    21872461        return FALSE;
    2188       }
    2189       else
    2190   #endif
    2191       if (strcmp(sys_cmd, "MAltwalk2") == 0)
    2192         {
     2462    }
     2463    else
     2464  #endif
     2465    if (strcmp(sys_cmd, "MAltwalk2") == 0)
     2466    {
    21932467        if (h == NULL || h->Typ() != IDEAL_CMD ||
    21942468            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
    21952469            h->next->next == NULL || h->next->next->Typ() != INTVEC_CMD)
    21962470        {
    2197           Werror("system(\"MAltwalk2\", ideal, intvec, intvec) expected");
     2471          WerrorS("system(\"MAltwalk2\", ideal, intvec, intvec) expected");
    21982472          return TRUE;
    21992473        }
     
    22172491
    22182492        return FALSE;
    2219       }
    2220       else
    2221       if (strcmp(sys_cmd, "TranMImprovwalk") == 0)
    2222       {
     2493    }
     2494    else
     2495    if (strcmp(sys_cmd, "TranMImprovwalk") == 0)
     2496    {
    22232497        if (h == NULL || h->Typ() != IDEAL_CMD ||
    22242498            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
     
    22262500            h->next->next->next == NULL || h->next->next->next->Typ() != INT_CMD)
    22272501        {
    2228           Werror("system(\"TranMImprovwalk\", ideal, intvec, intvec, int) expected");
     2502          WerrorS("system(\"TranMImprovwalk\", ideal, intvec, intvec, int) expected");
    22292503          return TRUE;
    22302504        }
     
    22482522
    22492523        return FALSE;
    2250       }
    2251       else
    2252       if (strcmp(sys_cmd, "TranMrImprovwalk") == 0)
    2253       {
     2524    }
     2525    else
     2526    if (strcmp(sys_cmd, "TranMrImprovwalk") == 0)
     2527    {
    22542528        if (h == NULL || h->Typ() != IDEAL_CMD ||
    22552529            h->next == NULL || h->next->Typ() != INTVEC_CMD ||
     
    22592533            h->next->next->next == NULL || h->next->next->next->next->next->Typ() != INT_CMD)
    22602534        {
    2261           Werror("system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");
     2535          WerrorS("system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");
    22622536          return TRUE;
    22632537        }
     
    22822556
    22832557        return FALSE;
    2284       }
    2285       else
    2286 
     2558    }
     2559    else
    22872560  #endif
    22882561  /*================= Extended system call ========================*/
    2289      {
     2562    {
    22902563       #ifndef MAKE_DISTRIBUTION
    22912564       return(jjEXTENDED_SYSTEM(res, args));
     
    22932566       Werror( "system(\"%s\",...) %s", sys_cmd, feNotImplemented );
    22942567       #endif
    2295      }
    2296     } /* typ==string */
    2297     return TRUE;
    2298   }
     2568    }
     2569  } /* typ==string */
     2570  return TRUE;
     2571}
    22992572
    23002573
     
    28783151          if (n != m->cols())
    28793152          {
    2880             Werror("expected exactly one argument: %s",
     3153            WerrorS("expected exactly one argument: "
    28813154                   "a square matrix with number entries");
    28823155            return TRUE;
     
    29423215          return FALSE;
    29433216        }
    2944         else { Werror("wrong typ"); return TRUE;}
     3217        else { WerrorS("wrong typ"); return TRUE;}
    29453218      }
    29463219      else
     
    29793252  #endif
    29803253
    2981   /*==== countedref: reference and shared ====*/
    2982        if (strcmp(sys_cmd, "shared") == 0)
    2983        {
    2984        #ifndef SI_COUNTEDREF_AUTOLOAD
    2985          void countedref_shared_load();
    2986          countedref_shared_load();
    2987        #endif
    2988          res->rtyp = NONE;
    2989          return FALSE;
    2990        }
    2991        else if (strcmp(sys_cmd, "reference") == 0)
    2992        {
    2993        #ifndef SI_COUNTEDREF_AUTOLOAD
    2994          void countedref_reference_load();
    2995          countedref_reference_load();
    2996        #endif
    2997          res->rtyp = NONE;
    2998          return FALSE;
    2999        }
    3000        else
    30013254
    30023255  /*==================== DLL =================*/
    3003   #ifdef ix86_Win
     3256  #ifdef __CYGWIN__
    30043257  #ifdef HAVE_DL
    30053258  /* testing the DLL functionality under Win32 */
     
    32303483  #endif
    32313484  /*==================== RatNF, noncomm rational coeffs =================*/
    3232   #ifdef HAVE_PLURAL
    32333485  #ifdef HAVE_RATGRING
    32343486      if (strcmp(sys_cmd, "intratNF") == 0)
     
    33733625      }
    33743626      else
    3375   /*==================== shift-test for freeGB  =================*/
    3376   #ifdef HAVE_SHIFTBBA
    3377       if (strcmp(sys_cmd, "stest") == 0)
    3378       {
    3379         poly p;
    3380         int sh,uptodeg, lVblock;
    3381         if ((h!=NULL) && (h->Typ()==POLY_CMD))
    3382         {
    3383           p=(poly)h->CopyD();
    3384           h=h->next;
    3385         }
    3386         else return TRUE;
    3387         if ((h!=NULL) && (h->Typ()==INT_CMD))
    3388         {
    3389           sh=(int)((long)(h->Data()));
    3390           h=h->next;
    3391         }
    3392         else return TRUE;
    3393 
    3394         if ((h!=NULL) && (h->Typ()==INT_CMD))
    3395         {
    3396           uptodeg=(int)((long)(h->Data()));
    3397           h=h->next;
    3398         }
    3399         else return TRUE;
    3400         if ((h!=NULL) && (h->Typ()==INT_CMD))
    3401         {
    3402           lVblock=(int)((long)(h->Data()));
    3403           res->data = pLPshift(p,sh,uptodeg,lVblock);
    3404           res->rtyp = POLY_CMD;
    3405         }
    3406         else return TRUE;
    3407         return FALSE;
    3408       }
    3409       else
    3410   #endif
    3411   /*==================== block-test for freeGB  =================*/
    3412   #ifdef HAVE_SHIFTBBA
    3413       if (strcmp(sys_cmd, "btest") == 0)
    3414       {
    3415         poly p;
    3416         int lV;
    3417         if ((h!=NULL) && (h->Typ()==POLY_CMD))
    3418         {
    3419           p=(poly)h->CopyD();
    3420           h=h->next;
    3421         }
    3422         else return TRUE;
    3423         if ((h!=NULL) && (h->Typ()==INT_CMD))
    3424         {
    3425           lV=(int)((long)(h->Data()));
    3426           res->rtyp = INT_CMD;
    3427           res->data = (void*)(long)pLastVblock(p, lV);
    3428         }
    3429         else return TRUE;
    3430         return FALSE;
    3431       }
    3432       else
    3433   /*==================== shrink-test for freeGB  =================*/
    3434       if (strcmp(sys_cmd, "shrinktest") == 0)
    3435       {
    3436         poly p;
    3437         int lV;
    3438         if ((h!=NULL) && (h->Typ()==POLY_CMD))
    3439         {
    3440           p=(poly)h->CopyD();
    3441           h=h->next;
    3442         }
    3443         else return TRUE;
    3444         if ((h!=NULL) && (h->Typ()==INT_CMD))
    3445         {
    3446           lV=(int)((long)(h->Data()));
    3447           res->rtyp = POLY_CMD;
    3448           //        res->data = p_mShrink(p, lV, currRing);
    3449           //        kStrategy strat=new skStrategy;
    3450           //        strat->tailRing = currRing;
    3451           res->data = p_Shrink(p, lV, currRing);
    3452         }
    3453         else return TRUE;
    3454         return FALSE;
    3455       }
    3456       else
    3457   #endif
    3458   #endif
    34593627  /*==================== t-rep-GB ==================================*/
    34603628      if (strcmp(sys_cmd, "unifastmult")==0)
     
    35963764      }
    35973765      else
    3598       if (strcmp(sys_cmd, "LLL") == 0)
    3599       {
    3600         if (h!=NULL)
    3601         {
    3602           res->rtyp=h->Typ();
    3603           if (h->Typ()==MATRIX_CMD)
    3604           {
    3605             res->data=(char *)singntl_LLL((matrix)h->Data(), currRing);
    3606             return FALSE;
    3607           }
    3608           else if (h->Typ()==INTMAT_CMD)
    3609           {
    3610             res->data=(char *)singntl_LLL((intvec*)h->Data(), currRing);
    3611             return FALSE;
    3612           }
    3613           else return TRUE;
    3614         }
    3615         else return TRUE;
    3616       }
    3617       else
    3618   /*================= absBiFact ======================*/
    3619       if (strcmp(sys_cmd, "absFact") == 0)
    3620       {
    3621         if (h!=NULL)
    3622         {
    3623           res->rtyp=LIST_CMD;
    3624           if (h->Typ()==POLY_CMD)
    3625           {
    3626             intvec *v=NULL;
    3627             ideal mipos= NULL;
    3628             int n= 0;
    3629             ideal f=singclap_absFactorize((poly)(h->Data()), mipos, &v, n, currRing);
    3630             if (f==NULL) return TRUE;
    3631             ivTest(v);
    3632             lists l=(lists)omAllocBin(slists_bin);
    3633             l->Init(4);
    3634             l->m[0].rtyp=IDEAL_CMD;
    3635             l->m[0].data=(void *)f;
    3636             l->m[1].rtyp=INTVEC_CMD;
    3637             l->m[1].data=(void *)v;
    3638             l->m[2].rtyp=IDEAL_CMD;
    3639             l->m[2].data=(void*) mipos;
    3640             l->m[3].rtyp=INT_CMD;
    3641             l->m[3].data=(void*) (long) n;
    3642             res->data=(void *)l;
    3643             return FALSE;
    3644           }
    3645           else return TRUE;
    3646         }
    3647         else return TRUE;
    3648       }
    3649       else
    36503766  /*================= probIrredTest ======================*/
    36513767      if (strcmp (sys_cmd, "probIrredTest") == 0)
     
    36653781      else
    36663782  #endif
    3667   #ifdef ix86_Win
     3783  #ifdef __CYGWIN__
    36683784  /*==================== Python Singular =================*/
    36693785      if (strcmp(sys_cmd, "python") == 0)
     
    37203836
    37213837  #endif
    3722 /*==================== semaphore =================*/
    3723 #ifdef HAVE_SIMPLEIPC
    3724     if (strcmp(sys_cmd,"semaphore")==0)
    3725     {
    3726       if((h!=NULL) && (h->Typ()==STRING_CMD) && (h->next!=NULL) && (h->next->Typ()==INT_CMD))
    3727       {
    3728         int v=1;
    3729         if ((h->next->next!=NULL)&& (h->next->next->Typ()==INT_CMD))
    3730           v=(int)(long)h->next->next->Data();
    3731         res->data=(char *)(long)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);
    3732         res->rtyp=INT_CMD;
    3733         return FALSE;
    3734       }
    3735       else
    3736       {
    3737         WerrorS("Usage: system(\"semaphore\",<cmd>,int)");
    3738         return TRUE;
    3739       }
    3740     }
    3741     else
    3742 #endif
    37433838/*======================= demon_list =====================*/
    37443839  if (strcmp(sys_cmd,"denom_list")==0)
     
    37503845  }
    37513846  else
    3752 /*==================== install newstruct =================*/
    3753   if (strcmp(sys_cmd,"install")==0)
    3754   {
    3755     if ((h!=NULL) && (h->Typ()==STRING_CMD)
    3756     && (h->next!=NULL) && (h->next->Typ()==STRING_CMD)
    3757     && (h->next->next!=NULL) && (h->next->next->Typ()==PROC_CMD)
    3758     && (h->next->next->next!=NULL) && (h->next->next->next->Typ()==INT_CMD))
    3759     {
    3760       return newstruct_set_proc((char*)h->Data(),(char*)h->next->Data(),
    3761                                 (int)(long)h->next->next->next->Data(),
    3762                                 (procinfov)h->next->next->Data());
    3763     }
    3764     return TRUE;
    3765   }
    3766   else
    3767   if (strcmp(sys_cmd,"newstruct")==0)
    3768   {
    3769     if ((h!=NULL) && (h->Typ()==STRING_CMD))
    3770     {
    3771       int id=0;
    3772       blackboxIsCmd((char*)h->Data(),id);
    3773       if (id>0)
    3774       {
    3775         blackbox *bb=getBlackboxStuff(id);
    3776         if (BB_LIKE_LIST(bb))
    3777         {
    3778           newstruct_desc desc=(newstruct_desc)bb->data;
    3779           newstructShow(desc);
    3780           return FALSE;
    3781         }
    3782       }
    3783     }
    3784     return TRUE;
    3785   }
    3786   else
    3787   if (strcmp(sys_cmd,"blackbox")==0)
    3788   {
    3789     printBlackboxTypes();
    3790     return FALSE;
    3791   }
    3792   else
    3793 /*==================== reserved port =================*/
    3794   if (strcmp(sys_cmd,"reserve")==0)
    3795   {
    3796     int ssiReservePort(int clients);
    3797     if ((h!=NULL) && (h->Typ()==INT_CMD))
    3798     {
    3799       res->rtyp=INT_CMD;
    3800       int p=ssiReservePort((int)(long)h->Data());
    3801       res->data=(void*)(long)p;
    3802       return (p==0);
    3803     }
    3804     else
    3805     {
    3806       WerrorS("system(\"reserve\",<int>)");
    3807     }
    3808     return TRUE;
    3809   }
    3810   else
    3811   if (strcmp(sys_cmd,"reservedLink")==0)
    3812   {
    3813     extern si_link ssiCommandLink();
    3814     res->rtyp=LINK_CMD;
    3815     si_link p=ssiCommandLink();
    3816     res->data=(void*)p;
    3817     return (p==NULL);
    3818   }
    3819   else
    38203847/*==================== Error =================*/
    38213848      Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented );
  • Singular/fehelp.cc

    r7a979b r5c5b5f  
    8383static BOOLEAN heEmacsInit(int,int);   static void heEmacsHelp(heEntry hentry,int);
    8484
    85 #ifdef ix86_Win
    86 static void heHtmlHelp(heEntry hentry,int);
    87 static void heWinHelp(heEntry hentry,int);
    88 static void heWinHtmlHelp(heEntry hentry,int);
    89 #include "sing_win.h"
    90 #endif
    91 
    9285static heBrowser heCurrentHelpBrowser = NULL;
    9386static int heCurrentHelpBrowserIndex= -1;
     
    137130    if (heCurrentHelpBrowser == NULL) feHelpBrowser(NULL, 0);
    138131    assume(heCurrentHelpBrowser != NULL);
    139 #ifdef ix86_Win
    140     if (strcmp(heCurrentHelpBrowser->browser,"htmlhelp")==0)
    141     {
    142       // In Windows always let htmlhelp handle request, if standard
    143       strcpy(hentry.key, str);
    144       *hentry.node = '\0';
    145       *hentry.url = '\0';
    146       hentry.chksum = 0;
    147       heBrowserHelp(&hentry);
    148     }
    149 #endif
    150132
    151133    StringSetS("");
     
    216198    }
    217199    fseek(f,0,SEEK_SET);
    218 #ifdef ix86_Win
    219     // for the 7(!) default browsers and make htmlhelp the default default
    220     heHelpBrowsers=(heBrowser_s*)omAlloc0((br+7)*sizeof(heBrowser_s));
    221     br = 0;
    222     heHelpBrowsers[br].browser="htmlhelp";
    223     heHelpBrowsers[br].init_proc=heGenInit;
    224     heHelpBrowsers[br].help_proc=heWinHtmlHelp;
    225     heHelpBrowsers[br].required="C";
    226     // heHelpBrowsers[br].action=NULL;
    227     br++;
    228 #else
    229200    // for the 4(!) default browsers
    230201    heHelpBrowsers=(heBrowser_s*)omAlloc0((br+4)*sizeof(heBrowser_s));
    231202    br = 0;
    232 #endif
    233203    while (fgets( buf, sizeof(buf), f))
    234204    {
     
    260230  else
    261231  {
    262 #ifdef ix86_Win
    263     // for the 7(!) default browsers
    264     heHelpBrowsers=(heBrowser_s*)omAlloc0(7*sizeof(heBrowser_s));
    265     heHelpBrowsers[br].browser="htmlhelp";
    266     heHelpBrowsers[br].init_proc=heGenInit;
    267     heHelpBrowsers[br].help_proc=heWinHtmlHelp;
    268     heHelpBrowsers[br].required="C";
    269     // heHelpBrowsers[br].action=NULL;
    270     br++;
    271 #else
    272232    // for the 4(!) default browsers
    273233    heHelpBrowsers=(heBrowser_s*)omAlloc0(4*sizeof(heBrowser_s));
    274 #endif
    275   }
    276 #ifdef ix86_Win
    277   heHelpBrowsers[br].browser="winhlp";
    278   heHelpBrowsers[br].init_proc=heGenInit;
    279   heHelpBrowsers[br].help_proc=heWinHelp;
    280   heHelpBrowsers[br].required="h";
    281   //heHelpBrowsers[br].action=NULL;
    282   br++;
    283   heHelpBrowsers[br].browser="html";
    284   heHelpBrowsers[br].init_proc=heGenInit;
    285   heHelpBrowsers[br].help_proc=heHtmlHelp;
    286   heHelpBrowsers[br].required="h";
    287   //heHelpBrowsers[br].action=NULL;
    288   br++;
    289 #endif
     234  }
    290235  heHelpBrowsers[br].browser="builtin";
    291236  heHelpBrowsers[br].init_proc=heGenInit;
     
    326271
    327272    // First, try emacs, if emacs-option is set
    328     // Under Win, always use html
    329 #ifndef ix86_Win
    330273    if (feOptValue(FE_OPT_EMACS) != NULL)
    331274    {
     
    343286      i=0;
    344287    }
    345 #endif
    346288    while (heHelpBrowsers[i].browser != NULL)
    347289    {
     
    887829      case 'i': /* singular.hlp */
    888830      case 'x': /* singular.idx */
    889       case 'C': /* chm file Manual.chm */
    890831      case 'h': /* html dir */
    891832               if (feResource(*p, warn) == NULL)
     
    935876}
    936877
    937 #ifdef ix86_Win
    938 
    939 static void heHtmlHelp(heEntry hentry, int br)
    940 {
    941   char url[MAXPATHLEN];
    942   char* html_dir = feResource('h' /*"HtmlDir"*/);
    943   sprintf(url, "%s/%s",
    944           (html_dir != NULL ? html_dir : feResource('u' /*"ManualUrl"*/)),
    945           (hentry!=NULL && *(hentry->url)!='\0' ? hentry->url : "index.htm"));
    946 
    947   heOpenWinntUrl(url, (html_dir != NULL ? 1 : 0));
    948 }
    949 
    950 static void heWinHtmlHelp(heEntry hentry, int br)
    951 // Function to call the Microsoft HTML Help System
    952 // Uses API Call Function in sing_win.cc
    953 {
    954   char keyw[MAX_HE_ENTRY_LENGTH];
    955   if ((hentry!=NULL)&&(hentry->key!=NULL))
    956     strcpy(keyw,hentry->key);
    957   else
    958     strcpy(keyw," ");
    959   char* helppath = feResource('C' /*"CHM Datei"*/);
    960   heOpenWinHtmlHelp(keyw,helppath);
    961 }
    962 
    963 static void heWinHelp(heEntry hentry, int br)
    964 {
    965   char keyw[MAX_HE_ENTRY_LENGTH];
    966   if ((hentry!=NULL)&&(hentry->key!=NULL))
    967     strcpy(keyw,hentry->key);
    968   else
    969     strcpy(keyw," ");
    970   char* helppath = feResource('h' /*"HtmlDir"*/);
    971   const char *filename="/Manual.hlp";
    972   int helppath_len=0;
    973   if (helppath!=NULL) helppath_len=strlen(helppath);
    974   char *callpath=(char *)omAlloc0(helppath_len+strlen(filename)+1);
    975   if ((helppath!=NULL) && (*helppath>' '))
    976     strcpy(callpath,helppath);
    977   strcat(callpath,filename);
    978   heOpenWinntHlp(keyw,callpath);
    979   omfree(callpath);
    980 }
    981 #endif
    982878static void heGenHelp(heEntry hentry, int br)
    983879{
     
    1094990}
    1095991
    1096 #ifdef ix86_Win
    1097 static void heHtmlHelp(heEntry hentry)
    1098 {
    1099   char url[MAXPATHLEN];
    1100   char* html_dir = feResource('h' /*"HtmlDir"*/);
    1101   sprintf(url, "%s/%s",
    1102           (html_dir != NULL ? html_dir : feResource('u' /*"ManualUrl"*/)),
    1103           (hentry!=NULL && *(hentry->url)!='\0' ? hentry->url : "index.htm"));
    1104 
    1105   heOpenWinntUrl(url, (html_dir != NULL ? 1 : 0));
    1106 }
    1107 
    1108 static void heWinHelp(heEntry hentry)
    1109 {
    1110   char keyw[MAX_HE_ENTRY_LENGTH];
    1111   if ((hentry!=NULL)&&(hentry->key!=NULL))
    1112     strcpy(keyw,hentry->key);
    1113   else
    1114     strcpy(keyw," ");
    1115   char* helppath = feResource('h' /*"HtmlDir"*/);
    1116   const char *filename="/Manual.hlp";
    1117   int helppath_len=0;
    1118   if (helppath!=NULL) helppath_len=strlen(helppath);
    1119   char *callpath=(char *)omAlloc0(helppath_len+strlen(filename)+1);
    1120   if ((helppath!=NULL) && (*helppath>' '))
    1121     strcpy(callpath,helppath);
    1122   strcat(callpath,filename);
    1123   heOpenWinntHlp(keyw,callpath);
    1124   omfree(callpath);
    1125 }
    1126 #endif
    1127 
    1128992static BOOLEAN heDummyInit(int /*warn*/, int /*br*/)
    1129993{
  • Singular/iplib.cc

    r7a979b r5c5b5f  
    3131#if SIZEOF_LONG == 8
    3232#define SI_MAX_NEST 500
    33 #elif defined(ix86_Win)
     33#elif defined(__CYGWIN__)
    3434#define SI_MAX_NEST 480
    3535#else
     
    3939#if defined(ix86Mac_darwin) || defined(x86_64Mac_darwin) || defined(ppcMac_darwin)
    4040#  define MODULE_SUFFIX bundle
    41 #elif defined(ix86_Win)
     41#elif defined(__CYGWIN__)
    4242#  define MODULE_SUFFIX dll
    4343#else
  • Singular/links/silink.cc

    r7a979b r5c5b5f  
    3838
    3939// #ifdef HAVE_DBM
    40 // #ifdef ix86_Win
     40// #ifdef __CYGWIN__
    4141// #define USE_GDBM
    4242// #endif
  • Singular/links/sing_dbm.cc

    r7a979b r5c5b5f  
    2323#  include <Singular/links/sing_dbm.h>
    2424
    25 // #ifdef ix86_Win
     25// #ifdef __CYGWIN__
    2626// #  define USE_GDBM
    2727// #  define BLOCKSIZE 1
  • Singular/misc_ip.cc

    r7a979b r5c5b5f  
    785785{
    786786  StringSetS("");
    787   StringAppend("Singular for %s version %s (%s, %d bit) %s #%s",
     787  StringAppend("Singular for %s version %s (%d, %d bit) %s #%s",
    788788               S_UNAME, VERSION, // SINGULAR_VERSION,
    789                PACKAGE_VERSION, SIZEOF_VOIDP*8, singular_date, GIT_VERSION);
     789               SINGULAR_VERSION, SIZEOF_VOIDP*8, singular_date, GIT_VERSION);
    790790  StringAppendS("\nwith\n\t");
    791791
  • Singular/subexpr.cc

    r7a979b r5c5b5f  
    14291429BOOLEAN assumeStdFlag(leftv h)
    14301430{
    1431   if ((h->e!=NULL)&&(h->LTyp()==LIST_CMD))
    1432   {
    1433     return assumeStdFlag(h->LData());
     1431  if (h->e!=NULL)
     1432  {
     1433    leftv hh=h->LData();
     1434    if (h!=hh) return assumeStdFlag(h->LData());
    14341435  }
    14351436  if (!hasFlag(h,FLAG_STD))
  • Singular/test.cc

    r7a979b r5c5b5f  
    118118#include <kernel/spectrum/GMPrat.h>
    119119
    120 // #include "htmlhelp.h" // For Windows //
    121120#include <kernel/combinatorics/hutil.h>
    122121// #include <kernel/Ideal.h> // Too old?
     
    202201#include <Singular/links/silink.h>
    203202#include <Singular/links/sing_dbm.h>
    204 #include <Singular/sing_win.h>
    205203#include <Singular/links/slInit.h>
    206204#include <Singular/links/ssiLink.h>
  • Tst/Short.lst

    rdf34b17 r5c5b5f  
    137137Short/bug_tr489.tst
    138138Short/bug_tr549.tst
     139Short/bug_tr595.tst
    139140Short/bug_tr628.tst
    140141Short/bug_x_i_j.tst
  • Tst/Short/bug_613.res.gz.uu

    r7a979b r5c5b5f  
    1 begin 644 bug_613.res.gz
    2 M'XL("&KQVU,``V)U9U\V,3,N<F5S`(5476^;,!1]SZ\XBO8`"Z&8KZ2C1-JT
    3 M/53:JJE9GRNG(=G5P$2.LRZJ^M]G`[6I5FE(@(VOC\_'%>L?GZ]O`+`5OEY_
    4 MPE0=55C39EI,UL-*O(+^>$^"E.<7$_/&:H7-:7^?LR04U6-X5%S9^J1#\J:2
    5 MQ+Z#\AU6NH(=9Z$;YR$.LGT`'6_4S^^2&E+TN[IM6^6)4[.I)*0>!R"A('R[
    6 M;1'BR4Z6H7Z`=O`@RI+!QQ-DI4Y2>*PLS7Z_P/-+.8NZ\@&]Z=8M3Q;W6/HT
    7 M*G!Q\<!/BEKQP:"3)@E>RXIOS]C7[8;7]1G;:D>BV@80+1ZY%$9[&%J\M,/;
    8 MM1(>E7%!5Z*@V<P*87FW;K6P7HNY&I1HWK]B%T=VU:AMM%BM=9`:^875&/<R
    9 MW+RGT5?"8RZ86!-P90N74KQT*<67;IQ$0V*J.BJ34[N[TXUQ]JRFA(W"27HF
    10 M,#T!J>\27A1P/_@3;`^61=+S0T/BT&I3=1%?SOEBQK,Y3V<\F?/9B'32NX:/
    11 MZ_7=MR\:3YNOWFHA'B21/]HWN#O$^_(YC9R\=."K$_-(\V`%Z(I%D7Z-8DL'
    12 MOE9FFMMD\(OJVDBUQZ8NU/_XD+F`1U[(D<ODU&2Q*W9.O&T#^1AM'-C;W+-Q
    13 I$V2C)L@T\W]R=CB7KC(?>9CK!C`_#O-S.!U-M^%=,?D+?2[*('`$````
     1begin 664 bug_613.res.gz
     2M'XL("!0/X%,``V)U9U\V,3,N<F5S`(547V_;(!!_SZ>X67O`<V(9@VDE%TN;
     3MMH=(6S4MZW/E;$Z'%N,(DVU5U>\^,!10IVJ6;,#<';\_9^^^OM]>`P#NX./V
     4M'61ZUN51[+-VM?,[=0?FY:V00J.\7=D1N@[VY[M;ADDIA]_EK'L=XLE2"65*
     5MR+NE5!YKT0["O"GCG)5P4M,W./5J.U_K'Y^5&(46OX8OTZ21D!ID'H(O2G@(
     6MB\O2/$`<`$G.JQP>`-2@STHB&(4\3<=[SN5YW`\*F=V\A<>G5%PMJ6]WNYM/
     7M'U"UAJS*X!6'65ODR&<O.2&E7E)</1@Y#LPP=3@,4I'$L^7M85*`A(D65[(5
     8M11&H8(<^L*D=)'N-P&%\8_1`..I7UV'?,AXYQX:QYUOE;>!6.SAQS9YQQ<!C
     9M?4A.<(A<24C/)@9;J$=P-)+4T4A"DCGUINIAUM;'Z7!C>N<>!?JD29PD#B)8
     10M\4&9FX,!VN?K/^OOIXC"X7ORU@;UEYO^HNB;34^+GFSZ(@%-O:"1N)ST"UU&
     11MJCQ)]$H_,Y32R(]ZP,9=)`R0J@5QA2L[)!93#SCP;*+'\%,<CY9K.+:)!O]'
     12MB(;&R"B&2F06D4W#8G"4XJ6O+>V'QL,/SK.T#5C2!LQ`_\?I4(>1)#(1D9D6
     136L'\7^P<YS[;?X'6[^@NK.FULE00`````
    1414`
    1515end
  • Tst/Short/bug_613.stat

    r7a979b r5c5b5f  
    1 1 >> tst_memory_0 :: 1406923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:281184
    2 1 >> tst_memory_1 :: 1406923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:2363392
    3 1 >> tst_memory_2 :: 1406923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:2363392
    4 1 >> tst_timer_1 :: 1406923114:4.0.0, 64 bit:4.0.0:x86_64-Linux:andr:62
     11 >> tst_memory_0 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:283252
     21 >> tst_memory_1 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:2322432
     31 >> tst_memory_2 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:2322432
     41 >> tst_timer_1 :: 1407192852:4.0.0, 32 bit:4.0.0:i686-Linux:vogon.jeltz:98
  • Tst/Short/bug_613.tst

    r7a979b r5c5b5f  
    44
    55
    6 proc isNthPrimitiveRoot(number root, int n)
     6proc parIsNthPrimitiveRoot(int n)
    77{
    8    if ( n==1 ) { return(1==root); }
    9    number m=root;
    10    int i; //caution: if i is already globally defined, no warning...
    11    for (i=2;i<n;i++)
     8   if (n==0) {  return( minpoly==number(0) ); }
     9   ASSUME(0, "0" != string(minpoly) );
     10   number m=1;
     11   int i;
     12   for (i=1;i<n;i++)
    1213   {
    13        m = m*root;
     14       m = m*par(1);
    1415       if (m==1) {return(0);}
    1516   }
     17   ASSUME(0, 1 == m*par(1) );
    1618   return (1);
    1719}
     
    2325    ring rng = (0,a),x,dp;
    2426    minpoly = (a8-a7+a5-a4+a3-a+1);
    25     ASSUME(0, not isNthPrimitiveRoot(a,30));
     27    ASSUME(0, not parIsNthPrimitiveRoot(30));
    2628    int i;
    2729
    28     for(i = 1; i<100; i++)
     30    for(i = 0; i<100; i++)
    2931    {
    3032        kill rng;
    3133        ring rng = (0,a),x,dp;
    3234        minpoly = rootofUnity(i);
    33         ASSUME(0,  isNthPrimitiveRoot(a,i) );
     35        ASSUME(0,  parIsNthPrimitiveRoot(i) );
    3436    }
    3537}
  • Tst/Short/ok_s.lst

    r7a979b r5c5b5f  
    1515bug_tr630
    1616bug_tr640
     17bug_tr650
    1718bug_genus_etc
    1819facstd
  • doc/COPYING.texi

    r7a979b r5c5b5f  
    3434
    3535Some single files have a copyright given within the file:
    36 Singular/ndbm.* (BSD), Singular/htmlhelp.h (LGPL 2.1+)
     36Singular/ndbm.* (BSD)
    3737
    3838The following software modules shipped with @sc{Singular} have their own copyright:
  • doc/NEWS.texi

    r7a979b r5c5b5f  
    2323
    2424Version 4-0-1 is a bug fix release.
     25New feature: attribute @code{ring_cf} for @code{ring}.
    2526
    2627@heading News for version 4-0-0
  • doc/changes_in_singular4.texi

    r7a979b r5c5b5f  
    66
    77@menu
     8* Version schema for Singular::
    89* Notes for Singular users::
    910* Notes for developers::
     
    1112@end menu
    1213
    13 
    14 @c ---------------------------------------------------------------------------
    15 @node Notes for Singular users, Notes for developers, , Singular 3 and Singular 4
     14@c ---------------------------------------------------------------------------
     15@node Version schema for Singular, Notes for Singular users, , Singular 3 and Singular 4
     16@subsection Version schema for Singular
     17@cindex Version schema for Singular
     18@cindex Version number
     19
     20@sc{Singular} version is of the form @code{a.b.c.d} which may also be written
     21as @code{a-b-c-d} where a,b,c and d are numbers:
     22@itemize
     23@item a is changed with major, incompatible changes
     24@item b is changed with incompatible changes (of some commands/libraries)
     25@item c is changed with compatible chnages (i.e. new commands,
     26      extended options, new algorithms, etc.)
     27@item d is changed with each release (i.e. with bug fixes, etc.)
     28@end itemize
     29@sc{Singular} does also have "inofficiall" build orginating from
     30a code version between "officiall" version: such builds display
     31"Development version a.b.c" in the header while "official" versions
     32show "version a.b.c". Also the manual describes version a-b-c.
     33To get the complete version number, use
     34@code{system("version");} or use @code{SINGULAR_VERSION} in C.
     35
     36@c ---------------------------------------------------------------------------
     37@node Notes for Singular users, Notes for developers, Version schema for Singular, Singular 3 and Singular 4
    1638@subsection Notes for Singular users
    1739@cindex Notes for Singular users
  • factory/cfCharSets.cc

    r7a979b r5c5b5f  
    550550        {  // search for a non linear elem
    551551          qs= facAlgFunc2 (i.getItem(), as);
    552           if (qs.getFirst().factor().inCoeffDomain())
    553             qs.removeFirst();
    554           if (qs.length() > 1 || qs.getFirst().exp() > 1)
    555           { //found elem is reducible
    556             reducible= i.getItem();
    557             indexRed= nr + 1;
    558             break;
    559           }
     552          if (qs.length() > 0)
     553          {
     554            if (qs.getFirst().factor().inCoeffDomain())
     555              qs.removeFirst();
     556            if (qs.length() > 1 || qs.getFirst().exp() > 1)
     557            { //found elem is reducible
     558              reducible= i.getItem();
     559              indexRed= nr + 1;
     560              break;
     561            }
     562          }
    560563        }
    561564      }
  • kernel/mod2.h

    r7a979b r5c5b5f  
    1313# include <singularconfig.h>
    1414
    15 # include <misc/auxiliary.h>
     15//# include <misc/auxiliary.h>
    1616
    1717#define SINGULAR_MAJOR_VERSION 4
     
    2424#else
    2525#define SINGULAR_MINOR_VERSION 0
    26 #define SINGULAR_SUB_VERSION 0
     26#define SINGULAR_SUB_VERSION 1
    2727#endif
    2828#define S_ROOT_DIR ""
  • kernel/oswrapper/feread.cc

    r7a979b r5c5b5f  
    1414
    1515//----------------------------------------
    16 #ifdef ix86_Win
     16#ifdef __CYGWIN__
    1717#define READLINE_STATIC
    1818#endif
  • kernel/oswrapper/fereadl.c

    r7a979b r5c5b5f  
    190190    else
    191191    {
    192       #ifndef ix86_Win
     192      #ifndef __CYGWIN__
    193193      extern char *BC;
    194194      extern char *UP;
  • kernel/spectrum/semic.cc

    r7a979b r5c5b5f  
    2424
    2525#include <string.h>
    26 
    27 #ifndef ix86_Win
    28 //#include<values.h>
    29 #endif
    3026
    3127#include <misc/intvec.h>
  • libpolys/COPYING

    r7a979b r5c5b5f  
    1818
    1919Some single files have a copyright given within the file:
    20 Singular/ndbm.* (BSD), Singular/htmlhelp.h (LGPL 2.1+)
     20Singular/ndbm.* (BSD)
    2121
    2222The following software used with SINGULAR have their own copyright: the
  • m4/gfanlib-check.m4

    r7a979b r5c5b5f  
    2525 BACKUP_LIBS=$LIBS
    2626
    27  LIBS="-lcddgmp $GMP_LIBS $LIBS"
     27 LIBS="$LIBS -lcddgmp $GMP_LIBS "
    2828
    29  AC_LANG_PUSH(C++)
     29 AC_LANG_PUSH(C)
    3030 AC_LINK_IFELSE(
    3131  [
    3232   AC_LANG_PROGRAM(
    3333    [
     34    #define GMPRATIONAL
    3435     #ifdef HAVE_SETOPER_H
    3536     # include <setoper.h>
     
    4445     # include <cddlib/cdd.h>
    4546     #endif
    46     ], [dd_set_global_constants()]    )
     47    ], [dd_set_global_constants(); dd_log=dd_FALSE; ]
     48    )
    4749  ],
    48   [PASSED_ALL_TESTS_FOR_GFANLIB="1"] [CDDGMPLDFLAGS="-lcddgmp"],
     50  [PASSED_ALL_TESTS_FOR_GFANLIB="1"] [CDDGMPLDFLAGS="-lcddgmp $GMP_LIBS"]  [CDDGMPCPPFLAGS="-DGMPRATIONAL"],
    4951  [PASSED_ALL_TESTS_FOR_GFANLIB="0"]
    5052 )
     
    5355 LIBS=$BACKUP_LIBS
    5456
    55  AC_MSG_RESULT(no)
    56 
    57  AC_SUBST(CDDGMPLDFLAGS)
    5857else
    59  AC_MSG_RESULT(no)
    6058 PASSED_ALL_TESTS_FOR_GFANLIB="0"
    6159fi
    6260
     61 if test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1; then 
     62  AC_MSG_RESULT(yes)
     63  AC_SUBST(CDDGMPLDFLAGS)
     64  AC_SUBST(CDDGMPCPPFLAGS)
     65 else
     66  AC_MSG_RESULT(no)
     67 fi
    6368
    6469AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1)
  • resources/feFopen.cc

    r7a979b r5c5b5f  
    5353    {
    5454      const char* home = getenv("HOME");
    55 #ifdef ix86_Win
     55#ifdef __CUGWIN__
    5656      if ((home==NULL)||(!access(home,X_OK)))
    5757        home = getenv("SINGHOME");
     
    166166FILE* myfopen(const char *path, const char *mode)
    167167{
    168 #if (defined(CYGWIN) || defined(ix86_Win))
     168#if (defined(__CUGWIN__))
    169169  char mmode[4];
    170170  int i;
  • resources/feResource.cc

    r7a979b r5c5b5f  
    8787  {"IdxFile",   'x',    feResFile,  "SINGULAR_IDX_FILE",    "%D/doc/singular.idx",  (char *)""},
    8888  {"HtmlDir",   'h',    feResDir,   "SINGULAR_HTML_DIR",    "%D/singular/html",              (char *)""},
    89 #ifdef ix86_Win
    90   {"HtmlHelpFile",'C',  feResFile,  "SINGULAR_CHM_FILE",    "%r/doc/Manual.chm",    (char *)""},
    91 #endif
    9289  {"ManualUrl", 'u',    feResUrl,   "SINGULAR_URL",         "http://www.singular.uni-kl.de/Manual/",    (char *)""},
    9390  {"ExDir",     'm',    feResDir,   "SINGULAR_EXAMPLES_DIR","%r/examples",          (char *)""},
     
    10097  {"EmacsDir",  'e',    feResDir,   "ESINGULAR_EMACS_DIR",  "%D/singular/emacs",             (char *)""},
    10198  {"SingularXterm",'M', feResBinary,"TSINGULAR_SINGULAR",   "%b/Singular",          (char *)""},
    102 #ifdef ix86_Win
     99#ifdef __CYGWIN__
    103100  {"rxvt",      'X',    feResBinary,"RXVT",                 "%b/rxvt",              (char *)""},
    104101#else
     
    130127static void mystrcpy(char* d, char* s);
    131128static char* feSprintf(char* s, const char* fmt, int warn = -1);
    132 #if defined(ix86_Win) && defined(__GNUC__)
     129#if defined(__CYGWIN__) && defined(__GNUC__)
    133130// utility function of Cygwin32:
    134131extern "C" int cygwin32_posix_path_list_p (const char *path);
     
    167164void feInitResources(const char* argv0)
    168165{
    169 #if defined(ix86_Win) && defined(__GNUC__)
    170   if (cygwin32_posix_path_list_p (getenv("PATH")))
    171     fePathSep = ':';
    172 #endif
    173166  if (argv0==NULL)
    174167  {
     
    407400    return NULL;
    408401  }
    409 #ifdef ix86_Win // stupid WINNT sometimes gives you argv[0] within ""
     402#ifdef __CYGWIN__ // stupid WINNT sometimes gives you argv[0] within ""
    410403  if (*feArgv0 == '"')
    411404  {
     
    471464      printf("Clean value:%s\n", value);
    472465#endif
    473 #ifdef ix86_Win
     466#ifdef __CYGWIN__
    474467#ifdef RESOURCE_DEBUG
    475468      printf("Clean WINNT value:%s\n", value);
  • resources/feResource.h

    r7a979b r5c5b5f  
    5555extern char* feArgv0;
    5656
    57 const char fePathSep =
    58 /* not really cygwin, applies to all windows systems:*/
    59 #if (defined(CYGWIN) || defined(ix86_Win))
    60                 ';'
    61 #else
    62                 ':'
    63 #endif
    64                 ;
    65 
    66 
     57const char fePathSep = ':' ;
    6758
    6859#endif
Note: See TracChangeset for help on using the changeset viewer.