diff -urN MLC++-2.01/T2/Makefile MLC++-2.01-MFP/T2/Makefile --- MLC++-2.01/T2/Makefile Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/T2/Makefile Fri Nov 14 04:33:32 1997 @@ -0,0 +1,19 @@ +#CC = $(TOOLROOT)/usr/bin/cc -woff 1116,1110 +#CC = $(MLC_C) -woff 1116,1110 +CC = gcc + +All: T2-int T2 + +T2-int: buildtree.o getnames.o lists.o output.o \ + getdata.o init.o main-int.o misc.o splits.o + $(CC) -O2 -o T2-int buildtree.o getnames.o lists.o output.o \ + getdata.o init.o main-int.o misc.o splits.o + +T2: buildtree.o getnames.o lists.o output.o \ + getdata.o init.o main.o misc.o splits.o + $(CC) -O2 -o T2 buildtree.o getnames.o lists.o output.o \ + getdata.o init.o main.o misc.o splits.o + +clean: + touch foo.o + rm -f T2 T2-int *.o diff -urN MLC++-2.01/T2/makefile MLC++-2.01-MFP/T2/makefile --- MLC++-2.01/T2/makefile Sat Nov 29 04:36:53 1997 +++ MLC++-2.01-MFP/T2/makefile Wed Dec 31 18:00:00 1969 @@ -1,17 +0,0 @@ -CC = $(TOOLROOT)/usr/bin/cc -woff 1116,1110 - -All: T2-int T2 - -T2-int: buildtree.o getnames.o lists.o output.o \ - getdata.o init.o main-int.o misc.o splits.o - $(CC) -O2 -o T2-int buildtree.o getnames.o lists.o output.o \ - getdata.o init.o main-int.o misc.o splits.o - -T2: buildtree.o getnames.o lists.o output.o \ - getdata.o init.o main.o misc.o splits.o - $(CC) -O2 -o T2 buildtree.o getnames.o lists.o output.o \ - getdata.o init.o main.o misc.o splits.o - -clean: - touch foo.o - rm -f T2 T2-int *.o diff -urN MLC++-2.01/bin/buildleda MLC++-2.01-MFP/bin/buildleda --- MLC++-2.01/bin/buildleda Sat Nov 22 04:35:47 1997 +++ MLC++-2.01-MFP/bin/buildleda Thu Jul 22 09:41:15 1999 @@ -37,6 +37,7 @@ fi # If in "make" mode, check if we have the LEDA libraries +if 0; then if [ "$opmode" = "make" -a -d $libdir ]; then if [ -r $libdir/libG${libsuffix} -a -r $libdir/libL${libsuffix} ] ; then opmode=none @@ -51,6 +52,7 @@ fi fi fi +fi # Stop the build now if needed if [ "$opmode" = "none" ] ; then @@ -110,11 +112,13 @@ # Build LEDA cd src -if make clean; then - echo "Clean finished" -else - echo "*** Make Clean for LEDA failed ***" - exit 1 +if [ "$opmode" = "clean" ] ; then + if make clean; then + echo "Clean finished" + else + echo "*** Make Clean for LEDA failed ***" + exit 1 + fi fi if [ "$opmode" != "clean" ] ; then @@ -130,8 +134,13 @@ cd .. rm -f $libdir/libG$libsuffix rm -f $libdir/libL$libsuffix - cp ./libG$libsuffix $libdir/libG$libsuffix - cp ./libL$libsuffix $libdir/libL$libsuffix + echo "Copying LEDA" + if [ "$MLC_COMPILER" = "GNU" -a "$MLC_DYNAMIC" = "yes" ]; then + cp libL.so $dsolibdir + cp libG.so $dsolibdir + fi + cp libL$libsuffix $libdir + cp libG$libsuffix $libdir # Under MIPS_PRO ONLY, build dsos from libG and libL. # place these in the dso directory diff -urN MLC++-2.01/bin/buildlib MLC++-2.01-MFP/bin/buildlib --- MLC++-2.01/bin/buildlib Fri Nov 14 04:35:46 1997 +++ MLC++-2.01-MFP/bin/buildlib Mon Jul 19 16:13:28 1999 @@ -136,7 +136,12 @@ ############## GNU COMPILE ################# elif [ "$MLC_COMPILER" = "GNU" ] ; then if [ "$CCECHO" = "yes" ]; then - echo ar cq $libname $templname $* + echo "ar cq $libname $templname $*" + fi + if [ "$MLC_DYNAMIC" = "yes" ]; then + dsoname=`basename $libname .a.tmp`.so + echo "Building dso $dsoname from $libname" + gcc -shared -o $dsolibdir/$dsoname $* fi ar cq $libname $templname $* pgmStatus=$? diff -urN MLC++-2.01/bin/mlc_cc MLC++-2.01-MFP/bin/mlc_cc --- MLC++-2.01/bin/mlc_cc Wed Nov 26 04:35:44 1997 +++ MLC++-2.01-MFP/bin/mlc_cc Wed Jul 21 16:55:15 1999 @@ -262,7 +262,7 @@ UNDEFINE_PREFIX="-U" # Optimization modes - if [ "$MLC_MODE" = "fast" ] ; then + if [ "$MLC_MODE" = "fast" -o "$MLC_MODE" = "parallel" ] ; then OPTFLAGS="-O2 -DFAST" elif [ "$MLC_MODE" = "fastdbg" ] ; then OPTFLAGS="-g -DFAST" @@ -286,10 +286,10 @@ # Set compiler flags; c vs c++ if [ "$straightc" = "yes" ] ; then CC=gcc - CCFLAGS="$INCFLAGS $OSFLAGS -DGNU -fno-for-scope" + CCFLAGS="-fPIC $INCFLAGS $OSFLAGS -DGNU -fno-for-scope" else CC=g++ - CCFLAGS="$OPTFLAGS $INCFLAGS -DCOMPILE_TIME_TEMPLATES $OSFLAGS -DGNU -fno-for-scope" + CCFLAGS="-fPIC $OPTFLAGS $INCFLAGS -DCOMPILE_TIME_TEMPLATES $OSFLAGS -DGNU -fno-for-scope" fi LINKFLAGS="$WLINKFLAGS" @@ -339,7 +339,7 @@ fi # slow mode vs fast mode - if [ "$MLC_MODE" = "fast" ] ; then + if [ "$MLC_MODE" = "fast" -o "$MLC_MODE" = "parallel" ] ; then OPTFLAGS="$FASTFLAGS -DFAST" elif [ "$MLC_MODE" = "fastdbg" ] ; then OPTFLAGS="$SLOWFLAGS -DFAST" diff -urN MLC++-2.01/cn2/Make-GNU MLC++-2.01-MFP/cn2/Make-GNU --- MLC++-2.01/cn2/Make-GNU Fri Nov 14 04:33:32 1997 +++ MLC++-2.01-MFP/cn2/Make-GNU Thu Jul 22 11:45:22 1999 @@ -16,8 +16,8 @@ # comment out the LIBS line later in this file. If you forget to # do this, then the filename completion in the CN2 interactive # loop will produce names with the first two characters "chopped off". -CFLAGS = -g -D_HAVE_FLOAT_H -D_USE_TIOCSTI -LIBS = -lc -lm -ll /usr/ucblib/libucb.a +#CFLAGS = -g -D_HAVE_FLOAT_H -D_USE_TIOCSTI +#LIBS = -lc -lm -ll /usr/ucblib/libucb.a # HP-UX # CFLAGS = -g -D_HAVE_FLOAT_H -D_HAVE_LOG2 @@ -26,7 +26,7 @@ # CFLAGS = -g -cckr -D_HAVE_FLOAT_H -woff 1116,1110,1167,1551 # Linux -# CFLAGS = -D_HAVE_FLOAT_H -D_USE_TIOCSTI +CFLAGS = -D_HAVE_FLOAT_H #-D_USE_TIOCSTI LIBS = -lm diff -urN MLC++-2.01/cn2/Makefile MLC++-2.01-MFP/cn2/Makefile --- MLC++-2.01/cn2/Makefile Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/cn2/Makefile Thu Jul 22 11:45:22 1999 @@ -0,0 +1,137 @@ +# SccsId = "@(#)Makefile 5.1 9/25/91 MLT" + +BINDIR = "../bin" + +# ---------------------------------------------------------------------- +# Uncomment the proper CFLAGS line for your machine. +# ---------------------------------------------------------------------- + +# SunOS (compiles as original distribution) +# CFLAGS = -g -D_TTYOLD -D_HAVE_LOG2 -D_USE_TIOCSTI + +# SunOS (if you want to use termios rather than old-style terminal I/O) +#CFLAGS = -g -D_HAVE_LOG2 -D_USE_TIOCSTI + +# Solaris - note that you will need to use the LIBS defined here, and +# comment out the LIBS line later in this file. If you forget to +# do this, then the filename completion in the CN2 interactive +# loop will produce names with the first two characters "chopped off". +#CFLAGS = -g -D_HAVE_FLOAT_H -D_USE_TIOCSTI +#LIBS = -lc -lm -ll /usr/ucblib/libucb.a + +# HP-UX +# CFLAGS = -g -D_HAVE_FLOAT_H -D_HAVE_LOG2 + +# IRIX +# CFLAGS = -g -cckr -D_HAVE_FLOAT_H -woff 1116,1110,1167,1551 + +# Linux +CFLAGS = -D_HAVE_FLOAT_H #-D_USE_TIOCSTI + +LIBS = -lm + +# USERS: You probably won't want to modify anything below this line. +# ---------------------------------------------------------------------- +# Debugging flags: DEBUG_INPUT STATS NODE_COUNT -f68881 -g -QF_CHECK +# -a (for tcov) -pg (for gprof) +# Actually QF_CHECK is defined in quickfit.c, so you get it +# automatically + +CC = gcc +LEX = lex +YACC = yacc + +HEADERS = cn_header.h cn_externs.h mdep.h mlt_float.h + +SOURCES = cn.c cn_print_thing.c ckrl_gen.c ckrl_rules.c create.c main.c print_gen_thing.c \ + execute.c robin.c\ + test.c attribute.c att_order.c list.c names.c quickfit.c \ + interact.c interact_utils.c example.c peccles.c \ + rule_reader.c \ + heap.c specialise.c filter.c trace.c debug.c + +OBJECTS = cn.o cn_print_thing.o ckrl_gen.o ckrl_rules.o create.o main.o print_gen_thing.o \ + execute.o robin.o\ + test.o attribute.c att_order.o list.o names.o quickfit.o \ + interact.o interact_utils.o example.o peccles.o \ + rule_reader.o \ + heap.o specialise.o filter.o trace.o debug.o \ + y.tab.o + +cn: $(OBJECTS) + $(CC) $(CFLAGS) -o cn $(OBJECTS) $(LIBS) + +saber_src: y.tab.o $(SOURCES) $(HEADERS) + #load $(CFLAGS) $(SOURCES) y.tab.c $(LIBS) + +saber_obj: + #load $(CFLAGS) $(OBJECTS) $(LIBS) + + +cn_header.h: mlt_float.h + +main.o: cn_header.h cn_externs.h main.c + +ckrl_gen.o: cn_header.h cn_externs.h ckrl_gen.c + +ckrl_rules.o: cn_header.h cn_externs.h ckrl_rules.c + +create.o: cn_header.h cn_externs.h create.c + +debug.o: debug.c + +peccles.o: cn_header.h cn_externs.h peccles.c + +execute.o: cn_header.h cn_externs.h execute.c + +robin.o: cn_header.h cn_externs.h robin.c + +rule_reader.o: cn_header.h cn_externs.h rule_reader.c + +specialise.o: cn_header.h cn_externs.h specialise.c + +heap.o: cn_header.h cn_externs.h heap.c + +attribute.o: cn_header.h cn_externs.h attribute.c + +att_order.o: cn_header.h cn_externs.h att_order.c + +list.o: cn_header.h cn_externs.h list.c + +example.o: cn_header.h cn_externs.h example.c + +filter.o: cn_header.h cn_externs.h filter.c + +trace.o: cn_header.h cn_externs.h trace.c + +interact_utils.o: cn_header.h cn_externs.h interact_utils.c + +interact.o: cn_header.h cn_externs.h interact.c + +logs.o: cn_header.h cn_externs.h logs.c + +test.o: cn_header.h cn_externs.h test.c + +lex.yy.c: ingest.l + $(LEX) ingest.l + +print_gen_thing.o: cn_header.h cn_externs.h print_gen_thing.c + +cn_print_thing.o: cn_header.h cn_externs.h cn_print_thing.c + +names.o: cn_header.h cn_externs.h names.c + +quickfit.o: cn_header.h cn_externs.h quickfit.c + +cn_header.h: qlalloc.h mdep.h + +y.tab.o: y.tab.c lex.yy.c + $(CC) $(CFLAGS) -c y.tab.c + +y.tab.c: ingest.y lex.yy.c + $(YACC) ingest.y + +clean: + touch foo.o + rm -f *.o y.tab.c + diff -urN MLC++-2.01/cn2/ingest.y MLC++-2.01-MFP/cn2/ingest.y --- MLC++-2.01/cn2/ingest.y Sat Aug 9 15:07:31 1997 +++ MLC++-2.01-MFP/cn2/ingest.y Thu Jul 22 11:43:08 1999 @@ -14,7 +14,7 @@ #include -#define _MC68881<_ +#define _MC68881_ #include #include "cn_externs.h" diff -urN MLC++-2.01/cn2/input.h MLC++-2.01-MFP/cn2/input.h --- MLC++-2.01/cn2/input.h Sat Aug 9 15:07:31 1997 +++ MLC++-2.01-MFP/cn2/input.h Thu Jul 22 11:49:30 1999 @@ -14,7 +14,11 @@ extern int number_of_attributes, number_of_classes; extern long number_of_examples; /* extern Tree *yacked_tree; */ +#ifdef __GNUC__ +# define yyin stdin +#else extern FILE *yyin; +#endif extern BOOL ukdc_flag; extern long ln; extern BOOL errflag; diff -urN MLC++-2.01/cn2/lex.yy.c MLC++-2.01-MFP/cn2/lex.yy.c --- MLC++-2.01/cn2/lex.yy.c Sat Aug 9 15:22:19 1997 +++ MLC++-2.01-MFP/cn2/lex.yy.c Thu Jul 22 11:48:34 1999 @@ -42,7 +42,12 @@ int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; +#ifdef __GNUC__ +# define yyin stdin +# define yyout stdout +#else FILE *yyin = {stdin}, *yyout = {stdout}; +#endif extern int yylineno; struct yysvf { struct yywork *yystoff; diff -urN MLC++-2.01/cn2/makefile MLC++-2.01-MFP/cn2/makefile --- MLC++-2.01/cn2/makefile Sat Nov 29 04:37:06 1997 +++ MLC++-2.01-MFP/cn2/makefile Wed Dec 31 18:00:00 1969 @@ -1,137 +0,0 @@ -# SccsId = "@(#)Makefile 5.1 9/25/91 MLT" - -BINDIR = "../bin" - -# ---------------------------------------------------------------------- -# Uncomment the proper CFLAGS line for your machine. -# ---------------------------------------------------------------------- - -# SunOS (compiles as original distribution) -# CFLAGS = -g -D_TTYOLD -D_HAVE_LOG2 -D_USE_TIOCSTI - -# SunOS (if you want to use termios rather than old-style terminal I/O) -CFLAGS = -g -D_HAVE_LOG2 -D_USE_TIOCSTI - -# Solaris - note that you will need to use the LIBS defined here, and -# comment out the LIBS line later in this file. If you forget to -# do this, then the filename completion in the CN2 interactive -# loop will produce names with the first two characters "chopped off". -# CFLAGS = -g -D_HAVE_FLOAT_H -D_USE_TIOCSTI -# LIBS = -lc -lm -ll /usr/ucblib/libucb.a - -# HP-UX -# CFLAGS = -g -D_HAVE_FLOAT_H -D_HAVE_LOG2 - -# IRIX -CFLAGS = -g -cckr -D_HAVE_FLOAT_H -woff 1116,1110,1167,1551 - -# Linux -# CFLAGS = -D_HAVE_FLOAT_H -D_USE_TIOCSTI - -LIBS = -lm - -# USERS: You probably won't want to modify anything below this line. -# ---------------------------------------------------------------------- -# Debugging flags: DEBUG_INPUT STATS NODE_COUNT -f68881 -g -QF_CHECK -# -a (for tcov) -pg (for gprof) -# Actually QF_CHECK is defined in quickfit.c, so you get it -# automatically - -CC = $(TOOLROOT)/usr/bin/cc -LEX = $(TOOLROOT)/usr/bin/lex -YACC = $(TOOLROOT)/usr/bin/yacc - -HEADERS = cn_header.h cn_externs.h mdep.h mlt_float.h - -SOURCES = cn.c cn_print_thing.c ckrl_gen.c ckrl_rules.c create.c main.c print_gen_thing.c \ - execute.c robin.c\ - test.c attribute.c att_order.c list.c names.c quickfit.c \ - interact.c interact_utils.c example.c peccles.c \ - rule_reader.c \ - heap.c specialise.c filter.c trace.c debug.c - -OBJECTS = cn.o cn_print_thing.o ckrl_gen.o ckrl_rules.o create.o main.o print_gen_thing.o \ - execute.o robin.o\ - test.o attribute.c att_order.o list.o names.o quickfit.o \ - interact.o interact_utils.o example.o peccles.o \ - rule_reader.o \ - heap.o specialise.o filter.o trace.o debug.o \ - y.tab.o - -cn: $(OBJECTS) - $(CC) $(CFLAGS) -o cn $(OBJECTS) $(LIBS) - -saber_src: y.tab.o $(SOURCES) $(HEADERS) - #load $(CFLAGS) $(SOURCES) y.tab.c $(LIBS) - -saber_obj: - #load $(CFLAGS) $(OBJECTS) $(LIBS) - - -cn_header.h: mlt_float.h - -main.o: cn_header.h cn_externs.h main.c - -ckrl_gen.o: cn_header.h cn_externs.h ckrl_gen.c - -ckrl_rules.o: cn_header.h cn_externs.h ckrl_rules.c - -create.o: cn_header.h cn_externs.h create.c - -debug.o: debug.c - -peccles.o: cn_header.h cn_externs.h peccles.c - -execute.o: cn_header.h cn_externs.h execute.c - -robin.o: cn_header.h cn_externs.h robin.c - -rule_reader.o: cn_header.h cn_externs.h rule_reader.c - -specialise.o: cn_header.h cn_externs.h specialise.c - -heap.o: cn_header.h cn_externs.h heap.c - -attribute.o: cn_header.h cn_externs.h attribute.c - -att_order.o: cn_header.h cn_externs.h att_order.c - -list.o: cn_header.h cn_externs.h list.c - -example.o: cn_header.h cn_externs.h example.c - -filter.o: cn_header.h cn_externs.h filter.c - -trace.o: cn_header.h cn_externs.h trace.c - -interact_utils.o: cn_header.h cn_externs.h interact_utils.c - -interact.o: cn_header.h cn_externs.h interact.c - -logs.o: cn_header.h cn_externs.h logs.c - -test.o: cn_header.h cn_externs.h test.c - -lex.yy.c: ingest.l - $(LEX) ingest.l - -print_gen_thing.o: cn_header.h cn_externs.h print_gen_thing.c - -cn_print_thing.o: cn_header.h cn_externs.h cn_print_thing.c - -names.o: cn_header.h cn_externs.h names.c - -quickfit.o: cn_header.h cn_externs.h quickfit.c - -cn_header.h: qlalloc.h mdep.h - -y.tab.o: y.tab.c lex.yy.c - $(CC) $(CFLAGS) -c y.tab.c - -y.tab.c: ingest.y lex.yy.c - $(YACC) ingest.y - -clean: - touch foo.o - rm -f *.o y.tab.c - diff -urN MLC++-2.01/ibl/Makefile MLC++-2.01-MFP/ibl/Makefile --- MLC++-2.01/ibl/Makefile Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/ibl/Makefile Fri Nov 14 04:33:32 1997 @@ -0,0 +1,32 @@ +# Tried runnin with -O2, but it crashes on mlc/src/MTrans/tests/t_AhaIBInducer +# (seg fault) so left without it. +CC = gcc + +# -lm needed on 5.3 for sqrt +ibl: ibl.o training.o testing.o utility.o printing.o random.o + $(CC) -o ibl ibl.o training.o testing.o utility.o printing.o random.o -lm + +ibl.o: ibl.c datastructures.h + $(CC) -c ibl.c + +training.o: training.c datastructures.h + $(CC) -c training.c + +testing.o: testing.c datastructures.h + $(CC) -c testing.c + +utility.o: utility.c datastructures.h + $(CC) -c utility.c + +printing.o: printing.c datastructures.h + $(CC) -c printing.c + + +random.o: random.c + $(CC) -c random.c + +clean: + touch foo.o + rm -f ibl *.o + + diff -urN MLC++-2.01/ibl/makefile MLC++-2.01-MFP/ibl/makefile --- MLC++-2.01/ibl/makefile Sat Nov 29 04:37:14 1997 +++ MLC++-2.01-MFP/ibl/makefile Wed Dec 31 18:00:00 1969 @@ -1,33 +0,0 @@ -# Tried runnin with -O2, but it crashes on mlc/src/MTrans/tests/t_AhaIBInducer -# (seg fault) so left without it. -CC = $(TOOLROOT)/usr/bin/cc - -# -lm needed on 5.3 for sqrt ... linker warning 84 disabled means is's OK if -# -lm isn't used to resolve any symbols (which it won't be after 5.3). -ibl: ibl.o training.o testing.o utility.o printing.o random.o - $(CC) -Wl,-woff,84 -o ibl ibl.o training.o testing.o utility.o printing.o random.o -lm - -ibl.o: ibl.c datastructures.h - $(CC) -c ibl.c - -training.o: training.c datastructures.h - $(CC) -c training.c - -testing.o: testing.c datastructures.h - $(CC) -c testing.c - -utility.o: utility.c datastructures.h - $(CC) -c utility.c - -printing.o: printing.c datastructures.h - $(CC) -c printing.c - - -random.o: random.c - $(CC) -c random.c - -clean: - touch foo.o - rm -f ibl *.o - - diff -urN MLC++-2.01/inc/MLCThreads.h MLC++-2.01-MFP/inc/MLCThreads.h --- MLC++-2.01/inc/MLCThreads.h Sat Nov 29 21:50:25 1997 +++ MLC++-2.01-MFP/inc/MLCThreads.h Wed Jul 21 10:21:14 1999 @@ -8,7 +8,7 @@ #define _MLCThreads_h 1 #ifdef PTHREADS - +#include // For syserrlist #include #include // for ERRMESSAGEBUF_SIZE #include // for shmFile diff -urN MLC++-2.01/inc/SANode.h MLC++-2.01-MFP/inc/SANode.h --- MLC++-2.01/inc/SANode.h Sat Nov 29 04:33:34 1997 +++ MLC++-2.01-MFP/inc/SANode.h Fri Jul 16 15:28:30 1999 @@ -14,7 +14,7 @@ NO_COPY_CTOR(SANode); public: // Public member data - NodePtr node; + NodePtr Node; // Hello!!! 'node' shadows a typedef!!! sigh... int numEvaluations; Bool isExpanded; Real fitness; diff -urN MLC++-2.01/inc/SGIgetopt.h MLC++-2.01-MFP/inc/SGIgetopt.h --- MLC++-2.01/inc/SGIgetopt.h Sat Nov 29 04:33:34 1997 +++ MLC++-2.01-MFP/inc/SGIgetopt.h Mon Jul 19 08:49:49 1999 @@ -1,10 +1,10 @@ // This defines some getopt functions because they are missing from // some operating systems (such as Windows NT) +extern "C" { void SGI_getoptreset(void); int SGI_getopt(int argc, char * const *argv, const char *opts); extern int SGI_optind, SGI_opterr, SGI_optopt; extern char *SGI_optarg; - - +}; diff -urN MLC++-2.01/inc/State.h MLC++-2.01-MFP/inc/State.h --- MLC++-2.01/inc/State.h Sat Nov 29 04:33:35 1997 +++ MLC++-2.01-MFP/inc/State.h Fri Jul 16 14:10:45 1999 @@ -82,10 +82,11 @@ Bool operator!=(const State& rhs) const {return ! ((*this)== rhs);} + virtual void display_for_graph(MLCOStream& stream = Mcout) const; + virtual void display_info(MLCOStream& stream = Mcout) const = 0; virtual void display_stats(MLCOStream& stream, GlobalInfo *gInfo) const = 0; - virtual void display_for_graph(MLCOStream& stream = Mcout) const = 0; virtual void display(MLCOStream& stream = Mcout, GlobalInfo *gInfo = NULL) const; }; diff -urN MLC++-2.01/inc/ValSetState.h MLC++-2.01-MFP/inc/ValSetState.h --- MLC++-2.01/inc/ValSetState.h Sat Nov 29 04:33:36 1997 +++ MLC++-2.01-MFP/inc/ValSetState.h Fri Jul 16 14:09:47 1999 @@ -74,11 +74,11 @@ SuccessorOperatorType get_successor_operator() const { return successorOperator; } + void display_for_graph(MLCOStream& stream) const; void display_info(MLCOStream& stream) const; void display_stats(MLCOStream& stream, PartitionEvaluator *) const; - void display_for_graph(MLCOStream& stream) const; }; #endif diff -urN MLC++-2.01/inc/a.h MLC++-2.01-MFP/inc/a.h --- MLC++-2.01/inc/a.h Sat Nov 29 20:49:46 1997 +++ MLC++-2.01-MFP/inc/a.h Fri Jul 16 12:18:38 1999 @@ -120,6 +120,10 @@ #include #endif +#ifdef __GNUC__ +typedef timespec timespec_t; +#endif + extern int defaultOpenProt; extern const char *ERROR_PREFIX; extern const char *WRAP_INDENT; diff -urN MLC++-2.01/inc/basics.h MLC++-2.01-MFP/inc/basics.h --- MLC++-2.01/inc/basics.h Wed Dec 17 16:10:06 1997 +++ MLC++-2.01-MFP/inc/basics.h Fri Jul 16 13:27:45 1999 @@ -121,6 +121,17 @@ #include #endif +#ifdef __GNUC__ +typedef timespec timespec_t; +#endif + +/* G++ and other smart and proper compilers define null as a variable, to + * escape type sensitive situations. However, this breaks operator overloading + * for comparason operators that require NULL to be 0, (traditional C++) + */ +#undef NULL +#define NULL 0 + extern int defaultOpenProt; extern const char *ERROR_PREFIX; extern const char *WRAP_INDENT; diff -urN MLC++-2.01/leda/incl/LEDA/d_array.h MLC++-2.01-MFP/leda/incl/LEDA/d_array.h --- MLC++-2.01/leda/incl/LEDA/d_array.h Tue Sep 9 14:08:33 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/d_array.h Fri Jul 16 11:52:34 1999 @@ -70,9 +70,7 @@ public: -#if defined(__hpuxcc__) -skiplist_item make_item(GenPtr p) const { return (skiplist_item)p; } -#endif +inline skiplist_item make_item(GenPtr p) const { return (skiplist_item)p; } typedef skiplist_item item; diff -urN MLC++-2.01/leda/incl/LEDA/h_array.h MLC++-2.01-MFP/leda/incl/LEDA/h_array.h --- MLC++-2.01/leda/incl/LEDA/h_array.h Tue Sep 9 14:08:36 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/h_array.h Fri Jul 16 11:52:44 1999 @@ -63,9 +63,7 @@ public: -#if defined(__hpuxcc__) -ch_hash_item make_item(GenPtr p) const { return (ch_hash_item)p; } -#endif +inline ch_hash_item make_item(GenPtr p) const { return (ch_hash_item)p; } typedef ch_hash_item item; diff -urN MLC++-2.01/leda/incl/LEDA/iteration.h MLC++-2.01-MFP/leda/incl/LEDA/iteration.h --- MLC++-2.01/leda/incl/LEDA/iteration.h Tue Sep 9 14:08:39 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/iteration.h Fri Jul 16 11:49:30 1999 @@ -61,11 +61,13 @@ // forall_defined(x,...) //------------------------------------------------------------------------------ -#if defined(__hpuxcc__) +#if defined(__hpuxcc__) || defined(__GNUC__) #define LOOP_ITEM(p) S.make_item(p) #else -#define LOOP_ITEM(p) (T::item)p +#define LOOP_ITEM(p) ((T::item)p) #endif + +/*Note to authors: Making code unreadable does not make it any more efficient*/ template inline bool LedaLoopSucc(const T& S, void*& p) diff -urN MLC++-2.01/leda/incl/LEDA/list.h MLC++-2.01-MFP/leda/incl/LEDA/list.h --- MLC++-2.01/leda/incl/LEDA/list.h Tue Sep 9 14:08:39 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/list.h Fri Jul 16 11:52:53 1999 @@ -69,9 +69,7 @@ public: -#if defined(__hpuxcc__) -list_item make_item(GenPtr p) const { return (list_item)p; } -#endif +inline list_item make_item(GenPtr p) const { return (list_item)p; } typedef list_item item; diff -urN MLC++-2.01/leda/incl/LEDA/node_list.h MLC++-2.01-MFP/leda/incl/LEDA/node_list.h --- MLC++-2.01/leda/incl/LEDA/node_list.h Tue Sep 9 14:08:39 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/node_list.h Fri Jul 16 11:53:01 1999 @@ -48,9 +48,7 @@ public: -#if defined(__hpuxcc__) -node make_item(GenPtr p) const { return (node)p; } -#endif +inline node make_item(GenPtr p) const { return (node)p; } typedef node item; diff -urN MLC++-2.01/leda/incl/LEDA/param_types.h MLC++-2.01-MFP/leda/incl/LEDA/param_types.h --- MLC++-2.01/leda/incl/LEDA/param_types.h Mon Nov 10 01:27:15 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/param_types.h Fri Jul 16 11:26:11 1999 @@ -453,13 +453,12 @@ // compare //---------------------------------------------------------------------------- +#ifndef LEDA_COMPARE_TEMPLATE template class decl_compare_func { -#if defined(__GNUC__) - friend inline int compare(const T&, const T&); -#else - friend int compare(const T&, const T&); -#endif + friend int compare(const T&, const T&); }; +#endif + diff -urN MLC++-2.01/leda/incl/LEDA/set.h MLC++-2.01-MFP/leda/incl/LEDA/set.h --- MLC++-2.01/leda/incl/LEDA/set.h Tue Sep 9 14:08:42 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/set.h Fri Jul 16 11:53:10 1999 @@ -51,9 +51,7 @@ public: -#if defined(__hpuxcc__) -rs_tree_item make_item(GenPtr p) const { return (rs_tree_item)p; } -#endif +inline rs_tree_item make_item(GenPtr p) const { return (rs_tree_item)p; } typedef rs_tree_item item; diff -urN MLC++-2.01/leda/incl/LEDA/slist.h MLC++-2.01-MFP/leda/incl/LEDA/slist.h --- MLC++-2.01/leda/incl/LEDA/slist.h Tue Sep 9 14:08:42 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/slist.h Fri Jul 16 11:52:26 1999 @@ -51,9 +51,7 @@ public: -#if defined(__hpuxcc__) -slist_item make_item(GenPtr p) const { return (slist_item)p; } -#endif +inline slist_item make_item(GenPtr p) const { return (slist_item)p; } typedef slist_item item; diff -urN MLC++-2.01/leda/incl/LEDA/sys/unix.h MLC++-2.01-MFP/leda/incl/LEDA/sys/unix.h --- MLC++-2.01/leda/incl/LEDA/sys/unix.h Tue Sep 9 17:41:34 1997 +++ MLC++-2.01-MFP/leda/incl/LEDA/sys/unix.h Fri Jul 16 11:25:50 1999 @@ -86,13 +86,17 @@ #define __NO_VOLATILE__ #endif -#if defined(linux) +#if defined(__GNUC__) +#define LEDA_COMPARE_TEMPLATE +#endif + +#if defined(__i386__) #define LITTLE_ENDIAN_MACHINE #if defined(__GNUC__) && defined(__i386__) -#include -static int setdouble_ieee_for_linux_gnu = (__setfpucw(4735),0); +/* #include Morons .. */ +// static int setdouble_ieee_for_linux_gnu = (__setfpucw(4735),0); // note: 639 (0x027f) seems also okay. // This sets internal rounding of FPU to double (not extended) format // and leaves rounding to nearest as well as exceptions unchanged. diff -urN MLC++-2.01/leda/lconfig-mlc MLC++-2.01-MFP/leda/lconfig-mlc --- MLC++-2.01/leda/lconfig-mlc Fri Nov 21 04:35:53 1997 +++ MLC++-2.01-MFP/leda/lconfig-mlc Thu Jul 22 13:27:03 1999 @@ -50,14 +50,15 @@ RAN= AR=ar SLIB='../../lib$L.a' + DLIB='../../lib$L.so' OBJ='.o' - CCLINE='$(CC) -DLEDA_INSTALL -I ../../incl $(PFLAGS) -c $*.c' - - if [ "$MLC_MODE" = "fast" ] ; then - PFLAGS='-O2' + if [ "$MLC_MODE" = "fast" -o "$MLC_MODE" = "parallel" ] ; then + PFLAGS='-O6' else PFLAGS='-g' fi + CCLINE='$(CC) -fPIC -DLEDA_INSTALL -I ../../incl $(PFLAGS) -c $*.c' + elif [ "$MLC_COMPILER" = "MIPS_PRO" ] ; then # set basic makefile portions @@ -96,7 +97,7 @@ PFLAGS="$PFLAGS -nostdinc -I\$(ROOT)/usr/include/CC -I\$(ROOT)/usr/include" # Flags: fast vs slow mode - if [ "$MLC_MODE" = "fast" ] ; then + if [ "$MLC_MODE" = "fast" -o "$MLC_MODE" = "parallel"] ; then PFLAGS="-O2 $PFLAGS" else PFLAGS="-g $PFLAGS" @@ -111,25 +112,58 @@ #echo " " #echo Configuring makefiles for $comp and $lib libraries under $sys $ver. +rm -f src/Make.lnk rm -f src/Make.src # Construct Make.src using the above variables LIBDIR=`$MLCDIR/bin/genlibdir nodso` + echo "Building LEDA Makefile for $LIBDIR" + +if [ "$RAN" != "" ] ; then + echo "RAN = $RAN" >> src/Make.lnk +fi + +if [ "$LEDA_SPARC" = "yes" ]; then + echo "SPARC = ./sparc/*.o" >> src/Make.lnk +fi + +if [ "$LEDA_X" = "yes" ]; then + echo "X11 = ./x11/*.o" >> src/Make.lnk +fi + +echo "LINK1 = $AR cr" >> src/Make.lnk +if [ "$MLC_COMPILER" = "GNU" -a "$MLC_DYNAMIC" = "yes" ]; then + echo "LINK2 = gcc -shared -o" >> src/Make.lnk + echo "LIBG2 = ../libG.so" >> src/Make.lnk + echo "LIBL2 = ../libL.so" >> src/Make.lnk + echo "LIBP2 = ../libP.so" >> src/Make.lnk + echo "LIBW2 = ../libW.so" >> src/Make.lnk +fi + +echo "LIBG1 = ../libG.a" >> src/Make.lnk +echo "LIBL1 = ../libL.a" >> src/Make.lnk +echo "LIBP1= ../libP.a" >> src/Make.lnk +echo "LIBW1 = ../libW.a" >> src/Make.lnk + +if [ "$RAN" != "" ] ; then + #sorry, this is a hack.. If you want to do this right, use autoconf.. + #I don't have the time.. + echo "LIBG2 = ../libG.a ; echo " >> src/Make.lnk + echo "LIBL2 = ../libL.a ; echo " >> src/Make.lnk + echo "LIBP2 = ../libP.a ; echo " >> src/Make.lnk + echo "LIBW2 = ../libW.a ; echo " >> src/Make.lnk + echo 'LINK2 = $(RAN)' >> src/Make.lnk +fi + echo "# LEDA makefile for $LIBDIR" > src/Make.src echo ".SUFFIXES: .c $OBJ" >> src/Make.src echo >> src/Make.src echo "CC = $CC" >> src/Make.src echo "LD = $LD" >> src/Make.src -if [ "$RAN" != "" ] ; then - echo "RAN = $RAN" >> src/Make.src -fi -echo "AR = $AR" >> src/Make.src -echo "SLIB = $SLIB" >> src/Make.src -echo 'LIB = $(SLIB)' >> src/Make.src echo "PFLAGS = $PFLAGS" >> src/Make.src echo "o = $OBJ" >> src/Make.src echo >> src/Make.src @@ -138,18 +172,13 @@ # Note: the next line begins with a TAB character echo " $CCLINE" >> src/Make.src echo >> src/Make.src -echo 'all: $(LIB)' >> src/Make.src -echo >> src/Make.src echo 'include Make.lst' >> src/Make.src echo >> src/Make.src -echo '$(SLIB): $(OBJECTS)' >> src/Make.src +echo 'all: $(OBJECTS)' >> src/Make.src +echo >> src/Make.src # Note: the next line begins with a TAB character -echo " \$(AR) cr \$(SLIB) \$?" >> src/Make.src -if [ "$RAN" != "" ] ; then - # Note: the next line begins with a TAB character - echo ' $(RAN) $(SLIB) > /dev/null' >> src/Make.src -fi + echo >> src/Make.src echo 'clean:' >> src/Make.src diff -urN MLC++-2.01/leda/src/Make.src MLC++-2.01-MFP/leda/src/Make.src --- MLC++-2.01/leda/src/Make.src Thu Dec 18 20:53:34 1997 +++ MLC++-2.01-MFP/leda/src/Make.src Thu Jul 22 12:30:33 1999 @@ -1,23 +1,18 @@ -# LEDA makefile for n32-72 +# LEDA makefile for gnu-Linux-fast .SUFFIXES: .c .o -CC = $(TOOLROOT)/usr/bin/CC -LD = $(TOOLROOT)/usr/bin/CC -AR = $(TOOLROOT)/usr/bin/ar -SLIB = ../../lib$L.a -LIB = $(SLIB) -PFLAGS = -g -n32 -nostdlib -L$(ROOT)/lib32 -L$(ROOT)/usr/lib32 -woff 1552,3322,1401,1174 -nostdinc -I$(ROOT)/usr/include/CC -I$(ROOT)/usr/include +CC = g++ +LD = g++ +PFLAGS = -O6 o = .o .c.o: - $(CC) -DLEDA_INSTALL -I ../../incl $(PFLAGS) -c $*.c - -all: $(LIB) + $(CC) -fPIC -DLEDA_INSTALL -I ../../incl $(PFLAGS) -c $*.c include Make.lst -$(SLIB): $(OBJECTS) - $(AR) cr $(SLIB) $? +all: $(OBJECTS) + clean: rm -f $(OBJECTS) diff -urN MLC++-2.01/leda/src/Makefile MLC++-2.01-MFP/leda/src/Makefile --- MLC++-2.01/leda/src/Makefile Mon Nov 10 01:27:15 1997 +++ MLC++-2.01-MFP/leda/src/Makefile Tue Jul 20 10:16:52 1999 @@ -1,7 +1,23 @@ SHELL = /bin/sh FLAGS = -all: libL libG libP libW +SPARC= +X11= +include Make.lnk + + +all: link + +link: libL libG libP libW + $(LINK1) $(LIBL1) ./basic/*.o ./basic_alg/*.o ./numbers/*.o ./dict/*.o ./prio/*.o $(SPARC) + $(LINK2) $(LIBL2) ./basic/*.o ./basic_alg/*.o ./numbers/*.o ./dict/*.o ./prio/*.o $(SPARC) + $(LINK1) $(LIBG1) ./graph/*.o ./graph_alg/*.o ./graph_draw/*.o + $(LINK2) $(LIBG2) ./graph/*.o ./graph_alg/*.o ./graph_draw/*.o + $(LINK1) $(LIBP1) ./plane/*.o ./plane_alg/*.o ./d3_geo/*.o + $(LINK2) $(LIBP2) ./plane/*.o ./plane_alg/*.o ./d3_geo/*.o + $(LINK1) $(LIBW1) ./window/*.o ./graphwin/*.o $(X11) + $(LINK2) $(LIBW2) ./window/*.o ./graphwin/*.o $(X11) + libL: cd basic; $(MAKE) -i CFLAGS="$(FLAGS)" @@ -10,7 +26,7 @@ if [ "${LEDA_SPARC}" = "yes" ] ; then \ cd sparc; $(MAKE) -i CFLAGS="$(FLAGS)"; fi cd dict; $(MAKE) -i CFLAGS="$(FLAGS)" - cd prio; $(MAKE) -i CFLAGS="$(FLAGS)" + cd prio; $(MAKE) -i CFLAGS="$(FLAGS)" libG: cd graph; $(MAKE) -i CFLAGS="$(FLAGS)" @@ -27,7 +43,6 @@ cd graphwin; $(MAKE) -i CFLAGS="$(FLAGS)" if [ "${LEDA_X}" = "yes" ]; then cd x11; $(MAKE) -i CFLAGS="$(FLAGS)"; fi - clean: cd basic; $(MAKE) -i clean cd basic_alg; $(MAKE) -i clean @@ -63,5 +78,5 @@ cd d3_geo; sleep 1; touch *.$o; $(MAKE) -i cd window; sleep 1; touch *.$o; $(MAKE) -i cd graphwin; sleep 1; touch *.$o; $(MAKE) -i - if [ "${LEDA_X}" = "yes" ] ; then cd x11; sleep 1; touch *.$o; $(MAKE) -i + if [ "${LEDA_X}" = "yes" ] ; then cd x11; sleep 1; touch *.$o; $(MAKE) -i ; fi diff -urN MLC++-2.01/leda/src/graph_draw/Make.lst MLC++-2.01-MFP/leda/src/graph_draw/Make.lst --- MLC++-2.01/leda/src/graph_draw/Make.lst Tue Sep 9 14:08:53 1997 +++ MLC++-2.01-MFP/leda/src/graph_draw/Make.lst Tue Jul 20 11:07:47 1999 @@ -6,6 +6,6 @@ _embed2$o \ _ortho$o \ _spring$o \ -_sugiyama$o \ +#_sugiyama$o \ _tutte$o diff -urN MLC++-2.01/leda/stOD7KmP MLC++-2.01-MFP/leda/stOD7KmP --- MLC++-2.01/leda/stOD7KmP Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/leda/stOD7KmP Wed Jul 21 16:28:01 1999 @@ -0,0 +1 @@ +! diff -urN MLC++-2.01/oc1/Makefile MLC++-2.01-MFP/oc1/Makefile --- MLC++-2.01/oc1/Makefile Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/oc1/Makefile Fri Nov 14 04:33:47 1997 @@ -0,0 +1,30 @@ +C = gcc +CFLAGS = -O1 +LIBS = -lm + +SRC = util.c tree_util.c load_data.c perturb.c \ + compute_impurity.c impurity_measures.c classify.c prune.c +OBJ = util.o tree_util.o load_data.o perturb.o \ + compute_impurity.o impurity_measures.o classify.o prune.o +INC = oc1.h +MAKEFILE= Make-GNU + +all: mktree + +.c.o: $(INC) $(MAKEFILE) + $C $(CFLAGS) -c $*.c + +mktree: $(MAKEFILE) $(OBJ) mktree.c + $C ${STATIC} $(CFLAGS) $(OBJ) mktree.c -o mktree $(LIBS) + +gendata: $(MAKEFILE) util.o tree_util.o load_data.o classify.o gendata.c + $C -static $(CFLAGS) util.o tree_util.o load_data.o classify.o gendata.c -o gendata $(LIBS) + +display: $(MAKEFILE) util.o load_data.o display.c + $C -static $(CFLAGS) util.o load_data.o display.c -o display $(LIBS) + +$(OBJ): $(INC) $(MAKEFILE) + +clean: + touch foo.o + rm -f mktree gendata display *.o diff -urN MLC++-2.01/oc1/makefile MLC++-2.01-MFP/oc1/makefile --- MLC++-2.01/oc1/makefile Sat Nov 29 04:37:00 1997 +++ MLC++-2.01-MFP/oc1/makefile Wed Dec 31 18:00:00 1969 @@ -1,30 +0,0 @@ -C = $(TOOLROOT)/usr/bin/cc -CFLAGS = -O1 -o32 -woff 1116,1009 -Wl,-woff,15 -LIBS = -lm - -SRC = util.c tree_util.c load_data.c perturb.c \ - compute_impurity.c impurity_measures.c classify.c prune.c -OBJ = util.o tree_util.o load_data.o perturb.o \ - compute_impurity.o impurity_measures.o classify.o prune.o -INC = oc1.h -MAKEFILE= Make-MIPS_PRO - -all: mktree - -.c.o: $(INC) $(MAKEFILE) - $C $(CFLAGS) -c $*.c - -mktree: $(MAKEFILE) $(OBJ) mktree.c - $C ${STATIC} $(CFLAGS) $(OBJ) mktree.c -o mktree $(LIBS) - -gendata: $(MAKEFILE) util.o tree_util.o load_data.o classify.o gendata.c - $C -static $(CFLAGS) util.o tree_util.o load_data.o classify.o gendata.c -o gendata $(LIBS) - -display: $(MAKEFILE) util.o load_data.o display.c - $C -static $(CFLAGS) util.o load_data.o display.c -o display $(LIBS) - -$(OBJ): $(INC) $(MAKEFILE) - -clean: - touch foo.o - rm -f mktree gendata display *.o diff -urN MLC++-2.01/pebls/Makefile MLC++-2.01-MFP/pebls/Makefile --- MLC++-2.01/pebls/Makefile Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/pebls/Makefile Fri Nov 14 04:33:47 1997 @@ -0,0 +1,46 @@ + +# PEBLS 2.0 Makefile +# September, 1993 +# Copyright (c) 1993 by The Johns Hopkins University + + +# DEFAULT COMPILER = GCC ("CC" WORKS TOO) + +CC = gcc -g +FLAGS = -c + +pebls: pebls.o init.o metric.o weights.o neighbor.o symtab.o readers.o util.o output.o + $(CC) pebls.o init.o metric.o weights.o neighbor.o symtab.o readers.o util.o output.o -o pebls -lm + +pebls.o: pebls.c config.h pebls.h + $(CC) $(FLAGS) pebls.c + +init.o: init.c config.h pebls.h + $(CC) $(FLAGS) init.c + +metric.o: metric.c config.h pebls.h + $(CC) $(FLAGS) metric.c + +weights.o: weights.c config.h pebls.h + $(CC) $(FLAGS) weights.c + +neighbor.o: neighbor.c config.h pebls.h + $(CC) $(FLAGS) neighbor.c + +symtab.o: symtab.c config.h pebls.h + $(CC) $(FLAGS) symtab.c + +readers.o: readers.c config.h pebls.h + $(CC) $(FLAGS) readers.c + +util.o: util.c config.h pebls.h + $(CC) $(FLAGS) util.c + +output.o: output.c config.h pebls.h + $(CC) $(FLAGS) output.c + +clean: + touch foo.o + rm -f pebls *.o + + diff -urN MLC++-2.01/pebls/makefile MLC++-2.01-MFP/pebls/makefile --- MLC++-2.01/pebls/makefile Sat Nov 29 04:37:04 1997 +++ MLC++-2.01-MFP/pebls/makefile Wed Dec 31 18:00:00 1969 @@ -1,46 +0,0 @@ - -# PEBLS 2.0 Makefile -# September, 1993 -# Copyright (c) 1993 by The Johns Hopkins University - - -# DEFAULT COMPILER = GCC ("CC" WORKS TOO) - -CC = $(TOOLROOT)/usr/bin/cc -g -o32 -FLAGS = -c - -pebls: pebls.o init.o metric.o weights.o neighbor.o symtab.o readers.o util.o output.o - $(CC) pebls.o init.o metric.o weights.o neighbor.o symtab.o readers.o util.o output.o -o pebls -lm - -pebls.o: pebls.c config.h pebls.h - $(CC) $(FLAGS) pebls.c - -init.o: init.c config.h pebls.h - $(CC) $(FLAGS) init.c - -metric.o: metric.c config.h pebls.h - $(CC) $(FLAGS) metric.c - -weights.o: weights.c config.h pebls.h - $(CC) $(FLAGS) weights.c - -neighbor.o: neighbor.c config.h pebls.h - $(CC) $(FLAGS) neighbor.c - -symtab.o: symtab.c config.h pebls.h - $(CC) $(FLAGS) symtab.c - -readers.o: readers.c config.h pebls.h - $(CC) $(FLAGS) readers.c - -util.o: util.c config.h pebls.h - $(CC) $(FLAGS) util.c - -output.o: output.c config.h pebls.h - $(CC) $(FLAGS) output.c - -clean: - touch foo.o - rm -f pebls *.o - - diff -urN MLC++-2.01/setup.GNU.Linux MLC++-2.01-MFP/setup.GNU.Linux --- MLC++-2.01/setup.GNU.Linux Wed Dec 31 18:00:00 1969 +++ MLC++-2.01-MFP/setup.GNU.Linux Thu Jul 22 16:07:59 1999 @@ -0,0 +1,49 @@ + +#!source_this do not execute it (this line won't let you execute it) + +# Ported by Mike Perry (mikepery@mikepery.linuxos.org) + +# If you really wanna do this right, this whole build system should be torn +# out, and replaced with autoconf. I didn't have the time to do it, so I just +# hacked this together. You must set your shell to (ba,k)sh to build, or rewrite +# this to use tcsh. + +# I did my best not to break any other ports as a matter of form, but I really +# don't care enough about Irix to actually test it. +# (This library should be Open Sourced, and everyone should be using GNU tools +# anyways :) + +# P.S. The tests don't build right. I don't really care much tho, as the +# library and all inducers are functional, so my work is done. If anyone +# plans on actually doing any major work this (closed source!) library, I +# suggest that you first use a better build system, like autoconf. + +# Verify that MLCDIR is set +if [ "$MLCDIR" = "" ]; then + echo "MLCDIR is not defined. Setting it to $PWD" + MLCDIR=$PWD +fi + +# Setup platform variables for a GNU system +MLC_COMPILER=GNU +MLC_OS=Linux +MLC_OS_VERSION=2.1.1 #glibc version... I don't think this matters. +MLC_MODE=fast #parallel (some day... wait a second, this library isn't open source.. Why the fsck should I do anything for SGI? +#Can this build system BE more braindead? Please, I'd like to know, so I +#could burn it all right now.. +if [ "$MLC_MODE" = "parallel" ]; then + MLC_PARALLEL=yes + export MLC_PARALLEL +else + unset MLC_PARALLEL +fi +MLC_EXTERNAL_TYPE=GNU +MLC_DYNAMIC=yes +CCECHO=yes + +# Set MLCPATH variable; this specifies the search path when running +# MLC++ executables +MLCPATH=".:$MLCDIR/db" +PATH=.:$MLCPATH:$PATH #ugh.. braindead.. +export MLCDIR MLCPATH PATH MLC_MODE MLC_OS MLC_OS_VERSION MLC_COMPILER CCECHO +export MLC_EXTERNAL_TYPE MLC_DYNAMIC diff -urN MLC++-2.01/src/MCore/Array.c MLC++-2.01-MFP/src/MCore/Array.c --- MLC++-2.01/src/MCore/Array.c Sat Nov 29 04:33:39 1997 +++ MLC++-2.01-MFP/src/MCore/Array.c Tue Jul 20 16:49:13 1999 @@ -104,7 +104,7 @@ " high: " << lowVal + sizeVal << fatal_error; base = lowVal; arraySize = sizeVal; - elements = new Element[MLC::max(1,arraySize)]; + elements = new Element[arraySize > 0 ? arraySize : 1]; owner = TRUE; } diff -urN MLC++-2.01/src/MCore/MLCThreads.c MLC++-2.01-MFP/src/MCore/MLCThreads.c --- MLC++-2.01/src/MCore/MLCThreads.c Sat Nov 29 21:50:25 1997 +++ MLC++-2.01-MFP/src/MCore/MLCThreads.c Wed Jul 21 10:21:03 1999 @@ -98,7 +98,9 @@ #include #include +#ifndef __linux__ #include +#endif #include // for dribble #include @@ -378,7 +380,7 @@ err << "MPthread ctor shmat: " << sys_errlist[errno] << fatal_error; if ((usPtr = usinit((const char*)shmFile)) == NULL) - err << "MPthread ctor usinit: " << sys_errlist[errno] << fatal_error; + err << "MPthread ctor usinit: " << sys_errlist[errno] << fatal_error; if ((arenaPtr = acreate((void*) shmAddr, THREAD_MEMORY, 0, usPtr, NULL)) == NULL) diff -urN MLC++-2.01/src/MCore/MString.c MLC++-2.01-MFP/src/MCore/MString.c --- MLC++-2.01/src/MCore/MString.c Sat Nov 29 04:33:41 1997 +++ MLC++-2.01-MFP/src/MCore/MString.c Fri Jul 16 12:21:30 1999 @@ -64,7 +64,7 @@ #include #ifndef PC_MSVC -#include // gnu needs it for strcasecmp +#include // gnu needs it for strcasecmp #endif RCSID("MLC++, $RCSfile: MString.c,v $ $Revision: 1.56 $") diff -urN MLC++-2.01/src/MCore/SGIgetopt.c MLC++-2.01-MFP/src/MCore/SGIgetopt.c --- MLC++-2.01/src/MCore/SGIgetopt.c Sat Nov 29 04:33:42 1997 +++ MLC++-2.01-MFP/src/MCore/SGIgetopt.c Mon Jul 19 08:50:37 1999 @@ -19,14 +19,18 @@ #include #include "SGIgetopt.h" +#include + +extern "C" { int SGI_optind, SGI_opterr, SGI_optopt; char *SGI_optarg; int SGI_sp = 1; + static void SGI_pr_error(const char *, const char *, int); int -SGI_getopt(int argc, char * const *argv, const char *opts) +SGI_getopt(int argc, char * const*argv, const char *opts) { register char c; register char *cp; @@ -35,7 +39,7 @@ if(SGI_optind >= argc || argv[SGI_optind][0] != '-' || argv[SGI_optind][1] == '\0') return(-1); - else if(strcmp(argv[SGI_optind], "--") == NULL) { + else if(strcmp(argv[SGI_optind], "--") == 0) { /* True */ SGI_optind++; return(-1); } @@ -127,3 +131,4 @@ (void)fprintf(stderr, "%s: %s (%c)\n", lab, msg, opt); } +}; diff -urN MLC++-2.01/src/MCore/basicCore.c MLC++-2.01-MFP/src/MCore/basicCore.c --- MLC++-2.01/src/MCore/basicCore.c Sat Nov 29 04:33:42 1997 +++ MLC++-2.01-MFP/src/MCore/basicCore.c Fri Jul 16 12:20:19 1999 @@ -42,9 +42,8 @@ // needed includes for umask/_umask function #ifdef PC_MSVC #include -#include #else -#include +#include #endif #include diff -urN MLC++-2.01/src/MCore/fatal_abort.c MLC++-2.01-MFP/src/MCore/fatal_abort.c --- MLC++-2.01/src/MCore/fatal_abort.c Sat Nov 29 21:50:26 1997 +++ MLC++-2.01-MFP/src/MCore/fatal_abort.c Fri Jul 16 12:21:56 1999 @@ -24,7 +24,7 @@ #ifdef PC_MSVC #include #else -#include +#include #endif #include diff -urN MLC++-2.01/src/MCore/mlcIO.c MLC++-2.01-MFP/src/MCore/mlcIO.c --- MLC++-2.01/src/MCore/mlcIO.c Sat Nov 29 04:33:43 1997 +++ MLC++-2.01-MFP/src/MCore/mlcIO.c Fri Jul 16 12:20:47 1999 @@ -31,7 +31,7 @@ #include // Directories #include // File handling #else -#include // Required for unlink on UNIX. +#include // Required for unlink on UNIX. #include // Directories #endif diff -urN MLC++-2.01/src/MCore/safe_new.c MLC++-2.01-MFP/src/MCore/safe_new.c --- MLC++-2.01/src/MCore/safe_new.c Sat Nov 29 04:33:43 1997 +++ MLC++-2.01-MFP/src/MCore/safe_new.c Fri Jul 16 13:21:40 1999 @@ -21,13 +21,7 @@ ***************************************************************************/ #include -#if defined(GNU) - // If we include new.h on SGI, we get conflict on exception redefined - typedef void (*new_handler)(); - extern "C" new_handler set_new_handler (new_handler); -#else -# include -#endif +#include #include RCSID("MLC++, $RCSfile: safe_new.c,v $ $Revision: 1.10 $") diff -urN MLC++-2.01/src/MFSS/SANode.c MLC++-2.01-MFP/src/MFSS/SANode.c --- MLC++-2.01/src/MFSS/SANode.c Sat Nov 29 04:33:54 1997 +++ MLC++-2.01-MFP/src/MFSS/SANode.c Mon Jul 19 09:15:49 1999 @@ -21,7 +21,7 @@ ***************************************************************************/ SANode::SANode() { - node = NULL; + Node = NULL; numEvaluations = 1; isExpanded = FALSE; fitness = 0; @@ -30,7 +30,7 @@ SANode::SANode(NodePtr nodePtr, Real initFitness) { ASSERT(nodePtr != NULL); - node = nodePtr; + Node = nodePtr; numEvaluations = 1; isExpanded = FALSE; fitness = initFitness; @@ -43,7 +43,7 @@ SANode& SANode::operator=(const SANode& rhs) { if (this != &rhs) { - node = rhs.node; + Node = rhs.Node; numEvaluations = rhs.numEvaluations; isExpanded = rhs.isExpanded; fitness = rhs.fitness; diff -urN MLC++-2.01/src/MFSS/SASearch.c MLC++-2.01-MFP/src/MFSS/SASearch.c --- MLC++-2.01/src/MFSS/SASearch.c Sat Nov 29 04:33:54 1997 +++ MLC++-2.01-MFP/src/MFSS/SASearch.c Fri Jul 16 15:32:14 1999 @@ -53,9 +53,9 @@ if(limit >= nodeList.high()) limit = nodeList.high(); for(int i=nodeList.low(); i<=limit; i++) { - ASSERT(nodeList[i].fitness == graph->get_state(nodeList[i].node). + ASSERT(nodeList[i].fitness == graph->get_state(nodeList[i].Node). get_fitness()); - stream << i << ": " << graph->get_state(nodeList[i].node) << endl; + stream << i << ": " << graph->get_state(nodeList[i].Node) << endl; } } @@ -77,15 +77,15 @@ saNode.numEvaluations++; // when reevaluating, never get the real error - saNode.fitness = graph.get_state(saNode.node).eval(gInfo, FALSE, TRUE); + saNode.fitness = graph.get_state(saNode.Node).eval(gInfo, FALSE, TRUE); LOG(1, "re-evaluated node " << - graph.get_state(saNode.node) << endl); + graph.get_state(saNode.Node) << endl); LOG(3, "Re-eval fitness = " << saNode.fitness << endl); numReEvaluations++; } else { LOG(2, "node " - << graph.get_state(saNode.node) + << graph.get_state(saNode.Node) << " has reached maximum number of evaluations (" << get_max_evaluations() << ')' << endl); @@ -94,7 +94,7 @@ if(bestRetired == NULL || mlc.approx_greater(saNode.fitness, graph.get_state(bestRetired). get_fitness())) { - bestRetired = saNode.node; + bestRetired = saNode.Node; LOG(2, "new best node (" << graph.get_num_states() + numReEvaluations << " evals {retired}) " << graph.get_state(bestRetired) << endl); @@ -350,13 +350,13 @@ int nodeNum; // pick a lambda - Real saLambda = graph->get_state(nodeList[0].node).get_std_dev(); + Real saLambda = graph->get_state(nodeList[0].Node).get_std_dev(); if(nodeList.size() > 1 && saLambda && saLambda != UNDEFINED_VARIANCE) { // build a real array of fitnesses for sim_anneal Array fitnessArray(nodeList.low(), nodeList.size()); for(int i=nodeList.low(); i<=nodeList.high(); i++) - fitnessArray[i] = graph->get_state(nodeList[i].node).get_fitness(); + fitnessArray[i] = graph->get_state(nodeList[i].Node).get_fitness(); // call sim_anneal to pick the slot nodeNum = sim_anneal(fitnessArray, saLambda*lambda, rand_num_gen()); @@ -365,7 +365,7 @@ nodeNum = 0; LOG(2, "picked slot " << nodeNum << ": " - << graph->get_state(nodeList[nodeNum].node) << endl); + << graph->get_state(nodeList[nodeNum].Node) << endl); if (nodeList[nodeNum].isExpanded || nodeList[nodeNum].numEvaluations < get_min_exp_evaluations()) { @@ -377,11 +377,11 @@ lastIterationWasExpansion = TRUE; numNonImprovingExpansions++; LOG(1, "expanded node " - << graph->get_state(nodeList[nodeNum].node) + << graph->get_state(nodeList[nodeNum].Node) << endl); nodeList[nodeNum].isExpanded = TRUE; DblLinkList*>* successors = - graph->get_state(nodeList[nodeNum].node).gen_succ(gInfo, graph, + graph->get_state(nodeList[nodeNum].Node).gen_succ(gInfo, graph, get_show_test_set_perf() == showAlways); while (!successors->empty()) { State* childState = @@ -411,7 +411,7 @@ } if(nodeList.size() > 0) { - NodePtr firstNode = nodeList[0].node; + NodePtr firstNode = nodeList[0].Node; ASSERT(firstNode != NULL); Real firstEval = graph->get_state(firstNode).get_fitness(); // If two nodes have the same error, one gets evaluated diff -urN MLC++-2.01/src/ML/CentroidMultiD.c MLC++-2.01-MFP/src/ML/CentroidMultiD.c --- MLC++-2.01/src/ML/CentroidMultiD.c Sat Nov 29 04:34:11 1997 +++ MLC++-2.01-MFP/src/ML/CentroidMultiD.c Fri Jul 16 13:05:16 1999 @@ -44,6 +44,9 @@ #include #include +#undef NULL +#define NULL 0 + RCSID("MLC++, $RCSfile: CentroidMultiD.c,v $ $Revision: 1.3 $") const MEnum nominalTypeMEnum = MEnum("distribution", Centroid::distribution) << diff -urN MLC++-2.01/src/ML/InstanceHash.c MLC++-2.01-MFP/src/ML/InstanceHash.c --- MLC++-2.01/src/ML/InstanceHash.c Sat Nov 29 04:34:12 1997 +++ MLC++-2.01-MFP/src/ML/InstanceHash.c Fri Jul 16 13:03:47 1999 @@ -41,6 +41,8 @@ #include #include +#undef NULL +#define NULL 0 // First, create InstanceListSameAttr_ class having a pointer to // InstanceHashList class. diff -urN MLC++-2.01/src/ML/InstanceList.c MLC++-2.01-MFP/src/ML/InstanceList.c --- MLC++-2.01/src/ML/InstanceList.c Sat Nov 29 04:34:12 1997 +++ MLC++-2.01-MFP/src/ML/InstanceList.c Fri Jul 16 13:03:32 1999 @@ -122,6 +122,9 @@ #include // For split function #include +#undef NULL +#define NULL 0 + RCSID("MLC++, File $Revision: 1.259 $") // constants used in InstanceList @@ -1113,7 +1116,7 @@ InstanceListIndex* InstanceList::create_inst_list_index() const { int instListSize = num_instances(); - InstanceListIndex& index = *new InstanceListIndex(0, instListSize, NULL); + InstanceListIndex& index = *new InstanceListIndex(0, instListSize, 0); int i = 0; for (ILPix pix(*this); i < instListSize && pix; ++i, ++pix) index[i] = new ILPix(*this, pix); diff -urN MLC++-2.01/src/MTree/CGraph.c MLC++-2.01-MFP/src/MTree/CGraph.c --- MLC++-2.01/src/MTree/CGraph.c Sat Nov 29 04:34:49 1997 +++ MLC++-2.01-MFP/src/MTree/CGraph.c Fri Jul 16 13:29:36 1999 @@ -29,6 +29,8 @@ #include #include +#undef NULL +#define NULL 0 RCSID("MLC++, $RCSfile: CGraph.c,v $ $Revision: 1.55 $") SET_DLLPIX_CLEAR(NodePtr, NULL) diff -urN MLC++-2.01/src/MTree/CatGraph.c MLC++-2.01-MFP/src/MTree/CatGraph.c --- MLC++-2.01/src/MTree/CatGraph.c Sat Nov 29 04:34:49 1997 +++ MLC++-2.01-MFP/src/MTree/CatGraph.c Fri Jul 16 13:28:33 1999 @@ -71,6 +71,9 @@ #include #include +#undef NULL +#define NULL 0 + RCSID("MLC++, $RCSfile: CatGraph.c,v $ $Revision: 1.99 $") /*************************************************************************** diff -urN MLC++-2.01/src/MTree/PartialOrder.c MLC++-2.01-MFP/src/MTree/PartialOrder.c --- MLC++-2.01/src/MTree/PartialOrder.c Sat Nov 29 04:34:51 1997 +++ MLC++-2.01-MFP/src/MTree/PartialOrder.c Fri Jul 16 14:12:55 1999 @@ -26,6 +26,8 @@ #include #include +#undef NULL +#define NULL 0 RCSID("MLC++, $RCSfile: PartialOrder.c,v $ $Revision: 1.12 $") SET_DLLPIX_CLEAR(EdgePtr, NULL) diff -urN MLC++-2.01/src/MWrapper/ODTCategorizer.c MLC++-2.01-MFP/src/MWrapper/ODTCategorizer.c --- MLC++-2.01/src/MWrapper/ODTCategorizer.c Sat Nov 29 04:35:20 1997 +++ MLC++-2.01-MFP/src/MWrapper/ODTCategorizer.c Fri Jul 16 14:20:50 1999 @@ -152,6 +152,9 @@ #include #include +#undef NULL +#define NULL 0 + /*************************************************************************** Description : OK function. Checks that invariants are satisfied. Comments : diff -urN MLC++-2.01/src/make/GNU/Makefile.config MLC++-2.01-MFP/src/make/GNU/Makefile.config --- MLC++-2.01/src/make/GNU/Makefile.config Sat Nov 29 04:35:32 1997 +++ MLC++-2.01-MFP/src/make/GNU/Makefile.config Fri Jul 16 12:12:42 1999 @@ -13,11 +13,11 @@ MAKE=make SHELL=/bin/sh -RM=/usr/bin/rm -MKDIR=/usr/bin/mkdir -CHMOD=/usr/bin/chmod -TOUCH=/usr/bin/touch -GENTAGS=/usr/freeware/bin/etags +RM=/bin/rm +MKDIR=/bin/mkdir +CHMOD=/bin/chmod +TOUCH=/bin/touch +GENTAGS=/usr/local/bin/etags # Set to /bin/true if no need to do ranlib; otherwise, set to ranlib RANLIB=/bin/true