head	1.5;
access;
symbols
	netbsd-11-0-RC4:1.5
	NAWK20260426:1.1.1.4
	netbsd-11-0-RC3:1.5
	netbsd-11-0-RC2:1.5
	netbsd-11-0-RC1:1.5
	perseant-exfatfs-base-20250801:1.5
	netbsd-11:1.5.0.2
	netbsd-11-base:1.5
	netbsd-10-1-RELEASE:1.4
	NAWK20240817:1.1.1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.10
	perseant-exfatfs-base:1.4
	netbsd-8-3-RELEASE:1.3
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.4
	netbsd-10-0-RC6:1.4
	netbsd-10-0-RC5:1.4
	netbsd-10-0-RC4:1.4
	netbsd-10-0-RC3:1.4
	netbsd-10-0-RC2:1.4
	netbsd-10-0-RC1:1.4
	netbsd-10:1.4.0.8
	netbsd-10-base:1.4
	netbsd-9-3-RELEASE:1.3
	cjep_sun2x-base1:1.4
	cjep_sun2x:1.4.0.6
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.4.0.4
	cjep_staticlib_x-base:1.4
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.4
	phil-wifi-20200411:1.4
	is-mlppp:1.4.0.2
	is-mlppp-base:1.4
	phil-wifi-20200406:1.4
	netbsd-8-2-RELEASE:1.3
	NAWK20200218:1.1.1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.32
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.3
	netbsd-8-1-RC1:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	netbsd-7-2-RELEASE:1.3
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.3
	phil-wifi:1.3.0.30
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	netbsd-7-1-2-RELEASE:1.3
	pgoyette-compat:1.3.0.28
	pgoyette-compat-base:1.3
	netbsd-7-1-1-RELEASE:1.3
	matt-nb8-mediatek:1.3.0.26
	matt-nb8-mediatek-base:1.3
	perseant-stdc-iso10646:1.3.0.24
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.22
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.20
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	netbsd-7-1:1.3.0.18
	netbsd-7-1-RELEASE:1.3
	netbsd-7-1-RC2:1.3
	netbsd-7-nhusb-base-20170116:1.3
	bouyer-socketcan:1.3.0.16
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	netbsd-7-1-RC1:1.3
	pgoyette-localcount-20161104:1.3
	netbsd-7-0-2-RELEASE:1.3
	localcount-20160914:1.3
	netbsd-7-nhusb:1.3.0.14
	netbsd-7-nhusb-base:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.12
	pgoyette-localcount-base:1.3
	netbsd-7-0-1-RELEASE:1.3
	netbsd-7-0:1.3.0.10
	netbsd-7-0-RELEASE:1.3
	netbsd-7-0-RC3:1.3
	netbsd-7-0-RC2:1.3
	netbsd-7-0-RC1:1.3
	netbsd-6-0-6-RELEASE:1.2
	netbsd-6-1-5-RELEASE:1.2
	netbsd-7:1.3.0.8
	netbsd-7-base:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.2.6.1
	netbsd-6-1-4-RELEASE:1.2
	netbsd-6-0-5-RELEASE:1.2
	tls-earlyentropy:1.3.0.6
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-6-1-3-RELEASE:1.2
	netbsd-6-0-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.2
	netbsd-6-0-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.2
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.2
	riastradh-drm2-base:1.3
	netbsd-6-1:1.2.0.16
	netbsd-6-0-2-RELEASE:1.2
	netbsd-6-1-RELEASE:1.2
	netbsd-6-1-RC4:1.2
	netbsd-6-1-RC3:1.2
	agc-symver:1.3.0.4
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.2
	netbsd-6-1-RC1:1.2
	yamt-pagecache-base8:1.3
	NAWK20121220:1.1.1.2
	netbsd-6-0-1-RELEASE:1.2
	yamt-pagecache-base7:1.2
	matt-nb6-plus-nbase:1.2
	yamt-pagecache-base6:1.2
	netbsd-6-0:1.2.0.14
	netbsd-6-0-RELEASE:1.2
	netbsd-6-0-RC2:1.2
	tls-maxphys:1.2.0.12
	tls-maxphys-base:1.3
	matt-nb6-plus:1.2.0.10
	matt-nb6-plus-base:1.2
	netbsd-6-0-RC1:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-6:1.2.0.8
	netbsd-6-base:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.6
	yamt-pagecache-base:1.2
	cherry-xenmp:1.2.0.4
	cherry-xenmp-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.2
	bouyer-quota2-base:1.2
	matt-mips64-premerge-20101231:1.2
	NAWK20100523:1.1.1.1
	NAWK:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2024.08.17.22.22.29;	author christos;	state Exp;
