Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

7
lang/sr/DESCR Normal file
View File

@@ -0,0 +1,7 @@
This is the language SR from the University of Arizona.
SR is described in "The SR Programming Language: Concurrency in Practice"
by Gregory R. Andrews and Ronald A. Olsson (Benjamin/Cummings, 1993, ISBN
0-8053-0088-0). Information about concurrent programming in general can be
found in "Concurrent Programming: Principles and Practice" by Gregory R.
Andrews (Benjamin/Cummings, 1991, ISBN 0-8053-0086-4).

40
lang/sr/Makefile Normal file
View File

@@ -0,0 +1,40 @@
# $NetBSD: Makefile,v 1.24 2012/10/21 20:56:54 cheusov Exp $
#
DISTNAME= sr233
PKGNAME= sr-2.3.3
PKGREVISION= 9
CATEGORIES= lang parallel
MASTER_SITES= ftp://ftp.cs.arizona.edu/sr/
EXTRACT_SUFX= .tar.Z
MAINTAINER= is@NetBSD.org
HOMEPAGE= http://www.cs.arizona.edu/sr/
COMMENT= The SR language compiler and run time system
NOT_FOR_PLATFORM= *-*-x86_64 # site: "doesn't run on 64-bit/AMD64"
CONFLICTS+= srm-[0-9]* clearsilver-base-[0-9]* netramet-[0-9]*
MAKE_JOBS_SAFE= no
USE_TOOLS+= yacc
WRKSRC= ${WRKDIR}
TEST_TARGET= verify
AUTO_MKDIRS= yes
SUBST_CLASSES+= sr
SUBST_STAGE.sr= pre-configure
SUBST_FILES.sr= Configuration
SUBST_SED.sr= -e 's,_LOCALBASE_,${LOCALBASE},g'
SUBST_SED.sr+= -e 's,_WRKSRC_,${WRKSRC},g'
SUBST_SED.sr+= -e 's,_XINC_,${X11BASE}/include,g'
SUBST_SED.sr+= -e 's,_XLIB_,${X11BASE}/lib,g'
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/csw/cstest ${DESTDIR}${PREFIX}/bin
cd ${WRKSRC}/ps && ${INSTALL_DATA} *.ps ${DESTDIR}${PREFIX}/share/doc/sr
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

59
lang/sr/PLIST Normal file
View File

@@ -0,0 +1,59 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:03:41 joerg Exp $
bin/ccr2sr
bin/csp2sr
bin/cstest
bin/m2sr
bin/sr
bin/srgrind
bin/srl
bin/srlatex
bin/srm
bin/srprof
bin/srtex
lib/sr/SRWin.impl
lib/sr/SRWin.o
lib/sr/SRWin.spec
lib/sr/SRanimator.impl
lib/sr/SRanimator.o
lib/sr/SRanimator.spec
lib/sr/SRgetopt.impl
lib/sr/SRgetopt.o
lib/sr/SRgetopt.spec
lib/sr/ccr2sr.h
lib/sr/csp2sr.h
lib/sr/m2sr.h
lib/sr/sr-mode.el
lib/sr/sr.h
lib/sr/srlatex.sty
lib/sr/srlib.a
lib/sr/srmap
lib/sr/srmulti.h
lib/sr/srwin.o
lib/sr/srx
man/man1/ccr2sr.1
man/man1/csp2sr.1
man/man1/m2sr.1
man/man1/sr.1
man/man1/srgrind.1
man/man1/srl.1
man/man1/srlatex.1
man/man1/srm.1
man/man1/srprof.1
man/man1/srtex.1
man/man3/sranimator.3
man/man3/srgetopt.3
man/man3/srwin.3
man/man5/srmap.5
man/man5/srtrace.5
share/doc/sr/impl.ps
share/doc/sr/install.ps
share/doc/sr/language.ps
share/doc/sr/manpages.ps
share/doc/sr/port.ps
share/doc/sr/rel_2_0.ps
share/doc/sr/rel_2_1.ps
share/doc/sr/rel_2_2.ps
share/doc/sr/release.ps
share/doc/sr/runtime.ps
share/doc/sr/sranimator.ps
share/doc/sr/srwin.ps

