Sat Apr 25 19:58:32 2015 UTC ()
Add a package for Rob Pike's newsqueak, a channel-based concurrent
programming language. It is one of the ancestors of Go.


(dholland)
diff -r0 -r1.1 pkgsrc/lang/newsqueak/DESCR
diff -r0 -r1.1 pkgsrc/lang/newsqueak/Makefile
diff -r0 -r1.1 pkgsrc/lang/newsqueak/PLIST
diff -r0 -r1.1 pkgsrc/lang/newsqueak/distinfo
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-include_lib9.h
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-include_u.h
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-lib9_Makefile
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-lib9_doprint.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-lib9_nan.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-lib9_wait.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-libbio_Makefile
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_Makefile
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_compile.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_error.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_inst
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_lex.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_main.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_proc.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_progs_npowser
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_var.c
diff -r0 -r1.1 pkgsrc/lang/newsqueak/patches/patch-squint_xec.c

File Added: pkgsrc/lang/newsqueak/DESCR
Newsqueak is a channel-based concurrent programming language from Rob
Pike; it is a predecessor of Alef, Limbo, and Go.

File Added: pkgsrc/lang/newsqueak/Makefile
# $NetBSD: Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $

DISTNAME=	newsqueak
PKGNAME=	newsqueak-20000211
CATEGORIES=	lang
MASTER_SITES=	http://www.herpolhode.com/rob/

MAINTAINER=	dholland@NetBSD.org
HOMEPAGE=	http://en.wikipedia.org/wiki/Newsqueak
COMMENT=	Newsqueak: a language for communicating with mice
LICENSE=	public-domain

