Skip to content

Commit

Permalink
Bring latest byte code gawk into git. Hurray!
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoldrobbins committed Nov 18, 2010
1 parent 4e37010 commit 6f36125
Show file tree
Hide file tree
Showing 182 changed files with 53,432 additions and 33,428 deletions.
Empty file modified COPYING
100755 → 100644
Empty file.
515 changes: 515 additions & 0 deletions ChangeLog

Large diffs are not rendered by default.

25 changes: 16 additions & 9 deletions FUTURES
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ now, though. :-)

For 3.1.8 + bytecode
====================
Performance fixes / improvements
DONE: Performance fixes / improvements

DONE: Change @sourcefile to @include per awk.info poll

Document @include
DONE: Document @include

Update copyrights
DONE: Update copyrights

Document dgawk
DONE: Document dgawk

For 4.0
=======
Expand All @@ -42,11 +42,11 @@ For 4.0

Remove all old README* files.

? Remove --copyleft, leaving just --copyright.
DONE: Remove --copyleft, leaving just --copyright.

DONE: Enable \s, \S in regexes (regcomp.c and dfa.c) and document them.

Integrate byte code changes and dgawk
DONE: Integrate byte code changes and dgawk
Indirect functions
BEGINFILE, ENDFILE

Expand All @@ -61,27 +61,34 @@ For 4.0

DONE: Add IPv6 support.

DONE: Add true multidimensional arrays.

Gnulib?

Move to git?

Additional manual features:
Remove all page breaks
Review internal notes about reorganization
Full front to back read through
DONE: Full front to back read through - before editing
Full front to back read through - after editing

For 4.1
=======
Implement designed API for loadable modules

Redo the loadable modules interface from the awk level.
Merge xmlgawk -l feature

? Move the loadable modules interface to libtool.
Merge xmlgawk XML extensions

Redo the loadable modules interface from the awk level.

Rework management of array index storage. (Partially DONE.)

DBM storage of awk arrays. Try to allow multiple dbm packages.

? Move the loadable modules interface to libtool.

? Add an optional base to strtonum, allowing 2-36.

? Optional third argument for index indicating where to start the
Expand Down
21 changes: 16 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

## process this file with automake to produce Makefile.in

# Automatic de-ANSI-fication if needed, make .bz2 files also.
# Make .bz2 files also.
AUTOMAKE_OPTIONS = dist-bzip2

# This undocumented variable insures that aclocal runs
# This variable insures that aclocal runs
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4

Expand All @@ -36,6 +36,8 @@ AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
# Stuff to include in the dist that doesn't need it's own
# Makefile.am files
EXTRA_DIST = \
TODO \
POSIX.NOTES \
COPYING \
FUTURES \
INSTALL \
Expand Down Expand Up @@ -75,14 +77,15 @@ SUBDIRS = \
test

# what to make and install
bin_PROGRAMS = gawk pgawk
bin_PROGRAMS = gawk pgawk dgawk

# sources for both gawk and pgawk
base_sources = \
array.c \
awk.h \
awkgram.y \
builtin.c \
awkprintf.h \
custom.h \
dfa.c \
dfa.h \
Expand Down Expand Up @@ -114,9 +117,11 @@ base_sources = \

gawk_SOURCES = $(base_sources) eval.c profile.c
pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c
dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c

# Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS)
dgawk_LDADD = $(LDADD) @LIBREADLINE@

# Directory for gawk's data files. Automake supplies datadir.
pkgdatadir = $(datadir)/awk
Expand Down Expand Up @@ -165,16 +170,22 @@ dist-hook:
cd $(distdir) ; find . -type d -name CVS | xargs rm -fr

# Special rules for individual files
# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build
# or work correctly.
awkgram.c: awkgram.y
$(YACC) $(AM_YFLAGS) $(YFLAGS) $<
sed 's/parse error/syntax error/g' < y.tab.c | $(AWK) -f $(srcdir)/bisonfix.awk > $*.c && rm y.tab.c
sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.c && rm y.tab.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi

version.c: config.status version.in
$(SHELL) ./config.status --file=version.c:version.in

command.c: command.y
$(YACC) -p zz $<
sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk command > $*.c && rm y.tab.c

