snapshot of project "mawk", label t20200708

This commit is contained in:
Thomas E. Dickey 2020-07-08 23:37:23 +00:00
parent 2634298c3d
commit 015612e33a
11 changed files with 938 additions and 828 deletions

View File

@ -1,7 +1,14 @@
-- $MawkId: CHANGES,v 1.273 2020/01/20 11:44:41 tom Exp $
-- $MawkId: CHANGES,v 1.277 2020/07/08 23:32:27 tom Exp $
Changes by Thomas E Dickey <dickey@invisible-island.net>
20200708
+ update manpage comment about "nextfile" (AustinGroup #607).
+ amend manpage comment about "fflush" (AustinGroup #634).
+ amend manpage comment about "delete array" (AustinGroup #544).
+ updated configure macros
+ update config.guess and config.sub
20200120
+ resync with my-autoconf.
+ fix typos found with codespell.

View File

@ -1,4 +1,4 @@
MANIFEST for mawk, version t20200120
MANIFEST for mawk, version t20200708
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGMENT acknowledgements

26
aclocal.m4 vendored
View File

@ -1,4 +1,4 @@
dnl $MawkId: aclocal.m4,v 1.88 2020/01/20 11:39:30 tom Exp $
dnl $MawkId: aclocal.m4,v 1.89 2020/04/04 20:16:13 tom Exp $
dnl custom mawk macros for autoconf
dnl
dnl The symbols beginning "CF_MAWK_" were originally written by Mike Brennan,
@ -63,10 +63,11 @@ define([CF_ACVERSION_COMPARE],
[ifelse([$8], , ,[$8])],
[ifelse([$9], , ,[$9])])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADD_CFLAGS version: 13 updated: 2017/02/25 18:57:40
dnl CF_ADD_CFLAGS version: 14 updated: 2020/04/04 16:16:13
dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
dnl The second parameter if given makes this macro verbose.
dnl $1 = flags to add
dnl $2 = if given makes this macro verbose.
dnl
dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
@ -508,7 +509,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
fi
])
dnl ---------------------------------------------------------------------------
dnl CF_CONST_X_STRING version: 3 updated: 2020/01/11 18:39:22
dnl CF_CONST_X_STRING version: 4 updated: 2020/03/10 18:53:47
dnl -----------------
dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
dnl character-strings.
@ -538,7 +539,7 @@ AC_TRY_COMPILE(
#include <stdlib.h>
#include <X11/Intrinsic.h>
],
[String foo = malloc(1)],[
[String foo = malloc(1); (void)foo],[
AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
AC_TRY_COMPILE(
@ -663,7 +664,7 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00
dnl CF_GCC_ATTRIBUTES version: 18 updated: 2020/03/10 18:53:47
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@ -707,7 +708,7 @@ cat > conftest.$ac_ext <<EOF
extern void wow(char *,...) GCC_SCANFLIKE(1,2);
extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
EOF
cf_printf_attribute=no
cf_scanf_attribute=no
@ -1062,7 +1063,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147"
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_LARGEFILE version: 11 updated: 2018/06/20 20:23:13
dnl CF_LARGEFILE version: 12 updated: 2020/03/19 20:23:48
dnl ------------
dnl Add checks for large file support.
AC_DEFUN([CF_LARGEFILE],[
@ -1102,6 +1103,7 @@ ifdef([AC_FUNC_FSEEKO],[
struct dirent64 *x = readdir((DIR *)0);
struct dirent *y = readdir((DIR *)0);
int z = x - y;
(void)z;
],
[cf_cv_struct_dirent64=yes],
[cf_cv_struct_dirent64=no])
@ -1790,7 +1792,7 @@ esac
AC_SUBST(LINT_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_REGEX version: 12 updated: 2015/04/18 08:56:57
dnl CF_REGEX version: 13 updated: 2020/03/10 18:53:47
dnl --------
dnl Attempt to determine if we've got one of the flavors of regular-expression
dnl code that we can support.
@ -1837,6 +1839,8 @@ case $cf_regex_func in
AC_TRY_LINK([#include <$cf_regex_hdr>],[
char *p = compile("", "", "", 0);
int x = step("", "");
(void)p;
(void)x;
],[
cf_cv_regex_hdrs=$cf_regex_hdr
break
@ -1848,9 +1852,11 @@ case $cf_regex_func in
do
AC_TRY_LINK([#include <sys/types.h>
#include <$cf_regex_hdr>],[
regex_t *p;
regex_t *p = 0;
int x = regcomp(p, "", 0);
int y = regexec(p, "", 0, 0, 0);
(void)x;
(void)y;
regfree(p);
],[
cf_cv_regex_hdrs=$cf_regex_hdr

25
config.guess vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2019 Free Software Foundation, Inc.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2019-12-21'
timestamp='2020-04-26'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2019 Free Software Foundation, Inc.
Copyright 1992-2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -1095,7 +1095,17 @@ EOF
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
set_cc_for_build
LIBCABI=$LIBC
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_X32 >/dev/null
then
LIBCABI="$LIBC"x32
fi
fi
echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
exit ;;
xtensa*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@ -1629,6 +1639,12 @@ copies of config.guess and config.sub with the latest versions from:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
EOF
year=`echo $timestamp | sed 's,-.*,,'`
# shellcheck disable=SC2003
if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then
cat >&2 <<EOF
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
@ -1656,6 +1672,7 @@ UNAME_RELEASE = "$UNAME_RELEASE"
UNAME_SYSTEM = "$UNAME_SYSTEM"
UNAME_VERSION = "$UNAME_VERSION"
EOF
fi
exit 1

583
config.sub vendored

File diff suppressed because it is too large Load Diff

975
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
.\" $MawkId: mawk.1,v 1.36 2019/12/31 19:29:31 tom Exp $
.\" $MawkId: mawk.1,v 1.42 2020/07/08 23:32:53 tom Exp $
.\" ###########################################################################
.\" # copyright 2008-2016,2019, Thomas E. Dickey
.\" # copyright 2008-2019,2020, Thomas E. Dickey
.\" # copyright 1996, Michael D. Brennan
.\" #
.\" # This is a source file for mawk, an implementation of
@ -11,7 +11,7 @@
.\" ###########################################################################
.ds N Mawk
.ds n mawk
.TH MAWK 1 "2019-12-31" "Version 1.3.4" "USER COMMANDS"
.TH MAWK 1 "2020-07-08" "Version 1.3.4" "USER COMMANDS"
.\" strings
.ds ex \fIexpr\fR
.\" Bulleted paragraph
@ -689,10 +689,10 @@ causes
\*(ae
not to exist.
\fB\*n\fP
supports an extension,
supports the
.B delete
.IR array ,
which deletes all elements of
.I array
feature, which deletes all elements of
.IR array .
.PP
Multidimensional arrays are synthesized with concatenation using
@ -1736,20 +1736,27 @@ sequences in strings.
Unlike ANSI C,
\fB\*n\fP limits the number of digits that follows \ex to two as the current
implementation only supports 8 bit characters.
The built-in
.B fflush
first appeared in a recent (1993) AT&T awk released to netlib, and is
not part of the POSIX standard.
Aggregate deletion with
.B delete
.I array
is not part of the POSIX standard.
.PP
POSIX explicitly leaves the behavior of
.B FS
= "" undefined, and mentions splitting the record into characters as
a possible interpretation, but currently this use is not portable
across implementations.
.PP
Some features were not part of the POSIX standard until long after
their introduction in \fB\*n\fP and other implementations.
These have been approved, though still (as of July 2020),
are not part of a published standard:
.bP
The built-in
.B fflush
first appeared in a 1993 AT&T awk released to netlib.
It was approved for the POSIX standard in 2012.
.bP
Aggregate deletion with
.B delete
.I array
was approved in 2018.
.SS "Random numbers"
.PP
POSIX does not prescribe a method for initializing random numbers at startup.
@ -1771,9 +1778,9 @@ this feature may be suppressed using conditional compilation.
.SS "Extensions added for compatibility for GAWK and BWK"
.PP
.B Nextfile
is a \fBgawk\fP extension (also implemented by BWK awk),
is not yet part of the POSIX standard (as of October 2012),
although it has been accepted for the next revision of the standard.
is a \fBgawk\fP extension (also implemented by BWK awk).
It was approved for the POSIX standard in September 2012,
and is expected to be part of the next revision of the standard.
.PP
.BR Mktime ,
.BR strftime \ and

View File

@ -366,7 +366,7 @@ TTHHEE AAWWKK LLAANNGGUUAAGGEE
_v_a_r transverses the indices of _a_r_r_a_y is not defined.
The statement, ddeelleettee _a_r_r_a_y[_e_x_p_r], causes _a_r_r_a_y[_e_x_p_r] not to exist.
mmaawwkk supports an extension, ddeelleettee _a_r_r_a_y, which deletes all elements of
mmaawwkk supports the ddeelleettee _a_r_r_a_y feature, which deletes all elements of
_a_r_r_a_y.
Multidimensional arrays are synthesized with concatenation using the
@ -969,63 +969,70 @@ CCOOMMPPAATTIIBBIILLIITTYY IISSSSUUEESS
POSIX AWK does not recognize \x hex escape sequences in strings.
Unlike ANSI C, mmaawwkk limits the number of digits that follows \x to two
as the current implementation only supports 8 bit characters. The
built-in fffflluusshh first appeared in a recent (1993) AT&T awk released to
netlib, and is not part of the POSIX standard. Aggregate deletion with
ddeelleettee _a_r_r_a_y is not part of the POSIX standard.
as the current implementation only supports 8 bit characters.
POSIX explicitly leaves the behavior of FFSS = "" undefined, and mentions
splitting the record into characters as a possible interpretation, but
splitting the record into characters as a possible interpretation, but
currently this use is not portable across implementations.
Some features were not part of the POSIX standard until long after
their introduction in mmaawwkk and other implementations. These have been
approved, though still (as of July 2020), are not part of a published
standard:
+o The built-in fffflluusshh first appeared in a 1993 AT&T awk released to
netlib. It was approved for the POSIX standard in 2012.
+o Aggregate deletion with ddeelleettee _a_r_r_a_y was approved in 2018.
RRaannddoomm nnuummbbeerrss
POSIX does not prescribe a method for initializing random numbers at
POSIX does not prescribe a method for initializing random numbers at
startup.
In practice, most implementations do nothing special, which makes ssrraanndd
and rraanndd follow the C runtime library, making the initial seed value 1.
Some implementations (Solaris XPG4 and Tru64) return 0 from the first
call to ssrraanndd, although the results from rraanndd behave as if the initial
Some implementations (Solaris XPG4 and Tru64) return 0 from the first
call to ssrraanndd, although the results from rraanndd behave as if the initial
seed is 1. Other implementations return 1.
While mmaawwkk can call ssrraanndd at startup with no parameter (initializing
random numbers from the clock), this feature may be suppressed using
While mmaawwkk can call ssrraanndd at startup with no parameter (initializing
random numbers from the clock), this feature may be suppressed using
conditional compilation.
EExxtteennssiioonnss aaddddeedd ffoorr ccoommppaattiibbiilliittyy ffoorr GGAAWWKK aanndd BBWWKK
NNeexxttffiillee is a ggaawwkk extension (also implemented by BWK awk), is not yet
part of the POSIX standard (as of October 2012), although it has been
accepted for the next revision of the standard.
NNeexxttffiillee is a ggaawwkk extension (also implemented by BWK awk). It was
approved for the POSIX standard in September 2012, and is expected to
be part of the next revision of the standard.
MMkkttiimmee, ssttrrffttiimmee and ssyyssttiimmee are ggaawwkk extensions.
The "/dev/stdin" feature was added to mmaawwkk after 1.3.4, for compatibil-
ity with ggaawwkk and BWK awk. The corresponding "-" (alias for
ity with ggaawwkk and BWK awk. The corresponding "-" (alias for
/dev/stdin) was present in mawk 1.3.3.
SSuubbttllee DDiiffffeerreenncceess nnoott iinn PPOOSSIIXX oorr tthhee AAWWKK BBooookk
Finally, here is how mmaawwkk handles exceptional cases not discussed in
the AWK book or the POSIX draft. It is unsafe to assume consistency
Finally, here is how mmaawwkk handles exceptional cases not discussed in
the AWK book or the POSIX draft. It is unsafe to assume consistency
across awks and safe to skip to the next section.
+o substr(s, i, n) returns the characters of s in the intersection
+o substr(s, i, n) returns the characters of s in the intersection
of the closed interval [1, length(s)] and the half-open interval
[i, i+n). When this intersection is empty, the empty string is
[i, i+n). When this intersection is empty, the empty string is
returned; so substr("ABC", 1, 0) = "" and substr("ABC", -4, 6) =
"A".
+o Every string, including the empty string, matches the empty
string at the front so, s ~ // and s ~ "", are always 1 as is
+o Every string, including the empty string, matches the empty
string at the front so, s ~ // and s ~ "", are always 1 as is
match(s, //) and match(s, ""). The last two set RRLLEENNGGTTHH to 0.
+o index(s, t) is always the same as match(s, t1) where t1 is the
same as t with metacharacters escaped. Hence consistency with
match requires that index(s, "") always returns 1. Also the
condition, index(s,t) != 0 if and only t is a substring of s,
+o index(s, t) is always the same as match(s, t1) where t1 is the
same as t with metacharacters escaped. Hence consistency with
match requires that index(s, "") always returns 1. Also the
condition, index(s,t) != 0 if and only t is a substring of s,
requires index("","") = 1.
+o If getline encounters end of file, getline var, leaves var
unchanged. Similarly, on entry to the EENNDD actions, $$00, the
+o If getline encounters end of file, getline var, leaves var
unchanged. Similarly, on entry to the EENNDD actions, $$00, the
fields and NNFF have their value unaltered from the last record.
EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
@ -1035,13 +1042,13 @@ EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
(see CCOOMMPPAATTIIBBIILLIITTYY IISSSSUUEESS)
MAWK_LONG_OPTIONS
If this is set, mmaawwkk uses its value to decide what to do with
If this is set, mmaawwkk uses its value to decide what to do with
GNU-style long options:
allow MMaawwkk allows the option to be checked against the (small)
set of long options it recognizes.
error MMaawwkk prints an error message and exits. This is the
error MMaawwkk prints an error message and exits. This is the
default.
ignore MMaawwkk ignores the option.
@ -1052,29 +1059,29 @@ EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
If the variable is unset, mmaawwkk prints an error message and exits.
WHINY_USERS
This is an undocumented ggaawwkk feature. It tells mmaawwkk to sort
This is an undocumented ggaawwkk feature. It tells mmaawwkk to sort
array indices before it starts to iterate over the elements of an
array.
SSEEEE AALLSSOO
ggrreepp(1)
Aho, Kernighan and Weinberger, _T_h_e _A_W_K _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Addison-
Wesley Publishing, 1988, (the AWK book), defines the language, opening
with a tutorial and advancing to many interesting programs that delve
into issues of software design and analysis relevant to programming in
Aho, Kernighan and Weinberger, _T_h_e _A_W_K _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Addison-
Wesley Publishing, 1988, (the AWK book), defines the language, opening
with a tutorial and advancing to many interesting programs that delve
into issues of software design and analysis relevant to programming in
any language.
_T_h_e _G_A_W_K _M_a_n_u_a_l, The Free Software Foundation, 1991, is a tutorial and
language reference that does not attempt the depth of the AWK book and
assumes the reader may be a novice programmer. The section on AWK
_T_h_e _G_A_W_K _M_a_n_u_a_l, The Free Software Foundation, 1991, is a tutorial and
language reference that does not attempt the depth of the AWK book and
assumes the reader may be a novice programmer. The section on AWK
arrays is excellent. It also discusses POSIX requirements for AWK.
BBUUGGSS
mmaawwkk implements printf() and sprintf() using the C library functions,
printf and sprintf, so full ANSI compatibility requires an ANSI C
library. In practice this means the h conversion qualifier may not be
available. Also mmaawwkk inherits any bugs or limitations of the library
mmaawwkk implements printf() and sprintf() using the C library functions,
printf and sprintf, so full ANSI compatibility requires an ANSI C
library. In practice this means the h conversion qualifier may not be
available. Also mmaawwkk inherits any bugs or limitations of the library
functions.
Implementors of the AWK language have shown a consistent lack of imagi-
@ -1086,4 +1093,4 @@ AAUUTTHHOORR
Version 1.3.4 2019-12-31 MAWK(1)
Version 1.3.4 2020-07-08 MAWK(1)

View File

@ -1,3 +1,9 @@
mawk-cur (1.3.4-20200708) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 08 Jul 2020 19:25:05 -0400
mawk-cur (1.3.4-20200120) unstable; urgency=low
* maintenance updates

View File

@ -1,8 +1,8 @@
Summary: mawk - pattern scanning and text processing language
%define AppProgram mawk
%define AppVersion 1.3.4
%define AppRelease 20200120
# $MawkId: mawk.spec,v 1.69 2020/01/20 11:21:53 tom Exp $
%define AppRelease 20200708
# $MawkId: mawk.spec,v 1.70 2020/07/08 23:25:12 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: %{AppRelease}

View File

@ -11,9 +11,9 @@ the GNU General Public License, version 2, 1991.
*/
/*
* $MawkId: patchlev.h,v 1.95 2020/01/20 11:21:53 tom Exp $
* $MawkId: patchlev.h,v 1.96 2020/07/08 23:25:12 tom Exp $
*/
#define PATCH_BASE 1
#define PATCH_LEVEL 3
#define PATCH_STRING ".4"
#define DATE_STRING "20200120"
#define DATE_STRING "20200708"