branches;
next	1.4;
commitid	jXFE1hZ62YzW5emF;

1.4
date	2020.02.18.21.12.21;	author christos;	state Exp;
branches
	1.4.10.1;
next	1.3;
commitid	ZoGMm81D7eKlucXB;

1.3
date	2012.12.29.02.44.26;	author christos;	state Exp;
branches
	1.3.30.1;
next	1.2;

1.2
date	2010.08.26.14.55.20;	author christos;	state Exp;
branches
	1.2.6.1
	1.2.12.1;
next	1.1;

1.1
date	2010.08.26.14.53.17;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.4.10.1
date	2025.08.02.05.49.42;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.3.30.1
date	2020.04.08.14.06.48;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.2.6.1
date	2013.01.23.00.04.46;	author yamt;	state Exp;
branches;
next	;

1.2.12.1
date	2013.02.25.00.27.02;	author tls;	state Exp;
branches;
next	;

1.1.1.1
date	2010.08.26.14.53.17;	author christos;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2012.12.29.02.14.52;	author christos;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2020.02.18.20.50.46;	author christos;	state Exp;
branches;
next	1.1.1.4;
commitid	1DQROEYOeROjmcXB;

1.1.1.4
date	2024.08.17.22.19.19;	author christos;	state Exp;
branches;
next	;
commitid	F6k4yChqfBas4emF;


desc
@@


1.5
log
@Marge conflicts between 2020-02-18 and 2024-08-17
@
text
@# /****************************************************************
# 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 = -fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
CFLAGS = -g
CFLAGS =
CFLAGS = -O2

# compiler options
#CC = cc -Wall -g -Wwrite-strings
#CC = cc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = cc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
HOSTCC = cc -g -Wall -pedantic -Wcast-qual
# HOSTCC = g++ -g -Wall -pedantic -Wcast-qual
CC = $(HOSTCC)  # change this is cross-compiling.

# By fiat, to make our lives easier, yacc is now defined to be bison.
# If you want something else, you're on your own.
# YACC = yacc -d -b awkgram
YACC = bison -d

OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o

SOURCE = awk.h awkgram.tab.c awkgram.tab.h proto.h awkgram.y lex.c b.c main.c \
	maketab.c parse.c lib.c run.c tran.c proctab.c

LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
	lib.c run.c tran.c

SHIP = README LICENSE FIXES $(SOURCE) awkgram.tab.[ch].bak makefile  \
	 awk.1

a.out:	awkgram.tab.o $(OFILES)
	$(CC) $(CFLAGS) awkgram.tab.o $(OFILES) $(ALLOC)  -lm

$(OFILES):	awk.h awkgram.tab.h proto.h

awkgram.tab.c awkgram.tab.h:	awk.h proto.h awkgram.y
	$(YACC) $(YFLAGS) awkgram.y

proctab.c:	maketab
	./maketab awkgram.tab.h >proctab.c

maketab:	awkgram.tab.h maketab.c
	$(HOSTCC) $(CFLAGS) maketab.c -o maketab

bundle:
	@@cp awkgram.tab.h awkgram.tab.h.bak
	@@cp awkgram.tab.c awkgram.tab.c.bak
	@@bundle $(SHIP)

