Convert boot/ and commands/ over to bsdmake

This commit is contained in:
Arun Thomas 2010-05-12 16:28:54 +00:00
parent ce386974bc
commit 5706670029
877 changed files with 10425 additions and 41539 deletions

View file

@ -53,6 +53,8 @@ commands:
cd commands && $(MAKE) all cd commands && $(MAKE) all
depend:: depend::
cd boot && $(MAKE) $@
cd commands && $(MAKE) $@
cd kernel && $(MAKE) $@ cd kernel && $(MAKE) $@
cd servers && $(MAKE) $@ cd servers && $(MAKE) $@
cd drivers && $(MAKE) $@ cd drivers && $(MAKE) $@
@ -71,6 +73,7 @@ install::
cd boot && $(MAKE) all install cd boot && $(MAKE) all install
cd man && $(MAKE) all install makedb cd man && $(MAKE) all install makedb
cd commands && $(MAKE) all install cd commands && $(MAKE) all install
cd share && $(MAKE) all install
cd tools && $(MAKE) all install cd tools && $(MAKE) all install
cd servers && $(MAKE) all install cd servers && $(MAKE) all install
cd drivers && $(MAKE) all install cd drivers && $(MAKE) all install

View file

@ -1,118 +1,75 @@
# Makefile for the boot monitor package. # Makefile for the boot monitor package.
SYS = .. PROGS= bootblock cdbootblock bootexec boot masterboot \
jumpboot installboot edparams
CC = exec cc SRCS.bootblock= bootblock.s
CC86 = exec cc -mi86 -Was-ncc CPPFLAGS.bootblock.s= ${I86CPPFLAGS}
CFLAGS = -I$(SYS) LDFLAGS.bootblock= ${I86LDFLAGS}
LIBS = -lsys BINDIR.bootblock= /usr/mdec
LD = $(CC) -s -.o MAN.bootblock=
LD86 = $(CC86) -.o
BIN = /usr/bin
MDEC = /usr/mdec
all: bootblock cdbootblock boot edparams masterboot jumpboot installboot addaout SRCS.cdbootblock= cdbootblock.s
dos: boot.com mkfile.com CPPFLAGS.cdbootblock.s= ${I86CPPFLAGS} -DCDBOOT
LDFLAGS.cdbootblock= ${I86LDFLAGS}
BINDIR.cdbootblock= /usr/mdec
MAN.cdbootblock=
bootblock: bootblock.s SRCS.bootexec= boothead.s boot.c bootimage.c rawfs86.c
$(LD86) -com -o $@ bootblock.s CPPFLAGS.boothead.s= ${I86CPPFLAGS}
CPPFLAGS.boot.c= ${I86CPPFLAGS}
CPPFLAGS.bootimage.c= ${I86CPPFLAGS}
CPPFLAGS.rawfs86.c= ${I86CPPFLAGS}
LDFLAGS.bootexec= ${I86LDFLAGS}
DPADD.bootexec= ${LIBSYS}
LDADD.bootexec= -lsys
BINDIR.bootexec= /usr/mdec
MAN.bootexec=
cdbootblock: bootblock.s BINDIR.boot= /usr/mdec
$(LD86) -com -o $@ bootblock.s -DCDBOOT MAN.boot=
masterboot: masterboot.s SRCS.masterboot= masterboot.s
$(LD86) -com -o $@ masterboot.s CPPFLAGS.masterboot.s= ${I86CPPFLAGS}
LDFLAGS.masterboot= ${I86LDFLAGS}
BINDIR.masterboot= /usr/mdec
MAN.masterboot=
jumpboot: jumpboot.s SRCS.jumpboot= jumpboot.s
$(LD86) -com -o $@ jumpboot.s CPPFLAGS.jumpboot.s= ${I86CPPFLAGS}
LDFLAGS.jumpboot= ${I86LDFLAGS}
BINDIR.jumpboot= /usr/mdec
MAN.jumpboot=
boot.o: boot.c SRCS.installboot= installboot.c rawfs.c
$(CC86) $(CFLAGS) -c boot.c BINDIR.installboot= /usr/bin
MAN.installboot=
bootimage.o: bootimage.c SRCS.edparams= edparams.c rawfs.c
$(CC86) $(CFLAGS) -c bootimage.c CPPFLAGS.edparams.c= -DUNIX
BINDIR.edparams= /usr/bin
MAN.edparams=
rawfs86.o: rawfs.c rawfs.o rawfs86.c: rawfs.c
ln -f rawfs.c rawfs86.c ln -f rawfs.c rawfs86.c
$(CC86) $(CFLAGS) -c rawfs86.c
rm rawfs86.c
-cmp -s rawfs.o rawfs86.o && ln -f rawfs.o rawfs86.o
boot: boothead.s boot.o bootimage.o rawfs86.o edparams.c: boot.c
$(LD86) -o boot boothead.s boot.o bootimage.o rawfs86.o $(LIBS)
install -S 22kb boot
edparams.o: boot.c
ln -f boot.c edparams.c ln -f boot.c edparams.c
$(CC) $(CFLAGS) -DUNIX -c edparams.c
rm edparams.c
edparams: edparams.o rawfs.o cdbootblock.s: bootblock.s
$(CC) $(CFLAGS) $(STRIP) -o $@ edparams.o rawfs.o ln -f bootblock.s cdbootblock.s
install -S 16kw edparams
dosboot.o: boot.c boot: bootexec
$(CC86) $(CFLAGS) -DDOS -o $@ -c boot.c install -S 22kb bootexec
cp bootexec boot
doshead.o: doshead.s CPPFLAGS= -I${MINIXSRCDIR}
$(CC) -mi386 -o $@ -c doshead.s AFLAGS= -I${MINIXSRCDIR}
I86CPPFLAGS= -mi86 -Was-ncc
I86LDFLAGS= -mi86 -Was-ncc -.o -com
dosboot: doshead.o dosboot.o bootimage.o rawfs86.o STRIPFLAG= -s
$(LD86) -com -o $@ \
doshead.o dosboot.o bootimage.o rawfs86.o $(LIBS)
boot.com: dosboot CLEANFILES+= rawfs86.c edparams.c cdbootblock.s
exec sh a.out2com dosboot boot.com
mkfile: mkfhead.s mkfile.c .include <minix.prog.mk>
$(LD) -.o -mi86 -com -o $@ mkfhead.s mkfile.c $(LIBS)
mkfile.com: mkfile
exec sh a.out2com mkfile mkfile.com
installboot: installboot.o rawfs.o
$(CC) $(STRIP) -o installboot installboot.o rawfs.o
install -S 6kw installboot
addaout: addaout.o
$(CC) -o addaout addaout.o
installboot.o bootimage.o: image.h
boot.o bootimage.o dosboot.o edparams.o: boot.h
rawfs.o rawfs86.o installboot.o boot.o bootimage.o: rawfs.h
install: $(MDEC)/bootblock $(MDEC)/boot $(MDEC)/masterboot \
$(MDEC)/jumpboot $(BIN)/installboot $(BIN)/edparams
dosinstall: $(MDEC)/boot.com $(MDEC)/mkfile.com
$(MDEC)/bootblock: bootblock
install -cs -o bin -m 644 $? $@
$(MDEC)/boot: boot
install -cs -o bin -m 644 $? $@
$(MDEC)/boot.com: boot.com
install -c -m 644 $? $@
$(MDEC)/mkfile.com: mkfile.com
install -c -m 644 $? $@
$(MDEC)/masterboot: masterboot
install -cs -o bin -m 644 $? $@
$(MDEC)/jumpboot: jumpboot
install -cs -o bin -m 644 $? $@
$(BIN)/installboot: installboot
install -cs -o bin $? $@
$(BIN)/addaout: addaout
install -cs -o bin $? $@
$(BIN)/edparams: edparams
install -cs -o bin $? $@
clean:
rm -f *.bak *.o
rm -f cdbootblock bootblock addaout installboot boot masterboot jumpboot edparams
rm -f dosboot boot.com mkfile mkfile.com

View file

View file

@ -0,0 +1,4 @@
SCRIPTS= DESCRIBE.sh
MAN=
.include <minix.prog.mk>

0
commands/scripts/M.sh → commands/M/M.sh Executable file → Normal file
View file

7
commands/M/Makefile Normal file
View file

@ -0,0 +1,7 @@
SCRIPTS= M.sh
BINDIR= /bin
MAN=
LINKS+= ${BINDIR}/M ${BINDIR}/U
.include <minix.prog.mk>

View file

View file

@ -0,0 +1,4 @@
SCRIPTS= MAKEDEV.sh
MAN=
.include <minix.prog.mk>

View file

