Changeset 8b1af6 in git


Ignore:
Timestamp:
Nov 6, 2013, 2:30:52 PM (9 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
93fc820b11e13b03357f9d05061a1954e37d658c
Parents:
75761633171290fa9ee90c7fc19a9d9bfba3534911ab4e8595e6e90a6b646949f46d516f88a72015
Message:
Merge pull request #389 from jankoboehm/spielwiese

Gerhards fix for zeroRad und some typos
Files:
2 added
95 deleted
85 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    r11ab4e r8b1af6  
    55endif
    66
     7if HAVE_GFANLIB
     8  USE_GFANLIB = gfanlib
     9endif
     10
     11
     12
     13
    714SUBDIRS = resources omalloc xalloc $(USE_FACTORY) \
    8 libpolys kernel numeric gfanlib dyn_modules \
     15libpolys kernel numeric $(USE_GFANLIB) dyn_modules \
    916IntegerProgramming Singular dox \
    1017emacs debian redhat desktop
  • Singular/LIB/binresol.lib

    r757616 r8b1af6  
    11///////////////////////////////////////////////////////////////////////////
    22version="version binresol.lib 4.0.0.0 Jun_2013 "; // $Id$
    3 category="Commutaive algebra";
     3category="Commutative algebra";
    44info="
    55LIBRARY: binresol.lib    Combinatorial algorithm of resolution of singularities
  • Singular/LIB/ellipticcovers.lib

    r757616 r8b1af6  
    2323over a rational function. The path integral is computed as a residue.
    2424
    25 The sum of N_(G,b) over all branch types b of sum d gives the
     25The sum of N_(G,b) over all branch types b of sum d gives N_(G,d)*|Aut(G)|, with the
    2626Gromov-Witten invariant N_(G,d) of degree d stable maps from a genus g curve
    2727of topological type G to the elliptic curve.
     
    380380THEORY:  Computes @*
    381381
    382          - the Gromov-Witten of a given propagator P, or @*
    383 
    384          - the invariant N_(G,d) where d is the degree of the covering, or @*
     382         - the Gromov-Witten invariant of a given propagator P, or @*
     383
     384         - the invariant N_(G,d)*|Aut(G)| where d is the degree of the covering, or @*
    385385
    386386         - the number N_(G,b) of coverings with source G and target an elliptic curves with branch type a over a
  • Singular/LIB/help.cnf

    r11ab4e r8b1af6  
    1111#  C- requires Windows-help: Manual.chm
    1212#  E:executable:- requires the named exectable
    13 #  O:singuname:- requires the named uname
     13#  O:`uname -m`-`uname -s`:- requires the named uname
    1414#  (ubuntu has an open completely different from open on OsX)
    1515#----------------------------------------------------
     
    2929#----------------------------------------------------
    3030htmlview!xDhE:htmlview:!htmlview %h &
    31 mac!xhE:open:O:ix86Mac-darwin:!open %f &
    32 mac!xhE:open:O:ppcMac-darwin:!open %f &
    33 mac-net!xE:open:O:ix86Mac-darwin:!open %H &
    34 mac-net!xE:open:O:ppcMac-darwin:!open %H &
     31mac!xhE:open:O:x86_64-Darwin:!open %f &
     32mac-net!xE:open:O:x86_64-Darwin:!open %H &
    3533mozilla!xDhE:mozilla:!(mozilla -remote "openURL(%h)")||(mozilla %h) &
    3634firefox!xDhE:firefox:!firefox %h &
     
    4543#----------------------------------------------------------------
    4644# dummy versions for pure online help
    47 mac-www!E:open:O:ix86Mac-darwin:!open http://www.singular.uni-kl.de/Manual/%v/ &
    48 mac-www!E:open:O:ppcMac-darwin:!open http://www.singular.uni-kl.de/Manual/%v/ &
     45mac-www!E:open:O:x86_64-Darwin:!open http://www.singular.uni-kl.de/Manual/%v/ &
    4946mozilla-www!DE:mozilla:!(mozilla -remote "openURL(http://www.singular.uni-kl.de/Manual/%v/)")||(mozilla http://www.singular.uni-kl.de/Manual/%v/) &
    5047firefox-www!DE:firefox:!firefox http://www.singular.uni-kl.de/Manual/%v/ &
  • Singular/LIB/modstd.lib

    r11ab4e r8b1af6  
    2828LIB "ring.lib";
    2929LIB "parallel.lib";
     30
     31////////////////////////////////////////////////////////////////////////////////
     32
     33static proc mod_init()
     34{
     35   newstruct("ideal_primeTest", "ideal Ideal");
     36}
    3037
    3138////////////////////////////////////////////////////////////////////////////////
     
    379386   if(typeof(II) == "string")
    380387   {
    381       execute("ideal I = "+II+";");
     388      ideal I = `II`.Ideal;
    382389   }
    383390   else
     
    480487      list arguments;
    481488      int neededPrimes = neededSize-size(L);
     489      ideal_primeTest Id;
     490      Id.Ideal = I;
     491      export(Id);
    482492      while(neededPrimes > 0)
    483493      {
     
    488498            p = prime(p-1);
    489499            if(p == 2) { ERROR("no more primes"); }
    490             arguments[i] = list("I", p);
     500            arguments[i] = list("Id", p);
    491501         }
    492502         parallelResults = parallelWaitAll("primeTest", arguments,
  • Singular/LIB/primdec.lib

    r757616 r8b1af6  
    37693769    I=interred(I+F);option(set,save);return(I);
    37703770   }
    3771    I=simplify(I,1);
     3771   //I=simplify(I,1);
    37723772
    37733773   for(i=1;i<=n;i++)             //consider all polynomials over
     
    37803780   ideal F=imap(R,F);
    37813781
    3782    string nR="ring @S="+string(p)+",(y(1..m),"+varstr(R)+","+parstr(R)+"),dp;";
     3782   string nR1="ring @S1="+string(p)+",("+varstr(R)+","+parstr(R)+",@y(1..m)),dp;";
     3783   execute(nR1);
     3784   list lR=ringlist(@S1)[2];
     3785   lR=lR[(size(lR)-m+1)..(size(lR))];
     3786
     3787   string nR="ring @S="+string(p)+",("+string(lR)+","+varstr(R)+","+parstr(R)+"),dp;";
    37833788   execute(nR);
    37843789
     
    37923797   {
    37933798      J=J,var(i)^k-var(m+n+i);
    3794       el=el*y(i);
     3799      el=el*var(i);
    37953800   }
    37963801
  • Singular/Makefile.am

    r11ab4e r8b1af6  
    207207# nodist_libSingular_g_la_SOURCES = iparith.inc
    208208
    209 libSingular_la_LDFLAGS    =  -release ${PACKAGE_VERSION} ${AM_LDFLAGS} ${EMBED_PYOBJECT} \
     209# -release ${PACKAGE_VERSION}
     210libSingular_la_LDFLAGS    = ${AM_LDFLAGS} ${EMBED_PYOBJECT} \
    210211-lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc \
    211212$(FACTORY_LIBS) -lomalloc -lresources $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
  • Singular/extra.cc

    r11ab4e r8b1af6  
    121121#include <kernel/spectrum.h>
    122122#endif
    123 
    124 #if defined(HPUX_10) || defined(HPUX_9)
    125 extern "C" int setenv(const char *name, const char *value, int overwrite);
    126 #endif
    127 
    128123
    129124#ifdef HAVE_PLURAL
     
    34963491          lV=(int)((long)(h->Data()));
    34973492          res->rtyp = INT_CMD;
    3498           res->data = (void*)pLastVblock(p, lV);
     3493          res->data = (void*)(long)pLastVblock(p, lV);
    34993494        }
    35003495        else return TRUE;
     
    37373732          int irred= probIrredTest (F, error);
    37383733          res->rtyp= INT_CMD;
    3739           res->data= (void*)irred;
     3734          res->data= (void*)(long)irred;
    37403735          return FALSE;
    37413736        }
     
    38083803        if ((h->next->next!=NULL)&& (h->next->next->Typ()==INT_CMD))
    38093804          v=(int)(long)h->next->next->Data();
    3810         res->data=(char *)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);
     3805        res->data=(char *)(long)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);
    38113806        res->rtyp=INT_CMD;
    38123807        return FALSE;
  • Singular/fereadl.c

    r11ab4e r8b1af6  
    760760  loop
    761761  {
    762     #if defined(HPUX_9) || defined(HPUX_10)
    763     fe_rl_hdl=dynl_open("libreadline.sl");
    764     if (fe_rl_hdl==NULL)
    765       fe_rl_hdl=dynl_open("/lib/libreadline.sl");
    766     if (fe_rl_hdl==NULL)
    767       fe_rl_hdl=dynl_open("/usr/lib/libreadline.sl");
    768     #else
    769762    fe_rl_hdl=dynl_open("libreadline.so");
    770763    if (fe_rl_hdl==NULL) fe_rl_hdl=dynl_open("libreadline.so.2");
     
    774767    if (fe_rl_hdl==NULL) fe_rl_hdl=dynl_open("libreadline.so.6");
    775768    if (fe_rl_hdl==NULL) fe_rl_hdl=dynl_open("libreadline.so.7");
    776     #endif
    777769    if (fe_rl_hdl==NULL) { return 1;}
    778770
  • Singular/iparith.cc

    r11ab4e r8b1af6  
    51475147    case QRING_CMD:      res->data=omStrDup("qring"); break;
    51485148    case INTMAT_CMD:     res->data=omStrDup("intmat"); break;
     5149    case BIGINTMAT_CMD:  res->data=omStrDup("bigintmat"); break;
    51495150    case NUMBER_CMD:     res->data=omStrDup("number"); break;
    51505151    case BIGINT_CMD:     res->data=omStrDup("bigint"); break;
     
    52575258}
    52585259
    5259 BOOLEAN jjLOAD(char *s, BOOLEAN autoexport)
     5260BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
    52605261{
    52615262  char libnamebuf[256];
     
    52635264
    52645265#ifdef HAVE_DYNAMIC_LOADING
    5265   extern BOOLEAN load_modules(char *newlib, char *fullpath, BOOLEAN autoexport);
     5266  extern BOOLEAN load_modules(const char *newlib, char *fullpath, BOOLEAN autoexport);
    52665267#endif /* HAVE_DYNAMIC_LOADING */
    52675268  switch(LT)
     
    53025303      }
    53035304      case LT_BUILTIN:
    5304         SModulFunc_t iiGetBuiltinModInit(char*);
     5305        SModulFunc_t iiGetBuiltinModInit(const char*);
    53055306        return load_builtin(s,autoexport, iiGetBuiltinModInit(s));
    53065307      case LT_MACH_O:
  • Singular/ipassign.cc

    r11ab4e r8b1af6  
    10661066  while ((i<iv->length())&&(l!=NULL))
    10671067  {
    1068     t.data=(char *)(*iv)[i];
     1068    t.data=(char *)(long)(*iv)[i];
    10691069    h=l->next;
    10701070    l->next=NULL;
  • Singular/ipid.h

    r11ab4e r8b1af6  
    8383/* module support */
    8484typedef int (*SModulFunc_t)(SModulFunctions*);
    85 BOOLEAN load_builtin(char *newlib, BOOLEAN autoexport, SModulFunc_t init);
     85BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init);
    8686void module_help_main(const char *newlib,const char *help);
    8787void module_help_proc(const char *newlib,const char *p, const char *help);
  • Singular/iplib.cc

    r11ab4e r8b1af6  
    4949
    5050#ifdef HAVE_DYNAMIC_LOADING
    51 BOOLEAN load_modules(char *newlib, char *fullname, BOOLEAN autoexport);
     51BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport);
    5252#endif
    5353
     
    741741
    742742SModulFunc_t
    743 iiGetBuiltinModInit(char* libname)
     743iiGetBuiltinModInit(const char* libname)
    744744{
    745745  SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT)
     
    919919}
    920920/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    921 BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, char*newlib,
     921BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char*newlib,
    922922             idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror)
    923923{
     
    11031103/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    11041104#ifdef HAVE_DYNAMIC_LOADING
    1105 BOOLEAN load_modules(char *newlib, char *fullname, BOOLEAN autoexport)
     1105BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport)
    11061106{
    11071107#ifdef HAVE_STATIC
     
    11861186#endif /* HAVE_DYNAMIC_LOADING */
    11871187/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    1188 BOOLEAN load_builtin(char *newlib, BOOLEAN autoexport, SModulFunc_t init)
     1188BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init)
    11891189{
    11901190  int iiAddCproc(const char *libname, const char *procname, BOOLEAN pstatic,
     
    13861386/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    13871387#ifdef HAVE_LIBPARSER
    1388 void libstack::push(char */*p*/, char *libn)
     1388void libstack::push(const char */*p*/, char *libn)
    13891389{
    13901390  libstackv lp;
     
    14071407}
    14081408
    1409 libstackv libstack::pop(char */*p*/)
     1409libstackv libstack::pop(const char */*p*/)
    14101410{
    14111411  libstackv ls = this;
  • Singular/ipshell.cc

    r11ab4e r8b1af6  
    422422    if (strcmp(what,"all")==0)
    423423    {
     424      if (currPack!=basePack)
     425        list_cmd(-1,NULL,prefix,iterate,fullname); // list current package
    424426      really_all=TRUE;
    425427      h=basePack->idroot;
  • Singular/ipshell.h

    r11ab4e r8b1af6  
    6969*/
    7070/// load lib/module given in v
    71 BOOLEAN jjLOAD(char *s, BOOLEAN autoexport = FALSE);
     71BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport = FALSE);
    7272BOOLEAN iiLocateLib(const char* lib, char* where);
    7373leftv   iiMap(map theMap, const char * what);
     
    9191poly    iiHighCorner(ideal i, int ak);
    9292char *  iiConvName(const char *libname);
    93 BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, char *newlib,
     93BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char *newlib,
    9494                         idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror);
    9595
  • Singular/libparse.cc

    r11ab4e r8b1af6  
    12051205
    12061206#undef YY_DECL
    1207 #define YY_DECL int yylex(char *newlib, const char *libfile, \
     1207#define YY_DECL int yylex(const char *newlib, const char *libfile, \
    12081208                           lib_style_types *lib_style, \
    12091209                           idhdl pl, BOOLEAN autoexport, lp_modes mode)
  • Singular/libparse.h

    r11ab4e r8b1af6  
    7878              const char *procname, int line, long pos, BOOLEAN pstatic=FALSE);
    7979
    80 int yylplex(char *libname, const char *libfile, lib_style_types *lib_style,
     80int yylplex(const char *libname, const char *libfile, lib_style_types *lib_style,
    8181           idhdl pl, BOOLEAN autoexport=FALSE, lp_modes=LOAD_LIB);
    8282
  • Singular/libparse.ll

    r11ab4e r8b1af6  
    155155
    156156#undef YY_DECL
    157 #define YY_DECL int yylex(char *newlib, const char *libfile, \
     157#define YY_DECL int yylex(const char *newlib, const char *libfile, \
    158158                           lib_style_types *lib_style, \
    159159                           idhdl pl, BOOLEAN autoexport, lp_modes mode)
  • Singular/linearAlgebra_ip.cc

    r11ab4e r8b1af6  
    9090      eigenvalues->m[i].data = (void*)nCopy(distinctEVs[i]);
    9191      multiplicities->m[i].rtyp = INT_CMD;
    92       multiplicities->m[i].data = (void*)mults[i];
     92      multiplicities->m[i].data = (void*)(long)mults[i];
    9393      nDelete(&distinctEVs[i]);
    9494    }
  • Singular/links/ssiLink.cc

    r11ab4e r8b1af6  
    154154    {
    155155      #if SIZEOF_LONG == 4
    156       fprintf(d->f_write,"4 %ld ",((LONG)SR_TO_INT(n)));
     156      fprintf(d->f_write,"4 %ld ",SR_TO_INT(n));
    157157      #else
    158158      long nn=SR_TO_INT(n);
    159159      if ((nn<POW_2_28)||(nn>= -POW_2_28))
    160         fprintf(d->f_write,"4 %ld ",((LONG)nn));
     160        fprintf(d->f_write,"4 %ld ",nn);
    161161      else
    162162      {
     
    200200  if (d->r!=NULL) rKill(d->r);
    201201  d->r=r;
    202   d->r->ref++;
    203   fprintf(d->f_write,"%d %d ",n_GetChar(r->cf),r->N);
    204 
    205   int i;
    206   for(i=0;i<r->N;i++)
    207   {
    208     fprintf(d->f_write,"%d %s ",(int)strlen(r->names[i]),r->names[i]);
    209   }
    210   /* number of orderings:*/
    211   i=0;
    212   while (r->order[i]!=0) i++;
    213   fprintf(d->f_write,"%d ",i);
    214   /* each ordering block: */
    215   i=0;
    216   while(r->order[i]!=0)
    217   {
    218     fprintf(d->f_write,"%d %d %d ",r->order[i],r->block0[i], r->block1[i]);
    219     switch(r->order[i])
    220     {
    221       case ringorder_a:
    222       case ringorder_wp:
    223       case ringorder_Wp:
    224       case ringorder_ws:
    225       case ringorder_Ws:
    226       case ringorder_aa:
    227       {
    228         int ii;
    229         for(ii=r->block0[i];ii<=r->block1[i];ii++)
    230           fprintf(d->f_write,"%d ",r->wvhdl[i][ii-r->block0[i]]);
    231       }
    232       break;
    233 
    234       case ringorder_a64:
    235       case ringorder_M:
    236       case ringorder_L:
    237       case ringorder_IS:
    238         Werror("ring oder not implemented for ssi:%d",r->order[i]);
     202  if (r!=NULL)
     203  {
     204    /*d->*/r->ref++;
     205    fprintf(d->f_write,"%d %d ",n_GetChar(r->cf),r->N);
     206
     207    int i;
     208    for(i=0;i<r->N;i++)
     209    {
     210      fprintf(d->f_write,"%d %s ",(int)strlen(r->names[i]),r->names[i]);
     211    }
     212    /* number of orderings:*/
     213    i=0;
     214    // remember dummy ring: everything 0:
     215    if (r->order!=NULL) while (r->order[i]!=0) i++;
     216    fprintf(d->f_write,"%d ",i);
     217    /* each ordering block: */
     218    i=0;
     219    if (r->order!=NULL) while(r->order[i]!=0)
     220    {
     221      fprintf(d->f_write,"%d %d %d ",r->order[i],r->block0[i], r->block1[i]);
     222      switch(r->order[i])
     223      {
     224        case ringorder_a:
     225        case ringorder_wp:
     226        case ringorder_Wp:
     227        case ringorder_ws:
     228        case ringorder_Ws:
     229        case ringorder_aa:
     230        {
     231          int ii;
     232          for(ii=r->block0[i];ii<=r->block1[i];ii++)
     233            fprintf(d->f_write,"%d ",r->wvhdl[i][ii-r->block0[i]]);
     234        }
    239235        break;
    240236
    241       default: break;
    242     }
    243     i++;
     237        case ringorder_a64:
     238        case ringorder_M:
     239        case ringorder_L:
     240        case ringorder_IS:
     241          Werror("ring oder not implemented for ssi:%d",r->order[i]);
     242          break;
     243
     244        default: break;
     245      }
     246      i++;
     247    }
     248  }
     249  else /* dummy ring r==NULL*/
     250  {
     251    fprintf(d->f_write,"0 0 0 "/*,r->ch,r->N, blocks*/);
    244252  }
    245253}
     
    478486  ch=s_readint(d->f_read);
    479487  N=s_readint(d->f_read);
    480   names=(char**)omAlloc(N*sizeof(char*));
    481   for(i=0;i<N;i++)
    482   {
    483     names[i]=ssiReadString(d);
     488  if (N!=0)
     489  {
     490    names=(char**)omAlloc(N*sizeof(char*));
     491    for(i=0;i<N;i++)
     492    {
     493      names[i]=ssiReadString(d);
     494    }
    484495  }
    485496  // read the orderings:
     
    521532    }
    522533  }
     534  if (N==0)
     535  {
     536    omFree(ord);
     537    omFree(block0);
     538    omFree(block1);
     539    omFree(wvhdl);
     540    return NULL;
     541  }
     542  else return rDefault(ch,N,names,num_ord,ord,block0,block1,wvhdl);
     543
    523544  return rDefault(ch,N,names,num_ord,ord,block0,block1,wvhdl);
    524545}
     
    11801201    case 5:{
    11811202             d->r=ssiReadRing(d);
    1182              d->r->ref++;
    11831203             res->rtyp=RING_CMD;
    11841204             res->data=(char*)d->r;
    11851205             // we are in the top-level, so set the basering to d->r:
    1186              ssiSetCurrRing(d->r);
     1206             if (d->r!=NULL)
     1207             {
     1208               d->r->ref++;
     1209               ssiSetCurrRing(d->r);
     1210             }
    11871211             if (t==15) return ssiRead1(l);
    11881212           }
  • Singular/misc_ip.cc

    r11ab4e r8b1af6  
    360360  {
    361361    multiplicitiesL->m[i].rtyp = INT_CMD;
    362     multiplicitiesL->m[i].data = (void*)multiplicities[i];
     362    multiplicitiesL->m[i].data = (void*)(long)multiplicities[i];
    363363  }
    364364  omFree(multiplicities);
     
    786786  StringAppend("Singular for %s version %s (%s, %d bit) %s #%s",
    787787               S_UNAME, S_VERSION1, // SINGULAR_VERSION,
    788                PACKAGE_VERSION, SIZEOF_LONG*8, singular_date, GIT_VERSION);
     788               PACKAGE_VERSION, SIZEOF_VOIDP*8, singular_date, GIT_VERSION);
    789789  StringAppendS("\nwith\n\t");
    790 #ifdef HAVE_FACTORY
    791   StringAppend("factory(%s){'%s','%s'}", factoryVersion, FACTORY_CFLAGS, FACTORY_LIBS);
    792 #ifdef HAVE_LIBFAC
    793   // libfac:
    794 //  extern const char * libfac_version;
    795 //  extern const char * libfac_date;
    796   StringAppend("+libfac");
    797 #endif // #ifdef HAVE_LIBFAC
    798   StringAppend(",");
    799 #endif
    800790
    801791#if defined (__GNU_MP_VERSION) && defined (__GNU_MP_VERSION_MINOR)
    802               StringAppend("GMP(%d.%d){'%s','%s'},",__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR, GMP_CFLAGS, GMP_LIBS);
    803 #else
    804               StringAppendS("GMP(1.3),");
     792              StringAppend("GMP(%d.%d),",__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR);
    805793#endif
    806794#ifdef HAVE_NTL
    807795#include <NTL/version.h>
    808               StringAppend("NTL(%s){'%s','%s'},",NTL_VERSION, NTL_CFLAGS, NTL_LIBS);
    809 #endif
    810 
    811 #ifdef HAVE_FACTORY
     796              StringAppend("NTL(%s),",NTL_VERSION);
     797#endif
     798
    812799#ifdef HAVE_FLINT
    813800              StringAppend("FLINT(%s){'%s','%s'},",version, FLINT_CFLAGS, FLINT_LIBS);
    814801#endif
    815 #endif
    816 
    817 #if SIZEOF_VOIDP == 8
    818               StringAppendS("64bit,");
    819 #else
    820               StringAppendS("32bit,");
    821 #endif
     802
    822803#if defined(HAVE_DYN_RL)
    823804              if (fe_fgets_stdin==fe_fgets_dummy)
     
    856837#endif
    857838              if (p_procs_dynamic) StringAppendS("dynamic p_Procs,");
    858 #ifdef TEST
    859               StringAppendS("TESTs,");
    860 #endif
    861839#if YYDEBUG
    862840              StringAppendS("YYDEBUG=1,");
  • Singular/mod_lib.cc

    r11ab4e r8b1af6  
    2525#define BYTES_TO_CHECK 7
    2626
    27 lib_types type_of_LIB(char *newlib, char *libnamebuf)
     27lib_types type_of_LIB(const char *newlib, char *libnamebuf)
    2828{
    2929  const unsigned char mach_o[]={0xfe,0xed,0xfa,0xce,0};
  • Singular/mod_lib.h

    r11ab4e r8b1af6  
    77#include <polys/mod_raw.h>  /* for lib_types */
    88
    9 lib_types type_of_LIB(char *newlib, char *fullname);
     9lib_types type_of_LIB(const char *newlib, char *fullname);
    1010
    1111#ifdef EMBED_PYTHON
  • Singular/newstruct.cc

    r11ab4e r8b1af6  
    354354          if (nm==NULL)
    355355          {
    356             Werror("member %s nor found", a2->name);
     356            Werror("member %s not found", a2->name);
    357357            return TRUE;
    358358          }
     
    516516  {
    517517    l->m[nm->pos].rtyp=nm->typ;
     518    if (RingDependend(nm->typ))
     519      l->m[nm->pos-1].rtyp=RING_CMD;
    518520    l->m[nm->pos].data=idrecDataInit(nm->typ);
    519521    nm=nm->next;
     
    754756  while (elem!=NULL)
    755757  {
    756     Print(">>%s<< at pos %d, type %d\n",elem->name,elem->pos,elem->typ);
     758    Print(">>%s<< at pos %d, type %d (%s)\n",elem->name,elem->pos,elem->typ,Tok2Cmdname(elem->typ));
     759    if (RingDependend(elem->typ))
     760      Print(">>r_%s<< at pos %d, shadow ring\n",elem->name,elem->pos-1);
    757761    elem=elem->next;
    758762  }
  • Singular/subexpr.cc

    r11ab4e r8b1af6  
    426426      {
    427427        ring r=(ring)d;
    428         r->ref++;
     428        if (r!=NULL) r->ref++;
    429429        //Print("+  ring %d, ref %d\n",r,r->ref);
    430430        return d;
     
    11321132      }
    11331133      else
    1134         r=(char *)((*iv)[index-1]);
     1134        r=(char *)(long)((*iv)[index-1]);
    11351135      break;
    11361136    }
     
    11481148      }
    11491149      else
    1150         r=(char *)(IMATELEM((*iv),index,e->next->start));
     1150        r=(char *)(long)(IMATELEM((*iv),index,e->next->start));
    11511151      break;
    11521152    }
  • Singular/subexpr.h

    r11ab4e r8b1af6  
    120120  BOOLEAN   to_be_done;
    121121  int       cnt;
    122   void      push(char *p, char * libname);
    123   libstackv pop(char *p);
     122  void      push(const char *p, char * libname);
     123  libstackv pop(const char *p);
    124124  inline char *get() { return(libname); }
    125125};
  • Singular/table.h

    r11ab4e r8b1af6  
    11221122//   input type       output type     convert procedure
    11231123//  int -> bigint
    1124    { INT_CMD,         BIGINT_CMD,     D(iiI2BI) , NULL },
     1124   { INT_CMD,         BIGINT_CMD,     D(iiI2BI) , NULL_VAL },
    11251125//  int -> number
    1126    { INT_CMD,         NUMBER_CMD,     D(iiI2N) , NULL },
    1127    { BIGINT_CMD,      NUMBER_CMD,     D(iiBI2N) , NULL },
     1126   { INT_CMD,         NUMBER_CMD,     D(iiI2N) , NULL_VAL },
     1127   { BIGINT_CMD,      NUMBER_CMD,     D(iiBI2N) , NULL_VAL },
    11281128//  int -> poly
    1129    { INT_CMD,         POLY_CMD,       D(iiI2P) , NULL },
    1130    { BIGINT_CMD,      POLY_CMD,       D(iiBI2P) , NULL },
     1129   { INT_CMD,         POLY_CMD,       D(iiI2P) , NULL_VAL },
     1130   { BIGINT_CMD,      POLY_CMD,       D(iiBI2P) , NULL_VAL },
    11311131//  int -> vector
    1132    { INT_CMD,         VECTOR_CMD,     D(iiI2V) , NULL },
    1133    { BIGINT_CMD,      VECTOR_CMD,     D(iiBI2V) , NULL },
     1132   { INT_CMD,         VECTOR_CMD,     D(iiI2V) , NULL_VAL },
     1133   { BIGINT_CMD,      VECTOR_CMD,     D(iiBI2V) , NULL_VAL },
    11341134//  int -> ideal
    1135    { INT_CMD,         IDEAL_CMD,      D(iiI2Id) , NULL },
    1136    { BIGINT_CMD,      IDEAL_CMD,      D(iiBI2Id) , NULL },
     1135   { INT_CMD,         IDEAL_CMD,      D(iiI2Id) , NULL_VAL },
     1136   { BIGINT_CMD,      IDEAL_CMD,      D(iiBI2Id) , NULL_VAL },
    11371137//  int -> matrix
    1138    { INT_CMD,         MATRIX_CMD,     D(iiI2Id) , NULL },
    1139    { BIGINT_CMD,      MATRIX_CMD,     D(iiBI2Id) , NULL },
     1138   { INT_CMD,         MATRIX_CMD,     D(iiI2Id) , NULL_VAL },
     1139   { BIGINT_CMD,      MATRIX_CMD,     D(iiBI2Id) , NULL_VAL },
    11401140//  int -> intvec
    1141    { INT_CMD,         INTVEC_CMD,     D(iiI2Iv) , NULL },
     1141   { INT_CMD,         INTVEC_CMD,     D(iiI2Iv) , NULL_VAL },
    11421142//  intvec -> intmat
    1143    { INTVEC_CMD,      INTMAT_CMD,     D(iiDummy), NULL },
     1143   { INTVEC_CMD,      INTMAT_CMD,     D(iiDummy), NULL_VAL },
    11441144//  intvec -> matrix
    1145    { INTVEC_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL },
     1145   { INTVEC_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL_VAL },
    11461146//  intmat -> bigintmat
    1147    { INTMAT_CMD,      BIGINTMAT_CMD,  D(iiIm2Bim) , NULL },
     1147   { INTMAT_CMD,      BIGINTMAT_CMD,  D(iiIm2Bim) , NULL_VAL },
    11481148//  bigintmat -> intmat
    1149    { BIGINTMAT_CMD,   INTMAT_CMD,     D(iiBim2Im) , NULL },
     1149   { BIGINTMAT_CMD,   INTMAT_CMD,     D(iiBim2Im) , NULL_VAL },
    11501150//  intmat -> matrix
    1151    { INTMAT_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL },
     1151   { INTMAT_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL_VAL },
    11521152//  number -> poly
    1153    { NUMBER_CMD,      POLY_CMD,       D(iiN2P)  , NULL },
     1153   { NUMBER_CMD,      POLY_CMD,       D(iiN2P)  , NULL_VAL },
    11541154//  number -> matrix
    1155    { NUMBER_CMD,      MATRIX_CMD,     D(iiN2Ma)  , NULL },
     1155   { NUMBER_CMD,      MATRIX_CMD,     D(iiN2Ma)  , NULL_VAL },
    11561156//  number -> ideal
    11571157//  number -> vector
     
    11591159//  poly -> number
    11601160//  poly -> ideal
    1161    { POLY_CMD,        IDEAL_CMD,      D(iiP2Id) , NULL },
     1161   { POLY_CMD,        IDEAL_CMD,      D(iiP2Id) , NULL_VAL },
    11621162//  poly -> vector
    1163    { POLY_CMD,        VECTOR_CMD,     D(iiP2V) , NULL },
     1163   { POLY_CMD,        VECTOR_CMD,     D(iiP2V) , NULL_VAL },
    11641164//  poly -> matrix
    1165    { POLY_CMD,        MATRIX_CMD,     D(iiP2Id) , NULL },
     1165   { POLY_CMD,        MATRIX_CMD,     D(iiP2Id) , NULL_VAL },
    11661166//  vector -> module
    1167    { VECTOR_CMD,      MODUL_CMD,      D(iiP2Id) , NULL },
     1167   { VECTOR_CMD,      MODUL_CMD,      D(iiP2Id) , NULL_VAL },
    11681168//  vector -> matrix
    1169    { VECTOR_CMD,      MATRIX_CMD,     D(iiV2Ma) , NULL },
     1169   { VECTOR_CMD,      MATRIX_CMD,     D(iiV2Ma) , NULL_VAL },
    11701170//  ideal -> module
    1171    { IDEAL_CMD,       MODUL_CMD,      D(iiMa2Mo) , NULL },
     1171   { IDEAL_CMD,       MODUL_CMD,      D(iiMa2Mo) , NULL_VAL },
    11721172//  ideal -> matrix
    1173    { IDEAL_CMD,       MATRIX_CMD,     D(iiDummy) , NULL },
     1173   { IDEAL_CMD,       MATRIX_CMD,     D(iiDummy) , NULL_VAL },
    11741174//  module -> matrix
    1175    { MODUL_CMD,       MATRIX_CMD,     D(iiMo2Ma) , NULL },
     1175   { MODUL_CMD,       MATRIX_CMD,     D(iiMo2Ma) , NULL_VAL },
    11761176//  matrix -> ideal
    11771177//  matrix -> module
    1178    { MATRIX_CMD,      MODUL_CMD,      D(iiMa2Mo) , NULL },
     1178   { MATRIX_CMD,      MODUL_CMD,      D(iiMa2Mo) , NULL_VAL },
    11791179//  intvec
    11801180//  link
    1181    { STRING_CMD,      LINK_CMD,       D(iiS2Link) , NULL },
     1181   { STRING_CMD,      LINK_CMD,       D(iiS2Link) , NULL_VAL },
    11821182// resolution -> list
    1183    { RESOLUTION_CMD,  LIST_CMD,       NULL /*iiR2L*/ , D(iiR2L_l) },
     1183   { RESOLUTION_CMD,  LIST_CMD,       NULL_VAL /*iiR2L*/ , D(iiR2L_l) },
    11841184// list -> resolution
    1185    { LIST_CMD,        RESOLUTION_CMD, D(iiL2R) , NULL },
     1185   { LIST_CMD,        RESOLUTION_CMD, D(iiL2R) , NULL_VAL},
    11861186//  end of list
    1187    { 0,               0,              NULL , NULL }
     1187   { 0,               0,              NULL_VAL , NULL_VAL }
    11881188};
    11891189#endif
  • configure.ac

    r11ab4e r8b1af6  
    6060AC_CHECK_LIB(pthread,pthread_create)
    6161
    62 LB_CHECK_GMP(4.2,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     62LB_CHECK_GMP(4.0,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    6363LB_CHECK_NTL(5.0,,AC_MSG_WARN([Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    6464LB_CHECK_FLINT(2.3,,AC_MSG_WARN([Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     
    168168AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
    169169
     170##### SEE http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
     171
     172AX_RECURSIVE_EVAL([[$]prefix], [config_prefix])
     173AX_NORMALIZE_PATH([config_prefix],['/'])
     174AC_DEFINE_UNQUOTED([PREFIX],"$config_prefix",[prefix])
     175
     176AX_RECURSIVE_EVAL([[$]exec_prefix], [config_exec_prefix])
     177AX_NORMALIZE_PATH([config_exec_prefix],['/'])
     178AC_DEFINE_UNQUOTED([EXEC_PREFIX],"$config_exec_prefix",[exec_prefix])
     179
     180AX_RECURSIVE_EVAL([[$]libexecdir], [config_libexecdir])
     181AX_NORMALIZE_PATH([config_libexecdir],['/'])
     182AC_DEFINE_UNQUOTED([LIBEXEC_DIR],"$config_libexecdir",[libexecdir])
     183
     184AX_RECURSIVE_EVAL([[$]libdir], [config_libdir])
     185AX_NORMALIZE_PATH([config_libdir],['/'])
     186AC_DEFINE_UNQUOTED([LIB_DIR],"$config_libdir",[libdir])
     187
     188AX_RECURSIVE_EVAL([[$]bindir], [config_bindir])
     189AX_NORMALIZE_PATH([config_bindir],['/'])
     190AC_DEFINE_UNQUOTED([BIN_DIR],"$config_bindir",[bindir])
     191
     192AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
     193AX_NORMALIZE_PATH([config_datadir],['/'])
     194AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
    170195
    171196SING_SHOW_FLAGS([Compiler/linker flags: ])
  • doc/COPYING.texi

    r11ab4e r8b1af6  
    9999@copyright{} Komei Fukuda
    100100@* @uref{http://www.ifor.math.ethz.ch/~fukuda/cdd_home}
     101@item FLINT
     102@copyright{} Bill Hart, Sebastian Pancratz, Fredrik Johansson
     103@* @uref{http://www.flintlib.org}
    101104@item gfanlib
    102105@copyright{} Anders Jensen
    103106@* @uref{http://home.imf.au.dk/jensen/software/gfan/gfan.html}
    104107@item Singular-Factory
    105 @copyright{} Greuel/Stobbe, University of Kaiserslautern:
     108@copyright{} Gert-Martin Greuel/R@"udiger Stobbe/Martin Lee, University of Kaiserslautern:
    106109@* @uref{ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Factory}
    107110@item Singular-libfac
     
    167170RWTH Aachen,
    168171Universidad de Buenos Aires,
    169 Université de Versailles Saint-Quentin-en-Yvelines,
     172Universit@'e de Versailles Saint-Quentin-en-Yvelines,
    170173University of G@"ottingen,
    171174University of Hannover,
     
    210213Kai Kr@"uger,
    211214Santiago Laplagne,
    212 Grégoire Lecerf,
     215Gr@'egoire Lecerf,
    213216Martin Lee,
    214217Viktor Levandovskyy,
  • dyn_modules/bigintm/Makefile.am

    r11ab4e r8b1af6  
    3737
    3838
    39 AM_LDFLAGS      = -release ${PACKAGE_VERSION}
     39#### AM_LDFLAGS = -release ${PACKAGE_VERSION}
    4040# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
    4141# -L${top_builddir}/libpolys/polys $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/resources
  • dyn_modules/callgfanlib/Makefile.am

    r11ab4e r8b1af6  
    2828$(FACTORY_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
    2929
    30 AM_LDFLAGS      = -release ${PACKAGE_VERSION}
     30#### AM_LDFLAGS = -release ${PACKAGE_VERSION}
    3131#  -L${abs_top_builddir}/gfanlib/
    3232# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
  • dyn_modules/callgfanlib/bbcone.cc

    r11ab4e r8b1af6  
    170170}
    171171
    172 void* bbcone_Init(blackbox *b)
     172void* bbcone_Init(blackbox* /*b*/)
    173173{
    174174  return (void*)(new gfan::ZCone());
     
    229229}
    230230
    231 char * bbcone_String(blackbox *b, void *d)
     231char* bbcone_String(blackbox* /*b*/, void *d)
    232232{
    233233  if (d==NULL) return omStrDup("invalid object");
     
    239239}
    240240
    241 void bbcone_destroy(blackbox *b, void *d)
     241void bbcone_destroy(blackbox* /*b*/, void *d)
    242242{
    243243  if (d!=NULL)
     
    248248}
    249249
    250 void* bbcone_Copy(blackbox*b, void *d)
     250void* bbcone_Copy(blackbox* /*b*/, void *d)
    251251{
    252252  gfan::ZCone* zc = (gfan::ZCone*)d;
     
    622622{
    623623  leftv u = args;
    624   if ((u != NULL) && (u->Typ() == coneID))
     624  if ((u != NULL) && (u->Typ() == coneID || u->Typ() == polytopeID))
    625625  {
    626626    gfan::ZCone* zc = (gfan::ZCone*)u->Data();
     
    638638{
    639639  leftv u = args;
    640   if ((u != NULL) && (u->Typ() == coneID))
     640  if ((u != NULL) && (u->Typ() == coneID || u->Typ() == polytopeID))
    641641  {
    642642    gfan::ZCone* zc = (gfan::ZCone*)u->Data();
     
    653653{
    654654  leftv u = args;
    655   if ((u != NULL) && (u->Typ() == coneID))
     655  if ((u != NULL) && (u->Typ() == coneID || u->Typ() == polytopeID))
    656656  {
    657657    gfan::ZCone* zc = (gfan::ZCone*)u->Data();
     
    661661    return FALSE;
    662662  }
    663   if ((u != NULL) && (u->Typ() == polytopeID))
    664     {
    665       gfan::ZCone* zc = (gfan::ZCone*)u->Data();
    666       res->rtyp = BIGINTMAT_CMD;
    667       res->data = (void*) getFacetNormals(zc);
    668       return FALSE;
    669     }
    670663  WerrorS("facets: unexpected parameters");
    671664  return TRUE;
     
    675668{
    676669  leftv u = args;
    677   if ((u != NULL) && (u->Typ() == coneID))
     670  if ((u != NULL) && (u->Typ() == coneID || u->Typ() == polytopeID))
    678671  {
    679672    gfan::ZCone* zc = (gfan::ZCone*)u->Data();
     
    690683{
    691684  leftv u = args;
    692   if ((u != NULL) && (u->Typ() == coneID))
     685  if ((u != NULL) && (u->Typ() == coneID || u->Typ() == polytopeID))
    693686  {
    694687    gfan::ZCone* zc = (gfan::ZCone*)u->Data();
     
    705698{
    706699  leftv u = args;
    707   if ((u != NULL) && (u->Typ() == coneID))
     700  if ((u != NULL) && (u->Typ() == coneID || u->Typ() == polytopeID))
    708701  {
    709702    gfan::ZCone* zc = (gfan::ZCone*)u->Data();
     
    16461639
    16471640
     1641lists listOfFacets(const gfan::ZCone &zc)
     1642{
     1643  gfan::ZMatrix inequalities = zc.getFacets();
     1644  gfan::ZMatrix equations = zc.getImpliedEquations();
     1645  lists L = (lists)omAllocBin(slists_bin);
     1646  int r = inequalities.getHeight();
     1647  int c = inequalities.getWidth();
     1648  L->Init(r);
     1649
     1650  /* next we iterate over each of the r facets, build the respective cone and add it to the list */
     1651  /* this is the i=0 case */
     1652  gfan::ZMatrix newInequalities = inequalities.submatrix(1,0,r,c);
     1653  gfan::ZMatrix newEquations = equations;
     1654  newEquations.appendRow(inequalities[0]);
     1655  L->m[0].rtyp = coneID; L->m[0].data=(void*) new gfan::ZCone(newInequalities,newEquations);
     1656
     1657  /* these are the cases i=1,...,r-2 */
     1658  for (int i=1; i<r-1; i++)
     1659  {
     1660    newInequalities = inequalities.submatrix(0,0,i-1,c);
     1661    newInequalities.append(inequalities.submatrix(i+1,0,r,c));
     1662    newEquations = equations;
     1663    newEquations.appendRow(inequalities[i]);
     1664    L->m[i].rtyp = coneID; L->m[i].data=(void*) new gfan::ZCone(newInequalities,newEquations);
     1665  }
     1666
     1667  /* this is the i=r-1 case */
     1668  newInequalities = inequalities.submatrix(0,0,r-1,c);
     1669  newEquations = equations;
     1670  newEquations.appendRow(inequalities[r]);
     1671  L->m[r-1].rtyp = coneID; L->m[r-1].data=(void*) new gfan::ZCone(newInequalities,newEquations);
     1672
     1673  return L;
     1674}
     1675
     1676
     1677BOOLEAN listOfFacets(leftv res, leftv args)
     1678{
     1679  leftv u=args;
     1680  if ((u != NULL) && (u->Typ() == coneID))
     1681  {
     1682    gfan::ZCone* zc = (gfan::ZCone*) u->Data();
     1683    lists L = listOfFacets(*zc);
     1684    res->rtyp = LIST_CMD;
     1685    res->data = (void*) L;
     1686    return FALSE;
     1687  }
     1688  WerrorS("listOfFacets: unexpected parameters");
     1689  return TRUE;
     1690}
     1691
     1692
    16481693poly initial(poly p)
    16491694{
     
    16841729      ideal I = (ideal) u->Data();
    16851730      ideal inI = idInit(IDELEMS(I));
    1686       poly g; poly h; long d;
     1731      poly g;
    16871732      for (int i=0; i<IDELEMS(I); i++)
    16881733      {
     
    19081953  p->iiAddCproc("","uniquePoint",FALSE,uniquePoint);
    19091954  p->iiAddCproc("","listContainsCone",FALSE,containsCone);
     1955  p->iiAddCproc("","listOfFacets",FALSE,listOfFacets);
    19101956  p->iiAddCproc("","maximalGroebnerCone",FALSE,maximalGroebnerCone);
    19111957  p->iiAddCproc("","groebnerCone",FALSE,groebnerCone);
  • dyn_modules/callgfanlib/bbfan.cc

    r11ab4e r8b1af6  
    2525int fanID;
    2626
    27 void* bbfan_Init(blackbox *b)
     27void* bbfan_Init(blackbox* /*b*/)
    2828{
    2929  return (void*) new gfan::ZFan(0);
    3030}
    3131
    32 void bbfan_destroy(blackbox *b, void *d)
     32void bbfan_destroy(blackbox* /*b*/, void *d)
    3333{
    3434  if (d!=NULL)
     
    3939}
    4040
    41 char* bbfan_String(blackbox *b, void *d)
     41char* bbfan_String(blackbox* /*b*/, void *d)
    4242{
    4343  if (d==NULL) return omStrDup("invalid object");
     
    5050}
    5151
    52 void* bbfan_Copy(blackbox*b, void *d)
     52void* bbfan_Copy(blackbox* /*b*/, void *d)
    5353{
    5454  gfan::ZFan* zf = (gfan::ZFan*)d;
     
    502502      leftv w=v->next; int n = 1;
    503503      if ((w != NULL) && (w->Typ() == INT_CMD))
    504         int n = (int)(long) w;
     504        n = (int)(long) w;
    505505
    506506      if (n != 0)
     
    864864}
    865865
    866 lists listOfFacets(const gfan::ZCone &zc)
    867 {
    868   gfan::ZMatrix inequalities = zc.getFacets();
    869   gfan::ZMatrix equations = zc.getImpliedEquations();
    870   lists L = (lists)omAllocBin(slists_bin);
    871   int r = inequalities.getHeight();
    872   int c = inequalities.getWidth();
    873   L->Init(r);
    874 
    875   /* next we iterate over each of the r facets, build the respective cone and add it to the list */
    876   /* this is the i=0 case */
    877   gfan::ZMatrix newInequalities = inequalities.submatrix(1,0,r,c);
    878   gfan::ZMatrix newEquations = equations;
    879   newEquations.appendRow(inequalities[0]);
    880   L->m[0].rtyp = coneID; L->m[0].data=(void*) new gfan::ZCone(newInequalities,newEquations);
    881 
    882   /* these are the cases i=1,...,r-2 */
    883   for (int i=1; i<r-1; i++)
    884   {
    885     newInequalities = inequalities.submatrix(0,0,i-1,c);
    886     newInequalities.append(inequalities.submatrix(i+1,0,r,c));
    887     newEquations = equations;
    888     newEquations.appendRow(inequalities[i]);
    889     L->m[i].rtyp = coneID; L->m[i].data=(void*) new gfan::ZCone(newInequalities,newEquations);
    890   }
    891 
    892   /* this is the i=r-1 case */
    893   newInequalities = inequalities.submatrix(0,0,r-1,c);
    894   newEquations = equations;
    895   newEquations.appendRow(inequalities[r]);
    896   L->m[r-1].rtyp = coneID; L->m[r-1].data=(void*) new gfan::ZCone(newInequalities,newEquations);
    897 
    898   return L;
    899 }
    900 
    901 BOOLEAN listOfFacets(leftv res, leftv args)
    902 {
    903   leftv u=args;
    904   if ((u != NULL) && (u->Typ() == coneID))
    905   {
    906     gfan::ZCone* zc = (gfan::ZCone*) u->Data();
    907     lists L = listOfFacets(*zc);
    908     res->rtyp = LIST_CMD;
    909     res->data = (void*) L;
    910     return FALSE;
    911   }
    912   WerrorS("listOfFacets: unexpected parameters");
    913   return TRUE;
    914 }
    915866
    916867BOOLEAN tropicalVariety(leftv res, leftv args)
  • dyn_modules/callgfanlib/bbpolytope.cc

    r11ab4e r8b1af6  
    3838}
    3939
    40 void *bbpolytope_Init(blackbox *b)
     40void *bbpolytope_Init(blackbox* /*b*/)
    4141{
    4242  return (void*)(new gfan::ZCone());
     
    9797}
    9898
    99 char* bbpolytope_String(blackbox *b, void *d)
     99char* bbpolytope_String(blackbox* /*b*/, void *d)
    100100{ if (d==NULL) return omStrDup("invalid object");
    101101   else
     
    107107}
    108108
    109 void bbpolytope_destroy(blackbox *b, void *d)
     109void bbpolytope_destroy(blackbox* /*b*/, void *d)
    110110{
    111111  if (d!=NULL)
     
    116116}
    117117
    118 void* bbpolytope_Copy(blackbox*b, void *d)
     118void* bbpolytope_Copy(blackbox* /*b*/, void *d)
    119119{
    120120  gfan::ZCone* zc = (gfan::ZCone*)d;
     
    358358  WerrorS("vertices: unexpected parameters");
    359359  return TRUE;
    360 }
    361 
    362 bigintmat* getFacetNormals(gfan::ZCone* zc)
    363 {
    364   gfan::ZMatrix zmat = zc->getFacets();
    365   return zMatrixToBigintmat(zmat);
    366360}
    367361
     
    482476  // iiAddCproc("","getCodimension",FALSE,getAmbientDimension);
    483477  // iiAddCproc("","getDimension",FALSE,getDimension);
    484   // iiAddCproc("","getFacetNormals",FALSE,getFacetNormals);
    485478  /********************************************************/
    486479  /* the following functions are identical to those in bbcone.cc */
     480  // iiAddCproc("","facets",FALSE,facets);
    487481  // iiAddCproc("","setLinearForms",FALSE,setLinearForms);
    488482  // iiAddCproc("","getLinearForms",FALSE,getLinearForms);
  • dyn_modules/callgfanlib/gfan.h

    r11ab4e r8b1af6  
    1414#include <cdd/cdd.h>
    1515#include <cdd/cddmp.h>
     16#elif HAVE_CDDLIB_SETOPER_H
     17#include <cddlib/setoper.h>
     18#include <cddlib/cdd.h>
     19#include <cddlib/cddmp.h>
    1620#else
    1721#include <setoper.h>
     
    261265};
    262266lists lprepareResult(gcone *gc, const int n);
    263 static int64 int64gcd(const int64 &a, const int64 &b);
    264 static int intgcd(const int &a, const int &b);
    265 static int dotProduct(const int64vec &iva, const int64vec &ivb);
    266 static bool isParallel(const int64vec &a, const int64vec &b);
    267 static int64vec *ivNeg(/*const*/ int64vec *iv);
    268 static void idDebugPrint(const ideal &I);
    269 static volatile void showSLA(facet &f);
    270 static bool isMonomial(const ideal &I);
    271 static bool ivAreEqual(const int64vec &a, const int64vec &b);
    272 static bool areEqual2(facet *f, facet *g);
    273 static bool areEqual( facet *f, facet *g);
     267/* static int64 int64gcd(const int64 &a, const int64 &b); */
     268/* static int intgcd(const int &a, const int &b); */
     269/* static int dotProduct(const int64vec &iva, const int64vec &ivb); */
     270/* static bool isParallel(const int64vec &a, const int64vec &b); */
     271/* static int64vec *ivNeg(/\*const*\/ int64vec *iv); */
     272/* static void idDebugPrint(const ideal &I); */
     273/* static volatile void showSLA(facet &f); */
     274/* static bool isMonomial(const ideal &I); */
     275/* static bool ivAreEqual(const int64vec &a, const int64vec &b); */
     276/* static bool areEqual2(facet *f, facet *g); */
     277/* static bool areEqual( facet *f, facet *g); */
    274278// bool iv64isStrictlyPositive(int64vec *);
    275279#endif
  • dyn_modules/callgfanlib/gitfan.cc

    r11ab4e r8b1af6  
    4040    gfan::ZVector v = f.interiorPoint;
    4141    gfan::ZVector w = f.facetNormal;
    42     assume(c.ambientDimension() == v.size());
    43     assume(c.ambientDimension() == w.size());
     42    assume(c.ambientDimension() == (int)v.size());
     43    assume(c.ambientDimension() == (int)w.size());
    4444    assume(c.contains(v));
    4545    assume(!c.contains(w));
     
    5353  {
    5454#ifndef NDEBUG
    55     assume(c.ambientDimension() == v.size());
    56     assume(c.ambientDimension() == w.size());
     55    assume(c.ambientDimension() == (int)v.size());
     56    assume(c.ambientDimension() == (int)w.size());
    5757    assume(c.contains(v));
    5858    assume(!c.contains(w));
     
    6666    gfan::ZVector v = this->interiorPoint;
    6767    gfan::ZVector w = this->facetNormal;
    68     assume(c.ambientDimension() == v.size());
    69     assume(c.ambientDimension() == w.size());
     68    assume(c.ambientDimension() == (int)v.size());
     69    assume(c.ambientDimension() == (int)w.size());
    7070    assume(c.contains(v));
    7171    assume(!c.contains(w));
     
    114114    return F;
    115115
    116   int index = 0;
     116  // int index = 0;
    117117  /* next we iterate over each of the r facets, build the respective cone and add it to the list */
    118118  /* this is the i=0 case */
  • dyn_modules/callpolymake/Makefile.am

    r11ab4e r8b1af6  
    1010
    1111# forcefully enable exceptions for polymake
    12 POLYMAKE_CFLAGS = -fexceptions
     12POLYMAKE_CFLAGS = -fexceptions -frtti
    1313
    14 AM_LDFLAGS      = -release ${PACKAGE_VERSION} ${PM_LDFLAGS}
     14AM_LDFLAGS      = ${PM_LDFLAGS}
     15# -release ${PACKAGE_VERSION}
     16 
     17SOURCES = polymake_conversion.cc polymake_documentation.cc polymake_wrapper.cc
    1518
    16 SOURCES = polymake_conversion.cc polymake_documentation.cc polymake_wrapper.cc
     19CXXFLAGS += $(POLYMAKE_CXXFLAGS)
    1720
    1821polymake_la_SOURCES = $(SOURCES)
    1922
    2023MYINCLUDES = -I${top_srcdir} -I${top_builddir} -I${srcdir} \
    21 -I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    22 $(GMP_CFLAGS) ${PM_INC} ${PM_CFLAGS} ${POLYMAKE_CFLAGS}
     24-I${top_srcdir}/libpolys -I${top_builddir}/libpolys  \
     25-I${top_builddir}/factory/include $(GMP_CFLAGS) $(PM_INC) $(PM_CFLAGS) \
     26$(POLYMAKE_CFLAGS) $(FACTORY_CFLAGS)
    2327
    2428P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
  • dyn_modules/callpolymake/polymake_conversion.cc

    r11ab4e r8b1af6  
    77#include <polymake/Set.h>
    88#include <polymake/common/lattice_tools.h>
    9 // #include <polymake/perl/macros.h>
    10 // #include <polymake/IncidenceMatrix.h>
     9#include <polymake/IncidenceMatrix.h>
    1110
    1211#include <gfanlib/gfanlib.h>
     
    1413
    1514#include <kernel/mod2.h>
    16 // #include <kernel/structs.h>
    17 // #include <kernel/febase.h>
    1815#include <libpolys/misc/intvec.h>
    19 
    20 // #include <callgfanlib/bbcone.h>
    21 // #include <callgfanlib/bbfan.h>
    22 // #include <callgfanlib/bbpolytope.h>
    23 
    24 // #include <Singular/blackbox.h>
    25 // #include <Singular/ipshell.h>
    26 // #include <Singular/subexpr.h>
    27 // #include <Singular/tok.h>
    28 
     16#include <libpolys/coeffs/numbers.h>
     17#include <libpolys/coeffs/bigintmat.h>
     18#include <Singular/lists.h>
     19#include <Singular/ipid.h> // for bigints,
     20// is there really nothing better than this?
    2921
    3022/* Functions for converting Integers, Rationals and their Matrices
     
    136128}
    137129
     130number PmInteger2Number (const polymake::Integer& pi)
     131{
     132  mpz_class cache(pi.get_rep());
     133  long m = 268435456;
     134  if(mpz_cmp_si(cache.get_mpz_t(),m))
     135  {
     136    int temp = (int) mpz_get_si(cache.get_mpz_t());
     137    return n_Init(temp,coeffs_BIGINT);
     138  }
     139  else
     140    return n_InitMPZ(cache.get_mpz_t(),coeffs_BIGINT);
     141}
     142
    138143intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok)
    139144{
     
    161166}
    162167
    163 // intvec* PmIncidenceMatrix2Intvec (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat)
    164 // {
    165 //   int rows = icmat->rows();
    166 //   int cols = icmat->cols();
    167 //   intvec* iv = new intvec(rows,cols,0);
    168 //   for (int r = 1; r <= rows; r++)
    169 //     for (int c = 1; c <= cols; c++)
    170 //       IMATELEM(*iv,r,c) = (int) (*icmat).row(r).exists(c);
    171 //   return iv;
    172 // }
     168bigintmat* PmMatrixInteger2Bigintmat (polymake::Matrix<polymake::Integer>* mi)
     169{
     170  int rows = mi->rows();
     171  int cols = mi->cols();
     172  bigintmat* bim= new bigintmat(rows,cols,coeffs_BIGINT);
     173  const polymake::Integer* pi = concat_rows(*mi).begin();
     174  for (int r = 1; r <= rows; r++)
     175    for (int c = 1; c <= cols; c++)
     176    {
     177      number temp = PmInteger2Number(*pi);
     178      bim->set(r,c,temp);
     179      n_Delete(&temp,coeffs_BIGINT);
     180      pi++;
     181    }
     182  return bim;
     183}
     184
     185lists PmIncidenceMatrix2ListOfIntvecs (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat)
     186{
     187  int rows = icmat->rows();
     188  int cols = icmat->cols();
     189  lists L = (lists)omAllocBin(slists_bin);
     190  L->Init(rows);
     191
     192  for (int r = 0; r < rows; r++)
     193  {
     194    intvec* iv = new intvec(cols); int i=0;
     195    for (int c = 0; c < cols; c++)
     196    {
     197      if ((*icmat).row(r).exists(c))
     198      { (*iv)[i]=c; i++; }
     199    }
     200    iv->resize(i);
     201    L->m[r].rtyp = INTVEC_CMD;
     202    L->m[r].data = (void*) iv;
     203  }
     204
     205  return L;
     206}
     207
     208lists PmAdjacencyMatrix2ListOfEdges (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat)
     209{
     210  int rows = icmat->rows();
     211  int cols = icmat->cols();
     212
     213  // counting number of edges
     214  int i=0; int r, c;
     215  for (r=0; r<rows; r++)
     216  {
     217    for (c=0; c<cols; c++)
     218    {
     219      if ((*icmat).row(r).exists(c) && r<c)
     220        i++;
     221    }
     222  }
     223
     224  lists L = (lists)omAllocBin(slists_bin);
     225  L->Init(i);
     226
     227  i=0;
     228  for (r=0; r<rows; r++)
     229  {
     230    for (c=0; c<cols; c++)
     231    {
     232      if ((*icmat).row(r).exists(c) && r<c)
     233      {
     234        intvec* iv = new intvec(2);
     235        (*iv)[0]=r; (*iv)[1]=c;
     236        L->m[i].rtyp = INTVEC_CMD;
     237        L->m[i].data = (void*) iv;
     238        i++;
     239      }
     240    }
     241  }
     242
     243  return L;
     244}
    173245
    174246intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b)
  • dyn_modules/callpolymake/polymake_conversion.h

    r11ab4e r8b1af6  
    33
    44#include <kernel/mod2.h>
    5 
    6 #ifdef HAVE_FANS
    75
    86#include <gmpxx.h>
     
    1412#include <polymake/Set.h>
    1513#include <polymake/common/lattice_tools.h>
     14#include <polymake/IncidenceMatrix.h>
    1615
    1716#include <gfanlib/gfanlib.h>
    1817#include <gfanlib/gfanlib_q.h>
    1918
     19#include <libpolys/coeffs/numbers.h>
     20#include <libpolys/coeffs/bigintmat.h>
    2021#include <libpolys/misc/intvec.h>
     22#include <Singular/lists.h>
    2123
    2224/* Functions for converting Integers, Rationals and their Matrices
     
    4345intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok);
    4446intvec* PmMatrixInteger2Intvec (polymake::Matrix<polymake::Integer>* mi, bool &ok);
    45 // intvec* PmIncidenceMatrix2Intvec (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
     47lists PmIncidenceMatrix2ListOfIntvecs (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
     48lists PmAdjacencyMatrix2ListOfEdges (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
    4649intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b);
     50number PmInteger2Number (const polymake::Integer& pi);
     51bigintmat* PmMatrixInteger2Bigintmat (polymake::Matrix<polymake::Integer>* mi);
    4752
    4853/* polymake <- singular */
     
    6267
    6368#endif
    64 #endif
  • dyn_modules/callpolymake/polymake_documentation.cc

    r11ab4e r8b1af6  
    1 #include <polymake_conversion.h>
    2 
    3 #include <callgfanlib/bbcone.h>
    4 #include <callgfanlib/bbfan.h>
    5 #include <callgfanlib/bbpolytope.h>
    6 
    7 #include <Singular/blackbox.h>
    8 #include <Singular/ipshell.h>
    9 #include <Singular/subexpr.h>
    101#include <Singular/ipid.h>
    112
     
    204195    module_help_proc("polymake.so","normalFan", normalFan_help);
    205196
     197  const char* vertexAdjacencyGraph_help =
     198    "USAGE:    vertexAdjacencyGraph(polytope p)\nRETURN:   list,\nKEYWORDS: polytopes; polymake;\nEXAMPLE:  example visual shows an example\n";
     199
     200    module_help_proc("polymake.so","vertexAdjacencyGraph", normalFan_help);
     201
     202  const char* vertexEdgeGraph_help =
     203    "USAGE:    vertexEdgeGraph(polytope p)\nRETURN:   list,\nKEYWORDS: polytopes; polymake;\nEXAMPLE:  example visual shows an example\n";
     204
     205    module_help_proc("polymake.so","vertexEdgeGraph", normalFan_help);
     206
    206207}
  • dyn_modules/callpolymake/polymake_documentation.h

    r11ab4e r8b1af6  
    44#include <kernel/mod2.h>
    55
    6 #ifdef HAVE_FANS
    7 
    86#include <polymake_conversion.h>
    97
    10 #include <callgfanlib/bbcone.h>
    11 #include <callgfanlib/bbfan.h>
    12 #include <callgfanlib/bbpolytope.h>
     8#include <dyn_modules/callgfanlib/bbcone.h>
     9#include <dyn_modules/callgfanlib/bbfan.h>
     10#include <dyn_modules/callgfanlib/bbpolytope.h>
    1311
    1412#include <Singular/blackbox.h>
     
    2220
    2321#endif
    24 #endif
  • dyn_modules/callpolymake/polymake_wrapper.cc

    r11ab4e r8b1af6  
    11#include <polymake_conversion.h>
    22#include <polymake_documentation.h>
     3#include <polymake/Graph.h>
    34
    45#include <dyn_modules/callgfanlib/bbcone.h>
     
    16801681}
    16811682
     1683
     1684BOOLEAN PMvertexAdjacencyGraph(leftv res, leftv args)
     1685{
     1686  leftv u = args;
     1687  if ((u != NULL) && (u->Typ() == polytopeID))
     1688  {
     1689    gfan::ZCone* zp = (gfan::ZCone*) u->Data();
     1690    lists output=(lists)omAllocBin(slists_bin); output->Init(2);
     1691    try
     1692    {
     1693      polymake::perl::Object* p = ZPolytope2PmPolytope(zp);
     1694      polymake::Matrix<polymake::Integer> vert0 = p->give("VERTICES");
     1695      bigintmat* vert1 = PmMatrixInteger2Bigintmat(&vert0);
     1696      output->m[0].rtyp = BIGINTMAT_CMD;
     1697      output->m[0].data = (void*) vert1;
     1698
     1699      polymake::Graph<> gr=p->give("GRAPH.ADJACENCY");
     1700      polymake::IncidenceMatrix<polymake::NonSymmetric> adj = adjacency_matrix(gr);
     1701      lists listOfEdges = PmIncidenceMatrix2ListOfIntvecs(&adj);
     1702      output->m[1].rtyp = LIST_CMD;
     1703      output->m[1].data = (void*) listOfEdges;
     1704      delete p;
     1705    }
     1706    catch (const std::exception& ex)
     1707    {
     1708      WerrorS("ERROR: "); WerrorS(ex.what()); WerrorS("\n");
     1709      return TRUE;
     1710    }
     1711    res->rtyp = LIST_CMD;
     1712    res->data = (void*) output;
     1713    return FALSE;
     1714  }
     1715  WerrorS("vertexEdgeGraph: unexpected parameters");
     1716  return TRUE;
     1717}
     1718
     1719
     1720BOOLEAN PMvertexEdgeGraph(leftv res, leftv args)
     1721{
     1722  leftv u = args;
     1723  if ((u != NULL) && (u->Typ() == polytopeID))
     1724  {
     1725    gfan::ZCone* zp = (gfan::ZCone*) u->Data();
     1726    lists output=(lists)omAllocBin(slists_bin); output->Init(2);
     1727    try
     1728    {
     1729      polymake::perl::Object* p = ZPolytope2PmPolytope(zp);
     1730      polymake::Matrix<polymake::Integer> vert0 = p->give("VERTICES");
     1731      bigintmat* vert1 = PmMatrixInteger2Bigintmat(&vert0);
     1732      output->m[0].rtyp = BIGINTMAT_CMD;
     1733      output->m[0].data = (void*) vert1;
     1734
     1735      polymake::Graph<> gr=p->give("GRAPH.ADJACENCY");
     1736      polymake::IncidenceMatrix<polymake::NonSymmetric> adj = adjacency_matrix(gr);
     1737      lists listOfEdges = PmAdjacencyMatrix2ListOfEdges(&adj);
     1738      output->m[1].rtyp = LIST_CMD;
     1739      output->m[1].data = (void*) listOfEdges;
     1740      delete p;
     1741    }
     1742    catch (const std::exception& ex)
     1743    {
     1744      WerrorS("ERROR: "); WerrorS(ex.what()); WerrorS("\n");
     1745      return TRUE;
     1746    }
     1747    res->rtyp = LIST_CMD;
     1748    res->data = (void*) output;
     1749    return FALSE;
     1750  }
     1751  WerrorS("vertexEdgeGraph: unexpected parameters");
     1752  return TRUE;
     1753}
     1754
     1755
    16821756extern "C" int mod_init(SModulFunctions* p)
    16831757{
     
    16851759    {init_polymake = new polymake::Main();}
    16861760  init_polymake->set_application("fan");
    1687   // iiAddCproc("","cube",FALSE,cube);
    1688   // iiAddCproc("","cross",FALSE,cross);
    1689   //p->iiAddCproc("polymake.so","coneViaPoints",FALSE,PMconeViaRays);
    1690   p->iiAddCproc("polymake.so","polytopeViaVertices",FALSE,PMpolytopeViaVertices);
     1761  // p->iiAddCproc("polymake.so","coneViaPoints",FALSE,PMconeViaRays);
     1762  // p->iiAddCproc("polymake.so","polytopeViaPoints",FALSE,PMpolytopeViaVertices);
    16911763  p->iiAddCproc("polymake.so","isLatticePolytope",FALSE,PMisLatticePolytope);
    16921764  p->iiAddCproc("polymake.so","isBounded",FALSE,PMisBounded);
     
    17021774  p->iiAddCproc("polymake.so","latticeCodegree",FALSE,PMlatticeCodegree);
    17031775  p->iiAddCproc("polymake.so","ehrhartPolynomialCoeff",FALSE,PMehrhartPolynomialCoeff);
    1704   //p->iiAddCproc("polymake.so","fVector",FALSE,PMfVector);
     1776  p->iiAddCproc("polymake.so","fVector",FALSE,PMfVector);
    17051777  p->iiAddCproc("polymake.so","hVector",FALSE,PMhVector);
    17061778  p->iiAddCproc("polymake.so","hStarVector",FALSE,PMhStarVector);
     
    17271799  p->iiAddCproc("polymake.so","visual",FALSE,visual);
    17281800  p->iiAddCproc("polymake.so","normalFan",FALSE,normalFan);
    1729   // iiAddCproc("","testingtypes",FALSE,testingtypes);
    1730   // iiAddCproc("","testingintvec",FALSE,testingintvec);
    1731   // iiAddCproc("","testingcones",FALSE,testingcones);
    1732   // iiAddCproc("","testingpolytopes",FALSE,testingpolytopes);
    1733   // iiAddCproc("","testingfans",FALSE,testingfans);
    1734   // iiAddCproc("","testingvisuals",FALSE,testingvisuals);
    1735   // iiAddCproc("","testingstrings",FALSE,testingstrings);
    1736   // iiAddCproc("","testingmatrices",FALSE,testingmatrices);
    1737   // iiAddCproc("","loadPolymakeDocumentation",FALSE,loadPolymakeDocumentation);
     1801  p->iiAddCproc("polymake.so","vertexAdjacencyGraph",FALSE,PMvertexAdjacencyGraph);
     1802  p->iiAddCproc("polymake.so","vertexEdgeGraph",FALSE,PMvertexEdgeGraph);
    17381803
    17391804  blackbox* b=getBlackboxStuff(polytopeID);
  • dyn_modules/syzextra/Makefile.am

    r11ab4e r8b1af6  
    4040
    4141
    42 AM_LDFLAGS = ${GOOGLE_PERFTOOL_LDFLAGS} -release ${PACKAGE_VERSION}
     42AM_LDFLAGS = ${GOOGLE_PERFTOOL_LDFLAGS}
     43# -release ${PACKAGE_VERSION}
    4344
    4445# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
  • factory/COPYING

    r11ab4e r8b1af6  
    1                         SINGULAR version 3-1
     1                        SINGULAR version 4-0
    22                           Singular-Factory
    33
     
    99           G. Pfister, H. Schoenemann
    1010
    11                         Copyright (C) 1991-2011
     11                        Copyright (C) 1991-2013
    1212
    1313
  • factory/Makefile.am

    r11ab4e r8b1af6  
    2020# libfactory_la_CXXFLAGS   = -O3 -fomit-frame-pointer ${CXXTEMPLFLAGS}
    2121libfactory_la_LIBADD     = ${builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
    22 libfactory_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     22### libfactory_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    2323# libfactory_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${CXXTEMPLFLAGS}
    2424#libfactory_g_la_LIBADD   = ${builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
  • factory/README

    r11ab4e r8b1af6  
    11
    22
    3   --- This `README' file corresponds to Singular-Factory version 3.1 ---
     3  --- This `README' file corresponds to Singular-Factory version 4.0 ---
    44
    55
     
    17174.  Distribution
    18185.  Prerequisites
    19 6.  Memory Manager
    20 7.  Stream IO
    21 8.  Diagnostic Messages
    22 9.  GF(q) Tables
    23 10. A Note on Singular
    24 11. Configure Options, Dependencies
    25 12. Linking Factory with Your Application
    26 13. Factory Template Instantiation
    27 14. Documentation
    28 15. Examples and Tests
    29 16. Editing Factory
    30 17. Files in the Distribution
    31 
     196.  Stream IO
     207.  Diagnostic Messages
     218.  GF(q) Tables
     229.  A Note on Singular
     2311. Factory Template Instantiation
     2412. Documentation
     2513. Examples and Tests
    3226
    33271. What is Factory?
    3428===================
    3529  Factory is a C++ class library that implements a recursive representation
    36 of multivariate polynomial data.  It is being developed by Ruediger Stobbe
     30of multivariate polynomial data.  It was developed by Ruediger Stobbe
    3731and Jens Schmidt at the University of Kaiserslautern as an independent and
    3832self-contained part of the computer algebra system Singular (developed by
    39 G.-M. Greuel, G. Pfister and H. Schoenemann).
     33G.-M. Greuel, G. Pfister and H. Schoenemann) and is now developed by Martin Lee.
    4034
    4135  Factory handles sparse multivariate polynomials over different
     
    4337extensions over Q and GF(q) in an efficient way.  Factory includes
    4438algorithms for computing univariate and multivariate gcds, resultants,
    45 chinese remainders, and several algorithms to factorize univariate
    46 polynomials over the integers and over finite fields.  Factorization of
    47 multivariate polynomials over the integers is in beta test stage.
     39chinese remainders, and algorithms to factorize multivariate polynomials
     40and to compute the absolute factorization of multivariate polynomials with integer
     41coefficients.
    4842
    4943  The interface to the polynomial system of Factory is provided by a single
     
    5751  There are a couple of utility classes provided by Factory such as lists,
    5852arrays, polynomial maps, etc.  These make the usage more comfortable.
    59 
    60 
    6153
    62542. Comments, Questions, Bug Reports
     
    8678information, see the section "A Note on Singular".
    8779
    88   See the `INSTALL' file for instructions on how to install Factory.  The
    89 installation procedure on UNIX platforms conforms more or less to the GNU
     80  For further information on factory's configure options see also ./configure --help.
     81
     82  The installation procedure on UNIX platforms conforms more or less to the GNU
    9083standard:
    9184
    92   ./configure; make; make gftables; make install; make installgftables
    93 
    94 However, I recommend to read the instructions since there are a lot of
    95 non-standard options to configure.
    96 
    97   On platforms other than UNIX, where there is no `configure', you have to
    98 configure and install Factory by hand.  In particular, you have to
    99 create/edit the files `config.h', `factory.h', `factoryconf.h', and
    100 `GNUmakefile'.  For Microsoft Windows NT 4.0 with the Microsoft Visual C++
    101 5.0 compiler there is a preconfigured environment in the `winnt/' directory
    102 which you may use as an example.  For more information, confer to
    103 corresponding section in the `INSTALL' file and to the `INSTALL.nt' file in
    104 the `winnt/' directory.
     85  ./configure --without-Singular; make; make check; make install;
    10586
    10687  In general, this `README' as well as the `INSTALL' file are written for
     
    10990too.
    11091
    111 
    112 
    113924. Distribution
    11493===============
    115   The latest version of Factory is always available by anonymous ftp from
     94  The latest stable version of Factory is always available from
    11695
    117                 www.mathematik.uni-kl.de:/pub/Math/Singular/Factory
     96                www.singular.uni-kl.de
    11897
    119 The Factory distribution consists of three archives:
     98  For the latest development version visit
    12099
    121 o the Factory source code (`factory-<version>.tgz');
    122 o some preliminary documentation on Factory (`factory-doc-prelim.tgz');
    123 o Factory GF(q) addition tables (`factory-gftables.tgz', see below).
    124 
     100               www.github.com/Singular
    125101
    1261025. Prerequisites
    127103================
    128104  You need GNU make to build and install Factory.  Furthermore, I strongly
    129 recommend to build Factory with GNU CC (version 2.7 or newer).  To build
     105recommend to build Factory with GNU CC.  To build
    130106Factory and to link your programs with Factory you need the GNU Multiple
    131 Precision Library (GMP, version 2.0 or newer).  The GMP library is
    132 available at ftp.gnu.ai.mit.edu or its mirrors.  Alternatively, Factory may
    133 be linked with the so called small GMP library which comes with the full
    134 version of Singular (not recommended).
     107Precision Library (GMP).
    135108
    136109Configure options:
    137110------------------
    138   --with-gmp(=<gmp_inc_path>(,<gmp_lib_path>))
    139                           specify where to find the GMP library.
    140   --enable-gmp            together with `--with-Singular' means: installation
    141                           in process, be graceful when there is no `gmp.h'
     111  --with-gmp=<path to GMP> enabled by default
    142112
    143   If <gmp_lib_path> is not given, but <gmp_inc_path> is,
    144 `<gmp_inc_path>/../lib/' is used as <gmp_lib_path>.  If neither
    145 <gmp_lib_path> nor <gmp_inc_path> is specified, `configure' looks in the
    146 standard system locations for GMP.
    147 
    148   Furthermore, you may specify the symbolic directory `$(includedir)' for
    149 <gmp_inc_path>:
    150 
    151   --with-gmp='$(includedir)'
    152 
    153 Do not forget the single quotes or otherwise your shell might complain.
    154 
    155   This is useful when Factory is delivered as part of a larger package
    156 which also provides the GMP library.  In this case, at configuration time
    157 there would not be any `gmp.h'.  Without this option, Factory's `configure'
    158 script would exit with an error message.  If this symbolic directory is
    159 given, the `configure' script does not look for `gmp.h' and `libgmp.a'.
    160 Rather, it adds the option `-I$(includedir)' to its `$(CXXFLAGS)' and the
    161 option `-L$(libdir)' to its `$(LDFLAGS)' assuming that at compilation-time
    162 `gmp.h' and `libgmp.a' will reside in these directories.
    163   The option `--enable-gmp' does the same, but it is a special (and ugly)
    164 gift to Singular, so it may be used with option `--with-Singular' only.
    165 
    166 
    167 
    168 6. Memory Manager
    169 =================
    170   You can use one of the memory management tools provided with Factory.
    171 There are the "new" and the "old" memory manager.  In fact, on some systems
    172 the old memory management seems to be faster then the new one, but so far
    173 there have not been systematic timings.  If you configure Factory with
    174 `--with-memman=no' it will use the standard C++ operators `new'/`delete',
    175 which is not recommended.
    176   You may trace the actions (allocate/free) of the new memory manager by
    177 enabling memory management debugging.  This produces a *lot* of output.
     113  For full functionality NTL (www.shoup.net/ntl) is required.
    178114
    179115Configure options:
    180116------------------
    181   --with-memman(=<memman>) specify Factory memory manager.
    182                           <memman> is either `old' (default), `new', or `no'.
    183   --enable-memdebug=<level> switch on memory management debugging.  Meaningful
    184                           with `--with-memman=new' only.  <level> may be either
    185                           `no' (default), `normal', or `full'.
     117  --with-ntl=<path to NTL> enabled by default
    186118
     119  For optimal preformance we recommend to use FLINT (www.flintlib.org) and to use
     120  Singular's memory manager omalloc
    187121
    188 7. Stream IO
     122Configure options:
     123------------------
     124  --with-flint=<path to FLINT> enabled by default
     125  --with-omalloc               disabled by default
     126  --with-omalloc-dir=<path to omalloc>
     127
     1286. Stream IO
    189129============
    190130  For use with other systems which have their own IO routines to print
    191 polynomials it is possible to switch off Factory's stream IO.  In this
    192 case, you do not need to link libg++ or libiostream with Factory.
     131polynomials it is possible to switch off Factory's stream IO.
    193132
    194133Configure options:
     
    197136
    198137
    199 8. Diagnostic Messages
     1387. Diagnostic Messages
    200139======================
    201140Factory has three types of diagnostic messages:
     
    210149  Since all diagnostic messages are implemented using preprocessor macros,
    211150they will completely cease when disabled, thus avoiding any impact on
    212 speed.  For more information, see section "Configuring and building Factory
    213 for different configurations" in the `INSTALL' file.  By default, all
    214 diagnostic messages are disabled.
     151speed.  By default, all diagnostic messages are disabled.
    215152
    216153Configure options:
     
    220157  --enable-debugoutput    build Factory so it will print debugging information
    221158
    222 
    223 
    224 9. GF(q) Tables
     1598. GF(q) Tables
    225160===============
    226 
    227 NOTE: Since the format of the GF(q) tables changed from Factory Version
    228 1.2b to Factory Version 1.3a you should get/create them by new!
    229161
    230162  Factory uses addition tables to calculate in GF(p^n) in an efficient way.
    231163
    232 There are two possibilities to get these tables:
    233 o get them from the net (`factory-gftables.tgz') where you got Factory
    234   from.  The files unpack into a directory `gftables/'.
    235 o create them with `gengftables' which is a part of Factory.  Building
    236   the tables takes quite a while!
    237 See the `INSTALL' file for more information.
     164  They can be created with `make gengftables'.  Building the tables takes quite
     165   a while!
    238166
    239 
    240 10. A Note on Singular
     1679. A Note on Singular
    241168=====================
    242169  If you have received this Factory distribution together with Singular you
    243170do not have to worry about compilation or installation at all.  The
    244 installation procedure for Singular should do everything for you.  If you
    245 want to configure/build the package on your own instead of letting
    246 Singular's `configure' do the work you should:
     171installation procedure for Singular should do everything for you.
    247172
    248   ./configure --with-Singular --enable-gmp
    249         (or, equivalently: )
    250   ./configure --with-Singular --with-gmp='${includedir}'
    251 
    252   Furthermore, you should specify `--prefix' so `make install' will install
    253 the files in the places where Singular looks for them.  By default, this is
    254 the top directory of the Singular distribution.  In this case you have to
    255 specify `--prefix=..'.
    256 
    257   The Singular GF(q) tables are the same as the Factory GF(q) tables.
    258 However, Singular uses a different naming scheme.  Therefore, a Factory
    259 configured with `--without-Singular' will not find Singular's GF(q) tables
    260 as well as a Factory configured with `--with-Singular' will not find the
    261 GF(q) tables created by gengftables.  But this is not a major drawback
    262 since Singular is distributed with ready-to-use GF(q) tables.
    263 
    264   The latest version of Singular is always available at
    265 www.mathematik.uni-kl.de:/pub/Math/Singular.
    266 
    267 Configure options:
    268 ------------------
    269   --with-Singular         build for use with computer algebra system Singular.
    270 
    271   Except from setting the `#define SINGULAR', this option only changes the
    272 defaults to: `--with-memman=no --disable-streamio'.
    273 
    274 
    275 
    276 11. Configure Options, Dependencies
    277 ===================================
    278 o do not configure `--with-Singular --with-memman'.  In this case
    279   both Singular and the library will try to initialize their own memory
    280   management.
    281 
    282 o do not configure `--disable-streamio --enable-debugoutput'.  The
    283   "DEBOUT macros" need stream IO.
    284 
    285 o you may configure `--with-Singular --enable-streamio', but this
    286   is not supported by Singular.  You will have to change manually
    287   Singular's `Makefile'.  The same is true for `--with-Singular
    288   --enable-streamio --enable-debugoutput'.
    289 
    290 o you may configure `--with-Singular --enable-timing', but this
    291   will not have any visible effect (except from a slightly slower
    292   running time) because Singular will not print the timing
    293   results.
    294 
    295 o `--enable-gmp' has an effect only together with `--with-Singular'
    296 
    297 o `--with-memdebug' has an effect only together with
    298   `--with-memman=new'
    299 
    300 
    301 12. Linking Factory With Your Application
    302 =========================================
    303   To translate your application you need (apart from your
    304 application, of course):
    305 
    306 o the Factory user interface header file (`factory.h')
    307 
    308   To link your application with Factory you need:
    309 
    310 o the Factory library (`libcf.a')
    311 o unless you configured Factory `--without-memman' you need one of the
    312   Factory memory manager libraries (`libcfmem.a')
    313 
    314 o the instantiated Factory templates (`ftmpl_inst.o').
    315 
    316 o unless you configured Factory `--without-streamio' you need the stream IO
    317   libraries.  With GNU CC, you do not need to care about this because they
    318   are linked automatically to your application if you call the compiler
    319   either as `g++' or as `c++'.  Otherwise, you need to link with library
    320   `libiostream.a'.
    321 o The GNU Multiple Precision Library (`libgmp.a').  See section
    322   "Prerequisites" in this file for more information.
    323 o The standard mathematical library (`libm.a')
    324 
    325   `factory.h', `libcf.a', and `libcfmem.a' are created when you build
    326 Factory and installed by `make install'.  `libiostream.a', `libgmp.a', and
    327 `libm.a' should be already installed on your system, otherwise your
    328 application will fail to link.  `ftmpl_inst.o' is not installed by Factory.
    329 Instead, its source file `ftmpl_inst.cc' is installed and you have to build
    330 `ftmpl_inst.o' when you are building your application.  For more
    331 information on template instantiation and `ftmpl_inst.cc', see the
    332 following section "Factory Template Instantiation".
    333 
    334   To give an example, look at the following one-shot solution to the
    335 problem "linking Factory with your application" where the "application" is
    336 a small test program (`application.cc') from the subdirectory `examples/'
    337 of the Factory source directory ('\' at the end of a line denotes line
    338 continuation):
    339 
    340   g++ -c /usr/local/include/templates/ftmpl_inst.cc -fno-implicit-templates -O2 -fomit-frame-pointer -o ftmpl_inst.o
    341   g++ -c application.cc -fno-implicit-templates -O2 -fomit-frame-pointer ftmpl_inst.o -lcf -lcfmem -lm -lgmp
    342 
    343   This should work fine provided that you installed Factory in a location
    344 where `g++' may find it (here I have assumed `/usr/local/') and all the
    345 other files mentioned above are installed properly and where `g++' looks
    346 for them.
    347 
    348   You may find a small `GNUmakefile' which translates `application.cc' and
    349 other examples in the `examples/' subdirectory of the Factory source
    350 directory.  For more information, see the section "Examples and Tests".
    351 
    352 
    353 13. Factory Template Instantiation
     17310. Factory Template Instantiation
    354174==================================
    355175  There are a couple of classes provided by Factory such as lists, arrays,
     
    358178factorization (a list of factors), and you may use them to create new
    359179derived abstract data types.  These classes are realized using C++
    360 "templates", which you need to "instantiate" befor you use them (refer to
    361 some introduction to C++ if you do not know these terms).
     180templates, which are instantiated in one single file namely ftmpl_inst.cc .
    362181
    363   With GNU CC the most reliable way to instantiate templates is to
    364 
    365 o explicitely instantiate all necessary templates, and compile with option
    366   `-fno-implicit-templates' and to
    367 o collect all explicit template instantiations in one single file.
    368 
    369   This approach is the one Factory uses.  All object files of the library
    370 are generated with option `--fno-implicit-templates' and the explicit
    371 template instantiations are collected in `ftmpl_inst.cc'.  You could
    372 translate this file using the `make' target `ftmpl_inst.o' (see section
    373 "Building Factory" in the `INSTALL' file).
    374 
    375   The consequence of this approach: since you may want to add template
    376 instantiations of Factory's or your own templates after the installation of
    377 Factory, it is necessary to install `ftmpl_inst.cc' as well as the template
    378 source files together with the library.  They are automatically installed
    379 in `$(includedir)/templates/' when you type `make install'.
    380 
    381   To join your own template instantiations with the ones from
    382 `ftmpl_inst.cc' there are several possibilities:
    383 
    384 o you copy `ftmpl_inst.cc' file from the directory where it was installed
    385   into your working directory and add your template instantiations after
    386   the corresponig comment at the end of the file;
    387 o you cut the template instantiations from `ftmpl_inst.cc' and paste
    388   them into your own template instantiation file.
    389 
    390 Both methods suffer from one disadvantage: each time `ftmpl_inst.cc'
    391 changes in a new version of Factory you will have to redo these steps.  The
    392 best method therefore is maybe this one:
    393 
    394 o you write your own template instantiation file with a
    395   `#include <templates/ftmpl_inst.cc>' statement at the beginning of it.
    396 
    397 
    398 
    399 14. Documentation
     18211. Documentation
    400183=================
    401184  So far there are only preliminary versions of a user/reference manual and
     
    407190
    408191
    409 15. Examples and Tests
     19212. Examples and Tests
    410193======================
    411194  The directory `examples/' in the Factory source directory contains some
    412 example applications for Factory and a `GNUmakefile' to build them.  The
    413 main purpose of the examples is to show how to link applications with an
    414 installed version of Factory.  This means that you have to install Factory
    415 before you can build the examples (but it is not necessary to install the
    416 GF(q) tables).  For the same reason, the `GNUmakefile' is not configured
    417 automatically by `configure'.  You will have to change some of the
    418 variables manually.
     195example applications for Factory.
    419196
    420   Furthermore, you may have a look at `gengftables.cc' in the Factory
    421 source directory which is another application of the most basic Factory
    422 features.
     197  'make check' will run some simple test as well.
    423198
    424   To test whether Factory (including GF(q) tables) has been installed
    425 properly, use `make' target `installtest'.
    426 
    427 
    428 16. Editing Factory
    429 ===================
    430   Parts of Factory are written using GNU Emacs' `folding-mode'.  You may
    431 load this mode from Emacs with
    432 
    433   M-x load-file RET factory-<version>/bin/folding.el RET
    434 
    435 To switch it on, say `M-x folding-mode RET'.  Alternatively, you may load
    436 `factory-<version>/bin/fold-docu.el' which contains some additional functions
    437 to fold only the documentation.  If you add the following lines to your
    438 `.emacs' file, all this would be done automatically for you:
    439 
    440   (load-file "factory-<version>/bin/folding.el")
    441   (load-file "factory-<version>/bin/fold-docu.el")
    442   (add-hook 'c-mode-common-hook 'folding-mode)
    443   (setq fold-fold-on-startup nil
    444         fold-mode-marks-alist '((c++-mode "//{{{" "//}}}")))
    445   (set-default 'fold-internal-margins nil)
    446 
    447   For more information, see the respective files.
    448 
    449 
    450 
    451 17. Files in the Distribution
    452 =============================
    453 ChangeLog       - history of changes
    454 INSTALL         - installation instructions
    455 NEWS            - new Factory features
    456 README          - this file
    457 
    458 bin/install-sh  - a script version of the BSD `install' program
    459 bin/makeheader  - creates headers from header templates (`*.template')
    460 bin/mkinstalldirs - recursive `mkdir'
    461 bin/folding.el  - Emacs `folding-mode'
    462 bin/fold-docu.el - some extensions to it
    463 
    464 GNUmakefile.in  - master makefile and
    465 config.h.in     - configuration include file.  Run `configure' to create
    466                   `GNUmakefile' and `config.h', resp.
    467 configure
    468 configure.in    - `configure' script generated with Autoconf 2.10
    469                   from `configure.in'
    470 
    471 factory.template
    472 factoryconf.template - header templates for the user interface header
    473                   files.  Run `makeheader' to create `factory.h' and
    474                   `factoryconf.h', resp.
    475 
    476 ffops.cc
    477 ffops.h
    478 gf_tabutil.cc
    479 gf_tabutil.h
    480 gfops.cc
    481 gfops.h
    482 imm.h
    483 int_*.cc
    484 int_*.h         - low level classes and functions
    485 
    486 canonicalform.cc
    487 canonicalform.h
    488 cf_*.cc
    489 cf_*.h
    490 variable.cc
    491 variable.h      - high level classes and functions.  User interface to
    492                   the polynomial (and other) arithmetic.
    493 
    494 templates/      - Factory templates
    495 ftmpl_inst.cc   - template instantiation for Factory templates
    496 
    497 fac_*.cc
    498 fac_*.h         - high level algorithms (factorization, gcd, sqfr
    499                   computation, etc.)
    500 sm_*.c
    501 sm_*.h          - sparse modular gcd.  Contributed by Marion Bruder
    502                   <bruder@math.uni-sb.de>
    503 
    504 parseutil.cc
    505 parseutil.h
    506 readcf.cc
    507 readcf.y        - Factory parser to read canonical forms.  `readcf.cc'
    508                   translated with Bison 1.18 from `readcf.y'.
    509 
    510 gmpext.h
    511 initgmp.cc      - Factories interface to GNU MP
    512 singext.cc
    513 singext.h       - Factories interface to Singular
    514 
    515 NTLconvert.*    - some conversion routines for using NTL
    516 
    517 memutil.c
    518 memutil.h       - "old" Factory memory manager
    519 memman.h
    520 mm*.c
    521 mm*.h           - "new" Factory memory manager
    522 newdelete.cc    - C++ interface to the memory managers
    523 
    524 cf_assert.h     - the "ASSERT macros"
    525 debug.h
    526 debug.cc        - the "DEBOUT macros"
    527 timing.h        - the "TIMING macros"
    528 
    529 examples/       - some example applications for Factory and a `GNUmakefile'
    530                   to build them
    531 gengftables.cc  - run `gengftables' to create the GF(q) addition tables
    532                   necessary to work with Factory
    533 test_install.cc - a small program to test whether installation has
    534                   been successful.  Built and called by `make' target
    535                   `installtest'
  • factory/canonicalform.h

    r11ab4e r8b1af6  
    1818#endif /* NOSTREAMIO */
    1919
     20#include <stdint.h>
     21
    2022#include "cf_defs.h"
    2123#include "variable.h"
     
    5153{
    5254    // returns 0 if ptr is not immediate
    53     return ( ((int)((long)ptr)) & 3 );
     55    return ( ((int)((intptr_t)ptr)) & 3 );
    5456}
    5557
  • factory/factory.template

    r11ab4e r8b1af6  
    2222
    2323#include <factory/factoryconf.h>
     24#include <stdint.h>
    2425
    2526#ifndef NOSTREAMIO
  • factory/imm.h

    r11ab4e r8b1af6  
    33#ifndef INCL_IMM_H
    44#define INCL_IMM_H
     5
     6#include <stdint.h>
    57
    68// #include "config.h"
     
    5759inline long imm2int ( const InternalCF * const imm )
    5860{
    59     return ((long)imm) >> 2;
     61    return ((intptr_t)imm) >> 2;
    6062}
    6163
     
    7072{
    7173    // this could be better done by masking the sign bit
    72     if ( ((int)((long)imm)) < 0 )
    73         return -((-(long)imm) >> 2);
    74     else
    75         return (long)imm >> 2;
     74    if ( ((int)((intptr_t)imm)) < 0 )
     75        return -((-(intptr_t)imm) >> 2);
     76    else
     77        return (intptr_t)imm >> 2;
    7678}
    7779
     
    102104{
    103105    // returns 0 if ptr is not immediate
    104     return ( (long)ptr & 3 );
     106    return ( (intptr_t)ptr & 3 );
    105107}
    106108#endif
  • factory/singext.cc

    r11ab4e r8b1af6  
    6161{
    6262    InternalCF * ff = f.getval();
    63     return ((long)ff) >>2;
     63    return ((intptr_t)ff) >>2;
    6464}
    6565
  • gfanlib/configure.ac

    r11ab4e r8b1af6  
    3030AC_HEADER_STDC
    3131
    32 LB_CHECK_GMP(3.1.1,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     32LB_CHECK_GMP(4.0,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    3333SING_CHECK_GFANLIB
    3434
     
    3939#       exit 1
    4040# fi
    41 AC_CHECK_HEADERS([cdd/setoper.h setoper.h])
    42 if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no
     41AC_CHECK_HEADERS([cdd/setoper.h setoper.h cddlib/setoper.h])
     42if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no -a "$ac_cv_header_cddlib_setoper_h" == no
    4343then
    4444        AC_MSG_WARN([Error, setoper.h is missing!])
     
    4646
    4747# if setoper.h is there, assume that also cdd.h is there
    48 #AC_CHECK_HEADERS([cdd/cdd.h cdd.h],,,
    49 #[
    50 ## include <setoper.h>
    51 #])
    52 
    53 if test "$ac_cv_header_cdd_h" == no -a "$ac_cv_header_cdd_cdd_h" == no
    54 then
    55         AC_MSG_WARN([Error, cdd.h is missing!])
    56 fi
    5748
    5849if test "x$ENABLE_GFANLIB" = xyes; then
    59 if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no
     50if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no -a "$ac_cv_header_cddlib_setoper_h" == no
    6051then
    61         exit 1
    62 fi
    63 if test "$ac_cv_header_cdd_h" == no -a "$ac_cv_header_cdd_cdd_h" == no
    64 then
    65         exit 1
     52        exit 0
    6653fi
    6754fi
  • gfanlib/gfanlib_matrix.h

    r11ab4e r8b1af6  
    6969  void appendRow(Vector<typ> const &v)
    7070    {
    71       assert(v.size()==width);
     71      assert((int)v.size()==width);
    7272      rows.push_back(v);
    7373      height++;
     
    410410  {
    411411    assert(typ::isField());
    412     assert(v.size()==getWidth());
     412    assert((int)v.size()==getWidth());
    413413
    414414    int pivotI=-1;
  • gfanlib/gfanlib_polyhedralfan.cpp

    r11ab4e r8b1af6  
    352352
    353353      bool notAll=false;
    354       for(int j=0;j<theCone.indices.size();j++)
     354      for(unsigned j=0;j<theCone.indices.size();j++)
    355355        if(dot(rays[theCone.indices[j]],facetCandidates[i]).sign()==0)
    356356          indices.insert(theCone.indices[j]);
     
    395395void addFacesToSymmetricComplex(SymmetricComplex &c, ZCone const &cone, ZMatrix const &facetCandidates, ZMatrix const &generatorsOfLinealitySpace)
    396396{
    397   ZMatrix const &rays=c.getVertices();
     397  // ZMatrix const &rays=c.getVertices();
    398398  std::set<int> indices;
    399399
     
    502502}
    503503
    504 std::string PolyhedralFan::toString(int flags)const
     504std::string PolyhedralFan::toString(int /*flags*/)const
    505505//void PolyhedralFan::printWithIndices(class Printer *p, bool printMultiplicities, SymmetryGroup *sym, bool group, bool ignoreCones, bool xml, bool tPlaneSort, vector<string> const *comments)const
    506506{
  • gfanlib/gfanlib_polymakefile.cpp

    r11ab4e r8b1af6  
    5353  list<int> ret;
    5454  int c=s.peek();
    55   while((c>='0') && (c<='9')|| (c==' '))
     55  while(((c>='0') && (c<='9')) || (c==' '))
    5656    {
    5757      //      fprintf(Stderr,"?\n");
     
    6666namespace gfan{
    6767PolymakeProperty::PolymakeProperty(const std::string &name_, const std::string &value_):
    68   name(name_),
    69   value(value_)
     68  value(value_),
     69  name(name_)
    7070{
    7171}
     
    271271
    272272
    273 bool PolymakeFile::readBooleanProperty(const char *p)
     273bool PolymakeFile::readBooleanProperty(const char */*p*/)
    274274{
    275275  return false;
     
    277277
    278278
    279 void PolymakeFile::writeBooleanProperty(const char *p, bool n)
     279void PolymakeFile::writeBooleanProperty(const char */*p*/, bool /*n*/)
    280280{
    281281}
     
    322322  stringstream t;
    323323
    324   if(comments)assert(comments->size()>=m.getHeight());
     324  if(comments)assert((int)comments->size()>=m.getHeight());
    325325  if(isXml)
    326326    {
     
    389389    {
    390390      t<<"<incidence_matrix>";
    391       for(int i=0;i<m.size();i++)
     391      for(unsigned i=0;i<m.size();i++)
    392392        {
    393393          t<<"<set>";
     
    405405  else
    406406    {
    407       for(int i=0;i<m.size();i++)
     407      for(unsigned i=0;i<m.size();i++)
    408408        {
    409409          t<<'{';
     
    445445    {
    446446      t<<"<vector>";
    447       for(int i=0;i<v.size();i++)
     447      for(unsigned i=0;i<v.size();i++)
    448448        {
    449449          if(i!=0)t<<" ";
     
    454454  else
    455455    {
    456       for(int i=0;i<v.size();i++)
     456      for(unsigned i=0;i<v.size();i++)
    457457        {
    458458          if(i!=0)t<<" ";
  • gfanlib/gfanlib_q.h

    r11ab4e r8b1af6  
    1313#include "gmp.h"
    1414
     15#if (__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR<2)
     16extern void *  (*__gmp_allocate_func) _PROTO ((size_t));
     17extern void *  (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t));
     18extern void    (*__gmp_free_func) _PROTO ((void *, size_t));
     19
     20static inline void
     21mp_get_memory_functions (void *(**alloc_func) (size_t),
     22                         void *(**realloc_func) (void *, size_t, size_t),
     23                         void (**free_func) (void *, size_t))
     24{
     25  if (alloc_func != NULL)
     26    *alloc_func = __gmp_allocate_func;
     27
     28  if (realloc_func != NULL)
     29    *realloc_func = __gmp_reallocate_func;
     30
     31  if (free_func != NULL)
     32    *free_func = __gmp_free_func;
     33}
     34#endif
     35
    1536#include "gfanlib_z.h"
    1637
     
    156177    return mpq_sgn(value);
    157178  }
    158   static Rational gcd(Rational const &a, Rational const &b, Rational &s, Rational &t)
     179  static Rational gcd(Rational const &a, Rational const /*&b*/, Rational /*&s*/, Rational /*t*/)
    159180  {
    160181/*    mpz_t r;
  • gfanlib/gfanlib_symmetriccomplex.cpp

    r11ab4e r8b1af6  
    1515
    1616SymmetricComplex::Cone::Cone(std::set<int> const &indices_, int dimension_, Integer multiplicity_, bool sortWithSymmetry, SymmetricComplex const &complex):
     17  isKnownToBeNonMaximalFlag(false),
    1718  dimension(dimension_),
    1819  multiplicity(multiplicity_),
    19   isKnownToBeNonMaximalFlag(false),
    2020  sortKeyPermutation(complex.n)
    2121{
     
    2727  ZMatrix const &vertices=complex.getVertices();
    2828  ZVector sum(vertices.getWidth());
    29   for(int i=0;i<indices.size();i++)
     29  for(unsigned i=0;i<indices.size();i++)
    3030    sum+=vertices[indices[i]];
    3131
     
    5656  ZMatrix const &vertices=complex.getVertices();
    5757  ZVector sum(vertices.getWidth());
    58   for(int i=0;i<indices.size();i++)
     58  for(unsigned i=0;i<indices.size();i++)
    5959    sum+=vertices[indices[i]];
    6060
     
    6262  Permutation const &bestPermutation=sortKeyPermutation;
    6363
    64   assert(bestPermutation.size()==n);
     64  assert((int)bestPermutation.size()==n);
    6565
    6666  IntVector indicesNew(indices.size());
    6767  int I=0;
    68   for(int i=0;i<indices.size();i++,I++)
     68  for(unsigned i=0;i<indices.size();i++,I++)
    6969    {
    7070      ZVector ny=bestPermutation.apply(complex.vertices[indices[i]]);
     
    8080{
    8181  std::set<int> ret;
    82   for(int i=0;i<indices.size();i++)
     82  for(unsigned i=0;i<indices.size();i++)
    8383    ret.insert(indices[i]);
    8484
     
    8989{
    9090  int next=0;
    91   for(int i=0;i<indices.size();i++)
     91  for(unsigned i=0;i<indices.size();i++)
    9292    {
    9393      while(1)
    9494        {
    95           if(next>=c.indices.size())return false;
     95          if(next>=(int)c.indices.size())return false;
    9696          if(indices[i]==c.indices[next])break;
    9797          next++;
     
    105105{
    106106  std::set<int> r;
    107   for(int i=0;i<indices.size();i++)
     107  for(unsigned i=0;i<indices.size();i++)
    108108    {
    109109      ZVector ny=permutation.apply(complex.vertices[indices[i]]);
     
    139139{
    140140  ZMatrix l;
    141   for(int i=0;i<indices.size();i++)
     141  for(unsigned i=0;i<indices.size();i++)
    142142    l.appendRow(complex.vertices[indices[i]]);
    143143
     
    150150SymmetricComplex::SymmetricComplex(ZMatrix const &rays, ZMatrix const &linealitySpace_, SymmetryGroup const &sym_):
    151151  n(rays.getWidth()),
     152  linealitySpace(canonicalizeSubspace(linealitySpace_)),
    152153  sym(sym_),
    153   dimension(-1),
    154   linealitySpace(canonicalizeSubspace(linealitySpace_))
     154  dimension(-1)
    155155{
    156156  assert(rays.getWidth()==linealitySpace.getWidth());
     
    222222}
    223223
    224 /*
     224#if 0
    225225IntVector SymmetricComplex::dimensionsAtInfinity()const
    226226{
     
    228228     dimension of the intersection of each cone in the complex with
    229229     the plane x_0=0 */
    230 /*
    231230  IntVector ret(cones.size());
    232231
     
    247246  return ret;
    248247}
    249 */
     248#endif
    250249
    251250void SymmetricComplex::buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist/*, ZMatrix *multiplicities*/)const
     
    259258      int numberOfOrbitsOutput=0;
    260259      int numberOfOrbitsOfThisDimension=0;
    261       bool newDimension=true;
     260      // bool newDimension=true;
    262261        {
    263262          int I=0;
    264263          for(ConeContainer::const_iterator i=cones.begin();i!=cones.end();i++,I++)
    265                   if(i->dimension==d)
    266                     {
    267                   numberOfOrbitsOfThisDimension++;
     264            if(i->dimension==d)
     265            {
     266              numberOfOrbitsOfThisDimension++;
    268267              if(!onlyMaximal || isMaximal(*i))
    269268                {
    270269                  numberOfOrbitsOutput++;
    271                   bool isMax=isMaximal(*i);
    272                   bool newOrbit=true;
     270                  // bool isMax=isMaximal(*i);
     271                  // bool newOrbit=true;
    273272                  std::set<std::set<int> > temp;
    274                     for(SymmetryGroup::ElementContainer::const_iterator k=sym.elements.begin();k!=sym.elements.end();k++)
    275                       {
     273                  for(SymmetryGroup::ElementContainer::const_iterator k=sym.elements.begin();k!=sym.elements.end();k++)
     274                    {
    276275                        Cone temp1=i->permuted(*k,*this,false);
    277276                        temp.insert(temp1.indexSet());
     
    291290                          *multiplicities << std::endl;
    292291                        }*/
    293                       newOrbit=false;
    294                       newDimension=false;
     292                      // newOrbit=false;
     293                      // newDimension=false;
    295294                    }
    296               }
    297                     }
    298         }
    299     }
    300 
    301 }
    302 
    303 std::string SymmetricComplex::toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities, bool compressed, bool tPlaneSort)const
     295                }
     296            }
     297        }
     298    }
     299
     300}
     301
     302std::string SymmetricComplex::toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities, bool compressed, bool /*tPlaneSort*/)const
    304303{
    305304  std::stringstream ret;
     
    392391        {
    393392          bool isBounded=true;
    394           for(int j=0;j<i->indices.size();j++)
     393          for(unsigned j=0;j<i->indices.size();j++)
    395394            if(vertices[i->indices[j]][0].sign()==0)isBounded=false;
    396395          doAdd=isBounded;
     
    692691  {
    693692    ZMatrix generators(indices.size(),getAmbientDimension());
    694     for(int i=0;i<indices.size();i++)
     693    for(unsigned i=0;i<indices.size();i++)
    695694      generators[i]=vertices[indices[i]];
    696695    return ZCone::givenByRays(generators,linealitySpace);
  • gfanlib/gfanlib_symmetry.cpp

    r11ab4e r8b1af6  
    2525                TrieNode(IntVector const &v, int i)
    2626                {
    27                         if(i<v.size())
     27                  if(i<(int)v.size())
    2828                        m[v[i]]=TrieNode(v,i+1);
    2929                }
     
    3131                {
    3232                  int ret=0;
    33                   if(i==v.size())return 1;
     33                  if(i==(int)v.size())return 1;
    3434                  for(Map::const_iterator j=m.begin();j!=m.end();j++)
    3535                    {
     
    4141                void search(ZVector const &v, ZVector  &building, Permutation &tempPerm, Permutation &ret, ZVector &optimal, int i, bool &isImproving)const
    4242                {
    43                         if(i==v.size()){ret=tempPerm;optimal=building;isImproving=false;return;}
     43                  if(i==(int)v.size()){ret=tempPerm;optimal=building;isImproving=false;return;}
    4444                        if(isImproving)
    4545                                building[i]=-0x7fffffff;
     
    6161                void searchStabalizer(ZVector const &v, ZVector  &building, Permutation &tempPerm, Permutation &ret, ZVector &optimal, int i, bool &isImproving, ZVector const &toBeFixed)const
    6262                {
    63                         if(i==v.size())
     63                  if(i==(int)v.size())
    6464                                if(!(tempPerm.apply(v)<optimal))
    6565                                        {
     
    102102                void insert(Permutation const &v, int i)
    103103                {
    104                         if(i==v.size())return;
     104                  if(i==(int)v.size())return;
    105105                        if(m.count(v[i]))
    106106                                m[v[i]].insert(v,i+1);
     
    132132        int n;
    133133        Trie(int n_):
    134                 n(n_),
    135                 theTree(Permutation(n_),0)
     134                theTree(Permutation(n_),0),
     135                n(n_)
    136136        {
    137137        }
     
    276276  IntVector ret(size());
    277277  assert(size()==b.size());
    278   for(int i=0;i<size();i++)ret[i]=b[(*this)[i]];
     278  for(unsigned i=0;i<size();i++)ret[i]=b[(*this)[i]];
    279279  return Permutation(ret);
    280280}
     
    284284  IntVector ret(size());
    285285  assert(size()==b.size());
    286   for(int i=0;i<size();i++)ret[(*this)[i]]=b[i];
     286  for(unsigned i=0;i<size();i++)ret[(*this)[i]]=b[i];
    287287  return Permutation(ret);
    288288}
     
    292292  IntVector ret(size());
    293293  assert(size()==v.size());
    294   for(int i=0;i<size();i++)ret[i]=v[(*this)[i]];
     294  for(unsigned i=0;i<size();i++)ret[i]=v[(*this)[i]];
    295295  return ret;
    296296}
     
    300300  ZVector ret(size());
    301301  assert(size()==v.size());
    302   for(int i=0;i<size();i++)ret[i]=v[(*this)[i]];
     302  for(unsigned i=0;i<size();i++)ret[i]=v[(*this)[i]];
    303303  return ret;
    304304}
     
    309309  ZVector ret(size());
    310310  assert(size()==v.size());
    311   for(int i=0;i<size();i++)ret[(*this)[i]]=v[i];
     311  for(unsigned i=0;i<size();i++)ret[(*this)[i]]=v[i];
    312312  return ret;
    313313}
     
    431431ZVector Permutation::fundamentalDomainInequality()const
    432432{
    433   for(int i=0;i<size();i++)
    434     if((*this)[i]!=i)
     433  for(unsigned i=0;i<size();i++)
     434    if((*this)[i]!=(int)i)
    435435      return ZVector::standardVector(size(),i)-ZVector::standardVector(size(),(*this)[i]);
    436436  return ZVector(size());
  • gfanlib/gfanlib_vector.h

    r11ab4e r8b1af6  
    101101      if(size()<b.size())return true;
    102102      if(size()>b.size())return false;
    103       for(int i=0;i<size();i++)
     103      for(unsigned i=0;i<size();i++)
    104104        {
    105105          if(v[i]<b[i])return true;
     
    156156      return pq*pq==pp*qq;
    157157*/
    158           int n=p.size();
     158          unsigned n=p.size();
    159159          assert(n==q.size());
    160           int i;
     160          unsigned i;
    161161          for(i=0;i<n;i++)
    162162          {
     
    167167          typ a=p.v[i];
    168168          typ b=q.v[i];
    169           for(int j=0;j<n;j++)
     169          for(unsigned j=0;j<n;j++)
    170170            if(a*q.v[j]!=b*p.v[j])return false;
    171171          return true;
     
    175175  // Arithmetic slow
    176176  //-----------------
    177   inline friend Vector operator*(typ s, const Vector& q){Vector p=q;for(int i=0;i<q.size();i++)p[i]*=s;return p;}
     177  inline friend Vector operator*(typ s, const Vector& q){Vector p=q;for(unsigned i=0;i<q.size();i++)p[i]*=s;return p;}
    178178//  inline friend Vektor operator/(const Vektor& q, typ s){Vektor p=q;for(int i=0;i<q.size();i++)p[i]/=s;return p;}
    179179/*  inline friend Vector operator*(const Vektor& p, const Vektor& q){assert(p.size()==q.size());Vektor p1=p;for(int i=0;i<p.size();i++)p1.v[i]*=q.v[i];return p1;}
     
    181181*/
    182182  inline friend Vector operator/(const Vector& p, typ const &s){Vector ret(p.size());for(unsigned i=0;i<p.size();i++)ret[i]=p[i]/s;return ret;}
    183   inline friend Vector operator+(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(int i=0;i<p.size();i++)p1[i]+=q[i];return p1;}
    184   inline friend Vector operator-(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(int i=0;i<p.size();i++)p1[i]-=q[i];return p1;}
    185   inline friend Vector max(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(int i=0;i<p.size();i++)if(p1[i]<q[i])p1[i]=q[i];return p1;}
    186   inline friend Vector min(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(int i=0;i<p.size();i++)if(p1[i]>q[i])p1[i]=q[i];return p1;}
     183  inline friend Vector operator+(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(unsigned i=0;i<p.size();i++)p1[i]+=q[i];return p1;}
     184  inline friend Vector operator-(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(unsigned i=0;i<p.size();i++)p1[i]-=q[i];return p1;}
     185  inline friend Vector max(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(unsigned i=0;i<p.size();i++)if(p1[i]<q[i])p1[i]=q[i];return p1;}
     186  inline friend Vector min(const Vector& p, const Vector& q){assert(p.size()==q.size());Vector p1=p;for(unsigned i=0;i<p.size();i++)if(p1[i]>q[i])p1[i]=q[i];return p1;}
    187187
    188188  friend Vector operator-(const Vector &b)
    189189  {
    190190    Vector ret(b.size());
    191     for(int i=0;i<b.size();i++)ret[i]=-b[i];
     191    for(unsigned i=0;i<b.size();i++)ret[i]=-b[i];
    192192    return ret;
    193193  }
     
    226226    {
    227227      assert(begin>=0);
    228       assert(end<=size());
     228      assert(end<=(int)size());
    229229      assert(end>=begin);
    230230      Vector ret(end-begin);
     
    293293    typ temp1,temp2;
    294294    typ ret(1);
    295     for(int i=0;i<size();i++)
     295    for(unsigned i=0;i<size();i++)
    296296      ret=typ::gcd(ret,v[i],temp1,temp2);
    297297    return ret;
  • gfanlib/gfanlib_z.h

    r11ab4e r8b1af6  
    1515#if OLD
    1616#include "gmp.h"
     17
     18#if (__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR<2)
     19extern void *  (*__gmp_allocate_func) _PROTO ((size_t));
     20extern void *  (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t));
     21extern void    (*__gmp_free_func) _PROTO ((void *, size_t));
     22
     23static inline void
     24mp_get_memory_functions (void *(**alloc_func) (size_t),
     25                         void *(**realloc_func) (void *, size_t, size_t),
     26                         void (**free_func) (void *, size_t))
     27{
     28  if (alloc_func != NULL)
     29    *alloc_func = __gmp_allocate_func;
     30
     31  if (realloc_func != NULL)
     32    *realloc_func = __gmp_reallocate_func;
     33
     34  if (free_func != NULL)
     35    *free_func = __gmp_free_func;
     36}
     37#endif
    1738
    1839namespace gfan{
  • gfanlib/gfanlib_zcone.cpp

    r11ab4e r8b1af6  
    1717#include "cdd/setoper.h"
    1818#include "cdd/cdd.h"
     19#elif HAVE_CDDLIB_SETOPER_H
     20#include "cddlib/setoper.h"
     21#include "cddlib/cdd.h"
    1922#else
    2023#include "setoper.h"
     
    4447    dd_colrange d_input,j;
    4548    dd_RepresentationType rep=dd_Inequality;
    46     dd_boolean found=dd_FALSE, newformat=dd_FALSE, successful=dd_FALSE;
    47     char command[dd_linelenmax], comsave[dd_linelenmax];
     49    // dd_boolean found=dd_FALSE, newformat=dd_FALSE, successful=dd_FALSE;
     50    // char command[dd_linelenmax], comsave[dd_linelenmax];
    4851    dd_NumberType NT;
    4952
    5053    (*Error)=dd_NoError;
    5154
    52     rep=dd_Inequality; newformat=dd_TRUE;
     55    rep=dd_Inequality; // newformat=dd_TRUE;
    5356
    5457    m_input=g.getHeight();
     
    7073    }
    7174
    72     successful=dd_TRUE;
     75    // successful=dd_TRUE;
    7376
    7477    return M;
     
    108111  {
    109112    bool ret;
    110     dd_MatrixPtr M=NULL,M2=NULL,M3=NULL;
    111     dd_colrange d;
     113    dd_MatrixPtr M=NULL/*,M2=NULL,M3=NULL*/;
     114    // dd_colrange d;
    112115    dd_ErrorType err=dd_NoError;
    113     dd_rowset redrows,linrows,ignoredrows, basisrows;
    114     dd_colset ignoredcols, basiscols;
    115     dd_DataFileType inputfile;
    116     FILE *reading=NULL;
     116    // dd_rowset redrows,linrows,ignoredrows, basisrows;
     117    // dd_colset ignoredcols, basiscols;
     118    // dd_DataFileType inputfile;
     119    // FILE *reading=NULL;
    117120
    118121    cddinitGmp();
     
    121124    if (err!=dd_NoError) goto _L99;
    122125
    123     d=M->colsize;
     126    // d=M->colsize;
    124127
    125128    static dd_Arow temp;
     
    339342    if(numberOfRows==0)return;//the full space, so description is already irredundant
    340343
    341     dd_rowset r=NULL;
     344    // dd_rowset r=NULL;
    342345    ZMatrix g=inequalities;
    343346    g.append(equations);
    344347
    345     dd_LPSolverType solver=dd_DualSimplex;
     348    // dd_LPSolverType solver=dd_DualSimplex;
    346349    dd_MatrixPtr A=NULL;
    347350    dd_ErrorType err=dd_NoError;
     
    402405    int numberOfRows=numberOfEqualities+numberOfInequalities;
    403406
    404     dd_rowset r=NULL;
     407    // dd_rowset r=NULL;
    405408    ZMatrix g=inequalities;
    406409    g.append(equations);
     
    448451  void dual(ZMatrix const &inequalities, ZMatrix const &equations, ZMatrix &dualInequalities, ZMatrix &dualEquations)
    449452  {
    450     int result;
     453    // int result;
    451454
    452455    dd_MatrixPtr A=NULL;
     
    472475
    473476    return;
    474    _L99:
    475     assert(0);
     477   // _L99:
     478   // assert(0);
    476479  }
    477480  // this procedure is take from cddio.c.
     
    556559    int dim2=inequalities.getHeight();
    557560    if(dim2==0)return std::vector<std::vector<int> >();
    558     int dimension=inequalities.getWidth();
     561    // int dimension=inequalities.getWidth();
    559562
    560563    dd_MatrixPtr A=NULL;
     
    603606
    604607    return ret;
    605    _L99:
    606     assert(0);
    607     return std::vector<std::vector<int> >();
     608   // _L99:
     609   // assert(0);
     610   // return std::vector<std::vector<int> >();
    608611  }
    609612
     
    707710          inequalities=LpSolver::fastNormals(inequalities2);
    708711          goto noFallBack;
    709         fallBack://alternativ (disabled)
    710           lpSolver.removeRedundantRows(inequalities,equations,true);
     712        // fallBack://alternativ (disabled)
     713        //   lpSolver.removeRedundantRows(inequalities,equations,true);
    711714        noFallBack:;
    712715        }
     
    730733}
    731734
    732 std::ostream &operator<<(std::ostream &f, ZCone const &c)
     735void operator<<(std::ostream &f, ZCone const &c)
    733736{
    734737  f<<"Ambient dimension:"<<c.n<<std::endl;
     
    741744
    742745ZCone::ZCone(int ambientDimension):
     746  preassumptions(PCP_impliedEquationsKnown|PCP_facetsKnown),
     747  state(1),
     748  n(ambientDimension),
     749  multiplicity(1),
     750  linearForms(ZMatrix(0,ambientDimension)),
    743751  inequalities(ZMatrix(0,ambientDimension)),
    744752  equations(ZMatrix(0,ambientDimension)),
    745   n(ambientDimension),
    746   state(1),
    747   preassumptions(PCP_impliedEquationsKnown|PCP_facetsKnown),
     753  haveExtremeRaysBeenCached(false)
     754{
     755}
     756
     757
     758ZCone::ZCone(ZMatrix const &inequalities_, ZMatrix const &equations_, int preassumptions_):
     759  preassumptions(preassumptions_),
     760  state(0),
     761  n(inequalities_.getWidth()),
    748762  multiplicity(1),
    749   haveExtremeRaysBeenCached(false),
    750   linearForms(ZMatrix(0,ambientDimension))
    751 {
    752 }
    753 
    754 
    755 ZCone::ZCone(ZMatrix const &inequalities_, ZMatrix const &equations_, int preassumptions_):
     763  linearForms(ZMatrix(0,inequalities_.getWidth())),
    756764  inequalities(inequalities_),
    757765  equations(equations_),
    758   state(0),
    759   preassumptions(preassumptions_),
    760   multiplicity(1),
    761   haveExtremeRaysBeenCached(false),
    762   n(inequalities_.getWidth()),
    763   linearForms(ZMatrix(0,inequalities_.getWidth()))
     766  haveExtremeRaysBeenCached(false)
    764767  {
    765768  assert(preassumptions_<4);//OTHERWISE WE ARE DOING SOMETHING STUPID LIKE SPECIFYING AMBIENT DIMENSION
     
    10421045  std::vector<std::vector<int> > indices=lpSolver.extremeRaysInequalityIndices(inequalities);
    10431046
    1044   for(int i=0;i<indices.size();i++)
     1047  for(unsigned i=0;i<indices.size();i++)
    10451048    {
    10461049      /* At this point we know lineality space, implied equations and
     
    10821085
    10831086          std::vector<int> asVector(inequalities.getHeight());
    1084           for(int j=0;j<indices[i].size();j++){asVector[indices[i][j]]=1;}
     1087          for(unsigned j=0;j<indices[i].size();j++){asVector[indices[i][j]]=1;}
    10851088          ZMatrix equations=this->equations;
    10861089          ZVector theInequality;
    10871090
    1088           for(int j=0;j<asVector.size();j++)
     1091          for(unsigned j=0;j<asVector.size();j++)
    10891092            if(asVector[j])
    10901093              equations.appendRow(inequalities[j]);
     
    12291232ZCone ZCone::faceContaining(ZVector const &v)const
    12301233{
    1231   assert(n==v.size());
     1234  assert(n==(int)v.size());
    12321235  assert(contains(v));
    12331236  ZMatrix newEquations=equations;
  • gfanlib/gfanlib_zcone.h

    r11ab4e r8b1af6  
    352352     */
    353353   // PolyhedralCone projection(int newn)const;
    354     friend std::ostream &operator<<(std::ostream &f, ZCone const &c);
     354    friend void operator<<(std::ostream &f, ZCone const &c);
    355355};
    356356
  • gfanlib/gfanlib_zfan.cpp

    r11ab4e r8b1af6  
    1616  {
    1717    assert(dimension>=0);
    18     if(dimension>=T.size())return 0;
     18    if(dimension>=(int)T.size())return 0;
    1919    return T[dimension].size();
    2020  }
     
    162162
    163163//        log2 cerr<< "Number of orbits to expand "<<cones.size()<<endl;
    164         for(int i=0;i<cones.size();i++)
     164        for(unsigned i=0;i<cones.size();i++)
    165165        //  if(coneIndices==0 || coneIndices->count(i))
    166166            {
     
    202202  }
    203203  ZFan::ZFan(ZFan const& f):
     204    coneCollection(0),
    204205    complex(0),
    205     coneCollection(0),
    206206    cones(f.table(0,0)),
    207207    maximalCones(f.table(0,1)),
  • kernel/Makefile.am

    r11ab4e r8b1af6  
    3636# libkernel_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
    3737
    38 libkernel_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     38### libkernel_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    3939
    4040
  • kernel/structs.h

    r11ab4e r8b1af6  
    1010/* for omBin */
    1111#include <omalloc/omalloc.h>
    12 #include <misc/auxiliary.h>
    13 #include <kernel/polys.h>
    14 #include <polys/coeffrings.h>
    15 
    1612#ifdef HAVE_RINGS
    1713#include <coeffs/si_gmp.h>
     
    2925/* C++-part */
    3026#ifdef __cplusplus
     27#include <misc/auxiliary.h>
     28#include <kernel/polys.h>
     29#include <polys/coeffrings.h>
     30
    3131class sleftv;
    3232class procinfo;
     
    109109#endif
    110110
    111 class CGlobals
    112 {
    113  public:
    114  static inline const omBin& getCharPtrBin()
    115  {
    116   static omBin _char_ptr_bin = omGetSpecBin(sizeof(char*));
    117   return _char_ptr_bin;
    118  }
    119 };
    120 
    121 #define char_ptr_bin (CGlobals::getCharPtrBin())
    122 
     111extern omBin char_ptr_bin;
    123112
    124113#endif
  • libpolys/coeffs/Makefile.am

    r11ab4e r8b1af6  
    2727
    2828# libcoeffs_la_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H
    29 libcoeffs_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     29### libcoeffs_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    3030
    3131
  • libpolys/coeffs/modulop.cc

    r11ab4e r8b1af6  
    364364  }
    365365  if (n == 1)
    366     *a = (number)z;
     366    *a = (number)(long)z;
    367367  else
    368368  {
     
    372372#ifdef NV_OPS
    373373      if (r->ch>NV_MAX_PRIME)
    374         *a = nvDiv((number)z,(number)n,r);
     374        *a = nvDiv((number)(long)z,(number)(long)n,r);
    375375      else
    376376#endif
    377         *a = npDiv((number)z,(number)n,r);
     377        *a = npDiv((number)(long)z,(number)(long)n,r);
    378378    }
    379379  }
     
    617617  dest = res->z;
    618618
    619   int in=0;
     619  long in=0;
    620620  if (e<0)
    621621  {
  • libpolys/coeffs/rmodulo2m.cc

    r11ab4e r8b1af6  
    710710  }
    711711  if (n == 1)
    712     *a = (number)z;
    713   else
    714       *a = nr2mDiv((number)z,(number)n,r);
     712    *a = (number)(long)z;
     713  else
     714      *a = nr2mDiv((number)(long)z,(number)(long)n,r);
    715715  return s;
    716716}
  • libpolys/polys/Makefile.am

    r11ab4e r8b1af6  
    152152libpolys_la_CPPFLAGS = ${NODEBUGDEFS} ${AM_CPPFLAGS}
    153153
    154 libpolys_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     154### libpolys_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    155155
    156156
  • libpolys/polys/mod_raw.cc

    r11ab4e r8b1af6  
    1717#include <sys/stat.h>
    1818#include <errno.h>
     19#include <unistd.h>
    1920
    2021
     
    6162  void* handle = NULL;
    6263  char* binary_name_so=NULL;
    63 
    64   // try %b/MOD first
    65   {
    66     const char* bin_dir = feGetResource('b');
    67     const int binary_name_so_length = 6 + strlen(DL_TAIL)
    68                + strlen(binary_name)
    69                +strlen(DIR_SEPP)*2
    70                +strlen(bin_dir);
     64  BOOLEAN found=FALSE;
     65
     66  // try P_PROCS_DIR (%P)
     67  char* proc_path = feGetResource('P');
     68  if (proc_path != NULL)
     69  {
     70    char *p;
     71    char *q;
     72    p=proc_path;
     73    int binary_name_so_length = 3 + strlen(DL_TAIL) + strlen(binary_name) + strlen(DIR_SEPP) + strlen(proc_path);
    7174    binary_name_so = (char *)omAlloc0( binary_name_so_length * sizeof(char) );
    72     snprintf(binary_name_so, binary_name_so_length, "%s%s%s%s%s%s", bin_dir, DIR_SEPP,"MOD",DIR_SEPP,binary_name, DL_TAIL);
    73     handle = dynl_open(binary_name_so);
    74 
    75   }
    76 
    77   // try P_PROCS_DIR (%P)
    78   if (handle == NULL)
    79   {
    80     const char* proc_dir = feGetResource('P');
    81     if (proc_dir != NULL)
     75    while((p!=NULL)&&(*p!='\0'))
    8276    {
    83       if (binary_name_so!=NULL) omFree(binary_name_so);
    84       const int binary_name_so_length = 3 + strlen(DL_TAIL) + strlen(binary_name) + strlen(DIR_SEPP) + strlen(proc_dir);
    85       binary_name_so = (char *)omAlloc0( binary_name_so_length * sizeof(char) );
    86       snprintf(binary_name_so, binary_name_so_length, "%s%s%s%s", proc_dir, DIR_SEPP, binary_name, DL_TAIL);
    87       handle = dynl_open(binary_name_so);
     77      q=strchr(p,fePathSep);
     78      if (q!=NULL) *q='\0';
     79      strcpy(binary_name_so,p);
     80      if (q!=NULL) *q=fePathSep;
     81      strcat(binary_name_so,DIR_SEPP);
     82      strcat(binary_name_so,binary_name);
     83      strcat(binary_name_so,DL_TAIL);
     84      if(!access(binary_name_so, R_OK)) { found=TRUE; break; }
     85      if (q!=NULL) p=q+1; else p=NULL;
    8886    }
     87    if (found) handle = dynl_open(binary_name_so);
    8988  }
    9089
    9190  if (handle == NULL && ! warn_handle)
    9291  {
    93       Warn("Could not find dynamic library: %s%s (tried %s)",
    94               binary_name, DL_TAIL,binary_name_so);
    95       Warn("Error message from system: %s", dynl_error());
    96       if (msg != NULL) Warn("%s", msg);
    97       Warn("See the INSTALL section in the Singular manual for details.");
    98       warn_handle = TRUE;
     92    Warn("Could not find dynamic library: %s%s (path %s)",
     93            binary_name, DL_TAIL,proc_path);
     94    if (found) Warn("Error message from system: %s", dynl_error());
     95    if (msg != NULL) Warn("%s", msg);
     96    Warn("See the INSTALL section in the Singular manual for details.");
     97    warn_handle = TRUE;
    9998  }
    10099  omfree((ADDRESS)binary_name_so );
  • libpolys/polys/monomials/p_polys.cc

    r11ab4e r8b1af6  
    25182518  {
    25192519    p_Content(p,r);
    2520     assume( n_GreaterZero(pGetCoeff(p),C) );
    25212520    if(!n_GreaterZero(pGetCoeff(p),C)) p = p_Neg(p,r);
    25222521    return p;
     
    26272626  }
    26282627
    2629   assume( n_GreaterZero(pGetCoeff(p),C) );
    26302628  if(!n_GreaterZero(pGetCoeff(p),C)) p = p_Neg(p,r);
    26312629
  • libpolys/polys/monomials/ring.cc

    r11ab4e r8b1af6  
    5353
    5454omBin sip_sring_bin = omGetSpecBin(sizeof(ip_sring));
     55omBin char_ptr_bin =  omGetSpecBin(sizeof(char*));
     56
    5557
    5658static const char * const ringorder_name[] =
     
    729731char * rString(ring r)
    730732{
    731   char *ch=rCharStr(r);
    732   char *var=rVarStr(r);
    733   char *ord=rOrdStr(r);
    734   char *res=(char *)omAlloc(strlen(ch)+strlen(var)+strlen(ord)+9);
    735   sprintf(res,"(%s),(%s),(%s)",ch,var,ord);
    736   omFree((ADDRESS)ch);
    737   omFree((ADDRESS)var);
    738   omFree((ADDRESS)ord);
    739   return res;
     733  if (r!=NULL)
     734  {
     735    char *ch=rCharStr(r);
     736    char *var=rVarStr(r);
     737    char *ord=rOrdStr(r);
     738    char *res=(char *)omAlloc(strlen(ch)+strlen(var)+strlen(ord)+9);
     739    sprintf(res,"(%s),(%s),(%s)",ch,var,ord);
     740    omFree((ADDRESS)ch);
     741    omFree((ADDRESS)var);
     742    omFree((ADDRESS)ord);
     743    return res;
     744  }
     745  else
     746    return omStrDup("NULL");
    740747}
    741748
  • libpolys/reporter/Makefile.am

    r11ab4e r8b1af6  
    3232# libreporter_g_la_SOURCES = $(SOURCES)
    3333
    34 libreporter_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     34## libreporter_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    3535
    3636libreporter_includedir  =$(includedir)/singular/reporter
  • m4/flags.m4

    r11ab4e r8b1af6  
    8080# SING_SHOW_FLAGS([checking flags....])
    8181
    82  FLAGS="-pipe"
     82 FLAGS="-pipe -fno-common"
    8383 AC_LANG_PUSH([C])
    8484 AX_APPEND_COMPILE_FLAGS(${FLAGS}, [CFLAGS])
     
    8787 AC_LANG_PUSH([C++])
    8888 AX_APPEND_COMPILE_FLAGS(${FLAGS}, [CXXFLAGS])
     89 AX_APPEND_COMPILE_FLAGS([-fexceptions -frtti], [POLYMAKE_CXXFLAGS])
    8990 AC_LANG_POP([C++])
    9091
    9192 AX_APPEND_LINK_FLAGS(${FLAGS})
    92  
     93
     94 AC_SUBST(POLYMAKE_CXXFLAGS)
     95
    9396 if test "x${ENABLE_DEBUG}" == xyes; then
    94   DBGFLAGS="-g -O0 -ftrapv -fdiagnostics-show-option -Wall -Wextra"
     97  DBGFLAGS="-g -ftrapv -fdiagnostics-show-option -Wall -Wextra"
    9598  #  -pedantic too strict ??? -Wvla -Wno-long-long ???
    9699  AC_LANG_PUSH([C])
     
    121124 fi
    122125
    123 
    124126# SING_SHOW_FLAGS([before PROG_C_CC])
    125127
  • m4/gfanlib-check.m4

    r11ab4e r8b1af6  
    3333  [PASSED_ALL_TESTS_FOR_GFANLIB="yes"],
    3434  [AC_MSG_WARN([libcddgmp is not installed.])]
    35   [PASSED_ALL_TESTS_FOR_GFANLIB="no";
    36   exit 1]
     35  [PASSED_ALL_TESTS_FOR_GFANLIB="no"
     36  ]
     37)
     38fi
     39if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then
     40AC_LINK_IFELSE(
     41  [AC_LANG_PROGRAM([#include <cddlib/setoper.h>
     42  #include "cddlib/cdd.h"],
     43    [dd_set_global_constants()])],
     44  [LIBS="$SAVE_LIBS -lcddgmp"] [CDDGMPLDFLAGS="-lcddgmp"]
     45  [PASSED_ALL_TESTS_FOR_GFANLIB="yes"],
     46  [AC_MSG_WARN([libcddgmp is not installed.])]
     47  [PASSED_ALL_TESTS_FOR_GFANLIB="no"
     48  ]
    3749)
    3850fi
     
    4355fi
    4456
     57LIBS=$SAVE_LIBS
     58
    4559AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = xyes)
    4660
  • numeric/Makefile.am

    r11ab4e r8b1af6  
    3030# libnumeric_g_la_SOURCES = $(SOURCES)
    3131
    32 libnumeric_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     32### libnumeric_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    3333
    3434libnumeric_includedir  =$(includedir)/singular/numeric/
  • omalloc/Makefile.am

    r11ab4e r8b1af6  
    3939
    4040
    41 libomalloc_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     41# libomalloc_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    4242libomalloc_la_CFLAGS    = -O2
    4343
  • omalloc/configure.ac

    r11ab4e r8b1af6  
    166166BACKUP_CXXFLAGS=$CXXFLAGS
    167167BACKUP_LDFLAGS=$LDFLAGS
     168
    168169CFLAGS="$CFLAGS -I$srcdir"
    169170CXXFLAGS="$CXXFLAGS -I$srcdir"
     
    306307{
    307308  void* addr = OM_MALLOC_MALLOC(512);
     309#ifdef OM_MALLOC_SIZEOF_ADDR
    308310  if (OM_MALLOC_SIZEOF_ADDR(addr) < 512)
    309311    exit(1);
    310312  exit(0);
     313#else
     314  exit(1);
     315#endif
    311316}
    312317], ac_cv_malloc_sizeof_addr="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}", ac_cv_malloc_sizeof_addr=no, ac_cv_malloc_sizeof_addr=no)
     
    320325AC_DEFINE(OM_MALLOC_PROVIDES_SIZEOF_ADDR,1,"Whether malloc provides SIZEOF_ADDR")
    321326fi
    322 
    323 dnl Restore user-specified CFLAGS, CXXFLAGS, LIBS
    324 
    325 CFLAGS=$BACKUP_CFLAGS
    326 CXXFLAGS=$BACKUP_CXXFLAGS
    327 LDFLAGS=$BACKUP_LDFLAGS
    328327
    329328dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
     
    601600
    602601
     602dnl Restore user-specified CFLAGS, CXXFLAGS, LIBS
     603
     604CFLAGS=$BACKUP_CFLAGS
     605CXXFLAGS=$BACKUP_CXXFLAGS
     606LDFLAGS=$BACKUP_LDFLAGS
    603607
    604608dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
  • omalloc/omMallocSystem.h

    r11ab4e r8b1af6  
    1414#define OM_MALLOC_VALLOC   valloc
    1515#define OM_MALLOC_VFREE(addr, size) OM_MALLOC_FREE(addr)
     16/* the following will work under Mac OS X */
     17#define OM_MALLOC_SIZEOF_ADDR(addr)  (malloc_size(addr))
    1618
    1719#endif /* OM_MALLOC_SYSTEM_H */
  • omalloc/omRet2Info.c

    r11ab4e r8b1af6  
    99
    1010#ifdef HAVE_CONFIG_H
    11 #include <omalloc/omConfig.h>
     11#include "omConfig.h"
    1212#endif
    1313
    1414#ifndef OM_NDEBUG
    1515
    16 #include <omalloc/omDerivedConfig.h>
    17 #include <omalloc/omStructs.h>
    18 #include <omalloc/omRet2Info.h>
    19 #include <omalloc/omGetBackTrace.h>
     16#include "omDerivedConfig.h"
     17#include "omStructs.h"
     18#include "omRet2Info.h"
     19#include "omGetBackTrace.h"
    2020
    2121#ifndef MAXPATHLEN
  • resources/Makefile.am

    r11ab4e r8b1af6  
    3232# libresources_g_la_SOURCES = $(SOURCES)
    3333
    34 libresources_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     34### libresources_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    3535
    3636libresources_includedir  =$(includedir)/resources/
  • resources/configure.ac

    r11ab4e r8b1af6  
    4545# SING_CHECK_PIPE
    4646
     47##### SEE http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
     48
     49AX_RECURSIVE_EVAL([[$]prefix], [config_prefix])
     50AX_NORMALIZE_PATH([config_prefix],['/'])
     51AC_DEFINE_UNQUOTED([PREFIX],"$config_prefix",[prefix])
     52
     53AX_RECURSIVE_EVAL([[$]exec_prefix], [config_exec_prefix])
     54AX_NORMALIZE_PATH([config_exec_prefix],['/'])
     55AC_DEFINE_UNQUOTED([EXEC_PREFIX],"$config_exec_prefix",[exec_prefix])
     56
     57AX_RECURSIVE_EVAL([[$]libexecdir], [config_libexecdir])
     58AX_NORMALIZE_PATH([config_libexecdir],['/'])
     59AC_DEFINE_UNQUOTED([LIBEXEC_DIR],"$config_libexecdir",[libexecdir])
     60
     61AX_RECURSIVE_EVAL([[$]libdir], [config_libdir])
     62AX_NORMALIZE_PATH([config_libdir],['/'])
     63AC_DEFINE_UNQUOTED([LIB_DIR],"$config_libdir",[libdir])
     64
     65AX_RECURSIVE_EVAL([[$]bindir], [config_bindir])
     66AX_NORMALIZE_PATH([config_bindir],['/'])
     67AC_DEFINE_UNQUOTED([BIN_DIR],"$config_bindir",[bindir])
     68
     69AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
     70AX_NORMALIZE_PATH([config_datadir],['/'])
     71AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
     72
    4773AC_CONFIG_FILES([Makefile])
    4874AC_OUTPUT
  • resources/feResource.cc

    r11ab4e r8b1af6  
    4242// #define RESOURCE_DEBUG
    4343
    44 #define SINGULAR_DEFAULT_DIR "/usr/local/Singular/"
     44#define SINGULAR_DEFAULT_DIR PREFIX
    4545
    4646/*****************************************************************
     
    6363   "%r/share/singular/LIB;"
    6464   "%b/../share/singular/LIB;"
     65   // gftables:
    6566   "%D/factory;"
    6667   "%r/share/factory;"
    67    "%b/../share/factory;"
    68    "%r/libexec/singular/MOD;"
    69    "%b/../libexec/singular/MOD;"
    7068   "%b/LIB;"
    71    "%r/LIB;"
    72    "%d/LIB;"
     69   "%b/../factory;"
     70   // path for dynamic modules, should match ProcDir:
    7371   "%b/MOD;"
    74    "%r/MOD;"
    75    "%d/MOD;"
    76    "%b;"
    77    "%b/../factory;"
    78    "%b/../../factory",
    79    ""},
     72   LIBEXEC_DIR "/singular/MOD;"
     73   "%b",
     74   (char *)""},
    8075  {"Singular",  'S',    feResBinary,"SINGULAR_EXECUTABLE",  "%d/Singular",          (char *)""},
    8176  {"BinDir",    'b',    feResDir,   "SINGULAR_BIN_DIR",     "",                  (char *)""},
    82   // should be changed to %b/../libexec/singular/pProcs/:
    83   {"ProcDir",   'P',    feResDir,   "SINGULAR_PROCS_DIR",   "%r/libexec/singular/MOD/",                  (char *)""},
     77  // should be changed to %b/../lib/singular/pProcs/:
     78  {"ProcDir",   'P',    feResPath,  "SINGULAR_PROCS_DIR",
     79     "%b/MOD;"
     80     LIBEXEC_DIR "/singular/MOD;"
     81     "%r/libexec/singular/MOD",                  (char *)""},
    8482  {"RootDir",   'r',    feResDir,   "SINGULAR_ROOT_DIR",    "%b/..",                (char *)""},
    8583  {"DataDir",   'D',    feResDir,   "SINGULAR_DATA_DIR",    "%b/../share/",          (char *)""},
     
    188186  // don't complain about stuff when initializing SingularPath
    189187  feResource('s',0);
     188  feResource('P');
    190189
    191190#if defined(HAVE_SETENV) || defined(HAVE_PUTENV)
  • xalloc/Makefile.am

    r11ab4e r8b1af6  
    2424#libomalloc_g_la_SOURCES=$(SOURCES)
    2525
    26 libomalloc_la_LDFLAGS  = -release ${PACKAGE_VERSION}
     26### libomalloc_la_LDFLAGS  = -release ${PACKAGE_VERSION}
    2727
    2828#libomalloc_la_CFLAGS           = -O3 ${PIPE}
Note: See TracChangeset for help on using the changeset viewer.