tar:
	@@cp awkgram.tab.h awkgram.tab.h.bak
	@@cp awkgram.tab.c awkgram.tab.c.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

gitadd:
	git add README LICENSE FIXES \
           awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
	   lib.c run.c tran.c \
	   makefile awk.1 testdir

gitpush:
	# only do this once:
	# git remote add origin https://github.com/onetrueawk/awk.git
	git push -u origin master

names:
	@@echo $(LISTING)

test check:
	./REGRESS

clean: testclean
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c

cleaner: testclean
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda proctab.c awkgram.tab.*

# This is a bit of a band-aid until we can invest some more time
# in the test suite.
testclean:
	cd testdir; rm -fr arnold-fixes beebe devnull echo foo* \
		glop glop1 glop2 lilly.diff tempbig tempsmall time

# For the habits of GNU maintainers:
distclean: cleaner
@


1.4
log
@merge conflicts
@
text
@d25 1
d31 5
a35 4
#CC = gcc -Wall -g -Wwrite-strings
#CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
HOSTCC = gcc -g -Wall -pedantic -Wcast-qual
d38 3
a40 2
# yacc options.  pick one; this varies a lot by system.
#YFLAGS = -d -S
a41 2
#YACC = yacc -d
#		-S uses sprintf in yacc parser instead of sprint
d45 1
a45 1
SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \
d51 1
a51 1
SHIP = README LICENSE FIXES $(SOURCE) ytab[ch].bak makefile  \
d54 2
a55 2
a.out:	ytab.o $(OFILES)
	$(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC)  -lm
d57 1
a57 1
$(OFILES):	awk.h ytab.h proto.h
d59 1
a59 5
# Clear dependency for parallel build: (make -j)
# Depending if we used yacc or bison we can be generating different names
# ({awkgram,y}.tab.{c,h}) so try to move both. We could be using -p to
# specify the output prefix, but older yacc's don't support it.
ytab.c ytab.h:	awk.h proto.h awkgram.y
a60 5
	-@@for i in c h; do for j in awkgram y; do \
	     if [ -f "$$j.tab.$$i" ]; then mv $$j.tab.$$i ytab.$$i; fi; \
	  done; done

ytab.h:	ytab.c
d63 1
a63 1
	./maketab ytab.h >proctab.c
d65 1
a65 1
maketab:	ytab.h maketab.c
d69 2
a70 2
	@@cp ytab.h ytabh.bak
	@@cp ytab.c ytabc.bak
d74 2
a75 2
	@@cp ytab.h ytabh.bak
	@@cp ytab.c ytabc.bak
d104 1
a104 1
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda proctab.c ytab*
d109 1
a109 1
	cd testdir; rm -fr arnold-fixes beebe echo foo* \
d113 1
a113 1
distclean: clean
@


1.4.10.1
log
@Sync with HEAD
@
text
@a24 1
CFLAGS = -fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
d30 4
a33 5
#CC = cc -Wall -g -Wwrite-strings
#CC = cc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = cc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
HOSTCC = cc -g -Wall -pedantic -Wcast-qual
# HOSTCC = g++ -g -Wall -pedantic -Wcast-qual
d36 2
a37 3
# By fiat, to make our lives easier, yacc is now defined to be bison.
# If you want something else, you're on your own.
# YACC = yacc -d -b awkgram
d39 2
d44 1
a44 1
SOURCE = awk.h awkgram.tab.c awkgram.tab.h proto.h awkgram.y lex.c b.c main.c \
d50 1
a50 1
SHIP = README LICENSE FIXES $(SOURCE) awkgram.tab.[ch].bak makefile  \
d53 2
a54 2
a.out:	awkgram.tab.o $(OFILES)
	$(CC) $(CFLAGS) awkgram.tab.o $(OFILES) $(ALLOC)  -lm