@ -1,31 +1,44 @@
# Makefile for commands. # Makefile for commands.
MAKE = exec make -$(MAKEFLAGS) .include <minix.own.mk>
BZIP2=bzip2-1.0.3
FLEX=flex-2.5.4
SMALLPROGRAMS=`arch` aal advent ash autil awk byacc cawf cron de dhcpd dis88 elle elvis ftp101 ftpd200 ibm indent m4 make mdb mined patch pax profile ps reboot rlogind scripts sh simple syslogd swifi talk talkd telnet telnetd urlget yap zoneinfo SUBDIR= aal add_route adduser advent arp ash at autil awk \
backup badblocks banner basename bigmake binpackage \
usage: binpackages binsizes bzip2 bzip2recover cal calendar \
@echo "Usage: make all # Compile all commands" >&2 cat cawf cd cdiff cdprobe cgrep checkhier chmem \
@echo " make install # Install the result (run as bin!)" >&2 chmod chown chroot ci cksum cleantmp clear cmp co \
@echo " make clean # Delete .o files and other junk" >&2 comm compress cp crc cron crontab cut datasizes date \
dd de decomp16 DESCRIBE dev2name devsize df dhcpd \
all: dhrystone diff dirname dis88 du dumpcore easypack \
cd zmodem && make ed eject elle elvis env expand factor fgrep file \
cd $(BZIP2) && /bin/sh build build find finger fingerd fix fold format fortune fsck \
set -e; for p in $(SMALLPROGRAMS); do ( cd $$p && make all ); done fsck1 ftp101 ftpd200 getty gomoku grep head host \
hostaddr id ifconfig ifdef indent install \
install: intr ipcrm ipcs irdpd isoread join kill last leave \
set -e; for p in $(SMALLPROGRAMS); do ( cd $$p && make install ); done lex life loadkeys loadramdisk logger login look lp \
cd zmodem && make install lpd ls lspci M m4 mail make MAKEDEV makewhatis man \
cd $(BZIP2) && make install mdb mesg mined mkdep mkdir mkdist mkfifo mkfs mknod \
cd $(FLEX) && sh build mkproto modem mount mt netconf newroot nice nm nohup \
nonamed od packit packman passwd paste patch pax \
clean:: ping postinstall poweroff pr prep printf printroot \
cd $(BZIP2) && make clean profile progressbar proto pr_routes ps pwd pwdauth \
cd zmodem && make clean ramdisk rarpd rawspeed rcp rdate readall readclock \
if [ -f $(FLEX)/Makefile ]; then cd $(FLEX) && make distclean ; fi readfs reboot remsync rev rget rlogin rlogind rmdir \
for p in $(SMALLPROGRAMS); do ( cd $$p && make clean ); done rotate rsh rshd sed setup shar size \
sleep slip sort spell split srccrc stat strings strip \
stty su sum svclog swapfs swifi sync synctree sysenv \
syslogd tail talk talkd tcpd tcpdp tcpstat tee telnet \
telnetd term termcap tget time tinyhalt top touch tr \
truncate tsort ttt tty udpstat umount uname unexpand \
uniq unstack update urlget uud uue version vol wc \
whatis whereis which who whoami write writeisofs \
xargs yacc yap yes zdump zic zmodem
.if ${ARCH} == "i386"
SUBDIR+= atnormalize dosread fdisk loadfont \
mixer autopart part partition playwave postmort \
recwave repartition screendump
SUBDIR+= acd asmconv gas2ack
.endif
.include <minix.subdir.mk>

2
commands/Makefile.inc Normal file
View file

@ -0,0 +1,2 @@
CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
BINDIR?=/usr/bin

View file

@ -1,56 +1,12 @@
# Makefile for aal # Makefile for aal
CC=exec cc PROG= aal
CFLAGS=-I. -wo -DAAL -DSTB -DNDEBUG -DDISTRIBUTION -D_POSIX_SOURCE -D_MINIX SRCS= archiver.c print.c rd.c rd_arhdr.c rd_unsig2.c sprint.c \
LDFLAGS=-i wr_arhdr.c wr_bytes.c wr_int2.c wr_long.c wr_ranlib.c \
format.c rd_bytes.c system.c write.c long2str.c
CPPFLAGS+= -I${.CURDIR} -wo -DAAL -DSTB -DNDEBUG -DDISTRIBUTION
all: aal LINKS+= ${BINDIR}/aal ${BINDIR}/ar
MAN=
OFILES= archiver.o \ .include <minix.prog.mk>
print.o \
rd.o \
rd_arhdr.o \
rd_unsig2.o \
sprint.o \
wr_arhdr.o \
wr_bytes.o \
wr_int2.o \
wr_long.o \
wr_ranlib.o \
format.o \
rd_bytes.o \
system.o \
write.o \
long2str.o
aal: $(OFILES)
$(CC) $(LDFLAGS) -o aal $(OFILES)
install -S 512k $@
install: /usr/bin/aal /usr/bin/ar
/usr/bin/aal: aal
install -cs -o bin aal $@
/usr/bin/ar: /usr/bin/aal
install -l h $? $@
archiver.o:
print.o:
rd.o:
rd_arhdr.o:
rd_unsig2.o:
sprint.o:
wr_arhdr.o:
wr_bytes.o:
wr_int2.o:
wr_long.o:
wr_ranlib.o:
format.o:
rd_bytes.o:
system.o:
write.o:
long2str.o:
clean:
rm -f *.o core *.bak aal

View file

@ -1,3 +0,0 @@
#!/bin/sh
make clean
make && make install

13
commands/acd/Makefile Normal file
View file

@ -0,0 +1,13 @@
# Makefile for acd
.include <minix.own.mk>
PROG= acd
CPPFLAGS+= -DARCH=\"`arch`\" -DDESCR=\"/usr/lib/descr\"
LINKS+= ${BINDIR}/acd ${BINDIR}/cc
FILESDIR= /usr/lib
FILES= acd.descr
FILESNAME= descr
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,6 @@
PROG= add_route
MAN=
LINKS+= ${BINDIR}/add_route ${BINDIR}/del_route
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
SCRIPTS= adduser.sh
MAN=
.include <minix.prog.mk>

View file

View file

@ -1,63 +1,28 @@
# Makefile for advent # Makefile for advent
# Where to put the adventure text files, and the binary executable. PROG= advent
# Need the trailing "/"s. SRCS= advent.c database.c english.c initial.c itverb.c score.c \
TEXTDIR = /usr/lib/advent/ travel.c turn.c utility.c verb.c vocab.c
BINDIR = /usr/bin
# Flags you may want to add to CFLAGS: # Where to put the adventure text files
# -DHAS_STDC=0 or 1 We have Standard C. Default=1 iff __STDC__ is nonzero. # Need the trailing "/" on TEXTDIR
TEXTDIR= /usr/lib/advent/
FILESDIR= ${TEXTDIR}
DATFILES= advent1.dat advent2.dat advent3.dat advent4.dat
FILES= ${DATFILES}
MAN=
CC = exec cc database.o: advtext.h
CFLAGS = -D_POSIX_SOURCE
LDFLAGS = -i
OBJS = advent.o database.o english.o initial.o itverb.o score.o\
travel.o turn.o utility.o verb.o vocab.o
DAT = advent1.dat advent2.dat advent3.dat advent4.dat
INSTDAT = $(TEXTDIR)advent1.dat $(TEXTDIR)advent2.dat \
$(TEXTDIR)advent3.dat $(TEXTDIR)advent4.dat
all: $(DAT) advent
install: $(TEXTDIR) $(INSTDAT) $(BINDIR)/advent
$(TEXTDIR):
install -d -o bin $(TEXTDIR)
$(TEXTDIR)advent1.dat: advent1.dat
install -c -o bin $? $@
$(TEXTDIR)advent2.dat: advent2.dat
install -c -o bin $? $@
$(TEXTDIR)advent3.dat: advent3.dat
install -c -o bin $? $@
$(TEXTDIR)advent4.dat: advent4.dat
install -c -o bin $? $@
$(BINDIR)/advent: advent
install -cs -o bin $? $@
advent: $(OBJS)
$(CC) $(LDFLAGS) -o advent $(OBJS)
setup: setup.c advent.h setup: setup.c advent.h
$(CC) $(CFLAGS) $(LDFLAGS) -o setup setup.c ${CC} ${CPPFLAGS} ${LDFLAGS} -o setup setup.c
advtext.h advent1.dat advent2.dat advent3.dat advent4.dat: \ advtext.h advent1.dat advent2.dat advent3.dat advent4.dat: \
setup advent1.txt advent2.txt advent3.txt advent4.txt setup advent1.txt advent2.txt advent3.txt advent4.txt
./setup ./setup
advent.o: advent.h advdec.h advent.c CPPFLAGS.advent.c= -DTEXTDIR='"${TEXTDIR}"'
$(CC) -c $(CFLAGS) -DTEXTDIR='"$(TEXTDIR)"' advent.c
database.o: advent.h advdec.h advtext.h CLEANFILES+= ${DATFILES} advtext.h setup
travel.o: advent.h advdec.h advcave.h
initial.o english.o itverb.o score.o turn.o utility.o\
verb.o vocab.o: advent.h advdec.h
clean: .include <minix.prog.mk>
@rm -f *.o *.BAK *.dat advtext.h core advent setup

