Changeset c232af in git


Ignore:
Timestamp:
Aug 14, 2000, 2:58:28 PM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ba3e3ef698fa0b7c5867199959cc83330073d3cb')
Children:
d26c2e9dd38f1531c0e77c38e6177109182b5bca
Parents:
4697a8a1ccbf49d0048033ea29c651e3966ba729
Message:
* omalloc stuff


git-svn-id: file:///usr/local/Singular/svn/trunk@4524 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
2 added
119 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/toric.lib

    r4697a8a rc232af  
    1 // version="$Id: toric.lib,v 1.5 2000-08-03 14:27:58 theis Exp $";
     1// version="$Id: toric.lib,v 1.6 2000-08-14 12:56:58 obachman Exp $";
    22
    33///////////////////////////////////////////////////////////////////////////////
     
    698698@end texinfo
    699699EXAMPLE:  example toric_ideal; shows an example
    700 SEE ALSO: toric_std, toric_lib, ip_lib, toric ideals
     700SEE ALSO: toric_std, toric_lib, ip_lib, Toric ideals
    701701"
    702702{
     
    747747@end texinfo
    748748EXAMPLE:  example toric_std; shows an example
    749 SEE ALSO: toric_ideal, toric_lib, ip_lib, toric ideals
     749SEE ALSO: toric_ideal, toric_lib, ip_lib, Toric ideals
    750750"
    751751{
  • Singular/Makefile.in

    r4697a8a rc232af  
    5252CXXTEMPLFLAGS   = @CXXTEMPLFLAGS@
    5353CPPFLAGS        = -I${srcdir} @CPPFLAGS@
    54 DEFS            = -DNDEBUG -D@SING_UNAME@ @DEFS@
     54DEFS            = -DNDEBUG -DOM_NDEBUG -D@SING_UNAME@ @DEFS@
    5555LDFLAGS         = @LDFLAGS@
    5656LD_DYN_FLAGS    = @LD_DYN_FLAGS@
    5757LD_LIBC         = -lc
    5858STATIC_LDFLAGS  = @STATIC_LDFLAGS@
    59 LIBS            = -lm @NEED_LIBS@
     59LIBS            = -lm @NEED_LIBS@ 
    6060
    6161ifdef LD_STATIC
     
    7878# normal C++ source files
    7979CXXSOURCES=grammar.cc scanner.cc algmap.cc attrib.cc binom.cc clapconv.cc \
    80     clapmem.cc clapsing.cc cntrlc.cc\
     80    clapsing.cc cntrlc.cc mminit.cc\
    8181    extra.cc febase.cc feread.cc fehelp.cc feResource.cc feOpt.cc\
    8282    ffields.cc hdegree.cc hilb.cc hutil.cc \
     
    8787    longalg.cc longrat.cc longrat0.cc \
    8888    maps.cc matpol.cc misc.cc sdb.cc gnumpfl.cc gnumpc.cc \
    89     mminit.cc modulop.cc mpr_complex.cc sparsmat.cc \
     89    modulop.cc mpr_complex.cc sparsmat.cc \
    9090    fglm.cc fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \
    9191    numbers.cc polys.cc polys0.cc polys1.cc polys-impl.cc \
     
    104104
    105105# normal C source files
    106 CSOURCES=mmalloc.c mmheap.c mmpage.c mmcheck.c  mmisc.c mmtables.c \
    107     mmbt.c weight0.c find_exec.c fegetopt.c fereadl.c page.c feOpenWinntUrl.c
     106CSOURCES=weight0.c fegetopt.c fereadl.c page.c feOpenWinntUrl.c
    108107
    109108# special source files (need extra compiling and/or linking)
    110 ESOURCES=iparith.cc gmalloc.c tesths.cc mpsr_Tok.cc claptmpl.cc
    111 
    112 SOURCES=${CSOURCES} ${CXXSOURCES} ${ESOURCES} \
     109ESOURCES=iparith.cc tesths.cc mpsr_Tok.cc claptmpl.cc
     110
     111SOURCES=${CSOURCES} ${CXXSOURCES} ${ESOURCES} mmalloc.cc\
    113112        grammar.y scanner.l libparse.l syz2.cc
    114113
    115 # ASO_SOURCES
    116 ASO_SOURCES = structs.aso.cc ipid.aso.cc mmprivate.aso.cc silink.aso.cc \
    117               matpol.aso.cc longrat.aso.cc kbuckets.aso.cc mpsr_Get.aso.cc \
    118               attrib.aso.cc lists.aso.cc\
    119               syz.aso.cc subexpr.aso.cc
    120114
    121115HEADERS=algmap.h hutil.h lists.h stairc.h attrib.h ideals.h \
     
    125119        cntrlc.h ipprint.h ring.h timer.h sdb.h \
    126120        febase.h ipshell.h shortfl.h tok.h mpr_complex.h mpr_global.h \
    127         mmemory.h mmprivate.h mmpage.h page.h \
     121        page.h \
    128122        ffields.h khstd.h silink.h sparsmat.h gnumpfl.h gnumpc.h \
    129123        fglm.h kstd1.h modulop.h sing_dbm.h weight.h \
    130124        fglmgauss.h fglmvec.h mpsr.h sing_mp.h \
    131         kstdfac.h mpsr_Get.h mmbt.h \
     125        kstdfac.h mpsr_Get.h \
    132126        kutil.h mpsr_Put.h sing_dld.h\
    133127        ndbm.h polys-impl.h polys-comp.h libparse.h \
     
    142136DISTFILES=${SOURCES} ${HEADERS} Makefile.in configure.in configure \
    143137        mod2.h.in grammar.h testgh install-sh mkinstalldirs \
    144         ${INCS} $(ASO_SOURCES) check_aso.pl aso.h
     138        ${INCS} check_aso.pl
    145139
    146140OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o)
     
    149143OBJS := $(OBJS) Singular_res.o
    150144endif
    151 
    152 ASO_OBJS := $(ASO_SOURCES:.aso.cc=.aso)
    153145
    154146#
     
    194186        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
    195187
    196 %.aso.o: %.aso.cc mmtables.inc
    197         ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@
    198 .PRECIOUS: %.aso.o
    199 
    200 %.aso: %.aso.o
    201         ./$< > $@
    202 
    203188all:    $(SING_EXEC)
    204189
    205 Singular-static: mod2.h Makefile version.h scanner.cc gmalloc.o \
    206           ${ASO_OBJS} ${OBJS} \
    207           iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o
     190Singular-static: mod2.h Makefile version.h scanner.cc \
     191          ${OBJS} iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o
    208192        sleep 1
    209193        echo "#define HAVE_STATIC" > static.h
     
    212196        ${INSTALL_PROGRAM} Singular Singular-static
    213197
    214 Singular: mod2.h Makefile version.h scanner.cc gmalloc.o \
    215           ${ASO_OBJS} ${OBJS} \
     198Singular: mod2.h Makefile version.h scanner.cc  ${OBJS} mmalloc.o \
    216199          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o
    217200        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \
    218201          -o Singular \
    219202          tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
    220           ${OBJS} ${LDFLAGS} ${LIBS} \
    221           gmalloc.o
     203          ${OBJS} ${LDFLAGS} ${LIBS} -lomalloc_ndebug mmalloc.o
    222204
    223205iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc
     
    226208        ${CXX} ${CXXFLAGS}  ${CPPFLAGS} ${DEFS} -c $<   
    227209
    228 iparith.inc mpsr_Tok.inc: gmalloc.o claptmpl.o iparith.cc \
     210iparith.inc mpsr_Tok.inc: claptmpl.o iparith.cc mmalloc.o\
    229211                          ipconv.cc tok.h mpsr_Tok.cc grammar.h mod2.h
    230212        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} -DGENTABLE \
    231213             -o gentable claptmpl.o iparith.cc tesths.cc mpsr_Tok.cc \
    232              ${OBJS} ${LDFLAGS} ${LIBS} gmalloc.o
     214             ${OBJS} ${LDFLAGS} ${LIBS} -lomalloc_ndebug mmalloc.o
    233215        ./gentable
    234216        /bin/rm -f gentable gentable.exe
    235217
    236 
    237 mmtables.inc: mmtables.c mmprivate.h mmemory.h mod2.h
    238         ${CC} ${CFLAGS}  ${CPPFLAGS}\
    239                -DGENERATE_INDEX_TABLE  -DHAVE_ASO=0 -DHAVE_INDEX_TABLE mmtables.c -o mmtables
    240         ./mmtables > mmtables.inc
    241         rm -f mmtables mmtables.exe
    242 
    243 mmtables.o mmtables.d: mmtables.inc
    244218
    245219version.h: ${SOURCES} ${HEADERS} Makefile.in mod2.h.in \
     
    248222
    249223libparse: libparse_main.o utils.o fegetopt.o febase.cc
    250         ${CXX}  -DHAVE_ASO=0 -DSTANDALONE_PARSER -o libparse febase.cc libparse_main.o utils.o fegetopt.o
     224        ${CXX}  -DSTANDALONE_PARSER -o libparse febase.cc libparse_main.o utils.o fegetopt.o
    251225
    252226libparse_main.o: libparse.cc
    253         ${CXX} -c -o libparse_main.o libparse.cc  -DHAVE_ASO=0 -DSTANDALONE_PARSER
     227        ${CXX} -c -o libparse_main.o libparse.cc  -DSTANDALONE_PARSER
    254228
    255229libparse.cc: libparse.l
     
    263237# under cygwin
    264238ESingular: fegetopt.o feResource.cc mod2.h feOpt.cc version.h emacs.cc \
    265            feOptES.inc
    266         ${CXX} -O ${DEFS} -DESINGULAR -o ESingular emacs.cc fegetopt.o \
    267         ${LDFLAGS} ${LIBS}
     239           feOptES.inc mmalloc.o
     240        ${CXX} -O2 ${CPPFLAGS} ${DEFS} -DESINGULAR -o ESingular emacs.cc fegetopt.o \
     241        ${LDFLAGS} -lomalloc_ndebug mmalloc.o
    268242
    269243TSingular: fegetopt.o feResource.cc mod2.h feOpt.cc version.h emacs.cc \
    270            feOptTS.inc
    271         ${CXX} -O ${DEFS} -DTSINGULAR -o TSingular emacs.cc fegetopt.o \
    272         ${LDFLAGS} ${LIBS}
     244           feOptTS.inc mmalloc.o
     245        ${CXX} -O2 ${CPPFLAGS} ${DEFS} -DTSINGULAR -o TSingular emacs.cc fegetopt.o \
     246        ${LDFLAGS}  -lomalloc_ndebug mmalloc.o
    273247
    274248feOpt.h: feOpt.inc feOptES.inc feOptTS.inc
    275249
    276250feOpt.inc: feOpt.cc mod2.h
    277         $(CXX) -DGENERATE_OPTION_INDEX -DHAVE_ASO=0 feOpt.cc -o feOpt
     251        $(CXX) -DGENERATE_OPTION_INDEX feOpt.cc -o feOpt
    278252        ./feOpt
    279253        /bin/rm -f feOpt feOpt.exe
    280254
    281255feOptES.inc: feOpt.cc
    282         $(CXX) -DGENERATE_OPTION_INDEX  -DHAVE_ASO=0 -DESINGULAR feOpt.cc -o feOpt
     256        $(CXX) -DGENERATE_OPTION_INDEX  -DESINGULAR feOpt.cc -o feOpt
    283257        ./feOpt
    284258        rm -f feOpt feOpt.exe
    285259
    286260feOptTS.inc: feOpt.cc
    287         $(CXX) -DGENERATE_OPTION_INDEX  -DHAVE_ASO=0 -DTSINGULAR feOpt.cc -o feOpt
     261        $(CXX) -DGENERATE_OPTION_INDEX  -DTSINGULAR feOpt.cc -o feOpt
    288262        ./feOpt
    289263        rm -f feOpt feOpt.exe
     
    379353
    380354clean: mostlyclean
    381          -rm -f *.aso *.bak *.d *.dd depend
     355         -rm -f *.bak *.d *.dd depend
    382356
    383357distclean: clean
     
    423397        gzip -f Singular-${SINGULAR_VERSION}-src.tar
    424398
     399backup: tar
     400        mcopy -o Singular-${SINGULAR_VERSION}-src.tar.gz a:
    425401
    426402TAGS:   ${SOURCES} ${HEADERS}
     
    468444        $(CXXG)  ${CXXFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
    469445
    470 $(OBJG1) : %.og: %.cc
     446$(OBJG1) mmalloc.og: %.og: %.cc
    471447        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
    472448
    473 $(OBJG2) gmalloc.og: %.og: %.c
     449$(OBJG2) : %.og: %.c
    474450        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
    475451
    476 Singularg: scanner.cc gmalloc.og \
    477            $(ASO_OBJS) $(OBJG)  \
     452Singularg: scanner.cc  $(OBJG)  mmalloc.og\
    478453           iparith.og mpsr_Tok.og claptmpl.og tesths.cc version.h
    479454        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg \
    480         tesths.cc iparith.og mpsr_Tok.og claptmpl.og $(OBJG) ${LDFLAGS} ${LIBS} \
    481         ${LD_DYN_FLAGS} gmalloc.og ${LD_LIBC}
     455        tesths.cc iparith.og mpsr_Tok.og claptmpl.og $(OBJG) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.og \
     456        ${LD_DYN_FLAGS} ${LD_LIBC}
    482457
    483458iparith.og: iparith.inc iparith.cc
     
    492467
    493468ESingularg: fegetopt.og feResource.cc mod2.h feOpt.cc version.h emacs.cc \
    494            feOptES.inc
    495         ${CXXG} -DESINGULAR -g ${DEFSG} -o ESingularg emacs.cc fegetopt.og ${LDFLAGS} ${LIBS}
     469           feOptES.inc mmalloc.og
     470        ${CXXG} -DESINGULAR -g ${DEFSG} -o ESingularg emacs.cc fegetopt.og ${LDFLAGS} ${LIBS} mmalloc.og
    496471
    497472##
     
    505480CXXFLAGSP       = -pg -O3 ${PIPE}
    506481CXXTEMPLFLAGSP  = -fno-implicit-templates
    507 DEFSP           = -DNDEBUG -DDO_PROFILE -D@SING_UNAME@ @DEFS@
     482DEFSP           = -DNDEBUG -DOM_NDEBUG -DDO_PROFILE -D@SING_UNAME@ @DEFS@
    508483LDFLAGSP        = -static @LDFLAGS@
    509484
     
    511486CXXFLAGSB       = -g -O3 ${PIPE}
    512487CXXTEMPLFLAGSB  = -fno-implicit-templates
    513 DEFSB           = -D@SING_UNAME@ -DNDEBUG @DEFS@
     488DEFSB           = -D@SING_UNAME@ -DOM_NDEBUG -DNDEBUG @DEFS@
    514489LDFLAGSB        = -static @LDFLAGS@
    515490
     
    517492BPROFOBJ        = /usr/local/lib/bmon.o
    518493
    519 DEFST           = -DNDEBUG -D@SING_UNAME@ -DMTRACK @DEFS@
     494DEFST           = -DNDEBUG -D@SING_UNAME@ -DOM_TRACK=2 -DOM_CHECK=0 @DEFS@
    520495LDFLAGST        = @LDFLAGS@
    521 CFLAGST         = -g  -w ${PIPE}
    522 CXXFLAGST       = -g  -w ${PIPE}
     496CFLAGST         = -g  -O2 -w ${PIPE}
     497CXXFLAGST       = -g  -O2 -w ${PIPE}
    523498
    524499##
     
    546521        $(CXXP)  ${CXXFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
    547522
    548 $(OBJP1): %.op: %.cc
     523$(OBJP1) mmalloc.op: %.op: %.cc
    549524        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
    550525
    551 $(OBJP2) gmalloc.op: %.op: %.c
     526$(OBJP2) : %.op: %.c
    552527        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
    553528
    554 Singularp: scanner.cc  gmalloc.op \
    555            $(ASO_OBJS) $(OBJP) \
     529Singularp: scanner.cc   $(OBJP) mmalloc.op\
    556530           iparith.op mpsr_Tok.op claptmpl.op tesths.cc version.h
    557531        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp \
    558         tesths.cc iparith.op mpsr_Tok.op claptmpl.op $(OBJP) ${LDFLAGSP} ${LIBS} \
    559         ${LD_DYN_FLAGS} gmalloc.op
     532        tesths.cc iparith.op mpsr_Tok.op claptmpl.op $(OBJP) ${LDFLAGSP} ${LIBS} -lomalloc_p mmalloc.op\
     533        ${LD_DYN_FLAGS}
    560534
    561535iparith.op: iparith.inc iparith.cc
     
    570544        $(CXXP)  ${CXXFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
    571545
    572 $(OBJB1): %.ob: %.cc
     546$(OBJB1) mmalloc.ob: %.ob: %.cc
    573547        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
    574548
    575 $(OBJB2) gmalloc.ob: %.ob: %.c
     549$(OBJB2) : %.ob: %.c
    576550        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSB} -c $< -o $@
    577551
    578 Singularb: scanner.cc  gmalloc.ob $(OBJB) iparith.ob mpsr_Tok.ob claptmpl.ob tesths.cc version.h
     552Singularb: scanner.cc   $(OBJB) iparith.ob mpsr_Tok.ob claptmpl.ob tesths.cc version.h mmalloc.ob
    579553        $(CXXP) ${CXXFLAGSP} ${CPPFLAGS} ${DEFSB} -o Singularb \
    580554        tesths.cc iparith.ob mpsr_Tok.ob claptmpl.ob $(OBJB) $(BPROFOBJ) \
    581         ${LDFLAGSP} ${LIBS} ${LD_DYN_FLAGS} gmalloc.ob
     555        ${LDFLAGSP} ${LIBS} -lomalloc_ndebug mmalloc.ob ${LD_DYN_FLAGS}
    582556
    583557iparith.ob: iparith.inc iparith.cc
     
    593567        $(CXXP)  ${CXXFLAGST} ${CPPFLAGS} ${DEFST} -c $< -o $@
    594568
    595 $(OBJT1): %.ot: %.cc
     569$(OBJT1) mmalloc.ot: %.ot: %.cc
    596570        $(CXXP) ${CXXFLAGST} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFST} -c $< -o $@
    597571
    598 $(OBJT2) gmalloc.ot: %.ot: %.c
     572$(OBJT2) : %.ot: %.c
    599573        $(CCP)  ${CFLAGST} ${CPPFLAGS} ${DEFST} -c $< -o $@
    600574
    601 Singulart: scanner.cc  gmalloc.ot $(OBJT) iparith.ot mpsr_Tok.ot claptmpl.ot tesths.cc version.h
     575Singulart: scanner.cc   $(OBJT) iparith.ot mpsr_Tok.ot claptmpl.ot tesths.cc version.h  mmalloc.ot
    602576        $(CXXP) ${CXXFLAGST} ${CPPFLAGS} ${DEFST} -o Singulart \
    603         tesths.cc iparith.ot mpsr_Tok.ot claptmpl.ot $(OBJT) ${LDFLAGST} ${LIBS} \
    604         ${LD_DYN_FLAGS} gmalloc.ot
     577        tesths.cc iparith.ot mpsr_Tok.ot claptmpl.ot $(OBJT) ${LDFLAGST} ${LIBS} -lomalloc mmalloc.ot \
     578        ${LD_DYN_FLAGS}
    605579
    606580iparith.ot: iparith.inc iparith.cc
     
    619593## dependencies
    620594##
    621 
    622 %.aso.dd: %.aso.cc mod2.h aso.h
    623         $(CXXM) ${CPPFLAGS} ${DEFS} $< >> $@
    624595
    625596%.dd: %.cc mod2.h
     
    631602        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
    632603
    633 depend:   $(ASO_SOURCES:.cc=.dd) $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
     604depend:   $(CXXSOURCES:.cc=.dd) $(CSOURCES:.c=.d) mmalloc.dd mod2.h
    634605        cat *.d *.dd >depend
    635606
  • Singular/algmap.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: algmap.cc,v 1.15 1999-11-15 17:19:47 obachman Exp $ */
     4/* $Id: algmap.cc,v 1.16 2000-08-14 12:55:53 obachman Exp $ */
    55/*
    66* ABSTRACT - the mapping of polynomials from rings with
     
    99
    1010#include "mod2.h"
     11#include <omalloc.h>
    1112#include "tok.h"
    1213#include "polys.h"
     
    1516#include "ipid.h"
    1617#include "ring.h"
    17 #include "mmemory.h"
    1818#include "febase.h"
    1919#include "maps.h"
     
    4040    if (t!=0)
    4141    {
    42       pGetCoeff(q0) = (number)Alloc0SizeOf(rnumber);
     42      pGetCoeff(q0) = (number)omAlloc0Bin(rnumber_bin);
    4343      b0 = naGetNom0(pGetCoeff(q0)) = napNew();
    4444      napGetCoeff(b0) = nacCopy(napGetCoeff(a0));
     
    117117    if (s==0)
    118118    {
    119       pGetCoeff(q0)=(number)Alloc0SizeOf(rnumber);
     119      pGetCoeff(q0)=(number)omAlloc0Bin(rnumber_bin);
    120120      naGetNom0(pGetCoeff(q0)) = b0;
    121121      return pAdd(res, q0);
     
    126126  while (a0 != NULL);
    127127  if (pGetCoeff(q0)==NULL)
    128     pGetCoeff(q0) = (number)Alloc0SizeOf(rnumber);
     128    pGetCoeff(q0) = (number)omAlloc0Bin(rnumber_bin);
    129129  naGetNom0(pGetCoeff(q0)) = b1;
    130130  return pAdd(res, q0);
     
    239239    if (t!=0)
    240240    {
    241       pGetCoeff(q) = (number)Alloc0SizeOf(rnumber);
     241      pGetCoeff(q) = (number)omAlloc0Bin(rnumber_bin);
    242242      b0 = naGetNom0(pGetCoeff(q)) = napNew();
    243243      napGetCoeff(b0) = nacCopy(napGetCoeff(a0));
  • Singular/attrib.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: attrib.cc,v 1.17 1999-11-15 17:19:48 obachman Exp $ */
     4/* $Id: attrib.cc,v 1.18 2000-08-14 12:55:53 obachman Exp $ */
    55
    66/*
     
    1515
    1616#include "mod2.h"
     17#include <omalloc.h>
    1718#include "tok.h"
    1819#include "ipid.h"
     
    2324#include "ipshell.h"
    2425#include "attrib.h"
    25 #include "mmemory.h"
     26
     27static omBin sattr_bin = omGetSpecBin(sizeof(sattr));
    2628
    2729void sattr::Print()
    2830{
    29   mmTestP(this,sizeof(sattr));
     31  omCheckAddrSize(this,sizeof(sattr));
    3032  ::Print("attr:%s, type %s \n",name,Tok2Cmdname(atyp));
    3133  if (next!=NULL) next->Print();
     
    3436attr sattr::Copy()
    3537{
    36   mmTestP(this,sizeof(sattr));
    37   attr n=(attr)Alloc0SizeOf(sattr);
     38  omCheckAddrSize(this,sizeof(sattr));
     39  attr n=(attr)omAlloc0Bin(sattr_bin);
    3840  n->atyp=atyp;
    39   if (name!=NULL) n->name=mstrdup(name);
     41  if (name!=NULL) n->name=omStrDup(name);
    4042  n->data=CopyA();
    4143  if (next!=NULL)
     
    4850void * sattr::CopyA()
    4951{
    50   mmTestP(this,sizeof(sattr));
     52  omCheckAddrSize(this,sizeof(sattr));
    5153  switch (atyp)
    5254  {
     
    6466      return (void *)data;
    6567    case STRING_CMD:
    66       return (void *)mstrdup((char *)data);
     68      return (void *)omStrDup((char *)data);
    6769#ifdef TEST
    6870    default:
     
    9597      break;
    9698    case STRING_CMD:
    97       FreeL((ADDRESS)h->data);
     99      omFree((ADDRESS)h->data);
    98100      break;
    99101#ifdef TEST
     
    102104#endif
    103105    } /* end switch: (atyp) */
    104     FreeL((ADDRESS)s);
    105   }
    106   else
    107   {
    108      h = (attr)Alloc0SizeOf(sattr);
     106    omFree((ADDRESS)s);
     107  }
     108  else
     109  {
     110     h = (attr)omAlloc0Bin(sattr_bin);
    109111     h->name = s;
    110112     h->next = this;
     
    187189void sattr::kill()
    188190{
    189   FreeL((ADDRESS)name);
     191  omFree((ADDRESS)name);
    190192  name=NULL;
    191193  switch (atyp)
     
    206208    break;
    207209  case STRING_CMD:
    208     FreeL((ADDRESS)data);
     210    omFree((ADDRESS)data);
    209211    break;
    210212#ifdef TEST
     
    214216  } /* end switch: (atyp) */
    215217  data=NULL;
    216   FreeSizeOf((ADDRESS)this,sattr);
     218  omFreeBin((ADDRESS)this, sattr_bin);
    217219}
    218220
     
    306308    {
    307309      res->rtyp=STRING_CMD;
    308       res->data=mstrdup("");
     310      res->data=omStrDup("");
    309311    }
    310312  }
     
    354356  {
    355357    int typ=c->Typ();
    356     atSet(v,mstrdup(name),c->CopyD(typ),typ/*c->T(yp()*/);
     358    atSet(v,omStrDup(name),c->CopyD(typ),typ/*c->T(yp()*/);
    357359    if (h!=NULL) IDATTR(h)=v->attribute;
    358360  }
  • Singular/attrib.h

    r4697a8a rc232af  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: attrib.h,v 1.5 1999-11-15 17:19:48 obachman Exp $ */
     6/* $Id: attrib.h,v 1.6 2000-08-14 12:55:54 obachman Exp $ */
    77/*
    88* ABSTRACT: attributes to leftv and idhdl
     
    1010#include <string.h>
    1111#include "structs.h"
    12 #if HAVE_ASO == 1
    13 #include "attrib.aso"
    14 #endif
    1512
    1613class sattr;
  • Singular/binom.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: binom.cc,v 1.15 1999-11-15 17:19:49 obachman Exp $ */
     4/* $Id: binom.cc,v 1.16 2000-08-14 12:55:54 obachman Exp $ */
    55
    66/*
     
    1010/* includes */
    1111#include "mod2.h"
     12
     13#ifdef TEST_MAC_ORDER
     14#include <omalloc.h>
    1215#include "structs.h"
    1316#include "binom.h"
    1417
    15 #ifdef TEST_MAC_ORDER
    1618#include "tok.h"
    17 #include "mmemory.h"
    1819#include "febase.h"
    1920#include "polys.h"
     
    305306    bHighdeg--;
    306307
    307     if(bBinomials!=NULL) Free((ADDRESS)bBinomials,bSize);
     308    if(bBinomials!=NULL) omFreeSize((ADDRESS)bBinomials,bSize);
    308309    bSize = pVariables*bHighdeg_1*sizeof(int);
    309     bBinomials = (int*)Alloc(bSize);
     310    bBinomials = (int*)omAlloc(bSize);
    310311
    311312    //Print("max deg=%d, table size=%d bytes\n",bHighdeg,bSize);
     
    345346  bHighdeg--;
    346347
    347   if(bBinomials!=NULL) Free((ADDRESS)bBinomials,bSize);
     348  if(bBinomials!=NULL) omFreeSize((ADDRESS)bBinomials,bSize);
    348349  bSize = (pVariables+1)*bHighdeg_1*sizeof(int);
    349   bBinomials = (int*)Alloc(bSize);
     350  bBinomials = (int*)omAlloc(bSize);
    350351
    351352  // Print("max deg=%d, table size=%d bytes\n",bHighdeg,bSize);
  • Singular/check_aso.pl

    r4697a8a rc232af  
    11#!/usr/local/bin/perl
    22###########################################################################
    3 # $Id: check_aso.pl,v 1.2 1999-11-15 17:19:49 obachman Exp $
     3# $Id: check_aso.pl,v 1.3 2000-08-14 12:55:54 obachman Exp $
    44
    55###########################################################################
     
    2626    exit(0);
    2727  }
    28   $fix = 1 if /^-f/;
     28# $fix = 1 if /^-f/;
    2929}
    3030
  • Singular/clapconv.cc

    r4697a8a rc232af  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapconv.cc,v 1.25 2000-07-03 10:22:17 pohl Exp $
     5// $Id: clapconv.cc,v 1.26 2000-08-14 12:55:55 obachman Exp $
    66/*
    77* ABSTRACT: convert data between Singular and factory
     
    1111#include "mod2.h"
    1212#ifdef HAVE_FACTORY
     13#include <omalloc.h>
    1314#include "tok.h"
    1415#define SI_DONT_HAVE_GLOBAL_VARS
     
    1819#include "polys.h"
    1920#include "modulop.h"
    20 #include "mmemory.h"
    2121#include "febase.h"
    2222#include "ipid.h"
     
    144144      else
    145145      {
    146         number z=(number)AllocSizeOf(rnumber);
    147 #if defined(LDEBUG) && ! defined(HAVE_ASO)
     146        number z=(number)omAllocBin(rnumber_bin);
     147#if defined(LDEBUG)
    148148        z->debug=123456;
    149149#endif
     
    278278      else
    279279      {
    280         number z=(number)AllocSizeOf(rnumber);
    281 #if defined(LDEBUG) && ! defined(HAVE_ASO)
     280        number z=(number)omAllocBin(rnumber_bin);
     281#if defined(LDEBUG)
    282282        z->debug=123456;
    283283#endif
     
    370370      for ( i = 0; i < off; i++ )
    371371        z->e[i]+=exp[i+1];
    372       pGetCoeff(term)=(number)Alloc0SizeOf(rnumber);
     372      pGetCoeff(term)=(number)omAlloc0Bin(rnumber_bin);
    373373      ((lnumber)pGetCoeff(term))->z=z;
    374374      pSetm( term );
     
    441441  else
    442442  {
    443     number z=(number)AllocSizeOf(rnumber);
    444 #if defined(LDEBUG) && ! defined(HAVE_ASO)
     443    number z=(number)omAllocBin(rnumber_bin);
     444#if defined(LDEBUG)
    445445    z->debug=123456;
    446446#endif
     
    539539      pSetExp( term, i ,exp[i]);
    540540    pSetComp(term, 0);
    541     pGetCoeff(term)=(number)Alloc0SizeOf(rnumber);
     541    pGetCoeff(term)=(number)omAlloc0Bin(rnumber_bin);
    542542    ((lnumber)pGetCoeff(term))->z=convClapPSingTr( f );
    543543    pSetm( term );
  • Singular/clapsing.cc

    r4697a8a rc232af  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapsing.cc,v 1.68 2000-07-03 10:22:17 pohl Exp $
     5// $Id: clapsing.cc,v 1.69 2000-08-14 12:55:55 obachman Exp $
    66/*
    77* ABSTRACT: interface between Singular and factory
     
    99
    1010#include "mod2.h"
     11#include <omalloc.h>
    1112#ifdef HAVE_FACTORY
    1213#define SI_DONT_HAVE_GLOBAL_VARS
     
    439440    return NULL;
    440441  }
    441   lists L=(lists)AllocSizeOf(slists);
     442  lists L=(lists)omAllocBin(slists_bin);
    442443  L->Init(3);
    443444  L->m[0].rtyp=POLY_CMD;
     
    592593        napDelete(&c->z);
    593594        #ifdef LDEBUG
    594         number nt=(number)Alloc0SizeOf(rnumber);
     595        number nt=(number)omAlloc0Bin(rnumber_bin);
    595596        lnumber nnt=(lnumber)nt;
    596597        nnt->z=convClapPSingTr( i.getItem());
     
    630631    if (with_exps!=1)
    631632    {
    632       (*v)=NewIntvec1(1);
     633      (*v)=new intvec(1);
    633634      (**v)[0]=1;
    634635    }
     
    762763        J++;
    763764      }
    764       *v = NewIntvec1( n );
     765      *v = new intvec( n );
    765766    }
    766767    res = idInit( n ,1);
     
    809810        {
    810811          intvec *w=*v;
    811           *v = NewIntvec1( max(n-j,1) );
     812          *v = new intvec( max(n-j,1) );
    812813          for (i=0,j=0;i<w->length();i++)
    813814          {
     
    963964  Li = IL;
    964965  int offs=rPar(currRing);
    965   int* mark=(int*)Alloc0((pVariables+offs)*sizeof(int));
     966  int* mark=(int*)omAlloc0((pVariables+offs)*sizeof(int));
    966967  int cnt=pVariables+offs;
    967968  loop
     
    10001001    }
    10011002  }
    1002   return mstrdup(StringAppendS(""));
     1003  return omStrDup(StringAppendS(""));
    10031004#else
    10041005  return NULL;
     
    11431144  ideal f=singclap_factorize((poly)(u->Data()), &v, 0);
    11441145  if (f==NULL) return TRUE;
    1145   #ifdef MDEBUG
    1146   v->ivTEST();
    1147   #endif
    1148   lists l=(lists)AllocSizeOf(slists);
     1146  ivTest(v);
     1147  lists l=(lists)omAllocBin(slists_bin);
    11491148  l->Init(2);
    11501149  l->m[0].rtyp=IDEAL_CMD;
     
    11681167    case 2:
    11691168    {
    1170       lists l=(lists)AllocSizeOf(slists);
     1169      lists l=(lists)omAllocBin(slists_bin);
    11711170      l->Init(2);
    11721171      l->m[0].rtyp=IDEAL_CMD;
  • Singular/cntrlc.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: cntrlc.cc,v 1.31 2000-08-02 13:40:28 obachman Exp $ */
     4/* $Id: cntrlc.cc,v 1.32 2000-08-14 12:55:56 obachman Exp $ */
    55/*
    66* ABSTRACT - interupt handling
     
    1313#include <signal.h>
    1414#include "mod2.h"
     15#include <omalloc.h>
    1516#include "tok.h"
    1617#include "ipshell.h"
    17 #include "mmemory.h"
    1818#include "febase.h"
    1919#include "cntrlc.h"
  • Singular/configure

    r4697a8a rc232af  
    4141  --with-gmalloc          use our own gmalloc routines, instead of the ones
    4242                             provided by the system"
    43 ac_help="$ac_help
    44   --with-mtrack           use mpr routines for extended memory tracking
    45                              -- works only under ix86-Linux"
    4643
    4744# Initialize some variables set by options.
     
    558555
    559556echo $ac_n "checking uname for singular""... $ac_c" 1>&6
    560 echo "configure:561: checking uname for singular" >&5
     557echo "configure:558: checking uname for singular" >&5
    561558if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then
    562559  echo $ac_n "(cached) $ac_c" 1>&6
     
    602599SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-1}
    603600SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-3}
    604 SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-8}
     601SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-9}
    605602SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
    606 VERSION_DATE=${VERSION_DATE:-"May 2000"}
     603VERSION_DATE=${VERSION_DATE:-"September 2000"}
    607604
    608605
     
    655652set dummy gcc; ac_word=$2
    656653echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    657 echo "configure:658: checking for $ac_word" >&5
     654echo "configure:655: checking for $ac_word" >&5
    658655if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    659656  echo $ac_n "(cached) $ac_c" 1>&6
     
    685682set dummy cc; ac_word=$2
    686683echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    687 echo "configure:688: checking for $ac_word" >&5
     684echo "configure:685: checking for $ac_word" >&5
    688685if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    689686  echo $ac_n "(cached) $ac_c" 1>&6
     
    736733set dummy cl; ac_word=$2
    737734echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    738 echo "configure:739: checking for $ac_word" >&5
     735echo "configure:736: checking for $ac_word" >&5
    739736if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    740737  echo $ac_n "(cached) $ac_c" 1>&6
     
    768765
    769766echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    770 echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     767echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    771768
    772769ac_ext=c
     
    779776cat > conftest.$ac_ext << EOF
    780777
    781 #line 782 "configure"
     778#line 779 "configure"
    782779#include "confdefs.h"
    783780
    784781main(){return(0);}
    785782EOF
    786 if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     783if { (eval echo configure:784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    787784  ac_cv_prog_cc_works=yes
    788785  # If we can't run a trivial program, we are probably using a cross compiler.
     
    810807fi
    811808echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    812 echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     809echo "configure:810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    813810echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    814811cross_compiling=$ac_cv_prog_cc_cross
    815812
    816813echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    817 echo "configure:818: checking whether we are using GNU C" >&5
     814echo "configure:815: checking whether we are using GNU C" >&5
    818815if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    819816  echo $ac_n "(cached) $ac_c" 1>&6
     
    824821#endif
    825822EOF
    826 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     823if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    827824  ac_cv_prog_gcc=yes
    828825else
     
    843840CFLAGS=
    844841echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    845 echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
     842echo "configure:843: checking whether ${CC-cc} accepts -g" >&5
    846843if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    847844  echo $ac_n "(cached) $ac_c" 1>&6
     
    875872
    876873echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    877 echo "configure:878: checking how to run the C preprocessor" >&5
     874echo "configure:875: checking how to run the C preprocessor" >&5
    878875# On Suns, sometimes $CPP names a directory.
    879876if test -n "$CPP" && test -d "$CPP"; then
     
    890887  # not just through cpp.
    891888  cat > conftest.$ac_ext <<EOF
    892 #line 893 "configure"
     889#line 890 "configure"
    893890#include "confdefs.h"
    894891#include <assert.h>
     
    896893EOF
    897894ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    898 { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     895{ (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    899896ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    900897if test -z "$ac_err"; then
     
    907904  CPP="${CC-cc} -E -traditional-cpp"
    908905  cat > conftest.$ac_ext <<EOF
    909 #line 910 "configure"
     906#line 907 "configure"
    910907#include "confdefs.h"
    911908#include <assert.h>
     
    913910EOF
    914911ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    915 { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     912{ (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    916913ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    917914if test -z "$ac_err"; then
     
    924921  CPP="${CC-cc} -nologo -E"
    925922  cat > conftest.$ac_ext <<EOF
    926 #line 927 "configure"
     923#line 924 "configure"
    927924#include "confdefs.h"
    928925#include <assert.h>
     
    930927EOF
    931928ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    932 { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     929{ (eval echo configure:930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    933930ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    934931if test -z "$ac_err"; then
     
    959956set dummy $ac_prog; ac_word=$2
    960957echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    961 echo "configure:962: checking for $ac_word" >&5
     958echo "configure:959: checking for $ac_word" >&5
    962959if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
    963960  echo $ac_n "(cached) $ac_c" 1>&6
     
    991988
    992989echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    993 echo "configure:994: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
     990echo "configure:991: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
    994991
    995992ac_ext=C
     
    1002999cat > conftest.$ac_ext << EOF
    10031000
    1004 #line 1005 "configure"
     1001#line 1002 "configure"
    10051002#include "confdefs.h"
    10061003
    10071004int main(){return(0);}
    10081005EOF
    1009 if { (eval echo configure:1010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1006if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    10101007  ac_cv_prog_cxx_works=yes
    10111008  # If we can't run a trivial program, we are probably using a cross compiler.
     
    10331030fi
    10341031echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    1035 echo "configure:1036: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
     1032echo "configure:1033: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
    10361033echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
    10371034cross_compiling=$ac_cv_prog_cxx_cross
    10381035
    10391036echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
    1040 echo "configure:1041: checking whether we are using GNU C++" >&5
     1037echo "configure:1038: checking whether we are using GNU C++" >&5
    10411038if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
    10421039  echo $ac_n "(cached) $ac_c" 1>&6
     
    10471044#endif
    10481045EOF
    1049 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     1046if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    10501047  ac_cv_prog_gxx=yes
    10511048else
     
    10661063CXXFLAGS=
    10671064echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
    1068 echo "configure:1069: checking whether ${CXX-g++} accepts -g" >&5
     1065echo "configure:1066: checking whether ${CXX-g++} accepts -g" >&5
    10691066if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
    10701067  echo $ac_n "(cached) $ac_c" 1>&6
     
    11281125# ./install, which can be erroneously created by make from ./install.sh.
    11291126echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    1130 echo "configure:1131: checking for a BSD compatible install" >&5
     1127echo "configure:1128: checking for a BSD compatible install" >&5
    11311128if test -z "$INSTALL"; then
    11321129if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    11811178
    11821179echo $ac_n "checking for AIX""... $ac_c" 1>&6
    1183 echo "configure:1184: checking for AIX" >&5
     1180echo "configure:1181: checking for AIX" >&5
    11841181cat > conftest.$ac_ext <<EOF
    1185 #line 1186 "configure"
     1182#line 1183 "configure"
    11861183#include "confdefs.h"
    11871184#ifdef _AIX
     
    12131210# check whether the compiler accepts -pipe
    12141211echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
    1215 echo "configure:1216: checking whether compiler accepts -pipe" >&5
     1212echo "configure:1213: checking whether compiler accepts -pipe" >&5
    12161213temp_cflags=${CFLAGS}
    12171214CFLAGS="${CFLAGS} -pipe"
     
    12201217else
    12211218  cat > conftest.$ac_ext <<EOF
    1222 #line 1223 "configure"
     1219#line 1220 "configure"
    12231220#include "confdefs.h"
    12241221
     
    12271224; return 0; }
    12281225EOF
    1229 if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1226if { (eval echo configure:1227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    12301227  rm -rf conftest*
    12311228  ac_cv_cxx_have_pipe=yes
     
    12511248# Customize CFLAGS
    12521249echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
    1253 echo "configure:1254: checking whether _AIX is defined" >&5
     1250echo "configure:1251: checking whether _AIX is defined" >&5
    12541251if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
    12551252  echo $ac_n "(cached) $ac_c" 1>&6
    12561253else
    12571254  cat > conftest.$ac_ext <<EOF
    1258 #line 1259 "configure"
     1255#line 1256 "configure"
    12591256#include "confdefs.h"
    12601257#ifdef _AIX
     
    13071304
    13081305echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    1309 echo "configure:1310: checking whether ${MAKE-make} sets \${MAKE}" >&5
     1306echo "configure:1307: checking whether ${MAKE-make} sets \${MAKE}" >&5
    13101307set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    13111308if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    13821379
    13831380
    1384 
    13851381# lex
    13861382if test "${with_lex+set}" != set; then
    13871383  echo $ac_n "checking for flex""... $ac_c" 1>&6
    1388 echo "configure:1389: checking for flex" >&5
     1384echo "configure:1385: checking for flex" >&5
    13891385    if eval "test \"`echo '$''{'ac_cv_prog_flex'+set}'`\" = set"; then
    13901386  echo $ac_n "(cached) $ac_c" 1>&6
     
    14171413set dummy $ac_prog; ac_word=$2
    14181414echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1419 echo "configure:1420: checking for $ac_word" >&5
     1415echo "configure:1416: checking for $ac_word" >&5
    14201416if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
    14211417  echo $ac_n "(cached) $ac_c" 1>&6
     
    14571453set dummy $ac_prog; ac_word=$2
    14581454echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1459 echo "configure:1460: checking for $ac_word" >&5
     1455echo "configure:1456: checking for $ac_word" >&5
    14601456if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
    14611457  echo $ac_n "(cached) $ac_c" 1>&6
     
    14921488# ln -s
    14931489echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
    1494 echo "configure:1495: checking whether ln -s works" >&5
     1490echo "configure:1491: checking whether ln -s works" >&5
    14951491if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    14961492  echo $ac_n "(cached) $ac_c" 1>&6
     
    15181514set dummy $ac_prog; ac_word=$2
    15191515echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1520 echo "configure:1521: checking for $ac_word" >&5
     1516echo "configure:1517: checking for $ac_word" >&5
    15211517if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
    15221518  echo $ac_n "(cached) $ac_c" 1>&6
     
    15501546# lib checks
    15511547echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
    1552 echo "configure:1553: checking for atof in -lm" >&5
     1548echo "configure:1549: checking for atof in -lm" >&5
    15531549ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
    15541550if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    15581554LIBS="-lm  $LIBS"
    15591555cat > conftest.$ac_ext <<EOF
    1560 #line 1561 "configure"
     1556#line 1557 "configure"
    15611557#include "confdefs.h"
    15621558/* Override any gcc2 internal prototype to avoid an error.  */
     
    15691565; return 0; }
    15701566EOF
    1571 if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1567if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    15721568  rm -rf conftest*
    15731569  eval "ac_cv_lib_$ac_lib_var=yes"
     
    15971593
    15981594echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
    1599 echo "configure:1600: checking for socket in -lbsd" >&5
     1595echo "configure:1596: checking for socket in -lbsd" >&5
    16001596ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
    16011597if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16051601LIBS="-lbsd  $LIBS"
    16061602cat > conftest.$ac_ext <<EOF
    1607 #line 1608 "configure"
     1603#line 1604 "configure"
    16081604#include "confdefs.h"
    16091605/* Override any gcc2 internal prototype to avoid an error.  */
     
    16161612; return 0; }
    16171613EOF
    1618 if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1614if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16191615  rm -rf conftest*
    16201616  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16441640
    16451641echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
    1646 echo "configure:1647: checking for listen in -lsocket" >&5
     1642echo "configure:1643: checking for listen in -lsocket" >&5
    16471643ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
    16481644if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16521648LIBS="-lsocket  $LIBS"
    16531649cat > conftest.$ac_ext <<EOF
    1654 #line 1655 "configure"
     1650#line 1651 "configure"
    16551651#include "confdefs.h"
    16561652/* Override any gcc2 internal prototype to avoid an error.  */
     
    16631659; return 0; }
    16641660EOF
    1665 if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1661if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16661662  rm -rf conftest*
    16671663  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16911687
    16921688echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
    1693 echo "configure:1694: checking for gethostbyname in -lnsl" >&5
     1689echo "configure:1690: checking for gethostbyname in -lnsl" >&5
    16941690ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
    16951691if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16991695LIBS="-lnsl  $LIBS"
    17001696cat > conftest.$ac_ext <<EOF
    1701 #line 1702 "configure"
     1697#line 1698 "configure"
    17021698#include "confdefs.h"
    17031699/* Override any gcc2 internal prototype to avoid an error.  */
     
    17101706; return 0; }
    17111707EOF
    1712 if { (eval echo configure:1713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1708if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    17131709  rm -rf conftest*
    17141710  eval "ac_cv_lib_$ac_lib_var=yes"
     
    17381734
    17391735echo $ac_n "checking for index in -lucb""... $ac_c" 1>&6
    1740 echo "configure:1741: checking for index in -lucb" >&5
     1736echo "configure:1737: checking for index in -lucb" >&5
    17411737ac_lib_var=`echo ucb'_'index | sed 'y%./+-%__p_%'`
    17421738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    17461742LIBS="-lucb  $LIBS"
    17471743cat > conftest.$ac_ext <<EOF
    1748 #line 1749 "configure"
     1744#line 1745 "configure"
    17491745#include "confdefs.h"
    17501746/* Override any gcc2 internal prototype to avoid an error.  */
     
    17571753; return 0; }
    17581754EOF
    1759 if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1755if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    17601756  rm -rf conftest*
    17611757  eval "ac_cv_lib_$ac_lib_var=yes"
     
    17871783# heder file checks
    17881784echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    1789 echo "configure:1790: checking for ANSI C header files" >&5
     1785echo "configure:1786: checking for ANSI C header files" >&5
    17901786if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    17911787  echo $ac_n "(cached) $ac_c" 1>&6
    17921788else
    17931789  cat > conftest.$ac_ext <<EOF
    1794 #line 1795 "configure"
     1790#line 1791 "configure"
    17951791#include "confdefs.h"
    17961792#include <stdlib.h>
     
    18001796EOF
    18011797ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1802 { (eval echo configure:1803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1798{ (eval echo configure:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    18031799ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    18041800if test -z "$ac_err"; then
     
    18171813  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    18181814cat > conftest.$ac_ext <<EOF
    1819 #line 1820 "configure"
     1815#line 1816 "configure"
    18201816#include "confdefs.h"
    18211817#include <string.h>
     
    18351831  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    18361832cat > conftest.$ac_ext <<EOF
    1837 #line 1838 "configure"
     1833#line 1834 "configure"
    18381834#include "confdefs.h"
    18391835#include <stdlib.h>
     
    18561852else
    18571853  cat > conftest.$ac_ext <<EOF
    1858 #line 1859 "configure"
     1854#line 1855 "configure"
    18591855#include "confdefs.h"
    18601856#include <ctype.h>
     
    18671863
    18681864EOF
    1869 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1865if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    18701866then
    18711867  :
     
    18941890ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    18951891echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1896 echo "configure:1897: checking for $ac_hdr" >&5
     1892echo "configure:1893: checking for $ac_hdr" >&5
    18971893if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    18981894  echo $ac_n "(cached) $ac_c" 1>&6
    18991895else
    19001896  cat > conftest.$ac_ext <<EOF
    1901 #line 1902 "configure"
     1897#line 1898 "configure"
    19021898#include "confdefs.h"
    19031899#include <$ac_hdr>
    19041900EOF
    19051901ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1906 { (eval echo configure:1907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1902{ (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    19071903ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    19081904if test -z "$ac_err"; then
     
    19361932ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    19371933echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1938 echo "configure:1939: checking for $ac_hdr" >&5
     1934echo "configure:1935: checking for $ac_hdr" >&5
    19391935if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    19401936  echo $ac_n "(cached) $ac_c" 1>&6
    19411937else
    19421938  cat > conftest.$ac_ext <<EOF
    1943 #line 1944 "configure"
     1939#line 1940 "configure"
    19441940#include "confdefs.h"
    19451941#include <$ac_hdr>
    19461942EOF
    19471943ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1948 { (eval echo configure:1949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1944{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    19491945ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    19501946if test -z "$ac_err"; then
     
    19751971# typedefs, structures
    19761972echo $ac_n "checking for working const""... $ac_c" 1>&6
    1977 echo "configure:1978: checking for working const" >&5
     1973echo "configure:1974: checking for working const" >&5
    19781974if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    19791975  echo $ac_n "(cached) $ac_c" 1>&6
    19801976else
    19811977  cat > conftest.$ac_ext <<EOF
    1982 #line 1983 "configure"
     1978#line 1979 "configure"
    19831979#include "confdefs.h"
    19841980
     
    20292025; return 0; }
    20302026EOF
    2031 if { (eval echo configure:2032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2027if { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    20322028  rm -rf conftest*
    20332029  ac_cv_c_const=yes
     
    20502046
    20512047echo $ac_n "checking for inline""... $ac_c" 1>&6
    2052 echo "configure:2053: checking for inline" >&5
     2048echo "configure:2049: checking for inline" >&5
    20532049if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
    20542050  echo $ac_n "(cached) $ac_c" 1>&6
     
    20572053for ac_kw in inline __inline__ __inline; do
    20582054  cat > conftest.$ac_ext <<EOF
    2059 #line 2060 "configure"
     2055#line 2056 "configure"
    20602056#include "confdefs.h"
    20612057
     
    20642060; return 0; }
    20652061EOF
    2066 if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2062if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    20672063  rm -rf conftest*
    20682064  ac_cv_c_inline=$ac_kw; break
     
    20902086
    20912087echo $ac_n "checking for size_t""... $ac_c" 1>&6
    2092 echo "configure:2093: checking for size_t" >&5
     2088echo "configure:2089: checking for size_t" >&5
    20932089if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    20942090  echo $ac_n "(cached) $ac_c" 1>&6
    20952091else
    20962092  cat > conftest.$ac_ext <<EOF
    2097 #line 2098 "configure"
     2093#line 2094 "configure"
    20982094#include "confdefs.h"
    20992095#include <sys/types.h>
     
    21232119
    21242120echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
    2125 echo "configure:2126: checking whether time.h and sys/time.h may both be included" >&5
     2121echo "configure:2122: checking whether time.h and sys/time.h may both be included" >&5
    21262122if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    21272123  echo $ac_n "(cached) $ac_c" 1>&6
    21282124else
    21292125  cat > conftest.$ac_ext <<EOF
    2130 #line 2131 "configure"
     2126#line 2127 "configure"
    21312127#include "confdefs.h"
    21322128#include <sys/types.h>
     
    21372133; return 0; }
    21382134EOF
    2139 if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2135if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    21402136  rm -rf conftest*
    21412137  ac_cv_header_time=yes
     
    21582154
    21592155echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
    2160 echo "configure:2161: checking whether struct tm is in sys/time.h or time.h" >&5
     2156echo "configure:2157: checking whether struct tm is in sys/time.h or time.h" >&5
    21612157if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    21622158  echo $ac_n "(cached) $ac_c" 1>&6
    21632159else
    21642160  cat > conftest.$ac_ext <<EOF
    2165 #line 2166 "configure"
     2161#line 2162 "configure"
    21662162#include "confdefs.h"
    21672163#include <sys/types.h>
     
    21712167; return 0; }
    21722168EOF
    2173 if { (eval echo configure:2174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2169if { (eval echo configure:2170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    21742170  rm -rf conftest*
    21752171  ac_cv_struct_tm=time.h
     
    21962192# for constant arguments.  Useless!
    21972193echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
    2198 echo "configure:2199: checking for working alloca.h" >&5
     2194echo "configure:2195: checking for working alloca.h" >&5
    21992195if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    22002196  echo $ac_n "(cached) $ac_c" 1>&6
    22012197else
    22022198  cat > conftest.$ac_ext <<EOF
    2203 #line 2204 "configure"
     2199#line 2200 "configure"
    22042200#include "confdefs.h"
    22052201#include <alloca.h>
     
    22082204; return 0; }
    22092205EOF
    2210 if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2206if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    22112207  rm -rf conftest*
    22122208  ac_cv_header_alloca_h=yes
     
    22292225
    22302226echo $ac_n "checking for alloca""... $ac_c" 1>&6
    2231 echo "configure:2232: checking for alloca" >&5
     2227echo "configure:2228: checking for alloca" >&5
    22322228if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    22332229  echo $ac_n "(cached) $ac_c" 1>&6
    22342230else
    22352231  cat > conftest.$ac_ext <<EOF
    2236 #line 2237 "configure"
     2232#line 2233 "configure"
    22372233#include "confdefs.h"
    22382234
     
    22622258; return 0; }
    22632259EOF
    2264 if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2260if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    22652261  rm -rf conftest*
    22662262  ac_cv_func_alloca_works=yes
     
    22942290
    22952291echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
    2296 echo "configure:2297: checking whether alloca needs Cray hooks" >&5
     2292echo "configure:2293: checking whether alloca needs Cray hooks" >&5
    22972293if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    22982294  echo $ac_n "(cached) $ac_c" 1>&6
    22992295else
    23002296  cat > conftest.$ac_ext <<EOF
    2301 #line 2302 "configure"
     2297#line 2298 "configure"
    23022298#include "confdefs.h"
    23032299#if defined(CRAY) && ! defined(CRAY2)
     
    23242320for ac_func in _getb67 GETB67 getb67; do
    23252321  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2326 echo "configure:2327: checking for $ac_func" >&5
     2322echo "configure:2323: checking for $ac_func" >&5
    23272323if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    23282324  echo $ac_n "(cached) $ac_c" 1>&6
    23292325else
    23302326  cat > conftest.$ac_ext <<EOF
    2331 #line 2332 "configure"
     2327#line 2328 "configure"
    23322328#include "confdefs.h"
    23332329/* System header to define __stub macros and hopefully few prototypes,
     
    23522348; return 0; }
    23532349EOF
    2354 if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2350if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    23552351  rm -rf conftest*
    23562352  eval "ac_cv_func_$ac_func=yes"
     
    23792375
    23802376echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
    2381 echo "configure:2382: checking stack direction for C alloca" >&5
     2377echo "configure:2378: checking stack direction for C alloca" >&5
    23822378if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    23832379  echo $ac_n "(cached) $ac_c" 1>&6
     
    23872383else
    23882384  cat > conftest.$ac_ext <<EOF
    2389 #line 2390 "configure"
     2385#line 2386 "configure"
    23902386#include "confdefs.h"
    23912387find_stack_direction ()
     
    24062402}
    24072403EOF
    2408 if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2404if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    24092405then
    24102406  ac_cv_c_stack_direction=1
     
    24292425if test $ac_cv_prog_gcc = yes; then
    24302426    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
    2431 echo "configure:2432: checking whether ${CC-cc} needs -traditional" >&5
     2427echo "configure:2428: checking whether ${CC-cc} needs -traditional" >&5
    24322428if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    24332429  echo $ac_n "(cached) $ac_c" 1>&6
     
    24352431    ac_pattern="Autoconf.*'x'"
    24362432  cat > conftest.$ac_ext <<EOF
    2437 #line 2438 "configure"
     2433#line 2434 "configure"
    24382434#include "confdefs.h"
    24392435#include <sgtty.h>
     
    24532449  if test $ac_cv_prog_gcc_traditional = no; then
    24542450    cat > conftest.$ac_ext <<EOF
    2455 #line 2456 "configure"
     2451#line 2452 "configure"
    24562452#include "confdefs.h"
    24572453#include <termio.h>
     
    24782474ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    24792475echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    2480 echo "configure:2481: checking for $ac_hdr" >&5
     2476echo "configure:2477: checking for $ac_hdr" >&5
    24812477if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    24822478  echo $ac_n "(cached) $ac_c" 1>&6
    24832479else
    24842480  cat > conftest.$ac_ext <<EOF
    2485 #line 2486 "configure"
     2481#line 2482 "configure"
    24862482#include "confdefs.h"
    24872483#include <$ac_hdr>
    24882484EOF
    24892485ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2490 { (eval echo configure:2491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2486{ (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    24912487ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    24922488if test -z "$ac_err"; then
     
    25172513do
    25182514echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2519 echo "configure:2520: checking for $ac_func" >&5
     2515echo "configure:2516: checking for $ac_func" >&5
    25202516if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    25212517  echo $ac_n "(cached) $ac_c" 1>&6
    25222518else
    25232519  cat > conftest.$ac_ext <<EOF
    2524 #line 2525 "configure"
     2520#line 2521 "configure"
    25252521#include "confdefs.h"
    25262522/* System header to define __stub macros and hopefully few prototypes,
     
    25452541; return 0; }
    25462542EOF
    2547 if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2543if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    25482544  rm -rf conftest*
    25492545  eval "ac_cv_func_$ac_func=yes"
     
    25702566
    25712567echo $ac_n "checking for working mmap""... $ac_c" 1>&6
    2572 echo "configure:2573: checking for working mmap" >&5
     2568echo "configure:2569: checking for working mmap" >&5
    25732569if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
    25742570  echo $ac_n "(cached) $ac_c" 1>&6
     
    25782574else
    25792575  cat > conftest.$ac_ext <<EOF
    2580 #line 2581 "configure"
     2576#line 2577 "configure"
    25812577#include "confdefs.h"
    25822578
     
    27182714
    27192715EOF
    2720 if { (eval echo configure:2721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2716if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    27212717then
    27222718  ac_cv_func_mmap_fixed_mapped=yes
     
    27412737
    27422738echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
    2743 echo "configure:2744: checking return type of signal handlers" >&5
     2739echo "configure:2740: checking return type of signal handlers" >&5
    27442740if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    27452741  echo $ac_n "(cached) $ac_c" 1>&6
    27462742else
    27472743  cat > conftest.$ac_ext <<EOF
    2748 #line 2749 "configure"
     2744#line 2745 "configure"
    27492745#include "confdefs.h"
    27502746#include <sys/types.h>
     
    27632759; return 0; }
    27642760EOF
    2765 if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2761if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    27662762  rm -rf conftest*
    27672763  ac_cv_type_signal=void
     
    27822778
    27832779echo $ac_n "checking for vprintf""... $ac_c" 1>&6
    2784 echo "configure:2785: checking for vprintf" >&5
     2780echo "configure:2781: checking for vprintf" >&5
    27852781if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
    27862782  echo $ac_n "(cached) $ac_c" 1>&6
    27872783else
    27882784  cat > conftest.$ac_ext <<EOF
    2789 #line 2790 "configure"
     2785#line 2786 "configure"
    27902786#include "confdefs.h"
    27912787/* System header to define __stub macros and hopefully few prototypes,
     
    28102806; return 0; }
    28112807EOF
    2812 if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2808if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    28132809  rm -rf conftest*
    28142810  eval "ac_cv_func_vprintf=yes"
     
    28342830if test "$ac_cv_func_vprintf" != yes; then
    28352831echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
    2836 echo "configure:2837: checking for _doprnt" >&5
     2832echo "configure:2833: checking for _doprnt" >&5
    28372833if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
    28382834  echo $ac_n "(cached) $ac_c" 1>&6
    28392835else
    28402836  cat > conftest.$ac_ext <<EOF
    2841 #line 2842 "configure"
     2837#line 2838 "configure"
    28422838#include "confdefs.h"
    28432839/* System header to define __stub macros and hopefully few prototypes,
     
    28622858; return 0; }
    28632859EOF
    2864 if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2860if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    28652861  rm -rf conftest*
    28662862  eval "ac_cv_func__doprnt=yes"
     
    28862882fi
    28872883
    2888 for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf sbrk readlink sleep usleep valloc getpagesize setenv getpwnam
     2884for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink sleep usleep valloc getpagesize setenv getpwnam
    28892885do
    28902886echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2891 echo "configure:2892: checking for $ac_func" >&5
     2887echo "configure:2888: checking for $ac_func" >&5
    28922888if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    28932889  echo $ac_n "(cached) $ac_c" 1>&6
    28942890else
    28952891  cat > conftest.$ac_ext <<EOF
    2896 #line 2897 "configure"
     2892#line 2893 "configure"
    28972893#include "confdefs.h"
    28982894/* System header to define __stub macros and hopefully few prototypes,
     
    29172913; return 0; }
    29182914EOF
    2919 if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2915if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    29202916  rm -rf conftest*
    29212917  eval "ac_cv_func_$ac_func=yes"
     
    29452941# arithmetic shifts
    29462942echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
    2947 echo "configure:2948: checking whether your machine has correct arithmetic shifts" >&5
     2943echo "configure:2944: checking whether your machine has correct arithmetic shifts" >&5
    29482944if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
    29492945  echo $ac_n "(cached) $ac_c" 1>&6
     
    29582954else
    29592955  cat > conftest.$ac_ext <<EOF
    2960 #line 2961 "configure"
     2956#line 2957 "configure"
    29612957#include "confdefs.h"
    29622958 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
    29632959EOF
    2964 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2960if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    29652961then
    29662962  ac_cv_shift=yes
     
    29872983# check for a peculiar constructor initialization
    29882984echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
    2989 echo "configure:2990: checking whether explicit C++ constructor calls are allowed" >&5
     2985echo "configure:2986: checking whether explicit C++ constructor calls are allowed" >&5
    29902986
    29912987ac_ext=C
     
    30002996else
    30012997  cat > conftest.$ac_ext <<EOF
    3002 #line 3003 "configure"
     2998#line 2999 "configure"
    30032999#include "confdefs.h"
    30043000
     
    30183014; return 0; }
    30193015EOF
    3020 if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3016if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    30213017  rm -rf conftest*
    30223018  ac_cv_explicit_const=yes
     
    30473043# sprintf returns number of printed chars
    30483044echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
    3049 echo "configure:3050: checking whether vsprintf returns number of printed chars" >&5
     3045echo "configure:3046: checking whether vsprintf returns number of printed chars" >&5
    30503046if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
    30513047  echo $ac_n "(cached) $ac_c" 1>&6
     
    30553051else
    30563052  cat > conftest.$ac_ext <<EOF
    3057 #line 3058 "configure"
     3053#line 3054 "configure"
    30583054#include "confdefs.h"
    30593055#include <stdio.h>
    30603056 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
    30613057EOF
    3062 if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3058if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    30633059then
    30643060  ac_cv_returns_n_of_chars=yes
     
    30863082# determine ALIGN_8
    30873083echo $ac_n "checking size of char""... $ac_c" 1>&6
    3088 echo "configure:3089: checking size of char" >&5
     3084echo "configure:3085: checking size of char" >&5
    30893085if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
    30903086  echo $ac_n "(cached) $ac_c" 1>&6
     
    30943090else
    30953091  cat > conftest.$ac_ext <<EOF
    3096 #line 3097 "configure"
     3092#line 3093 "configure"
    30973093#include "confdefs.h"
    30983094#include <stdio.h>
     
    31053101}
    31063102EOF
    3107 if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3103if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    31083104then
    31093105  ac_cv_sizeof_char=`cat conftestval`
     
    31253121
    31263122echo $ac_n "checking size of short""... $ac_c" 1>&6
    3127 echo "configure:3128: checking size of short" >&5
     3123echo "configure:3124: checking size of short" >&5
    31283124if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
    31293125  echo $ac_n "(cached) $ac_c" 1>&6
     
    31333129else
    31343130  cat > conftest.$ac_ext <<EOF
    3135 #line 3136 "configure"
     3131#line 3132 "configure"
    31363132#include "confdefs.h"
    31373133#include <stdio.h>
     
    31443140}
    31453141EOF
    3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3142if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    31473143then
    31483144  ac_cv_sizeof_short=`cat conftestval`
     
    31643160
    31653161echo $ac_n "checking size of int""... $ac_c" 1>&6
    3166 echo "configure:3167: checking size of int" >&5
     3162echo "configure:3163: checking size of int" >&5
    31673163if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
    31683164  echo $ac_n "(cached) $ac_c" 1>&6
     
    31723168else
    31733169  cat > conftest.$ac_ext <<EOF
    3174 #line 3175 "configure"
     3170#line 3171 "configure"
    31753171#include "confdefs.h"
    31763172#include <stdio.h>
     
    31833179}
    31843180EOF
    3185 if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3181if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    31863182then
    31873183  ac_cv_sizeof_int=`cat conftestval`
     
    32033199
    32043200echo $ac_n "checking size of long""... $ac_c" 1>&6
    3205 echo "configure:3206: checking size of long" >&5
     3201echo "configure:3202: checking size of long" >&5
    32063202if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
    32073203  echo $ac_n "(cached) $ac_c" 1>&6
     
    32113207else
    32123208  cat > conftest.$ac_ext <<EOF
    3213 #line 3214 "configure"
     3209#line 3210 "configure"
    32143210#include "confdefs.h"
    32153211#include <stdio.h>
     
    32223218}
    32233219EOF
    3224 if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3220if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    32253221then
    32263222  ac_cv_sizeof_long=`cat conftestval`
     
    32423238
    32433239echo $ac_n "checking size of void*""... $ac_c" 1>&6
    3244 echo "configure:3245: checking size of void*" >&5
     3240echo "configure:3241: checking size of void*" >&5
    32453241if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
    32463242  echo $ac_n "(cached) $ac_c" 1>&6
     
    32503246else
    32513247  cat > conftest.$ac_ext <<EOF
    3252 #line 3253 "configure"
     3248#line 3249 "configure"
    32533249#include "confdefs.h"
    32543250#include <stdio.h>
     
    32613257}
    32623258EOF
    3263 if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3259if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    32643260then
    32653261  ac_cv_sizeof_voidp=`cat conftestval`
     
    32813277
    32823278echo $ac_n "checking size of double""... $ac_c" 1>&6
    3283 echo "configure:3284: checking size of double" >&5
     3279echo "configure:3280: checking size of double" >&5
    32843280if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
    32853281  echo $ac_n "(cached) $ac_c" 1>&6
     
    32893285else
    32903286  cat > conftest.$ac_ext <<EOF
    3291 #line 3292 "configure"
     3287#line 3288 "configure"
    32923288#include "confdefs.h"
    32933289#include <stdio.h>
     
    33003296}
    33013297EOF
    3302 if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3298if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    33033299then
    33043300  ac_cv_sizeof_double=`cat conftestval`
     
    33203316
    33213317echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
    3322 echo "configure:3323: checking whether byte ordering is bigendian" >&5
     3318echo "configure:3319: checking whether byte ordering is bigendian" >&5
    33233319if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    33243320  echo $ac_n "(cached) $ac_c" 1>&6
     
    33273323# See if sys/param.h defines the BYTE_ORDER macro.
    33283324cat > conftest.$ac_ext <<EOF
    3329 #line 3330 "configure"
     3325#line 3326 "configure"
    33303326#include "confdefs.h"
    33313327#include <sys/types.h>
     
    33383334; return 0; }
    33393335EOF
    3340 if { (eval echo configure:3341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3336if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    33413337  rm -rf conftest*
    33423338  # It does; now see whether it defined to BIG_ENDIAN or not.
    33433339cat > conftest.$ac_ext <<EOF
    3344 #line 3345 "configure"
     3340#line 3341 "configure"
    33453341#include "confdefs.h"
    33463342#include <sys/types.h>
     
    33533349; return 0; }
    33543350EOF
    3355 if { (eval echo configure:3356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3351if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    33563352  rm -rf conftest*
    33573353  ac_cv_c_bigendian=yes
     
    33733369else
    33743370  cat > conftest.$ac_ext <<EOF
    3375 #line 3376 "configure"
     3371#line 3372 "configure"
    33763372#include "confdefs.h"
    33773373main () {
     
    33863382}
    33873383EOF
    3388 if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3384if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    33893385then
    33903386  ac_cv_c_bigendian=no
     
    34233419
    34243420echo $ac_n "checking size of system page""... $ac_c" 1>&6
    3425 echo "configure:3426: checking size of system page" >&5
     3421echo "configure:3422: checking size of system page" >&5
    34263422if eval "test \"`echo '$''{'ac_cv_pagesize'+set}'`\" = set"; then
    34273423  echo $ac_n "(cached) $ac_c" 1>&6
     
    34313427else
    34323428  cat > conftest.$ac_ext <<EOF
    3433 #line 3434 "configure"
     3429#line 3430 "configure"
    34343430#include "confdefs.h"
    34353431#include <stdio.h>
     
    34453441}
    34463442EOF
    3447 if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3443if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    34483444then
    34493445  ac_cv_pagesize=`cat conftestval`
     
    34693465
    34703466echo $ac_n "checking for page aligned valloc""... $ac_c" 1>&6
    3471 echo "configure:3472: checking for page aligned valloc" >&5
     3467echo "configure:3468: checking for page aligned valloc" >&5
    34723468if eval "test \"`echo '$''{'ac_cv_have_page_alignment'+set}'`\" = set"; then
    34733469  echo $ac_n "(cached) $ac_c" 1>&6
     
    35153511else
    35163512  cat > conftest.$ac_ext <<EOF
    3517 #line 3518 "configure"
     3513#line 3514 "configure"
    35183514#include "confdefs.h"
    35193515
     
    35223518
    35233519EOF
    3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3520if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    35253521then
    35263522  ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat  conftestval`
     
    35393535else
    35403536  cat > conftest.$ac_ext <<EOF
    3541 #line 3542 "configure"
     3537#line 3538 "configure"
    35423538#include "confdefs.h"
    35433539
     
    35463542
    35473543EOF
    3548 if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3544if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    35493545then
    35503546  ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat  conftestval`
     
    35663562else
    35673563  cat > conftest.$ac_ext <<EOF
    3568 #line 3569 "configure"
     3564#line 3565 "configure"
    35693565#include "confdefs.h"
    35703566
     
    35753571
    35763572EOF
    3577 if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3573if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    35783574then
    35793575  ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat  conftestval`
     
    35923588else
    35933589  cat > conftest.$ac_ext <<EOF
    3594 #line 3595 "configure"
     3590#line 3591 "configure"
    35953591#include "confdefs.h"
    35963592
     
    36013597
    36023598EOF
    3603 if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    36043600then
    36053601  ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat  conftestval`
     
    37213717fi
    37223718
    3723 # Check whether --with-mtrack or --without-mtrack was given.
    3724 if test "${with_mtrack+set}" = set; then
    3725   withval="$with_mtrack"
    3726   :
    3727 fi
    3728 
    37293719
    37303720echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
    3731 echo "configure:3732: checking for tgetent in -lncurses" >&5
     3721echo "configure:3722: checking for tgetent in -lncurses" >&5
    37323722ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
    37333723if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    37373727LIBS="-lncurses  $LIBS"
    37383728cat > conftest.$ac_ext <<EOF
    3739 #line 3740 "configure"
     3729#line 3730 "configure"
    37403730#include "confdefs.h"
    37413731/* Override any gcc2 internal prototype to avoid an error.  */
     
    37483738; return 0; }
    37493739EOF
    3750 if { (eval echo configure:3751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3740if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    37513741  rm -rf conftest*
    37523742  eval "ac_cv_lib_$ac_lib_var=yes"
     
    37753765\
    37763766 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
    3777 echo "configure:3778: checking for tgetent in -lcurses" >&5
     3767echo "configure:3768: checking for tgetent in -lcurses" >&5
    37783768ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
    37793769if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    37833773LIBS="-lcurses  $LIBS"
    37843774cat > conftest.$ac_ext <<EOF
    3785 #line 3786 "configure"
     3775#line 3776 "configure"
    37863776#include "confdefs.h"
    37873777/* Override any gcc2 internal prototype to avoid an error.  */
     
    37943784; return 0; }
    37953785EOF
    3796 if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3786if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    37973787  rm -rf conftest*
    37983788  eval "ac_cv_lib_$ac_lib_var=yes"
     
    38213811\
    38223812  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
    3823 echo "configure:3824: checking for tgetent in -ltermcap" >&5
     3813echo "configure:3814: checking for tgetent in -ltermcap" >&5
    38243814ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
    38253815if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    38293819LIBS="-ltermcap  $LIBS"
    38303820cat > conftest.$ac_ext <<EOF
    3831 #line 3832 "configure"
     3821#line 3822 "configure"
    38323822#include "confdefs.h"
    38333823/* Override any gcc2 internal prototype to avoid an error.  */
     
    38403830; return 0; }
    38413831EOF
    3842 if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3832if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    38433833  rm -rf conftest*
    38443834  eval "ac_cv_lib_$ac_lib_var=yes"
     
    38833873
    38843874   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
    3885 echo "configure:3886: checking for rl_abort in -lreadline" >&5
     3875echo "configure:3876: checking for rl_abort in -lreadline" >&5
    38863876ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
    38873877if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    38913881LIBS="-lreadline  $LIBS"
    38923882cat > conftest.$ac_ext <<EOF
    3893 #line 3894 "configure"
     3883#line 3884 "configure"
    38943884#include "confdefs.h"
    38953885/* Override any gcc2 internal prototype to avoid an error.  */
     
    39053895; return 0; }
    39063896EOF
    3907 if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3897if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    39083898  rm -rf conftest*
    39093899  eval "ac_cv_lib_$ac_lib_var=yes"
     
    39333923
    39343924   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
    3935 echo "configure:3936: checking how to run the C++ preprocessor" >&5
     3925echo "configure:3926: checking how to run the C++ preprocessor" >&5
    39363926if test -z "$CXXCPP"; then
    39373927if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
     
    39463936  CXXCPP="${CXX-g++} -E"
    39473937  cat > conftest.$ac_ext <<EOF
    3948 #line 3949 "configure"
     3938#line 3939 "configure"
    39493939#include "confdefs.h"
    39503940#include <stdlib.h>
    39513941EOF
    39523942ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3953 { (eval echo configure:3954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3943{ (eval echo configure:3944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    39543944ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    39553945if test -z "$ac_err"; then
     
    39793969ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    39803970echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    3981 echo "configure:3982: checking for $ac_hdr" >&5
     3971echo "configure:3972: checking for $ac_hdr" >&5
    39823972if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    39833973  echo $ac_n "(cached) $ac_c" 1>&6
    39843974else
    39853975  cat > conftest.$ac_ext <<EOF
    3986 #line 3987 "configure"
     3976#line 3977 "configure"
    39873977#include "confdefs.h"
    39883978#include <$ac_hdr>
    39893979EOF
    39903980ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3991 { (eval echo configure:3992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3981{ (eval echo configure:3982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    39923982ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    39933983if test -z "$ac_err"; then
     
    40184008      test "$ac_cv_header_readline_readline_h" = yes; then
    40194009     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
    4020 echo "configure:4021: checking whether readline.h is ok" >&5
     4010echo "configure:4011: checking whether readline.h is ok" >&5
    40214011     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
    40224012  echo $ac_n "(cached) $ac_c" 1>&6
    40234013else
    40244014  cat > conftest.$ac_ext <<EOF
    4025 #line 4026 "configure"
     4015#line 4016 "configure"
    40264016#include "confdefs.h"
    40274017#include<unistd.h>
     
    40484038; return 0; }
    40494039EOF
    4050 if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4040if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    40514041  rm -rf conftest*
    40524042  ac_cv_header_readline_readline_h_ok="yes"
     
    40644054#not ok -- try once more with explicitly declaring everything
    40654055      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
    4066 echo "configure:4067: checking whether or not we nevertheless can use readline" >&5
     4056echo "configure:4057: checking whether or not we nevertheless can use readline" >&5
    40674057      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
    40684058  echo $ac_n "(cached) $ac_c" 1>&6
    40694059else
    40704060  cat > conftest.$ac_ext <<EOF
    4071 #line 4072 "configure"
     4061#line 4062 "configure"
    40724062#include "confdefs.h"
    40734063#include <stdio.h>
     
    41034093; return 0; }
    41044094EOF
    4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4095if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    41064096  rm -rf conftest*
    41074097  ac_cv_have_readline="yes"
     
    41474137# gmp, smallgmp, MP, MPT, factory, libfac
    41484138echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
    4149 echo "configure:4150: checking for main in -lgmp" >&5
     4139echo "configure:4140: checking for main in -lgmp" >&5
    41504140ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
    41514141if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    41554145LIBS="-lgmp  $LIBS"
    41564146cat > conftest.$ac_ext <<EOF
    4157 #line 4158 "configure"
     4147#line 4148 "configure"
    41584148#include "confdefs.h"
    41594149
     
    41624152; return 0; }
    41634153EOF
    4164 if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4154if { (eval echo configure:4155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    41654155  rm -rf conftest*
    41664156  eval "ac_cv_lib_$ac_lib_var=yes"
     
    41934183fi
    41944184echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6
    4195 echo "configure:4196: checking for main in -lsmallgmp" >&5
     4185echo "configure:4186: checking for main in -lsmallgmp" >&5
    41964186ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'`
    41974187if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    42014191LIBS="-lsmallgmp  $LIBS"
    42024192cat > conftest.$ac_ext <<EOF
    4203 #line 4204 "configure"
     4193#line 4194 "configure"
    42044194#include "confdefs.h"
    42054195
     
    42084198; return 0; }
    42094199EOF
    4210 if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4200if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    42114201  rm -rf conftest*
    42124202  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42364226
    42374227echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
    4238 echo "configure:4239: checking for IMP_PutGmpInt in -lMP" >&5
     4228echo "configure:4229: checking for IMP_PutGmpInt in -lMP" >&5
    42394229ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
    42404230if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    42444234LIBS="-lMP  $LIBS"
    42454235cat > conftest.$ac_ext <<EOF
    4246 #line 4247 "configure"
     4236#line 4237 "configure"
    42474237#include "confdefs.h"
    42484238/* Override any gcc2 internal prototype to avoid an error.  */
     
    42554245; return 0; }
    42564246EOF
    4257 if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4247if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    42584248  rm -rf conftest*
    42594249  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42834273
    42844274echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
    4285 echo "configure:4286: checking for MPT_GetTree in -lMPT" >&5
     4275echo "configure:4276: checking for MPT_GetTree in -lMPT" >&5
    42864276ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
    42874277if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    42914281LIBS="-lMPT  $LIBS"
    42924282cat > conftest.$ac_ext <<EOF
    4293 #line 4294 "configure"
     4283#line 4284 "configure"
    42944284#include "confdefs.h"
    42954285/* Override any gcc2 internal prototype to avoid an error.  */
     
    43024292; return 0; }
    43034293EOF
    4304 if { (eval echo configure:4305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4294if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    43054295  rm -rf conftest*
    43064296  eval "ac_cv_lib_$ac_lib_var=yes"
     
    43304320
    43314321echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
    4332 echo "configure:4333: checking for atof in -lsingcf" >&5
     4322echo "configure:4323: checking for atof in -lsingcf" >&5
    43334323ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
    43344324if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    43384328LIBS="-lsingcf  $LIBS"
    43394329cat > conftest.$ac_ext <<EOF
    4340 #line 4341 "configure"
     4330#line 4331 "configure"
    43414331#include "confdefs.h"
    43424332/* Override any gcc2 internal prototype to avoid an error.  */
     
    43494339; return 0; }
    43504340EOF
    4351 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4341if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    43524342  rm -rf conftest*
    43534343  eval "ac_cv_lib_$ac_lib_var=yes"
     
    43774367
    43784368echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
    4379 echo "configure:4380: checking for atof in -lsingfac" >&5
     4369echo "configure:4370: checking for atof in -lsingfac" >&5
    43804370ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
    43814371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    43854375LIBS="-lsingfac  $LIBS"
    43864376cat > conftest.$ac_ext <<EOF
    4387 #line 4388 "configure"
     4377#line 4378 "configure"
    43884378#include "confdefs.h"
    43894379/* Override any gcc2 internal prototype to avoid an error.  */
     
    43964386; return 0; }
    43974387EOF
    4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4388if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    43994389  rm -rf conftest*
    44004390  eval "ac_cv_lib_$ac_lib_var=yes"
     
    44234413fi
    44244414
    4425 
    4426 for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h
     4415echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
     4416echo "configure:4417: checking for omTestAddr in -lomalloc" >&5
     4417ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
     4418if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     4419  echo $ac_n "(cached) $ac_c" 1>&6
     4420else
     4421  ac_save_LIBS="$LIBS"
     4422LIBS="-lomalloc  $LIBS"
     4423cat > conftest.$ac_ext <<EOF
     4424#line 4425 "configure"
     4425#include "confdefs.h"
     4426/* Override any gcc2 internal prototype to avoid an error.  */
     4427/* We use char because int might match the return type of a gcc2
     4428    builtin and then its argument prototype would still apply.  */
     4429char omTestAddr();
     4430
     4431int main() {
     4432omTestAddr()
     4433; return 0; }
     4434EOF
     4435if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4436  rm -rf conftest*
     4437  eval "ac_cv_lib_$ac_lib_var=yes"
     4438else
     4439  echo "configure: failed program was:" >&5
     4440  cat conftest.$ac_ext >&5
     4441  rm -rf conftest*
     4442  eval "ac_cv_lib_$ac_lib_var=no"
     4443fi
     4444rm -f conftest*
     4445LIBS="$ac_save_LIBS"
     4446
     4447fi
     4448if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     4449  echo "$ac_t""yes" 1>&6
     4450    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     4451    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
     4452  cat >> confdefs.h <<EOF
     4453#define $ac_tr_lib 1
     4454EOF
     4455
     4456  LIBS="-lomalloc $LIBS"
     4457
     4458else
     4459  echo "$ac_t""no" 1>&6
     4460fi
     4461
     4462echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
     4463echo "configure:4464: checking for main in -lomalloc_ndebug" >&5
     4464ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
     4465if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     4466  echo $ac_n "(cached) $ac_c" 1>&6
     4467else
     4468  ac_save_LIBS="$LIBS"
     4469LIBS="-lomalloc_ndebug  $LIBS"
     4470cat > conftest.$ac_ext <<EOF
     4471#line 4472 "configure"
     4472#include "confdefs.h"
     4473
     4474int main() {
     4475main()
     4476; return 0; }
     4477EOF
     4478if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4479  rm -rf conftest*
     4480  eval "ac_cv_lib_$ac_lib_var=yes"
     4481else
     4482  echo "configure: failed program was:" >&5
     4483  cat conftest.$ac_ext >&5
     4484  rm -rf conftest*
     4485  eval "ac_cv_lib_$ac_lib_var=no"
     4486fi
     4487rm -f conftest*
     4488LIBS="$ac_save_LIBS"
     4489
     4490fi
     4491if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     4492  echo "$ac_t""yes" 1>&6
     4493    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     4494    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
     4495  cat >> confdefs.h <<EOF
     4496#define $ac_tr_lib 1
     4497EOF
     4498
     4499  LIBS="-lomalloc_ndebug $LIBS"
     4500
     4501else
     4502  echo "$ac_t""no" 1>&6
     4503fi
     4504
     4505
     4506for ac_hdr in gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h omalloc.h omalloc.c
    44274507do
    44284508ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    44294509echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    4430 echo "configure:4431: checking for $ac_hdr" >&5
     4510echo "configure:4511: checking for $ac_hdr" >&5
    44314511if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    44324512  echo $ac_n "(cached) $ac_c" 1>&6
    44334513else
    44344514  cat > conftest.$ac_ext <<EOF
    4435 #line 4436 "configure"
     4515#line 4516 "configure"
    44364516#include "confdefs.h"
    44374517#include <$ac_hdr>
    44384518EOF
    44394519ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    4440 { (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     4520{ (eval echo configure:4521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    44414521ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    44424522if test -z "$ac_err"; then
     
    44934573fi
    44944574
     4575if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
     4576   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
     4577   test "$ac_cv_header_omalloc_c" = yes && \
     4578   test "$ac_cv_header_omalloc_h" = yes; then
     4579  ac_cv_omalloc_ok=yes
     4580fi
     4581
     4582
    44954583# evaluate results
     4584if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
     4585  { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
     4586fi
     4587
    44964588echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
    4497 echo "configure:4498: checking which apint package to use" >&5
     4589echo "configure:4590: checking which apint package to use" >&5
    44984590if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
    44994591  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
     
    45374629#
    45384630echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
    4539 echo "configure:4540: checking whether to have MP" >&5
     4631echo "configure:4632: checking whether to have MP" >&5
    45404632if test "${with_MP}" != yes && test "${with_MP}" != no; then
    45414633  if (test "${will_have_gmp}" = yes) && \
     
    45684660
    45694661echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
    4570 echo "configure:4571: checking whether to have factory" >&5
     4662echo "configure:4663: checking whether to have factory" >&5
    45714663if test "${with_factory}" != yes && test "${with_factory}" != no; then
    45724664  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
     
    45994691
    46004692echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
    4601 echo "configure:4602: checking whether to have libfac" >&5
     4693echo "configure:4694: checking whether to have libfac" >&5
    46024694if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
    46034695  if (test "${will_have_factory}" = yes) && \
     
    46304722
    46314723
     4724
     4725
    46324726echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
    4633 echo "configure:4634: checking whether to have dbm links" >&5
     4727echo "configure:4728: checking whether to have dbm links" >&5
    46344728if test "$with_dbm" != no; then
    46354729  cat >> confdefs.h <<\EOF
     
    46434737
    46444738echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
    4645 echo "configure:4646: checking whether to have namespaces" >&5
     4739echo "configure:4740: checking whether to have namespaces" >&5
    46464740if test "$with_namespaces" != yes; then
    46474741  echo "$ac_t""no" 1>&6
     
    46554749
    46564750echo $ac_n "checking whether to have dl lib""... $ac_c" 1>&6
    4657 echo "configure:4658: checking whether to have dl lib" >&5
     4751echo "configure:4752: checking whether to have dl lib" >&5
    46584752
    46594753case "$ac_cv_singuname" in
     
    46614755          echo "$ac_t""dld" 1>&6
    46624756          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
    4663 echo "configure:4664: checking for shl_load in -ldld" >&5
     4757echo "configure:4758: checking for shl_load in -ldld" >&5
    46644758ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
    46654759if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    46694763LIBS="-ldld  $LIBS"
    46704764cat > conftest.$ac_ext <<EOF
    4671 #line 4672 "configure"
     4765#line 4766 "configure"
    46724766#include "confdefs.h"
    46734767/* Override any gcc2 internal prototype to avoid an error.  */
     
    46804774; return 0; }
    46814775EOF
    4682 if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4776if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    46834777  rm -rf conftest*
    46844778  eval "ac_cv_lib_$ac_lib_var=yes"
     
    47164810          echo "$ac_t""dld" 1>&6
    47174811          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
    4718 echo "configure:4719: checking for shl_load in -ldld" >&5
     4812echo "configure:4813: checking for shl_load in -ldld" >&5
    47194813ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
    47204814if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    47244818LIBS="-ldld  $LIBS"
    47254819cat > conftest.$ac_ext <<EOF
    4726 #line 4727 "configure"
     4820#line 4821 "configure"
    47274821#include "confdefs.h"
    47284822/* Override any gcc2 internal prototype to avoid an error.  */
     
    47354829; return 0; }
    47364830EOF
    4737 if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4831if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    47384832  rm -rf conftest*
    47394833  eval "ac_cv_lib_$ac_lib_var=yes"
     
    47714865          echo "$ac_t""dl" 1>&6
    47724866          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
    4773 echo "configure:4774: checking for dlopen in -ldl" >&5
     4867echo "configure:4868: checking for dlopen in -ldl" >&5
    47744868ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
    47754869if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    47794873LIBS="-ldl  $LIBS"
    47804874cat > conftest.$ac_ext <<EOF
    4781 #line 4782 "configure"
     4875#line 4876 "configure"
    47824876#include "confdefs.h"
    47834877/* Override any gcc2 internal prototype to avoid an error.  */
     
    47904884; return 0; }
    47914885EOF
    4792 if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4886if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    47934887  rm -rf conftest*
    47944888  eval "ac_cv_lib_$ac_lib_var=yes"
     
    48294923
    48304924echo $ac_n "checking whether to have dynamic loading""... $ac_c" 1>&6
    4831 echo "configure:4832: checking whether to have dynamic loading" >&5
     4925echo "configure:4926: checking whether to have dynamic loading" >&5
    48324926if test "$with_dl" != yes; then
    48334927  echo "$ac_t""no" 1>&6
     
    48424936
    48434937
    4844 echo $ac_n "checking whether to use mtrack""... $ac_c" 1>&6
    4845 echo "configure:4846: checking whether to use mtrack" >&5
    4846 if test "$with_mtrack" = yes && test "$ac_cv_singuname" = ix86-Linux; then
    4847   echo "$ac_t""yes" 1>&6
    4848   cat >> confdefs.h <<\EOF
    4849 #define HAVE_MTRACK 1
    4850 EOF
    4851 
    4852 else
    4853   echo "$ac_t""no" 1>&6
    4854 fi
    4855 
    48564938echo $ac_n "checking which exponent type to use""... $ac_c" 1>&6
    4857 echo "configure:4858: checking which exponent type to use" >&5
     4939echo "configure:4940: checking which exponent type to use" >&5
    48584940if test "$with_exp_type" = "char"; then
    48594941  echo "$ac_t""char" 1>&6
  • Singular/configure.in

    r4697a8a rc232af  
    11dnl Process this file with autoconf to produce a configure script.
    2 AC_INIT(gmalloc.c)
     2AC_INIT(mmemory.cc)
    33AC_CONFIG_HEADER(mod2.h)
    44
     
    4848SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-1}
    4949SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-3}
    50 SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-8}
     50SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-9}
    5151SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
    52 VERSION_DATE=${VERSION_DATE:-"May 2000"}
     52VERSION_DATE=${VERSION_DATE:-"September 2000"}
    5353
    5454dnl pass them on into the Makefiles
     
    198198
    199199
    200 
    201200dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    202201dnl Checks for programs.
     
    261260  AC_MSG_ERROR(Can not compile without limits.h unistd.h))
    262261
    263 AC_CHECK_HEADERS(malloc.h sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h termios.h term.h readline/readline.h)
     262AC_CHECK_HEADERS(sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h termios.h term.h readline/readline.h)
    264263
    265264# typedefs, structures
     
    276275AC_TYPE_SIGNAL
    277276AC_FUNC_VPRINTF
    278 AC_CHECK_FUNCS(gettimeofday atexit bcopy getcwd getwd vsnprintf sbrk readlink sleep usleep valloc getpagesize setenv getpwnam)
     277AC_CHECK_FUNCS(gettimeofday atexit bcopy getcwd getwd vsnprintf readlink sleep usleep setenv getpwnam)
    279278
    280279dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
     
    362361fi
    363362
    364 dnl
    365 dnl
    366 dnl figure out the page size of your system
    367 dnl
    368 dnl
    369 AC_MSG_CHECKING(size of system page)
    370 AC_CACHE_VAL(ac_cv_pagesize,
    371 AC_TRY_RUN([#include <stdio.h>
    372 #define HAVE_GMALLOC
    373 #include "gmalloc.c"
    374 
    375 main()
    376 {
    377   FILE *f=fopen("conftestval", "w");
    378   if (!f) exit(1);
    379   fprintf(f, "%d\n", getpagesize());
    380   exit(0);
    381 }], ac_cv_pagesize=`cat conftestval`, ac_cv_pagesize=0, ac_cv_pagesize=0))
    382 AC_MSG_RESULT($ac_cv_pagesize)
    383 if test "$ac_cv_pagesize" != 0; then
    384   AC_DEFINE_UNQUOTED(SIZE_OF_SYSTEM_PAGE, $ac_cv_pagesize)
    385 fi
    386 
    387 dnl
    388 dnl figure out what to do w.r.t. valloc
    389 dnl
    390 
    391 AC_MSG_CHECKING(for page aligned valloc)
    392 AC_CACHE_VAL(ac_cv_have_page_alignment,
    393 
    394 cat > _pagetest.c << EOF
    395 #include <stdio.h>
    396 #ifndef ADJUSTMENT
    397 #define ADJUSTMENT 0
    398 #endif
    399 #define REPEAT 1000
    400 main()
    401 {
    402   long i;
    403   unsigned long p1 = (unsigned long) valloc(SIZE_OF_SYSTEM_PAGE - ADJUSTMENT);
    404   unsigned long p2;
    405   unsigned long diffs = 0;
    406 
    407   if ((p1 == 0) || (p1 & (SIZE_OF_SYSTEM_PAGE - 1))) exit(1);
    408 
    409   for (i = 0; i<REPEAT; i++)
    410   {
    411     p2 = (unsigned long) valloc(SIZE_OF_SYSTEM_PAGE - ADJUSTMENT);
    412     if ((p2 == 0) || (p2 & (SIZE_OF_SYSTEM_PAGE - 1))) exit(1);
    413     diffs += (p2 - p1);
    414     p1 = p2;
    415   }
    416 
    417   if ( ((double) diffs)/((double)REPEAT) < ((double) SIZE_OF_SYSTEM_PAGE)*1.05 )
    418   {
    419     FILE *f=fopen("conftestval", "w");
    420     if (!f) exit(1);
    421     fprintf(f, "%d\n", SIZE_OF_SYSTEM_PAGE - ADJUSTMENT);
    422     exit(0);
    423   }
    424   exit(1);
    425 }
    426 EOF
    427 
    428 ac_cv_have_page_alignment=no
    429 if test "$with_gmalloc" != yes && \
    430    test "$ac_cv_func_valloc" = yes && \
    431    test "$ac_cv_pagesize" != 0; then
    432 AC_TRY_RUN([
    433 #define ADJUSTMENT 0
    434 #include "_pagetest.c"
    435 ], ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat  conftestval`,
    436 ac_cv_have_page_alignment=no, ac_cv_have_page_alignment=no)
    437   if test "$ac_cv_have_page_alignment" = no; then
    438 AC_TRY_RUN([
    439 #define ADJUSTMENT SIZEOF_VOIDP
    440 #include "_pagetest.c"
    441 ], ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat  conftestval`,
    442 ac_cv_have_page_alignment=no, ac_cv_have_page_alignment=no)
    443   fi
    444 fi
    445 
    446 if test "$ac_cv_have_page_alignment" = no && test "$ac_cv_pagesize" != 0; then
    447 AC_TRY_RUN([
    448 #define ADJUSTMENT 0
    449 #define HAVE_GMALLOC
    450 #include "gmalloc.c"
    451 #include "_pagetest.c"
    452 ], ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat  conftestval`,
    453 ac_cv_have_page_alignment=no, ac_cv_have_page_alignment=no)
    454   if test "$ac_cv_have_page_alignment" = no; then
    455 AC_TRY_RUN([
    456 #define ADJUSTMENT SIZEOF_VOIDP
    457 #define HAVE_GMALLOC
    458 #include "gmalloc.c"
    459 #include "_pagetest.c"
    460 ], ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat  conftestval`,
    461 ac_cv_have_page_alignment=no, ac_cv_have_page_alignment=no)
    462   fi
    463 fi
    464 rm -rf conftesteval _pagetest.c
    465 
    466 )
    467 
    468 if test "$ac_cv_have_page_alignment" != no && test "$ac_cv_with_gmalloc" != no; then
    469   eval $ac_cv_have_page_alignment
    470   AC_DEFINE_UNQUOTED(PALLOC, valloc)
    471   AC_DEFINE_UNQUOTED(PFREE, free)
    472   if test "$ac_cv_have_gmalloc" = yes; then
    473     AC_DEFINE(HAVE_GMALLOC)
    474     AC_MSG_RESULT(from gmalloc)
    475   else
    476     AC_MSG_RESULT(from system)
    477   fi
    478   AC_DEFINE_UNQUOTED(SIZE_OF_PAGE, $ac_cv_usable_pagesize)
    479 else
    480   AC_MSG_RESULT(no)
    481   AC_MSG_WARN(Advanced memory management disabled)
    482 fi
    483 
    484363dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    485364dnl help for configure
     
    520399                             -- default type is short
    521400                             -- possible other types are char and int])
    522 AC_ARG_WITH(
    523   gmalloc,
    524   [  --with-gmalloc          use our own gmalloc routines, instead of the ones
    525                              provided by the system])
    526 AC_ARG_WITH(
    527   mtrack,
    528   [  --with-mtrack           use mpr routines for extended memory tracking
    529                              -- works only under ix86-Linux])
    530401dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    531402dnl check for packages we need
     
    638509AC_CHECK_LIB(singcf, atof)
    639510AC_CHECK_LIB(singfac, atof)
    640 
    641 AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h)
     511AC_CHECK_LIB(omalloc, omTestAddr)
     512AC_CHECK_LIB(omalloc_ndebug, main)
     513
     514AC_CHECK_HEADERS(gmp.h smallgmp.h MP.h  MPT.h factory.h factor.h omalloc.h omalloc.c)
    642515
    643516if test "$ac_cv_lib_gmp_main" = yes && \
     
    669542fi
    670543
     544if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
     545   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
     546   test "$ac_cv_header_omalloc_c" = yes && \
     547   test "$ac_cv_header_omalloc_h" = yes; then
     548  ac_cv_omalloc_ok=yes
     549fi
     550
     551
    671552# evaluate results
     553dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
     554dnl make sure that omalloc is there
     555dnl
     556if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then
     557  AC_MSG_ERROR(can not build without omalloc)
     558fi
     559
    672560AC_MSG_CHECKING(which apint package to use)
    673561if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
     
    776664  AC_MSG_RESULT(no)
    777665fi
     666
     667
    778668AC_SUBST(NEED_LIBS)
    779669
     
    831721
    832722dnl
    833 dnl check for mtrack
    834 dnl
    835 AC_MSG_CHECKING(whether to use mtrack)
    836 if test "$with_mtrack" = yes && test "$ac_cv_singuname" = ix86-Linux; then
    837   AC_MSG_RESULT(yes)
    838   AC_DEFINE(HAVE_MTRACK)
    839 else
    840   AC_MSG_RESULT(no)
    841 fi
    842 
    843 dnl
    844723dnl figure out Exponent_t and Order_t
    845724dnl make sure that 2*sizeof(Exponent_t) + sizeof(Order_t) is aligned
  • Singular/emacs.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: emacs.cc,v 1.16 2000-08-02 13:40:28 obachman Exp $ */
     4/* $Id: emacs.cc,v 1.17 2000-08-14 12:56:03 obachman Exp $ */
    55/*
    66* ABSTRACT: Esingular main file
     
    1616#include "mod2.h"
    1717#include "version.h"
     18#include <omalloc.h>
    1819
    1920#if !defined(TSINGULAR) && !defined(ESINGULAR)
     
    2526#endif
    2627
    27 #define Alloc   malloc
    28 #define AllocL  malloc
    29 #define mstrdup strdup
    30 #define Free    free
    31 #define FreeL   free
    32 #define Alloc   malloc
    33 #define AllocL  malloc
    3428#ifndef BOOLEAN
    3529#define BOOLEAN int
     
    9387}
    9488   
    95 extern "C" {
    96 #include "find_exec.c"
    97 }
    9889#include "feResource.cc"
    9990#include "feOpt.cc"
     
    214205#endif
    215206
    216   syscall = (char*) AllocL(strlen(emacs) +
     207  syscall = (char*) omAlloc(strlen(emacs) +
    217208                                 strlen(singular) +
    218209                                 length + 300);
     
    268259      if (! access(cwd, R_OK))
    269260      {
    270         emacs_load = mstrdup(cwd);
     261        emacs_load = omStrDup(cwd);
    271262      }
    272263      else
     
    285276  }
    286277 
    287   syscall = (char*) AllocL(strlen(emacs) +
     278  syscall = (char*) omAlloc(strlen(emacs) +
    288279                           strlen(singular) +
    289280                           strlen(emacs_dir) +
  • Singular/extra.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.136 2000-08-02 13:40:30 obachman Exp $ */
     4/* $Id: extra.cc,v 1.137 2000-08-14 12:56:04 obachman Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    188188    {
    189189      res->rtyp=STRING_CMD;
    190       res->data = mstrdup(S_UNAME);
     190      res->data = omStrDup(S_UNAME);
    191191      return FALSE;
    192192    }
     
    198198      {
    199199        res->rtyp=STRING_CMD;
    200         res->data=(void *)mstrdup(versionString());
     200        res->data=(void *)omStrDup(versionString());
    201201        return FALSE;
    202202      }
     
    249249      char* b = StringSetS("");
    250250      feStringAppendBrowsers(0);
    251       res->data = mstrdup(b);
     251      res->data = omStrDup(b);
    252252      return FALSE;
    253253    }
     
    277277        char *r=getenv((char *)h->Data());
    278278        if (r==NULL) r="";
    279         res->data=(void *)mstrdup(r);
     279        res->data=(void *)omStrDup(r);
    280280        return FALSE;
    281281      }
     
    297297        res->rtyp=STRING_CMD;
    298298        setenv((char *)h->Data(), (char *)h->next->Data(), 1);
    299         res->data=(void *)mstrdup((char *)h->next->Data());
     299        res->data=(void *)omStrDup((char *)h->next->Data());
    300300        feReInitResources();
    301301        return FALSE;
     
    318318      char *r=feResource("Singular");
    319319      if (r != NULL)
    320         res->data = (void*) mstrdup( r );
    321       else
    322         res->data = (void*) mstrdup("");
     320        res->data = (void*) omStrDup( r );
     321      else
     322        res->data = (void*) omStrDup("");
    323323      return FALSE;
    324324    }
     
    355355          res->rtyp = STRING_CMD;
    356356          if (feOptSpec[opt].value != NULL)
    357             res->data = mstrdup((char*) feOptSpec[opt].value);
     357            res->data = omStrDup((char*) feOptSpec[opt].value);
    358358          else
    359             res->data = mstrdup("");
     359            res->data = omStrDup("");
    360360        }
    361361        else
     
    413413#else
    414414        srand((unsigned int)siRandomStart);
     415#endif
     416#ifdef HAVE_FACTORY
     417        factoryseed(siRandomStart);
    415418#endif
    416419        return FALSE;
     
    528531   {
    529532     res->rtyp=STRING_CMD;
    530      res->data=(void *)mstrdup(
     533     res->data=(void *)omStrDup(
    531534       "Olaf Bachmann, Hubert Grassmann, Kai Krueger, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann");
    532535     return FALSE;
     
    642645    if(strcmp(sys_cmd,"mtrack")==0)
    643646    {
    644 #ifdef MLIST
     647#ifdef OM_TRACK
     648      om_Opts.MarkAsStatic = 1;
    645649      FILE *fd = NULL;
    646650      if ((h!=NULL) &&(h->Typ()==STRING_CMD))
     
    650654          Warn("Can not open %s for writing og mtrack. Using stdout");
    651655      }
    652       mmTestList((fd == NULL ? stdout: fd), 0);
     656      omPrintUsedTrackAddrs((fd == NULL ? stdout : fd));
    653657      if (fd != NULL) fclose(fd);
     658      om_Opts.MarkAsStatic = 0;
    654659      return FALSE;
    655660#else
    656      WerrorS("mtrack not supported without MLIST");
     661     WerrorS("mtrack not supported without OM_TRACK");
     662     return TRUE;
     663#endif
     664    }
     665/*==================== mtrack_all ==================================*/
     666    if(strcmp(sys_cmd,"mtrack_all")==0)
     667    {
     668#ifdef OM_TRACK
     669      om_Opts.MarkAsStatic = 1;
     670      FILE *fd = NULL;
     671      if ((h!=NULL) &&(h->Typ()==STRING_CMD))
     672      {
     673        fd = fopen((char*) h->Data(), "w");
     674        if (fd == NULL)
     675          Warn("Can not open %s for writing og mtrack. Using stdout");
     676      }
     677      // OB: TBC print to fd
     678      omPrintUsedAddrs((fd == NULL ? stdout : fd));
     679      if (fd != NULL) fclose(fd);
     680      om_Opts.MarkAsStatic = 0;
     681      return FALSE;
     682#else
     683     WerrorS("mtrack not supported without OM_TRACK");
     684     return TRUE;
     685#endif
     686    }
     687    else
     688/*==================== backtrace ==================================*/
     689    if(strcmp(sys_cmd,"backtrace")==0)
     690    {
     691#ifndef OM_NDEBUG
     692      omPrintCurrentBackTrace(stdout);
     693      return FALSE;
     694#else
     695     WerrorS("btrack not supported without OM_TRACK");
    657696     return TRUE;
    658697#endif
     
    892931        char *r=iiGetLibName(IDPROC(hh));
    893932        if (r==NULL) r="";
    894         res->data=mstrdup(r);
     933        res->data=omStrDup(r);
    895934        return FALSE;
    896935      }
     
    952991      poly  p=(poly)(h->Data());
    953992      int l=pLength(p);
    954       short *points=(short *)Alloc(currRing->N*l*sizeof(short));
     993      short *points=(short *)omAlloc(currRing->N*l*sizeof(short));
    955994      int i,j,k;
    956995      k=0;
     
    9781017
    9791018
    980       lists L=(lists)AllocSizeOf(slists);
     1019      lists L=(lists)omAllocBin(slists_bin);
    9811020      L->Init(6);
    9821021      L->m[0].rtyp=STRING_CMD;               // newtonnumber;
    983       L->m[0].data=(void *)mstrdup(r.nZahl);
     1022      L->m[0].data=(void *)omStrDup(r.nZahl);
    9841023      L->m[1].rtyp=INT_CMD;
    9851024      L->m[1].data=(void *)r.achse;          // flag for unoccupied axes
     
    9931032        int anz = r.anz_punkte;    // number of points
    9941033        int dim = (currRing->N);     // dimension
    995         intvec* v = NewIntvec1( anz*dim );
     1034        intvec* v = new intvec( anz*dim );
    9961035        for (i=0; i<anz*dim; i++)    // copy points
    9971036          (*v)[i] = r.pu[i];
     
    10001039        //---<>--degenerations---------
    10011040        int deg = r.deg;    // number of points
    1002         intvec* w = NewIntvec1( r.speicher );  // necessary memeory
     1041        intvec* w = new intvec( r.speicher );  // necessary memeory
    10031042        i=0;               // start copying
    10041043        do
     
    10251064      delete[] r.deg_tab;      // Ist das ein Problem??
    10261065
    1027       Free((ADDRESS)points,currRing->N*l*sizeof(short));
     1066      omFreeSize((ADDRESS)points,currRing->N*l*sizeof(short));
    10281067      return FALSE;
    10291068    }
  • Singular/feOpt.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feOpt.cc,v 1.12 2000-05-08 15:25:25 obachman Exp $ */
     4/* $Id: feOpt.cc,v 1.13 2000-08-14 12:56:05 obachman Exp $ */
    55/*
    66* ABSTRACT: Implementation of option buisness
     
    270270//         "error-string" on error
    271271#if !defined(ESINGULAR) && !defined(TSINGULAR)
    272 #include "mmemory.h"
     272#include <omalloc.h>
    273273#include "febase.h"
    274274#include "ipshell.h"
     
    308308      assume(feOptSpec[opt].type == feOptString);
    309309      if (feOptSpec[opt].set && feOptSpec[opt].value != NULL)
    310         FreeL(feOptSpec[opt].value);
     310        omFree(feOptSpec[opt].value);
    311311      if (optarg != NULL)
    312         feOptSpec[opt].value = mstrdup(optarg);
     312        feOptSpec[opt].value = omStrDup(optarg);
    313313      else
    314314        feOptSpec[opt].value = NULL;
  • Singular/feResource.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feResource.cc,v 1.26 2000-05-25 13:37:28 obachman Exp $ */
     4/* $Id: feResource.cc,v 1.27 2000-08-14 12:56:06 obachman Exp $ */
    55/*
    66* ABSTRACT: management of resources
     
    1212#include "distrib.h"
    1313#if !defined(ESINGULAR) && !defined(TSINGULAR)
    14 #include "mmemory.h"
     14#include <omalloc.h>
    1515#include "febase.h"
    16 extern "C" char* find_executable(const char* argv0);
    1716#endif
    1817
     
    111110#define MAXRESOURCELEN 5*MAXPATHLEN
    112111
    113 #ifdef MTRACK
    114 BOOLEAN feRes_works=FALSE;
    115 #endif
    116 
    117112char fePathSep =
    118113#if defined(WINNT)
     
    178173    fePathSep = ':';
    179174#endif
    180   feArgv0 = mstrdup(argv0);
     175  feArgv0 = omStrDup(argv0);
    181176#ifdef RESOURCE_DEBUG
    182177  printf("feInitResources: entering with argv0=%s=\n", argv0);
     
    195190  if (path != NULL) setenv("PATH", path, 1);
    196191#endif
    197 #ifdef MTRACK
    198   feRes_works=TRUE;
    199 #endif
    200192}
    201193
     
    208200    {
    209201      if (feResourceConfigs[i].value != NULL)
    210         FreeL(feResourceConfigs[i].value);
     202        omFree(feResourceConfigs[i].value);
    211203      feResourceConfigs[i].value = "";
    212204    }
     
    261253{
    262254  if (config == NULL) return NULL;
    263   char* value = (char*) AllocL(MAXRESOURCELEN);
     255  char* value = (char*) omAlloc(MAXRESOURCELEN);
    264256  feSprintf(value, config->fmt, -1);
    265257  return value;
     
    293285        printf("feInitResource: Set value of %s to =%s=\n", config->key, value);
    294286#endif
    295         config->value = mstrdup(value);
     287        config->value = omStrDup(value);
    296288        return config->value;
    297289      }
     
    313305      printf("value:%s\n", value);
    314306#endif
    315       FreeL(executable);
     307      omFree(executable);
    316308    }
    317309  }
     
    353345    printf("feInitResource: Set value of %s to =%s=\n", config->key, value);
    354346#endif
    355     config->value = mstrdup(value);
     347    config->value = omStrDup(value);
    356348    return config->value;
    357349  }
     
    359351  {
    360352    // for binaries, search through PATH once more
    361     char* executable = find_executable(config->key);
     353    char* executable = omFindExec(config->key, value);
    362354    if (executable != NULL)
    363355    {
    364       strcpy(value, executable);
    365       FreeL(executable);
    366356      if (feVerifyResourceValue(config->type,
    367357                                feCleanResourceValue(config->type, value)))
    368358      {
    369         config->value = mstrdup(value);
     359        config->value = omStrDup(value);
    370360#ifdef RESOURCE_DEBUG
    371361        printf("feInitResource: Set value of %s to =%s=\n", config->key, config->value);
     
    416406  printf("feGetExpandedExecutable: calling find_exec with =%s=\n", feArgv0);
    417407#endif
    418   char* executable = find_executable(feArgv0);
     408  char executable[MAXRESOURCELEN];
     409  char* value = omFindExec(feArgv0, executable);
    419410#ifdef RESOURCE_DEBUG
    420411  printf("feGetExpandedExecutable: find_exec exited with =%s=%d\n", executable, access(executable, X_OK));
    421412#endif
    422   if (executable == NULL)
     413  if (value == NULL)
    423414  {
    424415    char message[MAXRESOURCELEN];
     
    427418    return NULL;
    428419  }
    429   return executable;
     420  return omStrDup(value);
    430421#else // macintosh
    431422  return feArgv0;
     
    581572  }
    582573
    583   path_comps = (char**) AllocL(n_comps*sizeof(char*));
     574  path_comps = (char**) omAlloc(n_comps*sizeof(char*));
    584575  path_comps[0]=opath;
    585576  path=opath;
     
    661652    *opath = '\0';
    662653  }
    663   FreeL(path_comps);
     654  omFree(path_comps);
    664655#ifdef RESOURCE_DEBUG
    665656  Print("feCleanUpPath: leaving with path=%s=\n", opath);
  • Singular/febase.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.cc,v 1.87 2000-06-05 12:23:10 Singular Exp $ */
     4/* $Id: febase.cc,v 1.88 2000-08-14 12:56:06 obachman Exp $ */
    55/*
    66* ABSTRACT: i/o system
     
    2929#include "tok.h"
    3030#include "febase.h"
    31 #include "mmemory.h"
     31#include <omalloc.h>
    3232#include "subexpr.h"
    3333#include "ipshell.h"
     
    4646#define INITIAL_PRINT_BUFFER 24*1024
    4747static int feBufferLength=INITIAL_PRINT_BUFFER;
    48 static char * feBuffer=(char *)Alloc(INITIAL_PRINT_BUFFER);
     48static char * feBuffer=(char *)omAlloc(INITIAL_PRINT_BUFFER);
    4949
    5050int     si_echo = 0;
     
    156156    char *s;
    157157
    158     if (where==NULL) s=(char *)AllocL(250);
     158    if (where==NULL) s=(char *)omAlloc(250);
    159159    else             s=where;
    160160
     
    187187      if (f!=NULL)
    188188      {
    189         if (where==NULL) FreeL((ADDRESS)s);
     189        if (where==NULL) omFree((ADDRESS)s);
    190190        return f;
    191191      }
     
    196196      f=myfopen(path,mode);
    197197    }
    198     if (where==NULL) FreeL((ADDRESS)s);
     198    if (where==NULL) omFree((ADDRESS)s);
    199199  }
    200200  if ((f==NULL)&&(useWerror))
     
    215215    more = ((more + (4*1024-1))/(4*1024))*(4*1024);
    216216    int l=s-feBuffer;
    217     feBuffer=(char *)ReAlloc((ADDRESS)feBuffer,feBufferLength,
     217    feBuffer=(char *)omReallocSize((ADDRESS)feBuffer,feBufferLength,
    218218                                                     more);
    219219    feBufferLength=more;
     
    243243#endif
    244244#endif
    245   mmTest(feBuffer, feBufferLength);
     245  omCheckAddrSize(feBuffer, feBufferLength);
    246246  va_end(ap);
    247247  return feBuffer;
     
    256256  {
    257257    more = ((more + (4*1024-1))/(4*1024))*(4*1024);
    258     feBuffer=(char *)ReAlloc((ADDRESS)feBuffer,feBufferLength,
     258    feBuffer=(char *)omReallocSize((ADDRESS)feBuffer,feBufferLength,
    259259                                                     more);
    260260    feBufferLength=more;
     
    272272  {
    273273    more = ((l + (4*1024-1))/(4*1024))*(4*1024);
    274     feBuffer=(char *)ReAlloc((ADDRESS)feBuffer,feBufferLength,
     274    feBuffer=(char *)omReallocSize((ADDRESS)feBuffer,feBufferLength,
    275275                                                     more);
    276276    feBufferLength=more;
     
    301301    if (feErrors==NULL)
    302302    {
    303       feErrors=(char *)Alloc(256);
     303      feErrors=(char *)omAlloc(256);
    304304      feErrorsLen=256;
    305305      *feErrors = '\0';
     
    309309      if (((int)(strlen((char *)s)+ 20 +strlen(feErrors)))>=feErrorsLen)
    310310      {
    311         feErrors=(char *)ReAlloc(feErrors,feErrorsLen,feErrorsLen+256);
     311        feErrors=(char *)omReallocSize(feErrors,feErrorsLen,feErrorsLen+256);
    312312        feErrorsLen+=256;
    313313      }
     
    347347  va_list ap;
    348348  va_start(ap, fmt);
    349   char *s=(char *)Alloc(256);
     349  char *s=(char *)omAlloc(256);
    350350  vsprintf(s, fmt, ap);
    351351  WerrorS(s);
    352   Free(s,256);
     352  omFreeSize(s,256);
    353353  va_end(ap);
    354354}
     
    386386  va_list ap;
    387387  va_start(ap, fmt);
    388   char *s=(char *)Alloc(256);
     388  char *s=(char *)omAlloc(256);
    389389  vsprintf(s, fmt, ap);
    390390  WarnS(s);
    391   Free(s,256);
     391  omFreeSize(s,256);
    392392  va_end(ap);
    393393}
     
    448448void SPrintStart()
    449449{
    450   sprint = mstrdup("");
     450  sprint = omStrDup("");
    451451}
    452452
    453453static void SPrintS(char* s)
    454454{
    455   mmTestL(sprint);
     455  omCheckAddr(sprint);
    456456  if (s == NULL) return;
    457457  int ls = strlen(s);
     
    460460  char* ns;
    461461  int l = strlen(sprint);
    462   ns = (char*) AllocL((l + ls + 1)*sizeof(char));
     462  ns = (char*) omAlloc((l + ls + 1)*sizeof(char));
    463463  if (l > 0) strcpy(ns, sprint);
    464464
    465465  strcpy(&(ns[l]), s);
    466   FreeL(sprint);
     466  omFree(sprint);
    467467  sprint = ns;
    468   mmTestL(sprint);
     468  omCheckAddr(sprint);
    469469}
    470470
     
    473473  char* ns = sprint;
    474474  sprint = NULL;
    475   mmTestL(ns);
     475  omCheckAddr(ns);
    476476  return ns;
    477477}
     
    528528    va_list ap;
    529529    va_start(ap, fmt);
    530     mmTestL(sprint);
     530    omCheckAddr(sprint);
    531531    if (fmt != NULL && ls > 0)
    532532    {
    533533      char* ns;
    534534      int l = strlen(sprint);
    535       ns = (char*) AllocL(sizeof(char)*(ls + l + 256));
     535      ns = (char*) omAlloc(sizeof(char)*(ls + l + 256));
    536536      if (l > 0)  strcpy(ns, sprint);
    537537
     
    542542      vsprintf(&(ns[l]), fmt, ap);
    543543#endif
    544       mmTestL(ns);
    545       FreeL(sprint);
     544      omCheckAddr(ns);
     545      omFree(sprint);
    546546      sprint = ns;
    547547    }
     
    558558#if (defined(HAVE_TCL) || defined(macintosh))
    559559    {
    560       char *s=(char *)Alloc(strlen(fmt)+256);
     560      char *s=(char *)omAlloc(strlen(fmt)+256);
    561561      vsprintf(s,fmt, ap);
    562562#ifdef HAVE_TCL
     
    601601  {
    602602    fclose(feProtFile);
     603    feProt = 0;
    603604  }
    604605  if ((s!=NULL) && (*s!='\0'))
     
    608609    {
    609610      Werror("cannot open %s",s);
     611      feProt=0;
    610612    }
    611613    else
  • Singular/febase.h

    r4697a8a rc232af  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: febase.h,v 1.46 2000-04-27 10:07:07 obachman Exp $ */
     6/* $Id: febase.h,v 1.47 2000-08-14 12:56:07 obachman Exp $ */
    77/*
    88* ABSTRACT: basic i/o
     
    6969extern int    yy_blocklineno;
    7070extern int    yy_noeof;
    71 #ifdef MTRACK
    72 extern BOOLEAN feRes_works;
    73 #endif
    7471extern char   prompt_char;
    7572extern const char feNotImplemented[];
  • Singular/febase.inc

    r4697a8a rc232af  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: febase.inc,v 1.30 2000-04-27 10:07:07 obachman Exp $ */
     5/* $Id: febase.inc,v 1.31 2000-08-14 12:56:08 obachman Exp $ */
    66/*
    77* ABSTRACT: handling of 'voices'
     
    8686  //Print(":File%d(%s):%s(%x)\n",
    8787  //  currentVoice->typ,BT_name[currentVoice->typ],fname,currentVoice);
    88   currentVoice->filename   = mstrdup(fname);
     88  currentVoice->filename   = omStrDup(fname);
    8989  if (strcmp(fname,"STDIN") == 0)
    9090  {
     
    131131    int l=strlen(pi->procname);
    132132    if (pi->libname!=NULL) l+=strlen(pi->libname);
    133     currentVoice->filename = (char *)AllocL(l+3);
     133    currentVoice->filename = (char *)omAlloc(l+3);
    134134    *currentVoice->filename='\0';
    135135    if (pi->libname!=NULL) strcat(currentVoice->filename,pi->libname);
     
    140140  else
    141141  {
    142     currentVoice->filename = mstrdup(currentVoice->prev->filename);
     142    currentVoice->filename = omStrDup(currentVoice->prev->filename);
    143143    currentVoice->pi       = currentVoice->prev->pi;
    144144  }
     
    334334      if (currentVoice->filename!=NULL)
    335335      {
    336         FreeL((ADDRESS)currentVoice->filename);
     336        omFree((ADDRESS)currentVoice->filename);
    337337        currentVoice->filename=NULL;
    338338      }
    339339      if (currentVoice->buffer!=NULL)
    340340      {
    341         FreeL((ADDRESS)currentVoice->buffer);
     341        omFree((ADDRESS)currentVoice->buffer);
    342342        currentVoice->buffer=NULL;
    343343      }
     
    486486          if (ss==NULL) len=strlen(anf);
    487487          else          len=ss-anf;
    488           char *s=(char *)AllocL(len+2);
     488          char *s=(char *)omAlloc(len+2);
    489489          strncpy(s,anf,len+2);
    490490          s[len+1]='\0';
    491491          fePrintEcho(s,b);
    492           FreeL((ADDRESS)s);
     492          omFree((ADDRESS)s);
    493493        }
    494494        else if (/*(startfptr>0) &&*/
     
    500500          if (ss==NULL) len=strlen(anf);
    501501          else          len=ss-anf;
    502           char *s=(char *)AllocL(len+2);
     502          char *s=(char *)omAlloc(len+2);
    503503          strncpy(s,anf,len+2);
    504504          s[len+1]='\0';
    505505          yylineno++;
    506506          fePrintEcho(s,b);
    507           FreeL((ADDRESS)s);
     507          omFree((ADDRESS)s);
    508508        }
    509509      }
     
    516516      currentVoice->fptr=0;
    517517      if (currentVoice->buffer==NULL)
    518         currentVoice->buffer=(char *)AllocL(4096-sizeof(ADDRESS));
     518      {
     519        currentVoice->buffer=(char *)omAlloc(4096-sizeof(ADDRESS));
     520        omMarkAsStaticAddr(currentVoice->buffer);
     521      }
    519522    }
    520523    offset=0;
     
    552555      s[rc]='\0';
    553556      offset+=rc;
    554       if (offset<(int)mmSizeL(currentVoice->buffer)) goto NewRead;
     557      if (offset<(int)omSizeOfAddr(currentVoice->buffer)) goto NewRead;
    555558    }
    556559    goto NewBuff;
     
    617620  p->sw = (isatty(STDIN_FILENO)) ? BI_stdin : BI_file;
    618621  #endif
    619   p->filename   = mstrdup("STDIN");
     622  p->filename   = omStrDup("STDIN");
    620623  p->start_lineno   = 1;
     624  omMarkAsStaticAddr(p);
     625  omMarkAsStaticAddr(p->filename);
    621626  return p;
    622627}
  • Singular/fehelp.cc

    r4697a8a rc232af  
    1616#include "mod2.h"
    1717#include "tok.h"
    18 #include "mmemory.h"
     18#include <omalloc.h>
    1919#include "febase.h"
    2020#include "ipid.h"
     
    273273             heCurrentHelpBrowser->browser) != 0)
    274274  {
    275     if (feOptSpec[FE_OPT_BROWSER].value == NULL)
    276       FreeL(feOptSpec[FE_OPT_BROWSER].value);
     275      omfree(feOptSpec[FE_OPT_BROWSER].value);
    277276   feOptSpec[FE_OPT_BROWSER].value
    278      = (void*) mstrdup(heCurrentHelpBrowser->browser);
     277     = (void*) omStrDup(heCurrentHelpBrowser->browser);
    279278  }
    280279  return heCurrentHelpBrowser->browser;
     
    560559      {
    561560        PrintS(s);
    562         FreeL((ADDRESS)s);
     561        omFree((ADDRESS)s);
    563562      }
    564563      return TRUE;
     
    576575    else
    577576    {
    578       str = mstrdup(s);
     577      str = omStrDup(s);
    579578      str[ls - 4] = '.';
    580579    }
     
    609608      Warn( "library %s has an old format. Please fix it for the next time",
    610609            str);
    611       if (str != s) FreeL(str);
     610      if (str != s) omFree(str);
    612611      BOOLEAN found=FALSE;
    613612      while (fgets( buf, sizeof(buf), fp))
     
    631630    else
    632631    {
    633       if (str != s) FreeL(str);
     632      if (str != s) omFree(str);
    634633      fclose( yylpin );
    635634      PrintS(text_buffer);
    636       FreeL(text_buffer);
     635      omFree(text_buffer);
    637636      text_buffer=NULL;
    638637    }
     
    640639  }
    641640
    642   if (str != s) FreeL(str);
     641  if (str != s) omFree(str);
    643642  return FALSE;
    644643}
     
    962961static void heBuiltinHelp(heEntry hentry)
    963962{
    964   char* node = mstrdup(hentry != NULL && *(hentry->node) != '\0' ?
     963  char* node = omStrDup(hentry != NULL && *(hentry->node) != '\0' ?
    965964                       hentry->node : "Top");
    966965  singular_manual(node);
    967   FreeL(node);
     966  omFree(node);
    968967}
    969968
  • Singular/feread.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feread.cc,v 1.36 2000-05-19 15:45:48 Singular Exp $ */
     4/* $Id: feread.cc,v 1.37 2000-08-14 12:56:10 obachman Exp $ */
    55/*
    66* ABSTRACT: input from ttys, simulating fgets
     
    1111#include "tok.h"
    1212#include "febase.h"
    13 #include "mmemory.h"
     13#include <omalloc.h>
    1414
    1515#include "static.h"
  • Singular/fereadl.c

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: fereadl.c,v 1.16 2000-03-09 13:18:58 Singular Exp $ */
     4/* $Id: fereadl.c,v 1.17 2000-08-14 12:56:11 obachman Exp $ */
    55/*
    66* ABSTRACT: input from ttys, simulating fgets
     
    1111#include "tok.h"
    1212#include "febase.h"
    13 #include "mmemory.h"
     13#include <omalloc.h>
    1414#include "structs.h"
    1515#include "febase.h"
     
    112112        for(i=fe_hist_max-1;i>=0;i--)
    113113        {
    114           FreeL((ADDRESS)fe_hist[i]);
    115         }
    116         Free((ADDRESS)fe_hist,fe_hist_max*sizeof(char *));
     114          if (fe_hist[i] != NULL) omFree((ADDRESS)fe_hist[i]);
     115        }
     116        omFreeSize((ADDRESS)fe_hist,fe_hist_max*sizeof(char *));
    117117        fe_hist=NULL;
    118118      }
     
    279279      extern char *UP;
    280280      extern char PC;
    281       char *t_buf=(char *)Alloc(128);
     281      /* OB: why this ??? */
     282      /* char *t_buf=(char *)omAlloc(128); */
     283      char t_buf[128];
    282284      char *temp;
    283285
     
    306308
    307309    /* setup history */
    308     fe_hist=(char **)Alloc0(fe_hist_max*sizeof(char *));
     310    fe_hist=(char **)omAlloc0(fe_hist_max*sizeof(char *));
     311    omMarkAsStaticAddr(fe_hist);
    309312    fe_hist_pos=0;
    310313  }
     
    370373    if (fe_hist[fe_hist_pos]!=NULL)
    371374    {
    372       FreeL((ADDRESS)fe_hist[fe_hist_pos]);
     375      omFree((ADDRESS)fe_hist[fe_hist_pos]);
    373376    }
    374377    /* and store a duplicate */
    375     fe_hist[fe_hist_pos]=mstrdup(s);
     378    fe_hist[fe_hist_pos]=omStrDup(s);
     379    omMarkAsStaticAddr(fe_hist[fe_hist_pos]);
    376380    /* increment fe_hist_pos in a circular manner */
    377381    fe_hist_pos++;
  • Singular/ffields.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ffields.cc,v 1.24 1999-11-15 17:19:58 obachman Exp $ */
     4/* $Id: ffields.cc,v 1.25 2000-08-14 12:56:11 obachman Exp $ */
    55/*
    66* ABSTRACT: finite fields with a none-prime number of elements (via tables)
     
    1212#include "tok.h"
    1313#include "febase.h"
    14 #include "mmemory.h"
     14#include <omalloc.h>
    1515#include "numbers.h"
    1616#include "ring.h"
     
    428428  else if ((int)a==1)
    429429  {
    430     return mstrdup(nfParameter);
     430    return omStrDup(nfParameter);
    431431  }
    432432  else
    433433  {
    434     s=(char *)AllocL(4+strlen(nfParameter));
     434    s=(char *)omAlloc(4+strlen(nfParameter));
    435435    sprintf(s,"%s%d",nfParameter,(int)a);
    436436  }
     
    608608  if (nfCharQ > 1)
    609609  {
    610     Free( (ADDRESS)nfPlus1Table,nfCharQ*sizeof(CARDINAL) );
     610    omFreeSize( (ADDRESS)nfPlus1Table,nfCharQ*sizeof(CARDINAL) );
    611611    nfPlus1Table=NULL;
    612612  }
     
    640640    nfCharQ1=nfCharQ-1;
    641641    //Print("nfCharQ=%d,nfCharQ1=%d,mipo=>>%s<<\n",nfCharQ,nfCharQ1,buf);
    642     nfPlus1Table= (CARDINAL *)Alloc( (nfCharQ)*sizeof(CARDINAL) );
     642    nfPlus1Table= (CARDINAL *)omAlloc( (nfCharQ)*sizeof(CARDINAL) );
    643643    int digs = gf_tab_numdigits62( nfCharQ );
    644644    char * bufptr;
  • Singular/fglm.cc

    r4697a8a rc232af  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglm.cc,v 1.20 1999-11-24 12:29:38 wichmann Exp $
     2// $Id: fglm.cc,v 1.21 2000-08-14 12:56:12 obachman Exp $
    33
    44/****************************************
     
    2929#include "febase.h"
    3030#include "maps.h"
    31 #include "mmemory.h"
     31#include <omalloc.h>
    3232#include "kstd1.h"
    3333#include "fglm.h"
     
    144144    int * pperm;
    145145    if ( npar > 0 )
    146         pperm= (int *)Alloc0( (npar+1)*sizeof( int ) );
     146        pperm= (int *)omAlloc0( (npar+1)*sizeof( int ) );
    147147    else
    148148        pperm= NULL;
     
    160160            state= FglmIncompatibleRings;
    161161        }
    162     Free( (ADDRESS)pperm, (npar+1)*sizeof( int ) );
     162    if (pperm != NULL) // OB: ????
     163      omFreeSize( (ADDRESS)pperm, (npar+1)*sizeof( int ) );
    163164    if ( state != FglmOk ) return state;
    164165    // check if both rings are qrings or not
     
    186187        if ( state != FglmOk ) return state;
    187188        // check if dring->qideal is contained in sring->qideal:
    188         int * dsvperm = (int *)Alloc0( (nvar+1)*sizeof( int ) );
     189        int * dsvperm = (int *)omAlloc0( (nvar+1)*sizeof( int ) );
    189190        maFindPerm( dring->names, nvar, NULL, 0, sring->names, nvar, NULL, 0,
    190191                    dsvperm, NULL, sring->ch);
     
    201202        idDelete( & dqins );
    202203        idDelete( & dqinsred );
    203         Free( (ADDRESS)dsvperm, (nvar+1)*sizeof( int ) );
     204        omFreeSize( (ADDRESS)dsvperm, (nvar+1)*sizeof( int ) );
    204205        if ( state != FglmOk ) return state;
    205206    }
     
    227228    int power;
    228229    int k;
    229     BOOLEAN * purePowers = (BOOLEAN *)Alloc( pVariables*sizeof( BOOLEAN ) );
     230    BOOLEAN * purePowers = (BOOLEAN *)omAlloc( pVariables*sizeof( BOOLEAN ) );
    230231    for ( k= pVariables-1; k >= 0; k-- )
    231232        purePowers[k]= FALSE;
     
    247248            if ( purePowers[k] == FALSE ) state= FglmNotZeroDim;
    248249    }
    249     Free( (ADDRESS)purePowers, pVariables*sizeof( BOOLEAN ) );
     250    omFreeSize( (ADDRESS)purePowers, pVariables*sizeof( BOOLEAN ) );
    250251    return state;
    251252}
     
    266267    ring sourceRing = currRing;
    267268
    268     int * vperm = (int *)Alloc0( (pVariables+1)*sizeof( int ) );
     269    int * vperm = (int *)omAlloc0( (pVariables+1)*sizeof( int ) );
    269270    state= fglmConsistency( sourceRingHdl, destRingHdl, vperm );
    270     Free( (ADDRESS)vperm, (pVariables+1)*sizeof(int) );
     271    omFreeSize( (ADDRESS)vperm, (pVariables+1)*sizeof(int) );
    271272
    272273    if ( state == FglmOk ) {
  • Singular/fglmcomb.cc

    r4697a8a rc232af  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmcomb.cc,v 1.16 1999-11-15 17:20:01 obachman Exp $
     2// $Id: fglmcomb.cc,v 1.17 2000-08-14 12:56:12 obachman Exp $
    33
    44/****************************************
     
    2525#include "febase.h"
    2626#include "maps.h"
    27 #include "mmemory.h"
     27#include <omalloc.h>
    2828#include "fglmvec.h"
    2929#include "fglmgauss.h"
     
    185185
    186186    // Allcoate Memory and initialize sets
    187     m= (polyset)Alloc( numMonoms * sizeof( poly ) );
     187    m= (polyset)omAlloc( numMonoms * sizeof( poly ) );
    188188    poly temp= monset;
    189189    for ( k= 0; k < numMonoms; k++ ) {
     
    197197    }
    198198
    199     nf= (polyset)Alloc( numMonoms * sizeof( poly ) );
     199    nf= (polyset)omAlloc( numMonoms * sizeof( poly ) );
    200200
    201201#ifndef HAVE_EXPLICIT_CONSTR
    202202    mv= new fglmVector[ numMonoms ];
    203203#else
    204     mv= (fglmVector *)Alloc( numMonoms * sizeof( fglmVector ) );
     204    mv= (fglmVector *)omAlloc( numMonoms * sizeof( fglmVector ) );
    205205#endif
    206206
     
    208208    v= new fglmVector[ numMonoms ];
    209209#else
    210     v= (fglmVector *)Alloc( numMonoms * sizeof( fglmVector ) );
     210    v= (fglmVector *)omAlloc( numMonoms * sizeof( fglmVector ) );
    211211#endif
    212212
    213213    basisMax= basisBS;
    214     basis= (polyset)Alloc( basisMax * sizeof( poly ) );
    215 
    216     weights= (int *)Alloc( IDELEMS( source ) * sizeof( int ) );
     214    basis= (polyset)omAlloc( basisMax * sizeof( poly ) );
     215
     216    weights= (int *)omAlloc( IDELEMS( source ) * sizeof( int ) );
    217217    STICKYPROT( "weights: " );
    218218    for ( k= 0; k < IDELEMS( source ); k++ ) {
     
    227227    }
    228228    STICKYPROT( "\n" );
    229     lengthes= (int *)Alloc( numMonoms * sizeof( int ) );
    230     order= (int *)Alloc( numMonoms * sizeof( int ) );
     229    lengthes= (int *)omAlloc( numMonoms * sizeof( int ) );
     230    order= (int *)omAlloc( numMonoms * sizeof( int ) );
    231231
    232232    // calculate the NormalForm in a special way
     
    255255                {
    256256                    // Expand the basis
    257                     basis= (polyset)ReAlloc( basis, basisMax * sizeof( poly ), (basisMax + basisBS ) * sizeof( poly ) );
     257                    basis= (polyset)omReallocSize( basis, basisMax * sizeof( poly ), (basisMax + basisBS ) * sizeof( poly ) );
    258258                    basisMax+= basisBS;
    259259                }
     
    304304    }
    305305    // Free Memory not needed anymore
    306     Free( (ADDRESS)nf, numMonoms * sizeof( poly ) );
    307     Free( (ADDRESS)weights, IDELEMS( source ) * sizeof( int ) );
     306    omFreeSize( (ADDRESS)nf, numMonoms * sizeof( poly ) );
     307    omFreeSize( (ADDRESS)weights, IDELEMS( source ) * sizeof( int ) );
    308308
    309309    STICKYPROT2( "\nbasis size: %i\n", basisSize );
     
    395395    }
    396396    // Free Memory
    397     Free( (ADDRESS)lengthes, numMonoms * sizeof( int ) );
    398     Free( (ADDRESS)order, numMonoms * sizeof( int ) );
     397    omFreeSize( (ADDRESS)lengthes, numMonoms * sizeof( int ) );
     398    omFreeSize( (ADDRESS)order, numMonoms * sizeof( int ) );
    399399//     for ( k= 0; k < numMonoms; k++ )
    400400//         v[k].~fglmVector();
     
    402402    delete [] v;
    403403#else
    404     Free( (ADDRESS)v, numMonoms * sizeof( fglmVector ) );
     404    omFreeSize( (ADDRESS)v, numMonoms * sizeof( fglmVector ) );
    405405#endif
    406406
    407407    for ( k= 0; k < basisSize; k++ )
    408408        pDelete( basis + k );
    409     Free( (ADDRESS)basis, basisMax * sizeof( poly ) );
     409    omFreeSize( (ADDRESS)basis, basisMax * sizeof( poly ) );
    410410
    411411#ifndef HAVE_EXPLICIT_CONSTR
     
    414414    for ( k= 0; k < numMonoms; k++ )
    415415        mv[k].~fglmVector();
    416     Free( (ADDRESS)mv, numMonoms * sizeof( fglmVector ) );
     416    omFreeSize( (ADDRESS)mv, numMonoms * sizeof( fglmVector ) );
    417417#endif
    418418
    419419    for ( k= 0; k < numMonoms; k++ )
    420420        pDelete( m + k );
    421     Free( (ADDRESS)m, numMonoms * sizeof( poly ) );
     421    omFreeSize( (ADDRESS)m, numMonoms * sizeof( poly ) );
    422422
    423423    STICKYPROT( "\n" );
     
    448448    }
    449449    // Allocate Memory
    450     m= (polyset)Alloc( numMonoms * sizeof( poly ) );
    451     nf= (polyset)Alloc( numMonoms * sizeof( poly ) );
     450    m= (polyset)omAlloc( numMonoms * sizeof( poly ) );
     451    nf= (polyset)omAlloc( numMonoms * sizeof( poly ) );
    452452    // Warning: The fglmVectors in v are yet not initialized
    453     v= (fglmVector *)Alloc( numMonoms * sizeof( fglmVector ) );
     453    v= (fglmVector *)omAlloc( numMonoms * sizeof( fglmVector ) );
    454454    basisMax= basisBS;
    455     basis= (polyset)Alloc( basisMax * sizeof( poly ) );
     455    basis= (polyset)omAlloc( basisMax * sizeof( poly ) );
    456456
    457457    // get the NormalForm and the basis monomials
     
    478478                // Expand the basis
    479479                if ( basisSize == basisMax ) {
    480                     basis= (polyset)ReAlloc( basis, basisMax * sizeof( poly ), (basisMax + basisBS ) * sizeof( poly ) );
     480                    basis= (polyset)omReallocSize( basis, basisMax * sizeof( poly ), (basisMax + basisBS ) * sizeof( poly ) );
    481481                    basisMax+= basisBS;
    482482                }
     
    550550        pDelete( nf + k );
    551551    }
    552     Free( (ADDRESS)m, numMonoms * sizeof( poly ) );
    553     Free( (ADDRESS)nf, numMonoms * sizeof( poly ) );
     552    omFreeSize( (ADDRESS)m, numMonoms * sizeof( poly ) );
     553    omFreeSize( (ADDRESS)nf, numMonoms * sizeof( poly ) );
    554554    // Warning: At this point all Vectors in v have to be initialized
    555555    for ( k= numMonoms - 1; k >= 0; k-- ) v[k].~fglmVector();
    556     Free( (ADDRESS)v, numMonoms * sizeof( fglmVector ) );
     556    omFreeSize( (ADDRESS)v, numMonoms * sizeof( fglmVector ) );
    557557    for ( k= 0; k < basisSize; k++ )
    558558        pDelete( basis + k );
    559     Free( (ADDRESS)basis, basisMax * sizeof( poly ) );
     559    omFreeSize( (ADDRESS)basis, basisMax * sizeof( poly ) );
    560560    STICKYPROT( "\n" );
    561561    return comb;
  • Singular/fglmgauss.cc

    r4697a8a rc232af  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmgauss.cc,v 1.11 1999-11-15 17:20:01 obachman Exp $
     2// $Id: fglmgauss.cc,v 1.12 2000-08-14 12:56:13 obachman Exp $
    33
    44/****************************************
     
    1515#include "structs.h"
    1616#include "numbers.h"
    17 #include "mmemory.h"
     17#include <omalloc.h>
    1818
    1919#include "fglmvec.h"
     
    6262    elems= new gaussElem[ max+1 ];
    6363#else
    64     elems= (gaussElem *)Alloc( (max+1)*sizeof( gaussElem ) );
    65 #endif
    66     isPivot= (BOOLEAN *)Alloc( (max+1)*sizeof( BOOLEAN ) );
     64    elems= (gaussElem *)omAlloc( (max+1)*sizeof( gaussElem ) );
     65#endif
     66    isPivot= (BOOLEAN *)omAlloc( (max+1)*sizeof( BOOLEAN ) );
    6767    for ( k= max; k > 0; k-- )
    6868            isPivot[k]= FALSE;
    69     perm= (int *)Alloc( (max+1)*sizeof( int ) );
     69    perm= (int *)omAlloc( (max+1)*sizeof( int ) );
    7070}
    7171
     
    7979    for ( k= size; k > 0; k-- )
    8080        elems[k].~gaussElem();
    81     Free( (ADDRESS)elems, (max+1)*sizeof( gaussElem ) );
    82 #endif
    83 
    84     Free( (ADDRESS)isPivot, (max+1)*sizeof( BOOLEAN ) );
    85     Free( (ADDRESS)perm, (max+1)*sizeof( int ) );
     81    omFreeSize( (ADDRESS)elems, (max+1)*sizeof( gaussElem ) );
     82#endif
     83
     84    omFreeSize( (ADDRESS)isPivot, (max+1)*sizeof( BOOLEAN ) );
     85    omFreeSize( (ADDRESS)perm, (max+1)*sizeof( int ) );
    8686}
    8787
  • Singular/fglmhom.cc

    r4697a8a rc232af  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmhom.cc,v 1.15 1999-11-15 17:20:02 obachman Exp $
     2// $Id: fglmhom.cc,v 1.16 2000-08-14 12:56:15 obachman Exp $
    33
    44/****************************************
     
    2626#include "febase.h"
    2727#include "maps.h"
    28 #include "mmemory.h"
     28#include <omalloc.h>
    2929#include "fglm.h"
    3030#include "fglmvec.h"
     
    167167                // Expand array using Singulars ReAlloc function
    168168                dat->monlist=
    169                     (homogElem * )ReAlloc( dat->monlist,
     169                    (homogElem * )omReallocSize( dat->monlist,
    170170                                           (dat->monlistmax)*sizeof( homogElem ),
    171171                                           (dat->monlistmax+dat->monlistblock) * sizeof( homogElem ) );
     
    215215mapMonoms( ring oldRing, homogData & dat )
    216216{
    217     int * vperm = (int *)Alloc( (currRing->N + 1)*sizeof(int) );
     217    int * vperm = (int *)omAlloc( (currRing->N + 1)*sizeof(int) );
    218218    maFindPerm( oldRing->names, oldRing->N, NULL, 0, currRing->names, currRing->N, NULL, 0, vperm, NULL );
    219219    //nSetMap( oldRing->ch, oldRing->parameter, oldRing->P, oldRing->minpoly );
     
    353353    int s;
    354354    dat.sourceIdeal= sourceIdeal;
    355     dat.sourceHeads= (doublepoly *)Alloc( IDELEMS( sourceIdeal ) * sizeof( doublepoly ) );
     355    dat.sourceHeads= (doublepoly *)omAlloc( IDELEMS( sourceIdeal ) * sizeof( doublepoly ) );
    356356    for ( s= IDELEMS( sourceIdeal ) - 1; s >= 0; s-- ) {
    357357        dat.sourceHeads[s].sm= pHead( (sourceIdeal->m)[s] );
     
    362362
    363363    // Map the sourceHeads to the destRing
    364     int * vperm = (int *)Alloc( (sourceRing->N + 1)*sizeof(int) );
     364    int * vperm = (int *)omAlloc( (sourceRing->N + 1)*sizeof(int) );
    365365    maFindPerm( sourceRing->names, sourceRing->N, NULL, 0, currRing->names,
    366366                currRing->N, NULL, 0, vperm, NULL, currRing->ch);
     
    381381        dat.monlistmax= dat.monlistblock;
    382382#ifdef HAVE_EXPLICIT_CONSTR
    383         dat.monlist= (homogElem *)Alloc( dat.monlistmax*sizeof( homogElem ) );
     383        dat.monlist= (homogElem *)omAlloc( dat.monlistmax*sizeof( homogElem ) );
    384384        int j;
    385385        for ( j= dat.monlistmax - 1; j >= 0; j-- ) dat.monlist[j].homogElem();
     
    412412
    413413#ifdef HAVE_EXPLICIT_CONSTR
    414         Free( (ADDRESS)dat.monlist, dat.monlistmax*sizeof( homogElem ) );
     414        omFreeSize( (ADDRESS)dat.monlist, dat.monlistmax*sizeof( homogElem ) );
    415415#else
    416416        delete [] dat.monlist;
  • Singular/fglmvec.cc

    r4697a8a rc232af  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmvec.cc,v 1.12 1999-11-15 17:20:02 obachman Exp $
     2// $Id: fglmvec.cc,v 1.13 2000-08-14 12:56:15 obachman Exp $
    33
    44/****************************************
     
    1616
    1717#ifdef HAVE_FGLM
    18 #include "mmemory.h"
     18#include <omalloc.h>
    1919#include "tok.h"
    2020#include "structs.h"
     
    4444            elems= 0;
    4545        else {
    46             elems= (number *)Alloc( N*sizeof( number ) );
     46            elems= (number *)omAlloc( N*sizeof( number ) );
    4747            for ( int i= N-1; i >= 0; i-- )
    4848                elems[i]= nInit( 0 );
     
    5454            for ( int i= N-1; i >= 0; i-- )
    5555                nDelete( elems + i );
    56             Free( (ADDRESS)elems, N*sizeof( number ) );
     56            omFreeSize( (ADDRESS)elems, N*sizeof( number ) );
    5757        }
    5858    }
     
    6262        if ( N > 0 ) {
    6363            number * elems_clone;
    64             elems_clone= (number *)Alloc( N*sizeof( number ) );
     64            elems_clone= (number *)omAlloc( N*sizeof( number ) );
    6565            for ( int i= N-1; i >= 0; i-- )
    6666                elems_clone[i] = nCopy( elems[i] );
     
    208208    {
    209209        number* newelems;
    210         newelems= (number *)Alloc( rep->size()*sizeof( number ) );
     210        newelems= (number *)omAlloc( rep->size()*sizeof( number ) );
    211211        for ( i= vsize; i > 0; i-- ) {
    212212            term1= nMult( fac1, rep->getconstelem( i ) );
     
    283283        int n = rep->size();
    284284        number* newelems;
    285         newelems= (number *)Alloc( n*sizeof( number ) );
     285        newelems= (number *)omAlloc( n*sizeof( number ) );
    286286        for ( i= n; i > 0; i-- )
    287287            newelems[i-1]= nAdd( rep->getconstelem( i ), v.rep->getconstelem( i ) );
     
    305305        int n = rep->size();
    306306        number* newelems;
    307         newelems= (number *)Alloc( n*sizeof( number ) );
     307        newelems= (number *)omAlloc( n*sizeof( number ) );
    308308        for ( i= n; i > 0; i-- )
    309309            newelems[i-1]= nSub( rep->getconstelem( i ), v.rep->getconstelem( i ) );
     
    321321    if ( ! rep->isUnique() ) {
    322322        number * temp;
    323         temp= (number *)Alloc( s*sizeof( number ) );
     323        temp= (number *)omAlloc( s*sizeof( number ) );
    324324        for ( i= s; i > 0; i-- )
    325325            temp[i-1]= nMult( rep->getconstelem( i ), n );
     
    342342    if ( ! rep->isUnique() ) {
    343343        number * temp;
    344         temp= (number *)Alloc( s*sizeof( number ) );
     344        temp= (number *)omAlloc( s*sizeof( number ) );
    345345        for ( i= s; i > 0; i-- ) {
    346346            temp[i-1]= nDiv( rep->getconstelem( i ), n );
  • Singular/fglmzero.cc

    r4697a8a rc232af  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmzero.cc,v 1.27 1999-11-24 12:29:37 wichmann Exp $
     2// $Id: fglmzero.cc,v 1.28 2000-08-14 12:56:16 obachman Exp $
    33
    44/****************************************
     
    3030#include "febase.h"
    3131#include "maps.h"
    32 #include "mmemory.h"
     32#include <omalloc.h>
    3333#include "kstd1.h" // for kNF (see fglmquot)
    3434#include "fglm.h"
     
    9696    _nfunc= numFuncs;
    9797
    98     currentSize= (int *)Alloc( _nfunc*sizeof( int ) );
     98    currentSize= (int *)omAlloc( _nfunc*sizeof( int ) );
    9999    for ( k= _nfunc-1; k >= 0; k-- )
    100100        currentSize[k]= 0;
    101101
    102     func= (matHeader **)Alloc( _nfunc*sizeof( matHeader * ) );
     102    func= (matHeader **)omAlloc( _nfunc*sizeof( matHeader * ) );
    103103    for ( k= _nfunc-1; k >= 0; k-- )
    104         func[k]= (matHeader *)Alloc( _max*sizeof( matHeader ) );
     104        func[k]= (matHeader *)omAlloc( _max*sizeof( matHeader ) );
    105105}
    106106
     
    117117                for ( row= colp->size-1, elemp= colp->elems; row >= 0; row--, elemp++ )
    118118                    nDelete( & elemp->elem );
    119                 Free( (ADDRESS)colp->elems, colp->size*sizeof( matElem ) );
    120             }
    121         }
    122         Free( (ADDRESS)func[k], _max*sizeof( matHeader ) );
    123     }
    124     Free( (ADDRESS)func, _nfunc*sizeof( matHeader * ) );
    125     Free( (ADDRESS)currentSize, _nfunc*sizeof( int ) );
     119                omFreeSize( (ADDRESS)colp->elems, colp->size*sizeof( matElem ) );
     120            }
     121        }
     122        omFreeSize( (ADDRESS)func[k], _max*sizeof( matHeader ) );
     123    }
     124    omFreeSize( (ADDRESS)func, _nfunc*sizeof( matHeader * ) );
     125    omFreeSize( (ADDRESS)currentSize, _nfunc*sizeof( int ) );
    126126}
    127127
     
    141141    number newelem;
    142142
    143     int * perm = (int *)Alloc0( (_nfunc+1)*sizeof( int ) );
     143    int * perm = (int *)omAlloc0( (_nfunc+1)*sizeof( int ) );
    144144    maFindPerm( source->names, source->N, NULL, 0, currRing->names,
    145145                currRing->N, NULL, 0, perm, NULL , currRing->ch);
     
    148148    nSetMap( source);
    149149
    150     matHeader ** temp = (matHeader **)Alloc( _nfunc*sizeof( matHeader * ));
     150    matHeader ** temp = (matHeader **)omAlloc( _nfunc*sizeof( matHeader * ));
    151151    for ( var= 0; var < _nfunc; var ++ ) {
    152152        for ( col= 0, colp= func[var]; col < _size; col++, colp++ ) {
     
    163163        temp[ perm[var+1]-1 ]= func[var];
    164164    }
    165     Free( (ADDRESS)func, _nfunc*sizeof( matHeader * ) );
    166     Free( (ADDRESS)perm, (_nfunc+1)*sizeof( int ) );
     165    omFreeSize( (ADDRESS)func, _nfunc*sizeof( matHeader * ) );
     166    omFreeSize( (ADDRESS)perm, (_nfunc+1)*sizeof( int ) );
    167167    func= temp;
    168168}
     
    174174        int k;
    175175        for ( k= _nfunc; k > 0; k-- )
    176             func[k-1]= (matHeader *)ReAlloc( func[k-1], _max*sizeof( matHeader ), (_max + _block)*sizeof( matHeader ) );
     176            func[k-1]= (matHeader *)omReallocSize( func[k-1], _max*sizeof( matHeader ), (_max + _block)*sizeof( matHeader ) );
    177177        _max+= _block;
    178178    }
     
    187187    int k;
    188188    BOOLEAN owner = TRUE;
    189     matElem * elems = (matElem *)Alloc( sizeof( matElem ) );
     189    matElem * elems = (matElem *)omAlloc( sizeof( matElem ) );
    190190    elems->row= to;
    191191    elems->elem= nInit( 1 );
     
    212212    BOOLEAN owner = TRUE;
    213213    if ( numElems > 0 ) {
    214         elems= (matElem *)Alloc( numElems * sizeof( matElem ) );
     214        elems= (matElem *)omAlloc( numElems * sizeof( matElem ) );
    215215        for ( k= 1, l= 1, elemp= elems; k <= numElems; k++, elemp++ ) {
    216216            while ( nIsZero( to.getconstelem(l) ) ) l++;
     
    316316        if ( pGetExp( monom, k ) > 0 )
    317317            numVars++;
    318     divisors= (int *)Alloc( (numVars+1)*sizeof( int ) );
     318    divisors= (int *)omAlloc( (numVars+1)*sizeof( int ) );
    319319    divisors[0]= 0;
    320320    newDivisor( var );
     
    324324fglmSelem::cleanup()
    325325{
    326     Free( (ADDRESS)divisors, (numVars+1)*sizeof( int ) );
     326    omFreeSize( (ADDRESS)divisors, (numVars+1)*sizeof( int ) );
    327327}
    328328
     
    373373    basisMax= basisBS;
    374374    basisSize= 0;
    375     basis= (polyset)Alloc( basisMax*sizeof( poly ) );
     375    basis= (polyset)omAlloc( basisMax*sizeof( poly ) );
    376376
    377377    borderBS= 100;
     
    381381    border= new borderElem[ borderMax ];
    382382#else
    383     border= (borderElem *)Alloc( borderMax*sizeof( borderElem ) );
     383    border= (borderElem *)omAlloc( borderMax*sizeof( borderElem ) );
    384384#endif
    385385    // rem: the constructors are called in newBorderElem().
     
    391391    for ( int k = basisSize; k > 0; k-- )
    392392        pDelete1( basis + k );  //. rem: basis runs from basis[1]..basis[basisSize]
    393     Free( (ADDRESS)basis, basisMax*sizeof( poly ) );
     393    omFreeSize( (ADDRESS)basis, basisMax*sizeof( poly ) );
    394394#ifndef HAVE_EXPLICIT_CONSTR
    395395    delete [] border;
     
    398398        // rem: the polys of borderElem are deleted via ~borderElem()
    399399        border[l].~borderElem();
    400     Free( (ADDRESS)border, borderMax*sizeof( borderElem ) );
     400    omFreeSize( (ADDRESS)border, borderMax*sizeof( borderElem ) );
    401401#endif
    402402}
     
    411411    basisSize++;
    412412    if ( basisSize == basisMax ) {
    413         basis= (polyset)ReAlloc( basis, basisMax*sizeof( poly ), (basisMax + basisBS)*sizeof( poly ) );
     413        basis= (polyset)omReallocSize( basis, basisMax*sizeof( poly ), (basisMax + basisBS)*sizeof( poly ) );
    414414        basisMax+= basisBS;
    415415    }
     
    437437        border= tempborder;
    438438#else
    439         border= (borderElem *)ReAlloc( border, borderMax*sizeof( borderElem ), (borderMax + borderBS)*sizeof( borderElem ) );
     439        border= (borderElem *)omReallocSize( border, borderMax*sizeof( borderElem ), (borderMax + borderBS)*sizeof( borderElem ) );
    440440#endif
    441441        borderMax+= borderBS;
     
    770770    dimen= dimension;
    771771    basisSize= 0;
    772     //. All arrays run from [1]..[dimen], thus Alloc( dimen + 1 )!
     772    //. All arrays run from [1]..[dimen], thus omAlloc( dimen + 1 )!
    773773#ifndef HAVE_EXPLICIT_CONSTR
    774774    gauss= new oldGaussElem[ dimen+1 ];
    775775#else
    776     gauss= (oldGaussElem *)Alloc( (dimen+1)*sizeof( oldGaussElem ) );
     776    gauss= (oldGaussElem *)omAlloc( (dimen+1)*sizeof( oldGaussElem ) );
    777777#endif
    778     isPivot= (BOOLEAN *)Alloc( (dimen+1)*sizeof( BOOLEAN ) );
     778    isPivot= (BOOLEAN *)omAlloc( (dimen+1)*sizeof( BOOLEAN ) );
    779779    for ( k= dimen; k > 0; k-- ) isPivot[k]= FALSE;
    780     perm= (int *)Alloc( (dimen+1)*sizeof( int ) );
    781     basis= (polyset)Alloc( (dimen+1)*sizeof( poly ) );
     780    perm= (int *)omAlloc( (dimen+1)*sizeof( int ) );
     781    basis= (polyset)omAlloc( (dimen+1)*sizeof( poly ) );
    782782    groebnerBS= 16;
    783783    groebnerSize= 0;
     
    797797    for ( k= basisSize; k > 0; k-- )
    798798        gauss[k].~oldGaussElem();
    799     Free( (ADDRESS)gauss, (dimen+1)*sizeof( oldGaussElem ) );
     799    omFreeSize( (ADDRESS)gauss, (dimen+1)*sizeof( oldGaussElem ) );
    800800#endif
    801     Free( (ADDRESS)isPivot, (dimen+1)*sizeof( BOOLEAN ) );
    802     Free( (ADDRESS)perm, (dimen+1)*sizeof( int ) );
     801    omFreeSize( (ADDRESS)isPivot, (dimen+1)*sizeof( BOOLEAN ) );
     802    omFreeSize( (ADDRESS)perm, (dimen+1)*sizeof( int ) );
    803803    // use basisSize instead of dimen because of fglmquot!
    804804    //. Remember: There is no poly in basis[0], thus k > 0
    805805    for ( k= basisSize; k > 0; k-- )
    806806        pDelete1( basis + k );
    807     Free( (ADDRESS)basis, (dimen+1)*sizeof( poly ) );
     807    omFreeSize( (ADDRESS)basis, (dimen+1)*sizeof( poly ) );
    808808}
    809809
  • Singular/find_exec.c

    r4697a8a rc232af  
    2020
    2121#if !defined(ESINGULAR) && !defined(TSINGULAR)
    22 #include "mmemory.h"
     22#include <omalloc.h>
    2323#endif
    2424
     
    3030/* Do not return copies of sth, but simply the strings
    3131   -- we make copies later */
    32 #define copy_of(string) mstrdup(string)
     32#define copy_of(string) omStrDup(string)
    3333
    3434/* ABSOLUTE_FILENAME_P (fname): True if fname is an absolute filename */
     
    8989    {
    9090      /* we are under msdos display */
    91       extra = (char*) AllocL((search != NULL ? strlen(search) : 0) + 3);
     91      extra = (char*) omAlloc((search != NULL ? strlen(search) : 0) + 3);
    9292      strcpy(extra, ".:");
    9393      if (search != NULL) strcat(extra, search);
     
    129129#ifdef WINNT
    130130          if (extra != NULL)
    131             FreeL(extra);
     131            omFree(extra);
    132132#endif
    133133          return copy_of (tbuf);
     
    240240    if (buf[0] != '/')
    241241    {
    242       executable = (char*) AllocL(strlen(link) + ret + 1);
     242      executable = (char*) omAlloc(strlen(link) + ret + 1);
    243243      strcpy(executable, link);
    244244      strcat(executable, buf);
     
    249249    }
    250250
    251     FreeL(link);
     251    omFree(link);
    252252    return executable;
    253253  }
  • Singular/gnumpc.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gnumpc.cc,v 1.11 2000-06-27 12:07:00 pohl Exp $ */
     4/* $Id: gnumpc.cc,v 1.12 2000-08-14 12:56:17 obachman Exp $ */
    55/*
    66* ABSTRACT: computations with GMP complex floating-point numbers
     
    1212#include "tok.h"
    1313#include "febase.h"
    14 #include "mmemory.h"
     14#include <omalloc.h>
    1515#include "numbers.h"
    1616#include "modulop.h"
     
    370370    out= complexToStr(*(gmp_complex*)a,gmp_output_digits);
    371371    StringAppend(out);
    372     //    Free((ADDRESS)out, (strlen(out)+1)* sizeof(char) );
    373     FreeL( (ADDRESS)out );
     372    //    omFreeSize((ADDRESS)out, (strlen(out)+1)* sizeof(char) );
     373    omFree( (ADDRESS)out );
    374374  }
    375375}
  • Singular/gnumpfl.cc

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gnumpfl.cc,v 1.14 2000-06-27 12:07:01 pohl Exp $ */
     4/* $Id: gnumpfl.cc,v 1.15 2000-08-14 12:56:17 obachman Exp $ */
    55/*
    66* ABSTRACT: computations with GMP floating-point numbers
     
    1212#include "tok.h"
    1313#include "febase.h"
    14 #include "mmemory.h"
     14#include <omalloc.h>
    1515#include "numbers.h"
    1616#include "modulop.h"
     
    425425    out= floatToStr(*(gmp_float*)a,gmp_output_digits);
    426426    StringAppend(out);
    427     //Free((ADDRESS)out, (strlen(out)+1)* sizeof(char) );
    428     FreeL( (ADDRESS)out );
     427    //omFreeSize((ADDRESS)out, (strlen(out)+1)* sizeof(char) );
     428    omFree( (ADDRESS)out );
    429429  }
    430430  else
  • Singular/grammar.y

    r4697a8a rc232af  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: grammar.y,v 1.81 2000-05-25 09:02:02 Singular Exp $ */
     4/* $Id: grammar.y,v 1.82 2000-08-14 12:56:17 obachman Exp $ */
    55/*
    66* ABSTRACT: SINGULAR shell grammatik
     
    2727
    2828#include "mod2.h"
     29#include <omalloc.h>
    2930#include "tok.h"
    3031#include "stype.h"
     
    3536#include "ring.h"
    3637#include "kstd1.h"
    37 #include "mmemory.h"
    3838#include "subexpr.h"
    3939#include "ipshell.h"
     
    416416        ;
    417417
    418 example_dummy : EXAMPLE_CMD BLOCKTOK { FreeL((ADDRESS)$2); }
     418example_dummy : EXAMPLE_CMD BLOCKTOK { omFree((ADDRESS)$2); }
    419419
    420420command: assign
     
    439439          {
    440440            if (currRing==NULL) MYYERROR("no ring active");
    441             syMake(&$$,mstrdup($1));
     441            syMake(&$$,omStrDup($1));
    442442          }
    443443        | extendedid
     
    461461            else
    462462            {
    463               $1.next=(leftv)AllocSizeOf(sleftv);
     463              $1.next=(leftv)omAllocBin(sleftv_bin);
    464464              memcpy($1.next,&$3,sizeof(sleftv));
    465465              if(iiExprArithM(&$$,&$1,'(')) YYERROR;
     
    498498            memset(&$$,0,sizeof($$));
    499499            int i = atoi($1);
    500             /*remember not to FreeL($1)
     500            /*remember not to omFree($1)
    501501            *because it is a part of the scanner buffer*/
    502502            $$.rtyp  = INT_CMD;
     
    517517                  YYERROR;
    518518                }
    519                 char *t1=mstrdup($1);
     519                char *t1=omStrDup($1);
    520520                syMake(&$$,t1);
    521521              }
     
    544544              v=v->next;
    545545            }
    546             v->next = (leftv)AllocSizeOf(sleftv);
     546            v->next = (leftv)omAllocBin(sleftv_bin);
    547547            memcpy(v->next,&($3),sizeof(sleftv));
    548548            $$ = $1;
     
    868868            idhdl h=(idhdl)v->data;
    869869            delete IDINTVEC(h);
    870             IDINTVEC(h) = NewIntvec3(r,c,0);
     870            IDINTVEC(h) = new intvec(r,c,0);
    871871            if (IDINTVEC(h)==NULL) YYERROR;
    872872          }
     
    880880               h=(idhdl)v->data;
    881881               delete IDINTVEC(h);
    882                IDINTVEC(h) = NewIntvec3(1,1,0);
     882               IDINTVEC(h) = new intvec(1,1,0);
    883883               v=v->next;
    884884            } while (v!=NULL);
     
    899899            leftv v=&$1;
    900900            while (v->next!=NULL) v=v->next;
    901             v->next=(leftv)AllocSizeOf(sleftv);
     901            v->next=(leftv)omAllocBin(sleftv_bin);
    902902            memcpy(v->next,&r,sizeof(sleftv));
    903903            $$=$1;
     
    922922              v=v->next;
    923923            }
    924             v->next = (leftv)AllocSizeOf(sleftv);
     924            v->next = (leftv)omAllocBin(sleftv_bin);
    925925            memcpy(v->next,&($4),sizeof(sleftv));
    926926            $$ = $2;
     
    940940          {
    941941            memset(&$$,0,sizeof($$));
    942             intvec *iv = NewIntvec1(2);
     942            intvec *iv = new intvec(2);
    943943            (*iv)[0] = 1;
    944944            (*iv)[1] = $1;
     
    954954              slLength =  exprlist_length(sl);
    955955              int l = 2 +  slLength;
    956               intvec *iv = NewIntvec1(l);
     956              intvec *iv = new intvec(l);
    957957              (*iv)[0] = slLength;
    958958              (*iv)[1] = $1;
     
    995995          {
    996996            $$ = $1;
    997             $$.next = (sleftv *)AllocSizeOf(sleftv);
     997            $$.next = (sleftv *)omAllocBin(sleftv_bin);
    998998            memcpy($$.next,&$3,sizeof(sleftv));
    999999          }
     
    10311031          {
    10321032            feHelp($2);
    1033             FreeL((ADDRESS)$2);
     1033            omFree((ADDRESS)$2);
    10341034          }
    10351035        | HELP_CMD ';'
     
    10431043          {
    10441044            singular_example($2);
    1045             FreeL((ADDRESS)$2);
     1045            omFree((ADDRESS)$2);
    10461046          }
    10471047       ;
     
    10621062           ($4.Typ()!=STRING_CMD)))
    10631063            MYYERROR("export <id> to <package|int>");
    1064           FreeL((ADDRESS)$3);
     1064          omFree((ADDRESS)$3);
    10651065          if ($4.Typ()==INT_CMD)
    10661066          {
     
    12961296                if( (((sleftv)$2).req_packhdl != NULL) &&
    12971297                    (((sleftv)$2).packhdl != ((sleftv)$2).req_packhdl))
    1298                   ring_name = mstrdup($2.name);
     1298                  ring_name = omStrDup($2.name);
    12991299              }
    13001300            #endif /* HAVE_NAMESPACES */
     
    13091309              if (newRingHdl!=NULL)
    13101310              {
    1311                 Free(IDRING(newRingHdl),sizeof(ip_sring));
     1311                omFreeSize(IDRING(newRingHdl),sizeof(ip_sring));
    13121312                IDRING(newRingHdl)=b;
    13131313              }
     
    13411341                if( (((sleftv)$2).req_packhdl != NULL) &&
    13421342                  (((sleftv)$2).packhdl != ((sleftv)$2).req_packhdl))
    1343                   ring_name = mstrdup($2.name);
     1343                  ring_name = omStrDup($2.name);
    13441344              }
    13451345            #endif /* HAVE_NAMESPACES */
     
    14611461                {
    14621462                  Werror("`%s` is undefined",$1.name);
    1463                   FreeL((ADDRESS)$1.name);
     1463                  omFree((ADDRESS)$1.name);
    14641464                }
    14651465                YYERROR;
     
    14871487            else
    14881488            {
    1489               FreeL((ADDRESS)$5);
     1489              omFree((ADDRESS)$5);
    14901490              currentVoice->ifsw=1;
    14911491            }
     
    15041504                Warn("`else` without `if` in level %d",myynest);
    15051505              }
    1506               FreeL((ADDRESS)$2);
     1506              omFree((ADDRESS)$2);
    15071507            }
    15081508            currentVoice->ifsw=0;
     
    15331533          {
    15341534            /* -> if(!$2) break; $3; continue;*/
    1535             char * s = (char *)AllocL( strlen($2) + strlen($3) + 36);
     1535            char * s = (char *)omAlloc( strlen($2) + strlen($3) + 36);
    15361536            sprintf(s,"whileif (!(%s)) break;\n%scontinue;\n " ,$2,$3);
    15371537            newBuffer(s,BT_break);
    1538             FreeL((ADDRESS)$2);
    1539             FreeL((ADDRESS)$3);
     1538            omFree((ADDRESS)$2);
     1539            omFree((ADDRESS)$3);
    15401540          }
    15411541        ;
     
    15461546            /* $2 */
    15471547            /* if (!$3) break; $5; $4; continue; */
    1548             char * s = (char *)AllocL( strlen($3)+strlen($4)+strlen($5)+36);
     1548            char * s = (char *)omAlloc( strlen($3)+strlen($4)+strlen($5)+36);
    15491549            sprintf(s,"forif (!(%s)) break;\n%s%s;\ncontinue;\n "
    15501550                   ,$3,$5,$4);
    1551             FreeL((ADDRESS)$3);
    1552             FreeL((ADDRESS)$4);
    1553             FreeL((ADDRESS)$5);
     1551            omFree((ADDRESS)$3);
     1552            omFree((ADDRESS)$4);
     1553            omFree((ADDRESS)$5);
    15541554            newBuffer(s,BT_break);
    1555             s = (char *)AllocL( strlen($2) + 3);
     1555            s = (char *)omAlloc( strlen($2) + 3);
    15561556            sprintf(s,"%s;\n",$2);
    1557             FreeL((ADDRESS)$2);
     1557            omFree((ADDRESS)$2);
    15581558            newBuffer(s,BT_if);
    15591559          }
     
    15651565            procinfov pi;
    15661566            idhdl h = enterid($2,myynest,PROC_CMD,&IDROOT,TRUE);
    1567             if (h==NULL) {FreeL((ADDRESS)$3); YYERROR;}
     1567            if (h==NULL) {omFree((ADDRESS)$3); YYERROR;}
    15681568            iiInitSingularProcinfo(IDPROC(h),"", $2, 0, 0);
    1569             IDPROC(h)->data.s.body = (char *)AllocL(strlen($3)+31);;
     1569            IDPROC(h)->data.s.body = (char *)omAlloc(strlen($3)+31);;
    15701570            sprintf(IDPROC(h)->data.s.body,"parameter list #;\n%s;return();\n\n",$3);
    1571             FreeL((ADDRESS)$3);
     1571            omFree((ADDRESS)$3);
    15721572          }
    15731573        | PROC_DEF STRINGTOK BLOCKTOK
     
    15761576            if (h==NULL)
    15771577            {
    1578               FreeL((ADDRESS)$2);
    1579               FreeL((ADDRESS)$3);
     1578              omFree((ADDRESS)$2);
     1579              omFree((ADDRESS)$3);
    15801580              YYERROR;
    15811581            }
    15821582            char *args=iiProcArgs($2,FALSE);
    1583             FreeL((ADDRESS)$2);
     1583            omFree((ADDRESS)$2);
    15841584            procinfov pi;
    15851585            iiInitSingularProcinfo(IDPROC(h),"", $1, 0, 0);
    1586             IDPROC(h)->data.s.body = (char *)AllocL(strlen($3)+strlen(args)+14);;
     1586            IDPROC(h)->data.s.body = (char *)omAlloc(strlen($3)+strlen(args)+14);;
    15871587            sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,$3);
    1588             FreeL((ADDRESS)args);
    1589             FreeL((ADDRESS)$3);
     1588            omFree((ADDRESS)args);
     1589            omFree((ADDRESS)$3);
    15901590          }
    15911591        | PROC_DEF STRINGTOK STRINGTOK BLOCKTOK
    15921592          {
    1593             FreeL((ADDRESS)$3);
     1593            omFree((ADDRESS)$3);
    15941594            idhdl h = enterid($1,myynest,PROC_CMD,&IDROOT,TRUE);
    15951595            if (h==NULL)
    15961596            {
    1597               FreeL((ADDRESS)$2);
    1598               FreeL((ADDRESS)$4);
     1597              omFree((ADDRESS)$2);
     1598              omFree((ADDRESS)$4);
    15991599              YYERROR;
    16001600            }
    16011601            char *args=iiProcArgs($2,FALSE);
    1602             FreeL((ADDRESS)$2);
     1602            omFree((ADDRESS)$2);
    16031603            procinfov pi;
    16041604            iiInitSingularProcinfo(IDPROC(h),"", $1, 0, 0);
    1605             IDPROC(h)->data.s.body = (char *)AllocL(strlen($4)+strlen(args)+14);;
     1605            IDPROC(h)->data.s.body = (char *)omAlloc(strlen($4)+strlen(args)+14);;
    16061606            sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,$4);
    1607       &n