d56 1
a56 1
$(OFILES):	awk.h awkgram.tab.h proto.h
d58 5
a62 1
awkgram.tab.c awkgram.tab.h:	awk.h proto.h awkgram.y
d64 5
d71 1
a71 1
	./maketab awkgram.tab.h >proctab.c
d73 1
a73 1
maketab:	awkgram.tab.h maketab.c
d77 2
a78 2
	@@cp awkgram.tab.h awkgram.tab.h.bak
	@@cp awkgram.tab.c awkgram.tab.c.bak
d82 2
a83 2
	@@cp awkgram.tab.h awkgram.tab.h.bak
	@@cp awkgram.tab.c awkgram.tab.c.bak
d112 1
a112 1
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda proctab.c awkgram.tab.*
d117 1
a117 1
	cd testdir; rm -fr arnold-fixes beebe devnull echo foo* \
d121 1
a121 1
distclean: cleaner
@


1.3
log
@merge 2012-12-20
@
text
@d4 1
a4 1
# 
d14 1
a14 1
# 
d26 1
a27 1
CFLAGS =
d29 6
a34 8
CC = gcc -Wall -g
CC = /opt/SUNWspro/bin/cc
CC = /opt/pure/purify/purify cc
CC = cc
CC = gcc -Wall -g -Wwrite-strings
CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
CC = gcc -g -Wall -pedantic 
CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
d36 1
a36 2
YACC = bison -d -y
YACC = yacc -d -S
d38 3
a40 1
		# -S uses sprintf in yacc parser instead of sprint
d45 1
a45 1
	maketab.c parse.c lib.c run.c tran.c proctab.c 
d48 1
a48 1
	lib.c run.c tran.c 
d50 1
a50 1
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile  \
d58 5
a62 1
ytab.o:	awk.h proto.h awkgram.y
d64 5
a68 3
	mv y.tab.c ytab.c
	mv y.tab.h ytab.h
	$(CC) $(CFLAGS) -c ytab.c
d71 1
a71 1
	./maketab >proctab.c
d74 1
a74 1
	$(CC) $(CFLAGS) maketab.c -o maketab
d91 11
d105 17
a121 2
clean:
	rm -f a.out *.o *.obj maketab maketab.exe ytab.[ch] *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c
@


1.3.30.1
log
@Merge changes from current as of 20200406
@
text
@d4 1
a4 1
#
d14 1
a14 1
#
d26 1
a27 1
CFLAGS = -O2
d29 8
a36 6
# compiler options
#CC = gcc -Wall -g -Wwrite-strings
#CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
HOSTCC = gcc -g -Wall -pedantic -Wcast-qual
CC = $(HOSTCC)  # change this is cross-compiling.
d38 2
a39 1
# yacc options.  pick one; this varies a lot by system.
d41 1
a41 3
YACC = bison -d
#YACC = yacc -d
#		-S uses sprintf in yacc parser instead of sprint
d46 1
a46 1
	maketab.c parse.c lib.c run.c tran.c proctab.c
d49 1
a49 1
	lib.c run.c tran.c
d51 1
a51 1
SHIP = README LICENSE FIXES $(SOURCE) ytab[ch].bak makefile  \
d59 1
a59 5
# Clear dependency for parallel build: (make -j)
# Depending if we used yacc or bison we can be generating different names
# ({awkgram,y}.tab.{c,h}) so try to move both. We could be using -p to
# specify the output prefix, but older yacc's don't support it.
ytab.c ytab.h:	awk.h proto.h awkgram.y
d61 3
a63 5
	-@@for i in c h; do for j in awkgram y; do \
	     if [ -f "$$j.tab.$$i" ]; then mv $$j.tab.$$i ytab.$$i; fi; \
	  done; done

ytab.h:	ytab.c
d66 1
a66 1
	./maketab ytab.h >proctab.c
d69 1
a69 1
	$(HOSTCC) $(CFLAGS) maketab.c -o maketab