View file

@ -1,3 +0,0 @@
#!/bin/sh
make clean
make && make install

5
commands/arp/Makefile Normal file
View file

@ -0,0 +1,5 @@
PROG= arp
BINMODE= 4755
MAN=
.include <minix.prog.mk>

View file

@ -1,33 +1,34 @@
# Makefile for ash. # Makefile for ash.
SRCS= alias.c builtins.c cd.c error.c eval.c exec.c expand.c histedit.c \ .include <minix.own.mk>
input.c \
jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c nodes.c \
options.c parser.c redir.c setmode.c show.c signames.c syntax.c \
trap.c \
output.c var.c
OBJS= alias.o builtins.o cd.o error.o eval.o exec.o expand.o histedit.o \ YHEADER=1
input.o \ PROG= sh
jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o nodes.o \
options.o parser.o redir.o setmode.o show.o signames.o syntax.o \
trap.o \
output.o var.o init.o \
bltin/echo.o bltin/expr.o bltin/operators.o bltin/regexp.o \
arith.o arith_lex.o
LEX=flex SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
YACC=/usr/bin/yacc histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
.c.o: mystring.c options.c output.c parser.c redir.c show.c \
$(CC) $(CFLAGS) -c $< -o $@ trap.c var.c setmode.c expr.c regexp.c
GENSRCS= builtins.c init.c nodes.c syntax.c operators.c signames.c
GENHDRS= builtins.h nodes.h syntax.h token.h operators.h signames.h
SRCS= ${SHSRCS} ${GENSRCS}
DPSRCS+=${GENHDRS}
BINDIR= /bin
MAN=
DPADD+= ${LIBL} ${LIBEDIT}
LDADD+= -ll -ledit
LFLAGS= -8 # 8-bit lex scanner for arithmetic
YFLAGS= -d
# The .depend file can get references to these temporary files
.OPTIONAL: lex.yy.c y.tab.c
# Enable this line to disable command line editing # Enable this line to disable command line editing
#EDIT=-DNO_HISTORY #EDIT=-DNO_HISTORY
# Enable this line to use the editline library instead of libedit # Enable this line to use the editline library instead of libedit
EDIT=-DEDITLINE EDIT=-DEDITLINE
EDITLIB=-ledit
FLEXLIB=-lfl
# Enable this line if your system does not have a <paths.h> # Enable this line if your system does not have a <paths.h>
NO_PATHS_H=-DNO_PATHS_H NO_PATHS_H=-DNO_PATHS_H
@ -36,91 +37,50 @@ NO_PATHS_H=-DNO_PATHS_H
NO_JOBS=-DJOBS=0 NO_JOBS=-DJOBS=0
MKB_NO_JOBS=-j MKB_NO_JOBS=-j
CPPFLAGS= -DSHELL -I. -D_MINIX $(EDIT) $(NO_PATHS_H) $(NO_JOBS) CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
CFLAGS= $(OPT) $(CPPFLAGS) CPPFLAGS+=${EDIT} ${NO_PATHS_H} ${NO_JOBS}
LIBS= $(EDITLIB) $(FLEXLIB)
CLEANFILES= $(OBJS) \ .PATH: ${.CURDIR}/bltin
arith.c arith_y.h arith_lex.c builtins.c builtins.h init.c \
mkinit mknodes mksignames mksyntax \
nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.h \
bltin/operators.h bltin/operators.c
all: sh CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
mksyntax mksyntax.o mksignames mksignames.o
CLEANFILES+= ${GENSRCS} ${GENHDRS} y.tab.h
sh: $(OBJS) build-tools: mkinit mknodes mksyntax mksignames
$(CC) $(CFLAGS) -fnone -o sh $(OBJS) $(LIBS)
install -S 136k sh
install: /usr/bin/ash /usr/bin/sh /bin/sh /bin/bigsh .ORDER: builtins.c builtins.h
builtins.c builtins.h: mkbuiltins builtins.def shell.h
cd ${.CURDIR}; sh mkbuiltins ${MKB_NO_JOBS} ${.OBJDIR} shell.h builtins.def
/usr/bin/ash: sh init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
install -cs -o bin $> $@ redir.c trap.c var.c
./mkinit ${.ALLSRC:S/^mkinit$//}
/usr/bin/sh: /usr/bin/ash mkinit: mkinit.o
install -l h $> $@ mknodes: mknodes.o
mksyntax: mksyntax.o
/bin/sh: /usr/bin/ash mksignames: mksignames.o
install -l h -cs $> $@
/bin/bigsh: /usr/bin/ash
install -S 6600k -l h -cs $> $@
clean:
rm -f $(CLEANFILES) sh core
parser.o: token.def
token.def: mktokens
sh mktokens
arith.c: arith.y
$(YACC) -d $<
mv y.tab.c $@
mv y.tab.h arith_y.h
arith_lex.c: arith_lex.l
builtins.c builtins.h: builtins.def shell.h
sh mkbuiltins $(MKB_NO_JOBS) . shell.h builtins.def
init.c: mkinit $(SRCS)
./mkinit $(SRCS)
mkinit: mkinit.c
$(CC) $(CFLAGS) mkinit.c -o $@
.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat nodes.c nodes.h: mknodes nodetypes nodes.c.pat
./mknodes nodetypes nodes.c.pat ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
mknodes: mknodes.c
$(CC) $(CFLAGS) mknodes.c -o $@
signames.c signames.h: mksignames
./mksignames
mksignames: mksignames.c
$(CC) $(CFLAGS) mksignames.c -o $@
.ORDER: syntax.c syntax.h
syntax.c syntax.h: mksyntax syntax.c syntax.h: mksyntax
./mksyntax ./mksyntax
mksyntax: mksyntax.c parser.h token.h: mktokens
$(CC) $(CFLAGS) mksyntax.c -o $@ sh ${.CURDIR}/mktokens
bltin/operators.h: bltin/mkexpr bltin/unary_op bltin/binary_op .ORDER: signames.c signames.h
cd bltin && sh mkexpr unary_op binary_op signames.c signames.h: mksignames
./mksignames
bltin/operators.c: bltin/mkexpr bltin/unary_op bltin/binary_op .ORDER: operators.c operators.h
cd bltin && sh mkexpr unary_op binary_op operators.c operators.h: mkexpr unary_op binary_op
sh bltin/mkexpr bltin/unary_op bltin/binary_op
# Dependencies you say? This will have to do. arith.h: arith.c
$(OBJS): error.h eval.h exec.h expand.h init.h input.h \ arith.c: arith.y
jobs.h machdep.h mail.h main.h memalloc.h mystring.h options.h \
output.h parser.h redir.h shell.h trap.h var.h \
builtins.h nodes.h signames.h syntax.h
bltin/expr.o bltin/operators.o: bltin/operators.h .include <minix.prog.mk>
#
# $PchId: Makefile,v 1.4 2006/05/22 12:40:46 philip Exp $

View file

@ -49,7 +49,6 @@ __FBSDID("$FreeBSD: src/bin/sh/alias.c,v 1.18 2004/04/06 20:06:51 markm Exp $");
#include "mystring.h" #include "mystring.h"
#include "alias.h" #include "alias.h"
#include "options.h" /* XXX for argptr (should remove?) */ #include "options.h" /* XXX for argptr (should remove?) */
#include "builtins.h"
#define ATABSIZE 39 #define ATABSIZE 39

View file

@ -1,39 +0,0 @@
/*-
* Copyright (c) 1995
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)arith.h 1.1 (Berkeley) 5/4/95
* $FreeBSD: src/bin/sh/arith.h,v 1.9 2004/04/06 20:06:51 markm Exp $
*/
int arith(char *);
int arith_assign(char *, arith_t);
int expcmd(int, char **);
/*
* $PchId: arith.h,v 1.3 2006/03/31 11:25:25 philip Exp $
*/

View file

@ -42,12 +42,11 @@ __FBSDID("$FreeBSD: src/bin/sh/arith.y,v 1.19 2004/05/24 10:11:31 stefanf Exp $"
*/ */
#include <limits.h> #include <limits.h>
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "shell.h" #include "shell.h"
#include "arith.h" #include "expand.h"
#include "arith_lex.h"
#include "var.h" #include "var.h"
%} %}
%union { %union {
@ -261,7 +260,6 @@ expr:
#include "error.h" #include "error.h"
#include "output.h" #include "output.h"
#include "memalloc.h" #include "memalloc.h"
#include "builtins.h"
#define lstrlen(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3) #define lstrlen(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3)
@ -360,7 +358,3 @@ error(char *s)
exit(1); exit(1);
} }
#endif #endif
/*
* $PchId: arith.y,v 1.6 2006/05/22 12:41:47 philip Exp $
*/