WRKSRC=		${WRKDIR}
USE_TOOLS+=	yacc
INSTALLATION_DIRS=	bin share/squint/include

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/squint/squint \
		${DESTDIR}${PREFIX}/bin/squint
	${INSTALL_DATA} ${WRKSRC}/squint/include/*.h \
		${DESTDIR}${PREFIX}/share/squint/include/

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/lang/newsqueak/PLIST
@comment $NetBSD: PLIST,v 1.1 2015/04/25 19:58:32 dholland Exp $
bin/squint
share/squint/include/arrow.h
share/squint/include/bitmapio.h
share/squint/include/box.h
share/squint/include/fio.h
share/squint/include/gnot.h
share/squint/include/gnotio.h
share/squint/include/layer.h
share/squint/include/lib.h
share/squint/include/lmenu.h
share/squint/include/menu.h
share/squint/include/nspace.h
share/squint/include/sight.h
share/squint/include/sys.h
share/squint/include/whitearrow.h

File Added: pkgsrc/lang/newsqueak/distinfo
$NetBSD: distinfo,v 1.1 2015/04/25 19:58:32 dholland Exp $

SHA1 (newsqueak.tar.gz) = 085cc8248be5b6145f57b8517e0f22469e5047c1
RMD160 (newsqueak.tar.gz) = 56f6fcf95a58d141efc57cedbf1a49574ea8b777
Size (newsqueak.tar.gz) = 265358 bytes
SHA1 (patch-Makefile) = 1c71432e17f2e146c6b077cf23e8dc13a65356d5
SHA1 (patch-include_lib9.h) = 0988b189b5b3e6666cdc4f04b31b5410af63aca9
SHA1 (patch-include_u.h) = ffb1752ebbcb600850e196e630592063827e32c9
SHA1 (patch-lib9_Makefile) = 5e48c9cdca6d560cd7c8d9b92e729f7fbb5fa999
SHA1 (patch-lib9_doprint.c) = c94bee65440c0a697ba426549740a4df3aa3e809
SHA1 (patch-lib9_nan.c) = 3c7067d47d9a7a1f98f41f466dd346d1593994bb
SHA1 (patch-lib9_wait.c) = a8574632f483ea9da2f83597a165605b3bc3b2b6
SHA1 (patch-libbio_Makefile) = 0272c0953ede97a9805a5668035938c18c9932f1
SHA1 (patch-squint_Makefile) = ae117cb88ead5924207f03c85358a3a4baeaba90
SHA1 (patch-squint_compile.c) = 9f4c5684a04b62ed61bb9155853d921ec870231a
SHA1 (patch-squint_error.c) = 1f7402b91c485037f154adb7346b5fa0c4bb1793
SHA1 (patch-squint_inst) = ec4add4193884e4ae402ebbc539dcc2bacd553d8
SHA1 (patch-squint_lex.c) = 08f503be33aac0db29295077af1e56ceb38d8ae3
SHA1 (patch-squint_main.c) = 33afa209ca89d89c23d5cf4d225b1d0eeedf53a9
SHA1 (patch-squint_proc.c) = 1650bb984ff237589d2d5cc83cb60e9c81cbb631
SHA1 (patch-squint_progs_npowser) = b65ec5c6bb354bcccfaa01912f9498da031e6c07
SHA1 (patch-squint_var.c) = 8a79fbbe4acba76214437707e1baee31e746f69c
SHA1 (patch-squint_xec.c) = 6b040eb1189233852adbe698e902946b367884c3

File Added: pkgsrc/lang/newsqueak/patches/patch-Makefile
$NetBSD: patch-Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $

Configure for pkgsrc, and use bsd make.
Don't set -g; do set -fno-strict-aliasing.
Pass in PREFIX.

--- Makefile.orig	2000-02-11 17:04:11.000000000 +0000
+++ Makefile
@@ -1,12 +1,11 @@
-DIRS	=	lib9 libbio squint
+DIRS=		lib9 libbio squint
 
-CFLAGS	= -g -Wall $(INCLUDES)
+#CFLAGS+=	-g
+CFLAGS+=	-Wall $(INCLUDES)
+CFLAGS+=	-fno-strict-aliasing	# required in squint/var.c
+CFLAGS+=	-DPREFIX=\"$(PREFIX)\"
 
-all:
-	for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS); cd ..; done
-
-clean:
-	for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS) clean; cd ..; done
-
-%:
-	for i in $(DIRS); do cd $$i; CFLAGS="$(CFLAGS)" make -$(MAKEFLAGS) $@; cd ..; done
+all depend clean:
+.for D in $(DIRS)
+	(cd $D && CFLAGS=$(CFLAGS:Q) $(MAKE) $@) || exit 1
+.endfor

File Added: pkgsrc/lang/newsqueak/patches/patch-include_lib9.h
$NetBSD: patch-include_lib9.h,v 1.1 2015/04/25 19:58:32 dholland Exp $

Provide an implementation of SET to silence some compiler warnings.
Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- include/lib9.h~	2000-02-11 17:04:14.000000000 +0000
+++ include/lib9.h
@@ -7,7 +7,7 @@ typedef unsigned short Rune;
 #define	create(name, mode, perm)	creat(name, perm)
 #define	exec(a,b)			execv(a,b)
 #define	USED(a)
-#define SET(a)
+#define SET(a)				((a) = 0)
 
 #define nil ((void*)0)
 
@@ -96,7 +96,10 @@ int	sprint(char *buf, const char *fmt, .
 int	snprint(char *buf, int len, const char *fmt, ...);
 char*	seprint(char *buf, char *e, const char *fmt, ...);
 #define pow10(n) (pow(10.0, (double)(n)))
-extern	int	fmtinstall(int, int (*)(va_list*, Fconv*));
+struct va_wrap {
+	va_list ap;
+};
+extern	int	fmtinstall(int, int (*)(struct va_wrap *, Fconv*));
 
 /* nan.c */
 double	NaN(void);

File Added: pkgsrc/lang/newsqueak/patches/patch-include_u.h
$NetBSD: patch-include_u.h,v 1.1 2015/04/25 19:58:32 dholland Exp $

Add support for modern BSDs.