# This is for my development & testing.
efence: gawk
$(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence
Expand All @@ -184,5 +195,5 @@ diffout valgrind-scan:

valgrind:
cd test; rm -f log.[0-9]*; \
make check AWK="valgrind --log-file=log ../gawk"; \
make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \
make valgrind-scan
56 changes: 41 additions & 15 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT)
bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) dgawk$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/configh.in \
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
INSTALL NEWS awkgram.c config.guess config.rpath config.sub \
depcomp install-sh missing mkinstalldirs ylwrap
INSTALL NEWS TODO awkgram.c command.c config.guess \
config.rpath config.sub depcomp install-sh missing \
mkinstalldirs ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
Expand All @@ -73,9 +74,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Expand All @@ -92,10 +93,16 @@ am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \
getopt1.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) msg.$(OBJEXT) \
node.$(OBJEXT) random.$(OBJEXT) re.$(OBJEXT) regex.$(OBJEXT) \
replace.$(OBJEXT) version.$(OBJEXT)
am_dgawk_OBJECTS = $(am__objects_1) eval_d.$(OBJEXT) profile.$(OBJEXT) \
command.$(OBJEXT) debug.$(OBJEXT)
dgawk_OBJECTS = $(am_dgawk_OBJECTS)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
dgawk_DEPENDENCIES = $(am__DEPENDENCIES_2)
am_gawk_OBJECTS = $(am__objects_1) eval.$(OBJEXT) profile.$(OBJEXT)
gawk_OBJECTS = $(am_gawk_OBJECTS)
gawk_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
gawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pgawk_OBJECTS = $(am__objects_1) eval_p.$(OBJEXT) \
Expand All @@ -114,8 +121,8 @@ CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
YLWRAP = $(top_srcdir)/ylwrap
SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES)
DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES)
SOURCES = $(dgawk_SOURCES) $(gawk_SOURCES) $(pgawk_SOURCES)
DIST_SOURCES = $(dgawk_SOURCES) $(gawk_SOURCES) $(pgawk_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
Expand Down Expand Up @@ -163,7 +170,7 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
Expand Down Expand Up @@ -205,6 +212,7 @@ LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBREADLINE = @LIBREADLINE@
LIBS = @LIBS@
LIBSIGSEGV = @LIBSIGSEGV@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
Expand Down Expand Up @@ -291,10 +299,10 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@

# Automatic de-ANSI-fication if needed, make .bz2 files also.
# Make .bz2 files also.
AUTOMAKE_OPTIONS = dist-bzip2

# This undocumented variable insures that aclocal runs
# This variable insures that aclocal runs
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4

Expand All @@ -304,6 +312,8 @@ AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
# Stuff to include in the dist that doesn't need it's own
# Makefile.am files
EXTRA_DIST = \
TODO \
POSIX.NOTES \
COPYING \
FUTURES \
INSTALL \
Expand Down Expand Up @@ -350,6 +360,7 @@ base_sources = \
awk.h \
awkgram.y \
builtin.c \
awkprintf.h \
custom.h \
dfa.c \
dfa.h \
Expand Down Expand Up @@ -381,9 +392,11 @@ base_sources = \

gawk_SOURCES = $(base_sources) eval.c profile.c
pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c
dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c

# Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS)
dgawk_LDADD = $(LDADD) @LIBREADLINE@

# stuff for compiling gawk/pgawk
DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"'
Expand Down Expand Up @@ -487,6 +500,9 @@ uninstall-binPROGRAMS:

clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
dgawk$(EXEEXT): $(dgawk_OBJECTS) $(dgawk_DEPENDENCIES)
@rm -f dgawk$(EXEEXT)
$(LINK) $(dgawk_OBJECTS) $(dgawk_LDADD) $(LIBS)
gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES)
@rm -f gawk$(EXEEXT)
$(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS)
Expand All @@ -503,8 +519,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@
Expand Down Expand Up @@ -756,7 +775,6 @@ dist-bzip2: distdir
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)

dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
Expand All @@ -777,6 +795,7 @@ dist-zip: distdir
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)

# This target untars the dist file and tries a VPATH configuration. Then
Expand Down Expand Up @@ -890,6 +909,7 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f awkgram.c
-rm -f command.c
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive

Expand Down Expand Up @@ -1018,16 +1038,22 @@ dist-hook:
cd $(distdir) ; find . -type d -name CVS | xargs rm -fr

# Special rules for individual files
# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build
# or work correctly.
awkgram.c: awkgram.y
$(YACC) $(AM_YFLAGS) $(YFLAGS) $<
sed 's/parse error/syntax error/g' < y.tab.c | $(AWK) -f $(srcdir)/bisonfix.awk > $*.c && rm y.tab.c
sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.c && rm y.tab.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi

version.c: config.status version.in
$(SHELL) ./config.status --file=version.c:version.in

command.c: command.y
$(YACC) -p zz $<
sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk command > $*.c && rm y.tab.c

# This is for my development & testing.
efence: gawk
$(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence
Expand All @@ -1037,7 +1063,7 @@ diffout valgrind-scan:

valgrind:
cd test; rm -f log.[0-9]*; \
make check AWK="valgrind --log-file=log ../gawk"; \
make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \
make valgrind-scan

# Tell versions [3.59,3.63) of GNU make to not export all variables.
Expand Down
22 changes: 19 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

Changes from xxxx to 4.0.0
--------------------------
Changes from 3.1.8 to 4.0.0
---------------------------

1. The special files /dev/pid, /dev/ppid, /dev/pgrpid and /dev/user are
now completely gone. Use PROCINFO instead.

2. The POSIX 2001 behavior for `sub' and `gsub' are now the default.
2. The POSIX 2008 behavior for `sub' and `gsub' are now the default.
THIS CHANGES BEHAVIOR!!!!

3. The \s and \S escape sequences are now recognized in regular expressions.

Expand Down Expand Up @@ -49,6 +50,21 @@ Changes from xxxx to 4.0.0

16. Added a warning for /[:space:]/ that should be /[[:space:]]/.

17. Merged with John Haque's byte code internals. Adds dgawk debugger and
possibly improved performance.

18. `break' and `continue' are no longer valid outside a loop, even with
--traditional.

19. POSIX character classes work, even with --traditional (BWK awk supports
them).

20. Nuked redundant --compat, --copyleft, and --usage long options.

21. Arrays of arrays added.

22. Many code cleanups. Removed code for many old, unsupported systems.

Changes from 3.1.7 to 3.1.8
---------------------------
1. The zero flag no longer applies to %c and %s; apparently the standards
Expand Down
Loading

0 comments on commit 6f36125

Please sign in to comment.