aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-10-04 11:22:56 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-10-04 11:22:56 +0300
commit2626d04d332dd87d4e6e9effe943dd6aa3d21cac (patch)
tree705737cb3eda7b80afaec1c0b22c620491e212e0
parentb08964cd1db8da56e2a16cebde05d493d4f6ae1b (diff)
parentd992c45de5c007fc28a8e0cafec81bb9308a342c (diff)
downloadegawk-2626d04d332dd87d4e6e9effe943dd6aa3d21cac.tar.gz
egawk-2626d04d332dd87d4e6e9effe943dd6aa3d21cac.tar.bz2
egawk-2626d04d332dd87d4e6e9effe943dd6aa3d21cac.zip
Merge branch 'gawk-4.1-stable' (zOS updates included)
-rw-r--r--ChangeLog45
-rw-r--r--Makefile.am6
-rw-r--r--Makefile.in13
-rw-r--r--NEWS2
-rw-r--r--README6
-rw-r--r--awk.h30
-rw-r--r--awkgram.c43
-rw-r--r--awkgram.y43
-rw-r--r--awklib/ChangeLog12
-rw-r--r--awklib/Makefile.am20
-rw-r--r--awklib/Makefile.in28
-rw-r--r--awklib/eg/lib/grcat.c6
-rw-r--r--awklib/eg/lib/pwcat.c10
-rw-r--r--command.c37
-rw-r--r--command.y37
-rw-r--r--configh.in15
-rwxr-xr-xconfigure156
-rw-r--r--configure.ac27
-rw-r--r--custom.h12
-rw-r--r--doc/ChangeLog14
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in10
-rw-r--r--doc/gawk.info1120
-rw-r--r--doc/gawk.texi22
-rw-r--r--doc/gawktexi.in22
-rw-r--r--doc/texinfo.tex1262
-rw-r--r--eval.c4
-rw-r--r--extension/ChangeLog10
-rw-r--r--extension/Makefile.am2
-rw-r--r--extension/Makefile.in11
-rw-r--r--extension/aclocal.m41
-rwxr-xr-xextension/configure93
-rw-r--r--extension/configure.ac1
-rw-r--r--extension/gawkfts.h8
-rw-r--r--extension/readdir.c12
-rw-r--r--extension/rwarray.c11
-rw-r--r--helpers/ChangeLog8
-rw-r--r--helpers/testdfa.c2
-rw-r--r--io.c8
-rw-r--r--m4/ChangeLog17
-rw-r--r--m4/arch.m490
-rw-r--r--regcomp.c9
-rw-r--r--regex_internal.h2
-rw-r--r--test/ChangeLog8
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in27
46 files changed, 1756 insertions, 1574 deletions
diff --git a/ChangeLog b/ChangeLog
index a716616e..3cf46ced 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-10-04 Arnold D. Robbins <arnold@skeeve.com>
+
+ * configure.ac: Bump version to 4.1.3a.
+
2015-09-26 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Diagnose multidimensional arrays for
@@ -15,11 +19,52 @@
already parsed part of the record. Thanks to Ed Morton
for the bug report.
+2015-09-11 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * regcomp.h: Include strings.h, wrapped in ifdef. Revise
+ defines for BTOWC.
+ * regex_internal.h: Remove ZOS_USS bracketing ifdefs.
+
2015-09-04 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_num): Use format_val to print integral values
as integers. Thanks to Hermann Peifer for the report.
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * Makefile.am, configure.ac: Use an Automake conditional to
+ enable/disable the "extensions" subdirectory instead of
+ producing a stub Makefile therein from the configure script.
+ * awk.h, custom.h, regex_internal.h: Removed z/OS-specific code
+ that is no longer needed due to improvements in Gawk's general
+ Autotools support.
+ * awk.h: Allow <strings.h> to be #included together with
+ <string.h> as this is required on some systems (z/OS).
+ * io.c, configure.ac: <sys/select.h> is needed for select()
+ and related bits on z/OS.
+ * awk.h: Handle the redefinition of EXIT_FAILURE on z/OS in a
+ more elegant/general way.
+ * awkgram.y, command.y, configure.ac, eval.c,
+ helpers/testdfa.c: Define and use the USE_EBCDIC cpp symbol
+ instead of checking the value of 'a' whenever we want to know
+ if we're on an EBCDIC system. Also, don't assume that z/OS
+ necessarily means EBCDIC, as the compiler does have an ASCII
+ mode (-qascii).
+ * awkgram.y, command.y, configure.ac: On EBCDIC systems,
+ convert singleton EBCDIC characters in the input stream to
+ ASCII on the fly so that the generated awkgram.c/command.c in
+ the distributed sources can be used, i.e. we don't have to
+ require the user to build Bison and re-generate those files
+ themselves. This implementation uses a z/OS-specific function
+ (__etoa_l()) to do the conversion, but support for other
+ systems can be added in the future as necessary.
+ * io.c: No need to protect this block of "#if
+ defined(HAVE_TERMIOS_H)" code from z/OS; it works just fine
+ there.
+ * configure.ac: Check for the "struct passwd.pw_passwd" and
+ "struct group.gr_passwd" fields and conditionalize their use,
+ as they don't exist on z/OS. Needed for doc/gawktexi.in.
+
2015-08-25 Arnold D. Robbins <arnold@skeeve.com>
* node.c (str2wstr): Upon finding an invalid character, if
diff --git a/Makefile.am b/Makefile.am
index 43e0ee7a..342df292 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,10 +68,12 @@ SUBDIRS = \
doc \
awklib \
po \
- extension \
- extras \
test
+if ENABLE_EXTENSIONS
+SUBDIRS += extension
+endif
+
# what to make and install
bin_PROGRAMS = gawk
include_HEADERS = gawkapi.h
diff --git a/Makefile.in b/Makefile.in
index d286b1da..c327d1b6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@ENABLE_EXTENSIONS_TRUE@am__append_1 = extension
bin_PROGRAMS = gawk$(EXEEXT)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -261,7 +262,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = . doc awklib po test extension
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in ABOUT-NLS \
AUTHORS COPYING ChangeLog INSTALL NEWS README TODO awkgram.c \
command.c compile config.guess config.rpath config.sub depcomp \
@@ -480,15 +481,7 @@ EXTRA_DIST = \
# that `make check' without a prior `make' works.
# Build in awklib after in doc, since we want to extract
# sample files if doc/gawk.texi changed.
-SUBDIRS = \
- . \
- doc \
- awklib \
- po \
- extension \
- extras \
- test
-
+SUBDIRS = . doc awklib po test $(am__append_1)
include_HEADERS = gawkapi.h
# sources for both gawk and dgawk
diff --git a/NEWS b/NEWS
index 081ae41f..ee3d9f3b 100644
--- a/NEWS
+++ b/NEWS
@@ -72,6 +72,8 @@ Changes from 4.1.3 to 4.1.x
1. Updated to GNU autoconf 2.69, automake 1.15, gettext 0.19.5.1.
+2. z/OS support updated.
+
Changes from 4.1.2 to 4.1.3
---------------------------
diff --git a/README b/README
index a1b32de0..11905893 100644
--- a/README
+++ b/README
@@ -94,6 +94,10 @@ VMS:
John Malmberg
wb8tyw@qsl.net
-z/OS (OS/390):
+z/OS (OS/390) Contact:
+ Daniel Richard G.
+ skunk@iSKUNK.ORG
+
+z/OS (OS/390) Maintainer Emeritus:
Dave Pitts
dpitts@cozx.com
diff --git a/awk.h b/awk.h
index 8bf78fcd..001f165f 100644
--- a/awk.h
+++ b/awk.h
@@ -108,24 +108,12 @@ extern int errno;
#undef CHARBITS
#undef INTBITS
-#if !defined(ZOS_USS)
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
-#else /* ZOS_USS */
-#include <limits.h>
-#include <sys/time.h>
-#define INT32_MAX INT_MAX
-#define INT32_MIN INT_MIN
-#ifndef __uint32_t
-#define __uint32_t 1
-typedef unsigned long uint32_t;
-#endif
-typedef long int32_t;
-#endif /* !ZOS_USS */
/* ----------------- System dependencies (with more includes) -----------*/
@@ -159,11 +147,10 @@ typedef int off_t;
#ifdef NEED_MEMORY_H
#include <memory.h>
#endif /* NEED_MEMORY_H */
-#else /* not HAVE_STRING_H */
+#endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRINGS_H */
-#endif /* not HAVE_STRING_H */
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -1679,6 +1666,11 @@ extern uintmax_t adjust_uint(uintmax_t n);
#endif /* ! defined(VMS)) */
#endif /* WEXITSTATUS */
+/* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */
+#if defined(EXIT_FAILURE) && EXIT_FAILURE == 8
+# undef EXIT_FAILURE
+#endif
+
/* EXIT_SUCCESS and EXIT_FAILURE normally come from <stdlib.h> */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -1691,16 +1683,6 @@ extern uintmax_t adjust_uint(uintmax_t n);
# define EXIT_FATAL 2
#endif
-/* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */
-#ifdef ZOS_USS
-
-#ifdef EXIT_FAILURE
-#undef EXIT_FAILURE
-#endif
-
-#define EXIT_FAILURE 1
-#endif
-
/* ------------------ Inline Functions ------------------ */
/*
diff --git a/awkgram.c b/awkgram.c
index 8fd73b26..0acc1702 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -4420,7 +4420,7 @@ struct token {
NODE *(*ptr2)(int); /* alternate arbitrary-precision function */
};
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
/* tokcompare --- lexicographically compare token names for sorting */
static int
@@ -5679,7 +5679,11 @@ newline_eof()
/* yylex --- Read the input and turn it into tokens. */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
int c;
bool seen_e = false; /* These are for numbers */
@@ -6569,6 +6573,41 @@ out:
#undef NEWLINE_EOF
}
+/* It's EBCDIC in a Bison grammar, run for the hills!
+
+ Or, convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* snode --- instructions for builtin functions. Checks for arg. count
and supplies defaults where possible. */
@@ -8351,7 +8390,7 @@ check_special(const char *name)
int low, high, mid;
int i;
int non_standard_flags = 0;
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
static bool did_sort = false;
if (! did_sort) {
diff --git a/awkgram.y b/awkgram.y
index 6df43046..0b8250e7 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -2000,7 +2000,7 @@ struct token {
NODE *(*ptr2)(int); /* alternate arbitrary-precision function */
};
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
/* tokcompare --- lexicographically compare token names for sorting */
static int
@@ -3259,7 +3259,11 @@ newline_eof()
/* yylex --- Read the input and turn it into tokens. */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
int c;
bool seen_e = false; /* These are for numbers */
@@ -4149,6 +4153,41 @@ out:
#undef NEWLINE_EOF
}
+/* It's EBCDIC in a Bison grammar, run for the hills!
+
+ Or, convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* snode --- instructions for builtin functions. Checks for arg. count
and supplies defaults where possible. */
@@ -5931,7 +5970,7 @@ check_special(const char *name)
int low, high, mid;
int i;
int non_standard_flags = 0;
-#if 'a' == 0x81 /* it's EBCDIC */
+#ifdef USE_EBCDIC
static bool did_sort = false;
if (! did_sort) {
diff --git a/awklib/ChangeLog b/awklib/ChangeLog
index 791c25f6..eb9ffcd6 100644
--- a/awklib/ChangeLog
+++ b/awklib/ChangeLog
@@ -1,3 +1,15 @@
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * Makefile.am: Build pwcat.c and grcat.c with (copied)
+ source in the current directory, so that (1) we can use
+ Automake-generated build rules instead of rolling our own, and
+ (2) Automake doesn't then admonish us to enable subdir-objects
+ due to the source files being in another directory.
+ * Makefile.am: Make the $(srcdir)/stamp-eg rule depend
+ on gawktexi.in instead of the gawk.texi file that is generated
+ from same, so that the build doesn't break if the latter is
+ missing.
+
2015-06-19 Arnold D. Robbins <arnold@skeeve.com>
* extract.awk: Sync with current version in the doc. Thanks to
diff --git a/awklib/Makefile.am b/awklib/Makefile.am
index 27bb269f..902c1937 100644
--- a/awklib/Makefile.am
+++ b/awklib/Makefile.am
@@ -44,6 +44,8 @@ AUXAWK = passwd.awk group.awk
nodist_grcat_SOURCES = grcat.c
nodist_pwcat_SOURCES = pwcat.c
+CLEANFILES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES)
+
all: $(srcdir)/stamp-eg $(AUXPROGS) $(AUXAWK)
install-exec-hook: $(AUXAWK)
@@ -62,22 +64,24 @@ clean-local:
rm -fr eg.old
rm -fr grcat.dSYM pwcat.dSYM
-$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
+$(srcdir)/stamp-eg: $(srcdir)/../doc/gawktexi.in $(srcdir)/../doc/gawkinet.texi
cd $(srcdir) && \
rm -fr eg && \
rm -fr stamp-eg && \
- $(AWKPROG) -f ./extract.awk ../doc/gawk.texi ../doc/gawkinet.texi
+ $(AWKPROG) -f ./extract.awk ../doc/gawktexi.in ../doc/gawkinet.texi
@echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg
@echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg
-$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c \
-$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
+pwcat.c: $(srcdir)/eg/lib/pwcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/pwcat.c .
-pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c
- $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
+grcat.c: $(srcdir)/eg/lib/grcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/grcat.c .
-grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c
- $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
+$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
+$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
passwd.awk: $(srcdir)/eg/lib/passwdawk.in
sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/passwdawk.in > passwd.awk
diff --git a/awklib/Makefile.in b/awklib/Makefile.in
index be314945..597ba20b 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -335,6 +335,7 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
AUXAWK = passwd.awk group.awk
nodist_grcat_SOURCES = grcat.c
nodist_pwcat_SOURCES = pwcat.c
+CLEANFILES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES)
all: all-am
.SUFFIXES:
@@ -411,6 +412,14 @@ uninstall-pkglibexecPROGRAMS:
clean-pkglibexecPROGRAMS:
-test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS)
+grcat$(EXEEXT): $(grcat_OBJECTS) $(grcat_DEPENDENCIES) $(EXTRA_grcat_DEPENDENCIES)
+ @rm -f grcat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(grcat_OBJECTS) $(grcat_LDADD) $(LIBS)
+
+pwcat$(EXEEXT): $(pwcat_OBJECTS) $(pwcat_DEPENDENCIES) $(EXTRA_pwcat_DEPENDENCIES)
+ @rm -f pwcat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pwcat_OBJECTS) $(pwcat_LDADD) $(LIBS)
+
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -545,6 +554,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -662,22 +672,24 @@ clean-local:
rm -fr eg.old
rm -fr grcat.dSYM pwcat.dSYM
-$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
+$(srcdir)/stamp-eg: $(srcdir)/../doc/gawktexi.in $(srcdir)/../doc/gawkinet.texi
cd $(srcdir) && \
rm -fr eg && \
rm -fr stamp-eg && \
- $(AWKPROG) -f ./extract.awk ../doc/gawk.texi ../doc/gawkinet.texi
+ $(AWKPROG) -f ./extract.awk ../doc/gawktexi.in ../doc/gawkinet.texi
@echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg
@echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg
-$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c \
-$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
+pwcat.c: $(srcdir)/eg/lib/pwcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/pwcat.c .
-pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c
- $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
+grcat.c: $(srcdir)/eg/lib/grcat.c
+ rm -f $@
+ $(LN_S) $(srcdir)/eg/lib/grcat.c .
-grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c
- $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
+$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
+$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
passwd.awk: $(srcdir)/eg/lib/passwdawk.in
sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/passwdawk.in > passwd.awk
diff --git a/awklib/eg/lib/grcat.c b/awklib/eg/lib/grcat.c
index 7d6b6a74..cf39083c 100644
--- a/awklib/eg/lib/grcat.c
+++ b/awklib/eg/lib/grcat.c
@@ -31,11 +31,11 @@ main(int argc, char **argv)
int i;
while ((g = getgrent()) != NULL) {
-#ifdef ZOS_USS
- printf("%s:%ld:", g->gr_name, (long) g->gr_gid);
-#else
+#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
printf("%s:%s:%ld:", g->gr_name, g->gr_passwd,
(long) g->gr_gid);
+#else
+ printf("%s:*:%ld:", g->gr_name, (long) g->gr_gid);
#endif
for (i = 0; g->gr_mem[i] != NULL; i++) {
printf("%s", g->gr_mem[i]);
diff --git a/awklib/eg/lib/pwcat.c b/awklib/eg/lib/pwcat.c
index 934ef34e..cfe250c3 100644
--- a/awklib/eg/lib/pwcat.c
+++ b/awklib/eg/lib/pwcat.c
@@ -26,14 +26,14 @@ main(int argc, char **argv)
struct passwd *p;
while ((p = getpwent()) != NULL)
-#ifdef ZOS_USS
- printf("%s:%ld:%ld:%s:%s\n",
- p->pw_name, (long) p->pw_uid,
- (long) p->pw_gid, p->pw_dir, p->pw_shell);
-#else
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
printf("%s:%s:%ld:%ld:%s:%s:%s\n",
p->pw_name, p->pw_passwd, (long) p->pw_uid,
(long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell);
+#else
+ printf("%s:*:%ld:%ld:%s:%s\n",
+ p->pw_name, (long) p->pw_uid,
+ (long) p->pw_gid, p->pw_dir, p->pw_shell);
#endif
endpwent();
diff --git a/command.c b/command.c
index b23b21c5..763055f0 100644
--- a/command.c
+++ b/command.c
@@ -2773,7 +2773,11 @@ yyerror(const char *mesg, ...)
/* yylex --- read a command and turn it into tokens */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
static char *lexptr = NULL;
static char *lexend;
@@ -3049,6 +3053,39 @@ err:
return D_VARIABLE;
}
+/* Convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* find_argument --- find index in 'argtab' for a command option */
static int
diff --git a/command.y b/command.y
index bd5b4870..5ceec1f2 100644
--- a/command.y
+++ b/command.y
@@ -1022,7 +1022,11 @@ yyerror(const char *mesg, ...)
/* yylex --- read a command and turn it into tokens */
static int
+#ifdef USE_EBCDIC
+yylex_ebcdic(void)
+#else
yylex(void)
+#endif
{
static char *lexptr = NULL;
static char *lexend;
@@ -1298,6 +1302,39 @@ err:
return D_VARIABLE;
}
+/* Convert single-character tokens coming out of yylex() from EBCDIC to
+ ASCII values on-the-fly so that the parse tables need not be regenerated
+ for EBCDIC systems. */
+#ifdef USE_EBCDIC
+static int
+yylex(void)
+{
+ static char etoa_xlate[256];
+ static int do_etoa_init = 1;
+ int tok;
+
+ if (do_etoa_init)
+ {
+ for (tok = 0; tok < 256; tok++)
+ etoa_xlate[tok] = (char) tok;
+#ifdef HAVE___ETOA_L
+ /* IBM helpfully provides this function. */
+ __etoa_l(etoa_xlate, sizeof(etoa_xlate));
+#else
+# error "An EBCDIC-to-ASCII translation function is needed for this system"
+#endif
+ do_etoa_init = 0;
+ }
+
+ tok = yylex_ebcdic();
+
+ if (tok >= 0 && tok <= 0xFF)
+ tok = etoa_xlate[tok];
+
+ return tok;
+}
+#endif /* USE_EBCDIC */
+
/* find_argument --- find index in 'argtab' for a command option */
static int
diff --git a/configh.in b/configh.in
index 47457475..478f712b 100644
--- a/configh.in
+++ b/configh.in
@@ -231,6 +231,12 @@
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
+/* Define to 1 if `gr_passwd' is a member of `struct group'. */
+#undef HAVE_STRUCT_GROUP_GR_PASSWD
+
+/* Define to 1 if `pw_passwd' is a member of `struct passwd'. */
+#undef HAVE_STRUCT_PASSWD_PW_PASSWD
+
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
@@ -246,6 +252,9 @@
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
@@ -323,6 +332,9 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
+/* Define to 1 if you have the `__etoa_l' function. */
+#undef HAVE___ETOA_L
+
/* enable severe portability problems */
#undef I_DONT_KNOW_WHAT_IM_DOING
@@ -371,6 +383,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
+/* Define to 1 if the character set is EBCDIC */
+#undef USE_EBCDIC
+
/* force use of our version of strftime */
#undef USE_INCLUDED_STRFTIME
diff --git a/configure b/configure
index 12fb94c8..f25f258d 100755
--- a/configure
+++ b/configure
@@ -633,6 +633,8 @@ GAWKLIBEXT
LIBMPFR
LIBREADLINE
SOCKET_LIBS
+ENABLE_EXTENSIONS_FALSE
+ENABLE_EXTENSIONS_TRUE
LIBSIGSEGV_PREFIX
LTLIBSIGSEGV
LIBSIGSEGV
@@ -5863,17 +5865,95 @@ pkgextensiondir='${pkglibdir}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5
$as_echo_n "checking for z/OS USS compilation... " >&6; }
+if ${ac_cv_zos_uss+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
if test "OS/390" = "`uname`"
then
- CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c and command.c from Bison for EBCDIC
- rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
fi
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5
$as_echo "${ac_cv_zos_uss}" >&6; }
+if test "x$ac_cv_zos_uss" = "xyes"
+then
+ ac_zos_uss_cc_id=unknown
+ echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
+ case "$ac_zos_uss_cc_id" in
+ c89)
+ if test -n "$_C89_OPTIONS"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: CC = $CC" >&5
+$as_echo "$as_me: CC = $CC" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: _C89_OPTIONS = $_C89_OPTIONS" >&5
+$as_echo "$as_me: _C89_OPTIONS = $_C89_OPTIONS" >&6;}
+ else
+ as_fn_error $? "c89-setup-required
+To build GNU Awk using \"c89\", please set
+
+ _C89_OPTIONS=\"-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)\"
+
+in your environment, and reconfigure. (The above flags cannot be specified
+in CFLAGS/CPPFLAGS, due to the parentheses.)" "$LINENO" 5
+ fi
+ ;;
+ gcc)
+ ;;
+ cc)
+ as_fn_error $? "cc-invalid
+The z/OS \"cc\" compiler does not build GNU Awk correctly.
+
+If the \"xlc\" or \"c89\" compiler is available, please set CC accordingly
+and reconfigure. (\"xlc\" is the recommended compiler on z/OS.)" "$LINENO" 5
+ ;;
+ xlc*)
+ CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+ cat >zos-cc <<EOF
+#!/bin/sh
+#
+# This wrapper script addresses two annoying peculiarities of the IBM
+# xlc/c99 compiler on z/OS:
+#
+# 1. Missing header files are considered warnings by default rather
+# than fatal errors;
+#
+# 2. Include directories specified with -I are searched _after_ the
+# system include directories (for #include<> directives) rather
+# than before.
+#
+# This script allows the code and the build system to assume standard
+# compiler behavior.
+#
+
+PS4='zos-cc: '
+REAL_CC="$CC"
+
+set -x
+\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$@" -qsearch=/usr/include
+EOF
+ chmod +x zos-cc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: wrapping $CC with zos-cc to obtain standard behavior" >&5
+$as_echo "$as_me: wrapping $CC with zos-cc to obtain standard behavior" >&6;}
+ CC="`pwd`/zos-cc"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized compiler environment" >&5
+$as_echo "$as_me: WARNING: unrecognized compiler environment" >&2;}
+ ;;
+ esac
+fi # ac_cv_zos_uss = yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
$as_echo_n "checking for library containing strerror... " >&6; }
@@ -6177,6 +6257,28 @@ fi
$as_echo "${gawk_cv_linux_alpha_hack}" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are using EBCDIC" >&5
+$as_echo_n "checking if we are using EBCDIC... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if 'a' == 0x81
+gnu_gawk_in_ebcdic
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "gnu_gawk_in_ebcdic" >/dev/null 2>&1; then :
+
+$as_echo "#define USE_EBCDIC 1" >>confdefs.h
+
+ use_ebcdic=yes
+else
+ use_ebcdic=no
+fi
+rm -f conftest*
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ebcdic" >&5
+$as_echo "$use_ebcdic" >&6; }
+
if test "$ISC" = 1 # will be set by test for ISC
then
CFLAGS="$CFLAGS -D_SYSV3"
@@ -8401,7 +8503,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
netdb.h netinet/in.h stdarg.h stddef.h string.h \
- sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \
+ sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \
termios.h stropts.h wchar.h wctype.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -10307,7 +10409,7 @@ $as_echo "$LIBSIGSEGV" >&6; }
esac
# Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
-for ac_func in atexit btowc fmod getgrent getgroups grantpt \
+for ac_func in __etoa_l atexit btowc fmod getgrent getgroups grantpt \
isascii iswctype iswlower iswupper mbrlen \
memcmp memcpy memcpy_ulong memmove memset \
memset_ulong mkstemp posix_openpt setenv setlocale setsid sigprocmask \
@@ -10374,10 +10476,6 @@ if test "x$enable_extensions" != "xno"; then
case $host_os in
mirbsd* | openedition*) # OS/390 z/OS POSIX layer
- cat << \EOF > extension/Makefile
-all dist check clean distclean install uninstall distcheck:
- @exit 0
-EOF
;;
*)
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
@@ -10472,6 +10570,14 @@ fi
as_fn_error $? "extension support requested, but unavailable" "$LINENO" 5
fi
enable_extensions=$extensions_supported
+ if test "x$enable_extensions" = "xyes"; then
+ ENABLE_EXTENSIONS_TRUE=
+ ENABLE_EXTENSIONS_FALSE='#'
+else
+ ENABLE_EXTENSIONS_TRUE='#'
+ ENABLE_EXTENSIONS_FALSE=
+fi
+
fi
case $host_os in
@@ -10992,6 +11098,34 @@ _ACEOF
fi
+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
+#include <sys/types.h>
+#include <pwd.h>
+
+"
+if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
+_ACEOF
+
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct group" "gr_passwd" "ac_cv_member_struct_group_gr_passwd" "
+#include <sys/types.h>
+#include <grp.h>
+
+"
+if test "x$ac_cv_member_struct_group_gr_passwd" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_GROUP_GR_PASSWD 1
+_ACEOF
+
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if ${ac_cv_struct_tm+:} false; then :
@@ -11485,6 +11619,10 @@ if test -z "${TEST_CROSS_COMPILE_TRUE}" && test -z "${TEST_CROSS_COMPILE_FALSE}"
as_fn_error $? "conditional \"TEST_CROSS_COMPILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_EXTENSIONS_TRUE}" && test -z "${ENABLE_EXTENSIONS_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_EXTENSIONS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
diff --git a/configure.ac b/configure.ac
index d0320f5e..92e43e5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,16 @@ AC_SYS_LARGEFILE
GAWK_AC_AIX_TWEAK
GAWK_AC_LINUX_ALPHA
+AC_MSG_CHECKING([if we are using EBCDIC])
+AC_EGREP_CPP([gnu_gawk_in_ebcdic],
+[#if 'a' == 0x81
+gnu_gawk_in_ebcdic
+#endif],
+[AC_DEFINE(USE_EBCDIC, 1, Define to 1 if the character set is EBCDIC)
+ use_ebcdic=yes],
+[use_ebcdic=no])
+AC_MSG_RESULT([$use_ebcdic])
+
if test "$ISC" = 1 # will be set by test for ISC
then
dnl need -D_SYSV3 for ISC
@@ -134,7 +144,7 @@ gt_LC_MESSAGES
dnl checks for header files
AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
netdb.h netinet/in.h stdarg.h stddef.h string.h \
- sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \
+ sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \
termios.h stropts.h wchar.h wctype.h)
AC_HEADER_STDC
AC_HEADER_STDBOOL
@@ -261,7 +271,7 @@ osf1) : ;;
esac
# Need the check for mkstemp and tmpfile for missing_d/snprintf.c.
-AC_CHECK_FUNCS(atexit btowc fmod getgrent getgroups grantpt \
+AC_CHECK_FUNCS(__etoa_l atexit btowc fmod getgrent getgroups grantpt \
isascii iswctype iswlower iswupper mbrlen \
memcmp memcpy memcpy_ulong memmove memset \
memset_ulong mkstemp posix_openpt setenv setlocale setsid sigprocmask \
@@ -282,10 +292,6 @@ if test "x$enable_extensions" != "xno"; then
dnl On MirBSD (and probably other systems), don't even try.
case $host_os in
mirbsd* | openedition*) # OS/390 z/OS POSIX layer
- cat << \EOF > extension/Makefile
-all dist check clean distclean install uninstall distcheck:
- @exit 0
-EOF
;;
*)
AC_CHECK_HEADER(dlfcn.h,
@@ -317,6 +323,7 @@ EOF
AC_MSG_ERROR([extension support requested, but unavailable])
fi
enable_extensions=$extensions_supported
+ AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "x$enable_extensions" = "xyes"])
fi
dnl check for how to use getpgrp
@@ -369,6 +376,14 @@ GNUPG_CHECK_MPFR
dnl checks for structure members
AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_CHECK_MEMBERS([struct passwd.pw_passwd],,,[
+#include <sys/types.h>
+#include <pwd.h>
+])
+AC_CHECK_MEMBERS([struct group.gr_passwd],,,[
+#include <sys/types.h>
+#include <grp.h>
+])
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
diff --git a/custom.h b/custom.h
index 1f57a83a..956c52ab 100644
--- a/custom.h
+++ b/custom.h
@@ -59,18 +59,6 @@
#define _TZSET 1
#endif
-/* For z/OS, from Dave Pitts - VMS using some ZOS_USS code paths */
-#if defined(ZOS_USS) && !defined(__VMS)
-#undef HAVE_DLFCN_H
-#undef HAVE_SYS_PARAM_H
-#undef HAVE_MCHECK_H
-#undef HAVE_SETENV
-#define setenv zos_setenv
-#define unsetenv zos_unsetenv
-extern int setenv(const char *name, const char *value, int rewrite);
-extern int unsetenv(const char *name);
-#endif
-
/* Junk for dfa.[ch] */
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 5261647d..aa8ec800 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-04 Arnold D. Robbins <arnold@skeeve.com>
+
+ * texinfo.tex: Revert update. It stopped working. I should learn
+ to test these things. Thanks to Antonio Giovanni Colombo for
+ the report.
+
2015-10-02 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Note that there is no support for SSL.
@@ -6,6 +12,14 @@
* texinfo.tex: Update to latest.
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * doc/gawktexi.in: Check for the "struct passwd.pw_passwd" and
+ "struct group.gr_passwd" fields and conditionalize their use, as
+ they don't exist on z/OS.
+ * Makefile.am (pdf-local): Renamed from "pdf", as Automake already
+ defines "pdf" and warns us as much.
+
2015-08-14 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Typo fixes in Appendix A.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8a0442a7..7f357ccb 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -77,7 +77,7 @@ gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk
postscript: gawk.ps gawkinet.ps gawk.1.ps $(AWKCARD)
-pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
+pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
gawk.ps: gawk.dvi
TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 0219bc97..30cae76b 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -838,7 +838,9 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
-pdf-am: $(PDFS)
+pdf: pdf-am
+
+pdf-am: $(PDFS) pdf-local
ps: ps-am
@@ -861,8 +863,8 @@ uninstall-man: uninstall-man1
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic mostlyclean mostlyclean-aminfo \
- mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
- uninstall-am uninstall-dvi-am uninstall-html-am \
+ mostlyclean-generic pdf pdf-am pdf-local ps ps-am tags-am \
+ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
uninstall-info-am uninstall-man uninstall-man1 \
uninstall-pdf-am uninstall-ps-am
@@ -880,7 +882,7 @@ gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk
postscript: gawk.ps gawkinet.ps gawk.1.ps $(AWKCARD)
-pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
+pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
gawk.ps: gawk.dvi
TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi
diff --git a/doc/gawk.info b/doc/gawk.info
index ba60f3ac..d2192343 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1334,13 +1334,14 @@ acknowledgements:
file for the 3.1 release of 'gawk'.
Dr. Nelson Beebe, Andreas Buening, Dr. Manuel Collado, Antonio
-Colombo, Stephen Davies, Scott Deifik, Akim Demaille, Darrel Hankerson,
-Michal Jaegermann, Ju"rgen Kahrs, Stepan Kasal, John Malmberg, Dave
-Pitts, Chet Ramey, Pat Rankin, Andrew Schorr, Corinna Vinschen, and Eli
-Zaretskii (in alphabetical order) make up the current 'gawk' "crack
-portability team." Without their hard work and help, 'gawk' would not
-be nearly the robust, portable program it is today. It has been and
-continues to be a pleasure working with this team of fine people.
+Colombo, Stephen Davies, Scott Deifik, Akim Demaille, Daniel Richard G.,
+Darrel Hankerson, Michal Jaegermann, Ju"rgen Kahrs, Stepan Kasal, John
+Malmberg, Dave Pitts, Chet Ramey, Pat Rankin, Andrew Schorr, Corinna
+Vinschen, and Eli Zaretskii (in alphabetical order) make up the current
+'gawk' "crack portability team." Without their hard work and help,
+'gawk' would not be nearly the robust, portable program it is today. It
+has been and continues to be a pleasure working with this team of fine
+people.
Notable code and documentation contributions were made by a number of
people. *Note Contributors::, for the full list.
@@ -28751,7 +28752,8 @@ OS/2 Andreas Buening, <andreas.buening@nexgo.de>
VMS John Malmberg, <wb8tyw@qsl.net>
-z/OS (OS/390) Dave Pitts, <dpitts@cozx.com>
+z/OS (OS/390) Daniel Richard G. <skunk@iSKUNK.ORG>
+ Dave Pitts (Maintainer Emeritus), <dpitts@cozx.com>
If your bug is also reproducible under Unix, send a copy of your
report to the <bug-gawk@gnu.org> email list as well.
@@ -32500,7 +32502,7 @@ Index
* Bentley, Jon: Glossary. (line 206)
* Benzinger, Michael: Contributors. (line 98)
* Berry, Karl: Acknowledgments. (line 33)
-* Berry, Karl <1>: Acknowledgments. (line 74)
+* Berry, Karl <1>: Acknowledgments. (line 75)
* Berry, Karl <2>: Ranges and Locales. (line 74)
* binary input/output: User-modified. (line 15)
* 'bindtextdomain': I18N Functions. (line 11)
@@ -32555,7 +32557,7 @@ Index
* breakpoint, setting: Breakpoint Control. (line 11)
* Brennan, Michael: Foreword3. (line 84)
* Brennan, Michael <1>: Foreword4. (line 33)
-* Brennan, Michael <2>: Acknowledgments. (line 78)
+* Brennan, Michael <2>: Acknowledgments. (line 79)
* Brennan, Michael <3>: Delete. (line 56)
* Brennan, Michael <4>: Simple Sed. (line 25)
* Brennan, Michael <5>: Other Versions. (line 6)
@@ -32846,7 +32848,7 @@ Index
(line 112)
* Davies, Stephen: Acknowledgments. (line 60)
* Davies, Stephen <1>: Contributors. (line 75)
-* Day, Robert P.J.: Acknowledgments. (line 78)
+* Day, Robert P.J.: Acknowledgments. (line 79)
* 'dcgettext': I18N Functions. (line 21)
* 'dcgettext' <1>: Programmer i18n. (line 20)
* 'dcgettext()' function ('gawk'), portability and: I18N Portability.
@@ -33092,7 +33094,7 @@ Index
* double quote ('"'), in shell commands: Quoting. (line 54)
* 'down' debugger command: Execution Stack. (line 23)
* Drepper, Ulrich: Acknowledgments. (line 52)
-* Duman, Patrice: Acknowledgments. (line 74)
+* Duman, Patrice: Acknowledgments. (line 75)
* dump all variables of a program: Options. (line 94)
* 'dump' debugger command: Miscellaneous Debugger Commands.
(line 9)
@@ -33480,7 +33482,9 @@ Index
(line 44)
* functions, user-defined, 'next'/'nextfile' statements and <1>: Nextfile Statement.
(line 47)
-* G-d: Acknowledgments. (line 93)
+* G-d: Acknowledgments. (line 94)
+* G., Daniel Richard: Acknowledgments. (line 60)
+* G., Daniel Richard <1>: Bugs. (line 73)
* Garfinkle, Scott: Contributors. (line 35)
* 'gawk' program, dynamic profiling: Profiling. (line 177)
* 'gawk' version: Auto-set. (line 229)
@@ -33820,7 +33824,7 @@ Index
* Kenobi, Obi-Wan: Undocumented. (line 6)
* Kernighan, Brian: History. (line 17)
* Kernighan, Brian <1>: Conventions. (line 38)
-* Kernighan, Brian <2>: Acknowledgments. (line 78)
+* Kernighan, Brian <2>: Acknowledgments. (line 79)
* Kernighan, Brian <3>: Getline/Pipe. (line 6)
* Kernighan, Brian <4>: Concatenation. (line 6)
* Kernighan, Brian <5>: Library Functions. (line 12)
@@ -34532,9 +34536,9 @@ Index
* Robbins, Arnold <6>: Bugs. (line 73)
* Robbins, Arnold <7>: Future Extensions. (line 6)
* Robbins, Bill: Getline/Pipe. (line 40)
-* Robbins, Harry: Acknowledgments. (line 93)
-* Robbins, Jean: Acknowledgments. (line 93)
-* Robbins, Miriam: Acknowledgments. (line 93)
+* Robbins, Harry: Acknowledgments. (line 94)
+* Robbins, Jean: Acknowledgments. (line 94)
+* Robbins, Miriam: Acknowledgments. (line 94)
* Robbins, Miriam <1>: Getline/Pipe. (line 40)
* Robbins, Miriam <2>: Passwd Functions. (line 90)
* Rommel, Kai Uwe: Contributors. (line 43)
@@ -35094,546 +35098,546 @@ Ref: Manual History-Footnote-167364
Ref: Manual History-Footnote-267405
Node: How To Contribute67479
Node: Acknowledgments68608
-Node: Getting Started73476
-Node: Running gawk75915
-Node: One-shot77105
-Node: Read Terminal78368
-Node: Long80400
-Node: Executable Scripts81913
-Ref: Executable Scripts-Footnote-184708
-Node: Comments84811
-Node: Quoting87295
-Node: DOS Quoting92813
-Node: Sample Data Files93488
-Node: Very Simple96083
-Node: Two Rules100985
-Node: More Complex102871
-Node: Statements/Lines105734
-Ref: Statements/Lines-Footnote-1110193
-Node: Other Features110458
-Node: When111395
-Ref: When-Footnote-1113149
-Node: Intro Summary113214
-Node: Invoking Gawk114098
-Node: Command Line115612
-Node: Options116410
-Ref: Options-Footnote-1132061
-Ref: Options-Footnote-2132291
-Node: Other Arguments132316
-Node: Naming Standard Input135263
-Node: Environment Variables136356
-Node: AWKPATH Variable136914
-Ref: AWKPATH Variable-Footnote-1140325
-Ref: AWKPATH Variable-Footnote-2140370
-Node: AWKLIBPATH Variable140631
-Node: Other Environment Variables141888
-Node: Exit Status145526
-Node: Include Files146203
-Node: Loading Shared Libraries149798
-Node: Obsolete151226
-Node: Undocumented151918
-Node: Invoking Summary152215
-Node: Regexp153875
-Node: Regexp Usage155394
-Node: Escape Sequences157431
-Node: Regexp Operators163664
-Ref: Regexp Operators-Footnote-1171081
-Ref: Regexp Operators-Footnote-2171228
-Node: Bracket Expressions171326
-Ref: table-char-classes173349
-Node: Leftmost Longest176295
-Node: Computed Regexps177598
-Node: GNU Regexp Operators181025
-Node: Case-sensitivity184704
-Ref: Case-sensitivity-Footnote-1187600
-Ref: Case-sensitivity-Footnote-2187835
-Node: Strong Regexp Constants187943
-Node: Regexp Summary190885
-Node: Reading Files192491
-Node: Records194654
-Node: awk split records195387
-Node: gawk split records200319
-Ref: gawk split records-Footnote-1204863
-Node: Fields204900
-Node: Nonconstant Fields207641
-Ref: Nonconstant Fields-Footnote-1209877
-Node: Changing Fields210081
-Node: Field Separators216011
-Node: Default Field Splitting218709
-Node: Regexp Field Splitting219827
-Node: Single Character Fields223180
-Node: Command Line Field Separator224240
-Node: Full Line Fields227458
-Ref: Full Line Fields-Footnote-1228980
-Ref: Full Line Fields-Footnote-2229026
-Node: Field Splitting Summary229127
-Node: Constant Size231201
-Node: Splitting By Content235780
-Ref: Splitting By Content-Footnote-1239751
-Node: Multiple Line239914
-Ref: Multiple Line-Footnote-1245797
-Node: Getline245976
-Node: Plain Getline248443
-Node: Getline/Variable251082
-Node: Getline/File252231
-Node: Getline/Variable/File253617
-Ref: Getline/Variable/File-Footnote-1255221
-Node: Getline/Pipe255309
-Node: Getline/Variable/Pipe258014
-Node: Getline/Coprocess259147
-Node: Getline/Variable/Coprocess260412
-Node: Getline Notes261152
-Node: Getline Summary263947
-Ref: table-getline-variants264369
-Node: Read Timeout265117
-Ref: Read Timeout-Footnote-1269024
-Node: Retrying Input269082
-Node: Command-line directories270281
-Node: Input Summary271188
-Node: Input Exercises274360
-Node: Printing275088
-Node: Print276923
-Node: Print Examples278380
-Node: Output Separators281160
-Node: OFMT283177
-Node: Printf284533
-Node: Basic Printf285318
-Node: Control Letters286892
-Node: Format Modifiers290880
-Node: Printf Examples296895
-Node: Redirection299381
-Node: Special FD306224
-Ref: Special FD-Footnote-1309392
-Node: Special Files309466
-Node: Other Inherited Files310083
-Node: Special Network311084
-Node: Special Caveats311944
-Node: Close Files And Pipes312893
-Ref: Close Files And Pipes-Footnote-1320080
-Ref: Close Files And Pipes-Footnote-2320228
-Node: Nonfatal320379
-Node: Output Summary322704
-Node: Output Exercises323926
-Node: Expressions324605
-Node: Values325793
-Node: Constants326471
-Node: Scalar Constants327162
-Ref: Scalar Constants-Footnote-1328026
-Node: Nondecimal-numbers328276
-Node: Regexp Constants331290
-Node: Using Constant Regexps331816
-Node: Variables334979
-Node: Using Variables335636
-Node: Assignment Options337547
-Node: Conversion339421
-Node: Strings And Numbers339945
-Ref: Strings And Numbers-Footnote-1343009
-Node: Locale influences conversions343118
-Ref: table-locale-affects345876
-Node: All Operators346494
-Node: Arithmetic Ops347123
-Node: Concatenation349629
-Ref: Concatenation-Footnote-1352476
-Node: Assignment Ops352583
-Ref: table-assign-ops357575
-Node: Increment Ops358888
-Node: Truth Values and Conditions362348
-Node: Truth Values363422
-Node: Typing and Comparison364470
-Node: Variable Typing365290
-Node: Comparison Operators368914
-Ref: table-relational-ops369333
-Node: POSIX String Comparison372828
-Ref: POSIX String Comparison-Footnote-1373902
-Node: Boolean Ops374041
-Ref: Boolean Ops-Footnote-1378523
-Node: Conditional Exp378615
-Node: Function Calls380351
-Node: Precedence384231
-Node: Locales387890
-Node: Expressions Summary389522
-Node: Patterns and Actions392095
-Node: Pattern Overview393215
-Node: Regexp Patterns394892
-Node: Expression Patterns395434
-Node: Ranges399215
-Node: BEGIN/END402323
-Node: Using BEGIN/END403084
-Ref: Using BEGIN/END-Footnote-1405821
-Node: I/O And BEGIN/END405927
-Node: BEGINFILE/ENDFILE408243
-Node: Empty411150
-Node: Using Shell Variables411467
-Node: Action Overview413741
-Node: Statements416066
-Node: If Statement417914
-Node: While Statement419409
-Node: Do Statement421437
-Node: For Statement422585
-Node: Switch Statement425744
-Node: Break Statement428130
-Node: Continue Statement430222
-Node: Next Statement432049
-Node: Nextfile Statement434432
-Node: Exit Statement437084
-Node: Built-in Variables439489
-Node: User-modified440622
-Node: Auto-set448210
-Ref: Auto-set-Footnote-1462459
-Ref: Auto-set-Footnote-2462665
-Node: ARGC and ARGV462721
-Node: Pattern Action Summary466940
-Node: Arrays469370
-Node: Array Basics470699
-Node: Array Intro471543
-Ref: figure-array-elements473518
-Ref: Array Intro-Footnote-1476222
-Node: Reference to Elements476350
-Node: Assigning Elements478814
-Node: Array Example479305
-Node: Scanning an Array481064
-Node: Controlling Scanning484088
-Ref: Controlling Scanning-Footnote-1489487
-Node: Numeric Array Subscripts489803
-Node: Uninitialized Subscripts491987
-Node: Delete493606
-Ref: Delete-Footnote-1496358
-Node: Multidimensional496415
-Node: Multiscanning499510
-Node: Arrays of Arrays501101
-Node: Arrays Summary505869
-Node: Functions507962
-Node: Built-in509000
-Node: Calling Built-in510078
-Node: Numeric Functions512074
-Ref: Numeric Functions-Footnote-1516907
-Ref: Numeric Functions-Footnote-2517264
-Ref: Numeric Functions-Footnote-3517312
-Node: String Functions517584
-Ref: String Functions-Footnote-1541092
-Ref: String Functions-Footnote-2541221
-Ref: String Functions-Footnote-3541469
-Node: Gory Details541556
-Ref: table-sub-escapes543347
-Ref: table-sub-proposed544866
-Ref: table-posix-sub546229
-Ref: table-gensub-escapes547770
-Ref: Gory Details-Footnote-1548593
-Node: I/O Functions548744
-Ref: I/O Functions-Footnote-1555965
-Node: Time Functions556113
-Ref: Time Functions-Footnote-1566618
-Ref: Time Functions-Footnote-2566686
-Ref: Time Functions-Footnote-3566844
-Ref: Time Functions-Footnote-4566955
-Ref: Time Functions-Footnote-5567067
-Ref: Time Functions-Footnote-6567294
-Node: Bitwise Functions567560
-Ref: table-bitwise-ops568154
-Ref: Bitwise Functions-Footnote-1572492
-Node: Type Functions572665
-Node: I18N Functions575326
-Node: User-defined576977
-Node: Definition Syntax577782
-Ref: Definition Syntax-Footnote-1583469
-Node: Function Example583540
-Ref: Function Example-Footnote-1586462
-Node: Function Caveats586484
-Node: Calling A Function587002
-Node: Variable Scope587960
-Node: Pass By Value/Reference590954
-Node: Return Statement594453
-Node: Dynamic Typing597432
-Node: Indirect Calls598362
-Ref: Indirect Calls-Footnote-1608613
-Node: Functions Summary608741
-Node: Library Functions611446
-Ref: Library Functions-Footnote-1615055
-Ref: Library Functions-Footnote-2615198
-Node: Library Names615369
-Ref: Library Names-Footnote-1618830
-Ref: Library Names-Footnote-2619053
-Node: General Functions619139
-Node: Strtonum Function620242
-Node: Assert Function623264
-Node: Round Function626590
-Node: Cliff Random Function628131
-Node: Ordinal Functions629147
-Ref: Ordinal Functions-Footnote-1632210
-Ref: Ordinal Functions-Footnote-2632462
-Node: Join Function632672
-Ref: Join Function-Footnote-1634442
-Node: Getlocaltime Function634642
-Node: Readfile Function638386
-Node: Shell Quoting640360
-Node: Data File Management641761
-Node: Filetrans Function642393
-Node: Rewind Function646490
-Node: File Checking647876
-Ref: File Checking-Footnote-1649210
-Node: Empty Files649411
-Node: Ignoring Assigns651390
-Node: Getopt Function652940
-Ref: Getopt Function-Footnote-1664410
-Node: Passwd Functions664610
-Ref: Passwd Functions-Footnote-1673451
-Node: Group Functions673539
-Ref: Group Functions-Footnote-1681438
-Node: Walking Arrays681645
-Node: Library Functions Summary684655
-Node: Library Exercises686061
-Node: Sample Programs686526
-Node: Running Examples687296
-Node: Clones688024
-Node: Cut Program689248
-Node: Egrep Program698969
-Ref: Egrep Program-Footnote-1706481
-Node: Id Program706591
-Node: Split Program710271
-Ref: Split Program-Footnote-1713730
-Node: Tee Program713859
-Node: Uniq Program716649
-Node: Wc Program724075
-Ref: Wc Program-Footnote-1728330
-Node: Miscellaneous Programs728424
-Node: Dupword Program729637
-Node: Alarm Program731667
-Node: Translate Program736522
-Ref: Translate Program-Footnote-1741087
-Node: Labels Program741357
-Ref: Labels Program-Footnote-1744708
-Node: Word Sorting744792
-Node: History Sorting748864
-Node: Extract Program750699
-Node: Simple Sed758230
-Node: Igawk Program761304
-Ref: Igawk Program-Footnote-1775635
-Ref: Igawk Program-Footnote-2775837
-Ref: Igawk Program-Footnote-3775959
-Node: Anagram Program776074
-Node: Signature Program779136
-Node: Programs Summary780383
-Node: Programs Exercises781598
-Ref: Programs Exercises-Footnote-1785727
-Node: Advanced Features785818
-Node: Nondecimal Data787808
-Node: Array Sorting789399
-Node: Controlling Array Traversal790099
-Ref: Controlling Array Traversal-Footnote-1798468
-Node: Array Sorting Functions798586
-Ref: Array Sorting Functions-Footnote-1802473
-Node: Two-way I/O802669
-Ref: Two-way I/O-Footnote-1807620
-Ref: Two-way I/O-Footnote-2807807
-Node: TCP/IP Networking807889
-Node: Profiling811007
-Node: Advanced Features Summary819278
-Node: Internationalization821214
-Node: I18N and L10N822694
-Node: Explaining gettext823381
-Ref: Explaining gettext-Footnote-1828404
-Ref: Explaining gettext-Footnote-2828589
-Node: Programmer i18n828754
-Ref: Programmer i18n-Footnote-1833610
-Node: Translator i18n833659
-Node: String Extraction834453
-Ref: String Extraction-Footnote-1835586
-Node: Printf Ordering835672
-Ref: Printf Ordering-Footnote-1838458
-Node: I18N Portability838522
-Ref: I18N Portability-Footnote-1840978
-Node: I18N Example841041
-Ref: I18N Example-Footnote-1843847
-Node: Gawk I18N843920
-Node: I18N Summary844565
-Node: Debugger845906
-Node: Debugging846928
-Node: Debugging Concepts847369
-Node: Debugging Terms849178
-Node: Awk Debugging851753
-Node: Sample Debugging Session852659
-Node: Debugger Invocation853193
-Node: Finding The Bug854579
-Node: List of Debugger Commands861057
-Node: Breakpoint Control862390
-Node: Debugger Execution Control866084
-Node: Viewing And Changing Data869446
-Node: Execution Stack872820
-Node: Debugger Info874457
-Node: Miscellaneous Debugger Commands878528
-Node: Readline Support883537
-Node: Limitations884433
-Ref: Limitations-Footnote-1888664
-Node: Debugging Summary888715
-Node: Arbitrary Precision Arithmetic889994
-Node: Computer Arithmetic891410
-Ref: table-numeric-ranges895001
-Ref: Computer Arithmetic-Footnote-1895723
-Node: Math Definitions895780
-Ref: table-ieee-formats899094
-Ref: Math Definitions-Footnote-1899697
-Node: MPFR features899802
-Node: FP Math Caution901475
-Ref: FP Math Caution-Footnote-1902547
-Node: Inexactness of computations902916
-Node: Inexact representation903876
-Node: Comparing FP Values905236
-Node: Errors accumulate906318
-Node: Getting Accuracy907751
-Node: Try To Round910461
-Node: Setting precision911360
-Ref: table-predefined-precision-strings912057
-Node: Setting the rounding mode913887
-Ref: table-gawk-rounding-modes914261
-Ref: Setting the rounding mode-Footnote-1917669
-Node: Arbitrary Precision Integers917848
-Ref: Arbitrary Precision Integers-Footnote-1922765
-Node: POSIX Floating Point Problems922914
-Ref: POSIX Floating Point Problems-Footnote-1926796
-Node: Floating point summary926834
-Node: Dynamic Extensions929024
-Node: Extension Intro930577
-Node: Plugin License931843
-Node: Extension Mechanism Outline932640
-Ref: figure-load-extension933079
-Ref: figure-register-new-function934644
-Ref: figure-call-new-function935736
-Node: Extension API Description937799
-Node: Extension API Functions Introduction939333
-Node: General Data Types944192
-Ref: General Data Types-Footnote-1950147
-Node: Memory Allocation Functions950446
-Ref: Memory Allocation Functions-Footnote-1953291
-Node: Constructor Functions953390
-Node: Registration Functions955135
-Node: Extension Functions955820
-Node: Exit Callback Functions958119
-Node: Extension Version String959369
-Node: Input Parsers960032
-Node: Output Wrappers969917
-Node: Two-way processors974429
-Node: Printing Messages976693
-Ref: Printing Messages-Footnote-1977769
-Node: Updating 'ERRNO'977922
-Node: Requesting Values978663
-Ref: table-value-types-returned979402
-Node: Accessing Parameters980285
-Node: Symbol Table Access981521
-Node: Symbol table by name982033
-Node: Symbol table by cookie984054
-Ref: Symbol table by cookie-Footnote-1988203
-Node: Cached values988267
-Ref: Cached values-Footnote-1991768
-Node: Array Manipulation991859
-Ref: Array Manipulation-Footnote-1992950
-Node: Array Data Types992987
-Ref: Array Data Types-Footnote-1995645
-Node: Array Functions995737
-Node: Flattening Arrays999596
-Node: Creating Arrays1006504
-Node: Redirection API1011276
-Node: Extension API Variables1014107
-Node: Extension Versioning1014740
-Node: Extension API Informational Variables1016631
-Node: Extension API Boilerplate1017695
-Node: Finding Extensions1021509
-Node: Extension Example1022069
-Node: Internal File Description1022867
-Node: Internal File Ops1026947
-Ref: Internal File Ops-Footnote-11038709
-Node: Using Internal File Ops1038849
-Ref: Using Internal File Ops-Footnote-11041232
-Node: Extension Samples1041507
-Node: Extension Sample File Functions1043036
-Node: Extension Sample Fnmatch1050685
-Node: Extension Sample Fork1052172
-Node: Extension Sample Inplace1053390
-Node: Extension Sample Ord1056600
-Node: Extension Sample Readdir1057436
-Ref: table-readdir-file-types1058325
-Node: Extension Sample Revout1059130
-Node: Extension Sample Rev2way1059719
-Node: Extension Sample Read write array1060459
-Node: Extension Sample Readfile1062401
-Node: Extension Sample Time1063496
-Node: Extension Sample API Tests1064844
-Node: gawkextlib1065336
-Node: Extension summary1067783
-Node: Extension Exercises1071475
-Node: Language History1072972
-Node: V7/SVR3.11074628
-Node: SVR41076780
-Node: POSIX1078214
-Node: BTL1079594
-Node: POSIX/GNU1080324
-Node: Feature History1086163
-Node: Common Extensions1100483
-Node: Ranges and Locales1101766
-Ref: Ranges and Locales-Footnote-11106382
-Ref: Ranges and Locales-Footnote-21106409
-Ref: Ranges and Locales-Footnote-31106644
-Node: Contributors1106865
-Node: History summary1112434
-Node: Installation1113814
-Node: Gawk Distribution1114759
-Node: Getting1115243
-Node: Extracting1116066
-Node: Distribution contents1117704
-Node: Unix Installation1123800
-Node: Quick Installation1124482
-Node: Shell Startup Files1126896
-Node: Additional Configuration Options1127974
-Node: Configuration Philosophy1129779
-Node: Non-Unix Installation1132149
-Node: PC Installation1132607
-Node: PC Binary Installation1133927
-Node: PC Compiling1135779
-Ref: PC Compiling-Footnote-11138803
-Node: PC Testing1138912
-Node: PC Using1140092
-Node: Cygwin1144206
-Node: MSYS1144976
-Node: VMS Installation1145477
-Node: VMS Compilation1146268
-Ref: VMS Compilation-Footnote-11147498
-Node: VMS Dynamic Extensions1147556
-Node: VMS Installation Details1149241
-Node: VMS Running1151494
-Node: VMS GNV1154335
-Node: VMS Old Gawk1155070
-Node: Bugs1155541
-Node: Other Versions1159655
-Node: Installation summary1166241
-Node: Notes1167299
-Node: Compatibility Mode1168164
-Node: Additions1168946
-Node: Accessing The Source1169871
-Node: Adding Code1171307
-Node: New Ports1177462
-Node: Derived Files1181950
-Ref: Derived Files-Footnote-11187435
-Ref: Derived Files-Footnote-21187470
-Ref: Derived Files-Footnote-31188068
-Node: Future Extensions1188182
-Node: Implementation Limitations1188840
-Node: Extension Design1190023
-Node: Old Extension Problems1191177
-Ref: Old Extension Problems-Footnote-11192695
-Node: Extension New Mechanism Goals1192752
-Ref: Extension New Mechanism Goals-Footnote-11196116
-Node: Extension Other Design Decisions1196305
-Node: Extension Future Growth1198418
-Node: Old Extension Mechanism1199254
-Node: Notes summary1201017
-Node: Basic Concepts1202199
-Node: Basic High Level1202880
-Ref: figure-general-flow1203162
-Ref: figure-process-flow1203847
-Ref: Basic High Level-Footnote-11207148
-Node: Basic Data Typing1207333
-Node: Glossary1210661
-Node: Copying1242607
-Node: GNU Free Documentation License1280146
-Node: Index1305264
+Node: Getting Started73495
+Node: Running gawk75934
+Node: One-shot77124
+Node: Read Terminal78387
+Node: Long80419
+Node: Executable Scripts81932
+Ref: Executable Scripts-Footnote-184727
+Node: Comments84830
+Node: Quoting87314
+Node: DOS Quoting92832
+Node: Sample Data Files93507
+Node: Very Simple96102
+Node: Two Rules101004
+Node: More Complex102890
+Node: Statements/Lines105753
+Ref: Statements/Lines-Footnote-1110212
+Node: Other Features110477
+Node: When111414
+Ref: When-Footnote-1113168
+Node: Intro Summary113233
+Node: Invoking Gawk114117
+Node: Command Line115631
+Node: Options116429
+Ref: Options-Footnote-1132080
+Ref: Options-Footnote-2132310
+Node: Other Arguments132335
+Node: Naming Standard Input135282
+Node: Environment Variables136375
+Node: AWKPATH Variable136933
+Ref: AWKPATH Variable-Footnote-1140344
+Ref: AWKPATH Variable-Footnote-2140389
+Node: AWKLIBPATH Variable140650
+Node: Other Environment Variables141907
+Node: Exit Status145545
+Node: Include Files146222
+Node: Loading Shared Libraries149817
+Node: Obsolete151245
+Node: Undocumented151937
+Node: Invoking Summary152234
+Node: Regexp153894
+Node: Regexp Usage155413
+Node: Escape Sequences157450
+Node: Regexp Operators163683
+Ref: Regexp Operators-Footnote-1171100
+Ref: Regexp Operators-Footnote-2171247
+Node: Bracket Expressions171345
+Ref: table-char-classes173368
+Node: Leftmost Longest176314
+Node: Computed Regexps177617
+Node: GNU Regexp Operators181044
+Node: Case-sensitivity184723
+Ref: Case-sensitivity-Footnote-1187619
+Ref: Case-sensitivity-Footnote-2187854
+Node: Strong Regexp Constants187962
+Node: Regexp Summary190904
+Node: Reading Files192510
+Node: Records194673
+Node: awk split records195406
+Node: gawk split records200338
+Ref: gawk split records-Footnote-1204882
+Node: Fields204919
+Node: Nonconstant Fields207660
+Ref: Nonconstant Fields-Footnote-1209896
+Node: Changing Fields210100
+Node: Field Separators216030
+Node: Default Field Splitting218728
+Node: Regexp Field Splitting219846
+Node: Single Character Fields223199
+Node: Command Line Field Separator224259
+Node: Full Line Fields227477
+Ref: Full Line Fields-Footnote-1228999
+Ref: Full Line Fields-Footnote-2229045
+Node: Field Splitting Summary229146
+Node: Constant Size231220
+Node: Splitting By Content235799
+Ref: Splitting By Content-Footnote-1239770
+Node: Multiple Line239933
+Ref: Multiple Line-Footnote-1245816
+Node: Getline245995
+Node: Plain Getline248462
+Node: Getline/Variable251101
+Node: Getline/File252250
+Node: Getline/Variable/File253636
+Ref: Getline/Variable/File-Footnote-1255240
+Node: Getline/Pipe255328
+Node: Getline/Variable/Pipe258033
+Node: Getline/Coprocess259166
+Node: Getline/Variable/Coprocess260431
+Node: Getline Notes261171
+Node: Getline Summary263966
+Ref: table-getline-variants264388
+Node: Read Timeout265136
+Ref: Read Timeout-Footnote-1269043
+Node: Retrying Input269101
+Node: Command-line directories270300
+Node: Input Summary271207
+Node: Input Exercises274379
+Node: Printing275107
+Node: Print276942
+Node: Print Examples278399
+Node: Output Separators281179
+Node: OFMT283196
+Node: Printf284552
+Node: Basic Printf285337
+Node: Control Letters286911
+Node: Format Modifiers290899
+Node: Printf Examples296914
+Node: Redirection299400
+Node: Special FD306243
+Ref: Special FD-Footnote-1309411
+Node: Special Files309485
+Node: Other Inherited Files310102
+Node: Special Network311103
+Node: Special Caveats311963
+Node: Close Files And Pipes312912
+Ref: Close Files And Pipes-Footnote-1320099
+Ref: Close Files And Pipes-Footnote-2320247
+Node: Nonfatal320398
+Node: Output Summary322723
+Node: Output Exercises323945
+Node: Expressions324624
+Node: Values325812
+Node: Constants326490
+Node: Scalar Constants327181
+Ref: Scalar Constants-Footnote-1328045
+Node: Nondecimal-numbers328295
+Node: Regexp Constants331309
+Node: Using Constant Regexps331835
+Node: Variables334998
+Node: Using Variables335655
+Node: Assignment Options337566
+Node: Conversion339440
+Node: Strings And Numbers339964
+Ref: Strings And Numbers-Footnote-1343028
+Node: Locale influences conversions343137
+Ref: table-locale-affects345895
+Node: All Operators346513
+Node: Arithmetic Ops347142
+Node: Concatenation349648
+Ref: Concatenation-Footnote-1352495
+Node: Assignment Ops352602
+Ref: table-assign-ops357594
+Node: Increment Ops358907
+Node: Truth Values and Conditions362367
+Node: Truth Values363441
+Node: Typing and Comparison364489
+Node: Variable Typing365309
+Node: Comparison Operators368933
+Ref: table-relational-ops369352
+Node: POSIX String Comparison372847
+Ref: POSIX String Comparison-Footnote-1373921
+Node: Boolean Ops374060
+Ref: Boolean Ops-Footnote-1378542
+Node: Conditional Exp378634
+Node: Function Calls380370
+Node: Precedence384250
+Node: Locales387909
+Node: Expressions Summary389541
+Node: Patterns and Actions392114
+Node: Pattern Overview393234
+Node: Regexp Patterns394911
+Node: Expression Patterns395453
+Node: Ranges399234
+Node: BEGIN/END402342
+Node: Using BEGIN/END403103
+Ref: Using BEGIN/END-Footnote-1405840
+Node: I/O And BEGIN/END405946
+Node: BEGINFILE/ENDFILE408262
+Node: Empty411169
+Node: Using Shell Variables411486
+Node: Action Overview413760
+Node: Statements416085
+Node: If Statement417933
+Node: While Statement419428
+Node: Do Statement421456
+Node: For Statement422604
+Node: Switch Statement425763
+Node: Break Statement428149
+Node: Continue Statement430241
+Node: Next Statement432068
+Node: Nextfile Statement434451
+Node: Exit Statement437103
+Node: Built-in Variables439508
+Node: User-modified440641
+Node: Auto-set448229
+Ref: Auto-set-Footnote-1462478
+Ref: Auto-set-Footnote-2462684
+Node: ARGC and ARGV462740
+Node: Pattern Action Summary466959
+Node: Arrays469389
+Node: Array Basics470718
+Node: Array Intro471562
+Ref: figure-array-elements473537
+Ref: Array Intro-Footnote-1476241
+Node: Reference to Elements476369
+Node: Assigning Elements478833
+Node: Array Example479324
+Node: Scanning an Array481083
+Node: Controlling Scanning484107
+Ref: Controlling Scanning-Footnote-1489506
+Node: Numeric Array Subscripts489822
+Node: Uninitialized Subscripts492006
+Node: Delete493625
+Ref: Delete-Footnote-1496377
+Node: Multidimensional496434
+Node: Multiscanning499529
+Node: Arrays of Arrays501120
+Node: Arrays Summary505888
+Node: Functions507981
+Node: Built-in509019
+Node: Calling Built-in510097
+Node: Numeric Functions512093
+Ref: Numeric Functions-Footnote-1516926
+Ref: Numeric Functions-Footnote-2517283
+Ref: Numeric Functions-Footnote-3517331
+Node: String Functions517603
+Ref: String Functions-Footnote-1541111
+Ref: String Functions-Footnote-2541240
+Ref: String Functions-Footnote-3541488
+Node: Gory Details541575
+Ref: table-sub-escapes543366
+Ref: table-sub-proposed544885
+Ref: table-posix-sub546248
+Ref: table-gensub-escapes547789
+Ref: Gory Details-Footnote-1548612
+Node: I/O Functions548763
+Ref: I/O Functions-Footnote-1555984
+Node: Time Functions556132
+Ref: Time Functions-Footnote-1566637
+Ref: Time Functions-Footnote-2566705
+Ref: Time Functions-Footnote-3566863
+Ref: Time Functions-Footnote-4566974
+Ref: Time Functions-Footnote-5567086
+Ref: Time Functions-Footnote-6567313
+Node: Bitwise Functions567579
+Ref: table-bitwise-ops568173
+Ref: Bitwise Functions-Footnote-1572511
+Node: Type Functions572684
+Node: I18N Functions575345
+Node: User-defined576996
+Node: Definition Syntax577801
+Ref: Definition Syntax-Footnote-1583488
+Node: Function Example583559
+Ref: Function Example-Footnote-1586481
+Node: Function Caveats586503
+Node: Calling A Function587021
+Node: Variable Scope587979
+Node: Pass By Value/Reference590973
+Node: Return Statement594472
+Node: Dynamic Typing597451
+Node: Indirect Calls598381
+Ref: Indirect Calls-Footnote-1608632
+Node: Functions Summary608760
+Node: Library Functions611465
+Ref: Library Functions-Footnote-1615074
+Ref: Library Functions-Footnote-2615217
+Node: Library Names615388
+Ref: Library Names-Footnote-1618849
+Ref: Library Names-Footnote-2619072
+Node: General Functions619158
+Node: Strtonum Function620261
+Node: Assert Function623283
+Node: Round Function626609
+Node: Cliff Random Function628150
+Node: Ordinal Functions629166
+Ref: Ordinal Functions-Footnote-1632229
+Ref: Ordinal Functions-Footnote-2632481
+Node: Join Function632691
+Ref: Join Function-Footnote-1634461
+Node: Getlocaltime Function634661
+Node: Readfile Function638405
+Node: Shell Quoting640379
+Node: Data File Management641780
+Node: Filetrans Function642412
+Node: Rewind Function646509
+Node: File Checking647895
+Ref: File Checking-Footnote-1649229
+Node: Empty Files649430
+Node: Ignoring Assigns651409
+Node: Getopt Function652959
+Ref: Getopt Function-Footnote-1664429
+Node: Passwd Functions664629
+Ref: Passwd Functions-Footnote-1673470
+Node: Group Functions673558
+Ref: Group Functions-Footnote-1681457
+Node: Walking Arrays681664
+Node: Library Functions Summary684674
+Node: Library Exercises686080
+Node: Sample Programs686545
+Node: Running Examples687315
+Node: Clones688043
+Node: Cut Program689267
+Node: Egrep Program698988
+Ref: Egrep Program-Footnote-1706500
+Node: Id Program706610
+Node: Split Program710290
+Ref: Split Program-Footnote-1713749
+Node: Tee Program713878
+Node: Uniq Program716668
+Node: Wc Program724094
+Ref: Wc Program-Footnote-1728349
+Node: Miscellaneous Programs728443
+Node: Dupword Program729656
+Node: Alarm Program731686
+Node: Translate Program736541
+Ref: Translate Program-Footnote-1741106
+Node: Labels Program741376
+Ref: Labels Program-Footnote-1744727
+Node: Word Sorting744811
+Node: History Sorting748883
+Node: Extract Program750718
+Node: Simple Sed758249
+Node: Igawk Program761323
+Ref: Igawk Program-Footnote-1775654
+Ref: Igawk Program-Footnote-2775856
+Ref: Igawk Program-Footnote-3775978
+Node: Anagram Program776093
+Node: Signature Program779155
+Node: Programs Summary780402
+Node: Programs Exercises781617
+Ref: Programs Exercises-Footnote-1785746
+Node: Advanced Features785837
+Node: Nondecimal Data787827
+Node: Array Sorting789418
+Node: Controlling Array Traversal790118
+Ref: Controlling Array Traversal-Footnote-1798487
+Node: Array Sorting Functions798605
+Ref: Array Sorting Functions-Footnote-1802492
+Node: Two-way I/O802688
+Ref: Two-way I/O-Footnote-1807639
+Ref: Two-way I/O-Footnote-2807826
+Node: TCP/IP Networking807908
+Node: Profiling811026
+Node: Advanced Features Summary819297
+Node: Internationalization821233
+Node: I18N and L10N822713
+Node: Explaining gettext823400
+Ref: Explaining gettext-Footnote-1828423
+Ref: Explaining gettext-Footnote-2828608
+Node: Programmer i18n828773
+Ref: Programmer i18n-Footnote-1833629
+Node: Translator i18n833678
+Node: String Extraction834472
+Ref: String Extraction-Footnote-1835605
+Node: Printf Ordering835691
+Ref: Printf Ordering-Footnote-1838477
+Node: I18N Portability838541
+Ref: I18N Portability-Footnote-1840997
+Node: I18N Example841060
+Ref: I18N Example-Footnote-1843866
+Node: Gawk I18N843939
+Node: I18N Summary844584
+Node: Debugger845925
+Node: Debugging846947
+Node: Debugging Concepts847388
+Node: Debugging Terms849197
+Node: Awk Debugging851772
+Node: Sample Debugging Session852678
+Node: Debugger Invocation853212
+Node: Finding The Bug854598
+Node: List of Debugger Commands861076
+Node: Breakpoint Control862409
+Node: Debugger Execution Control866103
+Node: Viewing And Changing Data869465
+Node: Execution Stack872839
+Node: Debugger Info874476
+Node: Miscellaneous Debugger Commands878547
+Node: Readline Support883556
+Node: Limitations884452
+Ref: Limitations-Footnote-1888683
+Node: Debugging Summary888734
+Node: Arbitrary Precision Arithmetic890013
+Node: Computer Arithmetic891429
+Ref: table-numeric-ranges895020
+Ref: Computer Arithmetic-Footnote-1895742
+Node: Math Definitions895799
+Ref: table-ieee-formats899113
+Ref: Math Definitions-Footnote-1899716
+Node: MPFR features899821
+Node: FP Math Caution901494
+Ref: FP Math Caution-Footnote-1902566
+Node: Inexactness of computations902935
+Node: Inexact representation903895
+Node: Comparing FP Values905255
+Node: Errors accumulate906337
+Node: Getting Accuracy907770
+Node: Try To Round910480
+Node: Setting precision911379
+Ref: table-predefined-precision-strings912076
+Node: Setting the rounding mode913906
+Ref: table-gawk-rounding-modes914280
+Ref: Setting the rounding mode-Footnote-1917688
+Node: Arbitrary Precision Integers917867
+Ref: Arbitrary Precision Integers-Footnote-1922784
+Node: POSIX Floating Point Problems922933
+Ref: POSIX Floating Point Problems-Footnote-1926815
+Node: Floating point summary926853
+Node: Dynamic Extensions929043
+Node: Extension Intro930596
+Node: Plugin License931862
+Node: Extension Mechanism Outline932659
+Ref: figure-load-extension933098
+Ref: figure-register-new-function934663
+Ref: figure-call-new-function935755
+Node: Extension API Description937818
+Node: Extension API Functions Introduction939352
+Node: General Data Types944211
+Ref: General Data Types-Footnote-1950166
+Node: Memory Allocation Functions950465
+Ref: Memory Allocation Functions-Footnote-1953310
+Node: Constructor Functions953409
+Node: Registration Functions955154
+Node: Extension Functions955839
+Node: Exit Callback Functions958138
+Node: Extension Version String959388
+Node: Input Parsers960051
+Node: Output Wrappers969936
+Node: Two-way processors974448
+Node: Printing Messages976712
+Ref: Printing Messages-Footnote-1977788
+Node: Updating 'ERRNO'977941
+Node: Requesting Values978682
+Ref: table-value-types-returned979421
+Node: Accessing Parameters980304
+Node: Symbol Table Access981540
+Node: Symbol table by name982052
+Node: Symbol table by cookie984073
+Ref: Symbol table by cookie-Footnote-1988222
+Node: Cached values988286
+Ref: Cached values-Footnote-1991787
+Node: Array Manipulation991878
+Ref: Array Manipulation-Footnote-1992969
+Node: Array Data Types993006
+Ref: Array Data Types-Footnote-1995664
+Node: Array Functions995756
+Node: Flattening Arrays999615
+Node: Creating Arrays1006523
+Node: Redirection API1011295
+Node: Extension API Variables1014126
+Node: Extension Versioning1014759
+Node: Extension API Informational Variables1016650
+Node: Extension API Boilerplate1017714
+Node: Finding Extensions1021528
+Node: Extension Example1022088
+Node: Internal File Description1022886
+Node: Internal File Ops1026966
+Ref: Internal File Ops-Footnote-11038728
+Node: Using Internal File Ops1038868
+Ref: Using Internal File Ops-Footnote-11041251
+Node: Extension Samples1041526
+Node: Extension Sample File Functions1043055
+Node: Extension Sample Fnmatch1050704
+Node: Extension Sample Fork1052191
+Node: Extension Sample Inplace1053409
+Node: Extension Sample Ord1056619
+Node: Extension Sample Readdir1057455
+Ref: table-readdir-file-types1058344
+Node: Extension Sample Revout1059149
+Node: Extension Sample Rev2way1059738
+Node: Extension Sample Read write array1060478
+Node: Extension Sample Readfile1062420
+Node: Extension Sample Time1063515
+Node: Extension Sample API Tests1064863
+Node: gawkextlib1065355
+Node: Extension summary1067802
+Node: Extension Exercises1071494
+Node: Language History1072991
+Node: V7/SVR3.11074647
+Node: SVR41076799
+Node: POSIX1078233
+Node: BTL1079613
+Node: POSIX/GNU1080343
+Node: Feature History1086182
+Node: Common Extensions1100502
+Node: Ranges and Locales1101785
+Ref: Ranges and Locales-Footnote-11106401
+Ref: Ranges and Locales-Footnote-21106428
+Ref: Ranges and Locales-Footnote-31106663
+Node: Contributors1106884
+Node: History summary1112453
+Node: Installation1113833
+Node: Gawk Distribution1114778
+Node: Getting1115262
+Node: Extracting1116085
+Node: Distribution contents1117723
+Node: Unix Installation1123819
+Node: Quick Installation1124501
+Node: Shell Startup Files1126915
+Node: Additional Configuration Options1127993
+Node: Configuration Philosophy1129798
+Node: Non-Unix Installation1132168
+Node: PC Installation1132626
+Node: PC Binary Installation1133946
+Node: PC Compiling1135798
+Ref: PC Compiling-Footnote-11138822
+Node: PC Testing1138931
+Node: PC Using1140111
+Node: Cygwin1144225
+Node: MSYS1144995
+Node: VMS Installation1145496
+Node: VMS Compilation1146287
+Ref: VMS Compilation-Footnote-11147517
+Node: VMS Dynamic Extensions1147575
+Node: VMS Installation Details1149260
+Node: VMS Running1151513
+Node: VMS GNV1154354
+Node: VMS Old Gawk1155089
+Node: Bugs1155560
+Node: Other Versions1159757
+Node: Installation summary1166343
+Node: Notes1167401
+Node: Compatibility Mode1168266
+Node: Additions1169048
+Node: Accessing The Source1169973
+Node: Adding Code1171409
+Node: New Ports1177564
+Node: Derived Files1182052
+Ref: Derived Files-Footnote-11187537
+Ref: Derived Files-Footnote-21187572
+Ref: Derived Files-Footnote-31188170
+Node: Future Extensions1188284
+Node: Implementation Limitations1188942
+Node: Extension Design1190125
+Node: Old Extension Problems1191279
+Ref: Old Extension Problems-Footnote-11192797
+Node: Extension New Mechanism Goals1192854
+Ref: Extension New Mechanism Goals-Footnote-11196218
+Node: Extension Other Design Decisions1196407
+Node: Extension Future Growth1198520
+Node: Old Extension Mechanism1199356
+Node: Notes summary1201119
+Node: Basic Concepts1202301
+Node: Basic High Level1202982
+Ref: figure-general-flow1203264
+Ref: figure-process-flow1203949
+Ref: Basic High Level-Footnote-11207250
+Node: Basic Data Typing1207435
+Node: Glossary1210763
+Node: Copying1242709
+Node: GNU Free Documentation License1280248
+Node: Index1305366

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index a2fd8c87..ef2beca2 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -2210,6 +2210,7 @@ significant editorial help for this @value{DOCUMENT} for the
@cindex Davies, Stephen
@cindex Deifik, Scott
@cindex Demaille, Akim
+@cindex G., Daniel Richard
@cindex Hankerson, Darrel
@cindex Jaegermann, Michal
@cindex Kahrs, J@"urgen
@@ -2229,6 +2230,7 @@ Antonio Colombo,
Stephen Davies,
Scott Deifik,
Akim Demaille,
+Daniel Richard G.,
Darrel Hankerson,
Michal Jaegermann,
J@"urgen Kahrs,
@@ -22634,11 +22636,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:%ld:%s:%s\n",
- p->pw_name, (long) p->pw_uid,
- (long) p->pw_gid, p->pw_dir, p->pw_shell);
-#else
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
@c endfile
@end ignore
@c file eg/lib/pwcat.c
@@ -22648,6 +22646,10 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
+#else
+ printf("%s:*:%ld:%ld:%s:%s\n",
+ p->pw_name, (long) p->pw_uid,
+ (long) p->pw_gid, p->pw_dir, p->pw_shell);
#endif
@c endfile
@end ignore
@@ -22967,9 +22969,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:", g->gr_name, (long) g->gr_gid);
-#else
+#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
@c endfile
@end ignore
@c file eg/lib/grcat.c
@@ -22978,6 +22978,8 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
+#else
+ printf("%s:*:%ld:", g->gr_name, (long) g->gr_gid);
#endif
@c endfile
@end ignore
@@ -38931,6 +38933,7 @@ The people maintaining the various @command{gawk} ports are:
@cindex Deifik, Scott
@cindex Malmberg, John
@cindex Pitts, Dave
+@cindex G., Daniel Richard
@cindex Robbins, Arnold
@cindex Zaretskii, Eli
@multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890}
@@ -38946,7 +38949,8 @@ The people maintaining the various @command{gawk} ports are:
@item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}
-@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
+@item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK.ORG}
+@item @tab Dave Pitts (Maintainer Emeritus), @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
@end multitable
If your bug is also reproducible under Unix, send a copy of your
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 04f2544d..7e63e373 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -2177,6 +2177,7 @@ significant editorial help for this @value{DOCUMENT} for the
@cindex Davies, Stephen
@cindex Deifik, Scott
@cindex Demaille, Akim
+@cindex G., Daniel Richard
@cindex Hankerson, Darrel
@cindex Jaegermann, Michal
@cindex Kahrs, J@"urgen
@@ -2196,6 +2197,7 @@ Antonio Colombo,
Stephen Davies,
Scott Deifik,
Akim Demaille,
+Daniel Richard G.,
Darrel Hankerson,
Michal Jaegermann,
J@"urgen Kahrs,
@@ -21725,11 +21727,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:%ld:%s:%s\n",
- p->pw_name, (long) p->pw_uid,
- (long) p->pw_gid, p->pw_dir, p->pw_shell);
-#else
+#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
@c endfile
@end ignore
@c file eg/lib/pwcat.c
@@ -21739,6 +21737,10 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/pwcat.c
+#else
+ printf("%s:*:%ld:%ld:%s:%s\n",
+ p->pw_name, (long) p->pw_uid,
+ (long) p->pw_gid, p->pw_dir, p->pw_shell);
#endif
@c endfile
@end ignore
@@ -22058,9 +22060,7 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
-#ifdef ZOS_USS
- printf("%s:%ld:", g->gr_name, (long) g->gr_gid);
-#else
+#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
@c endfile
@end ignore
@c file eg/lib/grcat.c
@@ -22069,6 +22069,8 @@ main(int argc, char **argv)
@c endfile
@ignore
@c file eg/lib/grcat.c
+#else
+ printf("%s:*:%ld:", g->gr_name, (long) g->gr_gid);
#endif
@c endfile
@end ignore
@@ -38022,6 +38024,7 @@ The people maintaining the various @command{gawk} ports are:
@cindex Deifik, Scott
@cindex Malmberg, John
@cindex Pitts, Dave
+@cindex G., Daniel Richard
@cindex Robbins, Arnold
@cindex Zaretskii, Eli
@multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890}
@@ -38037,7 +38040,8 @@ The people maintaining the various @command{gawk} ports are:
@item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}
-@item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
+@item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK.ORG}
+@item @tab Dave Pitts (Maintainer Emeritus), @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}
@end multitable
If your bug is also reproducible under Unix, send a copy of your
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 347f8639..152e9853 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2015-09-23.01}
+\def\texinfoversion{2015-05-06.11}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -196,6 +196,17 @@
wide-spread wrap-around
}
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt }
+
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal. We also make
@@ -240,15 +251,6 @@
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
-% Output routine
-%
-
-% For a final copy, take out the rectangles
-% that mark overfull boxes (in case you have decided
-% that the text looks ok even though it passes the margin).
-%
-\def\finalout{\overfullrule=0pt }
-
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
@@ -275,7 +277,6 @@
% described on page 260 of The TeXbook. It involves outputting two
% marks for the sectioning macros, one before the section break, and
% one after. I won't pretend I can describe this better than DEK...
-%
\def\domark{%
\toks0=\expandafter{\lastchapterdefs}%
\toks2=\expandafter{\lastsectiondefs}%
@@ -288,9 +289,6 @@
\noexpand\else \the\toks8 % 2: color marks
}%
}
-
-% \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark.
-%
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
% the mark with the chapter defs, unless the user sneaks in, e.g.,
@@ -306,74 +304,36 @@
% Avoid "undefined control sequence" errors.
\def\lastchapterdefs{}
\def\lastsectiondefs{}
-\def\lastsection{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\lastcolordefs{}
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen\bindingoffset
-\newdimen\normaloffset
-\newdimen\pagewidth \newdimen\pageheight
-
% Main output routine.
-%
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
\newbox\headlinebox
\newbox\footlinebox
-% \onepageout takes a vbox as an argument.
-% \shipout a vbox for a single page, adding an optional header, footer,
-% cropmarks, and footnote. This also causes index entries for this page
-% to be written to the auxiliary files.
-%
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions, but you have to call it yourself.
\def\onepageout#1{%
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
%
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
%
- % Common context changes for both heading and footing.
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
\def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars}
%
- % Retrieve the information for the headings from the marks in the page,
- % and call Plain TeX's \makeheadline and \makefootline, which use the
- % values in \headline and \footline.
- %
- % This is used to check if we are on the first page of a chapter.
- \ifcase0\topmark\fi
- \ifx\thischapter\empty
- % See comment for \gettopheadingmarks
- \ifcase0\firstmark\fi
- \let\curchaptername\thischaptername
- \ifcase1\firstmark\fi
- \let\prevchaptername\thischaptername
- \else
- \let\curchaptername\thischaptername
- \ifcase1\topmark\fi
- \let\prevchaptername\thischaptername
- \fi
- %
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
- \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
- %
- \ifx\curchaptername\prevchaptername
- \else
- % If on the first page of a chapter, clear @thischapter so it
- % doesn't appear in the headline, because the chapter is already
- % shown in the chapter heading.
- \def\thischapter{}%
- \fi
- %
\global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
+ %
+ \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
\global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
%
{%
- % Set context for writing to auxiliary files like index files.
% Have to do this stuff outside the \shipout because we want it to
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
@@ -382,10 +342,10 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
- % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
- % {\code {{\backslashcurfont }acronym}
+ % {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -443,7 +403,6 @@
\newinsert\margin \dimen\margin=\maxdimen
-% Main part of page, including any footnotes
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
@@ -466,13 +425,9 @@
\def\nsbot{\vbox
{\hrule height\cornerlong depth\cornerthick width\cornerthick}}
-
-% Argument parsing
-
% Parse an argument, then pass it to #1. The argument is the rest of
% the input line (except we remove a trailing comment). #1 should be a
% macro which expects an ordinary undelimited TeX argument.
-% For example, \def\foo{\parsearg\fooxxx}.
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
@@ -491,11 +446,9 @@
}%
}
-% First remove any @comment, then any @c comment. Also remove a @texinfoc
-% comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
+% First remove any @comment, then any @c comment.
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
-\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
%
@@ -727,12 +680,6 @@
\endgraf % Not \par, as it may have been set to \lisppar.
\global\dimen1 = \prevdepth
\egroup % End the \vtop.
- \addgroupbox
- \prevdepth = \dimen1
- \checkinserts
-}
-
-\def\addgroupbox{
% \dimen0 is the vertical size of the group's box.
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
% \dimen2 is how much space is left on the page (more or less).
@@ -745,8 +692,9 @@
\fi
\fi
\box\groupbox
+ \prevdepth = \dimen1
+ \checkinserts
}
-
%
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
% message, so this ends up printing `@group can only ...'.
@@ -989,20 +937,12 @@ where each line of input produces a line of output.}
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
%
-\def\comment{\begingroup \catcode`\^^M=\active%
-\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}%
-
-{\catcode`\^^M=\active%
-\gdef\commentxxx#1^^M{\endgroup%
-\futurelet\nexttoken\commentxxxx}%
-\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
-}
-
-\def\c{\begingroup \catcode`\^^M=\active%
+\def\comment{\begingroup \catcode`\^^M=\other%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
-\cxxx}
-{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
-% See comment in \scanmacro about why the definitions of @c and @comment differ
+\commentxxx}
+{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+%
+\let\c=\comment
% @paragraphindent NCHARS
% We'll use ems for NCHARS, close enough.
@@ -1088,8 +1028,45 @@ where each line of input produces a line of output.}
% @refill is a no-op.
\let\refill=\relax
-% @setfilename INFO-FILENAME - ignored
-\let\setfilename=\comment
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi % \openindices needs to do some work in any case.
+ \openindices
+ \let\setfilename=\comment % Ignore extra @setfilename cmds.
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc.
+ \openin 1 texinfo.cnf
+ \ifeof 1 \else \input texinfo.cnf \fi
+ \closein 1
+ %
+ \comment % Ignore the actual filename.
+}
+
+% Called from \setfilename.
+%
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
@@ -1843,10 +1820,8 @@ end
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstep1}{OT1}
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
-\setfont\defsl\slshape{10}{\magstep1}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf
-\let\tenttsl=\defttsl \let\tensl=\defsl \bf}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
@@ -1907,7 +1882,6 @@ end
% Section fonts (14.4pt).
\def\secnominalsize{14pt}
\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
-\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1}
\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep2}{OT1}
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
@@ -1977,10 +1951,8 @@ end
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
-\setfont\defsl\slshape{10}{\magstephalf}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf
-\let\tensl=\defsl \let\tenttsl=\defttsl \bf}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
@@ -2799,6 +2771,11 @@ end
%
\def\dmn#1{\thinspace #1}
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
@@ -2902,6 +2879,9 @@ end
\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}%
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
% except specified as a normal braced arg, so no newlines to worry about.
@@ -3215,15 +3195,8 @@ end
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
%
-% Use the European Computer Modern fonts (cm-super in outline format)
-% for non-CM glyphs. That is ec* for regular text and tc* for the text
-% companion symbols (LaTeX TS1 encoding). Both are part of the ec
-% package and follow the same conventions.
-%
-\def\ecfont{\etcfont{e}}
-\def\tcfont{\etcfont{t}}
-%
-\def\etcfont#1{%
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
+\def\ecfont{%
% We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% quotes to documents typeset with CM, where we lose kerning), so
@@ -3232,14 +3205,14 @@ end
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
\ifmonospace
% typewriter:
- \font\thisecfont = #1ctt\ecsize \space at \nominalsize
+ \font\thisecfont = ectt\ecsize \space at \nominalsize
\else
\ifx\curfontstyle\bfstylename
% bold:
- \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
\else
% regular:
- \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
\fi
\fi
\thisecfont
@@ -3409,7 +3382,7 @@ end
\newtoks\evenfootline % footline on even pages
\newtoks\oddfootline % footline on odd pages
-% Now make \makeheadline and \makefootline in Plain TeX use those variables
+% Now make TeX use those variables
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
\else \the\evenheadline \fi}}
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
@@ -3465,10 +3438,6 @@ end
% @everyheadingmarks
% @everyfootingmarks
-% These define \getoddheadingmarks, \getevenheadingmarks,
-% \getoddfootingmarks, and \getevenfootingmarks, each to one of
-% \gettopheadingmarks, \getbottomheadingmarks.
-%
\def\evenheadingmarks{\headingmarks{even}{heading}}
\def\oddheadingmarks{\headingmarks{odd}{heading}}
\def\evenfootingmarks{\headingmarks{even}{footing}}
@@ -3758,12 +3727,7 @@ end
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
%
- \ifinner\else
- \vadjust{\penalty 1200}% not good to break after first line of item.
- \fi
- % We can be in inner vertical mode in a footnote, although an
- % @itemize looks awful there.
- }%
+ \vadjust{\penalty 1200}}% not good to break after first line of item.
\flushcr
}
@@ -4385,16 +4349,19 @@ end
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
-% \newindex {foo} defines an index named IX.
-% It automatically defines \IXindex such that
-% \IXindex ...rest of line... puts an entry in the index IX.
-% It also defines \IXindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is IX.
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
%
\def\newindex#1{%
- \expandafter\chardef\csname#1indfile\endcsname=0
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+ \fi
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index
\noexpand\doindex{#1}}
}
@@ -4408,19 +4375,14 @@ end
\def\defcodeindex{\parsearg\newcodeindex}
%
\def\newcodeindex#1{%
- \expandafter\chardef\csname#1indfile\endcsname=0
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1
+ \fi
\expandafter\xdef\csname#1index\endcsname{%
\noexpand\docodeindex{#1}}%
}
-% The default indices:
-\newindex{cp}% concepts,
-\newcodeindex{fn}% functions,
-\newcodeindex{vr}% variables,
-\newcodeindex{tp}% types,
-\newcodeindex{ky}% keys
-\newcodeindex{pg}% and programs.
-
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
@@ -4449,19 +4411,26 @@ end
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
-% Define \doindex, the driver for all index macros.
+% Define \doindex, the driver for all \fooindex macros.
% Argument #1 is generated by the calling \fooindex macro,
-% and it the two-letter name of the index.
+% and it is "foo", the name of the index.
-\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
-\def\doindexxxx #1{\doind{\indexname}{#1}}
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
-\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
-% Used when writing an index entry out to an index file, to prevent
-% expansion of Texinfo commands that can appear in an index entry.
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
%
\def\indexdummies{%
\escapechar = `\\ % use backslash in output files.
@@ -4477,6 +4446,31 @@ end
\def\{{{\tt\char123}}%
\def\}{{\tt\char125}}%
%
+ % I don't entirely understand this, but when an index entry is
+ % generated from a macro call, the \endinput which \scanmacro inserts
+ % causes processing to be prematurely terminated. This is,
+ % apparently, because \indexsorttmp is fully expanded, and \endinput
+ % is an expandable command. The redefinition below makes \endinput
+ % disappear altogether for that purpose -- although logging shows that
+ % processing continues to some further point. On the other hand, it
+ % seems \endinput does not hurt in the printed index arg, since that
+ % is still getting written without apparent harm.
+ %
+ % Sample source (mac-idx3.tex, reported by Graham Percival to
+ % help-texinfo, 22may06):
+ % @macro funindex {WORD}
+ % @findex xyz
+ % @end macro
+ % ...
+ % @funindex commtest
+ % This is not enough to reproduce the bug, but it gives the flavor.
+ %
+ % Sample whatsit resulting:
+ % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
+ %
+ % So:
+ \let\endinput = \empty
+ %
% Do the redefinitions.
\commondummies
}
@@ -4683,39 +4677,11 @@ end
% that we make for arg2 (see \parsemargdef ff.). We want all this to be
% expanded for the sake of the index, so we end up just seeing "bar".
\let\xeatspaces = \eatspaces
- \let\xprocessmacroarg\eatspaces
}
% For testing: output @{ and @} in index sort strings as \{ and \}.
\newif\ifusebracesinindexes
-\let\indexlbrace\relax
-\let\indexrbrace\relax
-
-{\catcode`\@=0
-\catcode`\\=13
- @gdef@backslashdisappear{@def\{}}
-}
-
-{
-\catcode`\<=13
-\catcode`\-=13
- \gdef\indexnonalnumdisappear{%
- \backslashdisappear
- \def-{}%
- \def<{}%
- \def\@{}%
- }
-
- \gdef\indexnonalnumreappear{%
- \useindexbackslash
- \let-\normaldash
- \let<\normalless
- \def\@{@}%
- }
-}
-
-
% \indexnofonts is used when outputting the strings to sort the index
% by, and when constructing control sequence names. It eliminates all
% control sequences and just writes whatever the best ASCII sort string
@@ -4741,10 +4707,16 @@ end
\def\_{\normalunderscore}%
\def\-{}% @- shouldn't affect sorting
%
- % Unfortunately, texindex < 6.0 is not prepared to handle braces in the
- % content at all, so these won't be sorted in ASCII order.
- \def\lbracechar{{\indexlbrace}}%
- \def\rbracechar{{\indexrbrace}}%
+ % Unfortunately, texindex is not prepared to handle braces in the
+ % content at all. So for index sorting, we map @{ and @} to strings
+ % starting with |, since that ASCII character is between ASCII { and }.
+ \ifusebracesinindexes
+ \def\lbracechar{\lbracecmd}%
+ \def\rbracechar{\rbracecmd}%
+ \else
+ \def\lbracechar{|a}%
+ \def\rbracechar{|b}%
+ \fi
\let\{=\lbracechar
\let\}=\rbracechar
%
@@ -4756,7 +4728,7 @@ end
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
- \def\TH{TH}%
+ \def\TH{ZZZ}%
\def\aa{aa}%
\def\ae{ae}%
\def\dh{dzz}%
@@ -4768,7 +4740,7 @@ end
\def\o{o}%
\def\questiondown{?}%
\def\ss{ss}%
- \def\th{th}%
+ \def\th{zzz}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
@@ -4826,17 +4798,14 @@ end
{\catcode`\`=\active
\gdef\indexlquoteignore{\let`=\empty}}
+\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% Most index entries go through here, but \dosubind is the general case.
% #1 is the index name, #2 is the entry text.
\def\doind#1#2{\dosubind{#1}{#2}{}}
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-% TODO: Two-level index? Operation index?
-
-% Workhorse for all indexes.
+% Workhorse for all \fooindexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% empty if called from \doind, as we usually are (the main exception
% is with most defuns, which call us directly).
@@ -4844,7 +4813,6 @@ end
\def\dosubind#1#2#3{%
\iflinks
{%
- \requireopenindexfile{#1}%
% Store the main index entry text (including the third arg).
\toks0 = {#2}%
% If third arg is present, precede it with a space.
@@ -4860,49 +4828,7 @@ end
\fi
}
-% Check if an index file has been opened, and if not, open it.
-\def\requireopenindexfile#1{%
-\ifnum\csname #1indfile\endcsname=0
- \expandafter\newwrite \csname#1indfile\endcsname
- \edef\suffix{#1}%
- % A .fls suffix would conflict with the file extension for the output
- % of -recorder, so use .f1s instead.
- \ifx\suffix\indexisfl\def\suffix{f1}\fi
- % Open the file
- \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
- % Using \immediate here prevents an object entering into the current box,
- % which could confound checks such as those in \safewhatsit for preceding
- % skips.
-\fi}
-\def\indexisfl{fl}
-
-% Output \ as {\indexbackslash}, because \ is an escape character in
-% the index files.
-\let\indexbackslash=\relax
-{\catcode`\@=0 \catcode`\\=\active
- @gdef@useindexbackslash{@def\{{@indexbackslash}}}
-}
-
-% Definition for writing index entry text.
-\def\sortas#1{\ignorespaces}%
-
-% Definition for writing index entry sort key. Should occur at the at
-% the beginning of the index entry, like
-% @cindex @sortas{september} \september
-% The \ignorespaces takes care of following space, but there's no way
-% to remove space before it.
-{
-\catcode`\-=13
-\gdef\indexwritesortas{%
- \begingroup
- \indexnonalnumreappear
- \indexwritesortasxxx}
-\gdef\indexwritesortasxxx#1{%
- \xdef\indexsortkey{#1}\endgroup}
-}
-
-
-% Write the entry in \toks0 to the index file.
+% Write the entry in \toks0 to the index file:
%
\def\dosubindwrite{%
% Put the index entry in the margin if desired.
@@ -4912,20 +4838,14 @@ end
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
- \useindexbackslash % \indexbackslash isn't defined now so it will be output
- % as is; and it will print as backslash.
- % Get the string to sort by, by processing the index entry with all
- % font commands turned off.
+ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % Process the index entry with all font commands turned off, to
+ % get the string to sort by.
{\indexnofonts
- \xdef\indexsortkey{}%
- \let\sortas=\indexwritesortas
- \indexnonalnumdisappear
- \edef\temp{\the\toks0}%
- \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
- \ifx\indexsortkey\empty
- \xdef\indexsortkey{\temp}%
- \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
- \fi
+ \edef\temp{\the\toks0}% need full expansion
+ \xdef\indexsorttmp{\temp}%
}%
%
% Set up the complete index entry, with both the sort key and
@@ -4935,11 +4855,10 @@ end
% sorted result.
\edef\temp{%
\write\writeto{%
- \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
+ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
}%
\temp
}
-\newbox\dummybox % used above
% Take care of unwanted page breaks/skips around a whatsit:
%
@@ -5065,9 +4984,7 @@ end
% as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence).
\catcode`\@ = 11
- % See comment in \requireopenindexfile.
- \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
- \openin 1 \jobname.\indexname s
+ \openin 1 \jobname.#1s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the
@@ -5075,96 +4992,43 @@ end
% there is some text.
\putwordIndexNonexistent
\else
- \catcode`\\ = 0
- \escapechar = `\\
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
% it can discover if there is anything in it.
- \read 1 to \thisline
+ \read 1 to \temp
\ifeof 1
\putwordIndexIsEmpty
\else
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
% to make right now.
- \def\indexbackslash{\ttbackslash}%
- \let\indexlbrace\{ % Likewise, set these sequences for braces
- \let\indexrbrace\} % used in the sort key.
+ \def\indexbackslash{\backslashcurfont}%
+ \catcode`\\ = 0
+ \escapechar = `\\
\begindoublecolumns
- \let\entryorphanpenalty=\indexorphanpenalty
- %
- % Read input from the index file line by line.
- \loopdo
- \ifeof1
- \let\firsttoken\relax
- \else
- \read 1 to \nextline
- \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
- \act
- \fi
- \thisline
- %
- \ifeof1\else
- \let\thisline\nextline
- \repeat
- %%
+ \input \jobname.#1s
\enddoublecolumns
\fi
\fi
\closein 1
\endgroup}
-\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
-\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
-
-\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
-\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
-
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
-{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
-\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
-\catcode`\$=3
-\gdef\initialglyphs{%
- % Some changes for non-alphabetic characters. Using the glyphs from the
- % math fonts looks more consistent than the typewriter font used elsewhere
- % for these characters.
- \def\indexbackslash{\math{\backslash}}%
- \let\\=\indexbackslash
- %
- % Can't get bold backslash so don't use bold forward slash
- \catcode`\/=13
- \def/{{\secrmnotbold \normalslash}}%
- \def-{{\normaldash\normaldash}}% en dash `--'
- \def^{{\chapbf \normalcaret}}%
- \def~{{\chapbf \normaltilde}}%
- \def\_{%
- \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }%
- \def|{$\vert$}%
- \def<{$\less$}%
- \def>{$\gtr$}%
- \def+{$\normalplus$}%
-}}
-
-\def\initial{%
- \bgroup
- \initialglyphs
- \initialx
-}
-
-\def\initialx#1{%
+\def\initial#1{{%
+ % Some minor font changes for the special characters.
+ \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+ %
% Remove any glue we may have, we'll be inserting our own.
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
- % The glue before the bonus allows a little bit of space at the
- % bottom of a column to reduce an increase in inter-line spacing.
\nobreak
- \vskip 0pt plus 5\baselineskip
- \penalty -300
- \vskip 0pt plus -5\baselineskip
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
@@ -5172,24 +5036,24 @@ end
% we need before each entry, but it's better.
%
% No shrink because it confuses \balancecolumns.
- \vskip 1.67\baselineskip plus 1\baselineskip
- \leftline{\secfonts \kern-0.05em \secbf #1}%
- % \secfonts is inside the argument of \leftline so that the change of
- % \baselineskip will not affect any glue inserted before the vbox that
- % \leftline creates.
+ \vskip 1.67\baselineskip plus .5\baselineskip
+ \leftline{\secbf #1}%
% Do our best not to break after the initial.
\nobreak
\vskip .33\baselineskip plus .1\baselineskip
- \egroup % \initialglyphs
-}
-
-\newdimen\entryrightmargin
-\entryrightmargin=0pt
+}}
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% then page number (#2) flushed to the right margin. It is used for index
% and table of contents entries. The paragraph is indented by \leftskip.
%
+% A straightforward implementation would start like this:
+% \def\entry#1#2{...
+% But this freezes the catcodes in the argument, and can cause problems to
+% @code, which sets - active. This problem was fixed by a kludge---
+% ``-'' was active throughout whole index, but this isn't really right.
+% The right solution is to prevent \entry from swallowing the whole text.
+% --kasal, 21nov03
\def\entry{%
\begingroup
%
@@ -5197,46 +5061,38 @@ end
% affect previous text.
\par
%
+ % Do not fill out the last line with white space.
+ \parfillskip = 0in
+ %
% No extra space above this paragraph.
\parskip = 0in
%
- % When reading the text of entry, convert explicit line breaks
- % from @* into spaces. The user might give these in long section
- % titles, for instance.
- \def\*{\unskip\space\ignorespaces}%
- \def\entrybreak{\hfil\break}%
- %
- % A bit of stretch before each entry for the benefit of balancing
- % columns.
- \vskip 0pt plus0.5pt
- %
- % Badness calculation for paragraph affected by -
- % How much \indexdotfill is stretched, or how much \parfillskip is shrunk
- % Number of lines (\linepenalty)
- %
% Do not prefer a separate line ending with a hyphen to fewer lines.
\finalhyphendemerits = 0
%
- % Word spacing - no stretch
- \spaceskip=\fontdimen2\font minus \fontdimen4\font
+ % \hangindent is only relevant when the entry text and page number
+ % don't both fit on one line. In that case, bob suggests starting the
+ % dots pretty far over on the line. Unfortunately, a large
+ % indentation looks wrong when the entry text itself is broken across
+ % lines. So we use a small indentation and put up with long leaders.
+ %
+ % \hangafter is reset to 1 (which is the value we want) at the start
+ % of each paragraph, so we need not do anything with that.
+ \hangindent = 2em
%
- \linepenalty=1000 % Discourage line breaks.
- \hyphenpenalty=5000 % Discourage hyphenation.
+ % When the entry text needs to be broken, just fill out the first line
+ % with blank space.
+ \rightskip = 0pt plus1fil
%
- % Ragged right margin, but not for the last line with the leaders in it.
- % When an index entry spans lines, this stretch competes with the stretch
- % in \indexdotfill to determine how the line will be split.
- \rightskip=\entryrightmargin
- \advance\rightskip by 0pt plus .6\hsize
+ % A bit of stretch before each entry for the benefit of balancing
+ % columns.
+ \vskip 0pt plus1pt
%
- % \parfillskip is at the end of the line with the page number
- \parfillskip=0pt
- % Cancel the \rightskip stretch
- \advance \parfillskip by 0pt plus -.6\hsize
- % Determine how far we can stretch into the margin.
- % This allows, e.g., "Appendix H GNU Free Documentation License" to fit
- % on one line.
- \advance \parfillskip by 0pt minus .6\entryrightmargin
+ % When reading the text of entry, convert explicit line breaks
+ % from @* into spaces. The user might give these in long section
+ % titles, for instance.
+ \def\*{\unskip\space\ignorespaces}%
+ \def\entrybreak{\hfil\break}%
%
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
@@ -5244,8 +5100,6 @@ end
}
\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
- % Save the text of the entry in a \vtop.
- \global\setbox\entryindexbox=\vtop\bgroup
\bgroup % Instead of the swallowed brace.
\noindent
\aftergroup\finishentry
@@ -5262,70 +5116,29 @@ end
\ %
\else
%
+ % If we must, put the page number on a line of its own, and fill out
+ % this line with blank space. (The \hfil is overwhelmed with the
+ % fill leaders glue in \indexdotfill if the page number does fit.)
+ \hfil\penalty50
\null\nobreak\indexdotfill % Have leaders before the page number.
%
+ % The `\ ' here is removed by the implicit \unskip that TeX does as
+ % part of (the primitive) \par. Without it, a spurious underfull
+ % \hbox ensues.
\ifpdf
- \pdfgettoks#1.%
- \hskip\skip\thinshrinkable\the\toksA
+ \pdfgettoks#1.%
+ \ \the\toksA
\else
- \hskip\skip\thinshrinkable #1%
+ \ #1%
\fi
\fi
- % Parameters for formatting this paragraph, reset for each paragraph.
- %
- % \hangindent is only relevant when the entry text and page number
- % don't both fit on one line. In that case, bob suggests starting the
- % dots pretty far over on the line. Unfortunately, a large
- % indentation looks wrong when the entry text itself is broken across
- % lines. So we use a small indentation and put up with long leaders.
- %
- \hangafter = 1
- \hangindent = 1em
\par
- \egroup % The \vtop
\endgroup
- % delay text of entry until after penalty
- \bgroup\aftergroup\insertindexentrybox
- \entryorphanpenalty
-}
-
-\newskip\thinshrinkable
-\skip\thinshrinkable=.15em minus .15em
-
-\newbox\entryindexbox
-\def\insertindexentrybox{%
-\lineskip=.8ex plus .6ex % This comes into effect when the \vtop has a large
- % depth due to the paragraph in it having several
- % lines.
-\box\entryindexbox}
-
-% Default is no penalty
-\let\entryorphanpenalty\egroup
-
-% Used from \printindex. \firsttoken should be the first token
-% after the \entry. If it's not another \entry, we are at the last
-% line of a group of index entries, so insert a penalty to discourage
-% orphaned index entries.
-\long\def\indexorphanpenalty{%
- \def\isentry{\entry}%
- \ifx\firsttoken\isentry
- \else
- \unskip\penalty 9000
- % The \unskip here stops breaking before the glue. It relies on the
- % \vskip above being there, otherwise there is an error
- % "You can't use `\unskip' in vertical mode". There has to be glue
- % in the current vertical list that hasn't been added to the
- % "current page". See Chapter 24 of the TeXbook. This contradicts
- % Section 8.3.7 in "TeX by Topic," though.
- \fi
- \egroup % now comes the box added with \aftergroup
}
% Like plain.tex's \dotfill, except uses up at least 1 em.
-% Using a finite stretch encourages several words to appear on a second line
-% if the entry is broken.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus .4\hsize}
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
\def\primary #1{\line{#1\hfil}}
@@ -5352,9 +5165,6 @@ end
\newbox\partialpage
\newdimen\doublecolumnhsize
-\newtoks\savedtopmark % Used in \begindoublecolumns
-\newtoks\savedfirstmark
-
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
\output = {%
@@ -5375,23 +5185,9 @@ end
\unvbox\PAGE
\kern-\topskip \kern\baselineskip
}%
- % Save \topmark and \firstmark
- \global\savedtopmark=\expandafter{\topmark}%
- \global\savedfirstmark=\expandafter{\firstmark}%
}%
\eject % run that output routine to set \partialpage
%
- % We recover the two marks that the last output routine saved in order
- % to propagate the information in marks added around a chapter heading,
- % which could be otherwise be lost by the time the final page is output.
- %
- \mark{\the\savedtopmark}% Only mark in page passed to following \output.
- \output = {%
- \setbox0=\box\PAGE % clear box 255
- }abc\eject
- %
- \mark{\the\savedfirstmark}%
- %
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
%
@@ -5422,7 +5218,7 @@ end
}
% The double-column output routine for all double-column pages except
-% the last, which is done by \balancecolumns.
+% the last.
%
\def\doublecolumnout{%
\splittopskip=\topskip \splitmaxdepth=\maxdepth
@@ -5504,47 +5300,28 @@ end
\pagegoal = \vsize
}
%
-% Only called for the last of the double column material. \doublecolumnout
-% does the others.
+% Called at the end of the double column material.
\def\balancecolumns{%
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
- \ifdim\dimen@<14\baselineskip
- % Don't split a short final column in two.
- \setbox2=\vbox{}%
- \else
- \divide\dimen@ by 2 % target to split to
- \dimen@ii = \dimen@
- \splittopskip = \topskip
- % Loop until the second column is no higher than the first
- {%
- \vbadness = 10000
- \loop
- \global\setbox3 = \copy0
- \global\setbox1 = \vsplit3 to \dimen@
- % Remove glue from bottom of first column to
- % make sure it is higher than the second.
- \global\setbox1 = \vbox{\unvbox1\unpenalty\unskip}%
- \ifdim\ht3>\ht1
- \global\advance\dimen@ by 1pt
- \repeat
- }%
- \multiply\dimen@ii by 4
- \divide\dimen@ii by 5
- \ifdim\ht3<\dimen@ii
- % Column heights are too different, so don't make their bottoms
- % flush with each other. The glue at the end of the second column
- % allows a second column to stretch, reducing the difference in
- % height between the two.
- \setbox0=\vbox to\dimen@{\unvbox1\vfill}%
- \setbox2=\vbox to\dimen@{\unvbox3\vskip 0pt plus 0.3\ht0}%
- \else
- \setbox0=\vbox to\dimen@{\unvbox1}%
- \setbox2=\vbox to\dimen@{\unvbox3}%
- \fi
- \fi
+ \divide\dimen@ by 2 % target to split to
+ %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht3>\dimen@
+ \global\advance\dimen@ by 1pt
+ \repeat
+ }%
+ %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
%
\pagesofar
}
@@ -5565,9 +5342,6 @@ end
\let\lastnode=\empty % no node to associate with
\writetocentry{part}{#1}{}% but put it in the toc
\headingsoff % no headline or footline on the part page
- % This outputs a mark at the end of the page that clears \thischapter
- % and \thissection, like is done in \startcontents.
- \chapmacro{}{Yomitfromtoc}{}%
\chapoddpage
\endgroup
}
@@ -5812,6 +5586,9 @@ end
% @centerchap is like @unnumbered, but the heading is centered.
\outer\parseargdef\centerchap{%
+ % Well, we could do the following in a group, but that would break
+ % an assumption that \chapmacro is called at the outermost level.
+ % Thus we are safer this way: --kasal, 24feb04
\let\centerparametersmaybe = \centerparameters
\unnmhead0{#1}%
\let\centerparametersmaybe = \relax
@@ -5935,11 +5712,7 @@ end
% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
-
-% Start a new page
\def\chappager{\par\vfill\supereject}
-
-% \chapoddpage - start on an odd page for a new chapter
% Because \domark is called before \chapoddpage, the filler page will
% get the headings for the next chapter, which is wrong. But we don't
% care -- we just disable all headings on the filler page.
@@ -5975,7 +5748,7 @@ end
\CHAPPAGon
-% \chapmacro - Chapter opening.
+% Chapter opening.
%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
@@ -6369,7 +6142,7 @@ end
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
\raggedbottom % Worry more about breakpoints than the bottom.
- \entryrightmargin=\contentsrightmargin % Don't use the full line length.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
@@ -6474,7 +6247,7 @@ end
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
-
+%
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3#4{%
@@ -6489,7 +6262,7 @@ end
\setbox0 = \hbox{\putwordAppendix{} M}%
\hbox to \wd0{\putwordAppendix{} #1\hss}}
%
-\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
% Unnumbered chapters.
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
@@ -6522,8 +6295,6 @@ end
\def\dochapentry#1#2{%
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
- % Move the page numbers slightly to the right
- \advance\entryrightmargin by -0.05em
\chapentryfonts
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup
@@ -6643,24 +6414,6 @@ end
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
- \ifnum\lastpenalty<10000
- % Penalize breaking before the environment, because preceding text
- % often leads into it.
- \penalty100
- \fi
- \vskip\envskipamount
- \fi
- \fi
-}}
-
-\def\afterenvbreak{{%
- % =10000 instead of <10000 because of a special case in \itemzzz and
- % \sectionheading, q.v.
- \ifnum \lastpenalty=10000 \else
- \advance\envskipamount by \parskip
- \endgraf
- \ifdim\lastskip<\envskipamount
- \removelastskip
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
@@ -6669,6 +6422,8 @@ end
\fi
}}
+\let\afterenvbreak = \aboveenvbreak
+
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
@@ -6712,7 +6467,7 @@ end
% collide with the section heading.
\ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
%
- \setbox\groupbox=\vbox\bgroup
+ \vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
@@ -6736,7 +6491,6 @@ end
\egroup
\cartbot
\egroup
- \addgroupbox
\checkinserts
}
@@ -7119,7 +6873,7 @@ end
% typesetting commands (@smallbook, font changes, etc.) have to be done
% beforehand -- and a) we want @copying to be done first in the source
% file; b) letting users define the frontmatter in as flexible order as
-% possible is desirable.
+% possible is very desirable.
%
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
@@ -7214,7 +6968,7 @@ end
\temp
}
-% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
+% \domakedefun \deffn \deffnx \deffnheader
%
% Define \deffn and \deffnx, without parameters.
% \deffnheader has to be defined explicitly.
@@ -7552,44 +7306,34 @@ end
}
\fi
-\let\aftermacroxxx\relax
-\def\aftermacro{\aftermacroxxx}
-
-% alias because \c means cedilla in @tex or @math
-\let\texinfoc=\c
-
-% Used at the time of macro expansion.
-% Argument is macro body with arguments substituted
-\def\scanmacro#1{%
+\def\scanmacro#1{\begingroup
\newlinechar`\^^M
\let\xeatspaces\eatspaces
- % Reduce doubled backslashes to one
- \def\xprocessmacroarg{\passargtomacro\eatspaces}%
%
- % Process the macro body under the current catcode regime.
- \scantokens{#1\texinfoc}\aftermacro%
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
%
- % The \c is to remove the \newlinechar added by \scantokens, and
- % can be noticed by \parsearg.
- % The \aftermacro allows a \comment at the end of the macro definition
- % to duplicate itself past the final \newlinechar added by \scantokens:
- % this is used in the definition of \group to comment out a newline. We
- % don't do the same for \c to support Texinfo files with macros that ended
- % with a @c, which should no longer be necessary.
- % We avoid surrounding the call to \scantokens with \bgroup and \egroup
- % to allow macros to open or close groups themselves.
-}
+ % ... and for \example:
+ \spaceisspace
+ %
+ % The \empty here causes a following catcode 5 newline to be eaten as
+ % part of reading whitespace after a control sequence. It does not
+ % eat a catcode 13 newline. There's no good way to handle the two
+ % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+ % would then have different behavior). See the Macro Details node in
+ % the manual for the workaround we recommend for macros and
+ % line-oriented commands.
+ %
+ \scantokens{#1\empty}%
+\endgroup}
\def\scanexp#1{%
- \bgroup
- % Undo catcode changes of \startcontents and \printindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly.
- % FIXME: This may not be needed.
- %\catcode`\@=0 \catcode`\\=\active \escapechar=`\@
\edef\temp{\noexpand\scanmacro{#1}}%
\temp
- \egroup
}
\newcount\paramno % Count of parameters
@@ -7655,6 +7399,7 @@ end
\catcode`\+=\other
\catcode`\<=\other
\catcode`\>=\other
+ \catcode`\@=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
@@ -7664,35 +7409,37 @@ end
\def\scanargctxt{% used for copying and captions, not macros.
\scanctxt
- \catcode`\@=\other
\catcode`\\=\other
\catcode`\^^M=\other
}
\def\macrobodyctxt{% used for @macro definitions
\scanctxt
- \catcode`\ =\other
- \catcode`\@=\other
\catcode`\{=\other
\catcode`\}=\other
\catcode`\^^M=\other
\usembodybackslash
}
-% Used when scanning braced macro arguments. Note, however, that catcode
-% changes here are ineffectual if the macro invocation was nested inside
-% an argument to another Texinfo command.
-\def\macroargctxt{%
- \scanctxt
- \catcode`\^^M=\other
- \catcode`\\=\active
-}
-
-\def\macrolineargctxt{% used for whole-line arguments without braces
+\def\macroargctxt{% used when scanning invocations
\scanctxt
- \catcode`\{=\other
- \catcode`\}=\other
+ \catcode`\\=0
}
+% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }. Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+%
+% We already have @{ and @}. For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+%
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent. Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
@@ -7764,36 +7511,56 @@ end
\fi
}
-% \getargs -- Parse the arguments to a @macro line. Set \macname to
-% the name of the macro, and \argl to the braced argument list.
+% This makes use of the obscure feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
-% This made use of the feature that if the last token of a
-% <parameter list> is #, then the preceding argument is delimited by
-% an opening brace, and that opening brace is not consumed.
-% Parse the optional {params} list to @macro or @rmacro.
-% Set \paramno to the number of arguments,
-% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
-% three-param macro.) Define \macarg.BLAH for each BLAH in the params
-% list to some hook where the argument is to be expanded. If there are
-% less than 10 arguments that hook is to be replaced by ##N where N
+% For macro processing make @ a letter so that we can make Texinfo private macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
+% Parse the optional {params} list. Set up \paramno and \paramlist
+% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
+% in the params list to some hook where the argument is to be expanded. If
+% there are less than 10 arguments that hook is to be replaced by ##N where N
% is the position in that list, that is to say the macro arguments are to be
% defined `a la TeX in the macro body.
%
% That gets used by \mbodybackslash (above).
%
-% If there are 10 or more arguments, a different technique is used: see
-% \parsemmanyargdef.
+% We need to get `macro parameter char #' into several definitions.
+% The technique used is stolen from LaTeX: let \hash be something
+% unexpandable, insert that wherever you need a #, and then redefine
+% it to # just before using the token list produced.
%
+% The same technique is used to protect \eatspaces till just before
+% the macro is used.
+%
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime underwhich the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, no macro can have more than 256 arguments (else error).
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
- % \hash is redefined to `#' later to get it into definitions
- \let\processmacroarg\relax
+ \let\xeatspaces\relax
\parsemargdefxxx#1,;,%
+ % In case that there are 10 or more arguments we parse again the arguments
+ % list to set new definitions for the \macarg.BLAH macros corresponding to
+ % each BLAH argument. It was anyhow needed to parse already once this list
+ % in order to count the arguments, and as macros with at most 9 arguments
+ % are by far more frequent than macro with 10 or more arguments, defining
+ % twice the \macarg.BLAH macros does not cost too much processing power.
\ifnum\paramno<10\relax\else
\paramno0\relax
\parsemmanyargdef@@#1,;,% 10 or more arguments
@@ -7804,47 +7571,10 @@ end
\else \let\next=\parsemargdefxxx
\advance\paramno by 1
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
- {\processmacroarg{\hash\the\paramno}}%
+ {\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
-% \parsemacbody, \parsermacbody
-%
-% Read recursive and nonrecursive macro bodies. (They're different since
-% rec and nonrec macros end differently.)
-%
-% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
-% body to be transformed.
-% Set \macrobody to the body of the macro, and call \defmacro.
-%
-{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
-{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
-
-% Make @ a letter, so that we can make private-to-Texinfo macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
-
-%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
-
-% If there are 10 or more arguments, a different technique is used, where the
-% hook remains in the body, and when macro is to be expanded the body is
-% processed again to replace the arguments.
-%
-% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
-% argument N value and then \edef the body (nothing else will expand because of
-% the catcode regime under which the body was input).
-%
-% If you compile with TeX (not eTeX), and you have macros with 10 or more
-% arguments, no macro can have more than 256 arguments (else error).
-%
-% In case that there are 10 or more arguments we parse again the arguments
-% list to set new definitions for the \macarg.BLAH macros corresponding to
-% each BLAH argument. It was anyhow needed to parse already once this list
-% in order to count the arguments, and as macros with at most 9 arguments
-% are by far more frequent than macro with 10 or more arguments, defining
-% twice the \macarg.BLAH macros does not cost too much processing power.
\def\parsemmanyargdef@@#1,{%
\if#1;\let\next=\relax
\else
@@ -7860,6 +7590,16 @@ end
\advance\paramno by 1\relax
\fi\next}
+% These two commands read recursive and nonrecursive macro bodies.
+% (They're different since rec and nonrec macros end differently.)
+%
+
+\catcode `\@\texiatcatcode
+\long\def\parsemacbody#1@end macro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\long\def\parsermacbody#1@end rmacro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\catcode `\@=11\relax
\let\endargs@\relax
\let\nil@\relax
@@ -7867,7 +7607,7 @@ end
\long\def\nillm@{\nil@}%
% This macro is expanded during the Texinfo macro expansion, not during its
-% definition. It gets all the arguments' values and assigns them to macros
+% definition. It gets all the arguments values and assigns them to macros
% macarg.ARGNAME
%
% #1 is the macro name
@@ -7888,6 +7628,8 @@ end
\getargvals@@
\fi
}
+
+%
\def\getargvals@@{%
\ifx\paramlist\nilm@
% Some sanity check needed here that \argvaluelist is also empty.
@@ -7931,8 +7673,7 @@ end
}
% Replace arguments by their values in the macro body, and place the result
-% in macro \@tempa.
-%
+% in macro \@tempa
\def\macvalstoargs@{%
% To do this we use the property that token registers that are \the'ed
% within an \edef expand only once. So we are going to place all argument
@@ -7956,9 +7697,8 @@ end
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
}
-% Define the named-macro outside of this group and then close this group.
-%
\def\macargexpandinbody@{%
+ %% Define the named-macro outside of this group and then close this group.
\expandafter
\endgroup
\macargdeflist@
@@ -7995,8 +7735,14 @@ end
\next
}
-% Trailing missing arguments are set to empty.
-%
+% Save the token stack pointer into macro #1
+\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
+% Restore the token stack pointer from number in macro #1
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
+% newtoks that can be used non \outer .
+\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
+
+% Tailing missing arguments are set to empty
\def\setemptyargvalues@{%
\ifx\paramlist\nilm@
\let\next\macargexpandinbody@
@@ -8026,204 +7772,99 @@ end
\long\def#2{#4}%
}
-
-%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
-
-
-
-% Remove following spaces at the expansion stage.
-% This works because spaces are discarded before each argument when TeX is
-% getting the arguments for a macro.
-% This must not be immediately followed by a }.
-\long\def\gobblespaces#1{#1}
-
-% This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
-% \macrobody has the body of the macro in it, with placeholders for
-% its parameters, looking like "\processmacroarg{\hash 1}".
-% \paramno is the number of parameters
-% \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
-% There are eight cases: recursive and nonrecursive macros of zero, one,
-% up to nine, and many arguments.
+% This defines a Texinfo @macro. There are eight cases: recursive and
+% nonrecursive macros of zero, one, up to nine, and many arguments.
+% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
-% they're defined in: @include reads the file inside a group.
+% they're defined in; @include reads the file inside a group.
%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
- \ifnum\paramno=1
- \def\processmacroarg{\gobblespaces}%
- % This removes the pair of braces around the argument. We don't
- % use \eatspaces, because this can cause ends of lines to be lost
- % when the argument to \eatspaces is read, leading to line-based
- % commands like "@itemize" not being read correctly.
- \else
- \def\processmacroarg{\xprocessmacroarg}%
- \let\xprocessmacroarg\relax
- \fi
- \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifrecursive
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\scanmacro{\macrobody}}%
+ \noexpand\scanmacro{\temp}}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \bgroup\noexpand\macroargctxt
\noexpand\braceorline
- \expandafter\noexpand\csname\the\macname @@@\endcsname}%
- \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
- \expandafter\noexpand\csname\the\macname @@@@\endcsname{%
- \noexpand\gobblespaces##1\empty}%
- % The \empty is for \gobblespaces in case #1 is empty
- }%
- \expandafter\xdef\csname\the\macname @@@@\endcsname##1{%
- \egroup\noexpand\scanmacro{\macrobody}}%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup\noexpand\scanmacro{\temp}}%
\else
\ifnum\paramno<10\relax % at most 9
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname @@\endcsname}%
- \expandafter\xdef\csname\the\macname @@\endcsname##1{%
- \expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}%
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
- \csname\the\macname @@@\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\macrobody}}%
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
\else % 10 or more
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
}%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
\fi
\fi
- \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\scanmacro{\macrobody}}%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \bgroup\noexpand\macroargctxt
\noexpand\braceorline
- \expandafter\noexpand\csname\the\macname @@@\endcsname}%
- \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
- \expandafter\noexpand\csname\the\macname @@@@\endcsname{%
- \noexpand\gobblespaces##1\empty}%
- % The \empty is for \gobblespaces in case #1 is empty
- }%
- \expandafter\xdef\csname\the\macname @@@@\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup
- \noexpand\scanmacro{\macrobody}%
- }%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
\else % at most 9
\ifnum\paramno<10\relax
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname @@\endcsname}%
- \expandafter\xdef\csname\the\macname @@\endcsname##1{%
- \expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}%
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
- \csname\the\macname @@@\endcsname
+ \csname\the\macname xxx\endcsname
\paramlist{%
\egroup
- \noexpand\scanmacro{\macrobody}%
- }%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
\else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
}%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
\fi
\fi
\fi}
-\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
+\catcode `\@\texiatcatcode\relax
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
-
-{\catcode`\@=0 \catcode`\\=13
-@catcode`@_=11
-
-% Call #1 with a list of tokens #2, with any doubled backslashes in #2
-% compressed to one.
-@gdef@passargtomacro#1#2{%
- @def@the_macro{#1}%
- @def@pending_backslash{}%
- @def@finish{@finish}%
- @def@arg_result{}%
- @let@next_token=@relax
- @add_segment#2\@finish\%
-}
-
-% Input stream is just after a backslash. If the next token is not a
-% backslash, process the rest of the argument; otherwise, remove the next
-% token.
-@gdef@look_ahead{%
- @futurelet@next_token@look_aheadzzz}
-@gdef@look_aheadzzz{%
- @ifx@next_token\%
- @let@next=@gobble_and_check_finish
- @else
- @let@next=@add_segment
- @fi@next
-}
-
-% Double backslash found. Add a single backslash here.
-@gdef@gobble_and_check_finish#1{%
- @add_the_backslash
- @def@pending_backslash{}%
- @futurelet@next_token@add_segment
-}
-
-% append a backslash to \arg_result
-@gdef@add_the_backslash{%
- @expandafter@gdef@expandafter@arg_result@expandafter{@arg_result\}%
-}
-
-% Input stream is either at the start of the argument, or just after a
-% backslash sequence, either a lone backslash, or a doubled backslash.
-% \next_token contains the first token in the input stream: if it is \finish,
-% finish; otherwise, append to \arg_result the segment of the argument up until
-% the next backslash. \pending_backslash contains a backslash to represent
-% a backslash just before the start of the input stream that has not been
-% added to \arg_result.
-@gdef@add_segment#1\{%
-@ifx@next_token@finish
- @let@next=@call_the_macro%
-@else
- @let@next=@look_ahead
- %
- % append to @arg_result
- % token list registers might be better
- @expandafter@expandafter@expandafter@gdef
- @expandafter@expandafter@expandafter@arg_result
- @expandafter@expandafter@expandafter{%
- @expandafter@arg_result
- @pending_backslash#1}%
- @def@pending_backslash{\}%
-@fi@next}
-
-@gdef@call_the_macro{@expandafter@the_macro@expandafter{@arg_result}}
-
-}
-
-% \braceorline MAC is used for a one-argument macro MAC. It checks
-% whether the next non-whitespace character is a {. It sets the context
-% for reading the argument (slightly different in the two cases). Then,
-% to read the argument, in the whole-line case, it then calls the regular
-% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
+% \braceorline decides whether the next nonwhitespace character is a
+% {. If so it reads up to the closing }, if not, it reads the whole
+% line. Whatever was read is then fed to the next control sequence
+% as an argument (by \parsebrace or \parsearg).
%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
- \ifx\nchar\bgroup
- \macroargctxt
- \expandafter\passargtomacro
- \else
- \macrolineargctxt\expandafter\parsearg
+ \ifx\nchar\bgroup\else
+ \expandafter\parsearg
\fi \macnamexxx}
@@ -8305,7 +7946,6 @@ end
\pdfmkdest{#1}%
\iflinks
{%
- \requireauxfile
\atdummies % preserve commands, but don't expand them
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
@@ -8345,12 +7985,9 @@ end
% node name, #4 the name of the Info file, #5 the name of the printed
% manual. All but the node name can be omitted.
%
-\def\pxref{\putwordsee{} \xrefXX}
-\def\xref{\putwordSee{} \xrefXX}
-\def\ref{\xrefXX}
-
-\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
-\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]}
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
%
\newbox\toprefbox
\newbox\printedrefnamebox
@@ -8494,12 +8131,6 @@ end
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \ifx,\tokenafterxref
- \else\ifx.\tokenafterxref
- \else\ifx;\tokenafterxref
- \else\ifx)\tokenafterxref
- \else,% add a , if xref not followed by punctuation
- \fi\fi\fi\fi
\fi\fi
\fi
\endlink
@@ -8570,7 +8201,6 @@ end
% If its value is nonempty, SUFFIX is output afterward.
%
\def\refx#1#2{%
- \requireauxfile
{%
\indexnofonts
\otherbackslash
@@ -8634,23 +8264,6 @@ end
\fi
}
-% If working on a large document in chapters, it is convenient to
-% be able to disable indexing, cross-referencing, and contents, for test runs.
-% This is done with @novalidate at the beginning of the file.
-%
-\newif\iflinks \linkstrue % by default we want the aux files.
-\let\novalidate = \linksfalse
-
-% Used when writing to the aux file, or when using data from it.
-\def\requireauxfile{%
- \iflinks
- \tryauxfile
- % Open the new aux file. TeX will close it automatically at exit.
- \immediate\openout\auxfile=\jobname.aux
- \fi
- \global\let\requireauxfile=\relax % Only do this once.
-}
-
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
@@ -9124,7 +8737,6 @@ end
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
- \requireauxfile
\atdummies
%
% since we read the caption text in the macro world, where ^^M
@@ -9342,6 +8954,7 @@ directory should work if nowhere else does.}
\catcode\count255=#1\relax
\advance\count255 by 1
\repeat
+
}
% @documentencoding sets the definition of non-ASCII characters
@@ -9408,17 +9021,17 @@ directory should work if nowhere else does.}
\def\latonechardefs{%
\gdef^^a0{\tie}
\gdef^^a1{\exclamdown}
- \gdef^^a2{{\tcfont \char162}} % cent
- \gdef^^a3{\pounds}
- \gdef^^a4{{\tcfont \char164}} % currency
- \gdef^^a5{{\tcfont \char165}} % yen
- \gdef^^a6{{\tcfont \char166}} % broken bar
+ \gdef^^a2{\missingcharmsg{CENT SIGN}}
+ \gdef^^a3{{\pounds}}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\missingcharmsg{YEN SIGN}}
+ \gdef^^a6{\missingcharmsg{BROKEN BAR}}
\gdef^^a7{\S}
\gdef^^a8{\"{}}
\gdef^^a9{\copyright}
\gdef^^aa{\ordf}
\gdef^^ab{\guillemetleft}
- \gdef^^ac{\ensuremath\lnot}
+ \gdef^^ac{$\lnot$}
\gdef^^ad{\-}
\gdef^^ae{\registeredsymbol}
\gdef^^af{\={}}
@@ -9783,11 +9396,7 @@ directory should work if nowhere else does.}
\def\utfeightchardefs{%
\DeclareUnicodeCharacter{00A0}{\tie}
\DeclareUnicodeCharacter{00A1}{\exclamdown}
- \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
\DeclareUnicodeCharacter{00A3}{\pounds}
- \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
- \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
- \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
\DeclareUnicodeCharacter{00A7}{\S}
\DeclareUnicodeCharacter{00A8}{\"{ }}
\DeclareUnicodeCharacter{00A9}{\copyright}
@@ -10550,8 +10159,8 @@ directory should work if nowhere else does.}
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
-\chardef\hatchar=`\^
-\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat
+\chardef\hat=`\^
+\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
@@ -10568,8 +10177,6 @@ directory should work if nowhere else does.}
\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
\catcode`\+=\active \def+{{\tt \char 43}}
\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
-\catcode`\-=\active \let-=\normaldash
-
% used for headline/footline in the output routine, in case the page
% breaks in the middle of an @tex block.
@@ -10584,6 +10191,12 @@ directory should work if nowhere else does.}
% in principle, all other definitions in \tex have to be undone too.
}
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
\def\turnoffactive{%
@@ -10602,22 +10215,23 @@ directory should work if nowhere else does.}
% \doublebackslash is two of them (for the pdf outlines).
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
-% In Texinfo, backslash is an active character; it prints the backslash
+% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
\catcode`\\=\active % @ for escape char from now on.
-% Print a typewriter backslash. For math mode, we can't simply use
-% \backslashcurfont: the story here is that in math mode, the \char
-% of \backslashcurfont ends up printing the roman \ from the math symbol
-% font (because \char in math mode uses the \mathcode, and plain.tex
-% sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E). It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
% ignored family value; char position "5C). We can't use " for the
% usual hex value because it has already been made active.
+@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
-@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
-
+% On startup, @fixbackslash assigns:
+% @let \ = @normalbackslash
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
% catcode other. We switch back and forth between these.
@@ -10625,7 +10239,8 @@ directory should work if nowhere else does.}
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
+% the literal character `\'. Also revert - to its normal character, in
+% case the active - from code has slipped in.
%
{@catcode`- = @active
@gdef@normalturnoffactive{%
@@ -10636,66 +10251,40 @@ directory should work if nowhere else does.}
@let+=@normalplus
@let<=@normalless
@let>=@normalgreater
+ @let\=@normalbackslash
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
@let~=@normaltilde
- @let\=@ttbackslash
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
}
}
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have @fixbackslash turn them back on.
-@catcode`+=@other @catcode`@_=@other
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
-% \enablebackslashhack - allow file to begin `\input texinfo'
-%
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
-% If the file did not have a `\input texinfo', then it is turned off after
-% the first line; otherwise the first `\' in the file would cause an error.
-% This is used on the very last line of this file, texinfo.tex.
-% We also use @c to call @fixbackslash, in case ends of lines are hidden.
-{
-@catcode`@^=7
-@catcode`@^^M=13@gdef@enablebackslashhack{%
- @global@let\ = @eatinput%
- @catcode`@^^M=13%
- @def@c{@fixbackslash@c}%
- @def ^^M{@let^^M@secondlinenl}%
- @gdef @secondlinenl{@let^^M@thirdlinenl}%
- @gdef @thirdlinenl{@fixbackslash}%
-}}
-
-{@catcode`@^=7 @catcode`@^^M=13%
-@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
+%
+@gdef@eatinput input texinfo{@fixbackslash}
+@global@let\ = @eatinput
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\' in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also turn back on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
@gdef@fixbackslash{%
- @ifx\@eatinput @let\ = @ttbackslash @fi
- @catcode13=5 % regular end of line
- @let@c=@texinfoc
- % Also turn back on active characters that might appear in the input
- % file name, in case not using a pre-dumped format.
+ @ifx\@eatinput @let\ = @normalbackslash @fi
@catcode`+=@active
@catcode`@_=@active
- %
- % If texinfo.cnf is present on the system, read it.
- % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
- % called at the beginning of every Texinfo file. Not opening texinfo.cnf
- % directly in this file, texinfo.tex, makes it possible to make a format
- % file for Texinfo.
- %
- @openin 1 texinfo.cnf
- @ifeof 1 @else @input texinfo.cnf @fi
- @closein 1
}
-
% Say @foo, not \foo, in error messages.
@escapechar = `@@
@@ -10735,4 +10324,3 @@ directory should work if nowhere else does.}
@ignore
arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
@end ignore
-@enablebackslashhack
diff --git a/eval.c b/eval.c
index fe22c293..cf4de1f4 100644
--- a/eval.c
+++ b/eval.c
@@ -121,7 +121,7 @@ char casetable[] = {
C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'),
C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'),
};
-#elif 'a' == 0x81 /* it's EBCDIC */
+#elif defined(USE_EBCDIC)
char casetable[] = {
/*00 NU SH SX EX PF HT LC DL */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
@@ -214,7 +214,7 @@ load_casetable(void)
if (cp == NULL || strcmp(cp, "C") == 0 || strcmp(cp, "POSIX") == 0)
return;
-#ifndef ZOS_USS
+#ifndef USE_EBCDIC
/* use of isalpha is ok here (see is_alpha in awkgram.y) */
for (i = 0200; i <= 0377; i++) {
if (isalpha(i) && islower(i) && i != toupper(i))
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 3d38072a..0200ecc4 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,13 @@
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * rwarray.c: Removed z/OS-specific code that is no longer needed due
+ to improvements in Gawk's general Autotools support.
+ * Makefile.am, configure.ac: Make use of the AC_ZOS_USS macro so
+ that this sub-project can support that platform as well.
+ * gawkfts.h, readdir.c: Use a proper platform cpp symbol to guard
+ z/OS-specific code, and eliminate the z/OS-specific use of "long"
+ inode numbers as "long long" works perfectly well there.
+
2015-08-02 Arnold D. Robbins <arnold@skeeve.com>
* revoutput.c (init_revoutput): Don't install REVOUT if it's
diff --git a/extension/Makefile.am b/extension/Makefile.am
index 92f5637b..ff9e9073 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -27,7 +27,7 @@ AM_CPPFLAGS = -I$(srcdir)/..
# This variable insures that aclocal runs
# correctly after changing configure.ac
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I ../m4
# For some make's, e.g. OpenBSD, that don't define this
RM = rm -f
diff --git a/extension/Makefile.in b/extension/Makefile.in
index 4c148361..868781ca 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -113,10 +113,11 @@ build_triplet = @build@
host_triplet = @host@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/dirfd.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/../m4/arch.m4 \
+ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -499,7 +500,7 @@ AM_CPPFLAGS = -I$(srcdir)/..
# This variable insures that aclocal runs
# correctly after changing configure.ac
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I ../m4
# For some make's, e.g. OpenBSD, that don't define this
RM = rm -f
diff --git a/extension/aclocal.m4 b/extension/aclocal.m4
index d2e755e4..5665d48e 100644
--- a/extension/aclocal.m4
+++ b/extension/aclocal.m4
@@ -1210,6 +1210,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([../m4/arch.m4])
m4_include([m4/dirfd.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
diff --git a/extension/configure b/extension/configure
index 6e280de9..0e6dd611 100755
--- a/extension/configure
+++ b/extension/configure
@@ -3660,6 +3660,99 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5
+$as_echo_n "checking for z/OS USS compilation... " >&6; }
+if ${ac_cv_zos_uss+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+if test "OS/390" = "`uname`"
+then
+ ac_cv_zos_uss=yes
+else
+ ac_cv_zos_uss=no
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5
+$as_echo "${ac_cv_zos_uss}" >&6; }
+if test "x$ac_cv_zos_uss" = "xyes"
+then
+ ac_zos_uss_cc_id=unknown
+ echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++
+ test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
+ case "$ac_zos_uss_cc_id" in
+ c89)
+ if test -n "$_C89_OPTIONS"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: CC = $CC" >&5
+$as_echo "$as_me: CC = $CC" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: _C89_OPTIONS = $_C89_OPTIONS" >&5
+$as_echo "$as_me: _C89_OPTIONS = $_C89_OPTIONS" >&6;}
+ else
+ as_fn_error $? "c89-setup-required
+To build GNU Awk using \"c89\", please set
+
+ _C89_OPTIONS=\"-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)\"
+
+in your environment, and reconfigure. (The above flags cannot be specified
+in CFLAGS/CPPFLAGS, due to the parentheses.)" "$LINENO" 5
+ fi
+ ;;
+ gcc)
+ ;;
+ cc)
+ as_fn_error $? "cc-invalid
+The z/OS \"cc\" compiler does not build GNU Awk correctly.
+
+If the \"xlc\" or \"c89\" compiler is available, please set CC accordingly
+and reconfigure. (\"xlc\" is the recommended compiler on z/OS.)" "$LINENO" 5
+ ;;
+ xlc*)
+ CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+ cat >zos-cc <<EOF
+#!/bin/sh
+#
+# This wrapper script addresses two annoying peculiarities of the IBM
+# xlc/c99 compiler on z/OS:
+#
+# 1. Missing header files are considered warnings by default rather
+# than fatal errors;
+#
+# 2. Include directories specified with -I are searched _after_ the
+# system include directories (for #include<> directives) rather
+# than before.
+#
+# This script allows the code and the build system to assume standard
+# compiler behavior.
+#
+
+PS4='zos-cc: '
+REAL_CC="$CC"
+
+set -x
+\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$@" -qsearch=/usr/include
+EOF
+ chmod +x zos-cc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: wrapping $CC with zos-cc to obtain standard behavior" >&5
+$as_echo "$as_me: wrapping $CC with zos-cc to obtain standard behavior" >&6;}
+ CC="`pwd`/zos-cc"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized compiler environment" >&5
+$as_echo "$as_me: WARNING: unrecognized compiler environment" >&2;}
+ ;;
+ esac
+fi # ac_cv_zos_uss = yes
+
+
INSTALL="$ac_aux_dir/install-sh -c"
export INSTALL
diff --git a/extension/configure.ac b/extension/configure.ac
index 4da226a1..5ff4ab69 100644
--- a/extension/configure.ac
+++ b/extension/configure.ac
@@ -29,6 +29,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_USE_SYSTEM_EXTENSIONS
+AC_ZOS_USS
INSTALL="$ac_aux_dir/install-sh -c"
export INSTALL
diff --git a/extension/gawkfts.h b/extension/gawkfts.h
index f1ca26f5..447b1758 100644
--- a/extension/gawkfts.h
+++ b/extension/gawkfts.h
@@ -45,7 +45,7 @@
# endif
#endif
-#ifdef ZOS_USS
+#ifdef __MVS__
#include <limits.h>
#define MAXPATHLEN FILENAME_MAX
#endif
@@ -81,11 +81,7 @@ typedef struct _ftsent {
struct _ftsent *fts_cycle; /* cycle node */
struct _ftsent *fts_parent; /* parent directory */
struct _ftsent *fts_link; /* next file in directory */
-#ifdef ZOS_USS
- long fts_number; /* local numeric value */
-#else
- long long fts_number; /* local numeric value */
-#endif
+ long long fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
char *fts_accpath; /* access path */
char *fts_path; /* root path */
diff --git a/extension/readdir.c b/extension/readdir.c
index 7bcabcb0..4578b864 100644
--- a/extension/readdir.c
+++ b/extension/readdir.c
@@ -137,11 +137,7 @@ ftype(struct dirent *entry, const char *dirname)
}
/* get_inode --- get the inode of a file */
-#ifdef ZOS_USS
-static long
-#else
static long long
-#endif
get_inode(struct dirent *entry, const char *dirname)
{
#ifdef __MINGW32__
@@ -179,11 +175,7 @@ dir_get_record(char **out, awk_input_buf_t *iobuf, int *errcode,
int len;
open_directory_t *the_dir;
const char *ftstr;
-#ifdef ZOS_USS
- unsigned long ino;
-#else
unsigned long long ino;
-#endif
/*
* The caller sets *errcode to 0, so we should set it only if an
@@ -208,9 +200,7 @@ dir_get_record(char **out, awk_input_buf_t *iobuf, int *errcode,
ino = get_inode (dirent, iobuf->name);
-#if defined(ZOS_USS)
- len = sprintf(the_dir->buf, "%lu/%s", ino, dirent->d_name);
-#elif __MINGW32__
+#if __MINGW32__
len = sprintf(the_dir->buf, "%I64u/%s", ino, dirent->d_name);
#else
len = sprintf(the_dir->buf, "%llu/%s", ino, dirent->d_name);
diff --git a/extension/rwarray.c b/extension/rwarray.c
index 5bead973..e751ea2c 100644
--- a/extension/rwarray.c
+++ b/extension/rwarray.c
@@ -53,17 +53,6 @@
#define _(msgid) gettext(msgid)
#define N_(msgid) msgid
-#if defined(ZOS_USS)
-#include <limits.h>
-#define INT32_MAX INT_MAX
-#define INT32_MIN INT_MIN
-#ifndef __uint32_t
-#define __uint32_t 1
-typedef unsigned long uint32_t;
-#endif
-typedef long int32_t;
-#endif /* ZOS_USS */
-
#define MAGIC "awkrulz\n"
#define MAJOR 3
#define MINOR 0
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index fb0cc109..ac00c1f5 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,11 @@
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * testdfa.c: Define and use the USE_EBCDIC cpp symbol
+ instead of checking the value of 'a' whenever we want to know
+ if we're on an EBCDIC system. Also, don't assume that z/OS
+ necessarily means EBCDIC, as the compiler does have an ASCII
+ mode (-qascii).
+
2015-05-27 Arnold D. Robbins <arnold@skeeve.com>
* mb_cur_max.c, timeformat.c: New files.
diff --git a/helpers/testdfa.c b/helpers/testdfa.c
index 2b773467..4495e11a 100644
--- a/helpers/testdfa.c
+++ b/helpers/testdfa.c
@@ -659,7 +659,7 @@ char casetable[] = {
C('\360'), C('\361'), C('\362'), C('\363'), C('\364'), C('\365'), C('\366'), C('\367'),
C('\370'), C('\371'), C('\372'), C('\373'), C('\374'), C('\375'), C('\376'), C('\377'),
};
-#elif 'a' == 0x81 /* it's EBCDIC */
+#elif defined(USE_EBCDIC)
char casetable[] = {
/*00 NU SH SX EX PF HT LC DL */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
diff --git a/io.c b/io.c
index 50f0989b..62c93c88 100644
--- a/io.c
+++ b/io.c
@@ -76,6 +76,10 @@
#include <netdb.h>
#endif /* HAVE_NETDB_H */
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif /* HAVE_SYS_SELECT_H */
+
#ifndef HAVE_GETADDRINFO
#include "missing_d/getaddrinfo.h"
#endif
@@ -1860,7 +1864,7 @@ two_way_open(const char *str, struct redirect *rp, int extfd)
if (find_two_way_processor(str, rp))
return true;
-#if defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS)
+#if defined(HAVE_TERMIOS_H)
/* case 3: use ptys for two-way communications to child */
if (! no_ptys && pty_vs_pipe(str)) {
static bool initialized = false;
@@ -2086,7 +2090,7 @@ two_way_open(const char *str, struct redirect *rp, int extfd)
first_pty_letter = '\0'; /* reset for next command */
return true;
}
-#endif /* defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) */
+#endif /* defined(HAVE_TERMIOS_H) */
use_pipes:
#ifndef PIPES_SIMULATED /* real pipes */
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 693bc721..d9e4249b 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,20 @@
+2015-09-11 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * arch.m4: Rework again. In particular, provide a wrapper
+ for CC to work around some issues.
+
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * arch.m4: Complete rewrite of AC_ZOS_USS. It no longer
+ deletes awkgram.c and command.c on a z/OS system, as these are
+ now usable in EBCDIC-land without regeneration; it sets some
+ important CFLAGS/CPPFLAGS to enable standard compiler
+ behavior, like giving an error instead of a warning when a
+ header file cannot be found (!); prevents the use of cc(1),
+ which on z/OS does not build gawk correctly; and gives some
+ help to the user if s/he is building with c89(1), which
+ presents some difficulties due to its option syntax.
+
2015-08-02 Arnold D. Robbins <arnold@skeeve.com>
* codeset.m4, glibc2.m4, glibc21.m4, intdiv0.m4, intl.m4,
diff --git a/m4/arch.m4 b/m4/arch.m4
index 2402435e..fc25d8e9 100644
--- a/m4/arch.m4
+++ b/m4/arch.m4
@@ -61,14 +61,98 @@ AC_MSG_RESULT([${gawk_cv_linux_alpha_hack}])
dnl Check for z/OS Unix Systems Services
AC_DEFUN([AC_ZOS_USS], [
AC_MSG_CHECKING([for z/OS USS compilation])
+AC_CACHE_VAL(ac_cv_zos_uss, [
if test "OS/390" = "`uname`"
then
- CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c and command.c from Bison for EBCDIC
- rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
fi
+])dnl
AC_MSG_RESULT([${ac_cv_zos_uss}])
+if test "x$ac_cv_zos_uss" = "xyes"
+then
+ dnl Identify the compiler.
+ ac_zos_uss_cc_id=unknown
+ echo " $CC " | $EGREP ' (/bin/)?c89[ |_]' >/dev/null && ac_zos_uss_cc_id=c89
+ echo " $CC " | $EGREP ' (/bin/)?c99[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?cc[ |_]' >/dev/null && ac_zos_uss_cc_id=cc
+ echo " $CC " | $EGREP ' (/bin/)?xlc[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc
+ echo " $CC " | $EGREP ' (/bin/)?xlC[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ echo " $CC " | $EGREP ' (/bin/)?xlc\+\+[ |_]' >/dev/null && ac_zos_uss_cc_id=xlc++
+ test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc
+ dnl These feature test macros are needed on z/OS.
+ CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+ test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
+ case "$ac_zos_uss_cc_id" in
+ c89)
+ dnl If the user has set CC=c89 and _C89_OPTIONS, then don't get in
+ dnl their way. c89 (as well as cc) pre-dates xlc, and accepts an
+ dnl option syntax that involves parentheses and cannot be handled
+ dnl in the usual way in C(PP)FLAGS. However, c89 will also accept
+ dnl options via the aforementioned environment variable, which
+ dnl gives the user one way around the problem. (If you're
+ dnl wondering about cc, it is meant for programs written in
+ dnl "Common Usage C" [a.k.a. K&R C] as opposed to "Standard C"
+ dnl [a.k.a. ANSI], and does not build gawk correctly.)
+ if test -n "$_C89_OPTIONS"
+ then
+ AC_MSG_NOTICE([CC = $CC])
+ AC_MSG_NOTICE([_C89_OPTIONS = $_C89_OPTIONS])
+ else
+ AC_MSG_ERROR([c89-setup-required
+To build GNU Awk using "c89", please set
+
+ _C89_OPTIONS="-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)"
+
+in your environment, and reconfigure. (The above flags cannot be specified
+in CFLAGS/CPPFLAGS, due to the parentheses.)])
+ fi
+ ;;
+ gcc)
+ dnl GCC has not yet been ported to z/OS as of this writing
+ ;;
+ cc)
+ AC_MSG_ERROR([cc-invalid
+The z/OS "cc" compiler does not build GNU Awk correctly.
+
+If the "xlc" or "c89" compiler is available, please set CC accordingly
+and reconfigure. ("xlc" is the recommended compiler on z/OS.)])
+ ;;
+ xlc*)
+ dnl This enables C99, and on z/OS 1.11, the setenv() prototype.
+ CFLAGS="$CFLAGS -qlanglvl=stdc99:libext"
+ dnl Use a compiler wrapper script to address some annoyances.
+ cat >zos-cc <<EOF
+#!/bin/sh
+#
+# This wrapper script addresses two annoying peculiarities of the IBM
+# xlc/c99 compiler on z/OS:
+#
+# 1. Missing header files are considered warnings by default rather
+# than fatal errors;
+#
+# 2. Include directories specified with -I are searched _after_ the
+# system include directories (for #include<> directives) rather
+# than before.
+#
+# This script allows the code and the build system to assume standard
+# compiler behavior.
+#
+
+PS4='zos-cc: '
+REAL_CC="$CC"
+
+set -x
+\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$[]@" -qsearch=/usr/include
+EOF
+ chmod +x zos-cc
+ AC_MSG_NOTICE([wrapping $CC with zos-cc to obtain standard behavior])
+ CC="`pwd`/zos-cc"
+ ;;
+ *)
+ AC_MSG_WARN([unrecognized compiler environment])
+ ;;
+ esac
+fi # ac_cv_zos_uss = yes
])dnl
diff --git a/regcomp.c b/regcomp.c
index 773af291..ea73a2e4 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -21,6 +21,10 @@
#include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
#ifdef _LIBC
# include <locale/weight.h>
#endif
@@ -211,10 +215,7 @@ const size_t __re_error_msgid_idx[] attribute_hidden =
/* Entry points for GNU code. */
-#ifdef ZOS_USS
-
-/* For ZOS USS we must define btowc */
-
+#ifndef HAVE_BTOWC
wchar_t
btowc (int c)
{
diff --git a/regex_internal.h b/regex_internal.h
index 4d0028ff..9e104d8d 100644
--- a/regex_internal.h
+++ b/regex_internal.h
@@ -41,11 +41,9 @@
#if defined HAVE_STDBOOL_H || defined _LIBC
# include <stdbool.h>
#endif /* HAVE_STDBOOL_H || _LIBC */
-#if !defined(ZOS_USS)
#if defined HAVE_STDINT_H || defined _LIBC
# include <stdint.h>
#endif /* HAVE_STDINT_H || _LIBC */
-#endif /* !ZOS_USS */
#if defined _LIBC
# include <bits/libc-lock.h>
#else
diff --git a/test/ChangeLog b/test/ChangeLog
index 2e4217f2..d6cbb95c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -12,6 +12,14 @@
* profile.ok: Updated after code change.
+2015-08-28 Daniel Richard G. <skunk@iSKUNK.ORG>
+
+ * Makefile.am: Generate the Maketests file without
+ reference to its directory, because putting it directly into
+ srcdir can be problematic (e.g. srcdir could be read-only).
+ (clean-local): Renamed from "clean", as Automake already defines
+ "clean" and warns us as much.
+
2015-08-25 Arnold D. Robbins <arnold@skeeve.com>
* mbstr1.ok: Updated after code change.
diff --git a/test/Makefile.am b/test/Makefile.am
index 9545920c..e6c623f7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2184,11 +2184,11 @@ muldimposix::
# Targets generated for other tests:
include Maketests
-$(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
+Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
files=`cd "$(srcdir)" && echo *.awk *.in`; \
- $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > "$(srcdir)"/Maketests
+ $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > $@
-clean:
+clean-local:
rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \
seq *~ readfile.ok fork.tmp.* testext.awk fts.ok readdir.ok \
mmap8k.ok profile1.ok
diff --git a/test/Makefile.in b/test/Makefile.in
index ce791a2f..1cced4ac 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1547,7 +1547,9 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean-am: clean-generic mostlyclean-am
+clean: clean-am
+
+clean-am: clean-generic clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
@@ -1613,14 +1615,14 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
- ctags-am distclean distclean-generic distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.PHONY: all all-am check check-am clean clean-generic clean-local \
+ cscopelist-am ctags-am distclean distclean-generic distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am
@@ -2616,7 +2618,6 @@ muldimposix::
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --posix >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
@@ -4099,11 +4100,11 @@ time:
# Targets generated for other tests:
-$(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
+Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests
files=`cd "$(srcdir)" && echo *.awk *.in`; \
- $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > "$(srcdir)"/Maketests
+ $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > $@
-clean:
+clean-local:
rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \
seq *~ readfile.ok fork.tmp.* testext.awk fts.ok readdir.ok \
mmap8k.ok profile1.ok