summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorwulf <wulf@pkgsrc.org>2000-07-25 12:44:33 +0000
committerwulf <wulf@pkgsrc.org>2000-07-25 12:44:33 +0000
commit21fd1afdfbf45d752a0d6dd30dffb897974400b9 (patch)
tree87950231c456fcec2a9660c52280a2ac5b3855c3 /lang
parentc50ee366cd6198a5260ebb574b96375a17f8b990 (diff)
downloadpkgsrc-21fd1afdfbf45d752a0d6dd30dffb897974400b9.tar.gz
Initial commit of baci-20000725, Ben-Ari Concurrent Interpreter
Diffstat (limited to 'lang')
-rw-r--r--lang/baci/Makefile31
-rw-r--r--lang/baci/files/md54
-rw-r--r--lang/baci/files/patch-sum7
-rw-r--r--lang/baci/patches/patch-aa48
-rw-r--r--lang/baci/patches/patch-ab24
-rw-r--r--lang/baci/patches/patch-ac13
-rw-r--r--lang/baci/patches/patch-ad13
-rw-r--r--lang/baci/patches/patch-ae19
-rw-r--r--lang/baci/pkg/COMMENT1
-rw-r--r--lang/baci/pkg/DESCR14
-rw-r--r--lang/baci/pkg/PLIST12
11 files changed, 186 insertions, 0 deletions
diff --git a/lang/baci/Makefile b/lang/baci/Makefile
new file mode 100644
index 00000000000..c82246a213d
--- /dev/null
+++ b/lang/baci/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/07/25 12:44:33 wulf Exp $
+#
+
+DISTNAME= bacisrc
+PKGNAME= baci-20000725
+CATEGORIES= lang
+MASTER_SITES= http://www.mines.edu/fs_home/tcamp/baci/
+DISTFILES= bacisrc.tar.gz \
+ bacidoc.tar.gz
+
+MAINTAINER= wulf@netbsd.org
+HOMEPAGE= http://www.mines.edu/fs_home/tcamp/baci/
+
+PLIST_SRC= ${WRKDIR}/PLIST
+
+do-build:
+ cd ${WRKSRC}/ccomp && ${MAKE}
+ cd ${WRKSRC}/disasm && ${MAKE}
+ cd ${WRKSRC}/interp && ${MAKE}
+ cd ${WRKSRC}/pascomp && ${MAKE}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/ccomp/bacc ${LOCALBASE}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/disasm/badis ${LOCALBASE}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/interp/bainterp ${LOCALBASE}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/pascomp/bapas ${LOCALBASE}/bin
+ ${MKDIR} ${LOCALBASE}/share/doc/baci
+ ${CP} ${WRKDIR}/bacidoc/* ${LOCALBASE}/share/doc/baci
+ ${CP} ${PKGDIR}/PLIST ${WRKDIR}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/baci/files/md5 b/lang/baci/files/md5
new file mode 100644
index 00000000000..c84d8938d94
--- /dev/null
+++ b/lang/baci/files/md5
@@ -0,0 +1,4 @@
+$NetBSD: md5,v 1.1.1.1 2000/07/25 12:44:35 wulf Exp $
+
+MD5 (bacisrc.tar.gz) = 2077757a7c130b7c49e0f1f0b49028fc
+MD5 (bacidoc.tar.gz) = 622617e8c63edda29fef3147e24dd01b
diff --git a/lang/baci/files/patch-sum b/lang/baci/files/patch-sum
new file mode 100644
index 00000000000..f6d127ee6cf
--- /dev/null
+++ b/lang/baci/files/patch-sum
@@ -0,0 +1,7 @@
+$NetBSD: patch-sum,v 1.1.1.1 2000/07/25 12:44:35 wulf Exp $
+
+MD5 (patch-aa) = 47f2d8373900834b02af3f1dda2ba902
+MD5 (patch-ab) = 2c65aabdf4e6d1bec4fefcc5a2e69b8d
+MD5 (patch-ac) = 57be9cf4a54d21f9846419ab11e44309
+MD5 (patch-ad) = be0fc8a4851824107436b1d654514208
+MD5 (patch-ae) = 8fc29789339c117fbad0272ff84b19a3
diff --git a/lang/baci/patches/patch-aa b/lang/baci/patches/patch-aa
new file mode 100644
index 00000000000..d5108f4bfb1
--- /dev/null
+++ b/lang/baci/patches/patch-aa
@@ -0,0 +1,48 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/07/25 12:44:34 wulf Exp $
+
+--- interp/bainterp.c.orig Mon Jul 24 00:24:03 2000
++++ interp/bainterp.c Mon Jul 24 00:25:36 2000
+@@ -240,8 +240,8 @@
+ else {
+ ptab[curpr].t--;
+ h2 = PMAXP1; /* code like chooseproc */
+- h3 = random(h2);
+- h4 = 1 + random(PMAX);
++ h3 = __random(h2);
++ h4 = 1 + __random(PMAX);
+ while (( h2 >= 0 ) && (ptab[h3].suspend != h1 )){
+ h3 = (h3+h4) % (PMAXP1);
+ h2--;
+@@ -294,8 +294,8 @@
+ else { /* semaphore was initialized */
+ ptab[curpr].monitor = 0;
+ h2 = PMAXP1;
+- h3 = random(h2);
+- h5 = 1 + random(PMAX);
++ h3 = __random(h2);
++ h5 = 1 + __random(PMAX);
+ while ((h2 >= 0) &&
+ ((ptab[h3].monitor != h4) || (ptab[h3].suspend >= 0 ))){
+ h3 = (h3 + h5) % (PMAXP1);
+@@ -319,8 +319,8 @@
+ ptab[curpr].active = 0;
+ stepcount = 0;
+ h2 = PMAXP1;
+- h3 = random(h2);
+- h5 = 1 + random(PMAX);
++ h3 = __random(h2);
++ h5 = 1 + __random(PMAX);
+ while ((h2 >= 0) &&
+ ((ptab[h3].monitor != h4) || (ptab[h3].suspend >=0 ))){
+ h3 = (h3 + h5) % (PMAXP1);
+@@ -339,8 +339,8 @@
+ else { /* monitor sem was OK */
+ h1 = s[ptab[curpr].t];
+ ptab[curpr].t--;
+- h3 = random(PMAXP1);
+- h6 = 1 + random(PMAX);
++ h3 = __random(PMAXP1);
++ h6 = 1 + __random(PMAX);
+ h5 = 0;
+ minprior = MAXPRIO;
+ for (h2 = 0; h2 <= PMAX; h2++) {
diff --git a/lang/baci/patches/patch-ab b/lang/baci/patches/patch-ab
new file mode 100644
index 00000000000..61663648a4f
--- /dev/null
+++ b/lang/baci/patches/patch-ab
@@ -0,0 +1,24 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/07/25 12:44:34 wulf Exp $
+
+--- interp/baiutils.c.orig Mon Jul 24 00:25:52 2000
++++ interp/baiutils.c Mon Jul 24 00:26:49 2000
+@@ -171,8 +171,8 @@
+
+ d = PMAXP1;
+ suspended = active = 0;
+- look = random(PMAXP1);
+- add = 1 + random(PMAX); /* 1 <= add <= PMAXP1 */
++ look = __random(PMAXP1);
++ add = 1 + __random(PMAX); /* 1 <= add <= PMAXP1 */
+ while ( ((!ptab[look].active) || (ptab[look].suspend>=0) ||
+ (ptab[look].tabix < 0)) && (d >= 0) ){
+ /* keep looking until a called process that is active and not
+@@ -189,7 +189,7 @@
+ ps = deadlock;
+ }
+ else {
+- stepcount = random(STEPMAXP1);
++ stepcount = __random(STEPMAXP1);
+ if (ptab[curpr].atomic){
+ if (ptab[curpr].suspend >= 0) {
+ ps = deadlock;
diff --git a/lang/baci/patches/patch-ac b/lang/baci/patches/patch-ac
new file mode 100644
index 00000000000..d399a23e342
--- /dev/null
+++ b/lang/baci/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/07/25 12:44:34 wulf Exp $
+
+--- interp/random.c.orig Mon Jul 24 00:23:32 2000
++++ interp/random.c Mon Jul 24 00:23:39 2000
+@@ -65,7 +65,7 @@
+ useed = temp+seed; /* start user somewhere else */
+ }
+
+-unsigned int random(range)
++unsigned int __random(range)
+ unsigned int range;
+ /* returns a pseudo-random unsigned int between 0 and 'range' - 1 */
+ {
diff --git a/lang/baci/patches/patch-ad b/lang/baci/patches/patch-ad
new file mode 100644
index 00000000000..a773a6f5819
--- /dev/null
+++ b/lang/baci/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/07/25 12:44:34 wulf Exp $
+
+--- interp/random.h.orig Mon Jul 24 00:18:41 2000
++++ interp/random.h Mon Jul 24 00:19:01 2000
+@@ -18,7 +18,7 @@
+ /* strand(); */
+ /* returns a randomly distributed 'random' real between 0 & 2^31 -1 */
+
+-extern unsigned random();
++extern unsigned __random();
+ /* random(range); */
+ /* returns a 'randomly' chosen integer between 0 and 'range' - 1 */
+
diff --git a/lang/baci/patches/patch-ae b/lang/baci/patches/patch-ae
new file mode 100644
index 00000000000..21ed409c7c5
--- /dev/null
+++ b/lang/baci/patches/patch-ae
@@ -0,0 +1,19 @@
+$NetBSD: patch-ae,v 1.1.1.1 2000/07/25 12:44:34 wulf Exp $
+
+--- disasm/badautil.c.orig Sun Jul 23 23:42:23 2000
++++ disasm/badautil.c Sun Jul 23 23:49:07 2000
+@@ -213,13 +213,12 @@
+ level--;
+ }
+
+-char buf[BUFSIZE];
+-
+ void show_line(FILE* f, int* cur_ifile)
+ /* write the source file line inputfile[*cur_ifile].line_no to */
+ /* file 'f', indicating the proper file include level. */
+ {
+ int i;
++ char buf[BUFSIZE];
+
+ for (i = 0; i< level; i++) fputc('>',f);
+ fgets(buf,BUFSIZE,inputfile[*cur_ifile].f);
diff --git a/lang/baci/pkg/COMMENT b/lang/baci/pkg/COMMENT
new file mode 100644
index 00000000000..a422117d53d
--- /dev/null
+++ b/lang/baci/pkg/COMMENT
@@ -0,0 +1 @@
+Ben-Ari Concurrent Interpreter
diff --git a/lang/baci/pkg/DESCR b/lang/baci/pkg/DESCR
new file mode 100644
index 00000000000..ecf8bb7fc51
--- /dev/null
+++ b/lang/baci/pkg/DESCR
@@ -0,0 +1,14 @@
+BACI stands for Ben-Ari Concurrent Interpreter. The compiler and interpreter
+originally were procedures in a program written by M. Ben-Ari, based on the
+original Pascal compiler by Niklaus Wirth. The original version of the BACI
+compiler and interpreter was created from that source code and was hosted on
+a PRIME mainframe. After several modifications and additions, this version
+was ported to a PC version in Turbo Pascal, to Sun Pascal, and to C. Finally,
+the compiler and interpreter were split into two seperate programs.
+
+Recently, a C-- compiler has been added to the BACI suite of programs to
+compile source programs written in a restricted dialect of C++ into PCODE
+object code executable by the interpreter. Compared with other concurrent
+languages, BACI offers a variety of synchronization techniques with a
+syntax that is usually familiar. Any experienced C or Pascal programmer could
+use BACI within hours.
diff --git a/lang/baci/pkg/PLIST b/lang/baci/pkg/PLIST
new file mode 100644
index 00000000000..629befbdab0
--- /dev/null
+++ b/lang/baci/pkg/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/07/25 12:44:35 wulf Exp $
+bin/bacc
+bin/badis
+bin/bainterp
+bin/bapas
+share/doc/baci/cmimi.ps
+share/doc/baci/cmimi.tex
+share/doc/baci/disasm.ps
+share/doc/baci/disasm.tex
+share/doc/baci/guidepas.ps
+share/doc/baci/guidepas.tex
+@dirrm share/doc/baci