--- include/u.h.orig	2000-02-11 17:05:58.000000000 +0000
+++ include/u.h
@@ -189,6 +189,28 @@ typedef unsigned long long uvlong;
 typedef long long vlong;
 #endif
 
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#define _XOPEN_SOURCE_EXTENDED
+
+#include <stdarg.h>
+#include <setjmp.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <math.h>
+#include <fcntl.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/resource.h>
+
+typedef unsigned char uchar;
+typedef unsigned long ulong;
+typedef unsigned long long uvlong;
+typedef long long vlong;
+#endif
+
 #ifdef sgi
 #include <stdarg.h>
 #include <setjmp.h>

File Added: pkgsrc/lang/newsqueak/patches/patch-lib9_Makefile
$NetBSD: patch-lib9_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $

Configure for pkgsrc.

--- lib9/Makefile~	2000-02-11 17:04:14.000000000 +0000
+++ lib9/Makefile
@@ -15,12 +15,13 @@ INCLUDES=-I../include
 
 CFLAGS += $(INCLUDES)
 
-CC=gcc
+CC?=gcc
 
 all: $(LIB)
 
 $(LIB): $(OFILES)
-	ar r $(LIB) $(OFILES)
+	rm -f $(LIB)
+	$(AR) cq $(LIB) $(OFILES)
 
 clean:
 	rm -rf $(OFILES)

File Added: pkgsrc/lang/newsqueak/patches/patch-lib9_doprint.c
$NetBSD: patch-lib9_doprint.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- lib9/doprint.c~	2000-02-11 17:04:14.000000000 +0000
+++ lib9/doprint.c
@@ -32,21 +32,21 @@ struct Fmtalloc {
 #endif
 	int	convcount;
 	char	index[MAXFMT];
-	int	(*conv[MAXCONV])(va_list*, Fconv*);
+	int	(*conv[MAXCONV])(struct va_wrap *, Fconv*);
 };
 static struct Fmtalloc fmtalloc;
 
-static	int	noconv(va_list*, Fconv*);
-static	int	flags(va_list*, Fconv*);
+static	int	noconv(struct va_wrap *, Fconv*);
+static	int	flags(struct va_wrap *, Fconv*);
 
-static	int	cconv(va_list*, Fconv*);
-static	int	rconv(va_list*, Fconv*);
-static	int	sconv(va_list*, Fconv*);
-static	int	percent(va_list*, Fconv*);
-static	int	column(va_list*, Fconv*);
+static	int	cconv(struct va_wrap *, Fconv*);
+static	int	rconv(struct va_wrap *, Fconv*);
+static	int	sconv(struct va_wrap *, Fconv*);
+static	int	percent(struct va_wrap *, Fconv*);
+static	int	column(struct va_wrap *, Fconv*);
 
-extern	int	numbconv(va_list*, Fconv*);
-extern	int	fltconv(va_list*, Fconv*);
+extern	int	numbconv(struct va_wrap *, Fconv*);
+extern	int	fltconv(struct va_wrap *, Fconv*);
 
 
 static	void
@@ -108,7 +108,7 @@ initfmt(void)
 }
 
 int