33
lang/sr/distinfo Normal file
View File

@@ -0,0 +1,33 @@
$NetBSD: distinfo,v 1.21 2010/03/03 15:23:51 is Exp $
SHA1 (sr233.tar.Z) = 0354987527ed1e84c32d3b1fc6bacb65d647f337
RMD160 (sr233.tar.Z) = 58c90c06abede7a15ca8a68f53b6fdfa575c79df
Size (sr233.tar.Z) = 1424566 bytes
SHA1 (patch-aa) = 8df83950498d807024f00ba806613aff99a318e9
SHA1 (patch-ab) = 2a086280fefb4acddd19cb3cbafd58f8de5b309e
SHA1 (patch-ad) = 7fc00d7f52a16dc7b814c94c795bb5d7af02e58b
SHA1 (patch-ar) = 9a331cdb90959d0cc7475d2fc203d2c302d4bf5c
SHA1 (patch-as) = db45b9cbc7adf8fccc207e91041a544e427c7a2a
SHA1 (patch-at) = 989ea8ecf79a9f5d0567c53a2c9580b4ecc634c9
SHA1 (patch-au) = 701c53883b3661c578dc5b192a9779e7fdc503f5
SHA1 (patch-av) = 1beabb719e6f4a1d1872bd66c73d0d1169686770
SHA1 (patch-aw) = 1bf4f69379229c7493b057a0445959b16cc36ca7
SHA1 (patch-ax) = a834a65f2574be388bb420fdf883a9ac74f00ec9
SHA1 (patch-ay) = ea10d5daf877ca129efdfdbc544159a75f70f395
SHA1 (patch-az) = 1560c8ea0b760e2fb97385e565d87a49a879c6a2
SHA1 (patch-ba) = a29a664d693585ff39bc1f8d2c4b165981cde72a
SHA1 (patch-bb) = 6214584bde5a05386d0f31690b30a9c0a8c299af
SHA1 (patch-bc) = be4f8c47486c5b6933494f4e92fd8c340425a167
SHA1 (patch-bd) = d614868fc79c70af807de7349e432fbe5bdaf180
SHA1 (patch-be) = 2486b97d1b93bb3da5d1aa0905c6adb7ef804f12
SHA1 (patch-bf) = 5b927830f65f5b981cb735ae980e849e2c6d3727
SHA1 (patch-bg) = 3d3357f00129d8b6141506e700c4ae4da556a39a
SHA1 (patch-bh) = c880064e871297a411e2292f78d82222bb46dac4
SHA1 (patch-bi) = ad6706295ff164fe6df257d325a06f9b157175d1
SHA1 (patch-bj) = cd46d268fc173fe02efa8338ebf3f664ff2e5b94
SHA1 (patch-bk) = 7ec4207ea173377fd6de9dc6272ab20e48ef0780
SHA1 (patch-bl) = 7386a25df3223892fb841af3fa13eee3a17505b3
SHA1 (patch-bm) = 52ebd86cda2d354bf5d580c0f2cf25f80350cd2c
SHA1 (patch-bn) = fb8ebeb57956c094aee652c183a2fe1abbc45bb1
SHA1 (patch-bo) = 55dcc14458fcb817c605eb7b8c4240e87e1cd25a
SHA1 (patch-bp) = e0b553628fc2711ba2abe2b01999a0f84a5fbb7b

67
lang/sr/patches/patch-aa Normal file
View File

