Changeset 2ac2935 in git


Ignore:
Timestamp:
Dec 7, 2012, 3:41:00 PM (10 years ago)
Author:
Alexander Dreyer <adreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
ec1006cbd9971c4271d05aefada775ef29d762a6
Parents:
7e18d198148353f88708cfa20f738ac338cb1f556554ca42ebe1277c9afe7990970390905a6e1cf0
Message:
Merge conflict resolved
Files:
1 added
37 edited

Legend:

Unmodified
Added
Removed
  • .gdbinit

    r7e18d1 r2ac2935  
    66### http://sourceware.org/gdb/onlinedocs/gdb/Define.html#Define
    77
    8 # print poly
     8# print poly ring
    99define pp
     10  if $argc > 0
     11    print $arg0
     12    if $arg0 != 0
     13      print *$arg0
    1014
    11 if $argc > 0
    12   print $arg0
    13   if $arg0 != 0
    14     print *$arg0
    15 
    16 if $argc == 2
    17   call p_Write($arg0, $arg1)
    18 end
     15      if $argc == 2
     16        call p_Write($arg0, $arg1)
     17      else
     18        call p_Write($arg0, currRing)
     19      end
     20    end
    1921  end
    2022end
    21 
    22 
    23 end
    2423     
     24run
     25backtrace
  • IntegerProgramming/binomial.cc

    r7e18d1 r2ac2935  
    18471847
    18481848  exponent_vector[i]*=-1;
    1849 
     1849  return *this;
    18501850}
    18511851
  • Makefile.am

    r6554ca4 r2ac2935  
    3737
    3838bin_SCRIPTS = libsingular-config
     39
  • Singular/Makefile.am

    r7e18d1 r2ac2935  
    208208endif
    209209
    210 AMLDFLAGS = -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel -L${abs_top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
     210AMLDFLAGS = -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel -L${top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
    211211
    212212Singular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
     
    222222Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
    223223
    224 Singular_LDADD = libSingular.la ${abs_top_builddir}/numeric/libnumeric.la ${abs_top_builddir}/kernel/libkernel.la ${abs_top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    225 Singularg_LDADD = libSingular_g.la ${abs_top_builddir}/numeric/libnumeric_g.la ${abs_top_builddir}/kernel/libkernel_g.la ${abs_top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
     224Singular_LDADD = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la ${top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
     225Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top_builddir}/kernel/libkernel_g.la ${top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
    226226
    227227Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
     
    311311########################### TEST #########################
    312312
    313 TESTS_ENVIRONMENT = SINGULARPATH='${abs_top_builddir}/Singular/LIB:${abs_top_srcdir}/Singular/LIB:${abs_top_builddir}/libpolys/polys/.libs:${abs_top_builddir}/factory/gftables'
    314 TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${abs_top_builddir}'
     313TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables'
     314TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}'
    315315
    316316if WANT_DEBUG
     
    371371
    372372feOpt.inc: feOptGen
    373         ${abs_builddir}/feOptGen
     373        ${builddir}/feOptGen
    374374
    375375feOptES.inc: feOptES
    376         ${abs_builddir}/feOptES
     376        ${builddir}/feOptES
    377377
    378378feOptTS.inc: feOptTS
    379         ${abs_builddir}/feOptTS
     379        ${builddir}/feOptTS
    380380
    381381plural_cmd.inc iparith.inc: gentable1
    382         ${abs_builddir}/gentable1
     382        ${builddir}/gentable1
    383383
    384384# # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
     
    386386
    387387
    388 gftables: ${abs_top_srcdir}/factory/gftables
    389         ln -snf ${abs_top_srcdir}/factory/gftables ${abs_builddir}/gftables
    390 
    391 MOD: ${abs_top_builddir}/libpolys/polys/.libs
    392         ln -snf ${abs_top_builddir}/libpolys/polys/.libs/ ${abs_builddir}/MOD
    393 
     388gftables: ${top_srcdir}/factory/gftables
     389        ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables
     390
     391MOD: ${top_builddir}/libpolys/polys/.libs
     392        ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD
    394393
    395394if PYTHON_USE
  • Singular/Minor.cc

    r7e18d1 r2ac2935  
    147147  /* We should never reach this line of code. */
    148148  assume(false);
     149  return -1;
    149150}
    150151
     
    178179  /* We should never reach this line of code. */
    179180  assume(false);
     181  return -1;
    180182}
    181183
     
    251253  /* We should never reach this line of code. */
    252254  assume(false);
     255  return -1;
    253256}
    254257
     
    282285  /* We should never reach this line of code. */
    283286  assume(false);
     287  return -1;
    284288}
    285289
  • Singular/blackbox.h

    r6554ca4 r2ac2935  
    5858
    5959/// default procedure blackboxDefaultOp3, to be called as "default:" branch
    60 BOOLEAN blackboxDefaultOp3(int op,leftv l, leftv r1,leftv r2, leftv r3);
     60BOOLEAN blackbox_default_Op3(int op,leftv l, leftv r1,leftv r2, leftv r3);
    6161
    6262/// default procedure blackboxDefaultOpM, to be called as "default:" branch
     
    7070/// return the name to the type given by t (r/o)
    7171const char *    getBlackboxName(const int t);
    72 /// used by scanner: returns ROOTDECL for known types (and the type number in t)
     72/// used by scanner: returns ROOT_DECL for known types
     73/// (and the type number in @c tok)
    7374int blackboxIsCmd(const char *n, int & tok);
    7475/// define a new type
  • Singular/extra.cc

    r7e18d1 r2ac2935  
    31803180        {
    31813181          if(strcmp(sys_cmd, "AltVarStart") == 0)
    3182             res->data = (void*)scaFirstAltVar(r);
     3182            res->data = (void*)(long)scaFirstAltVar(r);
    31833183          else
    3184             res->data = (void*)scaLastAltVar(r);
     3184            res->data = (void*)(long)scaLastAltVar(r);
    31853185          return FALSE;
    31863186        }
  • Singular/iparith.cc

    r6554ca4 r2ac2935  
    52065206  }
    52075207  return TRUE;
     5208}
     5209
     5210BOOLEAN jjLOADLIB(const char* libname, BOOLEAN autoexport)
     5211{
     5212  leftv v =  (leftv)omAlloc0Bin(sleftv_bin);
     5213  v->data = (char*)libname;
     5214  v->rtyp = STRING_CMD;
     5215  BOOLEAN res = jjLOAD(NULL, v, autoexport);
     5216  omFreeBin(v, sleftv_bin);
     5217
     5218  return res;
    52085219}
    52095220
  • Singular/ipid.cc

    r6554ca4 r2ac2935  
    194194  IDLEV(h)  = level;
    195195  IDNEXT(h) = this;
     196  BOOLEAN at_start=(this==IDROOT);
    196197  h->id_i=iiS2I(s);
    197198  if (init)
     
    221222  }
    222223  // --------------------------------------------------------
     224  if (at_start)
     225    IDNEXT(h) = IDROOT;
    223226  return  h;
    224227}
  • Singular/links/ndbm.cc

    r7e18d1 r2ac2935  
    291291#endif
    292292    }
    293     if (((short *)db->dbm_pagbuf)[0] != 0)
     293    short tmp;
     294    memcpy(&tmp, db->dbm_pagbuf, sizeof(short));
     295    if (tmp != 0)
    294296    {
    295297      item = makdatum(db->dbm_pagbuf, db->dbm_keyptr);
  • Singular/minpoly.cc

    r7e18d1 r2ac2935  
    77
    88#include<cmath>
     9#include <cstdlib>
    910#include "config.h"
    1011#include<kernel/mod2.h>
     
    385386    }
    386387  }
     388  abort();
    387389}
    388390
  • Singular/misc_ip.cc

    r7e18d1 r2ac2935  
    11171117    type = nRegister(n_transExt, ntInitChar);
    11181118    assume(type == n_transExt);
     1119     
     1120    (void)type;
    11191121  }
    11201122#endif
  • Singular/pyobject.cc

    r6554ca4 r2ac2935  
    1515#include "config.h"
    1616#include <kernel/mod2.h>
     17  //#include <misc/auxiliary.h>
     18  //#include "newstruct.h"
     19
     20#include <Python.h>
     21
     22#include <Singular/ipid.h>
     23#include <Singular/blackbox.h>
     24#include <Singular/lists.h>
     25#include <Singular/ipid.h>
     26#include <Singular/ipshell.h>
     27#include <Singular/newstruct.h>
     28
     29
    1730#include <misc/auxiliary.h>
    18 #include "newstruct.h"
    1931
    2032#include <omalloc/omalloc.h>
    2133
    2234#include <kernel/febase.h>
    23 #include <kernel/intvec.h>
     35#include <misc/intvec.h>
    2436
    2537#include "subexpr.h"
     
    2739#include "ipid.h"
    2840#include "blackbox.h"
    29 
    30 #include <Python.h>
     41#include "ipshell.h"
     42
     43
     44
     45
     46  //#include <Python.h>
    3147// #include <iterator>             // std::distance
    3248// #include <stdio.h>
     
    4864  /// Initialize unique (singleton) python interpreter instance,
    4965  /// and set Singular type identifier
    50   static void init(id_type num ) { instance().m_id = num; }
     66  static void init(id_type num) { instance().m_id = num; }
    5167
    5268  /// Get Singular type identitfier
     
    587603    return FALSE;
    588604
    589   return blackboxDefaultOp3(op, res, arg1, arg2, arg3);
     605  return blackbox_default_Op3(op, res, arg1, arg2, arg3);
    590606}
    591607
     
    686702
    687703
    688 // forward declaration
    689 int iiAddCproc(char *libname, char *procname, BOOLEAN pstatic,
    690                BOOLEAN(*func)(leftv res, leftv v));
    691 
    692 #define ADD_C_PROC(name) iiAddCproc("", (char*)#name, FALSE, name);
    693 
    694 
    695 void pyobject_init()
    696 {
    697   blackbox *b = (blackbox*)omAlloc0(sizeof(blackbox));
    698   b->blackbox_destroy = pyobject_destroy;
    699   b->blackbox_String  = pyobject_String;
    700   b->blackbox_Init    = pyobject_Init;
    701   b->blackbox_Copy    = pyobject_Copy;
    702   b->blackbox_Assign  = pyobject_Assign;
    703   b->blackbox_Op1     = pyobject_Op1;
    704   b->blackbox_Op2     = pyobject_Op2;
    705   b->blackbox_Op3     = pyobject_Op3;
    706   b->blackbox_OpM     = pyobject_OpM;
    707   b->data             = omAlloc0(newstruct_desc_size());
    708 
    709   PythonInterpreter::init(setBlackboxStuff(b,"pyobject"));
    710 
    711   ADD_C_PROC(python_import);
    712   ADD_C_PROC(python_eval);
    713   ADD_C_PROC(python_run);
    714 }
    715 
    716 extern "C" { void mod_init() { pyobject_init(); } }
    717 
     704
     705blackbox* pyobject_blackbox(int& tok) {
     706  if(blackboxIsCmd("pyobject", tok) != ROOT_DECL)
     707  {
     708    tok = setBlackboxStuff((blackbox*)omAlloc0(sizeof(blackbox)),
     709                           "pyobject");
     710  }
     711  return getBlackboxStuff(tok);
     712}
     713
     714
     715
     716#define PYOBJECT_ADD_C_PROC(name) \
     717  add_C_proc(currPack->libname, (char*)#name, FALSE, name);
     718
     719typedef  BOOLEAN (*func_type)(leftv, leftv);
     720void pyobject_init(int (*add_C_proc)(const char*, const char*, BOOLEAN,
     721                                     func_type) )
     722{
     723  int tok = -1;
     724  blackbox* bbx = pyobject_blackbox(tok);
     725  if (bbx->blackbox_Init != pyobject_Init)
     726  {
     727    bbx->blackbox_destroy = pyobject_destroy;
     728    bbx->blackbox_String  = pyobject_String;
     729    bbx->blackbox_Init    = pyobject_Init;
     730    bbx->blackbox_Copy    = pyobject_Copy;
     731    bbx->blackbox_Assign  = pyobject_Assign;
     732    bbx->blackbox_Op1     = pyobject_Op1;
     733    bbx->blackbox_Op2     = pyobject_Op2;
     734    bbx->blackbox_Op3     = pyobject_Op3;
     735    bbx->blackbox_OpM     = pyobject_OpM;
     736    bbx->data             = omAlloc0(newstruct_desc_size());
     737   
     738    PythonInterpreter::init(tok);
     739
     740    PYOBJECT_ADD_C_PROC(python_import);
     741    PYOBJECT_ADD_C_PROC(python_eval);
     742    PYOBJECT_ADD_C_PROC(python_run);
     743  }
     744}
     745#undef PYOBJECT_ADD_C_PROC
     746
     747#ifndef EMBED_PYTHON
     748extern "C" {
     749  void mod_init(SModulFunctions* psModulFunctions)
     750  {
     751    pyobject_init(psModulFunctions->iiAddCproc);
     752  }
     753}
     754#endif
  • Singular/pyobject_setup.cc

    r6554ca4 r2ac2935  
    1616#include <kernel/mod2.h>
    1717#include <kernel/febase.h>
     18#include <Singular/blackbox.h>
     19#include <Singular/ipshell.h>
    1820
    1921/* whether pyobject module is linked statically or dynamically */
     22
     23#ifdef EMBED_PYTHON // Case: we include the pyobject interface in the binary
     24
    2025#ifdef HAVE_PYTHON
     26#include "pyobject.cc"
     27static BOOLEAN pyobject_load()
     28{
     29   pyobject_init(iiAddCproc);
     30   return FALSE;
     31}
    2132
    22   #if defined(HAVE_STATIC)
    23     #ifdef HAVE_STATIC_PYTHON
    24       #define HAVE_STATIC_PYOBJECT
    25     #endif
    26   #else
    27     #ifdef EMBED_PYTHON
    28       #define HAVE_STATIC_PYOBJECT
    29     #else
    30       #define HAVE_DYNAMIC_PYOBJECT
    31     #endif
    32   #endif
     33#else // Forced embedding, but no (development version of) python available!
     34static BOOLEAN pyobject_load() { return TRUE; }
    3335#endif
    3436
    35 # ifdef HAVE_STATIC_PYOBJECT // Case: link pyobject interface statically
    36 #include "pyobject.cc"
    37 void pyobject_setup() { pyobject_init(); }
     37
     38# else // Case: pyobject may be loaded from a dynamic module (prefered variant)
     39// Note: we do not need python at compile time.
     40static BOOLEAN pyobject_load()
     41{
     42  BOOLEAN jjLOADLIB(const char* libname, BOOLEAN autoexport);
     43  return jjLOADLIB("pyobject.so", TRUE);
     44}
     45#endif
    3846
    3947
    40 # elif defined(HAVE_DYNAMIC_PYOBJECT) // Case: pyobject is dynamic module (prefered variant)
    4148
    42 // forward declaration for Singular/iplib.cc
    43 void* binary_module_function(const char* lib, const char* func);
    44 void pyobject_setup()
     49/// blackbox support - initialization via autoloading
     50void* pyobject_autoload(blackbox* bbx)
    4551{
    46   void* fktn = binary_module_function("pyobject", "mod_init");
    47   if (fktn) (* reinterpret_cast<void (*)()>(fktn) )();
    48   else Werror("python related functions are not available");
     52  if (pyobject_load()) return NULL;
     53  return bbx->blackbox_Init(bbx);
    4954}
    5055
    51 #else                // Case: no python
    52 void pyobject_setup() { }
     56void pyobject_default_destroy(blackbox  *b, void *d)
     57{
     58  Werror("Python-based functionality not available!");
     59}
    5360
    54 #endif  // HAVE_PYTHON
     61// Setting up an empty blackbox type, which can be filled with pyobject
     62void pyobject_setup()
     63{
     64  blackbox *bbx = (blackbox*)omAlloc0(sizeof(blackbox));
     65  bbx->blackbox_Init = pyobject_autoload;
     66  bbx->blackbox_destroy = pyobject_default_destroy;
     67  setBlackboxStuff(bbx, "pyobject");
     68}
    5569
  • Singular/tesths.cc

    r6554ca4 r2ac2935  
    4343#include "fegetopt.h"
    4444
    45 // #include "pyobject_setup.h"
     45#include "pyobject_setup.h"
    4646
    4747#include <unistd.h>
  • configure.ac

    r7e18d1 r2ac2935  
    1313AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
    1414m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
     15m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    1516
    1617
  • dyn_modules/bigintm/Makefile.am

    r7e18d1 r2ac2935  
    3131
    3232AMLDFLAGS       =
    33 # -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel \
    34 # -L${abs_top_builddir}/libpolys/polys $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
     33# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
     34# -L${top_builddir}/libpolys/polys $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
    3535
    3636
  • dyn_modules/syzextra/Makefile.am

    r7e18d1 r2ac2935  
    3131
    3232AMLDFLAGS       =
    33 # -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel \
    34 # -L${abs_top_builddir}/libpolys/polys $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
     33# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
     34# -L${top_builddir}/libpolys/polys $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
    3535
    3636
  • dyn_modules/syzextra/mod_main.cc

    r7e18d1 r2ac2935  
    934934 
    935935  NoReturn(res);
     936  return false;
    936937}
    937938
  • factory/Makefile.am

    r7e18d1 r2ac2935  
    1818
    1919libfactory_la_CXXFLAGS   = -O3 -fomit-frame-pointer ${CXXTEMPLFLAGS}
    20 libfactory_la_LIBADD     = ${abs_builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
     20libfactory_la_LIBADD     = ${builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
    2121libfactory_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    2222libfactory_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${CXXTEMPLFLAGS}
    23 libfactory_g_la_LIBADD   = ${abs_builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
     23libfactory_g_la_LIBADD   = ${builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
    2424libfactory_g_la_LDFLAGS  = -release ${PACKAGE_VERSION}
    2525
     
    304304check_PROGRAMS = $(TESTS)
    305305
    306 AMLDFLAGS =  -L${abs_builddir}
     306AMLDFLAGS =  -L${builddir}
    307307
    308308TESTSSOURCES = test.cc
  • factory/configure.ac

    r7e18d1 r2ac2935  
    2222AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
    2323m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
     24m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    2425
    2526
  • factory/facFqBivar.cc

    r7e18d1 r2ac2935  
    63646364  {
    63656365#ifdef HAVE_FLINT
    6366     nmod_mat_clear (FLINTN);
     6366    if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6367      nmod_mat_clear (FLINTN);
    63676368#endif
    63686369    delete [] bounds;
     
    63796380  {
    63806381#ifdef HAVE_FLINT
    6381     nmod_mat_clear (FLINTN);
     6382    if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6383      nmod_mat_clear (FLINTN);
    63826384#endif
    63836385    delete [] bounds;
     
    64276429      if (result.length() == nmod_mat_ncols (FLINTN))
    64286430      {
    6429         nmod_mat_clear (FLINTN);
     6431        if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6432          nmod_mat_clear (FLINTN);
    64306433#else
    64316434      if (result.length() == NTLN.NumCols())
     
    64416444      if (result.length() == NTLNe.NumCols())
    64426445      {
    6443 #ifdef HAVE_FLINT
    6444         nmod_mat_clear (FLINTN);
    6445 #endif
    64466446        delete [] factorsFoundIndex;
    64476447        delete [] bounds;
     
    65046504      if (result.length() == NTLNe.NumCols())
    65056505      {
    6506 #ifdef HAVE_FLINT
    6507         nmod_mat_clear (FLINTN);
    6508 #endif
    65096506        delete [] factorsFoundIndex;
    65106507        delete [] bounds;
     
    65826579    if (result.length() == NTLNe.NumCols())
    65836580    {
    6584 #ifdef HAVE_FLINT
    6585       nmod_mat_clear (FLINTN);
    6586 #endif
    65876581      delete [] bounds;
    65886582      return Union (result, smallFactors);
     
    67286722    {
    67296723#ifdef HAVE_FLINT
    6730       nmod_mat_clear (FLINTN);
     6724      if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6725        nmod_mat_clear (FLINTN);
    67316726#endif
    67326727      delete [] bounds;
     
    67476742    {
    67486743#ifdef HAVE_FLINT
    6749       nmod_mat_clear (FLINTN);
     6744      if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6745        nmod_mat_clear (FLINTN);
    67506746#endif
    67516747      result.append (bufF);
     
    67536749    }
    67546750#ifdef HAVE_FLINT
    6755     nmod_mat_clear (FLINTN);
     6751    if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6752      nmod_mat_clear (FLINTN);
    67566753#endif
    67576754    return Union (result, henselLiftAndLatticeRecombi (bufF, bufUniFactors,
     
    68126809      if (result.length()== NTLNe.NumCols())
    68136810      {
    6814 #ifdef HAVE_FLINT
    6815         nmod_mat_clear (FLINTN);
    6816 #endif
    68176811        delete [] bounds;
    68186812        result= Union (result, smallFactors);
     
    68716865        if (result.length() == NTLNe.NumCols())
    68726866        {
    6873 #ifdef HAVE_FLINT
    6874           nmod_mat_clear (FLINTN);
    6875 #endif
    68766867          delete [] bounds;
    68776868          result= Union (result, smallFactors);
     
    68916882  bounds= computeBounds (F, d, isIrreducible);
    68926883#ifdef HAVE_FLINT
    6893   nmod_mat_clear (FLINTN);
     6884  if (alpha.level() == 1 || (alpha.level() != 1 && reduceFq2Fp))
     6885    nmod_mat_clear (FLINTN);
    68946886#endif
    68956887  if (isIrreducible)
  • findexec/configure.ac

    r7e18d1 r2ac2935  
    99AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
    1010m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
     11m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    1112
    1213
  • libpolys/coeffs/Makefile.am

    r7e18d1 r2ac2935  
    5151endif
    5252
    53 AMLDFLAGS = -L${abs_top_builddir}/coeffs -L${abs_top_builddir}/reporter -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc -L${abs_top_builddir}/../findexec
     53AMLDFLAGS = -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc -L${top_builddir}/../findexec
    5454
    5555TESTS_ENVIRONMENT = SINGULARPATH='${top_srcdir}/../factory:${top_builddir}/../factory'
  • libpolys/coeffs/longrat.cc

    r7e18d1 r2ac2935  
    25452545    if (mpz_cmp(tmp,P)<0)
    25462546    {
    2547        // return N/B
    2548        z=ALLOC_RNUMBER();
    2549        #ifdef LDEBUG
    2550        z->debug=123456;
    2551        #endif
    25522547       if (mpz_isNeg(B))
    25532548       {
     
    25552550         mpz_neg(N,N);
    25562551       }
    2557        mpz_init_set(z->z,N);
    2558        mpz_init_set(z->n,B);
    2559        z->s = 0;
    2560        nlNormalize(z,r);
     2552       // check for gcd(N,B)==1
     2553       mpz_gcd(tmp,N,B);
     2554       if (mpz_cmp_ui(tmp,1)==0)
     2555       {
     2556         // return N/B
     2557         z=ALLOC_RNUMBER();
     2558         #ifdef LDEBUG
     2559         z->debug=123456;
     2560         #endif
     2561         mpz_init_set(z->z,N);
     2562         mpz_init_set(z->n,B);
     2563         z->s = 0;
     2564         nlNormalize(z,r);
     2565       }
     2566       else
     2567       {
     2568         // return nN (the input) instead of "fail"
     2569         z=nlCopy(nN,r);
     2570       }
    25612571       break;
    25622572    }
  • libpolys/configure.ac

    r7e18d1 r2ac2935  
    99AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
    1010m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
     11m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    1112
    1213
  • libpolys/misc/auxiliary.h.in

    r7e18d1 r2ac2935  
    161161// #endif
    162162
    163 static const int MAX_INT_LEN= 11;
    164163typedef void* ADDRESS;
    165164
  • libpolys/misc/mylimits.h

    r7e18d1 r2ac2935  
    99#define _MYLIMITS_H
    1010
     11/* Maximum/minimum value an `signed int' (in Singular interpreter) can hold. */
     12const int MAX_INT_VAL = 0x7fffffff;
     13const int MAX_INT_LEN = 11;
    1114#include <limits.h>
    12 #define MAX_INT_VAL 0x7fffffff
    1315
    1416#endif /* _MYLIMITS_H */
  • libpolys/polys/Makefile.am

    r7e18d1 r2ac2935  
    155155
    156156templates_p_Procs_Generate_LDADD    = -lreporter -lmisc -lomalloc -lfindexec
    157 templates_p_Procs_Generate_LDFLAGS  = -L${abs_builddir} -L${abs_top_builddir}/coeffs -L${abs_top_builddir}/reporter -L${top_builddir}/misc -L${abs_top_builddir}/../omalloc -L${abs_top_builddir}/../findexec
     157templates_p_Procs_Generate_LDFLAGS  = -L${builddir} -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/misc -L${top_builddir}/../omalloc -L${top_builddir}/../findexec
    158158
    159159templates/p_Procs.inc: templates/p_Procs_Generate
  • libpolys/polys/ext_fields/transext.cc

    r7e18d1 r2ac2935  
    12391239void ntNormalize (number &a, const coeffs cf)
    12401240{
    1241   if ((a!=NULL)&&(DEN(a)!=NULL))
     1241  if ((a!=NULL))
    12421242  {
    12431243    definiteGcdCancellation(a, cf, FALSE);
     
    18621862    ntNormalize(n, cf);
    18631863
    1864     fraction f = (fraction)n;
     1864    fraction f = (fraction)ntGetDenom (n, cf);
    18651865
    18661866    assume( f != NULL );
    18671867
    1868     const poly den = DEN(f);
     1868    const poly den = NUM(f);
    18691869
    18701870    if( den == NULL ) // ?? / 1 ?
     
    18791879      // TODO: move the following to factory?
    18801880      poly gcd = singclap_gcd(p_Copy(cand, R), p_Copy(den, R), R); // gcd(cand, den) is monic no mater leading coeffs! :((((
     1881      if (nCoeff_is_Q (Q))
     1882      {
     1883        number LcGcd= n_Gcd (p_GetCoeff (cand, R), p_GetCoeff(den, R), Q);
     1884        gcd = p_Mult_nn(gcd, LcGcd, R);
     1885      }
    18811886//      assume( n_IsOne(pGetCoeff(gcd), Q) ); // TODO: this may be wrong...
    18821887      cand = p_Mult_q(cand, p_Copy(den, R), R); // cand *= den
  • libpolys/polys/monomials/monomials.h

    r7e18d1 r2ac2935  
    4242// next
    4343#define pNext(p)            ((p)->next)
    44 #define pIter(p)            ((p) = (p)->next)
     44#define pIter(p)            (void)((p) = (p)->next)
    4545
    4646// coeff
  • libpolys/polys/monomials/p_polys.cc

    r7e18d1 r2ac2935  
    19081908static number p_InitContent(poly ph, const ring r);
    19091909
    1910 #define CLEARENUMERATORS 0
     1910#define CLEARENUMERATORS 1
    19111911
    19121912void p_Content(poly ph, const ring r)
  • libpolys/polys/nc/old.gring.cc

    r7e18d1 r2ac2935  
    24632463  matrix M = r->GetNC()->MT[UPMATELEM(i,j,rN)];
    24642464  /*  return(M); */
     2465/*
    24652466  int sizeofres;
    24662467  if (metric==0)
     
    24722473    sizeofres=sizeof(number);
    24732474  }
     2475*/
    24742476  matrix res=mpNew(size,size);
    24752477  int s;
  • numeric/mpr_base.cc

    r7e18d1 r2ac2935  
    727727  assume( i > 0 );
    728728  poly iter= p;
    729   for ( int j= 1; (j < i) && (iter!=NULL); j++ ) iter= pIter(iter);
     729  for ( int j= 1; (j < i) && (iter!=NULL); j++ ) pIter(iter);
    730730  return iter;
    731731}
  • omalloc/Makefile.am

    r7e18d1 r2ac2935  
    3333EXTRA_DIST = omalloc.c omtTestAlloc.c omtTest.h omMmap.c
    3434
    35 AM_CPPFLAGS =-I${abs_top_srcdir}/.. -I${abs_top_builddir}/..
     35AM_CPPFLAGS =-I${top_srcdir}/.. -I${top_builddir}/..
    3636
    3737libomalloc_la_SOURCES=$(SOURCES) $(noinst_HEADERS)
     
    6767## Test program
    6868##
    69 # AM_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
     69# AM_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
    7070
    7171
     
    9292omtTest_s_g_CFLAGS  = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE}
    9393omtTest_s_g_LDADD   = libomalloc_g.la
    94 omtTest_s_g_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc -static
     94omtTest_s_g_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
    9595
    9696omtTest_s_m_CPPFLAGS= ${AM_CPPFLAGS} -DOM_TEST_MALLOC  -DHAVE_CONFIG_H
    9797omtTest_s_m_SOURCES = $(OMTTESTSSOURCES)
    9898omtTest_s_m_LDADD   = libomalloc_g.la
    99 omtTest_s_m_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc -static
     99omtTest_s_m_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
    100100
    101101omtTest_s_r_SOURCES = $(OMTTESTSSOURCES)
     
    103103omtTest_s_r_CFLAGS  = -O3 ${PIPE}
    104104omtTest_s_r_LDADD   = libomalloc.la
    105 omtTest_s_r_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc -static
     105omtTest_s_r_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
    106106
    107107
     
    111111omtTest_d_g_CFLAGS  = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE}
    112112omtTest_d_g_LDADD   = libomalloc_g.la
    113 omtTest_d_g_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
     113omtTest_d_g_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
    114114
    115115omtTest_d_m_CPPFLAGS= ${AM_CPPFLAGS} -DOM_TEST_MALLOC  -DHAVE_CONFIG_H
    116116omtTest_d_m_SOURCES = $(OMTTESTSSOURCES)
    117117omtTest_d_m_LDADD   = libomalloc_g.la
    118 omtTest_d_m_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
     118omtTest_d_m_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
    119119
    120120omtTest_d_r_SOURCES = $(OMTTESTSSOURCES)
     
    122122omtTest_d_r_CFLAGS  = -O3 ${PIPE}
    123123omtTest_d_r_LDADD   = libomalloc.la
    124 omtTest_d_r_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
     124omtTest_d_r_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
  • omalloc/configure.ac

    r7e18d1 r2ac2935  
    1616AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
    1717m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
     18m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    1819
    1920
  • xalloc/configure.ac

    r7e18d1 r2ac2935  
    88AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
    99m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
     10m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    1011
    1112
Note: See TracChangeset for help on using the changeset viewer.