a85 11
gitadd:
	git add README LICENSE FIXES \
           awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
	   lib.c run.c tran.c \
	   makefile awk.1 testdir

gitpush:
	# only do this once:
	# git remote add origin https://github.com/onetrueawk/awk.git
	git push -u origin master

d89 2
a90 17
test check:
	./REGRESS

clean: testclean
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c

cleaner: testclean
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda proctab.c ytab*

# This is a bit of a band-aid until we can invest some more time
# in the test suite.
testclean:
	cd testdir; rm -fr arnold-fixes beebe echo foo* \
		glop glop1 glop2 lilly.diff tempbig tempsmall time

# For the habits of GNU maintainers:
distclean: clean
@


1.2
log
@Apply all our changes including newer fixes to WARNS?=4
@
text
@d35 2
a36 1
CC = gcc -O4
d38 4
a41 3
YACC = bison -y
YACC = yacc
YFLAGS = -d
d46 1
a46 1
	maketab.c parse.c lib.c run.c tran.c proctab.c missing95.c
d49 1
a49 1
	lib.c run.c tran.c missing95.c
d51 2
a52 2
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile makefile.win \
	vcvars32.bat buildwin.bat awk.1
@


1.2.12.1
log
@resync with head
@
text
@d35 1
a35 2
CC = gcc -g -Wall -pedantic 
CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
d37 3
a39 4
YACC = bison -d -y
YACC = yacc -d -S
#YFLAGS = -d -S
		# -S uses sprintf in yacc parser instead of sprint
d44 1
a44 1
	maketab.c parse.c lib.c run.c tran.c proctab.c 
d47 1
a47 1
	lib.c run.c tran.c 
d49 2
a50 2
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile  \
	 awk.1
@


1.2.6.1
log
@sync with head
@
text
@d35 1
a35 2
CC = gcc -g -Wall -pedantic 
CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
d37 3
a39 4
YACC = bison -d -y
YACC = yacc -d -S
#YFLAGS = -d -S
		# -S uses sprintf in yacc parser instead of sprint
d44 1
a44 1
	maketab.c parse.c lib.c run.c tran.c proctab.c 
d47 1
a47 1
	lib.c run.c tran.c 
d49 2
a50 2
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile  \
	 awk.1
@


1.1
log
@Initial revision
@
text
@d30 2
d88 1
a88 1
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda # proctab.c
@


1.1.1.1
log
@imprort latest nawk
@
text
@@


1.1.1.2
log
@from http://www.cs.princeton.edu/~bwk/btl.mirror/
@
text
@d29 2
d33 1
a33 2
CC = gcc -g -Wall -pedantic 
CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
d35 3
a37 4
YACC = bison -d -y
YACC = yacc -d -S
#YFLAGS = -d -S
		# -S uses sprintf in yacc parser instead of sprint
d42 1
a42 1
	maketab.c parse.c lib.c run.c tran.c proctab.c 
d45 1
a45 1
	lib.c run.c tran.c 
d47 2
a48 2
SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile  \
	 awk.1
@


1.1.1.3
log
@Last import was 2010 when there was no ChangeLog yet. I've worked
with upstream to merge all our changes and this includes many other
fixes including new operator support etc. The change to pass an
extra "isnew" argument to open was not preserved as none of the
tests supplied with the PR fail.

This also adds the testsuite and all the bugs fixed since then.
@
text
@d4 1
a4 1
#
d14 1
a14 1
#
d26 1
a27 1
CFLAGS = -O2
d29 4
a32 6
# compiler options
#CC = gcc -Wall -g -Wwrite-strings
#CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
HOSTCC = gcc -g -Wall -pedantic -Wcast-qual
CC = $(HOSTCC)  # change this is cross-compiling.
d34 2
a35 1
# yacc options.  pick one; this varies a lot by system.
d37 1
a37 3
YACC = bison -d
#YACC = yacc -d
#		-S uses sprintf in yacc parser instead of sprint
d42 1
a42 1
	maketab.c parse.c lib.c run.c tran.c proctab.c