@@ -0,0 +1,67 @@
$NetBSD: patch-aa,v 1.3 2005/03/08 13:49:49 is Exp $
--- Configuration.orig 2005-01-18 16:11:10.000000000 +0000
+++ Configuration
@@ -26,13 +26,13 @@ VERSION = "SR version 2.3.3"
# MAN5: directory in which to install the srmap/srtrace(5) man pages
# (extension will be `tr 1 5` of MANEXT)
-SRSRC = /usr/local/src/sr
-SRCMD = /usr/local/bin
-SRLIB = /usr/local/lib/sr
-MAN1 = /usr/man/manl
-MAN3 = /usr/man/manl
-MAN5 = /usr/man/manl
-MANEXT = l
+SRSRC = _WRKSRC_
+SRCMD = _LOCALBASE_/bin
+SRLIB = _LOCALBASE_/lib/sr
+MAN1 = _LOCALBASE_/man/man1
+MAN3 = _LOCALBASE_/man/man3
+MAN5 = _LOCALBASE_/man/man5
+MANEXT = 1
@@ -54,8 +54,8 @@ MANEXT = l
# for Sun Solaris with Sun's C compiler use: CCPATH = /opt/SUNWspro/bin/cc
# for Linux, NetBSD, FreeBSD, or SGI Irix use: CCPATH = /usr/bin/cc
-CCPATH = /bin/cc
-RSHPATH = /usr/ucb/rsh
+CCPATH = /usr/bin/cc
+RSHPATH = /usr/bin/ssh
@@ -81,7 +81,7 @@ RSHPATH = /usr/ucb/rsh
# LIBC = , LIBR = , LIBM = -lm
LIBC =
-LIBR = -L/usr/X11/lib
+LIBR = -R_XLIB_ -L_XLIB_
LIBM = -lm
@@ -95,10 +95,10 @@ LIBM = -lm
# If not set, SRanimator is not built.
#
# for Sun Solaris 2.x, set XINCL = /usr/openwin/include
-# for NetBSD, set XINCL = /usr/X386/include
+# for NetBSD, set XINCL = /usr/X11R6/include
# for Linux, set XINCL = /usr/X11/include
-XINCL = /usr/include
+XINCL = _XINC_
XTANGO =
@@ -107,7 +107,7 @@ XTANGO =
#
# Set these definitions empty if your system does not have vgrind.
-VFPATH = /usr/lib/vfontedpr
+VFPATH =
VGMACS =

17
lang/sr/patches/patch-ab Normal file
View File

@@ -0,0 +1,17 @@
$NetBSD: patch-ab,v 1.2 2005/03/01 10:00:47 is Exp $
--- arch.h.orig 1999-08-09 16:34:12.000000000 +0000
+++ arch.h
@@ -7,6 +7,12 @@
* BIGCC arguments passed to CC to enlarge tree space (if needed)
*/
+
+/* here so that cpu-specific code below doesn't overwrite our choices */
+#if !defined(ARCH) && defined(__NetBSD__)
+#define ARCH "NetBSD 2.0 and later"
+#endif
+
#ifndef ARCH
#ifdef apollo

13
lang/sr/patches/patch-ad Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ad,v 1.1.1.1 2005/02/25 15:54:59 is Exp $
--- doc/Makefile.orig 1999-07-28 22:42:21.000000000 +0200
+++ doc/Makefile
@@ -6,7 +6,7 @@
MAKE = make
SHELL = /bin/sh
-ROFF = psroff -t
+ROFF = groff -Tps
D = ../ps

9
lang/sr/patches/patch-ar Normal file
View File

@@ -0,0 +1,9 @@
$NetBSD: patch-ar,v 1.1.1.1 2005/02/25 15:54:59 is Exp $
--- vsuite/quick/easy/Make.std.orig 1999-07-28 22:43:18.000000000 +0200
+++ vsuite/quick/easy/Make.std
@@ -1,3 +1,3 @@
echo gries.sr
-rm -rf ./Interfaces
+rm -rf ./Interfaces
rm -f core a.out

29
lang/sr/patches/patch-as Normal file
View File

@@ -0,0 +1,29 @@
$NetBSD: patch-as,v 1.3 2010/03/03 13:01:43 is Exp $
--- Makefile.orig 2005-01-18 17:11:10.000000000 +0100
+++ Makefile
@@ -4,7 +4,7 @@
CC = cc
-CFLAGS = -g
+CFLAGS = -O3
MAKE = make
SHELL = /bin/sh
@@ -38,7 +38,7 @@ all: config
## Install everything.
-install: paths.sh ; sh install.sh
+install: paths.sh ; sh install.sh ${DESTDIR}
@@ -264,3 +264,6 @@ srvdist:
srv/srv quick/vm examples/mbrot examples/remote \
create/args2 create/chairs global/3 global/4 global/5 \
literal/cap misc/timeslice2 vm
+
+verify:
+ srv/srv

