summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-01-20 22:10:38 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-01-20 22:10:38 +0200
commit941bfc7ad6fc022f9836d282328b7ffc5f70bcb8 (patch)
tree19bbdc046bc15c9dd569a83276ffee15ccb6b56a
parenta8db21f1aea3b7bbab39a423aad61571dbe2b0ec (diff)
parent4c01db1833a02173c910d463eaed77ad6ed66195 (diff)
downloadgawk-print-exp.tar.gz
Merge branch 'master' into print-expprint-exp
-rw-r--r--ChangeLog37
-rw-r--r--NEWS3
-rw-r--r--TODO4
-rw-r--r--awk.h1
-rw-r--r--awkgram.c835
-rw-r--r--awkgram.y89
-rw-r--r--builtin.c3
-rw-r--r--command.c6
-rw-r--r--dfa.c2
-rw-r--r--dfa.h2
-rw-r--r--doc/ChangeLog9
-rw-r--r--doc/gawk.info1285
-rw-r--r--doc/gawk.texi138
-rw-r--r--doc/gawkinet.info6
-rw-r--r--doc/gawkinet.texi2
-rw-r--r--doc/gawktexi.in138
-rw-r--r--gawkapi.c1
-rw-r--r--getopt.c4
-rw-r--r--getopt.h2
-rw-r--r--getopt1.c2
-rw-r--r--getopt_int.h2
-rw-r--r--main.c6
-rw-r--r--symbol.c1
-rw-r--r--test/ChangeLog16
-rw-r--r--test/Makefile.am12
-rw-r--r--test/Makefile.in12
-rw-r--r--test/id.ok1
-rw-r--r--test/profile8.awk9
-rw-r--r--test/profile8.ok14
29 files changed, 1294 insertions, 1348 deletions
diff --git a/ChangeLog b/ChangeLog
index 3335da3b..ffcda67b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2015-01-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkapi.c (api_set_array_element): Remove useless call to
+ make_aname.
+ * symbol.c (load_symbols): Ditto.
+ Thanks to Andrew Schorr for pointing out the problem.
+
+2015-01-19 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.c: Update to bison 3.0.3.
+ * command.c: Ditto.
+ * NEWS: Note same.
+
+2015-01-16 Stephen Davies <sdavies@sdc.com.au>
+
+ * awkgram.y (rule): Set first_rule to false. Catches more cases
+ for gathering comments. Thanks to Hermann Peifer for the test case.
+
+2015-01-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.h, dfa.c: Sync with grep. Mainly copyright updates.
+ * getopt.c, getopt.h, getopt1.c getopt_int.h: Sync with GLIBC.
+ Mainly copyright updates, one minor code fix.
+
+2015-01-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ Remove deferred variables.
+
+ * awk.h (register_deferred_variable): Remove declaration.
+ * awkgram.y (is_deferred_variable, process_deferred,
+ symtab_used, extensions_used, deferred_variables,
+ process_deferred): Remove declarations, bodies, and uses.
+ * builtin.c (do_length): Update comment.
+ * main.c (init_vars): Just call load_procinfo() and `load_environ()'.
+
2015-01-07 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Update debug flags if developing.
@@ -1812,7 +1847,7 @@
2012-12-25 Arnold D. Robbins <arnold@skeeve.com>
Remove sym-constant from API after discussions with John
- Haque and Andy Schorr.
+ Haque and Andrew Schorr.
* gawkapi.h (api_sym_constant): Removed field in API struct.
(sym_constant): Remove macro.
diff --git a/NEWS b/NEWS
index 84505cf7..421d2c76 100644
--- a/NEWS
+++ b/NEWS
@@ -81,7 +81,8 @@ Changes from 4.1.1 to 4.1.2
AWKPATH setting, be sure to put "." in it somewhere. The documentation
has been updated and clarified.
-10. Infrastructure upgrades: Automake 1.14.1, Gettext 0.19.3, Libtool 2.4.3.
+10. Infrastructure upgrades: Automake 1.14.1, Gettext 0.19.3, Libtool 2.4.3,
+ Bison 3.0.3.
XX. A number of bugs have been fixed. See the ChangeLog.
diff --git a/TODO b/TODO
index 235ded0e..3670f126 100644
--- a/TODO
+++ b/TODO
@@ -63,8 +63,6 @@ Major New Features
Also needed:
- Indirect calls of built-ins
- Indirect calls of extension functions
Indirect through array elements, not just scalar variables
Some way to make regexp constants first class citizens:
@@ -127,8 +125,6 @@ Things To Think About That May Never Happen
Patch lexer for @include and @load to make quotes optional.
(Really needed?)
- ? Have strftime() pay attention to the value of ENVIRON["TZ"]
-
Add a lint check if the return value of a function is used but
the function did not supply a value.
diff --git a/awk.h b/awk.h
index 62e11cc3..5ef62c5a 100644
--- a/awk.h
+++ b/awk.h
@@ -1332,7 +1332,6 @@ extern void shadow_funcs(void);
extern int check_special(const char *name);
extern SRCFILE *add_srcfile(enum srctype stype, char *src, SRCFILE *curr, bool *already_included, int *errcode);
extern void free_srcfile(SRCFILE *thisfile);
-extern void register_deferred_variable(const char *name, NODE *(*load_func)(void));
extern int files_are_same(char *path, SRCFILE *src);
extern void valinfo(NODE *n, Func_print print_func, FILE *fp);
extern void negate_num(NODE *n);
diff --git a/awkgram.c b/awkgram.c
index 51161928..fa16c11b 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.0.3. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.2"
+#define YYBISON_VERSION "3.0.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -97,7 +97,6 @@ static int include_source(INSTRUCTION *file);
static int load_library(INSTRUCTION *file);
static void next_sourcefile(void);
static char *tokexpand(void);
-static bool is_deferred_variable(const char *name);
#define instruction(t) bcalloc(t, 1, 0)
@@ -120,8 +119,6 @@ static int count_expressions(INSTRUCTION **list, bool isarg);
static INSTRUCTION *optimize_assignment(INSTRUCTION *exp);
static void add_lint(INSTRUCTION *list, LINTTYPE linttype);
-static void process_deferred();
-
enum defref { FUNC_DEFINE, FUNC_USE, FUNC_EXT };
static void func_use(const char *name, enum defref how);
static void check_funcs(void);
@@ -134,7 +131,6 @@ static void check_comment(void);
static bool want_source = false;
static bool want_regexp = false; /* lexical scanning kludge */
static char *in_function; /* parsing kludge */
-static bool symtab_used = false; /* program used SYMTAB */
static int rule = 0;
const char *const ruletab[] = {
@@ -163,7 +159,6 @@ static int lasttok = 0;
static bool eof_warned = false; /* GLOBAL: want warning for each file */
static int break_allowed; /* kludge for break */
static int continue_allowed; /* kludge for continue */
-static bool extensions_used = false; /* program uses extensions */
#define END_FILE -1000
#define END_SRC -2000
@@ -207,7 +202,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#line 211 "awkgram.c" /* yacc.c:339 */
+#line 206 "awkgram.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -365,7 +360,7 @@ int yyparse (void);
/* Copy the second part of user declarations. */
-#line 369 "awkgram.c" /* yacc.c:358 */
+#line 364 "awkgram.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -668,26 +663,26 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 211, 211, 213, 218, 219, 225, 237, 241, 252,
- 258, 263, 271, 279, 281, 286, 295, 297, 303, 311,
- 321, 351, 365, 379, 387, 398, 410, 412, 414, 420,
- 425, 426, 430, 465, 464, 498, 500, 505, 511, 539,
- 544, 545, 549, 551, 553, 560, 650, 692, 734, 847,
- 854, 861, 871, 880, 889, 898, 909, 925, 924, 948,
- 952, 952, 967, 967, 972, 972, 1005, 1035, 1041, 1042,
- 1048, 1049, 1056, 1061, 1073, 1087, 1089, 1097, 1102, 1104,
- 1112, 1114, 1119, 1121, 1130, 1131, 1139, 1144, 1144, 1155,
- 1159, 1167, 1168, 1171, 1173, 1178, 1179, 1188, 1189, 1194,
- 1199, 1205, 1207, 1209, 1216, 1217, 1223, 1224, 1229, 1231,
- 1236, 1238, 1246, 1251, 1260, 1267, 1269, 1271, 1287, 1297,
- 1304, 1306, 1308, 1313, 1315, 1317, 1325, 1327, 1332, 1334,
- 1339, 1341, 1343, 1393, 1395, 1397, 1399, 1401, 1403, 1405,
- 1407, 1421, 1426, 1431, 1456, 1462, 1464, 1466, 1468, 1470,
- 1472, 1477, 1481, 1513, 1515, 1521, 1527, 1540, 1541, 1542,
- 1547, 1552, 1556, 1560, 1575, 1588, 1593, 1629, 1647, 1648,
- 1654, 1655, 1660, 1662, 1669, 1686, 1703, 1705, 1712, 1717,
- 1725, 1735, 1747, 1756, 1760, 1764, 1768, 1772, 1776, 1779,
- 1781, 1785, 1789, 1793
+ 0, 206, 206, 208, 213, 214, 218, 230, 235, 246,
+ 252, 257, 265, 273, 275, 280, 288, 290, 296, 304,
+ 314, 344, 358, 372, 380, 391, 403, 405, 407, 413,
+ 418, 419, 423, 458, 457, 491, 493, 498, 504, 532,
+ 537, 538, 542, 544, 546, 553, 643, 685, 727, 840,
+ 847, 854, 864, 873, 882, 891, 902, 918, 917, 941,
+ 945, 945, 960, 960, 965, 965, 998, 1028, 1034, 1035,
+ 1041, 1042, 1049, 1054, 1066, 1080, 1082, 1090, 1095, 1097,
+ 1105, 1107, 1112, 1114, 1123, 1124, 1132, 1137, 1137, 1148,
+ 1152, 1160, 1161, 1164, 1166, 1171, 1172, 1181, 1182, 1187,
+ 1192, 1198, 1200, 1202, 1209, 1210, 1216, 1217, 1222, 1224,
+ 1229, 1231, 1239, 1244, 1253, 1260, 1262, 1264, 1280, 1290,
+ 1297, 1299, 1301, 1306, 1308, 1310, 1318, 1320, 1325, 1327,
+ 1332, 1334, 1336, 1386, 1388, 1390, 1392, 1394, 1396, 1398,
+ 1400, 1414, 1419, 1424, 1449, 1455, 1457, 1459, 1461, 1463,
+ 1465, 1470, 1474, 1506, 1508, 1514, 1520, 1533, 1534, 1535,
+ 1540, 1545, 1549, 1553, 1568, 1581, 1586, 1622, 1640, 1641,
+ 1647, 1648, 1653, 1655, 1662, 1679, 1696, 1698, 1705, 1710,
+ 1718, 1728, 1740, 1749, 1753, 1757, 1761, 1765, 1769, 1772,
+ 1774, 1778, 1782, 1786
};
#endif
@@ -1907,26 +1902,24 @@ yyreduce:
switch (yyn)
{
case 3:
-#line 214 "awkgram.y" /* yacc.c:1646 */
+#line 209 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
yyerrok;
}
-#line 1916 "awkgram.c" /* yacc.c:1646 */
+#line 1911 "awkgram.c" /* yacc.c:1646 */
break;
case 5:
-#line 220 "awkgram.y" /* yacc.c:1646 */
+#line 215 "awkgram.y" /* yacc.c:1646 */
{
next_sourcefile();
- if (sourcefile == srcfiles)
- process_deferred();
}
-#line 1926 "awkgram.c" /* yacc.c:1646 */
+#line 1919 "awkgram.c" /* yacc.c:1646 */
break;
case 6:
-#line 226 "awkgram.y" /* yacc.c:1646 */
+#line 219 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
/*
@@ -1935,19 +1928,20 @@ yyreduce:
*/
/* yyerrok; */
}
-#line 1939 "awkgram.c" /* yacc.c:1646 */
+#line 1932 "awkgram.c" /* yacc.c:1646 */
break;
case 7:
-#line 238 "awkgram.y" /* yacc.c:1646 */
+#line 231 "awkgram.y" /* yacc.c:1646 */
{
(void) append_rule((yyvsp[-1]), (yyvsp[0]));
+ first_rule = false;
}
-#line 1947 "awkgram.c" /* yacc.c:1646 */
+#line 1941 "awkgram.c" /* yacc.c:1646 */
break;
case 8:
-#line 242 "awkgram.y" /* yacc.c:1646 */
+#line 236 "awkgram.y" /* yacc.c:1646 */
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"), ruletab[rule]);
@@ -1958,39 +1952,39 @@ yyreduce:
} else /* pattern rule with non-empty pattern */
(void) append_rule((yyvsp[-1]), NULL);
}
-#line 1962 "awkgram.c" /* yacc.c:1646 */
+#line 1956 "awkgram.c" /* yacc.c:1646 */
break;
case 9:
-#line 253 "awkgram.y" /* yacc.c:1646 */
+#line 247 "awkgram.y" /* yacc.c:1646 */
{
in_function = NULL;
(void) mk_function((yyvsp[-1]), (yyvsp[0]));
yyerrok;
}
-#line 1972 "awkgram.c" /* yacc.c:1646 */
+#line 1966 "awkgram.c" /* yacc.c:1646 */
break;
case 10:
-#line 259 "awkgram.y" /* yacc.c:1646 */
+#line 253 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1981 "awkgram.c" /* yacc.c:1646 */
+#line 1975 "awkgram.c" /* yacc.c:1646 */
break;
case 11:
-#line 264 "awkgram.y" /* yacc.c:1646 */
+#line 258 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1990 "awkgram.c" /* yacc.c:1646 */
+#line 1984 "awkgram.c" /* yacc.c:1646 */
break;
case 12:
-#line 272 "awkgram.y" /* yacc.c:1646 */
+#line 266 "awkgram.y" /* yacc.c:1646 */
{
if (include_source((yyvsp[0])) < 0)
YYABORT;
@@ -1998,48 +1992,47 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 2002 "awkgram.c" /* yacc.c:1646 */
+#line 1996 "awkgram.c" /* yacc.c:1646 */
break;
case 13:
-#line 280 "awkgram.y" /* yacc.c:1646 */
+#line 274 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2008 "awkgram.c" /* yacc.c:1646 */
+#line 2002 "awkgram.c" /* yacc.c:1646 */
break;
case 14:
-#line 282 "awkgram.y" /* yacc.c:1646 */
+#line 276 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2014 "awkgram.c" /* yacc.c:1646 */
+#line 2008 "awkgram.c" /* yacc.c:1646 */
break;
case 15:
-#line 287 "awkgram.y" /* yacc.c:1646 */
+#line 281 "awkgram.y" /* yacc.c:1646 */
{
- extensions_used = true;
if (load_library((yyvsp[0])) < 0)
YYABORT;
efree((yyvsp[0])->lextok);
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 2027 "awkgram.c" /* yacc.c:1646 */
+#line 2020 "awkgram.c" /* yacc.c:1646 */
break;
case 16:
-#line 296 "awkgram.y" /* yacc.c:1646 */
+#line 289 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2033 "awkgram.c" /* yacc.c:1646 */
+#line 2026 "awkgram.c" /* yacc.c:1646 */
break;
case 17:
-#line 298 "awkgram.y" /* yacc.c:1646 */
+#line 291 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2039 "awkgram.c" /* yacc.c:1646 */
+#line 2032 "awkgram.c" /* yacc.c:1646 */
break;
case 18:
-#line 303 "awkgram.y" /* yacc.c:1646 */
+#line 296 "awkgram.y" /* yacc.c:1646 */
{
rule = Rule;
if (comment != NULL) {
@@ -2048,11 +2041,11 @@ yyreduce:
} else
(yyval) = NULL;
}
-#line 2052 "awkgram.c" /* yacc.c:1646 */
+#line 2045 "awkgram.c" /* yacc.c:1646 */
break;
case 19:
-#line 312 "awkgram.y" /* yacc.c:1646 */
+#line 305 "awkgram.y" /* yacc.c:1646 */
{
rule = Rule;
if (comment != NULL) {
@@ -2061,11 +2054,11 @@ yyreduce:
} else
(yyval) = (yyvsp[0]);
}
-#line 2065 "awkgram.c" /* yacc.c:1646 */
+#line 2058 "awkgram.c" /* yacc.c:1646 */
break;
case 20:
-#line 322 "awkgram.y" /* yacc.c:1646 */
+#line 315 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *tp;
@@ -2095,11 +2088,11 @@ yyreduce:
(yyval) = list_append(list_merge((yyvsp[-3]), (yyvsp[0])), tp);
rule = Rule;
}
-#line 2099 "awkgram.c" /* yacc.c:1646 */
+#line 2092 "awkgram.c" /* yacc.c:1646 */
break;
case 21:
-#line 352 "awkgram.y" /* yacc.c:1646 */
+#line 345 "awkgram.y" /* yacc.c:1646 */
{
static int begin_seen = 0;
@@ -2113,11 +2106,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2117 "awkgram.c" /* yacc.c:1646 */
+#line 2110 "awkgram.c" /* yacc.c:1646 */
break;
case 22:
-#line 366 "awkgram.y" /* yacc.c:1646 */
+#line 359 "awkgram.y" /* yacc.c:1646 */
{
static int end_seen = 0;
@@ -2131,11 +2124,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2135 "awkgram.c" /* yacc.c:1646 */
+#line 2128 "awkgram.c" /* yacc.c:1646 */
break;
case 23:
-#line 380 "awkgram.y" /* yacc.c:1646 */
+#line 373 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = BEGINFILE;
@@ -2143,11 +2136,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2147 "awkgram.c" /* yacc.c:1646 */
+#line 2140 "awkgram.c" /* yacc.c:1646 */
break;
case 24:
-#line 388 "awkgram.y" /* yacc.c:1646 */
+#line 381 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = ENDFILE;
@@ -2155,11 +2148,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2159 "awkgram.c" /* yacc.c:1646 */
+#line 2152 "awkgram.c" /* yacc.c:1646 */
break;
case 25:
-#line 399 "awkgram.y" /* yacc.c:1646 */
+#line 392 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
if ((yyvsp[-3]) == NULL)
@@ -2168,39 +2161,39 @@ yyreduce:
ip = (yyvsp[-3]);
(yyval) = ip;
}
-#line 2172 "awkgram.c" /* yacc.c:1646 */
+#line 2165 "awkgram.c" /* yacc.c:1646 */
break;
case 26:
-#line 411 "awkgram.y" /* yacc.c:1646 */
+#line 404 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2178 "awkgram.c" /* yacc.c:1646 */
+#line 2171 "awkgram.c" /* yacc.c:1646 */
break;
case 27:
-#line 413 "awkgram.y" /* yacc.c:1646 */
+#line 406 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2184 "awkgram.c" /* yacc.c:1646 */
+#line 2177 "awkgram.c" /* yacc.c:1646 */
break;
case 28:
-#line 415 "awkgram.y" /* yacc.c:1646 */
+#line 408 "awkgram.y" /* yacc.c:1646 */
{
yyerror(_("`%s' is a built-in function, it cannot be redefined"),
tokstart);
YYABORT;
}
-#line 2194 "awkgram.c" /* yacc.c:1646 */
+#line 2187 "awkgram.c" /* yacc.c:1646 */
break;
case 29:
-#line 421 "awkgram.y" /* yacc.c:1646 */
+#line 414 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2200 "awkgram.c" /* yacc.c:1646 */
+#line 2193 "awkgram.c" /* yacc.c:1646 */
break;
case 32:
-#line 431 "awkgram.y" /* yacc.c:1646 */
+#line 424 "awkgram.y" /* yacc.c:1646 */
{
/*
* treat any comments between BOF and the first function
@@ -2227,17 +2220,17 @@ yyreduce:
/* $4 already free'd in install_function */
(yyval) = (yyvsp[-5]);
}
-#line 2231 "awkgram.c" /* yacc.c:1646 */
+#line 2224 "awkgram.c" /* yacc.c:1646 */
break;
case 33:
-#line 465 "awkgram.y" /* yacc.c:1646 */
+#line 458 "awkgram.y" /* yacc.c:1646 */
{ want_regexp = true; }
-#line 2237 "awkgram.c" /* yacc.c:1646 */
+#line 2230 "awkgram.c" /* yacc.c:1646 */
break;
case 34:
-#line 467 "awkgram.y" /* yacc.c:1646 */
+#line 460 "awkgram.y" /* yacc.c:1646 */
{
NODE *n, *exp;
char *re;
@@ -2266,28 +2259,28 @@ yyreduce:
(yyval)->opcode = Op_match_rec;
(yyval)->memory = n;
}
-#line 2270 "awkgram.c" /* yacc.c:1646 */
+#line 2263 "awkgram.c" /* yacc.c:1646 */
break;
case 35:
-#line 499 "awkgram.y" /* yacc.c:1646 */
+#line 492 "awkgram.y" /* yacc.c:1646 */
{ bcfree((yyvsp[0])); }
-#line 2276 "awkgram.c" /* yacc.c:1646 */
+#line 2269 "awkgram.c" /* yacc.c:1646 */
break;
case 37:
-#line 505 "awkgram.y" /* yacc.c:1646 */
+#line 498 "awkgram.y" /* yacc.c:1646 */
{
if (comment != NULL) {
(yyval) = list_create(comment);
comment = NULL;
} else (yyval) = NULL;
}
-#line 2287 "awkgram.c" /* yacc.c:1646 */
+#line 2280 "awkgram.c" /* yacc.c:1646 */
break;
case 38:
-#line 512 "awkgram.y" /* yacc.c:1646 */
+#line 505 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0]) == NULL) {
if (comment == NULL)
@@ -2315,40 +2308,40 @@ yyreduce:
}
yyerrok;
}
-#line 2319 "awkgram.c" /* yacc.c:1646 */
+#line 2312 "awkgram.c" /* yacc.c:1646 */
break;
case 39:
-#line 540 "awkgram.y" /* yacc.c:1646 */
+#line 533 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2325 "awkgram.c" /* yacc.c:1646 */
+#line 2318 "awkgram.c" /* yacc.c:1646 */
break;
case 42:
-#line 550 "awkgram.y" /* yacc.c:1646 */
+#line 543 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2331 "awkgram.c" /* yacc.c:1646 */
+#line 2324 "awkgram.c" /* yacc.c:1646 */
break;
case 43:
-#line 552 "awkgram.y" /* yacc.c:1646 */
+#line 545 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 2337 "awkgram.c" /* yacc.c:1646 */
+#line 2330 "awkgram.c" /* yacc.c:1646 */
break;
case 44:
-#line 554 "awkgram.y" /* yacc.c:1646 */
+#line 547 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2348 "awkgram.c" /* yacc.c:1646 */
+#line 2341 "awkgram.c" /* yacc.c:1646 */
break;
case 45:
-#line 561 "awkgram.y" /* yacc.c:1646 */
+#line 554 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2438,11 +2431,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2442 "awkgram.c" /* yacc.c:1646 */
+#line 2435 "awkgram.c" /* yacc.c:1646 */
break;
case 46:
-#line 651 "awkgram.y" /* yacc.c:1646 */
+#line 644 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2484,11 +2477,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2488 "awkgram.c" /* yacc.c:1646 */
+#line 2481 "awkgram.c" /* yacc.c:1646 */
break;
case 47:
-#line 693 "awkgram.y" /* yacc.c:1646 */
+#line 686 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2530,11 +2523,11 @@ yyreduce:
} /* else
$1 and $4 are NULLs */
}
-#line 2534 "awkgram.c" /* yacc.c:1646 */
+#line 2527 "awkgram.c" /* yacc.c:1646 */
break;
case 48:
-#line 735 "awkgram.y" /* yacc.c:1646 */
+#line 728 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
char *var_name = (yyvsp[-5])->lextok;
@@ -2647,44 +2640,44 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2651 "awkgram.c" /* yacc.c:1646 */
+#line 2644 "awkgram.c" /* yacc.c:1646 */
break;
case 49:
-#line 848 "awkgram.y" /* yacc.c:1646 */
+#line 841 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-11]), (yyvsp[-9]), (yyvsp[-6]), (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2662 "awkgram.c" /* yacc.c:1646 */
+#line 2655 "awkgram.c" /* yacc.c:1646 */
break;
case 50:
-#line 855 "awkgram.y" /* yacc.c:1646 */
+#line 848 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-10]), (yyvsp[-8]), (INSTRUCTION *) NULL, (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2673 "awkgram.c" /* yacc.c:1646 */
+#line 2666 "awkgram.c" /* yacc.c:1646 */
break;
case 51:
-#line 862 "awkgram.y" /* yacc.c:1646 */
+#line 855 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2684 "awkgram.c" /* yacc.c:1646 */
+#line 2677 "awkgram.c" /* yacc.c:1646 */
break;
case 52:
-#line 872 "awkgram.y" /* yacc.c:1646 */
+#line 865 "awkgram.y" /* yacc.c:1646 */
{
if (! break_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2693,11 +2686,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2697 "awkgram.c" /* yacc.c:1646 */
+#line 2690 "awkgram.c" /* yacc.c:1646 */
break;
case 53:
-#line 881 "awkgram.y" /* yacc.c:1646 */
+#line 874 "awkgram.y" /* yacc.c:1646 */
{
if (! continue_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2706,11 +2699,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2710 "awkgram.c" /* yacc.c:1646 */
+#line 2703 "awkgram.c" /* yacc.c:1646 */
break;
case 54:
-#line 890 "awkgram.y" /* yacc.c:1646 */
+#line 883 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2719,11 +2712,11 @@ regular_loop:
(yyvsp[-1])->target_jmp = ip_rec;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2723 "awkgram.c" /* yacc.c:1646 */
+#line 2716 "awkgram.c" /* yacc.c:1646 */
break;
case 55:
-#line 899 "awkgram.y" /* yacc.c:1646 */
+#line 892 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2734,11 +2727,11 @@ regular_loop:
(yyvsp[-1])->target_endfile = ip_endfile;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2738 "awkgram.c" /* yacc.c:1646 */
+#line 2731 "awkgram.c" /* yacc.c:1646 */
break;
case 56:
-#line 910 "awkgram.y" /* yacc.c:1646 */
+#line 903 "awkgram.y" /* yacc.c:1646 */
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2753,20 +2746,20 @@ regular_loop:
} else
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
}
-#line 2757 "awkgram.c" /* yacc.c:1646 */
+#line 2750 "awkgram.c" /* yacc.c:1646 */
break;
case 57:
-#line 925 "awkgram.y" /* yacc.c:1646 */
+#line 918 "awkgram.y" /* yacc.c:1646 */
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 2766 "awkgram.c" /* yacc.c:1646 */
+#line 2759 "awkgram.c" /* yacc.c:1646 */
break;
case 58:
-#line 928 "awkgram.y" /* yacc.c:1646 */
+#line 921 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL) {
(yyval) = list_create((yyvsp[-3]));
@@ -2787,45 +2780,45 @@ regular_loop:
(yyval) = list_append((yyvsp[-1]), (yyvsp[-3]));
}
}
-#line 2791 "awkgram.c" /* yacc.c:1646 */
+#line 2784 "awkgram.c" /* yacc.c:1646 */
break;
case 60:
-#line 952 "awkgram.y" /* yacc.c:1646 */
+#line 945 "awkgram.y" /* yacc.c:1646 */
{ in_print = true; in_parens = 0; }
-#line 2797 "awkgram.c" /* yacc.c:1646 */
+#line 2790 "awkgram.c" /* yacc.c:1646 */
break;
case 61:
-#line 953 "awkgram.y" /* yacc.c:1646 */
+#line 946 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_print((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 2805 "awkgram.c" /* yacc.c:1646 */
+#line 2798 "awkgram.c" /* yacc.c:1646 */
break;
case 62:
-#line 967 "awkgram.y" /* yacc.c:1646 */
+#line 960 "awkgram.y" /* yacc.c:1646 */
{ in_print = true; in_parens = 0; }
-#line 2811 "awkgram.c" /* yacc.c:1646 */
+#line 2804 "awkgram.c" /* yacc.c:1646 */
break;
case 63:
-#line 968 "awkgram.y" /* yacc.c:1646 */
+#line 961 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_print((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 2819 "awkgram.c" /* yacc.c:1646 */
+#line 2812 "awkgram.c" /* yacc.c:1646 */
break;
case 64:
-#line 972 "awkgram.y" /* yacc.c:1646 */
+#line 965 "awkgram.y" /* yacc.c:1646 */
{ sub_counter = 0; }
-#line 2825 "awkgram.c" /* yacc.c:1646 */
+#line 2818 "awkgram.c" /* yacc.c:1646 */
break;
case 65:
-#line 973 "awkgram.y" /* yacc.c:1646 */
+#line 966 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-2])->lextok;
@@ -2858,11 +2851,11 @@ regular_loop:
(yyval) = list_append(list_append((yyvsp[0]), (yyvsp[-2])), (yyvsp[-3]));
}
}
-#line 2862 "awkgram.c" /* yacc.c:1646 */
+#line 2855 "awkgram.c" /* yacc.c:1646 */
break;
case 66:
-#line 1010 "awkgram.y" /* yacc.c:1646 */
+#line 1003 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
char *arr = (yyvsp[-1])->lextok;
@@ -2888,52 +2881,52 @@ regular_loop:
fatal(_("`delete' is not allowed with FUNCTAB"));
}
}
-#line 2892 "awkgram.c" /* yacc.c:1646 */
+#line 2885 "awkgram.c" /* yacc.c:1646 */
break;
case 67:
-#line 1036 "awkgram.y" /* yacc.c:1646 */
+#line 1029 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = optimize_assignment((yyvsp[0])); }
-#line 2898 "awkgram.c" /* yacc.c:1646 */
+#line 2891 "awkgram.c" /* yacc.c:1646 */
break;
case 68:
-#line 1041 "awkgram.y" /* yacc.c:1646 */
+#line 1034 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2904 "awkgram.c" /* yacc.c:1646 */
+#line 2897 "awkgram.c" /* yacc.c:1646 */
break;
case 69:
-#line 1043 "awkgram.y" /* yacc.c:1646 */
+#line 1036 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2910 "awkgram.c" /* yacc.c:1646 */
+#line 2903 "awkgram.c" /* yacc.c:1646 */
break;
case 70:
-#line 1048 "awkgram.y" /* yacc.c:1646 */
+#line 1041 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2916 "awkgram.c" /* yacc.c:1646 */
+#line 2909 "awkgram.c" /* yacc.c:1646 */
break;
case 71:
-#line 1050 "awkgram.y" /* yacc.c:1646 */
+#line 1043 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL)
(yyval) = list_create((yyvsp[0]));
else
(yyval) = list_prepend((yyvsp[-1]), (yyvsp[0]));
}
-#line 2927 "awkgram.c" /* yacc.c:1646 */
+#line 2920 "awkgram.c" /* yacc.c:1646 */
break;
case 72:
-#line 1057 "awkgram.y" /* yacc.c:1646 */
+#line 1050 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2933 "awkgram.c" /* yacc.c:1646 */
+#line 2926 "awkgram.c" /* yacc.c:1646 */
break;
case 73:
-#line 1062 "awkgram.y" /* yacc.c:1646 */
+#line 1055 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2945,11 +2938,11 @@ regular_loop:
bcfree((yyvsp[-2]));
(yyval) = (yyvsp[-4]);
}
-#line 2949 "awkgram.c" /* yacc.c:1646 */
+#line 2942 "awkgram.c" /* yacc.c:1646 */
break;
case 74:
-#line 1074 "awkgram.y" /* yacc.c:1646 */
+#line 1067 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2960,17 +2953,17 @@ regular_loop:
(yyvsp[-3])->case_stmt = casestmt;
(yyval) = (yyvsp[-3]);
}
-#line 2964 "awkgram.c" /* yacc.c:1646 */
+#line 2957 "awkgram.c" /* yacc.c:1646 */
break;
case 75:
-#line 1088 "awkgram.y" /* yacc.c:1646 */
+#line 1081 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2970 "awkgram.c" /* yacc.c:1646 */
+#line 2963 "awkgram.c" /* yacc.c:1646 */
break;
case 76:
-#line 1090 "awkgram.y" /* yacc.c:1646 */
+#line 1083 "awkgram.y" /* yacc.c:1646 */
{
NODE *n = (yyvsp[0])->memory;
(void) force_number(n);
@@ -2978,83 +2971,83 @@ regular_loop:
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 2982 "awkgram.c" /* yacc.c:1646 */
+#line 2975 "awkgram.c" /* yacc.c:1646 */
break;
case 77:
-#line 1098 "awkgram.y" /* yacc.c:1646 */
+#line 1091 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 2991 "awkgram.c" /* yacc.c:1646 */
+#line 2984 "awkgram.c" /* yacc.c:1646 */
break;
case 78:
-#line 1103 "awkgram.y" /* yacc.c:1646 */
+#line 1096 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2997 "awkgram.c" /* yacc.c:1646 */
+#line 2990 "awkgram.c" /* yacc.c:1646 */
break;
case 79:
-#line 1105 "awkgram.y" /* yacc.c:1646 */
+#line 1098 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_push_re;
(yyval) = (yyvsp[0]);
}
-#line 3006 "awkgram.c" /* yacc.c:1646 */
+#line 2999 "awkgram.c" /* yacc.c:1646 */
break;
case 80:
-#line 1113 "awkgram.y" /* yacc.c:1646 */
+#line 1106 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3012 "awkgram.c" /* yacc.c:1646 */
+#line 3005 "awkgram.c" /* yacc.c:1646 */
break;
case 81:
-#line 1115 "awkgram.y" /* yacc.c:1646 */
+#line 1108 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3018 "awkgram.c" /* yacc.c:1646 */
+#line 3011 "awkgram.c" /* yacc.c:1646 */
break;
case 82:
-#line 1120 "awkgram.y" /* yacc.c:1646 */
+#line 1113 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3024 "awkgram.c" /* yacc.c:1646 */
+#line 3017 "awkgram.c" /* yacc.c:1646 */
break;
case 83:
-#line 1122 "awkgram.y" /* yacc.c:1646 */
+#line 1115 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3030 "awkgram.c" /* yacc.c:1646 */
+#line 3023 "awkgram.c" /* yacc.c:1646 */
break;
case 85:
-#line 1132 "awkgram.y" /* yacc.c:1646 */
+#line 1125 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1]);
}
-#line 3038 "awkgram.c" /* yacc.c:1646 */
+#line 3031 "awkgram.c" /* yacc.c:1646 */
break;
case 86:
-#line 1139 "awkgram.y" /* yacc.c:1646 */
+#line 1132 "awkgram.y" /* yacc.c:1646 */
{
in_print = false;
in_parens = 0;
(yyval) = NULL;
}
-#line 3048 "awkgram.c" /* yacc.c:1646 */
+#line 3041 "awkgram.c" /* yacc.c:1646 */
break;
case 87:
-#line 1144 "awkgram.y" /* yacc.c:1646 */
+#line 1137 "awkgram.y" /* yacc.c:1646 */
{ in_print = false; in_parens = 0; }
-#line 3054 "awkgram.c" /* yacc.c:1646 */
+#line 3047 "awkgram.c" /* yacc.c:1646 */
break;
case 88:
-#line 1145 "awkgram.y" /* yacc.c:1646 */
+#line 1138 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->redir_type == redirect_twoway
&& (yyvsp[0])->lasti->opcode == Op_K_getline_redir
@@ -3062,136 +3055,136 @@ regular_loop:
yyerror(_("multistage two-way pipelines don't work"));
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-2]));
}
-#line 3066 "awkgram.c" /* yacc.c:1646 */
+#line 3059 "awkgram.c" /* yacc.c:1646 */
break;
case 89:
-#line 1156 "awkgram.y" /* yacc.c:1646 */
+#line 1149 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]), NULL, NULL);
}
-#line 3074 "awkgram.c" /* yacc.c:1646 */
+#line 3067 "awkgram.c" /* yacc.c:1646 */
break;
case 90:
-#line 1161 "awkgram.y" /* yacc.c:1646 */
+#line 1154 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[0]));
}
-#line 3082 "awkgram.c" /* yacc.c:1646 */
+#line 3075 "awkgram.c" /* yacc.c:1646 */
break;
case 95:
-#line 1178 "awkgram.y" /* yacc.c:1646 */
+#line 1171 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3088 "awkgram.c" /* yacc.c:1646 */
+#line 3081 "awkgram.c" /* yacc.c:1646 */
break;
case 96:
-#line 1180 "awkgram.y" /* yacc.c:1646 */
+#line 1173 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3097 "awkgram.c" /* yacc.c:1646 */
+#line 3090 "awkgram.c" /* yacc.c:1646 */
break;
case 97:
-#line 1188 "awkgram.y" /* yacc.c:1646 */
+#line 1181 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3103 "awkgram.c" /* yacc.c:1646 */
+#line 3096 "awkgram.c" /* yacc.c:1646 */
break;
case 98:
-#line 1190 "awkgram.y" /* yacc.c:1646 */
+#line 1183 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3109 "awkgram.c" /* yacc.c:1646 */
+#line 3102 "awkgram.c" /* yacc.c:1646 */
break;
case 99:
-#line 1195 "awkgram.y" /* yacc.c:1646 */
+#line 1188 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = 0;
(yyval) = list_create((yyvsp[0]));
}
-#line 3118 "awkgram.c" /* yacc.c:1646 */
+#line 3111 "awkgram.c" /* yacc.c:1646 */
break;
case 100:
-#line 1200 "awkgram.y" /* yacc.c:1646 */
+#line 1193 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = (yyvsp[-2])->lasti->param_count + 1;
(yyval) = list_append((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3128 "awkgram.c" /* yacc.c:1646 */
+#line 3121 "awkgram.c" /* yacc.c:1646 */
break;
case 101:
-#line 1206 "awkgram.y" /* yacc.c:1646 */
+#line 1199 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3134 "awkgram.c" /* yacc.c:1646 */
+#line 3127 "awkgram.c" /* yacc.c:1646 */
break;
case 102:
-#line 1208 "awkgram.y" /* yacc.c:1646 */
+#line 1201 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3140 "awkgram.c" /* yacc.c:1646 */
+#line 3133 "awkgram.c" /* yacc.c:1646 */
break;
case 103:
-#line 1210 "awkgram.y" /* yacc.c:1646 */
+#line 1203 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-2]); }
-#line 3146 "awkgram.c" /* yacc.c:1646 */
+#line 3139 "awkgram.c" /* yacc.c:1646 */
break;
case 104:
-#line 1216 "awkgram.y" /* yacc.c:1646 */
+#line 1209 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3152 "awkgram.c" /* yacc.c:1646 */
+#line 3145 "awkgram.c" /* yacc.c:1646 */
break;
case 105:
-#line 1218 "awkgram.y" /* yacc.c:1646 */
+#line 1211 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3158 "awkgram.c" /* yacc.c:1646 */
+#line 3151 "awkgram.c" /* yacc.c:1646 */
break;
case 106:
-#line 1223 "awkgram.y" /* yacc.c:1646 */
+#line 1216 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3164 "awkgram.c" /* yacc.c:1646 */
+#line 3157 "awkgram.c" /* yacc.c:1646 */
break;
case 107:
-#line 1225 "awkgram.y" /* yacc.c:1646 */
+#line 1218 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3170 "awkgram.c" /* yacc.c:1646 */
+#line 3163 "awkgram.c" /* yacc.c:1646 */
break;
case 108:
-#line 1230 "awkgram.y" /* yacc.c:1646 */
+#line 1223 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3176 "awkgram.c" /* yacc.c:1646 */
+#line 3169 "awkgram.c" /* yacc.c:1646 */
break;
case 109:
-#line 1232 "awkgram.y" /* yacc.c:1646 */
+#line 1225 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3185 "awkgram.c" /* yacc.c:1646 */
+#line 3178 "awkgram.c" /* yacc.c:1646 */
break;
case 110:
-#line 1237 "awkgram.y" /* yacc.c:1646 */
+#line 1230 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3191 "awkgram.c" /* yacc.c:1646 */
+#line 3184 "awkgram.c" /* yacc.c:1646 */
break;
case 111:
-#line 1239 "awkgram.y" /* yacc.c:1646 */
+#line 1232 "awkgram.y" /* yacc.c:1646 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3199,52 +3192,52 @@ regular_loop:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3203 "awkgram.c" /* yacc.c:1646 */
+#line 3196 "awkgram.c" /* yacc.c:1646 */
break;
case 112:
-#line 1247 "awkgram.y" /* yacc.c:1646 */
+#line 1240 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3212 "awkgram.c" /* yacc.c:1646 */
+#line 3205 "awkgram.c" /* yacc.c:1646 */
break;
case 113:
-#line 1252 "awkgram.y" /* yacc.c:1646 */
+#line 1245 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = (yyvsp[-2]);
}
-#line 3221 "awkgram.c" /* yacc.c:1646 */
+#line 3214 "awkgram.c" /* yacc.c:1646 */
break;
case 114:
-#line 1261 "awkgram.y" /* yacc.c:1646 */
+#line 1254 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint && (yyvsp[0])->lasti->opcode == Op_match_rec)
lintwarn_ln((yyvsp[-1])->source_line,
_("regular expression on right of assignment"));
(yyval) = mk_assignment((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1]));
}
-#line 3232 "awkgram.c" /* yacc.c:1646 */
+#line 3225 "awkgram.c" /* yacc.c:1646 */
break;
case 115:
-#line 1268 "awkgram.y" /* yacc.c:1646 */
+#line 1261 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3238 "awkgram.c" /* yacc.c:1646 */
+#line 3231 "awkgram.c" /* yacc.c:1646 */
break;
case 116:
-#line 1270 "awkgram.y" /* yacc.c:1646 */
+#line 1263 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3244 "awkgram.c" /* yacc.c:1646 */
+#line 3237 "awkgram.c" /* yacc.c:1646 */
break;
case 117:
-#line 1272 "awkgram.y" /* yacc.c:1646 */
+#line 1265 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3260,11 +3253,11 @@ regular_loop:
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3264 "awkgram.c" /* yacc.c:1646 */
+#line 3257 "awkgram.c" /* yacc.c:1646 */
break;
case 118:
-#line 1288 "awkgram.y" /* yacc.c:1646 */
+#line 1281 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old)
warning_ln((yyvsp[-1])->source_line,
@@ -3274,97 +3267,97 @@ regular_loop:
(yyvsp[-1])->expr_count = 1;
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
-#line 3278 "awkgram.c" /* yacc.c:1646 */
+#line 3271 "awkgram.c" /* yacc.c:1646 */
break;
case 119:
-#line 1298 "awkgram.y" /* yacc.c:1646 */
+#line 1291 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint && (yyvsp[0])->lasti->opcode == Op_match_rec)
lintwarn_ln((yyvsp[-1])->source_line,
_("regular expression on right of comparison"));
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
-#line 3289 "awkgram.c" /* yacc.c:1646 */
+#line 3282 "awkgram.c" /* yacc.c:1646 */
break;
case 120:
-#line 1305 "awkgram.y" /* yacc.c:1646 */
+#line 1298 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])); }
-#line 3295 "awkgram.c" /* yacc.c:1646 */
+#line 3288 "awkgram.c" /* yacc.c:1646 */
break;
case 121:
-#line 1307 "awkgram.y" /* yacc.c:1646 */
+#line 1300 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3301 "awkgram.c" /* yacc.c:1646 */
+#line 3294 "awkgram.c" /* yacc.c:1646 */
break;
case 122:
-#line 1309 "awkgram.y" /* yacc.c:1646 */
+#line 1302 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3307 "awkgram.c" /* yacc.c:1646 */
+#line 3300 "awkgram.c" /* yacc.c:1646 */
break;
case 123:
-#line 1314 "awkgram.y" /* yacc.c:1646 */
+#line 1307 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3313 "awkgram.c" /* yacc.c:1646 */
+#line 3306 "awkgram.c" /* yacc.c:1646 */
break;
case 124:
-#line 1316 "awkgram.y" /* yacc.c:1646 */
+#line 1309 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3319 "awkgram.c" /* yacc.c:1646 */
+#line 3312 "awkgram.c" /* yacc.c:1646 */
break;
case 125:
-#line 1318 "awkgram.y" /* yacc.c:1646 */
+#line 1311 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_assign_quotient;
(yyval) = (yyvsp[0]);
}
-#line 3328 "awkgram.c" /* yacc.c:1646 */
+#line 3321 "awkgram.c" /* yacc.c:1646 */
break;
case 126:
-#line 1326 "awkgram.y" /* yacc.c:1646 */
+#line 1319 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3334 "awkgram.c" /* yacc.c:1646 */
+#line 3327 "awkgram.c" /* yacc.c:1646 */
break;
case 127:
-#line 1328 "awkgram.y" /* yacc.c:1646 */
+#line 1321 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3340 "awkgram.c" /* yacc.c:1646 */
+#line 3333 "awkgram.c" /* yacc.c:1646 */
break;
case 128:
-#line 1333 "awkgram.y" /* yacc.c:1646 */
+#line 1326 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3346 "awkgram.c" /* yacc.c:1646 */
+#line 3339 "awkgram.c" /* yacc.c:1646 */
break;
case 129:
-#line 1335 "awkgram.y" /* yacc.c:1646 */
+#line 1328 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3352 "awkgram.c" /* yacc.c:1646 */
+#line 3345 "awkgram.c" /* yacc.c:1646 */
break;
case 130:
-#line 1340 "awkgram.y" /* yacc.c:1646 */
+#line 1333 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3358 "awkgram.c" /* yacc.c:1646 */
+#line 3351 "awkgram.c" /* yacc.c:1646 */
break;
case 131:
-#line 1342 "awkgram.y" /* yacc.c:1646 */
+#line 1335 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3364 "awkgram.c" /* yacc.c:1646 */
+#line 3357 "awkgram.c" /* yacc.c:1646 */
break;
case 132:
-#line 1344 "awkgram.y" /* yacc.c:1646 */
+#line 1337 "awkgram.y" /* yacc.c:1646 */
{
int count = 2;
bool is_simple_var = false;
@@ -3411,47 +3404,47 @@ regular_loop:
max_args = count;
}
}
-#line 3415 "awkgram.c" /* yacc.c:1646 */
+#line 3408 "awkgram.c" /* yacc.c:1646 */
break;
case 134:
-#line 1396 "awkgram.y" /* yacc.c:1646 */
+#line 1389 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3421 "awkgram.c" /* yacc.c:1646 */
+#line 3414 "awkgram.c" /* yacc.c:1646 */
break;
case 135:
-#line 1398 "awkgram.y" /* yacc.c:1646 */
+#line 1391 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3427 "awkgram.c" /* yacc.c:1646 */
+#line 3420 "awkgram.c" /* yacc.c:1646 */
break;
case 136:
-#line 1400 "awkgram.y" /* yacc.c:1646 */
+#line 1393 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3433 "awkgram.c" /* yacc.c:1646 */
+#line 3426 "awkgram.c" /* yacc.c:1646 */
break;
case 137:
-#line 1402 "awkgram.y" /* yacc.c:1646 */
+#line 1395 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3439 "awkgram.c" /* yacc.c:1646 */
+#line 3432 "awkgram.c" /* yacc.c:1646 */
break;
case 138:
-#line 1404 "awkgram.y" /* yacc.c:1646 */
+#line 1397 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3445 "awkgram.c" /* yacc.c:1646 */
+#line 3438 "awkgram.c" /* yacc.c:1646 */
break;
case 139:
-#line 1406 "awkgram.y" /* yacc.c:1646 */
+#line 1399 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3451 "awkgram.c" /* yacc.c:1646 */
+#line 3444 "awkgram.c" /* yacc.c:1646 */
break;
case 140:
-#line 1408 "awkgram.y" /* yacc.c:1646 */
+#line 1401 "awkgram.y" /* yacc.c:1646 */
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3465,29 +3458,29 @@ regular_loop:
_("non-redirected `getline' undefined inside END action"));
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input);
}
-#line 3469 "awkgram.c" /* yacc.c:1646 */
+#line 3462 "awkgram.c" /* yacc.c:1646 */
break;
case 141:
-#line 1422 "awkgram.y" /* yacc.c:1646 */
+#line 1415 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3478 "awkgram.c" /* yacc.c:1646 */
+#line 3471 "awkgram.c" /* yacc.c:1646 */
break;
case 142:
-#line 1427 "awkgram.y" /* yacc.c:1646 */
+#line 1420 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3487 "awkgram.c" /* yacc.c:1646 */
+#line 3480 "awkgram.c" /* yacc.c:1646 */
break;
case 143:
-#line 1432 "awkgram.y" /* yacc.c:1646 */
+#line 1425 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old) {
warning_ln((yyvsp[-1])->source_line,
@@ -3507,64 +3500,64 @@ regular_loop:
(yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3511 "awkgram.c" /* yacc.c:1646 */
+#line 3504 "awkgram.c" /* yacc.c:1646 */
break;
case 144:
-#line 1457 "awkgram.y" /* yacc.c:1646 */
+#line 1450 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type);
bcfree((yyvsp[-2]));
}
-#line 3520 "awkgram.c" /* yacc.c:1646 */
+#line 3513 "awkgram.c" /* yacc.c:1646 */
break;
case 145:
-#line 1463 "awkgram.y" /* yacc.c:1646 */
+#line 1456 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3526 "awkgram.c" /* yacc.c:1646 */
+#line 3519 "awkgram.c" /* yacc.c:1646 */
break;
case 146:
-#line 1465 "awkgram.y" /* yacc.c:1646 */
+#line 1458 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3532 "awkgram.c" /* yacc.c:1646 */
+#line 3525 "awkgram.c" /* yacc.c:1646 */
break;
case 147:
-#line 1467 "awkgram.y" /* yacc.c:1646 */
+#line 1460 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3538 "awkgram.c" /* yacc.c:1646 */
+#line 3531 "awkgram.c" /* yacc.c:1646 */
break;
case 148:
-#line 1469 "awkgram.y" /* yacc.c:1646 */
+#line 1462 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3544 "awkgram.c" /* yacc.c:1646 */
+#line 3537 "awkgram.c" /* yacc.c:1646 */
break;
case 149:
-#line 1471 "awkgram.y" /* yacc.c:1646 */
+#line 1464 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3550 "awkgram.c" /* yacc.c:1646 */
+#line 3543 "awkgram.c" /* yacc.c:1646 */
break;
case 150:
-#line 1473 "awkgram.y" /* yacc.c:1646 */
+#line 1466 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3556 "awkgram.c" /* yacc.c:1646 */
+#line 3549 "awkgram.c" /* yacc.c:1646 */
break;
case 151:
-#line 1478 "awkgram.y" /* yacc.c:1646 */
+#line 1471 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3564 "awkgram.c" /* yacc.c:1646 */
+#line 3557 "awkgram.c" /* yacc.c:1646 */
break;
case 152:
-#line 1482 "awkgram.y" /* yacc.c:1646 */
+#line 1475 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->opcode == Op_match_rec) {
(yyvsp[0])->opcode = Op_nomatch;
@@ -3596,37 +3589,37 @@ regular_loop:
}
}
}
-#line 3600 "awkgram.c" /* yacc.c:1646 */
+#line 3593 "awkgram.c" /* yacc.c:1646 */
break;
case 153:
-#line 1514 "awkgram.y" /* yacc.c:1646 */
+#line 1507 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3606 "awkgram.c" /* yacc.c:1646 */
+#line 3599 "awkgram.c" /* yacc.c:1646 */
break;
case 154:
-#line 1516 "awkgram.y" /* yacc.c:1646 */
+#line 1509 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3616 "awkgram.c" /* yacc.c:1646 */
+#line 3609 "awkgram.c" /* yacc.c:1646 */
break;
case 155:
-#line 1522 "awkgram.y" /* yacc.c:1646 */
+#line 1515 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3626 "awkgram.c" /* yacc.c:1646 */
+#line 3619 "awkgram.c" /* yacc.c:1646 */
break;
case 156:
-#line 1528 "awkgram.y" /* yacc.c:1646 */
+#line 1521 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
@@ -3639,45 +3632,45 @@ regular_loop:
if ((yyval) == NULL)
YYABORT;
}
-#line 3643 "awkgram.c" /* yacc.c:1646 */
+#line 3636 "awkgram.c" /* yacc.c:1646 */
break;
case 159:
-#line 1543 "awkgram.y" /* yacc.c:1646 */
+#line 1536 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_preincrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3652 "awkgram.c" /* yacc.c:1646 */
+#line 3645 "awkgram.c" /* yacc.c:1646 */
break;
case 160:
-#line 1548 "awkgram.y" /* yacc.c:1646 */
+#line 1541 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_predecrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3661 "awkgram.c" /* yacc.c:1646 */
+#line 3654 "awkgram.c" /* yacc.c:1646 */
break;
case 161:
-#line 1553 "awkgram.y" /* yacc.c:1646 */
+#line 1546 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3669 "awkgram.c" /* yacc.c:1646 */
+#line 3662 "awkgram.c" /* yacc.c:1646 */
break;
case 162:
-#line 1557 "awkgram.y" /* yacc.c:1646 */
+#line 1550 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3677 "awkgram.c" /* yacc.c:1646 */
+#line 3670 "awkgram.c" /* yacc.c:1646 */
break;
case 163:
-#line 1561 "awkgram.y" /* yacc.c:1646 */
+#line 1554 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & (STRCUR|STRING)) == 0
@@ -3692,11 +3685,11 @@ regular_loop:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 3696 "awkgram.c" /* yacc.c:1646 */
+#line 3689 "awkgram.c" /* yacc.c:1646 */
break;
case 164:
-#line 1576 "awkgram.y" /* yacc.c:1646 */
+#line 1569 "awkgram.y" /* yacc.c:1646 */
{
/*
* was: $$ = $2
@@ -3706,20 +3699,20 @@ regular_loop:
(yyvsp[-1])->memory = make_number(0.0);
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
-#line 3710 "awkgram.c" /* yacc.c:1646 */
+#line 3703 "awkgram.c" /* yacc.c:1646 */
break;
case 165:
-#line 1589 "awkgram.y" /* yacc.c:1646 */
+#line 1582 "awkgram.y" /* yacc.c:1646 */
{
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
(yyval) = (yyvsp[0]);
}
-#line 3719 "awkgram.c" /* yacc.c:1646 */
+#line 3712 "awkgram.c" /* yacc.c:1646 */
break;
case 166:
-#line 1594 "awkgram.y" /* yacc.c:1646 */
+#line 1587 "awkgram.y" /* yacc.c:1646 */
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -3752,11 +3745,11 @@ regular_loop:
(yyval) = list_prepend((yyvsp[0]), t);
}
-#line 3756 "awkgram.c" /* yacc.c:1646 */
+#line 3749 "awkgram.c" /* yacc.c:1646 */
break;
case 167:
-#line 1630 "awkgram.y" /* yacc.c:1646 */
+#line 1623 "awkgram.y" /* yacc.c:1646 */
{
param_sanity((yyvsp[-1]));
(yyvsp[-3])->opcode = Op_func_call;
@@ -3770,49 +3763,49 @@ regular_loop:
(yyval) = list_append(t, (yyvsp[-3]));
}
}
-#line 3774 "awkgram.c" /* yacc.c:1646 */
+#line 3767 "awkgram.c" /* yacc.c:1646 */
break;
case 168:
-#line 1647 "awkgram.y" /* yacc.c:1646 */
+#line 1640 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3780 "awkgram.c" /* yacc.c:1646 */
+#line 3773 "awkgram.c" /* yacc.c:1646 */
break;
case 169:
-#line 1649 "awkgram.y" /* yacc.c:1646 */
+#line 1642 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3786 "awkgram.c" /* yacc.c:1646 */
+#line 3779 "awkgram.c" /* yacc.c:1646 */
break;
case 170:
-#line 1654 "awkgram.y" /* yacc.c:1646 */
+#line 1647 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3792 "awkgram.c" /* yacc.c:1646 */
+#line 3785 "awkgram.c" /* yacc.c:1646 */
break;
case 171:
-#line 1656 "awkgram.y" /* yacc.c:1646 */
+#line 1649 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3798 "awkgram.c" /* yacc.c:1646 */
+#line 3791 "awkgram.c" /* yacc.c:1646 */
break;
case 172:
-#line 1661 "awkgram.y" /* yacc.c:1646 */
+#line 1654 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3804 "awkgram.c" /* yacc.c:1646 */
+#line 3797 "awkgram.c" /* yacc.c:1646 */
break;
case 173:
-#line 1663 "awkgram.y" /* yacc.c:1646 */
+#line 1656 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3812 "awkgram.c" /* yacc.c:1646 */
+#line 3805 "awkgram.c" /* yacc.c:1646 */
break;
case 174:
-#line 1670 "awkgram.y" /* yacc.c:1646 */
+#line 1663 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
@@ -3826,11 +3819,11 @@ regular_loop:
sub_counter++; /* count # of dimensions */
(yyval) = (yyvsp[0]);
}
-#line 3830 "awkgram.c" /* yacc.c:1646 */
+#line 3823 "awkgram.c" /* yacc.c:1646 */
break;
case 175:
-#line 1687 "awkgram.y" /* yacc.c:1646 */
+#line 1680 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *t = (yyvsp[-1]);
if ((yyvsp[-1]) == NULL) {
@@ -3844,31 +3837,31 @@ regular_loop:
(yyvsp[0])->sub_count = count_expressions(&t, false);
(yyval) = list_append(t, (yyvsp[0]));
}
-#line 3848 "awkgram.c" /* yacc.c:1646 */
+#line 3841 "awkgram.c" /* yacc.c:1646 */
break;
case 176:
-#line 1704 "awkgram.y" /* yacc.c:1646 */
+#line 1697 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3854 "awkgram.c" /* yacc.c:1646 */
+#line 3847 "awkgram.c" /* yacc.c:1646 */
break;
case 177:
-#line 1706 "awkgram.y" /* yacc.c:1646 */
+#line 1699 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3862 "awkgram.c" /* yacc.c:1646 */
+#line 3855 "awkgram.c" /* yacc.c:1646 */
break;
case 178:
-#line 1713 "awkgram.y" /* yacc.c:1646 */
+#line 1706 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3868 "awkgram.c" /* yacc.c:1646 */
+#line 3861 "awkgram.c" /* yacc.c:1646 */
break;
case 179:
-#line 1718 "awkgram.y" /* yacc.c:1646 */
+#line 1711 "awkgram.y" /* yacc.c:1646 */
{
char *var_name = (yyvsp[0])->lextok;
@@ -3876,22 +3869,22 @@ regular_loop:
(yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new);
(yyval) = list_create((yyvsp[0]));
}
-#line 3880 "awkgram.c" /* yacc.c:1646 */
+#line 3873 "awkgram.c" /* yacc.c:1646 */
break;
case 180:
-#line 1726 "awkgram.y" /* yacc.c:1646 */
+#line 1719 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-1])->lextok;
(yyvsp[-1])->memory = variable((yyvsp[-1])->source_line, arr, Node_var_new);
(yyvsp[-1])->opcode = Op_push_array;
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-1]));
}
-#line 3891 "awkgram.c" /* yacc.c:1646 */
+#line 3884 "awkgram.c" /* yacc.c:1646 */
break;
case 181:
-#line 1736 "awkgram.y" /* yacc.c:1646 */
+#line 1729 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->nexti;
if (ip->opcode == Op_push
@@ -3903,73 +3896,73 @@ regular_loop:
} else
(yyval) = (yyvsp[0]);
}
-#line 3907 "awkgram.c" /* yacc.c:1646 */
+#line 3900 "awkgram.c" /* yacc.c:1646 */
break;
case 182:
-#line 1748 "awkgram.y" /* yacc.c:1646 */
+#line 1741 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
if ((yyvsp[0]) != NULL)
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3917 "awkgram.c" /* yacc.c:1646 */
+#line 3910 "awkgram.c" /* yacc.c:1646 */
break;
case 183:
-#line 1757 "awkgram.y" /* yacc.c:1646 */
+#line 1750 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
}
-#line 3925 "awkgram.c" /* yacc.c:1646 */
+#line 3918 "awkgram.c" /* yacc.c:1646 */
break;
case 184:
-#line 1761 "awkgram.y" /* yacc.c:1646 */
+#line 1754 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
}
-#line 3933 "awkgram.c" /* yacc.c:1646 */
+#line 3926 "awkgram.c" /* yacc.c:1646 */
break;
case 185:
-#line 1764 "awkgram.y" /* yacc.c:1646 */
+#line 1757 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3939 "awkgram.c" /* yacc.c:1646 */
+#line 3932 "awkgram.c" /* yacc.c:1646 */
break;
case 187:
-#line 1772 "awkgram.y" /* yacc.c:1646 */
+#line 1765 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3945 "awkgram.c" /* yacc.c:1646 */
+#line 3938 "awkgram.c" /* yacc.c:1646 */
break;
case 188:
-#line 1776 "awkgram.y" /* yacc.c:1646 */
+#line 1769 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3951 "awkgram.c" /* yacc.c:1646 */
+#line 3944 "awkgram.c" /* yacc.c:1646 */
break;
case 191:
-#line 1785 "awkgram.y" /* yacc.c:1646 */
+#line 1778 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3957 "awkgram.c" /* yacc.c:1646 */
+#line 3950 "awkgram.c" /* yacc.c:1646 */
break;
case 192:
-#line 1789 "awkgram.y" /* yacc.c:1646 */
+#line 1782 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 3963 "awkgram.c" /* yacc.c:1646 */
+#line 3956 "awkgram.c" /* yacc.c:1646 */
break;
case 193:
-#line 1793 "awkgram.y" /* yacc.c:1646 */
+#line 1786 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3969 "awkgram.c" /* yacc.c:1646 */
+#line 3962 "awkgram.c" /* yacc.c:1646 */
break;
-#line 3973 "awkgram.c" /* yacc.c:1646 */
+#line 3966 "awkgram.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -4197,7 +4190,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1795 "awkgram.y" /* yacc.c:1906 */
+#line 1788 "awkgram.y" /* yacc.c:1906 */
struct token {
@@ -4770,8 +4763,6 @@ do_add_srcfile(enum srctype stype, char *src, char *path, SRCFILE *thisfile)
s->prev = thisfile->prev;
thisfile->prev->next = s;
thisfile->prev = s;
- if (stype == SRC_EXTLIB)
- extensions_used = true;
return s;
}
@@ -6832,7 +6823,7 @@ install_function(char *fname, INSTRUCTION *fi, INSTRUCTION *plist)
int pcount = 0;
r = lookup(fname);
- if (r != NULL || is_deferred_variable(fname)) {
+ if (r != NULL) {
error_ln(fi->source_line, _("function name `%s' previously defined"), fname);
return -1;
}
@@ -7025,51 +7016,6 @@ param_sanity(INSTRUCTION *arglist)
}
}
-/* deferred variables --- those that are only defined if needed. */
-
-/*
- * Is there any reason to use a hash table for deferred variables? At the
- * moment, there are only 1 to 3 such variables, so it may not be worth
- * the overhead. If more modules start using this facility, it should
- * probably be converted into a hash table.
- */
-
-static struct deferred_variable {
- NODE *(*load_func)(void);
- struct deferred_variable *next;
- char name[1]; /* variable-length array */
-} *deferred_variables;
-
-/* register_deferred_variable --- add a var name and loading function to the list */
-
-void
-register_deferred_variable(const char *name, NODE *(*load_func)(void))
-{
- struct deferred_variable *dv;
- size_t sl = strlen(name);
-
- emalloc(dv, struct deferred_variable *, sizeof(*dv)+sl,
- "register_deferred_variable");
- dv->load_func = load_func;
- dv->next = deferred_variables;
- memcpy(dv->name, name, sl+1);
- deferred_variables = dv;
-}
-
-/* is_deferred_variable --- check if NAME is a deferred variable */
-
-static bool
-is_deferred_variable(const char *name)
-{
- struct deferred_variable *dv;
-
- for (dv = deferred_variables; dv != NULL; dv = dv->next)
- if (strcmp(name, dv->name) == 0)
- return true;
- return false;
-}
-
-
/* variable --- make sure NAME is in the symbol table */
NODE *
@@ -7081,43 +7027,14 @@ variable(int location, char *name, NODETYPE type)
if (r->type == Node_func || r->type == Node_ext_func )
error_ln(location, _("function `%s' called with space between name and `(',\nor used as a variable or an array"),
r->vname);
- if (r == symbol_table)
- symtab_used = true;
} else {
/* not found */
- struct deferred_variable *dv;
-
- for (dv = deferred_variables; true; dv = dv->next) {
- if (dv == NULL) {
- /*
- * This is the only case in which we may not free the string.
- */
- return install_symbol(name, type);
- }
- if (strcmp(name, dv->name) == 0) {
- r = (*dv->load_func)();
- break;
- }
- }
+ return install_symbol(name, type);
}
efree(name);
return r;
}
-/* process_deferred --- if the program uses SYMTAB or extensions, load deferred variables */
-
-static void
-process_deferred()
-{
- struct deferred_variable *dv;
-
- if (symtab_used || extensions_used) {
- for (dv = deferred_variables; dv != NULL; dv = dv->next) {
- (void) dv->load_func();
- }
- }
-}
-
/* make_regnode --- make a regular expression node */
static NODE *
diff --git a/awkgram.y b/awkgram.y
index 91795e1d..f4baac68 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -57,7 +57,6 @@ static int include_source(INSTRUCTION *file);
static int load_library(INSTRUCTION *file);
static void next_sourcefile(void);
static char *tokexpand(void);
-static bool is_deferred_variable(const char *name);
#define instruction(t) bcalloc(t, 1, 0)
@@ -80,8 +79,6 @@ static int count_expressions(INSTRUCTION **list, bool isarg);
static INSTRUCTION *optimize_assignment(INSTRUCTION *exp);
static void add_lint(INSTRUCTION *list, LINTTYPE linttype);
-static void process_deferred();
-
enum defref { FUNC_DEFINE, FUNC_USE, FUNC_EXT };
static void func_use(const char *name, enum defref how);
static void check_funcs(void);
@@ -94,7 +91,6 @@ static void check_comment(void);
static bool want_source = false;
static bool want_regexp = false; /* lexical scanning kludge */
static char *in_function; /* parsing kludge */
-static bool symtab_used = false; /* program used SYMTAB */
static int rule = 0;
const char *const ruletab[] = {
@@ -123,7 +119,6 @@ static int lasttok = 0;
static bool eof_warned = false; /* GLOBAL: want warning for each file */
static int break_allowed; /* kludge for break */
static int continue_allowed; /* kludge for continue */
-static bool extensions_used = false; /* program uses extensions */
#define END_FILE -1000
#define END_SRC -2000
@@ -219,8 +214,6 @@ program
| program LEX_EOF
{
next_sourcefile();
- if (sourcefile == srcfiles)
- process_deferred();
}
| program error
{
@@ -237,6 +230,7 @@ rule
: pattern action
{
(void) append_rule($1, $2);
+ first_rule = false;
}
| pattern statement_term
{
@@ -285,7 +279,6 @@ source
library
: FILENAME
{
- extensions_used = true;
if (load_library($1) < 0)
YYABORT;
efree($1->lextok);
@@ -2364,8 +2357,6 @@ do_add_srcfile(enum srctype stype, char *src, char *path, SRCFILE *thisfile)
s->prev = thisfile->prev;
thisfile->prev->next = s;
thisfile->prev = s;
- if (stype == SRC_EXTLIB)
- extensions_used = true;
return s;
}
@@ -4426,7 +4417,7 @@ install_function(char *fname, INSTRUCTION *fi, INSTRUCTION *plist)
int pcount = 0;
r = lookup(fname);
- if (r != NULL || is_deferred_variable(fname)) {
+ if (r != NULL) {
error_ln(fi->source_line, _("function name `%s' previously defined"), fname);
return -1;
}
@@ -4619,51 +4610,6 @@ param_sanity(INSTRUCTION *arglist)
}
}
-/* deferred variables --- those that are only defined if needed. */
-
-/*
- * Is there any reason to use a hash table for deferred variables? At the
- * moment, there are only 1 to 3 such variables, so it may not be worth
- * the overhead. If more modules start using this facility, it should
- * probably be converted into a hash table.
- */
-
-static struct deferred_variable {
- NODE *(*load_func)(void);
- struct deferred_variable *next;
- char name[1]; /* variable-length array */
-} *deferred_variables;
-
-/* register_deferred_variable --- add a var name and loading function to the list */
-
-void
-register_deferred_variable(const char *name, NODE *(*load_func)(void))
-{
- struct deferred_variable *dv;
- size_t sl = strlen(name);
-
- emalloc(dv, struct deferred_variable *, sizeof(*dv)+sl,
- "register_deferred_variable");
- dv->load_func = load_func;
- dv->next = deferred_variables;
- memcpy(dv->name, name, sl+1);
- deferred_variables = dv;
-}
-
-/* is_deferred_variable --- check if NAME is a deferred variable */
-
-static bool
-is_deferred_variable(const char *name)
-{
- struct deferred_variable *dv;
-
- for (dv = deferred_variables; dv != NULL; dv = dv->next)
- if (strcmp(name, dv->name) == 0)
- return true;
- return false;
-}
-
-
/* variable --- make sure NAME is in the symbol table */
NODE *
@@ -4675,43 +4621,14 @@ variable(int location, char *name, NODETYPE type)
if (r->type == Node_func || r->type == Node_ext_func )
error_ln(location, _("function `%s' called with space between name and `(',\nor used as a variable or an array"),
r->vname);
- if (r == symbol_table)
- symtab_used = true;
} else {
/* not found */
- struct deferred_variable *dv;
-
- for (dv = deferred_variables; true; dv = dv->next) {
- if (dv == NULL) {
- /*
- * This is the only case in which we may not free the string.
- */
- return install_symbol(name, type);
- }
- if (strcmp(name, dv->name) == 0) {
- r = (*dv->load_func)();
- break;
- }
- }
+ return install_symbol(name, type);
}
efree(name);
return r;
}
-/* process_deferred --- if the program uses SYMTAB or extensions, load deferred variables */
-
-static void
-process_deferred()
-{
- struct deferred_variable *dv;
-
- if (symtab_used || extensions_used) {
- for (dv = deferred_variables; dv != NULL; dv = dv->next) {
- (void) dv->load_func();
- }
- }
-}
-
/* make_regnode --- make a regular expression node */
static NODE *
diff --git a/builtin.c b/builtin.c
index 90a9bcda..7ed577e9 100644
--- a/builtin.c
+++ b/builtin.c
@@ -517,6 +517,9 @@ do_length(int nargs)
* Support for deferred loading of array elements requires that
* we use the array length interface even though it isn't
* necessary for the built-in array types.
+ *
+ * 1/2015: The deferred arrays are gone, but this is probably
+ * still a good idea.
*/
size = assoc_length(tmp);
diff --git a/command.c b/command.c
index 2d4bc814..389814a5 100644
--- a/command.c
+++ b/command.c
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.0.3. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 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 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.2"
+#define YYBISON_VERSION "3.0.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
diff --git a/dfa.c b/dfa.c
index 6d63acf8..2cfd30b6 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1,5 +1,5 @@
/* dfa.c - deterministic extended regexp routines for GNU
- Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2014 Free Software
+ Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2015 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/dfa.h b/dfa.h
index 4eb42968..79027810 100644
--- a/dfa.h
+++ b/dfa.h
@@ -1,5 +1,5 @@
/* dfa.h - declarations for GNU deterministic regexp compiler
- Copyright (C) 1988, 1998, 2007, 2009-2014 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1998, 2007, 2009-2015 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
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 48a7575c..bd62955d 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,12 @@
+2015-01-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: O'Reilly fixes.
+
+2015-01-19 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkinet.texi: Fix capitalization in document title.
+ * gawktexi.in: Here we again: Starting on more O'Reilly fixes.
+
2014-12-26 Antonio Giovanni Colombo <azc100@gmail.com>
* gawktexi.in (Glossary): Really sort the items.
diff --git a/doc/gawk.info b/doc/gawk.info
index 26dc45ea..1c6a74f6 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -9,7 +9,7 @@ START-INFO-DIR-ENTRY
* awk: (gawk)Invoking gawk. Text scanning and processing.
END-INFO-DIR-ENTRY
- Copyright (C) 1989, 1991, 1992, 1993, 1996-2005, 2007, 2009-2014
+ Copyright (C) 1989, 1991, 1992, 1993, 1996-2005, 2007, 2009-2015
Free Software Foundation, Inc.
@@ -37,7 +37,7 @@ General Introduction
This file documents `awk', a program that you can use to select
particular records in a file and perform operations upon them.
- Copyright (C) 1989, 1991, 1992, 1993, 1996-2005, 2007, 2009-2014
+ Copyright (C) 1989, 1991, 1992, 1993, 1996-2005, 2007, 2009-2015
Free Software Foundation, Inc.
@@ -748,10 +748,10 @@ and associative arrays. Those looking for something new can try out
The programs in this book make clear that an AWK program is
typically much smaller and faster to develop than a counterpart written
-in C. Consequently, there is often a payoff to prototype an algorithm
-or design in AWK to get it running quickly and expose problems early.
-Often, the interpreted performance is adequate and the AWK prototype
-becomes the product.
+in C. Consequently, there is often a payoff to prototyping an
+algorithm or design in AWK to get it running quickly and expose
+problems early. Often, the interpreted performance is adequate and the
+AWK prototype becomes the product.
The new `pgawk' (profiling `gawk'), produces program execution
counts. I recently experimented with an algorithm that for n lines of
@@ -775,16 +775,16 @@ Foreword to the Fourth Edition
******************************
Some things don't change. Thirteen years ago I wrote: "If you use AWK
-or want to learn how, then read this book." True then and still true
+or want to learn how, then read this book." True then, and still true
today.
- Learning to use a programming language is more than mastering the
-syntax. One needs to acquire an understanding of how to use the
+ Learning to use a programming language is about more than mastering
+the syntax. One needs to acquire an understanding of how to use the
features of the language to solve practical programming problems. A
focus of this book is many examples that show how to use AWK.
Some things do change. Our computers are much faster and have more
-memory. Consequently, speed and storage inefficiencies of a high level
+memory. Consequently, speed and storage inefficiencies of a high-level
language matter less. Prototyping in AWK and then rewriting in C for
performance reasons happens less, because more often the prototype is
fast enough.
@@ -793,9 +793,9 @@ fast enough.
C++. With `gawk' 4.1 and later, you do not have to choose between
writing your program in AWK or in C/C++. You can write most of your
program in AWK and the aspects that require C/C++ capabilities can be
-written in C/C++ and then the pieces glued together when the `gawk'
+written in C/C++, and then the pieces glued together when the `gawk'
module loads the C/C++ module as a dynamic plug-in. *note Dynamic
-Extensions::, has all the details, and as expected, many examples to
+Extensions::, has all the details, and, as expected, many examples to
help you learn the ins and outs.
I enjoy programming in AWK and had fun (re)reading this book. I
@@ -834,7 +834,7 @@ So most of the time, we don't distinguish between `gawk' and other
* Validate data
- * Produce indexes and perform other document preparation tasks
+ * Produce indexes and perform other document-preparation tasks
* Experiment with algorithms that you can adapt later to other
computer languages
@@ -926,7 +926,7 @@ advice from Richard Stallman. John Woods contributed parts of the code
as well. In 1988 and 1989, David Trueman, with help from me,
thoroughly reworked `gawk' for compatibility with the newer `awk'.
Circa 1994, I became the primary maintainer. Current development
-focuses on bug fixes, performance improvements, standards compliance
+focuses on bug fixes, performance improvements, standards compliance,
and, occasionally, new features.
In May 1997, Ju"rgen Kahrs felt the need for network access from
@@ -938,10 +938,10 @@ the `gawk' distribution). His code finally became part of the main
John Haque rewrote the `gawk' internals, in the process providing an
`awk'-level debugger. This version became available as `gawk' version
-4.0, in 2011.
+4.0 in 2011.
- *Note Contributors::, for a full list of those who made important
-contributions to `gawk'.
+ *Note Contributors::, for a full list of those who have made
+important contributions to `gawk'.

File: gawk.info, Node: Names, Next: This Manual, Prev: History, Up: Preface
@@ -954,7 +954,7 @@ provided in *note Language History::. The language described in this
Info file is often referred to as "new `awk'." By analogy, the
original version of `awk' is referred to as "old `awk'."
- Today, on most systems, when you run the `awk' utility, you get some
+ Today, on most systems, when you run the `awk' utility you get some
version of new `awk'.(1) If your system's standard `awk' is the old
one, you will see something like this if you try the test program:
@@ -1014,9 +1014,9 @@ in *note Sample Programs::, should be of interest.
This Info file is split into several parts, as follows:
- * Part I describes the `awk' language and `gawk' program in detail.
- It starts with the basics, and continues through all of the
- features of `awk'. It contains the following chapters:
+ * Part I describes the `awk' language and the `gawk' program in
+ detail. It starts with the basics, and continues through all of
+ the features of `awk'. It contains the following chapters:
- *note Getting Started::, provides the essentials you need to
know to begin using `awk'.
@@ -1047,9 +1047,10 @@ in *note Sample Programs::, should be of interest.
`gawk' use.
- *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.
+ the associative array. Deleting array elements and whole
+ arrays is described, as well as sorting arrays in `gawk'.
+ The major node also describes how `gawk' provides arrays of
+ arrays.
- *note Functions::, describes the built-in functions `awk' and
`gawk' provide, as well as how to define your own functions.
@@ -1057,14 +1058,13 @@ in *note Sample Programs::, should be of interest.
indirectly.
* Part II shows how to use `awk' and `gawk' for problem solving.
- There is lots of code here for you to read and learn from. It
- contains the following chapters:
+ There is lots of code here for you to read and learn from. This
+ part contains the following chapters:
- - *note Library Functions::, which provides a number of
- functions meant to be used from main `awk' programs.
+ - *note Library Functions::, provides a number of functions
+ meant to be used from main `awk' programs.
- - *note Sample Programs::, which provides many sample `awk'
- programs.
+ - *note Sample Programs::, provides many sample `awk' programs.
Reading these two chapters allows you to see `awk' solving real
problems.
@@ -1096,7 +1096,7 @@ in *note Sample Programs::, should be of interest.
It contains the following appendices:
- *note Language History::, describes how the `awk' language
- has evolved since its first release to present. It also
+ has evolved since its first release to the present. It also
describes how `gawk' has acquired features over time.
- *note Installation::, describes how to get `gawk', how to
@@ -1113,7 +1113,7 @@ in *note Sample Programs::, should be of interest.
material for those who are completely unfamiliar with
computer programming.
- The *note Glossary::, defines most, if not all of, the
+ The *note Glossary::, defines most, if not all, of the
significant terms used throughout the Info file. If you find
terms that you aren't familiar with, try looking them up here.
@@ -1142,8 +1142,8 @@ node briefly documents the typographical conventions used in Texinfo.
common shell primary and secondary prompts, `$' and `>'. Input that
you type is shown `like this'. Output from the command is preceded by
the glyph "-|". This typically represents the command's standard
-output. Error messages, and other output on the command's standard
-error, are preceded by the glyph "error-->". For example:
+output. Error messages and other output on the command's standard
+error are preceded by the glyph "error-->". For example:
$ echo hi on stdout
-| hi on stdout
@@ -1155,7 +1155,7 @@ particular, there are special characters called "control characters."
These are characters that you type by holding down both the `CONTROL'
key and another key, at the same time. For example, a `Ctrl-d' is typed
by first pressing and holding the `CONTROL' key, next pressing the `d'
-key and finally releasing both keys.
+key, and finally releasing both keys.
For the sake of brevity, throughout this Info file, we refer to
Brian Kernighan's version of `awk' as "BWK `awk'." (*Note Other
@@ -1171,7 +1171,7 @@ Dark Corners
Until the POSIX standard (and `GAWK: Effective AWK Programming'),
many features of `awk' were either poorly documented or not documented
at all. Descriptions of such features (often called "dark corners")
-are noted in this Info file with "(d.c.)". They also appear in the
+are noted in this Info file with "(d.c.)." They also appear in the
index under the heading "dark corner."
But, as noted by the opening quote, any coverage of dark corners is
@@ -1194,8 +1194,8 @@ editor. GNU Emacs is the most widely used version of Emacs today.
The GNU(1) Project is an ongoing effort on the part of the Free
Software Foundation to create a complete, freely distributable,
-POSIX-compliant computing environment. The FSF uses the "GNU General
-Public License" (GPL) to ensure that their software's source code is
+POSIX-compliant computing environment. The FSF uses the GNU General
+Public License (GPL) to ensure that its software's source code is
always available to the end user. A copy of the GPL is included for
your reference (*note Copying::). The GPL applies to the C language
source code for `gawk'. To find out more about the FSF and the GNU
@@ -1223,26 +1223,26 @@ original, "old" version of `awk'.
I started working with that version in the fall of 1988. As work on
it progressed, the FSF published several preliminary versions (numbered
-0.X). In 1996, Edition 1.0 was released with `gawk' 3.0.0. The FSF
+0.X). In 1996, edition 1.0 was released with `gawk' 3.0.0. The FSF
published the first two editions under the title `The GNU Awk User's
Guide'.
This edition maintains the basic structure of the previous editions.
For FSF edition 4.0, the content was thoroughly reviewed and updated.
All references to `gawk' versions prior to 4.0 were removed. Of
-significant note for that edition was *note Debugger::.
+significant note for that edition was the addition of *note Debugger::.
For FSF edition 4.1, the content has been reorganized into parts,
and the major new additions are *note Arbitrary Precision Arithmetic::,
and *note Dynamic Extensions::.
This Info file will undoubtedly continue to evolve. If you find an
-error in this Info file, please report it! *Note Bugs::, for
+error in the Info file, please report it! *Note Bugs::, for
information on submitting problem reports electronically.
---------- Footnotes ----------
- (1) GNU stands for "GNU's not Unix."
+ (1) GNU stands for "GNU's Not Unix."
(2) The terminology "GNU/Linux" is explained in the *note Glossary::.
@@ -1286,7 +1286,7 @@ acknowledgments:
this manual. Jay Fenlason contributed many ideas and sample
programs. Richard Mlynarik and Robert Chassell gave helpful
comments on drafts of this manual. The paper `A Supplemental
- Document for `awk'' by John W. Pierce of the Chemistry Department
+ Document for AWK' by John W. Pierce of the Chemistry Department
at UC San Diego, pinpointed several issues relevant both to `awk'
implementation and to this manual, that would otherwise have
escaped us.
@@ -1299,7 +1299,7 @@ GNU Project.
acknowledgements:
The following people (in alphabetical order) provided helpful
- comments on various versions of this book, Rick Adams, Dr. Nelson
+ comments on various versions of this book: Rick Adams, Dr. Nelson
H.F. Beebe, Karl Berry, Dr. Michael Brennan, Rich Burridge, Claire
Cloutier, Diane Close, Scott Deifik, Christopher ("Topher") Eliot,
Jeffrey Friedl, Dr. Darrel Hankerson, Michal Jaegermann, Dr.
@@ -1308,7 +1308,7 @@ acknowledgements:
Robert J. Chassell provided much valuable advice on the use of
Texinfo. He also deserves special thanks for convincing me _not_
- to title this Info file `How To Gawk Politely'. Karl Berry helped
+ to title this Info file `How to Gawk Politely'. Karl Berry helped
significantly with the TeX part of Texinfo.
I would like to thank Marshall and Elaine Hartholz of Seattle and
@@ -1348,18 +1348,18 @@ of people. *Note Contributors::, for the full list.
Thanks to Michael Brennan for the Forewords.
Thanks to Patrice Dumas for the new `makeinfo' program. Thanks to
-Karl Berry who continues to work to keep the Texinfo markup language
+Karl Berry, who continues to work to keep the Texinfo markup language
sane.
Robert P.J. Day, Michael Brennan, and Brian Kernighan kindly acted as
reviewers for the 2015 edition of this Info file. Their feedback helped
improve the final work.
- I would like to thank Brian Kernighan for invaluable assistance
-during the testing and debugging of `gawk', and for ongoing help and
-advice in clarifying numerous points about the language. We could not
-have done nearly as good a job on either `gawk' or its documentation
-without his help.
+ I would also like to thank Brian Kernighan for his invaluable
+assistance during the testing and debugging of `gawk', and for his
+ongoing help and advice in clarifying numerous points about the
+language. We could not have done nearly as good a job on either `gawk'
+or its documentation without his help.
Brian is in a class by himself as a programmer and technical author.
I have to thank him (yet again) for his ongoing friendship and for
@@ -1402,10 +1402,10 @@ contain "function definitions", an advanced feature that we will ignore
for now; *note User-defined::). Each rule specifies one pattern to
search for and one action to perform upon finding the pattern.
- Syntactically, a rule consists of a pattern followed by an action.
-The action is enclosed in braces to separate it from the pattern.
-Newlines usually separate rules. Therefore, an `awk' program looks
-like this:
+ Syntactically, a rule consists of a "pattern" followed by an
+"action". The action is enclosed in braces to separate it from the
+pattern. Newlines usually separate rules. Therefore, an `awk' program
+looks like this:
PATTERN { ACTION }
PATTERN { ACTION }
@@ -1473,7 +1473,7 @@ program as the first argument of the `awk' command, like this:
awk 'PROGRAM' INPUT-FILE1 INPUT-FILE2 ...
-where PROGRAM consists of a series of PATTERNS and ACTIONS, as
+where PROGRAM consists of a series of patterns and actions, as
described earlier.
This command format instructs the "shell", or command interpreter,
@@ -1488,8 +1488,8 @@ 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.
- Later in this chapter, *note Very Simple::, presents several short,
-self-contained programs.
+ Later in this chapter, in *note Very Simple::, we'll see examples of
+several short, self-contained programs.

File: gawk.info, Node: Read Terminal, Next: Long, Prev: One-shot, Up: Running gawk
@@ -1504,7 +1504,7 @@ following command line:
`awk' applies the PROGRAM to the "standard input", which usually means
whatever you type on the keyboard. This continues until you indicate
-end-of-file by typing `Ctrl-d'. (On other operating systems, the
+end-of-file by typing `Ctrl-d'. (On non-POSIX operating systems, the
end-of-file character may be different. For example, on OS/2, it is
`Ctrl-z'.)
@@ -1579,10 +1579,9 @@ that are provided on the `awk' command line. (Also, placing the
program in a file allows us to use a literal single quote in the program
text, instead of the magic `\47'.)
- If you want to clearly identify your `awk' program files as such,
-you can add the extension `.awk' to the file name. This doesn't affect
-the execution of the `awk' program but it does make "housekeeping"
-easier.
+ If you want to clearly identify an `awk' program file as such, you
+can add the extension `.awk' to the file name. This doesn't affect the
+execution of the `awk' program but it does make "housekeeping" easier.

File: gawk.info, Node: Executable Scripts, Next: Comments, Prev: Long, Up: Running gawk
@@ -1711,7 +1710,7 @@ at a later time.

File: gawk.info, Node: Quoting, Prev: Comments, Up: Running gawk
-1.1.6 Shell-Quoting Issues
+1.1.6 Shell Quoting Issues
--------------------------
* Menu:
@@ -1806,7 +1805,7 @@ shell quoting tricks, like this:
-| Here is a single quote <'>
This program consists of three concatenated quoted strings. The first
-and the third are single quoted, the second is double quoted.
+and the third are single-quoted, and the second is double-quoted.
This can be "simplified" to:
@@ -1833,8 +1832,7 @@ like so:
$ awk 'BEGIN { print "Here is a double quote <\42>" }'
-| Here is a double quote <">
-This works nicely, except that you should comment clearly what the
-escapes mean.
+This works nicely, but you should comment clearly what the escapes mean.
A fourth option is to use command-line variable assignment, like
this:
@@ -1843,11 +1841,11 @@ this:
-| Here is a single quote <'>
(Here, the two string constants and the value of `sq' are
-concatenated into a single string which is printed by `print'.)
+concatenated into a single string that is printed by `print'.)
If you really need both single and double quotes in your `awk'
program, it is probably best to move it into a separate file, where the
-shell won't be part of the picture, and you can say what you mean.
+shell won't be part of the picture and you can say what you mean.

File: gawk.info, Node: DOS Quoting, Up: Quoting
@@ -1905,7 +1903,7 @@ of green crates shipped, the number of red boxes shipped, the number of
orange bags shipped, and the number of blue packages shipped,
respectively. There are 16 entries, covering the 12 months of last year
and the first four months of the current year. An empty line separates
-the data for the two years.
+the data for the two years:
Jan 13 25 15 115
Feb 15 32 24 226
@@ -1937,7 +1935,7 @@ File: gawk.info, Node: Very Simple, Next: Two Rules, Prev: Sample Data Files,
The following command runs a simple `awk' program that searches the
input file `mail-list' for the character string `li' (a grouping of
characters is usually called a "string"; the term "string" is based on
-similar usage in English, such as "a string of pearls," or "a string of
+similar usage in English, such as "a string of pearls" or "a string of
cars in a train"):
awk '/li/ { print $0 }' mail-list
@@ -1973,24 +1971,25 @@ prints all lines matching the pattern `li'. By comparison, omitting
the `print' statement but retaining the braces makes an empty action
that does nothing (i.e., no lines are printed).
- Many practical `awk' programs are just a line or two. Following is a
-collection of useful, short programs to get you started. Some of these
-programs contain constructs that haven't been covered yet. (The
-description of the program will give you a good idea of what is going
-on, but you'll need to read the rest of the Info file to become an
-`awk' expert!) Most of the examples use a data file named `data'.
-This is just a placeholder; if you use these programs yourself,
-substitute your own file names for `data'. For future reference, note
-that there is often more than one way to do things in `awk'. At some
-point, you may want to look back at these examples and see if you can
-come up with different ways to do the same things shown here:
+ Many practical `awk' programs are just a line or two long.
+Following is a collection of useful, short programs to get you started.
+Some of these programs contain constructs that haven't been covered
+yet. (The description of the program will give you a good idea of what
+is going on, but you'll need to read the rest of the Info file to
+become an `awk' expert!) Most of the examples use a data file named
+`data'. This is just a placeholder; if you use these programs
+yourself, substitute your own file names for `data'. For future
+reference, note that there is often more than one way to do things in
+`awk'. At some point, you may want to look back at these examples and
+see if you can come up with different ways to do the same things shown
+here:
* Print every line that is longer than 80 characters:
awk 'length($0) > 80' data
- The sole rule has a relational expression as its pattern and it
- has no action--so it uses the default action, printing the record.
+ The sole rule has a relational expression as its pattern and has no
+ action--so it uses the default action, printing the record.
* Print the length of the longest input line:
@@ -2045,8 +2044,8 @@ come up with different ways to do the same things shown here:
awk 'NR % 2 == 0' data
- If you use the expression `NR % 2 == 1' instead, the program would
- print the odd-numbered lines.
+ If you used the expression `NR % 2 == 1' instead, the program
+ would print the odd-numbered lines.

File: gawk.info, Node: Two Rules, Next: More Complex, Prev: Very Simple, Up: Getting Started
@@ -5918,7 +5917,7 @@ the same as specifying no timeout at all.
implicit loop that reads input records and matches them against
patterns, like so:
- $ gawk 'BEGIN { PROCINFO["-", "READ_TIMEOUT"] = 5000 }
+ $ gawk 'BEGIN { PROCINFO["-", "READ_TIMEOUT"] = 5000 }
> { print "You entered: " $0 }'
gawk
-| You entered: gawk
@@ -32636,7 +32635,7 @@ Index
* exit the debugger: Miscellaneous Debugger Commands.
(line 99)
* exp: Numeric Functions. (line 33)
-* expand utility: Very Simple. (line 72)
+* expand utility: Very Simple. (line 73)
* Expat XML parser library: gawkextlib. (line 33)
* exponent: Numeric Functions. (line 33)
* expressions: Expressions. (line 6)
@@ -34470,560 +34469,560 @@ Index
Tag Table:
Node: Top1204
Node: Foreword342225
-Node: Foreword446667
-Node: Preface48189
-Ref: Preface-Footnote-151060
-Ref: Preface-Footnote-251167
-Ref: Preface-Footnote-351400
-Node: History51542
-Node: Names53888
-Ref: Names-Footnote-154982
-Node: This Manual55128
-Ref: This Manual-Footnote-161615
-Node: Conventions61715
-Node: Manual History64053
-Ref: Manual History-Footnote-167035
-Ref: Manual History-Footnote-267076
-Node: How To Contribute67150
-Node: Acknowledgments68279
-Node: Getting Started73084
-Node: Running gawk75517
-Node: One-shot76707
-Node: Read Terminal77955
-Node: Long79982
-Node: Executable Scripts81498
-Ref: Executable Scripts-Footnote-184287
-Node: Comments84390
-Node: Quoting86872
-Node: DOS Quoting92396
-Node: Sample Data Files93071
-Node: Very Simple95666
-Node: Two Rules100564
-Node: More Complex102450
-Node: Statements/Lines105312
-Ref: Statements/Lines-Footnote-1109767
-Node: Other Features110032
-Node: When110963
-Ref: When-Footnote-1112717
-Node: Intro Summary112782
-Node: Invoking Gawk113665
-Node: Command Line115179
-Node: Options115977
-Ref: Options-Footnote-1131781
-Ref: Options-Footnote-2132010
-Node: Other Arguments132035
-Node: Naming Standard Input134983
-Node: Environment Variables136076
-Node: AWKPATH Variable136634
-Ref: AWKPATH Variable-Footnote-1140047
-Ref: AWKPATH Variable-Footnote-2140092
-Node: AWKLIBPATH Variable140352
-Node: Other Environment Variables141608
-Node: Exit Status145096
-Node: Include Files145772
-Node: Loading Shared Libraries149369
-Node: Obsolete150796
-Node: Undocumented151493
-Node: Invoking Summary151760
-Node: Regexp153424
-Node: Regexp Usage154878
-Node: Escape Sequences156915
-Node: Regexp Operators163156
-Ref: Regexp Operators-Footnote-1170582
-Ref: Regexp Operators-Footnote-2170729
-Node: Bracket Expressions170827
-Ref: table-char-classes172842
-Node: Leftmost Longest175766
-Node: Computed Regexps177068
-Node: GNU Regexp Operators180465
-Node: Case-sensitivity184138
-Ref: Case-sensitivity-Footnote-1187023
-Ref: Case-sensitivity-Footnote-2187258
-Node: Regexp Summary187366
-Node: Reading Files188833
-Node: Records190927
-Node: awk split records191660
-Node: gawk split records196575
-Ref: gawk split records-Footnote-1201119
-Node: Fields201156
-Ref: Fields-Footnote-1203932
-Node: Nonconstant Fields204018
-Ref: Nonconstant Fields-Footnote-1206261
-Node: Changing Fields206465
-Node: Field Separators212394
-Node: Default Field Splitting215099
-Node: Regexp Field Splitting216216
-Node: Single Character Fields219566
-Node: Command Line Field Separator220625
-Node: Full Line Fields223837
-Ref: Full Line Fields-Footnote-1225354
-Ref: Full Line Fields-Footnote-2225400
-Node: Field Splitting Summary225501
-Node: Constant Size227575
-Node: Splitting By Content232164
-Ref: Splitting By Content-Footnote-1236158
-Node: Multiple Line236321
-Ref: Multiple Line-Footnote-1242207
-Node: Getline242386
-Node: Plain Getline244598
-Node: Getline/Variable247238
-Node: Getline/File248386
-Node: Getline/Variable/File249770
-Ref: Getline/Variable/File-Footnote-1251373
-Node: Getline/Pipe251460
-Node: Getline/Variable/Pipe254143
-Node: Getline/Coprocess255274
-Node: Getline/Variable/Coprocess256526
-Node: Getline Notes257265
-Node: Getline Summary260057
-Ref: table-getline-variants260469
-Node: Read Timeout261298
-Ref: Read Timeout-Footnote-1265123
-Node: Command-line directories265181
-Node: Input Summary266086
-Node: Input Exercises269387
-Node: Printing270115
-Node: Print271952
-Node: Print Examples273409
-Node: Output Separators276188
-Node: OFMT278206
-Node: Printf279560
-Node: Basic Printf280345
-Node: Control Letters281915
-Node: Format Modifiers285898
-Node: Printf Examples291907
-Node: Redirection294393
-Node: Special FD301234
-Ref: Special FD-Footnote-1304394
-Node: Special Files304468
-Node: Other Inherited Files305085
-Node: Special Network306085
-Node: Special Caveats306947
-Node: Close Files And Pipes307898
-Ref: Close Files And Pipes-Footnote-1315085
-Ref: Close Files And Pipes-Footnote-2315233
-Node: Print Return Values315383
-Node: Output Summary315937
-Node: Output Exercises316933
-Node: Expressions317613
-Node: Values318798
-Node: Constants319476
-Node: Scalar Constants320167
-Ref: Scalar Constants-Footnote-1321026
-Node: Nondecimal-numbers321276
-Node: Regexp Constants324294
-Node: Using Constant Regexps324819
-Node: Variables327962
-Node: Using Variables328617
-Node: Assignment Options330528
-Node: Conversion332403
-Node: Strings And Numbers332927
-Ref: Strings And Numbers-Footnote-1335992
-Node: Locale influences conversions336101
-Ref: table-locale-affects338848
-Node: All Operators339436
-Node: Arithmetic Ops340066
-Node: Concatenation342571
-Ref: Concatenation-Footnote-1345390
-Node: Assignment Ops345496
-Ref: table-assign-ops350475
-Node: Increment Ops351747
-Node: Truth Values and Conditions355185
-Node: Truth Values356270
-Node: Typing and Comparison357319
-Node: Variable Typing358129
-Node: Comparison Operators361782
-Ref: table-relational-ops362192
-Node: POSIX String Comparison365687
-Ref: POSIX String Comparison-Footnote-1366759
-Node: Boolean Ops366897
-Ref: Boolean Ops-Footnote-1371376
-Node: Conditional Exp371467
-Node: Function Calls373194
-Node: Precedence377074
-Node: Locales380735
-Node: Expressions Summary382367
-Node: Patterns and Actions384927
-Node: Pattern Overview386047
-Node: Regexp Patterns387726
-Node: Expression Patterns388269
-Node: Ranges391979
-Node: BEGIN/END395085
-Node: Using BEGIN/END395846
-Ref: Using BEGIN/END-Footnote-1398580
-Node: I/O And BEGIN/END398686
-Node: BEGINFILE/ENDFILE401000
-Node: Empty403901
-Node: Using Shell Variables404218
-Node: Action Overview406491
-Node: Statements408817
-Node: If Statement410665
-Node: While Statement412160
-Node: Do Statement414189
-Node: For Statement415333
-Node: Switch Statement418490
-Node: Break Statement420872
-Node: Continue Statement422913
-Node: Next Statement424740
-Node: Nextfile Statement427121
-Node: Exit Statement429751
-Node: Built-in Variables432154
-Node: User-modified433287
-Ref: User-modified-Footnote-1440968
-Node: Auto-set441030
-Ref: Auto-set-Footnote-1454722
-Ref: Auto-set-Footnote-2454927
-Node: ARGC and ARGV454983
-Node: Pattern Action Summary459201
-Node: Arrays461628
-Node: Array Basics462957
-Node: Array Intro463801
-Ref: figure-array-elements465765
-Ref: Array Intro-Footnote-1468291
-Node: Reference to Elements468419
-Node: Assigning Elements470871
-Node: Array Example471362
-Node: Scanning an Array473120
-Node: Controlling Scanning476136
-Ref: Controlling Scanning-Footnote-1481332
-Node: Numeric Array Subscripts481648
-Node: Uninitialized Subscripts483833
-Node: Delete485450
-Ref: Delete-Footnote-1488193
-Node: Multidimensional488250
-Node: Multiscanning491347
-Node: Arrays of Arrays492936
-Node: Arrays Summary497695
-Node: Functions499787
-Node: Built-in500686
-Node: Calling Built-in501764
-Node: Numeric Functions503755
-Ref: Numeric Functions-Footnote-1508574
-Ref: Numeric Functions-Footnote-2508931
-Ref: Numeric Functions-Footnote-3508979
-Node: String Functions509251
-Ref: String Functions-Footnote-1532726
-Ref: String Functions-Footnote-2532855
-Ref: String Functions-Footnote-3533103
-Node: Gory Details533190
-Ref: table-sub-escapes534971
-Ref: table-sub-proposed536491
-Ref: table-posix-sub537855
-Ref: table-gensub-escapes539391
-Ref: Gory Details-Footnote-1540223
-Node: I/O Functions540374
-Ref: I/O Functions-Footnote-1547592
-Node: Time Functions547739
-Ref: Time Functions-Footnote-1558227
-Ref: Time Functions-Footnote-2558295
-Ref: Time Functions-Footnote-3558453
-Ref: Time Functions-Footnote-4558564
-Ref: Time Functions-Footnote-5558676
-Ref: Time Functions-Footnote-6558903
-Node: Bitwise Functions559169
-Ref: table-bitwise-ops559731
-Ref: Bitwise Functions-Footnote-1564040
-Node: Type Functions564209
-Node: I18N Functions565360
-Node: User-defined567005
-Node: Definition Syntax567810
-Ref: Definition Syntax-Footnote-1573217
-Node: Function Example573288
-Ref: Function Example-Footnote-1576207
-Node: Function Caveats576229
-Node: Calling A Function576747
-Node: Variable Scope577705
-Node: Pass By Value/Reference580693
-Node: Return Statement584188
-Node: Dynamic Typing587169
-Node: Indirect Calls588098
-Ref: Indirect Calls-Footnote-1599400
-Node: Functions Summary599528
-Node: Library Functions602230
-Ref: Library Functions-Footnote-1605839
-Ref: Library Functions-Footnote-2605982
-Node: Library Names606153
-Ref: Library Names-Footnote-1609607
-Ref: Library Names-Footnote-2609830
-Node: General Functions609916
-Node: Strtonum Function611019
-Node: Assert Function614041
-Node: Round Function617365
-Node: Cliff Random Function618906
-Node: Ordinal Functions619922
-Ref: Ordinal Functions-Footnote-1622985
-Ref: Ordinal Functions-Footnote-2623237
-Node: Join Function623448
-Ref: Join Function-Footnote-1625217
-Node: Getlocaltime Function625417
-Node: Readfile Function629161
-Node: Shell Quoting631131
-Node: Data File Management632532
-Node: Filetrans Function633164
-Node: Rewind Function637220
-Node: File Checking638607
-Ref: File Checking-Footnote-1639939
-Node: Empty Files640140
-Node: Ignoring Assigns642119
-Node: Getopt Function643670
-Ref: Getopt Function-Footnote-1655132
-Node: Passwd Functions655332
-Ref: Passwd Functions-Footnote-1664169
-Node: Group Functions664257
-Ref: Group Functions-Footnote-1672151
-Node: Walking Arrays672364
-Node: Library Functions Summary673967
-Node: Library Exercises675368
-Node: Sample Programs676648
-Node: Running Examples677418
-Node: Clones678146
-Node: Cut Program679370
-Node: Egrep Program689089
-Ref: Egrep Program-Footnote-1696587
-Node: Id Program696697
-Node: Split Program700342
-Ref: Split Program-Footnote-1703790
-Node: Tee Program703918
-Node: Uniq Program706707
-Node: Wc Program714126
-Ref: Wc Program-Footnote-1718376
-Node: Miscellaneous Programs718470
-Node: Dupword Program719683
-Node: Alarm Program721714
-Node: Translate Program726518
-Ref: Translate Program-Footnote-1731083
-Node: Labels Program731353
-Ref: Labels Program-Footnote-1734704
-Node: Word Sorting734788
-Node: History Sorting738859
-Node: Extract Program740695
-Node: Simple Sed748220
-Node: Igawk Program751288
-Ref: Igawk Program-Footnote-1765612
-Ref: Igawk Program-Footnote-2765813
-Ref: Igawk Program-Footnote-3765935
-Node: Anagram Program766050
-Node: Signature Program769107
-Node: Programs Summary770354
-Node: Programs Exercises771547
-Ref: Programs Exercises-Footnote-1775678
-Node: Advanced Features775769
-Node: Nondecimal Data777717
-Node: Array Sorting779307
-Node: Controlling Array Traversal780004
-Ref: Controlling Array Traversal-Footnote-1788337
-Node: Array Sorting Functions788455
-Ref: Array Sorting Functions-Footnote-1792344
-Node: Two-way I/O792540
-Ref: Two-way I/O-Footnote-1797485
-Ref: Two-way I/O-Footnote-2797671
-Node: TCP/IP Networking797753
-Node: Profiling800626
-Node: Advanced Features Summary808903
-Node: Internationalization810836
-Node: I18N and L10N812316
-Node: Explaining gettext813002
-Ref: Explaining gettext-Footnote-1818027
-Ref: Explaining gettext-Footnote-2818211
-Node: Programmer i18n818376
-Ref: Programmer i18n-Footnote-1823242
-Node: Translator i18n823291
-Node: String Extraction824085
-Ref: String Extraction-Footnote-1825216
-Node: Printf Ordering825302
-Ref: Printf Ordering-Footnote-1828088
-Node: I18N Portability828152
-Ref: I18N Portability-Footnote-1830607
-Node: I18N Example830670
-Ref: I18N Example-Footnote-1833473
-Node: Gawk I18N833545
-Node: I18N Summary834183
-Node: Debugger835522
-Node: Debugging836544
-Node: Debugging Concepts836985
-Node: Debugging Terms838838
-Node: Awk Debugging841410
-Node: Sample Debugging Session842304
-Node: Debugger Invocation842824
-Node: Finding The Bug844208
-Node: List of Debugger Commands850683
-Node: Breakpoint Control852016
-Node: Debugger Execution Control855712
-Node: Viewing And Changing Data859076
-Node: Execution Stack862454
-Node: Debugger Info864091
-Node: Miscellaneous Debugger Commands868108
-Node: Readline Support873137
-Node: Limitations874029
-Node: Debugging Summary876143
-Node: Arbitrary Precision Arithmetic877311
-Node: Computer Arithmetic878727
-Ref: table-numeric-ranges882325
-Ref: Computer Arithmetic-Footnote-1883184
-Node: Math Definitions883241
-Ref: table-ieee-formats886529
-Ref: Math Definitions-Footnote-1887133
-Node: MPFR features887238
-Node: FP Math Caution888909
-Ref: FP Math Caution-Footnote-1889959
-Node: Inexactness of computations890328
-Node: Inexact representation891287
-Node: Comparing FP Values892644
-Node: Errors accumulate893726
-Node: Getting Accuracy895159
-Node: Try To Round897821
-Node: Setting precision898720
-Ref: table-predefined-precision-strings899404
-Node: Setting the rounding mode901193
-Ref: table-gawk-rounding-modes901557
-Ref: Setting the rounding mode-Footnote-1905012
-Node: Arbitrary Precision Integers905191
-Ref: Arbitrary Precision Integers-Footnote-1910090
-Node: POSIX Floating Point Problems910239
-Ref: POSIX Floating Point Problems-Footnote-1914112
-Node: Floating point summary914150
-Node: Dynamic Extensions916344
-Node: Extension Intro917896
-Node: Plugin License919162
-Node: Extension Mechanism Outline919959
-Ref: figure-load-extension920387
-Ref: figure-register-new-function921867
-Ref: figure-call-new-function922871
-Node: Extension API Description924857
-Node: Extension API Functions Introduction926307
-Node: General Data Types931131
-Ref: General Data Types-Footnote-1936870
-Node: Memory Allocation Functions937169
-Ref: Memory Allocation Functions-Footnote-1940008
-Node: Constructor Functions940104
-Node: Registration Functions941838
-Node: Extension Functions942523
-Node: Exit Callback Functions944820
-Node: Extension Version String946068
-Node: Input Parsers946733
-Node: Output Wrappers956612
-Node: Two-way processors961127
-Node: Printing Messages963331
-Ref: Printing Messages-Footnote-1964407
-Node: Updating `ERRNO'964559
-Node: Requesting Values965299
-Ref: table-value-types-returned966027
-Node: Accessing Parameters966984
-Node: Symbol Table Access968215
-Node: Symbol table by name968729
-Node: Symbol table by cookie970710
-Ref: Symbol table by cookie-Footnote-1974854
-Node: Cached values974917
-Ref: Cached values-Footnote-1978416
-Node: Array Manipulation978507
-Ref: Array Manipulation-Footnote-1979605
-Node: Array Data Types979642
-Ref: Array Data Types-Footnote-1982297
-Node: Array Functions982389
-Node: Flattening Arrays986243
-Node: Creating Arrays993135
-Node: Extension API Variables997906
-Node: Extension Versioning998542
-Node: Extension API Informational Variables1000443
-Node: Extension API Boilerplate1001508
-Node: Finding Extensions1005317
-Node: Extension Example1005877
-Node: Internal File Description1006649
-Node: Internal File Ops1010716
-Ref: Internal File Ops-Footnote-11022386
-Node: Using Internal File Ops1022526
-Ref: Using Internal File Ops-Footnote-11024909
-Node: Extension Samples1025182
-Node: Extension Sample File Functions1026708
-Node: Extension Sample Fnmatch1034346
-Node: Extension Sample Fork1035837
-Node: Extension Sample Inplace1037052
-Node: Extension Sample Ord1038727
-Node: Extension Sample Readdir1039563
-Ref: table-readdir-file-types1040439
-Node: Extension Sample Revout1041250
-Node: Extension Sample Rev2way1041840
-Node: Extension Sample Read write array1042580
-Node: Extension Sample Readfile1044520
-Node: Extension Sample Time1045615
-Node: Extension Sample API Tests1046964
-Node: gawkextlib1047455
-Node: Extension summary1050113
-Node: Extension Exercises1053802
-Node: Language History1054524
-Node: V7/SVR3.11056180
-Node: SVR41058361
-Node: POSIX1059806
-Node: BTL1061195
-Node: POSIX/GNU1061929
-Node: Feature History1067553
-Node: Common Extensions1080651
-Node: Ranges and Locales1081975
-Ref: Ranges and Locales-Footnote-11086593
-Ref: Ranges and Locales-Footnote-21086620
-Ref: Ranges and Locales-Footnote-31086854
-Node: Contributors1087075
-Node: History summary1092616
-Node: Installation1093986
-Node: Gawk Distribution1094932
-Node: Getting1095416
-Node: Extracting1096239
-Node: Distribution contents1097874
-Node: Unix Installation1103939
-Node: Quick Installation1104622
-Node: Shell Startup Files1107033
-Node: Additional Configuration Options1108112
-Node: Configuration Philosophy1109851
-Node: Non-Unix Installation1112220
-Node: PC Installation1112678
-Node: PC Binary Installation1113997
-Node: PC Compiling1115845
-Ref: PC Compiling-Footnote-11118866
-Node: PC Testing1118975
-Node: PC Using1120151
-Node: Cygwin1124266
-Node: MSYS1125089
-Node: VMS Installation1125589
-Node: VMS Compilation1126381
-Ref: VMS Compilation-Footnote-11127603
-Node: VMS Dynamic Extensions1127661
-Node: VMS Installation Details1129345
-Node: VMS Running1131597
-Node: VMS GNV1134433
-Node: VMS Old Gawk1135167
-Node: Bugs1135637
-Node: Other Versions1139520
-Node: Installation summary1145948
-Node: Notes1147004
-Node: Compatibility Mode1147869
-Node: Additions1148651
-Node: Accessing The Source1149576
-Node: Adding Code1151012
-Node: New Ports1157177
-Node: Derived Files1161659
-Ref: Derived Files-Footnote-11167134
-Ref: Derived Files-Footnote-21167168
-Ref: Derived Files-Footnote-31167764
-Node: Future Extensions1167878
-Node: Implementation Limitations1168484
-Node: Extension Design1169732
-Node: Old Extension Problems1170886
-Ref: Old Extension Problems-Footnote-11172403
-Node: Extension New Mechanism Goals1172460
-Ref: Extension New Mechanism Goals-Footnote-11175820
-Node: Extension Other Design Decisions1176009
-Node: Extension Future Growth1178117
-Node: Old Extension Mechanism1178953
-Node: Notes summary1180715
-Node: Basic Concepts1181901
-Node: Basic High Level1182582
-Ref: figure-general-flow1182854
-Ref: figure-process-flow1183453
-Ref: Basic High Level-Footnote-11186682
-Node: Basic Data Typing1186867
-Node: Glossary1190195
-Node: Copying1215353
-Node: GNU Free Documentation License1252909
-Node: Index1278045
+Node: Foreword446669
+Node: Preface48200
+Ref: Preface-Footnote-151071
+Ref: Preface-Footnote-251178
+Ref: Preface-Footnote-351411
+Node: History51553
+Node: Names53904
+Ref: Names-Footnote-154997
+Node: This Manual55143
+Ref: This Manual-Footnote-161643
+Node: Conventions61743
+Node: Manual History64080
+Ref: Manual History-Footnote-167073
+Ref: Manual History-Footnote-267114
+Node: How To Contribute67188
+Node: Acknowledgments68317
+Node: Getting Started73134
+Node: Running gawk75573
+Node: One-shot76763
+Node: Read Terminal78027
+Node: Long80058
+Node: Executable Scripts81571
+Ref: Executable Scripts-Footnote-184360
+Node: Comments84463
+Node: Quoting86945
+Node: DOS Quoting92463
+Node: Sample Data Files93138
+Node: Very Simple95733
+Node: Two Rules100632
+Node: More Complex102518
+Node: Statements/Lines105380
+Ref: Statements/Lines-Footnote-1109835
+Node: Other Features110100
+Node: When111031
+Ref: When-Footnote-1112785
+Node: Intro Summary112850
+Node: Invoking Gawk113733
+Node: Command Line115247
+Node: Options116045
+Ref: Options-Footnote-1131849
+Ref: Options-Footnote-2132078
+Node: Other Arguments132103
+Node: Naming Standard Input135051
+Node: Environment Variables136144
+Node: AWKPATH Variable136702
+Ref: AWKPATH Variable-Footnote-1140115
+Ref: AWKPATH Variable-Footnote-2140160
+Node: AWKLIBPATH Variable140420
+Node: Other Environment Variables141676
+Node: Exit Status145164
+Node: Include Files145840
+Node: Loading Shared Libraries149437
+Node: Obsolete150864
+Node: Undocumented151561
+Node: Invoking Summary151828
+Node: Regexp153492
+Node: Regexp Usage154946
+Node: Escape Sequences156983
+Node: Regexp Operators163224
+Ref: Regexp Operators-Footnote-1170650
+Ref: Regexp Operators-Footnote-2170797
+Node: Bracket Expressions170895
+Ref: table-char-classes172910
+Node: Leftmost Longest175834
+Node: Computed Regexps177136
+Node: GNU Regexp Operators180533
+Node: Case-sensitivity184206
+Ref: Case-sensitivity-Footnote-1187091
+Ref: Case-sensitivity-Footnote-2187326
+Node: Regexp Summary187434
+Node: Reading Files188901
+Node: Records190995
+Node: awk split records191728
+Node: gawk split records196643
+Ref: gawk split records-Footnote-1201187
+Node: Fields201224
+Ref: Fields-Footnote-1204000
+Node: Nonconstant Fields204086
+Ref: Nonconstant Fields-Footnote-1206329
+Node: Changing Fields206533
+Node: Field Separators212462
+Node: Default Field Splitting215167
+Node: Regexp Field Splitting216284
+Node: Single Character Fields219634
+Node: Command Line Field Separator220693
+Node: Full Line Fields223905
+Ref: Full Line Fields-Footnote-1225422
+Ref: Full Line Fields-Footnote-2225468
+Node: Field Splitting Summary225569
+Node: Constant Size227643
+Node: Splitting By Content232232
+Ref: Splitting By Content-Footnote-1236226
+Node: Multiple Line236389
+Ref: Multiple Line-Footnote-1242275
+Node: Getline242454
+Node: Plain Getline244666
+Node: Getline/Variable247306
+Node: Getline/File248454
+Node: Getline/Variable/File249838
+Ref: Getline/Variable/File-Footnote-1251441
+Node: Getline/Pipe251528
+Node: Getline/Variable/Pipe254211
+Node: Getline/Coprocess255342
+Node: Getline/Variable/Coprocess256594
+Node: Getline Notes257333
+Node: Getline Summary260125
+Ref: table-getline-variants260537
+Node: Read Timeout261366
+Ref: Read Timeout-Footnote-1265190
+Node: Command-line directories265248
+Node: Input Summary266153
+Node: Input Exercises269454
+Node: Printing270182
+Node: Print272019
+Node: Print Examples273476
+Node: Output Separators276255
+Node: OFMT278273
+Node: Printf279627
+Node: Basic Printf280412
+Node: Control Letters281982
+Node: Format Modifiers285965
+Node: Printf Examples291974
+Node: Redirection294460
+Node: Special FD301301
+Ref: Special FD-Footnote-1304461
+Node: Special Files304535
+Node: Other Inherited Files305152
+Node: Special Network306152
+Node: Special Caveats307014
+Node: Close Files And Pipes307965
+Ref: Close Files And Pipes-Footnote-1315152
+Ref: Close Files And Pipes-Footnote-2315300
+Node: Print Return Values315450
+Node: Output Summary316004
+Node: Output Exercises317000
+Node: Expressions317680
+Node: Values318865
+Node: Constants319543
+Node: Scalar Constants320234
+Ref: Scalar Constants-Footnote-1321093
+Node: Nondecimal-numbers321343
+Node: Regexp Constants324361
+Node: Using Constant Regexps324886
+Node: Variables328029
+Node: Using Variables328684
+Node: Assignment Options330595
+Node: Conversion332470
+Node: Strings And Numbers332994
+Ref: Strings And Numbers-Footnote-1336059
+Node: Locale influences conversions336168
+Ref: table-locale-affects338915
+Node: All Operators339503
+Node: Arithmetic Ops340133
+Node: Concatenation342638
+Ref: Concatenation-Footnote-1345457
+Node: Assignment Ops345563
+Ref: table-assign-ops350542
+Node: Increment Ops351814
+Node: Truth Values and Conditions355252
+Node: Truth Values356337
+Node: Typing and Comparison357386
+Node: Variable Typing358196
+Node: Comparison Operators361849
+Ref: table-relational-ops362259
+Node: POSIX String Comparison365754
+Ref: POSIX String Comparison-Footnote-1366826
+Node: Boolean Ops366964
+Ref: Boolean Ops-Footnote-1371443
+Node: Conditional Exp371534
+Node: Function Calls373261
+Node: Precedence377141
+Node: Locales380802
+Node: Expressions Summary382434
+Node: Patterns and Actions384994
+Node: Pattern Overview386114
+Node: Regexp Patterns387793
+Node: Expression Patterns388336
+Node: Ranges392046
+Node: BEGIN/END395152
+Node: Using BEGIN/END395913
+Ref: Using BEGIN/END-Footnote-1398647
+Node: I/O And BEGIN/END398753
+Node: BEGINFILE/ENDFILE401067
+Node: Empty403968
+Node: Using Shell Variables404285
+Node: Action Overview406558
+Node: Statements408884
+Node: If Statement410732
+Node: While Statement412227
+Node: Do Statement414256
+Node: For Statement415400
+Node: Switch Statement418557
+Node: Break Statement420939
+Node: Continue Statement422980
+Node: Next Statement424807
+Node: Nextfile Statement427188
+Node: Exit Statement429818
+Node: Built-in Variables432221
+Node: User-modified433354
+Ref: User-modified-Footnote-1441035
+Node: Auto-set441097
+Ref: Auto-set-Footnote-1454789
+Ref: Auto-set-Footnote-2454994
+Node: ARGC and ARGV455050
+Node: Pattern Action Summary459268
+Node: Arrays461695
+Node: Array Basics463024
+Node: Array Intro463868
+Ref: figure-array-elements465832
+Ref: Array Intro-Footnote-1468358
+Node: Reference to Elements468486
+Node: Assigning Elements470938
+Node: Array Example471429
+Node: Scanning an Array473187
+Node: Controlling Scanning476203
+Ref: Controlling Scanning-Footnote-1481399
+Node: Numeric Array Subscripts481715
+Node: Uninitialized Subscripts483900
+Node: Delete485517
+Ref: Delete-Footnote-1488260
+Node: Multidimensional488317
+Node: Multiscanning491414
+Node: Arrays of Arrays493003
+Node: Arrays Summary497762
+Node: Functions499854
+Node: Built-in500753
+Node: Calling Built-in501831
+Node: Numeric Functions503822
+Ref: Numeric Functions-Footnote-1508641
+Ref: Numeric Functions-Footnote-2508998
+Ref: Numeric Functions-Footnote-3509046
+Node: String Functions509318
+Ref: String Functions-Footnote-1532793
+Ref: String Functions-Footnote-2532922
+Ref: String Functions-Footnote-3533170
+Node: Gory Details533257
+Ref: table-sub-escapes535038
+Ref: table-sub-proposed536558
+Ref: table-posix-sub537922
+Ref: table-gensub-escapes539458
+Ref: Gory Details-Footnote-1540290
+Node: I/O Functions540441
+Ref: I/O Functions-Footnote-1547659
+Node: Time Functions547806
+Ref: Time Functions-Footnote-1558294
+Ref: Time Functions-Footnote-2558362
+Ref: Time Functions-Footnote-3558520
+Ref: Time Functions-Footnote-4558631
+Ref: Time Functions-Footnote-5558743
+Ref: Time Functions-Footnote-6558970
+Node: Bitwise Functions559236
+Ref: table-bitwise-ops559798
+Ref: Bitwise Functions-Footnote-1564107
+Node: Type Functions564276
+Node: I18N Functions565427
+Node: User-defined567072
+Node: Definition Syntax567877
+Ref: Definition Syntax-Footnote-1573284
+Node: Function Example573355
+Ref: Function Example-Footnote-1576274
+Node: Function Caveats576296
+Node: Calling A Function576814
+Node: Variable Scope577772
+Node: Pass By Value/Reference580760
+Node: Return Statement584255
+Node: Dynamic Typing587236
+Node: Indirect Calls588165
+Ref: Indirect Calls-Footnote-1599467
+Node: Functions Summary599595
+Node: Library Functions602297
+Ref: Library Functions-Footnote-1605906
+Ref: Library Functions-Footnote-2606049
+Node: Library Names606220
+Ref: Library Names-Footnote-1609674
+Ref: Library Names-Footnote-2609897
+Node: General Functions609983
+Node: Strtonum Function611086
+Node: Assert Function614108
+Node: Round Function617432
+Node: Cliff Random Function618973
+Node: Ordinal Functions619989
+Ref: Ordinal Functions-Footnote-1623052
+Ref: Ordinal Functions-Footnote-2623304
+Node: Join Function623515
+Ref: Join Function-Footnote-1625284
+Node: Getlocaltime Function625484
+Node: Readfile Function629228
+Node: Shell Quoting631198
+Node: Data File Management632599
+Node: Filetrans Function633231
+Node: Rewind Function637287
+Node: File Checking638674
+Ref: File Checking-Footnote-1640006
+Node: Empty Files640207
+Node: Ignoring Assigns642186
+Node: Getopt Function643737
+Ref: Getopt Function-Footnote-1655199
+Node: Passwd Functions655399
+Ref: Passwd Functions-Footnote-1664236
+Node: Group Functions664324
+Ref: Group Functions-Footnote-1672218
+Node: Walking Arrays672431
+Node: Library Functions Summary674034
+Node: Library Exercises675435
+Node: Sample Programs676715
+Node: Running Examples677485
+Node: Clones678213
+Node: Cut Program679437
+Node: Egrep Program689156
+Ref: Egrep Program-Footnote-1696654
+Node: Id Program696764
+Node: Split Program700409
+Ref: Split Program-Footnote-1703857
+Node: Tee Program703985
+Node: Uniq Program706774
+Node: Wc Program714193
+Ref: Wc Program-Footnote-1718443
+Node: Miscellaneous Programs718537
+Node: Dupword Program719750
+Node: Alarm Program721781
+Node: Translate Program726585
+Ref: Translate Program-Footnote-1731150
+Node: Labels Program731420
+Ref: Labels Program-Footnote-1734771
+Node: Word Sorting734855
+Node: History Sorting738926
+Node: Extract Program740762
+Node: Simple Sed748287
+Node: Igawk Program751355
+Ref: Igawk Program-Footnote-1765679
+Ref: Igawk Program-Footnote-2765880
+Ref: Igawk Program-Footnote-3766002
+Node: Anagram Program766117
+Node: Signature Program769174
+Node: Programs Summary770421
+Node: Programs Exercises771614
+Ref: Programs Exercises-Footnote-1775745
+Node: Advanced Features775836
+Node: Nondecimal Data777784
+Node: Array Sorting779374
+Node: Controlling Array Traversal780071
+Ref: Controlling Array Traversal-Footnote-1788404
+Node: Array Sorting Functions788522
+Ref: Array Sorting Functions-Footnote-1792411
+Node: Two-way I/O792607
+Ref: Two-way I/O-Footnote-1797552
+Ref: Two-way I/O-Footnote-2797738
+Node: TCP/IP Networking797820
+Node: Profiling800693
+Node: Advanced Features Summary808970
+Node: Internationalization810903
+Node: I18N and L10N812383
+Node: Explaining gettext813069
+Ref: Explaining gettext-Footnote-1818094
+Ref: Explaining gettext-Footnote-2818278
+Node: Programmer i18n818443
+Ref: Programmer i18n-Footnote-1823309
+Node: Translator i18n823358
+Node: String Extraction824152
+Ref: String Extraction-Footnote-1825283
+Node: Printf Ordering825369
+Ref: Printf Ordering-Footnote-1828155
+Node: I18N Portability828219
+Ref: I18N Portability-Footnote-1830674
+Node: I18N Example830737
+Ref: I18N Example-Footnote-1833540
+Node: Gawk I18N833612
+Node: I18N Summary834250
+Node: Debugger835589
+Node: Debugging836611
+Node: Debugging Concepts837052
+Node: Debugging Terms838905
+Node: Awk Debugging841477
+Node: Sample Debugging Session842371
+Node: Debugger Invocation842891
+Node: Finding The Bug844275
+Node: List of Debugger Commands850750
+Node: Breakpoint Control852083
+Node: Debugger Execution Control855779
+Node: Viewing And Changing Data859143
+Node: Execution Stack862521
+Node: Debugger Info864158
+Node: Miscellaneous Debugger Commands868175
+Node: Readline Support873204
+Node: Limitations874096
+Node: Debugging Summary876210
+Node: Arbitrary Precision Arithmetic877378
+Node: Computer Arithmetic878794
+Ref: table-numeric-ranges882392
+Ref: Computer Arithmetic-Footnote-1883251
+Node: Math Definitions883308
+Ref: table-ieee-formats886596
+Ref: Math Definitions-Footnote-1887200
+Node: MPFR features887305
+Node: FP Math Caution888976
+Ref: FP Math Caution-Footnote-1890026
+Node: Inexactness of computations890395
+Node: Inexact representation891354
+Node: Comparing FP Values892711
+Node: Errors accumulate893793
+Node: Getting Accuracy895226
+Node: Try To Round897888
+Node: Setting precision898787
+Ref: table-predefined-precision-strings899471
+Node: Setting the rounding mode901260
+Ref: table-gawk-rounding-modes901624
+Ref: Setting the rounding mode-Footnote-1905079
+Node: Arbitrary Precision Integers905258
+Ref: Arbitrary Precision Integers-Footnote-1910157
+Node: POSIX Floating Point Problems910306
+Ref: POSIX Floating Point Problems-Footnote-1914179
+Node: Floating point summary914217
+Node: Dynamic Extensions916411
+Node: Extension Intro917963
+Node: Plugin License919229
+Node: Extension Mechanism Outline920026
+Ref: figure-load-extension920454
+Ref: figure-register-new-function921934
+Ref: figure-call-new-function922938
+Node: Extension API Description924924
+Node: Extension API Functions Introduction926374
+Node: General Data Types931198
+Ref: General Data Types-Footnote-1936937
+Node: Memory Allocation Functions937236
+Ref: Memory Allocation Functions-Footnote-1940075
+Node: Constructor Functions940171
+Node: Registration Functions941905
+Node: Extension Functions942590
+Node: Exit Callback Functions944887
+Node: Extension Version String946135
+Node: Input Parsers946800
+Node: Output Wrappers956679
+Node: Two-way processors961194
+Node: Printing Messages963398
+Ref: Printing Messages-Footnote-1964474
+Node: Updating `ERRNO'964626
+Node: Requesting Values965366
+Ref: table-value-types-returned966094
+Node: Accessing Parameters967051
+Node: Symbol Table Access968282
+Node: Symbol table by name968796
+Node: Symbol table by cookie970777
+Ref: Symbol table by cookie-Footnote-1974921
+Node: Cached values974984
+Ref: Cached values-Footnote-1978483
+Node: Array Manipulation978574
+Ref: Array Manipulation-Footnote-1979672
+Node: Array Data Types979709
+Ref: Array Data Types-Footnote-1982364
+Node: Array Functions982456
+Node: Flattening Arrays986310
+Node: Creating Arrays993202
+Node: Extension API Variables997973
+Node: Extension Versioning998609
+Node: Extension API Informational Variables1000510
+Node: Extension API Boilerplate1001575
+Node: Finding Extensions1005384
+Node: Extension Example1005944
+Node: Internal File Description1006716
+Node: Internal File Ops1010783
+Ref: Internal File Ops-Footnote-11022453
+Node: Using Internal File Ops1022593
+Ref: Using Internal File Ops-Footnote-11024976
+Node: Extension Samples1025249
+Node: Extension Sample File Functions1026775
+Node: Extension Sample Fnmatch1034413
+Node: Extension Sample Fork1035904
+Node: Extension Sample Inplace1037119
+Node: Extension Sample Ord1038794
+Node: Extension Sample Readdir1039630
+Ref: table-readdir-file-types1040506
+Node: Extension Sample Revout1041317
+Node: Extension Sample Rev2way1041907
+Node: Extension Sample Read write array1042647
+Node: Extension Sample Readfile1044587
+Node: Extension Sample Time1045682
+Node: Extension Sample API Tests1047031
+Node: gawkextlib1047522
+Node: Extension summary1050180
+Node: Extension Exercises1053869
+Node: Language History1054591
+Node: V7/SVR3.11056247
+Node: SVR41058428
+Node: POSIX1059873
+Node: BTL1061262
+Node: POSIX/GNU1061996
+Node: Feature History1067620
+Node: Common Extensions1080718
+Node: Ranges and Locales1082042
+Ref: Ranges and Locales-Footnote-11086660
+Ref: Ranges and Locales-Footnote-21086687
+Ref: Ranges and Locales-Footnote-31086921
+Node: Contributors1087142
+Node: History summary1092683
+Node: Installation1094053
+Node: Gawk Distribution1094999
+Node: Getting1095483
+Node: Extracting1096306
+Node: Distribution contents1097941
+Node: Unix Installation1104006
+Node: Quick Installation1104689
+Node: Shell Startup Files1107100
+Node: Additional Configuration Options1108179
+Node: Configuration Philosophy1109918
+Node: Non-Unix Installation1112287
+Node: PC Installation1112745
+Node: PC Binary Installation1114064
+Node: PC Compiling1115912
+Ref: PC Compiling-Footnote-11118933
+Node: PC Testing1119042
+Node: PC Using1120218
+Node: Cygwin1124333
+Node: MSYS1125156
+Node: VMS Installation1125656
+Node: VMS Compilation1126448
+Ref: VMS Compilation-Footnote-11127670
+Node: VMS Dynamic Extensions1127728
+Node: VMS Installation Details1129412
+Node: VMS Running1131664
+Node: VMS GNV1134500
+Node: VMS Old Gawk1135234
+Node: Bugs1135704
+Node: Other Versions1139587
+Node: Installation summary1146015
+Node: Notes1147071
+Node: Compatibility Mode1147936
+Node: Additions1148718
+Node: Accessing The Source1149643
+Node: Adding Code1151079
+Node: New Ports1157244
+Node: Derived Files1161726
+Ref: Derived Files-Footnote-11167201
+Ref: Derived Files-Footnote-21167235
+Ref: Derived Files-Footnote-31167831
+Node: Future Extensions1167945
+Node: Implementation Limitations1168551
+Node: Extension Design1169799
+Node: Old Extension Problems1170953
+Ref: Old Extension Problems-Footnote-11172470
+Node: Extension New Mechanism Goals1172527
+Ref: Extension New Mechanism Goals-Footnote-11175887
+Node: Extension Other Design Decisions1176076
+Node: Extension Future Growth1178184
+Node: Old Extension Mechanism1179020
+Node: Notes summary1180782
+Node: Basic Concepts1181968
+Node: Basic High Level1182649
+Ref: figure-general-flow1182921
+Ref: figure-process-flow1183520
+Ref: Basic High Level-Footnote-11186749
+Node: Basic Data Typing1186934
+Node: Glossary1190262
+Node: Copying1215420
+Node: GNU Free Documentation License1252976
+Node: Index1278112

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index f1daed34..509d3ca3 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -56,7 +56,7 @@
@set PATCHLEVEL 2
@ifset FOR_PRINT
-@set TITLE Effective Awk Programming
+@set TITLE Effective awk Programming
@end ifset
@ifclear FOR_PRINT
@set TITLE GAWK: Effective AWK Programming
@@ -207,7 +207,7 @@
@set FFN Filename
@set DF datafile
@set DDF Datafile
-@set PVERSION Version
+@set PVERSION version
@end ifset
@c For HTML, spell out email addresses, to avoid problems with
@@ -304,7 +304,7 @@ All Rights Reserved.</literallayout>
@end docbook
@ifnotdocbook
-Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2014 @*
+Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2015 @*
Free Software Foundation, Inc.
@end ifnotdocbook
@sp 2
@@ -1170,7 +1170,7 @@ interface to network protocols via special @file{/inet} files.
The programs in this book make clear that an AWK program is
typically much smaller and faster to develop than
a counterpart written in C.
-Consequently, there is often a payoff to prototype an
+Consequently, there is often a payoff to prototyping an
algorithm or design in AWK to get it running quickly and expose
problems early. Often, the interpreted performance is adequate
and the AWK prototype becomes the product.
@@ -1247,15 +1247,15 @@ March 2001
Some things don't change. Thirteen years ago I wrote:
``If you use AWK or want to learn how, then read this book.''
-True then and still true today.
+True then, and still true today.
-Learning to use a programming language is more than mastering the
+Learning to use a programming language is about more than mastering the
syntax. One needs to acquire an understanding of how to use the
features of the language to solve practical programming problems.
A focus of this book is many examples that show how to use AWK.
Some things do change. Our computers are much faster and have more memory.
-Consequently, speed and storage inefficiencies of a high level language
+Consequently, speed and storage inefficiencies of a high-level language
matter less. Prototyping in AWK and then rewriting in C for performance
reasons happens less, because more often the prototype is fast enough.
@@ -1263,12 +1263,12 @@ Of course, there are computing operations that are best done in C or C++.
With @command{gawk} 4.1 and later, you do not have to choose between writing
your program in AWK or in C/C++. You can write most of your
program in AWK and the aspects that require C/C++ capabilities can be written
-in C/C++ and then the pieces glued together when the @command{gawk} module loads
+in C/C++, and then the pieces glued together when the @command{gawk} module loads
the C/C++ module as a dynamic plug-in.
@c Chapter 16
@ref{Dynamic Extensions},
has all the
-details, and as expected, many examples to help you learn the ins and outs.
+details, and, as expected, many examples to help you learn the ins and outs.
I enjoy programming in AWK and had fun (re)reading this book.
I think you will too.
@@ -1343,7 +1343,7 @@ Generate reports
Validate data
@item
-Produce indexes and perform other document preparation tasks
+Produce indexes and perform other document-preparation tasks
@item
Experiment with algorithms that you can adapt later to other computer
@@ -1490,7 +1490,7 @@ help from me, thoroughly reworked @command{gawk} for compatibility
with the newer @command{awk}.
Circa 1994, I became the primary maintainer.
Current development focuses on bug fixes,
-performance improvements, standards compliance and, occasionally, new features.
+performance improvements, standards compliance, and, occasionally, new features.
In May 1997, J@"urgen Kahrs felt the need for network access
from @command{awk}, and with a little help from me, set about adding
@@ -1503,10 +1503,10 @@ with @command{gawk} @value{PVERSION} 3.1.
John Haque rewrote the @command{gawk} internals, in the process providing
an @command{awk}-level debugger. This version became available as
-@command{gawk} @value{PVERSION} 4.0, in 2011.
+@command{gawk} @value{PVERSION} 4.0 in 2011.
@DBXREF{Contributors}
-for a full list of those who made important contributions to @command{gawk}.
+for a full list of those who have made important contributions to @command{gawk}.
@node Names
@unnumberedsec A Rose by Any Other Name
@@ -1519,7 +1519,7 @@ is often referred to as ``new @command{awk}.''
By analogy, the original version of @command{awk} is
referred to as ``old @command{awk}.''
-Today, on most systems, when you run the @command{awk} utility,
+Today, on most systems, when you run the @command{awk} utility
you get some version of new @command{awk}.@footnote{Only
Solaris systems still use an old @command{awk} for the
default @command{awk} utility. A more modern @command{awk} lives in
@@ -1579,7 +1579,9 @@ the POSIX standard for @command{awk}.
This @value{DOCUMENT} has the difficult task of being both a tutorial and a reference.
If you are a novice, feel free to skip over details that seem too complex.
You should also ignore the many cross-references; they are for the
-expert user and for the online Info and HTML versions of the @value{DOCUMENT}.
+expert user and for the Info and
+@uref{http://www.gnu.org/software/gawk/manual/, HTML}
+versions of the @value{DOCUMENT}.
@end ifnotinfo
There are sidebars
@@ -1612,7 +1614,7 @@ This @value{DOCUMENT} is split into several parts, as follows:
@itemize @value{BULLET}
@item
-Part I describes the @command{awk} language and @command{gawk} program in detail.
+Part I describes the @command{awk} language and the @command{gawk} program in detail.
It starts with the basics, and continues through all of the features of @command{awk}.
It contains the following chapters:
@@ -1659,10 +1661,10 @@ doing something when a record is matched, and the predefined variables
@item
@ref{Arrays},
-covers @command{awk}'s one-and-only data structure: associative arrays.
-Deleting array elements and whole arrays is also described, as well as
-sorting arrays in @command{gawk}. It also describes how @command{gawk}
-provides arrays of arrays.
+covers @command{awk}'s one-and-only data structure: the associative array.
+Deleting array elements and whole arrays is described, as well as
+sorting arrays in @command{gawk}. The @value{CHAPTER} also describes how
+@command{gawk} provides arrays of arrays.
@item
@ref{Functions},
@@ -1674,17 +1676,17 @@ as well as how to define your own functions. It also discusses how
@item
Part II shows how to use @command{awk} and @command{gawk} for problem solving.
There is lots of code here for you to read and learn from.
-It contains the following chapters:
+This part contains the following chapters:
@c nested
@itemize @value{MINUS}
@item
-@ref{Library Functions}, which provides a number of functions meant to
+@ref{Library Functions}, provides a number of functions meant to
be used from main @command{awk} programs.
@item
@ref{Sample Programs},
-which provides many sample @command{awk} programs.
+provides many sample @command{awk} programs.
@end itemize
Reading these two chapters allows you to see @command{awk}
@@ -1737,7 +1739,7 @@ including the GNU General Public License:
@item
@ref{Language History},
describes how the @command{awk} language has evolved since
-its first release to present. It also describes how @command{gawk}
+its first release to the present. It also describes how @command{gawk}
has acquired features over time.
@item
@@ -1780,7 +1782,7 @@ are completely unfamiliar with computer programming.
@item
@uref{http://www.gnu.org/software/gawk/manual/html_node/Glossary.html,
The Glossary}
-defines most, if not all of, the significant terms used
+defines most, if not all, of the significant terms used
throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with,
try looking them up here.
@@ -1807,7 +1809,7 @@ and some possible future directions for @command{gawk} development.
provides some very cursory background material for those who
are completely unfamiliar with computer programming.
-The @ref{Glossary}, defines most, if not all of, the significant terms used
+The @ref{Glossary}, defines most, if not all, of the significant terms used
throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with,
try looking them up here.
@@ -1850,7 +1852,7 @@ This typically represents the command's standard output.
Output from the command, usually its standard output, appears
@code{like this}.
@end ifset
-Error messages, and other output on the command's standard error, are preceded
+Error messages and other output on the command's standard error are preceded
by the glyph ``@error{}''. For example:
@example
@@ -1877,7 +1879,7 @@ there are special characters called ``control characters.'' These are
characters that you type by holding down both the @kbd{CONTROL} key and
another key, at the same time. For example, a @kbd{Ctrl-d} is typed
by first pressing and holding the @kbd{CONTROL} key, next
-pressing the @kbd{d} key and finally releasing both keys.
+pressing the @kbd{d} key, and finally releasing both keys.
For the sake of brevity, throughout this @value{DOCUMENT}, we refer to
Brian Kernighan's version of @command{awk} as ``BWK @command{awk}.''
@@ -1913,7 +1915,7 @@ the picture of a flashlight in the margin, as shown here.
@value{DARKCORNER}
@end iftex
@ifnottex
-``(d.c.)''.
+``(d.c.).''
@end ifnottex
@ifclear FOR_PRINT
They also appear in the index under the heading ``dark corner.''
@@ -1948,12 +1950,12 @@ Emacs editor. GNU Emacs is the most widely used version of Emacs today.
@cindex GPL (General Public License)
@cindex General Public License, See GPL
@cindex documentation, online
-The GNU@footnote{GNU stands for ``GNU's not Unix.''}
+The GNU@footnote{GNU stands for ``GNU's Not Unix.''}
Project is an ongoing effort on the part of the Free Software
Foundation to create a complete, freely distributable, POSIX-compliant
computing environment.
-The FSF uses the ``GNU General Public License'' (GPL) to ensure that
-their software's
+The FSF uses the GNU General Public License (GPL) to ensure that
+its software's
source code is always available to the end user.
@ifclear FOR_PRINT
A copy of the GPL is included
@@ -2013,7 +2015,7 @@ version of @command{awk}.
I started working with that version in the fall of 1988.
As work on it progressed,
the FSF published several preliminary versions (numbered 0.@var{x}).
-In 1996, Edition 1.0 was released with @command{gawk} 3.0.0.
+In 1996, edition 1.0 was released with @command{gawk} 3.0.0.
The FSF published the first two editions under
the title @cite{The GNU Awk User's Guide}.
@ifset FOR_PRINT
@@ -2025,7 +2027,7 @@ the third edition in 2001.
This edition maintains the basic structure of the previous editions.
For FSF edition 4.0, the content was thoroughly reviewed and updated. All
references to @command{gawk} versions prior to 4.0 were removed.
-Of significant note for that edition was @ref{Debugger}.
+Of significant note for that edition was the addition of @ref{Debugger}.
For FSF edition
@ifclear FOR_PRINT
@@ -2040,7 +2042,7 @@ and the major new additions are @ref{Arbitrary Precision Arithmetic},
and @ref{Dynamic Extensions}.
This @value{DOCUMENT} will undoubtedly continue to evolve. If you
-find an error in this @value{DOCUMENT}, please report it! @DBXREF{Bugs}
+find an error in the @value{DOCUMENT}, please report it! @DBXREF{Bugs}
for information on submitting problem reports electronically.
@ifset FOR_PRINT
@@ -2050,7 +2052,7 @@ for information on submitting problem reports electronically.
You may have a newer version of @command{gawk} than the
one described here. To find out what has changed,
you should first look at the @file{NEWS} file in the @command{gawk}
-distribution, which provides a high-level summary of what changed in
+distribution, which provides a high-level summary of the changes in
each release.
You can then look at the @uref{http://www.gnu.org/software/gawk/manual/,
@@ -2104,7 +2106,7 @@ The initial draft of @cite{The GAWK Manual} had the following acknowledgments:
Many people need to be thanked for their assistance in producing this
manual. Jay Fenlason contributed many ideas and sample programs. Richard
Mlynarik and Robert Chassell gave helpful comments on drafts of this
-manual. The paper @cite{A Supplemental Document for @command{awk}} by John W.@:
+manual. The paper @cite{A Supplemental Document for AWK} by John W.@:
Pierce of the Chemistry Department at UC San Diego, pinpointed several
issues relevant both to @command{awk} implementation and to this manual, that
would otherwise have escaped us.
@@ -2115,12 +2117,18 @@ I would like to acknowledge Richard M.@: Stallman, for his vision of a
better world and for his courage in founding the FSF and starting the
GNU Project.
+@ifclear FOR_PRINT
Earlier editions of this @value{DOCUMENT} had the following acknowledgements:
+@end ifclear
+@ifset FOR_PRINT
+The previous edition of this @value{DOCUMENT} had
+the following acknowledgements:
+@end ifset
@quotation
The following people (in alphabetical order)
provided helpful comments on various
-versions of this book,
+versions of this book:
Rick Adams,
Dr.@: Nelson H.F. Beebe,
Karl Berry,
@@ -2148,7 +2156,7 @@ Robert J.@: Chassell provided much valuable advice on
the use of Texinfo.
He also deserves special thanks for
convincing me @emph{not} to title this @value{DOCUMENT}
-@cite{How To Gawk Politely}.
+@cite{How to Gawk Politely}.
Karl Berry helped significantly with the @TeX{} part of Texinfo.
@cindex Hartholz, Marshall
@@ -2232,9 +2240,9 @@ a number of people. @DBXREF{Contributors} for the full list.
@ifset FOR_PRINT
@cindex Oram, Andy
-Thanks to Andy Oram, of O'Reilly Media, for initiating
+Thanks to Andy Oram of O'Reilly Media for initiating
the fourth edition and for his support during the work.
-Thanks to Jasmine Kwityn for her copy-editing work.
+Thanks to Jasmine Kwityn for her copyediting work.
@end ifset
Thanks to Michael Brennan for the Forewords.
@@ -2242,7 +2250,7 @@ Thanks to Michael Brennan for the Forewords.
@cindex Duman, Patrice
@cindex Berry, Karl
Thanks to Patrice Dumas for the new @command{makeinfo} program.
-Thanks to Karl Berry who continues to work to keep
+Thanks to Karl Berry, who continues to work to keep
the Texinfo markup language sane.
@cindex Kernighan, Brian
@@ -2252,8 +2260,8 @@ Robert P.J.@: Day, Michael Brennan, and Brian Kernighan kindly acted as
reviewers for the 2015 edition of this @value{DOCUMENT}. Their feedback
helped improve the final work.
-I would like to thank Brian Kernighan for invaluable assistance during the
-testing and debugging of @command{gawk}, and for ongoing
+I would also like to thank Brian Kernighan for his invaluable assistance during the
+testing and debugging of @command{gawk}, and for his ongoing
help and advice in clarifying numerous points about the language.
We could not have done nearly as good a job on either @command{gawk}
or its documentation without his help.
@@ -2364,9 +2372,9 @@ an advanced feature that we will ignore for now;
pattern to search for and one action to perform
upon finding the pattern.
-Syntactically, a rule consists of a pattern followed by an action. The
-action is enclosed in braces to separate it from the pattern.
-Newlines usually separate rules. Therefore, an @command{awk}
+Syntactically, a rule consists of a @dfn{pattern} followed by an
+@dfn{action}. The action is enclosed in braces to separate it from the
+pattern. Newlines usually separate rules. Therefore, an @command{awk}
program looks like this:
@example
@@ -2440,8 +2448,8 @@ awk '@var{program}' @var{input-file1} @var{input-file2} @dots{}
@end example
@noindent
-where @var{program} consists of a series of @var{patterns} and
-@var{actions}, as described earlier.
+where @var{program} consists of a series of patterns and
+actions, as described earlier.
@cindex single quote (@code{'})
@cindex @code{'} (single quote)
@@ -2460,12 +2468,12 @@ programs from shell scripts, because it avoids the need for a separate
file for the @command{awk} program. A self-contained shell script is more
reliable because there are no other files to misplace.
-Later in this chapter,
+Later in this chapter, in
@ifdocbook
the section
@end ifdocbook
@ref{Very Simple},
-presents several short,
+we'll see examples of several short,
self-contained programs.
@node Read Terminal
@@ -2486,10 +2494,10 @@ awk '@var{program}'
which usually means whatever you type on the keyboard. This continues
until you indicate end-of-file by typing @kbd{Ctrl-d}.
@ifset FOR_PRINT
-(On other operating systems, the end-of-file character may be different.)
+(On non-POSIX operating systems, the end-of-file character may be different.)
@end ifset
@ifclear FOR_PRINT
-(On other operating systems, the end-of-file character may be different.
+(On non-POSIX operating systems, the end-of-file character may be different.
For example, on OS/2, it is @kbd{Ctrl-z}.)
@end ifclear
@@ -2593,7 +2601,7 @@ text, instead of the magic @samp{\47}.)
@cindex single quote (@code{'}) in @command{gawk} command lines
@c STARTOFRANGE qs2x
@cindex @code{'} (single quote) in @command{gawk} command lines
-If you want to clearly identify your @command{awk} program files as such,
+If you want to clearly identify an @command{awk} program file as such,
you can add the extension @file{.awk} to the @value{FN}. This doesn't
affect the execution of the @command{awk} program but it does make
``housekeeping'' easier.
@@ -2807,7 +2815,7 @@ The next @value{SUBSECTION} describes the shell's quoting rules.
@end quotation
@node Quoting
-@subsection Shell-Quoting Issues
+@subsection Shell Quoting Issues
@cindex shell quoting, rules for
@menu
@@ -2944,7 +2952,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a single quote <'"'"'>" @}'}
@noindent
This program consists of three concatenated quoted strings. The first and the
-third are single quoted, the second is double quoted.
+third are single-quoted, and the second is double-quoted.
This can be ``simplified'' to:
@@ -2983,7 +2991,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a double quote <\42>" @}'}
@end example
@noindent
-This works nicely, except that you should comment clearly what the
+This works nicely, but you should comment clearly what the
escapes mean.
A fourth option is to use command-line variable assignment, like this:
@@ -2994,11 +3002,11 @@ $ @kbd{awk -v sq="'" 'BEGIN @{ print "Here is a single quote <" sq ">" @}'}
@end example
(Here, the two string constants and the value of @code{sq} are concatenated
-into a single string which is printed by @code{print}.)
+into a single string that is printed by @code{print}.)
If you really need both single and double quotes in your @command{awk}
program, it is probably best to move it into a separate file, where
-the shell won't be part of the picture, and you can say what you mean.
+the shell won't be part of the picture and you can say what you mean.
@node DOS Quoting
@subsubsection Quoting in MS-Windows Batch Files
@@ -3097,7 +3105,7 @@ of green crates shipped, the number of red boxes shipped, the number of
orange bags shipped, and the number of blue packages shipped,
respectively. There are 16 entries, covering the 12 months of last year
and the first four months of the current year.
-An empty line separates the data for the two years.
+An empty line separates the data for the two years:
@example
@c file eg/data/inventory-shipped
@@ -3131,7 +3139,7 @@ The following command runs a simple @command{awk} program that searches the
input file @file{mail-list} for the character string @samp{li} (a
grouping of characters is usually called a @dfn{string};
the term @dfn{string} is based on similar usage in English, such
-as ``a string of pearls,'' or ``a string of cars in a train''):
+as ``a string of pearls'' or ``a string of cars in a train''):
@example
awk '/li/ @{ print $0 @}' mail-list
@@ -3178,7 +3186,7 @@ omitting the @code{print} statement but retaining the braces makes an
empty action that does nothing (i.e., no lines are printed).
@cindex @command{awk} programs, one-line examples
-Many practical @command{awk} programs are just a line or two. Following is a
+Many practical @command{awk} programs are just a line or two long. Following is a
collection of useful, short programs to get you started. Some of these
programs contain constructs that haven't been covered yet. (The description
of the program will give you a good idea of what is going on, but you'll
@@ -3199,7 +3207,7 @@ Print every line that is longer than 80 characters:
awk 'length($0) > 80' data
@end example
-The sole rule has a relational expression as its pattern and it has no
+The sole rule has a relational expression as its pattern and has no
action---so it uses the default action, printing the record.
@item
@@ -3286,7 +3294,7 @@ Print the even-numbered lines in the @value{DF}:
awk 'NR % 2 == 0' data
@end example
-If you use the expression @samp{NR % 2 == 1} instead,
+If you used the expression @samp{NR % 2 == 1} instead,
the program would print the odd-numbered lines.
@end itemize
@@ -8748,7 +8756,7 @@ loop that reads input records and matches them against patterns,
like so:
@example
-$ @kbd{ gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}}
+$ @kbd{gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}}
> @kbd{@{ print "You entered: " $0 @}'}
@kbd{gawk}
@print{} You entered: gawk
diff --git a/doc/gawkinet.info b/doc/gawkinet.info
index 0a0d69d8..d726be0b 100644
--- a/doc/gawkinet.info
+++ b/doc/gawkinet.info
@@ -6,7 +6,7 @@ START-INFO-DIR-ENTRY
* Gawkinet: (gawkinet). TCP/IP Internetworking With `gawk'.
END-INFO-DIR-ENTRY
- This is Edition 1.3 of `TCP/IP Internetworking With `gawk'', for the
+ This is Edition 1.3 of `TCP/IP Internetworking with `gawk'', for the
4.0.0 (or later) version of the GNU implementation of AWK.
@@ -30,7 +30,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
This file documents the networking features in GNU `awk'.
- This is Edition 1.3 of `TCP/IP Internetworking With `gawk'', for the
+ This is Edition 1.3 of `TCP/IP Internetworking with `gawk'', for the
4.0.0 (or later) version of the GNU implementation of AWK.
@@ -61,7 +61,7 @@ General Introduction
This file documents the networking features in GNU Awk (`gawk') version
4.0 and later.
- This is Edition 1.3 of `TCP/IP Internetworking With `gawk'', for the
+ This is Edition 1.3 of `TCP/IP Internetworking with `gawk'', for the
4.0.0 (or later) version of the GNU implementation of AWK.
diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi
index 40198e1d..10223239 100644
--- a/doc/gawkinet.texi
+++ b/doc/gawkinet.texi
@@ -60,7 +60,7 @@
@c fit into that chapter, thus this separate document. At over 50
@c pages, I think this is the right decision. ADR.
-@set TITLE TCP/IP Internetworking With @command{gawk}
+@set TITLE TCP/IP Internetworking with @command{gawk}
@set EDITION 1.3
@set UPDATE-MONTH December, 2010
@c gawk versions:
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 9b69ad37..078094fc 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -51,7 +51,7 @@
@set PATCHLEVEL 2
@ifset FOR_PRINT
-@set TITLE Effective Awk Programming
+@set TITLE Effective awk Programming
@end ifset
@ifclear FOR_PRINT
@set TITLE GAWK: Effective AWK Programming
@@ -202,7 +202,7 @@
@set FFN Filename
@set DF datafile
@set DDF Datafile
-@set PVERSION Version
+@set PVERSION version
@end ifset
@c For HTML, spell out email addresses, to avoid problems with
@@ -299,7 +299,7 @@ All Rights Reserved.</literallayout>
@end docbook
@ifnotdocbook
-Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2014 @*
+Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2015 @*
Free Software Foundation, Inc.
@end ifnotdocbook
@sp 2
@@ -1165,7 +1165,7 @@ interface to network protocols via special @file{/inet} files.
The programs in this book make clear that an AWK program is
typically much smaller and faster to develop than
a counterpart written in C.
-Consequently, there is often a payoff to prototype an
+Consequently, there is often a payoff to prototyping an
algorithm or design in AWK to get it running quickly and expose
problems early. Often, the interpreted performance is adequate
and the AWK prototype becomes the product.
@@ -1242,15 +1242,15 @@ March 2001
Some things don't change. Thirteen years ago I wrote:
``If you use AWK or want to learn how, then read this book.''
-True then and still true today.
+True then, and still true today.
-Learning to use a programming language is more than mastering the
+Learning to use a programming language is about more than mastering the
syntax. One needs to acquire an understanding of how to use the
features of the language to solve practical programming problems.
A focus of this book is many examples that show how to use AWK.
Some things do change. Our computers are much faster and have more memory.
-Consequently, speed and storage inefficiencies of a high level language
+Consequently, speed and storage inefficiencies of a high-level language
matter less. Prototyping in AWK and then rewriting in C for performance
reasons happens less, because more often the prototype is fast enough.
@@ -1258,12 +1258,12 @@ Of course, there are computing operations that are best done in C or C++.
With @command{gawk} 4.1 and later, you do not have to choose between writing
your program in AWK or in C/C++. You can write most of your
program in AWK and the aspects that require C/C++ capabilities can be written
-in C/C++ and then the pieces glued together when the @command{gawk} module loads
+in C/C++, and then the pieces glued together when the @command{gawk} module loads
the C/C++ module as a dynamic plug-in.
@c Chapter 16
@ref{Dynamic Extensions},
has all the
-details, and as expected, many examples to help you learn the ins and outs.
+details, and, as expected, many examples to help you learn the ins and outs.
I enjoy programming in AWK and had fun (re)reading this book.
I think you will too.
@@ -1338,7 +1338,7 @@ Generate reports
Validate data
@item
-Produce indexes and perform other document preparation tasks
+Produce indexes and perform other document-preparation tasks
@item
Experiment with algorithms that you can adapt later to other computer
@@ -1457,7 +1457,7 @@ help from me, thoroughly reworked @command{gawk} for compatibility
with the newer @command{awk}.
Circa 1994, I became the primary maintainer.
Current development focuses on bug fixes,
-performance improvements, standards compliance and, occasionally, new features.
+performance improvements, standards compliance, and, occasionally, new features.
In May 1997, J@"urgen Kahrs felt the need for network access
from @command{awk}, and with a little help from me, set about adding
@@ -1470,10 +1470,10 @@ with @command{gawk} @value{PVERSION} 3.1.
John Haque rewrote the @command{gawk} internals, in the process providing
an @command{awk}-level debugger. This version became available as
-@command{gawk} @value{PVERSION} 4.0, in 2011.
+@command{gawk} @value{PVERSION} 4.0 in 2011.
@DBXREF{Contributors}
-for a full list of those who made important contributions to @command{gawk}.
+for a full list of those who have made important contributions to @command{gawk}.
@node Names
@unnumberedsec A Rose by Any Other Name
@@ -1486,7 +1486,7 @@ is often referred to as ``new @command{awk}.''
By analogy, the original version of @command{awk} is
referred to as ``old @command{awk}.''
-Today, on most systems, when you run the @command{awk} utility,
+Today, on most systems, when you run the @command{awk} utility
you get some version of new @command{awk}.@footnote{Only
Solaris systems still use an old @command{awk} for the
default @command{awk} utility. A more modern @command{awk} lives in
@@ -1546,7 +1546,9 @@ the POSIX standard for @command{awk}.
This @value{DOCUMENT} has the difficult task of being both a tutorial and a reference.
If you are a novice, feel free to skip over details that seem too complex.
You should also ignore the many cross-references; they are for the
-expert user and for the online Info and HTML versions of the @value{DOCUMENT}.
+expert user and for the Info and
+@uref{http://www.gnu.org/software/gawk/manual/, HTML}
+versions of the @value{DOCUMENT}.
@end ifnotinfo
There are sidebars
@@ -1579,7 +1581,7 @@ This @value{DOCUMENT} is split into several parts, as follows:
@itemize @value{BULLET}
@item
-Part I describes the @command{awk} language and @command{gawk} program in detail.
+Part I describes the @command{awk} language and the @command{gawk} program in detail.
It starts with the basics, and continues through all of the features of @command{awk}.
It contains the following chapters:
@@ -1626,10 +1628,10 @@ doing something when a record is matched, and the predefined variables
@item
@ref{Arrays},
-covers @command{awk}'s one-and-only data structure: associative arrays.
-Deleting array elements and whole arrays is also described, as well as
-sorting arrays in @command{gawk}. It also describes how @command{gawk}
-provides arrays of arrays.
+covers @command{awk}'s one-and-only data structure: the associative array.
+Deleting array elements and whole arrays is described, as well as
+sorting arrays in @command{gawk}. The @value{CHAPTER} also describes how
+@command{gawk} provides arrays of arrays.
@item
@ref{Functions},
@@ -1641,17 +1643,17 @@ as well as how to define your own functions. It also discusses how
@item
Part II shows how to use @command{awk} and @command{gawk} for problem solving.
There is lots of code here for you to read and learn from.
-It contains the following chapters:
+This part contains the following chapters:
@c nested
@itemize @value{MINUS}
@item
-@ref{Library Functions}, which provides a number of functions meant to
+@ref{Library Functions}, provides a number of functions meant to
be used from main @command{awk} programs.
@item
@ref{Sample Programs},
-which provides many sample @command{awk} programs.
+provides many sample @command{awk} programs.
@end itemize
Reading these two chapters allows you to see @command{awk}
@@ -1704,7 +1706,7 @@ including the GNU General Public License:
@item
@ref{Language History},
describes how the @command{awk} language has evolved since
-its first release to present. It also describes how @command{gawk}
+its first release to the present. It also describes how @command{gawk}
has acquired features over time.
@item
@@ -1747,7 +1749,7 @@ are completely unfamiliar with computer programming.
@item
@uref{http://www.gnu.org/software/gawk/manual/html_node/Glossary.html,
The Glossary}
-defines most, if not all of, the significant terms used
+defines most, if not all, of the significant terms used
throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with,
try looking them up here.
@@ -1774,7 +1776,7 @@ and some possible future directions for @command{gawk} development.
provides some very cursory background material for those who
are completely unfamiliar with computer programming.
-The @ref{Glossary}, defines most, if not all of, the significant terms used
+The @ref{Glossary}, defines most, if not all, of the significant terms used
throughout the @value{DOCUMENT}. If you find terms that you aren't familiar with,
try looking them up here.
@@ -1817,7 +1819,7 @@ This typically represents the command's standard output.
Output from the command, usually its standard output, appears
@code{like this}.
@end ifset
-Error messages, and other output on the command's standard error, are preceded
+Error messages and other output on the command's standard error are preceded
by the glyph ``@error{}''. For example:
@example
@@ -1844,7 +1846,7 @@ there are special characters called ``control characters.'' These are
characters that you type by holding down both the @kbd{CONTROL} key and
another key, at the same time. For example, a @kbd{Ctrl-d} is typed
by first pressing and holding the @kbd{CONTROL} key, next
-pressing the @kbd{d} key and finally releasing both keys.
+pressing the @kbd{d} key, and finally releasing both keys.
For the sake of brevity, throughout this @value{DOCUMENT}, we refer to
Brian Kernighan's version of @command{awk} as ``BWK @command{awk}.''
@@ -1880,7 +1882,7 @@ the picture of a flashlight in the margin, as shown here.
@value{DARKCORNER}
@end iftex
@ifnottex
-``(d.c.)''.
+``(d.c.).''
@end ifnottex
@ifclear FOR_PRINT
They also appear in the index under the heading ``dark corner.''
@@ -1915,12 +1917,12 @@ Emacs editor. GNU Emacs is the most widely used version of Emacs today.
@cindex GPL (General Public License)
@cindex General Public License, See GPL
@cindex documentation, online
-The GNU@footnote{GNU stands for ``GNU's not Unix.''}
+The GNU@footnote{GNU stands for ``GNU's Not Unix.''}
Project is an ongoing effort on the part of the Free Software
Foundation to create a complete, freely distributable, POSIX-compliant
computing environment.
-The FSF uses the ``GNU General Public License'' (GPL) to ensure that
-their software's
+The FSF uses the GNU General Public License (GPL) to ensure that
+its software's
source code is always available to the end user.
@ifclear FOR_PRINT
A copy of the GPL is included
@@ -1980,7 +1982,7 @@ version of @command{awk}.
I started working with that version in the fall of 1988.
As work on it progressed,
the FSF published several preliminary versions (numbered 0.@var{x}).
-In 1996, Edition 1.0 was released with @command{gawk} 3.0.0.
+In 1996, edition 1.0 was released with @command{gawk} 3.0.0.
The FSF published the first two editions under
the title @cite{The GNU Awk User's Guide}.
@ifset FOR_PRINT
@@ -1992,7 +1994,7 @@ the third edition in 2001.
This edition maintains the basic structure of the previous editions.
For FSF edition 4.0, the content was thoroughly reviewed and updated. All
references to @command{gawk} versions prior to 4.0 were removed.
-Of significant note for that edition was @ref{Debugger}.
+Of significant note for that edition was the addition of @ref{Debugger}.
For FSF edition
@ifclear FOR_PRINT
@@ -2007,7 +2009,7 @@ and the major new additions are @ref{Arbitrary Precision Arithmetic},
and @ref{Dynamic Extensions}.
This @value{DOCUMENT} will undoubtedly continue to evolve. If you
-find an error in this @value{DOCUMENT}, please report it! @DBXREF{Bugs}
+find an error in the @value{DOCUMENT}, please report it! @DBXREF{Bugs}
for information on submitting problem reports electronically.
@ifset FOR_PRINT
@@ -2017,7 +2019,7 @@ for information on submitting problem reports electronically.
You may have a newer version of @command{gawk} than the
one described here. To find out what has changed,
you should first look at the @file{NEWS} file in the @command{gawk}
-distribution, which provides a high-level summary of what changed in
+distribution, which provides a high-level summary of the changes in
each release.
You can then look at the @uref{http://www.gnu.org/software/gawk/manual/,
@@ -2071,7 +2073,7 @@ The initial draft of @cite{The GAWK Manual} had the following acknowledgments:
Many people need to be thanked for their assistance in producing this
manual. Jay Fenlason contributed many ideas and sample programs. Richard
Mlynarik and Robert Chassell gave helpful comments on drafts of this
-manual. The paper @cite{A Supplemental Document for @command{awk}} by John W.@:
+manual. The paper @cite{A Supplemental Document for AWK} by John W.@:
Pierce of the Chemistry Department at UC San Diego, pinpointed several
issues relevant both to @command{awk} implementation and to this manual, that
would otherwise have escaped us.
@@ -2082,12 +2084,18 @@ I would like to acknowledge Richard M.@: Stallman, for his vision of a
better world and for his courage in founding the FSF and starting the
GNU Project.
+@ifclear FOR_PRINT
Earlier editions of this @value{DOCUMENT} had the following acknowledgements:
+@end ifclear
+@ifset FOR_PRINT
+The previous edition of this @value{DOCUMENT} had
+the following acknowledgements:
+@end ifset
@quotation
The following people (in alphabetical order)
provided helpful comments on various
-versions of this book,
+versions of this book:
Rick Adams,
Dr.@: Nelson H.F. Beebe,
Karl Berry,
@@ -2115,7 +2123,7 @@ Robert J.@: Chassell provided much valuable advice on
the use of Texinfo.
He also deserves special thanks for
convincing me @emph{not} to title this @value{DOCUMENT}
-@cite{How To Gawk Politely}.
+@cite{How to Gawk Politely}.
Karl Berry helped significantly with the @TeX{} part of Texinfo.
@cindex Hartholz, Marshall
@@ -2199,9 +2207,9 @@ a number of people. @DBXREF{Contributors} for the full list.
@ifset FOR_PRINT
@cindex Oram, Andy
-Thanks to Andy Oram, of O'Reilly Media, for initiating
+Thanks to Andy Oram of O'Reilly Media for initiating
the fourth edition and for his support during the work.
-Thanks to Jasmine Kwityn for her copy-editing work.
+Thanks to Jasmine Kwityn for her copyediting work.
@end ifset
Thanks to Michael Brennan for the Forewords.
@@ -2209,7 +2217,7 @@ Thanks to Michael Brennan for the Forewords.
@cindex Duman, Patrice
@cindex Berry, Karl
Thanks to Patrice Dumas for the new @command{makeinfo} program.
-Thanks to Karl Berry who continues to work to keep
+Thanks to Karl Berry, who continues to work to keep
the Texinfo markup language sane.
@cindex Kernighan, Brian
@@ -2219,8 +2227,8 @@ Robert P.J.@: Day, Michael Brennan, and Brian Kernighan kindly acted as
reviewers for the 2015 edition of this @value{DOCUMENT}. Their feedback
helped improve the final work.
-I would like to thank Brian Kernighan for invaluable assistance during the
-testing and debugging of @command{gawk}, and for ongoing
+I would also like to thank Brian Kernighan for his invaluable assistance during the
+testing and debugging of @command{gawk}, and for his ongoing
help and advice in clarifying numerous points about the language.
We could not have done nearly as good a job on either @command{gawk}
or its documentation without his help.
@@ -2331,9 +2339,9 @@ an advanced feature that we will ignore for now;
pattern to search for and one action to perform
upon finding the pattern.
-Syntactically, a rule consists of a pattern followed by an action. The
-action is enclosed in braces to separate it from the pattern.
-Newlines usually separate rules. Therefore, an @command{awk}
+Syntactically, a rule consists of a @dfn{pattern} followed by an
+@dfn{action}. The action is enclosed in braces to separate it from the
+pattern. Newlines usually separate rules. Therefore, an @command{awk}
program looks like this:
@example
@@ -2407,8 +2415,8 @@ awk '@var{program}' @var{input-file1} @var{input-file2} @dots{}
@end example
@noindent
-where @var{program} consists of a series of @var{patterns} and
-@var{actions}, as described earlier.
+where @var{program} consists of a series of patterns and
+actions, as described earlier.
@cindex single quote (@code{'})
@cindex @code{'} (single quote)
@@ -2427,12 +2435,12 @@ programs from shell scripts, because it avoids the need for a separate
file for the @command{awk} program. A self-contained shell script is more
reliable because there are no other files to misplace.
-Later in this chapter,
+Later in this chapter, in
@ifdocbook
the section
@end ifdocbook
@ref{Very Simple},
-presents several short,
+we'll see examples of several short,
self-contained programs.
@node Read Terminal
@@ -2453,10 +2461,10 @@ awk '@var{program}'
which usually means whatever you type on the keyboard. This continues
until you indicate end-of-file by typing @kbd{Ctrl-d}.
@ifset FOR_PRINT
-(On other operating systems, the end-of-file character may be different.)
+(On non-POSIX operating systems, the end-of-file character may be different.)
@end ifset
@ifclear FOR_PRINT
-(On other operating systems, the end-of-file character may be different.
+(On non-POSIX operating systems, the end-of-file character may be different.
For example, on OS/2, it is @kbd{Ctrl-z}.)
@end ifclear
@@ -2560,7 +2568,7 @@ text, instead of the magic @samp{\47}.)
@cindex single quote (@code{'}) in @command{gawk} command lines
@c STARTOFRANGE qs2x
@cindex @code{'} (single quote) in @command{gawk} command lines
-If you want to clearly identify your @command{awk} program files as such,
+If you want to clearly identify an @command{awk} program file as such,
you can add the extension @file{.awk} to the @value{FN}. This doesn't
affect the execution of the @command{awk} program but it does make
``housekeeping'' easier.
@@ -2718,7 +2726,7 @@ The next @value{SUBSECTION} describes the shell's quoting rules.
@end quotation
@node Quoting
-@subsection Shell-Quoting Issues
+@subsection Shell Quoting Issues
@cindex shell quoting, rules for
@menu
@@ -2855,7 +2863,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a single quote <'"'"'>" @}'}
@noindent
This program consists of three concatenated quoted strings. The first and the
-third are single quoted, the second is double quoted.
+third are single-quoted, and the second is double-quoted.
This can be ``simplified'' to:
@@ -2894,7 +2902,7 @@ $ @kbd{awk 'BEGIN @{ print "Here is a double quote <\42>" @}'}
@end example
@noindent
-This works nicely, except that you should comment clearly what the
+This works nicely, but you should comment clearly what the
escapes mean.
A fourth option is to use command-line variable assignment, like this:
@@ -2905,11 +2913,11 @@ $ @kbd{awk -v sq="'" 'BEGIN @{ print "Here is a single quote <" sq ">" @}'}
@end example
(Here, the two string constants and the value of @code{sq} are concatenated
-into a single string which is printed by @code{print}.)
+into a single string that is printed by @code{print}.)
If you really need both single and double quotes in your @command{awk}
program, it is probably best to move it into a separate file, where
-the shell won't be part of the picture, and you can say what you mean.
+the shell won't be part of the picture and you can say what you mean.
@node DOS Quoting
@subsubsection Quoting in MS-Windows Batch Files
@@ -3008,7 +3016,7 @@ of green crates shipped, the number of red boxes shipped, the number of
orange bags shipped, and the number of blue packages shipped,
respectively. There are 16 entries, covering the 12 months of last year
and the first four months of the current year.
-An empty line separates the data for the two years.
+An empty line separates the data for the two years:
@example
@c file eg/data/inventory-shipped
@@ -3042,7 +3050,7 @@ The following command runs a simple @command{awk} program that searches the
input file @file{mail-list} for the character string @samp{li} (a
grouping of characters is usually called a @dfn{string};
the term @dfn{string} is based on similar usage in English, such
-as ``a string of pearls,'' or ``a string of cars in a train''):
+as ``a string of pearls'' or ``a string of cars in a train''):
@example
awk '/li/ @{ print $0 @}' mail-list
@@ -3089,7 +3097,7 @@ omitting the @code{print} statement but retaining the braces makes an
empty action that does nothing (i.e., no lines are printed).
@cindex @command{awk} programs, one-line examples
-Many practical @command{awk} programs are just a line or two. Following is a
+Many practical @command{awk} programs are just a line or two long. Following is a
collection of useful, short programs to get you started. Some of these
programs contain constructs that haven't been covered yet. (The description
of the program will give you a good idea of what is going on, but you'll
@@ -3110,7 +3118,7 @@ Print every line that is longer than 80 characters:
awk 'length($0) > 80' data
@end example
-The sole rule has a relational expression as its pattern and it has no
+The sole rule has a relational expression as its pattern and has no
action---so it uses the default action, printing the record.
@item
@@ -3197,7 +3205,7 @@ Print the even-numbered lines in the @value{DF}:
awk 'NR % 2 == 0' data
@end example
-If you use the expression @samp{NR % 2 == 1} instead,
+If you used the expression @samp{NR % 2 == 1} instead,
the program would print the odd-numbered lines.
@end itemize
@@ -8349,7 +8357,7 @@ loop that reads input records and matches them against patterns,
like so:
@example
-$ @kbd{ gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}}
+$ @kbd{gawk 'BEGIN @{ PROCINFO["-", "READ_TIMEOUT"] = 5000 @}}
> @kbd{@{ print "You entered: " $0 @}'}
@kbd{gawk}
@print{} You entered: gawk
diff --git a/gawkapi.c b/gawkapi.c
index 06f31929..fc6e159a 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -790,7 +790,6 @@ api_set_array_element(awk_ext_id_t id, awk_array_t a_cookie,
elem->parent_array = array;
elem->vname = estrdup(index->str_value.str,
index->str_value.len);
- make_aname(elem);
}
return awk_true;
diff --git a/getopt.c b/getopt.c
index 7bd42bb6..4de0b9a0 100644
--- a/getopt.c
+++ b/getopt.c
@@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
- Copyright (C) 1987-2014 Free Software Foundation, Inc.
+ Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -613,7 +613,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
fputc_unlocked ('\n', fp);
- if (__builtin_expect (fclose (fp) != EOF, 1))
+ if (__glibc_likely (fclose (fp) != EOF))
{
_IO_flockfile (stderr);
diff --git a/getopt.h b/getopt.h
index 4471bf54..75cd5e8d 100644
--- a/getopt.h
+++ b/getopt.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2014 Free Software Foundation, Inc.
+ Copyright (C) 1989-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/getopt1.c b/getopt1.c
index 32f2f6a6..b61041db 100644
--- a/getopt1.c
+++ b/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-2014 Free Software Foundation, Inc.
+ Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/getopt_int.h b/getopt_int.h
index d255c8ee..03d62277 100644
--- a/getopt_int.h
+++ b/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-2014 Free Software Foundation, Inc.
+ Copyright (C) 1989-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/main.c b/main.c
index 93f94998..f2bea917 100644
--- a/main.c
+++ b/main.c
@@ -794,10 +794,10 @@ init_vars()
(*(vp->assign))();
}
- /* Set up deferred variables (loaded only when accessed). */
+ /* Load PROCINFO and ENVIRON */
if (! do_traditional)
- register_deferred_variable("PROCINFO", load_procinfo);
- register_deferred_variable("ENVIRON", load_environ);
+ load_procinfo();
+ load_environ();
}
/* path_environ --- put path variable into environment if not already there */
diff --git a/symbol.c b/symbol.c
index e89214c0..23e04c03 100644
--- a/symbol.c
+++ b/symbol.c
@@ -565,7 +565,6 @@ load_symbols()
sym_array->parent_array = PROCINFO_node;
sym_array->vname = estrdup("identifiers", 11);
- make_aname(sym_array);
user = make_string("user", 4);
extension = make_string("extension", 9);
diff --git a/test/ChangeLog b/test/ChangeLog
index 3c0b0022..19105027 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,19 @@
+2015-01-19 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (profile8): Actually add the test and the files.
+ Thanks to Hermann Peifer for the report.
+
+2015-01-16 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (profile8): New test.
+ * profile8.awk, profile8.ok: New files.
+
+2015-01-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (dumpvars): Grep out ENVIRON and PROCINFO since
+ those can be different depending on who runs the test.
+ * dumpvars.ok, id.ok: Updated after code changes.
+
2015-01-07 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (regexpbrack): New test.
diff --git a/test/Makefile.am b/test/Makefile.am
index 11b7d000..8f501b56 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -715,6 +715,8 @@ EXTRA_DIST = \
profile6.ok \
profile7.awk \
profile7.ok \
+ profile8.awk \
+ profile8.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1034,7 +1036,8 @@ GAWK_EXT_TESTS = \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
- profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \
+ profile1 profile2 profile3 profile4 profile5 profile6 profile7 \
+ profile8 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
@@ -1681,7 +1684,7 @@ beginfile2:
dumpvars::
@echo $@
@AWKPATH="$(srcdir)" $(AWK) --dump-variables 1 < "$(srcdir)"/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@
- @mv awkvars.out _$@
+ @grep -v ENVIRON < awkvars.out | grep -v PROCINFO > _$@; rm awkvars.out
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
profile1:
@@ -1727,6 +1730,11 @@ profile7:
@sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+profile8:
+ @echo $@
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1
diff --git a/test/Makefile.in b/test/Makefile.in
index 902bfe63..d4097f3d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -962,6 +962,8 @@ EXTRA_DIST = \
profile6.ok \
profile7.awk \
profile7.ok \
+ profile8.awk \
+ profile8.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1280,7 +1282,8 @@ GAWK_EXT_TESTS = \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
- profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \
+ profile1 profile2 profile3 profile4 profile5 profile6 profile7 \
+ profile8 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
@@ -2107,7 +2110,7 @@ beginfile2:
dumpvars::
@echo $@
@AWKPATH="$(srcdir)" $(AWK) --dump-variables 1 < "$(srcdir)"/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@
- @mv awkvars.out _$@
+ @grep -v ENVIRON < awkvars.out | grep -v PROCINFO > _$@; rm awkvars.out
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
profile1:
@@ -2152,6 +2155,11 @@ profile7:
@sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+profile8:
+ @echo $@
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1
diff --git a/test/id.ok b/test/id.ok
index 4cb39b32..fb77f457 100644
--- a/test/id.ok
+++ b/test/id.ok
@@ -71,3 +71,4 @@ lshift -> builtin
SYMTAB -> array
strtonum -> builtin
toupper -> builtin
+ENVIRON -> array
diff --git a/test/profile8.awk b/test/profile8.awk
new file mode 100644
index 00000000..16252cea
--- /dev/null
+++ b/test/profile8.awk
@@ -0,0 +1,9 @@
+# Some
+# header
+# comments
+
+# Add up
+{ sum += $1 }
+
+# Print sum
+END { print sum }
diff --git a/test/profile8.ok b/test/profile8.ok
new file mode 100644
index 00000000..34f7a96b
--- /dev/null
+++ b/test/profile8.ok
@@ -0,0 +1,14 @@
+# Some
+# header
+# comments
+
+# Add up
+{
+ sum += $1
+}
+
+# Print sum
+END {
+ print sum
+}
+