Commit Diff


commit - 63dd44c8ca13354de84c4da659454526ec6750db
commit + aa738614530c1525b2337a3812d238b9776d51f0
blob - /dev/null
blob + 5b32b55a90ec72b8d7467c095febde781459c0c3 (mode 644)
--- /dev/null
+++ unix/Makefile
@@ -0,0 +1,7 @@
+all:
+	for i in libutf libfmt libbio libregexp mk
+	do
+		(cd $i; make)
+	done
+	ls -l mk/mk
+
blob - /dev/null
blob + 6bd9c7995d26a97ed204487e9f3f2575a7c4fb57 (mode 644)
--- /dev/null
+++ unix/NOTICE.bio
@@ -0,0 +1,40 @@
+This copyright NOTICE applies to all files in this directory and
+subdirectories, unless another copyright notice appears in a given
+file or subdirectory.  If you take code from this software to use in
+other programs, you must somehow include with it an appropriate
+copyright notice that includes the copyright notice and the other
+notices above.
+
+This Computer Program is subject to Copyright owned by one or more Authors:
+
+	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
+	Revisions Copyright © 2000-2003 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
+
+Under a licence agreement with Lucent Technologies Inc. effective 1st March 2000,
+Vita Nuova Holdings Limited has the right to determine (within a specified scope)
+the form and content of sublicences for this software.
+
+	Free-for-all Licence
+
+The associated software is hereby made available to Recipients with a
+royalty-free licence for its use, reproduction, transfer
+to other parties and amendment for any purpose not excluding
+product development provided that any such use et cetera
+shall be deemed to be acceptance of the following conditions:
+
+	(1) Its Recipients shall ensure that this Notice
+	and all other copyright notices are reproduced
+    upon any copies or amended versions of it;
+
+    (2) Any amended version of it shall be clearly marked to
+    show both the nature of and the organisation responsible
+    for the relevant amendment or amendments;
+
+    (3) Its agreed onward transfer from a Recipient to another
+    party shall be deemed to be that party's acceptance of
+	these conditions;
+
+    (4) the Authors give no warranty or assurance as to its
+    quality or suitability for any purpose and the Authors accept
+    no liability whatsoever in relation to any use to which
+    it may be put.
blob - /dev/null
blob + 685d1df502f94e5e314dd2cdf15c8b810547e6f5 (mode 644)
--- /dev/null
+++ unix/NOTICE.fmt
@@ -0,0 +1,19 @@
+/*
+ * The authors of this software are Rob Pike and Ken Thompson.
+ *		Copyright (c) 2002 by Lucent Technologies.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+*/
+
+This is a Unix port of the Plan 9 formatted I/O package.
+
+Please send comments about the packaging
+to Russ Cox <rsc@swtch.com>.
+
blob - /dev/null
blob + 6bd9c7995d26a97ed204487e9f3f2575a7c4fb57 (mode 644)
--- /dev/null
+++ unix/NOTICE.mk
@@ -0,0 +1,40 @@
+This copyright NOTICE applies to all files in this directory and
+subdirectories, unless another copyright notice appears in a given
+file or subdirectory.  If you take code from this software to use in
+other programs, you must somehow include with it an appropriate
+copyright notice that includes the copyright notice and the other
+notices above.
+
+This Computer Program is subject to Copyright owned by one or more Authors:
+
+	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
+	Revisions Copyright © 2000-2003 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
+
+Under a licence agreement with Lucent Technologies Inc. effective 1st March 2000,
+Vita Nuova Holdings Limited has the right to determine (within a specified scope)
+the form and content of sublicences for this software.
+
+	Free-for-all Licence
+
+The associated software is hereby made available to Recipients with a
+royalty-free licence for its use, reproduction, transfer
+to other parties and amendment for any purpose not excluding
+product development provided that any such use et cetera
+shall be deemed to be acceptance of the following conditions:
+
+	(1) Its Recipients shall ensure that this Notice
+	and all other copyright notices are reproduced
+    upon any copies or amended versions of it;
+
+    (2) Any amended version of it shall be clearly marked to
+    show both the nature of and the organisation responsible
+    for the relevant amendment or amendments;
+
+    (3) Its agreed onward transfer from a Recipient to another
+    party shall be deemed to be that party's acceptance of
+	these conditions;
+
+    (4) the Authors give no warranty or assurance as to its
+    quality or suitability for any purpose and the Authors accept
+    no liability whatsoever in relation to any use to which
+    it may be put.
blob - /dev/null
blob + ae29cdbc8067348f0d7fe3bc5025b5920eb82a87 (mode 644)
--- /dev/null
+++ unix/NOTICE.regexp
@@ -0,0 +1,19 @@
+/*
+ * The authors of this software is Rob Pike.
+ *		Copyright (c) 2002 by Lucent Technologies.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+*/
+
+This is a Unix port of the Plan 9 regular expression library.
+
+Please send comments about the packaging
+to Russ Cox <rsc@swtch.com>.
+
blob - /dev/null
blob + 685d1df502f94e5e314dd2cdf15c8b810547e6f5 (mode 644)
--- /dev/null
+++ unix/NOTICE.utf
@@ -0,0 +1,19 @@
+/*
+ * The authors of this software are Rob Pike and Ken Thompson.
+ *		Copyright (c) 2002 by Lucent Technologies.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+*/
+
+This is a Unix port of the Plan 9 formatted I/O package.
+
+Please send comments about the packaging
+to Russ Cox <rsc@swtch.com>.
+
blob - /dev/null
blob + 0cba0f4d1abae9d803d733ba86f849cd4ff60b2a (mode 644)
--- /dev/null
+++ unix/README
@@ -0,0 +1,2 @@
+This software was packaged for Unix by Russ Cox.
+Please send comments to rsc@swtch.com.
blob - /dev/null
blob + ec909322d1e1ca571527cdb876ddb9f789f16568 (mode 644)
--- /dev/null
+++ unix/fmt.h
@@ -0,0 +1,106 @@
+
+/*
+ * The authors of this software are Rob Pike and Ken Thompson.
+ *              Copyright (c) 2002 by Lucent Technologies.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+ */
+
+#ifndef _FMTH_
+#define _FMTH_ 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdarg.h>
+
+#ifndef _UTFH_
+#include <utf.h>
+#endif
+
+typedef struct Fmt	Fmt;
+struct Fmt{
+	unsigned char	runes;		/* output buffer is runes or chars? */
+	void	*start;			/* of buffer */
+	void	*to;			/* current place in the buffer */
+	void	*stop;			/* end of the buffer; overwritten if flush fails */
+	int	(*flush)(Fmt *);	/* called when to == stop */
+	void	*farg;			/* to make flush a closure */
+	int	nfmt;			/* num chars formatted so far */
+	va_list	args;			/* args passed to dofmt */
+	int	r;			/* % format Rune */
+	int	width;
+	int	prec;
+	unsigned long	flags;
+};
+
+enum{
+	FmtWidth	= 1,
+	FmtLeft		= FmtWidth << 1,
+	FmtPrec		= FmtLeft << 1,
+	FmtSharp	= FmtPrec << 1,
+	FmtSpace	= FmtSharp << 1,
+	FmtSign		= FmtSpace << 1,
+	FmtZero		= FmtSign << 1,
+	FmtUnsigned	= FmtZero << 1,
+	FmtShort	= FmtUnsigned << 1,
+	FmtLong		= FmtShort << 1,
+	FmtVLong	= FmtLong << 1,
+	FmtComma	= FmtVLong << 1,
+	FmtByte		= FmtComma << 1,
+	FmtLDouble	= FmtByte << 1,
+
+	FmtFlag		= FmtLDouble << 1
+};
+
+extern	int	print(char*, ...);
+extern	char*	seprint(char*, char*, char*, ...);
+extern	char*	vseprint(char*, char*, char*, va_list);
+extern	int	snprint(char*, int, char*, ...);
+extern	int	vsnprint(char*, int, char*, va_list);
+extern	char*	smprint(char*, ...);
+extern	char*	vsmprint(char*, va_list);
+extern	int	sprint(char*, char*, ...);
+extern	int	fprint(int, char*, ...);
+extern	int	vfprint(int, char*, va_list);
+
+extern	int	runesprint(Rune*, char*, ...);
+extern	int	runesnprint(Rune*, int, char*, ...);
+extern	int	runevsnprint(Rune*, int, char*, va_list);
+extern	Rune*	runeseprint(Rune*, Rune*, char*, ...);
+extern	Rune*	runevseprint(Rune*, Rune*, char*, va_list);
+extern	Rune*	runesmprint(char*, ...);
+extern	Rune*	runevsmprint(char*, va_list);
+
+extern	int	fmtfdinit(Fmt*, int, char*, int);
+extern	int	fmtfdflush(Fmt*);
+extern	int	fmtstrinit(Fmt*);
+extern	char*	fmtstrflush(Fmt*);
+extern	int	runefmtstrinit(Fmt*);
+
+extern	int	quotestrfmt(Fmt *f);
+extern	void	quotefmtinstall(void);
+extern	int	(*fmtdoquote)(int);
+
+
+extern	int	fmtinstall(int, int (*)(Fmt*));
+extern	int	dofmt(Fmt*, char*);
+extern	int	fmtprint(Fmt*, char*, ...);
+extern	int	fmtvprint(Fmt*, char*, va_list);
+extern	int	fmtrune(Fmt*, int);
+extern	int	fmtstrcpy(Fmt*, char*);
+
+extern	double	fmtstrtod(const char *, char **);
+extern	double	fmtcharstod(int(*)(void*), void*);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
blob - /dev/null
blob + 14b8d4e7925867693d110c320d9c5a67dcd16758 (mode 644)
--- /dev/null
+++ unix/make/Make.Darwin-PowerMacintosh
@@ -0,0 +1,6 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I${PREFIX}/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
blob - /dev/null
blob + 087ed3abab5ea1bb549989f2c6abbae4ce024922 (mode 644)
--- /dev/null
+++ unix/make/Make.FreeBSD-386
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O	# default, can be overriden by Make.$(SYSNAME)
+NAN=nan64.$O
blob - /dev/null
blob + edbdc111a2a0c008975e297c7ca60e46199397a9 (mode 644)
--- /dev/null
+++ unix/make/Make.HP-UX-9000
@@ -0,0 +1,6 @@
+CC=cc
+CFLAGS=-O -c -Ae -I.
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
blob - /dev/null
blob + 74b0252c6eae6331b48ede7fcfa1ed760609d1a3 (mode 644)
--- /dev/null
+++ unix/make/Make.Linux-386
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I.
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O	# default, can be overriden by Make.$(SYSNAME)
+NAN=nan64.$O
blob - /dev/null
blob + 087ed3abab5ea1bb549989f2c6abbae4ce024922 (mode 644)
--- /dev/null
+++ unix/make/Make.NetBSD-386
@@ -0,0 +1,7 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O	# default, can be overriden by Make.$(SYSNAME)
+NAN=nan64.$O
blob - /dev/null
blob + 3d45279bba28dbe69c00f89568c444ab83a4ac72 (mode 644)
--- /dev/null
+++ unix/make/Make.OSF1-alpha
@@ -0,0 +1,6 @@
+CC=cc
+CFLAGS+=-g -c -I.
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
blob - /dev/null
blob + c5fe67b82d86c731a56c101e522e804390e5bd5a (mode 644)
--- /dev/null
+++ unix/make/Make.SunOS-sun4u
@@ -0,0 +1,2 @@
+include Make.SunOS-sun4u-$(CC)
+NAN=nan64.$O
blob - /dev/null
blob + 829301de8649d40632eb809ae512598af11d48c5 (mode 644)
--- /dev/null
+++ unix/make/Make.SunOS-sun4u-cc
@@ -0,0 +1,6 @@
+CC=cc
+CFLAGS+=-g -c -I. -O
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
blob - /dev/null
blob + 5c41594812a4a27eb848d384cbc356d206c0a44b (mode 644)
--- /dev/null
+++ unix/make/Make.SunOS-sun4u-gcc
@@ -0,0 +1,6 @@
+CC=gcc
+CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c
+O=o
+AR=ar
+ARFLAGS=rvc
+NAN=nan64.$O
blob - /dev/null
blob + ed00e3014cd5614c5e4bafd823e05d4734b0d8a4 (mode 644)
--- /dev/null
+++ unix/make/Makefile.BOT
@@ -0,0 +1,47 @@
+.c.$O:
+	$(CC) $(CFLAGS) -I../libutf -I../libfmt -I../libbio -I../libregexp -I$(PREFIX)/include $*.c
+
+%.$O: %.c
+	$(CC) $(CFLAGS) -I../libutf -I../libfmt -I../libbio -I../libregexp -I$(PREFIX)/include $*.c
+
+
+$(OFILES): $(HFILES)
+
+tgz:
+	rm -rf $(NAME)-$(VERSION)
+	mkdir $(NAME)-$(VERSION)
+	cp Makefile Make.* README LICENSE NOTICE *.[ch137] rpm.spec bundle.ports $(TGZFILES) $(NAME)-$(VERSION)
+	tar cf - $(NAME)-$(VERSION) | gzip >$(NAME)-$(VERSION).tgz
+	rm -rf $(NAME)-$(VERSION)
+
+clean:
+	rm -f $(OFILES) $(LIB)
+
+nuke:
+	rm -f $(OFILES) *.tgz *.rpm $(NUKEFILES)
+
+rpm:
+	make tgz
+	cp $(NAME)-$(VERSION).tgz /usr/src/RPM/SOURCES
+	rpm -ba rpm.spec
+	cp /usr/src/RPM/SRPMS/$(NAME)-$(VERSION)-1.src.rpm .
+	cp /usr/src/RPM/RPMS/i586/$(NAME)-$(VERSION)-1.i586.rpm .
+	scp *.rpm rsc@amsterdam.lcs.mit.edu:public_html/software
+
+PORTDIR=/usr/ports/$(PORTPLACE)
+
+ports:
+	make tgz
+	rm -rf $(PORTDIR)
+	mkdir $(PORTDIR)
+	cp $(NAME)-$(VERSION).tgz /usr/ports/distfiles
+	cat bundle.ports | (cd $(PORTDIR) && awk '$$1=="---" && $$3=="---" { ofile=$$2; next} {if(ofile) print >ofile}')
+	(cd $(PORTDIR); make makesum)
+	(cd $(PORTDIR); make)
+	(cd $(PORTDIR); /usr/local/bin/portlint)
+	rm -rf $(PORTDIR)/work
+	shar `find $(PORTDIR)` > ports.shar
+	(cd $(PORTDIR); tar cf - *) | gzip >$(NAME)-$(VERSION)-ports.tgz
+	scp *.tgz rsc@amsterdam.lcs.mit.edu:public_html/software
+
+.phony: all clean nuke install tgz rpm ports
blob - /dev/null
blob + 04cd160162108451eb39108274bd008b5893b89f (mode 644)
--- /dev/null
+++ unix/make/Makefile.CMD
@@ -0,0 +1,5 @@
+
+$(TARG): $(OFILES)
+	$(CC) -o $(TARG) $(OFILES) -L$(PREFIX)/lib -L../libutf -L../libfmt -L../libbio -L../libregexp -lregexp9 -lbio -lfmt -lutf
+
+
blob - /dev/null
blob + 9ebf5606bf0dcb0f1d85b8531987061b7d5b00b3 (mode 644)
--- /dev/null
+++ unix/make/Makefile.LIB
@@ -0,0 +1,4 @@
+$(LIB): $(OFILES)
+	$(AR) $(ARFLAGS) $(LIB) $(OFILES)
+
+NUKEFILES+=$(LIB)
blob - /dev/null
blob + 9c142d44a7be8d74bb3b2b6a32eff62b2a641fff (mode 644)
--- /dev/null
+++ unix/make/Makefile.MID
@@ -0,0 +1,41 @@
+LIB=libutf.a
+VERSION=2.0
+PORTPLACE=devel/libutf
+NAME=libutf
+
+OFILES=\
+	rune.$O\
+	runestrcat.$O\
+	runestrchr.$O\
+	runestrcmp.$O\
+	runestrcpy.$O\
+	runestrdup.$O\
+	runestrlen.$O\
+	runestrecpy.$O\
+	runestrncat.$O\
+	runestrncmp.$O\
+	runestrncpy.$O\
+	runestrrchr.$O\
+	runestrstr.$O\
+	runetype.$O\
+	utfecpy.$O\
+	utflen.$O\
+	utfnlen.$O\
+	utfrrune.$O\
+	utfrune.$O\
+	utfutf.$O\
+
+HFILES=\
+	utf.h\
+
+all: $(LIB)
+
+install: $(LIB)
+	test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
+	install -c -m 0644 isalpharune.3 $(PREFIX)/man/man3/isalpharune.3
+	install -c -m 0644 utf.7 $(PREFIX)/man/man7/utf.7
+	install -c -m 0644 rune.3 $(PREFIX)/man/man3/rune.3
+	install -c -m 0644 runestrcat.3 $(PREFIX)/man/man3/runestrcat.3
+	install -c -m 0644 utf.h $(PREFIX)/include/utf.h
+	install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
+
blob - /dev/null
blob + f6abc8c1d978dea6e7f45e638b92fb2417741042 (mode 644)
--- /dev/null
+++ unix/make/Makefile.TOP
@@ -0,0 +1,20 @@
+
+# this works in gnu make
+SYSNAME:=${shell uname}
+OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'}
+
+# this works in bsd make
+SYSNAME!=uname
+OBJTYPE!=uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'
+
+# the gnu rules will mess up bsd but not vice versa,
+# hence the gnu rules come first.
+
+include Make.$(SYSNAME)-$(OBJTYPE)
+
+PREFIX=/usr/local
+
+NUKEFILES=
+
+TGZFILES=
+
blob - /dev/null
blob + c27b7417b540f1706b18d9e596de89e0e7836f1b (mode 644)
--- /dev/null
+++ unix/make/Makefile.bio
@@ -0,0 +1,38 @@
+LIB=libbio.a
+VERSION=2.0
+PORTPLACE=devel/libbio
+NAME=libbio
+
+OFILES=\
+	bbuffered.$O\
+	bfildes.$O\
+	bflush.$O\
+	bfmt.$O\
+	bgetc.$O\
+	bgetd.$O\
+	bgetrune.$O\
+	binit.$O\
+	boffset.$O\
+	bprint.$O\
+	bputc.$O\
+	bputrune.$O\
+	brdline.$O\
+	brdstr.$O\
+	bread.$O\
+	bseek.$O\
+	bwrite.$O\
+
+HFILES=\
+	bio.h\
+
+all: $(LIB)
+
+install: $(LIB)
+	test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
+	install -m 0644 bio.3 $(PREFIX)/man/man3/bio.3
+	install -m 0644 bio.h $(PREFIX)/include
+	install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
+
+bcat: bcat.$O $(LIB)
+	$(CC) -o bcat bcat.$O $(LIB) -L/usr/local/lib -lfmt -lutf
+
blob - /dev/null
blob + 85e9455f34e122fd74e1005ed5c6e78eb3aabec0 (mode 644)
--- /dev/null
+++ unix/make/Makefile.fmt
@@ -0,0 +1,64 @@
+LIB=libfmt.a
+VERSION=2.0
+PORTPLACE=devel/libfmt
+NAME=libfmt
+
+NUM=\
+	charstod.$O\
+	pow10.$O\
+
+OFILES=\
+	dofmt.$O\
+	dorfmt.$O\
+	errfmt.$O\
+	fltfmt.$O\
+	fmt.$O\
+	fmtfd.$O\
+	fmtfdflush.$O\
+	fmtlock.$O\
+	fmtprint.$O\
+	fmtquote.$O\
+	fmtrune.$O\
+	fmtstr.$O\
+	fmtvprint.$O\
+	fprint.$O\
+	print.$O\
+	runefmtstr.$O\
+	runeseprint.$O\
+	runesmprint.$O\
+	runesnprint.$O\
+	runesprint.$O\
+	runevseprint.$O\
+	runevsmprint.$O\
+	runevsnprint.$O\
+	seprint.$O\
+	smprint.$O\
+	snprint.$O\
+	sprint.$O\
+	strtod.$O\
+	vfprint.$O\
+	vseprint.$O\
+	vsmprint.$O\
+	vsnprint.$O\
+	$(NUM)\
+	$(NAN)\
+
+HFILES=\
+	fmtdef.h\
+	fmt.h\
+
+all: $(LIB)
+
+install: $(LIB)
+	test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
+	install -m 0644 print.3 $(PREFIX)/man/man3/print.3
+	install -m 0644 fmtinstall.3 $(PREFIX)/man/man3/fmtinstall.3
+	install -m 0644 fmt.h $(PREFIX)/include/fmt.h
+	install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
+
+$(NAN).$O: nan.h
+strtod.$O: nan.h
+
+test: $(LIB) test.$O
+	$(CC) -o test test.$O $(LIB) -L$(PREFIX)/lib -lutf
+
blob - /dev/null
blob + f840b18e9054c99f6b883851233628879c9f29b2 (mode 644)
--- /dev/null
+++ unix/make/Makefile.mk
@@ -0,0 +1,45 @@
+TARG=mk
+VERSION=2.0
+PORTPLACE=devel/mk
+NAME=mk
+
+OFILES=\
+	arc.$O\
+	archive.$O\
+	bufblock.$O\
+	env.$O\
+	file.$O\
+	graph.$O\
+	job.$O\
+	lex.$O\
+	main.$O\
+	match.$O\
+	mk.$O\
+	parse.$O\
+	recipe.$O\
+	rule.$O\
+	run.$O\
+	sh.$O\
+	shprint.$O\
+	symtab.$O\
+	var.$O\
+	varsub.$O\
+	word.$O\
+	unix.$O\
+
+HFILES=\
+	mk.h\
+	fns.h\
+
+all: $(TARG)
+
+TGZFILES+=mk.pdf
+
+install: $(LIB)
+	test -d $(PREFIX)/man/man1 || mkdir $(PREFIX)/man/man1
+	test -d $(PREFIX)/doc || mkdir $(PREFIX)/doc
+	install -m 0755 mk $(PREFIX)/bin/mk
+	cat mk.1 | sed 's;DOCPREFIX;$(PREFIX);g' >mk.1a
+	install -m 0644 mk.1a $(PREFIX)/man/man1/mk.1
+	install -m 0644 mk.pdf $(PREFIX)/doc/mk.pdf
+
blob - /dev/null
blob + ec528bd4103bc1be09ec1798cfb9f58b55ef7e65 (mode 644)
--- /dev/null
+++ unix/make/Makefile.regexp
@@ -0,0 +1,35 @@
+LIB=libregexp9.a
+VERSION=2.0
+PORTPLACE=devel/libregexp9
+NAME=libregexp9
+
+OFILES=\
+	regcomp.$O\
+	regerror.$O\
+	regexec.$O\
+	regsub.$O\
+	regaux.$O\
+	rregexec.$O\
+	rregsub.$O\
+	rregaux.$O\
+
+HFILES=\
+	regexp9.h\
+	regcomp.h\
+
+all: $(LIB)
+
+install: $(LIB)
+	test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
+	test -d $(PREFIX)/man/man7 || mkdir $(PREFIX)/man/man7
+	install -m 0644 regexp9.3 $(PREFIX)/man/man3/regexp9.3
+	install -m 0644 regexp9.7 $(PREFIX)/man/man7/regexp9.7
+	install -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
+	install -m 0644 regexp9.h $(PREFIX)/include/regexp9.h
+
+test: test.$O $(LIB)
+	$(CC) -o test test.$O $(LIB) -L/usr/local/lib -lfmt -lutf
+
+test2: test2.$O $(LIB)
+	$(CC) -o test2 test2.$O $(LIB) -L/usr/local/lib -lfmt -lutf
+
blob - /dev/null
blob + 9c142d44a7be8d74bb3b2b6a32eff62b2a641fff (mode 644)
--- /dev/null
+++ unix/make/Makefile.utf
@@ -0,0 +1,41 @@
+LIB=libutf.a
+VERSION=2.0
+PORTPLACE=devel/libutf
+NAME=libutf
+
+OFILES=\
+	rune.$O\
+	runestrcat.$O\
+	runestrchr.$O\
+	runestrcmp.$O\
+	runestrcpy.$O\
+	runestrdup.$O\
+	runestrlen.$O\
+	runestrecpy.$O\
+	runestrncat.$O\
+	runestrncmp.$O\
+	runestrncpy.$O\
+	runestrrchr.$O\
+	runestrstr.$O\
+	runetype.$O\
+	utfecpy.$O\
+	utflen.$O\
+	utfnlen.$O\
+	utfrrune.$O\
+	utfrune.$O\
+	utfutf.$O\
+
+HFILES=\
+	utf.h\
+
+all: $(LIB)
+
+install: $(LIB)
+	test -d $(PREFIX)/man/man3 || mkdir $(PREFIX)/man/man3
+	install -c -m 0644 isalpharune.3 $(PREFIX)/man/man3/isalpharune.3
+	install -c -m 0644 utf.7 $(PREFIX)/man/man7/utf.7
+	install -c -m 0644 rune.3 $(PREFIX)/man/man3/rune.3
+	install -c -m 0644 runestrcat.3 $(PREFIX)/man/man3/runestrcat.3
+	install -c -m 0644 utf.h $(PREFIX)/include/utf.h
+	install -c -m 0644 $(LIB) $(PREFIX)/lib/$(LIB)
+
blob - /dev/null
blob + 4f63a77ac5610b0b015b3cd40ffdb4cc3e166945 (mode 644)
--- /dev/null
+++ unix/mkfile
@@ -0,0 +1,52 @@
+bio fmt mk regexp utf:V:
+	case $target in
+	mk) t=mk ;;
+	regexp) t=libregexp ;;
+	*) t=lib$target ;;
+	esac
+	mkdir $t || true
+	rm $t/* || true
+	cd $t
+	mk -f ../mkfile.$target
+	case $target in
+	bio) d=$PLAN9/src/$t;;
+	regexp) d=$PLAN9/src/$t;;
+	fmt) d=$PLAN9/src/lib9/$target ;;
+	utf) d=$PLAN9/src/lib9/$target ;;
+	mk) d=$PLAN9/src/cmd/mk ;;
+	esac
+	for i in `ls -p $d/*.c`
+	do
+		if [ ! -f $i ]
+		then
+			echo missing $i
+		fi
+	done
+	make
+	for i in `ls *.c`
+	do
+		if [ ! -f `echo $i | sed 's/.c$/.o/'` ]
+		then
+			echo not building $i
+		fi
+	done
+	cd ..
+	rm $t/* || true
+	cd $t
+	mk -f ../mkfile.$target
+	
+lib%.tgz:
+	mk $stem
+	tar cf - lib$stem |gzip >lib$stem.tgz
+
+libregexp9.tgz:
+	mk regexp
+	tar cf - libregexp | gzip >libregexp9.tgz
+
+mk.tgz:
+	mk mk
+	tar cf - mk | gzip >mk.tgz
+
+mk-all.tgz:
+	tar cf - Makefile libutf libfmt libbio libregexp mk | gzip >mk-all.tgz
+
blob - /dev/null
blob + 5e8cbc0a4b112cd5bc2d8efe7b60ee4eff169c5b (mode 644)
--- /dev/null
+++ unix/mkfile.bio
@@ -0,0 +1,42 @@
+MAKEALL=`{cd ../make; ls Make.*}
+TARG=\
+	$MAKEALL\
+	NOTICE\
+	README\
+	Makefile\
+	bio.3\
+	bio.h\
+	lib9.h\
+	`{ls -p $PLAN9/src/libbio/*.c}\
+
+all:V: $TARG
+
+%: $PLAN9/include/%
+	cp $prereq $target
+
+%: $PLAN9/src/libbio/%
+	cp $prereq $target
+
+%: $PLAN9/man/man1/%
+	cp $prereq $target
+
+%: $PLAN9/man/man3/%
+	cp $prereq $target
+
+%: $PLAN9/man/man7/%
+	cp $prereq $target
+
+lib9.h: $PLAN9/src/libbio/lib9.std.h
+	cp $prereq $target
+
+%: ../make/%
+	cp $prereq $target
+
+Makefile:D: ../make/Makefile.TOP ../make/Makefile.bio ../make/Makefile.LIB ../make/Makefile.BOT
+	cat $prereq >$target
+
+README: ../README
+	cp $prereq $target
+
+NOTICE: ../NOTICE.bio
+	cp $prereq $target
blob - /dev/null
blob + 13e97d68cd5425b6b3ea4cabab46d58fac6961ea (mode 644)
--- /dev/null
+++ unix/mkfile.fmt
@@ -0,0 +1,45 @@
+MAKEALL=`{cd ../make; ls Make.*}
+TARG=\
+	$MAKEALL\
+	NOTICE\
+	README\
+	Makefile\
+	`{ls -p $PLAN9/src/lib9/fmt/*.c}\
+	fmt.h\
+	fmtdef.h\
+	nan.h\
+
+all:V: $TARG
+
+%: $PLAN9/include/%
+	cp $prereq $target
+
+%: $PLAN9/src/lib9/fmt/%
+	cp $prereq $target
+
+%: $PLAN9/man/man1/%
+	cp $prereq $target
+
+%: $PLAN9/man/man3/%
+	cp $prereq $target
+
+%: $PLAN9/man/man7/%
+	cp $prereq $target
+
+%: ../make/%
+	cp $prereq $target
+
+Makefile:D: ../make/Makefile.TOP ../make/Makefile.fmt ../make/Makefile.LIB ../make/Makefile.BOT
+	cat $prereq >$target
+
+README: ../README
+	cp $prereq $target
+
+NOTICE: ../NOTICE.fmt
+	cp $prereq $target
+
+fmt.h: ../fmt.h
+	cp $prereq $target
+
+fmt.c: $PLAN9/src/lib9/fmt/fmt.c
+	cat $prereq | sed "/'u',.*__flagfmt/ s/__flagfmt/__ifmt/" >$target
blob - /dev/null
blob + 6d650fe1801d5035ed363caa8433abd8dccadbb4 (mode 644)
--- /dev/null
+++ unix/mkfile.mk
@@ -0,0 +1,39 @@
+MAKEALL=`{cd ../make; ls Make.*}
+TARG=\
+	$MAKEALL\
+	NOTICE\
+	README\
+	Makefile\
+	mk.1\
+	mk.h\
+	fns.h\
+	`{ls -p $PLAN9/src/cmd/mk/*.c}\
+
+all:V: $TARG
+
+%: $PLAN9/include/%
+	cp $prereq $target
+
+%: $PLAN9/src/cmd/mk/%
+	cp $prereq $target
+
+%: $PLAN9/man/man1/%
+	cp $prereq $target
+
+%: $PLAN9/man/man3/%
+	cp $prereq $target
+
+%: $PLAN9/man/man7/%
+	cp $prereq $target
+
+%: ../make/%
+	cp $prereq $target
+
+Makefile:D: ../make/Makefile.TOP ../make/Makefile.mk ../make/Makefile.CMD ../make/Makefile.BOT
+	cat $prereq >$target
+
+README: ../README
+	cp $prereq $target
+
+NOTICE: ../NOTICE.mk
+	cp $prereq $target
blob - /dev/null
blob + de813087196b61c32d69d9893a77cdd87c9bc9a2 (mode 644)
--- /dev/null
+++ unix/mkfile.regexp
@@ -0,0 +1,44 @@
+MAKEALL=`{cd ../make; ls Make.*}
+TARG=\
+	$MAKEALL\
+	NOTICE\
+	README\
+	Makefile\
+	regexp9.3\
+	regexp9.7\
+	regexp9.h\
+	regcomp.h\
+	lib9.h\
+	`{ls -p $PLAN9/src/libregexp/*.c}\
+
+all:V: $TARG
+
+%: $PLAN9/include/%
+	cp $prereq $target
+
+%: $PLAN9/src/libregexp/%
+	cp $prereq $target
+
+%: $PLAN9/man/man1/%
+	cp $prereq $target
+
+%: $PLAN9/man/man3/%
+	cp $prereq $target
+
+%: $PLAN9/man/man7/%
+	cp $prereq $target
+
+%: ../make/%
+	cp $prereq $target
+
+Makefile:D: ../make/Makefile.TOP ../make/Makefile.regexp ../make/Makefile.LIB ../make/Makefile.BOT
+	cat $prereq >$target
+
+README: ../README
+	cp $prereq $target
+
+NOTICE: ../NOTICE.regexp
+	cp $prereq $target
+
+lib9.h: $PLAN9/src/libregexp/lib9.h
+	cp $prereq $target
blob - /dev/null
blob + b611b5f0fd26c8233a7f891adb43ee2c94ba6f99 (mode 644)
--- /dev/null
+++ unix/mkfile.utf
@@ -0,0 +1,42 @@
+MAKEALL=`{cd ../make; ls Make.*}
+TARG=\
+	$MAKEALL\
+	NOTICE\
+	README\
+	Makefile\
+	`{ls -p $PLAN9/src/lib9/utf/*.c}\
+	utf.h\
+	utfdef.h\
+
+all:V: $TARG
+
+%: $PLAN9/include/%
+	cp $prereq $target
+
+%: $PLAN9/src/lib9/utf/%
+	cp $prereq $target
+
+%: $PLAN9/man/man1/%
+	cp $prereq $target
+
+%: $PLAN9/man/man3/%
+	cp $prereq $target
+
+%: $PLAN9/man/man7/%
+	cp $prereq $target
+
+%: ../make/%
+	cp $prereq $target
+
+Makefile:D: ../make/Makefile.TOP ../make/Makefile.utf ../make/Makefile.LIB ../make/Makefile.BOT
+	cat $prereq >$target
+
+README: ../README
+	cp $prereq $target
+
+NOTICE: ../NOTICE.utf
+	cp $prereq $target
+
+utf.h: ../utf.h
+	cp $prereq $target
+
blob - /dev/null
blob + 833d9d257492548b91bdc114e1b02cc02adef225 (mode 644)
--- /dev/null
+++ unix/utf.h
@@ -0,0 +1,57 @@
+#ifndef _UTFH_
+#define _UTFH_ 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef unsigned short Rune;	/* 16 bits */
+
+enum
+{
+	UTFmax		= 3,		/* maximum bytes per rune */
+	Runesync	= 0x80,		/* cannot represent part of a UTF sequence (<) */
+	Runeself	= 0x80,		/* rune and UTF sequences are the same (<) */
+	Runeerror	= 0x80,		/* decoding error in UTF */
+};
+
+/*
+ * rune routines
+ */
+extern	int	runetochar(char*, Rune*);
+extern	int	chartorune(Rune*, char*);
+extern	int	runelen(long);
+extern	int	runenlen(Rune*, int);
+extern	int	fullrune(char*, int);
+extern	int	utflen(char*);
+extern	int	utfnlen(char*, long);
+extern	char*	utfrune(char*, long);
+extern	char*	utfrrune(char*, long);
+extern	char*	utfutf(char*, char*);
+extern	char*	utfecpy(char*, char*, char*);
+
+extern	Rune*	runestrcat(Rune*, Rune*);
+extern	Rune*	runestrchr(Rune*, Rune);
+extern	int	runestrcmp(Rune*, Rune*);
+extern	Rune*	runestrcpy(Rune*, Rune*);
+extern	Rune*	runestrncpy(Rune*, Rune*, long);
+extern	Rune*	runestrecpy(Rune*, Rune*, Rune*);
+extern	Rune*	runestrdup(Rune*);
+extern	Rune*	runestrncat(Rune*, Rune*, long);
+extern	int	runestrncmp(Rune*, Rune*, long);
+extern	Rune*	runestrrchr(Rune*, Rune);
+extern	long	runestrlen(Rune*);
+extern	Rune*	runestrstr(Rune*, Rune*);
+
+extern	Rune	tolowerrune(Rune);
+extern	Rune	totitlerune(Rune);
+extern	Rune	toupperrune(Rune);
+extern	int	isalpharune(Rune);
+extern	int	islowerrune(Rune);
+extern	int	isspacerune(Rune);
+extern	int	istitlerune(Rune);
+extern	int	isupperrune(Rune);
+
+#ifdef cplusplus
+}
+#endif
+#endif