36
lang/sr/patches/patch-at Normal file
View File

@@ -0,0 +1,36 @@
$NetBSD: patch-at,v 1.2 2005/03/01 12:55:01 is Exp $
--- csw/Makefile.orig 1999-07-30 05:01:50.000000000 +0000
+++ csw/Makefile
@@ -1,6 +1,6 @@
## Makefile for the SR context switch routines.
-CFLAGS = -g
+CFLAGS = -O3
SHELL = /bin/sh
SRC = alpha.s ap3000.s bobcat.s encore.s i386.s m68k.s m88k.s mips.s \
@@ -27,19 +27,15 @@ cstest: cstest.o asm.o
# csloop is a timing program, built only on request
csloop: csloop.o asm.o
- . ../paths.sh; $(CC) -O -o csloop csloop.o asm.o $$LIBR $$LIBC
+ . ../paths.sh; $(CC) -g -o csloop csloop.o asm.o $$LIBR $$LIBC
csloop.o: csloop.c
$(CC) -O -c csloop.c
-# asm.o holds the actual context switch code
-
-asm.o: asm.c ../arch.h $(SRC)
- $(CC) $(CFLAGS) -E asm.c | \
- sed -e '/^ *$$/d' -e '/^#/'d -e 's/ :/:/' >asm.s
- as -o asm.o asm.s
-
+asm.o: netbsd.c
+ $(CC) $(CFLAGS) -c netbsd.c
+ $(LD) -r -o asm.o netbsd.o /usr/lib/libpthread.a
# miscellaneous utility targets

117
lang/sr/patches/patch-au Normal file
View File

@@ -0,0 +1,117 @@
$NetBSD: patch-au,v 1.3 2005/03/02 13:21:34 is Exp $
--- csw/netbsd.c.orig 2005-03-02 13:00:06.000000000 +0000
+++ csw/netbsd.c
@@ -0,0 +1,112 @@
+/*
+ * netbsd.c -- context switch code for NetBSD 2.
+ *
+ * Some Makefile changes are needed to use this code.
+ */
+
+#include <ucontext.h>
+
+void sr_stk_underflow(void);
+void sr_stk_corrupted(void);
+
+static void startup(void (*)(void), unsigned long, unsigned long, unsigned long, unsigned long);
+
+#ifdef __i386__
+void pthread__i386_init(void);
+
+#define _setcontext_u(uc) (*_md_setcontext_u)(uc)
+#define _swapcontext_u(oc,nc) (*_md_swapcontext_u)(oc,nc)
+
+static void sr_setcontext_u(ucontext_t *);
+static void sr_swapcontext_u(ucontext_t *, ucontext_t *);
+
+void (*_md_getcontext_u) (ucontext_t *);
+void (*_md_setcontext_u) (ucontext_t *) = sr_setcontext_u;
+void (*_md_swapcontext_u)(ucontext_t *, ucontext_t *) = sr_swapcontext_u;
+
+static void
+sr_setcontext_u(ucontext_t *uc) {
+ pthread__i386_init();
+ _setcontext_u(uc);
+}
+
+static void
+sr_swapcontext_u(ucontext_t *oldc, ucontext_t *newc) {
+ pthread__i386_init();
+ _swapcontext_u(oldc, newc);
+}
+#endif
+
+
+/*
+ * sr_build_context (func, buf, bufsize, arg1, arg2, arg3, arg4)
+ *
+ * Build a context that will call func(arg1,arg2,arg3,arg4) when activated
+ * and will catch an underflow error if func returns. We use an intermediary
+ * in order to catch that return.
+ */
+void
+sr_build_context (func, buf, bufsize, arg1, arg2, arg3, arg4)
+void (*func)();
+char *buf;
+int bufsize;
+unsigned long arg1, arg2, arg3, arg4;
+{
+ ucontext_t *uc = (ucontext_t *) buf; /* put header at front of buf */
+
+ if (0 != getcontext(uc)) { /* initialize context */
+ sr_stk_corrupted();
+ }
+
+ uc->uc_stack.ss_sp = buf + sizeof (ucontext_t);
+ uc->uc_stack.ss_size = bufsize - sizeof (ucontext_t);
+
+ makecontext (uc, startup, 5, func, arg1, arg2, arg3, arg4);
+ uc->uc_stack.ss_flags = 0;
+}
+
+/*
+ * startup (func, a,b,c,d) -- intermediary for startup and underflow detection.
+ */
+static void
+startup (func, arg1, arg2, arg3, arg4)
+void (*func)();
+unsigned long arg1, arg2, arg3, arg4;
+{
+ (*func) (arg1, arg2, arg3, arg4);
+ sr_stk_underflow();
+}
+
+
+
+/*
+ * sr_chg_context (newctx, oldctx) -- change contexts.
+ */
+void
+sr_chg_context (new, old)
+char *new, *old;
+{
+ ucontext_t *oldu, *newu;
+ newu = (ucontext_t *)new;
+
+ if (old) {
+ oldu = (ucontext_t *)old;
+ _swapcontext_u(oldu, newu);
+ } else {
+ _setcontext_u(newu);
+ }
+}
+
+
+
+/*
+ * sr_check_stk (stk) -- check for stack overflow.
+ *
+ * We have no idea of how to do that, so we do nothing.
+ */
+void
+sr_check_stk(stk)
+char *stk;
+{
+ /* nothing */
+}

