diff options
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | Makefile.in | 12 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | awk.h | 34 | ||||
-rw-r--r-- | awkgram.c | 43 | ||||
-rw-r--r-- | awkgram.y | 43 | ||||
-rw-r--r-- | awklib/Makefile.am | 20 | ||||
-rw-r--r-- | awklib/Makefile.in | 28 | ||||
-rw-r--r-- | awklib/eg/lib/grcat.c | 6 | ||||
-rw-r--r-- | awklib/eg/lib/pwcat.c | 10 | ||||
-rw-r--r-- | command.c | 37 | ||||
-rw-r--r-- | command.y | 37 | ||||
-rw-r--r-- | configh.in | 15 | ||||
-rwxr-xr-x | configure | 113 | ||||
-rw-r--r-- | configure.ac | 29 | ||||
-rw-r--r-- | custom.h | 12 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/Makefile.in | 10 | ||||
-rw-r--r-- | doc/gawk.info | 1112 | ||||
-rw-r--r-- | doc/gawk.texi | 22 | ||||
-rw-r--r-- | doc/gawktexi.in | 22 | ||||
-rw-r--r-- | eval.c | 4 | ||||
-rw-r--r-- | extension/Makefile.am | 2 | ||||
-rw-r--r-- | extension/Makefile.in | 11 | ||||
-rw-r--r-- | extension/aclocal.m4 | 1 | ||||
-rwxr-xr-x | extension/configure | 30 | ||||
-rw-r--r-- | extension/configure.ac | 1 | ||||
-rw-r--r-- | extension/gawkfts.h | 8 | ||||
-rw-r--r-- | extension/readdir.c | 12 | ||||
-rw-r--r-- | extension/rwarray.c | 11 | ||||
-rw-r--r-- | helpers/testdfa.c | 2 | ||||
-rw-r--r-- | io.c | 4 | ||||
-rw-r--r-- | m4/arch.m4 | 26 | ||||
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | test/Makefile.in | 26 |
36 files changed, 1029 insertions, 735 deletions
diff --git a/Makefile.am b/Makefile.am index c646fc34..342df292 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,9 +68,12 @@ SUBDIRS = \ doc \ awklib \ po \ - extension \ 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 183d71cd..08f434c1 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 awkgram.c \ command.c compile config.guess config.rpath config.sub depcomp \ @@ -480,14 +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 \ - test - +SUBDIRS = . doc awklib po test $(am__append_1) include_HEADERS = gawkapi.h # sources for both gawk and dgawk @@ -10,6 +10,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 --------------------------- @@ -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 @@ -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,14 @@ 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 */ + +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif /* HAVE_SYS_SELECT_H */ #if HAVE_UNISTD_H #include <unistd.h> @@ -1664,6 +1655,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 @@ -1676,16 +1672,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 ------------------ */ /* @@ -4162,7 +4162,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 @@ -5312,7 +5312,11 @@ static int 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 */ @@ -6138,6 +6142,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. */ @@ -7895,7 +7934,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) { @@ -1823,7 +1823,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 @@ -2973,7 +2973,11 @@ static int 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 */ @@ -3799,6 +3803,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. */ @@ -5556,7 +5595,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/Makefile.am b/awklib/Makefile.am index 2e1adaf1..73f91f05 100644 --- a/awklib/Makefile.am +++ b/awklib/Makefile.am @@ -45,6 +45,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) igawk $(AUXAWK) install-exec-hook: $(AUXAWK) @@ -64,22 +66,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/prog/igawk.sh \ -$(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; @: igawk: $(srcdir)/eg/prog/igawk.sh cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@ diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 610b6ee1..b96dbe1b 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -365,6 +365,7 @@ bin_SCRIPTS = igawk 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: @@ -440,6 +441,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) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -610,6 +619,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) @@ -730,22 +740,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/prog/igawk.sh \ -$(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; @: igawk: $(srcdir)/eg/prog/igawk.sh cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@ 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(); @@ -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 @@ -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 @@ -228,6 +228,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 @@ -243,6 +249,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 @@ -317,6 +326,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 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GNU Awk 4.1.3. +# Generated by GNU Autoconf 2.69 for GNU Awk 4.1.3-zOS-2. # # Report bugs to <bug-gawk@gnu.org>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU Awk' PACKAGE_TARNAME='gawk' -PACKAGE_VERSION='4.1.3' -PACKAGE_STRING='GNU Awk 4.1.3' +PACKAGE_VERSION='4.1.3-zOS-2' +PACKAGE_STRING='GNU Awk 4.1.3-zOS-2' PACKAGE_BUGREPORT='bug-gawk@gnu.org' PACKAGE_URL='http://www.gnu.org/software/gawk/' @@ -633,6 +633,8 @@ GAWKLIBEXT LIBMPFR LIBREADLINE SOCKET_LIBS +ENABLE_EXTENSIONS_FALSE +ENABLE_EXTENSIONS_TRUE LIBSIGSEGV_PREFIX LTLIBSIGSEGV LIBSIGSEGV @@ -1326,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Awk 4.1.3 to adapt to many kinds of systems. +\`configure' configures GNU Awk 4.1.3-zOS-2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1396,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Awk 4.1.3:";; + short | recursive ) echo "Configuration of GNU Awk 4.1.3-zOS-2:";; esac cat <<\_ACEOF @@ -1515,7 +1517,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Awk configure 4.1.3 +GNU Awk configure 4.1.3-zOS-2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2224,7 +2226,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Awk $as_me 4.1.3, which was +It was created by GNU Awk $as_me 4.1.3-zOS-2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3107,7 +3109,7 @@ fi # Define the identity of the package. PACKAGE='gawk' - VERSION='4.1.3' + VERSION='4.1.3-zOS-2' cat >>confdefs.h <<_ACEOF @@ -5863,15 +5865,30 @@ 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 + CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=600" + if test "x$GCC" != "xyes" + then + if echo " $CC " | $EGREP ' (/bin/)?(cc|c89) ' >/dev/null + then +: as_fn_error $? "invalid-cc +GNU Awk does not support the \"cc\" nor \"c89\" compiler frontends on z/OS. +Please set CC to \"c99\" or one of the \"xlc\" frontends." "$LINENO" 5 + fi + : CFLAGS="$CFLAGS -qlanglvl=stdc99:libext" + : CPPFLAGS="$CPPFLAGS -qhaltonmsg=CCN3296" + fi 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; } @@ -6164,6 +6181,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" @@ -8396,7 +8435,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` @@ -10335,7 +10374,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 snprintf strchr \ @@ -10401,10 +10440,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" @@ -10499,6 +10534,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 @@ -11019,6 +11062,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 : @@ -11512,6 +11583,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 @@ -11909,7 +11984,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Awk $as_me 4.1.3, which was +This file was extended by GNU Awk $as_me 4.1.3-zOS-2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11977,7 +12052,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU Awk config.status 4.1.3 +GNU Awk config.status 4.1.3-zOS-2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 72f78f03..42af5deb 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([GNU Awk], 4.1.3, bug-gawk@gnu.org, gawk) +AC_INIT([GNU Awk], 4.1.3-zOS-2, bug-gawk@gnu.org, gawk) # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. @@ -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 @@ -141,7 +151,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 @@ -273,7 +283,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 snprintf strchr \ @@ -293,10 +303,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, @@ -328,6 +334,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 @@ -380,6 +387,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 @@ -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/Makefile.am b/doc/Makefile.am index 86321bbc..e94e0d07 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 igawk.1.ps $(AWKCARD) -pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.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 30a371d7..8515b9a3 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 igawk.1.ps $(AWKCARD) -pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.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 b6684300..b534e005 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -1329,13 +1329,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. @@ -28209,7 +28210,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. @@ -31958,7 +31960,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) @@ -32013,7 +32015,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) @@ -32304,7 +32306,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. @@ -32548,7 +32550,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) @@ -32937,7 +32939,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 178) * 'gawk' version: Auto-set. (line 206) @@ -33269,7 +33273,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) @@ -33984,9 +33988,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) @@ -34544,542 +34548,542 @@ Ref: Manual History-Footnote-166996 Ref: Manual History-Footnote-267037 Node: How To Contribute67111 Node: Acknowledgments68240 -Node: Getting Started73108 -Node: Running gawk75547 -Node: One-shot76737 -Node: Read Terminal78000 -Node: Long80032 -Node: Executable Scripts81545 -Ref: Executable Scripts-Footnote-184340 -Node: Comments84443 -Node: Quoting86927 -Node: DOS Quoting92445 -Node: Sample Data Files93120 -Node: Very Simple95715 -Node: Two Rules100617 -Node: More Complex102503 -Node: Statements/Lines105366 -Ref: Statements/Lines-Footnote-1109825 -Node: Other Features110090 -Node: When111027 -Ref: When-Footnote-1112781 -Node: Intro Summary112846 -Node: Invoking Gawk113730 -Node: Command Line115244 -Node: Options116042 -Ref: Options-Footnote-1131949 -Ref: Options-Footnote-2132179 -Node: Other Arguments132204 -Node: Naming Standard Input135151 -Node: Environment Variables136244 -Node: AWKPATH Variable136802 -Ref: AWKPATH Variable-Footnote-1140103 -Ref: AWKPATH Variable-Footnote-2140148 -Node: AWKLIBPATH Variable140409 -Node: Other Environment Variables141553 -Node: Exit Status145318 -Node: Include Files145995 -Node: Loading Shared Libraries149590 -Node: Obsolete151018 -Node: Undocumented151710 -Node: Invoking Summary152007 -Node: Regexp153667 -Node: Regexp Usage155121 -Node: Escape Sequences157158 -Node: Regexp Operators163173 -Ref: Regexp Operators-Footnote-1170590 -Ref: Regexp Operators-Footnote-2170737 -Node: Bracket Expressions170835 -Ref: table-char-classes172858 -Node: Leftmost Longest175804 -Node: Computed Regexps177107 -Node: GNU Regexp Operators180534 -Node: Case-sensitivity184213 -Ref: Case-sensitivity-Footnote-1187100 -Ref: Case-sensitivity-Footnote-2187335 -Node: Regexp Summary187443 -Node: Reading Files188909 -Node: Records191003 -Node: awk split records191736 -Node: gawk split records196668 -Ref: gawk split records-Footnote-1201212 -Node: Fields201249 -Ref: Fields-Footnote-1204029 -Node: Nonconstant Fields204115 -Ref: Nonconstant Fields-Footnote-1206351 -Node: Changing Fields206555 -Node: Field Separators212485 -Node: Default Field Splitting215183 -Node: Regexp Field Splitting216301 -Node: Single Character Fields219654 -Node: Command Line Field Separator220714 -Node: Full Line Fields223932 -Ref: Full Line Fields-Footnote-1225454 -Ref: Full Line Fields-Footnote-2225500 -Node: Field Splitting Summary225601 -Node: Constant Size227675 -Node: Splitting By Content232254 -Ref: Splitting By Content-Footnote-1236225 -Node: Multiple Line236388 -Ref: Multiple Line-Footnote-1242271 -Node: Getline242450 -Node: Plain Getline244654 -Node: Getline/Variable247293 -Node: Getline/File248442 -Node: Getline/Variable/File249828 -Ref: Getline/Variable/File-Footnote-1251432 -Node: Getline/Pipe251520 -Node: Getline/Variable/Pipe254225 -Node: Getline/Coprocess255358 -Node: Getline/Variable/Coprocess256623 -Node: Getline Notes257363 -Node: Getline Summary260158 -Ref: table-getline-variants260580 -Node: Read Timeout261328 -Ref: Read Timeout-Footnote-1265169 -Node: Command-line directories265227 -Node: Input Summary266132 -Node: Input Exercises269304 -Node: Printing270032 -Node: Print271809 -Node: Print Examples273266 -Node: Output Separators276046 -Node: OFMT278063 -Node: Printf279419 -Node: Basic Printf280204 -Node: Control Letters281778 -Node: Format Modifiers285766 -Node: Printf Examples291781 -Node: Redirection294267 -Node: Special FD301110 -Ref: Special FD-Footnote-1304278 -Node: Special Files304352 -Node: Other Inherited Files304969 -Node: Special Network305970 -Node: Special Caveats306830 -Node: Close Files And Pipes307779 -Ref: Close Files And Pipes-Footnote-1314972 -Ref: Close Files And Pipes-Footnote-2315120 -Node: Output Summary315271 -Node: Output Exercises316269 -Node: Expressions316948 -Node: Values318136 -Node: Constants318814 -Node: Scalar Constants319505 -Ref: Scalar Constants-Footnote-1320369 -Node: Nondecimal-numbers320619 -Node: Regexp Constants323633 -Node: Using Constant Regexps324159 -Node: Variables327322 -Node: Using Variables327979 -Node: Assignment Options329890 -Node: Conversion331764 -Node: Strings And Numbers332288 -Ref: Strings And Numbers-Footnote-1335352 -Node: Locale influences conversions335461 -Ref: table-locale-affects338219 -Node: All Operators338837 -Node: Arithmetic Ops339466 -Node: Concatenation341972 -Ref: Concatenation-Footnote-1344819 -Node: Assignment Ops344926 -Ref: table-assign-ops349918 -Node: Increment Ops351231 -Node: Truth Values and Conditions354691 -Node: Truth Values355765 -Node: Typing and Comparison356813 -Node: Variable Typing357633 -Node: Comparison Operators361257 -Ref: table-relational-ops361676 -Node: POSIX String Comparison365171 -Ref: POSIX String Comparison-Footnote-1366245 -Node: Boolean Ops366384 -Ref: Boolean Ops-Footnote-1370866 -Node: Conditional Exp370958 -Node: Function Calls372694 -Node: Precedence376574 -Node: Locales380233 -Node: Expressions Summary381865 -Node: Patterns and Actions384438 -Node: Pattern Overview385558 -Node: Regexp Patterns387235 -Node: Expression Patterns387777 -Node: Ranges391558 -Node: BEGIN/END394666 -Node: Using BEGIN/END395427 -Ref: Using BEGIN/END-Footnote-1398164 -Node: I/O And BEGIN/END398270 -Node: BEGINFILE/ENDFILE400586 -Node: Empty403493 -Node: Using Shell Variables403810 -Node: Action Overview406084 -Node: Statements408409 -Node: If Statement410257 -Node: While Statement411752 -Node: Do Statement413780 -Node: For Statement414928 -Node: Switch Statement418087 -Node: Break Statement420473 -Node: Continue Statement422565 -Node: Next Statement424392 -Node: Nextfile Statement426775 -Node: Exit Statement429427 -Node: Built-in Variables431832 -Node: User-modified432965 -Ref: User-modified-Footnote-1440592 -Node: Auto-set440654 -Ref: Auto-set-Footnote-1453722 -Ref: Auto-set-Footnote-2453928 -Node: ARGC and ARGV453984 -Node: Pattern Action Summary458203 -Node: Arrays460633 -Node: Array Basics461962 -Node: Array Intro462806 -Ref: figure-array-elements464781 -Ref: Array Intro-Footnote-1467485 -Node: Reference to Elements467613 -Node: Assigning Elements470077 -Node: Array Example470568 -Node: Scanning an Array472327 -Node: Controlling Scanning475351 -Ref: Controlling Scanning-Footnote-1480750 -Node: Numeric Array Subscripts481066 -Node: Uninitialized Subscripts483250 -Node: Delete484869 -Ref: Delete-Footnote-1487621 -Node: Multidimensional487678 -Node: Multiscanning490773 -Node: Arrays of Arrays492364 -Node: Arrays Summary497132 -Node: Functions499225 -Node: Built-in500263 -Node: Calling Built-in501341 -Node: Numeric Functions503337 -Ref: Numeric Functions-Footnote-1507365 -Ref: Numeric Functions-Footnote-2507722 -Ref: Numeric Functions-Footnote-3507770 -Node: String Functions508042 -Ref: String Functions-Footnote-1531550 -Ref: String Functions-Footnote-2531679 -Ref: String Functions-Footnote-3531927 -Node: Gory Details532014 -Ref: table-sub-escapes533805 -Ref: table-sub-proposed535324 -Ref: table-posix-sub536687 -Ref: table-gensub-escapes538228 -Ref: Gory Details-Footnote-1539051 -Node: I/O Functions539202 -Ref: I/O Functions-Footnote-1546423 -Node: Time Functions546571 -Ref: Time Functions-Footnote-1557076 -Ref: Time Functions-Footnote-2557144 -Ref: Time Functions-Footnote-3557302 -Ref: Time Functions-Footnote-4557413 -Ref: Time Functions-Footnote-5557525 -Ref: Time Functions-Footnote-6557752 -Node: Bitwise Functions558018 -Ref: table-bitwise-ops558612 -Ref: Bitwise Functions-Footnote-1562950 -Node: Type Functions563123 -Node: I18N Functions564279 -Node: User-defined565930 -Node: Definition Syntax566735 -Ref: Definition Syntax-Footnote-1572422 -Node: Function Example572493 -Ref: Function Example-Footnote-1575415 -Node: Function Caveats575437 -Node: Calling A Function575955 -Node: Variable Scope576913 -Node: Pass By Value/Reference579907 -Node: Return Statement583406 -Node: Dynamic Typing586385 -Node: Indirect Calls587315 -Ref: Indirect Calls-Footnote-1597566 -Node: Functions Summary597694 -Node: Library Functions600399 -Ref: Library Functions-Footnote-1604008 -Ref: Library Functions-Footnote-2604151 -Node: Library Names604322 -Ref: Library Names-Footnote-1607783 -Ref: Library Names-Footnote-2608006 -Node: General Functions608092 -Node: Strtonum Function609195 -Node: Assert Function612217 -Node: Round Function615543 -Node: Cliff Random Function617084 -Node: Ordinal Functions618100 -Ref: Ordinal Functions-Footnote-1621163 -Ref: Ordinal Functions-Footnote-2621415 -Node: Join Function621625 -Ref: Join Function-Footnote-1623395 -Node: Getlocaltime Function623595 -Node: Readfile Function627339 -Node: Shell Quoting629313 -Node: Data File Management630714 -Node: Filetrans Function631346 -Node: Rewind Function635443 -Node: File Checking636829 -Ref: File Checking-Footnote-1638163 -Node: Empty Files638364 -Node: Ignoring Assigns640343 -Node: Getopt Function641893 -Ref: Getopt Function-Footnote-1653363 -Node: Passwd Functions653563 -Ref: Passwd Functions-Footnote-1662404 -Node: Group Functions662492 -Ref: Group Functions-Footnote-1670391 -Node: Walking Arrays670598 -Node: Library Functions Summary673608 -Node: Library Exercises675014 -Node: Sample Programs675479 -Node: Running Examples676249 -Node: Clones676977 -Node: Cut Program678201 -Node: Egrep Program687922 -Ref: Egrep Program-Footnote-1695434 -Node: Id Program695544 -Node: Split Program699224 -Ref: Split Program-Footnote-1702683 -Node: Tee Program702812 -Node: Uniq Program705602 -Node: Wc Program713028 -Ref: Wc Program-Footnote-1717283 -Node: Miscellaneous Programs717377 -Node: Dupword Program718590 -Node: Alarm Program720620 -Node: Translate Program725475 -Ref: Translate Program-Footnote-1730040 -Node: Labels Program730310 -Ref: Labels Program-Footnote-1733661 -Node: Word Sorting733745 -Node: History Sorting737817 -Node: Extract Program739652 -Node: Simple Sed747183 -Node: Igawk Program750257 -Ref: Igawk Program-Footnote-1764588 -Ref: Igawk Program-Footnote-2764790 -Ref: Igawk Program-Footnote-3764912 -Node: Anagram Program765027 -Node: Signature Program768089 -Node: Programs Summary769336 -Node: Programs Exercises770551 -Ref: Programs Exercises-Footnote-1774680 -Node: Advanced Features774771 -Node: Nondecimal Data776761 -Node: Array Sorting778352 -Node: Controlling Array Traversal779052 -Ref: Controlling Array Traversal-Footnote-1787421 -Node: Array Sorting Functions787539 -Ref: Array Sorting Functions-Footnote-1791426 -Node: Two-way I/O791622 -Ref: Two-way I/O-Footnote-1796573 -Ref: Two-way I/O-Footnote-2796760 -Node: TCP/IP Networking796842 -Node: Profiling799749 -Node: Advanced Features Summary807288 -Node: Internationalization809224 -Node: I18N and L10N810704 -Node: Explaining gettext811391 -Ref: Explaining gettext-Footnote-1816414 -Ref: Explaining gettext-Footnote-2816599 -Node: Programmer i18n816764 -Ref: Programmer i18n-Footnote-1821620 -Node: Translator i18n821669 -Node: String Extraction822463 -Ref: String Extraction-Footnote-1823596 -Node: Printf Ordering823682 -Ref: Printf Ordering-Footnote-1826468 -Node: I18N Portability826532 -Ref: I18N Portability-Footnote-1828988 -Node: I18N Example829051 -Ref: I18N Example-Footnote-1831857 -Node: Gawk I18N831930 -Node: I18N Summary832575 -Node: Debugger833916 -Node: Debugging834938 -Node: Debugging Concepts835379 -Node: Debugging Terms837188 -Node: Awk Debugging839763 -Node: Sample Debugging Session840669 -Node: Debugger Invocation841203 -Node: Finding The Bug842589 -Node: List of Debugger Commands849067 -Node: Breakpoint Control850400 -Node: Debugger Execution Control854094 -Node: Viewing And Changing Data857456 -Node: Execution Stack860830 -Node: Debugger Info862467 -Node: Miscellaneous Debugger Commands866538 -Node: Readline Support871547 -Node: Limitations872443 -Node: Debugging Summary874552 -Node: Arbitrary Precision Arithmetic875725 -Node: Computer Arithmetic877141 -Ref: table-numeric-ranges880732 -Ref: Computer Arithmetic-Footnote-1881454 -Node: Math Definitions881511 -Ref: table-ieee-formats884825 -Ref: Math Definitions-Footnote-1885428 -Node: MPFR features885533 -Node: FP Math Caution887206 -Ref: FP Math Caution-Footnote-1888278 -Node: Inexactness of computations888647 -Node: Inexact representation889607 -Node: Comparing FP Values890967 -Node: Errors accumulate892049 -Node: Getting Accuracy893482 -Node: Try To Round896192 -Node: Setting precision897091 -Ref: table-predefined-precision-strings897788 -Node: Setting the rounding mode899618 -Ref: table-gawk-rounding-modes899992 -Ref: Setting the rounding mode-Footnote-1903400 -Node: Arbitrary Precision Integers903579 -Ref: Arbitrary Precision Integers-Footnote-1906563 -Node: POSIX Floating Point Problems906712 -Ref: POSIX Floating Point Problems-Footnote-1910594 -Node: Floating point summary910632 -Node: Dynamic Extensions912822 -Node: Extension Intro914375 -Node: Plugin License915641 -Node: Extension Mechanism Outline916438 -Ref: figure-load-extension916877 -Ref: figure-register-new-function918442 -Ref: figure-call-new-function919534 -Node: Extension API Description921597 -Node: Extension API Functions Introduction923047 -Node: General Data Types927859 -Ref: General Data Types-Footnote-1933814 -Node: Memory Allocation Functions934113 -Ref: Memory Allocation Functions-Footnote-1936958 -Node: Constructor Functions937057 -Node: Registration Functions938802 -Node: Extension Functions939487 -Node: Exit Callback Functions941786 -Node: Extension Version String943036 -Node: Input Parsers943699 -Node: Output Wrappers953584 -Node: Two-way processors958096 -Node: Printing Messages960360 -Ref: Printing Messages-Footnote-1961436 -Node: Updating 'ERRNO'961589 -Node: Requesting Values962330 -Ref: table-value-types-returned963069 -Node: Accessing Parameters963952 -Node: Symbol Table Access965188 -Node: Symbol table by name965700 -Node: Symbol table by cookie967721 -Ref: Symbol table by cookie-Footnote-1971870 -Node: Cached values971934 -Ref: Cached values-Footnote-1975435 -Node: Array Manipulation975526 -Ref: Array Manipulation-Footnote-1976625 -Node: Array Data Types976662 -Ref: Array Data Types-Footnote-1979320 -Node: Array Functions979412 -Node: Flattening Arrays983271 -Node: Creating Arrays990179 -Node: Extension API Variables994951 -Node: Extension Versioning995587 -Node: Extension API Informational Variables997478 -Node: Extension API Boilerplate998542 -Node: Finding Extensions1002356 -Node: Extension Example1002916 -Node: Internal File Description1003714 -Node: Internal File Ops1007794 -Ref: Internal File Ops-Footnote-11019556 -Node: Using Internal File Ops1019696 -Ref: Using Internal File Ops-Footnote-11022079 -Node: Extension Samples1022354 -Node: Extension Sample File Functions1023883 -Node: Extension Sample Fnmatch1031532 -Node: Extension Sample Fork1033019 -Node: Extension Sample Inplace1034237 -Node: Extension Sample Ord1037447 -Node: Extension Sample Readdir1038283 -Ref: table-readdir-file-types1039172 -Node: Extension Sample Revout1039977 -Node: Extension Sample Rev2way1040566 -Node: Extension Sample Read write array1041306 -Node: Extension Sample Readfile1043248 -Node: Extension Sample Time1044343 -Node: Extension Sample API Tests1045691 -Node: gawkextlib1046183 -Node: Extension summary1048607 -Node: Extension Exercises1052299 -Node: Language History1053796 -Node: V7/SVR3.11055452 -Node: SVR41057604 -Node: POSIX1059038 -Node: BTL1060418 -Node: POSIX/GNU1061148 -Node: Feature History1066669 -Node: Common Extensions1079998 -Node: Ranges and Locales1081281 -Ref: Ranges and Locales-Footnote-11085897 -Ref: Ranges and Locales-Footnote-21085924 -Ref: Ranges and Locales-Footnote-31086159 -Node: Contributors1086380 -Node: History summary1091949 -Node: Installation1093329 -Node: Gawk Distribution1094274 -Node: Getting1094758 -Node: Extracting1095581 -Node: Distribution contents1097219 -Node: Unix Installation1102972 -Node: Quick Installation1103588 -Node: Additional Configuration Options1106015 -Node: Configuration Philosophy1107819 -Node: Non-Unix Installation1110189 -Node: PC Installation1110647 -Node: PC Binary Installation1111967 -Node: PC Compiling1113819 -Ref: PC Compiling-Footnote-11116843 -Node: PC Testing1116952 -Node: PC Using1118132 -Node: Cygwin1122246 -Node: MSYS1123016 -Node: VMS Installation1123517 -Node: VMS Compilation1124308 -Ref: VMS Compilation-Footnote-11125538 -Node: VMS Dynamic Extensions1125596 -Node: VMS Installation Details1127281 -Node: VMS Running1129534 -Node: VMS GNV1132375 -Node: VMS Old Gawk1133110 -Node: Bugs1133581 -Node: Other Versions1137695 -Node: Installation summary1144281 -Node: Notes1145339 -Node: Compatibility Mode1146204 -Node: Additions1146986 -Node: Accessing The Source1147911 -Node: Adding Code1149347 -Node: New Ports1155502 -Node: Derived Files1159990 -Ref: Derived Files-Footnote-11165475 -Ref: Derived Files-Footnote-21165510 -Ref: Derived Files-Footnote-31166108 -Node: Future Extensions1166222 -Node: Implementation Limitations1166880 -Node: Extension Design1168063 -Node: Old Extension Problems1169217 -Ref: Old Extension Problems-Footnote-11170735 -Node: Extension New Mechanism Goals1170792 -Ref: Extension New Mechanism Goals-Footnote-11174156 -Node: Extension Other Design Decisions1174345 -Node: Extension Future Growth1176458 -Node: Old Extension Mechanism1177294 -Node: Notes summary1179057 -Node: Basic Concepts1180239 -Node: Basic High Level1180920 -Ref: figure-general-flow1181202 -Ref: figure-process-flow1181887 -Ref: Basic High Level-Footnote-11185188 -Node: Basic Data Typing1185373 -Node: Glossary1188701 -Node: Copying1220647 -Node: GNU Free Documentation License1258186 -Node: Index1283304 +Node: Getting Started73127 +Node: Running gawk75566 +Node: One-shot76756 +Node: Read Terminal78019 +Node: Long80051 +Node: Executable Scripts81564 +Ref: Executable Scripts-Footnote-184359 +Node: Comments84462 +Node: Quoting86946 +Node: DOS Quoting92464 +Node: Sample Data Files93139 +Node: Very Simple95734 +Node: Two Rules100636 +Node: More Complex102522 +Node: Statements/Lines105385 +Ref: Statements/Lines-Footnote-1109844 +Node: Other Features110109 +Node: When111046 +Ref: When-Footnote-1112800 +Node: Intro Summary112865 +Node: Invoking Gawk113749 +Node: Command Line115263 +Node: Options116061 +Ref: Options-Footnote-1131968 +Ref: Options-Footnote-2132198 +Node: Other Arguments132223 +Node: Naming Standard Input135170 +Node: Environment Variables136263 +Node: AWKPATH Variable136821 +Ref: AWKPATH Variable-Footnote-1140122 +Ref: AWKPATH Variable-Footnote-2140167 +Node: AWKLIBPATH Variable140428 +Node: Other Environment Variables141572 +Node: Exit Status145337 +Node: Include Files146014 +Node: Loading Shared Libraries149609 +Node: Obsolete151037 +Node: Undocumented151729 +Node: Invoking Summary152026 +Node: Regexp153686 +Node: Regexp Usage155140 +Node: Escape Sequences157177 +Node: Regexp Operators163192 +Ref: Regexp Operators-Footnote-1170609 +Ref: Regexp Operators-Footnote-2170756 +Node: Bracket Expressions170854 +Ref: table-char-classes172877 +Node: Leftmost Longest175823 +Node: Computed Regexps177126 +Node: GNU Regexp Operators180553 +Node: Case-sensitivity184232 +Ref: Case-sensitivity-Footnote-1187119 +Ref: Case-sensitivity-Footnote-2187354 +Node: Regexp Summary187462 +Node: Reading Files188928 +Node: Records191022 +Node: awk split records191755 +Node: gawk split records196687 +Ref: gawk split records-Footnote-1201231 +Node: Fields201268 +Ref: Fields-Footnote-1204048 +Node: Nonconstant Fields204134 +Ref: Nonconstant Fields-Footnote-1206370 +Node: Changing Fields206574 +Node: Field Separators212504 +Node: Default Field Splitting215202 +Node: Regexp Field Splitting216320 +Node: Single Character Fields219673 +Node: Command Line Field Separator220733 +Node: Full Line Fields223951 +Ref: Full Line Fields-Footnote-1225473 +Ref: Full Line Fields-Footnote-2225519 +Node: Field Splitting Summary225620 +Node: Constant Size227694 +Node: Splitting By Content232273 +Ref: Splitting By Content-Footnote-1236244 +Node: Multiple Line236407 +Ref: Multiple Line-Footnote-1242290 +Node: Getline242469 +Node: Plain Getline244673 +Node: Getline/Variable247312 +Node: Getline/File248461 +Node: Getline/Variable/File249847 +Ref: Getline/Variable/File-Footnote-1251451 +Node: Getline/Pipe251539 +Node: Getline/Variable/Pipe254244 +Node: Getline/Coprocess255377 +Node: Getline/Variable/Coprocess256642 +Node: Getline Notes257382 +Node: Getline Summary260177 +Ref: table-getline-variants260599 +Node: Read Timeout261347 +Ref: Read Timeout-Footnote-1265188 +Node: Command-line directories265246 +Node: Input Summary266151 +Node: Input Exercises269323 +Node: Printing270051 +Node: Print271828 +Node: Print Examples273285 +Node: Output Separators276065 +Node: OFMT278082 +Node: Printf279438 +Node: Basic Printf280223 +Node: Control Letters281797 +Node: Format Modifiers285785 +Node: Printf Examples291800 +Node: Redirection294286 +Node: Special FD301129 +Ref: Special FD-Footnote-1304297 +Node: Special Files304371 +Node: Other Inherited Files304988 +Node: Special Network305989 +Node: Special Caveats306849 +Node: Close Files And Pipes307798 +Ref: Close Files And Pipes-Footnote-1314991 +Ref: Close Files And Pipes-Footnote-2315139 +Node: Output Summary315290 +Node: Output Exercises316288 +Node: Expressions316967 +Node: Values318155 +Node: Constants318833 +Node: Scalar Constants319524 +Ref: Scalar Constants-Footnote-1320388 +Node: Nondecimal-numbers320638 +Node: Regexp Constants323652 +Node: Using Constant Regexps324178 +Node: Variables327341 +Node: Using Variables327998 +Node: Assignment Options329909 +Node: Conversion331783 +Node: Strings And Numbers332307 +Ref: Strings And Numbers-Footnote-1335371 +Node: Locale influences conversions335480 +Ref: table-locale-affects338238 +Node: All Operators338856 +Node: Arithmetic Ops339485 +Node: Concatenation341991 +Ref: Concatenation-Footnote-1344838 +Node: Assignment Ops344945 +Ref: table-assign-ops349937 +Node: Increment Ops351250 +Node: Truth Values and Conditions354710 +Node: Truth Values355784 +Node: Typing and Comparison356832 +Node: Variable Typing357652 +Node: Comparison Operators361276 +Ref: table-relational-ops361695 +Node: POSIX String Comparison365190 +Ref: POSIX String Comparison-Footnote-1366264 +Node: Boolean Ops366403 +Ref: Boolean Ops-Footnote-1370885 +Node: Conditional Exp370977 +Node: Function Calls372713 +Node: Precedence376593 +Node: Locales380252 +Node: Expressions Summary381884 +Node: Patterns and Actions384457 +Node: Pattern Overview385577 +Node: Regexp Patterns387254 +Node: Expression Patterns387796 +Node: Ranges391577 +Node: BEGIN/END394685 +Node: Using BEGIN/END395446 +Ref: Using BEGIN/END-Footnote-1398183 +Node: I/O And BEGIN/END398289 +Node: BEGINFILE/ENDFILE400605 +Node: Empty403512 +Node: Using Shell Variables403829 +Node: Action Overview406103 +Node: Statements408428 +Node: If Statement410276 +Node: While Statement411771 +Node: Do Statement413799 +Node: For Statement414947 +Node: Switch Statement418106 +Node: Break Statement420492 +Node: Continue Statement422584 +Node: Next Statement424411 +Node: Nextfile Statement426794 +Node: Exit Statement429446 +Node: Built-in Variables431851 +Node: User-modified432984 +Ref: User-modified-Footnote-1440611 +Node: Auto-set440673 +Ref: Auto-set-Footnote-1453741 +Ref: Auto-set-Footnote-2453947 +Node: ARGC and ARGV454003 +Node: Pattern Action Summary458222 +Node: Arrays460652 +Node: Array Basics461981 +Node: Array Intro462825 +Ref: figure-array-elements464800 +Ref: Array Intro-Footnote-1467504 +Node: Reference to Elements467632 +Node: Assigning Elements470096 +Node: Array Example470587 +Node: Scanning an Array472346 +Node: Controlling Scanning475370 +Ref: Controlling Scanning-Footnote-1480769 +Node: Numeric Array Subscripts481085 +Node: Uninitialized Subscripts483269 +Node: Delete484888 +Ref: Delete-Footnote-1487640 +Node: Multidimensional487697 +Node: Multiscanning490792 +Node: Arrays of Arrays492383 +Node: Arrays Summary497151 +Node: Functions499244 +Node: Built-in500282 +Node: Calling Built-in501360 +Node: Numeric Functions503356 +Ref: Numeric Functions-Footnote-1507384 +Ref: Numeric Functions-Footnote-2507741 +Ref: Numeric Functions-Footnote-3507789 +Node: String Functions508061 +Ref: String Functions-Footnote-1531569 +Ref: String Functions-Footnote-2531698 +Ref: String Functions-Footnote-3531946 +Node: Gory Details532033 +Ref: table-sub-escapes533824 +Ref: table-sub-proposed535343 +Ref: table-posix-sub536706 +Ref: table-gensub-escapes538247 +Ref: Gory Details-Footnote-1539070 +Node: I/O Functions539221 +Ref: I/O Functions-Footnote-1546442 +Node: Time Functions546590 +Ref: Time Functions-Footnote-1557095 +Ref: Time Functions-Footnote-2557163 +Ref: Time Functions-Footnote-3557321 +Ref: Time Functions-Footnote-4557432 +Ref: Time Functions-Footnote-5557544 +Ref: Time Functions-Footnote-6557771 +Node: Bitwise Functions558037 +Ref: table-bitwise-ops558631 +Ref: Bitwise Functions-Footnote-1562969 +Node: Type Functions563142 +Node: I18N Functions564298 +Node: User-defined565949 +Node: Definition Syntax566754 +Ref: Definition Syntax-Footnote-1572441 +Node: Function Example572512 +Ref: Function Example-Footnote-1575434 +Node: Function Caveats575456 +Node: Calling A Function575974 +Node: Variable Scope576932 +Node: Pass By Value/Reference579926 +Node: Return Statement583425 +Node: Dynamic Typing586404 +Node: Indirect Calls587334 +Ref: Indirect Calls-Footnote-1597585 +Node: Functions Summary597713 +Node: Library Functions600418 +Ref: Library Functions-Footnote-1604027 +Ref: Library Functions-Footnote-2604170 +Node: Library Names604341 +Ref: Library Names-Footnote-1607802 +Ref: Library Names-Footnote-2608025 +Node: General Functions608111 +Node: Strtonum Function609214 +Node: Assert Function612236 +Node: Round Function615562 +Node: Cliff Random Function617103 +Node: Ordinal Functions618119 +Ref: Ordinal Functions-Footnote-1621182 +Ref: Ordinal Functions-Footnote-2621434 +Node: Join Function621644 +Ref: Join Function-Footnote-1623414 +Node: Getlocaltime Function623614 +Node: Readfile Function627358 +Node: Shell Quoting629332 +Node: Data File Management630733 +Node: Filetrans Function631365 +Node: Rewind Function635462 +Node: File Checking636848 +Ref: File Checking-Footnote-1638182 +Node: Empty Files638383 +Node: Ignoring Assigns640362 +Node: Getopt Function641912 +Ref: Getopt Function-Footnote-1653382 +Node: Passwd Functions653582 +Ref: Passwd Functions-Footnote-1662423 +Node: Group Functions662511 +Ref: Group Functions-Footnote-1670410 +Node: Walking Arrays670617 +Node: Library Functions Summary673627 +Node: Library Exercises675033 +Node: Sample Programs675498 +Node: Running Examples676268 +Node: Clones676996 +Node: Cut Program678220 +Node: Egrep Program687941 +Ref: Egrep Program-Footnote-1695453 +Node: Id Program695563 +Node: Split Program699243 +Ref: Split Program-Footnote-1702702 +Node: Tee Program702831 +Node: Uniq Program705621 +Node: Wc Program713047 +Ref: Wc Program-Footnote-1717302 +Node: Miscellaneous Programs717396 +Node: Dupword Program718609 +Node: Alarm Program720639 +Node: Translate Program725494 +Ref: Translate Program-Footnote-1730059 +Node: Labels Program730329 +Ref: Labels Program-Footnote-1733680 +Node: Word Sorting733764 +Node: History Sorting737836 +Node: Extract Program739671 +Node: Simple Sed747202 +Node: Igawk Program750276 +Ref: Igawk Program-Footnote-1764607 +Ref: Igawk Program-Footnote-2764809 +Ref: Igawk Program-Footnote-3764931 +Node: Anagram Program765046 +Node: Signature Program768108 +Node: Programs Summary769355 +Node: Programs Exercises770570 +Ref: Programs Exercises-Footnote-1774699 +Node: Advanced Features774790 +Node: Nondecimal Data776780 +Node: Array Sorting778371 +Node: Controlling Array Traversal779071 +Ref: Controlling Array Traversal-Footnote-1787440 +Node: Array Sorting Functions787558 +Ref: Array Sorting Functions-Footnote-1791445 +Node: Two-way I/O791641 +Ref: Two-way I/O-Footnote-1796592 +Ref: Two-way I/O-Footnote-2796779 +Node: TCP/IP Networking796861 +Node: Profiling799768 +Node: Advanced Features Summary807307 +Node: Internationalization809243 +Node: I18N and L10N810723 +Node: Explaining gettext811410 +Ref: Explaining gettext-Footnote-1816433 +Ref: Explaining gettext-Footnote-2816618 +Node: Programmer i18n816783 +Ref: Programmer i18n-Footnote-1821639 +Node: Translator i18n821688 +Node: String Extraction822482 +Ref: String Extraction-Footnote-1823615 +Node: Printf Ordering823701 +Ref: Printf Ordering-Footnote-1826487 +Node: I18N Portability826551 +Ref: I18N Portability-Footnote-1829007 +Node: I18N Example829070 +Ref: I18N Example-Footnote-1831876 +Node: Gawk I18N831949 +Node: I18N Summary832594 +Node: Debugger833935 +Node: Debugging834957 +Node: Debugging Concepts835398 +Node: Debugging Terms837207 +Node: Awk Debugging839782 +Node: Sample Debugging Session840688 +Node: Debugger Invocation841222 +Node: Finding The Bug842608 +Node: List of Debugger Commands849086 +Node: Breakpoint Control850419 +Node: Debugger Execution Control854113 +Node: Viewing And Changing Data857475 +Node: Execution Stack860849 +Node: Debugger Info862486 +Node: Miscellaneous Debugger Commands866557 +Node: Readline Support871566 +Node: Limitations872462 +Node: Debugging Summary874571 +Node: Arbitrary Precision Arithmetic875744 +Node: Computer Arithmetic877160 +Ref: table-numeric-ranges880751 +Ref: Computer Arithmetic-Footnote-1881473 +Node: Math Definitions881530 +Ref: table-ieee-formats884844 +Ref: Math Definitions-Footnote-1885447 +Node: MPFR features885552 +Node: FP Math Caution887225 +Ref: FP Math Caution-Footnote-1888297 +Node: Inexactness of computations888666 +Node: Inexact representation889626 +Node: Comparing FP Values890986 +Node: Errors accumulate892068 +Node: Getting Accuracy893501 +Node: Try To Round896211 +Node: Setting precision897110 +Ref: table-predefined-precision-strings897807 +Node: Setting the rounding mode899637 +Ref: table-gawk-rounding-modes900011 +Ref: Setting the rounding mode-Footnote-1903419 +Node: Arbitrary Precision Integers903598 +Ref: Arbitrary Precision Integers-Footnote-1906582 +Node: POSIX Floating Point Problems906731 +Ref: POSIX Floating Point Problems-Footnote-1910613 +Node: Floating point summary910651 +Node: Dynamic Extensions912841 +Node: Extension Intro914394 +Node: Plugin License915660 +Node: Extension Mechanism Outline916457 +Ref: figure-load-extension916896 +Ref: figure-register-new-function918461 +Ref: figure-call-new-function919553 +Node: Extension API Description921616 +Node: Extension API Functions Introduction923066 +Node: General Data Types927878 +Ref: General Data Types-Footnote-1933833 +Node: Memory Allocation Functions934132 +Ref: Memory Allocation Functions-Footnote-1936977 +Node: Constructor Functions937076 +Node: Registration Functions938821 +Node: Extension Functions939506 +Node: Exit Callback Functions941805 +Node: Extension Version String943055 +Node: Input Parsers943718 +Node: Output Wrappers953603 +Node: Two-way processors958115 +Node: Printing Messages960379 +Ref: Printing Messages-Footnote-1961455 +Node: Updating 'ERRNO'961608 +Node: Requesting Values962349 +Ref: table-value-types-returned963088 +Node: Accessing Parameters963971 +Node: Symbol Table Access965207 +Node: Symbol table by name965719 +Node: Symbol table by cookie967740 +Ref: Symbol table by cookie-Footnote-1971889 +Node: Cached values971953 +Ref: Cached values-Footnote-1975454 +Node: Array Manipulation975545 +Ref: Array Manipulation-Footnote-1976644 +Node: Array Data Types976681 +Ref: Array Data Types-Footnote-1979339 +Node: Array Functions979431 +Node: Flattening Arrays983290 +Node: Creating Arrays990198 +Node: Extension API Variables994970 +Node: Extension Versioning995606 +Node: Extension API Informational Variables997497 +Node: Extension API Boilerplate998561 +Node: Finding Extensions1002375 +Node: Extension Example1002935 +Node: Internal File Description1003733 +Node: Internal File Ops1007813 +Ref: Internal File Ops-Footnote-11019575 +Node: Using Internal File Ops1019715 +Ref: Using Internal File Ops-Footnote-11022098 +Node: Extension Samples1022373 +Node: Extension Sample File Functions1023902 +Node: Extension Sample Fnmatch1031551 +Node: Extension Sample Fork1033038 +Node: Extension Sample Inplace1034256 +Node: Extension Sample Ord1037466 +Node: Extension Sample Readdir1038302 +Ref: table-readdir-file-types1039191 +Node: Extension Sample Revout1039996 +Node: Extension Sample Rev2way1040585 +Node: Extension Sample Read write array1041325 +Node: Extension Sample Readfile1043267 +Node: Extension Sample Time1044362 +Node: Extension Sample API Tests1045710 +Node: gawkextlib1046202 +Node: Extension summary1048626 +Node: Extension Exercises1052318 +Node: Language History1053815 +Node: V7/SVR3.11055471 +Node: SVR41057623 +Node: POSIX1059057 +Node: BTL1060437 +Node: POSIX/GNU1061167 +Node: Feature History1066688 +Node: Common Extensions1080017 +Node: Ranges and Locales1081300 +Ref: Ranges and Locales-Footnote-11085916 +Ref: Ranges and Locales-Footnote-21085943 +Ref: Ranges and Locales-Footnote-31086178 +Node: Contributors1086399 +Node: History summary1091968 +Node: Installation1093348 +Node: Gawk Distribution1094293 +Node: Getting1094777 +Node: Extracting1095600 +Node: Distribution contents1097238 +Node: Unix Installation1102991 +Node: Quick Installation1103607 +Node: Additional Configuration Options1106034 +Node: Configuration Philosophy1107838 +Node: Non-Unix Installation1110208 +Node: PC Installation1110666 +Node: PC Binary Installation1111986 +Node: PC Compiling1113838 +Ref: PC Compiling-Footnote-11116862 +Node: PC Testing1116971 +Node: PC Using1118151 +Node: Cygwin1122265 +Node: MSYS1123035 +Node: VMS Installation1123536 +Node: VMS Compilation1124327 +Ref: VMS Compilation-Footnote-11125557 +Node: VMS Dynamic Extensions1125615 +Node: VMS Installation Details1127300 +Node: VMS Running1129553 +Node: VMS GNV1132394 +Node: VMS Old Gawk1133129 +Node: Bugs1133600 +Node: Other Versions1137797 +Node: Installation summary1144383 +Node: Notes1145441 +Node: Compatibility Mode1146306 +Node: Additions1147088 +Node: Accessing The Source1148013 +Node: Adding Code1149449 +Node: New Ports1155604 +Node: Derived Files1160092 +Ref: Derived Files-Footnote-11165577 +Ref: Derived Files-Footnote-21165612 +Ref: Derived Files-Footnote-31166210 +Node: Future Extensions1166324 +Node: Implementation Limitations1166982 +Node: Extension Design1168165 +Node: Old Extension Problems1169319 +Ref: Old Extension Problems-Footnote-11170837 +Node: Extension New Mechanism Goals1170894 +Ref: Extension New Mechanism Goals-Footnote-11174258 +Node: Extension Other Design Decisions1174447 +Node: Extension Future Growth1176560 +Node: Old Extension Mechanism1177396 +Node: Notes summary1179159 +Node: Basic Concepts1180341 +Node: Basic High Level1181022 +Ref: figure-general-flow1181304 +Ref: figure-process-flow1181989 +Ref: Basic High Level-Footnote-11185290 +Node: Basic Data Typing1185475 +Node: Glossary1188803 +Node: Copying1220749 +Node: GNU Free Documentation License1258288 +Node: Index1283406 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 50c10c71..546bc671 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -2205,6 +2205,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 @@ -2224,6 +2225,7 @@ Antonio Colombo, Stephen Davies, Scott Deifik, Akim Demaille, +Daniel Richard G., Darrel Hankerson, Michal Jaegermann, J@"urgen Kahrs, @@ -22305,11 +22307,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 @@ -22319,6 +22317,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 @@ -22638,9 +22640,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 @@ -22649,6 +22649,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 @@ -38218,6 +38220,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} @@ -38233,7 +38236,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 78f3b40d..6943febb 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -2172,6 +2172,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 @@ -2191,6 +2192,7 @@ Antonio Colombo, Stephen Davies, Scott Deifik, Akim Demaille, +Daniel Richard G., Darrel Hankerson, Michal Jaegermann, J@"urgen Kahrs, @@ -21396,11 +21398,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 @@ -21410,6 +21408,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 @@ -21729,9 +21731,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 @@ -21740,6 +21740,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 @@ -37309,6 +37311,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} @@ -37324,7 +37327,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 @@ -122,7 +122,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, @@ -215,7 +215,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/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..40eccf5a 100755 --- a/extension/configure +++ b/extension/configure @@ -3660,6 +3660,36 @@ $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 + CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=600" + if test "x$GCC" != "xyes" + then + if echo " $CC " | $EGREP ' (/bin/)?(cc|c89) ' >/dev/null + then +: as_fn_error $? "invalid-cc +GNU Awk does not support the \"cc\" nor \"c89\" compiler frontends on z/OS. +Please set CC to \"c99\" or one of the \"xlc\" frontends." "$LINENO" 5 + fi + : CFLAGS="$CFLAGS -qlanglvl=stdc99:libext" + : CPPFLAGS="$CPPFLAGS -qhaltonmsg=CCN3296" + fi + 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; } + + INSTALL="$ac_aux_dir/install-sh -c" export INSTALL diff --git a/extension/configure.ac b/extension/configure.ac index f99742b9..45e4fb6e 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 aa05a0d5..155cc47c 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/testdfa.c b/helpers/testdfa.c index 25a229a2..1e144bd7 100644 --- a/helpers/testdfa.c +++ b/helpers/testdfa.c @@ -668,7 +668,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, @@ -1774,7 +1774,7 @@ two_way_open(const char *str, struct redirect *rp) 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; @@ -2000,7 +2000,7 @@ two_way_open(const char *str, struct redirect *rp) 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 */ @@ -61,14 +61,34 @@ 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 + CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=600" + if test "x$GCC" != "xyes" + then + dnl If the user is using the "cc" or "c89" compiler frontends, then + dnl give up. These do not accept standard XL C -qfoobar options, and + dnl instead use a devil's-spawn option syntax involving parentheses. + dnl (For example, the below CFLAGS addendum becomes + dnl "-W c,langlvl(stdc99,libext)". Good luck quoting that.) + if echo " $CC " | $EGREP ' (/bin/)?(cc|c89) ' >/dev/null + then +: AC_MSG_ERROR([invalid-cc +GNU Awk does not support the "cc" nor "c89" compiler frontends on z/OS. +Please set CC to "c99" or one of the "xlc" frontends.]) + fi + dnl This enables C99, and on z/OS 1.11, the setenv() prototype. +: CFLAGS="$CFLAGS -qlanglvl=stdc99:libext" + dnl This is needed so that xlc considers a missing header file to be an + dnl error and not a warning. (Yes, the latter is in fact the default + dnl behavior on z/OS.) +: CPPFLAGS="$CPPFLAGS -qhaltonmsg=CCN3296" + fi ac_cv_zos_uss=yes else ac_cv_zos_uss=no fi +])dnl AC_MSG_RESULT([${ac_cv_zos_uss}]) ])dnl diff --git a/test/Makefile.am b/test/Makefile.am index 14ebf544..781d45d4 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2088,11 +2088,11 @@ negtime:: # 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 a78b3e6a..d2776b29 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1492,7 +1492,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 @@ -1558,14 +1560,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 @@ -3938,11 +3940,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 |