aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-01-20 22:05:05 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-01-20 22:05:05 +0200
commit812d26bb6b672f3f5153c00e4edcb2377a723afd (patch)
tree3178af3ca22a20b07bd3ef9716d81df181f04761
parent128a3e884d9541ec5b96c02a19db38ac3c404bf1 (diff)
parent4c01db1833a02173c910d463eaed77ad6ed66195 (diff)
downloadegawk-812d26bb6b672f3f5153c00e4edcb2377a723afd.tar.gz
egawk-812d26bb6b672f3f5153c00e4edcb2377a723afd.tar.bz2
egawk-812d26bb6b672f3f5153c00e4edcb2377a723afd.zip
Merge branch 'master' into wasted-byte
-rw-r--r--ChangeLog37
-rw-r--r--NEWS3
-rw-r--r--TODO4
-rw-r--r--awk.h1
-rw-r--r--awkgram.c813
-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.info1283
-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, 1282 insertions, 1336 deletions
diff --git a/ChangeLog b/ChangeLog
index f33158db..e0626b92 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.
@@ -1797,7 +1832,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 41181529..74cc3c21 100644
--- a/awk.h
+++ b/awk.h
@@ -1329,7 +1329,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 35a2477e..00cc0eef 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)
@@ -119,8 +118,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);
@@ -133,7 +130,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[] = {
@@ -162,7 +158,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
@@ -206,7 +201,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#line 210 "awkgram.c" /* yacc.c:339 */
+#line 205 "awkgram.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -360,7 +355,7 @@ int yyparse (void);
/* Copy the second part of user declarations. */
-#line 364 "awkgram.c" /* yacc.c:358 */
+#line 359 "awkgram.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -662,25 +657,25 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 209, 209, 211, 216, 217, 223, 235, 239, 250,
- 256, 261, 269, 277, 279, 284, 293, 295, 301, 309,
- 319, 349, 363, 377, 385, 396, 408, 410, 412, 418,
- 423, 424, 428, 463, 462, 496, 498, 503, 509, 537,
- 542, 543, 547, 549, 551, 558, 648, 690, 732, 845,
- 852, 859, 869, 878, 887, 896, 907, 923, 922, 946,
- 958, 958, 1056, 1056, 1089, 1119, 1125, 1126, 1132, 1133,
- 1140, 1145, 1157, 1171, 1173, 1181, 1186, 1188, 1196, 1198,
- 1207, 1208, 1216, 1221, 1221, 1232, 1236, 1244, 1245, 1248,
- 1250, 1255, 1256, 1265, 1266, 1271, 1276, 1282, 1284, 1286,
- 1293, 1294, 1300, 1301, 1306, 1308, 1313, 1315, 1323, 1328,
- 1337, 1344, 1346, 1348, 1364, 1374, 1381, 1383, 1388, 1390,
- 1392, 1400, 1402, 1407, 1409, 1414, 1416, 1418, 1468, 1470,
- 1472, 1474, 1476, 1478, 1480, 1482, 1496, 1501, 1506, 1531,
- 1537, 1539, 1541, 1543, 1545, 1547, 1552, 1556, 1588, 1590,
- 1596, 1602, 1615, 1616, 1617, 1622, 1627, 1631, 1635, 1650,
- 1663, 1668, 1704, 1722, 1723, 1729, 1730, 1735, 1737, 1744,
- 1761, 1778, 1780, 1787, 1792, 1800, 1810, 1822, 1831, 1835,
- 1839, 1843, 1847, 1851, 1854, 1856, 1860, 1864, 1868
+ 0, 204, 204, 206, 211, 212, 216, 228, 233, 244,
+ 250, 255, 263, 271, 273, 278, 286, 288, 294, 302,
+ 312, 342, 356, 370, 378, 389, 401, 403, 405, 411,
+ 416, 417, 421, 456, 455, 489, 491, 496, 502, 530,
+ 535, 536, 540, 542, 544, 551, 641, 683, 725, 838,
+ 845, 852, 862, 871, 880, 889, 900, 916, 915, 939,
+ 951, 951, 1049, 1049, 1082, 1112, 1118, 1119, 1125, 1126,
+ 1133, 1138, 1150, 1164, 1166, 1174, 1179, 1181, 1189, 1191,
+ 1200, 1201, 1209, 1214, 1214, 1225, 1229, 1237, 1238, 1241,
+ 1243, 1248, 1249, 1258, 1259, 1264, 1269, 1275, 1277, 1279,
+ 1286, 1287, 1293, 1294, 1299, 1301, 1306, 1308, 1316, 1321,
+ 1330, 1337, 1339, 1341, 1357, 1367, 1374, 1376, 1381, 1383,
+ 1385, 1393, 1395, 1400, 1402, 1407, 1409, 1411, 1461, 1463,
+ 1465, 1467, 1469, 1471, 1473, 1475, 1489, 1494, 1499, 1524,
+ 1530, 1532, 1534, 1536, 1538, 1540, 1545, 1549, 1581, 1583,
+ 1589, 1595, 1608, 1609, 1610, 1615, 1620, 1624, 1628, 1643,
+ 1656, 1661, 1697, 1715, 1716, 1722, 1723, 1728, 1730, 1737,
+ 1754, 1771, 1773, 1780, 1785, 1793, 1803, 1815, 1824, 1828,
+ 1832, 1836, 1840, 1844, 1847, 1849, 1853, 1857, 1861
};
#endif
@@ -1853,26 +1848,24 @@ yyreduce:
switch (yyn)
{
case 3:
-#line 212 "awkgram.y" /* yacc.c:1646 */
+#line 207 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
yyerrok;
}
-#line 1862 "awkgram.c" /* yacc.c:1646 */
+#line 1857 "awkgram.c" /* yacc.c:1646 */
break;
case 5:
-#line 218 "awkgram.y" /* yacc.c:1646 */
+#line 213 "awkgram.y" /* yacc.c:1646 */
{
next_sourcefile();
- if (sourcefile == srcfiles)
- process_deferred();
}
-#line 1872 "awkgram.c" /* yacc.c:1646 */
+#line 1865 "awkgram.c" /* yacc.c:1646 */
break;
case 6:
-#line 224 "awkgram.y" /* yacc.c:1646 */
+#line 217 "awkgram.y" /* yacc.c:1646 */
{
rule = 0;
/*
@@ -1881,19 +1874,20 @@ yyreduce:
*/
/* yyerrok; */
}
-#line 1885 "awkgram.c" /* yacc.c:1646 */
+#line 1878 "awkgram.c" /* yacc.c:1646 */
break;
case 7:
-#line 236 "awkgram.y" /* yacc.c:1646 */
+#line 229 "awkgram.y" /* yacc.c:1646 */
{
(void) append_rule((yyvsp[-1]), (yyvsp[0]));
+ first_rule = false;
}
-#line 1893 "awkgram.c" /* yacc.c:1646 */
+#line 1887 "awkgram.c" /* yacc.c:1646 */
break;
case 8:
-#line 240 "awkgram.y" /* yacc.c:1646 */
+#line 234 "awkgram.y" /* yacc.c:1646 */
{
if (rule != Rule) {
msg(_("%s blocks must have an action part"), ruletab[rule]);
@@ -1904,39 +1898,39 @@ yyreduce:
} else /* pattern rule with non-empty pattern */
(void) append_rule((yyvsp[-1]), NULL);
}
-#line 1908 "awkgram.c" /* yacc.c:1646 */
+#line 1902 "awkgram.c" /* yacc.c:1646 */
break;
case 9:
-#line 251 "awkgram.y" /* yacc.c:1646 */
+#line 245 "awkgram.y" /* yacc.c:1646 */
{
in_function = NULL;
(void) mk_function((yyvsp[-1]), (yyvsp[0]));
yyerrok;
}
-#line 1918 "awkgram.c" /* yacc.c:1646 */
+#line 1912 "awkgram.c" /* yacc.c:1646 */
break;
case 10:
-#line 257 "awkgram.y" /* yacc.c:1646 */
+#line 251 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1927 "awkgram.c" /* yacc.c:1646 */
+#line 1921 "awkgram.c" /* yacc.c:1646 */
break;
case 11:
-#line 262 "awkgram.y" /* yacc.c:1646 */
+#line 256 "awkgram.y" /* yacc.c:1646 */
{
want_source = false;
yyerrok;
}
-#line 1936 "awkgram.c" /* yacc.c:1646 */
+#line 1930 "awkgram.c" /* yacc.c:1646 */
break;
case 12:
-#line 270 "awkgram.y" /* yacc.c:1646 */
+#line 264 "awkgram.y" /* yacc.c:1646 */
{
if (include_source((yyvsp[0])) < 0)
YYABORT;
@@ -1944,48 +1938,47 @@ yyreduce:
bcfree((yyvsp[0]));
(yyval) = NULL;
}
-#line 1948 "awkgram.c" /* yacc.c:1646 */
+#line 1942 "awkgram.c" /* yacc.c:1646 */
break;
case 13:
-#line 278 "awkgram.y" /* yacc.c:1646 */
+#line 272 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1954 "awkgram.c" /* yacc.c:1646 */
+#line 1948 "awkgram.c" /* yacc.c:1646 */
break;
case 14:
-#line 280 "awkgram.y" /* yacc.c:1646 */
+#line 274 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1960 "awkgram.c" /* yacc.c:1646 */
+#line 1954 "awkgram.c" /* yacc.c:1646 */
break;
case 15:
-#line 285 "awkgram.y" /* yacc.c:1646 */
+#line 279 "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 1973 "awkgram.c" /* yacc.c:1646 */
+#line 1966 "awkgram.c" /* yacc.c:1646 */
break;
case 16:
-#line 294 "awkgram.y" /* yacc.c:1646 */
+#line 287 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1979 "awkgram.c" /* yacc.c:1646 */
+#line 1972 "awkgram.c" /* yacc.c:1646 */
break;
case 17:
-#line 296 "awkgram.y" /* yacc.c:1646 */
+#line 289 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 1985 "awkgram.c" /* yacc.c:1646 */
+#line 1978 "awkgram.c" /* yacc.c:1646 */
break;
case 18:
-#line 301 "awkgram.y" /* yacc.c:1646 */
+#line 294 "awkgram.y" /* yacc.c:1646 */
{
rule = Rule;
if (comment != NULL) {
@@ -1994,11 +1987,11 @@ yyreduce:
} else
(yyval) = NULL;
}
-#line 1998 "awkgram.c" /* yacc.c:1646 */
+#line 1991 "awkgram.c" /* yacc.c:1646 */
break;
case 19:
-#line 310 "awkgram.y" /* yacc.c:1646 */
+#line 303 "awkgram.y" /* yacc.c:1646 */
{
rule = Rule;
if (comment != NULL) {
@@ -2007,11 +2000,11 @@ yyreduce:
} else
(yyval) = (yyvsp[0]);
}
-#line 2011 "awkgram.c" /* yacc.c:1646 */
+#line 2004 "awkgram.c" /* yacc.c:1646 */
break;
case 20:
-#line 320 "awkgram.y" /* yacc.c:1646 */
+#line 313 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *tp;
@@ -2041,11 +2034,11 @@ yyreduce:
(yyval) = list_append(list_merge((yyvsp[-3]), (yyvsp[0])), tp);
rule = Rule;
}
-#line 2045 "awkgram.c" /* yacc.c:1646 */
+#line 2038 "awkgram.c" /* yacc.c:1646 */
break;
case 21:
-#line 350 "awkgram.y" /* yacc.c:1646 */
+#line 343 "awkgram.y" /* yacc.c:1646 */
{
static int begin_seen = 0;
@@ -2059,11 +2052,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2063 "awkgram.c" /* yacc.c:1646 */
+#line 2056 "awkgram.c" /* yacc.c:1646 */
break;
case 22:
-#line 364 "awkgram.y" /* yacc.c:1646 */
+#line 357 "awkgram.y" /* yacc.c:1646 */
{
static int end_seen = 0;
@@ -2077,11 +2070,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2081 "awkgram.c" /* yacc.c:1646 */
+#line 2074 "awkgram.c" /* yacc.c:1646 */
break;
case 23:
-#line 378 "awkgram.y" /* yacc.c:1646 */
+#line 371 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = BEGINFILE;
@@ -2089,11 +2082,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2093 "awkgram.c" /* yacc.c:1646 */
+#line 2086 "awkgram.c" /* yacc.c:1646 */
break;
case 24:
-#line 386 "awkgram.y" /* yacc.c:1646 */
+#line 379 "awkgram.y" /* yacc.c:1646 */
{
func_first = false;
(yyvsp[0])->in_rule = rule = ENDFILE;
@@ -2101,11 +2094,11 @@ yyreduce:
check_comment();
(yyval) = (yyvsp[0]);
}
-#line 2105 "awkgram.c" /* yacc.c:1646 */
+#line 2098 "awkgram.c" /* yacc.c:1646 */
break;
case 25:
-#line 397 "awkgram.y" /* yacc.c:1646 */
+#line 390 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
if ((yyvsp[-3]) == NULL)
@@ -2114,39 +2107,39 @@ yyreduce:
ip = (yyvsp[-3]);
(yyval) = ip;
}
-#line 2118 "awkgram.c" /* yacc.c:1646 */
+#line 2111 "awkgram.c" /* yacc.c:1646 */
break;
case 26:
-#line 409 "awkgram.y" /* yacc.c:1646 */
+#line 402 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2124 "awkgram.c" /* yacc.c:1646 */
+#line 2117 "awkgram.c" /* yacc.c:1646 */
break;
case 27:
-#line 411 "awkgram.y" /* yacc.c:1646 */
+#line 404 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2130 "awkgram.c" /* yacc.c:1646 */
+#line 2123 "awkgram.c" /* yacc.c:1646 */
break;
case 28:
-#line 413 "awkgram.y" /* yacc.c:1646 */
+#line 406 "awkgram.y" /* yacc.c:1646 */
{
yyerror(_("`%s' is a built-in function, it cannot be redefined"),
tokstart);
YYABORT;
}
-#line 2140 "awkgram.c" /* yacc.c:1646 */
+#line 2133 "awkgram.c" /* yacc.c:1646 */
break;
case 29:
-#line 419 "awkgram.y" /* yacc.c:1646 */
+#line 412 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2146 "awkgram.c" /* yacc.c:1646 */
+#line 2139 "awkgram.c" /* yacc.c:1646 */
break;
case 32:
-#line 429 "awkgram.y" /* yacc.c:1646 */
+#line 422 "awkgram.y" /* yacc.c:1646 */
{
/*
* treat any comments between BOF and the first function
@@ -2173,17 +2166,17 @@ yyreduce:
/* $4 already free'd in install_function */
(yyval) = (yyvsp[-5]);
}
-#line 2177 "awkgram.c" /* yacc.c:1646 */
+#line 2170 "awkgram.c" /* yacc.c:1646 */
break;
case 33:
-#line 463 "awkgram.y" /* yacc.c:1646 */
+#line 456 "awkgram.y" /* yacc.c:1646 */
{ want_regexp = true; }
-#line 2183 "awkgram.c" /* yacc.c:1646 */
+#line 2176 "awkgram.c" /* yacc.c:1646 */
break;
case 34:
-#line 465 "awkgram.y" /* yacc.c:1646 */
+#line 458 "awkgram.y" /* yacc.c:1646 */
{
NODE *n, *exp;
char *re;
@@ -2212,28 +2205,28 @@ yyreduce:
(yyval)->opcode = Op_match_rec;
(yyval)->memory = n;
}
-#line 2216 "awkgram.c" /* yacc.c:1646 */
+#line 2209 "awkgram.c" /* yacc.c:1646 */
break;
case 35:
-#line 497 "awkgram.y" /* yacc.c:1646 */
+#line 490 "awkgram.y" /* yacc.c:1646 */
{ bcfree((yyvsp[0])); }
-#line 2222 "awkgram.c" /* yacc.c:1646 */
+#line 2215 "awkgram.c" /* yacc.c:1646 */
break;
case 37:
-#line 503 "awkgram.y" /* yacc.c:1646 */
+#line 496 "awkgram.y" /* yacc.c:1646 */
{
if (comment != NULL) {
(yyval) = list_create(comment);
comment = NULL;
} else (yyval) = NULL;
}
-#line 2233 "awkgram.c" /* yacc.c:1646 */
+#line 2226 "awkgram.c" /* yacc.c:1646 */
break;
case 38:
-#line 510 "awkgram.y" /* yacc.c:1646 */
+#line 503 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0]) == NULL) {
if (comment == NULL)
@@ -2261,40 +2254,40 @@ yyreduce:
}
yyerrok;
}
-#line 2265 "awkgram.c" /* yacc.c:1646 */
+#line 2258 "awkgram.c" /* yacc.c:1646 */
break;
case 39:
-#line 538 "awkgram.y" /* yacc.c:1646 */
+#line 531 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2271 "awkgram.c" /* yacc.c:1646 */
+#line 2264 "awkgram.c" /* yacc.c:1646 */
break;
case 42:
-#line 548 "awkgram.y" /* yacc.c:1646 */
+#line 541 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2277 "awkgram.c" /* yacc.c:1646 */
+#line 2270 "awkgram.c" /* yacc.c:1646 */
break;
case 43:
-#line 550 "awkgram.y" /* yacc.c:1646 */
+#line 543 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 2283 "awkgram.c" /* yacc.c:1646 */
+#line 2276 "awkgram.c" /* yacc.c:1646 */
break;
case 44:
-#line 552 "awkgram.y" /* yacc.c:1646 */
+#line 545 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2294 "awkgram.c" /* yacc.c:1646 */
+#line 2287 "awkgram.c" /* yacc.c:1646 */
break;
case 45:
-#line 559 "awkgram.y" /* yacc.c:1646 */
+#line 552 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
INSTRUCTION *ip, *nextc, *tbreak;
@@ -2384,11 +2377,11 @@ yyreduce:
break_allowed--;
fix_break_continue(ip, tbreak, NULL);
}
-#line 2388 "awkgram.c" /* yacc.c:1646 */
+#line 2381 "awkgram.c" /* yacc.c:1646 */
break;
case 46:
-#line 649 "awkgram.y" /* yacc.c:1646 */
+#line 642 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2430,11 +2423,11 @@ yyreduce:
continue_allowed--;
fix_break_continue(ip, tbreak, tcont);
}
-#line 2434 "awkgram.c" /* yacc.c:1646 */
+#line 2427 "awkgram.c" /* yacc.c:1646 */
break;
case 47:
-#line 691 "awkgram.y" /* yacc.c:1646 */
+#line 684 "awkgram.y" /* yacc.c:1646 */
{
/*
* -----------------
@@ -2476,11 +2469,11 @@ yyreduce:
} /* else
$1 and $4 are NULLs */
}
-#line 2480 "awkgram.c" /* yacc.c:1646 */
+#line 2473 "awkgram.c" /* yacc.c:1646 */
break;
case 48:
-#line 733 "awkgram.y" /* yacc.c:1646 */
+#line 726 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip;
char *var_name = (yyvsp[-5])->lextok;
@@ -2593,44 +2586,44 @@ regular_loop:
break_allowed--;
continue_allowed--;
}
-#line 2597 "awkgram.c" /* yacc.c:1646 */
+#line 2590 "awkgram.c" /* yacc.c:1646 */
break;
case 49:
-#line 846 "awkgram.y" /* yacc.c:1646 */
+#line 839 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-11]), (yyvsp[-9]), (yyvsp[-6]), (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2608 "awkgram.c" /* yacc.c:1646 */
+#line 2601 "awkgram.c" /* yacc.c:1646 */
break;
case 50:
-#line 853 "awkgram.y" /* yacc.c:1646 */
+#line 846 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_for_loop((yyvsp[-10]), (yyvsp[-8]), (INSTRUCTION *) NULL, (yyvsp[-3]), (yyvsp[0]));
break_allowed--;
continue_allowed--;
}
-#line 2619 "awkgram.c" /* yacc.c:1646 */
+#line 2612 "awkgram.c" /* yacc.c:1646 */
break;
case 51:
-#line 860 "awkgram.y" /* yacc.c:1646 */
+#line 853 "awkgram.y" /* yacc.c:1646 */
{
if (do_pretty_print)
(yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count));
else
(yyval) = (yyvsp[0]);
}
-#line 2630 "awkgram.c" /* yacc.c:1646 */
+#line 2623 "awkgram.c" /* yacc.c:1646 */
break;
case 52:
-#line 870 "awkgram.y" /* yacc.c:1646 */
+#line 863 "awkgram.y" /* yacc.c:1646 */
{
if (! break_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2639,11 +2632,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2643 "awkgram.c" /* yacc.c:1646 */
+#line 2636 "awkgram.c" /* yacc.c:1646 */
break;
case 53:
-#line 879 "awkgram.y" /* yacc.c:1646 */
+#line 872 "awkgram.y" /* yacc.c:1646 */
{
if (! continue_allowed)
error_ln((yyvsp[-1])->source_line,
@@ -2652,11 +2645,11 @@ regular_loop:
(yyval) = list_create((yyvsp[-1]));
}
-#line 2656 "awkgram.c" /* yacc.c:1646 */
+#line 2649 "awkgram.c" /* yacc.c:1646 */
break;
case 54:
-#line 888 "awkgram.y" /* yacc.c:1646 */
+#line 881 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule && rule != Rule)
@@ -2665,11 +2658,11 @@ regular_loop:
(yyvsp[-1])->target_jmp = ip_rec;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2669 "awkgram.c" /* yacc.c:1646 */
+#line 2662 "awkgram.c" /* yacc.c:1646 */
break;
case 55:
-#line 897 "awkgram.y" /* yacc.c:1646 */
+#line 890 "awkgram.y" /* yacc.c:1646 */
{
/* if inside function (rule = 0), resolve context at run-time */
if (rule == BEGIN || rule == END || rule == ENDFILE)
@@ -2680,11 +2673,11 @@ regular_loop:
(yyvsp[-1])->target_endfile = ip_endfile;
(yyval) = list_create((yyvsp[-1]));
}
-#line 2684 "awkgram.c" /* yacc.c:1646 */
+#line 2677 "awkgram.c" /* yacc.c:1646 */
break;
case 56:
-#line 908 "awkgram.y" /* yacc.c:1646 */
+#line 901 "awkgram.y" /* yacc.c:1646 */
{
/* Initialize the two possible jump targets, the actual target
* is resolved at run-time.
@@ -2699,20 +2692,20 @@ regular_loop:
} else
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
}
-#line 2703 "awkgram.c" /* yacc.c:1646 */
+#line 2696 "awkgram.c" /* yacc.c:1646 */
break;
case 57:
-#line 923 "awkgram.y" /* yacc.c:1646 */
+#line 916 "awkgram.y" /* yacc.c:1646 */
{
if (! in_function)
yyerror(_("`return' used outside function context"));
}
-#line 2712 "awkgram.c" /* yacc.c:1646 */
+#line 2705 "awkgram.c" /* yacc.c:1646 */
break;
case 58:
-#line 926 "awkgram.y" /* yacc.c:1646 */
+#line 919 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL) {
(yyval) = list_create((yyvsp[-3]));
@@ -2733,17 +2726,17 @@ regular_loop:
(yyval) = list_append((yyvsp[-1]), (yyvsp[-3]));
}
}
-#line 2737 "awkgram.c" /* yacc.c:1646 */
+#line 2730 "awkgram.c" /* yacc.c:1646 */
break;
case 60:
-#line 958 "awkgram.y" /* yacc.c:1646 */
+#line 951 "awkgram.y" /* yacc.c:1646 */
{ in_print = true; in_parens = 0; }
-#line 2743 "awkgram.c" /* yacc.c:1646 */
+#line 2736 "awkgram.c" /* yacc.c:1646 */
break;
case 61:
-#line 959 "awkgram.y" /* yacc.c:1646 */
+#line 952 "awkgram.y" /* yacc.c:1646 */
{
/*
* Optimization: plain `print' has no expression list, so $3 is null.
@@ -2840,17 +2833,17 @@ regular_print:
}
}
}
-#line 2844 "awkgram.c" /* yacc.c:1646 */
+#line 2837 "awkgram.c" /* yacc.c:1646 */
break;
case 62:
-#line 1056 "awkgram.y" /* yacc.c:1646 */
+#line 1049 "awkgram.y" /* yacc.c:1646 */
{ sub_counter = 0; }
-#line 2850 "awkgram.c" /* yacc.c:1646 */
+#line 2843 "awkgram.c" /* yacc.c:1646 */
break;
case 63:
-#line 1057 "awkgram.y" /* yacc.c:1646 */
+#line 1050 "awkgram.y" /* yacc.c:1646 */
{
char *arr = (yyvsp[-2])->lextok;
@@ -2883,11 +2876,11 @@ regular_print:
(yyval) = list_append(list_append((yyvsp[0]), (yyvsp[-2])), (yyvsp[-3]));
}
}
-#line 2887 "awkgram.c" /* yacc.c:1646 */
+#line 2880 "awkgram.c" /* yacc.c:1646 */
break;
case 64:
-#line 1094 "awkgram.y" /* yacc.c:1646 */
+#line 1087 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
char *arr = (yyvsp[-1])->lextok;
@@ -2913,52 +2906,52 @@ regular_print:
fatal(_("`delete' is not allowed with FUNCTAB"));
}
}
-#line 2917 "awkgram.c" /* yacc.c:1646 */
+#line 2910 "awkgram.c" /* yacc.c:1646 */
break;
case 65:
-#line 1120 "awkgram.y" /* yacc.c:1646 */
+#line 1113 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = optimize_assignment((yyvsp[0])); }
-#line 2923 "awkgram.c" /* yacc.c:1646 */
+#line 2916 "awkgram.c" /* yacc.c:1646 */
break;
case 66:
-#line 1125 "awkgram.y" /* yacc.c:1646 */
+#line 1118 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2929 "awkgram.c" /* yacc.c:1646 */
+#line 2922 "awkgram.c" /* yacc.c:1646 */
break;
case 67:
-#line 1127 "awkgram.y" /* yacc.c:1646 */
+#line 1120 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2935 "awkgram.c" /* yacc.c:1646 */
+#line 2928 "awkgram.c" /* yacc.c:1646 */
break;
case 68:
-#line 1132 "awkgram.y" /* yacc.c:1646 */
+#line 1125 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2941 "awkgram.c" /* yacc.c:1646 */
+#line 2934 "awkgram.c" /* yacc.c:1646 */
break;
case 69:
-#line 1134 "awkgram.y" /* yacc.c:1646 */
+#line 1127 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-1]) == NULL)
(yyval) = list_create((yyvsp[0]));
else
(yyval) = list_prepend((yyvsp[-1]), (yyvsp[0]));
}
-#line 2952 "awkgram.c" /* yacc.c:1646 */
+#line 2945 "awkgram.c" /* yacc.c:1646 */
break;
case 70:
-#line 1141 "awkgram.y" /* yacc.c:1646 */
+#line 1134 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 2958 "awkgram.c" /* yacc.c:1646 */
+#line 2951 "awkgram.c" /* yacc.c:1646 */
break;
case 71:
-#line 1146 "awkgram.y" /* yacc.c:1646 */
+#line 1139 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2970,11 +2963,11 @@ regular_print:
bcfree((yyvsp[-2]));
(yyval) = (yyvsp[-4]);
}
-#line 2974 "awkgram.c" /* yacc.c:1646 */
+#line 2967 "awkgram.c" /* yacc.c:1646 */
break;
case 72:
-#line 1158 "awkgram.y" /* yacc.c:1646 */
+#line 1151 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *casestmt = (yyvsp[0]);
if ((yyvsp[0]) == NULL)
@@ -2985,17 +2978,17 @@ regular_print:
(yyvsp[-3])->case_stmt = casestmt;
(yyval) = (yyvsp[-3]);
}
-#line 2989 "awkgram.c" /* yacc.c:1646 */
+#line 2982 "awkgram.c" /* yacc.c:1646 */
break;
case 73:
-#line 1172 "awkgram.y" /* yacc.c:1646 */
+#line 1165 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 2995 "awkgram.c" /* yacc.c:1646 */
+#line 2988 "awkgram.c" /* yacc.c:1646 */
break;
case 74:
-#line 1174 "awkgram.y" /* yacc.c:1646 */
+#line 1167 "awkgram.y" /* yacc.c:1646 */
{
NODE *n = (yyvsp[0])->memory;
(void) force_number(n);
@@ -3003,71 +2996,71 @@ regular_print:
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3007 "awkgram.c" /* yacc.c:1646 */
+#line 3000 "awkgram.c" /* yacc.c:1646 */
break;
case 75:
-#line 1182 "awkgram.y" /* yacc.c:1646 */
+#line 1175 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3016 "awkgram.c" /* yacc.c:1646 */
+#line 3009 "awkgram.c" /* yacc.c:1646 */
break;
case 76:
-#line 1187 "awkgram.y" /* yacc.c:1646 */
+#line 1180 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3022 "awkgram.c" /* yacc.c:1646 */
+#line 3015 "awkgram.c" /* yacc.c:1646 */
break;
case 77:
-#line 1189 "awkgram.y" /* yacc.c:1646 */
+#line 1182 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_push_re;
(yyval) = (yyvsp[0]);
}
-#line 3031 "awkgram.c" /* yacc.c:1646 */
+#line 3024 "awkgram.c" /* yacc.c:1646 */
break;
case 78:
-#line 1197 "awkgram.y" /* yacc.c:1646 */
+#line 1190 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3037 "awkgram.c" /* yacc.c:1646 */
+#line 3030 "awkgram.c" /* yacc.c:1646 */
break;
case 79:
-#line 1199 "awkgram.y" /* yacc.c:1646 */
+#line 1192 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3043 "awkgram.c" /* yacc.c:1646 */
+#line 3036 "awkgram.c" /* yacc.c:1646 */
break;
case 81:
-#line 1209 "awkgram.y" /* yacc.c:1646 */
+#line 1202 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1]);
}
-#line 3051 "awkgram.c" /* yacc.c:1646 */
+#line 3044 "awkgram.c" /* yacc.c:1646 */
break;
case 82:
-#line 1216 "awkgram.y" /* yacc.c:1646 */
+#line 1209 "awkgram.y" /* yacc.c:1646 */
{
in_print = false;
in_parens = 0;
(yyval) = NULL;
}
-#line 3061 "awkgram.c" /* yacc.c:1646 */
+#line 3054 "awkgram.c" /* yacc.c:1646 */
break;
case 83:
-#line 1221 "awkgram.y" /* yacc.c:1646 */
+#line 1214 "awkgram.y" /* yacc.c:1646 */
{ in_print = false; in_parens = 0; }
-#line 3067 "awkgram.c" /* yacc.c:1646 */
+#line 3060 "awkgram.c" /* yacc.c:1646 */
break;
case 84:
-#line 1222 "awkgram.y" /* yacc.c:1646 */
+#line 1215 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->redir_type == redirect_twoway
&& (yyvsp[0])->lasti->opcode == Op_K_getline_redir
@@ -3075,136 +3068,136 @@ regular_print:
yyerror(_("multistage two-way pipelines don't work"));
(yyval) = list_prepend((yyvsp[0]), (yyvsp[-2]));
}
-#line 3079 "awkgram.c" /* yacc.c:1646 */
+#line 3072 "awkgram.c" /* yacc.c:1646 */
break;
case 85:
-#line 1233 "awkgram.y" /* yacc.c:1646 */
+#line 1226 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]), NULL, NULL);
}
-#line 3087 "awkgram.c" /* yacc.c:1646 */
+#line 3080 "awkgram.c" /* yacc.c:1646 */
break;
case 86:
-#line 1238 "awkgram.y" /* yacc.c:1646 */
+#line 1231 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[0]));
}
-#line 3095 "awkgram.c" /* yacc.c:1646 */
+#line 3088 "awkgram.c" /* yacc.c:1646 */
break;
case 91:
-#line 1255 "awkgram.y" /* yacc.c:1646 */
+#line 1248 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3101 "awkgram.c" /* yacc.c:1646 */
+#line 3094 "awkgram.c" /* yacc.c:1646 */
break;
case 92:
-#line 1257 "awkgram.y" /* yacc.c:1646 */
+#line 1250 "awkgram.y" /* yacc.c:1646 */
{
bcfree((yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 3110 "awkgram.c" /* yacc.c:1646 */
+#line 3103 "awkgram.c" /* yacc.c:1646 */
break;
case 93:
-#line 1265 "awkgram.y" /* yacc.c:1646 */
+#line 1258 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3116 "awkgram.c" /* yacc.c:1646 */
+#line 3109 "awkgram.c" /* yacc.c:1646 */
break;
case 94:
-#line 1267 "awkgram.y" /* yacc.c:1646 */
+#line 1260 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3122 "awkgram.c" /* yacc.c:1646 */
+#line 3115 "awkgram.c" /* yacc.c:1646 */
break;
case 95:
-#line 1272 "awkgram.y" /* yacc.c:1646 */
+#line 1265 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = 0;
(yyval) = list_create((yyvsp[0]));
}
-#line 3131 "awkgram.c" /* yacc.c:1646 */
+#line 3124 "awkgram.c" /* yacc.c:1646 */
break;
case 96:
-#line 1277 "awkgram.y" /* yacc.c:1646 */
+#line 1270 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->param_count = (yyvsp[-2])->lasti->param_count + 1;
(yyval) = list_append((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3141 "awkgram.c" /* yacc.c:1646 */
+#line 3134 "awkgram.c" /* yacc.c:1646 */
break;
case 97:
-#line 1283 "awkgram.y" /* yacc.c:1646 */
+#line 1276 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3147 "awkgram.c" /* yacc.c:1646 */
+#line 3140 "awkgram.c" /* yacc.c:1646 */
break;
case 98:
-#line 1285 "awkgram.y" /* yacc.c:1646 */
+#line 1278 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3153 "awkgram.c" /* yacc.c:1646 */
+#line 3146 "awkgram.c" /* yacc.c:1646 */
break;
case 99:
-#line 1287 "awkgram.y" /* yacc.c:1646 */
+#line 1280 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-2]); }
-#line 3159 "awkgram.c" /* yacc.c:1646 */
+#line 3152 "awkgram.c" /* yacc.c:1646 */
break;
case 100:
-#line 1293 "awkgram.y" /* yacc.c:1646 */
+#line 1286 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3165 "awkgram.c" /* yacc.c:1646 */
+#line 3158 "awkgram.c" /* yacc.c:1646 */
break;
case 101:
-#line 1295 "awkgram.y" /* yacc.c:1646 */
+#line 1288 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3171 "awkgram.c" /* yacc.c:1646 */
+#line 3164 "awkgram.c" /* yacc.c:1646 */
break;
case 102:
-#line 1300 "awkgram.y" /* yacc.c:1646 */
+#line 1293 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3177 "awkgram.c" /* yacc.c:1646 */
+#line 3170 "awkgram.c" /* yacc.c:1646 */
break;
case 103:
-#line 1302 "awkgram.y" /* yacc.c:1646 */
+#line 1295 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3183 "awkgram.c" /* yacc.c:1646 */
+#line 3176 "awkgram.c" /* yacc.c:1646 */
break;
case 104:
-#line 1307 "awkgram.y" /* yacc.c:1646 */
+#line 1300 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_expression_list(NULL, (yyvsp[0])); }
-#line 3189 "awkgram.c" /* yacc.c:1646 */
+#line 3182 "awkgram.c" /* yacc.c:1646 */
break;
case 105:
-#line 1309 "awkgram.y" /* yacc.c:1646 */
+#line 1302 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
yyerrok;
}
-#line 3198 "awkgram.c" /* yacc.c:1646 */
+#line 3191 "awkgram.c" /* yacc.c:1646 */
break;
case 106:
-#line 1314 "awkgram.y" /* yacc.c:1646 */
+#line 1307 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3204 "awkgram.c" /* yacc.c:1646 */
+#line 3197 "awkgram.c" /* yacc.c:1646 */
break;
case 107:
-#line 1316 "awkgram.y" /* yacc.c:1646 */
+#line 1309 "awkgram.y" /* yacc.c:1646 */
{
/*
* Returning the expression list instead of NULL lets
@@ -3212,52 +3205,52 @@ regular_print:
*/
(yyval) = (yyvsp[-1]);
}
-#line 3216 "awkgram.c" /* yacc.c:1646 */
+#line 3209 "awkgram.c" /* yacc.c:1646 */
break;
case 108:
-#line 1324 "awkgram.y" /* yacc.c:1646 */
+#line 1317 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0]));
}
-#line 3225 "awkgram.c" /* yacc.c:1646 */
+#line 3218 "awkgram.c" /* yacc.c:1646 */
break;
case 109:
-#line 1329 "awkgram.y" /* yacc.c:1646 */
+#line 1322 "awkgram.y" /* yacc.c:1646 */
{
/* Ditto */
(yyval) = (yyvsp[-2]);
}
-#line 3234 "awkgram.c" /* yacc.c:1646 */
+#line 3227 "awkgram.c" /* yacc.c:1646 */
break;
case 110:
-#line 1338 "awkgram.y" /* yacc.c:1646 */
+#line 1331 "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 3245 "awkgram.c" /* yacc.c:1646 */
+#line 3238 "awkgram.c" /* yacc.c:1646 */
break;
case 111:
-#line 1345 "awkgram.y" /* yacc.c:1646 */
+#line 1338 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3251 "awkgram.c" /* yacc.c:1646 */
+#line 3244 "awkgram.c" /* yacc.c:1646 */
break;
case 112:
-#line 1347 "awkgram.y" /* yacc.c:1646 */
+#line 1340 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3257 "awkgram.c" /* yacc.c:1646 */
+#line 3250 "awkgram.c" /* yacc.c:1646 */
break;
case 113:
-#line 1349 "awkgram.y" /* yacc.c:1646 */
+#line 1342 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[-2])->lasti->opcode == Op_match_rec)
warning_ln((yyvsp[-1])->source_line,
@@ -3273,11 +3266,11 @@ regular_print:
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3277 "awkgram.c" /* yacc.c:1646 */
+#line 3270 "awkgram.c" /* yacc.c:1646 */
break;
case 114:
-#line 1365 "awkgram.y" /* yacc.c:1646 */
+#line 1358 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old)
warning_ln((yyvsp[-1])->source_line,
@@ -3287,91 +3280,91 @@ regular_print:
(yyvsp[-1])->expr_count = 1;
(yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1]));
}
-#line 3291 "awkgram.c" /* yacc.c:1646 */
+#line 3284 "awkgram.c" /* yacc.c:1646 */
break;
case 115:
-#line 1375 "awkgram.y" /* yacc.c:1646 */
+#line 1368 "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 3302 "awkgram.c" /* yacc.c:1646 */
+#line 3295 "awkgram.c" /* yacc.c:1646 */
break;
case 116:
-#line 1382 "awkgram.y" /* yacc.c:1646 */
+#line 1375 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])); }
-#line 3308 "awkgram.c" /* yacc.c:1646 */
+#line 3301 "awkgram.c" /* yacc.c:1646 */
break;
case 117:
-#line 1384 "awkgram.y" /* yacc.c:1646 */
+#line 1377 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3314 "awkgram.c" /* yacc.c:1646 */
+#line 3307 "awkgram.c" /* yacc.c:1646 */
break;
case 118:
-#line 1389 "awkgram.y" /* yacc.c:1646 */
+#line 1382 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3320 "awkgram.c" /* yacc.c:1646 */
+#line 3313 "awkgram.c" /* yacc.c:1646 */
break;
case 119:
-#line 1391 "awkgram.y" /* yacc.c:1646 */
+#line 1384 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3326 "awkgram.c" /* yacc.c:1646 */
+#line 3319 "awkgram.c" /* yacc.c:1646 */
break;
case 120:
-#line 1393 "awkgram.y" /* yacc.c:1646 */
+#line 1386 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_assign_quotient;
(yyval) = (yyvsp[0]);
}
-#line 3335 "awkgram.c" /* yacc.c:1646 */
+#line 3328 "awkgram.c" /* yacc.c:1646 */
break;
case 121:
-#line 1401 "awkgram.y" /* yacc.c:1646 */
+#line 1394 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3341 "awkgram.c" /* yacc.c:1646 */
+#line 3334 "awkgram.c" /* yacc.c:1646 */
break;
case 122:
-#line 1403 "awkgram.y" /* yacc.c:1646 */
+#line 1396 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3347 "awkgram.c" /* yacc.c:1646 */
+#line 3340 "awkgram.c" /* yacc.c:1646 */
break;
case 123:
-#line 1408 "awkgram.y" /* yacc.c:1646 */
+#line 1401 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3353 "awkgram.c" /* yacc.c:1646 */
+#line 3346 "awkgram.c" /* yacc.c:1646 */
break;
case 124:
-#line 1410 "awkgram.y" /* yacc.c:1646 */
+#line 1403 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3359 "awkgram.c" /* yacc.c:1646 */
+#line 3352 "awkgram.c" /* yacc.c:1646 */
break;
case 125:
-#line 1415 "awkgram.y" /* yacc.c:1646 */
+#line 1408 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3365 "awkgram.c" /* yacc.c:1646 */
+#line 3358 "awkgram.c" /* yacc.c:1646 */
break;
case 126:
-#line 1417 "awkgram.y" /* yacc.c:1646 */
+#line 1410 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3371 "awkgram.c" /* yacc.c:1646 */
+#line 3364 "awkgram.c" /* yacc.c:1646 */
break;
case 127:
-#line 1419 "awkgram.y" /* yacc.c:1646 */
+#line 1412 "awkgram.y" /* yacc.c:1646 */
{
int count = 2;
bool is_simple_var = false;
@@ -3418,47 +3411,47 @@ regular_print:
max_args = count;
}
}
-#line 3422 "awkgram.c" /* yacc.c:1646 */
+#line 3415 "awkgram.c" /* yacc.c:1646 */
break;
case 129:
-#line 1471 "awkgram.y" /* yacc.c:1646 */
+#line 1464 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3428 "awkgram.c" /* yacc.c:1646 */
+#line 3421 "awkgram.c" /* yacc.c:1646 */
break;
case 130:
-#line 1473 "awkgram.y" /* yacc.c:1646 */
+#line 1466 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3434 "awkgram.c" /* yacc.c:1646 */
+#line 3427 "awkgram.c" /* yacc.c:1646 */
break;
case 131:
-#line 1475 "awkgram.y" /* yacc.c:1646 */
+#line 1468 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3440 "awkgram.c" /* yacc.c:1646 */
+#line 3433 "awkgram.c" /* yacc.c:1646 */
break;
case 132:
-#line 1477 "awkgram.y" /* yacc.c:1646 */
+#line 1470 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3446 "awkgram.c" /* yacc.c:1646 */
+#line 3439 "awkgram.c" /* yacc.c:1646 */
break;
case 133:
-#line 1479 "awkgram.y" /* yacc.c:1646 */
+#line 1472 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3452 "awkgram.c" /* yacc.c:1646 */
+#line 3445 "awkgram.c" /* yacc.c:1646 */
break;
case 134:
-#line 1481 "awkgram.y" /* yacc.c:1646 */
+#line 1474 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3458 "awkgram.c" /* yacc.c:1646 */
+#line 3451 "awkgram.c" /* yacc.c:1646 */
break;
case 135:
-#line 1483 "awkgram.y" /* yacc.c:1646 */
+#line 1476 "awkgram.y" /* yacc.c:1646 */
{
/*
* In BEGINFILE/ENDFILE, allow `getline [var] < file'
@@ -3472,29 +3465,29 @@ regular_print:
_("non-redirected `getline' undefined inside END action"));
(yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input);
}
-#line 3476 "awkgram.c" /* yacc.c:1646 */
+#line 3469 "awkgram.c" /* yacc.c:1646 */
break;
case 136:
-#line 1497 "awkgram.y" /* yacc.c:1646 */
+#line 1490 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3485 "awkgram.c" /* yacc.c:1646 */
+#line 3478 "awkgram.c" /* yacc.c:1646 */
break;
case 137:
-#line 1502 "awkgram.y" /* yacc.c:1646 */
+#line 1495 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
(yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3494 "awkgram.c" /* yacc.c:1646 */
+#line 3487 "awkgram.c" /* yacc.c:1646 */
break;
case 138:
-#line 1507 "awkgram.y" /* yacc.c:1646 */
+#line 1500 "awkgram.y" /* yacc.c:1646 */
{
if (do_lint_old) {
warning_ln((yyvsp[-1])->source_line,
@@ -3514,64 +3507,64 @@ regular_print:
(yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1]));
}
}
-#line 3518 "awkgram.c" /* yacc.c:1646 */
+#line 3511 "awkgram.c" /* yacc.c:1646 */
break;
case 139:
-#line 1532 "awkgram.y" /* yacc.c:1646 */
+#line 1525 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type);
bcfree((yyvsp[-2]));
}
-#line 3527 "awkgram.c" /* yacc.c:1646 */
+#line 3520 "awkgram.c" /* yacc.c:1646 */
break;
case 140:
-#line 1538 "awkgram.y" /* yacc.c:1646 */
+#line 1531 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3533 "awkgram.c" /* yacc.c:1646 */
+#line 3526 "awkgram.c" /* yacc.c:1646 */
break;
case 141:
-#line 1540 "awkgram.y" /* yacc.c:1646 */
+#line 1533 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3539 "awkgram.c" /* yacc.c:1646 */
+#line 3532 "awkgram.c" /* yacc.c:1646 */
break;
case 142:
-#line 1542 "awkgram.y" /* yacc.c:1646 */
+#line 1535 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3545 "awkgram.c" /* yacc.c:1646 */
+#line 3538 "awkgram.c" /* yacc.c:1646 */
break;
case 143:
-#line 1544 "awkgram.y" /* yacc.c:1646 */
+#line 1537 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3551 "awkgram.c" /* yacc.c:1646 */
+#line 3544 "awkgram.c" /* yacc.c:1646 */
break;
case 144:
-#line 1546 "awkgram.y" /* yacc.c:1646 */
+#line 1539 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3557 "awkgram.c" /* yacc.c:1646 */
+#line 3550 "awkgram.c" /* yacc.c:1646 */
break;
case 145:
-#line 1548 "awkgram.y" /* yacc.c:1646 */
+#line 1541 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); }
-#line 3563 "awkgram.c" /* yacc.c:1646 */
+#line 3556 "awkgram.c" /* yacc.c:1646 */
break;
case 146:
-#line 1553 "awkgram.y" /* yacc.c:1646 */
+#line 1546 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3571 "awkgram.c" /* yacc.c:1646 */
+#line 3564 "awkgram.c" /* yacc.c:1646 */
break;
case 147:
-#line 1557 "awkgram.y" /* yacc.c:1646 */
+#line 1550 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->opcode == Op_match_rec) {
(yyvsp[0])->opcode = Op_nomatch;
@@ -3603,37 +3596,37 @@ regular_print:
}
}
}
-#line 3607 "awkgram.c" /* yacc.c:1646 */
+#line 3600 "awkgram.c" /* yacc.c:1646 */
break;
case 148:
-#line 1589 "awkgram.y" /* yacc.c:1646 */
+#line 1582 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3613 "awkgram.c" /* yacc.c:1646 */
+#line 3606 "awkgram.c" /* yacc.c:1646 */
break;
case 149:
-#line 1591 "awkgram.y" /* yacc.c:1646 */
+#line 1584 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3623 "awkgram.c" /* yacc.c:1646 */
+#line 3616 "awkgram.c" /* yacc.c:1646 */
break;
case 150:
-#line 1597 "awkgram.y" /* yacc.c:1646 */
+#line 1590 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = snode((yyvsp[-1]), (yyvsp[-3]));
if ((yyval) == NULL)
YYABORT;
}
-#line 3633 "awkgram.c" /* yacc.c:1646 */
+#line 3626 "awkgram.c" /* yacc.c:1646 */
break;
case 151:
-#line 1603 "awkgram.y" /* yacc.c:1646 */
+#line 1596 "awkgram.y" /* yacc.c:1646 */
{
static bool warned = false;
@@ -3646,45 +3639,45 @@ regular_print:
if ((yyval) == NULL)
YYABORT;
}
-#line 3650 "awkgram.c" /* yacc.c:1646 */
+#line 3643 "awkgram.c" /* yacc.c:1646 */
break;
case 154:
-#line 1618 "awkgram.y" /* yacc.c:1646 */
+#line 1611 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_preincrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3659 "awkgram.c" /* yacc.c:1646 */
+#line 3652 "awkgram.c" /* yacc.c:1646 */
break;
case 155:
-#line 1623 "awkgram.y" /* yacc.c:1646 */
+#line 1616 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[-1])->opcode = Op_predecrement;
(yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1]));
}
-#line 3668 "awkgram.c" /* yacc.c:1646 */
+#line 3661 "awkgram.c" /* yacc.c:1646 */
break;
case 156:
-#line 1628 "awkgram.y" /* yacc.c:1646 */
+#line 1621 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3676 "awkgram.c" /* yacc.c:1646 */
+#line 3669 "awkgram.c" /* yacc.c:1646 */
break;
case 157:
-#line 1632 "awkgram.y" /* yacc.c:1646 */
+#line 1625 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_create((yyvsp[0]));
}
-#line 3684 "awkgram.c" /* yacc.c:1646 */
+#line 3677 "awkgram.c" /* yacc.c:1646 */
break;
case 158:
-#line 1636 "awkgram.y" /* yacc.c:1646 */
+#line 1629 "awkgram.y" /* yacc.c:1646 */
{
if ((yyvsp[0])->lasti->opcode == Op_push_i
&& ((yyvsp[0])->lasti->memory->flags & (STRCUR|STRING)) == 0
@@ -3699,11 +3692,11 @@ regular_print:
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
}
-#line 3703 "awkgram.c" /* yacc.c:1646 */
+#line 3696 "awkgram.c" /* yacc.c:1646 */
break;
case 159:
-#line 1651 "awkgram.y" /* yacc.c:1646 */
+#line 1644 "awkgram.y" /* yacc.c:1646 */
{
/*
* was: $$ = $2
@@ -3713,20 +3706,20 @@ regular_print:
(yyvsp[-1])->memory = make_number(0.0);
(yyval) = list_append((yyvsp[0]), (yyvsp[-1]));
}
-#line 3717 "awkgram.c" /* yacc.c:1646 */
+#line 3710 "awkgram.c" /* yacc.c:1646 */
break;
case 160:
-#line 1664 "awkgram.y" /* yacc.c:1646 */
+#line 1657 "awkgram.y" /* yacc.c:1646 */
{
func_use((yyvsp[0])->lasti->func_name, FUNC_USE);
(yyval) = (yyvsp[0]);
}
-#line 3726 "awkgram.c" /* yacc.c:1646 */
+#line 3719 "awkgram.c" /* yacc.c:1646 */
break;
case 161:
-#line 1669 "awkgram.y" /* yacc.c:1646 */
+#line 1662 "awkgram.y" /* yacc.c:1646 */
{
/* indirect function call */
INSTRUCTION *f, *t;
@@ -3759,11 +3752,11 @@ regular_print:
(yyval) = list_prepend((yyvsp[0]), t);
}
-#line 3763 "awkgram.c" /* yacc.c:1646 */
+#line 3756 "awkgram.c" /* yacc.c:1646 */
break;
case 162:
-#line 1705 "awkgram.y" /* yacc.c:1646 */
+#line 1698 "awkgram.y" /* yacc.c:1646 */
{
param_sanity((yyvsp[-1]));
(yyvsp[-3])->opcode = Op_func_call;
@@ -3777,49 +3770,49 @@ regular_print:
(yyval) = list_append(t, (yyvsp[-3]));
}
}
-#line 3781 "awkgram.c" /* yacc.c:1646 */
+#line 3774 "awkgram.c" /* yacc.c:1646 */
break;
case 163:
-#line 1722 "awkgram.y" /* yacc.c:1646 */
+#line 1715 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3787 "awkgram.c" /* yacc.c:1646 */
+#line 3780 "awkgram.c" /* yacc.c:1646 */
break;
case 164:
-#line 1724 "awkgram.y" /* yacc.c:1646 */
+#line 1717 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3793 "awkgram.c" /* yacc.c:1646 */
+#line 3786 "awkgram.c" /* yacc.c:1646 */
break;
case 165:
-#line 1729 "awkgram.y" /* yacc.c:1646 */
+#line 1722 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3799 "awkgram.c" /* yacc.c:1646 */
+#line 3792 "awkgram.c" /* yacc.c:1646 */
break;
case 166:
-#line 1731 "awkgram.y" /* yacc.c:1646 */
+#line 1724 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3805 "awkgram.c" /* yacc.c:1646 */
+#line 3798 "awkgram.c" /* yacc.c:1646 */
break;
case 167:
-#line 1736 "awkgram.y" /* yacc.c:1646 */
+#line 1729 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3811 "awkgram.c" /* yacc.c:1646 */
+#line 3804 "awkgram.c" /* yacc.c:1646 */
break;
case 168:
-#line 1738 "awkgram.y" /* yacc.c:1646 */
+#line 1731 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3819 "awkgram.c" /* yacc.c:1646 */
+#line 3812 "awkgram.c" /* yacc.c:1646 */
break;
case 169:
-#line 1745 "awkgram.y" /* yacc.c:1646 */
+#line 1738 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->lasti;
int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
@@ -3833,11 +3826,11 @@ regular_print:
sub_counter++; /* count # of dimensions */
(yyval) = (yyvsp[0]);
}
-#line 3837 "awkgram.c" /* yacc.c:1646 */
+#line 3830 "awkgram.c" /* yacc.c:1646 */
break;
case 170:
-#line 1762 "awkgram.y" /* yacc.c:1646 */
+#line 1755 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *t = (yyvsp[-1]);
if ((yyvsp[-1]) == NULL) {
@@ -3851,31 +3844,31 @@ regular_print:
(yyvsp[0])->sub_count = count_expressions(&t, false);
(yyval) = list_append(t, (yyvsp[0]));
}
-#line 3855 "awkgram.c" /* yacc.c:1646 */
+#line 3848 "awkgram.c" /* yacc.c:1646 */
break;
case 171:
-#line 1779 "awkgram.y" /* yacc.c:1646 */
+#line 1772 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); }
-#line 3861 "awkgram.c" /* yacc.c:1646 */
+#line 3854 "awkgram.c" /* yacc.c:1646 */
break;
case 172:
-#line 1781 "awkgram.y" /* yacc.c:1646 */
+#line 1774 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_merge((yyvsp[-1]), (yyvsp[0]));
}
-#line 3869 "awkgram.c" /* yacc.c:1646 */
+#line 3862 "awkgram.c" /* yacc.c:1646 */
break;
case 173:
-#line 1788 "awkgram.y" /* yacc.c:1646 */
+#line 1781 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[-1]); }
-#line 3875 "awkgram.c" /* yacc.c:1646 */
+#line 3868 "awkgram.c" /* yacc.c:1646 */
break;
case 174:
-#line 1793 "awkgram.y" /* yacc.c:1646 */
+#line 1786 "awkgram.y" /* yacc.c:1646 */
{
char *var_name = (yyvsp[0])->lextok;
@@ -3883,22 +3876,22 @@ regular_print:
(yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new);
(yyval) = list_create((yyvsp[0]));
}
-#line 3887 "awkgram.c" /* yacc.c:1646 */
+#line 3880 "awkgram.c" /* yacc.c:1646 */
break;
case 175:
-#line 1801 "awkgram.y" /* yacc.c:1646 */
+#line 1794 "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 3898 "awkgram.c" /* yacc.c:1646 */
+#line 3891 "awkgram.c" /* yacc.c:1646 */
break;
case 176:
-#line 1811 "awkgram.y" /* yacc.c:1646 */
+#line 1804 "awkgram.y" /* yacc.c:1646 */
{
INSTRUCTION *ip = (yyvsp[0])->nexti;
if (ip->opcode == Op_push
@@ -3910,73 +3903,73 @@ regular_print:
} else
(yyval) = (yyvsp[0]);
}
-#line 3914 "awkgram.c" /* yacc.c:1646 */
+#line 3907 "awkgram.c" /* yacc.c:1646 */
break;
case 177:
-#line 1823 "awkgram.y" /* yacc.c:1646 */
+#line 1816 "awkgram.y" /* yacc.c:1646 */
{
(yyval) = list_append((yyvsp[-1]), (yyvsp[-2]));
if ((yyvsp[0]) != NULL)
mk_assignment((yyvsp[-1]), NULL, (yyvsp[0]));
}
-#line 3924 "awkgram.c" /* yacc.c:1646 */
+#line 3917 "awkgram.c" /* yacc.c:1646 */
break;
case 178:
-#line 1832 "awkgram.y" /* yacc.c:1646 */
+#line 1825 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postincrement;
}
-#line 3932 "awkgram.c" /* yacc.c:1646 */
+#line 3925 "awkgram.c" /* yacc.c:1646 */
break;
case 179:
-#line 1836 "awkgram.y" /* yacc.c:1646 */
+#line 1829 "awkgram.y" /* yacc.c:1646 */
{
(yyvsp[0])->opcode = Op_postdecrement;
}
-#line 3940 "awkgram.c" /* yacc.c:1646 */
+#line 3933 "awkgram.c" /* yacc.c:1646 */
break;
case 180:
-#line 1839 "awkgram.y" /* yacc.c:1646 */
+#line 1832 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = NULL; }
-#line 3946 "awkgram.c" /* yacc.c:1646 */
+#line 3939 "awkgram.c" /* yacc.c:1646 */
break;
case 182:
-#line 1847 "awkgram.y" /* yacc.c:1646 */
+#line 1840 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3952 "awkgram.c" /* yacc.c:1646 */
+#line 3945 "awkgram.c" /* yacc.c:1646 */
break;
case 183:
-#line 1851 "awkgram.y" /* yacc.c:1646 */
+#line 1844 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3958 "awkgram.c" /* yacc.c:1646 */
+#line 3951 "awkgram.c" /* yacc.c:1646 */
break;
case 186:
-#line 1860 "awkgram.y" /* yacc.c:1646 */
+#line 1853 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3964 "awkgram.c" /* yacc.c:1646 */
+#line 3957 "awkgram.c" /* yacc.c:1646 */
break;
case 187:
-#line 1864 "awkgram.y" /* yacc.c:1646 */
+#line 1857 "awkgram.y" /* yacc.c:1646 */
{ (yyval) = (yyvsp[0]); yyerrok; }
-#line 3970 "awkgram.c" /* yacc.c:1646 */
+#line 3963 "awkgram.c" /* yacc.c:1646 */
break;
case 188:
-#line 1868 "awkgram.y" /* yacc.c:1646 */
+#line 1861 "awkgram.y" /* yacc.c:1646 */
{ yyerrok; }
-#line 3976 "awkgram.c" /* yacc.c:1646 */
+#line 3969 "awkgram.c" /* yacc.c:1646 */
break;
-#line 3980 "awkgram.c" /* yacc.c:1646 */
+#line 3973 "awkgram.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -4204,7 +4197,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1870 "awkgram.y" /* yacc.c:1906 */
+#line 1863 "awkgram.y" /* yacc.c:1906 */
struct token {
@@ -4777,8 +4770,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;
}
@@ -6817,7 +6808,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;
}
@@ -7010,51 +7001,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 *
@@ -7066,43 +7012,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 58acf85a..e27d0e6f 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)
@@ -79,8 +78,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);
@@ -93,7 +90,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[] = {
@@ -122,7 +118,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
@@ -217,8 +212,6 @@ program
| program LEX_EOF
{
next_sourcefile();
- if (sourcefile == srcfiles)
- process_deferred();
}
| program error
{
@@ -235,6 +228,7 @@ rule
: pattern action
{
(void) append_rule($1, $2);
+ first_rule = false;
}
| pattern statement_term
{
@@ -283,7 +277,6 @@ source
library
: FILENAME
{
- extensions_used = true;
if (load_library($1) < 0)
YYABORT;
efree($1->lextok);
@@ -2439,8 +2432,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;
}
@@ -4479,7 +4470,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;
}
@@ -4672,51 +4663,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 *
@@ -4728,43 +4674,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 befe471b..877a0b63 100644
--- a/builtin.c
+++ b/builtin.c
@@ -510,6 +510,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 5304cd64..4e169abf 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 19278667..020057bb 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 e501b297..fe51de53 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
@@ -32620,7 +32619,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)
@@ -34454,559 +34453,559 @@ 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: Print271892
-Node: Print Examples273349
-Node: Output Separators276128
-Node: OFMT278146
-Node: Printf279500
-Node: Basic Printf280285
-Node: Control Letters281855
-Node: Format Modifiers285838
-Node: Printf Examples291847
-Node: Redirection294333
-Node: Special FD301174
-Ref: Special FD-Footnote-1304334
-Node: Special Files304408
-Node: Other Inherited Files305025
-Node: Special Network306025
-Node: Special Caveats306887
-Node: Close Files And Pipes307838
-Ref: Close Files And Pipes-Footnote-1315020
-Ref: Close Files And Pipes-Footnote-2315168
-Node: Output Summary315318
-Node: Output Exercises316316
-Node: Expressions316996
-Node: Values318181
-Node: Constants318859
-Node: Scalar Constants319550
-Ref: Scalar Constants-Footnote-1320409
-Node: Nondecimal-numbers320659
-Node: Regexp Constants323677
-Node: Using Constant Regexps324202
-Node: Variables327345
-Node: Using Variables328000
-Node: Assignment Options329911
-Node: Conversion331786
-Node: Strings And Numbers332310
-Ref: Strings And Numbers-Footnote-1335375
-Node: Locale influences conversions335484
-Ref: table-locale-affects338231
-Node: All Operators338819
-Node: Arithmetic Ops339449
-Node: Concatenation341954
-Ref: Concatenation-Footnote-1344773
-Node: Assignment Ops344879
-Ref: table-assign-ops349858
-Node: Increment Ops351130
-Node: Truth Values and Conditions354568
-Node: Truth Values355653
-Node: Typing and Comparison356702
-Node: Variable Typing357512
-Node: Comparison Operators361165
-Ref: table-relational-ops361575
-Node: POSIX String Comparison365070
-Ref: POSIX String Comparison-Footnote-1366142
-Node: Boolean Ops366280
-Ref: Boolean Ops-Footnote-1370759
-Node: Conditional Exp370850
-Node: Function Calls372577
-Node: Precedence376457
-Node: Locales380118
-Node: Expressions Summary381750
-Node: Patterns and Actions384310
-Node: Pattern Overview385430
-Node: Regexp Patterns387109
-Node: Expression Patterns387652
-Node: Ranges391362
-Node: BEGIN/END394468
-Node: Using BEGIN/END395229
-Ref: Using BEGIN/END-Footnote-1397963
-Node: I/O And BEGIN/END398069
-Node: BEGINFILE/ENDFILE400383
-Node: Empty403284
-Node: Using Shell Variables403601
-Node: Action Overview405874
-Node: Statements408200
-Node: If Statement410048
-Node: While Statement411543
-Node: Do Statement413572
-Node: For Statement414716
-Node: Switch Statement417873
-Node: Break Statement420255
-Node: Continue Statement422296
-Node: Next Statement424123
-Node: Nextfile Statement426504
-Node: Exit Statement429134
-Node: Built-in Variables431537
-Node: User-modified432670
-Ref: User-modified-Footnote-1440351
-Node: Auto-set440413
-Ref: Auto-set-Footnote-1454105
-Ref: Auto-set-Footnote-2454310
-Node: ARGC and ARGV454366
-Node: Pattern Action Summary458584
-Node: Arrays461011
-Node: Array Basics462340
-Node: Array Intro463184
-Ref: figure-array-elements465148
-Ref: Array Intro-Footnote-1467674
-Node: Reference to Elements467802
-Node: Assigning Elements470254
-Node: Array Example470745
-Node: Scanning an Array472503
-Node: Controlling Scanning475519
-Ref: Controlling Scanning-Footnote-1480715
-Node: Numeric Array Subscripts481031
-Node: Uninitialized Subscripts483216
-Node: Delete484833
-Ref: Delete-Footnote-1487576
-Node: Multidimensional487633
-Node: Multiscanning490730
-Node: Arrays of Arrays492319
-Node: Arrays Summary497078
-Node: Functions499170
-Node: Built-in500069
-Node: Calling Built-in501147
-Node: Numeric Functions503138
-Ref: Numeric Functions-Footnote-1507957
-Ref: Numeric Functions-Footnote-2508314
-Ref: Numeric Functions-Footnote-3508362
-Node: String Functions508634
-Ref: String Functions-Footnote-1532109
-Ref: String Functions-Footnote-2532238
-Ref: String Functions-Footnote-3532486
-Node: Gory Details532573
-Ref: table-sub-escapes534354
-Ref: table-sub-proposed535874
-Ref: table-posix-sub537238
-Ref: table-gensub-escapes538774
-Ref: Gory Details-Footnote-1539606
-Node: I/O Functions539757
-Ref: I/O Functions-Footnote-1546975
-Node: Time Functions547122
-Ref: Time Functions-Footnote-1557610
-Ref: Time Functions-Footnote-2557678
-Ref: Time Functions-Footnote-3557836
-Ref: Time Functions-Footnote-4557947
-Ref: Time Functions-Footnote-5558059
-Ref: Time Functions-Footnote-6558286
-Node: Bitwise Functions558552
-Ref: table-bitwise-ops559114
-Ref: Bitwise Functions-Footnote-1563423
-Node: Type Functions563592
-Node: I18N Functions564743
-Node: User-defined566388
-Node: Definition Syntax567193
-Ref: Definition Syntax-Footnote-1572600
-Node: Function Example572671
-Ref: Function Example-Footnote-1575590
-Node: Function Caveats575612
-Node: Calling A Function576130
-Node: Variable Scope577088
-Node: Pass By Value/Reference580076
-Node: Return Statement583571
-Node: Dynamic Typing586552
-Node: Indirect Calls587481
-Ref: Indirect Calls-Footnote-1598783
-Node: Functions Summary598911
-Node: Library Functions601613
-Ref: Library Functions-Footnote-1605222
-Ref: Library Functions-Footnote-2605365
-Node: Library Names605536
-Ref: Library Names-Footnote-1608990
-Ref: Library Names-Footnote-2609213
-Node: General Functions609299
-Node: Strtonum Function610402
-Node: Assert Function613424
-Node: Round Function616748
-Node: Cliff Random Function618289
-Node: Ordinal Functions619305
-Ref: Ordinal Functions-Footnote-1622368
-Ref: Ordinal Functions-Footnote-2622620
-Node: Join Function622831
-Ref: Join Function-Footnote-1624600
-Node: Getlocaltime Function624800
-Node: Readfile Function628544
-Node: Shell Quoting630514
-Node: Data File Management631915
-Node: Filetrans Function632547
-Node: Rewind Function636603
-Node: File Checking637990
-Ref: File Checking-Footnote-1639322
-Node: Empty Files639523
-Node: Ignoring Assigns641502
-Node: Getopt Function643053
-Ref: Getopt Function-Footnote-1654515
-Node: Passwd Functions654715
-Ref: Passwd Functions-Footnote-1663552
-Node: Group Functions663640
-Ref: Group Functions-Footnote-1671534
-Node: Walking Arrays671747
-Node: Library Functions Summary673350
-Node: Library Exercises674751
-Node: Sample Programs676031
-Node: Running Examples676801
-Node: Clones677529
-Node: Cut Program678753
-Node: Egrep Program688472
-Ref: Egrep Program-Footnote-1695970
-Node: Id Program696080
-Node: Split Program699725
-Ref: Split Program-Footnote-1703173
-Node: Tee Program703301
-Node: Uniq Program706090
-Node: Wc Program713509
-Ref: Wc Program-Footnote-1717759
-Node: Miscellaneous Programs717853
-Node: Dupword Program719066
-Node: Alarm Program721097
-Node: Translate Program725901
-Ref: Translate Program-Footnote-1730466
-Node: Labels Program730736
-Ref: Labels Program-Footnote-1734087
-Node: Word Sorting734171
-Node: History Sorting738242
-Node: Extract Program740078
-Node: Simple Sed747603
-Node: Igawk Program750671
-Ref: Igawk Program-Footnote-1764995
-Ref: Igawk Program-Footnote-2765196
-Ref: Igawk Program-Footnote-3765318
-Node: Anagram Program765433
-Node: Signature Program768490
-Node: Programs Summary769737
-Node: Programs Exercises770930
-Ref: Programs Exercises-Footnote-1775061
-Node: Advanced Features775152
-Node: Nondecimal Data777100
-Node: Array Sorting778690
-Node: Controlling Array Traversal779387
-Ref: Controlling Array Traversal-Footnote-1787720
-Node: Array Sorting Functions787838
-Ref: Array Sorting Functions-Footnote-1791727
-Node: Two-way I/O791923
-Ref: Two-way I/O-Footnote-1796868
-Ref: Two-way I/O-Footnote-2797054
-Node: TCP/IP Networking797136
-Node: Profiling800009
-Node: Advanced Features Summary808286
-Node: Internationalization810219
-Node: I18N and L10N811699
-Node: Explaining gettext812385
-Ref: Explaining gettext-Footnote-1817410
-Ref: Explaining gettext-Footnote-2817594
-Node: Programmer i18n817759
-Ref: Programmer i18n-Footnote-1822625
-Node: Translator i18n822674
-Node: String Extraction823468
-Ref: String Extraction-Footnote-1824599
-Node: Printf Ordering824685
-Ref: Printf Ordering-Footnote-1827471
-Node: I18N Portability827535
-Ref: I18N Portability-Footnote-1829990
-Node: I18N Example830053
-Ref: I18N Example-Footnote-1832856
-Node: Gawk I18N832928
-Node: I18N Summary833566
-Node: Debugger834905
-Node: Debugging835927
-Node: Debugging Concepts836368
-Node: Debugging Terms838221
-Node: Awk Debugging840793
-Node: Sample Debugging Session841687
-Node: Debugger Invocation842207
-Node: Finding The Bug843591
-Node: List of Debugger Commands850066
-Node: Breakpoint Control851399
-Node: Debugger Execution Control855095
-Node: Viewing And Changing Data858459
-Node: Execution Stack861837
-Node: Debugger Info863474
-Node: Miscellaneous Debugger Commands867491
-Node: Readline Support872520
-Node: Limitations873412
-Node: Debugging Summary875526
-Node: Arbitrary Precision Arithmetic876694
-Node: Computer Arithmetic878110
-Ref: table-numeric-ranges881708
-Ref: Computer Arithmetic-Footnote-1882567
-Node: Math Definitions882624
-Ref: table-ieee-formats885912
-Ref: Math Definitions-Footnote-1886516
-Node: MPFR features886621
-Node: FP Math Caution888292
-Ref: FP Math Caution-Footnote-1889342
-Node: Inexactness of computations889711
-Node: Inexact representation890670
-Node: Comparing FP Values892027
-Node: Errors accumulate893109
-Node: Getting Accuracy894542
-Node: Try To Round897204
-Node: Setting precision898103
-Ref: table-predefined-precision-strings898787
-Node: Setting the rounding mode900576
-Ref: table-gawk-rounding-modes900940
-Ref: Setting the rounding mode-Footnote-1904395
-Node: Arbitrary Precision Integers904574
-Ref: Arbitrary Precision Integers-Footnote-1909473
-Node: POSIX Floating Point Problems909622
-Ref: POSIX Floating Point Problems-Footnote-1913495
-Node: Floating point summary913533
-Node: Dynamic Extensions915727
-Node: Extension Intro917279
-Node: Plugin License918545
-Node: Extension Mechanism Outline919342
-Ref: figure-load-extension919770
-Ref: figure-register-new-function921250
-Ref: figure-call-new-function922254
-Node: Extension API Description924240
-Node: Extension API Functions Introduction925690
-Node: General Data Types930514
-Ref: General Data Types-Footnote-1936253
-Node: Memory Allocation Functions936552
-Ref: Memory Allocation Functions-Footnote-1939391
-Node: Constructor Functions939487
-Node: Registration Functions941221
-Node: Extension Functions941906
-Node: Exit Callback Functions944203
-Node: Extension Version String945451
-Node: Input Parsers946116
-Node: Output Wrappers955995
-Node: Two-way processors960510
-Node: Printing Messages962714
-Ref: Printing Messages-Footnote-1963790
-Node: Updating `ERRNO'963942
-Node: Requesting Values964682
-Ref: table-value-types-returned965410
-Node: Accessing Parameters966367
-Node: Symbol Table Access967598
-Node: Symbol table by name968112
-Node: Symbol table by cookie970093
-Ref: Symbol table by cookie-Footnote-1974237
-Node: Cached values974300
-Ref: Cached values-Footnote-1977799
-Node: Array Manipulation977890
-Ref: Array Manipulation-Footnote-1978988
-Node: Array Data Types979025
-Ref: Array Data Types-Footnote-1981680
-Node: Array Functions981772
-Node: Flattening Arrays985626
-Node: Creating Arrays992518
-Node: Extension API Variables997289
-Node: Extension Versioning997925
-Node: Extension API Informational Variables999826
-Node: Extension API Boilerplate1000891
-Node: Finding Extensions1004700
-Node: Extension Example1005260
-Node: Internal File Description1006032
-Node: Internal File Ops1010099
-Ref: Internal File Ops-Footnote-11021769
-Node: Using Internal File Ops1021909
-Ref: Using Internal File Ops-Footnote-11024292
-Node: Extension Samples1024565
-Node: Extension Sample File Functions1026091
-Node: Extension Sample Fnmatch1033729
-Node: Extension Sample Fork1035220
-Node: Extension Sample Inplace1036435
-Node: Extension Sample Ord1038110
-Node: Extension Sample Readdir1038946
-Ref: table-readdir-file-types1039822
-Node: Extension Sample Revout1040633
-Node: Extension Sample Rev2way1041223
-Node: Extension Sample Read write array1041963
-Node: Extension Sample Readfile1043903
-Node: Extension Sample Time1044998
-Node: Extension Sample API Tests1046347
-Node: gawkextlib1046838
-Node: Extension summary1049496
-Node: Extension Exercises1053185
-Node: Language History1053907
-Node: V7/SVR3.11055563
-Node: SVR41057744
-Node: POSIX1059189
-Node: BTL1060578
-Node: POSIX/GNU1061312
-Node: Feature History1066936
-Node: Common Extensions1080034
-Node: Ranges and Locales1081358
-Ref: Ranges and Locales-Footnote-11085976
-Ref: Ranges and Locales-Footnote-21086003
-Ref: Ranges and Locales-Footnote-31086237
-Node: Contributors1086458
-Node: History summary1091999
-Node: Installation1093369
-Node: Gawk Distribution1094315
-Node: Getting1094799
-Node: Extracting1095622
-Node: Distribution contents1097257
-Node: Unix Installation1103322
-Node: Quick Installation1104005
-Node: Shell Startup Files1106416
-Node: Additional Configuration Options1107495
-Node: Configuration Philosophy1109234
-Node: Non-Unix Installation1111603
-Node: PC Installation1112061
-Node: PC Binary Installation1113380
-Node: PC Compiling1115228
-Ref: PC Compiling-Footnote-11118249
-Node: PC Testing1118358
-Node: PC Using1119534
-Node: Cygwin1123649
-Node: MSYS1124472
-Node: VMS Installation1124972
-Node: VMS Compilation1125764
-Ref: VMS Compilation-Footnote-11126986
-Node: VMS Dynamic Extensions1127044
-Node: VMS Installation Details1128728
-Node: VMS Running1130980
-Node: VMS GNV1133816
-Node: VMS Old Gawk1134550
-Node: Bugs1135020
-Node: Other Versions1138903
-Node: Installation summary1145331
-Node: Notes1146387
-Node: Compatibility Mode1147252
-Node: Additions1148034
-Node: Accessing The Source1148959
-Node: Adding Code1150395
-Node: New Ports1156560
-Node: Derived Files1161042
-Ref: Derived Files-Footnote-11166517
-Ref: Derived Files-Footnote-21166551
-Ref: Derived Files-Footnote-31167147
-Node: Future Extensions1167261
-Node: Implementation Limitations1167867
-Node: Extension Design1169115
-Node: Old Extension Problems1170269
-Ref: Old Extension Problems-Footnote-11171786
-Node: Extension New Mechanism Goals1171843
-Ref: Extension New Mechanism Goals-Footnote-11175203
-Node: Extension Other Design Decisions1175392
-Node: Extension Future Growth1177500
-Node: Old Extension Mechanism1178336
-Node: Notes summary1180098
-Node: Basic Concepts1181284
-Node: Basic High Level1181965
-Ref: figure-general-flow1182237
-Ref: figure-process-flow1182836
-Ref: Basic High Level-Footnote-11186065
-Node: Basic Data Typing1186250
-Node: Glossary1189578
-Node: Copying1214736
-Node: GNU Free Documentation License1252292
-Node: Index1277428
+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: Print271959
+Node: Print Examples273416
+Node: Output Separators276195
+Node: OFMT278213
+Node: Printf279567
+Node: Basic Printf280352
+Node: Control Letters281922
+Node: Format Modifiers285905
+Node: Printf Examples291914
+Node: Redirection294400
+Node: Special FD301241
+Ref: Special FD-Footnote-1304401
+Node: Special Files304475
+Node: Other Inherited Files305092
+Node: Special Network306092
+Node: Special Caveats306954
+Node: Close Files And Pipes307905
+Ref: Close Files And Pipes-Footnote-1315087
+Ref: Close Files And Pipes-Footnote-2315235
+Node: Output Summary315385
+Node: Output Exercises316383
+Node: Expressions317063
+Node: Values318248
+Node: Constants318926
+Node: Scalar Constants319617
+Ref: Scalar Constants-Footnote-1320476
+Node: Nondecimal-numbers320726
+Node: Regexp Constants323744
+Node: Using Constant Regexps324269
+Node: Variables327412
+Node: Using Variables328067
+Node: Assignment Options329978
+Node: Conversion331853
+Node: Strings And Numbers332377
+Ref: Strings And Numbers-Footnote-1335442
+Node: Locale influences conversions335551
+Ref: table-locale-affects338298
+Node: All Operators338886
+Node: Arithmetic Ops339516
+Node: Concatenation342021
+Ref: Concatenation-Footnote-1344840
+Node: Assignment Ops344946
+Ref: table-assign-ops349925
+Node: Increment Ops351197
+Node: Truth Values and Conditions354635
+Node: Truth Values355720
+Node: Typing and Comparison356769
+Node: Variable Typing357579
+Node: Comparison Operators361232
+Ref: table-relational-ops361642
+Node: POSIX String Comparison365137
+Ref: POSIX String Comparison-Footnote-1366209
+Node: Boolean Ops366347
+Ref: Boolean Ops-Footnote-1370826
+Node: Conditional Exp370917
+Node: Function Calls372644
+Node: Precedence376524
+Node: Locales380185
+Node: Expressions Summary381817
+Node: Patterns and Actions384377
+Node: Pattern Overview385497
+Node: Regexp Patterns387176
+Node: Expression Patterns387719
+Node: Ranges391429
+Node: BEGIN/END394535
+Node: Using BEGIN/END395296
+Ref: Using BEGIN/END-Footnote-1398030
+Node: I/O And BEGIN/END398136
+Node: BEGINFILE/ENDFILE400450
+Node: Empty403351
+Node: Using Shell Variables403668
+Node: Action Overview405941
+Node: Statements408267
+Node: If Statement410115
+Node: While Statement411610
+Node: Do Statement413639
+Node: For Statement414783
+Node: Switch Statement417940
+Node: Break Statement420322
+Node: Continue Statement422363
+Node: Next Statement424190
+Node: Nextfile Statement426571
+Node: Exit Statement429201
+Node: Built-in Variables431604
+Node: User-modified432737
+Ref: User-modified-Footnote-1440418
+Node: Auto-set440480
+Ref: Auto-set-Footnote-1454172
+Ref: Auto-set-Footnote-2454377
+Node: ARGC and ARGV454433
+Node: Pattern Action Summary458651
+Node: Arrays461078
+Node: Array Basics462407
+Node: Array Intro463251
+Ref: figure-array-elements465215
+Ref: Array Intro-Footnote-1467741
+Node: Reference to Elements467869
+Node: Assigning Elements470321
+Node: Array Example470812
+Node: Scanning an Array472570
+Node: Controlling Scanning475586
+Ref: Controlling Scanning-Footnote-1480782
+Node: Numeric Array Subscripts481098
+Node: Uninitialized Subscripts483283
+Node: Delete484900
+Ref: Delete-Footnote-1487643
+Node: Multidimensional487700
+Node: Multiscanning490797
+Node: Arrays of Arrays492386
+Node: Arrays Summary497145
+Node: Functions499237
+Node: Built-in500136
+Node: Calling Built-in501214
+Node: Numeric Functions503205
+Ref: Numeric Functions-Footnote-1508024
+Ref: Numeric Functions-Footnote-2508381
+Ref: Numeric Functions-Footnote-3508429
+Node: String Functions508701
+Ref: String Functions-Footnote-1532176
+Ref: String Functions-Footnote-2532305
+Ref: String Functions-Footnote-3532553
+Node: Gory Details532640
+Ref: table-sub-escapes534421
+Ref: table-sub-proposed535941
+Ref: table-posix-sub537305
+Ref: table-gensub-escapes538841
+Ref: Gory Details-Footnote-1539673
+Node: I/O Functions539824
+Ref: I/O Functions-Footnote-1547042
+Node: Time Functions547189
+Ref: Time Functions-Footnote-1557677
+Ref: Time Functions-Footnote-2557745
+Ref: Time Functions-Footnote-3557903
+Ref: Time Functions-Footnote-4558014
+Ref: Time Functions-Footnote-5558126
+Ref: Time Functions-Footnote-6558353
+Node: Bitwise Functions558619
+Ref: table-bitwise-ops559181
+Ref: Bitwise Functions-Footnote-1563490
+Node: Type Functions563659
+Node: I18N Functions564810
+Node: User-defined566455
+Node: Definition Syntax567260
+Ref: Definition Syntax-Footnote-1572667
+Node: Function Example572738
+Ref: Function Example-Footnote-1575657
+Node: Function Caveats575679
+Node: Calling A Function576197
+Node: Variable Scope577155
+Node: Pass By Value/Reference580143
+Node: Return Statement583638
+Node: Dynamic Typing586619
+Node: Indirect Calls587548
+Ref: Indirect Calls-Footnote-1598850
+Node: Functions Summary598978
+Node: Library Functions601680
+Ref: Library Functions-Footnote-1605289
+Ref: Library Functions-Footnote-2605432
+Node: Library Names605603
+Ref: Library Names-Footnote-1609057
+Ref: Library Names-Footnote-2609280
+Node: General Functions609366
+Node: Strtonum Function610469
+Node: Assert Function613491
+Node: Round Function616815
+Node: Cliff Random Function618356
+Node: Ordinal Functions619372
+Ref: Ordinal Functions-Footnote-1622435
+Ref: Ordinal Functions-Footnote-2622687
+Node: Join Function622898
+Ref: Join Function-Footnote-1624667
+Node: Getlocaltime Function624867
+Node: Readfile Function628611
+Node: Shell Quoting630581
+Node: Data File Management631982
+Node: Filetrans Function632614
+Node: Rewind Function636670
+Node: File Checking638057
+Ref: File Checking-Footnote-1639389
+Node: Empty Files639590
+Node: Ignoring Assigns641569
+Node: Getopt Function643120
+Ref: Getopt Function-Footnote-1654582
+Node: Passwd Functions654782
+Ref: Passwd Functions-Footnote-1663619
+Node: Group Functions663707
+Ref: Group Functions-Footnote-1671601
+Node: Walking Arrays671814
+Node: Library Functions Summary673417
+Node: Library Exercises674818
+Node: Sample Programs676098
+Node: Running Examples676868
+Node: Clones677596
+Node: Cut Program678820
+Node: Egrep Program688539
+Ref: Egrep Program-Footnote-1696037
+Node: Id Program696147
+Node: Split Program699792
+Ref: Split Program-Footnote-1703240
+Node: Tee Program703368
+Node: Uniq Program706157
+Node: Wc Program713576
+Ref: Wc Program-Footnote-1717826
+Node: Miscellaneous Programs717920
+Node: Dupword Program719133
+Node: Alarm Program721164
+Node: Translate Program725968
+Ref: Translate Program-Footnote-1730533
+Node: Labels Program730803
+Ref: Labels Program-Footnote-1734154
+Node: Word Sorting734238
+Node: History Sorting738309
+Node: Extract Program740145
+Node: Simple Sed747670
+Node: Igawk Program750738
+Ref: Igawk Program-Footnote-1765062
+Ref: Igawk Program-Footnote-2765263
+Ref: Igawk Program-Footnote-3765385
+Node: Anagram Program765500
+Node: Signature Program768557
+Node: Programs Summary769804
+Node: Programs Exercises770997
+Ref: Programs Exercises-Footnote-1775128
+Node: Advanced Features775219
+Node: Nondecimal Data777167
+Node: Array Sorting778757
+Node: Controlling Array Traversal779454
+Ref: Controlling Array Traversal-Footnote-1787787
+Node: Array Sorting Functions787905
+Ref: Array Sorting Functions-Footnote-1791794
+Node: Two-way I/O791990
+Ref: Two-way I/O-Footnote-1796935
+Ref: Two-way I/O-Footnote-2797121
+Node: TCP/IP Networking797203
+Node: Profiling800076
+Node: Advanced Features Summary808353
+Node: Internationalization810286
+Node: I18N and L10N811766
+Node: Explaining gettext812452
+Ref: Explaining gettext-Footnote-1817477
+Ref: Explaining gettext-Footnote-2817661
+Node: Programmer i18n817826
+Ref: Programmer i18n-Footnote-1822692
+Node: Translator i18n822741
+Node: String Extraction823535
+Ref: String Extraction-Footnote-1824666
+Node: Printf Ordering824752
+Ref: Printf Ordering-Footnote-1827538
+Node: I18N Portability827602
+Ref: I18N Portability-Footnote-1830057
+Node: I18N Example830120
+Ref: I18N Example-Footnote-1832923
+Node: Gawk I18N832995
+Node: I18N Summary833633
+Node: Debugger834972
+Node: Debugging835994
+Node: Debugging Concepts836435
+Node: Debugging Terms838288
+Node: Awk Debugging840860
+Node: Sample Debugging Session841754
+Node: Debugger Invocation842274
+Node: Finding The Bug843658
+Node: List of Debugger Commands850133
+Node: Breakpoint Control851466
+Node: Debugger Execution Control855162
+Node: Viewing And Changing Data858526
+Node: Execution Stack861904
+Node: Debugger Info863541
+Node: Miscellaneous Debugger Commands867558
+Node: Readline Support872587
+Node: Limitations873479
+Node: Debugging Summary875593
+Node: Arbitrary Precision Arithmetic876761
+Node: Computer Arithmetic878177
+Ref: table-numeric-ranges881775
+Ref: Computer Arithmetic-Footnote-1882634
+Node: Math Definitions882691
+Ref: table-ieee-formats885979
+Ref: Math Definitions-Footnote-1886583
+Node: MPFR features886688
+Node: FP Math Caution888359
+Ref: FP Math Caution-Footnote-1889409
+Node: Inexactness of computations889778
+Node: Inexact representation890737
+Node: Comparing FP Values892094
+Node: Errors accumulate893176
+Node: Getting Accuracy894609
+Node: Try To Round897271
+Node: Setting precision898170
+Ref: table-predefined-precision-strings898854
+Node: Setting the rounding mode900643
+Ref: table-gawk-rounding-modes901007
+Ref: Setting the rounding mode-Footnote-1904462
+Node: Arbitrary Precision Integers904641
+Ref: Arbitrary Precision Integers-Footnote-1909540
+Node: POSIX Floating Point Problems909689
+Ref: POSIX Floating Point Problems-Footnote-1913562
+Node: Floating point summary913600
+Node: Dynamic Extensions915794
+Node: Extension Intro917346
+Node: Plugin License918612
+Node: Extension Mechanism Outline919409
+Ref: figure-load-extension919837
+Ref: figure-register-new-function921317
+Ref: figure-call-new-function922321
+Node: Extension API Description924307
+Node: Extension API Functions Introduction925757
+Node: General Data Types930581
+Ref: General Data Types-Footnote-1936320
+Node: Memory Allocation Functions936619
+Ref: Memory Allocation Functions-Footnote-1939458
+Node: Constructor Functions939554
+Node: Registration Functions941288
+Node: Extension Functions941973
+Node: Exit Callback Functions944270
+Node: Extension Version String945518
+Node: Input Parsers946183
+Node: Output Wrappers956062
+Node: Two-way processors960577
+Node: Printing Messages962781
+Ref: Printing Messages-Footnote-1963857
+Node: Updating `ERRNO'964009
+Node: Requesting Values964749
+Ref: table-value-types-returned965477
+Node: Accessing Parameters966434
+Node: Symbol Table Access967665
+Node: Symbol table by name968179
+Node: Symbol table by cookie970160
+Ref: Symbol table by cookie-Footnote-1974304
+Node: Cached values974367
+Ref: Cached values-Footnote-1977866
+Node: Array Manipulation977957
+Ref: Array Manipulation-Footnote-1979055
+Node: Array Data Types979092
+Ref: Array Data Types-Footnote-1981747
+Node: Array Functions981839
+Node: Flattening Arrays985693
+Node: Creating Arrays992585
+Node: Extension API Variables997356
+Node: Extension Versioning997992
+Node: Extension API Informational Variables999893
+Node: Extension API Boilerplate1000958
+Node: Finding Extensions1004767
+Node: Extension Example1005327
+Node: Internal File Description1006099
+Node: Internal File Ops1010166
+Ref: Internal File Ops-Footnote-11021836
+Node: Using Internal File Ops1021976
+Ref: Using Internal File Ops-Footnote-11024359
+Node: Extension Samples1024632
+Node: Extension Sample File Functions1026158
+Node: Extension Sample Fnmatch1033796
+Node: Extension Sample Fork1035287
+Node: Extension Sample Inplace1036502
+Node: Extension Sample Ord1038177
+Node: Extension Sample Readdir1039013
+Ref: table-readdir-file-types1039889
+Node: Extension Sample Revout1040700
+Node: Extension Sample Rev2way1041290
+Node: Extension Sample Read write array1042030
+Node: Extension Sample Readfile1043970
+Node: Extension Sample Time1045065
+Node: Extension Sample API Tests1046414
+Node: gawkextlib1046905
+Node: Extension summary1049563
+Node: Extension Exercises1053252
+Node: Language History1053974
+Node: V7/SVR3.11055630
+Node: SVR41057811
+Node: POSIX1059256
+Node: BTL1060645
+Node: POSIX/GNU1061379
+Node: Feature History1067003
+Node: Common Extensions1080101
+Node: Ranges and Locales1081425
+Ref: Ranges and Locales-Footnote-11086043
+Ref: Ranges and Locales-Footnote-21086070
+Ref: Ranges and Locales-Footnote-31086304
+Node: Contributors1086525
+Node: History summary1092066
+Node: Installation1093436
+Node: Gawk Distribution1094382
+Node: Getting1094866
+Node: Extracting1095689
+Node: Distribution contents1097324
+Node: Unix Installation1103389
+Node: Quick Installation1104072
+Node: Shell Startup Files1106483
+Node: Additional Configuration Options1107562
+Node: Configuration Philosophy1109301
+Node: Non-Unix Installation1111670
+Node: PC Installation1112128
+Node: PC Binary Installation1113447
+Node: PC Compiling1115295
+Ref: PC Compiling-Footnote-11118316
+Node: PC Testing1118425
+Node: PC Using1119601
+Node: Cygwin1123716
+Node: MSYS1124539
+Node: VMS Installation1125039
+Node: VMS Compilation1125831
+Ref: VMS Compilation-Footnote-11127053
+Node: VMS Dynamic Extensions1127111
+Node: VMS Installation Details1128795
+Node: VMS Running1131047
+Node: VMS GNV1133883
+Node: VMS Old Gawk1134617
+Node: Bugs1135087
+Node: Other Versions1138970
+Node: Installation summary1145398
+Node: Notes1146454
+Node: Compatibility Mode1147319
+Node: Additions1148101
+Node: Accessing The Source1149026
+Node: Adding Code1150462
+Node: New Ports1156627
+Node: Derived Files1161109
+Ref: Derived Files-Footnote-11166584
+Ref: Derived Files-Footnote-21166618
+Ref: Derived Files-Footnote-31167214
+Node: Future Extensions1167328
+Node: Implementation Limitations1167934
+Node: Extension Design1169182
+Node: Old Extension Problems1170336
+Ref: Old Extension Problems-Footnote-11171853
+Node: Extension New Mechanism Goals1171910
+Ref: Extension New Mechanism Goals-Footnote-11175270
+Node: Extension Other Design Decisions1175459
+Node: Extension Future Growth1177567
+Node: Old Extension Mechanism1178403
+Node: Notes summary1180165
+Node: Basic Concepts1181351
+Node: Basic High Level1182032
+Ref: figure-general-flow1182304
+Ref: figure-process-flow1182903
+Ref: Basic High Level-Footnote-11186132
+Node: Basic Data Typing1186317
+Node: Glossary1189645
+Node: Copying1214803
+Node: GNU Free Documentation License1252359
+Node: Index1277495

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 57c37746..035d1476 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 b850dd15..8034a6b6 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
+}
+