README revision 90902
185587Sobrien/****************************************************************
285587SobrienCopyright (C) Lucent Technologies 1997
385587SobrienAll Rights Reserved
485587Sobrien
585587SobrienPermission to use, copy, modify, and distribute this software and
685587Sobrienits documentation for any purpose and without fee is hereby
785587Sobriengranted, provided that the above copyright notice appear in all
885587Sobriencopies and that both that the copyright notice and this
985587Sobrienpermission notice and warranty disclaimer appear in supporting
1085587Sobriendocumentation, and that the name Lucent Technologies or any of
1185587Sobrienits entities not be used in advertising or publicity pertaining
1285587Sobriento distribution of the software without specific, written prior
1385587Sobrienpermission.
1485587Sobrien
1585587SobrienLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
1685587SobrienINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
1785587SobrienIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
1885587SobrienSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1985587SobrienWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
2085587SobrienIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
2185587SobrienARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
2285587SobrienTHIS SOFTWARE.
2385587Sobrien****************************************************************/
2485587Sobrien
2585587SobrienThis is the version of awk described in "The AWK Programming Language",
2685587Sobrienby Al Aho, Brian Kernighan, and Peter Weinberger
2785587Sobrien(Addison-Wesley, 1988, ISBN 0-201-07981-X).
2885587Sobrien
2985587SobrienChanges, mostly bug fixes and occasional enhancements, are listed
3085587Sobrienin FIXES.  If you distribute this code further, please please please
3185587Sobriendistribute FIXES with it.  If you find errors, please report them
3285587Sobriento bwk@bell-labs.com.  Thanks.
3385587Sobrien
3485587SobrienThe program itself is created by
3585587Sobrien	make
3685587Sobrienwhich should produce a sequence of messages roughly like this:
3785587Sobrien
3885587Sobrien	yacc -d awkgram.y
3985587Sobrien
4085587Sobrienconflicts: 43 shift/reduce, 85 reduce/reduce
4185587Sobrien	mv y.tab.c ytab.c
4285587Sobrien	mv y.tab.h ytab.h
4385587Sobrien	cc -O -c ytab.c
4485587Sobrien	cc -O -c b.c
4585587Sobrien	cc -O -c main.c
4685587Sobrien	cc -O -c parse.c
4785587Sobrien	cc -O maketab.c -o maketab
4885587Sobrien	./maketab >proctab.c
4985587Sobrien	cc -O -c proctab.c
5085587Sobrien	cc -O -c tran.c
5185587Sobrien	cc -O -c lib.c
5285587Sobrien	cc -O -c run.c
5385587Sobrien	cc -O -c lex.c
5485587Sobrien	cc -O ytab.o b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o -lm
5585587Sobrien
5685587SobrienThis produces an executable a.out; you will eventually want to
5785587Sobrienmove this to some place like /usr/bin/awk.
5885587Sobrien
5985587SobrienIf your system is does not have yacc or bison (the GNU
6085587Sobrienequivalent), you must compile the pieces manually.  We have
6185587Sobrienincluded yacc output in ytab.c and ytab.h, and backup copies in
6285587Sobriencase you overwrite them.  We have also included a copy of
6385587Sobrienproctab.c so you do not need to run maketab.
6485587Sobrien
6585587SobrienNOTE: This version uses ANSI C, as you should also.  We have
6685587Sobriencompiled this without any changes using gcc -Wall and/or local C
6785587Sobriencompilers on a variety of systems, but new systems or compilers
6885587Sobrienmay raise some new complaint; reports of difficulties are
6985587Sobrienwelcome.
7085587Sobrien
7190902SdesThis also compiles with Visual C++ on all flavors of Windows,
7285587Sobrien*if* you provide versions of popen and pclose.  The file
7385587Sobrienmissing95.c contains versions that can be used to get started
7485587Sobrienwith, though the underlying support has mysterious properties,
7585587Sobrienthe symptom of which can be truncated pipe output.  Beware.
7685587Sobrien
7785587SobrienThis is also said to compile on Macintosh systems, using the
7885587Sobrienfile "buildmac" provided by Dan Allen (danallen@microsoft.com),
7990902Sdesto whom many thanks.
8085587Sobrien
8185587SobrienThe version of malloc that comes with some systems is sometimes
8285587Sobrienastonishly slow.  If awk seems slow, you might try fixing that.
83