summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-12-08 21:20:11 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-12-08 21:20:11 +0200
commitc5da922b0486462028584e4568d6e00d1a4f2783 (patch)
treede1d17b273449e5aa03dcbf79d53edbc0bc3b157
parent69239a8fd65ad7f55cc2d567c933a800d5d10fac (diff)
parentd586094c7c4a9a412a7633a32d2b92a8e1cfea1c (diff)
downloadgawk-c5da922b0486462028584e4568d6e00d1a4f2783.tar.gz
Merge branch 'gawk-4.0-stable'
-rw-r--r--ChangeLog42
-rw-r--r--FUTURES3
-rw-r--r--NEWS10
-rw-r--r--README_d/README.bootstrap32
-rw-r--r--array.c8
-rw-r--r--awk.h8
-rw-r--r--command.c595
-rw-r--r--debug.c19
-rw-r--r--dfa.c117
-rw-r--r--dfa.h7
-rw-r--r--doc/ChangeLog18
-rw-r--r--doc/gawk.116
-rw-r--r--doc/gawk.info2748
-rw-r--r--doc/gawk.texi1171
-rw-r--r--eval.c8
-rw-r--r--io.c4
-rw-r--r--mbsupport.h22
-rw-r--r--missing_d/ChangeLog8
-rw-r--r--missing_d/wcmisc.c100
-rw-r--r--pc/ChangeLog21
-rw-r--r--pc/Makefile.tst13
-rw-r--r--pc/config.h21
-rw-r--r--pc/config.sed120
-rw-r--r--pc/testoutcmp.awk38
-rw-r--r--po/ast.gmobin37068 -> 0 bytes
-rw-r--r--po/ca.gmobin25787 -> 0 bytes
-rw-r--r--po/da.gmobin48739 -> 48739 bytes
-rw-r--r--po/da.po96
-rw-r--r--po/de.gmobin52166 -> 52166 bytes
-rw-r--r--po/de.po96
-rw-r--r--po/es.gmobin51471 -> 51471 bytes
-rw-r--r--po/es.po96
-rw-r--r--po/fi.gmobin51684 -> 51684 bytes
-rw-r--r--po/fi.po96
-rw-r--r--po/fr.gmobin53311 -> 53311 bytes
-rw-r--r--po/fr.po96
-rw-r--r--po/ga.gmobin33929 -> 0 bytes
-rw-r--r--po/gawk.pot98
-rw-r--r--po/he.gmobin24651 -> 0 bytes
-rw-r--r--po/id.gmobin35809 -> 0 bytes
-rw-r--r--po/it.gmobin44316 -> 44316 bytes
-rw-r--r--po/it.po96
-rw-r--r--po/ja.gmobin55596 -> 55596 bytes
-rw-r--r--po/ja.po96
-rw-r--r--po/nl.gmobin49267 -> 49267 bytes
-rw-r--r--po/nl.po96
-rw-r--r--po/pl.gmobin50946 -> 50946 bytes
-rw-r--r--po/pl.po96
-rw-r--r--po/pt_BR.gmobin29120 -> 0 bytes
-rw-r--r--po/ro.gmobin25383 -> 0 bytes
-rw-r--r--po/rw.gmobin487 -> 0 bytes
-rw-r--r--po/sv.gmobin48752 -> 48752 bytes
-rw-r--r--po/sv.po96
-rw-r--r--po/tr.gmobin33826 -> 0 bytes
-rw-r--r--po/vi.gmobin40445 -> 0 bytes
-rw-r--r--po/zh_CN.gmobin33717 -> 0 bytes
-rw-r--r--profile.c4
-rw-r--r--regex_internal.h8
-rw-r--r--replace.c4
-rw-r--r--test/ChangeLog4
-rw-r--r--test/Makefile.am43
-rw-r--r--test/Makefile.in43
-rw-r--r--vms/ChangeLog17
-rw-r--r--vms/descrip.mms8
-rw-r--r--vms/vms-conf.h32
-rw-r--r--vms/vmstest.com87
66 files changed, 3153 insertions, 3304 deletions
diff --git a/ChangeLog b/ChangeLog
index dbead39b..f3cc7661 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2011-12-06 John Haque <j.eh@mchsi.com>
+
+ * debug.c (source_find): Fix misplaced call to efree.
+ * profile.c (redir2str): Add a missing comma in the redirtab array.
+ * eval.c (r_interpret): Disallow call to exit if currule is undefined.
+ This avoids the possiblity of running END blocks more than once when
+ used in a user-defined sorted-in comparision function.
+ * array.c (sort_user_func): Adjust appropriately.
+
+2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h, mbsupport.h: Changes for MBS support on DJGPP
+ and z/OS.
+ * io.c: Disable pty support on z/OS.
+
+2011-11-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Sync with GNU grep.
+ * dfa.h: Add _GL_ATTRIBUTE_PURE macro. Bleah.
+
+2011-11-14 John Haque <j.eh@mchsi.com>
+
+ * debug.c (set_breakpoint_at): Fix problem with setting
+ breakpoints in a switch statement. Thanks to Giorgio Palandri
+ <giorgio.palandri@gmail.com> for the bug report.
+
+2011-11-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * mbsupport.h: Add check for HAVE_BTOWC, per Pat Rankin.
+
+2011-11-12 Eli Zaretskii <eliz@gnu.org>
+
+ * mbsupport.h: Additional glop for dfa.c in Windows environment.
+
+2011-11-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Move glop for ! MBS_SUPPORT to ...
+ * mbsupport.h: ... here.
+ * replace.c: Include missing_d/wcmisc.c if ! MBS_SUPPORT.
+ * regex_internal.h: Move include of mbsupport.h up and add
+ additional checks to avoid inclusion of wctype.h and wchar.h.
+
2011-10-27 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_strftime): Per Pat Rankin, instead of casting
diff --git a/FUTURES b/FUTURES
index 02574107..6b570567 100644
--- a/FUTURES
+++ b/FUTURES
@@ -26,6 +26,9 @@ For 4.1
Continue code reviews / code cleanup
+ Consider making gawk output +nan for NaN values so that it
+ will accept its own output as input.
+
For 4.2
=======
Implement designed API for loadable modules
diff --git a/NEWS b/NEWS
index 0106f7ce..289ce86e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,16 @@
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
+Changes from 4.0.0 to 4.0.1
+---------------------------
+
+1. The default handling of backslash in sub() and gsub() has been reverted to
+ the behavior of 3.1. It was silly to think I could break compatibility that
+ way, even for standards compliance.
+
+XXX. Lots of minor bugs fixed and portability clean-ups along the way. See
+ the ChangeLog for details.
+
Changes from 3.1.8 to 4.0.0
---------------------------
diff --git a/README_d/README.bootstrap b/README_d/README.bootstrap
new file mode 100644
index 00000000..152bbefa
--- /dev/null
+++ b/README_d/README.bootstrap
@@ -0,0 +1,32 @@
+Tue Dec 6 21:33:19 IST 2011
+============================
+
+As documented in the mail below, if you are using a system without any
+version of awk installed, you will have bootstrapping problems (i.e., running
+configure). The solution is to install mawk or Brian Kernighan's awk
+first.
+
+Arnold Robbins
+------------------------------------
+From: Simon Josefsson <simon@josefsson.org>
+To: bug-gawk@gnu.org
+Date: Sat, 19 Nov 2011 15:24:22 +0100
+Message-ID: <87r514faw9.fsf@latte.josefsson.org>
+Subject: [bug-gawk] building gawk requires an awk?
+
+Hello,
+
+I was not able to build gawk 4.0.0 on a GNU/Hurd machine that didn't
+have any awk, the ./configure script failed at the end:
+
+config.status: creating Makefile
+./config.status: line 1169: awk: command not found
+config.status: error: could not create Makefile
+
+Is this a known bootstrapping issue? Same happened for 3.1.8. I looked
+in README but didn't find anything obvious.
+
+Btw, building 'mawk' first and then gawk 4.0.0 works. Running self
+checks didn't work because there is no 'cmp' on the system either...
+
+/Simon
diff --git a/array.c b/array.c
index 2a89a606..90679b72 100644
--- a/array.c
+++ b/array.c
@@ -1219,7 +1219,6 @@ sort_user_func(const void *p1, const void *p2)
NODE *idx1, *idx2, *val1, *val2;
AWKNUM ret;
INSTRUCTION *code;
- extern int exiting;
idx1 = *((NODE *const *) p1);
idx2 = *((NODE *const *) p2);
@@ -1244,9 +1243,6 @@ sort_user_func(const void *p1, const void *p2)
/* execute the comparison function */
(void) interpret(code);
- if (exiting) /* do not assume anything about the user-defined function! */
- gawk_exit(exit_val);
-
/* return value of the comparison function */
POP_NUMBER(ret);
@@ -1346,9 +1342,9 @@ assoc_list(NODE *symbol, const char *sort_str, SORT_CTXT sort_ctxt)
(code + 1)->expr_count = 4; /* function takes 4 arguments */
code->nexti = bcalloc(Op_stop, 1, 0);
- /* make non-local jumps `next' and `nextfile' fatal in
+ /* make non-redirected getline, exit, `next' and `nextfile' fatal in
* callback function by setting currule in interpret()
- * to undefined (0). `exit' is handled in sort_user_func.
+ * to undefined (0).
*/
save_rule = currule; /* save current rule */
diff --git a/awk.h b/awk.h
index 2bb325b6..a430111f 100644
--- a/awk.h
+++ b/awk.h
@@ -76,6 +76,10 @@
extern int errno;
#endif
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif /* not STDC_HEADERS */
+
#include "mbsupport.h" /* defines MBS_SUPPORT */
#if MBS_SUPPORT
@@ -131,10 +135,6 @@ typedef int off_t;
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#endif /* not STDC_HEADERS */
-
#include "protos.h"
#ifdef HAVE_STRING_H
diff --git a/command.c b/command.c
index c3fea2b8..8b41b6c4 100644
--- a/command.c
+++ b/command.c
@@ -1,8 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.5. */
-/* Bison implementation for Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.5"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -73,7 +75,7 @@
/* Copy the first part of user declarations. */
-/* Line 268 of yacc.c */
+/* Line 189 of yacc.c */
#line 26 "command.y"
#include "awk.h"
@@ -142,8 +144,8 @@ static int find_argument(CMDARG *arg);
#define YYSTYPE CMDARG *
-/* Line 268 of yacc.c */
-#line 147 "command.c"
+/* Line 189 of yacc.c */
+#line 149 "command.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -280,8 +282,8 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 343 of yacc.c */
-#line 285 "command.c"
+/* Line 264 of yacc.c */
+#line 287 "command.c"
#ifdef short
# undef short
@@ -331,7 +333,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -383,11 +385,11 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# endif
@@ -410,24 +412,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -454,7 +456,23 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-# define YYCOPY_NEEDED 1
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -474,26 +492,6 @@ union yyalloc
#endif
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
@@ -724,8 +722,8 @@ static const yytype_uint8 yyr2[] =
1, 1, 2, 1, 2, 2, 1
};
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
@@ -804,7 +802,8 @@ static const yytype_int16 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -148
static const yytype_int16 yytable[] =
{
@@ -831,12 +830,6 @@ static const yytype_int16 yytable[] =
0, 0, 0, 45
};
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-151))
-
-#define yytable_value_is_error(yytable_value) \
- YYID (0)
-
static const yytype_int16 yycheck[] =
{
3, 6, 17, 17, 81, 1, 83, 1, 85, 86,
@@ -901,18 +894,9 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
+ Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -922,6 +906,7 @@ do \
{ \
yychar = (Token); \
yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
@@ -963,10 +948,19 @@ while (YYID (0))
#endif
-/* This macro is provided for backward compatibility. */
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
@@ -1154,6 +1148,7 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
+
#if YYERROR_VERBOSE
@@ -1254,142 +1249,115 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = 0;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
+ int yyn = yypact[yystate];
- switch (yycount)
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
{
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
}
#endif /* YYERROR_VERBOSE */
+
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -1421,7 +1389,6 @@ yydestruct (yymsg, yytype, yyvaluep)
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
@@ -1448,9 +1415,10 @@ YYSTYPE yylval;
int yynerrs;
-/*----------.
-| yyparse. |
-`----------*/
+
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
@@ -1472,6 +1440,8 @@ yyparse ()
#endif
#endif
{
+
+
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
@@ -1626,7 +1596,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
+ if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
@@ -1657,8 +1627,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -1713,7 +1683,7 @@ yyreduce:
{
case 3:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 109 "command.y"
{
cmd_idx = -1;
@@ -1733,7 +1703,7 @@ yyreduce:
case 5:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 128 "command.y"
{
if (errcount == 0 && cmd_idx >= 0) {
@@ -1788,7 +1758,7 @@ yyreduce:
case 6:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 178 "command.y"
{
yyerrok;
@@ -1797,14 +1767,14 @@ yyreduce:
case 22:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 212 "command.y"
{ want_nodeval = TRUE; }
break;
case 23:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 217 "command.y"
{
if (errcount == 0) {
@@ -1824,7 +1794,7 @@ yyreduce:
case 24:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 235 "command.y"
{
(yyval) = append_statement(arg_list, (char *) start_EVAL);
@@ -1837,14 +1807,14 @@ yyreduce:
case 25:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 242 "command.y"
{ (yyval) = append_statement((yyvsp[(1) - (2)]), lexptr_begin); }
break;
case 26:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 243 "command.y"
{
(yyval) = (yyvsp[(3) - (4)]);
@@ -1853,7 +1823,7 @@ yyreduce:
case 27:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 250 "command.y"
{
arg_list = append_statement((yyvsp[(2) - (3)]), (char *) end_EVAL);
@@ -1874,7 +1844,7 @@ yyreduce:
case 28:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 266 "command.y"
{
NODE *n;
@@ -1890,7 +1860,7 @@ yyreduce:
case 34:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 285 "command.y"
{
if (cmdtab[cmd_idx].class == D_FRAME
@@ -1901,7 +1871,7 @@ yyreduce:
case 35:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 291 "command.y"
{
int idx = find_argument((yyvsp[(2) - (2)]));
@@ -1918,49 +1888,49 @@ yyreduce:
case 38:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 304 "command.y"
{ want_nodeval = TRUE; }
break;
case 40:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 305 "command.y"
{ want_nodeval = TRUE; }
break;
case 46:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 310 "command.y"
{ want_nodeval = TRUE; }
break;
case 49:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 312 "command.y"
{ want_nodeval = TRUE; }
break;
case 51:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 313 "command.y"
{ want_nodeval = TRUE; }
break;
case 53:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 314 "command.y"
{ want_nodeval = TRUE; }
break;
case 57:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 318 "command.y"
{
if (in_cmd_src((yyvsp[(2) - (2)])->a_string))
@@ -1970,7 +1940,7 @@ yyreduce:
case 58:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 323 "command.y"
{
if (! input_from_tty)
@@ -1980,7 +1950,7 @@ yyreduce:
case 59:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 328 "command.y"
{
int type = 0;
@@ -2011,7 +1981,7 @@ yyreduce:
case 60:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 354 "command.y"
{
if (! in_commands)
@@ -2026,7 +1996,7 @@ yyreduce:
case 61:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 364 "command.y"
{
if (! in_commands)
@@ -2036,7 +2006,7 @@ yyreduce:
case 62:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 369 "command.y"
{
int idx = find_argument((yyvsp[(2) - (2)]));
@@ -2053,14 +2023,14 @@ yyreduce:
case 63:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 380 "command.y"
{ want_nodeval = TRUE; }
break;
case 64:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 381 "command.y"
{
int type;
@@ -2073,7 +2043,7 @@ yyreduce:
case 65:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 389 "command.y"
{
if (in_commands) {
@@ -2089,7 +2059,7 @@ yyreduce:
case 66:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 403 "command.y"
{
if ((yyvsp[(1) - (1)]) != NULL) {
@@ -2104,42 +2074,42 @@ yyreduce:
case 68:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 417 "command.y"
{ (yyval) = NULL; }
break;
case 69:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 422 "command.y"
{ (yyval) = NULL; }
break;
case 74:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 431 "command.y"
{ (yyval) = NULL; }
break;
case 75:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 436 "command.y"
{ (yyval) = NULL; }
break;
case 77:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 439 "command.y"
{ (yyval) = NULL; }
break;
case 78:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 444 "command.y"
{
NODE *n;
@@ -2151,14 +2121,14 @@ yyreduce:
case 79:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 454 "command.y"
{ (yyval) = NULL; }
break;
case 80:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 456 "command.y"
{
if (find_option((yyvsp[(1) - (1)])->a_string) < 0)
@@ -2168,7 +2138,7 @@ yyreduce:
case 81:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 461 "command.y"
{
if (find_option((yyvsp[(1) - (3)])->a_string) < 0)
@@ -2178,7 +2148,7 @@ yyreduce:
case 82:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 469 "command.y"
{
NODE *n;
@@ -2196,56 +2166,56 @@ yyreduce:
case 83:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 485 "command.y"
{ (yyval) = NULL; }
break;
case 88:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 494 "command.y"
{ (yyval) = NULL; }
break;
case 89:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 495 "command.y"
{ want_nodeval = TRUE; }
break;
case 92:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 497 "command.y"
{ want_nodeval = TRUE; }
break;
case 95:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 503 "command.y"
{ (yyval) = NULL; }
break;
case 97:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 509 "command.y"
{ (yyval) = NULL; }
break;
case 99:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 515 "command.y"
{ (yyval) = NULL; }
break;
case 104:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 527 "command.y"
{
int idx = find_argument((yyvsp[(1) - (2)]));
@@ -2262,7 +2232,7 @@ yyreduce:
case 106:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 543 "command.y"
{
(yyvsp[(2) - (2)])->type = D_array; /* dump all items */
@@ -2272,7 +2242,7 @@ yyreduce:
case 107:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 548 "command.y"
{
(yyvsp[(2) - (3)])->type = D_array;
@@ -2282,21 +2252,21 @@ yyreduce:
case 117:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 574 "command.y"
{ (yyval) = NULL; }
break;
case 118:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 576 "command.y"
{ (yyval) = NULL; }
break;
case 119:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 578 "command.y"
{
CMDARG *a;
@@ -2308,7 +2278,7 @@ yyreduce:
case 126:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 594 "command.y"
{
if ((yyvsp[(1) - (3)])->a_int > (yyvsp[(3) - (3)])->a_int)
@@ -2322,28 +2292,28 @@ yyreduce:
case 127:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 606 "command.y"
{ (yyval) = NULL; }
break;
case 134:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 620 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 135:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 622 "command.y"
{ (yyval) = (yyvsp[(1) - (3)]); }
break;
case 137:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 628 "command.y"
{
CMDARG *a;
@@ -2363,21 +2333,21 @@ yyreduce:
case 139:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 647 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); num_dim = 1; }
break;
case 140:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 649 "command.y"
{ (yyval) = (yyvsp[(1) - (2)]); num_dim++; }
break;
case 142:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 655 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2391,7 +2361,7 @@ yyreduce:
case 143:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 664 "command.y"
{
/* a_string is array name, a_count is dimension count */
@@ -2403,14 +2373,14 @@ yyreduce:
case 144:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 674 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 145:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 676 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2422,7 +2392,7 @@ yyreduce:
case 146:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 683 "command.y"
{
NODE *n = (yyvsp[(2) - (2)])->a_node;
@@ -2436,35 +2406,35 @@ yyreduce:
case 147:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 695 "command.y"
{ (yyval) = NULL; }
break;
case 148:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 697 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 149:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 702 "command.y"
{ (yyval) = NULL; }
break;
case 150:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 704 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 151:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 709 "command.y"
{
if ((yyvsp[(1) - (1)])->a_int == 0)
@@ -2475,7 +2445,7 @@ yyreduce:
case 152:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 715 "command.y"
{
if ((yyvsp[(2) - (2)])->a_int == 0)
@@ -2486,21 +2456,21 @@ yyreduce:
case 153:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 724 "command.y"
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
case 154:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 726 "command.y"
{ (yyval) = (yyvsp[(2) - (2)]); }
break;
case 155:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 728 "command.y"
{
(yyvsp[(2) - (2)])->a_int = - (yyvsp[(2) - (2)])->a_int;
@@ -2510,7 +2480,7 @@ yyreduce:
case 156:
-/* Line 1821 of yacc.c */
+/* Line 1455 of yacc.c */
#line 736 "command.y"
{
if (lexptr_begin != NULL) {
@@ -2524,21 +2494,10 @@ yyreduce:
-/* Line 1821 of yacc.c */
-#line 2541 "command.c"
+/* Line 1455 of yacc.c */
+#line 2511 "command.c"
default: break;
}
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -2566,10 +2525,6 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -2577,36 +2532,37 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
{
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
}
-# undef YYSYNTAX_ERROR
#endif
}
@@ -2665,7 +2621,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
+ if (yyn != YYPACT_NINF)
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2724,13 +2680,8 @@ yyexhaustedlab:
yyreturn:
if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
@@ -2755,7 +2706,7 @@ yyreturn:
-/* Line 2067 of yacc.c */
+/* Line 1675 of yacc.c */
#line 746 "command.y"
diff --git a/debug.c b/debug.c
index 5870a40f..37418115 100644
--- a/debug.c
+++ b/debug.c
@@ -493,8 +493,8 @@ source_find(char *src)
efree(path);
return s;
}
- efree(path);
}
+ efree(path);
}
d_error(_("cannot find source file named `%s' (%s)"), src, strerror(errno_val));
@@ -2227,6 +2227,23 @@ set_breakpoint_at(INSTRUCTION *rp, int lineno, int silent)
INSTRUCTION *ip, *prevp;
for (prevp = rp, ip = rp->nexti; ip; prevp = ip, ip = ip->nexti) {
+ if (ip->opcode == Op_K_case) {
+ INSTRUCTION *i1, *i2;
+
+ /* Special case: the code line numbers for a switch do not form
+ * a monotonically increasing sequence. Check if the line # is between
+ * the first and last statements of the case block before continuing
+ * the search.
+ */
+ for (i2 = ip->stmt_start, i1 = i2->nexti; i2 != ip->stmt_end;
+ i2 = i1, i1 = i1->nexti) {
+ if (i1->source_line >= lineno)
+ return add_breakpoint(i2, i1, rp->source_file, silent);
+ if (i1 == ip->stmt_end)
+ break;
+ }
+ }
+
if (ip->source_line >= lineno)
return add_breakpoint(prevp, ip, rp->source_file, silent);
if (ip == (rp + 1)->lasti)
diff --git a/dfa.c b/dfa.c
index 789c6b91..37ddc1bc 100644
--- a/dfa.c
+++ b/dfa.c
@@ -68,18 +68,6 @@
#define bool int
#define true (1)
#define false (0)
-#if ! MBS_SUPPORT
-#define wctype_t int
-#define wint_t int
-#define mbstate_t int
-#define WEOF EOF
-#define towupper toupper
-#define towlower tolower
-#define btowc(x) (x)
-#define iswalnum isalnum
-#define iswalpha isalpha
-#define iswupper isupper
-#endif /* ! MBS_SUPPORT */
#endif /* GAWK */
#include "regex.h"
@@ -92,74 +80,6 @@ is_blank (int c)
{
return (c == ' ' || c == '\t');
}
-
-#if ! MBS_SUPPORT
-static const char *classes[] = {
- "<dummy>",
- "alnum",
- "alpha",
- "blank",
- "cntrl",
- "digit",
- "graph",
- "lower",
- "print",
- "punct",
- "space",
- "upper",
- "xdigit",
- NULL
-};
-
-static wctype_t wctype(const char *name)
-{
- int i;
-
- for (i = 1; classes[i] != NULL; i++)
- if (strcmp(name, classes[i]) == 0)
- return i;
-
- return 0;
-}
-
-static int iswctype(wint_t wc, wctype_t desc)
-{
- int j = sizeof(classes) / sizeof(classes[0]);
-
- if (desc >= j || desc == 0)
- return 0;
-
- switch (desc) {
- case 1: return isalnum(wc);
- case 2: return isalpha(wc);
- case 3: return is_blank(wc);
- case 4: return iscntrl(wc);
- case 5: return isdigit(wc);
- case 6: return isgraph(wc);
- case 7: return islower(wc);
- case 8: return isprint(wc);
- case 9: return ispunct(wc);
- case 10: return isspace(wc);
- case 11: return isupper(wc);
- case 12: return isxdigit(wc);
- default: return 0;
- }
-}
-
-static int wcscoll(const wchar_t *ws1, const wchar_t *ws2)
-{
- size_t i;
-
- for (i = 0; ws1[i] != 0 && ws2[i] != 0; i++) {
- if (ws1[i] < ws2[i])
- return -1;
- else if (ws1[i] > ws2[i])
- return 1;
- }
-
- return (ws1[i] - ws2[i]);
-}
-#endif /* ! MBS_SUPPORT */
#endif /* GAWK */
/* HPUX, define those as macros in sys/param.h */
@@ -688,7 +608,8 @@ setbit_c (int b, charclass c)
}
#else
# define setbit_c setbit
-static inline bool setbit_wc (wint_t wc, charclass c)
+static inline bool
+setbit_wc (wint_t wc, charclass c)
{
abort ();
/*NOTREACHED*/
@@ -862,7 +783,7 @@ static const struct dfa_ctype prednames[] = {
{ NULL, NULL, false }
};
-static const struct dfa_ctype *
+static const struct dfa_ctype * _GL_ATTRIBUTE_PURE
find_pred (const char *str)
{
unsigned int i;
@@ -882,7 +803,6 @@ parse_bracket_exp (void)
int invert;
int c, c1, c2;
charclass ccl;
- wint_t wc1 = 0;
/* Used to warn about [:space:].
Bit 0 = first character is a colon.
@@ -893,6 +813,7 @@ parse_bracket_exp (void)
wint_t wc;
wint_t wc2;
+ wint_t wc1 = 0;
/* Work area to build a mb_char_classes. */
struct mb_char_classes *work_mbc;
@@ -1160,8 +1081,18 @@ parse_bracket_exp (void)
return CSET + charclass_index(ccl);
}
+/* Add this to the test for whether a byte is word-constituent, since on
+ BSD-based systems, many values in the 128..255 range are classified as
+ alphabetic, while on glibc-based systems, they are not. */
+#ifdef __GLIBC__
+# define is_valid_unibyte_character(c) 1
+#else
+# define is_valid_unibyte_character(c) (MBS_SUPPORT && btowc (c) != WEOF)
+#endif
+
/* Return non-zero if C is a `word-constituent' byte; zero otherwise. */
-#define IS_WORD_CONSTITUENT(C) (isalnum(C) || (C) == '_')
+#define IS_WORD_CONSTITUENT(C) \
+ (is_valid_unibyte_character(C) && (isalnum(C) || (C) == '_'))
static token
lex (void)
@@ -1758,7 +1689,7 @@ atom (void)
}
/* Return the number of tokens in the given subexpression. */
-static int
+static int _GL_ATTRIBUTE_PURE
nsubtoks (int tindex)
{
int ntoks1;
@@ -2208,9 +2139,7 @@ dfaanalyze (struct dfa *d, int searchflag)
CALLOC(d->follows, d->tindex);
for (i = 0; i < d->tindex; ++i)
-#ifdef DEBUG
- { /* Nonsyntactic #ifdef goo... */
-#endif
+ {
switch (d->tokens[i])
{
case EMPTY:
@@ -2335,8 +2264,8 @@ dfaanalyze (struct dfa *d, int searchflag)
prtok(d->tokens[lastpos[j].index]);
}
putc('\n', stderr);
- }
#endif
+ }
/* For each follow set that is the follow set of a real position, replace
it with its epsilon closure. */
@@ -3336,7 +3265,7 @@ dfaexec (struct dfa *d, char const *begin, char *end,
for (;;)
{
if (d->mb_cur_max > 1)
- while ((t = trans[s]))
+ while ((t = trans[s]) != NULL)
{
if (p > buf_end)
break;
@@ -3369,10 +3298,10 @@ dfaexec (struct dfa *d, char const *begin, char *end,
}
else
{
- while ((t = trans[s]) != 0)
+ while ((t = trans[s]) != NULL)
{
s1 = t[*p++];
- if ((t = trans[s1]) == 0)
+ if ((t = trans[s1]) == NULL)
{
int tmp = s; s = s1; s1 = tmp; /* swap */
break;
@@ -3683,7 +3612,7 @@ icpyalloc (char const *string)
return icatalloc (NULL, string);
}
-static char *
+static char * _GL_ATTRIBUTE_PURE
istrstr (char const *lookin, char const *lookfor)
{
char const *cp;
@@ -4095,7 +4024,7 @@ dfaalloc (void)
return xmalloc (sizeof (struct dfa));
}
-struct dfamust *
+struct dfamust * _GL_ATTRIBUTE_PURE
dfamusts (struct dfa const *d)
{
return d->musts;
diff --git a/dfa.h b/dfa.h
index 4d65ee34..d45f3139 100644
--- a/dfa.h
+++ b/dfa.h
@@ -22,6 +22,13 @@
# define __attribute__(x)
#endif
+/* The __pure__ attribute was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
/* Element of a list of strings, at least one of which is known to
appear in any R.E. matching the DFA. */
struct dfamust
diff --git a/doc/ChangeLog b/doc/ChangeLog
index aa365d70..3a9a9912 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,21 @@
+2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi: Various typo fixes from mailing list.
+
+2011-11-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.1: Fix some .BR to be .B.
+
+2011-11-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi: Further improvement in the discussion of sorted array
+ traversal. Some sections reordered and text edited to suit.
+
+2011-11-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi: Try to improve discussion of sorted array
+ traversal.
+
2011-09-24 Arnold D. Robbins <arnold@skeeve.com>
* gawk.1: Fix some spelling errors. Thanks to
diff --git a/doc/gawk.1 b/doc/gawk.1
index 205eb389..e26f9a2e 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -14,7 +14,7 @@
. if \w'\(rq' .ds rq "\(rq
. \}
.\}
-.TH GAWK 1 "May 29 2011" "Free Software Foundation" "Utility Commands"
+.TH GAWK 1 "Nov 10 2011" "Free Software Foundation" "Utility Commands"
.SH NAME
gawk \- pattern scanning and processing language
.SH SYNOPSIS
@@ -782,7 +782,7 @@ each field is made up of text that matches that regular expression. In
this case, the regular expression describes the fields themselves,
instead of the text that separates the fields.
Assigning a new value to
-.BR FS
+.B FS
or
.B FIELDWIDTHS
overrides the use of
@@ -2089,7 +2089,7 @@ Sends data to a co-process or socket.
below.)
.PP
The
-.BR getline
+.B getline
command returns 1 on success, 0 on end of file, and \-1 on an error.
Upon an error,
.B ERRNO
@@ -2234,9 +2234,9 @@ For
and
.BR %X ,
supply a leading
-.BR 0x
+.B 0x
or
-.BR 0X
+.B 0X
for
a nonzero result.
For
@@ -2517,7 +2517,7 @@ a second array if you wish to preserve the original.
The purpose of the optional string
.I how
is the same as described in
-.BR asort()
+.B asort()
above.
.TP
\fBgensub(\fIr\fB, \fIs\fB, \fIh \fR[\fB, \fIt\fR]\fB)\fR
@@ -2589,7 +2589,7 @@ to get a literal
(This must be typed as \fB"\e\e&"\fP;
see \*(EP
for a fuller discussion of the rules for
-.BR &'s
+.BR & 's
and backslashes in the replacement text of
.BR sub() ,
.BR gsub() ,
@@ -3275,7 +3275,7 @@ the
array; the
.BR \ea ,
and
-.BR \ev
+.B \ev
escape sequences (done originally in
.I gawk
and fed back into the Bell Laboratories version); the
diff --git a/doc/gawk.info b/doc/gawk.info
index b92d1b87..a8b6450b 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1,4 +1,4 @@
-This is gawk.info, produced by makeinfo version 4.8 from gawk.texi.
+This is gawk.info, produced by makeinfo version 4.13 from gawk.texi.
INFO-DIR-SECTION Text creation and manipulation
START-INFO-DIR-ENTRY
@@ -15,7 +15,7 @@ Foundation, Inc.
This is Edition 4 of `GAWK: Effective AWK Programming: A User's
-Guide for GNU Awk', for the 4.0.0 (or later) version of the GNU
+Guide for GNU Awk', for the 4.0.1 (or later) version of the GNU
implementation of AWK.
Permission is granted to copy, distribute and/or modify this document
@@ -47,7 +47,7 @@ Foundation, Inc.
This is Edition 4 of `GAWK: Effective AWK Programming: A User's
-Guide for GNU Awk', for the 4.0.0 (or later) version of the GNU
+Guide for GNU Awk', for the 4.0.1 (or later) version of the GNU
implementation of AWK.
Permission is granted to copy, distribute and/or modify this document
@@ -109,439 +109,399 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* GNU Free Documentation License:: The license for this Info file.
* Index:: Concept and Variable Index.
-* History:: The history of `gawk' and
- `awk'.
-* Names:: What name to use to find `awk'.
-* This Manual:: Using this Info file. Includes
- sample input files that you can use.
-* Conventions:: Typographical Conventions.
-* Manual History:: Brief history of the GNU project and
- this Info file.
-* How To Contribute:: Helping to save the world.
-* Acknowledgments:: Acknowledgments.
-* Running gawk:: How to run `gawk' programs;
- includes command-line syntax.
-* One-shot:: Running a short throwaway `awk'
- program.
-* Read Terminal:: Using no input files (input from
- terminal instead).
-* Long:: Putting permanent `awk'
- programs in files.
-* Executable Scripts:: Making self-contained `awk'
- programs.
-* Comments:: Adding documentation to `gawk'
- programs.
-* Quoting:: More discussion of shell quoting
- issues.
-* DOS Quoting:: Quoting in Windows Batch Files.
-* Sample Data Files:: Sample data files for use in the
- `awk' programs illustrated in
- this Info file.
-* Very Simple:: A very simple example.
-* Two Rules:: A less simple one-line example using
- two rules.
-* More Complex:: A more complex example.
-* Statements/Lines:: Subdividing or combining statements
- into lines.
-* Other Features:: Other Features of `awk'.
-* When:: When to use `gawk' and when to
- use other things.
-* Command Line:: How to run `awk'.
-* Options:: Command-line options and their
- meanings.
-* Other Arguments:: Input file names and variable
- assignments.
-* Naming Standard Input:: How to specify standard input with
- other files.
-* Environment Variables:: The environment variables
- `gawk' uses.
-* AWKPATH Variable:: Searching directories for `awk'
- programs.
-* Other Environment Variables:: The environment variables.
-* Exit Status:: `gawk''s exit status.
-* Include Files:: Including other files into your
- program.
-* Obsolete:: Obsolete Options and/or features.
-* Undocumented:: Undocumented Options and Features.
-* Regexp Usage:: How to Use Regular Expressions.
-* Escape Sequences:: How to write nonprinting characters.
-* Regexp Operators:: Regular Expression Operators.
-* Bracket Expressions:: What can go between `[...]'.
-* GNU Regexp Operators:: Operators specific to GNU software.
-* Case-sensitivity:: How to do case-insensitive matching.
-* Leftmost Longest:: How much text matches.
-* Computed Regexps:: Using Dynamic Regexps.
-* Records:: Controlling how data is split into
- records.
-* Fields:: An introduction to fields.
-* Nonconstant Fields:: Nonconstant Field Numbers.
-* Changing Fields:: Changing the Contents of a Field.
-* Field Separators:: The field separator and how to change
- it.
-* Default Field Splitting:: How fields are normally separated.
-* Regexp Field Splitting:: Using regexps as the field separator.
-* Single Character Fields:: Making each character a separate field.
-* Command Line Field Separator:: Setting `FS' from the
- command-line.
-* Field Splitting Summary:: Some final points and a summary table.
-* Constant Size:: Reading constant width data.
-* Splitting By Content:: Defining Fields By Content
-* Multiple Line:: Reading multi-line records.
-* Getline:: Reading files under explicit program
- control using the `getline'
- function.
-* Plain Getline:: Using `getline' with no arguments.
-* Getline/Variable:: Using `getline' into a variable.
-* Getline/File:: Using `getline' from a file.
-* Getline/Variable/File:: Using `getline' into a variable
- from a file.
-* Getline/Pipe:: Using `getline' from a pipe.
-* Getline/Variable/Pipe:: Using `getline' into a variable
- from a pipe.
-* Getline/Coprocess:: Using `getline' from a coprocess.
-* Getline/Variable/Coprocess:: Using `getline' into a variable
- from a coprocess.
-* Getline Notes:: Important things to know about
- `getline'.
-* Getline Summary:: Summary of `getline' Variants.
-* Command line directories:: What happens if you put a directory on
- the command line.
-* Print:: The `print' statement.
-* Print Examples:: Simple examples of `print'
- statements.
-* Output Separators:: The output separators and how to change
- them.
-* OFMT:: Controlling Numeric Output With
- `print'.
-* Printf:: The `printf' statement.
-* Basic Printf:: Syntax of the `printf' statement.
-* Control Letters:: Format-control letters.
-* Format Modifiers:: Format-specification modifiers.
-* Printf Examples:: Several examples.
-* Redirection:: How to redirect output to multiple
- files and pipes.
-* Special Files:: File name interpretation in
- `gawk'. `gawk' allows
- access to inherited file descriptors.
-* Special FD:: Special files for I/O.
-* Special Network:: Special files for network
- communications.
-* Special Caveats:: Things to watch out for.
-* Close Files And Pipes:: Closing Input and Output Files and
- Pipes.
-* Values:: Constants, Variables, and Regular
- Expressions.
-* Constants:: String, numeric and regexp constants.
-* Scalar Constants:: Numeric and string constants.
-* Nondecimal-numbers:: What are octal and hex numbers.
-* Regexp Constants:: Regular Expression constants.
-* Using Constant Regexps:: When and how to use a regexp constant.
-* Variables:: Variables give names to values for
- later use.
-* Using Variables:: Using variables in your programs.
-* Assignment Options:: Setting variables on the command-line
- and a summary of command-line syntax.
- This is an advanced method of input.
-* Conversion:: The conversion of strings to numbers
- and vice versa.
-* All Operators:: `gawk''s operators.
-* Arithmetic Ops:: Arithmetic operations (`+',
- `-', etc.)
-* Concatenation:: Concatenating strings.
-* Assignment Ops:: Changing the value of a variable or a
- field.
-* Increment Ops:: Incrementing the numeric value of a
- variable.
-* Truth Values and Conditions:: Testing for true and false.
-* Truth Values:: What is ``true'' and what is ``false''.
-* Typing and Comparison:: How variables acquire types and how
- this affects comparison of numbers and
- strings with `<', etc.
-* Variable Typing:: String type versus numeric type.
-* Comparison Operators:: The comparison operators.
-* POSIX String Comparison:: String comparison with POSIX rules.
-* Boolean Ops:: Combining comparison expressions using
- boolean operators `||' (``or''),
- `&&' (``and'') and `!'
- (``not'').
-* Conditional Exp:: Conditional expressions select between
- two subexpressions under control of a
- third subexpression.
-* Function Calls:: A function call is an expression.
-* Precedence:: How various operators nest.
-* Locales:: How the locale affects things.
-* Pattern Overview:: What goes into a pattern.
-* Regexp Patterns:: Using regexps as patterns.
-* Expression Patterns:: Any expression can be used as a
- pattern.
-* Ranges:: Pairs of patterns specify record
- ranges.
-* BEGIN/END:: Specifying initialization and cleanup
- rules.
-* Using BEGIN/END:: How and why to use BEGIN/END rules.
-* I/O And BEGIN/END:: I/O issues in BEGIN/END rules.
-* BEGINFILE/ENDFILE:: Two special patterns for advanced
- control.
-* Empty:: The empty pattern, which matches every
- record.
-* Using Shell Variables:: How to use shell variables with
- `awk'.
-* Action Overview:: What goes into an action.
-* Statements:: Describes the various control
- statements in detail.
-* If Statement:: Conditionally execute some
- `awk' statements.
-* While Statement:: Loop until some condition is satisfied.
-* Do Statement:: Do specified action while looping until
- some condition is satisfied.
-* For Statement:: Another looping statement, that
- provides initialization and increment
- clauses.
-* Switch Statement:: Switch/case evaluation for conditional
- execution of statements based on a
- value.
-* Break Statement:: Immediately exit the innermost
- enclosing loop.
-* Continue Statement:: Skip to the end of the innermost
- enclosing loop.
-* Next Statement:: Stop processing the current input
- record.
-* Nextfile Statement:: Stop processing the current file.
-* Exit Statement:: Stop execution of `awk'.
-* Built-in Variables:: Summarizes the built-in variables.
-* User-modified:: Built-in variables that you change to
- control `awk'.
-* Auto-set:: Built-in variables where `awk'
- gives you information.
-* ARGC and ARGV:: Ways to use `ARGC' and
- `ARGV'.
-* Array Basics:: The basics of arrays.
-* Array Intro:: Introduction to Arrays
-* Reference to Elements:: How to examine one element of an array.
-* Assigning Elements:: How to change an element of an array.
-* Array Example:: Basic Example of an Array
-* Scanning an Array:: A variation of the `for'
- statement. It loops through the indices
- of an array's existing elements.
-* Delete:: The `delete' statement removes an
- element from an array.
-* Numeric Array Subscripts:: How to use numbers as subscripts in
- `awk'.
-* Uninitialized Subscripts:: Using Uninitialized variables as
- subscripts.
-* Multi-dimensional:: Emulating multidimensional arrays in
- `awk'.
-* Multi-scanning:: Scanning multidimensional arrays.
-* Arrays of Arrays:: True multidimensional arrays.
-* Built-in:: Summarizes the built-in functions.
-* Calling Built-in:: How to call built-in functions.
-* Numeric Functions:: Functions that work with numbers,
- including `int()', `sin()'
- and `rand()'.
-* String Functions:: Functions for string manipulation, such
- as `split()', `match()' and
- `sprintf()'.
-* Gory Details:: More than you want to know about
- `\' and `&' with
- `sub()', `gsub()', and
- `gensub()'.
-* I/O Functions:: Functions for files and shell commands.
-* Time Functions:: Functions for dealing with timestamps.
-* Bitwise Functions:: Functions for bitwise operations.
-* Type Functions:: Functions for type information.
-* I18N Functions:: Functions for string translation.
-* User-defined:: Describes User-defined functions in
- detail.
-* Definition Syntax:: How to write definitions and what they
- mean.
-* Function Example:: An example function definition and what
- it does.
-* Function Caveats:: Things to watch out for.
-* Calling A Function:: Don't use spaces.
-* Variable Scope:: Controlling variable scope.
-* Pass By Value/Reference:: Passing parameters.
-* Return Statement:: Specifying the value a function
- returns.
-* Dynamic Typing:: How variable types can change at
- runtime.
-* Indirect Calls:: Choosing the function to call at
- runtime.
-* I18N and L10N:: Internationalization and Localization.
-* Explaining gettext:: How GNU `gettext' works.
-* Programmer i18n:: Features for the programmer.
-* Translator i18n:: Features for the translator.
-* String Extraction:: Extracting marked strings.
-* Printf Ordering:: Rearranging `printf' arguments.
-* I18N Portability:: `awk'-level portability issues.
-* I18N Example:: A simple i18n example.
-* Gawk I18N:: `gawk' is also
- internationalized.
-* Nondecimal Data:: Allowing nondecimal input data.
-* Array Sorting:: Facilities for controlling array
- traversal and sorting arrays.
-* Controlling Array Traversal:: How to use PROCINFO["sorted_in"].
-* Controlling Scanning With A Function:: Using a function to control scanning.
-* Controlling Scanning:: Controlling the order in which arrays
- are scanned.
-* Array Sorting Functions:: How to use `asort()' and
- `asorti()'.
-* Two-way I/O:: Two-way communications with another
- process.
-* TCP/IP Networking:: Using `gawk' for network
- programming.
-* Profiling:: Profiling your `awk' programs.
-* Library Names:: How to best name private global
- variables in library functions.
-* General Functions:: Functions that are of general use.
-* Strtonum Function:: A replacement for the built-in
- `strtonum()' function.
-* Assert Function:: A function for assertions in
- `awk' programs.
-* Round Function:: A function for rounding if
- `sprintf()' does not do it
- correctly.
-* Cliff Random Function:: The Cliff Random Number Generator.
-* Ordinal Functions:: Functions for using characters as
- numbers and vice versa.
-* Join Function:: A function to join an array into a
- string.
-* Gettimeofday Function:: A function to get formatted times.
-* Data File Management:: Functions for managing command-line
- data files.
-* Filetrans Function:: A function for handling data file
- transitions.
-* Rewind Function:: A function for rereading the current
- file.
-* File Checking:: Checking that data files are readable.
-* Empty Files:: Checking for zero-length files.
-* Ignoring Assigns:: Treating assignments as file names.
-* Getopt Function:: A function for processing command-line
- arguments.
-* Passwd Functions:: Functions for getting user information.
-* Group Functions:: Functions for getting group
- information.
-* Walking Arrays:: A function to walk arrays of arrays.
-* Running Examples:: How to run these examples.
-* Clones:: Clones of common utilities.
-* Cut Program:: The `cut' utility.
-* Egrep Program:: The `egrep' utility.
-* Id Program:: The `id' utility.
-* Split Program:: The `split' utility.
-* Tee Program:: The `tee' utility.
-* Uniq Program:: The `uniq' utility.
-* Wc Program:: The `wc' utility.
-* Miscellaneous Programs:: Some interesting `awk'
- programs.
-* Dupword Program:: Finding duplicated words in a document.
-* Alarm Program:: An alarm clock.
-* Translate Program:: A program similar to the `tr'
- utility.
-* Labels Program:: Printing mailing labels.
-* Word Sorting:: A program to produce a word usage
- count.
-* History Sorting:: Eliminating duplicate entries from a
- history file.
-* Extract Program:: Pulling out programs from Texinfo
- source files.
-* Simple Sed:: A Simple Stream Editor.
-* Igawk Program:: A wrapper for `awk' that
- includes files.
-* Anagram Program:: Finding anagrams from a dictionary.
-* Signature Program:: People do amazing things with too much
- time on their hands.
-* Debugging:: Introduction to `dgawk'.
-* Debugging Concepts:: Debugging In General.
-* Debugging Terms:: Additional Debugging Concepts.
-* Awk Debugging:: Awk Debugging.
-* Sample dgawk session:: Sample `dgawk' session.
-* dgawk invocation:: `dgawk' Invocation.
-* Finding The Bug:: Finding The Bug.
-* List of Debugger Commands:: Main `dgawk' Commands.
-* Breakpoint Control:: Control of breakpoints.
-* Dgawk Execution Control:: Control of execution.
-* Viewing And Changing Data:: Viewing and changing data.
-* Dgawk Stack:: Dealing with the stack.
-* Dgawk Info:: Obtaining information about the program
- and the debugger state.
-* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
-* Readline Support:: Readline Support.
-* Dgawk Limitations:: Limitations and future plans.
-* V7/SVR3.1:: The major changes between V7 and System
- V Release 3.1.
-* SVR4:: Minor changes between System V Releases
- 3.1 and 4.
-* POSIX:: New features from the POSIX standard.
-* BTL:: New features from Brian Kernighan's
- version of `awk'.
-* POSIX/GNU:: The extensions in `gawk' not in
- POSIX `awk'.
-* Common Extensions:: Common Extensions Summary.
-* Ranges and Locales:: How locales used to affect regexp
- ranges.
-* Contributors:: The major contributors to
- `gawk'.
-* Gawk Distribution:: What is in the `gawk'
- distribution.
-* Getting:: How to get the distribution.
-* Extracting:: How to extract the distribution.
-* Distribution contents:: What is in the distribution.
-* Unix Installation:: Installing `gawk' under various
- versions of Unix.
-* Quick Installation:: Compiling `gawk' under Unix.
-* Additional Configuration Options:: Other compile-time options.
-* Configuration Philosophy:: How it's all supposed to work.
-* Non-Unix Installation:: Installation on Other Operating
- Systems.
-* PC Installation:: Installing and Compiling `gawk'
- on MS-DOS and OS/2.
-* PC Binary Installation:: Installing a prepared distribution.
-* PC Compiling:: Compiling `gawk' for MS-DOS,
- Windows32, and OS/2.
-* PC Testing:: Testing `gawk' on PC systems.
-* PC Using:: Running `gawk' on MS-DOS,
- Windows32 and OS/2.
-* Cygwin:: Building and running `gawk' for
- Cygwin.
-* MSYS:: Using `gawk' In The MSYS
- Environment.
-* VMS Installation:: Installing `gawk' on VMS.
-* VMS Compilation:: How to compile `gawk' under
- VMS.
-* VMS Installation Details:: How to install `gawk' under
- VMS.
-* VMS Running:: How to run `gawk' under VMS.
-* VMS Old Gawk:: An old version comes with some VMS
- systems.
-* Bugs:: Reporting Problems and Bugs.
-* Other Versions:: Other freely available `awk'
- implementations.
-* Compatibility Mode:: How to disable certain `gawk'
- extensions.
-* Additions:: Making Additions To `gawk'.
-* Accessing The Source:: Accessing the Git repository.
-* Adding Code:: Adding code to the main body of
- `gawk'.
-* New Ports:: Porting `gawk' to a new
- operating system.
-* Dynamic Extensions:: Adding new built-in functions to
- `gawk'.
-* Internals:: A brief look at some `gawk'
- internals.
-* Plugin License:: A note about licensing.
-* Sample Library:: A example of new functions.
-* Internal File Description:: What the new functions will do.
-* Internal File Ops:: The code for internal file operations.
-* Using Internal File Ops:: How to use an external extension.
-* Future Extensions:: New features that may be implemented
- one day.
-* Basic High Level:: The high level view.
-* Basic Data Typing:: A very quick intro to data types.
-* Floating Point Issues:: Stuff to know about floating-point
- numbers.
-* String Conversion Precision:: The String Value Can Lie.
-* Unexpected Results:: Floating Point Numbers Are Not Abstract
- Numbers.
-* POSIX Floating Point Problems:: Standards Versus Existing Practice.
+* History:: The history of `gawk' and
+ `awk'.
+* Names:: What name to use to find `awk'.
+* This Manual:: Using this Info file. Includes
+ sample input files that you can use.
+* Conventions:: Typographical Conventions.
+* Manual History:: Brief history of the GNU project and this
+ Info file.
+* How To Contribute:: Helping to save the world.
+* Acknowledgments:: Acknowledgments.
+* Running gawk:: How to run `gawk' programs;
+ includes command-line syntax.
+* One-shot:: Running a short throwaway `awk'
+ program.
+* Read Terminal:: Using no input files (input from terminal
+ instead).
+* Long:: Putting permanent `awk' programs in
+ files.
+* Executable Scripts:: Making self-contained `awk'
+ programs.
+* Comments:: Adding documentation to `gawk'
+ programs.
+* Quoting:: More discussion of shell quoting issues.
+* DOS Quoting:: Quoting in Windows Batch Files.
+* Sample Data Files:: Sample data files for use in the
+ `awk' programs illustrated in this
+ Info file.
+* Very Simple:: A very simple example.
+* Two Rules:: A less simple one-line example using two
+ rules.
+* More Complex:: A more complex example.
+* Statements/Lines:: Subdividing or combining statements into
+ lines.
+* Other Features:: Other Features of `awk'.
+* When:: When to use `gawk' and when to use
+ other things.
+* Command Line:: How to run `awk'.
+* Options:: Command-line options and their meanings.
+* Other Arguments:: Input file names and variable assignments.
+* Naming Standard Input:: How to specify standard input with other
+ files.
+* Environment Variables:: The environment variables `gawk'
+ uses.
+* AWKPATH Variable:: Searching directories for `awk'
+ programs.
+* Other Environment Variables:: The environment variables.
+* Exit Status:: `gawk''s exit status.
+* Include Files:: Including other files into your program.
+* Obsolete:: Obsolete Options and/or features.
+* Undocumented:: Undocumented Options and Features.
+* Regexp Usage:: How to Use Regular Expressions.
+* Escape Sequences:: How to write nonprinting characters.
+* Regexp Operators:: Regular Expression Operators.
+* Bracket Expressions:: What can go between `[...]'.
+* GNU Regexp Operators:: Operators specific to GNU software.
+* Case-sensitivity:: How to do case-insensitive matching.
+* Leftmost Longest:: How much text matches.
+* Computed Regexps:: Using Dynamic Regexps.
+* Records:: Controlling how data is split into records.
+* Fields:: An introduction to fields.
+* Nonconstant Fields:: Nonconstant Field Numbers.
+* Changing Fields:: Changing the Contents of a Field.
+* Field Separators:: The field separator and how to change it.
+* Default Field Splitting:: How fields are normally separated.
+* Regexp Field Splitting:: Using regexps as the field separator.
+* Single Character Fields:: Making each character a separate field.
+* Command Line Field Separator:: Setting `FS' from the command-line.
+* Field Splitting Summary:: Some final points and a summary table.
+* Constant Size:: Reading constant width data.
+* Splitting By Content:: Defining Fields By Content
+* Multiple Line:: Reading multi-line records.
+* Getline:: Reading files under explicit program
+ control using the `getline' function.
+* Plain Getline:: Using `getline' with no arguments.
+* Getline/Variable:: Using `getline' into a variable.
+* Getline/File:: Using `getline' from a file.
+* Getline/Variable/File:: Using `getline' into a variable from a
+ file.
+* Getline/Pipe:: Using `getline' from a pipe.
+* Getline/Variable/Pipe:: Using `getline' into a variable from a
+ pipe.
+* Getline/Coprocess:: Using `getline' from a coprocess.
+* Getline/Variable/Coprocess:: Using `getline' into a variable from a
+ coprocess.
+* Getline Notes:: Important things to know about
+ `getline'.
+* Getline Summary:: Summary of `getline' Variants.
+* Command line directories:: What happens if you put a directory on the
+ command line.
+* Print:: The `print' statement.
+* Print Examples:: Simple examples of `print' statements.
+* Output Separators:: The output separators and how to change
+ them.
+* OFMT:: Controlling Numeric Output With
+ `print'.
+* Printf:: The `printf' statement.
+* Basic Printf:: Syntax of the `printf' statement.
+* Control Letters:: Format-control letters.
+* Format Modifiers:: Format-specification modifiers.
+* Printf Examples:: Several examples.
+* Redirection:: How to redirect output to multiple files
+ and pipes.
+* Special Files:: File name interpretation in `gawk'.
+ `gawk' allows access to inherited
+ file descriptors.
+* Special FD:: Special files for I/O.
+* Special Network:: Special files for network communications.
+* Special Caveats:: Things to watch out for.
+* Close Files And Pipes:: Closing Input and Output Files and Pipes.
+* Values:: Constants, Variables, and Regular
+ Expressions.
+* Constants:: String, numeric and regexp constants.
+* Scalar Constants:: Numeric and string constants.
+* Nondecimal-numbers:: What are octal and hex numbers.
+* Regexp Constants:: Regular Expression constants.
+* Using Constant Regexps:: When and how to use a regexp constant.
+* Variables:: Variables give names to values for later
+ use.
+* Using Variables:: Using variables in your programs.
+* Assignment Options:: Setting variables on the command-line and a
+ summary of command-line syntax. This is an
+ advanced method of input.
+* Conversion:: The conversion of strings to numbers and
+ vice versa.
+* All Operators:: `gawk''s operators.
+* Arithmetic Ops:: Arithmetic operations (`+', `-',
+ etc.)
+* Concatenation:: Concatenating strings.
+* Assignment Ops:: Changing the value of a variable or a
+ field.
+* Increment Ops:: Incrementing the numeric value of a
+ variable.
+* Truth Values and Conditions:: Testing for true and false.
+* Truth Values:: What is ``true'' and what is ``false''.
+* Typing and Comparison:: How variables acquire types and how this
+ affects comparison of numbers and strings
+ with `<', etc.
+* Variable Typing:: String type versus numeric type.
+* Comparison Operators:: The comparison operators.
+* POSIX String Comparison:: String comparison with POSIX rules.
+* Boolean Ops:: Combining comparison expressions using
+ boolean operators `||' (``or''),
+ `&&' (``and'') and `!' (``not'').
+* Conditional Exp:: Conditional expressions select between two
+ subexpressions under control of a third
+ subexpression.
+* Function Calls:: A function call is an expression.
+* Precedence:: How various operators nest.
+* Locales:: How the locale affects things.
+* Pattern Overview:: What goes into a pattern.
+* Regexp Patterns:: Using regexps as patterns.
+* Expression Patterns:: Any expression can be used as a pattern.
+* Ranges:: Pairs of patterns specify record ranges.
+* BEGIN/END:: Specifying initialization and cleanup
+ rules.
+* Using BEGIN/END:: How and why to use BEGIN/END rules.
+* I/O And BEGIN/END:: I/O issues in BEGIN/END rules.
+* BEGINFILE/ENDFILE:: Two special patterns for advanced control.
+* Empty:: The empty pattern, which matches every
+ record.
+* Using Shell Variables:: How to use shell variables with
+ `awk'.
+* Action Overview:: What goes into an action.
+* Statements:: Describes the various control statements in
+ detail.
+* If Statement:: Conditionally execute some `awk'
+ statements.
+* While Statement:: Loop until some condition is satisfied.
+* Do Statement:: Do specified action while looping until
+ some condition is satisfied.
+* For Statement:: Another looping statement, that provides
+ initialization and increment clauses.
+* Switch Statement:: Switch/case evaluation for conditional
+ execution of statements based on a value.
+* Break Statement:: Immediately exit the innermost enclosing
+ loop.
+* Continue Statement:: Skip to the end of the innermost enclosing
+ loop.
+* Next Statement:: Stop processing the current input record.
+* Nextfile Statement:: Stop processing the current file.
+* Exit Statement:: Stop execution of `awk'.
+* Built-in Variables:: Summarizes the built-in variables.
+* User-modified:: Built-in variables that you change to
+ control `awk'.
+* Auto-set:: Built-in variables where `awk'
+ gives you information.
+* ARGC and ARGV:: Ways to use `ARGC' and `ARGV'.
+* Array Basics:: The basics of arrays.
+* Array Intro:: Introduction to Arrays
+* Reference to Elements:: How to examine one element of an array.
+* Assigning Elements:: How to change an element of an array.
+* Array Example:: Basic Example of an Array
+* Scanning an Array:: A variation of the `for' statement. It
+ loops through the indices of an array's
+ existing elements.
+* Controlling Scanning:: Controlling the order in which arrays are
+ scanned.
+* Delete:: The `delete' statement removes an
+ element from an array.
+* Numeric Array Subscripts:: How to use numbers as subscripts in
+ `awk'.
+* Uninitialized Subscripts:: Using Uninitialized variables as
+ subscripts.
+* Multi-dimensional:: Emulating multidimensional arrays in
+ `awk'.
+* Multi-scanning:: Scanning multidimensional arrays.
+* Arrays of Arrays:: True multidimensional arrays.
+* Built-in:: Summarizes the built-in functions.
+* Calling Built-in:: How to call built-in functions.
+* Numeric Functions:: Functions that work with numbers, including
+ `int()', `sin()' and
+ `rand()'.
+* String Functions:: Functions for string manipulation, such as
+ `split()', `match()' and
+ `sprintf()'.
+* Gory Details:: More than you want to know about `\'
+ and `&' with `sub()',
+ `gsub()', and `gensub()'.
+* I/O Functions:: Functions for files and shell commands.
+* Time Functions:: Functions for dealing with timestamps.
+* Bitwise Functions:: Functions for bitwise operations.
+* Type Functions:: Functions for type information.
+* I18N Functions:: Functions for string translation.
+* User-defined:: Describes User-defined functions in detail.
+* Definition Syntax:: How to write definitions and what they
+ mean.
+* Function Example:: An example function definition and what it
+ does.
+* Function Caveats:: Things to watch out for.
+* Calling A Function:: Don't use spaces.
+* Variable Scope:: Controlling variable scope.
+* Pass By Value/Reference:: Passing parameters.
+* Return Statement:: Specifying the value a function returns.
+* Dynamic Typing:: How variable types can change at runtime.
+* Indirect Calls:: Choosing the function to call at runtime.
+* I18N and L10N:: Internationalization and Localization.
+* Explaining gettext:: How GNU `gettext' works.
+* Programmer i18n:: Features for the programmer.
+* Translator i18n:: Features for the translator.
+* String Extraction:: Extracting marked strings.
+* Printf Ordering:: Rearranging `printf' arguments.
+* I18N Portability:: `awk'-level portability issues.
+* I18N Example:: A simple i18n example.
+* Gawk I18N:: `gawk' is also internationalized.
+* Nondecimal Data:: Allowing nondecimal input data.
+* Array Sorting:: Facilities for controlling array traversal
+ and sorting arrays.
+* Controlling Array Traversal:: How to use PROCINFO["sorted_in"].
+* Array Sorting Functions:: How to use `asort()' and
+ `asorti()'.
+* Two-way I/O:: Two-way communications with another
+ process.
+* TCP/IP Networking:: Using `gawk' for network
+ programming.
+* Profiling:: Profiling your `awk' programs.
+* Library Names:: How to best name private global variables
+ in library functions.
+* General Functions:: Functions that are of general use.
+* Strtonum Function:: A replacement for the built-in
+ `strtonum()' function.
+* Assert Function:: A function for assertions in `awk'
+ programs.
+* Round Function:: A function for rounding if `sprintf()'
+ does not do it correctly.
+* Cliff Random Function:: The Cliff Random Number Generator.
+* Ordinal Functions:: Functions for using characters as numbers
+ and vice versa.
+* Join Function:: A function to join an array into a string.
+* Gettimeofday Function:: A function to get formatted times.
+* Data File Management:: Functions for managing command-line data
+ files.
+* Filetrans Function:: A function for handling data file
+ transitions.
+* Rewind Function:: A function for rereading the current file.
+* File Checking:: Checking that data files are readable.
+* Empty Files:: Checking for zero-length files.
+* Ignoring Assigns:: Treating assignments as file names.
+* Getopt Function:: A function for processing command-line
+ arguments.
+* Passwd Functions:: Functions for getting user information.
+* Group Functions:: Functions for getting group information.
+* Walking Arrays:: A function to walk arrays of arrays.
+* Running Examples:: How to run these examples.
+* Clones:: Clones of common utilities.
+* Cut Program:: The `cut' utility.
+* Egrep Program:: The `egrep' utility.
+* Id Program:: The `id' utility.
+* Split Program:: The `split' utility.
+* Tee Program:: The `tee' utility.
+* Uniq Program:: The `uniq' utility.
+* Wc Program:: The `wc' utility.
+* Miscellaneous Programs:: Some interesting `awk' programs.
+* Dupword Program:: Finding duplicated words in a document.
+* Alarm Program:: An alarm clock.
+* Translate Program:: A program similar to the `tr'
+ utility.
+* Labels Program:: Printing mailing labels.
+* Word Sorting:: A program to produce a word usage count.
+* History Sorting:: Eliminating duplicate entries from a
+ history file.
+* Extract Program:: Pulling out programs from Texinfo source
+ files.
+* Simple Sed:: A Simple Stream Editor.
+* Igawk Program:: A wrapper for `awk' that includes
+ files.
+* Anagram Program:: Finding anagrams from a dictionary.
+* Signature Program:: People do amazing things with too much time
+ on their hands.
+* Debugging:: Introduction to `dgawk'.
+* Debugging Concepts:: Debugging In General.
+* Debugging Terms:: Additional Debugging Concepts.
+* Awk Debugging:: Awk Debugging.
+* Sample dgawk session:: Sample `dgawk' session.
+* dgawk invocation:: `dgawk' Invocation.
+* Finding The Bug:: Finding The Bug.
+* List of Debugger Commands:: Main `dgawk' Commands.
+* Breakpoint Control:: Control of breakpoints.
+* Dgawk Execution Control:: Control of execution.
+* Viewing And Changing Data:: Viewing and changing data.
+* Dgawk Stack:: Dealing with the stack.
+* Dgawk Info:: Obtaining information about the program and
+ the debugger state.
+* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Readline Support:: Readline Support.
+* Dgawk Limitations:: Limitations and future plans.
+* V7/SVR3.1:: The major changes between V7 and System V
+ Release 3.1.
+* SVR4:: Minor changes between System V Releases 3.1
+ and 4.
+* POSIX:: New features from the POSIX standard.
+* BTL:: New features from Brian Kernighan's version
+ of `awk'.
+* POSIX/GNU:: The extensions in `gawk' not in
+ POSIX `awk'.
+* Common Extensions:: Common Extensions Summary.
+* Ranges and Locales:: How locales used to affect regexp ranges.
+* Contributors:: The major contributors to `gawk'.
+* Gawk Distribution:: What is in the `gawk' distribution.
+* Getting:: How to get the distribution.
+* Extracting:: How to extract the distribution.
+* Distribution contents:: What is in the distribution.
+* Unix Installation:: Installing `gawk' under various
+ versions of Unix.
+* Quick Installation:: Compiling `gawk' under Unix.
+* Additional Configuration Options:: Other compile-time options.
+* Configuration Philosophy:: How it's all supposed to work.
+* Non-Unix Installation:: Installation on Other Operating Systems.
+* PC Installation:: Installing and Compiling `gawk' on
+ MS-DOS and OS/2.
+* PC Binary Installation:: Installing a prepared distribution.
+* PC Compiling:: Compiling `gawk' for MS-DOS,
+ Windows32, and OS/2.
+* PC Testing:: Testing `gawk' on PC systems.
+* PC Using:: Running `gawk' on MS-DOS, Windows32
+ and OS/2.
+* Cygwin:: Building and running `gawk' for
+ Cygwin.
+* MSYS:: Using `gawk' In The MSYS
+ Environment.
+* VMS Installation:: Installing `gawk' on VMS.
+* VMS Compilation:: How to compile `gawk' under VMS.
+* VMS Installation Details:: How to install `gawk' under VMS.
+* VMS Running:: How to run `gawk' under VMS.
+* VMS Old Gawk:: An old version comes with some VMS systems.
+* Bugs:: Reporting Problems and Bugs.
+* Other Versions:: Other freely available `awk'
+ implementations.
+* Compatibility Mode:: How to disable certain `gawk'
+ extensions.
+* Additions:: Making Additions To `gawk'.
+* Accessing The Source:: Accessing the Git repository.
+* Adding Code:: Adding code to the main body of
+ `gawk'.
+* New Ports:: Porting `gawk' to a new operating
+ system.
+* Dynamic Extensions:: Adding new built-in functions to
+ `gawk'.
+* Internals:: A brief look at some `gawk'
+ internals.
+* Plugin License:: A note about licensing.
+* Sample Library:: A example of new functions.
+* Internal File Description:: What the new functions will do.
+* Internal File Ops:: The code for internal file operations.
+* Using Internal File Ops:: How to use an external extension.
+* Future Extensions:: New features that may be implemented one
+ day.
+* Basic High Level:: The high level view.
+* Basic Data Typing:: A very quick intro to data types.
+* Floating Point Issues:: Stuff to know about floating-point numbers.
+* String Conversion Precision:: The String Value Can Lie.
+* Unexpected Results:: Floating Point Numbers Are Not Abstract
+ Numbers.
+* POSIX Floating Point Problems:: Standards Versus Existing Practice.
To Miriam, for making me complete.
@@ -781,7 +741,7 @@ A Rose by Any Other Name
========================
The `awk' language has evolved over the years. Full details are
-provided in *Note Language History::. The language described in this
+provided in *note Language History::. The language described in this
Info file is often referred to as "new `awk'" (`nawk').
Because of this, there are systems with multiple versions of `awk'.
@@ -842,78 +802,78 @@ illustrates the concept currently being described.
While this Info file is aimed principally at people who have not been
exposed to `awk', there is a lot of information here that even the `awk'
expert should find useful. In particular, the description of POSIX
-`awk' and the example programs in *Note Library Functions::, and in
-*Note Sample Programs::, should be of interest.
+`awk' and the example programs in *note Library Functions::, and in
+*note Sample Programs::, should be of interest.
- *Note Getting Started::, provides the essentials you need to know to
+ *note Getting Started::, provides the essentials you need to know to
begin using `awk'.
- *Note Invoking Gawk::, describes how to run `gawk', the meaning of
+ *note Invoking Gawk::, describes how to run `gawk', the meaning of
its command-line options, and how it finds `awk' program source files.
- *Note Regexp::, introduces regular expressions in general, and in
+ *note Regexp::, introduces regular expressions in general, and in
particular the flavors supported by POSIX `awk' and `gawk'.
- *Note Reading Files::, describes how `awk' reads your data. It
+ *note Reading Files::, describes how `awk' reads your data. It
introduces the concepts of records and fields, as well as the `getline'
command. I/O redirection is first described here. Network I/O is also
briefly introduced here.
- *Note Printing::, describes how `awk' programs can produce output
+ *note Printing::, describes how `awk' programs can produce output
with `print' and `printf'.
- *Note Expressions::, describes expressions, which are the basic
+ *note Expressions::, describes expressions, which are the basic
building blocks for getting most things done in a program.
- *Note Patterns and Actions::, describes how to write patterns for
+ *note Patterns and Actions::, describes how to write patterns for
matching records, actions for doing something when a record is matched,
and the built-in variables `awk' and `gawk' use.
- *Note Arrays::, covers `awk''s one-and-only data structure:
+ *note Arrays::, covers `awk''s one-and-only data structure:
associative arrays. Deleting array elements and whole arrays is also
described, as well as sorting arrays in `gawk'. It also describes how
`gawk' provides arrays of arrays.
- *Note Functions::, describes the built-in functions `awk' and `gawk'
+ *note Functions::, describes the built-in functions `awk' and `gawk'
provide, as well as how to define your own functions.
- *Note Internationalization::, describes special features in `gawk'
+ *note Internationalization::, describes special features in `gawk'
for translating program messages into different languages at runtime.
- *Note Advanced Features::, describes a number of `gawk'-specific
+ *note Advanced Features::, describes a number of `gawk'-specific
advanced features. Of particular note are the abilities to have
two-way communications with another process, perform TCP/IP networking,
and profile your `awk' programs.
- *Note Library Functions::, and *Note Sample Programs::, provide many
+ *note Library Functions::, and *note Sample Programs::, provide many
sample `awk' programs. Reading them allows you to see `awk' solving
real problems.
- *Note Debugger::, describes the `awk' debugger, `dgawk'.
+ *note Debugger::, describes the `awk' debugger, `dgawk'.
- *Note Language History::, describes how the `awk' language has
+ *note Language History::, describes how the `awk' language has
evolved since its first release to present. It also describes how
`gawk' has acquired features over time.
- *Note Installation::, describes how to get `gawk', how to compile it
+ *note Installation::, describes how to get `gawk', how to compile it
on POSIX-compatible systems, and how to compile and use it on different
non-POSIX systems. It also describes how to report bugs in `gawk' and
where to get other freely available `awk' implementations.
- *Note Notes::, describes how to disable `gawk''s extensions, as well
+ *note Notes::, describes how to disable `gawk''s extensions, as well
as how to contribute new code to `gawk', how to write extension
libraries, and some possible future directions for `gawk' development.
- *Note Basic Concepts::, provides some very cursory background
+ *note Basic Concepts::, provides some very cursory background
material for those who are completely unfamiliar with computer
programming. Also centralized there is a discussion of some of the
issues surrounding floating-point numbers.
- The *Note Glossary::, defines most, if not all, the significant
+ The *note Glossary::, defines most, if not all, the significant
terms used throughout the book. If you find terms that you aren't
familiar with, try looking them up here.
- *Note Copying::, and *Note GNU Free Documentation License::, present
+ *note Copying::, and *note GNU Free Documentation License::, present
the licenses that cover the `gawk' source code and this Info file,
respectively.
@@ -1029,7 +989,7 @@ Guide'.
This edition maintains the basic structure of the previous editions.
For Edition 4.0, the content has been thoroughly reviewed and updated.
All references to versions prior to 4.0 have been removed. Of
-significant note for this edition is *Note Debugger::.
+significant note for this edition is *note Debugger::.
`GAWK: Effective AWK Programming' will undoubtedly continue to
evolve. An electronic version comes with the `gawk' distribution from
@@ -1041,7 +1001,7 @@ electronically.
(1) GNU stands for "GNU's not Unix."
- (2) The terminology "GNU/Linux" is explained in the *Note Glossary::.
+ (2) The terminology "GNU/Linux" is explained in the *note Glossary::.

File: gawk.info, Node: How To Contribute, Next: Acknowledgments, Prev: Manual History, Up: Preface
@@ -1143,7 +1103,7 @@ this team of fine people.
byte-code interpreter, including the debugger. Stephen Davies
contributed to the effort to bring the byte-code changes into the
mainstream code base. Efraim Yawitz contributed the initial text of
-*Note Debugger::.
+*note Debugger::.
I would like to thank Brian Kernighan for invaluable assistance
during the testing and debugging of `gawk', and for ongoing help and
@@ -1277,7 +1237,7 @@ programs from shell scripts, because it avoids the need for a separate
file for the `awk' program. A self-contained shell script is more
reliable because there are no other files to misplace.
- *Note Very Simple::, presents several short, self-contained programs.
+ *note Very Simple::, presents several short, self-contained programs.

File: gawk.info, Node: Read Terminal, Next: Long, Prev: One-shot, Up: Running gawk
@@ -1462,7 +1422,7 @@ programs, but this usually isn't very useful; the purpose of a comment
is to help you or another person understand the program when reading it
at a later time.
- CAUTION: As mentioned in *Note One-shot::, you can enclose small
+ CAUTION: As mentioned in *note One-shot::, you can enclose small
to medium programs in single quotes, in order to keep your shell
scripts self-contained. When doing so, _don't_ put an apostrophe
(i.e., a single quote) into a comment (or anywhere else in your
@@ -1524,7 +1484,7 @@ Shell). If you use the C shell, you're on your own.
quotes. The shell does no interpretation of the quoted text,
passing it on verbatim to the command. It is _impossible_ to
embed a single quote inside single-quoted text. Refer back to
- *Note Comments::, for an example of what happens if you try.
+ *note Comments::, for an example of what happens if you try.
* Double quotes protect most things between the opening and closing
quotes. The shell does at least variable and command substitution
@@ -1536,7 +1496,7 @@ Shell). If you use the C shell, you're on your own.
the characters `$', ``', `\', and `"', all of which must be
preceded by a backslash within double-quoted text if they are to
be passed on literally to the program. (The leading backslash is
- stripped first.) Thus, the example seen in *Note Read Terminal::,
+ stripped first.) Thus, the example seen in *note Read Terminal::,
is applicable:
$ awk "BEGIN { print \"Don't Panic!\" }"
@@ -1691,7 +1651,7 @@ Miscellaneous File Operations: (emacs)Misc File Ops, for more
information). Using this information, create your own `BBS-list' and
`inventory-shipped' files and practice what you learn in this Info file.
- If you are using the stand-alone version of Info, see *Note Extract
+ If you are using the stand-alone version of Info, see *note Extract
Program::, for an `awk' program that extracts these data files from
`gawk.texi', the Texinfo source file for this Info file.
@@ -2033,7 +1993,7 @@ minor node could also be written this way:
---------- Footnotes ----------
(1) The `?' and `:' referred to here is the three-operand
-conditional expression described in *Note Conditional Exp::. Splitting
+conditional expression described in *note Conditional Exp::. Splitting
lines after `?' and `:' is a minor `gawk' extension; if `--posix' is
specified (*note Options::), then this extension is disabled.
@@ -2056,7 +2016,7 @@ determining the type of a variable, and array sorting.
As we develop our presentation of the `awk' language, we introduce
most of the variables and many of the functions. They are described
-systematically in *Note Built-in Variables::, and *Note Built-in::.
+systematically in *note Built-in Variables::, and *note Built-in::.

File: gawk.info, Node: When, Prev: Other Features, Up: Getting Started
@@ -2214,7 +2174,7 @@ The following list describes options mandated by the POSIX standard:
This is useful if you have file names that start with `-', or in
shell scripts, if you have file names that will be specified by
the user that could start with `-'. It is also useful for passing
- options on to the `awk' program; see *Note Getopt Function::.
+ options on to the `awk' program; see *note Getopt Function::.
The following list describes `gawk'-specific options:
@@ -2233,7 +2193,7 @@ The following list describes options mandated by the POSIX standard:
Specify "compatibility mode", in which the GNU extensions to the
`awk' language are disabled, so that `gawk' behaves just like
Brian Kernighan's version `awk'. *Note POSIX/GNU::, which
- summarizes the extensions. Also see *Note Compatibility Mode::.
+ summarizes the extensions. Also see *note Compatibility Mode::.
`-C'
`--copyright'
@@ -2421,7 +2381,7 @@ if they had been concatenated together into one big file. This is
useful for creating libraries of `awk' functions. These functions can
be written once and then retrieved from a standard place, instead of
having to be included into each individual program. (As mentioned in
-*Note Definition Syntax::, function names must be unique.)
+*note Definition Syntax::, function names must be unique.)
With standard `awk', library functions can still be used, even if
the program is entered at the terminal, by specifying `-f /dev/tty'.
@@ -2479,7 +2439,7 @@ File: gawk.info, Node: Other Arguments, Next: Naming Standard Input, Prev: Op
Any additional arguments on the command line are normally treated as
input files to be processed in the order specified. However, an
argument that has the form `VAR=VALUE', assigns the value VALUE to the
-variable VAR--it does not specify a file at all. (See *Note Assignment
+variable VAR--it does not specify a file at all. (See *note Assignment
Options::.)
All these arguments are made available to your `awk' program in the
@@ -2795,7 +2755,7 @@ reducing the need for writing complex and tedious command lines. In
particular, `@include' is very useful for writing CGI scripts to be run
from web pages.
- As mentioned in *Note AWKPATH Variable::, the current directory is
+ As mentioned in *note AWKPATH Variable::, the current directory is
always searched first for source files, before searching in `AWKPATH',
and this also applies to files named with `@include'.
@@ -2813,7 +2773,7 @@ they will _not_ be in the next release).
The process-related special files `/dev/pid', `/dev/ppid',
`/dev/pgrpid', and `/dev/user' were deprecated in `gawk' 3.1, but still
worked. As of version 4.0, they are no longer interpreted specially by
-`gawk'. (Use `PROCINFO' instead; see *Note Auto-set::.)
+`gawk'. (Use `PROCINFO' instead; see *note Auto-set::.)

File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk
@@ -3006,7 +2966,7 @@ with a backslash have special meaning in regexps. *Note GNU Regexp
Operators::.
In a regexp, a backslash before any character that is not in the
-previous list and not listed in *Note GNU Regexp Operators::, means
+previous list and not listed in *note GNU Regexp Operators::, means
that the next character should be taken literally, even if it would
normally be a regexp operator. For example, `/a\+b/' matches the three
characters `a+b'.
@@ -3021,7 +2981,7 @@ character not shown in the previous list.
early, as soon as `awk' reads your program.
* `gawk' processes both regexp constants and dynamic regexps (*note
- Computed Regexps::), for the special operators listed in *Note GNU
+ Computed Regexps::), for the special operators listed in *note GNU
Regexp Operators::.
* A backslash before any other character means to treat that
@@ -3050,7 +3010,7 @@ Advanced Notes: Escape Sequences for Metacharacters
---------------------------------------------------
Suppose you use an octal or hexadecimal escape to represent a regexp
-metacharacter. (See *Note Regexp Operators::.) Does `awk' treat the
+metacharacter. (See *note Regexp Operators::.) Does `awk' treat the
character as a literal character or as a regexp operator?
Historically, such characters were taken literally. (d.c.)
@@ -3070,7 +3030,7 @@ You can combine regular expressions with special characters, called
"regular expression operators" or "metacharacters", to increase the
power and versatility of regular expressions.
- The escape sequences described in *Note Escape Sequences::, are
+ The escape sequences described in *note Escape Sequences::, are
valid inside a regexp. They are introduced by a `\' and are recognized
and converted into corresponding real characters as the very first step
in processing regexps.
@@ -3120,7 +3080,7 @@ sequences and that are not listed in the table stand for themselves:
the characters that are enclosed in the square brackets. For
example, `[MVX]' matches any one of the characters `M', `V', or
`X' in a string. A full discussion of what can be inside the
- square brackets of a bracket expression is given in *Note Bracket
+ square brackets of a bracket expression is given in *note Bracket
Expressions::.
`[^ ...]'
@@ -3247,7 +3207,7 @@ those listed between the opening and closing square brackets.
characters separated by a hyphen. It matches any single character that
sorts between the two characters, based upon the system's native
character set. For example, `[0-9]' is equivalent to `[0123456789]'.
-(See *Note Ranges and Locales::, for an explanation of how the POSIX
+(See *note Ranges and Locales::, for an explanation of how the POSIX
standard and `gawk' have changed over time. This is mainly of
historical interest.)
@@ -3273,7 +3233,7 @@ differs between the United States and France.
A character class is only valid in a regexp _inside_ the brackets of
a bracket expression. Character classes consist of `[:', a keyword
-denoting the class, and `:]'. *Note table-char-classes:: lists the
+denoting the class, and `:]'. *note table-char-classes:: lists the
character classes defined by the POSIX standard.
Class Meaning
@@ -3404,7 +3364,7 @@ GNU `\b' appears to be the lesser of two evils.
No options
In the default case, `gawk' provides all the facilities of POSIX
- regexps and the GNU regexp operators described in *Note Regexp
+ regexps and the GNU regexp operators described in *note Regexp
Operators::.
`--posix'
@@ -3955,7 +3915,7 @@ that the multiplication is done before the `$' operation; they are
necessary whenever there is a binary operator in the field-number
expression. This example, then, prints the hours of operation (the
fourth field) for every line of the file `BBS-list'. (All of the `awk'
-operators are listed, in order of decreasing precedence, in *Note
+operators are listed, in order of decreasing precedence, in *note
Precedence::.)
If the field number you compute is zero, you get the entire record.
@@ -3965,7 +3925,7 @@ not allowed; trying to reference one usually terminates the program.
negative field number. `gawk' notices this and terminates your
program. Other `awk' implementations may behave differently.)
- As mentioned in *Note Fields::, `awk' stores the current record's
+ As mentioned in *note Fields::, `awk' stores the current record's
number of fields in the built-in variable `NF' (also *note Built-in
Variables::). The expression `$NF' is not a special feature--it is the
direct consequence of evaluating `NF' and using its value as a field
@@ -4096,8 +4056,8 @@ rebuild the entire record, using the current value of the fields and
$1 = $1 # force record to be reconstituted
print $0 # or whatever else with $0
-This forces `awk' rebuild the record. It does help to add a comment,
-as we've shown here.
+This forces `awk' to rebuild the record. It does help to add a
+comment, as we've shown here.
There is a flip side to the relationship between `$0' and the
fields. Any assignment to `$0' causes the record to be reparsed into
@@ -5226,7 +5186,7 @@ in mind:
probably by accident, and you should reconsider what it is you're
trying to accomplish.
- * *Note Getline Summary::, presents a table summarizing the
+ * *note Getline Summary::, presents a table summarizing the
`getline' variants and which variables they can affect. It is
worth noting that those variants which do not use redirection can
cause `FILENAME' to be updated if they cause `awk' to start
@@ -5238,7 +5198,7 @@ File: gawk.info, Node: Getline Summary, Prev: Getline Notes, Up: Getline
4.9.10 Summary of `getline' Variants
------------------------------------
-*Note table-getline-variants:: summarizes the eight variants of
+*note table-getline-variants:: summarizes the eight variants of
`getline', listing which built-in variables are set by each one, and
whether the variant is standard or a `gawk' extension.
@@ -5286,7 +5246,7 @@ and the `printf' statement for fancier formatting. The `print'
statement is not limited when computing _which_ values to print.
However, with two exceptions, you cannot specify _how_ to print
them--how many columns, whether to use exponential notation or not, and
-so on. (For the exceptions, *note Output Separators::, and *Note
+so on. (For the exceptions, *note Output Separators::, and *note
OFMT::.) For printing with specifications, you need the `printf'
statement (*note Printf::).
@@ -5473,7 +5433,7 @@ that string. `awk' uses the `sprintf()' function to do this conversion
`sprintf()' function accepts a "format specification" that tells it how
to format numbers (or strings), and that there are a number of
different ways in which numbers can be formatted. The different format
-specifications are discussed more fully in *Note Control Letters::.
+specifications are discussed more fully in *note Control Letters::.
The built-in variable `OFMT' contains the default format
specification that `print' uses with `sprintf()' when it wants to
@@ -5523,8 +5483,8 @@ A simple `printf' statement looks like this:
printf FORMAT, ITEM1, ITEM2, ...
The entire list of arguments may optionally be enclosed in parentheses.
-The parentheses are necessary if any of the item expressions use the
-`>' relational operator; otherwise, it can be confused with an output
+The parentheses are necessary if any of the item expressions use the `>'
+relational operator; otherwise, it can be confused with an output
redirection (*note Redirection::).
The difference between `printf' and `print' is the FORMAT argument.
@@ -5730,12 +5690,12 @@ which they may appear:
-| 1,234,567 Results in US English UTF locale
For more information about locales and internationalization issues,
- see *Note Locales::.
+ see *note Locales::.
NOTE: The `'' flag is a nice feature, but its use complicates
things: it becomes difficult to use it in command-line
programs. For information on appropriate quoting tricks, see
- *Note Quoting::.
+ *note Quoting::.
`WIDTH'
This is a number specifying the desired minimum width of a field.
@@ -5976,7 +5936,7 @@ work identically for `printf':
The message is built using string concatenation and saved in the
variable `m'. It's then sent down the pipeline to the `mail'
program. (The parentheses group the items to concatenate--see
- *Note Concatenation::.)
+ *note Concatenation::.)
The `close()' function is called here because it's a good idea to
close the pipe as soon as all the intended output has been sent to
@@ -6161,7 +6121,7 @@ essential pieces of information for making a networking connection.
These file names are used with the `|&' operator for communicating with
a coprocess (*note Two-way I/O::). This is an advanced feature,
mentioned here only for completeness. Full discussion is delayed until
-*Note TCP/IP Networking::.
+*note TCP/IP Networking::.

File: gawk.info, Node: Special Caveats, Prev: Special Network, Up: Special Files
@@ -6308,7 +6268,7 @@ to `close()'. As in any other call to `close()', the first argument is
the name of the command or special file used to start the coprocess.
The second argument should be a string, with either of the values
`"to"' or `"from"'. Case does not matter. As this is an advanced
-feature, a more complete discussion is delayed until *Note Two-way
+feature, a more complete discussion is delayed until *note Two-way
I/O::, which discusses it in more detail and gives an example.
Advanced Notes: Using `close()''s Return Value
@@ -6497,7 +6457,7 @@ option; *note Nondecimal Data::.) If you have octal or hexadecimal
data, you can use the `strtonum()' function (*note String Functions::)
to convert the data into a number. Most of the time, you will want to
use octal or hexadecimal constants when working with the built-in bit
-manipulation functions; see *Note Bitwise Functions::, for more
+manipulation functions; see *note Bitwise Functions::, for more
information.
Unlike some early C implementations, `8' and `9' are not valid in
@@ -6780,7 +6740,7 @@ your programs, just port `gawk' itself. *Note Print::, for more
information on the `print' statement.
And, once again, where you are can matter when it comes to converting
-between numbers and strings. In *Note Locales::, we mentioned that the
+between numbers and strings. In *note Locales::, we mentioned that the
local character set and language (the locale) can affect how `gawk'
matches characters. The locale also affects numeric formats. In
particular, for `awk' programs, it affects the decimal point character.
@@ -6821,7 +6781,7 @@ character. (`gawk' also uses the locale's decimal point character when
in POSIX mode, either via `--posix', or the `POSIXLY_CORRECT'
environment variable.)
- *Note table-locale-affects:: describes the cases in which the
+ *note table-locale-affects:: describes the cases in which the
locale's decimal point character is used and when a period is used.
Some of these features have not been described yet.
@@ -6837,7 +6797,7 @@ Table 6.1: Locale Decimal Point versus A Period
Finally, modern day formal standards and IEEE standard floating point
representation can have an unusual but important effect on the way
`gawk' converts some special string values to numbers. The details are
-presented in *Note POSIX Floating Point Problems::.
+presented in *note POSIX Floating Point Problems::.
---------- Footnotes ----------
@@ -7148,7 +7108,7 @@ righthand expression. For example:
The indices of `bar' are practically guaranteed to be different, because
`rand()' returns different values each time it is called. (Arrays and
the `rand()' function haven't been covered yet. *Note Arrays::, and
-see *Note Numeric Functions::, for more information). This example
+see *note Numeric Functions::, for more information). This example
illustrates an important fact about assignment operators: the lefthand
expression is only evaluated _once_. It is up to the implementation as
to which expression is evaluated first, the lefthand or the righthand.
@@ -7159,7 +7119,7 @@ Consider this example:
The value of `a[3]' could be either two or four.
- *Note table-assign-ops:: lists the arithmetic assignment operators.
+ *note table-assign-ops:: lists the arithmetic assignment operators.
In each case, the righthand operand is an expression whose value is
converted to a number.
@@ -7197,7 +7157,7 @@ A workaround is:
awk '/[=]=/' /dev/null
`gawk' does not have this problem, nor do the other freely available
-versions described in *Note Other Versions::.
+versions described in *note Other Versions::.

File: gawk.info, Node: Increment Ops, Prev: Assignment Ops, Up: All Operators
@@ -7462,7 +7422,7 @@ File: gawk.info, Node: Comparison Operators, Next: POSIX String Comparison, P
"Comparison expressions" compare strings or numbers for relationships
such as equality. They are written using "relational operators", which
-are a superset of those in C. *Note table-relational-ops:: describes
+are a superset of those in C. *note table-relational-ops:: describes
them.
Expression Result
@@ -7638,8 +7598,8 @@ Boolean operators are:
if ($0 ~ /2400/ || $0 ~ /foo/) print
The subexpression BOOLEAN2 is evaluated only if BOOLEAN1 is false.
- This can make a difference when BOOLEAN2 contains expressions
- that have side effects.
+ This can make a difference when BOOLEAN2 contains expressions that
+ have side effects.
`! BOOLEAN'
True if BOOLEAN is false. For example, the following program
@@ -7649,7 +7609,7 @@ Boolean operators are:
BEGIN { if (! ("HOME" in ENVIRON))
print "no home!" }
- (The `in' operator is described in *Note Reference to Elements::.)
+ (The `in' operator is described in *note Reference to Elements::.)
The `&&' and `||' operators are called "short-circuit" operators
because of the way they work. Evaluation of the full expression is
@@ -7679,7 +7639,7 @@ using `!'. The next rule prints lines as long as `interested' is true.
When a line is seen whose first field is `END', `interested' is toggled
back to false.(1)
- NOTE: The `next' statement is discussed in *Note Next Statement::.
+ NOTE: The `next' statement is discussed in *note Next Statement::.
`next' tells `awk' to skip the rest of the rules, get the next
record, and start processing the rules over again at the top. The
reason it's there is to avoid printing the bracketing `START' and
@@ -7782,7 +7742,7 @@ User-defined::).
As an advanced feature, `gawk' provides indirect function calls,
which is a way to choose the function to call at runtime, instead of
when you write the source code to your program. We defer discussion of
-this feature until later; see *Note Indirect Calls::.
+this feature until later; see *note Indirect Calls::.
Like every other expression, the function call has a value, which is
computed by the function based on the arguments you give it. In this
@@ -7942,12 +7902,12 @@ make several function calls, _per input character_, to find the record
terminator.
According to POSIX, string comparison is also affected by locales
-(similar to regular expressions). The details are presented in *Note
+(similar to regular expressions). The details are presented in *note
POSIX String Comparison::.
Finally, the locale affects the value of the decimal point character
used when `gawk' parses input data. This is discussed in detail in
-*Note Conversion::.
+*note Conversion::.

File: gawk.info, Node: Patterns and Actions, Next: Arrays, Prev: Expressions, Up: Top
@@ -8013,7 +7973,7 @@ summary of the types of `awk' patterns:
`BEGINFILE'
`ENDFILE'
- Special patterns for you to supply startup or cleanup actions to
+ Special patterns for you to supply startup or cleanup actions to be
done on a per file basis. (*Note BEGINFILE/ENDFILE::.)
`EMPTY'
@@ -8048,7 +8008,7 @@ otherwise, it depends on only what has happened so far in the execution
of the `awk' program.
Comparison expressions, using the comparison operators described in
-*Note Typing and Comparison::, are a very common kind of pattern.
+*note Typing and Comparison::, are a very common kind of pattern.
Regexp matching and nonmatching are also very common expressions. The
left operand of the `~' and `!~' operators is a string. The right
operand is either a constant regular expression enclosed in slashes
@@ -8114,7 +8074,7 @@ inside Boolean patterns. Likewise, the special patterns `BEGIN', `END',
expressions and cannot appear inside Boolean patterns.
The precedence of the different operators which can appear in
-patterns is described in *Note Precedence::.
+patterns is described in *note Precedence::.

File: gawk.info, Node: Ranges, Next: BEGIN/END, Prev: Expression Patterns, Up: Pattern Overview
@@ -8300,7 +8260,7 @@ explicitly.
`BEGIN' rule, because the implicit
read-a-record-and-match-against-the-rules loop has not started yet.
Similarly, those statements are not valid in an `END' rule, since all
-the input has been read. (*Note Next Statement::, and see *Note
+the input has been read. (*Note Next Statement::, and see *note
Nextfile Statement::.)

@@ -8839,7 +8799,7 @@ Statement::.)
}
The `break' statement is also used to break out of the `switch'
-statement. This is discussed in *Note Switch Statement::.
+statement. This is discussed in *note Switch Statement::.
The `break' statement has no meaning when used outside the body of a
loop or `switch'. However, although it was never documented,
@@ -8892,12 +8852,12 @@ the previous example with the following `while' loop:
This program loops forever once `x' reaches 5.
The `continue' statement has no special meaning with respect to the
-`switch' statement, nor does it any meaning when used outside the body
-of a loop. Historical versions of `awk' treated a `continue' statement
-outside a loop the same way they treated a `break' statement outside a
-loop: as if it were a `next' statement (*note Next Statement::).
-(d.c.) Recent versions of Brian Kernighan's `awk' no longer work this
-way, nor does `gawk'.
+`switch' statement, nor does it have any meaning when used outside the
+body of a loop. Historical versions of `awk' treated a `continue'
+statement outside a loop the same way they treated a `break' statement
+outside a loop: as if it were a `next' statement (*note Next
+Statement::). (d.c.) Recent versions of Brian Kernighan's `awk' no
+longer work this way, nor does `gawk'.

File: gawk.info, Node: Next Statement, Next: Nextfile Statement, Prev: Continue Statement, Up: Statements
@@ -8936,7 +8896,7 @@ beginning, in the following manner:
Because of the `next' statement, the program's subsequent rules won't
see the bad record. The error message is redirected to the standard
error output stream, as error messages should be. For more detail see
-*Note Special Files::.
+*note Special Files::.
If the `next' statement causes the end of the input to be reached,
then the code in any `END' rules is executed. *Note BEGIN/END::.
@@ -9107,7 +9067,7 @@ specific to `gawk' are marked with a pound sign (`#').
string value of `"rw"' or `"wr"' indicates that all files should
use binary I/O. Any other string value is treated the same as
`"rw"', but causes `gawk' to generate a warning message.
- `BINMODE' is described in more detail in *Note PC Using::.
+ `BINMODE' is described in more detail in *note PC Using::.
This variable is a `gawk' extension. In other `awk'
implementations (except `mawk', *note Other Versions::), or if
@@ -9411,7 +9371,7 @@ with a pound sign (`#').
If this element exists in `PROCINFO', its value controls the
order in which array indices will be processed by `for (index
in array) ...' loops. Since this is an advanced feature, we
- defer the full description until later; see *Note Scanning an
+ defer the full description until later; see *note Scanning an
Array::.
`PROCINFO["strftime"]'
@@ -9432,7 +9392,7 @@ with a pound sign (`#').
The `PROCINFO' array is also used to cause coprocesses to
communicate over pseudo-ttys instead of through two-way pipes;
- this is discussed further in *Note Two-way I/O::.
+ this is discussed further in *note Two-way I/O::.
This array is a `gawk' extension. In other `awk' implementations,
or if `gawk' is in compatibility mode (*note Options::), it is not
@@ -9494,7 +9454,7 @@ File: gawk.info, Node: ARGC and ARGV, Prev: Auto-set, Up: Built-in Variables
7.5.3 Using `ARGC' and `ARGV'
-----------------------------
-*Note Auto-set::, presented the following program describing the
+*note Auto-set::, presented the following program describing the
information contained in `ARGC' and `ARGV':
$ awk 'BEGIN {
@@ -9550,7 +9510,7 @@ elements from `ARGV' (*note Delete::).
All of these actions are typically done in the `BEGIN' rule, before
actual processing of the input begins. *Note Split Program::, and see
-*Note Tee Program::, for examples of each way of removing elements from
+*note Tee Program::, for examples of each way of removing elements from
`ARGV'. The following fragment processes `ARGV' in order to examine,
and then remove, command-line options:
@@ -9641,6 +9601,8 @@ one at a time, and traversing all of the elements in an array.
* Scanning an Array:: A variation of the `for' statement. It
loops through the indices of an array's
existing elements.
+* Controlling Scanning:: Controlling the order in which arrays are
+ scanned.

File: gawk.info, Node: Array Intro, Next: Reference to Elements, Up: Array Basics
@@ -9730,7 +9692,7 @@ from English to French:
Here we decided to translate the number one in both spelled-out and
numeric form--thus illustrating that a single array can have both
numbers and strings as indices. In fact, array subscripts are always
-strings; this is discussed in more detail in *Note Numeric Array
+strings; this is discussed in more detail in *note Numeric Array
Subscripts::. Here, the number `1' isn't double-quoted, since `awk'
automatically converts it to a string.
@@ -9873,7 +9835,7 @@ easy improvement to the program's `END' rule, as follows:
}

-File: gawk.info, Node: Scanning an Array, Prev: Array Example, Up: Array Basics
+File: gawk.info, Node: Scanning an Array, Next: Controlling Scanning, Prev: Array Example, Up: Array Basics
8.1.5 Scanning All Elements of an Array
---------------------------------------
@@ -9928,14 +9890,147 @@ statements in the loop body; it is not predictable whether the `for'
loop will reach them. Similarly, changing VAR inside the loop may
produce strange results. It is best to avoid such things.
- As an extension, `gawk' makes it possible for you to loop over the
-elements of an array in order, based on the value of
-`PROCINFO["sorted_in"]' (*note Auto-set::). This is an advanced
-feature, so discussion of it is delayed until *Note Controlling Array
-Traversal::.
+
+File: gawk.info, Node: Controlling Scanning, Prev: Scanning an Array, Up: Array Basics
+
+8.1.6 Using Predefined Array Scanning Orders
+--------------------------------------------
+
+By default, when a `for' loop traverses an array, the order is
+undefined, meaning that the `awk' implementation determines the order
+in which the array is traversed. This order is usually based on the
+internal implementation of arrays and will vary from one version of
+`awk' to the next.
+
+ Often, though, you may wish to do something simple, such as
+"traverse the array by comparing the indices in ascending order," or
+"traverse the array by on comparing the values in descending order."
+`gawk' provides two mechanisms which give you this control.
+
+ * Set `PROCINFO["sorted_in"]' to one of a set of predefined values.
+ We describe this now.
+
+ * Set `PROCINFO["sorted_in"]' to the name of a user-defined function
+ to be used for comparison of array elements. This advanced feature
+ is described later, in *note Array Sorting::.
+
+ The following special values for `PROCINFO["sorted_in"]' are
+available:
+
+`"@unsorted"'
+ Array elements are processed in arbitrary order, which is the
+ default `awk' behavior.
+
+`"@ind_str_asc"'
+ Order by indices compared as strings; this is the most basic sort.
+ (Internally, array indices are always strings, so with `a[2*5] = 1'
+ the index is `"10"' rather than numeric 10.)
+
+`"@ind_num_asc"'
+ Order by indices but force them to be treated as numbers in the
+ process. Any index with a non-numeric value will end up
+ positioned as if it were zero.
+
+`"@val_type_asc"'
+ Order by element values rather than indices. Ordering is by the
+ type assigned to the element (*note Typing and Comparison::). All
+ numeric values come before all string values, which in turn come
+ before all subarrays. (Subarrays have not been described yet;
+ *note Arrays of Arrays::).
+
+`"@val_str_asc"'
+ Order by element values rather than by indices. Scalar values are
+ compared as strings. Subarrays, if present, come out last.
+
+`"@val_num_asc"'
+ Order by element values rather than by indices. Scalar values are
+ compared as numbers. Subarrays, if present, come out last. When
+ numeric values are equal, the string values are used to provide an
+ ordering: this guarantees consistent results across different
+ versions of the C `qsort()' function,(1) which `gawk' uses
+ internally to perform the sorting.
+
+`"@ind_str_desc"'
+ Reverse order from the most basic sort.
+
+`"@ind_num_desc"'
+ Numeric indices ordered from high to low.
+
+`"@val_type_desc"'
+ Element values, based on type, in descending order.
+
+`"@val_str_desc"'
+ Element values, treated as strings, ordered from high to low.
+ Subarrays, if present, come out first.
+
+`"@val_num_desc"'
+ Element values, treated as numbers, ordered from high to low.
+ Subarrays, if present, come out first.
+
+ The array traversal order is determined before the `for' loop starts
+to run. Changing `PROCINFO["sorted_in"]' in the loop body will not
+affect the loop.
+
+ For example:
+
+ $ gawk 'BEGIN {
+ > a[4] = 4
+ > a[3] = 3
+ > for (i in a)
+ > print i, a[i]
+ > }'
+ -| 4 4
+ -| 3 3
+ $ gawk 'BEGIN {
+ > PROCINFO["sorted_in"] = "@ind_str_asc"
+ > a[4] = 4
+ > a[3] = 3
+ > for (i in a)
+ > print i, a[i]
+ > }'
+ -| 3 3
+ -| 4 4
+
+ When sorting an array by element values, if a value happens to be a
+subarray then it is considered to be greater than any string or numeric
+value, regardless of what the subarray itself contains, and all
+subarrays are treated as being equal to each other. Their order
+relative to each other is determined by their index strings.
+
+ Here are some additional things to bear in mind about sorted array
+traversal.
+
+ * The value of `PROCINFO["sorted_in"]' is global. That is, it affects
+ all array traversal `for' loops. If you need to change it within
+ your own code, you should see if it's defined and save and restore
+ the value:
+
+ ...
+ if ("sorted_in" in PROCINFO) {
+ save_sorted = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "@val_str_desc" # or whatever
+ }
+ ...
+ if (save_sorted)
+ PROCINFO["sorted_in"] = save_sorted
+
+ * As mentioned, the default array traversal order is represented by
+ `"@unsorted"'. You can also get the default behavior by assigning
+ the null string to `PROCINFO["sorted_in"]' or by just deleting the
+ `"sorted_in"' element from the `PROCINFO' array with the `delete'
+ statement. (The `delete' statement hasn't been described yet;
+ *note Delete::.)
In addition, `gawk' provides built-in functions for sorting arrays;
-see *Note Array Sorting Functions::.
+see *note Array Sorting Functions::.
+
+ ---------- Footnotes ----------
+
+ (1) When two elements compare as equal, the C `qsort()' function
+does not guarantee that they will maintain their original relative
+order after sorting. Using the string value to provide a unique
+ordering when the numeric values are equal ensures that `gawk' behaves
+consistently across different environments.

File: gawk.info, Node: Delete, Next: Numeric Array Subscripts, Prev: Array Basics, Up: Arrays
@@ -10203,7 +10298,7 @@ File: gawk.info, Node: Multi-scanning, Up: Multi-dimensional
--------------------------------------
There is no special `for' statement for scanning a "multidimensional"
-array. There cannot be one, because, in truth, there are no
+array. There cannot be one, because, in truth, `awk' does not have
multidimensional arrays or elements--there is only a multidimensional
_way of accessing_ an array.
@@ -10223,7 +10318,7 @@ in the array, and splits it into the individual indices by breaking it
apart where the value of `SUBSEP' appears. The individual indices then
become the elements of the array `separate'.
- Thus, if a value is previously stored in `array[1, "foo"]'; then an
+ Thus, if a value is previously stored in `array[1, "foo"]', then an
element with index `"1\034foo"' exists in `array'. (Recall that the
default value of `SUBSEP' is the character with code 034.) Sooner or
later, the `for' statement finds that index and does an iteration with
@@ -10242,8 +10337,9 @@ File: gawk.info, Node: Arrays of Arrays, Prev: Multi-dimensional, Up: Arrays
8.6 Arrays of Arrays
====================
-`gawk' supports arrays of arrays. Elements of a subarray are referred
-to by their own indices enclosed in square brackets, just like the
+`gawk' goes beyond standard `awk''s multidimensional array access and
+provides true arrays of arrays. Elements of a subarray are referred to
+by their own indices enclosed in square brackets, just like the
elements of the main array. For example, the following creates a
two-element subarray at index `1' of the main array `a':
@@ -10636,7 +10732,7 @@ pound sign (`#'):
asort(a, a, "descending")
- The `asort()' function is described in more detail in *Note Array
+ The `asort()' function is described in more detail in *note Array
Sorting Functions::. `asort()' is a `gawk' extension; it is not
available in compatibility mode (*note Options::).
@@ -10645,7 +10741,7 @@ pound sign (`#'):
similarly to `asort()', however, the _indices_ are sorted, instead
of the values. (Here too, `IGNORECASE' affects the sorting.)
- The `asorti()' function is described in more detail in *Note Array
+ The `asorti()' function is described in more detail in *note Array
Sorting Functions::. `asorti()' is a `gawk' extension; it is not
available in compatibility mode (*note Options::).
@@ -11128,7 +11224,7 @@ replacement string to determine what to generate.
At both levels, `awk' looks for a defined set of characters that can
come after a backslash. At the lexical level, it looks for the escape
-sequences listed in *Note Escape Sequences::. Thus, for every `\' that
+sequences listed in *note Escape Sequences::. Thus, for every `\' that
`awk' processes at the runtime level, you must type two backslashes at
the lexical level. When a character that is not valid for an escape
sequence follows the `\', Brian Kernighan's `awk' and `gawk' both
@@ -11141,7 +11237,7 @@ Historically, the `sub()' and `gsub()' functions treated the two
character sequence `\&' specially; this sequence was replaced in the
generated text with a single `&'. Any other `\' within the REPLACEMENT
string that did not precede an `&' was passed through unchanged. This
-is illustrated in *Note table-sub-escapes::.
+is illustrated in *note table-sub-escapes::.
You type `sub()' sees `sub()' generates
------- --------- --------------
@@ -11153,7 +11249,8 @@ is illustrated in *Note table-sub-escapes::.
`\\\\\\&' `\\\&' a literal `\\&'
`\\q' `\q' a literal `\q'
-Table 9.1: Historical Escape Sequence Processing for `sub()' and `gsub()'
+Table 9.1: Historical Escape Sequence Processing for `sub()' and
+`gsub()'
This table shows both the lexical-level processing, where an odd number
of backslashes becomes an even number at the runtime level, as well as
@@ -11168,7 +11265,7 @@ get a literal `\' followed by the matched text.
says that `sub()' and `gsub()' look for either a `\' or an `&' after
the `\'. If either one follows a `\', that character is output
literally. The interpretation of `\' and `&' then becomes as shown in
-*Note table-sub-posix-92::.
+*note table-sub-posix-92::.
You type `sub()' sees `sub()' generates
------- --------- --------------
@@ -11195,7 +11292,7 @@ problems:
submitted proposed text for a revised standard that reverts to rules
that correspond more closely to the original existing practice. The
proposed rules have special cases that make it possible to produce a
-`\' preceding the matched text. This is shown in *Note
+`\' preceding the matched text. This is shown in *note
table-sub-proposed::.
You type `sub()' sees `sub()' generates
@@ -11223,7 +11320,7 @@ except for one case.
The POSIX rules state that `\&' in the replacement string produces a
literal `&', `\\' produces a literal `\', and `\' followed by anything
else is not special; the `\' is placed straight into the output. These
-rules are presented in *Note table-posix-sub::.
+rules are presented in *note table-posix-sub::.
You type `sub()' sees `sub()' generates
------- --------- --------------
@@ -11254,7 +11351,7 @@ level, whenever `gawk' sees a `\', if the following character is a
digit, then the text that matched the corresponding parenthesized
subexpression is placed in the generated output. Otherwise, no matter
what character follows the `\', it appears in the generated text and
-the `\' does not, as shown in *Note table-gensub-escapes::.
+the `\' does not, as shown in *note table-gensub-escapes::.
You type `gensub()' sees `gensub()' generates
------- ------------ -----------------
@@ -11783,7 +11880,7 @@ supports all of the conversions listed here.
(5) If you don't understand any of this, don't worry about it; these
facilities are meant to make it easier to "internationalize" programs.
-Other internationalization features are described in *Note
+Other internationalization features are described in *note
Internationalization::.
(6) This is because ISO C leaves the behavior of the C version of
@@ -11803,7 +11900,7 @@ File: gawk.info, Node: Bitwise Functions, Next: Type Functions, Prev: Time Fu
Many languages provide the ability to perform "bitwise" operations
on two integer numbers. In other words, the operation is performed on
each successive pair of bits in the operands. Three common operations
-are bitwise AND, OR, and XOR. The operations are described in *Note
+are bitwise AND, OR, and XOR. The operations are described in *note
table-bitwise-ops::.
Bit Operator
@@ -12071,7 +12168,7 @@ act of a function calling itself is called "recursion".
All the built-in functions return a value to their caller.
User-defined functions can do also, using the `return' statement, which
-is described in detail in *Note Return Statement::. Many of the
+is described in detail in *note Return Statement::. Many of the
subsequent examples in this minor node use the `return' statement.
In many `awk' implementations, including `gawk', the keyword
@@ -13004,7 +13101,7 @@ internationalization:
`"LC_MESSAGES"'.
If you supply a value for CATEGORY, it must be a string equal to
- one of the known locale categories described in *Note Explaining
+ one of the known locale categories described in *note Explaining
gettext::. You must also supply a text domain. Use `TEXTDOMAIN'
if you want to use the current domain.
@@ -13036,7 +13133,7 @@ internationalization:
current binding for the given DOMAIN.
To use these facilities in your `awk' program, follow the steps
-outlined in *Note Explaining gettext::, like so:
+outlined in *note Explaining gettext::, like so:
1. Set the variable `TEXTDOMAIN' to the text domain of your program.
This is best done in a `BEGIN' rule (*note BEGIN/END::), or it can
@@ -13399,7 +13496,7 @@ full detail, along with the basics of TCP/IP networking. Finally,
`gawk' can "profile" an `awk' program, making it possible to tune it
for performance.
- *Note Dynamic Extensions::, discusses the ability to dynamically add
+ *note Dynamic Extensions::, discusses the ability to dynamically add
new built-in functions to `gawk'. As this feature is still immature
and likely to change, its description is relegated to an appendix.
@@ -13460,8 +13557,8 @@ File: gawk.info, Node: Array Sorting, Next: Two-way I/O, Prev: Nondecimal Dat
11.2 Controlling Array Traversal and Array Sorting
==================================================
-`gawk' lets you control the order in which `for (i in array)' loops
-will traverse an array.
+`gawk' lets you control the order in which a `for (i in array)' loop
+traverses an array.
In addition, two built-in functions, `asort()' and `asorti()', let
you sort arrays based on the array values and indices, respectively.
@@ -13485,24 +13582,17 @@ of arrays inside `awk'.
Often, though, it is desirable to be able to loop over the elements
in a particular order that you, the programmer, choose. `gawk' lets
-you do this; this node describes how.
-
-* Menu:
+you do this.
-* Controlling Scanning With A Function:: Using a function to control scanning.
-* Controlling Scanning:: Controlling the order in which arrays
- are scanned.
+ *note Controlling Scanning::, describes how you can assign special,
+pre-defined values to `PROCINFO["sorted_in"]' in order to control the
+order in which `gawk' will traverse an array during a `for' loop.
-
-File: gawk.info, Node: Controlling Scanning With A Function, Next: Controlling Scanning, Up: Controlling Array Traversal
-
-11.2.1.1 Array Scanning Using A User-defined Function
-.....................................................
-
-The value of `PROCINFO["sorted_in"]' can be a function name. This lets
-you traverse an array based on any custom criterion. The array
-elements are ordered according to the return value of this function.
-The comparison function should be defined with at least four arguments:
+ In addition, the value of `PROCINFO["sorted_in"]' can be a function
+name. This lets you traverse an array based on any custom criterion.
+The array elements are ordered according to the return value of this
+function. The comparison function should be defined with at least four
+arguments:
function comp_func(i1, v1, i2, v2)
{
@@ -13512,8 +13602,9 @@ The comparison function should be defined with at least four arguments:
Here, I1 and I2 are the indices, and V1 and V2 are the corresponding
values of the two elements being compared. Either V1 or V2, or both,
-can be arrays if the array being traversed contains subarrays as
-values. The three possible return values are interpreted this way:
+can be arrays if the array being traversed contains subarrays as values.
+(*Note Arrays of Arrays::, for more information about subarrays.) The
+three possible return values are interpreted as follows:
`comp_func(i1, v1, i2, v2) < 0'
Index I1 comes before index I2 during loop traversal.
@@ -13602,7 +13693,7 @@ of the previous functions:
-| data[10] = one
-| data[20] = two
-|
- -| Sort function: cmp_num_str_val Sort all numbers before all strings
+ -| Sort function: cmp_num_str_val Sort all numeric values before all strings
-| data[one] = 10
-| data[two] = 20
-| data[100] = 100
@@ -13610,7 +13701,7 @@ of the previous functions:
-| data[20] = two
Consider sorting the entries of a GNU/Linux system password file
-according to login names. The following program sorts records by a
+according to login name. The following program sorts records by a
specific field position and can be used for this purpose:
# sort.awk --- simple program to sort by field position
@@ -13639,10 +13730,9 @@ specific field position and can be used for this purpose:
}
The first field in each entry of the password file is the user's
-login name, and the fields are seperated by colons. Each record
-defines a subarray (*note Arrays of Arrays::), with each field as an
-element in the subarray. Running the program produces the following
-output:
+login name, and the fields are separated by colons. Each record
+defines a subarray, with each field as an element in the subarray.
+Running the program produces the following output:
$ gawk -vPOS=1 -F: -f sort.awk /etc/passwd
-| adm:x:3:4:adm:/var/adm:/sbin/nologin
@@ -13712,126 +13802,16 @@ time of `awk' programs. For this reason, sorted array traversal is not
the default.

-File: gawk.info, Node: Controlling Scanning, Prev: Controlling Scanning With A Function, Up: Controlling Array Traversal
-
-11.2.1.2 Controlling Array Scanning Order
-.........................................
-
-As described in *Note Controlling Scanning With A Function::, you can
-provide the name of a function as the value of `PROCINFO["sorted_in"]'
-to specify custom sorting criteria.
-
- Often, though, you may wish to do something simple, such as "sort
-based on comparing the indices in ascending order," or "sort based on
-comparing the values in descending order." Having to write a simple
-comparison function for this purpose for use in all of your programs
-becomes tedious. For the common simple cases, `gawk' provides the
-option of supplying special names that do the requested sorting for you.
-You can think of them as "predefined" sorting functions, if you like,
-although the names purposely include characters that are not valid in
-real `awk' function names.
-
- The following special values are available:
-
-`"@ind_str_asc"'
- Order by indices compared as strings; this is the most basic sort.
- (Internally, array indices are always strings, so with `a[2*5] = 1'
- the index is `"10"' rather than numeric 10.)
-
-`"@ind_num_asc"'
- Order by indices but force them to be treated as numbers in the
- process. Any index with a non-numeric value will end up
- positioned as if it were zero.
-
-`"@val_type_asc"'
- Order by element values rather than indices. Ordering is by the
- type assigned to the element (*note Typing and Comparison::). All
- numeric values come before all string values, which in turn come
- before all subarrays.
-
-`"@val_str_asc"'
- Order by element values rather than by indices. Scalar values are
- compared as strings. Subarrays, if present, come out last.
-
-`"@val_num_asc"'
- Order by element values rather than by indices. Scalar values are
- compared as numbers. Subarrays, if present, come out last. When
- numeric values are equal, the string values are used to provide an
- ordering: this guarantees consistent results across different
- versions of the C `qsort()' function.(1)
-
-`"@ind_str_desc"'
- Reverse order from the most basic sort.
-
-`"@ind_num_desc"'
- Numeric indices ordered from high to low.
-
-`"@val_type_desc"'
- Element values, based on type, in descending order.
-
-`"@val_str_desc"'
- Element values, treated as strings, ordered from high to low.
- Subarrays, if present, come out first.
-
-`"@val_num_desc"'
- Element values, treated as numbers, ordered from high to low.
- Subarrays, if present, come out first.
-
-`"@unsorted"'
- Array elements are processed in arbitrary order, which is the
- normal `awk' behavior. You can also get the normal behavior by just
- deleting the `"sorted_in"' element from the `PROCINFO' array, if
- it previously had a value assigned to it.
-
- The array traversal order is determined before the `for' loop starts
-to run. Changing `PROCINFO["sorted_in"]' in the loop body will not
-affect the loop.
-
- For example:
-
- $ gawk 'BEGIN {
- > a[4] = 4
- > a[3] = 3
- > for (i in a)
- > print i, a[i]
- > }'
- -| 4 4
- -| 3 3
- $ gawk 'BEGIN {
- > PROCINFO["sorted_in"] = "@ind_str_asc"
- > a[4] = 4
- > a[3] = 3
- > for (i in a)
- > print i, a[i]
- > }'
- -| 3 3
- -| 4 4
-
- When sorting an array by element values, if a value happens to be a
-subarray then it is considered to be greater than any string or numeric
-value, regardless of what the subarray itself contains, and all
-subarrays are treated as being equal to each other. Their order
-relative to each other is determined by their index strings.
-
- ---------- Footnotes ----------
-
- (1) When two elements compare as equal, the C `qsort()' function
-does not guarantee that they will maintain their original relative
-order after sorting. Using the string value to provide a unique
-ordering when the numeric values are equal ensures that `gawk' behaves
-consistently across different environments.
-
-
File: gawk.info, Node: Array Sorting Functions, Prev: Controlling Array Traversal, Up: Array Sorting
11.2.2 Sorting Array Values and Indices with `gawk'
---------------------------------------------------
In most `awk' implementations, sorting an array requires writing a
-`sort' function. While this can be educational for exploring different
-sorting algorithms, usually that's not the point of the program.
-`gawk' provides the built-in `asort()' and `asorti()' functions (*note
-String Functions::) for sorting arrays. For example:
+`sort()' function. While this can be educational for exploring
+different sorting algorithms, usually that's not the point of the
+program. `gawk' provides the built-in `asort()' and `asorti()'
+functions (*note String Functions::) for sorting arrays. For example:
POPULATE THE ARRAY data
n = asort(data)
@@ -13841,7 +13821,9 @@ String Functions::) for sorting arrays. For example:
After the call to `asort()', the array `data' is indexed from 1 to
some number N, the total number of elements in `data'. (This count is
`asort()''s return value.) `data[1]' <= `data[2]' <= `data[3]', and so
-on. The array elements are compared as strings.
+on. The comparison is based on the type of the elements (*note Typing
+and Comparison::). All numeric values come before all string values,
+which in turn come before all subarrays.
An important side effect of calling `asort()' is that _the array's
original indices are irrevocably lost_. As this isn't always
@@ -13858,8 +13840,9 @@ array is not affected.
`asort()' accepts a third string argument to control comparison of
array elements. As with `PROCINFO["sorted_in"]', this argument may be
-the name of a user-defined function, or one of the predefined names
-that `gawk' provides (*note Controlling Scanning With A Function::).
+one of the predefined names that `gawk' provides (*note Controlling
+Scanning::), or the name of a user-defined function (*note Controlling
+Array Traversal::).
NOTE: In all cases, the sorted element values consist of the
original array's element values. The ability to control
@@ -14350,14 +14333,14 @@ File: gawk.info, Node: Library Functions, Next: Sample Programs, Prev: Advanc
12 A Library of `awk' Functions
*******************************
-*Note User-defined::, describes how to write your own `awk' functions.
+*note User-defined::, describes how to write your own `awk' functions.
Writing functions is important, because it allows you to encapsulate
algorithms and program tasks in a single place. It simplifies
programming, making program development more manageable, and making
programs more readable.
One valuable way to learn a new programming language is to _read_
-programs in that language. To that end, this major node and *Note
+programs in that language. To that end, this major node and *note
Sample Programs::, provide a good-sized body of code for you to read,
and hopefully, to learn from.
@@ -14366,16 +14349,16 @@ of the sample programs presented later in this Info file use these
functions. The functions are presented here in a progression from
simple to complex.
- *Note Extract Program::, presents a program that you can use to
+ *note Extract Program::, presents a program that you can use to
extract the source code for these example library functions and
programs from the Texinfo source for this Info file. (This has already
been done as part of the `gawk' distribution.)
If you have written one or more useful, general-purpose `awk'
functions and would like to contribute them to the `awk' user
-community, see *Note How To Contribute::, for more information.
+community, see *note How To Contribute::, for more information.
- The programs in this major node and in *Note Sample Programs::,
+ The programs in this major node and in *note Sample Programs::,
freely use features that are `gawk'-specific. Rewriting these programs
for different implementations of `awk' is pretty straightforward.
@@ -14477,7 +14460,7 @@ program, leading to bugs that are very difficult to track down:
single associative array to hold the values needed by the library
function(s), or "package." This significantly decreases the number of
actual global names in use. For example, the functions described in
-*Note Passwd Functions::, might have used array elements
+*note Passwd Functions::, might have used array elements
`PW_data["inited"]', `PW_data["total"]', `PW_data["count"]', and
`PW_data["awklib"]', instead of `_pw_inited', `_pw_awklib', `_pw_total',
and `_pw_count'.
@@ -14915,7 +14898,7 @@ File: gawk.info, Node: Gettimeofday Function, Prev: Join Function, Up: Genera
12.2.7 Managing the Time of Day
-------------------------------
-The `systime()' and `strftime()' functions described in *Note Time
+The `systime()' and `strftime()' functions described in *note Time
Functions::, provide the minimum functionality necessary for dealing
with the time of day in human readable form. While `strftime()' is
extensive, the control formats are not necessarily easy to remember or
@@ -14987,7 +14970,7 @@ current time formatted in the same way as the `date' utility:
The string indices are easier to use and read than the various
formats required by `strftime()'. The `alarm' program presented in
-*Note Alarm Program::, uses this function. A more general design for
+*note Alarm Program::, uses this function. A more general design for
the `gettimeofday()' function would have allowed the user to supply an
optional timestamp value to use instead of the current time.
@@ -15088,7 +15071,7 @@ solves the problem:
END { endfile(_filename_) }
- *Note Wc Program::, shows how this library function can be used and
+ *note Wc Program::, shows how this library function can be used and
how it simplifies writing the main program.
Advanced Notes: So Why Does `gawk' have `BEGINFILE' and `ENDFILE'?
@@ -15142,7 +15125,7 @@ over with it from the top. For lack of a better name, we'll call it
This code relies on the `ARGIND' variable (*note Auto-set::), which
is specific to `gawk'. If you are not using `gawk', you can use ideas
-presented in *Note Filetrans Function::, to either update `ARGIND' on
+presented in *note Filetrans Function::, to either update `ARGIND' on
your own or modify this code as appropriate.
The `rewind()' function also relies on the `nextfile' keyword (*note
@@ -15175,7 +15158,7 @@ program to your `awk' program:
This works, because the `getline' won't be fatal. Removing the
element from `ARGV' with `delete' skips the file (since it's no longer
-in the list). See also *Note ARGC and ARGV::.
+in the list). See also *note ARGC and ARGV::.

File: gawk.info, Node: Empty Files, Next: Ignoring Assigns, Prev: File Checking, Up: Data File Management
@@ -15193,7 +15176,7 @@ program code.
Using `gawk''s `ARGIND' variable (*note Built-in Variables::), it is
possible to detect when an empty data file has been skipped. Similar
-to the library file presented in *Note Filetrans Function::, the
+to the library file presented in *note Filetrans Function::, the
following library file calls a function named `zerofile()' that the
user must provide. The arguments passed are the file name and the
position in `ARGV' where it was found:
@@ -15561,7 +15544,7 @@ that it does not try to interpret the `-a', etc., as its own options.
`Optind', so that `awk' does not try to process the command-line
options as file names.
- Several of the sample programs presented in *Note Sample Programs::,
+ Several of the sample programs presented in *note Sample Programs::,
use `getopt()' to process their arguments.
---------- Footnotes ----------
@@ -15806,7 +15789,7 @@ once. If you are worried about squeezing every last cycle out of your
this is not necessary, since most `awk' programs are I/O-bound, and
such a change would clutter up the code.
- The `id' program in *Note Id Program::, uses these functions.
+ The `id' program in *note Id Program::, uses these functions.
---------- Footnotes ----------
@@ -15819,7 +15802,7 @@ File: gawk.info, Node: Group Functions, Next: Walking Arrays, Prev: Passwd Fu
12.6 Reading the Group Database
===============================
-Much of the discussion presented in *Note Passwd Functions::, applies
+Much of the discussion presented in *note Passwd Functions::, applies
to the group database as well. Although there has traditionally been a
well-known file (`/etc/group') in a well-known format, the POSIX
standard only provides a set of C library routines (`<grp.h>' and
@@ -16045,7 +16028,7 @@ body of `_gr_init()' into a `BEGIN' rule).
associative arrays. The functions that the user calls are themselves
very simple, relying on `awk''s associative arrays to do work.
- The `id' program in *Note Id Program::, uses these functions.
+ The `id' program in *note Id Program::, uses these functions.

File: gawk.info, Node: Walking Arrays, Prev: Group Functions, Up: Library Functions
@@ -16053,7 +16036,7 @@ File: gawk.info, Node: Walking Arrays, Prev: Group Functions, Up: Library Fun
12.7 Traversing Arrays of Arrays
================================
-*Note Arrays of Arrays::, described how `gawk' provides arrays of
+*note Arrays of Arrays::, described how `gawk' provides arrays of
arrays. In particular, any element of an array may be either a scalar,
or another array. The `isarray()' function (*note Type Functions::)
lets you distinguish an array from a scalar. The following function,
@@ -16104,12 +16087,12 @@ File: gawk.info, Node: Sample Programs, Next: Debugger, Prev: Library Functio
13 Practical `awk' Programs
***************************
-*Note Library Functions::, presents the idea that reading programs in a
+*note Library Functions::, presents the idea that reading programs in a
language contributes to learning that language. This major node
continues that theme, presenting a potpourri of `awk' programs for your
reading enjoyment.
- Many of these programs use library functions presented in *Note
+ Many of these programs use library functions presented in *note
Library Functions::.
* Menu:
@@ -16284,7 +16267,7 @@ by characters, the output field separator is set to the null string:
Using a single space (`" "') for the value of `FS' is incorrect--`awk'
would separate fields with runs of spaces, TABs, and/or newlines, and
we want them to be separated with individual spaces. Also remember
-that after `getopt()' is through (as described in *Note Getopt
+that after `getopt()' is through (as described in *note Getopt
Function::), we have to clear out all the elements of `ARGV' from 1 to
`Optind', so that `awk' does not try to process the command-line options
as file names.
@@ -16789,7 +16772,7 @@ to something like `myfileaa', `myfileab', and so on, supply an
additional argument that specifies the file name prefix.
Here is a version of `split' in `awk'. It uses the `ord()' and
-`chr()' functions presented in *Note Ordinal Functions::.
+`chr()' functions presented in *note Ordinal Functions::.
The program first sets its defaults, and then tests to make sure
there are not too many arguments. It then looks at each argument in
@@ -17323,7 +17306,7 @@ in its length. Next, `lines' is incremented for each line read, and
---------- Footnotes ----------
(1) `wc' can't just use the value of `FNR' in `endfile()'. If you
-examine the code in *Note Filetrans Function::, you will see that `FNR'
+examine the code in *note Filetrans Function::, you will see that `FNR'
has already been reset by the time `endfile()' is called.
(2) Since `gawk' understands multibyte locales, this code counts
@@ -17419,7 +17402,7 @@ prints the message on the standard output. In addition, you can give it
the number of times to repeat the message as well as a delay between
repetitions.
- This program uses the `gettimeofday()' function from *Note
+ This program uses the `gettimeofday()' function from *note
Gettimeofday Function::.
All the work is done in the `BEGIN' rule. The first part is argument
@@ -17927,7 +17910,7 @@ File: gawk.info, Node: Extract Program, Next: Simple Sed, Prev: History Sorti
13.3.7 Extracting Programs from Texinfo Source Files
----------------------------------------------------
-The nodes *Note Library Functions::, and *Note Sample Programs::, are
+The nodes *note Library Functions::, and *note Sample Programs::, are
the top level nodes for a large number of `awk' programs. If you want
to experiment with these programs, it is tedious to have to type them
in by hand. Here we present a program that can extract parts of a
@@ -18208,7 +18191,7 @@ File: gawk.info, Node: Igawk Program, Next: Anagram Program, Prev: Simple Sed
13.3.9 An Easy Way to Use Library Functions
-------------------------------------------
-In *Note Include Files::, we saw how `gawk' provides a built-in
+In *note Include Files::, we saw how `gawk' provides a built-in
file-inclusion capability. However, this is a `gawk' extension. This
minor node provides the motivation for making file inclusion available
for standard `awk', and shows how to do it using a combination of shell
@@ -19323,7 +19306,7 @@ execution of the program than we saw in our earlier example:
`si' [COUNT]
Execute one (or COUNT) instruction(s), stepping inside function
calls. (For illustration of what is meant by an "instruction" in
- `gawk', see the output shown under `dump' in *Note Miscellaneous
+ `gawk', see the output shown under `dump' in *note Miscellaneous
Dgawk Commands::.)
`until' [[FILENAME`:']N | FUNCTION]
@@ -19729,7 +19712,7 @@ limitations. A few which are worth being aware of are:
Rather, it just responds `syntax error'. When you do figure out
what your mistake was, though, you'll feel like a real guru.
- * If you perused the dump of opcodes in *Note Miscellaneous Dgawk
+ * If you perused the dump of opcodes in *note Miscellaneous Dgawk
Commands::, (or if you are already familiar with `gawk' internals),
you will realize that much of the internal manipulation of data in
`gawk', as in many interpreters, is done on a stack. `Op_push',
@@ -19749,7 +19732,7 @@ limitations. A few which are worth being aware of are:
you are expected to know what `/[^[:alnum:][:blank:]]/' means.
* `dgawk' is designed to be used by running a program (with all its
- parameters) on the command line, as described in *Note dgawk
+ parameters) on the command line, as described in *note dgawk
invocation::. There is no way (as of now) to attach or "break in"
to a running program. This seems reasonable for a language which
is used mainly for quickly executing, short programs.
@@ -19939,7 +19922,7 @@ Other Versions::).
This minor node describes common extensions that originally appeared
in his version of `awk'.
- * The `**' and `**=' operators (*note Arithmetic Ops:: and *Note
+ * The `**' and `**=' operators (*note Arithmetic Ops:: and *note
Assignment Ops::).
* The use of `func' as an abbreviation for `function' (*note
@@ -20144,14 +20127,14 @@ inclusive. Ordering was based on the numeric value of each character
in the machine's native character set. Thus, on ASCII-based systems,
`[a-z]' matched all the lowercase letters, and only the lowercase
letters, since the numeric values for the letters from `a' through `z'
-were contigous. (On an EBCDIC system, the range `[a-z]' includes
+were contiguous. (On an EBCDIC system, the range `[a-z]' includes
additional, non-alphabetic characters as well.)
Almost all introductory Unix literature explained range expressions
as working in this fashion, and in particular, would teach that the
"correct" way to match lowercase letters was with `[a-z]', and that
-`[A-Z]' was the the "correct" way to match uppercase letters. And
-indeed, this was true.
+`[A-Z]' was the "correct" way to match uppercase letters. And indeed,
+this was true.
The 1993 POSIX standard introduced the idea of locales (*note
Locales::). Since many locales include other letters besides the plain
@@ -20332,7 +20315,7 @@ Info file, in approximate chronological order:
* John Haque reworked the `gawk' internals to use a byte-code engine,
providing the `dgawk' debugger for `awk' programs.
- * Efraim Yawitz contributed the original text for *Note Debugger::.
+ * Efraim Yawitz contributed the original text for *note Debugger::.
* Arnold Robbins has been working on `gawk' since 1988, at first
helping David Trueman, and as the primary maintainer since around
@@ -20390,7 +20373,7 @@ There are three ways to get GNU software:
supported. If you have the `wget' program, you can use a command
like the following:
- wget http://ftp.gnu.org/gnu/gawk/gawk-4.0.0.tar.gz
+ wget http://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.gz
The GNU software archive is mirrored around the world. The
up-to-date list of mirror sites is available from the main FSF web site
@@ -20409,26 +20392,26 @@ compression programs: `gzip', `bzip2', and `xz'. For simplicity, the
rest of these instructions assume you are using the one compressed with
the GNU Zip program, `gzip'.
- Once you have the distribution (for example, `gawk-4.0.0.tar.gz'),
+ Once you have the distribution (for example, `gawk-4.0.1.tar.gz'),
use `gzip' to expand the file and then use `tar' to extract it. You
can use the following pipeline to produce the `gawk' distribution:
# Under System V, add 'o' to the tar options
- gzip -d -c gawk-4.0.0.tar.gz | tar -xvpf -
+ gzip -d -c gawk-4.0.1.tar.gz | tar -xvpf -
On a system with GNU `tar', you can let `tar' do the decompression
for you:
- tar -xvpzf gawk-4.0.0.tar.gz
+ tar -xvpzf gawk-4.0.1.tar.gz
-Extracting the archive creates a directory named `gawk-4.0.0' in the
+Extracting the archive creates a directory named `gawk-4.0.1' in the
current directory.
The distribution file name is of the form `gawk-V.R.P.tar.gz'. The
V represents the major version of `gawk', the R represents the current
release of version V, and the P represents a "patch level", meaning
that minor bugs have been fixed in the release. The current patch
-level is 0, but when retrieving distributions, you should get the
+level is 1, but when retrieving distributions, you should get the
version with the highest version, release, and patch level. (Note,
however, that patch levels greater than or equal to 70 denote "beta" or
nonproduction software; you might not want to retrieve such a version
@@ -20536,7 +20519,7 @@ Various `.c', `.y', and `.h' files
`doc/igawk.1'
The `troff' source for a manual page describing the `igawk'
- program presented in *Note Igawk Program::.
+ program presented in *note Igawk Program::.
`doc/Makefile.in'
The input file used during the configuration process to generate
@@ -20556,7 +20539,7 @@ Various `.c', `.y', and `.h' files
`missing_d/*'
`m4/*'
These files and subdirectories are used when configuring `gawk'
- for various Unix systems. They are explained in *Note Unix
+ for various Unix systems. They are explained in *note Unix
Installation::.
`po/*'
@@ -20571,8 +20554,8 @@ Various `.c', `.y', and `.h' files
programs from the Texinfo source file for this Info file. It also
contains a `Makefile.in' file, which `configure' uses to generate
a `Makefile'. `Makefile.am' is used by GNU Automake to create
- `Makefile.in'. The library functions from *Note Library
- Functions::, and the `igawk' program from *Note Igawk Program::,
+ `Makefile.in'. The library functions from *note Library
+ Functions::, and the `igawk' program from *note Igawk Program::,
are included as ready-to-use files in the `gawk' distribution.
They are installed as part of the installation process. The rest
of the programs in this Info file are available in appropriate
@@ -20622,7 +20605,7 @@ Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin
environment for MS-Windows.
After you have extracted the `gawk' distribution, `cd' to
-`gawk-4.0.0'. Like most GNU software, `gawk' is configured
+`gawk-4.0.1'. Like most GNU software, `gawk' is configured
automatically for your system by running the `configure' program. This
program is a Bourne shell script that is generated automatically using
GNU `autoconf'. (The `autoconf' software is described fully starting
@@ -20937,7 +20920,7 @@ MS-DOS or MS-Windows. EMX (OS/2 only) does support at least the `|&'
operator.
The MS-DOS and MS-Windows versions of `gawk' search for program
-files as described in *Note AWKPATH Variable::. However, semicolons
+files as described in *note AWKPATH Variable::. However, semicolons
(rather than colons) separate elements in the `AWKPATH' variable. If
`AWKPATH' is not set or is empty, then the default search path for
MS-Windows and MS-DOS versions is `".;c:/lib/awk;c:/gnu/lib/awk"'.
@@ -21032,8 +21015,8 @@ tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, and
other GNU programs. Compilation and installation for Cygwin is the
same as for a Unix system:
- tar -xvpzf gawk-4.0.0.tar.gz
- cd gawk-4.0.0
+ tar -xvpzf gawk-4.0.1.tar.gz
+ cd gawk-4.0.1
./configure
make
@@ -21471,7 +21454,7 @@ File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions
C.2.1 Accessing The `gawk' Git Repository
-----------------------------------------
-As `gawk' is Free Software, the source code is always available. *Note
+As `gawk' is Free Software, the source code is always available. *note
Gawk Distribution::, describes how to get and build the formal,
released versions of `gawk'.
@@ -21491,7 +21474,7 @@ access the repository using:
git clone http://git.savannah.gnu.org/r/gawk.git
Once you have made changes, you can use `git diff' to produce a
-patch, and send that to the `gawk' maintainer; see *Note Bugs:: for how
+patch, and send that to the `gawk' maintainer; see *note Bugs:: for how
to do that.
Finally, if you cannot install Git (e.g., if it hasn't been ported
@@ -21640,7 +21623,7 @@ C.2.3 Porting `gawk' to a New Operating System
If you want to port `gawk' to a new operating system, there are several
steps:
- 1. Follow the guidelines in *Note Adding Code::, concerning coding
+ 1. Follow the guidelines in *note Adding Code::, concerning coding
style, submission of diffs, and so on.
2. Be prepared to sign the appropriate paperwork. In order for the
@@ -22548,7 +22531,7 @@ larger range of values. The disadvantage is that there are numbers
that they cannot represent exactly. `awk' uses "double precision"
floating-point numbers, which can hold more digits than "single
precision" floating-point numbers. Floating-point issues are discussed
-more fully in *Note Floating Point Issues::.
+more fully in *note Floating Point Issues::.
At the very lowest level, computers store values as groups of binary
digits, or "bits". Modern computers group bits into groups of eight,
@@ -22571,7 +22554,7 @@ or "binary", base 8 or "octal", and base 16 or "hexadecimal". In
binary, each column represents two times the value in the column to its
right. Each column may contain either a 0 or a 1. Thus, binary 1010
represents 1 times 8, plus 0 times 4, plus 1 times 2, plus 0 times 1,
-or decimal 10. Octal and hexadecimal are discussed more in *Note
+or decimal 10. Octal and hexadecimal are discussed more in *note
Nondecimal-numbers::.
Programs are written in programming languages. Hundreds, if not
@@ -22888,7 +22871,7 @@ Bit
floating-point numbers, character data, addresses of other memory
objects, or other data. `awk' lets you work with floating-point
numbers and strings. `gawk' lets you manipulate bit values with
- the built-in functions described in *Note Bitwise Functions::.
+ the built-in functions described in *note Bitwise Functions::.
Computers are often defined by how many bits they use to represent
integer values. Typical systems are 32-bit systems, but 64-bit
@@ -23071,7 +23054,7 @@ Field
built-in variable `FIELDWIDTHS' to describe their lengths. If you
wish to specify the contents of fields instead of the field
separator, you can use the built-in variable `FPAT' to do so.
- (*Note Field Separators::, *Note Constant Size::, and *Note
+ (*Note Field Separators::, *note Constant Size::, and *note
Splitting By Content::.)
Flag
@@ -23306,7 +23289,7 @@ Redirection
`|', and `|&' operators. You can redirect the output of the
`print' and `printf' statements to a file or a system command,
using the `>', `>>', `|', and `|&' operators. (*Note Getline::,
- and *Note Redirection::.)
+ and *note Redirection::.)
Regexp
See "Regular Expression."
@@ -24699,7 +24682,7 @@ Index
* * (asterisk), * operator, as regexp operator: Regexp Operators.
(line 87)
* * (asterisk), * operator, null strings, matching: Gory Details.
- (line 163)
+ (line 164)
* * (asterisk), ** operator <1>: Precedence. (line 49)
* * (asterisk), ** operator: Arithmetic Ops. (line 81)
* * (asterisk), **= operator <1>: Precedence. (line 95)
@@ -24939,7 +24922,7 @@ Index
(line 23)
* advanced features, network connections, See Also networks, connections: Advanced Features.
(line 6)
-* advanced features, null strings, matching: Gory Details. (line 163)
+* advanced features, null strings, matching: Gory Details. (line 164)
* advanced features, operators, precedence: Increment Ops. (line 61)
* advanced features, piping into sh: Redirection. (line 143)
* advanced features, regexp constants: Assignment Ops. (line 148)
@@ -25005,7 +24988,7 @@ Index
* arrays, sorting: Array Sorting Functions.
(line 6)
* arrays, sorting, IGNORECASE variable and: Array Sorting Functions.
- (line 78)
+ (line 81)
* arrays, sparse: Array Intro. (line 71)
* arrays, subscripts: Numeric Array Subscripts.
(line 6)
@@ -25036,7 +25019,7 @@ Index
* asterisk (*), * operator, as regexp operator: Regexp Operators.
(line 87)
* asterisk (*), * operator, null strings, matching: Gory Details.
- (line 163)
+ (line 164)
* asterisk (*), ** operator <1>: Precedence. (line 49)
* asterisk (*), ** operator: Arithmetic Ops. (line 81)
* asterisk (*), **= operator <1>: Precedence. (line 95)
@@ -26050,7 +26033,7 @@ Index
* gawk, functions, adding: Dynamic Extensions. (line 10)
* gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42)
* gawk, IGNORECASE variable in <1>: Array Sorting Functions.
- (line 78)
+ (line 81)
* gawk, IGNORECASE variable in <2>: String Functions. (line 29)
* gawk, IGNORECASE variable in <3>: Array Intro. (line 92)
* gawk, IGNORECASE variable in <4>: User-modified. (line 82)
@@ -26209,13 +26192,13 @@ Index
* igawk.sh program: Igawk Program. (line 124)
* ignore debugger command: Breakpoint Control. (line 86)
* IGNORECASE variable <1>: Array Sorting Functions.
- (line 78)
+ (line 81)
* IGNORECASE variable <2>: String Functions. (line 29)
* IGNORECASE variable <3>: Array Intro. (line 92)
* IGNORECASE variable <4>: User-modified. (line 82)
* IGNORECASE variable: Case-sensitivity. (line 26)
* IGNORECASE variable, array sorting and: Array Sorting Functions.
- (line 78)
+ (line 81)
* IGNORECASE variable, array subscripts and: Array Intro. (line 92)
* IGNORECASE variable, in example programs: Library Functions.
(line 42)
@@ -26458,7 +26441,7 @@ Index
* matching, expressions, See comparison expressions: Typing and Comparison.
(line 9)
* matching, leftmost longest: Multiple Line. (line 26)
-* matching, null strings: Gory Details. (line 163)
+* matching, null strings: Gory Details. (line 164)
* mawk program: Other Versions. (line 35)
* McPhee, Patrick: Contributors. (line 100)
* memory, releasing: Internals. (line 92)
@@ -26539,7 +26522,7 @@ Index
* null strings, as array subscripts: Uninitialized Subscripts.
(line 43)
* null strings, converting numbers to strings: Conversion. (line 21)
-* null strings, matching: Gory Details. (line 163)
+* null strings, matching: Gory Details. (line 164)
* null strings, quoting and: Quoting. (line 62)
* number sign (#), #! (executable scripts): Executable Scripts.
(line 6)
@@ -26755,7 +26738,7 @@ Index
* POSIX awk, field separators and: Fields. (line 6)
* POSIX awk, FS variable and: User-modified. (line 66)
* POSIX awk, function keyword in: Definition Syntax. (line 83)
-* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 53)
+* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 54)
* POSIX awk, functions and, length(): String Functions. (line 175)
* POSIX awk, GNU long options and: Options. (line 15)
* POSIX awk, interval expressions in: Regexp Operators. (line 135)
@@ -26897,7 +26880,7 @@ Index
* redirection of input: Getline/File. (line 6)
* redirection of output: Redirection. (line 6)
* reference counting, sorting arrays: Array Sorting Functions.
- (line 72)
+ (line 75)
* regexp constants <1>: Comparison Operators.
(line 103)
* regexp constants <2>: Regexp Constants. (line 6)
@@ -27056,7 +27039,7 @@ Index
* side effects, array indexing: Reference to Elements.
(line 42)
* side effects, asort() function: Array Sorting Functions.
- (line 22)
+ (line 24)
* side effects, assignment expressions: Assignment Ops. (line 23)
* side effects, Boolean operators: Boolean Ops. (line 30)
* side effects, conditional expressions: Conditional Exp. (line 22)
@@ -27438,828 +27421,417 @@ Index

Tag Table:
-<<<<<<< HEAD
-Node: Top1345
-Node: Foreword33439
-Node: Preface37784
-Ref: Preface-Footnote-140837
-Ref: Preface-Footnote-240943
-Node: History41175
-Node: Names43566
-Ref: Names-Footnote-145043
-Node: This Manual45115
-Ref: This Manual-Footnote-150062
-Node: Conventions50162
-Node: Manual History52296
-Ref: Manual History-Footnote-155566
-Ref: Manual History-Footnote-255607
-Node: How To Contribute55681
-Node: Acknowledgments56825
-Node: Getting Started61156
-Node: Running gawk63535
-Node: One-shot64721
-Node: Read Terminal65946
-Ref: Read Terminal-Footnote-167596
-Ref: Read Terminal-Footnote-267872
-Node: Long68043
-Node: Executable Scripts69419
-Ref: Executable Scripts-Footnote-171288
-Ref: Executable Scripts-Footnote-271390
-Node: Comments71841
-Node: Quoting74308
-Node: DOS Quoting78931
-Node: Sample Data Files79606
-Node: Very Simple82638
-Node: Two Rules87237
-Node: More Complex89384
-Ref: More Complex-Footnote-192314
-Node: Statements/Lines92399
-Ref: Statements/Lines-Footnote-196861
-Node: Other Features97126
-Node: When98054
-Node: Invoking Gawk100201
-Node: Command Line101586
-Node: Options102369
-Ref: Options-Footnote-1115806
-Node: Other Arguments115831
-Node: Naming Standard Input118489
-Node: Environment Variables119583
-Node: AWKPATH Variable120027
-Ref: AWKPATH Variable-Footnote-1122624
-Node: Other Environment Variables122884
-Node: Exit Status125224
-Node: Include Files125899
-Node: Obsolete129384
-Node: Undocumented130070
-Node: Regexp130311
-Node: Regexp Usage131700
-Node: Escape Sequences133726
-Node: Regexp Operators139489
-Ref: Regexp Operators-Footnote-1146686
-Ref: Regexp Operators-Footnote-2146833
-Node: Bracket Expressions146931
-Ref: table-char-classes148821
-Node: GNU Regexp Operators151344
-Node: Case-sensitivity155067
-Ref: Case-sensitivity-Footnote-1158035
-Ref: Case-sensitivity-Footnote-2158270
-Node: Leftmost Longest158378
-Node: Computed Regexps159579
-Node: Reading Files162989
-Node: Records164930
-Ref: Records-Footnote-1173604
-Node: Fields173641
-Ref: Fields-Footnote-1176674
-Node: Nonconstant Fields176760
-Node: Changing Fields178962
-Node: Field Separators184940
-Node: Default Field Splitting187569
-Node: Regexp Field Splitting188686
-Node: Single Character Fields192028
-Node: Command Line Field Separator193087
-Node: Field Splitting Summary196528
-Ref: Field Splitting Summary-Footnote-1199720
-Node: Constant Size199821
-Node: Splitting By Content204405
-Ref: Splitting By Content-Footnote-1208131
-Node: Multiple Line208171
-Ref: Multiple Line-Footnote-1214018
-Node: Getline214197
-Node: Plain Getline216425
-Node: Getline/Variable218514
-Node: Getline/File219655
-Node: Getline/Variable/File220977
-Ref: Getline/Variable/File-Footnote-1222576
-Node: Getline/Pipe222663
-Node: Getline/Variable/Pipe225223
-Node: Getline/Coprocess226330
-Node: Getline/Variable/Coprocess227573
-Node: Getline Notes228287
-Node: Getline Summary230229
-Ref: table-getline-variants230572
-Node: Command line directories231428
-Node: Printing232053
-Node: Print233684
-Node: Print Examples235021
-Node: Output Separators237805
-Node: OFMT239565
-Node: Printf240923
-Node: Basic Printf241829
-Node: Control Letters243368
-Node: Format Modifiers247180
-Node: Printf Examples253189
-Node: Redirection255904
-Node: Special Files262888
-Node: Special FD263421
-Ref: Special FD-Footnote-1267046
-Node: Special Network267120
-Node: Special Caveats267970
-Node: Close Files And Pipes268766
-Ref: Close Files And Pipes-Footnote-1275789
-Ref: Close Files And Pipes-Footnote-2275937
-Node: Expressions276087
-Node: Values277219
-Node: Constants277895
-Node: Scalar Constants278575
-Ref: Scalar Constants-Footnote-1279434
-Node: Nondecimal-numbers279616
-Node: Regexp Constants282675
-Node: Using Constant Regexps283150
-Node: Variables286205
-Node: Using Variables286860
-Node: Assignment Options288584
-Node: Conversion290456
-Ref: table-locale-affects295832
-Ref: Conversion-Footnote-1296456
-Node: All Operators296565
-Node: Arithmetic Ops297195
-Node: Concatenation299700
-Ref: Concatenation-Footnote-1302493
-Node: Assignment Ops302613
-Ref: table-assign-ops307601
-Node: Increment Ops309009
-Node: Truth Values and Conditions312479
-Node: Truth Values313562
-Node: Typing and Comparison314611
-Node: Variable Typing315400
-Ref: Variable Typing-Footnote-1319297
-Node: Comparison Operators319419
-Ref: table-relational-ops319829
-Node: POSIX String Comparison323378
-Ref: POSIX String Comparison-Footnote-1324334
-Node: Boolean Ops324472
-Ref: Boolean Ops-Footnote-1328550
-Node: Conditional Exp328641
-Node: Function Calls330373
-Node: Precedence333967
-Node: Locales337636
-Node: Patterns and Actions338725
-Node: Pattern Overview339779
-Node: Regexp Patterns341445
-Node: Expression Patterns341988
-Node: Ranges345673
-Node: BEGIN/END348639
-Node: Using BEGIN/END349401
-Ref: Using BEGIN/END-Footnote-1352132
-Node: I/O And BEGIN/END352238
-Node: BEGINFILE/ENDFILE354520
-Node: Empty357413
-Node: Using Shell Variables357729
-Node: Action Overview360014
-Node: Statements362371
-Node: If Statement364225
-Node: While Statement365724
-Node: Do Statement367768
-Node: For Statement368924
-Node: Switch Statement372076
-Node: Break Statement374173
-Node: Continue Statement376163
-Node: Next Statement377950
-Node: Nextfile Statement380340
-Node: Exit Statement382885
-Node: Built-in Variables385301
-Node: User-modified386396
-Ref: User-modified-Footnote-1394422
-Node: Auto-set394484
-Ref: Auto-set-Footnote-1403775
-Node: ARGC and ARGV403980
-Node: Arrays407831
-Node: Array Basics409336
-Node: Array Intro410047
-Node: Reference to Elements414365
-Node: Assigning Elements416635
-Node: Array Example417126
-Node: Scanning an Array418858
-Node: Delete421524
-Ref: Delete-Footnote-1423959
-Node: Numeric Array Subscripts424016
-Node: Uninitialized Subscripts426199
-Node: Multi-dimensional427827
-Node: Multi-scanning430921
-Node: Arrays of Arrays432505
-Node: Functions437082
-Node: Built-in437904
-Node: Calling Built-in438982
-Node: Numeric Functions440970
-Ref: Numeric Functions-Footnote-1444735
-Ref: Numeric Functions-Footnote-2445092
-Ref: Numeric Functions-Footnote-3445140
-Node: String Functions445409
-Ref: String Functions-Footnote-1468906
-Ref: String Functions-Footnote-2469035
-Ref: String Functions-Footnote-3469283
-Node: Gory Details469370
-Ref: table-sub-escapes471049
-Ref: table-sub-posix-92472403
-Ref: table-sub-proposed473746
-Ref: table-posix-sub475096
-Ref: table-gensub-escapes476642
-Ref: Gory Details-Footnote-1477849
-Ref: Gory Details-Footnote-2477900
-Node: I/O Functions478051
-Ref: I/O Functions-Footnote-1484706
-Node: Time Functions484853
-Ref: Time Functions-Footnote-1495745
-Ref: Time Functions-Footnote-2495813
-Ref: Time Functions-Footnote-3495971
-Ref: Time Functions-Footnote-4496082
-Ref: Time Functions-Footnote-5496194
-Ref: Time Functions-Footnote-6496421
-Node: Bitwise Functions496687
-Ref: table-bitwise-ops497245
-Ref: Bitwise Functions-Footnote-1501405
-Node: Type Functions501589
-Node: I18N Functions502059
-Node: User-defined503686
-Node: Definition Syntax504490
-Ref: Definition Syntax-Footnote-1509400
-Node: Function Example509469
-Node: Function Caveats512063
-Node: Calling A Function512484
-Node: Variable Scope513599
-Node: Pass By Value/Reference515574
-Node: Return Statement519014
-Node: Dynamic Typing521995
-Node: Indirect Calls522730
-Node: Internationalization532415
-Node: I18N and L10N533841
-Node: Explaining gettext534527
-Ref: Explaining gettext-Footnote-1539593
-Ref: Explaining gettext-Footnote-2539777
-Node: Programmer i18n539942
-Node: Translator i18n544142
-Node: String Extraction544935
-Ref: String Extraction-Footnote-1545896
-Node: Printf Ordering545982
-Ref: Printf Ordering-Footnote-1548766
-Node: I18N Portability548830
-Ref: I18N Portability-Footnote-1551279
-Node: I18N Example551342
-Ref: I18N Example-Footnote-1553977
-Node: Gawk I18N554049
-Node: Advanced Features554666
-Node: Nondecimal Data556179
-Node: Array Sorting557762
-Node: Controlling Array Traversal558462
-Node: Controlling Scanning With A Function559209
-Node: Controlling Scanning566912
-Ref: Controlling Scanning-Footnote-1570713
-Node: Array Sorting Functions571029
-Ref: Array Sorting Functions-Footnote-1574545
-Ref: Array Sorting Functions-Footnote-2574638
-Node: Two-way I/O574832
-Ref: Two-way I/O-Footnote-1580264
-Node: TCP/IP Networking580334
-Node: Profiling583178
-Node: Library Functions590652
-Ref: Library Functions-Footnote-1593659
-Node: Library Names593830
-Ref: Library Names-Footnote-1597301
-Ref: Library Names-Footnote-2597521
-Node: General Functions597607
-Node: Strtonum Function598560
-Node: Assert Function601490
-Node: Round Function604816
-Node: Cliff Random Function606359
-Node: Ordinal Functions607375
-Ref: Ordinal Functions-Footnote-1610445
-Ref: Ordinal Functions-Footnote-2610697
-Node: Join Function610906
-Ref: Join Function-Footnote-1612677
-Node: Gettimeofday Function612877
-Node: Data File Management616592
-Node: Filetrans Function617224
-Node: Rewind Function621363
-Node: File Checking622750
-Node: Empty Files623844
-Node: Ignoring Assigns626074
-Node: Getopt Function627627
-Ref: Getopt Function-Footnote-1638931
-Node: Passwd Functions639134
-Ref: Passwd Functions-Footnote-1648109
-Node: Group Functions648197
-Node: Walking Arrays656281
-Node: Sample Programs657850
-Node: Running Examples658515
-Node: Clones659243
-Node: Cut Program660467
-Node: Egrep Program670312
-Ref: Egrep Program-Footnote-1678085
-Node: Id Program678195
-Node: Split Program681811
-Ref: Split Program-Footnote-1685330
-Node: Tee Program685458
-Node: Uniq Program688261
-Node: Wc Program695690
-Ref: Wc Program-Footnote-1699956
-Ref: Wc Program-Footnote-2700156
-Node: Miscellaneous Programs700248
-Node: Dupword Program701436
-Node: Alarm Program703467
-Node: Translate Program708216
-Ref: Translate Program-Footnote-1712603
-Ref: Translate Program-Footnote-2712831
-Node: Labels Program712965
-Ref: Labels Program-Footnote-1716336
-Node: Word Sorting716420
-Node: History Sorting720304
-Node: Extract Program722143
-Ref: Extract Program-Footnote-1729626
-Node: Simple Sed729754
-Node: Igawk Program732816
-Ref: Igawk Program-Footnote-1747973
-Ref: Igawk Program-Footnote-2748174
-Node: Anagram Program748312
-Node: Signature Program751380
-Node: Debugger752480
-Node: Debugging753391
-Node: Debugging Concepts753804
-Node: Debugging Terms755660
-Node: Awk Debugging758283
-Node: Sample dgawk session759175
-Node: dgawk invocation759667
-Node: Finding The Bug760849
-Node: List of Debugger Commands767335
-Node: Breakpoint Control768646
-Node: Dgawk Execution Control772282
-Node: Viewing And Changing Data775633
-Node: Dgawk Stack778970
-Node: Dgawk Info780430
-Node: Miscellaneous Dgawk Commands784378
-Node: Readline Support789806
-Node: Dgawk Limitations790644
-Node: Language History792833
-Node: V7/SVR3.1794345
-Node: SVR4796666
-Node: POSIX798108
-Node: BTL799116
-Node: POSIX/GNU799850
-Node: Common Extensions805001
-Node: Ranges and Locales806108
-Ref: Ranges and Locales-Footnote-1810715
-Node: Contributors810936
-Node: Installation815198
-Node: Gawk Distribution816092
-Node: Getting816576
-Node: Extracting817402
-Node: Distribution contents819094
-Node: Unix Installation824316
-Node: Quick Installation824933
-Node: Additional Configuration Options826895
-Node: Configuration Philosophy828372
-Node: Non-Unix Installation830714
-Node: PC Installation831172
-Node: PC Binary Installation832471
-Node: PC Compiling834319
-Node: PC Testing837263
-Node: PC Using838439
-Node: Cygwin842624
-Node: MSYS843624
-Node: VMS Installation844138
-Node: VMS Compilation844741
-Ref: VMS Compilation-Footnote-1845748
-Node: VMS Installation Details845806
-Node: VMS Running847441
-Node: VMS Old Gawk849048
-Node: Bugs849522
-=======
Node: Top1346
-Node: Foreword33440
-Node: Preface37785
-Ref: Preface-Footnote-140838
-Ref: Preface-Footnote-240944
-Node: History41176
-Node: Names43567
-Ref: Names-Footnote-145044
-Node: This Manual45116
-Ref: This Manual-Footnote-150063
-Node: Conventions50163
-Node: Manual History52297
-Ref: Manual History-Footnote-155567
-Ref: Manual History-Footnote-255608
-Node: How To Contribute55682
-Node: Acknowledgments56826
-Node: Getting Started61157
-Node: Running gawk63536
-Node: One-shot64722
-Node: Read Terminal65947
-Ref: Read Terminal-Footnote-167597
-Ref: Read Terminal-Footnote-267873
-Node: Long68044
-Node: Executable Scripts69420
-Ref: Executable Scripts-Footnote-171289
-Ref: Executable Scripts-Footnote-271391
-Node: Comments71842
-Node: Quoting74309
-Node: DOS Quoting78932
-Node: Sample Data Files79607
-Node: Very Simple82639
-Node: Two Rules87238
-Node: More Complex89385
-Ref: More Complex-Footnote-192315
-Node: Statements/Lines92400
-Ref: Statements/Lines-Footnote-196862
-Node: Other Features97127
-Node: When98055
-Node: Invoking Gawk100202
-Node: Command Line101587
-Node: Options102370
-Ref: Options-Footnote-1115807
-Node: Other Arguments115832
-Node: Naming Standard Input118490
-Node: Environment Variables119584
-Node: AWKPATH Variable120028
-Ref: AWKPATH Variable-Footnote-1122625
-Node: Other Environment Variables122885
-Node: Exit Status125225
-Node: Include Files125900
-Node: Obsolete129385
-Node: Undocumented130071
-Node: Regexp130312
-Node: Regexp Usage131701
-Node: Escape Sequences133727
-Node: Regexp Operators139490
-Ref: Regexp Operators-Footnote-1146687
-Ref: Regexp Operators-Footnote-2146834
-Node: Bracket Expressions146932
-Ref: table-char-classes148822
-Node: GNU Regexp Operators151345
-Node: Case-sensitivity155068
-Ref: Case-sensitivity-Footnote-1158036
-Ref: Case-sensitivity-Footnote-2158271
-Node: Leftmost Longest158379
-Node: Computed Regexps159580
-Node: Reading Files162990
-Node: Records164931
-Ref: Records-Footnote-1173605
-Node: Fields173642
-Ref: Fields-Footnote-1176675
-Node: Nonconstant Fields176761
-Node: Changing Fields178963
-Node: Field Separators184941
-Node: Default Field Splitting187570
-Node: Regexp Field Splitting188687
-Node: Single Character Fields192029
-Node: Command Line Field Separator193088
-Node: Field Splitting Summary196529
-Ref: Field Splitting Summary-Footnote-1199721
-Node: Constant Size199822
-Node: Splitting By Content204406
-Ref: Splitting By Content-Footnote-1208132
-Node: Multiple Line208172
-Ref: Multiple Line-Footnote-1214019
-Node: Getline214198
-Node: Plain Getline216426
-Node: Getline/Variable218515
-Node: Getline/File219656
-Node: Getline/Variable/File220978
-Ref: Getline/Variable/File-Footnote-1222577
-Node: Getline/Pipe222664
-Node: Getline/Variable/Pipe225224
-Node: Getline/Coprocess226331
-Node: Getline/Variable/Coprocess227574
-Node: Getline Notes228288
-Node: Getline Summary230230
-Ref: table-getline-variants230573
-Node: Command line directories231429
-Node: Printing232054
-Node: Print233685
-Node: Print Examples235022
-Node: Output Separators237806
-Node: OFMT239566
-Node: Printf240924
-Node: Basic Printf241830
-Node: Control Letters243369
-Node: Format Modifiers247181
-Node: Printf Examples253190
-Node: Redirection255905
-Node: Special Files262889
-Node: Special FD263422
-Ref: Special FD-Footnote-1267047
-Node: Special Network267121
-Node: Special Caveats267971
-Node: Close Files And Pipes268767
-Ref: Close Files And Pipes-Footnote-1275790
-Ref: Close Files And Pipes-Footnote-2275938
-Node: Expressions276088
-Node: Values277220
-Node: Constants277896
-Node: Scalar Constants278576
-Ref: Scalar Constants-Footnote-1279435
-Node: Nondecimal-numbers279617
-Node: Regexp Constants282676
-Node: Using Constant Regexps283151
-Node: Variables286206
-Node: Using Variables286861
-Node: Assignment Options288585
-Node: Conversion290457
-Ref: table-locale-affects295833
-Ref: Conversion-Footnote-1296457
-Node: All Operators296566
-Node: Arithmetic Ops297196
-Node: Concatenation299701
-Ref: Concatenation-Footnote-1302494
-Node: Assignment Ops302614
-Ref: table-assign-ops307602
-Node: Increment Ops309010
-Node: Truth Values and Conditions312480
-Node: Truth Values313563
-Node: Typing and Comparison314612
-Node: Variable Typing315401
-Ref: Variable Typing-Footnote-1319298
-Node: Comparison Operators319420
-Ref: table-relational-ops319830
-Node: POSIX String Comparison323379
-Ref: POSIX String Comparison-Footnote-1324335
-Node: Boolean Ops324473
-Ref: Boolean Ops-Footnote-1328551
-Node: Conditional Exp328642
-Node: Function Calls330374
-Node: Precedence333968
-Node: Locales337637
-Node: Patterns and Actions338726
-Node: Pattern Overview339780
-Node: Regexp Patterns341446
-Node: Expression Patterns341989
-Node: Ranges345674
-Node: BEGIN/END348640
-Node: Using BEGIN/END349402
-Ref: Using BEGIN/END-Footnote-1352133
-Node: I/O And BEGIN/END352239
-Node: BEGINFILE/ENDFILE354521
-Node: Empty357414
-Node: Using Shell Variables357730
-Node: Action Overview360015
-Node: Statements362372
-Node: If Statement364226
-Node: While Statement365725
-Node: Do Statement367769
-Node: For Statement368925
-Node: Switch Statement372077
-Node: Break Statement374174
-Node: Continue Statement376164
-Node: Next Statement377951
-Node: Nextfile Statement380341
-Node: Exit Statement382886
-Node: Built-in Variables385302
-Node: User-modified386397
-Ref: User-modified-Footnote-1394423
-Node: Auto-set394485
-Ref: Auto-set-Footnote-1403776
-Node: ARGC and ARGV403981
-Node: Arrays407832
-Node: Array Basics409337
-Node: Array Intro410048
-Node: Reference to Elements414366
-Node: Assigning Elements416636
-Node: Array Example417127
-Node: Scanning an Array418859
-Node: Delete421525
-Ref: Delete-Footnote-1423960
-Node: Numeric Array Subscripts424017
-Node: Uninitialized Subscripts426200
-Node: Multi-dimensional427828
-Node: Multi-scanning430922
-Node: Arrays of Arrays432506
-Node: Functions437083
-Node: Built-in437905
-Node: Calling Built-in438983
-Node: Numeric Functions440971
-Ref: Numeric Functions-Footnote-1444736
-Ref: Numeric Functions-Footnote-2445093
-Ref: Numeric Functions-Footnote-3445141
-Node: String Functions445410
-Ref: String Functions-Footnote-1468907
-Ref: String Functions-Footnote-2469036
-Ref: String Functions-Footnote-3469284
-Node: Gory Details469371
-Ref: table-sub-escapes471050
-Ref: table-sub-posix-92472404
-Ref: table-sub-proposed473747
-Ref: table-posix-sub475097
-Ref: table-gensub-escapes476643
-Ref: Gory Details-Footnote-1477850
-Ref: Gory Details-Footnote-2477901
-Node: I/O Functions478052
-Ref: I/O Functions-Footnote-1484707
-Node: Time Functions484854
-Ref: Time Functions-Footnote-1495746
-Ref: Time Functions-Footnote-2495814
-Ref: Time Functions-Footnote-3495972
-Ref: Time Functions-Footnote-4496083
-Ref: Time Functions-Footnote-5496195
-Ref: Time Functions-Footnote-6496422
-Node: Bitwise Functions496688
-Ref: table-bitwise-ops497246
-Ref: Bitwise Functions-Footnote-1501406
-Node: Type Functions501590
-Node: I18N Functions502060
-Node: User-defined503687
-Node: Definition Syntax504491
-Ref: Definition Syntax-Footnote-1509401
-Node: Function Example509470
-Node: Function Caveats512064
-Node: Calling A Function512485
-Node: Variable Scope513600
-Node: Pass By Value/Reference515575
-Node: Return Statement519015
-Node: Dynamic Typing521996
-Node: Indirect Calls522731
-Node: Internationalization532416
-Node: I18N and L10N533842
-Node: Explaining gettext534528
-Ref: Explaining gettext-Footnote-1539594
-Ref: Explaining gettext-Footnote-2539778
-Node: Programmer i18n539943
-Node: Translator i18n544143
-Node: String Extraction544936
-Ref: String Extraction-Footnote-1545897
-Node: Printf Ordering545983
-Ref: Printf Ordering-Footnote-1548767
-Node: I18N Portability548831
-Ref: I18N Portability-Footnote-1551280
-Node: I18N Example551343
-Ref: I18N Example-Footnote-1553978
-Node: Gawk I18N554050
-Node: Advanced Features554667
-Node: Nondecimal Data556180
-Node: Array Sorting557763
-Node: Controlling Array Traversal558463
-Node: Controlling Scanning With A Function559210
-Node: Controlling Scanning566913
-Ref: Controlling Scanning-Footnote-1570714
-Node: Array Sorting Functions571030
-Ref: Array Sorting Functions-Footnote-1574546
-Ref: Array Sorting Functions-Footnote-2574639
-Node: Two-way I/O574833
-Ref: Two-way I/O-Footnote-1580265
-Node: TCP/IP Networking580335
-Node: Profiling583179
-Node: Library Functions590653
-Ref: Library Functions-Footnote-1593660
-Node: Library Names593831
-Ref: Library Names-Footnote-1597302
-Ref: Library Names-Footnote-2597522
-Node: General Functions597608
-Node: Strtonum Function598561
-Node: Assert Function601491
-Node: Round Function604817
-Node: Cliff Random Function606360
-Node: Ordinal Functions607376
-Ref: Ordinal Functions-Footnote-1610446
-Ref: Ordinal Functions-Footnote-2610698
-Node: Join Function610907
-Ref: Join Function-Footnote-1612678
-Node: Gettimeofday Function612878
-Node: Data File Management616593
-Node: Filetrans Function617225
-Node: Rewind Function621364
-Node: File Checking622751
-Node: Empty Files623845
-Node: Ignoring Assigns626075
-Node: Getopt Function627628
-Ref: Getopt Function-Footnote-1638932
-Node: Passwd Functions639135
-Ref: Passwd Functions-Footnote-1648110
-Node: Group Functions648198
-Node: Walking Arrays656282
-Node: Sample Programs657851
-Node: Running Examples658516
-Node: Clones659244
-Node: Cut Program660468
-Node: Egrep Program670313
-Ref: Egrep Program-Footnote-1678086
-Node: Id Program678196
-Node: Split Program681812
-Ref: Split Program-Footnote-1685331
-Node: Tee Program685459
-Node: Uniq Program688262
-Node: Wc Program695691
-Ref: Wc Program-Footnote-1699957
-Ref: Wc Program-Footnote-2700157
-Node: Miscellaneous Programs700249
-Node: Dupword Program701437
-Node: Alarm Program703468
-Node: Translate Program708217
-Ref: Translate Program-Footnote-1712604
-Ref: Translate Program-Footnote-2712832
-Node: Labels Program712966
-Ref: Labels Program-Footnote-1716337
-Node: Word Sorting716421
-Node: History Sorting720305
-Node: Extract Program722144
-Ref: Extract Program-Footnote-1729627
-Node: Simple Sed729755
-Node: Igawk Program732817
-Ref: Igawk Program-Footnote-1747974
-Ref: Igawk Program-Footnote-2748175
-Node: Anagram Program748313
-Node: Signature Program751381
-Node: Debugger752481
-Node: Debugging753392
-Node: Debugging Concepts753805
-Node: Debugging Terms755661
-Node: Awk Debugging758284
-Node: Sample dgawk session759176
-Node: dgawk invocation759668
-Node: Finding The Bug760850
-Node: List of Debugger Commands767336
-Node: Breakpoint Control768647
-Node: Dgawk Execution Control772283
-Node: Viewing And Changing Data775634
-Node: Dgawk Stack778971
-Node: Dgawk Info780431
-Node: Miscellaneous Dgawk Commands784379
-Node: Readline Support789807
-Node: Dgawk Limitations790645
-Node: Language History792834
-Node: V7/SVR3.1794346
-Node: SVR4796667
-Node: POSIX798109
-Node: BTL799117
-Node: POSIX/GNU799851
-Node: Common Extensions805002
-Node: Ranges and Locales806109
-Ref: Ranges and Locales-Footnote-1810716
-Node: Contributors810937
-Node: Installation815199
-Node: Gawk Distribution816093
-Node: Getting816577
-Node: Extracting817403
-Node: Distribution contents819095
-Node: Unix Installation824317
-Node: Quick Installation824934
-Node: Additional Configuration Options826896
-Node: Configuration Philosophy828373
-Node: Non-Unix Installation830715
-Node: PC Installation831173
-Node: PC Binary Installation832472
-Node: PC Compiling834320
-Node: PC Testing837264
-Node: PC Using838440
-Node: Cygwin842625
-Node: MSYS843625
-Node: VMS Installation844139
-Node: VMS Compilation844742
-Ref: VMS Compilation-Footnote-1845749
-Node: VMS Installation Details845807
-Node: VMS Running847442
-Node: VMS Old Gawk849049
-Node: Bugs849523
->>>>>>> gawk-4.0-stable
-Node: Other Versions853375
-Node: Notes858656
-Node: Compatibility Mode859348
-Node: Additions860131
-Node: Accessing The Source860943
-Node: Adding Code862368
-Node: New Ports868335
-Node: Dynamic Extensions872448
-Node: Internals873824
-<<<<<<< HEAD
-Node: Plugin License882343
-Node: Sample Library882977
-Node: Internal File Description883663
-Node: Internal File Ops887378
-Ref: Internal File Ops-Footnote-1892102
-Node: Using Internal File Ops892242
-Node: Future Extensions894619
-Node: Basic Concepts897123
-Node: Basic High Level897880
-Ref: Basic High Level-Footnote-1901915
-Node: Basic Data Typing902100
-Node: Floating Point Issues906625
-Node: String Conversion Precision907708
-Ref: String Conversion Precision-Footnote-1909408
-Node: Unexpected Results909517
-Node: POSIX Floating Point Problems911343
-Ref: POSIX Floating Point Problems-Footnote-1915048
-Node: Glossary915086
-Node: Copying940062
-Node: GNU Free Documentation License977619
-Node: Index1002756
-=======
-Node: Plugin License882927
-Node: Sample Library883561
-Node: Internal File Description884247
-Node: Internal File Ops887962
-Ref: Internal File Ops-Footnote-1892743
-Node: Using Internal File Ops892883
-Node: Future Extensions895260
-Node: Basic Concepts897764
-Node: Basic High Level898521
-Ref: Basic High Level-Footnote-1902556
-Node: Basic Data Typing902741
-Node: Floating Point Issues907266
-Node: String Conversion Precision908349
-Ref: String Conversion Precision-Footnote-1910049
-Node: Unexpected Results910158
-Node: POSIX Floating Point Problems911984
-Ref: POSIX Floating Point Problems-Footnote-1915689
-Node: Glossary915727
-Node: Copying940703
-Node: GNU Free Documentation License978260
-Node: Index1003397
->>>>>>> gawk-4.0-stable
+Node: Foreword30270
+Node: Preface34615
+Ref: Preface-Footnote-137668
+Ref: Preface-Footnote-237774
+Node: History38006
+Node: Names40397
+Ref: Names-Footnote-141874
+Node: This Manual41946
+Ref: This Manual-Footnote-146893
+Node: Conventions46993
+Node: Manual History49127
+Ref: Manual History-Footnote-152397
+Ref: Manual History-Footnote-252438
+Node: How To Contribute52512
+Node: Acknowledgments53656
+Node: Getting Started57987
+Node: Running gawk60366
+Node: One-shot61552
+Node: Read Terminal62777
+Ref: Read Terminal-Footnote-164427
+Ref: Read Terminal-Footnote-264703
+Node: Long64874
+Node: Executable Scripts66250
+Ref: Executable Scripts-Footnote-168119
+Ref: Executable Scripts-Footnote-268221
+Node: Comments68672
+Node: Quoting71139
+Node: DOS Quoting75762
+Node: Sample Data Files76437
+Node: Very Simple79469
+Node: Two Rules84068
+Node: More Complex86215
+Ref: More Complex-Footnote-189145
+Node: Statements/Lines89230
+Ref: Statements/Lines-Footnote-193692
+Node: Other Features93957
+Node: When94885
+Node: Invoking Gawk97032
+Node: Command Line98417
+Node: Options99200
+Ref: Options-Footnote-1112637
+Node: Other Arguments112662
+Node: Naming Standard Input115320
+Node: Environment Variables116414
+Node: AWKPATH Variable116858
+Ref: AWKPATH Variable-Footnote-1119455
+Node: Other Environment Variables119715
+Node: Exit Status122055
+Node: Include Files122730
+Node: Obsolete126215
+Node: Undocumented126901
+Node: Regexp127142
+Node: Regexp Usage128531
+Node: Escape Sequences130557
+Node: Regexp Operators136320
+Ref: Regexp Operators-Footnote-1143517
+Ref: Regexp Operators-Footnote-2143664
+Node: Bracket Expressions143762
+Ref: table-char-classes145652
+Node: GNU Regexp Operators148175
+Node: Case-sensitivity151898
+Ref: Case-sensitivity-Footnote-1154866
+Ref: Case-sensitivity-Footnote-2155101
+Node: Leftmost Longest155209
+Node: Computed Regexps156410
+Node: Reading Files159820
+Node: Records161761
+Ref: Records-Footnote-1170435
+Node: Fields170472
+Ref: Fields-Footnote-1173505
+Node: Nonconstant Fields173591
+Node: Changing Fields175793
+Node: Field Separators181774
+Node: Default Field Splitting184403
+Node: Regexp Field Splitting185520
+Node: Single Character Fields188862
+Node: Command Line Field Separator189921
+Node: Field Splitting Summary193362
+Ref: Field Splitting Summary-Footnote-1196554
+Node: Constant Size196655
+Node: Splitting By Content201239
+Ref: Splitting By Content-Footnote-1204965
+Node: Multiple Line205005
+Ref: Multiple Line-Footnote-1210852
+Node: Getline211031
+Node: Plain Getline213259
+Node: Getline/Variable215348
+Node: Getline/File216489
+Node: Getline/Variable/File217811
+Ref: Getline/Variable/File-Footnote-1219410
+Node: Getline/Pipe219497
+Node: Getline/Variable/Pipe222057
+Node: Getline/Coprocess223164
+Node: Getline/Variable/Coprocess224407
+Node: Getline Notes225121
+Node: Getline Summary227063
+Ref: table-getline-variants227406
+Node: Command line directories228262
+Node: Printing228887
+Node: Print230518
+Node: Print Examples231855
+Node: Output Separators234639
+Node: OFMT236399
+Node: Printf237757
+Node: Basic Printf238663
+Node: Control Letters240202
+Node: Format Modifiers244014
+Node: Printf Examples250023
+Node: Redirection252738
+Node: Special Files259722
+Node: Special FD260255
+Ref: Special FD-Footnote-1263880
+Node: Special Network263954
+Node: Special Caveats264804
+Node: Close Files And Pipes265600
+Ref: Close Files And Pipes-Footnote-1272623
+Ref: Close Files And Pipes-Footnote-2272771
+Node: Expressions272921
+Node: Values274053
+Node: Constants274729
+Node: Scalar Constants275409
+Ref: Scalar Constants-Footnote-1276268
+Node: Nondecimal-numbers276450
+Node: Regexp Constants279509
+Node: Using Constant Regexps279984
+Node: Variables283039
+Node: Using Variables283694
+Node: Assignment Options285418
+Node: Conversion287290
+Ref: table-locale-affects292666
+Ref: Conversion-Footnote-1293290
+Node: All Operators293399
+Node: Arithmetic Ops294029
+Node: Concatenation296534
+Ref: Concatenation-Footnote-1299327
+Node: Assignment Ops299447
+Ref: table-assign-ops304435
+Node: Increment Ops305843
+Node: Truth Values and Conditions309313
+Node: Truth Values310396
+Node: Typing and Comparison311445
+Node: Variable Typing312234
+Ref: Variable Typing-Footnote-1316131
+Node: Comparison Operators316253
+Ref: table-relational-ops316663
+Node: POSIX String Comparison320212
+Ref: POSIX String Comparison-Footnote-1321168
+Node: Boolean Ops321306
+Ref: Boolean Ops-Footnote-1325384
+Node: Conditional Exp325475
+Node: Function Calls327207
+Node: Precedence330801
+Node: Locales334470
+Node: Patterns and Actions335559
+Node: Pattern Overview336613
+Node: Regexp Patterns338282
+Node: Expression Patterns338825
+Node: Ranges342510
+Node: BEGIN/END345476
+Node: Using BEGIN/END346238
+Ref: Using BEGIN/END-Footnote-1348969
+Node: I/O And BEGIN/END349075
+Node: BEGINFILE/ENDFILE351357
+Node: Empty354250
+Node: Using Shell Variables354566
+Node: Action Overview356851
+Node: Statements359208
+Node: If Statement361062
+Node: While Statement362561
+Node: Do Statement364605
+Node: For Statement365761
+Node: Switch Statement368913
+Node: Break Statement371010
+Node: Continue Statement373000
+Node: Next Statement374793
+Node: Nextfile Statement377183
+Node: Exit Statement379728
+Node: Built-in Variables382144
+Node: User-modified383239
+Ref: User-modified-Footnote-1391265
+Node: Auto-set391327
+Ref: Auto-set-Footnote-1400618
+Node: ARGC and ARGV400823
+Node: Arrays404674
+Node: Array Basics406179
+Node: Array Intro407005
+Node: Reference to Elements411323
+Node: Assigning Elements413593
+Node: Array Example414084
+Node: Scanning an Array415816
+Node: Controlling Scanning418130
+Ref: Controlling Scanning-Footnote-1423063
+Node: Delete423379
+Ref: Delete-Footnote-1425814
+Node: Numeric Array Subscripts425871
+Node: Uninitialized Subscripts428054
+Node: Multi-dimensional429682
+Node: Multi-scanning432776
+Node: Arrays of Arrays434367
+Node: Functions439012
+Node: Built-in439834
+Node: Calling Built-in440912
+Node: Numeric Functions442900
+Ref: Numeric Functions-Footnote-1446665
+Ref: Numeric Functions-Footnote-2447022
+Ref: Numeric Functions-Footnote-3447070
+Node: String Functions447339
+Ref: String Functions-Footnote-1470836
+Ref: String Functions-Footnote-2470965
+Ref: String Functions-Footnote-3471213
+Node: Gory Details471300
+Ref: table-sub-escapes472979
+Ref: table-sub-posix-92474333
+Ref: table-sub-proposed475676
+Ref: table-posix-sub477026
+Ref: table-gensub-escapes478572
+Ref: Gory Details-Footnote-1479779
+Ref: Gory Details-Footnote-2479830
+Node: I/O Functions479981
+Ref: I/O Functions-Footnote-1486636
+Node: Time Functions486783
+Ref: Time Functions-Footnote-1497675
+Ref: Time Functions-Footnote-2497743
+Ref: Time Functions-Footnote-3497901
+Ref: Time Functions-Footnote-4498012
+Ref: Time Functions-Footnote-5498124
+Ref: Time Functions-Footnote-6498351
+Node: Bitwise Functions498617
+Ref: table-bitwise-ops499175
+Ref: Bitwise Functions-Footnote-1503335
+Node: Type Functions503519
+Node: I18N Functions503989
+Node: User-defined505616
+Node: Definition Syntax506420
+Ref: Definition Syntax-Footnote-1511330
+Node: Function Example511399
+Node: Function Caveats513993
+Node: Calling A Function514414
+Node: Variable Scope515529
+Node: Pass By Value/Reference517504
+Node: Return Statement520944
+Node: Dynamic Typing523925
+Node: Indirect Calls524660
+Node: Internationalization534345
+Node: I18N and L10N535771
+Node: Explaining gettext536457
+Ref: Explaining gettext-Footnote-1541523
+Ref: Explaining gettext-Footnote-2541707
+Node: Programmer i18n541872
+Node: Translator i18n546072
+Node: String Extraction546865
+Ref: String Extraction-Footnote-1547826
+Node: Printf Ordering547912
+Ref: Printf Ordering-Footnote-1550696
+Node: I18N Portability550760
+Ref: I18N Portability-Footnote-1553209
+Node: I18N Example553272
+Ref: I18N Example-Footnote-1555907
+Node: Gawk I18N555979
+Node: Advanced Features556596
+Node: Nondecimal Data558109
+Node: Array Sorting559692
+Node: Controlling Array Traversal560389
+Node: Array Sorting Functions568626
+Ref: Array Sorting Functions-Footnote-1572300
+Ref: Array Sorting Functions-Footnote-2572393
+Node: Two-way I/O572587
+Ref: Two-way I/O-Footnote-1578019
+Node: TCP/IP Networking578089
+Node: Profiling580933
+Node: Library Functions588407
+Ref: Library Functions-Footnote-1591414
+Node: Library Names591585
+Ref: Library Names-Footnote-1595056
+Ref: Library Names-Footnote-2595276
+Node: General Functions595362
+Node: Strtonum Function596315
+Node: Assert Function599245
+Node: Round Function602571
+Node: Cliff Random Function604114
+Node: Ordinal Functions605130
+Ref: Ordinal Functions-Footnote-1608200
+Ref: Ordinal Functions-Footnote-2608452
+Node: Join Function608661
+Ref: Join Function-Footnote-1610432
+Node: Gettimeofday Function610632
+Node: Data File Management614347
+Node: Filetrans Function614979
+Node: Rewind Function619118
+Node: File Checking620505
+Node: Empty Files621599
+Node: Ignoring Assigns623829
+Node: Getopt Function625382
+Ref: Getopt Function-Footnote-1636686
+Node: Passwd Functions636889
+Ref: Passwd Functions-Footnote-1645864
+Node: Group Functions645952
+Node: Walking Arrays654036
+Node: Sample Programs655605
+Node: Running Examples656270
+Node: Clones656998
+Node: Cut Program658222
+Node: Egrep Program668067
+Ref: Egrep Program-Footnote-1675840
+Node: Id Program675950
+Node: Split Program679566
+Ref: Split Program-Footnote-1683085
+Node: Tee Program683213
+Node: Uniq Program686016
+Node: Wc Program693445
+Ref: Wc Program-Footnote-1697711
+Ref: Wc Program-Footnote-2697911
+Node: Miscellaneous Programs698003
+Node: Dupword Program699191
+Node: Alarm Program701222
+Node: Translate Program705971
+Ref: Translate Program-Footnote-1710358
+Ref: Translate Program-Footnote-2710586
+Node: Labels Program710720
+Ref: Labels Program-Footnote-1714091
+Node: Word Sorting714175
+Node: History Sorting718059
+Node: Extract Program719898
+Ref: Extract Program-Footnote-1727381
+Node: Simple Sed727509
+Node: Igawk Program730571
+Ref: Igawk Program-Footnote-1745728
+Ref: Igawk Program-Footnote-2745929
+Node: Anagram Program746067
+Node: Signature Program749135
+Node: Debugger750235
+Node: Debugging751146
+Node: Debugging Concepts751559
+Node: Debugging Terms753415
+Node: Awk Debugging756038
+Node: Sample dgawk session756930
+Node: dgawk invocation757422
+Node: Finding The Bug758604
+Node: List of Debugger Commands765090
+Node: Breakpoint Control766401
+Node: Dgawk Execution Control770037
+Node: Viewing And Changing Data773388
+Node: Dgawk Stack776725
+Node: Dgawk Info778185
+Node: Miscellaneous Dgawk Commands782133
+Node: Readline Support787561
+Node: Dgawk Limitations788399
+Node: Language History790588
+Node: V7/SVR3.1792100
+Node: SVR4794421
+Node: POSIX795863
+Node: BTL796871
+Node: POSIX/GNU797605
+Node: Common Extensions802756
+Node: Ranges and Locales803863
+Ref: Ranges and Locales-Footnote-1808467
+Node: Contributors808688
+Node: Installation812950
+Node: Gawk Distribution813844
+Node: Getting814328
+Node: Extracting815154
+Node: Distribution contents816846
+Node: Unix Installation822068
+Node: Quick Installation822685
+Node: Additional Configuration Options824647
+Node: Configuration Philosophy826124
+Node: Non-Unix Installation828466
+Node: PC Installation828924
+Node: PC Binary Installation830223
+Node: PC Compiling832071
+Node: PC Testing835015
+Node: PC Using836191
+Node: Cygwin840376
+Node: MSYS841376
+Node: VMS Installation841890
+Node: VMS Compilation842493
+Ref: VMS Compilation-Footnote-1843500
+Node: VMS Installation Details843558
+Node: VMS Running845193
+Node: VMS Old Gawk846800
+Node: Bugs847274
+Node: Other Versions851126
+Node: Notes856407
+Node: Compatibility Mode857099
+Node: Additions857882
+Node: Accessing The Source858694
+Node: Adding Code860119
+Node: New Ports866086
+Node: Dynamic Extensions870199
+Node: Internals871575
+Node: Plugin License880094
+Node: Sample Library880728
+Node: Internal File Description881414
+Node: Internal File Ops885129
+Ref: Internal File Ops-Footnote-1889853
+Node: Using Internal File Ops889993
+Node: Future Extensions892370
+Node: Basic Concepts894874
+Node: Basic High Level895631
+Ref: Basic High Level-Footnote-1899666
+Node: Basic Data Typing899851
+Node: Floating Point Issues904376
+Node: String Conversion Precision905459
+Ref: String Conversion Precision-Footnote-1907159
+Node: Unexpected Results907268
+Node: POSIX Floating Point Problems909094
+Ref: POSIX Floating Point Problems-Footnote-1912799
+Node: Glossary912837
+Node: Copying937813
+Node: GNU Free Documentation License975370
+Node: Index1000507

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index fc569ffc..dfd620f6 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -20,9 +20,9 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH June, 2011
+@set UPDATE-MONTH November, 2011
@set VERSION 4.0
-@set PATCHLEVEL 0
+@set PATCHLEVEL 1
@set FSF
@@ -306,439 +306,399 @@ particular records in a file and perform operations upon them.
* Index:: Concept and Variable Index.
@detailmenu
-* History:: The history of @command{gawk} and
- @command{awk}.
-* Names:: What name to use to find @command{awk}.
-* This Manual:: Using this @value{DOCUMENT}. Includes
- sample input files that you can use.
-* Conventions:: Typographical Conventions.
-* Manual History:: Brief history of the GNU project and
- this @value{DOCUMENT}.
-* How To Contribute:: Helping to save the world.
-* Acknowledgments:: Acknowledgments.
-* Running gawk:: How to run @command{gawk} programs;
- includes command-line syntax.
-* One-shot:: Running a short throwaway @command{awk}
- program.
-* Read Terminal:: Using no input files (input from
- terminal instead).
-* Long:: Putting permanent @command{awk}
- programs in files.
-* Executable Scripts:: Making self-contained @command{awk}
- programs.
-* Comments:: Adding documentation to @command{gawk}
- programs.
-* Quoting:: More discussion of shell quoting
- issues.
-* DOS Quoting:: Quoting in Windows Batch Files.
-* Sample Data Files:: Sample data files for use in the
- @command{awk} programs illustrated in
- this @value{DOCUMENT}.
-* Very Simple:: A very simple example.
-* Two Rules:: A less simple one-line example using
- two rules.
-* More Complex:: A more complex example.
-* Statements/Lines:: Subdividing or combining statements
- into lines.
-* Other Features:: Other Features of @command{awk}.
-* When:: When to use @command{gawk} and when to
- use other things.
-* Command Line:: How to run @command{awk}.
-* Options:: Command-line options and their
- meanings.
-* Other Arguments:: Input file names and variable
- assignments.
-* Naming Standard Input:: How to specify standard input with
- other files.
-* Environment Variables:: The environment variables
- @command{gawk} uses.
-* AWKPATH Variable:: Searching directories for @command{awk}
- programs.
-* Other Environment Variables:: The environment variables.
-* Exit Status:: @command{gawk}'s exit status.
-* Include Files:: Including other files into your
- program.
-* Obsolete:: Obsolete Options and/or features.
-* Undocumented:: Undocumented Options and Features.
-* Regexp Usage:: How to Use Regular Expressions.
-* Escape Sequences:: How to write nonprinting characters.
-* Regexp Operators:: Regular Expression Operators.
-* Bracket Expressions:: What can go between @samp{[...]}.
-* GNU Regexp Operators:: Operators specific to GNU software.
-* Case-sensitivity:: How to do case-insensitive matching.
-* Leftmost Longest:: How much text matches.
-* Computed Regexps:: Using Dynamic Regexps.
-* Records:: Controlling how data is split into
- records.
-* Fields:: An introduction to fields.
-* Nonconstant Fields:: Nonconstant Field Numbers.
-* Changing Fields:: Changing the Contents of a Field.
-* Field Separators:: The field separator and how to change
- it.
-* Default Field Splitting:: How fields are normally separated.
-* Regexp Field Splitting:: Using regexps as the field separator.
-* Single Character Fields:: Making each character a separate field.
-* Command Line Field Separator:: Setting @code{FS} from the
- command-line.
-* Field Splitting Summary:: Some final points and a summary table.
-* Constant Size:: Reading constant width data.
-* Splitting By Content:: Defining Fields By Content
-* Multiple Line:: Reading multi-line records.
-* Getline:: Reading files under explicit program
- control using the @code{getline}
- function.
-* Plain Getline:: Using @code{getline} with no arguments.
-* Getline/Variable:: Using @code{getline} into a variable.
-* Getline/File:: Using @code{getline} from a file.
-* Getline/Variable/File:: Using @code{getline} into a variable
- from a file.
-* Getline/Pipe:: Using @code{getline} from a pipe.
-* Getline/Variable/Pipe:: Using @code{getline} into a variable
- from a pipe.
-* Getline/Coprocess:: Using @code{getline} from a coprocess.
-* Getline/Variable/Coprocess:: Using @code{getline} into a variable
- from a coprocess.
-* Getline Notes:: Important things to know about
- @code{getline}.
-* Getline Summary:: Summary of @code{getline} Variants.
-* Command line directories:: What happens if you put a directory on
- the command line.
-* Print:: The @code{print} statement.
-* Print Examples:: Simple examples of @code{print}
- statements.
-* Output Separators:: The output separators and how to change
- them.
-* OFMT:: Controlling Numeric Output With
- @code{print}.
-* Printf:: The @code{printf} statement.
-* Basic Printf:: Syntax of the @code{printf} statement.
-* Control Letters:: Format-control letters.
-* Format Modifiers:: Format-specification modifiers.
-* Printf Examples:: Several examples.
-* Redirection:: How to redirect output to multiple
- files and pipes.
-* Special Files:: File name interpretation in
- @command{gawk}. @command{gawk} allows
- access to inherited file descriptors.
-* Special FD:: Special files for I/O.
-* Special Network:: Special files for network
- communications.
-* Special Caveats:: Things to watch out for.
-* Close Files And Pipes:: Closing Input and Output Files and
- Pipes.
-* Values:: Constants, Variables, and Regular
- Expressions.
-* Constants:: String, numeric and regexp constants.
-* Scalar Constants:: Numeric and string constants.
-* Nondecimal-numbers:: What are octal and hex numbers.
-* Regexp Constants:: Regular Expression constants.
-* Using Constant Regexps:: When and how to use a regexp constant.
-* Variables:: Variables give names to values for
- later use.
-* Using Variables:: Using variables in your programs.
-* Assignment Options:: Setting variables on the command-line
- and a summary of command-line syntax.
- This is an advanced method of input.
-* Conversion:: The conversion of strings to numbers
- and vice versa.
-* All Operators:: @command{gawk}'s operators.
-* Arithmetic Ops:: Arithmetic operations (@samp{+},
- @samp{-}, etc.)
-* Concatenation:: Concatenating strings.
-* Assignment Ops:: Changing the value of a variable or a
- field.
-* Increment Ops:: Incrementing the numeric value of a
- variable.
-* Truth Values and Conditions:: Testing for true and false.
-* Truth Values:: What is ``true'' and what is ``false''.
-* Typing and Comparison:: How variables acquire types and how
- this affects comparison of numbers and
- strings with @samp{<}, etc.
-* Variable Typing:: String type versus numeric type.
-* Comparison Operators:: The comparison operators.
-* POSIX String Comparison:: String comparison with POSIX rules.
-* Boolean Ops:: Combining comparison expressions using
- boolean operators @samp{||} (``or''),
- @samp{&&} (``and'') and @samp{!}
- (``not'').
-* Conditional Exp:: Conditional expressions select between
- two subexpressions under control of a
- third subexpression.
-* Function Calls:: A function call is an expression.
-* Precedence:: How various operators nest.
-* Locales:: How the locale affects things.
-* Pattern Overview:: What goes into a pattern.
-* Regexp Patterns:: Using regexps as patterns.
-* Expression Patterns:: Any expression can be used as a
- pattern.
-* Ranges:: Pairs of patterns specify record
- ranges.
-* BEGIN/END:: Specifying initialization and cleanup
- rules.
-* Using BEGIN/END:: How and why to use BEGIN/END rules.
-* I/O And BEGIN/END:: I/O issues in BEGIN/END rules.
-* BEGINFILE/ENDFILE:: Two special patterns for advanced
- control.
-* Empty:: The empty pattern, which matches every
- record.
-* Using Shell Variables:: How to use shell variables with
- @command{awk}.
-* Action Overview:: What goes into an action.
-* Statements:: Describes the various control
- statements in detail.
-* If Statement:: Conditionally execute some
- @command{awk} statements.
-* While Statement:: Loop until some condition is satisfied.
-* Do Statement:: Do specified action while looping until
- some condition is satisfied.
-* For Statement:: Another looping statement, that
- provides initialization and increment
- clauses.
-* Switch Statement:: Switch/case evaluation for conditional
- execution of statements based on a
- value.
-* Break Statement:: Immediately exit the innermost
- enclosing loop.
-* Continue Statement:: Skip to the end of the innermost
- enclosing loop.
-* Next Statement:: Stop processing the current input
- record.
-* Nextfile Statement:: Stop processing the current file.
-* Exit Statement:: Stop execution of @command{awk}.
-* Built-in Variables:: Summarizes the built-in variables.
-* User-modified:: Built-in variables that you change to
- control @command{awk}.
-* Auto-set:: Built-in variables where @command{awk}
- gives you information.
-* ARGC and ARGV:: Ways to use @code{ARGC} and
- @code{ARGV}.
-* Array Basics:: The basics of arrays.
-* Array Intro:: Introduction to Arrays
-* Reference to Elements:: How to examine one element of an array.
-* Assigning Elements:: How to change an element of an array.
-* Array Example:: Basic Example of an Array
-* Scanning an Array:: A variation of the @code{for}
- statement. It loops through the indices
- of an array's existing elements.
-* Delete:: The @code{delete} statement removes an
- element from an array.
-* Numeric Array Subscripts:: How to use numbers as subscripts in
- @command{awk}.
-* Uninitialized Subscripts:: Using Uninitialized variables as
- subscripts.
-* Multi-dimensional:: Emulating multidimensional arrays in
- @command{awk}.
-* Multi-scanning:: Scanning multidimensional arrays.
-* Arrays of Arrays:: True multidimensional arrays.
-* Built-in:: Summarizes the built-in functions.
-* Calling Built-in:: How to call built-in functions.
-* Numeric Functions:: Functions that work with numbers,
- including @code{int()}, @code{sin()}
- and @code{rand()}.
-* String Functions:: Functions for string manipulation, such
- as @code{split()}, @code{match()} and
- @code{sprintf()}.
-* Gory Details:: More than you want to know about
- @samp{\} and @samp{&} with
- @code{sub()}, @code{gsub()}, and
- @code{gensub()}.
-* I/O Functions:: Functions for files and shell commands.
-* Time Functions:: Functions for dealing with timestamps.
-* Bitwise Functions:: Functions for bitwise operations.
-* Type Functions:: Functions for type information.
-* I18N Functions:: Functions for string translation.
-* User-defined:: Describes User-defined functions in
- detail.
-* Definition Syntax:: How to write definitions and what they
- mean.
-* Function Example:: An example function definition and what
- it does.
-* Function Caveats:: Things to watch out for.
-* Calling A Function:: Don't use spaces.
-* Variable Scope:: Controlling variable scope.
-* Pass By Value/Reference:: Passing parameters.
-* Return Statement:: Specifying the value a function
- returns.
-* Dynamic Typing:: How variable types can change at
- runtime.
-* Indirect Calls:: Choosing the function to call at
- runtime.
-* I18N and L10N:: Internationalization and Localization.
-* Explaining gettext:: How GNU @code{gettext} works.
-* Programmer i18n:: Features for the programmer.
-* Translator i18n:: Features for the translator.
-* String Extraction:: Extracting marked strings.
-* Printf Ordering:: Rearranging @code{printf} arguments.
-* I18N Portability:: @command{awk}-level portability issues.
-* I18N Example:: A simple i18n example.
-* Gawk I18N:: @command{gawk} is also
- internationalized.
-* Nondecimal Data:: Allowing nondecimal input data.
-* Array Sorting:: Facilities for controlling array
- traversal and sorting arrays.
-* Controlling Array Traversal:: How to use PROCINFO["sorted_in"].
-* Controlling Scanning With A Function:: Using a function to control scanning.
-* Controlling Scanning:: Controlling the order in which arrays
- are scanned.
-* Array Sorting Functions:: How to use @code{asort()} and
- @code{asorti()}.
-* Two-way I/O:: Two-way communications with another
- process.
-* TCP/IP Networking:: Using @command{gawk} for network
- programming.
-* Profiling:: Profiling your @command{awk} programs.
-* Library Names:: How to best name private global
- variables in library functions.
-* General Functions:: Functions that are of general use.
-* Strtonum Function:: A replacement for the built-in
- @code{strtonum()} function.
-* Assert Function:: A function for assertions in
- @command{awk} programs.
-* Round Function:: A function for rounding if
- @code{sprintf()} does not do it
- correctly.
-* Cliff Random Function:: The Cliff Random Number Generator.
-* Ordinal Functions:: Functions for using characters as
- numbers and vice versa.
-* Join Function:: A function to join an array into a
- string.
-* Gettimeofday Function:: A function to get formatted times.
-* Data File Management:: Functions for managing command-line
- data files.
-* Filetrans Function:: A function for handling data file
- transitions.
-* Rewind Function:: A function for rereading the current
- file.
-* File Checking:: Checking that data files are readable.
-* Empty Files:: Checking for zero-length files.
-* Ignoring Assigns:: Treating assignments as file names.
-* Getopt Function:: A function for processing command-line
- arguments.
-* Passwd Functions:: Functions for getting user information.
-* Group Functions:: Functions for getting group
- information.
-* Walking Arrays:: A function to walk arrays of arrays.
-* Running Examples:: How to run these examples.
-* Clones:: Clones of common utilities.
-* Cut Program:: The @command{cut} utility.
-* Egrep Program:: The @command{egrep} utility.
-* Id Program:: The @command{id} utility.
-* Split Program:: The @command{split} utility.
-* Tee Program:: The @command{tee} utility.
-* Uniq Program:: The @command{uniq} utility.
-* Wc Program:: The @command{wc} utility.
-* Miscellaneous Programs:: Some interesting @command{awk}
- programs.
-* Dupword Program:: Finding duplicated words in a document.
-* Alarm Program:: An alarm clock.
-* Translate Program:: A program similar to the @command{tr}
- utility.
-* Labels Program:: Printing mailing labels.
-* Word Sorting:: A program to produce a word usage
- count.
-* History Sorting:: Eliminating duplicate entries from a
- history file.
-* Extract Program:: Pulling out programs from Texinfo
- source files.
-* Simple Sed:: A Simple Stream Editor.
-* Igawk Program:: A wrapper for @command{awk} that
- includes files.
-* Anagram Program:: Finding anagrams from a dictionary.
-* Signature Program:: People do amazing things with too much
- time on their hands.
-* Debugging:: Introduction to @command{dgawk}.
-* Debugging Concepts:: Debugging In General.
-* Debugging Terms:: Additional Debugging Concepts.
-* Awk Debugging:: Awk Debugging.
-* Sample dgawk session:: Sample @command{dgawk} session.
-* dgawk invocation:: @command{dgawk} Invocation.
-* Finding The Bug:: Finding The Bug.
-* List of Debugger Commands:: Main @command{dgawk} Commands.
-* Breakpoint Control:: Control of breakpoints.
-* Dgawk Execution Control:: Control of execution.
-* Viewing And Changing Data:: Viewing and changing data.
-* Dgawk Stack:: Dealing with the stack.
-* Dgawk Info:: Obtaining information about the program
- and the debugger state.
-* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
-* Readline Support:: Readline Support.
-* Dgawk Limitations:: Limitations and future plans.
-* V7/SVR3.1:: The major changes between V7 and System
- V Release 3.1.
-* SVR4:: Minor changes between System V Releases
- 3.1 and 4.
-* POSIX:: New features from the POSIX standard.
-* BTL:: New features from Brian Kernighan's
- version of @command{awk}.
-* POSIX/GNU:: The extensions in @command{gawk} not in
- POSIX @command{awk}.
-* Common Extensions:: Common Extensions Summary.
-* Ranges and Locales:: How locales used to affect regexp
- ranges.
-* Contributors:: The major contributors to
- @command{gawk}.
-* Gawk Distribution:: What is in the @command{gawk}
- distribution.
-* Getting:: How to get the distribution.
-* Extracting:: How to extract the distribution.
-* Distribution contents:: What is in the distribution.
-* Unix Installation:: Installing @command{gawk} under various
- versions of Unix.
-* Quick Installation:: Compiling @command{gawk} under Unix.
-* Additional Configuration Options:: Other compile-time options.
-* Configuration Philosophy:: How it's all supposed to work.
-* Non-Unix Installation:: Installation on Other Operating
- Systems.
-* PC Installation:: Installing and Compiling @command{gawk}
- on MS-DOS and OS/2.
-* PC Binary Installation:: Installing a prepared distribution.
-* PC Compiling:: Compiling @command{gawk} for MS-DOS,
- Windows32, and OS/2.
-* PC Testing:: Testing @command{gawk} on PC systems.
-* PC Using:: Running @command{gawk} on MS-DOS,
- Windows32 and OS/2.
-* Cygwin:: Building and running @command{gawk} for
- Cygwin.
-* MSYS:: Using @command{gawk} In The MSYS
- Environment.
-* VMS Installation:: Installing @command{gawk} on VMS.
-* VMS Compilation:: How to compile @command{gawk} under
- VMS.
-* VMS Installation Details:: How to install @command{gawk} under
- VMS.
-* VMS Running:: How to run @command{gawk} under VMS.
-* VMS Old Gawk:: An old version comes with some VMS
- systems.
-* Bugs:: Reporting Problems and Bugs.
-* Other Versions:: Other freely available @command{awk}
- implementations.
-* Compatibility Mode:: How to disable certain @command{gawk}
- extensions.
-* Additions:: Making Additions To @command{gawk}.
-* Accessing The Source:: Accessing the Git repository.
-* Adding Code:: Adding code to the main body of
- @command{gawk}.
-* New Ports:: Porting @command{gawk} to a new
- operating system.
-* Dynamic Extensions:: Adding new built-in functions to
- @command{gawk}.
-* Internals:: A brief look at some @command{gawk}
- internals.
-* Plugin License:: A note about licensing.
-* Sample Library:: A example of new functions.
-* Internal File Description:: What the new functions will do.
-* Internal File Ops:: The code for internal file operations.
-* Using Internal File Ops:: How to use an external extension.
-* Future Extensions:: New features that may be implemented
- one day.
-* Basic High Level:: The high level view.
-* Basic Data Typing:: A very quick intro to data types.
-* Floating Point Issues:: Stuff to know about floating-point
- numbers.
-* String Conversion Precision:: The String Value Can Lie.
-* Unexpected Results:: Floating Point Numbers Are Not Abstract
- Numbers.
-* POSIX Floating Point Problems:: Standards Versus Existing Practice.
+* History:: The history of @command{gawk} and
+ @command{awk}.
+* Names:: What name to use to find @command{awk}.
+* This Manual:: Using this @value{DOCUMENT}. Includes
+ sample input files that you can use.
+* Conventions:: Typographical Conventions.
+* Manual History:: Brief history of the GNU project and this
+ @value{DOCUMENT}.
+* How To Contribute:: Helping to save the world.
+* Acknowledgments:: Acknowledgments.
+* Running gawk:: How to run @command{gawk} programs;
+ includes command-line syntax.
+* One-shot:: Running a short throwaway @command{awk}
+ program.
+* Read Terminal:: Using no input files (input from terminal
+ instead).
+* Long:: Putting permanent @command{awk} programs in
+ files.
+* Executable Scripts:: Making self-contained @command{awk}
+ programs.
+* Comments:: Adding documentation to @command{gawk}
+ programs.
+* Quoting:: More discussion of shell quoting issues.
+* DOS Quoting:: Quoting in Windows Batch Files.
+* Sample Data Files:: Sample data files for use in the
+ @command{awk} programs illustrated in this
+ @value{DOCUMENT}.
+* Very Simple:: A very simple example.
+* Two Rules:: A less simple one-line example using two
+ rules.
+* More Complex:: A more complex example.
+* Statements/Lines:: Subdividing or combining statements into
+ lines.
+* Other Features:: Other Features of @command{awk}.
+* When:: When to use @command{gawk} and when to use
+ other things.
+* Command Line:: How to run @command{awk}.
+* Options:: Command-line options and their meanings.
+* Other Arguments:: Input file names and variable assignments.
+* Naming Standard Input:: How to specify standard input with other
+ files.
+* Environment Variables:: The environment variables @command{gawk}
+ uses.
+* AWKPATH Variable:: Searching directories for @command{awk}
+ programs.
+* Other Environment Variables:: The environment variables.
+* Exit Status:: @command{gawk}'s exit status.
+* Include Files:: Including other files into your program.
+* Obsolete:: Obsolete Options and/or features.
+* Undocumented:: Undocumented Options and Features.
+* Regexp Usage:: How to Use Regular Expressions.
+* Escape Sequences:: How to write nonprinting characters.
+* Regexp Operators:: Regular Expression Operators.
+* Bracket Expressions:: What can go between @samp{[...]}.
+* GNU Regexp Operators:: Operators specific to GNU software.
+* Case-sensitivity:: How to do case-insensitive matching.
+* Leftmost Longest:: How much text matches.
+* Computed Regexps:: Using Dynamic Regexps.
+* Records:: Controlling how data is split into records.
+* Fields:: An introduction to fields.
+* Nonconstant Fields:: Nonconstant Field Numbers.
+* Changing Fields:: Changing the Contents of a Field.
+* Field Separators:: The field separator and how to change it.
+* Default Field Splitting:: How fields are normally separated.
+* Regexp Field Splitting:: Using regexps as the field separator.
+* Single Character Fields:: Making each character a separate field.
+* Command Line Field Separator:: Setting @code{FS} from the command-line.
+* Field Splitting Summary:: Some final points and a summary table.
+* Constant Size:: Reading constant width data.
+* Splitting By Content:: Defining Fields By Content
+* Multiple Line:: Reading multi-line records.
+* Getline:: Reading files under explicit program
+ control using the @code{getline} function.
+* Plain Getline:: Using @code{getline} with no arguments.
+* Getline/Variable:: Using @code{getline} into a variable.
+* Getline/File:: Using @code{getline} from a file.
+* Getline/Variable/File:: Using @code{getline} into a variable from a
+ file.
+* Getline/Pipe:: Using @code{getline} from a pipe.
+* Getline/Variable/Pipe:: Using @code{getline} into a variable from a
+ pipe.
+* Getline/Coprocess:: Using @code{getline} from a coprocess.
+* Getline/Variable/Coprocess:: Using @code{getline} into a variable from a
+ coprocess.
+* Getline Notes:: Important things to know about
+ @code{getline}.
+* Getline Summary:: Summary of @code{getline} Variants.
+* Command line directories:: What happens if you put a directory on the
+ command line.
+* Print:: The @code{print} statement.
+* Print Examples:: Simple examples of @code{print} statements.
+* Output Separators:: The output separators and how to change
+ them.
+* OFMT:: Controlling Numeric Output With
+ @code{print}.
+* Printf:: The @code{printf} statement.
+* Basic Printf:: Syntax of the @code{printf} statement.
+* Control Letters:: Format-control letters.
+* Format Modifiers:: Format-specification modifiers.
+* Printf Examples:: Several examples.
+* Redirection:: How to redirect output to multiple files
+ and pipes.
+* Special Files:: File name interpretation in @command{gawk}.
+ @command{gawk} allows access to inherited
+ file descriptors.
+* Special FD:: Special files for I/O.
+* Special Network:: Special files for network communications.
+* Special Caveats:: Things to watch out for.
+* Close Files And Pipes:: Closing Input and Output Files and Pipes.
+* Values:: Constants, Variables, and Regular
+ Expressions.
+* Constants:: String, numeric and regexp constants.
+* Scalar Constants:: Numeric and string constants.
+* Nondecimal-numbers:: What are octal and hex numbers.
+* Regexp Constants:: Regular Expression constants.
+* Using Constant Regexps:: When and how to use a regexp constant.
+* Variables:: Variables give names to values for later
+ use.
+* Using Variables:: Using variables in your programs.
+* Assignment Options:: Setting variables on the command-line and a
+ summary of command-line syntax. This is an
+ advanced method of input.
+* Conversion:: The conversion of strings to numbers and
+ vice versa.
+* All Operators:: @command{gawk}'s operators.
+* Arithmetic Ops:: Arithmetic operations (@samp{+}, @samp{-},
+ etc.)
+* Concatenation:: Concatenating strings.
+* Assignment Ops:: Changing the value of a variable or a
+ field.
+* Increment Ops:: Incrementing the numeric value of a
+ variable.
+* Truth Values and Conditions:: Testing for true and false.
+* Truth Values:: What is ``true'' and what is ``false''.
+* Typing and Comparison:: How variables acquire types and how this
+ affects comparison of numbers and strings
+ with @samp{<}, etc.
+* Variable Typing:: String type versus numeric type.
+* Comparison Operators:: The comparison operators.
+* POSIX String Comparison:: String comparison with POSIX rules.
+* Boolean Ops:: Combining comparison expressions using
+ boolean operators @samp{||} (``or''),
+ @samp{&&} (``and'') and @samp{!} (``not'').
+* Conditional Exp:: Conditional expressions select between two
+ subexpressions under control of a third
+ subexpression.
+* Function Calls:: A function call is an expression.
+* Precedence:: How various operators nest.
+* Locales:: How the locale affects things.
+* Pattern Overview:: What goes into a pattern.
+* Regexp Patterns:: Using regexps as patterns.
+* Expression Patterns:: Any expression can be used as a pattern.
+* Ranges:: Pairs of patterns specify record ranges.
+* BEGIN/END:: Specifying initialization and cleanup
+ rules.
+* Using BEGIN/END:: How and why to use BEGIN/END rules.
+* I/O And BEGIN/END:: I/O issues in BEGIN/END rules.
+* BEGINFILE/ENDFILE:: Two special patterns for advanced control.
+* Empty:: The empty pattern, which matches every
+ record.
+* Using Shell Variables:: How to use shell variables with
+ @command{awk}.
+* Action Overview:: What goes into an action.
+* Statements:: Describes the various control statements in
+ detail.
+* If Statement:: Conditionally execute some @command{awk}
+ statements.
+* While Statement:: Loop until some condition is satisfied.
+* Do Statement:: Do specified action while looping until
+ some condition is satisfied.
+* For Statement:: Another looping statement, that provides
+ initialization and increment clauses.
+* Switch Statement:: Switch/case evaluation for conditional
+ execution of statements based on a value.
+* Break Statement:: Immediately exit the innermost enclosing
+ loop.
+* Continue Statement:: Skip to the end of the innermost enclosing
+ loop.
+* Next Statement:: Stop processing the current input record.
+* Nextfile Statement:: Stop processing the current file.
+* Exit Statement:: Stop execution of @command{awk}.
+* Built-in Variables:: Summarizes the built-in variables.
+* User-modified:: Built-in variables that you change to
+ control @command{awk}.
+* Auto-set:: Built-in variables where @command{awk}
+ gives you information.
+* ARGC and ARGV:: Ways to use @code{ARGC} and @code{ARGV}.
+* Array Basics:: The basics of arrays.
+* Array Intro:: Introduction to Arrays
+* Reference to Elements:: How to examine one element of an array.
+* Assigning Elements:: How to change an element of an array.
+* Array Example:: Basic Example of an Array
+* Scanning an Array:: A variation of the @code{for} statement. It
+ loops through the indices of an array's
+ existing elements.
+* Controlling Scanning:: Controlling the order in which arrays are
+ scanned.
+* Delete:: The @code{delete} statement removes an
+ element from an array.
+* Numeric Array Subscripts:: How to use numbers as subscripts in
+ @command{awk}.
+* Uninitialized Subscripts:: Using Uninitialized variables as
+ subscripts.
+* Multi-dimensional:: Emulating multidimensional arrays in
+ @command{awk}.
+* Multi-scanning:: Scanning multidimensional arrays.
+* Arrays of Arrays:: True multidimensional arrays.
+* Built-in:: Summarizes the built-in functions.
+* Calling Built-in:: How to call built-in functions.
+* Numeric Functions:: Functions that work with numbers, including
+ @code{int()}, @code{sin()} and
+ @code{rand()}.
+* String Functions:: Functions for string manipulation, such as
+ @code{split()}, @code{match()} and
+ @code{sprintf()}.
+* Gory Details:: More than you want to know about @samp{\}
+ and @samp{&} with @code{sub()},
+ @code{gsub()}, and @code{gensub()}.
+* I/O Functions:: Functions for files and shell commands.
+* Time Functions:: Functions for dealing with timestamps.
+* Bitwise Functions:: Functions for bitwise operations.
+* Type Functions:: Functions for type information.
+* I18N Functions:: Functions for string translation.
+* User-defined:: Describes User-defined functions in detail.
+* Definition Syntax:: How to write definitions and what they
+ mean.
+* Function Example:: An example function definition and what it
+ does.
+* Function Caveats:: Things to watch out for.
+* Calling A Function:: Don't use spaces.
+* Variable Scope:: Controlling variable scope.
+* Pass By Value/Reference:: Passing parameters.
+* Return Statement:: Specifying the value a function returns.
+* Dynamic Typing:: How variable types can change at runtime.
+* Indirect Calls:: Choosing the function to call at runtime.
+* I18N and L10N:: Internationalization and Localization.
+* Explaining gettext:: How GNU @code{gettext} works.
+* Programmer i18n:: Features for the programmer.
+* Translator i18n:: Features for the translator.
+* String Extraction:: Extracting marked strings.
+* Printf Ordering:: Rearranging @code{printf} arguments.
+* I18N Portability:: @command{awk}-level portability issues.
+* I18N Example:: A simple i18n example.
+* Gawk I18N:: @command{gawk} is also internationalized.
+* Nondecimal Data:: Allowing nondecimal input data.
+* Array Sorting:: Facilities for controlling array traversal
+ and sorting arrays.
+* Controlling Array Traversal:: How to use PROCINFO["sorted_in"].
+* Array Sorting Functions:: How to use @code{asort()} and
+ @code{asorti()}.
+* Two-way I/O:: Two-way communications with another
+ process.
+* TCP/IP Networking:: Using @command{gawk} for network
+ programming.
+* Profiling:: Profiling your @command{awk} programs.
+* Library Names:: How to best name private global variables
+ in library functions.
+* General Functions:: Functions that are of general use.
+* Strtonum Function:: A replacement for the built-in
+ @code{strtonum()} function.
+* Assert Function:: A function for assertions in @command{awk}
+ programs.
+* Round Function:: A function for rounding if @code{sprintf()}
+ does not do it correctly.
+* Cliff Random Function:: The Cliff Random Number Generator.
+* Ordinal Functions:: Functions for using characters as numbers
+ and vice versa.
+* Join Function:: A function to join an array into a string.
+* Gettimeofday Function:: A function to get formatted times.
+* Data File Management:: Functions for managing command-line data
+ files.
+* Filetrans Function:: A function for handling data file
+ transitions.
+* Rewind Function:: A function for rereading the current file.
+* File Checking:: Checking that data files are readable.
+* Empty Files:: Checking for zero-length files.
+* Ignoring Assigns:: Treating assignments as file names.
+* Getopt Function:: A function for processing command-line
+ arguments.
+* Passwd Functions:: Functions for getting user information.
+* Group Functions:: Functions for getting group information.
+* Walking Arrays:: A function to walk arrays of arrays.
+* Running Examples:: How to run these examples.
+* Clones:: Clones of common utilities.
+* Cut Program:: The @command{cut} utility.
+* Egrep Program:: The @command{egrep} utility.
+* Id Program:: The @command{id} utility.
+* Split Program:: The @command{split} utility.
+* Tee Program:: The @command{tee} utility.
+* Uniq Program:: The @command{uniq} utility.
+* Wc Program:: The @command{wc} utility.
+* Miscellaneous Programs:: Some interesting @command{awk} programs.
+* Dupword Program:: Finding duplicated words in a document.
+* Alarm Program:: An alarm clock.
+* Translate Program:: A program similar to the @command{tr}
+ utility.
+* Labels Program:: Printing mailing labels.
+* Word Sorting:: A program to produce a word usage count.
+* History Sorting:: Eliminating duplicate entries from a
+ history file.
+* Extract Program:: Pulling out programs from Texinfo source
+ files.
+* Simple Sed:: A Simple Stream Editor.
+* Igawk Program:: A wrapper for @command{awk} that includes
+ files.
+* Anagram Program:: Finding anagrams from a dictionary.
+* Signature Program:: People do amazing things with too much time
+ on their hands.
+* Debugging:: Introduction to @command{dgawk}.
+* Debugging Concepts:: Debugging In General.
+* Debugging Terms:: Additional Debugging Concepts.
+* Awk Debugging:: Awk Debugging.
+* Sample dgawk session:: Sample @command{dgawk} session.
+* dgawk invocation:: @command{dgawk} Invocation.
+* Finding The Bug:: Finding The Bug.
+* List of Debugger Commands:: Main @command{dgawk} Commands.
+* Breakpoint Control:: Control of breakpoints.
+* Dgawk Execution Control:: Control of execution.
+* Viewing And Changing Data:: Viewing and changing data.
+* Dgawk Stack:: Dealing with the stack.
+* Dgawk Info:: Obtaining information about the program and
+ the debugger state.
+* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Readline Support:: Readline Support.
+* Dgawk Limitations:: Limitations and future plans.
+* V7/SVR3.1:: The major changes between V7 and System V
+ Release 3.1.
+* SVR4:: Minor changes between System V Releases 3.1
+ and 4.
+* POSIX:: New features from the POSIX standard.
+* BTL:: New features from Brian Kernighan's version
+ of @command{awk}.
+* POSIX/GNU:: The extensions in @command{gawk} not in
+ POSIX @command{awk}.
+* Common Extensions:: Common Extensions Summary.
+* Ranges and Locales:: How locales used to affect regexp ranges.
+* Contributors:: The major contributors to @command{gawk}.
+* Gawk Distribution:: What is in the @command{gawk} distribution.
+* Getting:: How to get the distribution.
+* Extracting:: How to extract the distribution.
+* Distribution contents:: What is in the distribution.
+* Unix Installation:: Installing @command{gawk} under various
+ versions of Unix.
+* Quick Installation:: Compiling @command{gawk} under Unix.
+* Additional Configuration Options:: Other compile-time options.
+* Configuration Philosophy:: How it's all supposed to work.
+* Non-Unix Installation:: Installation on Other Operating Systems.
+* PC Installation:: Installing and Compiling @command{gawk} on
+ MS-DOS and OS/2.
+* PC Binary Installation:: Installing a prepared distribution.
+* PC Compiling:: Compiling @command{gawk} for MS-DOS,
+ Windows32, and OS/2.
+* PC Testing:: Testing @command{gawk} on PC systems.
+* PC Using:: Running @command{gawk} on MS-DOS, Windows32
+ and OS/2.
+* Cygwin:: Building and running @command{gawk} for
+ Cygwin.
+* MSYS:: Using @command{gawk} In The MSYS
+ Environment.
+* VMS Installation:: Installing @command{gawk} on VMS.
+* VMS Compilation:: How to compile @command{gawk} under VMS.
+* VMS Installation Details:: How to install @command{gawk} under VMS.
+* VMS Running:: How to run @command{gawk} under VMS.
+* VMS Old Gawk:: An old version comes with some VMS systems.
+* Bugs:: Reporting Problems and Bugs.
+* Other Versions:: Other freely available @command{awk}
+ implementations.
+* Compatibility Mode:: How to disable certain @command{gawk}
+ extensions.
+* Additions:: Making Additions To @command{gawk}.
+* Accessing The Source:: Accessing the Git repository.
+* Adding Code:: Adding code to the main body of
+ @command{gawk}.
+* New Ports:: Porting @command{gawk} to a new operating
+ system.
+* Dynamic Extensions:: Adding new built-in functions to
+ @command{gawk}.
+* Internals:: A brief look at some @command{gawk}
+ internals.
+* Plugin License:: A note about licensing.
+* Sample Library:: A example of new functions.
+* Internal File Description:: What the new functions will do.
+* Internal File Ops:: The code for internal file operations.
+* Using Internal File Ops:: How to use an external extension.
+* Future Extensions:: New features that may be implemented one
+ day.
+* Basic High Level:: The high level view.
+* Basic Data Typing:: A very quick intro to data types.
+* Floating Point Issues:: Stuff to know about floating-point numbers.
+* String Conversion Precision:: The String Value Can Lie.
+* Unexpected Results:: Floating Point Numbers Are Not Abstract
+ Numbers.
+* POSIX Floating Point Problems:: Standards Versus Existing Practice.
@end detailmenu
@end menu
@@ -5746,7 +5706,7 @@ print $0 # or whatever else with $0
@end example
@noindent
-This forces @command{awk} rebuild the record. It does help
+This forces @command{awk} to rebuild the record. It does help
to add a comment, as we've shown here.
There is a flip side to the relationship between @code{$0} and
@@ -10948,7 +10908,7 @@ Special patterns for you to supply startup or cleanup actions for your
@item BEGINFILE
@itemx ENDFILE
-Special patterns for you to supply startup or cleanup actions to
+Special patterns for you to supply startup or cleanup actions to be
done on a per file basis.
(@xref{BEGINFILE/ENDFILE}.)
@@ -12063,8 +12023,8 @@ This program loops forever once @code{x} reaches 5.
@cindex dark corner, @code{continue} statement
@cindex @command{gawk}, @code{continue} statement in
The @code{continue} statement has no special meaning with respect to the
-@code{switch} statement, nor does it any meaning when used outside the body of
-a loop. Historical versions of @command{awk} treated a @code{continue}
+@code{switch} statement, nor does it have any meaning when used outside the
+body of a loop. Historical versions of @command{awk} treated a @code{continue}
statement outside a loop the same way they treated a @code{break}
statement outside a loop: as if it were a @code{next}
statement
@@ -13054,6 +13014,8 @@ an array.
* Scanning an Array:: A variation of the @code{for} statement. It
loops through the indices of an array's
existing elements.
+* Controlling Scanning:: Controlling the order in which arrays are
+ scanned.
@end menu
@node Array Intro
@@ -13441,11 +13403,151 @@ the loop body; it is not predictable whether the @code{for} loop will
reach them. Similarly, changing @var{var} inside the loop may produce
strange results. It is best to avoid such things.
-As an extension, @command{gawk} makes it possible for you to
-loop over the elements of an array in order, based on the value of
-@code{PROCINFO["sorted_in"]} (@pxref{Auto-set}).
-This is an advanced feature, so discussion of it is delayed
-until @ref{Controlling Array Traversal}.
+@node Controlling Scanning
+@subsection Using Predefined Array Scanning Orders
+
+By default, when a @code{for} loop traverses an array, the order
+is undefined, meaning that the @command{awk} implementation
+determines the order in which the array is traversed.
+This order is usually based on the internal implementation of arrays
+and will vary from one version of @command{awk} to the next.
+
+Often, though, you may wish to do something simple, such as
+``traverse the array by comparing the indices in ascending order,''
+or ``traverse the array by on comparing the values in descending order.''
+@command{gawk} provides two mechanisms which give you this control.
+
+@itemize @bullet
+@item
+Set @code{PROCINFO["sorted_in"]} to one of a set of predefined values.
+We describe this now.
+
+@item
+Set @code{PROCINFO["sorted_in"]} to the name of a user-defined function
+to be used for comparison of array elements. This advanced feature
+is described later, in @ref{Array Sorting}.
+@end itemize
+
+The following special values for @code{PROCINFO["sorted_in"]} are available:
+
+@table @code
+@item "@@unsorted"
+Array elements are processed in arbitrary order, which is the default
+@command{awk} behavior.
+
+@item "@@ind_str_asc"
+Order by indices compared as strings; this is the most basic sort.
+(Internally, array indices are always strings, so with @samp{a[2*5] = 1}
+the index is @code{"10"} rather than numeric 10.)
+
+@item "@@ind_num_asc"
+Order by indices but force them to be treated as numbers in the process.
+Any index with a non-numeric value will end up positioned as if it were zero.
+
+@item "@@val_type_asc"
+Order by element values rather than indices.
+Ordering is by the type assigned to the element
+(@pxref{Typing and Comparison}).
+All numeric values come before all string values,
+which in turn come before all subarrays.
+(Subarrays have not been described yet;
+@pxref{Arrays of Arrays}).
+
+@item "@@val_str_asc"
+Order by element values rather than by indices. Scalar values are
+compared as strings. Subarrays, if present, come out last.
+
+@item "@@val_num_asc"
+Order by element values rather than by indices. Scalar values are
+compared as numbers. Subarrays, if present, come out last.
+When numeric values are equal, the string values are used to provide
+an ordering: this guarantees consistent results across different
+versions of the C @code{qsort()} function,@footnote{When two elements
+compare as equal, the C @code{qsort()} function does not guarantee
+that they will maintain their original relative order after sorting.
+Using the string value to provide a unique ordering when the numeric
+values are equal ensures that @command{gawk} behaves consistently
+across different environments.} which @command{gawk} uses internally
+to perform the sorting.
+
+@item "@@ind_str_desc"
+Reverse order from the most basic sort.
+
+@item "@@ind_num_desc"
+Numeric indices ordered from high to low.
+
+@item "@@val_type_desc"
+Element values, based on type, in descending order.
+
+@item "@@val_str_desc"
+Element values, treated as strings, ordered from high to low.
+Subarrays, if present, come out first.
+
+@item "@@val_num_desc"
+Element values, treated as numbers, ordered from high to low.
+Subarrays, if present, come out first.
+@end table
+
+The array traversal order is determined before the @code{for} loop
+starts to run. Changing @code{PROCINFO["sorted_in"]} in the loop body
+will not affect the loop.
+
+For example:
+
+@example
+$ @kbd{gawk 'BEGIN @{}
+> @kbd{ a[4] = 4}
+> @kbd{ a[3] = 3}
+> @kbd{ for (i in a)}
+> @kbd{ print i, a[i]}
+> @kbd{@}'}
+@print{} 4 4
+@print{} 3 3
+$ @kbd{gawk 'BEGIN @{}
+> @kbd{ PROCINFO["sorted_in"] = "@@ind_str_asc"}
+> @kbd{ a[4] = 4}
+> @kbd{ a[3] = 3}
+> @kbd{ for (i in a)}
+> @kbd{ print i, a[i]}
+> @kbd{@}'}
+@print{} 3 3
+@print{} 4 4
+@end example
+
+When sorting an array by element values, if a value happens to be
+a subarray then it is considered to be greater than any string or
+numeric value, regardless of what the subarray itself contains,
+and all subarrays are treated as being equal to each other. Their
+order relative to each other is determined by their index strings.
+
+Here are some additional things to bear in mind about sorted
+array traversal.
+
+@itemize @bullet
+@item
+The value of @code{PROCINFO["sorted_in"]} is global. That is, it affects
+all array traversal @code{for} loops. If you need to change it within your
+own code, you should see if it's defined and save and restore the value:
+
+@example
+@dots{}
+if ("sorted_in" in PROCINFO) @{
+ save_sorted = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "@@val_str_desc" # or whatever
+@}
+@dots{}
+if (save_sorted)
+ PROCINFO["sorted_in"] = save_sorted
+@end example
+
+@item
+As mentioned, the default array traversal order is represented by
+@code{"@@unsorted"}. You can also get the default behavior by assigning
+the null string to @code{PROCINFO["sorted_in"]} or by just deleting the
+@code{"sorted_in"} element from the @code{PROCINFO} array with
+the @code{delete} statement.
+(The @code{delete} statement hasn't been described yet; @pxref{Delete}.)
+@end itemize
In addition, @command{gawk} provides built-in functions for
sorting arrays; see @ref{Array Sorting Functions}.
@@ -13785,8 +13887,9 @@ the program produces the following output:
@subsection Scanning Multidimensional Arrays
There is no special @code{for} statement for scanning a
-``multidimensional'' array. There cannot be one, because, in truth, there
-are no multidimensional arrays or elements---there is only a
+``multidimensional'' array. There cannot be one, because, in truth,
+@command{awk} does not have
+multidimensional arrays or elements---there is only a
multidimensional @emph{way of accessing} an array.
@cindex subscripts in arrays, multidimensional, scanning
@@ -13813,7 +13916,7 @@ into the individual indices by breaking it apart where the value of
@code{SUBSEP} appears. The individual indices then become the elements of
the array @code{separate}.
-Thus, if a value is previously stored in @code{array[1, "foo"]}; then
+Thus, if a value is previously stored in @code{array[1, "foo"]}, then
an element with index @code{"1\034foo"} exists in @code{array}. (Recall
that the default value of @code{SUBSEP} is the character with code 034.)
Sooner or later, the @code{for} statement finds that index and does an
@@ -13833,7 +13936,8 @@ separate indices is recovered.
@node Arrays of Arrays
@section Arrays of Arrays
-@command{gawk} supports arrays of
+@command{gawk} goes beyond standard @command{awk}'s multidimensional
+array access and provides true arrays of
arrays. Elements of a subarray are referred to by their own indices
enclosed in square brackets, just like the elements of the main array.
For example, the following creates a two-element subarray at index @samp{1}
@@ -18162,8 +18266,8 @@ leads to less surprising results.
@node Array Sorting
@section Controlling Array Traversal and Array Sorting
-@command{gawk} lets you control the order in which @samp{for (i in array)} loops
-will traverse an array.
+@command{gawk} lets you control the order in which a @samp{for (i in array)}
+loop traverses an array.
In addition, two built-in functions, @code{asort()} and @code{asorti()},
let you sort arrays based on the array values and indices, respectively.
@@ -18184,18 +18288,14 @@ the internal implementation of arrays inside @command{awk}.
Often, though, it is desirable to be able to loop over the elements
in a particular order that you, the programmer, choose. @command{gawk}
-lets you do this; this @value{SUBSECTION} describes how.
+lets you do this.
-@menu
-* Controlling Scanning With A Function:: Using a function to control scanning.
-* Controlling Scanning:: Controlling the order in which arrays
- are scanned.
-@end menu
+@ref{Controlling Scanning}, describes how you can assign special,
+pre-defined values to @code{PROCINFO["sorted_in"]} in order to
+control the order in which @command{gawk} will traverse an array
+during a @code{for} loop.
-@node Controlling Scanning With A Function
-@subsubsection Array Scanning Using A User-defined Function
-
-The value of @code{PROCINFO["sorted_in"]} can be a function name.
+In addition, the value of @code{PROCINFO["sorted_in"]} can be a function name.
This lets you traverse an array based on any custom criterion.
The array elements are ordered according to the return value of this
function. The comparison function should be defined with at least
@@ -18212,8 +18312,9 @@ function comp_func(i1, v1, i2, v2)
Here, @var{i1} and @var{i2} are the indices, and @var{v1} and @var{v2}
are the corresponding values of the two elements being compared.
Either @var{v1} or @var{v2}, or both, can be arrays if the array being
-traversed contains subarrays as values. The three possible return values
-are interpreted this way:
+traversed contains subarrays as values.
+(@xref{Arrays of Arrays}, for more information about subarrays.)
+The three possible return values are interpreted as follows:
@table @code
@item comp_func(i1, v1, i2, v2) < 0
@@ -18314,7 +18415,7 @@ $ @kbd{gawk -f compdemo.awk}
@print{} data[10] = one
@print{} data[20] = two
@print{}
-@print{} Sort function: cmp_num_str_val @ii{Sort all numbers before all strings}
+@print{} Sort function: cmp_num_str_val @ii{Sort all numeric values before all strings}
@print{} data[one] = 10
@print{} data[two] = 20
@print{} data[100] = 100
@@ -18323,7 +18424,7 @@ $ @kbd{gawk -f compdemo.awk}
@end example
Consider sorting the entries of a GNU/Linux system password file
-according to login names. The following program sorts records
+according to login name. The following program sorts records
by a specific field position and can be used for this purpose:
@example
@@ -18354,8 +18455,8 @@ END @{
@end example
The first field in each entry of the password file is the user's login name,
-and the fields are seperated by colons.
-Each record defines a subarray (@pxref{Arrays of Arrays}),
+and the fields are separated by colons.
+Each record defines a subarray,
with each field as an element in the subarray.
Running the program produces the
following output:
@@ -18445,122 +18546,6 @@ sorted array traversal is not the default.
@c maintainers believe that only the people who wish to use a
@c feature should have to pay for it.
-@node Controlling Scanning
-@subsubsection Controlling Array Scanning Order
-
-As described in
-@iftex
-the previous subsubsection,
-@end iftex
-@ifnottex
-@ref{Controlling Scanning With A Function},
-@end ifnottex
-you can provide the name of a function as the value of
-@code{PROCINFO["sorted_in"]} to specify custom sorting criteria.
-
-Often, though, you may wish to do something simple, such as
-``sort based on comparing the indices in ascending order,''
-or ``sort based on comparing the values in descending order.''
-Having to write a simple comparison function for this purpose
-for use in all of your programs becomes tedious.
-For the common simple cases, @command{gawk} provides
-the option of supplying special names that do the requested
-sorting for you.
-You can think of them as ``predefined'' sorting functions,
-if you like, although the names purposely include characters
-that are not valid in real @command{awk} function names.
-
-The following special values are available:
-
-@table @code
-@item "@@ind_str_asc"
-Order by indices compared as strings; this is the most basic sort.
-(Internally, array indices are always strings, so with @samp{a[2*5] = 1}
-the index is @code{"10"} rather than numeric 10.)
-
-@item "@@ind_num_asc"
-Order by indices but force them to be treated as numbers in the process.
-Any index with a non-numeric value will end up positioned as if it were zero.
-
-@item "@@val_type_asc"
-Order by element values rather than indices.
-Ordering is by the type assigned to the element
-(@pxref{Typing and Comparison}).
-All numeric values come before all string values,
-which in turn come before all subarrays.
-
-@item "@@val_str_asc"
-Order by element values rather than by indices. Scalar values are
-compared as strings. Subarrays, if present, come out last.
-
-@item "@@val_num_asc"
-Order by element values rather than by indices. Scalar values are
-compared as numbers. Subarrays, if present, come out last.
-When numeric values are equal, the string values are used to provide
-an ordering: this guarantees consistent results across different
-versions of the C @code{qsort()} function.@footnote{When two elements
-compare as equal, the C @code{qsort()} function does not guarantee
-that they will maintain their original relative order after sorting.
-Using the string value to provide a unique ordering when the numeric
-values are equal ensures that @command{gawk} behaves consistently
-across different environments.}
-
-@item "@@ind_str_desc"
-Reverse order from the most basic sort.
-
-@item "@@ind_num_desc"
-Numeric indices ordered from high to low.
-
-@item "@@val_type_desc"
-Element values, based on type, in descending order.
-
-@item "@@val_str_desc"
-Element values, treated as strings, ordered from high to low.
-Subarrays, if present, come out first.
-
-@item "@@val_num_desc"
-Element values, treated as numbers, ordered from high to low.
-Subarrays, if present, come out first.
-
-@item "@@unsorted"
-Array elements are processed in arbitrary order, which is the normal
-@command{awk} behavior. You can also get the normal behavior by just
-deleting the @code{"sorted_in"} element from the @code{PROCINFO} array,
-if it previously had a value assigned to it.
-@end table
-
-The array traversal order is determined before the @code{for} loop
-starts to run. Changing @code{PROCINFO["sorted_in"]} in the loop body
-will not affect the loop.
-
-For example:
-
-@example
-$ @kbd{gawk 'BEGIN @{}
-> @kbd{ a[4] = 4}
-> @kbd{ a[3] = 3}
-> @kbd{ for (i in a)}
-> @kbd{ print i, a[i]}
-> @kbd{@}'}
-@print{} 4 4
-@print{} 3 3
-$ @kbd{gawk 'BEGIN @{}
-> @kbd{ PROCINFO["sorted_in"] = "@@ind_str_asc"}
-> @kbd{ a[4] = 4}
-> @kbd{ a[3] = 3}
-> @kbd{ for (i in a)}
-> @kbd{ print i, a[i]}
-> @kbd{@}'}
-@print{} 3 3
-@print{} 4 4
-@end example
-
-When sorting an array by element values, if a value happens to be
-a subarray then it is considered to be greater than any string or
-numeric value, regardless of what the subarray itself contains,
-and all subarrays are treated as being equal to each other. Their
-order relative to each other is determined by their index strings.
-
@node Array Sorting Functions
@subsection Sorting Array Values and Indices with @command{gawk}
@@ -18569,7 +18554,7 @@ order relative to each other is determined by their index strings.
@cindex @code{asort()} function (@command{gawk}), arrays@comma{} sorting
@cindex sort function, arrays, sorting
In most @command{awk} implementations, sorting an array requires
-writing a @code{sort} function.
+writing a @code{sort()} function.
While this can be educational for exploring different sorting algorithms,
usually that's not the point of the program.
@command{gawk} provides the built-in @code{asort()}
@@ -18588,7 +18573,10 @@ After the call to @code{asort()}, the array @code{data} is indexed from 1
to some number @var{n}, the total number of elements in @code{data}.
(This count is @code{asort()}'s return value.)
@code{data[1]} @value{LEQ} @code{data[2]} @value{LEQ} @code{data[3]}, and so on.
-The array elements are compared as strings.
+The comparison is based on the type of the elements
+(@pxref{Typing and Comparison}).
+All numeric values come before all string values,
+which in turn come before all subarrays.
@cindex side effects, @code{asort()} function
An important side effect of calling @code{asort()} is that
@@ -18607,12 +18595,11 @@ In this case, @command{gawk} copies the @code{source} array into the
@code{dest} array and then sorts @code{dest}, destroying its indices.
However, the @code{source} array is not affected.
-@code{asort()} accepts a third string argument
-to control comparison of array elements.
-As with @code{PROCINFO["sorted_in"]}, this argument may be the
-name of a user-defined function, or one of the predefined names
-that @command{gawk} provides
-(@pxref{Controlling Scanning With A Function}).
+@code{asort()} accepts a third string argument to control comparison of
+array elements. As with @code{PROCINFO["sorted_in"]}, this argument
+may be one of the predefined names that @command{gawk} provides
+(@pxref{Controlling Scanning}), or the name of a user-defined function
+(@pxref{Controlling Array Traversal}).
@quotation NOTE
In all cases, the sorted element values consist of the original
@@ -27024,13 +27011,13 @@ inclusive. Ordering was based on the numeric value of each character
in the machine's native character set. Thus, on ASCII-based systems,
@code{[a-z]} matched all the lowercase letters, and only the lowercase
letters, since the numeric values for the letters from @samp{a} through
-@samp{z} were contigous. (On an EBCDIC system, the range @samp{[a-z]}
+@samp{z} were contiguous. (On an EBCDIC system, the range @samp{[a-z]}
includes additional, non-alphabetic characters as well.)
Almost all introductory Unix literature explained range expressions
as working in this fashion, and in particular, would teach that the
``correct'' way to match lowercase letters was with @samp{[a-z]}, and
-that @samp{[A-Z]} was the the ``correct'' way to match uppercase letters.
+that @samp{[A-Z]} was the ``correct'' way to match uppercase letters.
And indeed, this was true.
The 1993 POSIX standard introduced the idea of locales (@pxref{Locales}).
diff --git a/eval.c b/eval.c
index 76c537e1..2a29eb9f 100644
--- a/eval.c
+++ b/eval.c
@@ -2626,7 +2626,7 @@ func_call:
break;
case Op_K_getline: /* no redirection */
- if (currule == BEGINFILE || currule == ENDFILE)
+ if (! currule || currule == BEGINFILE || currule == ENDFILE)
fatal(_("non-redirected `getline' invalid inside `%s' rule"),
ruletab[currule]);
@@ -2773,6 +2773,12 @@ func_call:
break;
case Op_K_exit:
+ /* exit not allowed in user-defined comparison functions for "sorted_in";
+ * This is done so that END blocks aren't executed more than once.
+ */
+ if (! currule)
+ fatal(_("`exit' cannot be called in the current context"));
+
exiting = TRUE;
POP_NUMBER(x1);
exit_val = (int) x1;
diff --git a/io.c b/io.c
index 4b7976f1..a2afeca1 100644
--- a/io.c
+++ b/io.c
@@ -1594,7 +1594,7 @@ two_way_open(const char *str, struct redirect *rp)
}
#endif /* HAVE_SOCKETS */
-#ifdef HAVE_TERMIOS_H
+#if defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS)
/* case 2: use ptys for two-way communications to child */
if (! no_ptys && pty_vs_pipe(str)) {
static int initialized = FALSE;
@@ -1809,7 +1809,7 @@ two_way_open(const char *str, struct redirect *rp)
first_pty_letter = '\0'; /* reset for next command */
return TRUE;
}
-#endif /* HAVE_TERMIOS_H */
+#endif /* defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) */
use_pipes:
#ifndef PIPES_SIMULATED /* real pipes */
diff --git a/mbsupport.h b/mbsupport.h
index 6008da77..f647d788 100644
--- a/mbsupport.h
+++ b/mbsupport.h
@@ -40,6 +40,7 @@
#if defined(HAVE_ISWCTYPE) \
&& defined(HAVE_LOCALE_H) \
+ && (defined(HAVE_BTOWC) || defined(ZOS_USS)) \
&& defined(HAVE_MBRLEN) \
&& defined(HAVE_MBRTOWC) \
&& defined(HAVE_WCHAR_H) \
@@ -67,4 +68,25 @@
#if ! MBS_SUPPORT
# undef MB_CUR_MAX
# define MB_CUR_MAX 1
+
+/* All this glop is for dfa.c. Bleah. */
+
+#ifndef DJGPP
+#define wchar_t char
+#endif
+
+#define wctype_t int
+#define wint_t int
+#define mbstate_t int
+#define WEOF EOF
+#define towupper toupper
+#define towlower tolower
+#define btowc(x) (x)
+#define iswalnum isalnum
+#define iswalpha isalpha
+#define iswupper isupper
+
+extern wctype_t wctype(const char *name);
+extern int iswctype(wint_t wc, wctype_t desc);
+extern int wcscoll(const wchar_t *ws1, const wchar_t *ws2);
#endif
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog
index 8aaeb418..4a06aa60 100644
--- a/missing_d/ChangeLog
+++ b/missing_d/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-02 Pat Rankin <r.pat.rankin@gmail.com>
+
+ * wcmisc.c: Make code be conditional upon corresponding !HAVE_WCxxx.
+
+2011-11-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * wcmisc.c: New file.
+
2011-06-23 Arnold D. Robbins <arnold@skeeve.com>
* ChangeLog.0: Rotated ChangeLog into this file.
diff --git a/missing_d/wcmisc.c b/missing_d/wcmisc.c
new file mode 100644
index 00000000..d2b7aa08
--- /dev/null
+++ b/missing_d/wcmisc.c
@@ -0,0 +1,100 @@
+/* wcmisc.c - replace wcXXXX routines
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */
+
+#if !defined(HAVE_WCTYPE) || !defined(HAVE_ISWCTYPE)
+static const char *classes[] = {
+ "<dummy>",
+ "alnum",
+ "alpha",
+ "blank",
+ "cntrl",
+ "digit",
+ "graph",
+ "lower",
+ "print",
+ "punct",
+ "space",
+ "upper",
+ "xdigit",
+ NULL
+};
+#endif
+
+#ifndef HAVE_ISWCTYPE
+static int is_blank (int c)
+{
+ return (c == ' ' || c == '\t');
+}
+#endif
+
+#ifndef HAVE_WCTYPE
+wctype_t wctype(const char *name)
+{
+ int i;
+
+ for (i = 1; classes[i] != NULL; i++)
+ if (strcmp(name, classes[i]) == 0)
+ return i;
+
+ return 0;
+}
+#endif
+
+#ifndef HAVE_ISWCTYPE
+int iswctype(wint_t wc, wctype_t desc)
+{
+ int j = sizeof(classes) / sizeof(classes[0]);
+
+ if (desc >= j || desc == 0)
+ return 0;
+
+ switch (desc) {
+ case 1: return isalnum(wc);
+ case 2: return isalpha(wc);
+ case 3: return is_blank(wc);
+ case 4: return iscntrl(wc);
+ case 5: return isdigit(wc);
+ case 6: return isgraph(wc);
+ case 7: return islower(wc);
+ case 8: return isprint(wc);
+ case 9: return ispunct(wc);
+ case 10: return isspace(wc);
+ case 11: return isupper(wc);
+ case 12: return isxdigit(wc);
+ default: return 0;
+ }
+}
+#endif
+
+#ifndef HAVE_WCSCOLL
+int wcscoll(const wchar_t *ws1, const wchar_t *ws2)
+{
+ size_t i;
+
+ for (i = 0; ws1[i] != 0 && ws2[i] != 0; i++) {
+ if (ws1[i] < ws2[i])
+ return -1;
+ else if (ws1[i] > ws2[i])
+ return 1;
+ }
+
+ return (ws1[i] - ws2[i]);
+}
+#endif
+
+/*wcmisc.c*/
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 9f56a20d..429a88ed 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,4 +1,23 @@
-2011-10-27 Scott Deifik <scottd.mail@sbcglobal.net>
+2011-12-06 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * Makefile.tst: Sync with mainline version.
+ Use testoutcmp.awk script.
+
+2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * testoutcmp.awk: Script to replace cmd for DJGPP.
+
+2011-11-01 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * config.sed: Additional update.
+
+2011-10-29 Eli Zaretskii <eliz@gnu.org>
+
+ * config.sed: Fix some edits, to be consistent with the old
+ config.h file. Make regexps match #undef lines with whitespace
+ at the end of the line. Add forgotten EMX #defines.
+
+2011-10-27 Scott Deifik <scottd.mail@sbcglobal.net>
* Makefile.tst: Sync with mainline version.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index e63b8eb5..db214348 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -90,6 +90,10 @@ CMP = diff
#CMP = diff -c
#CMP = gcmp
+# cmp replacement program for PC where the error messages aren't
+# exactly the same. Should run even on old awk.
+TESTOUTCMP = $(AWK) -f ../testoutcmp.awk
+
# Set your "cp," "mv," and "mkdir" commands here. Note: DOS's copy must take
# forward slashes.
#CP = cp
@@ -115,6 +119,7 @@ PATH_SEPARATOR = ;
# ============================================================================
srcdir = .
+abs_builddir = .
# Get rid of core files when cleaning and generated .ok file
CLEANFILES = core core.* fmtspcl.ok
@@ -512,9 +517,9 @@ gsubtst3::
space::
@echo $@
- @echo Expect space to fail with DJGPP.
@$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+# @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+ @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@
printf0::
@echo $@
@@ -741,7 +746,8 @@ beginfile1::
beginfile2:
@echo $@
@-( cd $(srcdir) && AWK="$(abs_builddir)/$(AWKPROG)" $(srcdir)/$@.sh $(srcdir)/$@.in ) > _$@ 2>&1
- @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+# @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+ @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@
dumpvars::
@echo $@
@@ -1876,6 +1882,7 @@ procinfs:
pty1:
@echo pty1
+ @echo Expect pty1 to fail with DJGPP.
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
diff --git a/pc/config.h b/pc/config.h
index 41fd895a..a9dac512 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -13,7 +13,7 @@
#define GETGROUPS_T gid_t
/* Define to 1 if the `getpgrp' function requires zero arguments. */
-#undef GETPGRP_VOID
+#define GETPGRP_VOID 1
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
@@ -51,9 +51,7 @@
#undef HAVE_DOPRNT
/* Define to 1 if you have the <fcntl.h> header file. */
-#ifdef __MINGW32__
#define HAVE_FCNTL_H 1
-#endif
/* Define to 1 if you have the `fmod' function. */
#define HAVE_FMOD 1
@@ -131,9 +129,7 @@
#undef HAVE_LIBSIGSEGV
/* Define to 1 if you have the <limits.h> header file. */
-#if defined(DJGPP) || defined(__MINGW32__)
#define HAVE_LIMITS_H 1
-#endif
/* Define to 1 if you have the <locale.h> header file. */
#ifdef __MINGW32__
@@ -298,9 +294,7 @@
#undef HAVE_ST_BLKSIZE
/* Define to 1 if you have the `system' function. */
-#ifdef __MINGW32__
#define HAVE_SYSTEM 1
-#endif
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
@@ -354,9 +348,7 @@
#define HAVE_TZNAME 1
/* Define to 1 if you have the `tzset' function. */
-#ifdef __MINGW32__
#define HAVE_TZSET 1
-#endif
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#if defined(DJGPP) || defined(__MINGW32__)
@@ -433,7 +425,7 @@
#define PACKAGE_NAME "GNU Awk"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GNU Awk 4.0.0c"
+#define PACKAGE_STRING "GNU Awk 4.0.0f"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gawk"
@@ -442,7 +434,7 @@
#define PACKAGE_URL "http://www.gnu.org/software/gawk/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.0.0c"
+#define PACKAGE_VERSION "4.0.0f"
/* Define to 1 if *printf supports %F format */
#undef PRINTF_HAS_F_FORMAT
@@ -504,7 +496,7 @@
/* Version number of package */
-#define VERSION "4.0.0c"
+#define VERSION "4.0.0f"
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@@ -595,6 +587,11 @@
#define HAVE_POPEN_H 1
#endif
+#if defined(__EMX__)
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+#endif
+
#if defined(__MINGW32__)
# define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000)
#endif
diff --git a/pc/config.sed b/pc/config.sed
index c0fa766a..7fe0f922 100644
--- a/pc/config.sed
+++ b/pc/config.sed
@@ -26,111 +26,110 @@
/configh\.in/a\
/* pc/config.h. Generated automatically by pc/config.sed. */
+s/^#undef GETPGRP_VOID *$/#define GETPGRP_VOID 1/
s/^#undef GETGROUPS_T *$/#define GETGROUPS_T gid_t/
+/^#undef GETPGRP_VOID$/c\
+#ifdef DJGPP\
+#define GETPGRP_VOID 1\
+#endif
s/^#undef HAVE_ALARM *$/#define HAVE_ALARM 1/
s/^#undef HAVE_ATEXIT *$/#define HAVE_ATEXIT 1/
-/^#undef HAVE_BTOWC$/c\
+/^#undef HAVE_BTOWC *$/c\
#ifdef _WIN32\
#define HAVE_BTOWC 1\
#endif
-/^#undef HAVE_DECL_TZNAME$/c\
+/^#undef HAVE_DECL_TZNAME *$/c\
#ifdef __MINGW32__\
#define HAVE_DECL_TZNAME 1\
#endif
-/^#undef HAVE_FCNTL_H$/c\
-#ifdef __MINGW32__\
-#define HAVE_FCNTL_H 1\
-#endif
+s/^#undef HAVE_FCNTL_H *$/#define HAVE_FCNTL_H 1/
s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/
-/^#undef HAVE_INTMAX_T$/c\
+/^#undef HAVE_INTMAX_T *$/c\
#ifdef __MINGW32__\
#define HAVE_INTMAX_T 1\
#endif
-/^#undef HAVE_INTTYPES_H$/c\
+/^#undef HAVE_INTTYPES_H *$/c\
#ifdef __MINGW32__\
#define HAVE_INTTYPES_H 1\
#endif
-/^#undef HAVE_INTTYPES_H_WITH_UINTMAX$/c\
+/^#undef HAVE_INTTYPES_H_WITH_UINTMAX *$/c\
#ifdef __MINGW32__\
#define HAVE_INTTYPES_H_WITH_UINTMAX 1\
#endif
-/^#undef HAVE_ISASCII$/c\
+/^#undef HAVE_ISASCII *$/c\
#ifdef __MINGW32__\
#define HAVE_ISASCII 1\
#endif
-/^#undef HAVE_ISWCTYPE$/c\
+/^#undef HAVE_ISWCTYPE *$/c\
#ifdef __MINGW32__\
#define HAVE_ISWCTYPE 1\
#endif
-/^#undef HAVE_ISWLOWER$/c\
+/^#undef HAVE_ISWLOWER *$/c\
#ifdef __MINGW32__\
#define HAVE_ISWLOWER 1\
#endif
-/^#undef HAVE_ISWUPPER$/c\
+/^#undef HAVE_ISWUPPER *$/c\
#ifdef __MINGW32__\
#define HAVE_ISWUPPER 1\
#endif
s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/
-/^#undef HAVE_LIMITS_H$/c\
-#if defined(DJGPP) || defined(__MINGW32__)\
-#define HAVE_LIMITS_H 1\
-#endif
-/^#undef HAVE_LOCALE_H$/c\
+s/^#undef HAVE_LIMITS_H *$/#define HAVE_LIMITS_H 1/
+/^#undef HAVE_LOCALE_H *$/c\
#ifdef __MINGW32__\
#define HAVE_LOCALE_H 1\
#endif
-/^#undef HAVE_LONG_LONG$/c\
+/^#undef HAVE_LONG_LONG *$/c\
#ifdef __MINGW32__\
#define HAVE_LONG_LONG 1\
#endif
-/^#undef HAVE_MBRLEN$/c\
+/^#undef HAVE_MBRLEN *$/c\
#ifdef __MINGW32__\
#define HAVE_MBRLEN 1\
#endif
-/^#undef HAVE_MBRTOWC$/c\
+/^#undef HAVE_MBRTOWC *$/c\
#ifdef __MINGW32__\
#define HAVE_MBRTOWC 1\
#endif
s/^#undef HAVE_MEMCMP *$/#define HAVE_MEMCMP 1/
s/^#undef HAVE_MEMCPY *$/#define HAVE_MEMCPY 1/
-/^#undef HAVE_MEMMOVE$/c\
+/^#undef HAVE_MEMMOVE *$/c\
#ifdef __MINGW32__\
#define HAVE_MEMMOVE 1\
#endif
s/^#undef HAVE_MEMSET *$/#define HAVE_MEMSET 1/
-/^#undef HAVE_MKSTEMP$/c\
+/^#undef HAVE_MKSTEMP *$/c\
#ifdef DJGPP\
#define HAVE_MKSTEMP 1\
#endif
s/^#undef HAVE_MKTIME *$/#define HAVE_MKTIME 1/
-/^#undef HAVE_SETENV$/c\
+/^#undef HAVE_SETENV *$/c\
#if defined(__MINGW32__) || defined(__DJGPP__)\
#define HAVE_SETENV 1\
#endif
-/^#undef HAVE_SETLOCALE$/c\
+/^#undef HAVE_SETLOCALE *$/c\
#ifdef __MINGW32__\
#define HAVE_SETLOCALE 1\
#endif
-/^#undef HAVE_SNPRINTF$/c\
+/^#undef HAVE_SNPRINTF *$/c\
#ifdef __MINGW32__\
#define HAVE_SNPRINTF 1\
#endif
s/^#undef HAVE_STDARG_H *$/#define HAVE_STDARG_H 1/
-/^#undef HAVE_STDDEF_H$/c\
+/^#undef HAVE_STDDEF_H *$/c\
#ifdef __GNUC__\
#define HAVE_STDDEF_H 1\
#endif
-/^#undef HAVE_STDINT_H$/c\
+/^#undef HAVE_STDINT_H *$/c\
#ifdef __MINGW32__\
#define HAVE_STDINT_H 1\
#endif
-/^#undef HAVE_STDLIB_H$/c\
+/^#undef HAVE_STDLIB_H *$/c\
#ifdef __MINGW32__\
#define HAVE_STDLIB_H 1\
#endif
s/^#undef HAVE_STRCHR *$/#define HAVE_STRCHR 1/
s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/
-/^#undef HAVE_STRFTIME$/c\
+/^#undef HAVE_STRFTIME *$/c\
#ifdef __MINGW32__\
/* MinGW uses the replacement from missing_d, to support the %e specifier. */\
#define strftime rpl_strftime\
@@ -139,88 +138,82 @@ s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/
#endif
s/^#undef HAVE_STRINGIZE *$/#define HAVE_STRINGIZE 1/
s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/
-/^#undef HAVE_STRNCASECMP$/c\
+/^#undef HAVE_STRNCASECMP *$/c\
#define HAVE_STRNCASECMP 1\
#ifdef __EMX__\
#define strncasecmp strnicmp\
#endif
s/^#undef HAVE_STRTOD *$/#define HAVE_STRTOD 1/
-/^#undef HAVE_STRTOUL$/c\
+/^#undef HAVE_STRTOUL *$/c\
#ifdef __MINGW32__\
#define HAVE_STRTOUL 1\
#endif
-/^#undef HAVE_SYSTEM$/c\
-#ifdef __MINGW32__\
-#define HAVE_SYSTEM 1\
-#endif
-/^#undef HAVE_SYS_PARAM_H$/c\
+s/^#undef HAVE_SYSTEM *$/#define HAVE_SYSTEM 1/
+/^#undef HAVE_SYS_PARAM_H *$/c\
#ifndef __MINGW32__\
#define HAVE_SYS_PARAM_H 1\
#endif
-/^#undef HAVE_SYS_STAT_H$/c\
+/^#undef HAVE_SYS_STAT_H *$/c\
#ifdef __MINGW32__\
#define HAVE_SYS_STAT_H 1\
#endif
-/^#undef HAVE_SYS_TIME_H$/c\
+/^#undef HAVE_SYS_TIME_H *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_SYS_TIME_H 1\
#endif
s/^#undef HAVE_SYS_TYPES_H *$/#define HAVE_SYS_TYPES_H 1/
-/^#undef HAVE_TOWLOWER$/c\
+/^#undef HAVE_TOWLOWER *$/c\
#ifdef __MINGW32__\
#define HAVE_TOWLOWER 1\
#endif
-/^#undef HAVE_TOWUPPER$/c\
+/^#undef HAVE_TOWUPPER *$/c\
#ifdef __MINGW32__\
#define HAVE_TOWUPPER 1\
#endif
s/^#undef HAVE_TZNAME *$/#define HAVE_TZNAME 1/
-/^#undef HAVE_TZSET$/c\
-#ifdef __MINGW32__\
-#define HAVE_TZSET 1\
-#endif
-/^#undef HAVE_UINTMAX_T$/c\
+s/^#undef HAVE_TZSET *$/#define HAVE_TZSET 1/
+/^#undef HAVE_UINTMAX_T *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_UINTMAX_T 1\
#ifdef DJGPP\
#define uintmax_t unsigned long long\
#endif\
#endif
-/^#undef HAVE_UNISTD_H$/c\
+/^#undef HAVE_UNISTD_H *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_UNISTD_H 1\
#endif
s/^#undef HAVE_UNSIGNED_LONG_LONG *$/#define HAVE_UNSIGNED_LONG_LONG 1/
-/^#undef HAVE_USLEEP$/c\
+/^#undef HAVE_USLEEP *$/c\
#if defined(DJGPP) || defined(__MINGW32__)\
#define HAVE_USLEEP 1\
#endif
s/^#undef HAVE_VPRINTF *$/#define HAVE_VPRINTF 1/
-/^#undef HAVE_WCHAR_H$/c\
+/^#undef HAVE_WCHAR_H *$/c\
#ifdef __MINGW32__\
#define HAVE_WCHAR_H 1\
#endif
-/^#undef HAVE_WCRTOMB$/c\
+/^#undef HAVE_WCRTOMB *$/c\
#ifdef __MINGW32__\
#define HAVE_WCRTOMB 1\
#endif
-/^#undef HAVE_WCSCOLL$/c\
+/^#undef HAVE_WCSCOLL *$/c\
#ifdef __MINGW32__\
#define HAVE_WCSCOLL 1\
#endif
-/^#undef HAVE_WCTYPE$/c\
+/^#undef HAVE_WCTYPE *$/c\
#ifdef __MINGW32__\
#define HAVE_WCTYPE 1\
#endif
-/^#undef HAVE_WCTYPE_H$/c\
+/^#undef HAVE_WCTYPE_H *$/c\
#ifdef __MINGW32__\
#define HAVE_WCTYPE_H 1\
#endif
-/^#undef HAVE_WCTYPE_T$/c\
+/^#undef HAVE_WCTYPE_T *$/c\
#ifdef __MINGW32__\
#define HAVE_WCTYPE_T 1\
#endif
-/^#undef HAVE_WINT_T$/c\
+/^#undef HAVE_WINT_T *$/c\
#ifdef __MINGW32__\
#define HAVE_WINT_T 1\
#endif
@@ -231,31 +224,31 @@ s/^#undef RETSIGTYPE *$/#define RETSIGTYPE void/
#if defined(DJGPP) || defined(__MINGW32__)\
#include <limits.h>\
#endif
-/^#undef SIZEOF_UNSIGNED_INT$/c\
+/^#undef SIZEOF_UNSIGNED_INT *$/c\
#if UINT_MAX == 65536\
#define SIZEOF_UNSIGNED_INT 2\
#elif UINT_MAX == 4294967295U\
#define SIZEOF_UNSIGNED_INT 4\
#endif
-/^#undef SIZEOF_UNSIGNED_LONG$/c\
+/^#undef SIZEOF_UNSIGNED_LONG *$/c\
#if ULONG_MAX == 4294967295UL\
#define SIZEOF_UNSIGNED_LONG 4\
#endif
s/^#undef STDC_HEADERS *$/#define STDC_HEADERS 1/
s/^#undef TIME_WITH_SYS_TIME *$/#define TIME_WITH_SYS_TIME 1/
-/^#undef inline$/c\
+/^#undef inline *$/c\
#ifdef __GNUC__\
#define inline __inline__\
#endif
-/^#undef intmax_t$/c\
+/^#undef intmax_t *$/c\
#ifdef DJGPP\
#define intmax_t long long\
#endif
-/^#undef restrict$/c\
+/^#undef restrict *$/c\
#ifdef DJGPP\
#define restrict\
#endif
-/^#undef uintmax_t$/c\
+/^#undef uintmax_t *$/c\
#ifdef DJGPP\
#define uintmax_t unsigned long long\
#endif
@@ -274,6 +267,11 @@ $a\
#define HAVE_POPEN_H 1\
#endif\
\
+#if defined(__EMX__)\
+#define strcasecmp stricmp\
+#define strncasecmp strnicmp\
+#endif\
+\
#if defined(__MINGW32__)\
# define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000)\
#endif
diff --git a/pc/testoutcmp.awk b/pc/testoutcmp.awk
new file mode 100644
index 00000000..ff190155
--- /dev/null
+++ b/pc/testoutcmp.awk
@@ -0,0 +1,38 @@
+# cmp replacement program for PC where the error messages aren't
+# exactly the same. should run even on old awk
+
+{
+ if (FNR == NR)
+ file = 0
+ else
+ file = 1
+ gsub(/\r/, "", $0)
+ lines[file, FNR] = $0
+}
+
+END {
+ if (NR/2 != FNR) {
+ printf("testoutcmp: warning: files are not of equal length!\n") > "/dev/stderr"
+ exit 1
+ }
+
+ for (i = 1; i <= FNR; i++) {
+ good = lines[0, i]
+ actual = lines[1, i]
+ if (good == actual)
+ continue
+
+ l = length(good)
+ if (substr(good, l, 1) == ")")
+ l--
+ if (substr(good, 1, l) == substr(actual, 1, l))
+ continue
+ else {
+ printf("%s and %s are not equal\n", ARGV[1],
+ ARGV[2]) > "/dev/stderr"
+ exit 1
+ }
+ }
+
+ exit 0
+}
diff --git a/po/ast.gmo b/po/ast.gmo
deleted file mode 100644
index 7c2ac4e2..00000000
--- a/po/ast.gmo
+++ /dev/null
Binary files differ
diff --git a/po/ca.gmo b/po/ca.gmo
deleted file mode 100644
index 426541dc..00000000
--- a/po/ca.gmo
+++ /dev/null
Binary files differ
diff --git a/po/da.gmo b/po/da.gmo
index 6685bdb7..0270b5ce 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index 33c60c39..bb9d3b9d 100644
--- a/po/da.po
+++ b/po/da.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.83\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-05-22 10:37+0200\n"
"Last-Translator: Keld Simonsen <keld@keldix.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -46,7 +46,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "forsøg på at bruge skalar '%s' som et array"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -760,205 +760,205 @@ msgstr ""
"substr: længden %g ved startindeks %g overskrider længden af første argument "
"(%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr "strftime: formatværdi i PROCINFO[\"strftime\"] har numerisk type"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: fik et ikke-numerisk andet argument"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: fik et første argument som ikke er en streng"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: fik en tom formatstreng"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: fik et argument som ikke er en streng"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: mindst én af værdierne er udenfor standardområdet"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "'system'-funktion ikke tilladt i sandkasse-tilstand"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: fik et argument som ikke er en streng"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "reference til ikke-initieret variabel '%s'"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "reference til ikke-initieret felt '$%d'"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: fik et argument som ikke er en streng"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: fik et argument som ikke er en streng"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: fik et ikke-numerisk første argument"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: fik et ikke-numerisk argument"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: fik et ikke-numerisk argument"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: fik et ikke-numerisk argument"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: tredje argument er ikke et array"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 0 i tredje argument behandlet som 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: fik et ikke-numerisk første argument"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: fik et ikke-numerisk andet argument"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): kommatalsværdier vil blive trunkeret"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: fik et ikke-numerisk første argument"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: fik et ikke-numerisk andet argument"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): kommatalsværdier vil blive trunkeret"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: fik et ikke-numerisk første argument"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: fik et ikke-numerisk andet argument"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): kommatalsværdier vil blive trunkeret"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: fik et ikke-numerisk første argument"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: fik et ikke-numerisk andet argument"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): kommatalsværdier vil blive trunkeret"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: fik et ikke-numerisk første argument"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: fik et ikke-numerisk andet argument"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): kommatalsværdier vil blive trunkeret"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: fik et ikke-numerisk argument"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): kommatalsværdier vil blive trunkeret"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: '%s' er ikke en gyldig lokalitetskategori"
diff --git a/po/de.gmo b/po/de.gmo
index f95537b8..f0682785 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index 3500bf2d..2c1c6265 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-09-27 16:38+0200\n"
"Last-Translator: Philipp Thomas <pth@suse.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
@@ -42,7 +42,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "Es wird versucht, den Skalar »%s« als Array zu verwenden"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -778,210 +778,210 @@ msgstr ""
"substr: Länge %g am Start-Wert %g überschreitet die Länge des ersten "
"Arguments (%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr "strftime: Formatwert in PROCINFO[\"strftime\"] ist numerischen Typs"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: Das zweite Argument ist keine Zahl"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: Das erste Argument ist kein String"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: Der Format-String ist leer"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: Das Argument ist kein String"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: mindestens einer der Werte ist außerhalb des normalen Bereichs"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "Die Funktion »system« ist im Sandbox-Modus nicht erlaubt"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: Das Argument ist kein String"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "Referenz auf die nicht initialisierte Variable »%s«"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "Referenz auf das nicht initialisierte Feld »$%d«"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: das Argument ist kein String"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: das Argument ist kein String"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: das erste Argument ist keine Zahl"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: das zweite Argument ist keine Zahl"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: das Argument ist keine Zahl"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: das Argument ist keine Zahl"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: das Argument ist keine Zahl"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: das dritte Argument ist kein Array"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 0 als drittes Argument wird als 1 interpretiert"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: das erste Argument ist keine Zahl"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: das zweite Argument ist keine Zahl"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr ""
"lshift(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen "
"führen"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: das erste Argument ist keine Zahl"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: das zweite Argument ist keine Zahl"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr ""
"rshift (%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen "
"führen"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: das erste Argument ist keine Zahl"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: das zweite Argument ist keine Zahl"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr ""
"and(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: das erste Argument ist keine Zahl"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: das zweite Argument ist keine Zahl"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: das erste Argument ist keine Zahl"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: das zweite Argument ist keine Zahl"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf: Negative Werte werden zu merkwürdigen Ergebnissen führen"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: das erste Argument ist keine Zahl"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): Dezimalteil wird abgeschnitten"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: »%s« ist keine gültige Locale-Kategorie"
diff --git a/po/es.gmo b/po/es.gmo
index e395377a..7df5fab8 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index 676e7a8b..fd28a8a8 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-08-14 12:02-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
@@ -41,7 +41,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "se intentó usar el escalar `%s' como una matriz"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -776,209 +776,209 @@ msgstr ""
"substr: la cadena %g en el índice de inicio %g excede la longitud del primer "
"argumento (%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr ""
"strftime: el valor de formato en PROCINFO[\"strftime\"] tiene tipo numérico"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: el segundo argumento recibido no es númerico"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: el primer argumento recibido no es una cadena"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: se recibió una cadena de formato vacía"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: se recibió un argumento que no es una cadena"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
"mktime: por lo menos uno de los valores está fuera del rango por defecto"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "no se permite la función 'system' en modo sandbox"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: se recibió un argumento que no es una cadena"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "referencia a la variable sin inicializar `%s'"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referencia al campo sin inicializar `$%d'"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: se recibió un argumento que no es una cadena"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: se recibió un argumento que no es una cadena"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: el primer argumento recibido no es númerico"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: el segundo argumento recibido no es númerico"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: se recibió un argumento que no es númerico"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: se recibió un argumento que no es númerico"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: se recibió un argumento que no es númerico"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: el tercer argumento no es una matriz"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: el tercer argumento de 0 se trata como 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: el primer argumento recibido no es númerico"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: el segundo argumento recibido no es númerico"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): los valores fraccionarios se truncarán"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados "
"extraños"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: el primer argumento recibido no es númerico"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: el segundo argumento recibido no es númerico"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados "
"extraños"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: el primer argumento recibido no es númerico"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: el segundo argumento recibido no es númerico"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): los valores fraccionarios serán truncados"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: el primer argumento recibido no es númerico"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: el segundo argumento recibido no es númerico"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): los valores fraccionarios serán truncados"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: el primer argumento recibido no es númerico"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: el segundo argumento recibido no es númerico"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: se recibió un argumento que no es númerico"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): el valor negativo dará resultados extraños"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): el valor fraccionario se truncará"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' no es una categoría local válida"
diff --git a/po/fi.gmo b/po/fi.gmo
index df538bcf..abe20e1a 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index 442a7322..c698f564 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-09-12 12:14+0200\n"
"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
@@ -42,7 +42,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "yritettiin käyttää skalaaria ”%s” taulukkona"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -763,204 +763,204 @@ msgstr ""
"substr: pituus %g alkuindeksissä %g ylittää ensimmäisen argumentin pituuden "
"(%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr ""
"strftime: muotoarvolla kohteessa PROCINFO[\"strftime\"] on numerotyyppi"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: ensimmäinen vastaanotettu argumentti ei ole merkkijono"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: vastaanotettu tyhjä muotomerkkijono"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: vastaanotettu argumentti ei ole merkkijono"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: vähintään yksi arvoista on oletuslukualueen ulkopuolella"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "”system”-funktio ei ole sallittu hiekkalaatikkotilassa"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: vastaanotettu argumentti ei ole merkkijono"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "viite alustamattomaan muuttujaan ”%s”"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "viite alustamattomaan kenttään ”$%d”"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: vastaanotettu argumentti ei ole merkkijono"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: vastaanotettu argumentti ei ole merkkijono"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: ensimmäinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: kolmas argumentti ei ole taulukko"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 0-arvoinen kolmas argumentti käsitellään kuin 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: ensimmäinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksia"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): jaosarvot typistetään"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksia"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: ensimmäinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksia"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): jaosarvot typistetään"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksia"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: ensimmäinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negatiiviset arvot antavat outoja tuloksia"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): jaosarvot typistetään"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: ensimmäinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): jaosarvot typistetään"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: ensimmäinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: toinen vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negatiiviset arvot antavat outoja tuloksia"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): jaosarvot typistetään"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: vastaanotettu argumentti ei ole numeerinen"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negatiiviset arvot antavat outoja tuloksia"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): jaosarvo typistetään"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: ”%s” ei ole kelvollinen paikallinen kategoria"
diff --git a/po/fr.gmo b/po/fr.gmo
index 000b9a8a..49267fd7 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index a958491d..b43094c4 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-07-16 16:50+0200\n"
"Last-Translator: Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir."
"org>\n"
@@ -45,7 +45,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "tentative d'utiliser le scalaire « %s » comme tableau"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -767,213 +767,213 @@ msgstr ""
"substr : la longueur %g à partir de %g dépasse la fin du 1er argument (%lu)"
# Exemple : gawk --lint 'BEGIN { PROCINFO["strftime"]=123 ; print strftime() }'
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr ""
"strftime : la valeur de formatage PROCINFO[\"strftime\"] est de type "
"numérique"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime : le second argument n'est pas numérique"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftim : le premier argument n'est pas une chaîne"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime : la chaîne de formatage est vide"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime : l'argument n'est pas une chaîne"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
"mktime : au moins l'une des valeurs est en dehors de la plage par défaut"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "La fonction « system » est interdite en isolement (mode sandbox)"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system : l'argument n'est pas une chaîne"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "référence à une variable non initialisée « %s »"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "référence à un champ non initialisé « $%d »"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower : l'argument n'est pas une chaîne"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper : l'argument n'est pas une chaîne"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2 : le premier argument n'est pas numérique"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2 : le second argument n'est pas numérique"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin : l'argument n'est pas numérique"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos : l'argument n'est pas numérique"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand : l'argument n'est pas numérique"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match : le 3e argument n'est pas un tableau"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub : le 3e argument vaut 0, il sera traité comme un 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift : le premier argument n'est pas numérique"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift : le second argument reçu n'est pas numérique"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr ""
"lshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendus"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf) : les valeurs non entières seront tronquées"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendus"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift : le premier argument n'est pas numérique"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift : le second argument reçu n'est pas numérique"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr ""
"rshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendus"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf) : les valeurs non entières seront tronquées"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendus"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and : le premier argument n'est pas numérique"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and : le second argument reçu n'est pas numérique"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr ""
"and(%lf, %lf) : les valeurs négatives donneront des résultats inattendus"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): les valeurs non entières seront tronquées"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or : le premier argument n'est pas numérique"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or : le second argument reçu n'est pas numérique"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr ""
"or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf) : les valeurs non entières seront tronquées"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor : le premier argument n'est pas numérique"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor : le second argument reçu n'est pas numérique"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr ""
"xor(%lf, %lf) : les valeurs négatives donneront des résultats inattendus"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf) : les valeurs non entières seront tronquées"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl : l'argument n'est pas numérique"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf) : les valeurs négatives donneront des résultats inattendus"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf) : les valeurs non entières seront tronquées"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext : « %s » n'est pas dans un catégorie valide de la locale"
diff --git a/po/ga.gmo b/po/ga.gmo
deleted file mode 100644
index 21141c51..00000000
--- a/po/ga.gmo
+++ /dev/null
Binary files differ
diff --git a/po/gawk.pot b/po/gawk.pot
index 290ff817..aa30ff3c 100644
--- a/po/gawk.pot
+++ b/po/gawk.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: gawk 4.0.0c\n"
+"Project-Id-Version: gawk 4.0.0e\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -42,7 +42,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr ""
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -734,203 +734,203 @@ msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr ""
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr ""
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr ""
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr ""
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr ""
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr ""
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr ""
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr ""
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr ""
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr ""
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr ""
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr ""
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr ""
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr ""
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr ""
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr ""
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr ""
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr ""
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr ""
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr ""
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr ""
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr ""
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr ""
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr ""
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr ""
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr ""
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr ""
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr ""
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr ""
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr ""
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr ""
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr ""
diff --git a/po/he.gmo b/po/he.gmo
deleted file mode 100644
index b9cb6d3c..00000000
--- a/po/he.gmo
+++ /dev/null
Binary files differ
diff --git a/po/id.gmo b/po/id.gmo
deleted file mode 100644
index 272d5f8c..00000000
--- a/po/id.gmo
+++ /dev/null
Binary files differ
diff --git a/po/it.gmo b/po/it.gmo
index ac3fa30d..597024e7 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index a2005288..4fd09749 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.81\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-03-19 16:52+0100\n"
"Last-Translator: Antonio Colombo <azc100@gmail.com>\n"
"Language-Team: Italian <it@li.org>\n"
@@ -40,7 +40,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "tentativo di usare scalare '%s' come vettore"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -758,204 +758,204 @@ msgstr ""
"substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo "
"argomento (%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr ""
"strftime: il valore del 'format' in PROCINFO[\"strftime\"] di tipo numerico"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: il secondo argomento non numerico"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: il primo argomento non una stringa"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: 'format' una stringa nulla"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: l'argomento non una stringa"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: almeno un valore fuori dall'intervallo di default"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "la funzione 'system' non permessa in modo 'sandbox'"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: l'argomento non una stringa"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "riferimento a variabile non inizializzata `%s'"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "riferimento a variabile non inizializzata `$%d'"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: l'argomento non una stringa"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: l'argomento non una stringa"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: il primo argomento non numerico"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: il secondo argomento non numerico"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: l'argomento non numerico"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: l'argomento non numerico"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: l'argomento non numerico"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: il terzo argomento non un vettore"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: il terzo argomento 0, trattato come 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: il primo argomento non numerico"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: il secondo argomento non numerico"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): valori troppo alti daranno risultati strani"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: il primo argomento non numerico"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: il secondo argomento non numerico"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): valori troppo alti daranno risultati strani"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: il primo argomento non numerico"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: il secondo argomento non numerico"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: il primo argomento non numerico"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: il secondo argomento non numerico"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: il primo argomento non numerico"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: il secondo argomento non numerico"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: l'argomento non numerico"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): valore negativo dar risultati strani"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): valore con decimali verr troncato"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' non una categoria 'locale' valida"
diff --git a/po/ja.gmo b/po/ja.gmo
index f00953e0..c349e1b7 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index c78d3215..19c654f5 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-07-17 08:28+0900\n"
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -43,7 +43,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "スカラー `%s' を配列として使用する試みです"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -750,203 +750,203 @@ msgstr ""
"substr: 開始インデックス %2$g からの長さ %1$g は第一引数の長さを超えています "
"(%3$lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr "strftime: PROCINFO[\"strftime\"] の書式の値は数値型です"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: 非数値の第二引数を受け取りました"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: 非文字列の第一引数を受け取りました"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: 空の書式文字列を受け取りました"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: 非文字列引数を受け取りました"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: 一つ以上の値がデフォルトの範囲を超えています"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "サンドボックスモードでは 'system' 関数は許可されていません"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: 文字列では無い引数を受け取りました"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "初期化されていない変数 `%s' への参照です"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "初期化されていないフィールド `$%d' への参照です"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: 非文字列引数を受け取りました"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: 非文字列引数を受け取りました"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: 非数値の第一引数を受け取りました"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: 非数値の第二引数を受け取りました"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: 非数値の引数を受け取りました"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: 非数値の引数を受け取りました"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: 非数値の引数を受け取りました"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: 第三引数が配列ではありません"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 第三引数が 0 です。1 を代わりに使用します"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: 非数値の第一引数を受け取りました"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: 非数値の第二引数を受け取りました"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): 負の数値を使用すると異常な結果になります"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): 小数点以下は切り捨てられます"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): シフト値が大き過ぎると異常な結果になります"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: 非数値の第一引数を受け取りました"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: 非数値の第二引数を受け取りました"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): 負の数値を使用すると異常な結果になります"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): 小数点以下は切り捨てられます"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): シフト値が大き過ぎると異常な結果になります"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: 非数値の第一引数を受け取りました"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: 非数値の第二引数を受け取りました"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): 負の数値を使用すると異常な結果になります"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): 小数点以下は切り捨てられます"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: 非数値の第一引数を受け取りました"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: 非数値の第二引数を受け取りました"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): 負の数値を使用すると異常な結果になります"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): 小数点以下は切り捨てられます"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: 非数値の第一引数を受け取りました"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: 非数値の第二引数を受け取りました"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): 負の数値を使用すると異常な結果になります"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): 小数点以下は切り捨てられます"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: 非数値の引数を受け取りました"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): 負の数値を使用すると異常な結果になります"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): 小数点以下は切り捨てられます"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' は無効なロケール区分です"
diff --git a/po/nl.gmo b/po/nl.gmo
index 0fd9c46d..52f492d6 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index 641a6bee..ecb41655 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-07-17 21:44+0200\n"
"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
@@ -46,7 +46,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "scalair '%s' wordt gebruikt als array"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -759,203 +759,203 @@ msgstr ""
"substr: lengte %g bij startindex %g is groter dan de lengte van het eerste "
"argument (%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr "strftime: opmaakwaarde in PROCINFO[\"strftime\"] is numeriek"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: tweede argument is geen getal"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: eerste argument is geen string"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: opmaakstring is leeg"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: argument is geen string"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: minstens één van waarden valt buiten het standaardbereik"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "'system'-functie is niet toegestaan in sandbox-modus"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: argument is geen string"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "verwijzing naar ongeïnitialiseerde variabele '%s'"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "verwijzing naar ongeïnitialiseerd veld '$%d'"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: argument is geen string"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: argument is geen string"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: eerste argument is geen getal"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: tweede argument is geen getal"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: argument is geen getal"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: argument is geen getal"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: argument is geen getal"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: derde argument is geen array"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: derde argument is 0; wordt beschouwd als 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: eerste argument is geen getal"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: tweede argument is geen getal"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: eerste argument is geen getal"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: tweede argument is geen getal"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: eerste argument is geen getal"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: tweede argument is geen getal"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: eerste argument is geen getal"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: tweede argument is geen getal"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: eerste argument is geen getal"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: tweede argument is geen getal"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: argument is geen getal"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): cijfers na de komma worden afgekapt"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: '%s' is geen geldige taalregio-deelcategorie"
diff --git a/po/pl.gmo b/po/pl.gmo
index c90a7959..f0b2f7c1 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 33f5543f..68aedb4f 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.81\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-05-14 11:41-0400\n"
"Last-Translator: Wojciech Polak <polak@gnu.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -45,7 +45,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "próba użycia skalaru `%s' jako tablicy"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -772,206 +772,206 @@ msgstr ""
"substr: długość %g zaczynając od %g przekracza długość pierwszego argumentu "
"(%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr ""
"strftime: wartość formatu w PROCINFO[\"strftime\"] posiada typ numeryczny"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: otrzymano pierwszy argument, który nie jest łańcuchem"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: otrzymano pusty łańcuch formatujący"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: przynajmniej jedna z wartości jest poza domyślnym zakresem"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "funkcja 'system' nie jest dozwolona w trybie piaskownicy"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "odwołanie do niezainicjowanej zmiennej `%s'"
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "odwołanie do niezainicjowanego pola `$%d'"
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: otrzymano trzeci argument, który nie jest tablicą"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: trzeci argument 0 potraktowany jako 1"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): zbyt duża wartość przesunięcia spowoduje dziwne wyniki"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): zbyt duża wartość przesunięcia spowoduje dziwne wyniki"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' nie jest prawidłową kategorią lokalizacji"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
deleted file mode 100644
index 4cbc6792..00000000
--- a/po/pt_BR.gmo
+++ /dev/null
Binary files differ
diff --git a/po/ro.gmo b/po/ro.gmo
deleted file mode 100644
index e3534b89..00000000
--- a/po/ro.gmo
+++ /dev/null
Binary files differ
diff --git a/po/rw.gmo b/po/rw.gmo
deleted file mode 100644
index a08f9183..00000000
--- a/po/rw.gmo
+++ /dev/null
Binary files differ
diff --git a/po/sv.gmo b/po/sv.gmo
index 0878d1e0..79e809be 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 5a9f0161..874798c8 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 4.0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2011-10-24 05:57+0200\n"
+"POT-Creation-Date: 2011-11-14 21:46+0200\n"
"PO-Revision-Date: 2011-07-16 15:20+0200\n"
"Last-Translator: Gran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -44,7 +44,7 @@ msgid "attempt to use scalar `%s' as an array"
msgstr "frsk att anvnda skalren \"%s\" som en vektor"
#: array.c:302 array.c:707 builtin.c:84 builtin.c:1384 builtin.c:1426
-#: builtin.c:1439 builtin.c:1856 builtin.c:1868 eval.c:1135 eval.c:1139
+#: builtin.c:1439 builtin.c:1858 builtin.c:1870 eval.c:1135 eval.c:1139
#: eval.c:1495 eval.c:1812
#, c-format
msgid "attempt to use array `%s' in a scalar context"
@@ -765,203 +765,203 @@ msgstr ""
"substr: lngden %g vid startindex %g verskrider det frsta argumentets "
"lngd (%lu)"
-#: builtin.c:1655
+#: builtin.c:1656
msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type"
msgstr "strftime: formatvrde i PROCINFO[\"strftime\"] har numerisk typ"
-#: builtin.c:1678
+#: builtin.c:1679
msgid "strftime: received non-numeric second argument"
msgstr "strftime: fick ett ickenumeriskt andra argument"
-#: builtin.c:1681
+#: builtin.c:1682
msgid "strftime: second argument less than 0 or too big for time_t"
msgstr ""
-#: builtin.c:1687
+#: builtin.c:1689
msgid "strftime: received non-string first argument"
msgstr "strftime: fick ett frsta argument som inte r en strng"
-#: builtin.c:1693
+#: builtin.c:1695
msgid "strftime: received empty format string"
msgstr "strftime: fick en tom formatstrng"
-#: builtin.c:1759
+#: builtin.c:1761
msgid "mktime: received non-string argument"
msgstr "mktime: fick ett argument som inte r en strng"
-#: builtin.c:1776
+#: builtin.c:1778
msgid "mktime: at least one of the values is out of the default range"
msgstr "mktime: tminstone ett av vrdena r utanfr standardintervallet"
-#: builtin.c:1811
+#: builtin.c:1813
msgid "'system' function not allowed in sandbox mode"
msgstr "funktionen \"system\" r inte tillten i sandldelge"
-#: builtin.c:1816
+#: builtin.c:1818
msgid "system: received non-string argument"
msgstr "system: fick ett argument som inte r en strng"
-#: builtin.c:1871 eval.c:1159 eval.c:1790 eval.c:1803
+#: builtin.c:1873 eval.c:1159 eval.c:1790 eval.c:1803
#, c-format
msgid "reference to uninitialized variable `%s'"
msgstr "referens till icke initierad variabel \"%s\""
-#: builtin.c:1938
+#: builtin.c:1940
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referens till icke initierat flt \"$%d\""
-#: builtin.c:2025
+#: builtin.c:2027
msgid "tolower: received non-string argument"
msgstr "tolower: fick ett argument som inte r en strng"
-#: builtin.c:2059
+#: builtin.c:2061
msgid "toupper: received non-string argument"
msgstr "toupper: fick ett argument som inte r en strng"
-#: builtin.c:2095
+#: builtin.c:2097
msgid "atan2: received non-numeric first argument"
msgstr "atan2: fick ett ickenumeriskt frsta argument"
-#: builtin.c:2097
+#: builtin.c:2099
msgid "atan2: received non-numeric second argument"
msgstr "atan2: fick ett ickenumeriskt andra argument"
-#: builtin.c:2116
+#: builtin.c:2118
msgid "sin: received non-numeric argument"
msgstr "sin: fick ett ickenumeriskt argument"
-#: builtin.c:2132
+#: builtin.c:2134
msgid "cos: received non-numeric argument"
msgstr "cos: fick ett ickenumeriskt argument"
-#: builtin.c:2185
+#: builtin.c:2187
msgid "srand: received non-numeric argument"
msgstr "srand: fick ett ickenumeriskt argument"
-#: builtin.c:2216
+#: builtin.c:2218
msgid "match: third argument is not an array"
msgstr "match: tredje argumentet r inte en vektor"
-#: builtin.c:2480
+#: builtin.c:2482
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: nollan i tredje argumentet behandlad som en etta"
-#: builtin.c:2773
+#: builtin.c:2775
msgid "lshift: received non-numeric first argument"
msgstr "lshift: fick ett ickenumeriskt frsta argument"
-#: builtin.c:2775
+#: builtin.c:2777
msgid "lshift: received non-numeric second argument"
msgstr "lshift: fick ett ickenumeriskt andra argument"
-#: builtin.c:2781
+#: builtin.c:2783
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negativa vrden kommer ge konstiga resultat"
-#: builtin.c:2783
+#: builtin.c:2785
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): flyttalsvrden kommer trunkeras"
-#: builtin.c:2785
+#: builtin.c:2787
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): fr stora skiftvrden kommer ge konstiga resultat"
-#: builtin.c:2810
+#: builtin.c:2812
msgid "rshift: received non-numeric first argument"
msgstr "rshift: fick ett ickenumeriskt frsta argument"
-#: builtin.c:2812
+#: builtin.c:2814
msgid "rshift: received non-numeric second argument"
msgstr "rshift: fick ett ickenumeriskt andra argument"
-#: builtin.c:2818
+#: builtin.c:2820
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negativa vrden kommer ge konstiga resultat"
-#: builtin.c:2820
+#: builtin.c:2822
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): flyttalsvrden kommer trunkeras"
-#: builtin.c:2822
+#: builtin.c:2824
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): fr stora skiftvrden kommer ge konstiga resultat"
-#: builtin.c:2847
+#: builtin.c:2849
msgid "and: received non-numeric first argument"
msgstr "and: fick ett ickenumeriskt frsta argument"
-#: builtin.c:2849
+#: builtin.c:2851
msgid "and: received non-numeric second argument"
msgstr "and: fick ett ickenumeriskt andra argument"
-#: builtin.c:2855
+#: builtin.c:2857
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negativa vrden kommer ge konstiga resultat"
-#: builtin.c:2857
+#: builtin.c:2859
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): flyttalsvrden kommer trunkeras"
-#: builtin.c:2882
+#: builtin.c:2884
msgid "or: received non-numeric first argument"
msgstr "or: fick ett ickenumeriskt frsta argument"
-#: builtin.c:2884
+#: builtin.c:2886
msgid "or: received non-numeric second argument"
msgstr "or: fick ett ickenumeriskt andra argument"
-#: builtin.c:2890
+#: builtin.c:2892
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negativa vrden kommer ge konstiga resultat"
-#: builtin.c:2892
+#: builtin.c:2894
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): flyttalsvrden kommer trunkeras"
-#: builtin.c:2920
+#: builtin.c:2922
msgid "xor: received non-numeric first argument"
msgstr "xor: fick ett ickenumeriskt frsta argument"
-#: builtin.c:2922
+#: builtin.c:2924
msgid "xor: received non-numeric second argument"
msgstr "xor: fick ett ickenumeriskt andra argument"
-#: builtin.c:2928
+#: builtin.c:2930
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negativa vrden kommer ge konstiga resultat"
-#: builtin.c:2930
+#: builtin.c:2932
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): flyttalsvrden kommer trunkeras"
-#: builtin.c:2954 builtin.c:2960
+#: builtin.c:2956 builtin.c:2962
msgid "compl: received non-numeric argument"
msgstr "compl: fick ett ickenumeriskt argument"
-#: builtin.c:2962
+#: builtin.c:2964
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negativa vrden kommer ge konstiga resultat"
-#: builtin.c:2964
+#: builtin.c:2966
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): flyttalsvrden kommer trunkeras"
-#: builtin.c:3133
+#: builtin.c:3135
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: \"%s\" r inte en giltig lokalkategori"
diff --git a/po/tr.gmo b/po/tr.gmo
deleted file mode 100644
index 146da41d..00000000
--- a/po/tr.gmo
+++ /dev/null
Binary files differ
diff --git a/po/vi.gmo b/po/vi.gmo
deleted file mode 100644
index e3a5e619..00000000
--- a/po/vi.gmo
+++ /dev/null
Binary files differ
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
deleted file mode 100644
index 7ed096c3..00000000
--- a/po/zh_CN.gmo
+++ /dev/null
Binary files differ
diff --git a/profile.c b/profile.c
index 5c581e8e..c721180f 100644
--- a/profile.c
+++ b/profile.c
@@ -1368,8 +1368,8 @@ redir2str(int redirtype)
" >> ", /* redirect_append */
" | ", /* redirect_pipe */
" | ", /* redirect_pipein */
- " < " /* redirect_input */
- " |& " /* redirect_twoway */
+ " < ", /* redirect_input */
+ " |& ", /* redirect_twoway */
};
if (redirtype < 0 || redirtype > redirect_twoway)
diff --git a/regex_internal.h b/regex_internal.h
index b5dc7b46..5fcab48a 100644
--- a/regex_internal.h
+++ b/regex_internal.h
@@ -27,16 +27,18 @@
#include <stdlib.h>
#include <string.h>
+#include "mbsupport.h" /* gawk */
+
#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h>
#endif
#if defined HAVE_LOCALE_H || defined _LIBC
# include <locale.h>
#endif
-#if defined HAVE_WCHAR_H || defined _LIBC
+#if MBS_SUPPORT && (defined HAVE_WCHAR_H || defined _LIBC)
# include <wchar.h>
#endif /* HAVE_WCHAR_H || _LIBC */
-#if defined HAVE_WCTYPE_H || defined _LIBC
+#if MBS_SUPPORT && (defined HAVE_WCTYPE_H || defined _LIBC)
# include <wctype.h>
#endif /* HAVE_WCTYPE_H || _LIBC */
#if defined HAVE_STDBOOL_H || defined _LIBC
@@ -108,8 +110,6 @@ is_blank (int c)
# define SIZE_MAX ((size_t) -1)
#endif
-#include "mbsupport.h" /* gawk */
-
#if MBS_SUPPORT || _LIBC
# define RE_ENABLE_I18N
#endif
diff --git a/replace.c b/replace.c
index d2dcbbcc..d1c05ad6 100644
--- a/replace.c
+++ b/replace.c
@@ -111,3 +111,7 @@
#ifndef HAVE_STRCOLL
#include "missing_d/strcoll.c"
#endif
+
+#if ! MBS_SUPPORT
+#include "missing_d/wcmisc.c"
+#endif
diff --git a/test/ChangeLog b/test/ChangeLog
index 05a74f87..1ceb5b35 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am: Rationalize the $(CMP) lines wherever possible.
+
2011-10-24 Arnold D. Robbins <arnold@skeeve.com>
* beginfile2.sh: Use `...` instead of $(...) for broken systems
diff --git a/test/Makefile.am b/test/Makefile.am
index 450fc35d..b5924940 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -977,7 +977,7 @@ argarray::
.) : ;; \
*) rm -f ./argarray.in ;; \
esac
- @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
regtest::
@echo 'Some of the output from regtest is very system specific, do not'
@@ -992,43 +992,44 @@ manyfiles::
@$(AWK) 'BEGIN { for (i = 1; i <= 1030; i++) print i, i}' >_$@
@$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@
@wc -l junk/* | $(AWK) '$$1 != 2' | wc -l | sed "s/ *//g" > _$@
- @rm -rf junk ; $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+ @rm -rf junk
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
compare::
@echo $@
@$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@
- @-$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
inftest::
@echo $@
@echo This test is very machine specific...
@$(AWK) -f $(srcdir)/inftest.awk | sed "s/inf/Inf/g" >_$@
- @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
getline2::
@echo $@
@$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@
- @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
awkpath::
@echo $@
@AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@
- @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
argtest::
@echo $@
@$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@
- @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
badargs::
@echo $@
@-$(AWK) -f 2>&1 | grep -v patchlevel >_$@
- @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
nonl::
@echo $@
@-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1
- @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
strftime::
@echo This test could fail on slow machines or on a minute boundary,
@@ -1042,7 +1043,7 @@ strftime::
litoct::
@echo $@
@echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@
- @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
devfd::
@echo $@
@@ -1052,13 +1053,13 @@ devfd::
fflush::
@echo $@
@$(srcdir)/fflush.sh >_$@
- @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
tweakfld::
@echo $@
@$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@
@rm -f errors.cleanup
- @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
mmap8k::
@echo $@
@@ -1068,7 +1069,7 @@ mmap8k::
tradanch::
@echo $@
@$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@
- @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
# AIX /bin/sh exec's the last command in a list, therefore issue a ":"
# command so that pid.sh is fork'ed as a child before being exec'ed.
@@ -1083,12 +1084,12 @@ strftlng::
@if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \
TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \
fi
- @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
nors::
@echo $@
@echo A B C D E | tr -d '\12\15' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@
- @-$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
fmtspcl.ok: fmtspcl.tok Makefile
@$(AWK) -v "sd=$(srcdir)" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < $(srcdir)/fmtspcl.tok > $@ 2>/dev/null
@@ -1101,18 +1102,18 @@ fmtspcl: fmtspcl.ok
reint::
@echo $@
@$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@
- @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
pipeio1::
@echo $@
@$(AWK) -f $(srcdir)/pipeio1.awk >_$@
@rm -f test1 test2
- @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
pipeio2::
@echo $@
@$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@
- @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
clobber::
@echo $@
@@ -1123,7 +1124,7 @@ clobber::
arynocls::
@echo $@
@-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@
- @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
getlnbuf::
@echo $@
@@ -1157,12 +1158,12 @@ inetdayt::
redfilnm::
@echo $@
@$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@
- @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
leaddig::
@echo $@
@$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@
- @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
gsubtst3::
@echo $@
diff --git a/test/Makefile.in b/test/Makefile.in
index 91173ea5..65bad45d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1327,7 +1327,7 @@ argarray::
.) : ;; \
*) rm -f ./argarray.in ;; \
esac
- @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
regtest::
@echo 'Some of the output from regtest is very system specific, do not'
@@ -1342,43 +1342,44 @@ manyfiles::
@$(AWK) 'BEGIN { for (i = 1; i <= 1030; i++) print i, i}' >_$@
@$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@
@wc -l junk/* | $(AWK) '$$1 != 2' | wc -l | sed "s/ *//g" > _$@
- @rm -rf junk ; $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+ @rm -rf junk
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
compare::
@echo $@
@$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@
- @-$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
inftest::
@echo $@
@echo This test is very machine specific...
@$(AWK) -f $(srcdir)/inftest.awk | sed "s/inf/Inf/g" >_$@
- @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
getline2::
@echo $@
@$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@
- @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
awkpath::
@echo $@
@AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@
- @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
argtest::
@echo $@
@$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@
- @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
badargs::
@echo $@
@-$(AWK) -f 2>&1 | grep -v patchlevel >_$@
- @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
nonl::
@echo $@
@-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1
- @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
strftime::
@echo This test could fail on slow machines or on a minute boundary,
@@ -1392,7 +1393,7 @@ strftime::
litoct::
@echo $@
@echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@
- @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
devfd::
@echo $@
@@ -1402,13 +1403,13 @@ devfd::
fflush::
@echo $@
@$(srcdir)/fflush.sh >_$@
- @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
tweakfld::
@echo $@
@$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@
@rm -f errors.cleanup
- @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
mmap8k::
@echo $@
@@ -1418,7 +1419,7 @@ mmap8k::
tradanch::
@echo $@
@$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@
- @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
# AIX /bin/sh exec's the last command in a list, therefore issue a ":"
# command so that pid.sh is fork'ed as a child before being exec'ed.
@@ -1433,12 +1434,12 @@ strftlng::
@if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \
TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \
fi
- @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
nors::
@echo $@
@echo A B C D E | tr -d '\12\15' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@
- @-$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
fmtspcl.ok: fmtspcl.tok Makefile
@$(AWK) -v "sd=$(srcdir)" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < $(srcdir)/fmtspcl.tok > $@ 2>/dev/null
@@ -1451,18 +1452,18 @@ fmtspcl: fmtspcl.ok
reint::
@echo $@
@$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@
- @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
pipeio1::
@echo $@
@$(AWK) -f $(srcdir)/pipeio1.awk >_$@
@rm -f test1 test2
- @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
pipeio2::
@echo $@
@$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@
- @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
clobber::
@echo $@
@@ -1473,7 +1474,7 @@ clobber::
arynocls::
@echo $@
@-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@
- @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
getlnbuf::
@echo $@
@@ -1507,12 +1508,12 @@ inetdayt::
redfilnm::
@echo $@
@$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@
- @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
leaddig::
@echo $@
@$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@
- @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
gsubtst3::
@echo $@
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 88a4bf88..62db87e1 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,20 @@
+2011-11-02 Pat Rankin <r.pat.rankin@gmail.com>
+
+ * vms-conf.h (HAVE_SETSID, HAVE_SYS_IOCTL): Add but leave undef'd.
+ (HAVE_ISWCTYPE, HAVE_ISWLOWER, HAVE_ISWUPPER, HAVE_MBRLEN,
+ HAVE_MBRTOWC, HAVE_TOWLOWER, HAVE_TOWUPPER, HAVE_WCHAR_H,
+ HAVE_WCRTOMB, HAVE_WCSCOLL, HAVE_WCTYPE, HAVE_WCTYPE_H,
+ HAVE_WCTYPE_T): Define as 1 since DEC C supports all these.
+
+ * descrip.mms (replace.obj): Add dependencies for missing_d/*.c.
+ * vmstest.com (unix_tests): Fix typo in spelling of rtlen01.
+
+2011-10-30 Pat Rankin <r.pat.rankin@gmail.com>
+
+ * vmstest.com (fpat3, fwtest3, getline5, gsubtst7, gsubtst8,
+ pty1, rtlen, rtlen01, rtlenmb): New tests.
+ (posix2008sub): Revised test.
+
2011-10-25 Anders Wallin <anders_s_wallin@yahoo.se>
* vmstest.com (posix2008sub): Added as specific test in order to
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 967a312e..40b97eb1 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -48,6 +48,7 @@
# location of various source files, relative to the 'main' directory
VMSDIR = [.vms]
DOCDIR = [.doc]
+MISSNGD = [.missing_d]
MAKEFILE = $(VMSDIR)Descrip.MMS
# debugging &c !'ccflags' is an escape to allow external compile flags
@@ -226,6 +227,13 @@ awkgram.obj : awkgram.c awk.h
dfa.obj : dfa.c dfa.h
regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h
command.obj,debug.obj : cmd.h
+replace.obj : replace.c $(MISSNGD)system.c $(MISSNGD)memcmp.c \
+ $(MISSNGD)memcpy.c $(MISSNGD)memset.c $(MISSNGD)memmove.c \
+ $(MISSNGD)strncasecmp.c $(MISSNGD)strerror.c \
+ $(MISSNGD)strftime.c $(MISSNGD)strchr.c $(MISSNGD)strtod.c \
+ $(MISSNGD)strtoul.c $(MISSNGD)tzset.c $(MISSNGD)mktime.c \
+ $(MISSNGD)snprintf.c $(MISSNGD)getaddrinfo.c $(MISSNGD)usleep.c \
+ $(MISSNGD)setenv.c $(MISSNGD)strcoll.c $(MISSNGD)wcmisc.c
# bison or yacc required
awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c
diff --git a/vms/vms-conf.h b/vms/vms-conf.h
index cbdc9508..c42118ff 100644
--- a/vms/vms-conf.h
+++ b/vms/vms-conf.h
@@ -128,13 +128,13 @@
#define HAVE_ISASCII 1
/* Define to 1 if you have the `iswctype' function. */
-#undef HAVE_ISWCTYPE
+#define HAVE_ISWCTYPE 1
/* Define to 1 if you have the `iswlower' function. */
-#undef HAVE_ISWLOWER
+#define HAVE_ISWLOWER 1
/* Define to 1 if you have the `iswupper' function. */
-#undef HAVE_ISWUPPER
+#define HAVE_ISWUPPER 1
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
@@ -167,10 +167,10 @@
#undef HAVE_LONG_LONG_INT
/* Define to 1 if you have the `mbrlen' function. */
-#undef HAVE_MBRLEN
+#define HAVE_MBRLEN 1
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
-#undef HAVE_MBRTOWC
+#define HAVE_MBRTOWC 1
/* Define to 1 if you have the <mcheck.h> header file. */
#undef HAVE_MCHECK_H
@@ -214,6 +214,9 @@
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
+/* Define to 1 if you have the `setsid' function. */
+#undef HAVE_SETSID
+
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
@@ -289,6 +292,9 @@
/* Define to 1 if you have the `system' function. */
#define HAVE_SYSTEM 1
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
@@ -322,10 +328,10 @@
#undef HAVE_TM_ZONE
/* Define to 1 if you have the `towlower' function. */
-#undef HAVE_TOWLOWER
+#define HAVE_TOWLOWER 1
/* Define to 1 if you have the `towupper' function. */
-#undef HAVE_TOWUPPER
+#define HAVE_TOWUPPER 1
/* Define to 1 if you don't have `tm_zone' but do have the external array
`tzname'. */
@@ -357,22 +363,22 @@
#define HAVE_VPRINTF 1
/* Define to 1 if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
+#define HAVE_WCHAR_H 1
/* Define to 1 if you have the `wcrtomb' function. */
-#undef HAVE_WCRTOMB
+#define HAVE_WCRTOMB 1
/* Define to 1 if you have the `wcscoll' function. */
-#undef HAVE_WCSCOLL
+#define HAVE_WCSCOLL 1
/* Define to 1 if you have the `wctype' function. */
-#undef HAVE_WCTYPE
+#define HAVE_WCTYPE 1
/* Define to 1 if you have the <wctype.h> header file. */
-#undef HAVE_WCTYPE_H
+#define HAVE_WCTYPE_H 1
/* systems should define this type here */
-#undef HAVE_WCTYPE_T
+#define HAVE_WCTYPE_T 1
/* systems should define this type here */
#undef HAVE_WINT_T
diff --git a/vms/vmstest.com b/vms/vmstest.com
index d4d3d8a9..146053e1 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -47,15 +47,17 @@ $ list = "msg addcomma anchgsub argarray arrayparm arrayref" -
+ " clobber closebad clsflnam compare compare2 concat1"
$ gosub list_of_tests
$ list = "concat2 concat3 concat4 convfmt datanonl defref" -
- + " delargv delarprm delarpm2 delfunc dynlj eofsplit exitval1" -
- + " dfastress" -
+ + " delargv delarprm delarpm2 delfunc dfastress dynlj" -
+ + " eofsplit exitval1" -
+ " exitval2 fcall_exit fcall_exit2 fldchg fldchgnf" -
+ " fnamedat fnarray fnarray2 fnaryscl fnasgnm fnmisc" -
+ " fordel forref forsimp fsbs fsspcoln fsrs fstabplus" -
- + " funsemnl funsmnam funstack getline getline2 getline3"
+ + " funsemnl funsmnam funstack getline getline2 getline3" -
+ + " getline4"
$ gosub list_of_tests
$ list = "getlnbuf getnr2tb getnr2tm gsubasgn gsubtest" -
- + " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex" -
+ + " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6" -
+ + " gsubtst7 gsubtst8 hex" -
+ " hsprint inputred intest intprec iobug1" -
+ " leaddig leadnl litoct longsub longwrds"-
+ " manglprm math membug1 messages minusstr mmap8k" -
@@ -87,7 +89,7 @@ $
$unix:
$unix_tests: echo "unix_tests..."
$ list = "fflush getlnhd localenl pid pipeio1 pipeio2" -
- + " poundbang space strftlng"
+ + " poundbang rtlen rtlen01 space strftlng"
$ gosub list_of_tests
$ return
$
@@ -96,7 +98,8 @@ $gawk_ext: echo "gawk_ext... (gawk.extensions)"
$ list = "aadelete1 aadelete2 aarray1 aasort aasorti" -
+ " argtest arraysort backw badargs beginfile1 binmode1" -
+ " clos1way delsub devfd devfd1 devfd2 dumpvars exit" -
- + " fieldwdth fpat1 fpat2 fpatnull funlen fsfwfs fwtest fwtest2" -
+ + " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen fsfwfs" -
+ + " fwtest fwtest2 fwtest3" -
+ " gensub gensub2 getlndir gnuops2 gnuops3 gnureops" -
+ " icasefs icasers igncdym igncfs ignrcase ignrcas2"
$ gosub list_of_tests
@@ -104,7 +107,7 @@ $ list = "indirectcall lint lintold lintwarn match1" -
+ " match2 match3 manyfiles mbprintf3 mbstr1" -
+ " nastyparm next nondec" -
+ " nondec2 patsplit posix profile1 procinfs printfbad1" -
- + " printfbad2 regx8bit rebuf reint reint2 rsstart1" -
+ + " printfbad2 pty1 regx8bit rebuf reint reint2 rsstart1" -
+ " rsstart2 rsstart3 rstest6 shadow sortfor sortu" -
+ " splitarg4 strtonum strftime switch2"
$ gosub list_of_tests
@@ -121,7 +124,7 @@ $charset_tests: echo "charset_tests..."
$ ! without i18n kit, VMS only supports the C locale
$ ! and several of these fail
$ list = "asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1" -
- + " mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc"
+ + " mbprintf1 mbprintf2 rebt8b2 rtlenmb sort1 sprintfc"
$ gosub list_of_tests
$ return
$
@@ -194,6 +197,7 @@ $fldchgnf:
$fmttest:
$fordel:
$fpat1:
+$fpat3:
$fpatnull:
$fsfwfs:
$fsrs:
@@ -201,14 +205,18 @@ $funlen:
$funstack:
$fwtest:
$fwtest2:
+$fwtest3:
$gensub:
$getline3:
+$getline4:
$getnr2tb:
$getnr2tm:
$gsubtest:
$gsubtst2:
$gsubtst4:
$gsubtst5:
+$gsubtst7:
+$gsubtst8:
$hex:
$icasers:
$igncfs:
@@ -363,7 +371,8 @@ $ gawk -f printlang.awk
$ return
$
$poundbang:
-$ echo "poundbang: not supported"
+$pty1:
+$ echo "''test': not supported"
$ return
$
$messages: echo "messages"
@@ -1077,16 +1086,12 @@ $ igncascmp space.ok _space.tmp
$ if $status then rm _space.tmp;
$ return
$
-$posix2008sub: echo "posix2008sub"
-$ gawk --posix -f posix2008sub.awk >_posix2008sub.tmp
-$ cmp posix2008sub.ok _posix2008sub.tmp
-$ if $status then rm _posix2008sub.tmp;
-$ return
-$
-$printf0: echo "printf0"
-$ gawk --posix -f printf0.awk >_printf0.tmp
-$ cmp printf0.ok _printf0.tmp
-$ if $status then rm _printf0.tmp;
+$posix2008sub:
+$printf0:
+$ echo "''test'"
+$ gawk --posix -f 'test'.awk >_'test'.tmp
+$ cmp 'test'.ok _'test'.tmp
+$ if $status then rm _'test'.tmp;
$ return
$
$rsnulbig: echo "rsnulbig"
@@ -1201,6 +1206,50 @@ $ cmp rsstart3.ok _rsstart3.tmp
$ if $status then rm _rsstart3.tmp;
$ return
$
+$rtlen:
+$rtlen01:
+$rtlenmb:
+$ echo "''test'"
+$ if .not.pipeok
+$ then echo "Without the PIPE command, ''test' can't be run."
+$ On warning then return
+$ pipe echo "With PIPE, ''test' will finish quickly."
+$ On warning then $
+$ pipeok = 1
+$ endif
+$ f = "''test'.ok"
+$ if test.eqs."rtlen" .or. test.eqs."rtlenmb"
+$ then
+$ if test.eqs."rtlenmb" then GAWKLOCALE = "en_US.UTF-8"
+$ pipe -
+ gawk -- "BEGIN {printf ""0\n\n\n1\n\n\n\n\n2\n\n""; exit}" | -
+ gawk -- "BEGIN {RS=""""}; {print length(RT)}" >_'test'.tmp
+$ if test.eqs."rtlenmb" then delet_/Symbol/Local GAWKLOCALE
+$ if test.eqs."rtlenmb" then f = "rtlen.ok"
+$ else
+$ call/Output=_rtlen01.tmp do__rtlen01
+$ ! first test yields 1 instead of 0 due to forced newline
+$ gawk -- "FNR==1 {sub(""1"",""0"")}; {print}" _rtlen01.tmp >_rtlen01.too
+$ rm _rtlen01.tmp;
+$ mv _rtlen01.too _rtlen01.tmp
+$ endif
+$ cmp 'f' _'test'.tmp
+$ if $status then rm _'test'.tmp;
+$ return
+$
+$do__rtlen01: subroutine
+$ gawk = gawk !PIPE won't propagate local symbols from outer procedure
+$ pipe -
+ gawk -- "BEGIN {printf ""0""; exit}" | -
+ gawk -- "BEGIN {RS=""""}; {print length(RT)}"
+$ pipe -
+ gawk -- "BEGIN {printf ""0\n""; exit}" | -
+ gawk -- "BEGIN {RS=""""}; {print length(RT)}"
+$ pipe -
+ gawk -- "BEGIN {printf ""0\n\n""; exit}" | -
+ gawk -- "BEGIN {RS=""""}; {print length(RT)}"
+$ endsubroutine !do__rtlen01
+$
$nondec2: echo "nondec2"
$ gawk --non-decimal-data -v "a=0x1" -f nondec2.awk >_nondec2.tmp
$ cmp nondec2.ok _nondec2.tmp