12
lang/sr/patches/patch-av Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: patch-av,v 1.1 2005/03/02 13:29:03 is Exp $
--- rts/net.c.orig 2005-03-01 16:25:59.000000000 +0000
+++ rts/net.c
@@ -2,6 +2,7 @@
#include "rts.h"
#include <fcntl.h>
+#include <unistd.h>
static void start_srx ();

12
lang/sr/patches/patch-aw Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: patch-aw,v 1.1 2005/03/02 13:29:03 is Exp $
--- rts/srx.c.orig 2005-03-01 16:26:10.000000000 +0000
+++ rts/srx.c
@@ -19,6 +19,7 @@
#include "rts.h"
#include <fcntl.h>
#include <signal.h>
+#include <unistd.h>
#include <sys/param.h>
#ifdef __PARAGON__

10
lang/sr/patches/patch-ax Normal file
View File

@@ -0,0 +1,10 @@
$NetBSD: patch-ax,v 1.1 2005/03/02 13:29:03 is Exp $
--- srm/filter.c.orig 2005-03-01 16:26:14.000000000 +0000
+++ srm/filter.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <unistd.h>
#include "../gen.h"
#include "../util.h"

12
lang/sr/patches/patch-ay Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: patch-ay,v 1.1 2005/03/02 13:29:03 is Exp $
--- util.c.orig 2005-03-01 14:58:18.000000000 +0000
+++ util.c
@@ -5,6 +5,7 @@
#include <sys/stat.h>
#include <sys/file.h> /* needed by HP-UX */
#include <fcntl.h> /* needed by HP-UX */
+#include <unistd.h> /* needed by NetBSD */
#include "gen.h"
#include "util.h"
#include "paths.h"