-fmtinstall(int c, int (*f)(va_list*, Fconv*))
+fmtinstall(int c, int (*f)(struct va_wrap *, Fconv*))
 {
 
 #ifdef LOCKS_AVAILABLE
@@ -165,6 +165,9 @@ doprint(char *s, char *es, const char *f
 	int n, c;
 	Rune rune;
 	Fconv local;
+	struct va_wrap argwrap;
+
+	va_copy(argwrap.ap, argp);
 
 	if(fmtalloc.convcount <= 0)
 		initfmt();
@@ -252,7 +255,7 @@ l1:
 		goto l1;
 	}
 	if(c == '*') {
-		n = va_arg(argp, int);
+		n = va_arg(argwrap.ap, int);
 		if(local.f1 == NONE)
 			local.f1 = n;
 		else
@@ -263,7 +266,7 @@ l1:
 	if(c >= 0 && c < MAXFMT)
 		n = fmtalloc.index[c];
 	local.chr = c;
-	n = (*fmtalloc.conv[n])(&argp, &local);
+	n = (*fmtalloc.conv[n])(&argwrap, &local);
 	if(n < 0) {
 		local.f3 |= -n;
 		goto l0;
@@ -272,7 +275,7 @@ l1:
 }
 
 int
-numbconv(va_list *arg, Fconv *fp)
+numbconv(struct va_wrap *arg, Fconv *fp)
 {
 	char s[IDIGIT];
 	int i, f, n, b, ucase;
@@ -313,31 +316,31 @@ numbconv(va_list *arg, Fconv *fp)
 	f = 0;
 	switch(fp->f3 & (FVLONG|FLONG|FUNSIGN|FPOINTER)) {
 	case FVLONG|FLONG:
-		vl = va_arg(*arg, vlong);
+		vl = va_arg(arg->ap, vlong);
 		break;
 
 	case FUNSIGN|FVLONG|FLONG:
-		vl = va_arg(*arg, uvlong);
+		vl = va_arg(arg->ap, uvlong);
 		break;
 
 	case FUNSIGN|FPOINTER:
-		v = (ulong)va_arg(*arg, void*);
+		v = (ulong)va_arg(arg->ap, void*);
 		break;
 
 	case FLONG:
-		v = va_arg(*arg, long);
+		v = va_arg(arg->ap, long);
 		break;
 
 	case FUNSIGN|FLONG:
-		v = va_arg(*arg, ulong);
+		v = va_arg(arg->ap, ulong);
 		break;
 
 	default:
-		v = va_arg(*arg, int);
+		v = va_arg(arg->ap, int);
 		break;
 
 	case FUNSIGN:
-		v = va_arg(*arg, unsigned);
+		v = va_arg(arg->ap, unsigned);
 		break;
 	}
 	if(fp->f3 & FVLONG) {
@@ -504,7 +507,7 @@ strconv(char *s, Fconv *fp)
 }
 
 static int
-noconv(va_list *arg, Fconv *fp)
+noconv(struct va_wrap *arg, Fconv *fp)
 {
 	char s[10];
 
@@ -520,7 +523,7 @@ noconv(va_list *arg, Fconv *fp)
 }
 
 static int
-rconv(va_list *arg, Fconv *fp)
+rconv(struct va_wrap *arg, Fconv *fp)
 {
 	char s[ERRLEN];
 
@@ -532,12 +535,12 @@ rconv(va_list *arg, Fconv *fp)
 }
 
 static int
-cconv(va_list *arg, Fconv *fp)
+cconv(struct va_wrap *arg, Fconv *fp)
 {
 	char s[10];
 	Rune rune;
 
-	rune = va_arg(*arg, int);
+	rune = va_arg(arg->ap, int);
 	if(fp->chr == 'c')
 		rune &= 0xff;
 	s[runetochar(s, &rune)] = 0;
@@ -548,18 +551,18 @@ cconv(va_list *arg, Fconv *fp)
 }
 
 static	int
-sconv(va_list *arg, Fconv *fp)
+sconv(struct va_wrap *arg, Fconv *fp)
 {
 	char *s;
 	Rune *r;
 
 	if(fp->chr == 's') {
-		s = va_arg(*arg, char*);
+		s = va_arg(arg->ap, char*);
 		if(s == 0)
 			s = "<null>";
 		strconv(s, fp);
 	} else {
-		r = va_arg(*arg, Rune*);
+		r = va_arg(arg->ap, Rune*);
 		if(r == 0)
 			r = (Rune *)"<n\0u\0l\0l\0>\0\0\0";
 		Strconv(r, fp);
@@ -568,7 +571,7 @@ sconv(va_list *arg, Fconv *fp)
 }
 
 static	int
-percent(va_list *arg, Fconv *fp)
+percent(struct va_wrap *arg, Fconv *fp)
 {
 	pchar('%', fp);
 	printcol++;
@@ -576,11 +579,11 @@ percent(va_list *arg, Fconv *fp)
 }
 
 static	int
-column(va_list *arg, Fconv *fp)
+column(struct va_wrap *arg, Fconv *fp)
 {
 	int col, pc;
 
-	col = va_arg(*arg, int);
+	col = va_arg(arg->ap, int);
 	while(printcol < col) {
 		pc = (printcol+8) & ~7;
 		if(pc <= col) {
@@ -595,7 +598,7 @@ column(va_list *arg, Fconv *fp)
 }
 
 static	int
-flags(va_list *arg, Fconv *fp)
+flags(struct va_wrap *arg, Fconv *fp)
 {
 	int f;
 
@@ -627,7 +630,7 @@ flags(va_list *arg, Fconv *fp)
 }
 
 int
-fltconv(va_list *arg, Fconv *fp)
+fltconv(struct va_wrap *arg, Fconv *fp)
 {
 	char s1[FDIGIT+10], s2[FDIGIT+10];
 	double f, g, h;
@@ -637,7 +640,7 @@ fltconv(va_list *arg, Fconv *fp)
 	f2 = fp->f2;
 	fp->f2 = NONE;
 
-	f = va_arg(*arg, double);
+	f = va_arg(arg->ap, double);
 	if(isNaN(f)){
 		strconv("NaN", fp);
 		return 0;

File Added: pkgsrc/lang/newsqueak/patches/patch-lib9_nan.c
$NetBSD: patch-lib9_nan.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

"long" isn't necessarily 32 bits wide.

--- lib9/nan.c~	2000-02-11 17:04:14.000000000 +0000
+++ lib9/nan.c
@@ -16,7 +16,7 @@ NaN(void)
 	union
 	{
 		double	d;
-		long	x[2];
+		uint32_t	x[2];
 	} a;
 
 	a.x[1] = NANEXP;
@@ -30,7 +30,7 @@ isNaN(double d)
 	union
 	{
 		double	d;
-		long	x[2];
+		uint32_t	x[2];
 	} a;
 
 	a.d = d;
@@ -45,7 +45,7 @@ Inf(int sign)
 	union
 	{
 		double	d;
-		long	x[2];
+		uint32_t	x[2];
 	} a;
 
 	a.x[1] = NANEXP;
@@ -61,7 +61,7 @@ isInf(double d, int sign)
 	union
 	{
 		double	d;
-		long	x[2];
+		uint32_t	x[2];
 	} a;
 
 	a.d = d;

File Added: pkgsrc/lang/newsqueak/patches/patch-lib9_wait.c
$NetBSD: patch-lib9_wait.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Remove bogus extra include.

--- lib9/wait.c~	2000-02-11 17:04:15.000000000 +0000
+++ lib9/wait.c
@@ -5,8 +5,6 @@
 #include <sys/resource.h>
 #include <sys/wait.h>
 
-#include "/usr/include/sys/wait.h"
-
 int
 __waitcommon(int pid, int status, struct rusage *rusage, Waitmsg *w) {
 	long utime, stime;

File Added: pkgsrc/lang/newsqueak/patches/patch-libbio_Makefile
$NetBSD: patch-libbio_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $

Configure for pkgsrc; honor CC and AR.
Remove some wrong dangling references.

--- libbio/Makefile.orig	2000-02-11 17:04:17.000000000 +0000
+++ libbio/Makefile
@@ -17,19 +17,22 @@ OFILES=\
 	bseek.o\
 	bwrite.o\
 
-HFILES=/sys/include/bio.h
+#HFILES=/sys/include/bio.h
 
 INCLUDES=-I../include
 
 CFLAGS += $(INCLUDES)
 
-CC=gcc
+CC?=gcc
+
+all: $(LIB)
 
 $(LIB): $(OFILES)
-	ar r $(LIB) $(OFILES)
+	rm -f $(LIB)
+	$(AR) cq $(LIB) $(OFILES)
 
 clean:
-	rm -rf $(TARG) $(OFILES)
+	rm -rf $(OFILES)
 
 world:;		make depend; make $(LIB)
 

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_Makefile
$NetBSD: patch-squint_Makefile,v 1.1 2015/04/25 19:58:32 dholland Exp $

Configure for pkgsrc; honor LDFLAGS, CC, and YACC.
Add explicit "all" target to simplify parent makefile.
Don't require that . is in $PATH.
Prune trailing tab line in make recipe.

--- squint/Makefile.orig	2000-02-11 17:04:38.000000000 +0000
+++ squint/Makefile
@@ -2,10 +2,10 @@ TARG		= squint
 INCLUDES	= -I../include
 LIBDIR		= ../lib
 LIBS9		= -lbio -l9
-LIBS		= $(LIBS9) -lm
-LDFLAGS		= -L$(LIBDIR)
-CC		= gcc
-LD		= gcc
+LIBS		+= $(LIBS9) -lm
+LDFLAGS		+= -L$(LIBDIR)
+CC		?= gcc
+CCLD		?= $(CC)
 
 CFLAGS += $(INCLUDES)
 
@@ -22,11 +22,13 @@ LIBO=libio.o liblib.o
 
 OFILES		= $(FO) $(CO) $(SO) $(LIBO)
 
+all: $(TARG)
+
 $(TARG): $(FO) $(CO) $(SO) $(LIBO) $(LIBDIR)/*.a
-	$(LD) $(LDFLAGS) -o $@ $(FO) $(CO) $(SO) $(LIBO) $(LIBS)
+	$(CCLD) $(LDFLAGS) -o $@ $(FO) $(CO) $(SO) $(LIBO) $(LIBS)
 
 y.tab.h squint.c:	squint.y
-	yacc -d squint.y
+	$(YACC) -d squint.y
 	mv y.tab.c squint.c
 
 ydefs.h:	y.tab.h
@@ -36,8 +38,8 @@ slib.h:	sliblib.h slibio.h
 	cat $< > slib.h
 
 nodenames.h typenames.h:	node.h enumtoname
-	enumtoname Ntype < node.h > nodenames.h
-	enumtoname Ttype < node.h > typenames.h
+	./enumtoname Ntype < node.h > nodenames.h
+	./enumtoname Ttype < node.h > typenames.h
 
 inst.h insttab.h:	inst
 	( echo 'typedef enum Inst{' ; \
@@ -52,7 +54,7 @@ inst.h insttab.h:	inst
 	  sed 's/.\(.*\)/	{i\1, "&"},/' inst ; \
 	  echo '};' ; \
 	) > insttab.h
-	
+
 inst:	$(CODE)
 	cat $(CODE) | grep '^i.*(Proc \*proc)' | sed 's/^i/I/; s/(.*//; s/.*/&/' | sort > ninst
 	cmp -s inst ninst || mv ninst inst

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_compile.c
$NetBSD: patch-squint_compile.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Avoid naming conflict with standard C.

--- squint/compile.c~	2000-02-11 17:04:43.000000000 +0000
+++ squint/compile.c
@@ -228,7 +228,7 @@ gen(Node *n, int retain)
 		case PRINT:
 			gen(n->l, 1);
 			printgen(n->l);
-			emit(Isprint);
+			emit(Isprint_);
 			if(!retain)
 				emit(Iprint);
 			return;

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_error.c
$NetBSD: patch-squint_error.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- squint/error.c~	2000-02-11 17:04:40.000000000 +0000
+++ squint/error.c
@@ -108,11 +108,11 @@ rpanic(char *s, ...)
 }
 
 int
-bconv(va_list *va, Fconv *f)
+bconv(struct va_wrap *va, Fconv *f)
 {
 	int o;
 	extern int printcol;
-	o = va_arg(*va, int);
+	o = va_arg(va->ap, int);
 	while(printcol<o-8)
 		strconv("\t", f);
 	strconv("        "+(8-(o-printcol)), f);
@@ -120,12 +120,12 @@ bconv(va_list *va, Fconv *f)
 }
 
 int
-nconv(va_list *va, Fconv *f)
+nconv(struct va_wrap *va, Fconv *f)
 {
 	Node *n;
 	int t;
 	char buf[32];
-	n = va_arg(*va, Node*);
+	n = va_arg(va->ap, Node*);
 	t = n->t;
 	if(t<0 || sizeof(Ntypename)/sizeof(Ntypename[0])<=t){
 		sprint(buf, "mystery node(%d)", t);
@@ -136,12 +136,12 @@ nconv(va_list *va, Fconv *f)
 }
 
 int
-tconv(va_list *va, Fconv *f)
+tconv(struct va_wrap *va, Fconv *f)
 {
 	int t;
 	char buf[1024];
 	Node *n;
-	n = va_arg(*va, Node*);
+	n = va_arg(va->ap, Node*);
 	t = n->o.t;
 	if(t<0 || sizeof(Ttypename)/sizeof(Ttypename[0])<=t){
 		sprint(buf, "mystery type(%d)", t);
@@ -156,12 +156,12 @@ tconv(va_list *va, Fconv *f)
 }
 
 int
-econv(va_list *va, Fconv *f)
+econv(struct va_wrap *va, Fconv *f)
 {
 	char buf[16], *x;
 	int t;
 	Node *n;
-	n = va_arg(*va, Node*);
+	n = va_arg(va->ap, Node*);
 	t = n->o.i;
 	if(t<128 && strchr("+-*/%|&^~?!><=", t)){
 		sprint(buf, "%c", t);
@@ -232,11 +232,11 @@ econv(va_list *va, Fconv *f)
 }
 
 int
-mconv(va_list *va, Fconv *f)
+mconv(struct va_wrap *va, Fconv *f)
 {
 	char buf[4096];
 	Node *n;
-	n = va_arg(*va, Node*);
+	n = va_arg(va->ap, Node*);
 	switch(n->t){
 	case NID:
 		strcpy(buf, n->o.s->name);

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_inst
$NetBSD: patch-squint_inst,v 1.1 2015/04/25 19:58:32 dholland Exp $

Avoid naming conflict with standard C.

--- squint/inst~	2000-02-11 17:04:34.000000000 +0000
+++ squint/inst
@@ -95,7 +95,7 @@ Iret
 Irsh
 Isnd
 Isndptr
-Isprint
+Isprint_
 Istore
 Istoreary
 Istoreauto

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_lex.c
$NetBSD: patch-squint_lex.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Use $PREFIX instead of Rob's homedir.
Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- squint/lex.c.orig	2000-02-11 17:04:41.000000000 +0000
+++ squint/lex.c
@@ -349,7 +349,7 @@ newfile(char *s, int stdin)
 		char buf[1024];
 		fd=open(s, 0);
 		if(fd<0 && s[0]!='/' && s[0]!='.'){
-			sprint(buf, "/usr/rob/src/squint/include/%s", s);
+			sprint(buf, PREFIX "/share/squint/include/%s", s);
 			fd=open(buf, 0);
 		}
 		if(fd<0)
@@ -381,14 +381,14 @@ printfileline(char *buf, File *f, int l,
 }
 
 int
-zconv(va_list *va, Fconv *f)
+zconv(struct va_wrap *va, Fconv *f)
 {
 	int o;
 	char buf[4096];
 
 	SET(o);
 	if(f->chr == 'Z')
-		o = va_arg(*va, int);
+		o = va_arg(va->ap, int);
 	if(initializing)
 		strcpy(buf, "squint: ");
 	else{

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_main.c
$NetBSD: patch-squint_main.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- squint/main.c~	2000-02-11 17:04:43.000000000 +0000
+++ squint/main.c
@@ -4,16 +4,16 @@
 #include <bio.h>
 #include "fns.h"
 
-extern int	bconv(va_list *, Fconv*);
-extern int	econv(va_list *, Fconv*);
-extern int	iconv(va_list *, Fconv*);
-extern int	mconv(va_list *, Fconv*);
-extern int	nconv(va_list *, Fconv*);
-extern int	tconv(va_list *, Fconv*);
-extern int	Aconv(va_list *, Fconv*);
-extern int	Cconv(va_list *, Fconv*);
-extern int	Uconv(va_list *, Fconv*);
-extern int	zconv(va_list *, Fconv*);
+extern int	bconv(struct va_wrap *, Fconv*);
+extern int	econv(struct va_wrap *, Fconv*);
+extern int	iconv(struct va_wrap *, Fconv*);
+extern int	mconv(struct va_wrap *, Fconv*);
+extern int	nconv(struct va_wrap *, Fconv*);
+extern int	tconv(struct va_wrap *, Fconv*);
+extern int	Aconv(struct va_wrap *, Fconv*);
+extern int	Cconv(struct va_wrap *, Fconv*);
+extern int	Uconv(struct va_wrap *, Fconv*);
+extern int	zconv(struct va_wrap *, Fconv*);
 
 int		bflag;
 int		cflag;

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_proc.c
$NetBSD: patch-squint_proc.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- squint/proc.c~	2000-02-11 17:04:40.000000000 +0000
+++ squint/proc.c
@@ -468,12 +468,12 @@ stacktrace(Proc *p)
 }
 
 int
-Aconv(va_list *va, Fconv *f)
+Aconv(struct va_wrap *va, Fconv *f)
 {
 	int i, n;
 	Store *s;
 	char buf[32];
-	s = va_arg(*va, Store*);
+	s = va_arg(va->ap, Store*);
 	n=s->len;
 	if(n>4)
 		n=4;
@@ -490,11 +490,11 @@ Aconv(va_list *va, Fconv *f)
 }
 
 int
-Cconv(va_list *va, Fconv *f)
+Cconv(struct va_wrap *va, Fconv *f)
 {
 	Store *s;
 
-	s = va_arg(*va, Store*);
+	s = va_arg(va->ap, Store*);
 	if(s->len>128){
 		strconv("\"very long string\"", f);
 		return sizeof(long);
@@ -506,7 +506,7 @@ Cconv(va_list *va, Fconv *f)
 }
 
 int
-Uconv(va_list *va, Fconv *f)
+Uconv(struct va_wrap *va, Fconv *f)
 {
 	USED(va);
 	strconv("unit", f);

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_progs_npowser
$NetBSD: patch-squint_progs_npowser,v 1.1 2015/04/25 19:58:32 dholland Exp $

remove another reference to Rob's homedir

--- squint/progs/npowser~	2000-02-11 17:04:28.000000000 +0000
+++ squint/progs/npowser
@@ -7,7 +7,7 @@ type rat: struct of {
 };
 type item:rat;
 
-include "/usr/rob/src/squint/progs/drat"
+include "progs/drat"
 
 type PS: dch;	# power series
 type PS2: array[2] of dch; # pair of power series

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_var.c
$NetBSD: patch-squint_var.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Avoid naming conflict with standard C.

--- squint/var.c~	2000-02-11 17:04:38.000000000 +0000
+++ squint/var.c
@@ -567,7 +567,7 @@ idel(Proc *proc)
  */
 
 int
-isprint(Proc *proc)
+isprint_(Proc *proc)
 {
 	Store *s;
 	s=emalloc(SHSZ+proc->nprbuf+1);

File Added: pkgsrc/lang/newsqueak/patches/patch-squint_xec.c
$NetBSD: patch-squint_xec.c,v 1.1 2015/04/25 19:58:32 dholland Exp $

Muck with fmtinstall to avoid doing undefined/illegal things with va_list.

--- squint/xec.c~	2000-02-11 17:04:43.000000000 +0000
+++ squint/xec.c
@@ -21,13 +21,13 @@ void	xec(void);
 void	xxec(void);
 
 int
-iconv(va_list *va, Fconv *f)
+iconv(struct va_wrap *va, Fconv *f)
 {
 	int i;
 	char buf[16];
 	void *o;	/* really int (**o)(Proc*) */
 
-	o = va_arg(*va, void*);
+	o = va_arg(va->ap, void*);
 	for(i=0; i<NInst; i++)
 		if((void*)insttab[i].fp==o){
 			strconv(insttab[i].name, f);