d45 1
a45 1
	lib.c run.c tran.c
d47 1
a47 1
SHIP = README LICENSE FIXES $(SOURCE) ytab[ch].bak makefile  \
d55 1
a55 5
# Clear dependency for parallel build: (make -j)
# Depending if we used yacc or bison we can be generating different names
# ({awkgram,y}.tab.{c,h}) so try to move both. We could be using -p to
# specify the output prefix, but older yacc's don't support it.
ytab.c ytab.h:	awk.h proto.h awkgram.y
d57 3
a59 5
	-@@for i in c h; do for j in awkgram y; do \
	     if [ -f "$$j.tab.$$i" ]; then mv $$j.tab.$$i ytab.$$i; fi; \
	  done; done

ytab.h:	ytab.c
d62 1
a62 1
	./maketab ytab.h >proctab.c
d65 1
a65 1
	$(HOSTCC) $(CFLAGS) maketab.c -o maketab
a81 11
gitadd:
	git add README LICENSE FIXES \
           awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \
	   lib.c run.c tran.c \
	   makefile awk.1 testdir

gitpush:
	# only do this once:
	# git remote add origin https://github.com/onetrueawk/awk.git
	git push -u origin master

d85 1
a85 4
test check:
	./REGRESS

clean: testclean
a86 12

cleaner: testclean
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda proctab.c ytab*

# This is a bit of a band-aid until we can invest some more time
# in the test suite.
testclean:
	cd testdir; rm -fr arnold-fixes beebe echo foo* \
		glop glop1 glop2 lilly.diff tempbig tempsmall time

# For the habits of GNU maintainers:
distclean: clean
@


1.1.1.4
log
@Import the current version of nawk from github.
Last was imported on 2020-02-18. The major change is utf8 handling.
@
text
@a24 1
CFLAGS = -fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
d30 4
a33 5
#CC = cc -Wall -g -Wwrite-strings
#CC = cc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = cc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
HOSTCC = cc -g -Wall -pedantic -Wcast-qual
# HOSTCC = g++ -g -Wall -pedantic -Wcast-qual
d36 2
a37 3
# By fiat, to make our lives easier, yacc is now defined to be bison.
# If you want something else, you're on your own.
# YACC = yacc -d -b awkgram
d39 2
d44 1
a44 1
SOURCE = awk.h awkgram.tab.c awkgram.tab.h proto.h awkgram.y lex.c b.c main.c \
d50 1
a50 1
SHIP = README LICENSE FIXES $(SOURCE) awkgram.tab.[ch].bak makefile  \
d53 2
a54 2
a.out:	awkgram.tab.o $(OFILES)
	$(CC) $(CFLAGS) awkgram.tab.o $(OFILES) $(ALLOC)  -lm
d56 1
a56 1
$(OFILES):	awk.h awkgram.tab.h proto.h
d58 5
a62 1
awkgram.tab.c awkgram.tab.h:	awk.h proto.h awkgram.y
d64 5
d71 1
a71 1
	./maketab awkgram.tab.h >proctab.c
d73 1
a73 1
maketab:	awkgram.tab.h maketab.c
d77 2
a78 2
	@@cp awkgram.tab.h awkgram.tab.h.bak
	@@cp awkgram.tab.c awkgram.tab.c.bak
d82 2
a83 2
	@@cp awkgram.tab.h awkgram.tab.h.bak
	@@cp awkgram.tab.c awkgram.tab.c.bak
d112 1
a112 1
	rm -f a.out *.o *.obj maketab maketab.exe *.bb *.bbg *.da *.gcov *.gcno *.gcda proctab.c awkgram.tab.*
d117 1
a117 1
	cd testdir; rm -fr arnold-fixes beebe devnull echo foo* \
d121 1
a121 1
distclean: cleaner
@