View file

@ -44,8 +44,7 @@ __FBSDID("$FreeBSD: src/bin/sh/arith_lex.l,v 1.22 2004/04/06 20:06:51 markm Exp
#include <string.h> #include <string.h>
#include "shell.h" #include "shell.h"
#include "arith_lex.h" #include "arith.h"
#include "arith_y.h"
#include "error.h" #include "error.h"
#include "memalloc.h" #include "memalloc.h"
#include "var.h" #include "var.h"
@ -132,7 +131,3 @@ arith_lex_reset(void)
{ {
YY_NEW_FILE; YY_NEW_FILE;
} }
/*
* $PchId: arith_lex.l,v 1.5 2006/04/10 14:35:29 philip Exp $
*/

View file

@ -62,6 +62,13 @@ void rmescapes(char *);
int casematch(union node *, char *); int casematch(union node *, char *);
int wordexpcmd(int, char **); int wordexpcmd(int, char **);
/* From arith.y */
int arith(char *);
int arith_assign(char *, arith_t);
int expcmd(int , char **);
void arith_lex_reset(void);
/* /*
* $PchId: expand.h,v 1.4 2006/03/30 14:50:52 philip Exp $ * $PchId: expand.h,v 1.4 2006/03/30 14:50:52 philip Exp $
*/ */

View file

@ -0,0 +1,8 @@
# Makefile for asmconv.
PROG= asmconv
SRCS= asm86.c asmconv.c parse_ack.c parse_gnu.c parse_bas.c \
tokenize.c emit_ack.c emit_gnu.c
MAN=
.include <minix.prog.mk>

5
commands/at/Makefile Normal file
View file

@ -0,0 +1,5 @@
PROG= at
BINMODE= 4755
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
PROG= atnormalize
MAN=
.include <minix.prog.mk>

View file

@ -1,26 +1,10 @@
# Makefile for commands/autil # Makefile for commands/autil
CC = exec cc PROGS= anm asize
CFLAGS = -I. -D_MINIX -D_POSIX_SOURCE -wo SRCS.anm= anm.c rd.c rd_arhdr.c rd_bytes.c rd_unsig2.c
CCLD = $(CC) -i $(CFLAGS) SRCS.asize= asize.c
CPPFLAGS+= -I${.CURDIR} -wo
MAN.anm=
MAN.asize=
all: anm asize .include <minix.prog.mk>
anm: anm.c rd.c rd_arhdr.c rd_bytes.c rd_unsig2.c
$(CCLD) -o $@ $?
install -S 32kw $@
asize: asize.c
$(CCLD) -o $@ $?
install -S 4kw $@
install: /usr/bin/anm /usr/bin/asize
/usr/bin/anm: anm
install -cs -o bin $? $@
/usr/bin/asize: asize
install -cs -o bin $? $@
clean:
rm -f anm asize core

View file

@ -1,3 +0,0 @@
#!/bin/sh
make clean
make && make install

View file

@ -0,0 +1,4 @@
PROG= autopart
MAN=
.include <minix.prog.mk>

View file

@ -1,94 +1,7 @@
# /**************************************************************** .include <minix.own.mk>
# Copyright (C) Lucent Technologies 1997
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and that both that the copyright notice and this
# permission notice and warranty disclaimer appear in supporting
# documentation, and that the name Lucent Technologies or any of
# its entities not be used in advertising or publicity pertaining
# to distribution of the software without specific, written prior
# permission.
#
# LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
# IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
# THIS SOFTWARE.
# ****************************************************************/
CFLAGS = -g PROG= awk
CFLAGS = -O2 SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c
CFLAGS = YHEADER= yes
CC = gcc -Wall -g -Wwrite-strings .include <minix.prog.mk>
CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
CC = gcc -Wall -g
CC = cc
CC = gcc -O4
CC = cc -O
YACC = bison -y
YACC = yacc
YFLAGS = -d
OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o
SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \
maketab.c parse.c lib.c run.c tran.c proctab.c missing95.c
LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
lib.c run.c tran.c missing95.c
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile makefile.win \
vcvars32.bat buildwin.bat awk.1
all: awk
install: awk awk.1
install -m 755 -o bin -g operator awk /usr/bin/awk
install -m 644 -o bin -g operator awk.1 /usr/man/man1
awk: ytab.o $(OFILES)
$(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm -o $@
$(OFILES): awk.h ytab.h proto.h
ytab.o ytab.c ytab.h: awk.h proto.h awkgram.y
$(YACC) $(YFLAGS) awkgram.y 2>/dev/null
mv y.tab.c ytab.c
mv y.tab.h ytab.h
$(CC) $(CFLAGS) -c ytab.c
proctab.c: maketab
./maketab >proctab.c
maketab: ytab.h maketab.c
$(CC) $(CFLAGS) maketab.c -o maketab
bundle:
@cp ytab.h ytabh.bak
@cp ytab.c ytabc.bak
@bundle $(SHIP)
tar:
@cp ytab.h ytabh.bak
@cp ytab.c ytabc.bak
@bundle $(SHIP) >awk.shar
@tar cf awk.tar $(SHIP)
gzip awk.tar
ls -l awk.tar.gz
@zip awk.zip $(SHIP)
ls -l awk.zip
names:
@echo $(LISTING)
clean:
rm -f awk *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c

View file

@ -0,0 +1,94 @@
# /****************************************************************
# Copyright (C) Lucent Technologies 1997
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and that both that the copyright notice and this
# permission notice and warranty disclaimer appear in supporting
# documentation, and that the name Lucent Technologies or any of
# its entities not be used in advertising or publicity pertaining
# to distribution of the software without specific, written prior
# permission.
#
# LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
# IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
# THIS SOFTWARE.
# ****************************************************************/
CFLAGS = -g
CFLAGS = -O2
CFLAGS =
CC = gcc -Wall -g -Wwrite-strings
CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
CC = gcc -Wall -g
CC = cc
CC = gcc -O4
CC = cc -O
YACC = bison -y
YACC = yacc
YFLAGS = -d
OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o
SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \
maketab.c parse.c lib.c run.c tran.c proctab.c missing95.c
LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
lib.c run.c tran.c missing95.c
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile makefile.win \
vcvars32.bat buildwin.bat awk.1
all: awk
install: awk awk.1
install -m 755 -o bin -g operator awk /usr/bin/awk
install -m 644 -o bin -g operator awk.1 /usr/man/man1
awk: ytab.o $(OFILES)
$(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm -o $@
$(OFILES): awk.h ytab.h proto.h
ytab.o ytab.c ytab.h: awk.h proto.h awkgram.y
$(YACC) $(YFLAGS) awkgram.y 2>/dev/null
mv y.tab.c ytab.c
mv y.tab.h ytab.h
$(CC) $(CFLAGS) -c ytab.c
proctab.c: maketab
./maketab >proctab.c
maketab: ytab.h maketab.c
$(CC) $(CFLAGS) maketab.c -o maketab
bundle:
@cp ytab.h ytabh.bak
@cp ytab.c ytabc.bak
@bundle $(SHIP)
tar:
@cp ytab.h ytabh.bak
@cp ytab.c ytabc.bak
@bundle $(SHIP) >awk.shar
@tar cf awk.tar $(SHIP)
gzip awk.tar
ls -l awk.tar.gz
@zip awk.zip $(SHIP)
ls -l awk.zip
names:
@echo $(LISTING)
clean:
rm -f awk *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c

View file

@ -31,7 +31,7 @@ THIS SOFTWARE.
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
#define HAT (NCHARS+2) /* matches ^ in regular expr */ #define HAT (NCHARS+2) /* matches ^ in regular expr */
/* NCHARS is 2**n */ /* NCHARS is 2**n */

View file

@ -1,12 +0,0 @@
@echo off
rem buildwin.bat - build AWK under Windows NT using Visual C++.
rem 22 Jan 1999 - Created by Dan Allen.
rem
rem If you delete the call to setlocal it will probably work under Win95/Win98 as well.
setlocal
set cl=-w -Ox -QIfdiv- -nologo -link -nologo setargv.obj
cl maketab.c -o maketab.exe
maketab.exe > proctab.c
cl -o awk.exe b.c main.c parse.c proctab.c tran.c lib.c run.c lex.c ytab.c missing95.c

View file

@ -27,7 +27,7 @@ THIS SOFTWARE.
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
extern YYSTYPE yylval; extern YYSTYPE yylval;
extern int infunc; extern int infunc;

View file

@ -30,7 +30,7 @@ THIS SOFTWARE.
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
FILE *infile = NULL; FILE *infile = NULL;
char *file = ""; char *file = "";

View file

@ -32,7 +32,7 @@ const char *version = "version 20100208";
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
extern char **environ; extern char **environ;
extern int nfields; extern int nfields;

View file

@ -1,9 +0,0 @@
# vestigial makefile for microsoft c compiler on WinXX
# run with nmake -f makefile.win
# based on buildwin.bat
awk95.exe:
set cl=-w -Ox -QIfdiv- -nologo -link -nologo setargv.obj
cl maketab.c -o maketab.exe
.\maketab.exe > proctab.c
cl -o awk95.exe b.c main.c parse.c proctab.c tran.c lib.c run.c lex.c ytab.c missing95.c

View file

@ -32,7 +32,7 @@ THIS SOFTWARE.
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
struct xx struct xx
{ int token; { int token;

View file

@ -1,12 +0,0 @@
/* popen and pclose are not part of win 95 and nt,
but it appears that _popen and _pclose "work".
if this won't load, use the return NULL statements. */
#include <stdio.h>
FILE *popen(char *s, char *m) {
return _popen(s, m); /* return NULL; */
}
int pclose(FILE *f) {
return _pclose(f); /* return NULL; */
}

View file

@ -27,7 +27,7 @@ THIS SOFTWARE.
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
Node *nodealloc(int n) Node *nodealloc(int n)
{ {

207
commands/awk/proctab.c Normal file
View file

@ -0,0 +1,207 @@
#include <stdio.h>
#include "awk.h"
#include "awkgram.h"
static char *printname[93] = {
(char *) "FIRSTTOKEN", /* 258 */
(char *) "PROGRAM", /* 259 */
(char *) "PASTAT", /* 260 */
(char *) "PASTAT2", /* 261 */
(char *) "XBEGIN", /* 262 */
(char *) "XEND", /* 263 */
(char *) "NL", /* 264 */
(char *) "ARRAY", /* 265 */
(char *) "MATCH", /* 266 */
(char *) "NOTMATCH", /* 267 */
(char *) "MATCHOP", /* 268 */
(char *) "FINAL", /* 269 */
(char *) "DOT", /* 270 */
(char *) "ALL", /* 271 */
(char *) "CCL", /* 272 */
(char *) "NCCL", /* 273 */
(char *) "CHAR", /* 274 */
(char *) "OR", /* 275 */
(char *) "STAR", /* 276 */
(char *) "QUEST", /* 277 */
(char *) "PLUS", /* 278 */
(char *) "EMPTYRE", /* 279 */
(char *) "AND", /* 280 */
(char *) "BOR", /* 281 */
(char *) "APPEND", /* 282 */
(char *) "EQ", /* 283 */
(char *) "GE", /* 284 */
(char *) "GT", /* 285 */
(char *) "LE", /* 286 */
(char *) "LT", /* 287 */
(char *) "NE", /* 288 */
(char *) "IN", /* 289 */
(char *) "ARG", /* 290 */
(char *) "BLTIN", /* 291 */
(char *) "BREAK", /* 292 */
(char *) "CLOSE", /* 293 */
(char *) "CONTINUE", /* 294 */
(char *) "DELETE", /* 295 */
(char *) "DO", /* 296 */
(char *) "EXIT", /* 297 */
(char *) "FOR", /* 298 */
(char *) "FUNC", /* 299 */
(char *) "SUB", /* 300 */
(char *) "GSUB", /* 301 */
(char *) "IF", /* 302 */
(char *) "INDEX", /* 303 */
(char *) "LSUBSTR", /* 304 */
(char *) "MATCHFCN", /* 305 */
(char *) "NEXT", /* 306 */
(char *) "NEXTFILE", /* 307 */
(char *) "ADD", /* 308 */
(char *) "MINUS", /* 309 */
(char *) "MULT", /* 310 */
(char *) "DIVIDE", /* 311 */
(char *) "MOD", /* 312 */
(char *) "ASSIGN", /* 313 */
(char *) "ASGNOP", /* 314 */
(char *) "ADDEQ", /* 315 */
(char *) "SUBEQ", /* 316 */
(char *) "MULTEQ", /* 317 */
(char *) "DIVEQ", /* 318 */
(char *) "MODEQ", /* 319 */
(char *) "POWEQ", /* 320 */
(char *) "PRINT", /* 321 */
(char *) "PRINTF", /* 322 */
(char *) "SPRINTF", /* 323 */
(char *) "ELSE", /* 324 */
(char *) "INTEST", /* 325 */
(char *) "CONDEXPR", /* 326 */
(char *) "POSTINCR", /* 327 */
(char *) "PREINCR", /* 328 */
(char *) "POSTDECR", /* 329 */
(char *) "PREDECR", /* 330 */
(char *) "VAR", /* 331 */
(char *) "IVAR", /* 332 */
(char *) "VARNF", /* 333 */
(char *) "CALL", /* 334 */
(char *) "NUMBER", /* 335 */
(char *) "STRING", /* 336 */
(char *) "REGEXPR", /* 337 */
(char *) "GETLINE", /* 338 */
(char *) "SUBSTR", /* 339 */
(char *) "SPLIT", /* 340 */
(char *) "RETURN", /* 341 */
(char *) "WHILE", /* 342 */
(char *) "CAT", /* 343 */
(char *) "UMINUS", /* 344 */
(char *) "NOT", /* 345 */
(char *) "POWER", /* 346 */
(char *) "INCR", /* 347 */
(char *) "DECR", /* 348 */
(char *) "INDIRECT", /* 349 */
(char *) "LASTTOKEN", /* 350 */
};
Cell *(*proctab[93])(Node **, int) = {
nullproc, /* FIRSTTOKEN */
program, /* PROGRAM */
pastat, /* PASTAT */
dopa2, /* PASTAT2 */
nullproc, /* XBEGIN */
nullproc, /* XEND */
nullproc, /* NL */
array, /* ARRAY */
matchop, /* MATCH */
matchop, /* NOTMATCH */
nullproc, /* MATCHOP */
nullproc, /* FINAL */
nullproc, /* DOT */
nullproc, /* ALL */
nullproc, /* CCL */
nullproc, /* NCCL */
nullproc, /* CHAR */
nullproc, /* OR */
nullproc, /* STAR */
nullproc, /* QUEST */
nullproc, /* PLUS */
nullproc, /* EMPTYRE */
boolop, /* AND */
boolop, /* BOR */
nullproc, /* APPEND */
relop, /* EQ */
relop, /* GE */
relop, /* GT */
relop, /* LE */
relop, /* LT */
relop, /* NE */
instat, /* IN */
arg, /* ARG */
bltin, /* BLTIN */
jump, /* BREAK */
closefile, /* CLOSE */
jump, /* CONTINUE */
awkdelete, /* DELETE */
dostat, /* DO */
jump, /* EXIT */
forstat, /* FOR */
nullproc, /* FUNC */
sub, /* SUB */
gsub, /* GSUB */
ifstat, /* IF */
sindex, /* INDEX */
nullproc, /* LSUBSTR */
matchop, /* MATCHFCN */
jump, /* NEXT */
jump, /* NEXTFILE */
arith, /* ADD */
arith, /* MINUS */
arith, /* MULT */
arith, /* DIVIDE */
arith, /* MOD */
assign, /* ASSIGN */
nullproc, /* ASGNOP */
assign, /* ADDEQ */
assign, /* SUBEQ */
assign, /* MULTEQ */
assign, /* DIVEQ */
assign, /* MODEQ */
assign, /* POWEQ */
printstat, /* PRINT */
awkprintf, /* PRINTF */
awksprintf, /* SPRINTF */
nullproc, /* ELSE */
intest, /* INTEST */
condexpr, /* CONDEXPR */
incrdecr, /* POSTINCR */
incrdecr, /* PREINCR */
incrdecr, /* POSTDECR */
incrdecr, /* PREDECR */
nullproc, /* VAR */
nullproc, /* IVAR */
getnf, /* VARNF */
call, /* CALL */
nullproc, /* NUMBER */
nullproc, /* STRING */
nullproc, /* REGEXPR */
awkgetline, /* GETLINE */
substr, /* SUBSTR */
split, /* SPLIT */
jump, /* RETURN */
whilestat, /* WHILE */
cat, /* CAT */
arith, /* UMINUS */
boolop, /* NOT */
arith, /* POWER */
nullproc, /* INCR */
nullproc, /* DECR */
indirect, /* INDIRECT */
nullproc, /* LASTTOKEN */
};
char *tokname(int n)
{
static char buf[100];
if (n < FIRSTTOKEN || n > LASTTOKEN) {
sprintf(buf, "token %d", n);
return buf;
}
return printname[n-FIRSTTOKEN];
}

View file

@ -32,7 +32,7 @@ THIS SOFTWARE.
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
#define tempfree(x) if (istemp(x)) tfree(x); else #define tempfree(x) if (istemp(x)) tfree(x); else

View file

@ -29,7 +29,7 @@ THIS SOFTWARE.
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "awk.h" #include "awk.h"
#include "ytab.h" #include "awkgram.h"
#define FULLTAB 2 /* rehash when table gets this x full */ #define FULLTAB 2 /* rehash when table gets this x full */
#define GROWTAB 4 /* grow table by this factor */ #define GROWTAB 4 /* grow table by this factor */

View file

@ -1,33 +0,0 @@
@echo off
rem
rem Root of Visual Developer Studio Common files.
set VSCommonDir=C:\PROGRA~1\MICROS~3\Common
rem
rem Root of Visual Developer Studio installed files.
rem
set MSDevDir=C:\PROGRA~1\MICROS~3\Common\msdev98
rem
rem Root of Visual C++ installed files.
rem
set MSVCDir=C:\PROGRA~1\MICROS~3\VC98
rem
rem VcOsDir is used to help create either a Windows 95 or Windows NT specific path.
rem
set VcOsDir=WIN95
if "%OS%" == "Windows_NT" set VcOsDir=WINNT
rem
echo Setting environment for using Microsoft Visual C++ tools.
rem
if "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%
if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"
set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%
set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%
set VcOsDir=
set VSCommonDir=

File diff suppressed because it is too large Load diff

View file

@ -1,253 +0,0 @@
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
FIRSTTOKEN = 258,
PROGRAM = 259,
PASTAT = 260,
PASTAT2 = 261,
XBEGIN = 262,
XEND = 263,
NL = 264,
ARRAY = 265,
MATCH = 266,
NOTMATCH = 267,
MATCHOP = 268,
FINAL = 269,
DOT = 270,
ALL = 271,
CCL = 272,
NCCL = 273,
CHAR = 274,
OR = 275,
STAR = 276,
QUEST = 277,
PLUS = 278,
EMPTYRE = 279,
AND = 280,
BOR = 281,
APPEND = 282,
EQ = 283,
GE = 284,
GT = 285,
LE = 286,
LT = 287,
NE = 288,
IN = 289,
ARG = 290,
BLTIN = 291,
BREAK = 292,
CLOSE = 293,
CONTINUE = 294,
DELETE = 295,
DO = 296,
EXIT = 297,
FOR = 298,
FUNC = 299,
SUB = 300,
GSUB = 301,
IF = 302,
INDEX = 303,
LSUBSTR = 304,
MATCHFCN = 305,
NEXT = 306,
NEXTFILE = 307,
ADD = 308,
MINUS = 309,
MULT = 310,
DIVIDE = 311,
MOD = 312,
ASSIGN = 313,
ASGNOP = 314,
ADDEQ = 315,
SUBEQ = 316,
MULTEQ = 317,
DIVEQ = 318,
MODEQ = 319,
POWEQ = 320,
PRINT = 321,
PRINTF = 322,
SPRINTF = 323,
ELSE = 324,
INTEST = 325,
CONDEXPR = 326,
POSTINCR = 327,
PREINCR = 328,
POSTDECR = 329,
PREDECR = 330,
VAR = 331,
IVAR = 332,
VARNF = 333,
CALL = 334,
NUMBER = 335,
STRING = 336,
REGEXPR = 337,
GETLINE = 338,
SUBSTR = 339,
SPLIT = 340,
RETURN = 341,
WHILE = 342,
CAT = 343,
UMINUS = 344,
NOT = 345,
POWER = 346,
INCR = 347,
DECR = 348,
INDIRECT = 349,
LASTTOKEN = 350
};
#endif
/* Tokens. */
#define FIRSTTOKEN 258
#define PROGRAM 259
#define PASTAT 260
#define PASTAT2 261
#define XBEGIN 262
#define XEND 263
#define NL 264
#define ARRAY 265
#define MATCH 266
#define NOTMATCH 267
#define MATCHOP 268
#define FINAL 269
#define DOT 270
#define ALL 271
#define CCL 272
#define NCCL 273
#define CHAR 274
#define OR 275
#define STAR 276
#define QUEST 277
#define PLUS 278
#define EMPTYRE 279
#define AND 280
#define BOR 281
#define APPEND 282
#define EQ 283
#define GE 284
#define GT 285
#define LE 286
#define LT 287
#define NE 288
#define IN 289
#define ARG 290
#define BLTIN 291
#define BREAK 292
#define CLOSE 293
#define CONTINUE 294
#define DELETE 295
#define DO 296
#define EXIT 297
#define FOR 298
#define FUNC 299
#define SUB 300
#define GSUB 301
#define IF 302
#define INDEX 303
#define LSUBSTR 304
#define MATCHFCN 305
#define NEXT 306
#define NEXTFILE 307
#define ADD 308
#define MINUS 309
#define MULT 310
#define DIVIDE 311
#define MOD 312
#define ASSIGN 313
#define ASGNOP 314
#define ADDEQ 315
#define SUBEQ 316
#define MULTEQ 317
#define DIVEQ 318
#define MODEQ 319
#define POWEQ 320
#define PRINT 321
#define PRINTF 322
#define SPRINTF 323
#define ELSE 324
#define INTEST 325
#define CONDEXPR 326
#define POSTINCR 327
#define PREINCR 328
#define POSTDECR 329
#define PREDECR 330
#define VAR 331
#define IVAR 332
#define VARNF 333
#define CALL 334
#define NUMBER 335
#define STRING 336
#define REGEXPR 337
#define GETLINE 338
#define SUBSTR 339
#define SPLIT 340
#define RETURN 341
#define WHILE 342
#define CAT 343
#define UMINUS 344
#define NOT 345
#define POWER 346
#define INCR 347
#define DECR 348
#define INDIRECT 349
#define LASTTOKEN 350
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 41 "awkgram.y"
{
Node *p;
Cell *cp;
int i;
char *s;
}
/* Line 1529 of yacc.c. */
#line 246 "y.tab.h"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE yylval;

6
commands/backup/Makefile Normal file
View file

@ -0,0 +1,6 @@
PROG= backup
MAN=
LINKS+= ${BINDIR}/backup ${BINDIR}/restore
.include <minix.prog.mk>

View file

@ -0,0 +1,5 @@
PROG= badblocks
CPPFLAGS+= -I${MINIXSRCDIR}/servers
MAN=
.include <minix.prog.mk>

View file

@ -29,15 +29,15 @@
#include <dirent.h> #include <dirent.h>
#include <stdlib.h> #include <stdlib.h>
#include "../../servers/mfs/const.h" /* must be included before stdio.h */ #include "mfs/const.h" /* must be included before stdio.h */
#undef printf /* so its define of printf can be undone */ #undef printf /* so its define of printf can be undone */
#include "../../servers/mfs/type.h" #include "mfs/type.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#define EXTERN extern #define EXTERN extern
#include "../../servers/mfs/super.h" #include "mfs/super.h"
_PROTOTYPE(int main, (int argc, char **argv)); _PROTOTYPE(int main, (int argc, char **argv));
_PROTOTYPE(void get_super, (void)); _PROTOTYPE(void get_super, (void));

4
commands/banner/Makefile Normal file
View file

@ -0,0 +1,4 @@
PROG= banner
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
PROG= basename
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
SCRIPTS= bigmake.sh
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
SCRIPTS= binpackage.sh
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
SCRIPTS= binpackages.sh
MAN=
.include <minix.prog.mk>

View file

@ -0,0 +1,4 @@
SCRIPTS= binsizes.sh
MAN=
.include <minix.prog.mk>

View file

@ -1,33 +0,0 @@
File Name Archive # Description
-----------------------------------------------------------
ACKNOWLEDGEMENTS 1
CSU.diffs 1
MANIFEST 1 This shipping list
Makefile 1
NEW_FEATURES 1
NOTES 1
NO_WARRANTY 1
README 1
closure.c 1
defs.h 1
error.c 1
lalr.c 1
lr0.c 1
main.c 1
mkpar.c 1
output.c 2
reader.c 3
skeleton.c 1
symtab.c 1
test 1
test/error.output 1
test/error.tab.c 1
test/error.tab.h 1
test/error.y 1
test/ftp.output 2
test/ftp.tab.c 3
test/ftp.tab.h 1
test/ftp.y 2
verbose.c 1
warshall.c 1
yacc.1 1

View file

@ -1,86 +0,0 @@
# Makefile for Berkeley yacc.
BINDIR = /usr/bin
HDRS = defs.h
CFLAGS = -DNDEBUG -D_MINIX -D_POSIX_SOURCE -wo $(OPT)
LDFLAGS = -i
LIBS =
CC = exec cc
LINKER = $(CC)
MAKEFILE = Makefile
OBJS = closure.o \
error.o \
lalr.o \
lr0.o \
main.o \
mkpar.o \
output.o \
reader.o \
skeleton.o \
symtab.o \
verbose.o \
warshall.o
PRINT = pr -f -l88
PROGRAM = yacc
SRCS = closure.c \
error.c \
lalr.c \
lr0.c \
main.c \
mkpar.c \
output.c \
reader.c \
skeleton.c \
symtab.c \
verbose.c \
warshall.c
all: $(PROGRAM)
$(PROGRAM): $(OBJS) $(LIBS)
$(LINKER) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
install -S 484k $(PROGRAM)
install: $(BINDIR)/yacc
$(BINDIR)/yacc: $(PROGRAM)
install -cs -o bin $(PROGRAM) $@
clean:; rm -f $(OBJS) $(PROGRAM) core
#depend:; @mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
#
#index:; @ctags -wx $(HDRS) $(SRCS)
#
#listing:; @$(PRINT) Makefile $(HDRS) $(SRCS) | lpr
#
#lint:; @lint $(SRCS)
#
#program: $(PROGRAM)
#
#tags: $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
###
closure.o: defs.h
error.o: defs.h
lalr.o: defs.h
lr0.o: defs.h
main.o: defs.h
mkpar.o: defs.h
output.o: defs.h
reader.o: defs.h
skeleton.o: defs.h
symtab.o: defs.h
verbose.o: defs.h
warshall.o: defs.h

View file

@ -1,9 +0,0 @@
Berkeley Yacc reflects its origins. The reason so many routines
use exactly six register variables is that Berkeley Yacc was
developed on a VAX using PCC. PCC placed at most six variables
in registers. I went to considerable effort to find which six
variables most belonged in registers. Changes in machines and
compilers make that effort worthless, perhaps even harmful.
The code contains many instances where address calculations are
performed in particular ways to optimize the code for the VAX.

View file

@ -1,3 +0,0 @@
Berkeley Yacc is distributed with no warranty whatever. The author
and any other contributors take no responsibility for the consequences of
its use.

View file

@ -1,3 +0,0 @@
#!/bin/sh
make clean
make && make install

View file

@ -1,378 +0,0 @@
#include <sys/types.h>
#include <signal.h>
#include "defs.h"
char dflag;
char lflag;
char rflag;
char tflag;
char vflag;
char *symbol_prefix;
char *file_prefix = "y";
char *myname = "yacc";
char *temp_form = "yacc.XXXXXXX";
int lineno;
int outline;
char *action_file_name;
char *code_file_name;
char *defines_file_name;
char *input_file_name = "";
char *output_file_name;
char *text_file_name;
char *union_file_name;
char *verbose_file_name;
FILE *action_file; /* a temp file, used to save actions associated */
/* with rules until the parser is written */
FILE *code_file; /* y.code.c (used when the -r option is specified) */
FILE *defines_file; /* y.tab.h */
FILE *input_file; /* the input file */
FILE *output_file; /* y.tab.c */
FILE *text_file; /* a temp file, used to save text until all */
/* symbols have been defined */
FILE *union_file; /* a temp file, used to save the union */
/* definition until all symbol have been */
/* defined */
FILE *verbose_file; /* y.output */
int nitems;
int nrules;
int nsyms;
int ntokens;
int nvars;
int start_symbol;
char **symbol_name;
short *symbol_value;
short *symbol_prec;
char *symbol_assoc;
short *ritem;
short *rlhs;
short *rrhs;
short *rprec;
char *rassoc;
short **derives;
char *nullable;
extern char *mktemp();
extern char *getenv();
done(k)
int k;
{
if (action_file) { fclose(action_file); unlink(action_file_name); }
if (text_file) { fclose(text_file); unlink(text_file_name); }
if (union_file) { fclose(union_file); unlink(union_file_name); }
exit(k);
}
void
onintr(signo)
int signo;
{
done(1);
}
set_signals()
{
#ifdef SIGINT
if (signal(SIGINT, SIG_IGN) != SIG_IGN)
signal(SIGINT, onintr);
#endif
#ifdef SIGTERM
if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
signal(SIGTERM, onintr);
#endif
#ifdef SIGHUP
if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
signal(SIGHUP, onintr);
#endif
}
usage()
{
fprintf(stderr, "usage: %s [-dlrtv] [-b file_prefix] [-p symbol_prefix] filename\n", myname);
exit(1);
}
getargs(argc, argv)
int argc;
char *argv[];
{
register int i;
register char *s;
if (argc > 0) myname = argv[0];
for (i = 1; i < argc; ++i)
{
s = argv[i];
if (*s != '-') break;
switch (*++s)
{
case '\0':
input_file = stdin;
if (i + 1 < argc) usage();
return;
case '-':
++i;
goto no_more_options;
case 'b':
if (*++s)
file_prefix = s;
else if (++i < argc)
file_prefix = argv[i];
else
usage();
continue;
case 'd':
dflag = 1;
break;
case 'l':
lflag = 1;
break;
case 'p':
if (*++s)
symbol_prefix = s;
else if (++i < argc)
symbol_prefix = argv[i];
else
usage();
continue;
case 'r':
rflag = 1;
break;
case 't':
tflag = 1;
break;
case 'v':
vflag = 1;
break;
default:
usage();
}
for (;;)
{
switch (*++s)
{
case '\0':
goto end_of_option;
case 'd':
dflag = 1;
break;
case 'l':
lflag = 1;
break;
case 'r':
rflag = 1;
break;
case 't':
tflag = 1;
break;
case 'v':
vflag = 1;
break;
default:
usage();
}
}
end_of_option:;
}
no_more_options:;
if (i + 1 != argc) usage();
input_file_name = argv[i];
}
char *
allocate(n)
unsigned n;
{
register char *p;
p = NULL;
if (n)
{
p = CALLOC(1, n);
if (!p) no_space();
}
return (p);
}
create_file_names()
{
int i, len;
char *tmpdir;
tmpdir = getenv("TMPDIR");
if (tmpdir == 0) tmpdir = "/tmp";
len = strlen(tmpdir);
i = len + 13;
if (len && tmpdir[len-1] != '/')
++i;
action_file_name = MALLOC(i);
if (action_file_name == 0) no_space();
text_file_name = MALLOC(i);
if (text_file_name == 0) no_space();
union_file_name = MALLOC(i);
if (union_file_name == 0) no_space();
strcpy(action_file_name, tmpdir);
strcpy(text_file_name, tmpdir);
strcpy(union_file_name, tmpdir);
if (len && tmpdir[len - 1] != '/')
{
action_file_name[len] = '/';
text_file_name[len] = '/';
union_file_name[len] = '/';
++len;
}
strcpy(action_file_name + len, temp_form);
strcpy(text_file_name + len, temp_form);
strcpy(union_file_name + len, temp_form);
action_file_name[len + 5] = 'a';
text_file_name[len + 5] = 't';
union_file_name[len + 5] = 'u';
mktemp(action_file_name);
mktemp(text_file_name);
mktemp(union_file_name);
len = strlen(file_prefix);
output_file_name = MALLOC(len + 7);
if (output_file_name == 0)
no_space();
strcpy(output_file_name, file_prefix);
strcpy(output_file_name + len, OUTPUT_SUFFIX);
if (rflag)
{
code_file_name = MALLOC(len + 8);
if (code_file_name == 0)
no_space();
strcpy(code_file_name, file_prefix);
strcpy(code_file_name + len, CODE_SUFFIX);
}
else
code_file_name = output_file_name;
if (dflag)
{
defines_file_name = MALLOC(len + 7);
if (defines_file_name == 0)
no_space();
strcpy(defines_file_name, file_prefix);
strcpy(defines_file_name + len, DEFINES_SUFFIX);
}
if (vflag)
{
verbose_file_name = MALLOC(len + 8);
if (verbose_file_name == 0)
no_space();
strcpy(verbose_file_name, file_prefix);
strcpy(verbose_file_name + len, VERBOSE_SUFFIX);
}
}
open_files()
{
create_file_names();
if (input_file == 0)
{
input_file = fopen(input_file_name, "r");
if (input_file == 0)
open_error(input_file_name);
}
action_file = fopen(action_file_name, "w");
if (action_file == 0)
open_error(action_file_name);
text_file = fopen(text_file_name, "w");
if (text_file == 0)
open_error(text_file_name);
if (vflag)
{
verbose_file = fopen(verbose_file_name, "w");
if (verbose_file == 0)
open_error(verbose_file_name);
}
if (dflag)
{
defines_file = fopen(defines_file_name, "w");
if (defines_file == 0)
open_error(defines_file_name);
union_file = fopen(union_file_name, "w");
if (union_file == 0)
open_error(union_file_name);
}
output_file = fopen(output_file_name, "w");
if (output_file == 0)
open_error(output_file_name);
if (rflag)
{
code_file = fopen(code_file_name, "w");
if (code_file == 0)
open_error(code_file_name);
}
else
code_file = output_file;
}
int
main(argc, argv)
int argc;
char *argv[];
{
set_signals();
getargs(argc, argv);
open_files();
reader();
lr0();
lalr();
make_parser();
verbose();
output();
done(0);
/*NOTREACHED*/
}

View file

@ -1,119 +0,0 @@
#include "defs.h"
/* TABLE_SIZE is the number of entries in the symbol table. */
/* TABLE_SIZE must be a power of two. */
#define TABLE_SIZE 1024
bucket **symbol_table;
bucket *first_symbol;
bucket *last_symbol;
int
hash(name)
char *name;
{
register char *s;
register int c, k;
assert(name && *name);
s = name;
k = *s;
while (c = *++s)
k = (31*k + c) & (TABLE_SIZE - 1);
return (k);
}
bucket *
make_bucket(name)
char *name;
{
register bucket *bp;
assert(name);
bp = (bucket *) MALLOC(sizeof(bucket));
if (bp == 0) no_space();
bp->link = 0;
bp->next = 0;
bp->name = MALLOC(strlen(name) + 1);
if (bp->name == 0) no_space();
bp->tag = 0;
bp->value = UNDEFINED;
bp->index = 0;
bp->prec = 0;
bp-> class = UNKNOWN;
bp->assoc = TOKEN;
if (bp->name == 0) no_space();
strcpy(bp->name, name);
return (bp);
}
bucket *
lookup(name)
char *name;
{
register bucket *bp, **bpp;
bpp = symbol_table + hash(name);
bp = *bpp;
while (bp)
{
if (strcmp(name, bp->name) == 0) return (bp);
bpp = &bp->link;
bp = *bpp;
}
*bpp = bp = make_bucket(name);
last_symbol->next = bp;
last_symbol = bp;
return (bp);
}
create_symbol_table()
{
register int i;
register bucket *bp;
symbol_table = (bucket **) MALLOC(TABLE_SIZE*sizeof(bucket *));
if (symbol_table == 0) no_space();
for (i = 0; i < TABLE_SIZE; i++)
symbol_table[i] = 0;
bp = make_bucket("error");
bp->index = 1;
bp->class = TERM;
first_symbol = bp;
last_symbol = bp;
symbol_table[hash("error")] = bp;
}
free_symbol_table()
{
FREE(symbol_table);
symbol_table = 0;
}
free_symbols()
{
register bucket *p, *q;
for (p = first_symbol; p; p = q)
{
q = p->next;
FREE(p);
}
}

View file

@ -1,82 +0,0 @@
#include "defs.h"
transitive_closure(R, n)
unsigned *R;
int n;
{
register int rowsize;
register unsigned i;
register unsigned *rowj;
register unsigned *rp;
register unsigned *rend;
register unsigned *ccol;
register unsigned *relend;
register unsigned *cword;
register unsigned *rowi;
rowsize = WORDSIZE(n);
relend = R + n*rowsize;
cword = R;
i = 0;
rowi = R;
while (rowi < relend)
{
ccol = cword;
rowj = R;
while (rowj < relend)
{
if (*ccol & (1 << i))
{
rp = rowi;
rend = rowj + rowsize;
while (rowj < rend)
*rowj++ |= *rp++;
}
else
{
rowj += rowsize;
}
ccol += rowsize;
}
if (++i >= BITS_PER_WORD)
{
i = 0;
cword++;
}
rowi += rowsize;
}
}
reflexive_transitive_closure(R, n)
unsigned *R;
int n;
{
register int rowsize;
register unsigned i;
register unsigned *rp;
register unsigned *relend;
transitive_closure(R, n);
rowsize = WORDSIZE(n);
relend = R + n*rowsize;
i = 0;
rp = R;
while (rp < relend)
{
*rp |= (1 << i);
if (++i >= BITS_PER_WORD)
{
i = 0;
rp++;
}
rp += rowsize;
}
}

View file

@ -1,172 +0,0 @@
###############################################################################
# Quick installation
###############################################################################
To build and install bzip into /usr/local, execute the following commands
as user bin:
make
make install
To install into another directory use:
make install PREFIX=<path>
###############################################################################
# bzip 1.0.3 for Minix
###############################################################################
The text below is taken from the original README file. The original file is
available as README.ORIGINAL.
This is the README for bzip2, a block-sorting file compressor, version
1.0.3. This version is fully compatible with the previous public
releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and 1.0.2.
bzip2-1.0.3 is distributed under a BSD-style license. For details,
see the file LICENSE.
Complete documentation is available in Postscript form (manual.ps),
PDF (manual.pdf) or html (manual.html). A plain-text version of the
manual page is available as bzip2.txt. A statement about Y2K issues
is now included in the file Y2K_INFO.
HOW TO BUILD -- MINIX
Type `make'. This builds the library libbz2.a and then the
programs bzip2 and bzip2recover. Six self-tests are run.
If the self-tests complete ok, carry on to installation:
To install in /usr/local/bin, /usr/local/lib, /usr/local/man and
/usr/local/include, type
make install
To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type
make install PREFIX=/xxx/yyy
If you are (justifiably) paranoid and want to see what 'make install'
is going to do, you can first do
make -n install or
make -n install PREFIX=/xxx/yyy respectively.
The -n instructs make to show the commands it would execute, but
not actually execute them.
VALIDATION
Correct operation, in the sense that a compressed file can always be
decompressed to reproduce the original, is obviously of paramount
importance. To validate bzip2, I used a modified version of Mark
Nelson's churn program. Churn is an automated test driver which
recursively traverses a directory structure, using bzip2 to compress
and then decompress each file it encounters, and checking that the
decompressed data is the same as the original.
Please read and be aware of the following:
WARNING:
This program (attempts to) compress data by performing several
non-trivial transformations on it. Unless you are 100% familiar
with *all* the algorithms contained herein, and with the
consequences of modifying them, you should NOT meddle with the
compression or decompression machinery. Incorrect changes can and
very likely *will* lead to disastrous loss of data.
DISCLAIMER:
I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
USE OF THIS PROGRAM, HOWSOEVER CAUSED.
Every compression of a file implies an assumption that the
compressed file can be decompressed to reproduce the original.
Great efforts in design, coding and testing have been made to
ensure that this program works correctly. However, the complexity
of the algorithms, and, in particular, the presence of various
special cases in the code which occur with very low but non-zero
probability make it impossible to rule out the possibility of bugs
remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS
PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER
SMALL, THAT THE DATA WILL NOT BE RECOVERABLE.
That is not to say this program is inherently unreliable. Indeed,
I very much hope the opposite is true. bzip2 has been carefully
constructed and extensively tested.
PATENTS:
To the best of my knowledge, bzip2 does not use any patented
algorithms. However, I do not have the resources to carry out
a patent search. Therefore I cannot give any guarantee of the
above statement.
End of legalities.
WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ?
* Approx 10% faster compression, 30% faster decompression
* -t (test mode) is a lot quicker
* Can decompress concatenated compressed files
* Programming interface, so programs can directly read/write .bz2 files
* Less restrictive (BSD-style) licensing
* Flag handling more compatible with GNU gzip
* Much more documentation, i.e., a proper user manual
* Hopefully, improved portability (at least of the library)
WHAT'S NEW IN 0.9.5 ?
* Compression speed is much less sensitive to the input
data than in previous versions. Specifically, the very
slow performance caused by repetitive data is fixed.
* Many small improvements in file and flag handling.
* A Y2K statement.
WHAT'S NEW IN 1.0.0 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.2 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.3 ?
See the CHANGES file.
I hope you find bzip2 useful. Feel free to contact me at
jseward@bzip.org
if you have any suggestions or queries. Many people mailed me with
comments, suggestions and patches after the releases of bzip-0.15,
bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and
1.0.2, and the changes in bzip2 are largely a result of this feedback.
I thank you for your comments.
At least for the time being, bzip2's "home" is (or can be reached via)
http://www.bzip.org
Julian Seward
jseward@bzip.org
Cambridge, UK.
18 July 1996 (version 0.15)
25 August 1996 (version 0.21)
7 August 1997 (bzip2, version 0.1)
29 August 1997 (bzip2, version 0.1pl2)
23 August 1998 (bzip2, version 0.9.0)
8 June 1999 (bzip2, version 0.9.5)
4 Sept 1999 (bzip2, version 0.9.5d)
5 May 2000 (bzip2, version 1.0pre8)
30 December 2001 (bzip2, version 1.0.2pre1)
15 February 2005 (bzip2, version 1.0.3)
###############################################################################
# Changes to the source of version 1.0.3
###############################################################################
- Changed default installation to /usr/local
- Adjusted Makefile to separate testing from building, to allow chmem in
between
- Adjusted invocation of ar, as Minix ar does not support -q, even though the
documentation says it does

View file

@ -1,6 +0,0 @@
#!/bin/sh
make clean
make all
if [ "$1" != build ]
then make install
fi

View file

@ -1 +0,0 @@
../../man/man1/bzdiff.1

View file

@ -1 +0,0 @@
../../man/man1/bzgrep.1

View file

@ -1 +0,0 @@
../../man/man1/bzip2.1

View file

@ -1 +0,0 @@
../../man/man1/bzmore.1

Some files were not shown because too many files have changed in this diff Show more