aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-12-15 12:05:34 +0800
committeredwin <edwin@FreeBSD.org>2004-12-15 12:05:34 +0800
commitfaec72fa8f7161938c9114fbad6aef2a76bf5b69 (patch)
tree374dc16ba0794b61dcd083d175ed925119233fcd
parent5f6215b4ed0f7ce3bedcc1c2200f811012ceec94 (diff)
downloadfreebsd-ports-gnome-faec72fa8f7161938c9114fbad6aef2a76bf5b69.tar.gz
freebsd-ports-gnome-faec72fa8f7161938c9114fbad6aef2a76bf5b69.tar.zst
freebsd-ports-gnome-faec72fa8f7161938c9114fbad6aef2a76bf5b69.zip
[PORT UPGRADE] devel/cocktail corrected for 64bits compilation
The orignal port only ran on i386, since there were some 64bit conversion problems. The included tar file replaces the compete devel/cocktail tree currently in the ports tree. (lots of patches!) PR: ports/71940 Submitted by: Willem Jan Withagen <wjw@withagen.nl>
-rw-r--r--devel/cocktail/Makefile13
-rw-r--r--devel/cocktail/files/changedfiles73
-rw-r--r--devel/cocktail/files/newfiles59
-rw-r--r--devel/cocktail/files/patch-Makefile64
-rw-r--r--devel/cocktail/files/patch-Makefile.inc59
-rw-r--r--devel/cocktail/files/patch-bnf-m2c-Makefile11
-rw-r--r--devel/cocktail/files/patch-bnf-src-Makefile12
-rw-r--r--devel/cocktail/files/patch-cg-hag-c-Makefile11
-rw-r--r--devel/cocktail/files/patch-cg-hag-m-Makefile10
-rw-r--r--devel/cocktail/files/patch-cg-m2c-Makefile15
-rw-r--r--devel/cocktail/files/patch-cg-src-Makefile28
-rw-r--r--devel/cocktail/files/patch-cg-test-c-Makefile23
-rw-r--r--devel/cocktail/files/patch-cg-test-m-Makefile11
-rw-r--r--devel/cocktail/files/patch-common-c-Makefile4
-rw-r--r--devel/cocktail/files/patch-common-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-common-src-Makefile16
-rw-r--r--devel/cocktail/files/patch-ell-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-ell-src-Makefile27
-rw-r--r--devel/cocktail/files/patch-estra-m2c-ArgCheck.c22
-rw-r--r--devel/cocktail/files/patch-estra-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-estra-src-Makefile25
-rw-r--r--devel/cocktail/files/patch-front-doc-Makefile10
-rw-r--r--devel/cocktail/files/patch-front-m2c-Makefile20
-rw-r--r--devel/cocktail/files/patch-front-src-Makefile22
-rw-r--r--devel/cocktail/files/patch-l2cg-m2c-Makefile11
-rw-r--r--devel/cocktail/files/patch-l2cg-src-Makefile18
-rw-r--r--devel/cocktail/files/patch-l2r-src-Makefile17
-rw-r--r--devel/cocktail/files/patch-lalr-m2c-Makefile11
-rw-r--r--devel/cocktail/files/patch-lalr-src-Makefile12
-rw-r--r--devel/cocktail/files/patch-mpp-src-Makefile12
-rw-r--r--devel/cocktail/files/patch-mtc-m2c-Makefile48
-rw-r--r--devel/cocktail/files/patch-mtc-make-Makefile19
-rw-r--r--devel/cocktail/files/patch-mtc-src-Makefile14
-rw-r--r--devel/cocktail/files/patch-puma-ffaba-c-Makefile35
-rw-r--r--devel/cocktail/files/patch-puma-ffaba-m-Makefile11
-rw-r--r--devel/cocktail/files/patch-puma-m2c-C.c4
-rw-r--r--devel/cocktail/files/patch-puma-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-puma-src-Makefile28
-rw-r--r--devel/cocktail/files/patch-r2l-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-r2l-src-Makefile21
-rw-r--r--devel/cocktail/files/patch-reuse-c-DynArrDrv.c12
-rw-r--r--devel/cocktail/files/patch-reuse-c-DynArray.c22
-rw-r--r--devel/cocktail/files/patch-reuse-c-Errors.c74
-rw-r--r--devel/cocktail/files/patch-reuse-c-Errors.h17
-rw-r--r--devel/cocktail/files/patch-reuse-c-ErrorsDrv.c12
-rw-r--r--devel/cocktail/files/patch-reuse-c-General.c21
-rw-r--r--devel/cocktail/files/patch-reuse-c-General.h22
-rw-r--r--devel/cocktail/files/patch-reuse-c-Idents.c39
-rw-r--r--devel/cocktail/files/patch-reuse-c-Idents.h40
-rw-r--r--devel/cocktail/files/patch-reuse-c-IdentsDrv.c9
-rw-r--r--devel/cocktail/files/patch-reuse-c-Makefile11
-rw-r--r--devel/cocktail/files/patch-reuse-c-Positions.c21
-rw-r--r--devel/cocktail/files/patch-reuse-c-Positions.h11
-rw-r--r--devel/cocktail/files/patch-reuse-c-Sets.c68
-rw-r--r--devel/cocktail/files/patch-reuse-c-Sets.h42
-rw-r--r--devel/cocktail/files/patch-reuse-c-SetsDrv.c30
-rw-r--r--devel/cocktail/files/patch-reuse-c-Source.c12
-rw-r--r--devel/cocktail/files/patch-reuse-c-StrMemDrv.c26
-rw-r--r--devel/cocktail/files/patch-reuse-c-StringMem.c30
-rw-r--r--devel/cocktail/files/patch-reuse-c-StringMem.h29
-rw-r--r--devel/cocktail/files/patch-reuse-c-Time.c18
-rw-r--r--devel/cocktail/files/patch-reuse-c-Time.h18
-rw-r--r--devel/cocktail/files/patch-reuse-c-rMemory.c91
-rw-r--r--devel/cocktail/files/patch-reuse-c-rMemory.h21
-rw-r--r--devel/cocktail/files/patch-reuse-c-rMemoryDrv.c12
-rw-r--r--devel/cocktail/files/patch-reuse-c-rSystem.c85
-rw-r--r--devel/cocktail/files/patch-reuse-c-rSystem.h44
-rw-r--r--devel/cocktail/files/patch-reuse-c-ratc.h15
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Arguments.h19
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Checks.h12
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-DynArray.h15
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Errors.c20
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Errors.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-ErrorsDrv.c11
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-General.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Heap.h15
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-IO.c59
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-IO.h20
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Idents.c22
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Idents.h27
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Layout.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Lists.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Makefile77
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Pack.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Positions.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Relations.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-RelatsC.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-SYSTEM_.c38
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-SYSTEM_.h104
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Sets.c75
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Sets.h26
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-SetsC.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-SetsDrv.c139
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-SetsDrv2.c163
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Sort.c11
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Sort.h14
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Source.c12
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Source.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-StdIO.h53
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-StringMem.h22
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Strings.c11
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Strings.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Texts.c29
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Texts.h18
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-Times.h16
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rMemory.c167
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rMemory.h14
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rMemoryDrv.c11
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rSystem.c81
-rw-r--r--devel/cocktail/files/patch-reuse-m2c-rSystem.h28
-rw-r--r--devel/cocktail/files/patch-reuse-src-Makefile29
-rw-r--r--devel/cocktail/files/patch-rex-lib-Makefile12
-rw-r--r--devel/cocktail/files/patch-rex-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-rex-m2c-Nfa.c12
-rw-r--r--devel/cocktail/files/patch-rex-src-Makefile22
-rw-r--r--devel/cocktail/files/patch-rex-test-Makefile12
-rw-r--r--devel/cocktail/files/patch-rpp-m2c-Makefile13
-rw-r--r--devel/cocktail/files/patch-rpp-src-Makefile14
-rw-r--r--devel/cocktail/files/patch-specs-Makefile26
-rw-r--r--devel/cocktail/files/patch-specs-Makefile.inc4
-rw-r--r--devel/cocktail/files/patch-specs-c-ada-Makefile26
-rw-r--r--devel/cocktail/files/patch-specs-c-c-Makefile29
-rw-r--r--devel/cocktail/files/patch-specs-c-cpp-Makefile39
-rw-r--r--devel/cocktail/files/patch-specs-c-minilax-Makefile34
-rw-r--r--devel/cocktail/files/patch-specs-c-modula2-Makefile32
-rw-r--r--devel/cocktail/files/patch-specs-c-modula2.ell-Makefile46
-rw-r--r--devel/cocktail/files/patch-specs-c-oberon2-Makefile32
-rw-r--r--devel/cocktail/files/patch-specs-c-occam-Makefile41
-rw-r--r--devel/cocktail/files/patch-specs-c-sather-Makefile32
-rw-r--r--devel/cocktail/files/patch-specs-c-sql-Makefile32
-rw-r--r--devel/cocktail/files/patch-specs-c-wag-Makefile36
-rw-r--r--devel/cocktail/files/patch-specs-modula-ada-Makefile13
-rw-r--r--devel/cocktail/files/patch-specs-modula-minilax-Makefile13
-rw-r--r--devel/cocktail/files/patch-specs-modula-modula2-Makefile13
-rw-r--r--devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile10
-rw-r--r--devel/cocktail/files/patch-specs-modula-modula3-Makefile13
-rw-r--r--devel/cocktail/files/patch-specs-modula-oberon-Makefile13
-rw-r--r--devel/cocktail/files/patch-specs-modula-pascal-Makefile13
-rw-r--r--devel/cocktail/files/patch-specs-modula-wag-Makefile13
-rw-r--r--devel/cocktail/files/patch-y2l-src-Makefile19
-rw-r--r--devel/cocktail/files/patch-y2l-src-Scanner.c158
141 files changed, 3400 insertions, 654 deletions
diff --git a/devel/cocktail/Makefile b/devel/cocktail/Makefile
index 34a582c02276..c7dcfac798fc 100644
--- a/devel/cocktail/Makefile
+++ b/devel/cocktail/Makefile
@@ -7,21 +7,20 @@
PORTNAME= cocktail
PORTVERSION= 9309
+PORTREVISION= 1
CATEGORIES= devel
-MASTER_SITES= http://www.first.gmd.de/cocktail/
+MASTER_SITES= http://wwwold.first.fraunhofer.de/cocktail/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= wjw@withagen.nl
COMMENT= Compiler tools with attribute grammars
-WRKSRC= ${WRKDIR}/cocktail-9309
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAN1= ag.1 puma.1 mpp.1 lalr.1 ell.1 bnf.1 ast.1 rex.1 mtc.1
MAN2= mtc.2
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} != "i386"
-BROKEN= "Coredump during build on !i386"
-.endif
+post-extract:
+ ${RM} -f ${WRKSRC}/mtc/m2c/SYSTEM_.h
+ ${RM} -f ${WRKSRC}/mtc/m2c/SYSTEM_.c
.include <bsd.port.post.mk>
diff --git a/devel/cocktail/files/changedfiles b/devel/cocktail/files/changedfiles
index 245518c7cf59..67957668622a 100644
--- a/devel/cocktail/files/changedfiles
+++ b/devel/cocktail/files/changedfiles
@@ -1,5 +1,6 @@
./Makefile
./bnf/m2c/Makefile
+./bnf/src/Makefile
./cg/hag-c/Makefile
./cg/hag-m/Makefile
./cg/m2c/Makefile
@@ -8,9 +9,12 @@
./cg/test-m/Makefile
./common/c/Makefile
./common/m2c/Makefile
+./common/src/Makefile
./ell/m2c/Makefile
./ell/src/Makefile
+./estra/m2c/ArgCheck.c
./estra/m2c/Makefile
+./estra/src/Makefile
./front/doc/Makefile
./front/m2c/Makefile
./front/src/Makefile
@@ -18,6 +22,8 @@
./l2cg/src/Makefile
./l2r/src/Makefile
./lalr/m2c/Makefile
+./lalr/src/Makefile
+./mpp/src/Makefile
./mtc/m2c/Makefile
./mtc/make/Makefile
./mtc/src/Makefile
@@ -28,13 +34,79 @@
./puma/src/Makefile
./r2l/m2c/Makefile
./r2l/src/Makefile
+./reuse/c/DynArrDrv.c
+./reuse/c/DynArray.c
./reuse/c/Errors.c
+./reuse/c/Errors.h
+./reuse/c/ErrorsDrv.c
+./reuse/c/General.c
+./reuse/c/General.h
+./reuse/c/Idents.c
+./reuse/c/Idents.h
+./reuse/c/IdentsDrv.c
./reuse/c/Makefile
+./reuse/c/Positions.c
+./reuse/c/Positions.h
+./reuse/c/Sets.c
+./reuse/c/Sets.h
+./reuse/c/SetsDrv.c
+./reuse/c/Source.c
+./reuse/c/StrMemDrv.c
+./reuse/c/StringMem.c
+./reuse/c/StringMem.h
+./reuse/c/Time.c
+./reuse/c/Time.h
+./reuse/c/rMemory.c
+./reuse/c/rMemory.h
+./reuse/c/rMemoryDrv.c
./reuse/c/rSystem.c
+./reuse/c/rSystem.h
+./reuse/c/ratc.h
+./reuse/m2c/Arguments.h
+./reuse/m2c/Checks.h
+./reuse/m2c/DynArray.h
+./reuse/m2c/Errors.c
+./reuse/m2c/Errors.h
+./reuse/m2c/ErrorsDrv.c
+./reuse/m2c/General.h
+./reuse/m2c/Heap.h
+./reuse/m2c/IO.c
+./reuse/m2c/IO.h
+./reuse/m2c/Idents.c
+./reuse/m2c/Idents.h
+./reuse/m2c/Layout.h
+./reuse/m2c/Lists.h
./reuse/m2c/Makefile
+./reuse/m2c/Pack.h
+./reuse/m2c/Positions.h
+./reuse/m2c/Relations.h
+./reuse/m2c/RelatsC.h
+./reuse/m2c/SYSTEM_.c
+./reuse/m2c/SYSTEM_.h
+./reuse/m2c/Sets.c
+./reuse/m2c/Sets.h
+./reuse/m2c/SetsC.h
+./reuse/m2c/SetsDrv.c
+./reuse/m2c/Sort.c
+./reuse/m2c/Sort.h
+./reuse/m2c/Source.c
+./reuse/m2c/Source.h
+./reuse/m2c/StdIO.h
+./reuse/m2c/StringMem.h
+./reuse/m2c/Strings.c
+./reuse/m2c/Strings.h
+./reuse/m2c/Texts.c
+./reuse/m2c/Texts.h
+./reuse/m2c/Times.h
./reuse/m2c/rMemory.c
+./reuse/m2c/rMemory.h
+./reuse/m2c/rMemoryDrv.c
./reuse/m2c/rSystem.c
+./reuse/m2c/rSystem.h
+./reuse/src/Makefile
+./rex/lib/Makefile
./rex/m2c/Makefile
+./rex/m2c/Nfa.c
./rex/src/Makefile
./rex/test/Makefile
./rpp/m2c/Makefile
@@ -59,4 +131,3 @@
./specs/modula/pascal/Makefile
./specs/modula/wag/Makefile
./y2l/src/Makefile
-./y2l/src/Scanner.c
diff --git a/devel/cocktail/files/newfiles b/devel/cocktail/files/newfiles
index 55bd8258ad56..e21316225ec0 100644
--- a/devel/cocktail/files/newfiles
+++ b/devel/cocktail/files/newfiles
@@ -1,59 +1,6 @@
./Makefile.inc
-./Makefile.inc.orig
-./Makefile.orig
-./bnf/m2c/Makefile.orig
-./cg/hag-c/Makefile.orig
-./cg/hag-m/Makefile.orig
-./cg/m2c/Makefile.orig
-./cg/test-c/Makefile.orig
-./cg/test-m/Makefile.orig
-./common/c/Makefile.orig
-./common/m2c/Makefile.orig
-./ell/m2c/Makefile.orig
-./estra/m2c/Makefile.orig
-./front/doc/Makefile.orig
-./front/m2c/Makefile.orig
-./l2cg/m2c/Makefile.orig
-./l2r/src/Makefile.orig
-./lalr/m2c/Makefile.orig
-./mtc/m2c/Makefile.orig
-./mtc/make/Makefile.orig
-./puma/ffaba-c/Makefile.orig
-./puma/ffaba-m/Makefile.orig
-./puma/m2c/C.c.orig
-./puma/m2c/Makefile.orig
-./r2l/m2c/Makefile.orig
-./reuse/c/Errors.c.orig
-./reuse/c/Makefile.orig
-./reuse/c/rSystem.c.orig
-./reuse/m2c/Makefile.orig
-./reuse/m2c/rMemory.c.orig
-./reuse/m2c/rSystem.c.orig
-./rex/m2c/Makefile.orig
-./rex/test/Makefile.orig
-./rpp/m2c/Makefile.orig
-./rpp/src/Makefile.orig
+./reuse/m2c/SetsDrv2.c
./specs/Makefile
./specs/Makefile.inc
-./specs/Makefile.inc.orig
-./specs/Makefile.orig
-./specs/c/ada/Makefile.orig
-./specs/c/c/Makefile.orig
-./specs/c/cpp/Makefile.orig
-./specs/c/minilax/Makefile.orig
-./specs/c/modula2/Makefile.orig
-./specs/c/modula2.ell/Makefile.orig
-./specs/c/oberon2/Makefile.orig
-./specs/c/occam/Makefile.orig
-./specs/c/sather/Makefile.orig
-./specs/c/sql/Makefile.orig
-./specs/c/wag/Makefile.orig
-./specs/modula/ada/Makefile.orig
-./specs/modula/minilax/Makefile.orig
-./specs/modula/modula2/Makefile.orig
-./specs/modula/modula2.ell/Makefile.orig
-./specs/modula/modula3/Makefile.orig
-./specs/modula/oberon/Makefile.orig
-./specs/modula/pascal/Makefile.orig
-./specs/modula/wag/Makefile.orig
-./y2l/src/Makefile.orig
+./specs/c/occam/Makefile.bak
+./tmp
diff --git a/devel/cocktail/files/patch-Makefile b/devel/cocktail/files/patch-Makefile
index 70c2e236f014..00e7367b4d8e 100644
--- a/devel/cocktail/files/patch-Makefile
+++ b/devel/cocktail/files/patch-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./Makefile Tue Feb 15 14:20:36 1994
-+++ ./Makefile Wed Mar 31 22:35:03 2004
-@@ -17,58 +17,20 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./Makefile Tue Feb 15 14:20:36 1994
++++ ./Makefile Fri Sep 10 17:31:02 2004
+@@ -17,58 +17,21 @@
# * *
# *************************************************************************
@@ -59,10 +59,11 @@
- c_rex \
c_front \
+ c_rex \
++ installtmp \
c_bnf \
c_ell \
c_lalr \
-@@ -79,7 +41,8 @@
+@@ -79,7 +42,8 @@
c_rpp \
c_cg \
c_puma \
@@ -72,13 +73,15 @@
MTARGETS = \
reuselib \
-@@ -104,12 +67,16 @@
+@@ -104,12 +68,19 @@
install: install$(LANGUAGE)
-reuselib:
- @echo; echo "Making public reuse library"
- cd reuse/c && $(MAKE) $(MFLAGS) TARGET=$(TARGET)
++full: $(LANGUAGE) test
++
+diff: clean
+ -diff -rwPu -x'*cat' -x'?akefile*' ../cocktail-9309.org . > /tmp/cocktail.code.dif
+ -diff -rwPu -x'*cat' -x'*h' -x'*c' ../cocktail-9309.org . > /tmp/cocktail.makefiles.dif
@@ -86,27 +89,38 @@
c: $(CTARGETS)
+reuselib:
++ @echo WRKDIR = ${WRKDIR}
+ @echo; echo "Making public reuse library"
+ cd reuse/c && $(MAKE) TARGET=$(TARGET) $(MFLAGS)
+
c_reuse:
@echo; echo "Making local reuse library"
cd reuse/m2c && $(MAKE) $(MFLAGS)
-@@ -156,18 +123,24 @@
+@@ -156,18 +127,33 @@
@echo; echo "Making estra"
cd estra/m2c && $(MAKE) $(MFLAGS)
-+mtc: $(REUSELIB)
-+ @echo; echo "Making mtc"
-+ cd mtc/m2c && $(MAKE) $(MFLAGS)
-+
-+
- installc: c_reuse c_common
+-installc: c_reuse c_common
- sh -c "if test ! -d $(BIN); then mkdir -p $(BIN); else true; fi"
- sh -c "if test ! -d $(LIB); then mkdir -p $(LIB); else true; fi"
- sh -c "if test ! -d $(MANDIR); then mkdir -p $(MANDIR); else true; fi"
- sh -c "if test ! -d $(INCDIR); then mkdir -p $(INCDIR); else true; fi"
- cd reuse/c && $(MAKE) install $(MFLAGS) TARGET=$(TARGET) INCDIR=$(INCDIR)
++mtc: $(REUSELIB)
++ @echo; echo "Making mtc"
++ cd mtc/m2c && $(MAKE) $(MFLAGS)
++
++installtmp: c_reuse c_common c_front c_rex c_lalr c_bnf
++ mkdir -p $(TMPBIN)
++ mkdir -p $(TMPLIB)
++ mkdir -p $(TMPINC)
++ cd reuse/c && $(MAKE) install PREFIX=$(TMPDIR)
++ cd front/m2c && $(MAKE) install PREFIX=$(TMPDIR)
++ cd rex/m2c && $(MAKE) install PREFIX=$(TMPDIR)
++ cd lalr/m2c && $(MAKE) install PREFIX=$(TMPDIR)
++ cd bnf/m2c && $(MAKE) install PREFIX=$(TMPDIR)
++
++installc:
+ sh -c "if test ! -d $(DESTBIN); then mkdir -p $(DESTBIN); else true; fi"
+ sh -c "if test ! -d $(DESTLIB); then mkdir -p $(DESTLIB); else true; fi"
+ sh -c "if test ! -d $(DESTMANDIR); then mkdir -p $(DESTMANDIR); else true; fi"
@@ -123,7 +137,7 @@
cd l2r/src && $(MAKE) install $(MFLAGS)
cd y2l/src && $(MAKE) install $(MFLAGS)
cd r2l/m2c && $(MAKE) install $(MFLAGS)
-@@ -176,7 +149,10 @@
+@@ -176,7 +162,10 @@
cd cg/m2c && $(MAKE) install $(MFLAGS)
cd puma/m2c && $(MAKE) install $(MFLAGS)
cd estra/m2c && $(MAKE) install $(MFLAGS)
@@ -135,7 +149,7 @@
modula: $(MTARGETS)
-@@ -228,52 +204,46 @@
+@@ -228,52 +217,51 @@
sh -c "if test ! -d $(BIN); then mkdir -p $(BIN); else true; fi"
sh -c "if test ! -d $(LIB); then mkdir -p $(LIB); else true; fi"
sh -c "if test ! -d $(MANDIR); then mkdir -p $(MANDIR); else true; fi"
@@ -177,7 +191,7 @@
+ cp mtc/doc/*.1 $(MANDIR) && chmod a+r $(MANDIR)/*.1
+ cp mtc/doc/*.2 $(MANDIR2) && chmod a+r $(MANDIR2)/*.2
--test:
+ test:
- -cd specs/c/ada && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
- -cd specs/c/c && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
- -cd specs/c/cpp && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
@@ -196,7 +210,8 @@
- -cd specs/modula/pascal && $(MAKE) -i
- -cd specs/modula/minilax && $(MAKE) -i minilax
- -cd specs/modula/wag && $(MAKE) -i minilax
-+test: testc testm
++ make install PREFIX=$(TMPDIR)
++ make testc
-clean:
+testc:
@@ -207,7 +222,10 @@
+ cd specs && $(MAKE) testm
+ cd puma/ffaba-m && $(MAKE) test
+
-+clean: cleans
++clean: cleantest cleantools
++
++cleantools:
++ -rm -rf $(TMPDIR)/bin $(TMPDIR)/include $(TMPDIR)/libexec
-cd reuse/c && $(MAKE) clean
-cd reuse/src && $(MAKE) clean
-cd common/src && $(MAKE) clean
@@ -218,14 +236,18 @@
-cd bnf/src && $(MAKE) clean
-cd lalr/src && $(MAKE) clean
-cd ell/src && $(MAKE) clean
-@@ -299,23 +269,11 @@
+@@ -299,23 +287,10 @@
-cd cg/m2c && $(MAKE) clean
-cd puma/m2c && $(MAKE) clean
-cd estra/m2c && $(MAKE) clean
+ -cd mtc/m2c && $(MAKE) clean
+
++cleantest:
++ -cd specs && $(MAKE) clean
++ -cd puma/ffaba-c && $(MAKE) clean
++ -cd puma/ffaba-m && $(MAKE) clean
- cleans:
+-cleans:
- -cd specs/c/ada && $(MAKE) clean
- -cd specs/c/c && $(MAKE) clean
- -cd specs/c/cpp && $(MAKE) clean
@@ -244,7 +266,3 @@
- -cd specs/modula/pascal && $(MAKE) clean
- -cd specs/modula/minilax && $(MAKE) clean
- -cd specs/modula/wag && $(MAKE) clean
-+ -cd specs && $(MAKE) clean
-+ -cd puma/ffaba-c && $(MAKE) clean
-+ -cd puma/ffaba-m && $(MAKE) clean
-+
diff --git a/devel/cocktail/files/patch-Makefile.inc b/devel/cocktail/files/patch-Makefile.inc
index 8a2a1287726e..b044098883b3 100644
--- a/devel/cocktail/files/patch-Makefile.inc
+++ b/devel/cocktail/files/patch-Makefile.inc
@@ -1,18 +1,41 @@
---- ../../work/cocktail-9309//./Makefile.inc Sun Apr 4 18:01:21 2004
-+++ ./Makefile.inc Wed Mar 31 23:30:53 2004
-@@ -0,0 +1,60 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./Makefile.inc Sat Sep 11 00:58:46 2004
++++ ./Makefile.inc Fri Sep 10 15:46:35 2004
+@@ -0,0 +1,96 @@
+# Choose a suitable C compiler
+# usually cc or gcc will do
+# on HP700 use: CC = c89 -D_HPUX_SOURCE
+CC ?= gcc
+
-+OPT = -g -O -w # (optimizer) flags for the C compiler
-+CFLAGS += $(OPT) -D$(UNIX) -D$(TARGET)
-+ # C libraries
++OPT = -g # (optimizer) flags for the C compiler
++WARNINGS= -W -Wall -ansi -Wcast-align \
++ -Wcast-qual -Wchar-subscripts -Winline \
++ -Wnested-externs -Wpointer-arith \
++ -Wmissing-prototypes \
++ -Wredundant-decls \
++ -Wno-shadow \
++ -Wno-parentheses \
++ -Wno-unused
++TWARNINGS=
++
++#WARNINGS= -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align \
++# -Waggregate-return -Wstrict-prototypes \
++# -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline
++# -Wbad-function-cast
++# Gives all those: cast does not match function type
++# -Wconversion , not very handy, since it allerts almost all conversions
++# als the correct ones
++# -Wwrite-strings , a nuicance
++# -Wstrict-prototypes \
++
++CFLAGS += $(OPT) $(WARNINGS) -D$(UNIX) -D$(TARGET) $(XFLAGS)
++#
++# To compile the tests, since they are tool generated and otherwise generate
++# losts warnings
++TCFLAGS += $(OPT) $(TWARNINGS) -D$(UNIX) -D$(TARGET) $(XFLAGS)
+
+# Choose a suitable Modula compiler
+# MC or M2C
-+MC = MC
++MC = m2c
+
+# BSD needs this
+MAKE = make
@@ -30,6 +53,11 @@
+FRONTINC = $(ROOTDIR)/front/m2c
+FRONTLIB = $(FRONTINC)/libfront.a
+
++TMPDIR = ${ROOTDIR}/tmp
++TMPBIN = $(TMPDIR)/bin
++TMPLIB = $(TMPDIR)/libexec/cocktail
++TMPINC = $(TMPDIR)/include/cocktail
++
+DEST = $(PREFIX)
+DESTBIN = $(DEST)/bin # to install shell scripts and binaries
+DESTLIB = $(DEST)/libexec/cocktail # to install binaries and data files
@@ -38,16 +66,24 @@
+DESTMANDIR2 = $(DEST)/man/man2 # Directory for man pages
+
+# During package build
-+REX = $(ROOTDIR)/rex/m2c/rex -l$(ROOTDIR)/rex/lib
-+LALR = $(ROOTDIR)/lalr/m2c/lalr
-+MTC = $(ROOTDIR)/mtc/m2c/mtc
++REX = $(TMPBIN)/rex
++BNF = $(TMPBIN)bnf
++LALR = $(TMPBIN)/lalr
++MTC = $(TMPBIN)/mtc
++LPP = $(TMPBIN)/lpp
++RPP = $(TMPBIN)/rpp
++CG = $(TMPBIN)/cg
++ELL = $(TMPBIN)/ell
++PUMA = $(TMPBIN)/puma
+SED = sed
+
++STDCLEAN = *.bak *.orig *.rej *.core *.o
++
+# The following targets are legal:
+# PCS10
+# PCS20
+# SUN (this is valid for all others)
-+TARGET = FREEBSB
++TARGET = FREEBSD
+UNIX = UNIX
+
+# Choose the source language:
@@ -61,4 +97,3 @@
+
+.md.h:
+ mtc2 $(M2FLAGS) $*.md;
-+
diff --git a/devel/cocktail/files/patch-bnf-m2c-Makefile b/devel/cocktail/files/patch-bnf-m2c-Makefile
index c098a4706f92..d1d4a69e7855 100644
--- a/devel/cocktail/files/patch-bnf-m2c-Makefile
+++ b/devel/cocktail/files/patch-bnf-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./bnf/m2c/Makefile Tue Feb 15 14:20:39 1994
-+++ ./bnf/m2c/Makefile Wed Mar 31 22:35:03 2004
-@@ -1,36 +1,26 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./bnf/m2c/Makefile Tue Feb 15 14:20:39 1994
++++ ./bnf/m2c/Makefile Thu Aug 5 18:48:26 2004
+@@ -1,36 +1,27 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -49,12 +49,13 @@
+clean:
-+ rm -f core *.o bnf
++ -rm -f $(STDCLEAN)
++ -rm -f *.o bnf
+
# HEAD
sources : ArgCheck.h
-@@ -62,18 +52,3 @@
+@@ -62,18 +53,3 @@
ArgCheck.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-bnf-src-Makefile b/devel/cocktail/files/patch-bnf-src-Makefile
new file mode 100644
index 000000000000..f526cc4f9bc0
--- /dev/null
+++ b/devel/cocktail/files/patch-bnf-src-Makefile
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./bnf/src/Makefile Tue Feb 15 14:20:41 1994
++++ ./bnf/src/Makefile Thu Aug 5 18:48:26 2004
+@@ -39,7 +39,8 @@
+ sources:
+
+ clean:
+- rm -f core *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug *.bak
+
+ .SUFFIXES: .def .mod .md .mi
+
diff --git a/devel/cocktail/files/patch-cg-hag-c-Makefile b/devel/cocktail/files/patch-cg-hag-c-Makefile
index 683374abf540..c62d9de6d89c 100644
--- a/devel/cocktail/files/patch-cg-hag-c-Makefile
+++ b/devel/cocktail/files/patch-cg-hag-c-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./cg/hag-c/Makefile Tue Feb 15 14:21:25 1994
-+++ ./cg/hag-c/Makefile Wed Mar 31 22:35:04 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./cg/hag-c/Makefile Tue Feb 15 14:21:25 1994
++++ ./cg/hag-c/Makefile Thu Aug 5 18:48:47 2004
@@ -1,7 +1,3 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
@@ -8,9 +8,12 @@
Main: Main.o Tree.o Eval.o
$(CC) -o Main Main.o Eval.o Tree.o $(LIB)/libreuse.a
-@@ -47,7 +43,4 @@
+@@ -45,9 +41,6 @@
+ echo 2 0 | Main
+
clean:
- rm -f TraceTab Main Tree.* Eval.* Main.o yyTree.w
+- rm -f TraceTab Main Tree.* Eval.* Main.o yyTree.w
++ -rm -f TraceTab Main Tree.* Eval.* Main.o yyTree.w
-.SUFFIXES: .c .o
-
diff --git a/devel/cocktail/files/patch-cg-hag-m-Makefile b/devel/cocktail/files/patch-cg-hag-m-Makefile
index b3f79a1beeb5..9af2315bc3d0 100644
--- a/devel/cocktail/files/patch-cg-hag-m-Makefile
+++ b/devel/cocktail/files/patch-cg-hag-m-Makefile
@@ -1,7 +1,9 @@
---- ../../work/cocktail-9309//./cg/hag-m/Makefile Tue Feb 15 14:21:25 1994
-+++ ./cg/hag-m/Makefile Wed Mar 31 22:35:04 2004
-@@ -37,3 +37,4 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./cg/hag-m/Makefile Tue Feb 15 14:21:25 1994
++++ ./cg/hag-m/Makefile Thu Aug 5 18:48:48 2004
+@@ -36,4 +36,5 @@
+ echo 2 0 | Main
clean:
- rm -f TraceTab Main Tree.* Eval.* Main.[dimor]
+- rm -f TraceTab Main Tree.* Eval.* Main.[dimor]
++ -rm -f TraceTab Main Tree.* Eval.* Main.[dimor]
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-cg-m2c-Makefile b/devel/cocktail/files/patch-cg-m2c-Makefile
index bceb84873a9a..46ce2f668417 100644
--- a/devel/cocktail/files/patch-cg-m2c-Makefile
+++ b/devel/cocktail/files/patch-cg-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./cg/m2c/Makefile Tue Feb 15 14:21:05 1994
-+++ ./cg/m2c/Makefile Wed Mar 31 22:35:04 2004
-@@ -1,46 +1,37 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./cg/m2c/Makefile Tue Feb 15 14:21:05 1994
++++ ./cg/m2c/Makefile Thu Aug 5 18:48:42 2004
+@@ -1,46 +1,38 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -42,7 +42,7 @@
+
+install: cg cg.sh lpp $(DESTLIB)/cg
+ if test $(DESTLIB) = $(DESTBIN); then echo error: DESTBIN = DESTLIB; false; else true; fi
-+ sed "s;LIB;$(DESTLIB);g" < cg.sh > $(DESTBIN)/cg
++ $(SED) "s;LIB;$(DESTLIB);g" < cg.sh > $(DESTBIN)/cg
+ cp $(DESTBIN)/cg $(DESTBIN)/ag
+ cp $(DESTBIN)/cg $(DESTBIN)/ast
+ chmod a+rx $(DESTBIN)/cg $(DESTBIN)/ast $(DESTBIN)/ag
@@ -63,8 +63,9 @@
-# SYSTEM_ = SYSTEM_.o
+clean:
-+ rm -f core *.o
-+ rm -f cg lpp
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f cg lpp
lint:
- lint -I$(REUSE) *.c
@@ -73,7 +74,7 @@
# HEAD
-@@ -431,18 +422,3 @@
+@@ -431,18 +423,3 @@
Tree.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-cg-src-Makefile b/devel/cocktail/files/patch-cg-src-Makefile
index 1e4b89484c8b..a728ef2bf8b0 100644
--- a/devel/cocktail/files/patch-cg-src-Makefile
+++ b/devel/cocktail/files/patch-cg-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./cg/src/Makefile Tue Feb 15 14:20:44 1994
-+++ ./cg/src/Makefile Wed Mar 31 22:42:37 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./cg/src/Makefile Tue Feb 15 14:20:44 1994
++++ ./cg/src/Makefile Thu Aug 5 18:48:37 2004
@@ -43,17 +43,17 @@
echo p cg | mc -d ../../reuse/src
@@ -110,3 +110,27 @@
cg.mi: cg.sed
$(SED) < cg.sed > cg.mi
+@@ -159,7 +159,7 @@
+ m2c:
+ # co RCS/*
+ make $(SOURCES)
+- rm -f ../m2c/*.[hc]
++ -rm -f ../m2c/*.[hc]
+ cp TypeTab.[mc] gmd* ../m2c
+ ln *.m[id] ../m2c
+ cd ../m2c; make sources M2FLAGS="-c -d../../reuse/src"
+@@ -184,10 +184,11 @@
+ sh -c "if test ! -d $(LIB)/Id; then mkdir -p $(LIB)/Id; else true; fi"
+
+ cleanId:
+- rm -f cgId*
++ -rm -f cgId*
+
+ clean: cleanId
+- rm -f _Debug core *.[dior] [A-SU-Za-z]*.m *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f _Debug *.[dior] [A-SU-Za-z]*.m *.bak
+
+ CLEAN: clean
+- rm -f cg Tree.TS $(SOURCES)
++ -rm -f cg Tree.TS $(SOURCES)
diff --git a/devel/cocktail/files/patch-cg-test-c-Makefile b/devel/cocktail/files/patch-cg-test-c-Makefile
index d9436da8f64c..6e616f02c67e 100644
--- a/devel/cocktail/files/patch-cg-test-c-Makefile
+++ b/devel/cocktail/files/patch-cg-test-c-Makefile
@@ -1,19 +1,30 @@
---- ../../work/cocktail-9309//./cg/test-c/Makefile Tue Feb 15 14:21:27 1994
-+++ ./cg/test-c/Makefile Wed Mar 31 22:35:04 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./cg/test-c/Makefile Tue Feb 15 14:21:27 1994
++++ ./cg/test-c/Makefile Thu Aug 5 18:48:47 2004
+@@ -1,7 +1,4 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++.include "../../Makefile.inc"
all:
make test clean LIB="$(LIB)" CC="cc"
-@@ -25,7 +21,4 @@
+@@ -17,15 +14,12 @@
+ Main.o: Tree.h
+
+ Tree.h Tree.c: g.cg
+- cg -ca g.cg;
++ $(CG) -ca g.cg;
+
+ lint: Tree.c Main.c
+ lint $(CFLAGS) -u Main.c Tree.c
+
clean:
- rm -f Main Tree.* Main.o yyTree.w a aa aaa b bb core
+- rm -f Main Tree.* Main.o yyTree.w a aa aaa b bb core
++ -rm -f $(STDCLEAN)
++ -rm -f Main Tree.* Main.o yyTree.w a aa aaa b bb
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-cg-test-m-Makefile b/devel/cocktail/files/patch-cg-test-m-Makefile
index 00628b5d2b52..46ad0f7e9bbc 100644
--- a/devel/cocktail/files/patch-cg-test-m-Makefile
+++ b/devel/cocktail/files/patch-cg-test-m-Makefile
@@ -1,7 +1,10 @@
---- ../../work/cocktail-9309//./cg/test-m/Makefile Tue Feb 15 14:21:26 1994
-+++ ./cg/test-m/Makefile Wed Mar 31 22:35:04 2004
-@@ -9,3 +9,4 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./cg/test-m/Makefile Tue Feb 15 14:21:26 1994
++++ ./cg/test-m/Makefile Thu Aug 5 18:48:36 2004
+@@ -8,4 +8,6 @@
+ cg -a g.cg;
clean:
- rm -f Main Tree.* Main.[dimor] a aa aaa b bb core *.bak
+- rm -f Main Tree.* Main.[dimor] a aa aaa b bb core *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f Main Tree.* Main.[dimor] a aa aaa b bb *.bak
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-common-c-Makefile b/devel/cocktail/files/patch-common-c-Makefile
index 3e0afdfe4c56..1aa3a3c93290 100644
--- a/devel/cocktail/files/patch-common-c-Makefile
+++ b/devel/cocktail/files/patch-common-c-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./common/c/Makefile Tue Feb 15 14:21:28 1994
-+++ ./common/c/Makefile Wed Mar 31 22:35:04 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./common/c/Makefile Tue Feb 15 14:21:28 1994
++++ ./common/c/Makefile Thu Aug 5 18:48:48 2004
@@ -1,3 +1,5 @@
Timer.o: Timer.c Timer.h ; cc Timer.c
libcommon.a: SysErr.o Timer.o ; ar ruv libcommon.a Timer.o
diff --git a/devel/cocktail/files/patch-common-m2c-Makefile b/devel/cocktail/files/patch-common-m2c-Makefile
index 97cbce022f52..6da4db3b64ee 100644
--- a/devel/cocktail/files/patch-common-m2c-Makefile
+++ b/devel/cocktail/files/patch-common-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./common/m2c/Makefile Tue Feb 15 14:21:29 1994
-+++ ./common/m2c/Makefile Wed Mar 31 22:35:04 2004
-@@ -1,25 +1,20 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./common/m2c/Makefile Tue Feb 15 14:21:29 1994
++++ ./common/m2c/Makefile Thu Aug 5 18:48:48 2004
+@@ -1,25 +1,21 @@
-OPT = -O
-CC = cc
@@ -28,13 +28,14 @@
ranlib libcommon.a
+clean:
-+ rm -f core *.o Main
-+ rm -f libcommon.a
++ -rm -f $(STDCLEAN)
++ -rm -f Main
++ -rm -f libcommon.a
+
# HEAD
-@@ -115,21 +110,3 @@
+@@ -115,21 +111,3 @@
Convert.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-common-src-Makefile b/devel/cocktail/files/patch-common-src-Makefile
new file mode 100644
index 000000000000..452f886d0c62
--- /dev/null
+++ b/devel/cocktail/files/patch-common-src-Makefile
@@ -0,0 +1,16 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./common/src/Makefile Tue Feb 15 14:21:34 1994
++++ ./common/src/Makefile Thu Aug 5 18:48:50 2004
+@@ -1,6 +1,6 @@
+ all:
+ echo p Main | mc -d ../../reuse/src
+- rm -f Main Main.[dimor]
++ -rm -f Main Main.[dimor]
+
+ m2c:
+ # co RCS/*
+@@ -9,4 +9,4 @@
+ cd ../m2c; rm -f *.m[id]
+
+ clean:
+- rm -f *.[dimor]
++ -rm -f *.[dimor]
diff --git a/devel/cocktail/files/patch-ell-m2c-Makefile b/devel/cocktail/files/patch-ell-m2c-Makefile
index 38a9d99907e9..43d141994cc1 100644
--- a/devel/cocktail/files/patch-ell-m2c-Makefile
+++ b/devel/cocktail/files/patch-ell-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./ell/m2c/Makefile Tue Feb 15 14:22:40 1994
-+++ ./ell/m2c/Makefile Wed Mar 31 22:35:04 2004
-@@ -1,37 +1,26 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./ell/m2c/Makefile Tue Feb 15 14:22:40 1994
++++ ./ell/m2c/Makefile Thu Aug 5 18:48:53 2004
+@@ -1,37 +1,27 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -48,12 +48,13 @@
-# SYSTEM_ = SYSTEM_.o
+clean:
-+ rm -f core *.o
-+ rm -f ell
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f ell
# HEAD
-@@ -239,18 +228,3 @@
+@@ -239,18 +229,3 @@
CodeC.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-ell-src-Makefile b/devel/cocktail/files/patch-ell-src-Makefile
index eff698a946b2..01c3c11b6940 100644
--- a/devel/cocktail/files/patch-ell-src-Makefile
+++ b/devel/cocktail/files/patch-ell-src-Makefile
@@ -1,5 +1,14 @@
---- ../../work/cocktail-9309//./ell/src/Makefile Tue Feb 15 14:22:52 1994
-+++ ./ell/src/Makefile Wed Mar 31 22:43:34 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./ell/src/Makefile Tue Feb 15 14:22:52 1994
++++ ./ell/src/Makefile Thu Aug 5 18:48:54 2004
+@@ -31,7 +31,7 @@
+ ell: $(GENDEFS) $(GENIMPS) ell_boot
+
+ ell_boot: $(DEFS) $(IMPS) ell.mi
+- rm -f ell
++ -rm -f ell
+ echo p ell | mc -d ../../common/src -d ../../reuse/src
+
+ install: ell ell.sh ErrorTab $(LIB)/ell
@@ -48,13 +48,13 @@
sh -c "if test ! -d $(LIB)/ell; then mkdir -p $(LIB)/ell; else true; fi"
@@ -17,3 +26,17 @@
Semantics.md Semantics.mi: Sem.estra
estra $(ESTRA) Sem.estra;
+@@ -75,10 +75,11 @@
+ cd ../m2c; rm -f *.m[id]
+
+ clean:
+- rm -f core ERRORS LISTING *.[dimor] ell convert *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f ERRORS LISTING *.[dimor] ell convert *.bak
+
+ CLEAN: clean
+- rm -f $(SOURCES)
++ -rm -f $(SOURCES)
+
+ .SUFFIXES: .MI .mi
+
diff --git a/devel/cocktail/files/patch-estra-m2c-ArgCheck.c b/devel/cocktail/files/patch-estra-m2c-ArgCheck.c
new file mode 100644
index 000000000000..b1f65aee5ed1
--- /dev/null
+++ b/devel/cocktail/files/patch-estra-m2c-ArgCheck.c
@@ -0,0 +1,22 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./estra/m2c/ArgCheck.c Tue Feb 15 14:23:04 1994
++++ ./estra/m2c/ArgCheck.c Thu Aug 5 18:48:56 2004
+@@ -64,7 +64,7 @@
+ BOOLEAN ArgCheck_AUTO;
+ BOOLEAN ArgCheck_DEBUG;
+
+-static CHAR NULL [] = "/dev/null";
++static CHAR DEVNULL [] = "/dev/null";
+ struct S_1 {
+ CHAR A[255 + 1];
+ };
+@@ -188,8 +188,8 @@
+ ArgCheck_IMP = TRUE;
+ }
+ if (!SourceFileIsOpen) {
+- Listing_SourceFile = IO_ReadOpen(NULL, 9L);
+- Checks_CheckReadOpen(&Listing_SourceFile, NULL, 9L);
++ Listing_SourceFile = IO_ReadOpen(DEVNULL, 9L);
++ Checks_CheckReadOpen(&Listing_SourceFile, DEVNULL, 9L);
+ }
+ if (Error) {
+ Errors_CloseErrors();
diff --git a/devel/cocktail/files/patch-estra-m2c-Makefile b/devel/cocktail/files/patch-estra-m2c-Makefile
index 481d660929f6..7723d52f5b43 100644
--- a/devel/cocktail/files/patch-estra-m2c-Makefile
+++ b/devel/cocktail/files/patch-estra-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./estra/m2c/Makefile Tue Feb 15 14:23:01 1994
-+++ ./estra/m2c/Makefile Wed Mar 31 22:35:04 2004
-@@ -1,36 +1,27 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./estra/m2c/Makefile Tue Feb 15 14:23:01 1994
++++ ./estra/m2c/Makefile Thu Aug 5 18:48:55 2004
+@@ -1,36 +1,28 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -47,12 +47,13 @@
+ sh -c "if test ! -d $(DESTLIB)/estra; then mkdir -p $(DESTLIB)/estra; else true; fi"
+clean:
-+ rm -f core *.o
-+ rm -f estra
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f estra
# HEAD
-@@ -232,18 +223,3 @@
+@@ -232,18 +224,3 @@
CodeM2.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-estra-src-Makefile b/devel/cocktail/files/patch-estra-src-Makefile
new file mode 100644
index 000000000000..ab70eadf9f57
--- /dev/null
+++ b/devel/cocktail/files/patch-estra-src-Makefile
@@ -0,0 +1,25 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./estra/src/Makefile Tue Feb 15 14:23:14 1994
++++ ./estra/src/Makefile Thu Aug 5 18:48:58 2004
+@@ -21,7 +21,7 @@
+ estra: $(GENDEFS) $(GENIMPS) estra_boot
+
+ estra_boot: $(DEFS) $(IMPS) estra.mi
+- rm -f estra
++ -rm -f estra
+ echo p estra | mc -d ../../common/src -d ../../reuse/src
+
+ Tree.md Tree.mi: Tree.ast
+@@ -54,10 +54,11 @@
+ cd ../m2c; rm -f *.m[id]
+
+ clean:
+- rm -f core *.[dimor] ERRORS LISTING _Debug *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] ERRORS LISTING _Debug *.bak
+
+ CLEAN: clean
+- rm -f $(SOURCES) estra
++ -rm -f $(SOURCES) estra
+
+ .SUFFIXES: .MD .md .MI .mi
+
diff --git a/devel/cocktail/files/patch-front-doc-Makefile b/devel/cocktail/files/patch-front-doc-Makefile
index 41c405089e40..0ea989f69630 100644
--- a/devel/cocktail/files/patch-front-doc-Makefile
+++ b/devel/cocktail/files/patch-front-doc-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./front/doc/Makefile Tue Feb 15 14:23:21 1994
-+++ ./front/doc/Makefile Wed Mar 31 22:35:04 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./front/doc/Makefile Tue Feb 15 14:23:21 1994
++++ ./front/doc/Makefile Thu Aug 5 18:48:59 2004
@@ -1,17 +1,18 @@
# $Id: Makefile,v 2.8 1993/08/24 13:19:11 grosch rel $
@@ -27,8 +27,10 @@
bnf.cat: bnf.1
nroff -man < bnf.1 | col > bnf.cat
-@@ -25,3 +26,4 @@
+@@ -24,4 +25,5 @@
+ troff -man lalr.1
clean:
- rm -f bnf.cat lalr.cat
+- rm -f bnf.cat lalr.cat
++ -rm -f bnf.cat lalr.cat
+
diff --git a/devel/cocktail/files/patch-front-m2c-Makefile b/devel/cocktail/files/patch-front-m2c-Makefile
index e1b07846e813..0f3225dec5ae 100644
--- a/devel/cocktail/files/patch-front-m2c-Makefile
+++ b/devel/cocktail/files/patch-front-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./front/m2c/Makefile Tue Feb 15 14:23:22 1994
-+++ ./front/m2c/Makefile Wed Mar 31 22:35:05 2004
-@@ -1,17 +1,9 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./front/m2c/Makefile Tue Feb 15 14:23:22 1994
++++ ./front/m2c/Makefile Thu Aug 5 18:49:00 2004
+@@ -1,35 +1,33 @@
-LIB = $(HOME)/lib
-OPT = -O
-CC = cc
@@ -21,8 +21,11 @@
+CLIBS += $(REUSELIB)
OBJS = Actions.o Character.o Checks.o Errors.o Limits.o \
- Listing.o Oper.o Pars.o Parser.o Path.o Rules.o Scanner.o \
-@@ -21,15 +13,20 @@
+- Listing.o Oper.o Pars.o Parser.o Path.o Rules.o Scanner.o \
++ Listing.o Oper.o Parser.o Path.o Rules.o Scanner.o \
+ SysError.o TokenTab.o Tokens.o WriteTok.o
+
+ libfront.a : $(OBJS)
ar ruc libfront.a $(OBJS)
ranlib libfront.a
@@ -43,12 +46,13 @@
+test: Pars
+clean:
-+ rm -f core *.o
-+ rm -f libfront.a Pars
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f libfront.a Pars
# HEAD
-@@ -193,21 +190,3 @@
+@@ -193,21 +191,3 @@
Character.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-front-src-Makefile b/devel/cocktail/files/patch-front-src-Makefile
index 691912721285..0e92545efeb5 100644
--- a/devel/cocktail/files/patch-front-src-Makefile
+++ b/devel/cocktail/files/patch-front-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./front/src/Makefile Tue Feb 15 14:23:34 1994
-+++ ./front/src/Makefile Wed Mar 31 22:44:53 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./front/src/Makefile Tue Feb 15 14:23:34 1994
++++ ./front/src/Makefile Thu Aug 5 18:49:03 2004
@@ -41,10 +41,10 @@
make -f MakefileM2C LIB=$(MLIB)
@@ -25,3 +25,21 @@
echo p lalrIdDrv | mc -d $(MLIB)
mv lalrIdDrv lalrId
+@@ -80,13 +80,14 @@
+ sh -c "if test ! -d $(LIB)/Id; then mkdir -p $(LIB)/Id; else true; fi"
+
+ cleanId:
+- rm -f lalrId*
++ -rm -f lalrId*
+
+ clean: cleanId
+- rm -f core *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug Pars *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug Pars *.bak
+
+ CLEAN: clean
+- rm -f Scanner* Parser*
++ -rm -f Scanner* Parser*
+
+ .SUFFIXES: .def .mod .md .mi
+
diff --git a/devel/cocktail/files/patch-l2cg-m2c-Makefile b/devel/cocktail/files/patch-l2cg-m2c-Makefile
index 145c5ecb2de6..e0ccc86d9961 100644
--- a/devel/cocktail/files/patch-l2cg-m2c-Makefile
+++ b/devel/cocktail/files/patch-l2cg-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./l2cg/m2c/Makefile Tue Feb 15 14:23:40 1994
-+++ ./l2cg/m2c/Makefile Wed Mar 31 22:35:05 2004
-@@ -1,42 +1,31 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./l2cg/m2c/Makefile Tue Feb 15 14:23:40 1994
++++ ./l2cg/m2c/Makefile Thu Aug 5 18:49:08 2004
+@@ -1,42 +1,32 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -56,12 +56,13 @@
+clean:
-+ rm -f core *.o l2cg ParserDrv
++ -rm -f $(STDCLEAN)
++ -rm -f *.o l2cg ParserDrv
+
# HEAD
sources : Parser.h
-@@ -68,18 +57,3 @@
+@@ -68,18 +58,3 @@
Scanner.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-l2cg-src-Makefile b/devel/cocktail/files/patch-l2cg-src-Makefile
index 6dc835cfe236..5bb111e18e51 100644
--- a/devel/cocktail/files/patch-l2cg-src-Makefile
+++ b/devel/cocktail/files/patch-l2cg-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./l2cg/src/Makefile Tue Feb 15 14:23:44 1994
-+++ ./l2cg/src/Makefile Wed Mar 31 22:45:23 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./l2cg/src/Makefile Tue Feb 15 14:23:44 1994
++++ ./l2cg/src/Makefile Thu Aug 5 18:49:08 2004
@@ -14,14 +14,14 @@
mv ParserDrv l2cg
@@ -18,3 +18,17 @@
chmod a+rx $(BIN)/l2cg
install -c -s -m 755 l2cg $(LIB)/l2cg
+@@ -33,10 +33,11 @@
+ m2c:
+ # co RCS/*
+ make $(SOURCES)
+- rm -f ../m2c/*.[hc]
++ -rm -f ../m2c/*.[hc]
+ ln *.m[id] ../m2c
+ cd ../m2c; make sources M2FLAGS="-c -d../../reuse/src"
+ cd ../m2c; rm -f *.m[id]
+
+ clean:
+- rm -f l2cg core *.[dimor] *.bak *.m?
++ -rm -f $(STDCLEAN)
++ -rm -f l2cg *.[dimor] *.bak *.m?
diff --git a/devel/cocktail/files/patch-l2r-src-Makefile b/devel/cocktail/files/patch-l2r-src-Makefile
index 67f7beb1a339..7a34c1aa83d1 100644
--- a/devel/cocktail/files/patch-l2r-src-Makefile
+++ b/devel/cocktail/files/patch-l2r-src-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./l2r/src/Makefile Tue Feb 15 14:23:48 1994
-+++ ./l2r/src/Makefile Wed Mar 31 23:29:37 2004
-@@ -1,32 +1,34 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./l2r/src/Makefile Tue Feb 15 14:23:48 1994
++++ ./l2r/src/Makefile Thu Aug 5 18:49:10 2004
+@@ -1,35 +1,38 @@
-BIN = $(HOME)/bin
-OPT = -O
-CC = cc
@@ -42,11 +42,16 @@
clean:
- rm -f core l2r *.o
-+ rm -f core l2r *.o Scanner.c Scanner.h
++ -rm -f $(STDCLEAN)
++ -rm -f l2r *.o Scanner.c Scanner.h Parser.h Parser.c
CLEAN: clean
- rm -f $(SOURCES)
-@@ -44,7 +46,4 @@
+- rm -f $(SOURCES)
++ -rm -f $(SOURCES)
+
+ # dependencies
+
+@@ -44,7 +47,4 @@
man:
nroff -man l2r.1
diff --git a/devel/cocktail/files/patch-lalr-m2c-Makefile b/devel/cocktail/files/patch-lalr-m2c-Makefile
index 87ecfb129d0d..78c440e739e9 100644
--- a/devel/cocktail/files/patch-lalr-m2c-Makefile
+++ b/devel/cocktail/files/patch-lalr-m2c-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./lalr/m2c/Makefile Tue Feb 15 14:23:56 1994
-+++ ./lalr/m2c/Makefile Wed Mar 31 22:35:05 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./lalr/m2c/Makefile Tue Feb 15 14:23:56 1994
++++ ./lalr/m2c/Makefile Thu Aug 5 18:49:12 2004
@@ -1,21 +1,9 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
@@ -26,7 +26,7 @@
PLIB = ParserDrv.mi Parser.md Parser.mi Errors.md Errors.mi Scanner.md Scanner.mi \
ParserDrv.c Parser.c Parser.h Errors.c Errors.h Scanner.c Scanner.h \
-@@ -24,19 +12,21 @@
+@@ -24,19 +12,22 @@
all : lalr
@@ -53,11 +53,12 @@
+ sh -c "if test ! -d $(DESTLIB)/lalr; then mkdir -p $(DESTLIB)/lalr; else true; fi"
+clean:
-+ rm -f core *.o lalr
++ -rm -f $(STDCLEAN)
++ -rm -f *.o lalr
# HEAD
-@@ -200,18 +190,3 @@
+@@ -200,18 +191,3 @@
Infos.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-lalr-src-Makefile b/devel/cocktail/files/patch-lalr-src-Makefile
new file mode 100644
index 000000000000..f8e8ea4d67ae
--- /dev/null
+++ b/devel/cocktail/files/patch-lalr-src-Makefile
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./lalr/src/Makefile Tue Feb 15 14:24:10 1994
++++ ./lalr/src/Makefile Thu Aug 5 18:49:15 2004
+@@ -58,7 +58,8 @@
+ sources:
+
+ clean:
+- rm -f core *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug *.bak
+
+ .SUFFIXES: .def .mod .md .mi
+
diff --git a/devel/cocktail/files/patch-mpp-src-Makefile b/devel/cocktail/files/patch-mpp-src-Makefile
new file mode 100644
index 000000000000..4fd35bb2afbf
--- /dev/null
+++ b/devel/cocktail/files/patch-mpp-src-Makefile
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./mpp/src/Makefile Tue Feb 15 14:24:13 1994
++++ ./mpp/src/Makefile Thu Aug 5 18:49:16 2004
+@@ -21,7 +21,7 @@
+ install -c -s -m 755 mpp $(BIN)/mpp
+
+ clean:
+- rm -f *.[dimor] mpp *.bak
++ -rm -f *.[dimor] mpp *.bak
+
+ CLEAN: clean
+- rm -f Parser.m[di]
++ -rm -f Parser.m[di]
diff --git a/devel/cocktail/files/patch-mtc-m2c-Makefile b/devel/cocktail/files/patch-mtc-m2c-Makefile
index 23bc7d0b8f77..0b957dca5ab2 100644
--- a/devel/cocktail/files/patch-mtc-m2c-Makefile
+++ b/devel/cocktail/files/patch-mtc-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./mtc/m2c/Makefile Tue Feb 15 14:24:29 1994
-+++ ./mtc/m2c/Makefile Wed Mar 31 22:35:05 2004
-@@ -1,43 +1,36 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./mtc/m2c/Makefile Tue Feb 15 14:24:29 1994
++++ ./mtc/m2c/Makefile Thu Aug 5 18:49:18 2004
+@@ -1,43 +1,37 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -18,16 +18,17 @@
- # options for cc
-CFLAGS = -w -I$(REUSE) $(OPT)
--
++RTS = $(INCDIR)/SYSTEM_.h $(INCDIR)/SYSTEM_.c Arguments.h Arguments.c
+
- # options for mtc
-M2FLAGS = -c
--
-- # "runtime system"
- RTS = SYSTEM_.h SYSTEM_.c Arguments.h Arguments.c
-
--all :
+all: mtc
+- # "runtime system"
+-RTS = SYSTEM_.h SYSTEM_.c Arguments.h Arguments.c
+-
+-all :
+-
-install: mtc $(BIN) $(LIB)/mtc
- if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
- install -c -s -m 755 mtc $(BIN)
@@ -58,13 +59,36 @@
+clean:
-+ rm -f core *.o
-+ rm -f mtc
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f mtc
+
# HEAD
sources : AssocTab.h
-@@ -278,18 +271,3 @@
+@@ -236,9 +230,10 @@
+ mtc.o : Defs.h
+ mtc.o : Code.h
+
+-SYSTEM_.o : SYSTEM_.c SYSTEM_.h
++# SYSTEM_.o : SYSTEM_.c SYSTEM_.h
+
+-mtc : $(SYSTEM) \
++# mtc : $(SYSTEM) \
++mtc : \
+ mtc.o \
+ Code.o \
+ Values.o \
+@@ -257,7 +252,7 @@
+ Semantics.o \
+ DefMods.o \
+ Parser.o \
+-; $(CC) $(CFLAGS) -o mtc $(SYSTEM) \
++; $(CC) $(CFLAGS) -o mtc \
+ mtc.o \
+ Code.o \
+ Values.o \
+@@ -278,18 +273,3 @@
Parser.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-mtc-make-Makefile b/devel/cocktail/files/patch-mtc-make-Makefile
index 3b61e47faefb..5ee6c59748c5 100644
--- a/devel/cocktail/files/patch-mtc-make-Makefile
+++ b/devel/cocktail/files/patch-mtc-make-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./mtc/make/Makefile Tue Feb 15 14:24:53 1994
-+++ ./mtc/make/Makefile Wed Mar 31 22:47:12 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./mtc/make/Makefile Tue Feb 15 14:24:53 1994
++++ ./mtc/make/Makefile Thu Aug 5 18:49:21 2004
@@ -26,10 +26,10 @@
sh -c "if test ! -d $(LIB)/makemake; then mkdir -p $(LIB)/makemake; else true; fi"
@@ -26,8 +26,19 @@
echo p modIdDrv | mc -d ../../reuse/src
mv modIdDrv modId
-@@ -60,3 +60,4 @@
+@@ -53,10 +53,12 @@
+ sh -c "if test ! -d $(LIB)/Id; then mkdir -p $(LIB)/Id; else true; fi"
+
+ cleanId:
+- rm -f modId*
++ -rm -f modId*
+
+ clean: cleanId
+- rm -f *.[dimor] core ERRORS LISTING *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] ERRORS LISTING *.bak
CLEAN: clean
- rm -f [A-Z]*.[hc] Parser.m? Scanner.m? GetImports
+- rm -f [A-Z]*.[hc] Parser.m? Scanner.m? GetImports
++ -rm -f [A-Z]*.[hc] Parser.m? Scanner.m? GetImports
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-mtc-src-Makefile b/devel/cocktail/files/patch-mtc-src-Makefile
index 8c78bbb9e4c2..a12f0963c0d1 100644
--- a/devel/cocktail/files/patch-mtc-src-Makefile
+++ b/devel/cocktail/files/patch-mtc-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./mtc/src/Makefile Tue Feb 15 14:25:08 1994
-+++ ./mtc/src/Makefile Wed Mar 31 22:54:33 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./mtc/src/Makefile Tue Feb 15 14:25:08 1994
++++ ./mtc/src/Makefile Thu Aug 5 18:49:23 2004
@@ -27,25 +27,25 @@
echo p mtc | $(MC)
@@ -32,7 +32,7 @@
# Opp = output pre processor
install: mtc $(BIN) $(LIB)/mtc
-@@ -75,30 +75,30 @@
+@@ -75,35 +75,36 @@
MTC = time mtc -tm -d../../reuse/src s.mi
test: $(GEN) $(SRCM)
@@ -70,3 +70,11 @@
make mtc
$(MTC)
+ clean:
+- rm -f *.[dimor] core ERRORS LISTING convert *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] ERRORS LISTING convert *.bak
+
+ CLEAN: clean
+- rm -f mtc $(GEN) Tree.TS
++ -rm -f mtc $(GEN) Tree.TS
diff --git a/devel/cocktail/files/patch-puma-ffaba-c-Makefile b/devel/cocktail/files/patch-puma-ffaba-c-Makefile
index a4c4e89389e0..d9bbfa9f807f 100644
--- a/devel/cocktail/files/patch-puma-ffaba-c-Makefile
+++ b/devel/cocktail/files/patch-puma-ffaba-c-Makefile
@@ -1,25 +1,42 @@
---- ../../work/cocktail-9309//./puma/ffaba-c/Makefile Tue Feb 15 14:26:16 1994
-+++ ./puma/ffaba-c/Makefile Wed Mar 31 22:35:05 2004
-@@ -1,13 +1,9 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./puma/ffaba-c/Makefile Tue Feb 15 14:26:16 1994
++++ ./puma/ffaba-c/Makefile Thu Aug 5 18:49:29 2004
+@@ -1,28 +1,28 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc -O
++ROOTDIR = ../..
++.include "../../Makefile.inc"
- all: main
+-all: main
++CFLAGS += -I $(TMPINC)
++
++test all: main
time main
main: ProTest.o Compiler.o
- cc -o main Compiler.o ProTest.o $(LIB)/libreuse.a
-+ $(CC) -o main Compiler.o ProTest.o $(LIB)/libreuse.a
++ $(CC) -o main Compiler.o ProTest.o $(TMPLIB)/libreuse.a
ProTest.o: ProTest.h
Compiler.o: ProTest.h
-@@ -24,5 +20,5 @@
+
+ ProTest.h ProTest.c ProTest.TS: ffaba.ast
+- cg -cdi4 ffaba.ast
++ $(CG) -cdi4 ffaba.ast
+
+ Compiler.h Compiler.c: ffaba.puma ProTest.TS
+- puma -cdip ffaba.puma
++ $(PUMA) -cdip ffaba.puma
+
+ lint: ProTest.h ProTest.c Compiler.h Compiler.c
+ lint $(CFLAGS) *.c
+
clean:
- rm -f core Compiler.* ProTest.* yy*.w main
+- rm -f core Compiler.* ProTest.* yy*.w main
++ -rm -f $(STDCLEAN)
++ -rm -f Compiler.* ProTest.* yy*.w main
++
-.c.o:
- $(CC) $(CFLAGS) -c $*.c;
-+.include "../../Makefile.inc"
-+
diff --git a/devel/cocktail/files/patch-puma-ffaba-m-Makefile b/devel/cocktail/files/patch-puma-ffaba-m-Makefile
index b8c62d26d3d8..fba6889c720e 100644
--- a/devel/cocktail/files/patch-puma-ffaba-m-Makefile
+++ b/devel/cocktail/files/patch-puma-ffaba-m-Makefile
@@ -1,8 +1,11 @@
---- ../../work/cocktail-9309//./puma/ffaba-m/Makefile Tue Feb 15 14:26:15 1994
-+++ ./puma/ffaba-m/Makefile Wed Mar 31 22:35:05 2004
-@@ -12,3 +12,5 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./puma/ffaba-m/Makefile Tue Feb 15 14:26:15 1994
++++ ./puma/ffaba-m/Makefile Thu Aug 5 18:49:29 2004
+@@ -11,4 +11,7 @@
+ puma -dip ffaba.puma
clean:
- rm -f core Compiler.* ProTest.* main.[mor] main
+- rm -f core Compiler.* ProTest.* main.[mor] main
++ -rm -f $(STDCLEAN)
++ -rm -f Compiler.* ProTest.* main.[mor] main
+
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-puma-m2c-C.c b/devel/cocktail/files/patch-puma-m2c-C.c
index 794e06e90410..0ead5c714171 100644
--- a/devel/cocktail/files/patch-puma-m2c-C.c
+++ b/devel/cocktail/files/patch-puma-m2c-C.c
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./puma/m2c/C.c Tue Feb 15 14:26:00 1994
-+++ ./puma/m2c/C.c Wed Mar 31 22:35:05 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./puma/m2c/C.c Tue Feb 15 14:26:00 1994
++++ ./puma/m2c/C.c Thu Aug 5 18:49:27 2004
@@ -1558,7 +1558,7 @@
IO_WriteS(Tree_f, (STRING)"_Exit) () = yyExit;", 19L);
IO_WriteNl(Tree_f);
diff --git a/devel/cocktail/files/patch-puma-m2c-Makefile b/devel/cocktail/files/patch-puma-m2c-Makefile
index eb1609575cd7..ceb0f2c8355a 100644
--- a/devel/cocktail/files/patch-puma-m2c-Makefile
+++ b/devel/cocktail/files/patch-puma-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./puma/m2c/Makefile Tue Feb 15 14:25:55 1994
-+++ ./puma/m2c/Makefile Wed Mar 31 22:35:05 2004
-@@ -1,39 +1,31 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./puma/m2c/Makefile Tue Feb 15 14:25:55 1994
++++ ./puma/m2c/Makefile Thu Aug 5 18:49:29 2004
+@@ -1,39 +1,32 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -48,8 +48,9 @@
-# SYSTEM_ = SYSTEM_.o
+clean:
-+ rm -f core *.o
-+ rm -f puma
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f puma
lint:
- lint -I$(REUSE) *.c
@@ -57,7 +58,7 @@
# HEAD
-@@ -140,18 +132,3 @@
+@@ -140,18 +133,3 @@
Parser.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-puma-src-Makefile b/devel/cocktail/files/patch-puma-src-Makefile
index 9f32b94839e9..4ad6882adde8 100644
--- a/devel/cocktail/files/patch-puma-src-Makefile
+++ b/devel/cocktail/files/patch-puma-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./puma/src/Makefile Tue Feb 15 14:25:38 1994
-+++ ./puma/src/Makefile Wed Mar 31 22:56:36 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./puma/src/Makefile Tue Feb 15 14:25:38 1994
++++ ./puma/src/Makefile Thu Aug 5 18:49:25 2004
@@ -20,40 +20,40 @@
echo p puma | mc -d ../../reuse/src
@@ -65,6 +65,15 @@
chmod a+rx $(BIN)/puma
install -c -s -m 755 puma $(LIB)/puma
install -c -m 644 TypeTab.c $(LIB)/puma
+@@ -80,7 +80,7 @@
+ m2c:
+ # co RCS/*
+ make $(SOURCES)
+- rm -f ../m2c/*.[hc]
++ -rm -f ../m2c/*.[hc]
+ cp TypeTab.[mc] ../m2c
+ ln *.m[id] ../m2c
+ cd ../m2c; make sources M2FLAGS="-c -d../../reuse/src"
@@ -90,9 +90,9 @@
pumaId: puma.rex
@@ -77,3 +86,18 @@
echo p pumaIdDrv | mc -d ../../reuse/src
mv pumaIdDrv pumaId
+@@ -105,10 +105,11 @@
+ sh -c "if test ! -d $(LIB)/Id; then mkdir -p $(LIB)/Id; else true; fi"
+
+ cleanId:
+- rm -f pumaId*
++ -rm -f pumaId*
+
+ clean: cleanId
+- rm -f _Debug core *.[dior] [A-SU-Za-z]*.m Tree*.m *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f _Debug *.[dior] [A-SU-Za-z]*.m Tree*.m *.bak
+
+ CLEAN: clean
+- rm -f puma $(SOURCES) Tree.TS Scanner.rpp puma.rex Parser.lalr
++ -rm -f puma $(SOURCES) Tree.TS Scanner.rpp puma.rex Parser.lalr
diff --git a/devel/cocktail/files/patch-r2l-m2c-Makefile b/devel/cocktail/files/patch-r2l-m2c-Makefile
index edd495b6ddca..72abbdd3cf1a 100644
--- a/devel/cocktail/files/patch-r2l-m2c-Makefile
+++ b/devel/cocktail/files/patch-r2l-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./r2l/m2c/Makefile Tue Feb 15 14:26:18 1994
-+++ ./r2l/m2c/Makefile Wed Mar 31 22:35:06 2004
-@@ -1,33 +1,26 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./r2l/m2c/Makefile Tue Feb 15 14:26:18 1994
++++ ./r2l/m2c/Makefile Thu Aug 5 18:49:31 2004
+@@ -1,33 +1,27 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -43,12 +43,13 @@
-# SYSTEM_ = SYSTEM_.o
+clean:
-+ rm -f core *.o
-+ rm -f r2l
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f r2l
# HEAD
-@@ -79,17 +72,3 @@
+@@ -79,17 +73,3 @@
$(CLIBS)
# TAIL
diff --git a/devel/cocktail/files/patch-r2l-src-Makefile b/devel/cocktail/files/patch-r2l-src-Makefile
index 1e9e005e8b0b..771f55763dc7 100644
--- a/devel/cocktail/files/patch-r2l-src-Makefile
+++ b/devel/cocktail/files/patch-r2l-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./r2l/src/Makefile Tue Feb 15 14:26:26 1994
-+++ ./r2l/src/Makefile Wed Mar 31 22:57:18 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./r2l/src/Makefile Tue Feb 15 14:26:26 1994
++++ ./r2l/src/Makefile Thu Aug 5 18:49:31 2004
@@ -15,14 +15,14 @@
echo p r2l | mc -d ../../reuse/src
@@ -18,3 +18,20 @@
chmod a+rx $(BIN)/r2l
install -c -s -m 755 r2l $(LIB)/r2l
+@@ -35,12 +35,13 @@
+ # co RCS/*
+ make $(SOURCES)
+ ln *.m[id] ../m2c
+- rm -f ../m2c/*.[hc]
++ -rm -f ../m2c/*.[hc]
+ cd ../m2c; make sources M2FLAGS="-c -d../../reuse/src"
+ cd ../m2c; rm -f *.m[id]
+
+ clean:
+- rm -f core *.[dimor] ERRORS LISTING _Debug r2l
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] ERRORS LISTING _Debug r2l
+
+ CLEAN: clean
+- rm -f $(SOURCES)
++ -rm -f $(SOURCES)
diff --git a/devel/cocktail/files/patch-reuse-c-DynArrDrv.c b/devel/cocktail/files/patch-reuse-c-DynArrDrv.c
new file mode 100644
index 000000000000..af8b9daf8993
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-DynArrDrv.c
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/DynArrDrv.c Tue Feb 15 14:26:33 1994
++++ ./reuse/c/DynArrDrv.c Fri Sep 10 13:35:02 2004
+@@ -23,7 +23,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: DynArrDrv.c,v 1.5 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: DynArrDrv.c,v 1.5 1993/08/18 15:01:05 grosch rel $");
+
+ # include "ratc.h"
+ # include "DynArray.h"
diff --git a/devel/cocktail/files/patch-reuse-c-DynArray.c b/devel/cocktail/files/patch-reuse-c-DynArray.c
new file mode 100644
index 000000000000..463220b2008f
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-DynArray.c
@@ -0,0 +1,22 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/DynArray.c Tue Feb 15 14:26:34 1994
++++ ./reuse/c/DynArray.c Fri Sep 10 13:35:02 2004
+@@ -29,7 +29,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: DynArray.c,v 1.7 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: DynArray.c,v 1.7 1993/08/18 15:01:05 grosch rel $");
+
+ # include "ratc.h"
+ # include "DynArray.h"
+@@ -39,8 +40,7 @@
+
+ /* INVARIANT ElmtCount * AlignedSize (ElmtSize) % sizeof (long) == 0 */
+
+-static unsigned long AlignedSize (ElmtSize)
+- unsigned long ElmtSize;
++static unsigned long AlignedSize ( unsigned long ElmtSize)
+ {
+ register unsigned long Align;
+
diff --git a/devel/cocktail/files/patch-reuse-c-Errors.c b/devel/cocktail/files/patch-reuse-c-Errors.c
index 1c2924338f41..baaae73f23a9 100644
--- a/devel/cocktail/files/patch-reuse-c-Errors.c
+++ b/devel/cocktail/files/patch-reuse-c-Errors.c
@@ -1,6 +1,38 @@
---- ../../work/cocktail-9309//./reuse/c/Errors.c Tue Feb 15 14:26:34 1994
-+++ ./reuse/c/Errors.c Wed Mar 31 22:35:06 2004
-@@ -69,7 +69,8 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Errors.c Tue Feb 15 14:26:34 1994
++++ ./reuse/c/Errors.c Fri Sep 10 13:35:02 2004
+@@ -14,8 +14,11 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Juli 1992 */
+
+-static char rcsid [] = "$Id: Errors.c,v 1.2 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: Errors.c,v 1.2 1993/08/18 15:01:05 grosch rel $");
+
++# include <string.h>
++# include <stdlib.h>
+ # include "Errors.h"
+
+ # ifdef __cplusplus
+@@ -34,9 +37,9 @@
+
+ # define MaxError 100
+
+-static void yyExit () { rExit (1); }
++static void yyExit (NOARGS) { rExit (1); }
+
+-void (* Errors_Exit) () = yyExit;
++void (* Errors_Exit) (NOARGS) = yyExit;
+
+ typedef struct {
+ tPosition Position;
+@@ -63,13 +66,14 @@
+ static void WriteInfo ARGS((int InfoClass, char * Info));
+ static void WriteMessage ARGS((bool IsErrorCode, int ErrorCode, int ErrorClass, tPosition Position, int InfoClass, char * Info));
+ static void StoreMessage ARGS((bool IsErrorCode, int ErrorCode, int ErrorClass, tPosition Position, int InfoClass, char * Info));
+-static int IsLess ARGS((tError * i, tError * j));
++static int IsLess ARGS((const void * i, const void * j));
+
+ static tError ErrorTable [MaxError + 1];
static int MessageCount;
static bool IsStore = false;
static void (* HandleMessage) ARGS((bool IsErrorCode, int ErrorCode, int ErrorClass, tPosition Position, int InfoClass, char * Info)) = WriteMessage;
@@ -10,7 +42,7 @@
void ErrorMessage
# if defined __STDC__ | defined __cplusplus
-@@ -122,6 +123,7 @@
+@@ -122,6 +126,7 @@
(Position, ErrorClass) tPosition Position; int ErrorClass;
# endif
{
@@ -18,7 +50,7 @@
WritePosition (Out, Position);
(void) fputs (": ", Out);
switch (ErrorClass) {
-@@ -143,6 +145,7 @@
+@@ -143,6 +148,7 @@
(ErrorCode) int ErrorCode;
# endif
{
@@ -26,7 +58,7 @@
switch (ErrorCode) {
case xxNoText : break;
case xxSyntaxError : (void) fputs ("syntax error" , Out); break;
-@@ -163,6 +166,7 @@
+@@ -163,6 +169,7 @@
{
int i;
if (InfoClass == xxNone) return;
@@ -34,3 +66,33 @@
(void) fputs (": ", Out);
switch (InfoClass) {
case xxInteger : (void) fprintf (Out, "%d", * (int *) Info); break;
+@@ -201,10 +208,10 @@
+ # endif
+ {
+ int i;
+- char * Info;
++ char * Info = NULL;
+ char s [256];
+
+- qsort ((char *) & ErrorTable [1], MessageCount, sizeof (tError), IsLess);
++ qsort ((char *) & ErrorTable [1], MessageCount, sizeof (tError), (&IsLess));
+ Out = File;
+ for (i = 1; i <= MessageCount; i ++) {
+ register tError * With = & ErrorTable [i];
+@@ -273,13 +280,13 @@
+
+ static int IsLess
+ # if defined __STDC__ | defined __cplusplus
+- (tError * i, tError * j)
++ ( const void * i, const void * j)
+ # else
+ (i, j) tError * i, * j;
+ # endif
+ {
+- register int r = Compare (i->Position, j->Position);
+- return r != 0 ? r : i->ErrorNumber - j->ErrorNumber;
++ register int r = Compare ((tPosition)(((tError*)i)->Position), (tPosition)(((tError*)j)->Position));
++ return r != 0 ? r : (int)(((tError*)i)->ErrorNumber - ((tError*)j)->ErrorNumber);
+ }
+
+ void StoreMessages
diff --git a/devel/cocktail/files/patch-reuse-c-Errors.h b/devel/cocktail/files/patch-reuse-c-Errors.h
new file mode 100644
index 000000000000..94f73074a1b3
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Errors.h
@@ -0,0 +1,17 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Errors.h Tue Feb 15 14:26:35 1994
++++ ./reuse/c/Errors.h Fri Sep 10 13:35:02 2004
+@@ -44,13 +44,7 @@
+ # define xxSet 8
+ # define xxIdent 9
+
+-# if defined __STDC__ | defined __cplusplus
+-# define ARGS(parameters) parameters
+-# else
+-# define ARGS(parameters) ()
+-# endif
+-
+-extern void (* Errors_Exit) ();
++extern void (* Errors_Exit) (NOARGS);
+ /* Refers to a procedure that specifies */
+ /* what to do if 'ErrorClass' = Fatal. */
+ /* Default: terminate program execution. */
diff --git a/devel/cocktail/files/patch-reuse-c-ErrorsDrv.c b/devel/cocktail/files/patch-reuse-c-ErrorsDrv.c
new file mode 100644
index 000000000000..76671d34b9cf
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-ErrorsDrv.c
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/ErrorsDrv.c Tue Feb 15 14:26:35 1994
++++ ./reuse/c/ErrorsDrv.c Fri Sep 10 13:35:02 2004
+@@ -8,7 +8,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Aug. 1992 */
+
+-static char rcsid [] = "$Id: ErrorsDrv.c,v 1.0 1992/08/07 14:31:41 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: ErrorsDrv.c,v 1.0 1992/08/07 14:31:41 grosch rel $");
+
+ # include "ratc.h"
+ # include <stdio.h>
diff --git a/devel/cocktail/files/patch-reuse-c-General.c b/devel/cocktail/files/patch-reuse-c-General.c
new file mode 100644
index 000000000000..9e55b5a7dd96
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-General.c
@@ -0,0 +1,21 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/General.c Tue Feb 15 14:26:35 1994
++++ ./reuse/c/General.c Fri Sep 10 13:35:02 2004
+@@ -26,7 +26,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: General.c,v 1.6 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: General.c,v 1.6 1993/08/18 15:01:05 grosch rel $");
+
+ # include "ratc.h"
+ # include "General.h"
+@@ -66,7 +67,7 @@
+ }
+
+ static struct { char yychar; double yydouble; } yyForAlign;
+-short yyMaxAlign = sizeof (yyForAlign) - sizeof (double);
++unsigned long yyMaxAlign = sizeof (yyForAlign) - sizeof (double);
+ long yyAlignMasks [] = { 0,
+ 0xffffffff, 0xfffffffe, 0xffffffff, 0xfffffffc,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffff8,
diff --git a/devel/cocktail/files/patch-reuse-c-General.h b/devel/cocktail/files/patch-reuse-c-General.h
new file mode 100644
index 000000000000..23290c30f61b
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-General.h
@@ -0,0 +1,22 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/General.h Tue Feb 15 14:26:36 1994
++++ ./reuse/c/General.h Fri Sep 10 13:35:03 2004
+@@ -30,8 +30,10 @@
+
+ # ifdef __STDC__
+ # define ARGS(parameters) parameters
++# define NOARGS void
+ # else
+ # define ARGS(parameters) ()
++# define NOARGS
+ # endif
+
+ # define Min(a,b) ((a <= b) ? a : b)
+@@ -44,7 +46,7 @@
+ extern unsigned long Exp2 ARGS((register cardinal x));
+ /* Returns 2 to the power of 'x'. */
+
+-extern short yyMaxAlign;
++extern unsigned long yyMaxAlign;
+ extern long yyAlignMasks [];
+
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-c-Idents.c b/devel/cocktail/files/patch-reuse-c-Idents.c
new file mode 100644
index 000000000000..6d063409d1e0
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Idents.c
@@ -0,0 +1,39 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Idents.c Tue Feb 15 14:26:36 1994
++++ ./reuse/c/Idents.c Fri Sep 10 13:35:03 2004
+@@ -44,7 +44,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: Idents.c,v 1.12 1992/05/05 13:19:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: Idents.c,v 1.12 1992/05/05 13:19:05 grosch rel $");
+
+ # include "ratc.h"
+ # include "Idents.h"
+@@ -65,7 +66,7 @@
+ static unsigned short Null = 0;
+ static IdentTableEntry Table [InitialTableSize] = {{0, 0, 0}, {& Null, 0, cNoIdent}};
+ static IdentTableEntry * TablePtr = Table;
+-static unsigned long IdentTableSize = InitialTableSize;
++static tIdent IdentTableSize = InitialTableSize;
+ static tIdent IdentCount = 1;
+
+ static tIdent HashTable [HashTableSize] = {
+@@ -105,7 +106,7 @@
+
+ tIdent MakeIdent
+ # ifdef __STDC__
+- (register char * string, register cardinal length)
++ (char * string, cardinal length)
+ # else
+ (string, length)
+ register char * string;
+@@ -129,7 +130,7 @@
+ }
+
+ if (++ IdentCount == IdentTableSize) /* not found: enter */
+- ExtendArray ((char * *) & TablePtr, & IdentTableSize, (long) sizeof (IdentTableEntry));
++ ExtendArray ((char * *) & TablePtr, (unsigned long*)&IdentTableSize, (long) sizeof (IdentTableEntry));
+ TablePtrReg = & TablePtr [IdentCount];
+ TablePtrReg->String = PutString (string, length);
+ TablePtrReg->Length = length;
diff --git a/devel/cocktail/files/patch-reuse-c-Idents.h b/devel/cocktail/files/patch-reuse-c-Idents.h
new file mode 100644
index 000000000000..c28718ad8564
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Idents.h
@@ -0,0 +1,40 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Idents.h Tue Feb 15 14:26:36 1994
++++ ./reuse/c/Idents.h Fri Sep 10 13:35:03 2004
+@@ -39,12 +39,6 @@
+ # include "ratc.h"
+ # include "StringMem.h"
+
+-# ifdef __STDC__
+-# define ARGS(parameters) parameters
+-# else
+-# define ARGS(parameters) ()
+-# endif
+-
+ typedef cardinal tIdent;
+
+ extern tIdent NoIdent; /* A default identifer (empty string) */
+@@ -60,20 +54,20 @@
+ /* Returns a reference to the string identified */
+ /* by 'ident'. */
+
+-extern tIdent MaxIdent ();
++extern tIdent MaxIdent (NOARGS);
+ /* Returns the currently maximal identifier. */
+
+ extern void WriteIdent ARGS((FILE * file, tIdent ident));
+ /* The string encoded by the identifier 'ident' */
+ /* is printed on the file. */
+
+-extern void WriteIdents ();
++extern void WriteIdents (NOARGS);
+ /* The contents of the identifier table is */
+ /* printed on the standard output. */
+
+-extern void InitIdents ();
++extern void InitIdents (NOARGS);
+ /* The identifier table is initialized. */
+
+-extern void WriteHashTable ();
++extern void WriteHashTable (NOARGS);
+
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-c-IdentsDrv.c b/devel/cocktail/files/patch-reuse-c-IdentsDrv.c
new file mode 100644
index 000000000000..e7873e797215
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-IdentsDrv.c
@@ -0,0 +1,9 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/IdentsDrv.c Tue Feb 15 14:26:37 1994
++++ ./reuse/c/IdentsDrv.c Fri Sep 10 13:35:03 2004
+@@ -1,4 +1,5 @@
+-static char rcsid [] = "$Id: IdentsDrv.c,v 1.4 1992/09/24 13:03:56 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: IdentsDrv.c,v 1.4 1992/09/24 13:03:56 grosch rel $");
+
+ # include <stdio.h>
+ # include "Idents.h"
diff --git a/devel/cocktail/files/patch-reuse-c-Makefile b/devel/cocktail/files/patch-reuse-c-Makefile
index 18d1d6a0a811..5942e17c1ca7 100644
--- a/devel/cocktail/files/patch-reuse-c-Makefile
+++ b/devel/cocktail/files/patch-reuse-c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./reuse/c/Makefile Tue Feb 15 14:26:37 1994
-+++ ./reuse/c/Makefile Wed Mar 31 22:35:06 2004
-@@ -1,35 +1,30 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Makefile Tue Feb 15 14:26:37 1994
++++ ./reuse/c/Makefile Thu Aug 5 18:49:32 2004
+@@ -1,35 +1,31 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-TARGET = SUN
@@ -42,7 +42,8 @@
+ chmod u+w,a+r $(DESTINCDIR)/*.h
+
+clean: cleantest
-+ -rm -f *.o *Drv core $(REUSE)
++ -rm -f $(STDCLEAN)
++ -rm -f *.o *Drv
+ -rm -f $(REUSE)
+
+cleantest:
@@ -53,7 +54,7 @@
# test programs
-@@ -73,7 +68,3 @@
+@@ -73,7 +69,3 @@
ErrorsDrv.o: Errors.h Positions.h Sets.h Idents.h
Source.o: Source.h rSystem.h
diff --git a/devel/cocktail/files/patch-reuse-c-Positions.c b/devel/cocktail/files/patch-reuse-c-Positions.c
new file mode 100644
index 000000000000..8cc5fc82348a
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Positions.c
@@ -0,0 +1,21 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Positions.c Tue Feb 15 14:26:37 1994
++++ ./reuse/c/Positions.c Fri Sep 10 13:35:03 2004
+@@ -17,7 +17,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Juli 1992 */
+
+-static char rcsid [] = "$Id: Positions.c,v 1.3 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: Positions.c,v 1.3 1993/08/18 15:01:05 grosch rel $");
+
+ # include "Positions.h"
+
+@@ -25,7 +26,7 @@
+
+ int Compare
+ # if defined __STDC__ | defined __cplusplus
+- (tPosition Position1, tPosition Position2)
++ (const tPosition Position1, const tPosition Position2)
+ # else
+ (Position1, Position2) tPosition Position1, Position2;
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-c-Positions.h b/devel/cocktail/files/patch-reuse-c-Positions.h
new file mode 100644
index 000000000000..7e0d6e3f2a91
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Positions.h
@@ -0,0 +1,11 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Positions.h Tue Feb 15 14:26:38 1994
++++ ./reuse/c/Positions.h Fri Sep 10 13:35:03 2004
+@@ -27,7 +27,7 @@
+ extern tPosition NoPosition;
+ /* A default position (0, 0). */
+
+-extern int Compare ARGS((tPosition Position1, tPosition Position2));
++extern int Compare ARGS((const tPosition Position1, const tPosition Position2));
+ /* Returns -1 if Position1 < Position2. */
+ /* Returns 0 if Position1 = Position2. */
+ /* Returns 1 if Position1 > Position2. */
diff --git a/devel/cocktail/files/patch-reuse-c-Sets.c b/devel/cocktail/files/patch-reuse-c-Sets.c
new file mode 100644
index 000000000000..008519de509f
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Sets.c
@@ -0,0 +1,68 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Sets.c Tue Feb 15 14:26:38 1994
++++ ./reuse/c/Sets.c Fri Sep 10 13:35:03 2004
+@@ -44,7 +44,11 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: Sets.c,v 1.12 1993/08/20 08:12:15 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: Sets.c,v 1.12 1993/08/20 08:12:15 grosch rel $");
++
++# include <stdlib.h>
++# include <stdio.h>
+
+ # include "ratc.h"
+ # include "Sets.h"
+@@ -306,7 +310,7 @@
+
+ bool Forall (Set, Proc)
+ tSet * Set ;
+- bool (* Proc) ();
++ bool (* Proc) (cardinal c);
+ {
+ register tSet * rSet = Set;
+ register cardinal i;
+@@ -320,7 +324,7 @@
+
+ bool Exists (Set, Proc)
+ tSet * Set ;
+- bool (* Proc) ();
++ bool (* Proc) (cardinal c);
+ {
+ register tSet * rSet = Set;
+ register cardinal i;
+@@ -334,7 +338,7 @@
+
+ bool Exists1 (Set, Proc)
+ tSet * Set ;
+- bool (* Proc) ();
++ bool (* Proc) (cardinal c);
+ {
+ register tSet * rSet = Set;
+ register cardinal i, n;
+@@ -397,7 +401,7 @@
+
+ void ForallDo (Set, Proc)
+ tSet * Set ;
+- void (* Proc) ();
++ void (* Proc) (cardinal c);
+ {
+ register tSet * rSet = Set;
+ register cardinal i;
+@@ -428,8 +432,7 @@
+
+ static FILE * g;
+
+-void PrintElmt (Elmt)
+- cardinal Elmt ;
++static void PrintElmt (cardinal Elmt)
+ {
+ (void) fprintf (g, " %d", Elmt);
+ }
+@@ -447,5 +450,5 @@
+ void InitSets ()
+ {
+ if (sizeof (BITSET) != BytesPerBitset)
+- (void) fprintf (stderr, "Sets: sizeof (BITSET) = %d\n", sizeof (BITSET));
++ (void) fprintf (stderr, "Sets: sizeof (BITSET) = %d\n", (int)sizeof (BITSET));
+ }
diff --git a/devel/cocktail/files/patch-reuse-c-Sets.h b/devel/cocktail/files/patch-reuse-c-Sets.h
new file mode 100644
index 000000000000..d0e08f15757b
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Sets.h
@@ -0,0 +1,42 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Sets.h Tue Feb 15 14:26:38 1994
++++ ./reuse/c/Sets.h Fri Sep 10 13:35:03 2004
+@@ -38,15 +38,9 @@
+ # include "ratc.h"
+ # include <stdio.h>
+
+-# ifdef __STDC__
+-# define ARGS(parameters) parameters
+-# else
+-# define ARGS(parameters) ()
+-# endif
+-
+-# define BitsPerBitset 32
+-# define LdBitsPerBitset 5
+-# define MaskBitsPerBitset 0x0000001f
++# define BitsPerBitset (8*sizeof(long))
++# define LdBitsPerBitset (BitsPerBitset==32?5:6)
++# define MaskBitsPerBitset 0x0000003f
+
+ # define IsElement(Elmt, Set) ((long) ((Set)->BitsetPtr [(Elmt) >> LdBitsPerBitset] << ((Elmt) & MaskBitsPerBitset)) < 0)
+ # define Size(Set) ((Set)->MaxElmt)
+@@ -86,15 +80,15 @@
+ /* extern bool IsNotEqual ARGS((tSet * Set1, tSet * Set2)); */
+ /* extern bool IsElement ARGS((cardinal Elmt, tSet * Set)); */
+ extern bool IsEmpty ARGS((tSet * Set));
+-extern bool Forall ARGS((tSet * Set, bool (* Proc) ()));
+-extern bool Exists ARGS((tSet * Set, bool (* Proc) ()));
+-extern bool Exists1 ARGS((tSet * Set, bool (* Proc) ()));
++extern bool Forall ARGS((tSet * Set, bool (* Proc) (cardinal c)));
++extern bool Exists ARGS((tSet * Set, bool (* Proc) (cardinal c)));
++extern bool Exists1 ARGS((tSet * Set, bool (* Proc) (cardinal c)));
+ extern void Assign ARGS((tSet * Set1, tSet * Set2));
+ extern void AssignElmt ARGS((tSet * Set, cardinal Elmt));
+ extern void AssignEmpty ARGS((tSet * Set));
+-extern void ForallDo ARGS((tSet * Set, void (* Proc) ()));
++extern void ForallDo ARGS((tSet * Set, void (* Proc) (cardinal c)));
+ extern void ReadSet ARGS((FILE * File, tSet * Set));
+ extern void WriteSet ARGS((FILE * File, tSet * Set));
+-extern void InitSets ();
++extern void InitSets (NOARGS);
+
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-c-SetsDrv.c b/devel/cocktail/files/patch-reuse-c-SetsDrv.c
new file mode 100644
index 000000000000..fdfa32f9fa03
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-SetsDrv.c
@@ -0,0 +1,30 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/SetsDrv.c Tue Feb 15 14:26:39 1994
++++ ./reuse/c/SetsDrv.c Fri Sep 10 13:35:03 2004
+@@ -35,7 +35,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: SetsDrv.c,v 1.9 1993/08/20 08:12:15 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: SetsDrv.c,v 1.9 1993/08/20 08:12:15 grosch rel $");
+
+ # include "ratc.h"
+ # include <stdio.h>
+@@ -47,7 +48,7 @@
+ static long i ;
+ static FILE * f ;
+
+-main ()
++int main (void)
+ {
+ MakeSet (& s, max);
+ MakeSet (& t, max);
+@@ -99,7 +100,7 @@
+
+ for (;;) {
+ (void) printf ("\n");
+- (void) scanf ("%d", & i);
++ (void) scanf ("%ld", & i);
+ if (i == 0) break;
+ MakeSet (& s, (short) i);
+ ReadSet (stdin, & s);
diff --git a/devel/cocktail/files/patch-reuse-c-Source.c b/devel/cocktail/files/patch-reuse-c-Source.c
new file mode 100644
index 000000000000..05f9883970a6
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Source.c
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Source.c Tue Feb 15 14:26:39 1994
++++ ./reuse/c/Source.c Fri Sep 10 13:35:03 2004
+@@ -11,7 +11,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Juli 1992 */
+
+-static char rcsid [] = "$Id: Source.c,v 1.1 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: Source.c,v 1.1 1993/08/18 15:01:05 grosch rel $");
+
+ # include "Source.h"
+
diff --git a/devel/cocktail/files/patch-reuse-c-StrMemDrv.c b/devel/cocktail/files/patch-reuse-c-StrMemDrv.c
new file mode 100644
index 000000000000..c61378f7958a
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-StrMemDrv.c
@@ -0,0 +1,26 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/StrMemDrv.c Tue Feb 15 14:26:40 1994
++++ ./reuse/c/StrMemDrv.c Fri Sep 10 13:35:03 2004
+@@ -1,9 +1,12 @@
+-static char rcsid [] = "$Id: StrMemDrv.c,v 1.4 1992/09/24 13:03:56 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: StrMemDrv.c,v 1.4 1992/09/24 13:03:56 grosch rel $");
+
+ # include <stdio.h>
++# include <string.h>
++
+ # include "StringMem.h"
+
+-static void loop ()
++static void loop (void)
+ {
+ char string [256];
+ tStringRef stringref;
+@@ -19,7 +22,7 @@
+ WriteStringMemory ();
+ }
+
+-main ()
++int main (void)
+ {
+ loop ();
+ InitStringMemory ();
diff --git a/devel/cocktail/files/patch-reuse-c-StringMem.c b/devel/cocktail/files/patch-reuse-c-StringMem.c
new file mode 100644
index 000000000000..6788d99d97d7
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-StringMem.c
@@ -0,0 +1,30 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/StringMem.c Tue Feb 15 14:26:40 1994
++++ ./reuse/c/StringMem.c Fri Sep 10 13:35:03 2004
+@@ -47,7 +47,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: StringMem.c,v 1.13 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: StringMem.c,v 1.13 1993/08/18 15:01:05 grosch rel $");
+
+ # include "ratc.h"
+ # include "StringMem.h"
+@@ -81,7 +82,7 @@
+ # endif
+ {
+ register char * stringReg;
+- register long NeededSpace = (length + 3) & 0xfffffffe;
++ register unsigned long NeededSpace = (length + 3) & 0xfffffffe;
+ register tStringRef StartPtr;
+
+ if (MemorySpaceLeft < NeededSpace) {
+@@ -163,7 +164,7 @@
+
+ while (StringPtr < BlockPtr->Last) {
+ long length = LengthSt (StringPtr) + 2;
+- (void) printf ("%8x ", StringPtr);
++ (void) printf ("%p ", (void*) StringPtr);
+ WriteString (stdout, StringPtr);
+ (void) fputc ('\n', stdout);
+ if (length & 1) length ++;
diff --git a/devel/cocktail/files/patch-reuse-c-StringMem.h b/devel/cocktail/files/patch-reuse-c-StringMem.h
new file mode 100644
index 000000000000..c91a4944c20f
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-StringMem.h
@@ -0,0 +1,29 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/StringMem.h Tue Feb 15 14:26:40 1994
++++ ./reuse/c/StringMem.h Fri Sep 10 13:35:03 2004
+@@ -32,12 +32,6 @@
+ # include <stdio.h>
+ # include "ratc.h"
+
+-# ifdef __STDC__
+-# define ARGS(parameters) parameters
+-# else
+-# define ARGS(parameters) ()
+-# endif
+-
+ typedef unsigned short * tStringRef;
+
+ extern tStringRef PutString ARGS((register char * s, register cardinal length));
+@@ -62,11 +56,11 @@
+ /* The string referenced by 'r' is printed on */
+ /* the file 'f'. */
+
+-extern void WriteStringMemory ();
++extern void WriteStringMemory (NOARGS);
+ /* The contents of the string memory is printed */
+ /* on standard output. */
+
+-extern void InitStringMemory ();
++extern void InitStringMemory (NOARGS);
+ /* The string memory is initialized. */
+
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-c-Time.c b/devel/cocktail/files/patch-reuse-c-Time.c
new file mode 100644
index 000000000000..eea02ff5bd94
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Time.c
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Time.c Tue Feb 15 14:26:41 1994
++++ ./reuse/c/Time.c Fri Sep 10 13:35:03 2004
+@@ -1,4 +1,5 @@
+-static char rcsid [] = "$Id: Time.c,v 1.6 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: Time.c,v 1.6 1993/08/18 15:01:05 grosch rel $");
+
+ # include "Time.h"
+ # include <stdio.h>
+@@ -8,7 +9,7 @@
+
+ long StepTime ()
+ {
+- long new = Time ();
++ long new = rTime ();
+ long result = new - old;
+ old = new;
+ return result;
diff --git a/devel/cocktail/files/patch-reuse-c-Time.h b/devel/cocktail/files/patch-reuse-c-Time.h
new file mode 100644
index 000000000000..728765fd1ee5
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-Time.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/Time.h Tue Feb 15 14:26:41 1994
++++ ./reuse/c/Time.h Fri Sep 10 13:35:03 2004
+@@ -1,13 +1,9 @@
+ # ifndef yyTime
+ # define yyTime
+
+-# ifdef __STDC__
+-# define ARGS(parameters) parameters
+-# else
+-# define ARGS(parameters) ()
+-# endif
++#include "ratc.h"
+
+-extern long StepTime ();
++extern long StepTime (NOARGS);
+ /* Returns the sum of user time and system time */
+ /* since the last call to 'StepTime' in milli- */
+ /* seconds. */
diff --git a/devel/cocktail/files/patch-reuse-c-rMemory.c b/devel/cocktail/files/patch-reuse-c-rMemory.c
new file mode 100644
index 000000000000..954559ee4af9
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-rMemory.c
@@ -0,0 +1,91 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/rMemory.c Tue Feb 15 14:26:42 1994
++++ ./reuse/c/rMemory.c Fri Sep 10 13:35:03 2004
+@@ -49,14 +49,16 @@
+ */
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+-
+-static char rcsid [] = "$Id: rMemory.c,v 1.14 1993/08/18 15:01:05 grosch rel $";
++# include <sys/cdefs.h>
++# include <sys/cdefs.h>
++__RCSID("$Id: rMemory.c,v 1.14 1993/08/18 15:01:05 grosch rel $");
+
+ # include "ratc.h"
+ # include "rMemory.h"
+ # include "rSystem.h"
+ # include "General.h"
+ # include <stdio.h>
++# include <stdlib.h>
+
+ # define MinSizeSmallBlock 4
+ # define MaxSizeSmallBlock 62 /* 64 - 2 */
+@@ -75,6 +77,7 @@
+ typedef cardinal tSmallBlockRange;
+ typedef cardinal tLargeBlockRange;
+
++#ifndef FREEBSD
+ static tBlockPtr SmallChain [MaxSizeSmallBlock + 1] = { 0,
+ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
+ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
+@@ -89,16 +92,21 @@
+ NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL,
+ NIL, NIL, NIL, NIL,
+ };
++#endif
+ static char * PoolFreePtr = 0;
+ static char * PoolEndPtr = 0;
+
+ char * Alloc (ByteCount)
+ register unsigned long ByteCount;
+-
+ /* Returns a pointer to dynamically allocated */
+ /* space of size 'ByteCount' bytes. */
+
+ {
++# ifdef FREEBSD
++ /* FreeBSD has an efficient memory allocator */
++ /* The cocktail code assumes that allocated space is zeroed */
++ return (char*) calloc(1UL,ByteCount);
++#else
+ ByteCount = (ByteCount + yyMaxAlign - 1) & yyAlignMasks [yyMaxAlign];
+
+ if (ByteCount <= MaxSizeSmallBlock) { /* handle small block */
+@@ -187,6 +195,7 @@
+ return (char *) CurrentBlock;
+ }
+ }
++#endif /*FREEBSD */
+ }
+
+ void Free (ByteCount, a)
+@@ -198,6 +207,9 @@
+ /* released. */
+
+ {
++#ifdef FREEBSD
++ free(a);
++#else
+ register tBlockPtr BlockPtr;
+ register tLargeBlockRange ChainNumber;
+
+@@ -214,10 +226,12 @@
+ BlockPtr->Size = ByteCount;
+ LargeChain [ChainNumber] = BlockPtr;
+ }
++#endif /*FREEBSD */
+ }
+
+ void InitrMemory ()
+ {
++#ifndef FREEBSD
+ register int i;
+
+ for (i = MinSizeSmallBlock; i <= MaxSizeSmallBlock; i += 2) {
+@@ -226,6 +240,7 @@
+ for (i = MinSizeLargeBlockLog; i <= MaxSizeLargeBlockLog; i ++) {
+ LargeChain [i] = NIL;
+ }
++#endif
+ MemoryUsed = 0;
+ PoolFreePtr = 0;
+ PoolEndPtr = 0;
diff --git a/devel/cocktail/files/patch-reuse-c-rMemory.h b/devel/cocktail/files/patch-reuse-c-rMemory.h
new file mode 100644
index 000000000000..6ebe7a15bb35
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-rMemory.h
@@ -0,0 +1,21 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/rMemory.h Tue Feb 15 14:26:42 1994
++++ ./reuse/c/rMemory.h Fri Sep 10 13:35:03 2004
+@@ -31,15 +31,17 @@
+
+ # ifdef __STDC__
+ # define ARGS(parameters) parameters
++# define NOARGS void
+ # else
+ # define ARGS(parameters) ()
++# define NOARGS
+ # endif
+
+ extern unsigned long MemoryUsed ;
+ /* Holds the total amount of memory managed by */
+ /* this module. */
+
+-extern void InitrMemory ();
++extern void InitrMemory (NOARGS);
+ /* The memory module is initialized. */
+
+ extern char * Alloc ARGS((register unsigned long ByteCount));
diff --git a/devel/cocktail/files/patch-reuse-c-rMemoryDrv.c b/devel/cocktail/files/patch-reuse-c-rMemoryDrv.c
new file mode 100644
index 000000000000..d9680adc56e1
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-rMemoryDrv.c
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/rMemoryDrv.c Tue Feb 15 14:26:42 1994
++++ ./reuse/c/rMemoryDrv.c Fri Sep 10 13:35:03 2004
+@@ -29,7 +29,8 @@
+
+ /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
+
+-static char rcsid [] = "$Id: rMemoryDrv.c,v 1.7 1993/08/20 08:13:11 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: rMemoryDrv.c,v 1.7 1993/08/20 08:13:11 grosch rel $");
+
+ # include "ratc.h"
+ # include "rMemory.h"
diff --git a/devel/cocktail/files/patch-reuse-c-rSystem.c b/devel/cocktail/files/patch-reuse-c-rSystem.c
index 7005c4b86afa..a92773e07b4c 100644
--- a/devel/cocktail/files/patch-reuse-c-rSystem.c
+++ b/devel/cocktail/files/patch-reuse-c-rSystem.c
@@ -1,6 +1,13 @@
---- ../../work/cocktail-9309//./reuse/c/rSystem.c Tue Feb 15 14:26:43 1994
-+++ ./reuse/c/rSystem.c Wed Mar 31 22:35:06 2004
-@@ -17,9 +17,9 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/rSystem.c Tue Feb 15 14:26:43 1994
++++ ./reuse/c/rSystem.c Fri Sep 10 13:35:03 2004
+@@ -12,14 +12,15 @@
+ /* compilation with the option -DUNIX uses UNIX system calls for IO (efficient),
+ otherwise the C library routines are used for IO (portable). */
+
+-static char rcsid [] = "$Id: rSystem.c,v 1.10 1993/08/19 09:53:41 grosch rel $";
++# include <sys/cdefs.h>
++__RCSID("$Id: rSystem.c,v 1.10 1993/08/19 09:53:41 grosch rel $");
+
# include "rSystem.h"
# ifdef m68000
@@ -12,7 +19,62 @@
# endif
# ifndef UNIX
-@@ -156,7 +156,7 @@
+@@ -57,6 +58,12 @@
+ # include <fcntl.h>
+ # include <sys/types.h>
+ # include <sys/stat.h>
++# include <stdlib.h>
++
++# ifdef UNIX
++# include <sys/uio.h>
++# include <unistd.h>
++# endif
+
+ bool IsCharacterSpecial (File) tFile File;
+ {
+@@ -98,7 +105,7 @@
+ # endif
+ return FilePtr == NULL ? -1 : FileToInt (FilePtr);
+ # else
+- return creat (FileName, 0666);
++ return creat (FileName, (mode_t)(0666));
+ # endif
+ }
+
+@@ -115,7 +122,7 @@
+ } else
+ return fread (Buffer, 1, Size, IntToFile (File));
+ # else
+- return read (File, Buffer, Size);
++ return read (File, (void*)Buffer, (size_t)Size);
+ # endif
+ }
+
+@@ -127,7 +134,7 @@
+ # ifndef UNIX
+ return fwrite (Buffer, 1, Size, IntToFile (File));
+ # else
+- return write (File, Buffer, Size);
++ return write (File, Buffer, (size_t)Size);
+ # endif
+ }
+
+@@ -143,9 +150,11 @@
+
+ /* calls other than IO */
+
+-/* # include <malloc.h> */
+-
+-char * rAlloc (ByteCount) long ByteCount; { return (char *) malloc ((unsigned) ByteCount); }
++char * rAlloc (ByteCount)
++ long ByteCount;
++{
++ return (char *) calloc (1UL, (size_t) ByteCount);
++}
+
+ # include <sys/times.h>
+
+@@ -156,7 +165,7 @@
# else
struct tms buffer;
(void) times (& buffer);
@@ -21,3 +83,18 @@
# endif
}
+@@ -187,12 +196,10 @@
+
+ # include <errno.h>
+
+-int rErrNo () { return errno; }
++int rErrNo (NOARGS) { return errno; }
+
+ int rSystem (String) char * String; { return system (String); }
+
+-extern void exit ();
+-
+ void rExit (Status) int Status; { exit (Status); }
+
+-void BEGIN_rSystem () {}
++void BEGIN_rSystem (NOARGS) {}
diff --git a/devel/cocktail/files/patch-reuse-c-rSystem.h b/devel/cocktail/files/patch-reuse-c-rSystem.h
new file mode 100644
index 000000000000..7887ac75ac1e
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-rSystem.h
@@ -0,0 +1,44 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/rSystem.h Tue Feb 15 14:26:43 1994
++++ ./reuse/c/rSystem.h Fri Sep 10 13:35:03 2004
+@@ -10,8 +10,10 @@
+
+ # ifdef __STDC__
+ # define ARGS(parameters) parameters
++# define NOARGS void
+ # else
+ # define ARGS(parameters) ()
++# define NOARGS
+ # endif
+
+ /* interface for machine dependencies */
+@@ -59,10 +61,10 @@
+ /* memory space of size 'ByteCount' bytes. */
+ /* Returns NIL if space is exhausted. */
+
+-extern long rTime ();
++extern long rTime (NOARGS);
+ /* Returns consumed cpu-time in milliseconds. */
+
+-extern int GetArgCount ();
++extern int GetArgCount (NOARGS);
+ /* Returns number of arguments. */
+
+ extern void GetArgument ARGS((int ArgNum, char * Argument));
+@@ -73,7 +75,7 @@
+ /* Dummy procedure that passes the values */
+ /* 'argc' and 'argv' from Modula-2 to C. */
+
+-extern int rErrNo ();
++extern int rErrNo (NOARGS);
+ /* Returns the current system error code. */
+
+ extern int rSystem ARGS((char * String));
+@@ -85,7 +87,7 @@
+ /* Terminates program execution and passes the */
+ /* value 'Status' to the operating system. */
+
+-extern void BEGIN_System ();
++extern void BEGIN_rSystem (NOARGS);
+ /* Dummy procedure with empty body. */
+
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-c-ratc.h b/devel/cocktail/files/patch-reuse-c-ratc.h
new file mode 100644
index 000000000000..0d0ffc4e3be0
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-c-ratc.h
@@ -0,0 +1,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/c/ratc.h Tue Feb 15 14:26:43 1994
++++ ./reuse/c/ratc.h Fri Sep 10 13:35:03 2004
+@@ -38,4 +38,12 @@
+
+ typedef char * tString;
+
++# ifdef __STDC__
++# define ARGS(parameters) parameters
++# define NOARGS void
++# else
++# define ARGS(parameters) ()
++# define NOARGS
++# endif
++
+ # endif
diff --git a/devel/cocktail/files/patch-reuse-m2c-Arguments.h b/devel/cocktail/files/patch-reuse-m2c-Arguments.h
new file mode 100644
index 000000000000..ab6897c43250
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Arguments.h
@@ -0,0 +1,19 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Arguments.h Tue Feb 15 14:26:45 1994
++++ ./reuse/m2c/Arguments.h Thu Aug 5 18:49:33 2004
+@@ -2,6 +2,10 @@
+
+ #define DEFINITION_Arguments
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ typedef struct Arguments_1 {
+ struct Arguments_2 {
+ CHAR A[999 + 1];
+@@ -10,4 +14,4 @@
+
+ extern void GetArgs ARGS((SHORTCARD *argc, Arguments_ArgTable *argv));
+ extern void GetEnv ARGS((Arguments_ArgTable *env));
+-extern void BEGIN_Arguments();
++extern void BEGIN_Arguments(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Checks.h b/devel/cocktail/files/patch-reuse-m2c-Checks.h
new file mode 100644
index 000000000000..a51b88910cf1
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Checks.h
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Checks.h Tue Feb 15 14:26:46 1994
++++ ./reuse/m2c/Checks.h Thu Aug 5 18:49:33 2004
+@@ -1,4 +1,8 @@
+ #define DEFINITION_Checks
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ extern void Checks_ErrorCheck ARGS((CHAR s[], LONGCARD , INTEGER n));
+-extern void BEGIN_Checks();
++extern void BEGIN_Checks(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-DynArray.h b/devel/cocktail/files/patch-reuse-m2c-DynArray.h
new file mode 100644
index 000000000000..219d6fb0fd90
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-DynArray.h
@@ -0,0 +1,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/DynArray.h Tue Feb 15 14:26:47 1994
++++ ./reuse/m2c/DynArray.h Thu Aug 5 18:49:33 2004
+@@ -1,7 +1,11 @@
+ #define DEFINITION_DynArray
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ extern void DynArray_MakeArray ARGS((ADDRESS *ArrayPtr, LONGINT *ElmtCount, LONGINT ElmtSize));
+ extern void DynArray_ResizeArray ARGS((ADDRESS *ArrayPtr, LONGINT *OldElmtCount, LONGINT NewElmtCount, LONGINT ElmtSize));
+ extern void DynArray_ExtendArray ARGS((ADDRESS *ArrayPtr, LONGINT *ElmtCount, LONGINT ElmtSize));
+ extern void DynArray_ReleaseArray ARGS((ADDRESS *ArrayPtr, LONGINT *ElmtCount, LONGINT ElmtSize));
+-extern void BEGIN_DynArray();
++extern void BEGIN_DynArray(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Errors.c b/devel/cocktail/files/patch-reuse-m2c-Errors.c
new file mode 100644
index 000000000000..435a58347954
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Errors.c
@@ -0,0 +1,20 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Errors.c Tue Feb 15 14:26:50 1994
++++ ./reuse/m2c/Errors.c Thu Aug 5 18:49:33 2004
+@@ -107,7 +107,7 @@
+ static void StoreMessage ARGS((BOOLEAN pIsErrorCode, CARDINAL pErrorCode, CARDINAL pErrorClass, Positions_tPosition pPosition, CARDINAL pInfoClass, ADDRESS pInfo));
+ static BOOLEAN IsLess ARGS((INTEGER i, INTEGER j));
+ static void Swap ARGS((INTEGER i, INTEGER j));
+-static void yyExit ARGS(());
++static void yyExit ARGS((NOARGS));
+
+ void Errors_ErrorMessage
+ # ifdef __STDC__
+@@ -365,7 +365,7 @@
+ # endif
+ {
+ INTEGER i;
+- ADDRESS Info;
++ ADDRESS Info = 0;
+ Strings_tString s;
+
+ Sort_Sort(1L, MessageCount, (Sort_tProcIntIntBool)IsLess, (Sort_tProcIntInt)Swap);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Errors.h b/devel/cocktail/files/patch-reuse-m2c-Errors.h
new file mode 100644
index 000000000000..0049a6480e26
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Errors.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Errors.h Tue Feb 15 14:26:49 1994
++++ ./reuse/m2c/Errors.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Errors
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_Positions
+ #include "Positions.h"
+ #endif
+@@ -42,4 +46,4 @@
+ extern void Errors_Message ARGS((CHAR ErrorText[], LONGCARD , CARDINAL ErrorClass, Positions_tPosition Position));
+ extern void Errors_MessageI ARGS((CHAR ErrorText[], LONGCARD , CARDINAL ErrorClass, Positions_tPosition Position, CARDINAL InfoClass, ADDRESS Info));
+ extern void Errors_WriteMessages ARGS((IO_tFile File));
+-extern void BEGIN_Errors();
++extern void BEGIN_Errors(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-ErrorsDrv.c b/devel/cocktail/files/patch-reuse-m2c-ErrorsDrv.c
new file mode 100644
index 000000000000..222ce12427e1
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-ErrorsDrv.c
@@ -0,0 +1,11 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/ErrorsDrv.c Tue Feb 15 14:26:50 1994
++++ ./reuse/m2c/ErrorsDrv.c Thu Aug 5 18:49:33 2004
+@@ -40,7 +40,7 @@
+ static Sets_tSet Set;
+ static Idents_tIdent Ident;
+ static Strings_tString String;
+-static void errors ARGS(());
++static void errors ARGS((NOARGS));
+
+
+ static void errors
diff --git a/devel/cocktail/files/patch-reuse-m2c-General.h b/devel/cocktail/files/patch-reuse-m2c-General.h
new file mode 100644
index 000000000000..e648620589eb
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-General.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/General.h Tue Feb 15 14:26:50 1994
++++ ./reuse/m2c/General.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_General
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ extern INTEGER General_MaxAlign;
+ extern struct General_1 {
+ BITSET A[16 + 1];
+@@ -10,4 +14,4 @@
+ extern LONGINT General_Exp2 ARGS((CARDINAL x));
+ extern CARDINAL General_AntiLog ARGS((LONGINT x));
+ extern REAL General_Exp10 ARGS((INTEGER x));
+-extern void BEGIN_General();
++extern void BEGIN_General(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Heap.h b/devel/cocktail/files/patch-reuse-m2c-Heap.h
new file mode 100644
index 000000000000..055dc4818e0f
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Heap.h
@@ -0,0 +1,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Heap.h Tue Feb 15 14:26:51 1994
++++ ./reuse/m2c/Heap.h Thu Aug 5 18:49:33 2004
+@@ -1,6 +1,10 @@
+ #define DEFINITION_Heap
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ extern LONGCARD Heap_HeapUsed;
+ extern ADDRESS Heap_Alloc ARGS((LONGINT ByteCount));
+-extern void Heap_Free ARGS(());
+-extern void BEGIN_Heap();
++extern void Heap_Free ARGS((NOARGS));
++extern void BEGIN_Heap(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-IO.c b/devel/cocktail/files/patch-reuse-m2c-IO.c
new file mode 100644
index 000000000000..1369a7122c0b
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-IO.c
@@ -0,0 +1,59 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/IO.c Tue Feb 15 14:26:52 1994
++++ ./reuse/m2c/IO.c Thu Aug 5 18:49:33 2004
+@@ -36,7 +36,7 @@
+ static struct S_2 {
+ BufferDescriptor A[rSystem_cMaxFile - -1 + 1];
+ } BufferPool;
+-static IO_tFile i;
++static IO_tFile iof;
+ static struct S_3 {
+ CHAR A[15 + 1];
+ } MyCHR;
+@@ -162,7 +162,7 @@
+ return i;
+ }
+ INC(i);
+- } EXIT_1:;
++ };
+ }
+ }
+
+@@ -475,8 +475,6 @@
+ IO_tFile f;
+ # endif
+ {
+- CHAR ch;
+-
+ {
+ register BufferDescriptor *W_7 = &BufferPool.A[f - -1];
+
+@@ -621,7 +619,7 @@
+
+ INC(W_12->BufferIndex);
+ W_12->Buffer->A[W_12->BufferIndex] = c;
+- if (W_12->BufferIndex == BufferSize || W_12->FlushLine && c == EolCh) {
++ if ((W_12->BufferIndex == BufferSize) || (W_12->FlushLine && c == EolCh)) {
+ IO_WriteFlush(f);
+ }
+ }
+@@ -895,7 +893,7 @@
+ }
+ INC(W_13->BufferIndex);
+ W_13->Buffer->A[W_13->BufferIndex] = c;
+- if (W_13->BufferIndex == BufferSize || W_13->FlushLine && c == EolCh) {
++ if ((W_13->BufferIndex == BufferSize) || (W_13->FlushLine && c == EolCh)) {
+ IO_WriteFlush(f);
+ }
+ if (i >= B_20) break;
+@@ -1025,9 +1023,9 @@
+ MyCHR.A[13] = 'D';
+ MyCHR.A[14] = 'E';
+ MyCHR.A[15] = 'F';
+- for (i = 0; i <= rSystem_cMaxFile; i += 1) {
++ for (iof = 0; iof <= rSystem_cMaxFile; iof += 1) {
+ {
+- register BufferDescriptor *W_15 = &BufferPool.A[i - -1];
++ register BufferDescriptor *W_15 = &BufferPool.A[iof - -1];
+
+ W_15->Buffer = NIL;
+ W_15->BufferIndex = 0;
diff --git a/devel/cocktail/files/patch-reuse-m2c-IO.h b/devel/cocktail/files/patch-reuse-m2c-IO.h
new file mode 100644
index 000000000000..c5cd8642615b
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-IO.h
@@ -0,0 +1,20 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/IO.h Tue Feb 15 14:26:49 1994
++++ ./reuse/m2c/IO.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_IO
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_rSystem
+ #include "rSystem.h"
+ #endif
+@@ -38,5 +42,5 @@
+ extern void IO_WriteLong ARGS((IO_tFile f, LONGINT n, CARDINAL FieldWidth));
+ extern void IO_WriteCard ARGS((IO_tFile f, CARDINAL n, CARDINAL FieldWidth));
+ extern void IO_WriteNl ARGS((IO_tFile f));
+-extern void IO_CloseIO ARGS(());
+-extern void BEGIN_IO();
++extern void IO_CloseIO ARGS((NOARGS));
++extern void BEGIN_IO(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Idents.c b/devel/cocktail/files/patch-reuse-m2c-Idents.c
new file mode 100644
index 000000000000..e4645b6ea260
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Idents.c
@@ -0,0 +1,22 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Idents.c Tue Feb 15 14:26:53 1994
++++ ./reuse/m2c/Idents.c Thu Aug 5 18:49:33 2004
+@@ -47,7 +47,7 @@
+ static struct S_3 {
+ Idents_tIdent A[HashTableSize + 1];
+ } HashTable;
+-static HashIndex i;
++static HashIndex hi;
+
+ Idents_tIdent Idents_MakeIdent
+ # ifdef __STDC__
+@@ -218,8 +218,8 @@
+ {
+ Strings_tString String;
+
+- for (i = 0; i <= HashTableSize; i += 1) {
+- HashTable.A[i] = cNoIdent;
++ for (hi = 0; hi <= HashTableSize; hi += 1) {
++ HashTable.A[hi] = cNoIdent;
+ }
+ IdentCount = 0;
+ Strings_AssignEmpty(&String);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Idents.h b/devel/cocktail/files/patch-reuse-m2c-Idents.h
new file mode 100644
index 000000000000..fd802711e9ae
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Idents.h
@@ -0,0 +1,27 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Idents.h Tue Feb 15 14:26:53 1994
++++ ./reuse/m2c/Idents.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Idents
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -17,9 +21,9 @@
+ extern Idents_tIdent Idents_MakeIdent ARGS((Strings_tString *s));
+ extern void Idents_GetString ARGS((Idents_tIdent i, Strings_tString *s));
+ extern StringMem_tStringRef Idents_GetStringRef ARGS((Idents_tIdent i));
+-extern Idents_tIdent Idents_MaxIdent ARGS(());
++extern Idents_tIdent Idents_MaxIdent ARGS((NOARGS));
+ extern void Idents_WriteIdent ARGS((IO_tFile f, Idents_tIdent i));
+-extern void Idents_WriteIdents ARGS(());
+-extern void Idents_InitIdents ARGS(());
+-extern void Idents_WriteHashTable ARGS(());
+-extern void BEGIN_Idents();
++extern void Idents_WriteIdents ARGS((NOARGS));
++extern void Idents_InitIdents ARGS((NOARGS));
++extern void Idents_WriteHashTable ARGS((NOARGS));
++extern void BEGIN_Idents(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Layout.h b/devel/cocktail/files/patch-reuse-m2c-Layout.h
new file mode 100644
index 000000000000..d592861b82e8
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Layout.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Layout.h Tue Feb 15 14:26:53 1994
++++ ./reuse/m2c/Layout.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Layout
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -10,4 +14,4 @@
+ extern void Layout_ReadSpace ARGS((IO_tFile f));
+ extern void Layout_ReadSpaces ARGS((IO_tFile f, INTEGER Count));
+ extern void Layout_SkipSpaces ARGS((IO_tFile f));
+-extern void BEGIN_Layout();
++extern void BEGIN_Layout(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Lists.h b/devel/cocktail/files/patch-reuse-m2c-Lists.h
new file mode 100644
index 000000000000..fbef163345aa
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Lists.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Lists.h Tue Feb 15 14:26:54 1994
++++ ./reuse/m2c/Lists.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Lists
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -24,4 +28,4 @@
+ extern BOOLEAN Lists_IsEmpty ARGS((Lists_tList List));
+ extern CARDINAL Lists_Length ARGS((Lists_tList List));
+ extern void Lists_WriteList ARGS((IO_tFile f, Lists_tList List, Lists_tProcOfFileAddress Proc));
+-extern void BEGIN_Lists();
++extern void BEGIN_Lists(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Makefile b/devel/cocktail/files/patch-reuse-m2c-Makefile
index d38bf41c9085..5759aa4e8292 100644
--- a/devel/cocktail/files/patch-reuse-m2c-Makefile
+++ b/devel/cocktail/files/patch-reuse-m2c-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./reuse/m2c/Makefile Tue Feb 15 14:26:46 1994
-+++ ./reuse/m2c/Makefile Wed Mar 31 22:35:06 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Makefile Tue Feb 15 14:26:46 1994
++++ ./reuse/m2c/Makefile Fri Sep 10 13:36:04 2004
@@ -1,9 +1,6 @@
-OPT = -O
-UNIX = UNIX
@@ -13,7 +13,7 @@
SYSTEM = rSystem.o
OBJS = Checks.o DynArray.o General.o Heap.o IO.o Idents.o Layout.o \
-@@ -13,12 +10,21 @@
+@@ -13,12 +10,22 @@
CLIBS = Arguments.o SYSTEM_.o
@@ -28,18 +28,41 @@
+all : $(REUSE)
-all : $(CLIBS)
-+test: DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
++test: DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SetsDrv2 SysIODrv ErrorsDrv
+
+clean : cleantest
-+ rm -f core *.o
-+ rm -f $(REUSE)
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f $(REUSE)
+
+cleantest:
-+ rm -f Main.o DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
++ -rm -f Main.o DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SetsDrv2 SysIODrv ErrorsDrv t
# HEAD
-@@ -308,190 +314,27 @@
+@@ -221,7 +228,7 @@
+
+ sources : Sets.c
+ Sets.o : Sets.c Sets.h
+-Sets.o : General.h
++Sets.o : SYSTEM_.h General.h
+ Sets.o : DynArray.h
+ Sets.o : IO.h
+
+@@ -240,6 +247,12 @@
+ SetsDrv.o : Sets.h
+ SetsDrv.o : IO.h
+
++sources : SetsDrv2.c
++all : SetsDrv2
++SetsDrv2.o : SetsDrv2.c
++SetsDrv2.o : Sets.h
++SetsDrv2.o : IO.h
++
+ sources : Sort.h
+
+ sources : Sort.c
+@@ -308,190 +321,30 @@
SYSTEM_.o : SYSTEM_.c SYSTEM_.h
@@ -208,36 +231,44 @@
- rMemory.o \
- General.o \
- $(CLIBS)
+-
+-# TAIL
+-
+-clean :
+- rm -f core *.o
+-
+-CLEAN : clean
+- rm -f libreuse.a
+-
+-cleanc :
+- rm -f Main.o DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
+-
+-.SUFFIXES: .md .mi .h .c .o
+DynArrDrv: $(SYSTEM) $(REUSE) DynArrDrv.o
+ $(CC) $(CFLAGS) -o DynArrDrv DynArrDrv.o $(REUSE)
-
--# TAIL
++
+ErrorsDrv: $(SYSTEM) $(REUSE) ErrorsDrv.o
+ $(CC) $(CFLAGS) -o ErrorsDrv ErrorsDrv.o $(REUSE)
-
--clean :
-- rm -f core *.o
++
+IODrv: $(SYSTEM) $(REUSE) IODrv.o
+ $(CC) $(CFLAGS) -o IODrv IODrv.o $(REUSE)
-
--CLEAN : clean
-- rm -f libreuse.a
++
+Main: $(SYSTEM) $(REUSE) Main.o
+ $(CC) $(CFLAGS) -o Main Main.o $(REUSE)
-
--cleanc :
-- rm -f Main.o DynArrDrv IODrv Main rMemoryDrv RelDrv SetsDrv SysIODrv ErrorsDrv
++
+rMemoryDrv: $(SYSTEM) $(REUSE) rMemoryDrv.o
+ $(CC) $(CFLAGS) -o rMemoryDrv rMemoryDrv.o $(REUSE)
-
--.SUFFIXES: .md .mi .h .c .o
++
+RelDrv: $(SYSTEM) $(REUSE) RelDrv.o
+ $(CC) $(CFLAGS) -o RelDrv RelDrv.o $(REUSE)
++
++SetsDrv: $(SYSTEM) SetsDrv.o $(REUSE)
++ $(CC) $(CFLAGS) -o SetsDrv SetsDrv.o $(REUSE)
-.mi.c:
- mtc2 $(M2FLAGS) $*.mi;
-+SetsDrv: $(SYSTEM) SetsDrv.o $(REUSE)
-+ $(CC) $(CFLAGS) -o SetsDrv SetsDrv.o $(REUSE)
++SetsDrv2: $(SYSTEM) SetsDrv2.o $(REUSE)
++ $(CC) $(CFLAGS) -o SetsDrv2 SetsDrv2.o $(REUSE)
-.md.h:
- mtc2 $(M2FLAGS) $*.md;
diff --git a/devel/cocktail/files/patch-reuse-m2c-Pack.h b/devel/cocktail/files/patch-reuse-m2c-Pack.h
new file mode 100644
index 000000000000..e9cf56ed93c5
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Pack.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Pack.h Tue Feb 15 14:26:56 1994
++++ ./reuse/m2c/Pack.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Pack
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -16,4 +20,4 @@
+ extern void Pack_UnpackCard ARGS((Pack_UnpackCardHandler handler, CHAR string[], LONGCARD , CARDINAL count));
+ extern void Pack_Unpack ARGS((Pack_UnpackCardHandler handler, CHAR string[], LONGCARD , CARDINAL count));
+ extern void Pack_UnpackInt ARGS((Pack_UnpackIntHandler handler, CHAR string[], LONGCARD , CARDINAL count));
+-extern void BEGIN_Pack();
++extern void BEGIN_Pack(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Positions.h b/devel/cocktail/files/patch-reuse-m2c-Positions.h
new file mode 100644
index 000000000000..21dcbd649a21
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Positions.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Positions.h Tue Feb 15 14:26:49 1994
++++ ./reuse/m2c/Positions.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Positions
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -11,4 +15,4 @@
+ extern INTEGER Positions_Compare ARGS((Positions_tPosition Position1, Positions_tPosition Position2));
+ extern void Positions_WritePosition ARGS((IO_tFile File, Positions_tPosition Position));
+ extern void Positions_ReadPosition ARGS((IO_tFile File, Positions_tPosition *Position));
+-extern void BEGIN_Positions();
++extern void BEGIN_Positions(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Relations.h b/devel/cocktail/files/patch-reuse-m2c-Relations.h
new file mode 100644
index 000000000000..941070c1a2ff
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Relations.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Relations.h Tue Feb 15 14:26:58 1994
++++ ./reuse/m2c/Relations.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Relations
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -58,4 +62,4 @@
+ extern void Relations_WriteRelation ARGS((IO_tFile f, Relations_tRelation Rel));
+ extern void Relations_Project1 ARGS((Relations_tRelation Rel, INTEGER e1, Sets_tSet *Set));
+ extern void Relations_Project2 ARGS((Relations_tRelation Rel, INTEGER e1, Sets_tSet *Set));
+-extern void BEGIN_Relations();
++extern void BEGIN_Relations(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-RelatsC.h b/devel/cocktail/files/patch-reuse-m2c-RelatsC.h
new file mode 100644
index 000000000000..0528ac870fff
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-RelatsC.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/RelatsC.h Tue Feb 15 14:26:48 1994
++++ ./reuse/m2c/RelatsC.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_RelatsC
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -57,4 +61,4 @@
+ extern void RelatsC_WriteRelation ARGS((IO_tFile f, RelatsC_tRelation Rel));
+ extern void RelatsC_Project1 ARGS((RelatsC_tRelation Rel, INTEGER e1, SetsC_tSet *Set));
+ extern void RelatsC_Project2 ARGS((RelatsC_tRelation Rel, INTEGER e1, SetsC_tSet *Set));
+-extern void BEGIN_RelatsC();
++extern void BEGIN_RelatsC(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-SYSTEM_.c b/devel/cocktail/files/patch-reuse-m2c-SYSTEM_.c
new file mode 100644
index 000000000000..5a53c0cc81d8
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-SYSTEM_.c
@@ -0,0 +1,38 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/SYSTEM_.c Tue Feb 15 14:26:45 1994
++++ ./reuse/m2c/SYSTEM_.c Thu Aug 5 18:49:33 2004
+@@ -1,6 +1,7 @@
+ /* $Id: SYSTEM_.c,v 1.4 1991/11/21 16:57:59 grosch rel grosch $ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #include "SYSTEM_.h"
+
+@@ -49,7 +50,9 @@
+ (lo, hi) register CARDINAL lo, hi;
+ # endif
+ {
+- return (lo <= hi ? ~0X0L >> lo << lo + SYSTEM_MaxSet - hi >> SYSTEM_MaxSet - hi : 0X0L);
++ return ((lo <= hi)
++ ? (~0X0L) >> lo << (lo + SYSTEM_MaxSet - hi) >> (SYSTEM_MaxSet - hi)
++ : 0X0L);
+ }
+
+ /*
+@@ -82,15 +85,12 @@
+ * Main program
+ */
+
+-extern void BEGIN_MODULE();
+
+ int SYSTEM_argc;
+ char **SYSTEM_argv;
+ char **SYSTEM_envp;
+
+-main(argc, argv, envp)
+-int argc;
+-char *argv[], *envp[];
++int main( int argc, char *argv[], char *envp[])
+ {
+ SYSTEM_argc = argc;
+ SYSTEM_argv = argv;
diff --git a/devel/cocktail/files/patch-reuse-m2c-SYSTEM_.h b/devel/cocktail/files/patch-reuse-m2c-SYSTEM_.h
new file mode 100644
index 000000000000..4c4556569c29
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-SYSTEM_.h
@@ -0,0 +1,104 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/SYSTEM_.h Tue Feb 15 14:26:45 1994
++++ ./reuse/m2c/SYSTEM_.h Thu Aug 5 18:49:33 2004
+@@ -16,10 +16,18 @@
+ /* */
+ /************************************************************************/
+
++#define DEFINITION_SYSTEM_
++
++# include <stdlib.h>
++# include <string.h>
++# include <sys/limits.h>
++
+ # ifdef __STDC__
+ # define ARGS(parameters) parameters
++# define NOARGS void
+ # else
+ # define ARGS(parameters) ()
++# define NOARGS
+ # endif
+
+ /*
+@@ -30,6 +38,7 @@
+ #define TRUE ((BOOLEAN)1)
+
+ #define NIL 0L
++#define DEAD_ALLOCATE 0xd0d0d0d0d0d0d0d0L
+
+ /*
+ * Definition of basic types
+@@ -55,7 +64,7 @@
+
+ typedef unsigned long BITSET;
+
+-typedef void (*PROC)();
++typedef void (*PROC)(NOARGS);
+
+ typedef unsigned char WORD;
+ typedef WORD BYTE;
+@@ -85,14 +94,14 @@
+ #define TRUNC(x) ((CARDINAL) (x))
+ #define VAL(T,x) ((T) (x))
+
+-#define MIN_SHORTINT (-32768)
+-#define MAX_SHORTINT 32767
+-#define MIN_LONGINT (-2147483648L)
+-#define MAX_LONGINT 2147483647L
++#define MIN_SHORTINT __SHRT_MIN
++#define MAX_SHORTINT __SHRT_MAX
++#define MIN_LONGINT __INT_MIN
++#define MAX_LONGINT __INT_MAX
+ #define MIN_SHORTCARD 0
+ #define MAX_SHORTCARD 65535
+ #define MIN_LONGCARD ((LONGCARD)0L)
+-#define MAX_LONGCARD ((LONGCARD)4294967295L)
++#define MAX_LONGCARD ((LONGCARD)__ULONG_MAX)
+
+ #define MIN_BOOLEAN FALSE
+ #define MAX_BOOLEAN TRUE
+@@ -129,7 +138,12 @@
+ #define SYSTEM_MaxSet (sizeof (unsigned long) * 8 - 1)
+
+ #define SET_ELEM(el) (0X1L << (el))
+-#define SET_cRNG(lo,hi) ((lo) <= (hi) ? ((unsigned) (((unsigned) ~0X0L) >> (lo) << (lo) + SYSTEM_MaxSet - (hi))) >> SYSTEM_MaxSet - (hi) : 0X0L)
++#define SET_cRNG(lo,hi) \
++ ((lo) <= (hi) \
++ ? (( (~(0X0UL)) >> (lo) ) \
++ << (lo + SYSTEM_MaxSet - hi) ) \
++ >> (SYSTEM_MaxSet - hi) \
++ : 0X0L)
+ #define SET_RANGE(lo,hi) SET_RANGE1((CARDINAL)(lo), (CARDINAL)(hi))
+
+ extern unsigned long SET_RANGE1 ARGS((CARDINAL lo, CARDINAL hi));
+@@ -177,7 +191,7 @@
+ #define OPEN_ARRAY_LOCALS char *BLOCK_POINTER, *FREE_POINTER;
+ #define ALLOC_OPEN_ARRAYS(size, arrays) \
+ BLOCK_POINTER = FREE_POINTER = \
+- malloc((unsigned)((size) + (arrays) * (SYSTEM_ALIGN - 1)));
++ calloc(1, (unsigned)((size) + (arrays) * (SYSTEM_ALIGN - 1)));
+ #define FREE_OPEN_ARRAYS free(BLOCK_POINTER);
+
+ #endif
+@@ -205,21 +219,4 @@
+
+ extern void CaseError ARGS((char file[], int line));
+ extern void ReturnError ARGS((char file[], int line));
+-
+-/*
+- * Definition of library functions
+- */
+-
+-#ifdef StackAlloc
+-extern char *alloca();
+-#else
+-/* #include "malloc.h" */
+-extern char *malloc();
+-extern void free();
+-#endif
+-
+-# ifndef BCOPY
+-/* extern char *memcpy(); */
+-# endif
+-extern char *strncpy();
+-extern void exit();
++extern void BEGIN_MODULE ARGS((NOARGS));
diff --git a/devel/cocktail/files/patch-reuse-m2c-Sets.c b/devel/cocktail/files/patch-reuse-m2c-Sets.c
new file mode 100644
index 000000000000..61c4a8135c89
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Sets.c
@@ -0,0 +1,75 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Sets.c Tue Feb 15 14:26:59 1994
++++ ./reuse/m2c/Sets.c Thu Aug 5 18:49:34 2004
+@@ -16,10 +16,10 @@
+ #include "Sets.h"
+ #endif
+
++static int BitsPerBitset;
++static int BitsPerByte;
++static int BytesPerBitset;
+
+-#define BitsPerBitset 32
+-#define BitsPerByte 8
+-#define BytesPerBitset (BitsPerBitset / BitsPerByte)
+ #define NoCard -1
+ static BITSET AllBits;
+ static IO_tFile g;
+@@ -713,8 +713,8 @@
+ }
+ Sets_Include(Set, (LONGCARD)IO_ReadI(f));
+ INC(card);
+- } EXIT_1:;
+ Set->Card = card;
++ } EXIT_1:;
+ }
+
+ void Sets_WriteSet
+@@ -726,14 +726,10 @@
+ Sets_tSet Set;
+ # endif
+ {
+- {
+- register Sets_tSet *W_23 = &Set;
+-
+ g = f;
+ IO_WriteC(f, '{');
+ Sets_ForallDo(Set, (Sets_ProcOfCard)WriteElmt);
+ IO_WriteC(f, '}');
+- }
+ }
+
+ static void WriteElmt
+@@ -750,18 +746,30 @@
+
+ void BEGIN_Sets()
+ {
++ int t = SYSTEM_MaxSet;
++
+ static BOOLEAN has_been_called = FALSE;
+ if (has_been_called) return;
+ has_been_called = TRUE;
++
++ AllBits = ~(0x0UL);
++ BitsPerByte = 8;
++ BytesPerBitset = sizeof(BITSET);
++ BitsPerBitset = BytesPerBitset*BitsPerByte;
++
+ BEGIN_IO();
+ BEGIN_General();
+ BEGIN_DynArray();
+ BEGIN_IO();
+
+- AllBits = SET_cRNG(0, BitsPerBitset - 1);
+- if (sizeof(BITSET) < BytesPerBitset) {
+- IO_WriteS((rSystem_tFile)IO_StdError, (STRING)"Sets: TSIZE (BITSET) = ", 23L);
++
++ if ((int)sizeof(BITSET) < BytesPerBitset) {
++ IO_WriteS((rSystem_tFile)IO_StdError, (STRING)"Sets: SIZE (BITSET) = ", 23L);
+ IO_WriteI((rSystem_tFile)IO_StdError, (LONGINT)sizeof(BITSET), 0L);
+ IO_WriteNl((rSystem_tFile)IO_StdError);
++ IO_WriteS((rSystem_tFile)IO_StdError, (STRING)"Sets: SYSTEM_MaxSet = ", 23L);
++ IO_WriteI((rSystem_tFile)IO_StdError, t, 0L);
++ IO_WriteNl((rSystem_tFile)IO_StdError);
+ }
+ }
++
diff --git a/devel/cocktail/files/patch-reuse-m2c-Sets.h b/devel/cocktail/files/patch-reuse-m2c-Sets.h
new file mode 100644
index 000000000000..2654b6293aa6
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Sets.h
@@ -0,0 +1,26 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Sets.h Tue Feb 15 14:26:57 1994
++++ ./reuse/m2c/Sets.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Sets
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -7,6 +11,7 @@
+ typedef struct Sets_1 {
+ BITSET A[1000000 + 1];
+ } Sets_ArrayOfBitset;
++
+ typedef void (*Sets_ProcOfCard) ARGS((CARDINAL));
+ typedef BOOLEAN (*Sets_ProcOfCardToBool) ARGS((CARDINAL));
+ typedef Sets_ArrayOfBitset *Sets_PointerToArray;
+@@ -47,4 +52,4 @@
+ extern void Sets_ForallDo ARGS((Sets_tSet Set, Sets_ProcOfCard Proc));
+ extern void Sets_ReadSet ARGS((IO_tFile f, Sets_tSet *Set));
+ extern void Sets_WriteSet ARGS((IO_tFile f, Sets_tSet Set));
+-extern void BEGIN_Sets();
++extern void BEGIN_Sets(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-SetsC.h b/devel/cocktail/files/patch-reuse-m2c-SetsC.h
new file mode 100644
index 000000000000..1ff5884d75f6
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-SetsC.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/SetsC.h Tue Feb 15 14:26:58 1994
++++ ./reuse/m2c/SetsC.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_SetsC
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -42,4 +46,4 @@
+ extern void SetsC_ForallDo ARGS((SetsC_tSet Set, SetsC_ProcOfCard Proc));
+ extern void SetsC_ReadSet ARGS((IO_tFile f, SetsC_tSet *Set));
+ extern void SetsC_WriteSet ARGS((IO_tFile f, SetsC_tSet Set));
+-extern void BEGIN_SetsC();
++extern void BEGIN_SetsC(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-SetsDrv.c b/devel/cocktail/files/patch-reuse-m2c-SetsDrv.c
new file mode 100644
index 000000000000..f37667487bc9
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-SetsDrv.c
@@ -0,0 +1,139 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/SetsDrv.c Tue Feb 15 14:27:00 1994
++++ ./reuse/m2c/SetsDrv.c Thu Aug 5 18:49:34 2004
+@@ -25,39 +25,116 @@
+ for (i = 2; i <= max; i += 1) {
+ Sets_Include(&t, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, t);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&t), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ Sets_AssignEmpty(&s);
+ Sets_AssignElmt(&s, 1L);
+ Sets_Assign(&u, t);
+ Sets_Union(&s, t);
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, t);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&t), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ Sets_AssignEmpty(&t);
+ for (i = 0; i <= max; i += 2) {
+ Sets_Include(&t, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, t);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&t), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&t), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ Sets_Difference(&s, t);
+ for (i = 0; i <= max; i += 3) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 5) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 7) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 11) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 13) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 17) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 19) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 23) {
+ Sets_Exclude(&s, i);
+ }
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Size(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Minimum(&s), 5L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Maximum(&s), 5L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ for (i = 0; i <= max; i += 29) {
+ Sets_Exclude(&s, i);
+ }
+@@ -101,7 +178,7 @@
+ Sets_Include(&s, 3L);
+ Sets_Include(&s, 7L);
+ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+- IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)"enter Size and Set like below! (Size=0 terminates)", 50L);
++ IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)"enter MaxSet and Set like below! (Size=0 terminates)", 52L);
+ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)"10 ", 3L);
+ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
+@@ -115,6 +192,10 @@
+ goto EXIT_1;
+ }
+ Sets_MakeSet(&s, i);
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)" Card = ", 8L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 0L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
+ Sets_ReadSet((rSystem_tFile)IO_StdInput, &s);
+ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
+ IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)" Card = ", 8L);
diff --git a/devel/cocktail/files/patch-reuse-m2c-SetsDrv2.c b/devel/cocktail/files/patch-reuse-m2c-SetsDrv2.c
new file mode 100644
index 000000000000..06538a4261cb
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-SetsDrv2.c
@@ -0,0 +1,163 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/SetsDrv2.c Sat Sep 11 00:58:46 2004
++++ ./reuse/m2c/SetsDrv2.c Thu Aug 5 18:49:36 2004
+@@ -0,0 +1,160 @@
++#include "SYSTEM_.h"
++
++#ifndef DEFINITION_Sets
++#include "Sets.h"
++#endif
++
++#ifndef DEFINITION_IO
++#include "IO.h"
++#endif
++
++#include <stdio.h>
++#include <assert.h>
++
++int sizes[] = { 1, 2, 3, 4, 5,
++ 7, 8, 9,
++ 15, 16, 17,
++ 31, 32, 33,
++ 63, 64, 65,
++ 127, 128, 129,
++ 254, 255, 256,
++ 511, 512, 513,
++ 1023, 1024, 1025,
++ 0 };
++
++#define MAXSET 1026
++int myset[MAXSET];
++
++static Sets_tSet s, t, u, v;
++static IO_tFile f;
++
++static void SetInfo( Sets_tSet s )
++{
++ Sets_WriteSet((rSystem_tFile)IO_StdOutput, s);
++ IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)" Card = ", 8L);
++ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 0L);
++ IO_WriteNl((rSystem_tFile)IO_StdOutput);
++}
++
++static BOOLEAN TestOdd(int i)
++{
++ return (i%2) == 1;
++}
++
++static BOOLEAN TestEven(int i)
++{
++ return (i%2) == 0;
++}
++
++static void CleanMyset(void)
++{
++ int i;
++ for (i=0; i++; i<MAXSET) {
++ myset[i] = 0;
++ }
++}
++
++static void SetMyset(int i)
++{
++ myset[i] = 1;
++}
++
++void BEGIN_MODULE()
++{
++ int i, j, size, sizeindex = 0;
++
++ BEGIN_Sets();
++ BEGIN_IO();
++
++ while (sizes[sizeindex] != 0 ) {
++ size = sizes[sizeindex]-1;
++ printf("Upperbound: %d\n", size);
++
++ Sets_MakeSet(&s, (LONGCARD)size);
++ for (i = 0; i <= size; i += 1) {
++ Sets_Include(&s,i);
++ }
++ for (i = 0; i <= size; i += 1) {
++ assert(Sets_IsElement(i, &s)); /* a full filed set */
++ }
++
++ Sets_MakeSet(&t, (LONGCARD)size);
++ for (i = 0; i <= size; i += 2) {
++ Sets_Include(&t,i); /* all even elements */
++ }
++ Sets_Difference(&s,t); /* s = all odd elements */
++ for (i = 1; i <= size; i += 2) {
++ assert(Sets_IsElement(i, &s));
++ }
++/* SetInfo(s);
++/* SetInfo(t);
++ */
++
++ Sets_Intersection(&t,s);
++ assert(Sets_IsEmpty(t)); /* even and odd do not mix */
++
++ Sets_MakeSet(&u, (LONGCARD)size);
++ Sets_Assign(&t,s);
++ Sets_Complement(&t); /* t = all even */
++ Sets_Assign(&u,t); /* keep a copy */
++ for (i = 0; i <= size; i += 2) {
++ assert(Sets_IsElement(i, &t));
++ }
++ Sets_Intersection(&t,s);
++ assert(Sets_IsEmpty(t));
++
++ Sets_Union(&s,u); /* odd and even gives a full set */
++ assert(!Sets_IsEmpty(s));
++ for (i = 0; i <= size; i += 1) {
++ assert(Sets_IsElement(i, &s));
++ }
++ Sets_Assign(&t,s);
++
++ for (i = 0; i <= size; i += 1) {
++ assert(Sets_IsElement(i, &s));
++ Sets_Exclude(&s, i);
++ assert(!Sets_IsElement(i, &s));
++ }
++ assert(Sets_IsEmpty(s));
++
++ while( !Sets_IsEmpty(t) ) {
++ Sets_Include(&s, Sets_Extract(&t));
++ }
++ assert(Sets_IsEmpty(t));
++ for (i = 0; i <= size; i += 1) {
++ assert(Sets_IsElement(i, &s));
++ }
++
++ while( !Sets_IsEmpty(s) ) {
++ j = Sets_Select(&s);
++ Sets_Include(&t, j);
++ Sets_Exclude(&s, j);
++ }
++ assert(Sets_IsEmpty(s));
++ for (i = 0; i <= size; i += 1) {
++ assert(Sets_IsElement(i, &t));
++ }
++
++ Sets_AssignEmpty(&t);
++ for (i = 0; i <= size; i += 2) {
++ Sets_Include(&t, i);
++ }
++ Sets_Exists(t,(Sets_ProcOfCardToBool)(TestEven));
++
++ CleanMyset();
++ Sets_ForallDo(t, (Sets_ProcOfCard)(SetMyset));
++
++ for (i = 0; i <= size; i += 1) {
++ assert(Sets_IsElement(i, &t)==(myset[i]==1));
++ }
++ for (i = 0; i <= size; i += 1) {
++ assert((!Sets_IsElement(i, &t))==(myset[i]==0));
++ }
++
++ /* next size */
++ sizeindex++;
++ Sets_ReleaseSet(&s);
++ Sets_ReleaseSet(&t);
++ Sets_ReleaseSet(&u);
++ }
++}
diff --git a/devel/cocktail/files/patch-reuse-m2c-Sort.c b/devel/cocktail/files/patch-reuse-m2c-Sort.c
new file mode 100644
index 000000000000..e397bbba196b
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Sort.c
@@ -0,0 +1,11 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Sort.c Tue Feb 15 14:27:00 1994
++++ ./reuse/m2c/Sort.c Thu Aug 5 18:49:34 2004
+@@ -43,7 +43,7 @@
+ (**link->Swap)(Lwb, j);
+ QuickSort(link, Lwb, j - 1);
+ Lwb = j + 1;
+- } EXIT_1:;
++ } ;
+ }
+
+ void Sort_Sort
diff --git a/devel/cocktail/files/patch-reuse-m2c-Sort.h b/devel/cocktail/files/patch-reuse-m2c-Sort.h
new file mode 100644
index 000000000000..6cbdd431b370
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Sort.h
@@ -0,0 +1,14 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Sort.h Tue Feb 15 14:27:00 1994
++++ ./reuse/m2c/Sort.h Thu Aug 5 18:49:34 2004
+@@ -1,6 +1,10 @@
+ #define DEFINITION_Sort
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ typedef BOOLEAN (*Sort_tProcIntIntBool) ARGS((INTEGER, INTEGER));
+ typedef void (*Sort_tProcIntInt) ARGS((INTEGER, INTEGER));
+ extern void Sort_Sort ARGS((INTEGER Lwb, INTEGER Upb, Sort_tProcIntIntBool IsLess, Sort_tProcIntInt Swap));
+-extern void BEGIN_Sort();
++extern void BEGIN_Sort(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Source.c b/devel/cocktail/files/patch-reuse-m2c-Source.c
new file mode 100644
index 000000000000..c5060d646cc5
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Source.c
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Source.c Tue Feb 15 14:27:01 1994
++++ ./reuse/m2c/Source.c Thu Aug 5 18:49:34 2004
+@@ -45,9 +45,6 @@
+ CARDINAL Size;
+ # endif
+ {
+- INTEGER n;
+- struct S_1 *BufferPtr;
+-
+ return rRead(File, Buffer, (LONGINT)Size);
+ }
+
diff --git a/devel/cocktail/files/patch-reuse-m2c-Source.h b/devel/cocktail/files/patch-reuse-m2c-Source.h
new file mode 100644
index 000000000000..96a3cdcd7c85
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Source.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Source.h Tue Feb 15 14:27:00 1994
++++ ./reuse/m2c/Source.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Source
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_rSystem
+ #include "rSystem.h"
+ #endif
+@@ -7,4 +11,4 @@
+ extern rSystem_tFile Source_BeginSource ARGS((CHAR FileName[], LONGCARD ));
+ extern INTEGER Source_GetLine ARGS((rSystem_tFile File, ADDRESS Buffer, CARDINAL Size));
+ extern void Source_CloseSource ARGS((rSystem_tFile File));
+-extern void BEGIN_Source();
++extern void BEGIN_Source(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-StdIO.h b/devel/cocktail/files/patch-reuse-m2c-StdIO.h
new file mode 100644
index 000000000000..8b903f21bf95
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-StdIO.h
@@ -0,0 +1,53 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/StdIO.h Tue Feb 15 14:27:01 1994
++++ ./reuse/m2c/StdIO.h Thu Aug 5 18:49:34 2004
+@@ -1,22 +1,26 @@
+ #define DEFINITION_StdIO
+
+-extern void StdIO_ReadClose ARGS(());
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
++extern void StdIO_ReadClose ARGS((NOARGS));
+ extern INTEGER StdIO_Read ARGS((ADDRESS Buffer, CARDINAL Size));
+-extern CHAR StdIO_ReadC ARGS(());
+-extern INTEGER StdIO_ReadI ARGS(());
+-extern REAL StdIO_ReadR ARGS(());
+-extern BOOLEAN StdIO_ReadB ARGS(());
++extern CHAR StdIO_ReadC ARGS((NOARGS));
++extern INTEGER StdIO_ReadI ARGS((NOARGS));
++extern REAL StdIO_ReadR ARGS((NOARGS));
++extern BOOLEAN StdIO_ReadB ARGS((NOARGS));
+ extern INTEGER StdIO_ReadN ARGS((INTEGER Base));
+ extern void StdIO_ReadS ARGS((CHAR s[], LONGCARD ));
+-extern SHORTINT StdIO_ReadShort ARGS(());
+-extern LONGINT StdIO_ReadLong ARGS(());
+-extern CARDINAL StdIO_ReadCard ARGS(());
+-extern void StdIO_ReadNl ARGS(());
+-extern void StdIO_UnRead ARGS(());
+-extern BOOLEAN StdIO_EndOfLine ARGS(());
+-extern BOOLEAN StdIO_EndOfFile ARGS(());
+-extern void StdIO_WriteClose ARGS(());
+-extern void StdIO_WriteFlush ARGS(());
++extern SHORTINT StdIO_ReadShort ARGS((NOARGS));
++extern LONGINT StdIO_ReadLong ARGS((NOARGS));
++extern CARDINAL StdIO_ReadCard ARGS((NOARGS));
++extern void StdIO_ReadNl ARGS((NOARGS));
++extern void StdIO_UnRead ARGS((NOARGS));
++extern BOOLEAN StdIO_EndOfLine ARGS((NOARGS));
++extern BOOLEAN StdIO_EndOfFile ARGS((NOARGS));
++extern void StdIO_WriteClose ARGS((NOARGS));
++extern void StdIO_WriteFlush ARGS((NOARGS));
+ extern INTEGER StdIO_Write ARGS((ADDRESS Buffer, CARDINAL Size));
+ extern void StdIO_WriteC ARGS((CHAR c));
+ extern void StdIO_WriteI ARGS((INTEGER n, CARDINAL FieldWidth));
+@@ -27,6 +31,6 @@
+ extern void StdIO_WriteShort ARGS((SHORTINT n, CARDINAL FieldWidth));
+ extern void StdIO_WriteLong ARGS((LONGINT n, CARDINAL FieldWidth));
+ extern void StdIO_WriteCard ARGS((CARDINAL n, CARDINAL FieldWidth));
+-extern void StdIO_WriteNl ARGS(());
+-extern void StdIO_CloseIO ARGS(());
+-extern void BEGIN_StdIO();
++extern void StdIO_WriteNl ARGS((NOARGS));
++extern void StdIO_CloseIO ARGS((NOARGS));
++extern void BEGIN_StdIO(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-StringMem.h b/devel/cocktail/files/patch-reuse-m2c-StringMem.h
new file mode 100644
index 000000000000..b55c1964a859
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-StringMem.h
@@ -0,0 +1,22 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/StringMem.h Tue Feb 15 14:26:52 1994
++++ ./reuse/m2c/StringMem.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_StringMem
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -14,6 +18,6 @@
+ extern CARDINAL StringMem_Length ARGS((StringMem_tStringRef r));
+ extern BOOLEAN StringMem_IsEqual ARGS((StringMem_tStringRef r, Strings_tString *s));
+ extern void StringMem_WriteString ARGS((IO_tFile f, StringMem_tStringRef r));
+-extern void StringMem_WriteStringMemory ARGS(());
+-extern void StringMem_InitStringMemory ARGS(());
+-extern void BEGIN_StringMem();
++extern void StringMem_WriteStringMemory ARGS((NOARGS));
++extern void StringMem_InitStringMemory ARGS((NOARGS));
++extern void BEGIN_StringMem(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Strings.c b/devel/cocktail/files/patch-reuse-m2c-Strings.c
new file mode 100644
index 000000000000..6f55a45b60e3
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Strings.c
@@ -0,0 +1,11 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Strings.c Tue Feb 15 14:27:02 1994
++++ ./reuse/m2c/Strings.c Thu Aug 5 18:49:34 2004
+@@ -22,7 +22,7 @@
+ static struct S_1 {
+ CHAR A[15 + 1];
+ } MyCHR;
+-static void Error ARGS(());
++static void Error ARGS((NOARGS));
+ static CARDINAL Rank ARGS((CHAR ch));
+ #define MaxInt 2147483647
+ #define MaxIntDiv10 (MaxInt / 10)
diff --git a/devel/cocktail/files/patch-reuse-m2c-Strings.h b/devel/cocktail/files/patch-reuse-m2c-Strings.h
new file mode 100644
index 000000000000..50fed9831c82
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Strings.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Strings.h Tue Feb 15 14:26:52 1994
++++ ./reuse/m2c/Strings.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Strings
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -32,4 +36,4 @@
+ extern void Strings_ReadL ARGS((IO_tFile f, Strings_tString *s));
+ extern void Strings_WriteS ARGS((IO_tFile f, Strings_tString *s));
+ extern void Strings_WriteL ARGS((IO_tFile f, Strings_tString *s));
+-extern void BEGIN_Strings();
++extern void BEGIN_Strings(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Texts.c b/devel/cocktail/files/patch-reuse-m2c-Texts.c
new file mode 100644
index 000000000000..253876a84feb
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Texts.c
@@ -0,0 +1,29 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Texts.c Tue Feb 15 14:27:03 1994
++++ ./reuse/m2c/Texts.c Thu Aug 5 18:49:34 2004
+@@ -46,7 +46,7 @@
+ Strings_tString *String;
+ # endif
+ {
+- Lists_Append(Text, (ADDRESS)StringMem_PutString(String));
++ Lists_Append(Text, (Lists_tElmt)StringMem_PutString(String));
+ }
+
+ void Texts_Insert
+@@ -58,7 +58,7 @@
+ Strings_tString *String;
+ # endif
+ {
+- Lists_Insert(Text, (ADDRESS)StringMem_PutString(String));
++ Lists_Insert(Text, (Lists_tElmt)StringMem_PutString(String));
+ }
+
+ BOOLEAN Texts_IsEmpty
+@@ -84,7 +84,7 @@
+ Strings_tString String;
+
+ while (!Lists_IsEmpty(Text)) {
+- StringMem_GetString((StringMem_tStringRef)Lists_Head(Text), &String);
++ StringMem_GetString((StringMem_tStringRef)Lists_Head((Lists_tList)Text), &String);
+ Strings_WriteL(f, &String);
+ Lists_Tail(&Text);
+ }
diff --git a/devel/cocktail/files/patch-reuse-m2c-Texts.h b/devel/cocktail/files/patch-reuse-m2c-Texts.h
new file mode 100644
index 000000000000..f03ab291dee2
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Texts.h
@@ -0,0 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Texts.h Tue Feb 15 14:27:03 1994
++++ ./reuse/m2c/Texts.h Thu Aug 5 18:49:34 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_Texts
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #ifndef DEFINITION_IO
+ #include "IO.h"
+ #endif
+@@ -18,4 +22,4 @@
+ extern void Texts_Insert ARGS((Texts_tText *Text, Strings_tString *String));
+ extern BOOLEAN Texts_IsEmpty ARGS((Texts_tText *Text));
+ extern void Texts_WriteText ARGS((IO_tFile f, Texts_tText Text));
+-extern void BEGIN_Texts();
++extern void BEGIN_Texts(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-Times.h b/devel/cocktail/files/patch-reuse-m2c-Times.h
new file mode 100644
index 000000000000..44853b681df5
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-Times.h
@@ -0,0 +1,16 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/Times.h Tue Feb 15 14:27:03 1994
++++ ./reuse/m2c/Times.h Thu Aug 5 18:49:34 2004
+@@ -1,6 +1,10 @@
+ #define DEFINITION_Times
+
+-extern LONGINT Times_CpuTime ARGS(());
+-extern LONGINT Times_StepTime ARGS(());
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
++extern LONGINT Times_CpuTime ARGS((NOARGS));
++extern LONGINT Times_StepTime ARGS((NOARGS));
+ extern void Times_WriteStepTime ARGS((CHAR Text[], LONGCARD ));
+-extern void BEGIN_Times();
++extern void BEGIN_Times(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-rMemory.c b/devel/cocktail/files/patch-reuse-m2c-rMemory.c
index 210a288e05bc..e9a4b7bcd853 100644
--- a/devel/cocktail/files/patch-reuse-m2c-rMemory.c
+++ b/devel/cocktail/files/patch-reuse-m2c-rMemory.c
@@ -1,39 +1,158 @@
---- ../../work/cocktail-9309//./reuse/m2c/rMemory.c Tue Feb 15 14:26:55 1994
-+++ ./reuse/m2c/rMemory.c Wed Mar 31 22:35:06 2004
-@@ -49,6 +49,10 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/rMemory.c Tue Feb 15 14:26:55 1994
++++ ./reuse/m2c/rMemory.c Thu Aug 5 18:49:34 2004
+@@ -18,28 +18,13 @@
+
+ LONGCARD rMemory_MemoryUsed;
+
+-#define MinSizeSmallBlock 4
+-#define MaxSizeSmallBlock 62
+-#define MinSizeLargeBlockLog 6
+-#define MaxSizeLargeBlockLog 24
+-#define PoolSize 10240
+ typedef struct S_1 *tBlockPtr;
+ typedef struct S_1 {
+ tBlockPtr Successor;
+ LONGINT Size;
+ } tBlock;
+-typedef LONGCARD tSmallBlockRange;
+-typedef LONGCARD tLargeBlockRange;
+-static struct S_2 {
+- ADDRESS A[MaxSizeSmallBlock - MinSizeSmallBlock + 1];
+-} SmallChain;
+-static struct S_3 {
+- ADDRESS A[MaxSizeLargeBlockLog - MinSizeLargeBlockLog + 1];
+-} LargeChain;
+ static ADDRESS PoolFreePtr;
+ static ADDRESS PoolEndPtr;
+-static tSmallBlockRange i;
+-static tLargeBlockRange j;
+
+ ADDRESS rMemory_Alloc
+ # ifdef __STDC__
+@@ -49,86 +34,8 @@
LONGINT ByteCount;
# endif
{
-+# ifdef __FreeBSD__
+- tBlockPtr BlockPtr, CurrentBlock, PreviousBlock, BestBlock, PredecessorBlock;
+- CARDINAL ChainNumber;
+- LONGINT CurrentBlockSize, BestBlockSize;
+- tLargeBlockRange j;
+-
+- ByteCount = (LONGINT)((BITSET)(ByteCount + General_MaxAlign - 1) & General_AlignMasks.A[General_MaxAlign]);
+- if (ByteCount <= MaxSizeSmallBlock) {
+- if (ByteCount == 0) {
+- ByteCount = General_Max((LONGINT)MinSizeSmallBlock, General_MaxAlign);
+- }
+- if (SmallChain.A[ByteCount - 4] != NIL) {
+- BlockPtr = (tBlockPtr)SmallChain.A[ByteCount - 4];
+- SmallChain.A[ByteCount - 4] = (ADDRESS)BlockPtr->Successor;
+- return (ADDRESS)BlockPtr;
+- } else {
+- if ((LONGINT)(PoolEndPtr - (LONGCARD)PoolFreePtr) < ByteCount) {
+- if ((LONGCARD)(PoolEndPtr - (LONGCARD)PoolFreePtr) >= MinSizeSmallBlock) {
+- rMemory_Free((LONGINT)(PoolEndPtr - (LONGCARD)PoolFreePtr), PoolFreePtr);
+- }
+- PoolFreePtr = rMemory_Alloc((LONGINT)PoolSize);
+- PoolEndPtr = PoolFreePtr + PoolSize;
+- }
+- INC1(PoolFreePtr, (LONGCARD)(ADDRESS)ByteCount);
+- return PoolFreePtr - (LONGCARD)(ADDRESS)ByteCount;
+- }
+- } else {
+- ChainNumber = General_Log2(ByteCount);
+- CurrentBlock = (tBlockPtr)LargeChain.A[ChainNumber - 6];
+- PreviousBlock = (tBlockPtr)ADR(LargeChain.A[ChainNumber - 6]);
+- BestBlock = NIL;
+- BestBlockSize = 1000000000;
+- while (CurrentBlock != NIL) {
+- CurrentBlockSize = CurrentBlock->Size;
+- if (CurrentBlockSize >= ByteCount) {
+- if (CurrentBlockSize == ByteCount) {
+- PreviousBlock->Successor = CurrentBlock->Successor;
+- return (ADDRESS)CurrentBlock;
+- }
+- if (CurrentBlockSize < BestBlockSize) {
+- BestBlock = CurrentBlock;
+- BestBlockSize = CurrentBlockSize;
+- PredecessorBlock = PreviousBlock;
+- }
+- }
+- PreviousBlock = CurrentBlock;
+- CurrentBlock = CurrentBlock->Successor;
+- }
+- if (BestBlock != NIL) {
+- PredecessorBlock->Successor = BestBlock->Successor;
+- if (BestBlockSize - ByteCount >= MinSizeSmallBlock) {
+- rMemory_Free(BestBlockSize - ByteCount, (ADDRESS)BestBlock + (LONGCARD)(ADDRESS)ByteCount);
+- }
+- return (ADDRESS)BestBlock;
+- }
+- for (j = ChainNumber + 1; j <= MaxSizeLargeBlockLog; j += 1) {
+- CurrentBlock = (tBlockPtr)LargeChain.A[j - 6];
+- if (CurrentBlock != NIL) {
+- LargeChain.A[j - 6] = (ADDRESS)CurrentBlock->Successor;
+- if (CurrentBlock->Size - ByteCount >= MinSizeSmallBlock) {
+- rMemory_Free(CurrentBlock->Size - ByteCount, (ADDRESS)CurrentBlock + (LONGCARD)(ADDRESS)ByteCount);
+- }
+- return (ADDRESS)CurrentBlock;
+- }
+- }
+- if (ByteCount < PoolSize) {
+- if ((LONGINT)(PoolEndPtr - (LONGCARD)PoolFreePtr) < ByteCount) {
+- if ((LONGCARD)(PoolEndPtr - (LONGCARD)PoolFreePtr) >= MinSizeSmallBlock) {
+- rMemory_Free((LONGINT)(PoolEndPtr - (LONGCARD)PoolFreePtr), PoolFreePtr);
+- }
+- PoolFreePtr = rMemory_Alloc((LONGINT)PoolSize);
+- PoolEndPtr = PoolFreePtr + PoolSize;
+- }
+- INC1(PoolFreePtr, (LONGCARD)(ADDRESS)ByteCount);
+- return PoolFreePtr - (LONGCARD)(ADDRESS)ByteCount;
+- } else {
+- BlockPtr = (tBlockPtr)rAlloc(ByteCount);
+- INC1(rMemory_MemoryUsed, ByteCount);
+- return (ADDRESS)BlockPtr;
+- }
+- }
+ /* FreeBSD is suppossed to have its own proper memory manager */
+ return (ADDRESS)calloc(1,ByteCount);
-+# else
- tBlockPtr BlockPtr, CurrentBlock, PreviousBlock, BestBlock, PredecessorBlock;
- CARDINAL ChainNumber;
- LONGINT CurrentBlockSize, BestBlockSize;
-@@ -129,6 +133,7 @@
- return (ADDRESS)BlockPtr;
- }
- }
-+#endif
}
void rMemory_Free
-@@ -140,6 +145,9 @@
+@@ -140,23 +47,7 @@
ADDRESS a;
# endif
{
-+#ifdef __FREEBSD__
+- tBlockPtr BlockPtr;
+- tLargeBlockRange ChainNumber;
+-
+- ByteCount = (LONGINT)((BITSET)(ByteCount + General_MaxAlign - 1) & General_AlignMasks.A[General_MaxAlign]);
+- BlockPtr = (tBlockPtr)a;
+- if (ByteCount <= MaxSizeSmallBlock) {
+- if (ByteCount == 0) {
+- ByteCount = General_Max((LONGINT)MinSizeSmallBlock, General_MaxAlign);
+- }
+- BlockPtr->Successor = (tBlockPtr)SmallChain.A[ByteCount - 4];
+- SmallChain.A[ByteCount - 4] = (ADDRESS)BlockPtr;
+- } else {
+- ChainNumber = General_Log2(ByteCount);
+- BlockPtr->Successor = (tBlockPtr)LargeChain.A[ChainNumber - 6];
+- BlockPtr->Size = ByteCount;
+- LargeChain.A[ChainNumber - 6] = (ADDRESS)BlockPtr;
+- }
+ free(a);
-+#else
- tBlockPtr BlockPtr;
- tLargeBlockRange ChainNumber;
-
-@@ -157,6 +165,7 @@
- BlockPtr->Size = ByteCount;
- LargeChain.A[ChainNumber - 6] = (ADDRESS)BlockPtr;
- }
-+#endif
}
void BEGIN_rMemory()
+@@ -168,12 +59,6 @@
+ BEGIN_rSystem();
+ BEGIN_IO();
+
+- for (i = MinSizeSmallBlock; i <= MaxSizeSmallBlock; i += 2) {
+- SmallChain.A[i - 4] = (ADDRESS)NIL;
+- }
+- for (j = MinSizeLargeBlockLog; j <= MaxSizeLargeBlockLog; j += 1) {
+- LargeChain.A[j - 6] = (ADDRESS)NIL;
+- }
+ PoolFreePtr = (ADDRESS)NIL;
+ PoolEndPtr = (ADDRESS)NIL;
+ rMemory_MemoryUsed = 0;
diff --git a/devel/cocktail/files/patch-reuse-m2c-rMemory.h b/devel/cocktail/files/patch-reuse-m2c-rMemory.h
new file mode 100644
index 000000000000..2b955afa6942
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-rMemory.h
@@ -0,0 +1,14 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/rMemory.h Tue Feb 15 14:26:55 1994
++++ ./reuse/m2c/rMemory.h Thu Aug 5 18:49:34 2004
+@@ -1,6 +1,10 @@
+ #define DEFINITION_rMemory
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ extern LONGCARD rMemory_MemoryUsed;
+ extern ADDRESS rMemory_Alloc ARGS((LONGINT ByteCount));
+ extern void rMemory_Free ARGS((LONGINT ByteCount, ADDRESS a));
+-extern void BEGIN_rMemory();
++extern void BEGIN_rMemory(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-m2c-rMemoryDrv.c b/devel/cocktail/files/patch-reuse-m2c-rMemoryDrv.c
new file mode 100644
index 000000000000..b022be09489d
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-rMemoryDrv.c
@@ -0,0 +1,11 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/rMemoryDrv.c Tue Feb 15 14:26:56 1994
++++ ./reuse/m2c/rMemoryDrv.c Thu Aug 5 18:49:34 2004
+@@ -61,7 +61,7 @@
+ notbest = 112;
+ large = 128;
+ for (;;) {
+- for (i = 7; i <= 24; i += 1) {
++ for (i = 7; i <= 12; i += 1) {
+ IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)" i = ", 12L);
+ IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)i, 10L);
+ IO_WriteNl((rSystem_tFile)IO_StdOutput);
diff --git a/devel/cocktail/files/patch-reuse-m2c-rSystem.c b/devel/cocktail/files/patch-reuse-m2c-rSystem.c
index 648e5f840fba..28ca143bf1dc 100644
--- a/devel/cocktail/files/patch-reuse-m2c-rSystem.c
+++ b/devel/cocktail/files/patch-reuse-m2c-rSystem.c
@@ -1,6 +1,24 @@
---- ../../work/cocktail-9309//./reuse/m2c/rSystem.c Tue Feb 15 14:26:46 1994
-+++ ./reuse/m2c/rSystem.c Wed Mar 31 22:35:06 2004
-@@ -22,9 +22,9 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/rSystem.c Tue Feb 15 14:26:46 1994
++++ ./reuse/m2c/rSystem.c Thu Aug 5 18:49:33 2004
+@@ -10,10 +10,17 @@
+ /* compilation with the option -DUNIX uses UNIX system calls for IO (efficient),
+ otherwise the C library routines are used for IO (portable). */
+
++# include <sys/types.h>
++# include <sys/uio.h>
++# include <unistd.h>
++# include <stdlib.h>
++
+ # ifdef __STDC__
+ # define ARGS(parameters) parameters
++# define NOARGS void
+ # else
+ # define ARGS(parameters) ()
++# define NOARGS
+ # endif
+
+ # ifndef bool
+@@ -22,9 +29,9 @@
# define tFile int
# ifdef m68000
@@ -12,7 +30,52 @@
# endif
/* binary IO */
-@@ -229,7 +229,7 @@
+@@ -65,10 +72,10 @@
+ /* memory space of size 'ByteCount' bytes. */
+ /* Returns NIL if space is exhausted. */
+
+-extern long rTime ();
++extern long rTime (NOARGS);
+ /* Returns consumed cpu-time in milliseconds. */
+
+-extern int GetArgCount ();
++extern int GetArgCount (NOARGS);
+ /* Returns number of arguments. */
+
+ extern void GetArgument ARGS((int ArgNum, char * Argument));
+@@ -79,7 +86,7 @@
+ /* Dummy procedure that passes the values */
+ /* 'argc' and 'argv' from Modula-2 to C. */
+
+-extern int rErrNo ();
++extern int rErrNo (NOARGS);
+ /* Returns the current system error code. */
+
+ extern int rSystem ARGS((char * String));
+@@ -91,7 +98,7 @@
+ /* Terminates program execution and passes the */
+ /* value 'Status' to the operating system. */
+
+-extern void BEGIN_System ();
++extern void BEGIN_rSystem (NOARGS);
+ /* Dummy procedure with empty body. */
+
+
+@@ -216,9 +223,10 @@
+
+ /* calls other than IO */
+
+-/* # include <malloc.h> */
+-
+-char * rAlloc (ByteCount) long ByteCount; { return (char *) malloc ((unsigned) ByteCount); }
++char * rAlloc (ByteCount) long ByteCount;
++{
++ return (char *) calloc (1L, (unsigned) ByteCount);
++}
+
+ # include <sys/times.h>
+
+@@ -229,7 +237,7 @@
# else
struct tms buffer;
(void) times (& buffer);
@@ -21,3 +84,13 @@
# endif
}
+@@ -264,8 +272,6 @@
+
+ int rSystem (String) char * String; { return system (String); }
+
+-extern void exit ();
+-
+ void rExit (Status) int Status; { exit (Status); }
+
+-void BEGIN_rSystem () {}
++void BEGIN_rSystem (NOARGS) {}
diff --git a/devel/cocktail/files/patch-reuse-m2c-rSystem.h b/devel/cocktail/files/patch-reuse-m2c-rSystem.h
new file mode 100644
index 000000000000..66e3c2313fa4
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-m2c-rSystem.h
@@ -0,0 +1,28 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/rSystem.h Tue Feb 15 14:26:48 1994
++++ ./reuse/m2c/rSystem.h Thu Aug 5 18:49:33 2004
+@@ -1,5 +1,9 @@
+ #define DEFINITION_rSystem
+
++#ifndef DEFINITION_SYSTEM_
++#include "SYSTEM_.h"
++#endif
++
+ #define rSystem_cMaxFile 32
+ #define rSystem_StdInput 0
+ #define rSystem_StdOutput 1
+@@ -12,11 +16,11 @@
+ extern void rClose ARGS((rSystem_tFile File));
+ extern BOOLEAN IsCharacterSpecial ARGS((rSystem_tFile File));
+ extern ADDRESS rAlloc ARGS((LONGINT ByteCount));
+-extern LONGINT rTime ARGS(());
+-extern CARDINAL GetArgCount ARGS(());
++extern LONGINT rTime ARGS((NOARGS));
++extern CARDINAL GetArgCount ARGS((NOARGS));
+ extern void GetArgument ARGS((INTEGER ArgNum, CHAR Argument[], LONGCARD ));
+ extern void PutArgs ARGS((INTEGER Argc, ADDRESS Argv));
+-extern INTEGER rErrNo ARGS(());
++extern INTEGER rErrNo ARGS((NOARGS));
+ extern INTEGER rSystem ARGS((CHAR String[], LONGCARD ));
+ extern void rExit ARGS((INTEGER Status));
+-extern void BEGIN_rSystem();
++extern void BEGIN_rSystem(NOARGS);
diff --git a/devel/cocktail/files/patch-reuse-src-Makefile b/devel/cocktail/files/patch-reuse-src-Makefile
new file mode 100644
index 000000000000..eb9e7c5b520e
--- /dev/null
+++ b/devel/cocktail/files/patch-reuse-src-Makefile
@@ -0,0 +1,29 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/src/Makefile Tue Feb 15 14:27:25 1994
++++ ./reuse/src/Makefile Thu Aug 5 18:49:36 2004
+@@ -10,11 +10,11 @@
+ all: $(MC)
+
+ MC: rSystem.o
+- rm -f Main
++ -rm -f Main
+ echo p Main | mc
+
+ M2C: rSystem.o
+- rm -f Main
++ -rm -f Main
+ for file in `ls *.md`; do ln $$file `basename $$file .md`.def; done
+ for file in `ls *.mi`; do ln $$file `basename $$file .mi`.mod; done
+ make Main -f MakefileM2C
+@@ -45,10 +45,10 @@
+ lint -u *.c
+
+ CLEAN: clean
+- rm -f *.[dimor] *.sym *.def *.mod
++ -rm -f *.[dimor] *.sym *.def *.mod
+
+ clean:
+- rm -f *Drv.[dimor] *Drv.sym *Drv Main.[dimor] Main t *.bak
++ -rm -f *Drv.[dimor] *Drv.sym *Drv Main.[dimor] Main t *.bak
+
+ .c.o:
+ $(CC) $(CFLAGS) -c $*.c;
diff --git a/devel/cocktail/files/patch-rex-lib-Makefile b/devel/cocktail/files/patch-rex-lib-Makefile
new file mode 100644
index 000000000000..a28d6a832c55
--- /dev/null
+++ b/devel/cocktail/files/patch-rex-lib-Makefile
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rex/lib/Makefile Tue Feb 15 14:27:27 1994
++++ ./rex/lib/Makefile Thu Aug 5 18:49:04 2004
+@@ -1,7 +1,8 @@
+ all: ScanDrv.mod Scanner.def Scanner.mod Source.def Source.mod
+
+ clean:
+- rm -f core *.def *.mod
++ -rm -f $(STDCLEAN)
++ -rm -f *.def *.mod
+
+ .SUFFIXES: .def .mod .md .mi
+
diff --git a/devel/cocktail/files/patch-rex-m2c-Makefile b/devel/cocktail/files/patch-rex-m2c-Makefile
index 770681917248..d84fa29a1637 100644
--- a/devel/cocktail/files/patch-rex-m2c-Makefile
+++ b/devel/cocktail/files/patch-rex-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./rex/m2c/Makefile Tue Feb 15 14:27:51 1994
-+++ ./rex/m2c/Makefile Wed Mar 31 22:59:41 2004
-@@ -1,34 +1,28 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rex/m2c/Makefile Tue Feb 15 14:27:51 1994
++++ ./rex/m2c/Makefile Thu Aug 5 18:49:05 2004
+@@ -1,34 +1,29 @@
-BIN = $(HOME)/bin
-LIB = $(HOME)/lib
-OPT = -O
@@ -46,12 +46,13 @@
+ sh -c "if test ! -d $(DESTLIB)/rex; then mkdir -p $(DESTLIB)/rex; else true; fi"
+clean:
-+ rm -f core *.o
-+ rm -f rex
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f rex
# HEAD
-@@ -198,18 +192,3 @@
+@@ -198,18 +193,3 @@
Scanner.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-rex-m2c-Nfa.c b/devel/cocktail/files/patch-rex-m2c-Nfa.c
new file mode 100644
index 000000000000..696e628637e2
--- /dev/null
+++ b/devel/cocktail/files/patch-rex-m2c-Nfa.c
@@ -0,0 +1,12 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rex/m2c/Nfa.c Tue Feb 15 14:27:58 1994
++++ ./rex/m2c/Nfa.c Thu Aug 5 18:49:06 2004
+@@ -227,7 +227,8 @@
+ Nfa_TransitionRange t2;
+
+ t2 = Nfa_NoTransition;
+- while (t1 != Nfa_NoTransition) {
++ while ((t1 != Nfa_NoTransition)
++ &&(t1 != (Nfa_TransitionRange)DEAD_ALLOCATE)){
+ {
+ register C_1_Transition *W_3 = &TransitionTablePtr->A[t1];
+
diff --git a/devel/cocktail/files/patch-rex-src-Makefile b/devel/cocktail/files/patch-rex-src-Makefile
index b6b25047e043..0e6b585537a7 100644
--- a/devel/cocktail/files/patch-rex-src-Makefile
+++ b/devel/cocktail/files/patch-rex-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./rex/src/Makefile Tue Feb 15 14:27:41 1994
-+++ ./rex/src/Makefile Wed Mar 31 22:58:56 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rex/src/Makefile Tue Feb 15 14:27:41 1994
++++ ./rex/src/Makefile Thu Aug 5 18:49:04 2004
@@ -30,7 +30,7 @@
echo p rex | mc -d $(MLIB)
@@ -56,3 +56,21 @@
echo p rexIdDrv | mc -d $(MLIB)
mv rexIdDrv rexId
+@@ -101,13 +101,14 @@
+ sh -c "if test ! -d $(LIB)/Id; then mkdir -p $(LIB)/Id; else true; fi"
+
+ cleanId:
+- rm -f rexId*
++ -rm -f rexId*
+
+ clean: cleanId
+- rm -f core *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug rex *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] *.def *.mod *.sym ERRORS LISTING _Debug rex *.bak
+
+ CLEAN: clean
+- rm -f $(SOURCES)
++ -rm -f $(SOURCES)
+
+ .SUFFIXES: .def .mod .md .mi
+
diff --git a/devel/cocktail/files/patch-rex-test-Makefile b/devel/cocktail/files/patch-rex-test-Makefile
index 362f6286d673..84a48bd2bcd9 100644
--- a/devel/cocktail/files/patch-rex-test-Makefile
+++ b/devel/cocktail/files/patch-rex-test-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./rex/test/Makefile Tue Feb 15 14:28:08 1994
-+++ ./rex/test/Makefile Wed Mar 31 23:00:23 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rex/test/Makefile Tue Feb 15 14:28:08 1994
++++ ./rex/test/Makefile Thu Aug 5 18:49:07 2004
@@ -1,7 +1,3 @@
-LIB = $(HOME)/lib
-MLIB = ../../reuse/src
@@ -44,9 +44,13 @@
test:
time ScannerDrv < in
-@@ -58,5 +54,4 @@
+@@ -56,7 +52,7 @@
+ lint $(CFLAGS) -u ScannerDrv.c Scanner.c Source.c
+
clean:
- rm -f Scan* Source* scan* [alst]*.e core
+- rm -f Scan* Source* scan* [alst]*.e core
++ -rm -f $(STDCLEAN)
++ -rm -f Scan* Source* scan* [alst]*.e
-.c.o:
- $(CC) $(CFLAGS) -c $*.c;
diff --git a/devel/cocktail/files/patch-rpp-m2c-Makefile b/devel/cocktail/files/patch-rpp-m2c-Makefile
index bba6523795b9..5b9c29a4acd7 100644
--- a/devel/cocktail/files/patch-rpp-m2c-Makefile
+++ b/devel/cocktail/files/patch-rpp-m2c-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./rpp/m2c/Makefile Tue Feb 15 14:28:12 1994
-+++ ./rpp/m2c/Makefile Wed Mar 31 22:35:06 2004
-@@ -1,24 +1,18 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rpp/m2c/Makefile Tue Feb 15 14:28:12 1994
++++ ./rpp/m2c/Makefile Thu Aug 5 18:48:26 2004
+@@ -1,24 +1,19 @@
-BIN = $(HOME)/bin
-BIN = $(HOME)/bin
-OPT = -O
@@ -28,12 +28,13 @@
+ install -c -s -m 755 rpp $(DESTBIN)
+clean:
-+ rm -f core *.o
-+ rm -f rpp
++ -rm -f $(STDCLEAN)
++ -rm -f *.o
++ -rm -f rpp
# HEAD
-@@ -42,18 +36,3 @@
+@@ -42,18 +37,3 @@
Scanner.o \
$(CLIBS)
diff --git a/devel/cocktail/files/patch-rpp-src-Makefile b/devel/cocktail/files/patch-rpp-src-Makefile
index 7bc7296e778d..3d2cd642e503 100644
--- a/devel/cocktail/files/patch-rpp-src-Makefile
+++ b/devel/cocktail/files/patch-rpp-src-Makefile
@@ -1,5 +1,5 @@
---- ../../work/cocktail-9309//./rpp/src/Makefile Tue Feb 15 14:28:17 1994
-+++ ./rpp/src/Makefile Wed Mar 31 23:00:33 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./rpp/src/Makefile Tue Feb 15 14:28:17 1994
++++ ./rpp/src/Makefile Thu Aug 5 18:48:26 2004
@@ -1,4 +1,3 @@
-BIN = $(HOME)/bin
SOURCES = Scanner.md Scanner.mi
@@ -14,3 +14,13 @@
install: rpp
install -c -s -m 755 rpp $(BIN)/rpp
+@@ -24,7 +23,7 @@
+ cd ../m2c; rm -f *.m[id]
+
+ clean:
+- rm -f *.[dimor] rpp *.bak
++ -rm -f *.[dimor] rpp *.bak
+
+ CLEAN: clean
+- rm -f $(SOURCES)
++ -rm -f $(SOURCES)
diff --git a/devel/cocktail/files/patch-specs-Makefile b/devel/cocktail/files/patch-specs-Makefile
index 404ec346133b..97ef007c7c01 100644
--- a/devel/cocktail/files/patch-specs-Makefile
+++ b/devel/cocktail/files/patch-specs-Makefile
@@ -1,8 +1,8 @@
---- ../../work/cocktail-9309//./specs/Makefile Sun Apr 4 18:01:21 2004
-+++ ./specs/Makefile Wed Mar 31 22:35:07 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/Makefile Sat Sep 11 00:58:46 2004
++++ ./specs/Makefile Wed Aug 25 11:34:33 2004
@@ -0,0 +1,39 @@
+
-+.include "Makefile.inc"
++.include "../Makefile.inc"
+
+ROOTDIR = ../
+
@@ -10,16 +10,16 @@
+all: testc
+
+testc:
-+ cd c/ada && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/c && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/cpp && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/modula2 && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/modula2.ell && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/sather && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/sql && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/oberon2 && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR)
-+ cd c/minilax && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR) minilax
-+ cd c/wag && $(MAKE) -i LIB=$(LIB) INCDIR=$(INCDIR) minilax
++ cd c/ada && $(MAKE)
++ cd c/c && $(MAKE)
++ cd c/cpp && $(MAKE)
++ cd c/modula2 && $(MAKE)
++ cd c/modula2.ell && $(MAKE)
++ cd c/sather && $(MAKE)
++ cd c/sql && $(MAKE)
++ cd c/oberon2 && $(MAKE)
++ cd c/minilax && $(MAKE) minilax
++ cd c/wag && $(MAKE) minilax
+
+clean:
+ -cd c/ada && $(MAKE) clean
diff --git a/devel/cocktail/files/patch-specs-Makefile.inc b/devel/cocktail/files/patch-specs-Makefile.inc
index 6fd0a4835796..f72fe0ee7b93 100644
--- a/devel/cocktail/files/patch-specs-Makefile.inc
+++ b/devel/cocktail/files/patch-specs-Makefile.inc
@@ -1,4 +1,4 @@
---- ../../work/cocktail-9309//./specs/Makefile.inc Sun Apr 4 18:01:21 2004
-+++ ./specs/Makefile.inc Wed Mar 31 22:35:07 2004
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/Makefile.inc Sat Sep 11 00:58:46 2004
++++ ./specs/Makefile.inc Thu Aug 5 18:48:35 2004
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-ada-Makefile b/devel/cocktail/files/patch-specs-c-ada-Makefile
index d85fe39bf5be..aa7ca92775b7 100644
--- a/devel/cocktail/files/patch-specs-c-ada-Makefile
+++ b/devel/cocktail/files/patch-specs-c-ada-Makefile
@@ -1,22 +1,24 @@
---- ../../work/cocktail-9309//./specs/c/ada/Makefile Tue Feb 15 14:28:23 1994
-+++ ./specs/c/ada/Makefile Wed Mar 31 23:01:55 2004
-@@ -1,22 +1,23 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/ada/Makefile Tue Feb 15 14:28:23 1994
++++ ./specs/c/ada/Makefile Wed Aug 25 11:55:26 2004
+@@ -1,22 +1,24 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
+
+HOME ?= $(.CURDIR)/../..
++ROOTDIR= ../../..
+.include "../../Makefile.inc"
+
-+CFLAGS += $(INCDIRC) $(LIBREUSEC)
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
ParserDrv: ParserDrv.o Scanner.o Parser.o
- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
-+ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -l reuse -o ParserDrv
Scanner.rpp Parser.lalr: ada.pars
- lpp -cxzj ada.pars;
+- lpp -cxzj ada.pars;
++ $(LPP) -cxzj ada.pars;
ada.rex: ada.scan Scanner.rpp
- rpp < ada.scan > ada.rex;
@@ -32,11 +34,15 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h
-@@ -28,7 +29,3 @@
- clean:
- rm -f ParserDrv core *.[hco] _Debug ada.rex Parser.lalr Scanner.rpp
+@@ -26,9 +28,6 @@
+ lint $(CFLAGS) -b -u *.c
--.SUFFIXES: .c .o
+ clean:
+- rm -f ParserDrv core *.[hco] _Debug ada.rex Parser.lalr Scanner.rpp
-
+-.SUFFIXES: .c .o
++ -rm -f $(STDCLEAN)
++ -rm -f ParserDrv *.[hco] _Debug ada.rex Parser.lalr Scanner.rpp
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
diff --git a/devel/cocktail/files/patch-specs-c-c-Makefile b/devel/cocktail/files/patch-specs-c-c-Makefile
index 199d771adecb..d2f02475b26a 100644
--- a/devel/cocktail/files/patch-specs-c-c-Makefile
+++ b/devel/cocktail/files/patch-specs-c-c-Makefile
@@ -1,15 +1,24 @@
---- ../../work/cocktail-9309//./specs/c/c/Makefile Tue Feb 15 14:28:24 1994
-+++ ./specs/c/c/Makefile Wed Mar 31 23:02:22 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/c/Makefile Tue Feb 15 14:28:24 1994
++++ ./specs/c/c/Makefile Wed Aug 25 11:55:26 2004
+@@ -1,23 +1,24 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR) -g
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
++
OBJS = ParserDrv.o Scanner.o Parser.o Positions.o Errors.o hash.o name-space.o
ParserDrv: $(OBJS)
-@@ -11,13 +7,13 @@
- lpp -cxzj c.pars;
+- $(CC) $(CFLAGS) -o ParserDrv $(OBJS) $(LIB)/libreuse.a
++ $(CC) $(CFLAGS) -o ParserDrv $(OBJS) -L $(TMPLIB) -lreuse
+
+ Scanner.rpp Parser.lalr: c.pars
+- lpp -cxzj c.pars;
++ $(LPP) -cxzj c.pars;
c.rex: c.scan Scanner.rpp
- rpp < c.scan > c.rex;
@@ -25,12 +34,16 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h Errors.h
-@@ -32,7 +28,4 @@
- rm -f ParserDrv core *.o _Debug Parser.[hc] Scanner.[hc] Errors.[hc] \
+@@ -29,10 +30,7 @@
+ lint -I$(INCDIR) -b -u *.c
+
+ clean:
+- rm -f ParserDrv core *.o _Debug Parser.[hc] Scanner.[hc] Errors.[hc] \
++ -rm -f $(STDCLEAN)
++ -rm -f ParserDrv *.o _Debug Parser.[hc] Scanner.[hc] Errors.[hc] \
c.rex Parser.lalr Scanner.rpp ParserDrv.c
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-cpp-Makefile b/devel/cocktail/files/patch-specs-c-cpp-Makefile
index 4b86adb42acf..6660a1885b2d 100644
--- a/devel/cocktail/files/patch-specs-c-cpp-Makefile
+++ b/devel/cocktail/files/patch-specs-c-cpp-Makefile
@@ -1,15 +1,24 @@
---- ../../work/cocktail-9309//./specs/c/cpp/Makefile Tue Feb 15 14:28:21 1994
-+++ ./specs/c/cpp/Makefile Wed Mar 31 23:01:31 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/cpp/Makefile Tue Feb 15 14:28:21 1994
++++ ./specs/c/cpp/Makefile Wed Aug 25 12:00:23 2004
+@@ -1,46 +1,46 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
all: ParserDrv cParserDrv
-@@ -12,13 +8,13 @@
- lpp -cxzj cpp.pars;
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -lreuse -o ParserDrv
+
+ Scanner.rpp Parser.lalr: cpp.pars
+- lpp -cxzj cpp.pars;
++ $(LPP) -cxzj cpp.pars;
cpp.rex: cpp.scan Scanner.rpp
- rpp < cpp.scan > cpp.rex;
@@ -25,7 +34,15 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h
-@@ -32,15 +28,15 @@
+ Scanner.o: Scanner.h
+
+ cParserDrv: cParserDrv.o cScannerSource.o cScanner.o cParser.o
+- $(CC) $(CFLAGS) cParserDrv.o cScannerSource.o cScanner.o cParser.o $(LIB)/libreuse.a -o cParserDrv
++ $(CC) $(CFLAGS) cParserDrv.o cScannerSource.o cScanner.o cParser.o -L $(TMPLIB) -l reuse -o cParserDrv
+
+ cScanner.rpp cParser.lalr: c.pars
+- lpp -cxzj c.pars;
++ $(LPP) -cxzj c.pars;
c.rex: cpp.scan cScanner.rpp
(echo SCANNER cScanner; rpp cScanner.rpp < cpp.scan) | \
@@ -44,12 +61,16 @@
cParserDrv.o: cParser.h cScanner.h
cParser.o: cParser.h cScanner.h
-@@ -53,7 +49,4 @@
- rm -f core *.[hco] _Debug cParserDrv ParserDrv c.rex cpp.rex \
+@@ -50,10 +50,7 @@
+ lint $(CFLAGS) -b -u *.c
+
+ clean:
+- rm -f core *.[hco] _Debug cParserDrv ParserDrv c.rex cpp.rex \
++ -rm -f $(STDCLEAN)
++ -rm -f *.[hco] _Debug cParserDrv ParserDrv c.rex cpp.rex \
cParser.lalr Parser.lalr cScanner.rpp Scanner.rpp
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-minilax-Makefile b/devel/cocktail/files/patch-specs-c-minilax-Makefile
index ef659e3b101a..497f2c6ee06b 100644
--- a/devel/cocktail/files/patch-specs-c-minilax-Makefile
+++ b/devel/cocktail/files/patch-specs-c-minilax-Makefile
@@ -1,15 +1,27 @@
---- ../../work/cocktail-9309//./specs/c/minilax/Makefile Tue Feb 15 14:28:44 1994
-+++ ./specs/c/minilax/Makefile Wed Mar 31 23:06:11 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/minilax/Makefile Tue Feb 15 14:28:44 1994
++++ ./specs/c/minilax/Makefile Wed Aug 25 12:03:00 2004
+@@ -1,7 +1,7 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
SOURCES = Scanner.h Scanner.c Parser.h Parser.c Tree.h Tree.c \
Semantics.h Semantics.c Types.h Types.c Definitions.h Definitions.c \
-@@ -21,31 +17,31 @@
- lpp -cxzj minilax.pars;
+@@ -15,37 +15,37 @@
+ time minilax < in5
+
+ minilax: $(OBJS)
+- $(CC) $(CFLAGS) -o minilax $(OBJS) $(LIB)/libreuse.a -lm
++ $(CC) $(CFLAGS) -o minilax $(OBJS) -L $(TMPLIB) -l reuse -lm
+
+ Scanner.rpp Parser.lalr: minilax.pars
+- lpp -cxzj minilax.pars;
++ $(LPP) -cxzj minilax.pars;
minilax.rex: minilax.scan Scanner.rpp
- rpp < minilax.scan > minilax.rex;
@@ -49,7 +61,7 @@
Parser.o: Parser.h Scanner.h Tree.h Types.h Definitions.h
Semantics.o: Semantics.h Tree.h Definitions.h Types.h
-@@ -59,87 +55,85 @@
+@@ -59,87 +59,84 @@
lint $(CFLAGS) -u *.c
test: $(SOURCES)
@@ -179,12 +191,12 @@
clean:
- rm -f Scanner.? Parser.? Tree.? Semantics.? Definitions.? Types.? ICode.? *.TS
- rm -f core _Debug minilax *Tab minilax.rex Parser.lalr Scanner.rpp yy*.w *.o
-+ rm -f Scanner.? Parser.? Tree.? Semantics.? Definitions.?
-+ rm -f core _Debug minilax *Tab minilax.rex Parser.lalr
-+ rm -f Types.? ICode.? *.TS Scanner.rpp yy*.w *.o
-
+-
-.SUFFIXES: .c .o
-
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
++ -rm -f Scanner.? Parser.? Tree.? Semantics.? Definitions.?
++ -rm -f $(STDCLEAN)
++ -rm -f _Debug minilax *Tab minilax.rex Parser.lalr
++ -rm -f Types.? ICode.? *.TS Scanner.rpp yy*.w *.o
diff --git a/devel/cocktail/files/patch-specs-c-modula2-Makefile b/devel/cocktail/files/patch-specs-c-modula2-Makefile
index e07b0ebf8e71..0eefdb4521db 100644
--- a/devel/cocktail/files/patch-specs-c-modula2-Makefile
+++ b/devel/cocktail/files/patch-specs-c-modula2-Makefile
@@ -1,15 +1,22 @@
---- ../../work/cocktail-9309//./specs/c/modula2/Makefile Tue Feb 15 14:28:29 1994
-+++ ./specs/c/modula2/Makefile Wed Mar 31 23:02:48 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/modula2/Makefile Tue Feb 15 14:28:29 1994
++++ ./specs/c/modula2/Makefile Wed Aug 25 12:03:16 2004
+@@ -1,22 +1,22 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
ParserDrv: ParserDrv.o Scanner.o Parser.o
- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
-@@ -10,13 +6,13 @@
- lpp -cxzj modula.pars;
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -l reuse -o ParserDrv
+
+ Scanner.rpp Parser.lalr: modula.pars
+- lpp -cxzj modula.pars;
++ $(LPP) -cxzj modula.pars;
modula.rex: modula.scan Scanner.rpp
- rpp < modula.scan > modula.rex;
@@ -25,12 +32,15 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h
-@@ -28,7 +24,4 @@
- clean:
- rm -f core *.[hco] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
+@@ -26,9 +26,6 @@
+ lint $(CFLAGS) -b -u *.c
--.SUFFIXES: .c .o
+ clean:
+- rm -f core *.[hco] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
-
+-.SUFFIXES: .c .o
++ -rm -f $(STDCLEAN)
++ -rm -f *.[hco] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile b/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile
index d09402f0da39..053c569b177c 100644
--- a/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile
+++ b/devel/cocktail/files/patch-specs-c-modula2.ell-Makefile
@@ -1,24 +1,43 @@
---- ../../work/cocktail-9309//./specs/c/modula2.ell/Makefile Tue Feb 15 14:28:30 1994
-+++ ./specs/c/modula2.ell/Makefile Wed Mar 31 23:03:07 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/modula2.ell/Makefile Tue Feb 15 14:28:30 1994
++++ ./specs/c/modula2.ell/Makefile Wed Aug 25 12:03:11 2004
+@@ -1,35 +1,38 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
all: ParserDrv ScannerDrv
-@@ -12,7 +8,7 @@
- Parser.o: Parser.h Scanner.h
+ ParserDrv: ParserDrv.o Scanner.o Parser.o
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -l reuse -o ParserDrv
++
++ParserDrv.o: Parser.h Scanner.h ParserDrv.c
++ $(CC) $(CFLAGS) -c ParserDrv.c
+
+-ParserDrv.o: Parser.h Scanner.h
+-Parser.o: Parser.h Scanner.h
++Parser.o: Parser.h Scanner.h Parser.c
++ $(CC) $(CFLAGS) -c Parser.c
ParserDrv.c Parser.c Parser.h: modula.ell
- ell -cdip modula.ell;
+ $(ELL) -cdip modula.ell;
ScannerDrv: ScannerDrv.o Scanner.o
- $(CC) $(CFLAGS) ScannerDrv.o Scanner.o $(LIB)/libreuse.a -o ScannerDrv
-@@ -21,7 +17,7 @@
- Scanner.o: Scanner.h
+- $(CC) $(CFLAGS) ScannerDrv.o Scanner.o $(LIB)/libreuse.a -o ScannerDrv
++ $(CC) $(CFLAGS) ScannerDrv.o Scanner.o -L $(TMPLIB) -l reuse -o ScannerDrv
+
+ ScannerDrv.o: Scanner.h
+-Scanner.o: Scanner.h
++ $(CC) $(CFLAGS) -c -I$(TMPINC) ScannerDrv.c
++
++Scanner.o: Scanner.h Scanner.c
++ $(CC) $(CFLAGS) -c -I$(TMPINC) Scanner.c
ScannerDrv.c Scanner.c Scanner.h: modula.rex
- rex -csd modula.rex;
@@ -26,12 +45,13 @@
lint: ParserDrv.c Parser.c Scanner.c
lint $(CFLAGS) -b -u *.c
-@@ -29,7 +25,4 @@
- clean:
- rm -f *Drv *.[hco] core
--.SUFFIXES: .c .o
+ clean:
+- rm -f *Drv *.[hco] core
-
+-.SUFFIXES: .c .o
++ -rm -f $(STDCLEAN)
++ -rm -f *Drv *.[hco]
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-oberon2-Makefile b/devel/cocktail/files/patch-specs-c-oberon2-Makefile
index 434ce1ecd050..a117fe5fadd8 100644
--- a/devel/cocktail/files/patch-specs-c-oberon2-Makefile
+++ b/devel/cocktail/files/patch-specs-c-oberon2-Makefile
@@ -1,15 +1,22 @@
---- ../../work/cocktail-9309//./specs/c/oberon2/Makefile Tue Feb 15 14:28:41 1994
-+++ ./specs/c/oberon2/Makefile Wed Mar 31 23:04:25 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/oberon2/Makefile Tue Feb 15 14:28:41 1994
++++ ./specs/c/oberon2/Makefile Wed Aug 25 12:03:23 2004
+@@ -1,22 +1,22 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
ParserDrv: ParserDrv.o Scanner.o Parser.o
- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
-@@ -10,13 +6,13 @@
- lpp -cxzj oberon2.pars;
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -l reuse -o ParserDrv
+
+ Scanner.rpp Parser.lalr: oberon2.pars
+- lpp -cxzj oberon2.pars;
++ $(LPP) -cxzj oberon2.pars;
oberon2.rex: oberon2.scan Scanner.rpp
- rpp < oberon2.scan > oberon2.rex;
@@ -25,12 +32,15 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h
-@@ -28,7 +24,4 @@
- clean:
- rm -f ParserDrv core *.[hco] _Debug oberon2.rex Parser.lalr Scanner.rpp
+@@ -26,9 +26,6 @@
+ lint $(CFLAGS) -b -u *.c
--.SUFFIXES: .c .o
+ clean:
+- rm -f ParserDrv core *.[hco] _Debug oberon2.rex Parser.lalr Scanner.rpp
-
+-.SUFFIXES: .c .o
++ -rm -f $(STDCLEAN)
++ -rm -f ParserDrv *.[hco] _Debug oberon2.rex Parser.lalr Scanner.rpp
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-occam-Makefile b/devel/cocktail/files/patch-specs-c-occam-Makefile
index f19707e58802..ceb783685c54 100644
--- a/devel/cocktail/files/patch-specs-c-occam-Makefile
+++ b/devel/cocktail/files/patch-specs-c-occam-Makefile
@@ -1,18 +1,43 @@
---- ../../work/cocktail-9309//./specs/c/occam/Makefile Tue Feb 15 14:28:32 1994
-+++ ./specs/c/occam/Makefile Wed Mar 31 22:35:08 2004
-@@ -1,6 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/occam/Makefile Tue Feb 15 14:28:32 1994
++++ ./specs/c/occam/Makefile Wed Aug 25 12:03:33 2004
+@@ -1,6 +1,8 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
++
#
# Makefile for occam recogniser - pjmp @ hrc 22/7/86
#
-@@ -43,7 +40,4 @@
- clean:
- rm -f *.o occam2.c occam.c lex2.h lex.h Parser.h occam occam2
+@@ -19,7 +21,7 @@
+ all: occam2 occam
--.SUFFIXES: .c .o
+ occam: occam.o occamlex.o
+- $(CC) $(CFLAGS) occam.o occamlex.o $(LIB)/libreuse.a -o occam
++ $(CC) $(CFLAGS) occam.o occamlex.o -L $(TMPLIB) -l reuse -o occam
+
+ occam.c: occam.lalr
+ lalr $(LFLAGS) occam.lalr;
+@@ -27,7 +29,7 @@
+ mv Parser.c occam.c
+
+ occam2: occam2.o occam2lex.o
+- $(CC) $(CFLAGS) occam2.o occam2lex.o $(LIB)/libreuse.a -o occam2
++ $(CC) $(CFLAGS) occam2.o occam2lex.o -L $(TMPLIB) -l reuse -o occam2
+
+ occam2.c: occam2.lalr
+ lalr $(LFLAGS) occam2.lalr;
+@@ -41,9 +43,5 @@
+ time occam < test4
+
+ clean:
+- rm -f *.o occam2.c occam.c lex2.h lex.h Parser.h occam occam2
-
+-.SUFFIXES: .c .o
++ -rm -f *.o occam2.c occam.c lex2.h lex.h Parser.h occam occam2
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-sather-Makefile b/devel/cocktail/files/patch-specs-c-sather-Makefile
index 774dea40ab6c..3c8eac1c7109 100644
--- a/devel/cocktail/files/patch-specs-c-sather-Makefile
+++ b/devel/cocktail/files/patch-specs-c-sather-Makefile
@@ -1,15 +1,22 @@
---- ../../work/cocktail-9309//./specs/c/sather/Makefile Tue Feb 15 14:28:38 1994
-+++ ./specs/c/sather/Makefile Wed Mar 31 23:03:31 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/sather/Makefile Tue Feb 15 14:28:38 1994
++++ ./specs/c/sather/Makefile Wed Aug 25 12:03:39 2004
+@@ -1,22 +1,22 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
ParserDrv: ParserDrv.o Scanner.o Parser.o
- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
-@@ -10,13 +6,13 @@
- lpp -cxzj sather.pars;
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -l reuse -o ParserDrv
+
+ Scanner.rpp Parser.lalr: sather.pars
+- lpp -cxzj sather.pars;
++ $(LPP) -cxzj sather.pars;
sather.rex: sather.scan Scanner.rpp
- rpp < sather.scan > sather.rex;
@@ -25,12 +32,15 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h
-@@ -28,7 +24,4 @@
- clean:
- rm -f core *.[hco] _Debug ParserDrv sather.rex Parser.lalr Scanner.rpp
+@@ -26,9 +26,6 @@
+ lint $(CFLAGS) -b -u *.c
--.SUFFIXES: .c .o
+ clean:
+- rm -f core *.[hco] _Debug ParserDrv sather.rex Parser.lalr Scanner.rpp
-
+-.SUFFIXES: .c .o
++ -rm -f $(STDCLEAN)
++ -rm -f *.[hco] _Debug ParserDrv sather.rex Parser.lalr Scanner.rpp
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-sql-Makefile b/devel/cocktail/files/patch-specs-c-sql-Makefile
index 79a3aaeaac3f..ab3d51d77f33 100644
--- a/devel/cocktail/files/patch-specs-c-sql-Makefile
+++ b/devel/cocktail/files/patch-specs-c-sql-Makefile
@@ -1,15 +1,22 @@
---- ../../work/cocktail-9309//./specs/c/sql/Makefile Tue Feb 15 14:28:39 1994
-+++ ./specs/c/sql/Makefile Wed Mar 31 23:03:58 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/sql/Makefile Tue Feb 15 14:28:39 1994
++++ ./specs/c/sql/Makefile Wed Aug 25 12:03:45 2004
+@@ -1,22 +1,22 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
ParserDrv: ParserDrv.o Scanner.o Parser.o
- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
-@@ -10,13 +6,13 @@
- lpp -cxzj sql.pars;
+- $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o $(LIB)/libreuse.a -o ParserDrv
++ $(CC) $(CFLAGS) ParserDrv.o Scanner.o Parser.o -L $(TMPLIB) -l reuse -o ParserDrv
+
+ Scanner.rpp Parser.lalr: sql.pars
+- lpp -cxzj sql.pars;
++ $(LPP) -cxzj sql.pars;
sql.rex: sql.scan Scanner.rpp
- rpp < sql.scan > sql.rex;
@@ -25,12 +32,15 @@
ParserDrv.o: Parser.h Scanner.h
Parser.o: Parser.h Scanner.h
-@@ -28,7 +24,4 @@
- clean:
- rm -f ParserDrv core *.[hco] _Debug sql.rex Parser.lalr Scanner.rpp
+@@ -26,9 +26,6 @@
+ lint $(CFLAGS) -b -u *.c
--.SUFFIXES: .c .o
+ clean:
+- rm -f ParserDrv core *.[hco] _Debug sql.rex Parser.lalr Scanner.rpp
-
+-.SUFFIXES: .c .o
++ -rm -f $(STDCLEAN)
++ -rm -f ParserDrv *.[hco] _Debug sql.rex Parser.lalr Scanner.rpp
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-c-wag-Makefile b/devel/cocktail/files/patch-specs-c-wag-Makefile
index 36734ab0b3f8..15bf4689e194 100644
--- a/devel/cocktail/files/patch-specs-c-wag-Makefile
+++ b/devel/cocktail/files/patch-specs-c-wag-Makefile
@@ -1,14 +1,18 @@
---- ../../work/cocktail-9309//./specs/c/wag/Makefile Tue Feb 15 14:28:50 1994
-+++ ./specs/c/wag/Makefile Wed Mar 31 23:07:19 2004
-@@ -1,7 +1,3 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/c/wag/Makefile Tue Feb 15 14:28:50 1994
++++ ./specs/c/wag/Makefile Wed Aug 25 12:03:56 2004
+@@ -1,7 +1,7 @@
-LIB = $(HOME)/lib
-INCDIR = $(LIB)/include
-CFLAGS = -I$(INCDIR)
-CC = cc
++ROOTDIR= ../../..
++.include "../../Makefile.inc"
++
++CFLAGS = $(TCFLAGS) -I $(TMPINC)
SOURCES = Scanner.h Scanner.c Parser.h Parser.c Tree.h Tree.c Semantics.h Semantics.c \
Types.h Types.c ICode.h ICode.c ICodeInter.h ICodeInter.c minilax.c
-@@ -9,8 +5,8 @@
+@@ -9,38 +9,38 @@
OBJS = minilax.o Scanner.o Parser.o Tree.o Types.o Semantics.o ICode.o ICodeInter.o
all: minilax
@@ -18,9 +22,12 @@
+ time ./minilax < in1
minilax: $(OBJS)
- $(CC) $(CFLAGS) -o minilax $(OBJS) $(LIB)/libreuse.a -lm
-@@ -19,28 +15,28 @@
- lpp -cxzj minilax.pars;
+- $(CC) $(CFLAGS) -o minilax $(OBJS) $(LIB)/libreuse.a -lm
++ $(CC) $(CFLAGS) -o minilax $(OBJS) -L $(TMPLIB) -l reuse -lm
+
+ Scanner.rpp Parser.lalr: minilax.pars
+- lpp -cxzj minilax.pars;
++ $(LPP) -cxzj minilax.pars;
minilax.rex: minilax.scan Scanner.rpp
- rpp < minilax.scan > minilax.rex;
@@ -56,7 +63,7 @@
Scanner.o: Scanner.h
Parser.o: Parser.h Tree.h Scanner.h
-@@ -54,36 +50,34 @@
+@@ -54,36 +54,34 @@
lint $(CFLAGS) -u *.c
test: $(SOURCES)
@@ -99,12 +106,13 @@
clean:
- rm -f Scanner.? Parser.? Tree.? Semantics.? Types.? ICode.? *.TS yy*.w *.o
-+ rm -f Scanner.? Parser.? Tree.? Semantics.?
-+ rm -f Types.? ICode.? *.TS yy*.w *.o
- rm -f core _Debug minilax *Tab minilax.rex Parser.lalr Scanner.rpp
-
--.SUFFIXES: .c .o
+- rm -f core _Debug minilax *Tab minilax.rex Parser.lalr Scanner.rpp
-
+-.SUFFIXES: .c .o
++ -rm -f Scanner.? Parser.? Tree.? Semantics.?
++ -rm -f Types.? ICode.? *.TS yy*.w *.o
++ -rm -f $(STDCLEAN)
++ -rm -f _Debug minilax *Tab minilax.rex Parser.lalr Scanner.rpp
+
-.c.o:
- $(CC) $(CFLAGS) -c $*.c
-+.include "../../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-ada-Makefile b/devel/cocktail/files/patch-specs-modula-ada-Makefile
index 24d97bc8601a..55a508bbbe0e 100644
--- a/devel/cocktail/files/patch-specs-modula-ada-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-ada-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/ada/Makefile Tue Feb 15 14:28:56 1994
-+++ ./specs/modula/ada/Makefile Wed Mar 31 23:07:56 2004
-@@ -7,14 +7,16 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/ada/Makefile Tue Feb 15 14:28:56 1994
++++ ./specs/modula/ada/Makefile Wed Aug 25 11:42:24 2004
+@@ -7,14 +7,17 @@
lpp -xzj ada.pars;
ada.rex: ada.scan Scanner.rpp
@@ -16,7 +16,10 @@
+ $(LALR) -d -p -cs Parser.lalr;
clean:
- rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
- rm -f core *.[dimor] _Debug ada.rex Parser.lalr Scanner.rpp *.bak
+- rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
+- rm -f core *.[dimor] _Debug ada.rex Parser.lalr Scanner.rpp *.bak
++ -rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] _Debug ada.rex Parser.lalr Scanner.rpp *.bak
+
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-minilax-Makefile b/devel/cocktail/files/patch-specs-modula-minilax-Makefile
index c82492b170a9..1759bb053154 100644
--- a/devel/cocktail/files/patch-specs-modula-minilax-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-minilax-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/minilax/Makefile Tue Feb 15 14:29:06 1994
-+++ ./specs/modula/minilax/Makefile Wed Mar 31 23:11:28 2004
-@@ -15,97 +15,98 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/minilax/Makefile Tue Feb 15 14:29:06 1994
++++ ./specs/modula/minilax/Makefile Wed Aug 25 11:42:24 2004
+@@ -15,97 +15,99 @@
lpp -xzj minilax.pars;
minilax.rex: minilax.scan Scanner.rpp
@@ -148,6 +148,9 @@
+ $(CG) -IK9Z minilax.cg; make minilax; minilax < in1
clean:
- rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Definitions.m? Types.m? ICode.m?
- rm -f core *.TS *.bak *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
+- rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Definitions.m? Types.m? ICode.m?
+- rm -f core *.TS *.bak *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
++ -rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Definitions.m? Types.m? ICode.m?
++ -rm -f $(STDCLEAN)
++ -rm -f *.TS *.bak *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-modula2-Makefile b/devel/cocktail/files/patch-specs-modula-modula2-Makefile
index e6a3edd15bb4..093575567b10 100644
--- a/devel/cocktail/files/patch-specs-modula-modula2-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-modula2-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/modula2/Makefile Tue Feb 15 14:28:58 1994
-+++ ./specs/modula/modula2/Makefile Wed Mar 31 23:08:24 2004
-@@ -10,14 +10,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/modula2/Makefile Tue Feb 15 14:28:58 1994
++++ ./specs/modula/modula2/Makefile Wed Aug 25 11:42:24 2004
+@@ -10,14 +10,16 @@
lpp -xzj modula.pars;
modula.rex: modula.scan Scanner.rpp
@@ -16,6 +16,9 @@
+ $(LALR) -d -p Parser.lalr;
clean:
- rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
- rm -f core *.[dimor] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
+- rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
+- rm -f core *.[dimor] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
++ -rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] _Debug ParserDrv modula.rex Parser.lalr Scanner.rpp
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile b/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile
index 8bd1cff9784c..54abdf1bf389 100644
--- a/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-modula2.ell-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/modula2.ell/Makefile Tue Feb 15 14:29:00 1994
-+++ ./specs/modula/modula2.ell/Makefile Wed Mar 31 23:08:43 2004
-@@ -5,10 +5,11 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/modula2.ell/Makefile Tue Feb 15 14:29:00 1994
++++ ./specs/modula/modula2.ell/Makefile Wed Aug 25 11:42:24 2004
+@@ -5,10 +5,12 @@
echo p ParserDrv | mc
Scanner.md Scanner.mi ScannerDrv.mi: modula.rex
@@ -12,5 +12,7 @@
+ $(ELL) -dip modula.ell;
clean:
- rm -f *Drv *.m? *.[dimor] _Debug core *.bak
+- rm -f *Drv *.m? *.[dimor] _Debug core *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *Drv *.m? *.[dimor] _Debug *.bak
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-modula3-Makefile b/devel/cocktail/files/patch-specs-modula-modula3-Makefile
index d978263e1db8..f32f03f4f22b 100644
--- a/devel/cocktail/files/patch-specs-modula-modula3-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-modula3-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/modula3/Makefile Tue Feb 15 14:29:02 1994
-+++ ./specs/modula/modula3/Makefile Wed Mar 31 23:09:06 2004
-@@ -8,14 +8,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/modula3/Makefile Tue Feb 15 14:29:02 1994
++++ ./specs/modula/modula3/Makefile Wed Aug 25 11:42:24 2004
+@@ -8,14 +8,16 @@
lpp -xzj modula3.pars;
modula3.rex: modula3.scan Scanner.rpp
@@ -16,6 +16,9 @@
+ $(LALR) -d -p Parser.lalr;
clean:
- rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
- rm -f core *.[dimor] _Debug ParserDrv modula3.rex Parser.lalr Scanner.rpp
+- rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
+- rm -f core *.[dimor] _Debug ParserDrv modula3.rex Parser.lalr Scanner.rpp
++ -rm -f Scanner.m? Parser.m? ParserDrv.mi *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] _Debug ParserDrv modula3.rex Parser.lalr Scanner.rpp
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-oberon-Makefile b/devel/cocktail/files/patch-specs-modula-oberon-Makefile
index 7fb7f91e4d75..798302702bba 100644
--- a/devel/cocktail/files/patch-specs-modula-oberon-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-oberon-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/oberon/Makefile Tue Feb 15 14:29:03 1994
-+++ ./specs/modula/oberon/Makefile Wed Mar 31 23:09:51 2004
-@@ -8,14 +8,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/oberon/Makefile Tue Feb 15 14:29:03 1994
++++ ./specs/modula/oberon/Makefile Wed Aug 25 11:42:24 2004
+@@ -8,14 +8,16 @@
lpp -xzj oberon.pars;
oberon.rex: oberon.scan Scanner.rpp
@@ -16,6 +16,9 @@
+ $(LALR) -d -p Parser.lalr;
clean:
- rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
- rm -f core *.[dimor] _Debug oberon.rex Parser.lalr Scanner.rpp *.bak
+- rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
+- rm -f core *.[dimor] _Debug oberon.rex Parser.lalr Scanner.rpp *.bak
++ -rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] _Debug oberon.rex Parser.lalr Scanner.rpp *.bak
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-pascal-Makefile b/devel/cocktail/files/patch-specs-modula-pascal-Makefile
index 64e14e8f6439..048988d759b8 100644
--- a/devel/cocktail/files/patch-specs-modula-pascal-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-pascal-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/pascal/Makefile Tue Feb 15 14:29:04 1994
-+++ ./specs/modula/pascal/Makefile Wed Mar 31 23:10:16 2004
-@@ -8,14 +8,15 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/pascal/Makefile Tue Feb 15 14:29:04 1994
++++ ./specs/modula/pascal/Makefile Wed Aug 25 11:42:24 2004
+@@ -8,14 +8,16 @@
lpp -xzj pascal.pars;
pascal.rex: pascal.scan Scanner.rpp
@@ -16,6 +16,9 @@
+ $(LALR) -d -p Parser.lalr;
clean:
- rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
- rm -f core *.[dimor] _Debug pascal.rex Parser.lalr Scanner.rpp *.bak
+- rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
+- rm -f core *.[dimor] _Debug pascal.rex Parser.lalr Scanner.rpp *.bak
++ -rm -f Scanner.m? Parser.m? ParserDrv.mi ParserDrv
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] _Debug pascal.rex Parser.lalr Scanner.rpp *.bak
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-specs-modula-wag-Makefile b/devel/cocktail/files/patch-specs-modula-wag-Makefile
index 609e2f33bd4e..414cf49a178b 100644
--- a/devel/cocktail/files/patch-specs-modula-wag-Makefile
+++ b/devel/cocktail/files/patch-specs-modula-wag-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./specs/modula/wag/Makefile Tue Feb 15 14:29:10 1994
-+++ ./specs/modula/wag/Makefile Wed Mar 31 23:13:13 2004
-@@ -18,29 +18,30 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./specs/modula/wag/Makefile Tue Feb 15 14:29:10 1994
++++ ./specs/modula/wag/Makefile Wed Aug 25 11:42:24 2004
+@@ -18,29 +18,31 @@
lpp -xzj minilax.pars;
minilax.rex: minilax.scan Scanner.rpp
@@ -36,6 +36,9 @@
+ $(PUMA) -di ICode.puma;
clean:
- rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Types.m? ICode.m? *.TS *.bak
- rm -f core *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
+- rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Types.m? ICode.m? *.TS *.bak
+- rm -f core *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
++ -rm -f Scanner.m? Parser.m? Tree.m? Semantics.m? Types.m? ICode.m? *.TS *.bak
++ -rm -f $(STDCLEAN)
++ -rm -f *.[dimor] _Debug minilax minilax.rex Parser.lalr Scanner.rpp
+.include "../../Makefile.inc"
diff --git a/devel/cocktail/files/patch-y2l-src-Makefile b/devel/cocktail/files/patch-y2l-src-Makefile
index c2c49d11969b..a9da56357d53 100644
--- a/devel/cocktail/files/patch-y2l-src-Makefile
+++ b/devel/cocktail/files/patch-y2l-src-Makefile
@@ -1,6 +1,6 @@
---- ../../work/cocktail-9309//./y2l/src/Makefile Tue Feb 15 14:29:16 1994
-+++ ./y2l/src/Makefile Wed Mar 31 23:13:47 2004
-@@ -1,26 +1,28 @@
+--- /usr/ports/devel/cocktail/work/cocktail-9309//./y2l/src/Makefile Tue Feb 15 14:29:16 1994
++++ ./y2l/src/Makefile Thu Aug 5 18:48:36 2004
+@@ -1,35 +1,35 @@
-BIN = $(HOME)/bin
-OPT = -O
-CC = cc
@@ -38,7 +38,18 @@
lint: y2l.c Parser.c Scanner.c Tables.c
lint -I$(REUSE) -b -u *.c
-@@ -43,7 +45,3 @@
+
+ clean:
+- rm -f core *.o y2l
+-
+-CLEAN: clean
+- rm -f $(SOURCES)
++ -rm -f $(STDCLEAN)
++ -rm -f y2l Scanner.[hc] Parser.[hc]
+
+ # dependencies
+
+@@ -43,7 +43,3 @@
man:
nroff -man y2l.1
diff --git a/devel/cocktail/files/patch-y2l-src-Scanner.c b/devel/cocktail/files/patch-y2l-src-Scanner.c
deleted file mode 100644
index ce5be7d217aa..000000000000
--- a/devel/cocktail/files/patch-y2l-src-Scanner.c
+++ /dev/null
@@ -1,158 +0,0 @@
---- ../../work/cocktail-9309//./y2l/src/Scanner.c Tue Feb 15 14:29:16 1994
-+++ ./y2l/src/Scanner.c Wed Mar 31 23:32:57 2004
-@@ -1,4 +1,4 @@
--/* $Id: Scanner.c,v 2.20 1993/08/31 14:47:10 grosch rel $ */
-+/* $Id: Scanner.c,v 2.19 1993/08/18 17:28:53 grosch rel $ */
-
- # define bool char
- # define true 1
-@@ -78,8 +78,7 @@
- tScanAttribute Attribute ;
- void (* Scanner_Exit) () = yyExit;
-
--static yyCombType yyComb [yyTableSize + 1] = {
--{0, 0},
-+static yyCombType yyComb [yyTableSize + 1] = {{1, 0},
- {0, 0},
- {0, 0},
- {0, 0},
-@@ -2503,7 +2502,7 @@
- {0, 0},
- {0, 0},
- };
--static yyCombType * yyBasePtr [yyDStateCount + 1] = { 0,
-+static yyCombType * yyBasePtr [yyDStateCount + 1] = {& yyComb [0],
- & yyComb [0],
- & yyComb [0],
- & yyComb [125],
-@@ -2658,7 +2657,7 @@
- & yyComb [201],
- & yyComb [0],
- };
--static yyStateRange yyDefault [yyDStateCount + 1] = { 0,
-+static yyStateRange yyDefault [yyDStateCount + 1] = {0,
- 28,
- 1,
- 19,
-@@ -2813,7 +2812,7 @@
- 59,
- 0,
- };
--static yyStateRange yyEobTrans [yyDStateCount + 1] = { 0,
-+static yyStateRange yyEobTrans [yyDStateCount + 1] = {0,
- 0,
- 0,
- 49,
-@@ -2969,27 +2968,21 @@
- 0,
- };
-
--static yyStateRange yyInitStateStack [yyInitBufferSize] = {yyDefaultState};
-+static yyStateRange yyInitStateStack [yyInitBufferSize] = {0};
- static yyStateRange * yyStateStack = yyInitStateStack;
- static unsigned long yyStateStackSize= yyInitBufferSize;
--static yyStateRange yyStartState = STD;
--static yyStateRange yyPreviousStart = STD;
-+static yyStateRange yyStartState = 0;
-+static yyStateRange yyPreviousStart = 1;
-
--static unsigned char yyInitChBuffer [yyInitBufferSize] = {
-- '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
-- '\0', '\0', '\0', '\0', '\0', '\0', '\0', yyEolCh,
-- yyEobCh, '\0',
--};
--static short yySourceFile = StdIn;
--static bool yyIsFirstCall = true;
--static bool yyEof = false;
--static unsigned char * yyChBufferPtr = yyInitChBuffer;
--static unsigned char * yyChBufferStart = & yyInitChBuffer [16];
--static unsigned long yyChBufferSize = yyInitBufferSize;
--static unsigned char * yyChBufferIndex = & yyInitChBuffer [16];
--static int yyBytesRead = 0;
--static int yyLineCount = 1;
--static unsigned char * yyLineStart = & yyInitChBuffer [16 - 1];
-+static short yySourceFile ;
-+static bool yyEof ;
-+static unsigned char * yyChBufferPtr ;
-+static unsigned char * yyChBufferStart ;
-+static unsigned long yyChBufferSize ;
-+static unsigned char * yyChBufferIndex = ((unsigned char *) yyComb) + 2; /* dirty trick */
-+static int yyBytesRead ;
-+static int yyLineCount ;
-+static unsigned char * yyLineStart ;
-
- static struct {
- short yySourceFile ;
-@@ -3001,7 +2994,7 @@
- int yyBytesRead ;
- int yyLineCount ;
- unsigned char * yyLineStart ;
-- } yyFileStack [yyFileStackSize + 1], * yyFileStackPtr = & yyFileStack [1];
-+ } yyFileStack [yyFileStackSize + 1], * yyFileStackPtr = yyFileStack;
-
- static unsigned char yyToLower [] = {
- '\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7',
-@@ -3061,6 +3054,7 @@
- '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
- };
-
-+static void yyInitialize ();
- static void yyErrorMessage ARGS((int yyErrorCode));
- static char input ();
- /* line 29 "yacc.rex" */
-@@ -3691,7 +3685,9 @@
- }
- goto yyBegin;
-
-- case yyDNoState:
-+ case yyDNoState: /* automatic initialization */
-+ yyInitialize ();
-+ yySourceFile = StdIn;
- goto yyBegin;
-
- case 60:
-@@ -3766,6 +3762,18 @@
- }
- }
-
-+void BeginFile
-+# if defined __STDC__ | defined __cplusplus
-+ (char * yyFileName)
-+# else
-+ (yyFileName) char * yyFileName;
-+# endif
-+ {
-+ yyInitialize ();
-+ yySourceFile = BeginSource (yyFileName);
-+ if (yySourceFile < 0) yyErrorMessage (4);
-+ }
-+
- static void yyInitialize ()
- {
- if (yyFileStackPtr >= yyFileStack + yyFileStackSize) yyErrorMessage (2);
-@@ -3792,23 +3800,8 @@
- yyBytesRead = 0;
- yyLineCount = 1;
- yyLineStart = & yyChBufferStart [-1];
-- }
--
--void BeginFile
--# if defined __STDC__ | defined __cplusplus
-- (char * yyFileName)
--# else
-- (yyFileName) char * yyFileName;
--# endif
-- {
-- if (yyIsFirstCall) {
-- ReleaseArray ((char * *) & yyChBufferPtr, & yyChBufferSize, sizeof (char));
-- yyFileStackPtr --;
-- yyIsFirstCall = false;
-- }
-- yyInitialize ();
-- yySourceFile = BeginSource (yyFileName);
-- if (yySourceFile < 0) yyErrorMessage (4);
-+ if (yyStartState == 0) yyStartState = STD;
-+ yyStateStack [0] = yyDefaultState; /* stack underflow sentinel */
- }
-
- void CloseFile ()