13
lang/sr/patches/patch-az Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: patch-az,v 1.1 2005/03/02 13:45:22 is Exp $
--- csw/cstest.c.orig 1999-07-28 20:42:21.000000000 +0000
+++ csw/cstest.c
@@ -315,7 +315,7 @@ int m, n;
label = "";
printf ("%s ---------------------------------------\n", label);
while (p <= q) {
- printf ("\t%08X (%2d) %08X ", (int) p, p - addr, i = * (int *) p);
+ printf ("\t%p (%2d) %08X ", p, p - addr, i = * (int *) p);
c = toascii (*p++); putchar (isprint (c) ? c : '.');
c = toascii (*p++); putchar (isprint (c) ? c : '.');
c = toascii (*p++); putchar (isprint (c) ? c : '.');

32
lang/sr/patches/patch-ba Normal file
View File

@@ -0,0 +1,32 @@
$NetBSD: patch-ba,v 1.1 2005/03/02 14:07:39 is Exp $
--- rts/misc.c.orig 2005-03-02 13:56:52.000000000 +0000
+++ rts/misc.c
@@ -1,6 +1,7 @@
/* misc.c -- miscellaneous routines supporting the generated code */
#include <stdarg.h>
+#include <stdint.h>
#include "rts.h"
@@ -24,7 +25,7 @@ sr_cat (String *slist, ...)
n = 0; /* total the string lengths */
va_start (ap, slist);
for (s = slist; s != NULL; s = va_arg (ap, String *))
- if ((int) s & 1)
+ if ((intptr_t) s & 1)
n++; /* char argument */
else
n += s->length; /* String argument */
@@ -37,8 +38,8 @@ sr_cat (String *slist, ...)
p = DATA (t);
va_start (ap, slist);
for (s = slist; s != NULL; s = va_arg (ap, String *))
- if ((int) s & 1) { /* for each input string: */
- *p++ = (int) s >> 2; /* copy in char argument */
+ if ((intptr_t) s & 1) { /* for each input string: */
+ *p++ = (intptr_t) s >> 2; /* copy in char argument */
} else {
memcpy (p, DATA (s), s->length); /* copy into new string */
p += s->length; /* advance pointer*/

13
lang/sr/patches/patch-bb Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bb,v 1.1 2005/03/02 14:23:35 is Exp $
--- rts/socket.c.orig 2005-03-02 14:17:00.000000000 +0000
+++ rts/socket.c
@@ -278,7 +278,7 @@ Pach ph;
int n, result, my_currfd;
static struct sockaddr sockbuff;
- static size_t buffsize;
+ static socklen_t buffsize;
static fd_set readyset; /* fd's with input available. Fortunately,
* the only place this is assigned to is
* already protected. */

13
lang/sr/patches/patch-bc Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bc,v 1.1 2005/03/02 21:07:06 is Exp $
--- rts/scan.c.orig 2003-11-21 21:00:01.000000000 +0100
+++ rts/scan.c
@@ -7,7 +7,7 @@
static int scanToken (), scanInteger (), scanReal (), scanPointer ();
static int scanTokenFromSet ();
-#define BACKCH(c,f,S,s) (S ? ((s>DATA (S)) ? (s)-- : 0) : (char*)ungetc (c, f))
+#define BACKCH(c,f,S,s) (S ? ((s>DATA (S)) ? (s)--,0 : 0) : ungetc (c, f))
#define NEXTCH(l,f,S,s) (S ? ((*s=='\0') ? EOF : * (Char*)(s)++) : INCH (l, f))
#define SCAN_LEN 50

13
lang/sr/patches/patch-bd Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bd,v 1.2 2005/03/11 23:24:14 is Exp $
--- vsuite/quick/ptrstr/No_input.std.orig 2005-03-11 09:46:24.000000000 +0100
+++ vsuite/quick/ptrstr/No_input.std
@@ -0,0 +1,8 @@
+Testing pointer-string-pointer conversions:
+Null pointer: ==null== ; string: ==null== ; int: 0 ; pt(==null==): ==null==
+pointer identity: true
+string identity: true
+pointerX identity: true
+Expect invalid conversion:
+RTS abort: file pointer.sr, line 31:
+ illegal conversion: pointer("invalid")

38
lang/sr/patches/patch-be Normal file
View File

@@ -0,0 +1,38 @@
$NetBSD: patch-be,v 1.2 2005/03/11 23:24:14 is Exp $
--- vsuite/quick/ptrstr/pointer.sr.orig 2005-03-11 09:46:25.000000000 +0100
+++ vsuite/quick/ptrstr/pointer.sr
@@ -0,0 +1,33 @@
+resource pointer()
+ type pt = ptr int
+ var foo: pt
+ var bar: pt
+ var baz: pt
+ var nul: pt
+ var foos: string[20]
+ var bars: string[20]
+
+ write("Testing pointer-string-pointer conversions:")
+
+ nul := null
+ write("Null pointer:", nul, "; string:", string(nul),
+ "; int:", int(nul), "; pt(==null==):", pt("==null=="))
+
+ baz := new(int)
+
+ foo := new(int)
+ foos:= string(foo)
+
+ bar := pt(foos)
+ bars:= string(bar)
+
+ baz := pt(foos||"X")
+
+ write("pointer identity:", foo = bar)
+ write("string identity:", foos = bars)
+ write("pointerX identity:", foo = baz)
+
+ write("Expect invalid conversion:")
+ baz := pt("invalid")
+
+end

9
lang/sr/patches/patch-bf Normal file
View File

@@ -0,0 +1,9 @@
$NetBSD: patch-bf,v 1.2 2005/03/11 23:24:14 is Exp $
--- vsuite/quick/ptrstr/Script.orig 2005-03-11 09:46:25.000000000 +0100
+++ vsuite/quick/ptrstr/Script
@@ -0,0 +1,4 @@
+# ignatios Fri Mar 11 10:07:24 CET 2005
+0 sr pointer.sr
+1 run
+0 rm -rf Interfaces core *.out

39
lang/sr/patches/patch-bg Normal file
View File

@@ -0,0 +1,39 @@
$NetBSD: patch-bg,v 1.1 2005/03/12 10:22:08 is Exp $
--- rts/conv.c.orig 1999-07-28 22:42:24.000000000 +0200
+++ rts/conv.c
@@ -219,11 +219,30 @@ sr_ptrval (locn, s)
char *locn;
String *s;
{
+ unsigned long ul;
+ char c[2], d[2];
+ int t;
+
sr_check_stk (CUR_STACK);
- if (s->length == 8 && strncmp (DATA (s), "==null==", 8) == 0)
- return 0;
- else
- return (Ptr) sr_intval (locn, s);
+
+ if (s->length == 8 && strncmp (DATA (s), "==null==", 8) == 0) {
+ return (Ptr)0;
+ }
+ /* implicit else */
+
+ c[0] = '\0';
+ DATA (s) [s->length] = '\0';
+
+ t = sscanf (DATA (s), "%lx%1s%1s", &ul, c, d);
+
+ if ( t != 1 &&
+ (t != 2 || (c[0] != 'x' && c[0] != 'X'))) {
+
+ sr_runerr (locn, E_PCNV, s);
+ }
+
+ return (Ptr) ul;
+
}

9
lang/sr/patches/patch-bh Normal file
View File

@@ -0,0 +1,9 @@
$NetBSD: patch-bh,v 1.1 2005/03/12 10:22:08 is Exp $
--- runerr.h.orig 2005-03-11 09:28:59.000000000 +0100
+++ runerr.h
@@ -40,3 +40,4 @@ RUNERR(E_CCNV,41,"illegal conversion: ch
RUNERR(E_BCNV,42,"illegal conversion: bool(\"%S\")")
RUNERR(E_ICNV,43,"illegal conversion: int(\"%S\")")
RUNERR(E_RCNV,44,"illegal conversion: real(\"%S\")")
+RUNERR(E_PCNV,45,"illegal conversion: pointer(\"%S\")")

14
lang/sr/patches/patch-bi Normal file
View File

@@ -0,0 +1,14 @@
$NetBSD: patch-bi,v 1.1 2005/04/05 15:54:02 is Exp $
--- library/Makefile.orig 1999-07-29 00:16:11.000000000 +0200
+++ library/Makefile
@@ -1,7 +1,7 @@
## Makefile for the SR X-Windows interface, SRWin.
-CFLAGS = -g
-SRFLAGS = -g
+CFLAGS = -O3
+SRFLAGS = -O
SHELL = /bin/sh

13
lang/sr/patches/patch-bj Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: patch-bj,v 1.1 2005/04/05 15:58:05 is Exp $
--- sr/gexpr.c.orig 1999-10-26 03:06:20.000000000 +0200
+++ sr/gexpr.c
@@ -942,7 +942,7 @@ Nodeptr e;
r = RNODE (e);
if (l->e_sig->g_type == T_STRING) {
if (option_O)
- cprintf ("(DATA(%e)+%e-1)", l, r);
+ cprintf ("((Char*)DATA(%e)+%e-1)", l, r);
else {
cprintf ("(");
once (l, ',');

17
lang/sr/patches/patch-bk Normal file
View File

@@ -0,0 +1,17 @@
$NetBSD: patch-bk,v 1.1 2010/03/03 13:01:43 is Exp $
--- install.sh.orig 1999-07-28 22:42:21.000000000 +0200
+++ install.sh
@@ -3,6 +3,12 @@
# Install SR.
. ./paths.sh
+
+for var in SRCMD SRLIB MAN1 MAN3 MAN5; do
+ eval val=\$${var}
+ eval ${var}=$1${val}
+done
+
if [ -z "$SRCMD" -o -z "$SRLIB" ]; then
echo 'cannot install -- SRCMD or SRLIB is null' 1>&2
exit 1

16
lang/sr/patches/patch-bl Normal file
View File

@@ -0,0 +1,16 @@
$NetBSD: patch-bl,v 1.1 2010/03/03 15:24:19 is Exp $
--- gen.h.orig 1999-07-28 22:42:21.000000000 +0200
+++ gen.h
@@ -43,8 +43,9 @@ void exit();
double fmod(); /* not in Sequent <math.h> */
#if defined(__STDC__) || defined(__sgi) || defined(_AIX) || defined(__alpha)
-void *malloc(), *realloc();
-void *memset(), *memcpy();
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
#else
char *malloc(), *realloc();
char *memset(), *memcpy();

38
lang/sr/patches/patch-bm Normal file
View File

@@ -0,0 +1,38 @@
$NetBSD: patch-bm,v 1.1 2010/03/03 15:24:19 is Exp $
--- sr/main.c.orig 2010-03-03 15:16:17.000000000 +0100
+++ sr/main.c
@@ -11,7 +11,7 @@ static void dofile PARAMS ((char *filena
static int concrete PARAMS ((Nodeptr e));
static void genmake PARAMS ((Nodeptr e));
static void gmake PARAMS ((Nodeptr e, char *rtype, char *half));
-static void link PARAMS ((char *files[]));
+static void mylink PARAMS ((char *files[]));
@@ -101,7 +101,7 @@ char *argv[];
} else {
if (!option_q)
fprintf (stderr, "linking:\n");
- link (argv + optind); /* exec srl to build executable file */
+ mylink (argv + optind); /* exec srl to build executable file */
/*NOTREACHED*/
}
}
@@ -348,13 +348,13 @@ char *dir, *fname;
-/* link (files) -- run srl to link the components we have compiled
+/* mylink (files) -- run srl to link the components we have compiled
*
* "files" is portion of orig argv containing file names (including SR files).
*/
static void
-link (files)
+mylink (files)
char *files[];
{
char path [MAX_PATH];

12
lang/sr/patches/patch-bn Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: patch-bn,v 1.1 2010/03/03 15:24:20 is Exp $
--- srtex/print.c.orig 1999-08-03 19:48:22.000000000 +0200
+++ srtex/print.c
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include "../config.h"
char *yyref ();

12
lang/sr/patches/patch-bo Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: patch-bo,v 1.1 2010/03/03 15:24:20 is Exp $
--- srm/fill.c.orig 1999-07-28 22:42:26.000000000 +0200
+++ srm/fill.c
@@ -1,6 +1,7 @@
/* fill.c */
#include <stdio.h>
+#include <string.h>
#include "../config.h"
#include "srm.h"

12
lang/sr/patches/patch-bp Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: patch-bp,v 1.1 2010/03/03 15:24:20 is Exp $
--- examples/other/mbrot/bkend.c.orig 1999-07-31 01:29:27.000000000 +0200
+++ examples/other/mbrot/bkend.c
@@ -39,6 +39,7 @@ char *path;
*/
#include <stdio.h>
+#include <stdlib.h>
filter(io,name,argv)
int io;