From 0e829ea9a5062cac730f5a8368ab2062c1ef67fd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 14 Jan 2015 19:51:49 +0200 Subject: Remove deferred variables. --- ChangeLog | 11 + awk.h | 1 - awkgram.c | 806 +++++++++++++++++++++++++------------------------------ awkgram.y | 88 +----- builtin.c | 3 + main.c | 6 +- test/ChangeLog | 4 + test/dumpvars.ok | 2 + test/id.ok | 1 + 9 files changed, 387 insertions(+), 535 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef077154..7de69351 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2015-01-14 Arnold D. Robbins + + 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 * configure.ac: Update debug flags if developing. diff --git a/awk.h b/awk.h index 3abad6f8..92baa7a7 100644 --- a/awk.h +++ b/awk.h @@ -1322,7 +1322,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 b24e6027..99f067e7 100644 --- a/awkgram.c +++ b/awkgram.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); @@ -131,7 +128,6 @@ static int one_line_close(int fd); 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[] = { @@ -160,7 +156,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 @@ -196,7 +191,7 @@ extern double fmod(double x, double y); #define YYSTYPE INSTRUCTION * -#line 200 "awkgram.c" /* yacc.c:339 */ +#line 195 "awkgram.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -350,7 +345,7 @@ int yyparse (void); /* Copy the second part of user declarations. */ -#line 354 "awkgram.c" /* yacc.c:358 */ +#line 349 "awkgram.c" /* yacc.c:358 */ #ifdef short # undef short @@ -652,25 +647,25 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 199, 199, 201, 206, 207, 213, 225, 229, 240, - 246, 251, 259, 267, 269, 274, 283, 285, 291, 292, - 294, 320, 331, 342, 348, 357, 367, 369, 371, 377, - 382, 383, 387, 406, 405, 439, 441, 446, 447, 460, - 465, 466, 470, 472, 474, 481, 571, 613, 655, 768, - 775, 782, 792, 801, 810, 819, 830, 846, 845, 869, - 881, 881, 979, 979, 1012, 1042, 1048, 1049, 1055, 1056, - 1063, 1068, 1080, 1094, 1096, 1104, 1109, 1111, 1119, 1121, - 1130, 1131, 1139, 1144, 1144, 1155, 1159, 1167, 1168, 1171, - 1173, 1178, 1179, 1188, 1189, 1194, 1199, 1205, 1207, 1209, - 1216, 1217, 1223, 1224, 1229, 1231, 1236, 1238, 1246, 1251, - 1260, 1267, 1269, 1271, 1287, 1297, 1304, 1306, 1311, 1313, - 1315, 1323, 1325, 1330, 1332, 1337, 1339, 1341, 1391, 1393, - 1395, 1397, 1399, 1401, 1403, 1405, 1419, 1424, 1429, 1454, - 1460, 1462, 1464, 1466, 1468, 1470, 1475, 1479, 1511, 1513, - 1519, 1525, 1538, 1539, 1540, 1545, 1550, 1554, 1558, 1573, - 1586, 1591, 1627, 1645, 1646, 1652, 1653, 1658, 1660, 1667, - 1684, 1701, 1703, 1710, 1715, 1723, 1733, 1745, 1754, 1758, - 1762, 1766, 1770, 1774, 1777, 1779, 1783, 1787, 1791 + 0, 194, 194, 196, 201, 202, 206, 218, 222, 233, + 239, 244, 252, 260, 262, 267, 275, 277, 283, 284, + 286, 312, 323, 334, 340, 349, 359, 361, 363, 369, + 374, 375, 379, 398, 397, 431, 433, 438, 439, 452, + 457, 458, 462, 464, 466, 473, 563, 605, 647, 760, + 767, 774, 784, 793, 802, 811, 822, 838, 837, 861, + 873, 873, 971, 971, 1004, 1034, 1040, 1041, 1047, 1048, + 1055, 1060, 1072, 1086, 1088, 1096, 1101, 1103, 1111, 1113, + 1122, 1123, 1131, 1136, 1136, 1147, 1151, 1159, 1160, 1163, + 1165, 1170, 1171, 1180, 1181, 1186, 1191, 1197, 1199, 1201, + 1208, 1209, 1215, 1216, 1221, 1223, 1228, 1230, 1238, 1243, + 1252, 1259, 1261, 1263, 1279, 1289, 1296, 1298, 1303, 1305, + 1307, 1315, 1317, 1322, 1324, 1329, 1331, 1333, 1383, 1385, + 1387, 1389, 1391, 1393, 1395, 1397, 1411, 1416, 1421, 1446, + 1452, 1454, 1456, 1458, 1460, 1462, 1467, 1471, 1503, 1505, + 1511, 1517, 1530, 1531, 1532, 1537, 1542, 1546, 1550, 1565, + 1578, 1583, 1619, 1637, 1638, 1644, 1645, 1650, 1652, 1659, + 1676, 1693, 1695, 1702, 1707, 1715, 1725, 1737, 1746, 1750, + 1754, 1758, 1762, 1766, 1769, 1771, 1775, 1779, 1783 }; #endif @@ -1843,26 +1838,24 @@ yyreduce: switch (yyn) { case 3: -#line 202 "awkgram.y" /* yacc.c:1646 */ +#line 197 "awkgram.y" /* yacc.c:1646 */ { rule = 0; yyerrok; } -#line 1852 "awkgram.c" /* yacc.c:1646 */ +#line 1847 "awkgram.c" /* yacc.c:1646 */ break; case 5: -#line 208 "awkgram.y" /* yacc.c:1646 */ +#line 203 "awkgram.y" /* yacc.c:1646 */ { next_sourcefile(); - if (sourcefile == srcfiles) - process_deferred(); } -#line 1862 "awkgram.c" /* yacc.c:1646 */ +#line 1855 "awkgram.c" /* yacc.c:1646 */ break; case 6: -#line 214 "awkgram.y" /* yacc.c:1646 */ +#line 207 "awkgram.y" /* yacc.c:1646 */ { rule = 0; /* @@ -1871,19 +1864,19 @@ yyreduce: */ /* yyerrok; */ } -#line 1875 "awkgram.c" /* yacc.c:1646 */ +#line 1868 "awkgram.c" /* yacc.c:1646 */ break; case 7: -#line 226 "awkgram.y" /* yacc.c:1646 */ +#line 219 "awkgram.y" /* yacc.c:1646 */ { (void) append_rule((yyvsp[-1]), (yyvsp[0])); } -#line 1883 "awkgram.c" /* yacc.c:1646 */ +#line 1876 "awkgram.c" /* yacc.c:1646 */ break; case 8: -#line 230 "awkgram.y" /* yacc.c:1646 */ +#line 223 "awkgram.y" /* yacc.c:1646 */ { if (rule != Rule) { msg(_("%s blocks must have an action part"), ruletab[rule]); @@ -1894,39 +1887,39 @@ yyreduce: } else /* pattern rule with non-empty pattern */ (void) append_rule((yyvsp[-1]), NULL); } -#line 1898 "awkgram.c" /* yacc.c:1646 */ +#line 1891 "awkgram.c" /* yacc.c:1646 */ break; case 9: -#line 241 "awkgram.y" /* yacc.c:1646 */ +#line 234 "awkgram.y" /* yacc.c:1646 */ { in_function = NULL; (void) mk_function((yyvsp[-1]), (yyvsp[0])); yyerrok; } -#line 1908 "awkgram.c" /* yacc.c:1646 */ +#line 1901 "awkgram.c" /* yacc.c:1646 */ break; case 10: -#line 247 "awkgram.y" /* yacc.c:1646 */ +#line 240 "awkgram.y" /* yacc.c:1646 */ { want_source = false; yyerrok; } -#line 1917 "awkgram.c" /* yacc.c:1646 */ +#line 1910 "awkgram.c" /* yacc.c:1646 */ break; case 11: -#line 252 "awkgram.y" /* yacc.c:1646 */ +#line 245 "awkgram.y" /* yacc.c:1646 */ { want_source = false; yyerrok; } -#line 1926 "awkgram.c" /* yacc.c:1646 */ +#line 1919 "awkgram.c" /* yacc.c:1646 */ break; case 12: -#line 260 "awkgram.y" /* yacc.c:1646 */ +#line 253 "awkgram.y" /* yacc.c:1646 */ { if (include_source((yyvsp[0])) < 0) YYABORT; @@ -1934,60 +1927,59 @@ yyreduce: bcfree((yyvsp[0])); (yyval) = NULL; } -#line 1938 "awkgram.c" /* yacc.c:1646 */ +#line 1931 "awkgram.c" /* yacc.c:1646 */ break; case 13: -#line 268 "awkgram.y" /* yacc.c:1646 */ +#line 261 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1944 "awkgram.c" /* yacc.c:1646 */ +#line 1937 "awkgram.c" /* yacc.c:1646 */ break; case 14: -#line 270 "awkgram.y" /* yacc.c:1646 */ +#line 263 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1950 "awkgram.c" /* yacc.c:1646 */ +#line 1943 "awkgram.c" /* yacc.c:1646 */ break; case 15: -#line 275 "awkgram.y" /* yacc.c:1646 */ +#line 268 "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 1963 "awkgram.c" /* yacc.c:1646 */ +#line 1955 "awkgram.c" /* yacc.c:1646 */ break; case 16: -#line 284 "awkgram.y" /* yacc.c:1646 */ +#line 276 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1969 "awkgram.c" /* yacc.c:1646 */ +#line 1961 "awkgram.c" /* yacc.c:1646 */ break; case 17: -#line 286 "awkgram.y" /* yacc.c:1646 */ +#line 278 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1975 "awkgram.c" /* yacc.c:1646 */ +#line 1967 "awkgram.c" /* yacc.c:1646 */ break; case 18: -#line 291 "awkgram.y" /* yacc.c:1646 */ +#line 283 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; rule = Rule; } -#line 1981 "awkgram.c" /* yacc.c:1646 */ +#line 1973 "awkgram.c" /* yacc.c:1646 */ break; case 19: -#line 293 "awkgram.y" /* yacc.c:1646 */ +#line 285 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); rule = Rule; } -#line 1987 "awkgram.c" /* yacc.c:1646 */ +#line 1979 "awkgram.c" /* yacc.c:1646 */ break; case 20: -#line 295 "awkgram.y" /* yacc.c:1646 */ +#line 287 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *tp; @@ -2013,11 +2005,11 @@ yyreduce: (yyval) = list_append(list_merge((yyvsp[-3]), (yyvsp[0])), tp); rule = Rule; } -#line 2017 "awkgram.c" /* yacc.c:1646 */ +#line 2009 "awkgram.c" /* yacc.c:1646 */ break; case 21: -#line 321 "awkgram.y" /* yacc.c:1646 */ +#line 313 "awkgram.y" /* yacc.c:1646 */ { static int begin_seen = 0; if (do_lint_old && ++begin_seen == 2) @@ -2028,11 +2020,11 @@ yyreduce: (yyvsp[0])->source_file = source; (yyval) = (yyvsp[0]); } -#line 2032 "awkgram.c" /* yacc.c:1646 */ +#line 2024 "awkgram.c" /* yacc.c:1646 */ break; case 22: -#line 332 "awkgram.y" /* yacc.c:1646 */ +#line 324 "awkgram.y" /* yacc.c:1646 */ { static int end_seen = 0; if (do_lint_old && ++end_seen == 2) @@ -2043,70 +2035,70 @@ yyreduce: (yyvsp[0])->source_file = source; (yyval) = (yyvsp[0]); } -#line 2047 "awkgram.c" /* yacc.c:1646 */ +#line 2039 "awkgram.c" /* yacc.c:1646 */ break; case 23: -#line 343 "awkgram.y" /* yacc.c:1646 */ +#line 335 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->in_rule = rule = BEGINFILE; (yyvsp[0])->source_file = source; (yyval) = (yyvsp[0]); } -#line 2057 "awkgram.c" /* yacc.c:1646 */ +#line 2049 "awkgram.c" /* yacc.c:1646 */ break; case 24: -#line 349 "awkgram.y" /* yacc.c:1646 */ +#line 341 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->in_rule = rule = ENDFILE; (yyvsp[0])->source_file = source; (yyval) = (yyvsp[0]); } -#line 2067 "awkgram.c" /* yacc.c:1646 */ +#line 2059 "awkgram.c" /* yacc.c:1646 */ break; case 25: -#line 358 "awkgram.y" /* yacc.c:1646 */ +#line 350 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[-3]) == NULL) (yyval) = list_create(instruction(Op_no_op)); else (yyval) = (yyvsp[-3]); } -#line 2078 "awkgram.c" /* yacc.c:1646 */ +#line 2070 "awkgram.c" /* yacc.c:1646 */ break; case 26: -#line 368 "awkgram.y" /* yacc.c:1646 */ +#line 360 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2084 "awkgram.c" /* yacc.c:1646 */ +#line 2076 "awkgram.c" /* yacc.c:1646 */ break; case 27: -#line 370 "awkgram.y" /* yacc.c:1646 */ +#line 362 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2090 "awkgram.c" /* yacc.c:1646 */ +#line 2082 "awkgram.c" /* yacc.c:1646 */ break; case 28: -#line 372 "awkgram.y" /* yacc.c:1646 */ +#line 364 "awkgram.y" /* yacc.c:1646 */ { yyerror(_("`%s' is a built-in function, it cannot be redefined"), tokstart); YYABORT; } -#line 2100 "awkgram.c" /* yacc.c:1646 */ +#line 2092 "awkgram.c" /* yacc.c:1646 */ break; case 29: -#line 378 "awkgram.y" /* yacc.c:1646 */ +#line 370 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2106 "awkgram.c" /* yacc.c:1646 */ +#line 2098 "awkgram.c" /* yacc.c:1646 */ break; case 32: -#line 388 "awkgram.y" /* yacc.c:1646 */ +#line 380 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[-5])->source_file = source; if (install_function((yyvsp[-4])->lextok, (yyvsp[-5]), (yyvsp[-2])) < 0) @@ -2117,17 +2109,17 @@ yyreduce: /* $4 already free'd in install_function */ (yyval) = (yyvsp[-5]); } -#line 2121 "awkgram.c" /* yacc.c:1646 */ +#line 2113 "awkgram.c" /* yacc.c:1646 */ break; case 33: -#line 406 "awkgram.y" /* yacc.c:1646 */ +#line 398 "awkgram.y" /* yacc.c:1646 */ { want_regexp = true; } -#line 2127 "awkgram.c" /* yacc.c:1646 */ +#line 2119 "awkgram.c" /* yacc.c:1646 */ break; case 34: -#line 408 "awkgram.y" /* yacc.c:1646 */ +#line 400 "awkgram.y" /* yacc.c:1646 */ { NODE *n, *exp; char *re; @@ -2156,23 +2148,23 @@ yyreduce: (yyval)->opcode = Op_match_rec; (yyval)->memory = n; } -#line 2160 "awkgram.c" /* yacc.c:1646 */ +#line 2152 "awkgram.c" /* yacc.c:1646 */ break; case 35: -#line 440 "awkgram.y" /* yacc.c:1646 */ +#line 432 "awkgram.y" /* yacc.c:1646 */ { bcfree((yyvsp[0])); } -#line 2166 "awkgram.c" /* yacc.c:1646 */ +#line 2158 "awkgram.c" /* yacc.c:1646 */ break; case 37: -#line 446 "awkgram.y" /* yacc.c:1646 */ +#line 438 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2172 "awkgram.c" /* yacc.c:1646 */ +#line 2164 "awkgram.c" /* yacc.c:1646 */ break; case 38: -#line 448 "awkgram.y" /* yacc.c:1646 */ +#line 440 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[0]) == NULL) (yyval) = (yyvsp[-1]); @@ -2185,40 +2177,40 @@ yyreduce: } yyerrok; } -#line 2189 "awkgram.c" /* yacc.c:1646 */ +#line 2181 "awkgram.c" /* yacc.c:1646 */ break; case 39: -#line 461 "awkgram.y" /* yacc.c:1646 */ +#line 453 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2195 "awkgram.c" /* yacc.c:1646 */ +#line 2187 "awkgram.c" /* yacc.c:1646 */ break; case 42: -#line 471 "awkgram.y" /* yacc.c:1646 */ +#line 463 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2201 "awkgram.c" /* yacc.c:1646 */ +#line 2193 "awkgram.c" /* yacc.c:1646 */ break; case 43: -#line 473 "awkgram.y" /* yacc.c:1646 */ +#line 465 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 2207 "awkgram.c" /* yacc.c:1646 */ +#line 2199 "awkgram.c" /* yacc.c:1646 */ break; case 44: -#line 475 "awkgram.y" /* yacc.c:1646 */ +#line 467 "awkgram.y" /* yacc.c:1646 */ { if (do_pretty_print) (yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count)); else (yyval) = (yyvsp[0]); } -#line 2218 "awkgram.c" /* yacc.c:1646 */ +#line 2210 "awkgram.c" /* yacc.c:1646 */ break; case 45: -#line 482 "awkgram.y" /* yacc.c:1646 */ +#line 474 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt; INSTRUCTION *ip, *nextc, *tbreak; @@ -2308,11 +2300,11 @@ yyreduce: break_allowed--; fix_break_continue(ip, tbreak, NULL); } -#line 2312 "awkgram.c" /* yacc.c:1646 */ +#line 2304 "awkgram.c" /* yacc.c:1646 */ break; case 46: -#line 572 "awkgram.y" /* yacc.c:1646 */ +#line 564 "awkgram.y" /* yacc.c:1646 */ { /* * ----------------- @@ -2354,11 +2346,11 @@ yyreduce: continue_allowed--; fix_break_continue(ip, tbreak, tcont); } -#line 2358 "awkgram.c" /* yacc.c:1646 */ +#line 2350 "awkgram.c" /* yacc.c:1646 */ break; case 47: -#line 614 "awkgram.y" /* yacc.c:1646 */ +#line 606 "awkgram.y" /* yacc.c:1646 */ { /* * ----------------- @@ -2400,11 +2392,11 @@ yyreduce: } /* else $1 and $4 are NULLs */ } -#line 2404 "awkgram.c" /* yacc.c:1646 */ +#line 2396 "awkgram.c" /* yacc.c:1646 */ break; case 48: -#line 656 "awkgram.y" /* yacc.c:1646 */ +#line 648 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *ip; char *var_name = (yyvsp[-5])->lextok; @@ -2517,44 +2509,44 @@ regular_loop: break_allowed--; continue_allowed--; } -#line 2521 "awkgram.c" /* yacc.c:1646 */ +#line 2513 "awkgram.c" /* yacc.c:1646 */ break; case 49: -#line 769 "awkgram.y" /* yacc.c:1646 */ +#line 761 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_for_loop((yyvsp[-11]), (yyvsp[-9]), (yyvsp[-6]), (yyvsp[-3]), (yyvsp[0])); break_allowed--; continue_allowed--; } -#line 2532 "awkgram.c" /* yacc.c:1646 */ +#line 2524 "awkgram.c" /* yacc.c:1646 */ break; case 50: -#line 776 "awkgram.y" /* yacc.c:1646 */ +#line 768 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_for_loop((yyvsp[-10]), (yyvsp[-8]), (INSTRUCTION *) NULL, (yyvsp[-3]), (yyvsp[0])); break_allowed--; continue_allowed--; } -#line 2543 "awkgram.c" /* yacc.c:1646 */ +#line 2535 "awkgram.c" /* yacc.c:1646 */ break; case 51: -#line 783 "awkgram.y" /* yacc.c:1646 */ +#line 775 "awkgram.y" /* yacc.c:1646 */ { if (do_pretty_print) (yyval) = list_prepend((yyvsp[0]), instruction(Op_exec_count)); else (yyval) = (yyvsp[0]); } -#line 2554 "awkgram.c" /* yacc.c:1646 */ +#line 2546 "awkgram.c" /* yacc.c:1646 */ break; case 52: -#line 793 "awkgram.y" /* yacc.c:1646 */ +#line 785 "awkgram.y" /* yacc.c:1646 */ { if (! break_allowed) error_ln((yyvsp[-1])->source_line, @@ -2563,11 +2555,11 @@ regular_loop: (yyval) = list_create((yyvsp[-1])); } -#line 2567 "awkgram.c" /* yacc.c:1646 */ +#line 2559 "awkgram.c" /* yacc.c:1646 */ break; case 53: -#line 802 "awkgram.y" /* yacc.c:1646 */ +#line 794 "awkgram.y" /* yacc.c:1646 */ { if (! continue_allowed) error_ln((yyvsp[-1])->source_line, @@ -2576,11 +2568,11 @@ regular_loop: (yyval) = list_create((yyvsp[-1])); } -#line 2580 "awkgram.c" /* yacc.c:1646 */ +#line 2572 "awkgram.c" /* yacc.c:1646 */ break; case 54: -#line 811 "awkgram.y" /* yacc.c:1646 */ +#line 803 "awkgram.y" /* yacc.c:1646 */ { /* if inside function (rule = 0), resolve context at run-time */ if (rule && rule != Rule) @@ -2589,11 +2581,11 @@ regular_loop: (yyvsp[-1])->target_jmp = ip_rec; (yyval) = list_create((yyvsp[-1])); } -#line 2593 "awkgram.c" /* yacc.c:1646 */ +#line 2585 "awkgram.c" /* yacc.c:1646 */ break; case 55: -#line 820 "awkgram.y" /* yacc.c:1646 */ +#line 812 "awkgram.y" /* yacc.c:1646 */ { /* if inside function (rule = 0), resolve context at run-time */ if (rule == BEGIN || rule == END || rule == ENDFILE) @@ -2604,11 +2596,11 @@ regular_loop: (yyvsp[-1])->target_endfile = ip_endfile; (yyval) = list_create((yyvsp[-1])); } -#line 2608 "awkgram.c" /* yacc.c:1646 */ +#line 2600 "awkgram.c" /* yacc.c:1646 */ break; case 56: -#line 831 "awkgram.y" /* yacc.c:1646 */ +#line 823 "awkgram.y" /* yacc.c:1646 */ { /* Initialize the two possible jump targets, the actual target * is resolved at run-time. @@ -2623,20 +2615,20 @@ regular_loop: } else (yyval) = list_append((yyvsp[-1]), (yyvsp[-2])); } -#line 2627 "awkgram.c" /* yacc.c:1646 */ +#line 2619 "awkgram.c" /* yacc.c:1646 */ break; case 57: -#line 846 "awkgram.y" /* yacc.c:1646 */ +#line 838 "awkgram.y" /* yacc.c:1646 */ { if (! in_function) yyerror(_("`return' used outside function context")); } -#line 2636 "awkgram.c" /* yacc.c:1646 */ +#line 2628 "awkgram.c" /* yacc.c:1646 */ break; case 58: -#line 849 "awkgram.y" /* yacc.c:1646 */ +#line 841 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[-1]) == NULL) { (yyval) = list_create((yyvsp[-3])); @@ -2657,17 +2649,17 @@ regular_loop: (yyval) = list_append((yyvsp[-1]), (yyvsp[-3])); } } -#line 2661 "awkgram.c" /* yacc.c:1646 */ +#line 2653 "awkgram.c" /* yacc.c:1646 */ break; case 60: -#line 881 "awkgram.y" /* yacc.c:1646 */ +#line 873 "awkgram.y" /* yacc.c:1646 */ { in_print = true; in_parens = 0; } -#line 2667 "awkgram.c" /* yacc.c:1646 */ +#line 2659 "awkgram.c" /* yacc.c:1646 */ break; case 61: -#line 882 "awkgram.y" /* yacc.c:1646 */ +#line 874 "awkgram.y" /* yacc.c:1646 */ { /* * Optimization: plain `print' has no expression list, so $3 is null. @@ -2764,17 +2756,17 @@ regular_print: } } } -#line 2768 "awkgram.c" /* yacc.c:1646 */ +#line 2760 "awkgram.c" /* yacc.c:1646 */ break; case 62: -#line 979 "awkgram.y" /* yacc.c:1646 */ +#line 971 "awkgram.y" /* yacc.c:1646 */ { sub_counter = 0; } -#line 2774 "awkgram.c" /* yacc.c:1646 */ +#line 2766 "awkgram.c" /* yacc.c:1646 */ break; case 63: -#line 980 "awkgram.y" /* yacc.c:1646 */ +#line 972 "awkgram.y" /* yacc.c:1646 */ { char *arr = (yyvsp[-2])->lextok; @@ -2807,11 +2799,11 @@ regular_print: (yyval) = list_append(list_append((yyvsp[0]), (yyvsp[-2])), (yyvsp[-3])); } } -#line 2811 "awkgram.c" /* yacc.c:1646 */ +#line 2803 "awkgram.c" /* yacc.c:1646 */ break; case 64: -#line 1017 "awkgram.y" /* yacc.c:1646 */ +#line 1009 "awkgram.y" /* yacc.c:1646 */ { static bool warned = false; char *arr = (yyvsp[-1])->lextok; @@ -2837,52 +2829,52 @@ regular_print: fatal(_("`delete' is not allowed with FUNCTAB")); } } -#line 2841 "awkgram.c" /* yacc.c:1646 */ +#line 2833 "awkgram.c" /* yacc.c:1646 */ break; case 65: -#line 1043 "awkgram.y" /* yacc.c:1646 */ +#line 1035 "awkgram.y" /* yacc.c:1646 */ { (yyval) = optimize_assignment((yyvsp[0])); } -#line 2847 "awkgram.c" /* yacc.c:1646 */ +#line 2839 "awkgram.c" /* yacc.c:1646 */ break; case 66: -#line 1048 "awkgram.y" /* yacc.c:1646 */ +#line 1040 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2853 "awkgram.c" /* yacc.c:1646 */ +#line 2845 "awkgram.c" /* yacc.c:1646 */ break; case 67: -#line 1050 "awkgram.y" /* yacc.c:1646 */ +#line 1042 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2859 "awkgram.c" /* yacc.c:1646 */ +#line 2851 "awkgram.c" /* yacc.c:1646 */ break; case 68: -#line 1055 "awkgram.y" /* yacc.c:1646 */ +#line 1047 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2865 "awkgram.c" /* yacc.c:1646 */ +#line 2857 "awkgram.c" /* yacc.c:1646 */ break; case 69: -#line 1057 "awkgram.y" /* yacc.c:1646 */ +#line 1049 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[-1]) == NULL) (yyval) = list_create((yyvsp[0])); else (yyval) = list_prepend((yyvsp[-1]), (yyvsp[0])); } -#line 2876 "awkgram.c" /* yacc.c:1646 */ +#line 2868 "awkgram.c" /* yacc.c:1646 */ break; case 70: -#line 1064 "awkgram.y" /* yacc.c:1646 */ +#line 1056 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2882 "awkgram.c" /* yacc.c:1646 */ +#line 2874 "awkgram.c" /* yacc.c:1646 */ break; case 71: -#line 1069 "awkgram.y" /* yacc.c:1646 */ +#line 1061 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *casestmt = (yyvsp[0]); if ((yyvsp[0]) == NULL) @@ -2894,11 +2886,11 @@ regular_print: bcfree((yyvsp[-2])); (yyval) = (yyvsp[-4]); } -#line 2898 "awkgram.c" /* yacc.c:1646 */ +#line 2890 "awkgram.c" /* yacc.c:1646 */ break; case 72: -#line 1081 "awkgram.y" /* yacc.c:1646 */ +#line 1073 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *casestmt = (yyvsp[0]); if ((yyvsp[0]) == NULL) @@ -2909,17 +2901,17 @@ regular_print: (yyvsp[-3])->case_stmt = casestmt; (yyval) = (yyvsp[-3]); } -#line 2913 "awkgram.c" /* yacc.c:1646 */ +#line 2905 "awkgram.c" /* yacc.c:1646 */ break; case 73: -#line 1095 "awkgram.y" /* yacc.c:1646 */ +#line 1087 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2919 "awkgram.c" /* yacc.c:1646 */ +#line 2911 "awkgram.c" /* yacc.c:1646 */ break; case 74: -#line 1097 "awkgram.y" /* yacc.c:1646 */ +#line 1089 "awkgram.y" /* yacc.c:1646 */ { NODE *n = (yyvsp[0])->memory; (void) force_number(n); @@ -2927,71 +2919,71 @@ regular_print: bcfree((yyvsp[-1])); (yyval) = (yyvsp[0]); } -#line 2931 "awkgram.c" /* yacc.c:1646 */ +#line 2923 "awkgram.c" /* yacc.c:1646 */ break; case 75: -#line 1105 "awkgram.y" /* yacc.c:1646 */ +#line 1097 "awkgram.y" /* yacc.c:1646 */ { bcfree((yyvsp[-1])); (yyval) = (yyvsp[0]); } -#line 2940 "awkgram.c" /* yacc.c:1646 */ +#line 2932 "awkgram.c" /* yacc.c:1646 */ break; case 76: -#line 1110 "awkgram.y" /* yacc.c:1646 */ +#line 1102 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2946 "awkgram.c" /* yacc.c:1646 */ +#line 2938 "awkgram.c" /* yacc.c:1646 */ break; case 77: -#line 1112 "awkgram.y" /* yacc.c:1646 */ +#line 1104 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_push_re; (yyval) = (yyvsp[0]); } -#line 2955 "awkgram.c" /* yacc.c:1646 */ +#line 2947 "awkgram.c" /* yacc.c:1646 */ break; case 78: -#line 1120 "awkgram.y" /* yacc.c:1646 */ +#line 1112 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2961 "awkgram.c" /* yacc.c:1646 */ +#line 2953 "awkgram.c" /* yacc.c:1646 */ break; case 79: -#line 1122 "awkgram.y" /* yacc.c:1646 */ +#line 1114 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2967 "awkgram.c" /* yacc.c:1646 */ +#line 2959 "awkgram.c" /* yacc.c:1646 */ break; case 81: -#line 1132 "awkgram.y" /* yacc.c:1646 */ +#line 1124 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 2975 "awkgram.c" /* yacc.c:1646 */ +#line 2967 "awkgram.c" /* yacc.c:1646 */ break; case 82: -#line 1139 "awkgram.y" /* yacc.c:1646 */ +#line 1131 "awkgram.y" /* yacc.c:1646 */ { in_print = false; in_parens = 0; (yyval) = NULL; } -#line 2985 "awkgram.c" /* yacc.c:1646 */ +#line 2977 "awkgram.c" /* yacc.c:1646 */ break; case 83: -#line 1144 "awkgram.y" /* yacc.c:1646 */ +#line 1136 "awkgram.y" /* yacc.c:1646 */ { in_print = false; in_parens = 0; } -#line 2991 "awkgram.c" /* yacc.c:1646 */ +#line 2983 "awkgram.c" /* yacc.c:1646 */ break; case 84: -#line 1145 "awkgram.y" /* yacc.c:1646 */ +#line 1137 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[-2])->redir_type == redirect_twoway && (yyvsp[0])->lasti->opcode == Op_K_getline_redir @@ -2999,136 +2991,136 @@ regular_print: yyerror(_("multistage two-way pipelines don't work")); (yyval) = list_prepend((yyvsp[0]), (yyvsp[-2])); } -#line 3003 "awkgram.c" /* yacc.c:1646 */ +#line 2995 "awkgram.c" /* yacc.c:1646 */ break; case 85: -#line 1156 "awkgram.y" /* yacc.c:1646 */ +#line 1148 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]), NULL, NULL); } -#line 3011 "awkgram.c" /* yacc.c:1646 */ +#line 3003 "awkgram.c" /* yacc.c:1646 */ break; case 86: -#line 1161 "awkgram.y" /* yacc.c:1646 */ +#line 1153 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_condition((yyvsp[-6]), (yyvsp[-8]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[0])); } -#line 3019 "awkgram.c" /* yacc.c:1646 */ +#line 3011 "awkgram.c" /* yacc.c:1646 */ break; case 91: -#line 1178 "awkgram.y" /* yacc.c:1646 */ +#line 1170 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3025 "awkgram.c" /* yacc.c:1646 */ +#line 3017 "awkgram.c" /* yacc.c:1646 */ break; case 92: -#line 1180 "awkgram.y" /* yacc.c:1646 */ +#line 1172 "awkgram.y" /* yacc.c:1646 */ { bcfree((yyvsp[-1])); (yyval) = (yyvsp[0]); } -#line 3034 "awkgram.c" /* yacc.c:1646 */ +#line 3026 "awkgram.c" /* yacc.c:1646 */ break; case 93: -#line 1188 "awkgram.y" /* yacc.c:1646 */ +#line 1180 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3040 "awkgram.c" /* yacc.c:1646 */ +#line 3032 "awkgram.c" /* yacc.c:1646 */ break; case 94: -#line 1190 "awkgram.y" /* yacc.c:1646 */ +#line 1182 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]) ; } -#line 3046 "awkgram.c" /* yacc.c:1646 */ +#line 3038 "awkgram.c" /* yacc.c:1646 */ break; case 95: -#line 1195 "awkgram.y" /* yacc.c:1646 */ +#line 1187 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->param_count = 0; (yyval) = list_create((yyvsp[0])); } -#line 3055 "awkgram.c" /* yacc.c:1646 */ +#line 3047 "awkgram.c" /* yacc.c:1646 */ break; case 96: -#line 1200 "awkgram.y" /* yacc.c:1646 */ +#line 1192 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->param_count = (yyvsp[-2])->lasti->param_count + 1; (yyval) = list_append((yyvsp[-2]), (yyvsp[0])); yyerrok; } -#line 3065 "awkgram.c" /* yacc.c:1646 */ +#line 3057 "awkgram.c" /* yacc.c:1646 */ break; case 97: -#line 1206 "awkgram.y" /* yacc.c:1646 */ +#line 1198 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3071 "awkgram.c" /* yacc.c:1646 */ +#line 3063 "awkgram.c" /* yacc.c:1646 */ break; case 98: -#line 1208 "awkgram.y" /* yacc.c:1646 */ +#line 1200 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3077 "awkgram.c" /* yacc.c:1646 */ +#line 3069 "awkgram.c" /* yacc.c:1646 */ break; case 99: -#line 1210 "awkgram.y" /* yacc.c:1646 */ +#line 1202 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-2]); } -#line 3083 "awkgram.c" /* yacc.c:1646 */ +#line 3075 "awkgram.c" /* yacc.c:1646 */ break; case 100: -#line 1216 "awkgram.y" /* yacc.c:1646 */ +#line 1208 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3089 "awkgram.c" /* yacc.c:1646 */ +#line 3081 "awkgram.c" /* yacc.c:1646 */ break; case 101: -#line 1218 "awkgram.y" /* yacc.c:1646 */ +#line 1210 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3095 "awkgram.c" /* yacc.c:1646 */ +#line 3087 "awkgram.c" /* yacc.c:1646 */ break; case 102: -#line 1223 "awkgram.y" /* yacc.c:1646 */ +#line 1215 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3101 "awkgram.c" /* yacc.c:1646 */ +#line 3093 "awkgram.c" /* yacc.c:1646 */ break; case 103: -#line 1225 "awkgram.y" /* yacc.c:1646 */ +#line 1217 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3107 "awkgram.c" /* yacc.c:1646 */ +#line 3099 "awkgram.c" /* yacc.c:1646 */ break; case 104: -#line 1230 "awkgram.y" /* yacc.c:1646 */ +#line 1222 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_expression_list(NULL, (yyvsp[0])); } -#line 3113 "awkgram.c" /* yacc.c:1646 */ +#line 3105 "awkgram.c" /* yacc.c:1646 */ break; case 105: -#line 1232 "awkgram.y" /* yacc.c:1646 */ +#line 1224 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0])); yyerrok; } -#line 3122 "awkgram.c" /* yacc.c:1646 */ +#line 3114 "awkgram.c" /* yacc.c:1646 */ break; case 106: -#line 1237 "awkgram.y" /* yacc.c:1646 */ +#line 1229 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3128 "awkgram.c" /* yacc.c:1646 */ +#line 3120 "awkgram.c" /* yacc.c:1646 */ break; case 107: -#line 1239 "awkgram.y" /* yacc.c:1646 */ +#line 1231 "awkgram.y" /* yacc.c:1646 */ { /* * Returning the expression list instead of NULL lets @@ -3136,52 +3128,52 @@ regular_print: */ (yyval) = (yyvsp[-1]); } -#line 3140 "awkgram.c" /* yacc.c:1646 */ +#line 3132 "awkgram.c" /* yacc.c:1646 */ break; case 108: -#line 1247 "awkgram.y" /* yacc.c:1646 */ +#line 1239 "awkgram.y" /* yacc.c:1646 */ { /* Ditto */ (yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0])); } -#line 3149 "awkgram.c" /* yacc.c:1646 */ +#line 3141 "awkgram.c" /* yacc.c:1646 */ break; case 109: -#line 1252 "awkgram.y" /* yacc.c:1646 */ +#line 1244 "awkgram.y" /* yacc.c:1646 */ { /* Ditto */ (yyval) = (yyvsp[-2]); } -#line 3158 "awkgram.c" /* yacc.c:1646 */ +#line 3150 "awkgram.c" /* yacc.c:1646 */ break; case 110: -#line 1261 "awkgram.y" /* yacc.c:1646 */ +#line 1253 "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 3169 "awkgram.c" /* yacc.c:1646 */ +#line 3161 "awkgram.c" /* yacc.c:1646 */ break; case 111: -#line 1268 "awkgram.y" /* yacc.c:1646 */ +#line 1260 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3175 "awkgram.c" /* yacc.c:1646 */ +#line 3167 "awkgram.c" /* yacc.c:1646 */ break; case 112: -#line 1270 "awkgram.y" /* yacc.c:1646 */ +#line 1262 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3181 "awkgram.c" /* yacc.c:1646 */ +#line 3173 "awkgram.c" /* yacc.c:1646 */ break; case 113: -#line 1272 "awkgram.y" /* yacc.c:1646 */ +#line 1264 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[-2])->lasti->opcode == Op_match_rec) warning_ln((yyvsp[-1])->source_line, @@ -3197,11 +3189,11 @@ regular_print: (yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1])); } } -#line 3201 "awkgram.c" /* yacc.c:1646 */ +#line 3193 "awkgram.c" /* yacc.c:1646 */ break; case 114: -#line 1288 "awkgram.y" /* yacc.c:1646 */ +#line 1280 "awkgram.y" /* yacc.c:1646 */ { if (do_lint_old) warning_ln((yyvsp[-1])->source_line, @@ -3211,91 +3203,91 @@ regular_print: (yyvsp[-1])->expr_count = 1; (yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1])); } -#line 3215 "awkgram.c" /* yacc.c:1646 */ +#line 3207 "awkgram.c" /* yacc.c:1646 */ break; case 115: -#line 1298 "awkgram.y" /* yacc.c:1646 */ +#line 1290 "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 3226 "awkgram.c" /* yacc.c:1646 */ +#line 3218 "awkgram.c" /* yacc.c:1646 */ break; case 116: -#line 1305 "awkgram.y" /* yacc.c:1646 */ +#line 1297 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_condition((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])); } -#line 3232 "awkgram.c" /* yacc.c:1646 */ +#line 3224 "awkgram.c" /* yacc.c:1646 */ break; case 117: -#line 1307 "awkgram.y" /* yacc.c:1646 */ +#line 1299 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3238 "awkgram.c" /* yacc.c:1646 */ +#line 3230 "awkgram.c" /* yacc.c:1646 */ break; case 118: -#line 1312 "awkgram.y" /* yacc.c:1646 */ +#line 1304 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3244 "awkgram.c" /* yacc.c:1646 */ +#line 3236 "awkgram.c" /* yacc.c:1646 */ break; case 119: -#line 1314 "awkgram.y" /* yacc.c:1646 */ +#line 1306 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3250 "awkgram.c" /* yacc.c:1646 */ +#line 3242 "awkgram.c" /* yacc.c:1646 */ break; case 120: -#line 1316 "awkgram.y" /* yacc.c:1646 */ +#line 1308 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_assign_quotient; (yyval) = (yyvsp[0]); } -#line 3259 "awkgram.c" /* yacc.c:1646 */ +#line 3251 "awkgram.c" /* yacc.c:1646 */ break; case 121: -#line 1324 "awkgram.y" /* yacc.c:1646 */ +#line 1316 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3265 "awkgram.c" /* yacc.c:1646 */ +#line 3257 "awkgram.c" /* yacc.c:1646 */ break; case 122: -#line 1326 "awkgram.y" /* yacc.c:1646 */ +#line 1318 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3271 "awkgram.c" /* yacc.c:1646 */ +#line 3263 "awkgram.c" /* yacc.c:1646 */ break; case 123: -#line 1331 "awkgram.y" /* yacc.c:1646 */ +#line 1323 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3277 "awkgram.c" /* yacc.c:1646 */ +#line 3269 "awkgram.c" /* yacc.c:1646 */ break; case 124: -#line 1333 "awkgram.y" /* yacc.c:1646 */ +#line 1325 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3283 "awkgram.c" /* yacc.c:1646 */ +#line 3275 "awkgram.c" /* yacc.c:1646 */ break; case 125: -#line 1338 "awkgram.y" /* yacc.c:1646 */ +#line 1330 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3289 "awkgram.c" /* yacc.c:1646 */ +#line 3281 "awkgram.c" /* yacc.c:1646 */ break; case 126: -#line 1340 "awkgram.y" /* yacc.c:1646 */ +#line 1332 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3295 "awkgram.c" /* yacc.c:1646 */ +#line 3287 "awkgram.c" /* yacc.c:1646 */ break; case 127: -#line 1342 "awkgram.y" /* yacc.c:1646 */ +#line 1334 "awkgram.y" /* yacc.c:1646 */ { int count = 2; bool is_simple_var = false; @@ -3342,47 +3334,47 @@ regular_print: max_args = count; } } -#line 3346 "awkgram.c" /* yacc.c:1646 */ +#line 3338 "awkgram.c" /* yacc.c:1646 */ break; case 129: -#line 1394 "awkgram.y" /* yacc.c:1646 */ +#line 1386 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3352 "awkgram.c" /* yacc.c:1646 */ +#line 3344 "awkgram.c" /* yacc.c:1646 */ break; case 130: -#line 1396 "awkgram.y" /* yacc.c:1646 */ +#line 1388 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3358 "awkgram.c" /* yacc.c:1646 */ +#line 3350 "awkgram.c" /* yacc.c:1646 */ break; case 131: -#line 1398 "awkgram.y" /* yacc.c:1646 */ +#line 1390 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3364 "awkgram.c" /* yacc.c:1646 */ +#line 3356 "awkgram.c" /* yacc.c:1646 */ break; case 132: -#line 1400 "awkgram.y" /* yacc.c:1646 */ +#line 1392 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3370 "awkgram.c" /* yacc.c:1646 */ +#line 3362 "awkgram.c" /* yacc.c:1646 */ break; case 133: -#line 1402 "awkgram.y" /* yacc.c:1646 */ +#line 1394 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3376 "awkgram.c" /* yacc.c:1646 */ +#line 3368 "awkgram.c" /* yacc.c:1646 */ break; case 134: -#line 1404 "awkgram.y" /* yacc.c:1646 */ +#line 1396 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3382 "awkgram.c" /* yacc.c:1646 */ +#line 3374 "awkgram.c" /* yacc.c:1646 */ break; case 135: -#line 1406 "awkgram.y" /* yacc.c:1646 */ +#line 1398 "awkgram.y" /* yacc.c:1646 */ { /* * In BEGINFILE/ENDFILE, allow `getline [var] < file' @@ -3396,29 +3388,29 @@ regular_print: _("non-redirected `getline' undefined inside END action")); (yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input); } -#line 3400 "awkgram.c" /* yacc.c:1646 */ +#line 3392 "awkgram.c" /* yacc.c:1646 */ break; case 136: -#line 1420 "awkgram.y" /* yacc.c:1646 */ +#line 1412 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_postincrement; (yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0])); } -#line 3409 "awkgram.c" /* yacc.c:1646 */ +#line 3401 "awkgram.c" /* yacc.c:1646 */ break; case 137: -#line 1425 "awkgram.y" /* yacc.c:1646 */ +#line 1417 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_postdecrement; (yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0])); } -#line 3418 "awkgram.c" /* yacc.c:1646 */ +#line 3410 "awkgram.c" /* yacc.c:1646 */ break; case 138: -#line 1430 "awkgram.y" /* yacc.c:1646 */ +#line 1422 "awkgram.y" /* yacc.c:1646 */ { if (do_lint_old) { warning_ln((yyvsp[-1])->source_line, @@ -3438,64 +3430,64 @@ regular_print: (yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1])); } } -#line 3442 "awkgram.c" /* yacc.c:1646 */ +#line 3434 "awkgram.c" /* yacc.c:1646 */ break; case 139: -#line 1455 "awkgram.y" /* yacc.c:1646 */ +#line 1447 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type); bcfree((yyvsp[-2])); } -#line 3451 "awkgram.c" /* yacc.c:1646 */ +#line 3443 "awkgram.c" /* yacc.c:1646 */ break; case 140: -#line 1461 "awkgram.y" /* yacc.c:1646 */ +#line 1453 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3457 "awkgram.c" /* yacc.c:1646 */ +#line 3449 "awkgram.c" /* yacc.c:1646 */ break; case 141: -#line 1463 "awkgram.y" /* yacc.c:1646 */ +#line 1455 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3463 "awkgram.c" /* yacc.c:1646 */ +#line 3455 "awkgram.c" /* yacc.c:1646 */ break; case 142: -#line 1465 "awkgram.y" /* yacc.c:1646 */ +#line 1457 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3469 "awkgram.c" /* yacc.c:1646 */ +#line 3461 "awkgram.c" /* yacc.c:1646 */ break; case 143: -#line 1467 "awkgram.y" /* yacc.c:1646 */ +#line 1459 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3475 "awkgram.c" /* yacc.c:1646 */ +#line 3467 "awkgram.c" /* yacc.c:1646 */ break; case 144: -#line 1469 "awkgram.y" /* yacc.c:1646 */ +#line 1461 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3481 "awkgram.c" /* yacc.c:1646 */ +#line 3473 "awkgram.c" /* yacc.c:1646 */ break; case 145: -#line 1471 "awkgram.y" /* yacc.c:1646 */ +#line 1463 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3487 "awkgram.c" /* yacc.c:1646 */ +#line 3479 "awkgram.c" /* yacc.c:1646 */ break; case 146: -#line 1476 "awkgram.y" /* yacc.c:1646 */ +#line 1468 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_create((yyvsp[0])); } -#line 3495 "awkgram.c" /* yacc.c:1646 */ +#line 3487 "awkgram.c" /* yacc.c:1646 */ break; case 147: -#line 1480 "awkgram.y" /* yacc.c:1646 */ +#line 1472 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[0])->opcode == Op_match_rec) { (yyvsp[0])->opcode = Op_nomatch; @@ -3527,37 +3519,37 @@ regular_print: } } } -#line 3531 "awkgram.c" /* yacc.c:1646 */ +#line 3523 "awkgram.c" /* yacc.c:1646 */ break; case 148: -#line 1512 "awkgram.y" /* yacc.c:1646 */ +#line 1504 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3537 "awkgram.c" /* yacc.c:1646 */ +#line 3529 "awkgram.c" /* yacc.c:1646 */ break; case 149: -#line 1514 "awkgram.y" /* yacc.c:1646 */ +#line 1506 "awkgram.y" /* yacc.c:1646 */ { (yyval) = snode((yyvsp[-1]), (yyvsp[-3])); if ((yyval) == NULL) YYABORT; } -#line 3547 "awkgram.c" /* yacc.c:1646 */ +#line 3539 "awkgram.c" /* yacc.c:1646 */ break; case 150: -#line 1520 "awkgram.y" /* yacc.c:1646 */ +#line 1512 "awkgram.y" /* yacc.c:1646 */ { (yyval) = snode((yyvsp[-1]), (yyvsp[-3])); if ((yyval) == NULL) YYABORT; } -#line 3557 "awkgram.c" /* yacc.c:1646 */ +#line 3549 "awkgram.c" /* yacc.c:1646 */ break; case 151: -#line 1526 "awkgram.y" /* yacc.c:1646 */ +#line 1518 "awkgram.y" /* yacc.c:1646 */ { static bool warned = false; @@ -3570,45 +3562,45 @@ regular_print: if ((yyval) == NULL) YYABORT; } -#line 3574 "awkgram.c" /* yacc.c:1646 */ +#line 3566 "awkgram.c" /* yacc.c:1646 */ break; case 154: -#line 1541 "awkgram.y" /* yacc.c:1646 */ +#line 1533 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[-1])->opcode = Op_preincrement; (yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1])); } -#line 3583 "awkgram.c" /* yacc.c:1646 */ +#line 3575 "awkgram.c" /* yacc.c:1646 */ break; case 155: -#line 1546 "awkgram.y" /* yacc.c:1646 */ +#line 1538 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[-1])->opcode = Op_predecrement; (yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1])); } -#line 3592 "awkgram.c" /* yacc.c:1646 */ +#line 3584 "awkgram.c" /* yacc.c:1646 */ break; case 156: -#line 1551 "awkgram.y" /* yacc.c:1646 */ +#line 1543 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_create((yyvsp[0])); } -#line 3600 "awkgram.c" /* yacc.c:1646 */ +#line 3592 "awkgram.c" /* yacc.c:1646 */ break; case 157: -#line 1555 "awkgram.y" /* yacc.c:1646 */ +#line 1547 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_create((yyvsp[0])); } -#line 3608 "awkgram.c" /* yacc.c:1646 */ +#line 3600 "awkgram.c" /* yacc.c:1646 */ break; case 158: -#line 1559 "awkgram.y" /* yacc.c:1646 */ +#line 1551 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[0])->lasti->opcode == Op_push_i && ((yyvsp[0])->lasti->memory->flags & (STRCUR|STRING)) == 0 @@ -3623,11 +3615,11 @@ regular_print: (yyval) = list_append((yyvsp[0]), (yyvsp[-1])); } } -#line 3627 "awkgram.c" /* yacc.c:1646 */ +#line 3619 "awkgram.c" /* yacc.c:1646 */ break; case 159: -#line 1574 "awkgram.y" /* yacc.c:1646 */ +#line 1566 "awkgram.y" /* yacc.c:1646 */ { /* * was: $$ = $2 @@ -3637,20 +3629,20 @@ regular_print: (yyvsp[-1])->memory = make_number(0.0); (yyval) = list_append((yyvsp[0]), (yyvsp[-1])); } -#line 3641 "awkgram.c" /* yacc.c:1646 */ +#line 3633 "awkgram.c" /* yacc.c:1646 */ break; case 160: -#line 1587 "awkgram.y" /* yacc.c:1646 */ +#line 1579 "awkgram.y" /* yacc.c:1646 */ { func_use((yyvsp[0])->lasti->func_name, FUNC_USE); (yyval) = (yyvsp[0]); } -#line 3650 "awkgram.c" /* yacc.c:1646 */ +#line 3642 "awkgram.c" /* yacc.c:1646 */ break; case 161: -#line 1592 "awkgram.y" /* yacc.c:1646 */ +#line 1584 "awkgram.y" /* yacc.c:1646 */ { /* indirect function call */ INSTRUCTION *f, *t; @@ -3683,11 +3675,11 @@ regular_print: (yyval) = list_prepend((yyvsp[0]), t); } -#line 3687 "awkgram.c" /* yacc.c:1646 */ +#line 3679 "awkgram.c" /* yacc.c:1646 */ break; case 162: -#line 1628 "awkgram.y" /* yacc.c:1646 */ +#line 1620 "awkgram.y" /* yacc.c:1646 */ { param_sanity((yyvsp[-1])); (yyvsp[-3])->opcode = Op_func_call; @@ -3701,49 +3693,49 @@ regular_print: (yyval) = list_append(t, (yyvsp[-3])); } } -#line 3705 "awkgram.c" /* yacc.c:1646 */ +#line 3697 "awkgram.c" /* yacc.c:1646 */ break; case 163: -#line 1645 "awkgram.y" /* yacc.c:1646 */ +#line 1637 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3711 "awkgram.c" /* yacc.c:1646 */ +#line 3703 "awkgram.c" /* yacc.c:1646 */ break; case 164: -#line 1647 "awkgram.y" /* yacc.c:1646 */ +#line 1639 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3717 "awkgram.c" /* yacc.c:1646 */ +#line 3709 "awkgram.c" /* yacc.c:1646 */ break; case 165: -#line 1652 "awkgram.y" /* yacc.c:1646 */ +#line 1644 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3723 "awkgram.c" /* yacc.c:1646 */ +#line 3715 "awkgram.c" /* yacc.c:1646 */ break; case 166: -#line 1654 "awkgram.y" /* yacc.c:1646 */ +#line 1646 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3729 "awkgram.c" /* yacc.c:1646 */ +#line 3721 "awkgram.c" /* yacc.c:1646 */ break; case 167: -#line 1659 "awkgram.y" /* yacc.c:1646 */ +#line 1651 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3735 "awkgram.c" /* yacc.c:1646 */ +#line 3727 "awkgram.c" /* yacc.c:1646 */ break; case 168: -#line 1661 "awkgram.y" /* yacc.c:1646 */ +#line 1653 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_merge((yyvsp[-1]), (yyvsp[0])); } -#line 3743 "awkgram.c" /* yacc.c:1646 */ +#line 3735 "awkgram.c" /* yacc.c:1646 */ break; case 169: -#line 1668 "awkgram.y" /* yacc.c:1646 */ +#line 1660 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *ip = (yyvsp[0])->lasti; int count = ip->sub_count; /* # of SUBSEP-seperated expressions */ @@ -3757,11 +3749,11 @@ regular_print: sub_counter++; /* count # of dimensions */ (yyval) = (yyvsp[0]); } -#line 3761 "awkgram.c" /* yacc.c:1646 */ +#line 3753 "awkgram.c" /* yacc.c:1646 */ break; case 170: -#line 1685 "awkgram.y" /* yacc.c:1646 */ +#line 1677 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *t = (yyvsp[-1]); if ((yyvsp[-1]) == NULL) { @@ -3775,31 +3767,31 @@ regular_print: (yyvsp[0])->sub_count = count_expressions(&t, false); (yyval) = list_append(t, (yyvsp[0])); } -#line 3779 "awkgram.c" /* yacc.c:1646 */ +#line 3771 "awkgram.c" /* yacc.c:1646 */ break; case 171: -#line 1702 "awkgram.y" /* yacc.c:1646 */ +#line 1694 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3785 "awkgram.c" /* yacc.c:1646 */ +#line 3777 "awkgram.c" /* yacc.c:1646 */ break; case 172: -#line 1704 "awkgram.y" /* yacc.c:1646 */ +#line 1696 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_merge((yyvsp[-1]), (yyvsp[0])); } -#line 3793 "awkgram.c" /* yacc.c:1646 */ +#line 3785 "awkgram.c" /* yacc.c:1646 */ break; case 173: -#line 1711 "awkgram.y" /* yacc.c:1646 */ +#line 1703 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3799 "awkgram.c" /* yacc.c:1646 */ +#line 3791 "awkgram.c" /* yacc.c:1646 */ break; case 174: -#line 1716 "awkgram.y" /* yacc.c:1646 */ +#line 1708 "awkgram.y" /* yacc.c:1646 */ { char *var_name = (yyvsp[0])->lextok; @@ -3807,22 +3799,22 @@ regular_print: (yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new); (yyval) = list_create((yyvsp[0])); } -#line 3811 "awkgram.c" /* yacc.c:1646 */ +#line 3803 "awkgram.c" /* yacc.c:1646 */ break; case 175: -#line 1724 "awkgram.y" /* yacc.c:1646 */ +#line 1716 "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 3822 "awkgram.c" /* yacc.c:1646 */ +#line 3814 "awkgram.c" /* yacc.c:1646 */ break; case 176: -#line 1734 "awkgram.y" /* yacc.c:1646 */ +#line 1726 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *ip = (yyvsp[0])->nexti; if (ip->opcode == Op_push @@ -3834,73 +3826,73 @@ regular_print: } else (yyval) = (yyvsp[0]); } -#line 3838 "awkgram.c" /* yacc.c:1646 */ +#line 3830 "awkgram.c" /* yacc.c:1646 */ break; case 177: -#line 1746 "awkgram.y" /* yacc.c:1646 */ +#line 1738 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_append((yyvsp[-1]), (yyvsp[-2])); if ((yyvsp[0]) != NULL) mk_assignment((yyvsp[-1]), NULL, (yyvsp[0])); } -#line 3848 "awkgram.c" /* yacc.c:1646 */ +#line 3840 "awkgram.c" /* yacc.c:1646 */ break; case 178: -#line 1755 "awkgram.y" /* yacc.c:1646 */ +#line 1747 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_postincrement; } -#line 3856 "awkgram.c" /* yacc.c:1646 */ +#line 3848 "awkgram.c" /* yacc.c:1646 */ break; case 179: -#line 1759 "awkgram.y" /* yacc.c:1646 */ +#line 1751 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_postdecrement; } -#line 3864 "awkgram.c" /* yacc.c:1646 */ +#line 3856 "awkgram.c" /* yacc.c:1646 */ break; case 180: -#line 1762 "awkgram.y" /* yacc.c:1646 */ +#line 1754 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3870 "awkgram.c" /* yacc.c:1646 */ +#line 3862 "awkgram.c" /* yacc.c:1646 */ break; case 182: -#line 1770 "awkgram.y" /* yacc.c:1646 */ +#line 1762 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3876 "awkgram.c" /* yacc.c:1646 */ +#line 3868 "awkgram.c" /* yacc.c:1646 */ break; case 183: -#line 1774 "awkgram.y" /* yacc.c:1646 */ +#line 1766 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3882 "awkgram.c" /* yacc.c:1646 */ +#line 3874 "awkgram.c" /* yacc.c:1646 */ break; case 186: -#line 1783 "awkgram.y" /* yacc.c:1646 */ +#line 1775 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3888 "awkgram.c" /* yacc.c:1646 */ +#line 3880 "awkgram.c" /* yacc.c:1646 */ break; case 187: -#line 1787 "awkgram.y" /* yacc.c:1646 */ +#line 1779 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); yyerrok; } -#line 3894 "awkgram.c" /* yacc.c:1646 */ +#line 3886 "awkgram.c" /* yacc.c:1646 */ break; case 188: -#line 1791 "awkgram.y" /* yacc.c:1646 */ +#line 1783 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3900 "awkgram.c" /* yacc.c:1646 */ +#line 3892 "awkgram.c" /* yacc.c:1646 */ break; -#line 3904 "awkgram.c" /* yacc.c:1646 */ +#line 3896 "awkgram.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4128,7 +4120,7 @@ yyreturn: #endif return yyresult; } -#line 1793 "awkgram.y" /* yacc.c:1906 */ +#line 1785 "awkgram.y" /* yacc.c:1906 */ struct token { @@ -4685,8 +4677,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; } @@ -6585,7 +6575,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; } @@ -6778,51 +6768,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 * @@ -6834,43 +6779,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 b43e305d..7b2e2a60 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); @@ -91,7 +88,6 @@ static int one_line_close(int fd); 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[] = { @@ -120,7 +116,6 @@ static int lasttok = 0; static bool eof_warned = false; /* GLOBAL: want warning for each file */ static int break_allowed; /* kludge for break */ static int continue_allowed; /* kludge for continue */ -static bool extensions_used = false; /* program uses extensions */ #define END_FILE -1000 #define END_SRC -2000 @@ -207,8 +202,6 @@ program | program LEX_EOF { next_sourcefile(); - if (sourcefile == srcfiles) - process_deferred(); } | program error { @@ -273,7 +266,6 @@ source library : FILENAME { - extensions_used = true; if (load_library($1) < 0) YYABORT; efree($1->lextok); @@ -2346,8 +2338,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; } @@ -4246,7 +4236,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; } @@ -4439,51 +4429,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 * @@ -4495,43 +4440,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 9b85de2b..1383572a 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/main.c b/main.c index 1323330c..b31c746a 100644 --- a/main.c +++ b/main.c @@ -807,10 +807,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/test/ChangeLog b/test/ChangeLog index 2cc88514..16ef6d56 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2015-01-14 Arnold D. Robbins + + * dumpvars.ok, id.ok: Updated after code changes. + 2015-01-07 Arnold D. Robbins * Makefile.am (regexpbrack): New test. diff --git a/test/dumpvars.ok b/test/dumpvars.ok index 73d3d306..5013b351 100644 --- a/test/dumpvars.ok +++ b/test/dumpvars.ok @@ -3,6 +3,7 @@ ARGIND: 0 ARGV: array, 1 elements BINMODE: 0 CONVFMT: "%.6g" +ENVIRON: array, 57 elements ERRNO: "" FIELDWIDTHS: "" FILENAME: "-" @@ -17,6 +18,7 @@ OFMT: "%.6g" OFS: " " ORS: "\n" PREC: 53 +PROCINFO: array, 28 elements RLENGTH: 0 ROUNDMODE: "N" RS: "\n" diff --git a/test/id.ok b/test/id.ok index a9f540e7..a3271cff 100644 --- a/test/id.ok +++ b/test/id.ok @@ -70,3 +70,4 @@ lshift -> builtin SYMTAB -> array strtonum -> builtin toupper -> builtin +ENVIRON -> array -- cgit v1.2.3 From 16d6377af8d1683a29b9dc7d7ab3e8d4bc1ebd48 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 14 Jan 2015 20:50:00 +0200 Subject: Fix dumpvars test after removing deferred variables. --- test/ChangeLog | 2 ++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- test/dumpvars.ok | 2 -- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index 16ef6d56..04e65b5a 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,7 @@ 2015-01-14 Arnold D. Robbins + * 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 diff --git a/test/Makefile.am b/test/Makefile.am index 12bde88d..bd2903ab 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1679,7 +1679,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: diff --git a/test/Makefile.in b/test/Makefile.in index 55650e18..e01e273f 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2105,7 +2105,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: diff --git a/test/dumpvars.ok b/test/dumpvars.ok index 5013b351..73d3d306 100644 --- a/test/dumpvars.ok +++ b/test/dumpvars.ok @@ -3,7 +3,6 @@ ARGIND: 0 ARGV: array, 1 elements BINMODE: 0 CONVFMT: "%.6g" -ENVIRON: array, 57 elements ERRNO: "" FIELDWIDTHS: "" FILENAME: "-" @@ -18,7 +17,6 @@ OFMT: "%.6g" OFS: " " ORS: "\n" PREC: 53 -PROCINFO: array, 28 elements RLENGTH: 0 ROUNDMODE: "N" RS: "\n" -- cgit v1.2.3 From f18e168ff20217143bd922f158a1c56058795e89 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 15 Jan 2015 06:11:56 +0200 Subject: Update TODO. --- TODO | 4 ---- 1 file changed, 4 deletions(-) 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. -- cgit v1.2.3 From a59a81a68ca26293f8e3df25da2cfe20e61d7c85 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 15 Jan 2015 06:20:20 +0200 Subject: Sync some external files. --- ChangeLog | 6 ++++++ dfa.c | 2 +- dfa.h | 2 +- getopt.c | 4 ++-- getopt.h | 2 +- getopt1.c | 2 +- getopt_int.h | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7de69351..605ed80d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-15 Arnold D. Robbins + + * 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 Remove deferred variables. diff --git a/dfa.c b/dfa.c index 2ea37b52..4b461fed 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/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 -- cgit v1.2.3 From 85699a5cba88f4ee910e2c3ef42b5cc165102b51 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 16 Jan 2015 13:55:10 +0200 Subject: Bug fix in pretty-printing comments and test case. --- ChangeLog | 5 + awkgram.c | 701 +++++++++++++++++++++++++++--------------------------- awkgram.y | 1 + test/ChangeLog | 5 + test/Makefile.am | 5 + test/Makefile.in | 5 + test/profile8.awk | 9 + test/profile8.ok | 14 ++ 8 files changed, 395 insertions(+), 350 deletions(-) create mode 100644 test/profile8.awk create mode 100644 test/profile8.ok diff --git a/ChangeLog b/ChangeLog index cce38167..0101eb2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-01-16 Stephen Davies + + * 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 * dfa.h, dfa.c: Sync with grep. Mainly copyright updates. diff --git a/awkgram.c b/awkgram.c index 2148dfa5..a10e3f67 100644 --- a/awkgram.c +++ b/awkgram.c @@ -657,25 +657,25 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 204, 204, 206, 211, 212, 216, 228, 232, 243, - 249, 254, 262, 270, 272, 277, 285, 287, 293, 301, - 311, 341, 355, 369, 377, 388, 400, 402, 404, 410, - 415, 416, 420, 455, 454, 488, 490, 495, 501, 529, - 534, 535, 539, 541, 543, 550, 640, 682, 724, 837, - 844, 851, 861, 870, 879, 888, 899, 915, 914, 938, - 950, 950, 1048, 1048, 1081, 1111, 1117, 1118, 1124, 1125, - 1132, 1137, 1149, 1163, 1165, 1173, 1178, 1180, 1188, 1190, - 1199, 1200, 1208, 1213, 1213, 1224, 1228, 1236, 1237, 1240, - 1242, 1247, 1248, 1257, 1258, 1263, 1268, 1274, 1276, 1278, - 1285, 1286, 1292, 1293, 1298, 1300, 1305, 1307, 1315, 1320, - 1329, 1336, 1338, 1340, 1356, 1366, 1373, 1375, 1380, 1382, - 1384, 1392, 1394, 1399, 1401, 1406, 1408, 1410, 1460, 1462, - 1464, 1466, 1468, 1470, 1472, 1474, 1488, 1493, 1498, 1523, - 1529, 1531, 1533, 1535, 1537, 1539, 1544, 1548, 1580, 1582, - 1588, 1594, 1607, 1608, 1609, 1614, 1619, 1623, 1627, 1642, - 1655, 1660, 1696, 1714, 1715, 1721, 1722, 1727, 1729, 1736, - 1753, 1770, 1772, 1779, 1784, 1792, 1802, 1814, 1823, 1827, - 1831, 1835, 1839, 1843, 1846, 1848, 1852, 1856, 1860 + 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 @@ -1881,12 +1881,13 @@ yyreduce: #line 229 "awkgram.y" /* yacc.c:1646 */ { (void) append_rule((yyvsp[-1]), (yyvsp[0])); + first_rule = false; } -#line 1886 "awkgram.c" /* yacc.c:1646 */ +#line 1887 "awkgram.c" /* yacc.c:1646 */ break; case 8: -#line 233 "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]); @@ -1897,39 +1898,39 @@ yyreduce: } else /* pattern rule with non-empty pattern */ (void) append_rule((yyvsp[-1]), NULL); } -#line 1901 "awkgram.c" /* yacc.c:1646 */ +#line 1902 "awkgram.c" /* yacc.c:1646 */ break; case 9: -#line 244 "awkgram.y" /* yacc.c:1646 */ +#line 245 "awkgram.y" /* yacc.c:1646 */ { in_function = NULL; (void) mk_function((yyvsp[-1]), (yyvsp[0])); yyerrok; } -#line 1911 "awkgram.c" /* yacc.c:1646 */ +#line 1912 "awkgram.c" /* yacc.c:1646 */ break; case 10: -#line 250 "awkgram.y" /* yacc.c:1646 */ +#line 251 "awkgram.y" /* yacc.c:1646 */ { want_source = false; yyerrok; } -#line 1920 "awkgram.c" /* yacc.c:1646 */ +#line 1921 "awkgram.c" /* yacc.c:1646 */ break; case 11: -#line 255 "awkgram.y" /* yacc.c:1646 */ +#line 256 "awkgram.y" /* yacc.c:1646 */ { want_source = false; yyerrok; } -#line 1929 "awkgram.c" /* yacc.c:1646 */ +#line 1930 "awkgram.c" /* yacc.c:1646 */ break; case 12: -#line 263 "awkgram.y" /* yacc.c:1646 */ +#line 264 "awkgram.y" /* yacc.c:1646 */ { if (include_source((yyvsp[0])) < 0) YYABORT; @@ -1937,23 +1938,23 @@ yyreduce: bcfree((yyvsp[0])); (yyval) = NULL; } -#line 1941 "awkgram.c" /* yacc.c:1646 */ +#line 1942 "awkgram.c" /* yacc.c:1646 */ break; case 13: -#line 271 "awkgram.y" /* yacc.c:1646 */ +#line 272 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1947 "awkgram.c" /* yacc.c:1646 */ +#line 1948 "awkgram.c" /* yacc.c:1646 */ break; case 14: -#line 273 "awkgram.y" /* yacc.c:1646 */ +#line 274 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1953 "awkgram.c" /* yacc.c:1646 */ +#line 1954 "awkgram.c" /* yacc.c:1646 */ break; case 15: -#line 278 "awkgram.y" /* yacc.c:1646 */ +#line 279 "awkgram.y" /* yacc.c:1646 */ { if (load_library((yyvsp[0])) < 0) YYABORT; @@ -1961,23 +1962,23 @@ yyreduce: bcfree((yyvsp[0])); (yyval) = NULL; } -#line 1965 "awkgram.c" /* yacc.c:1646 */ +#line 1966 "awkgram.c" /* yacc.c:1646 */ break; case 16: -#line 286 "awkgram.y" /* yacc.c:1646 */ +#line 287 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1971 "awkgram.c" /* yacc.c:1646 */ +#line 1972 "awkgram.c" /* yacc.c:1646 */ break; case 17: -#line 288 "awkgram.y" /* yacc.c:1646 */ +#line 289 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 1977 "awkgram.c" /* yacc.c:1646 */ +#line 1978 "awkgram.c" /* yacc.c:1646 */ break; case 18: -#line 293 "awkgram.y" /* yacc.c:1646 */ +#line 294 "awkgram.y" /* yacc.c:1646 */ { rule = Rule; if (comment != NULL) { @@ -1986,11 +1987,11 @@ yyreduce: } else (yyval) = NULL; } -#line 1990 "awkgram.c" /* yacc.c:1646 */ +#line 1991 "awkgram.c" /* yacc.c:1646 */ break; case 19: -#line 302 "awkgram.y" /* yacc.c:1646 */ +#line 303 "awkgram.y" /* yacc.c:1646 */ { rule = Rule; if (comment != NULL) { @@ -1999,11 +2000,11 @@ yyreduce: } else (yyval) = (yyvsp[0]); } -#line 2003 "awkgram.c" /* yacc.c:1646 */ +#line 2004 "awkgram.c" /* yacc.c:1646 */ break; case 20: -#line 312 "awkgram.y" /* yacc.c:1646 */ +#line 313 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *tp; @@ -2033,11 +2034,11 @@ yyreduce: (yyval) = list_append(list_merge((yyvsp[-3]), (yyvsp[0])), tp); rule = Rule; } -#line 2037 "awkgram.c" /* yacc.c:1646 */ +#line 2038 "awkgram.c" /* yacc.c:1646 */ break; case 21: -#line 342 "awkgram.y" /* yacc.c:1646 */ +#line 343 "awkgram.y" /* yacc.c:1646 */ { static int begin_seen = 0; @@ -2051,11 +2052,11 @@ yyreduce: check_comment(); (yyval) = (yyvsp[0]); } -#line 2055 "awkgram.c" /* yacc.c:1646 */ +#line 2056 "awkgram.c" /* yacc.c:1646 */ break; case 22: -#line 356 "awkgram.y" /* yacc.c:1646 */ +#line 357 "awkgram.y" /* yacc.c:1646 */ { static int end_seen = 0; @@ -2069,11 +2070,11 @@ yyreduce: check_comment(); (yyval) = (yyvsp[0]); } -#line 2073 "awkgram.c" /* yacc.c:1646 */ +#line 2074 "awkgram.c" /* yacc.c:1646 */ break; case 23: -#line 370 "awkgram.y" /* yacc.c:1646 */ +#line 371 "awkgram.y" /* yacc.c:1646 */ { func_first = false; (yyvsp[0])->in_rule = rule = BEGINFILE; @@ -2081,11 +2082,11 @@ yyreduce: check_comment(); (yyval) = (yyvsp[0]); } -#line 2085 "awkgram.c" /* yacc.c:1646 */ +#line 2086 "awkgram.c" /* yacc.c:1646 */ break; case 24: -#line 378 "awkgram.y" /* yacc.c:1646 */ +#line 379 "awkgram.y" /* yacc.c:1646 */ { func_first = false; (yyvsp[0])->in_rule = rule = ENDFILE; @@ -2093,11 +2094,11 @@ yyreduce: check_comment(); (yyval) = (yyvsp[0]); } -#line 2097 "awkgram.c" /* yacc.c:1646 */ +#line 2098 "awkgram.c" /* yacc.c:1646 */ break; case 25: -#line 389 "awkgram.y" /* yacc.c:1646 */ +#line 390 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *ip; if ((yyvsp[-3]) == NULL) @@ -2106,39 +2107,39 @@ yyreduce: ip = (yyvsp[-3]); (yyval) = ip; } -#line 2110 "awkgram.c" /* yacc.c:1646 */ +#line 2111 "awkgram.c" /* yacc.c:1646 */ break; case 26: -#line 401 "awkgram.y" /* yacc.c:1646 */ +#line 402 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2116 "awkgram.c" /* yacc.c:1646 */ +#line 2117 "awkgram.c" /* yacc.c:1646 */ break; case 27: -#line 403 "awkgram.y" /* yacc.c:1646 */ +#line 404 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2122 "awkgram.c" /* yacc.c:1646 */ +#line 2123 "awkgram.c" /* yacc.c:1646 */ break; case 28: -#line 405 "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 2132 "awkgram.c" /* yacc.c:1646 */ +#line 2133 "awkgram.c" /* yacc.c:1646 */ break; case 29: -#line 411 "awkgram.y" /* yacc.c:1646 */ +#line 412 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2138 "awkgram.c" /* yacc.c:1646 */ +#line 2139 "awkgram.c" /* yacc.c:1646 */ break; case 32: -#line 421 "awkgram.y" /* yacc.c:1646 */ +#line 422 "awkgram.y" /* yacc.c:1646 */ { /* * treat any comments between BOF and the first function @@ -2165,17 +2166,17 @@ yyreduce: /* $4 already free'd in install_function */ (yyval) = (yyvsp[-5]); } -#line 2169 "awkgram.c" /* yacc.c:1646 */ +#line 2170 "awkgram.c" /* yacc.c:1646 */ break; case 33: -#line 455 "awkgram.y" /* yacc.c:1646 */ +#line 456 "awkgram.y" /* yacc.c:1646 */ { want_regexp = true; } -#line 2175 "awkgram.c" /* yacc.c:1646 */ +#line 2176 "awkgram.c" /* yacc.c:1646 */ break; case 34: -#line 457 "awkgram.y" /* yacc.c:1646 */ +#line 458 "awkgram.y" /* yacc.c:1646 */ { NODE *n, *exp; char *re; @@ -2204,28 +2205,28 @@ yyreduce: (yyval)->opcode = Op_match_rec; (yyval)->memory = n; } -#line 2208 "awkgram.c" /* yacc.c:1646 */ +#line 2209 "awkgram.c" /* yacc.c:1646 */ break; case 35: -#line 489 "awkgram.y" /* yacc.c:1646 */ +#line 490 "awkgram.y" /* yacc.c:1646 */ { bcfree((yyvsp[0])); } -#line 2214 "awkgram.c" /* yacc.c:1646 */ +#line 2215 "awkgram.c" /* yacc.c:1646 */ break; case 37: -#line 495 "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 2225 "awkgram.c" /* yacc.c:1646 */ +#line 2226 "awkgram.c" /* yacc.c:1646 */ break; case 38: -#line 502 "awkgram.y" /* yacc.c:1646 */ +#line 503 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[0]) == NULL) { if (comment == NULL) @@ -2253,40 +2254,40 @@ yyreduce: } yyerrok; } -#line 2257 "awkgram.c" /* yacc.c:1646 */ +#line 2258 "awkgram.c" /* yacc.c:1646 */ break; case 39: -#line 530 "awkgram.y" /* yacc.c:1646 */ +#line 531 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2263 "awkgram.c" /* yacc.c:1646 */ +#line 2264 "awkgram.c" /* yacc.c:1646 */ break; case 42: -#line 540 "awkgram.y" /* yacc.c:1646 */ +#line 541 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2269 "awkgram.c" /* yacc.c:1646 */ +#line 2270 "awkgram.c" /* yacc.c:1646 */ break; case 43: -#line 542 "awkgram.y" /* yacc.c:1646 */ +#line 543 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 2275 "awkgram.c" /* yacc.c:1646 */ +#line 2276 "awkgram.c" /* yacc.c:1646 */ break; case 44: -#line 544 "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 2286 "awkgram.c" /* yacc.c:1646 */ +#line 2287 "awkgram.c" /* yacc.c:1646 */ break; case 45: -#line 551 "awkgram.y" /* yacc.c:1646 */ +#line 552 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt; INSTRUCTION *ip, *nextc, *tbreak; @@ -2376,11 +2377,11 @@ yyreduce: break_allowed--; fix_break_continue(ip, tbreak, NULL); } -#line 2380 "awkgram.c" /* yacc.c:1646 */ +#line 2381 "awkgram.c" /* yacc.c:1646 */ break; case 46: -#line 641 "awkgram.y" /* yacc.c:1646 */ +#line 642 "awkgram.y" /* yacc.c:1646 */ { /* * ----------------- @@ -2422,11 +2423,11 @@ yyreduce: continue_allowed--; fix_break_continue(ip, tbreak, tcont); } -#line 2426 "awkgram.c" /* yacc.c:1646 */ +#line 2427 "awkgram.c" /* yacc.c:1646 */ break; case 47: -#line 683 "awkgram.y" /* yacc.c:1646 */ +#line 684 "awkgram.y" /* yacc.c:1646 */ { /* * ----------------- @@ -2468,11 +2469,11 @@ yyreduce: } /* else $1 and $4 are NULLs */ } -#line 2472 "awkgram.c" /* yacc.c:1646 */ +#line 2473 "awkgram.c" /* yacc.c:1646 */ break; case 48: -#line 725 "awkgram.y" /* yacc.c:1646 */ +#line 726 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *ip; char *var_name = (yyvsp[-5])->lextok; @@ -2585,44 +2586,44 @@ regular_loop: break_allowed--; continue_allowed--; } -#line 2589 "awkgram.c" /* yacc.c:1646 */ +#line 2590 "awkgram.c" /* yacc.c:1646 */ break; case 49: -#line 838 "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 2600 "awkgram.c" /* yacc.c:1646 */ +#line 2601 "awkgram.c" /* yacc.c:1646 */ break; case 50: -#line 845 "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 2611 "awkgram.c" /* yacc.c:1646 */ +#line 2612 "awkgram.c" /* yacc.c:1646 */ break; case 51: -#line 852 "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 2622 "awkgram.c" /* yacc.c:1646 */ +#line 2623 "awkgram.c" /* yacc.c:1646 */ break; case 52: -#line 862 "awkgram.y" /* yacc.c:1646 */ +#line 863 "awkgram.y" /* yacc.c:1646 */ { if (! break_allowed) error_ln((yyvsp[-1])->source_line, @@ -2631,11 +2632,11 @@ regular_loop: (yyval) = list_create((yyvsp[-1])); } -#line 2635 "awkgram.c" /* yacc.c:1646 */ +#line 2636 "awkgram.c" /* yacc.c:1646 */ break; case 53: -#line 871 "awkgram.y" /* yacc.c:1646 */ +#line 872 "awkgram.y" /* yacc.c:1646 */ { if (! continue_allowed) error_ln((yyvsp[-1])->source_line, @@ -2644,11 +2645,11 @@ regular_loop: (yyval) = list_create((yyvsp[-1])); } -#line 2648 "awkgram.c" /* yacc.c:1646 */ +#line 2649 "awkgram.c" /* yacc.c:1646 */ break; case 54: -#line 880 "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) @@ -2657,11 +2658,11 @@ regular_loop: (yyvsp[-1])->target_jmp = ip_rec; (yyval) = list_create((yyvsp[-1])); } -#line 2661 "awkgram.c" /* yacc.c:1646 */ +#line 2662 "awkgram.c" /* yacc.c:1646 */ break; case 55: -#line 889 "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) @@ -2672,11 +2673,11 @@ regular_loop: (yyvsp[-1])->target_endfile = ip_endfile; (yyval) = list_create((yyvsp[-1])); } -#line 2676 "awkgram.c" /* yacc.c:1646 */ +#line 2677 "awkgram.c" /* yacc.c:1646 */ break; case 56: -#line 900 "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. @@ -2691,20 +2692,20 @@ regular_loop: } else (yyval) = list_append((yyvsp[-1]), (yyvsp[-2])); } -#line 2695 "awkgram.c" /* yacc.c:1646 */ +#line 2696 "awkgram.c" /* yacc.c:1646 */ break; case 57: -#line 915 "awkgram.y" /* yacc.c:1646 */ +#line 916 "awkgram.y" /* yacc.c:1646 */ { if (! in_function) yyerror(_("`return' used outside function context")); } -#line 2704 "awkgram.c" /* yacc.c:1646 */ +#line 2705 "awkgram.c" /* yacc.c:1646 */ break; case 58: -#line 918 "awkgram.y" /* yacc.c:1646 */ +#line 919 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[-1]) == NULL) { (yyval) = list_create((yyvsp[-3])); @@ -2725,17 +2726,17 @@ regular_loop: (yyval) = list_append((yyvsp[-1]), (yyvsp[-3])); } } -#line 2729 "awkgram.c" /* yacc.c:1646 */ +#line 2730 "awkgram.c" /* yacc.c:1646 */ break; case 60: -#line 950 "awkgram.y" /* yacc.c:1646 */ +#line 951 "awkgram.y" /* yacc.c:1646 */ { in_print = true; in_parens = 0; } -#line 2735 "awkgram.c" /* yacc.c:1646 */ +#line 2736 "awkgram.c" /* yacc.c:1646 */ break; case 61: -#line 951 "awkgram.y" /* yacc.c:1646 */ +#line 952 "awkgram.y" /* yacc.c:1646 */ { /* * Optimization: plain `print' has no expression list, so $3 is null. @@ -2832,17 +2833,17 @@ regular_print: } } } -#line 2836 "awkgram.c" /* yacc.c:1646 */ +#line 2837 "awkgram.c" /* yacc.c:1646 */ break; case 62: -#line 1048 "awkgram.y" /* yacc.c:1646 */ +#line 1049 "awkgram.y" /* yacc.c:1646 */ { sub_counter = 0; } -#line 2842 "awkgram.c" /* yacc.c:1646 */ +#line 2843 "awkgram.c" /* yacc.c:1646 */ break; case 63: -#line 1049 "awkgram.y" /* yacc.c:1646 */ +#line 1050 "awkgram.y" /* yacc.c:1646 */ { char *arr = (yyvsp[-2])->lextok; @@ -2875,11 +2876,11 @@ regular_print: (yyval) = list_append(list_append((yyvsp[0]), (yyvsp[-2])), (yyvsp[-3])); } } -#line 2879 "awkgram.c" /* yacc.c:1646 */ +#line 2880 "awkgram.c" /* yacc.c:1646 */ break; case 64: -#line 1086 "awkgram.y" /* yacc.c:1646 */ +#line 1087 "awkgram.y" /* yacc.c:1646 */ { static bool warned = false; char *arr = (yyvsp[-1])->lextok; @@ -2905,52 +2906,52 @@ regular_print: fatal(_("`delete' is not allowed with FUNCTAB")); } } -#line 2909 "awkgram.c" /* yacc.c:1646 */ +#line 2910 "awkgram.c" /* yacc.c:1646 */ break; case 65: -#line 1112 "awkgram.y" /* yacc.c:1646 */ +#line 1113 "awkgram.y" /* yacc.c:1646 */ { (yyval) = optimize_assignment((yyvsp[0])); } -#line 2915 "awkgram.c" /* yacc.c:1646 */ +#line 2916 "awkgram.c" /* yacc.c:1646 */ break; case 66: -#line 1117 "awkgram.y" /* yacc.c:1646 */ +#line 1118 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2921 "awkgram.c" /* yacc.c:1646 */ +#line 2922 "awkgram.c" /* yacc.c:1646 */ break; case 67: -#line 1119 "awkgram.y" /* yacc.c:1646 */ +#line 1120 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2927 "awkgram.c" /* yacc.c:1646 */ +#line 2928 "awkgram.c" /* yacc.c:1646 */ break; case 68: -#line 1124 "awkgram.y" /* yacc.c:1646 */ +#line 1125 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2933 "awkgram.c" /* yacc.c:1646 */ +#line 2934 "awkgram.c" /* yacc.c:1646 */ break; case 69: -#line 1126 "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 2944 "awkgram.c" /* yacc.c:1646 */ +#line 2945 "awkgram.c" /* yacc.c:1646 */ break; case 70: -#line 1133 "awkgram.y" /* yacc.c:1646 */ +#line 1134 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 2950 "awkgram.c" /* yacc.c:1646 */ +#line 2951 "awkgram.c" /* yacc.c:1646 */ break; case 71: -#line 1138 "awkgram.y" /* yacc.c:1646 */ +#line 1139 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *casestmt = (yyvsp[0]); if ((yyvsp[0]) == NULL) @@ -2962,11 +2963,11 @@ regular_print: bcfree((yyvsp[-2])); (yyval) = (yyvsp[-4]); } -#line 2966 "awkgram.c" /* yacc.c:1646 */ +#line 2967 "awkgram.c" /* yacc.c:1646 */ break; case 72: -#line 1150 "awkgram.y" /* yacc.c:1646 */ +#line 1151 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *casestmt = (yyvsp[0]); if ((yyvsp[0]) == NULL) @@ -2977,17 +2978,17 @@ regular_print: (yyvsp[-3])->case_stmt = casestmt; (yyval) = (yyvsp[-3]); } -#line 2981 "awkgram.c" /* yacc.c:1646 */ +#line 2982 "awkgram.c" /* yacc.c:1646 */ break; case 73: -#line 1164 "awkgram.y" /* yacc.c:1646 */ +#line 1165 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 2987 "awkgram.c" /* yacc.c:1646 */ +#line 2988 "awkgram.c" /* yacc.c:1646 */ break; case 74: -#line 1166 "awkgram.y" /* yacc.c:1646 */ +#line 1167 "awkgram.y" /* yacc.c:1646 */ { NODE *n = (yyvsp[0])->memory; (void) force_number(n); @@ -2995,71 +2996,71 @@ regular_print: bcfree((yyvsp[-1])); (yyval) = (yyvsp[0]); } -#line 2999 "awkgram.c" /* yacc.c:1646 */ +#line 3000 "awkgram.c" /* yacc.c:1646 */ break; case 75: -#line 1174 "awkgram.y" /* yacc.c:1646 */ +#line 1175 "awkgram.y" /* yacc.c:1646 */ { bcfree((yyvsp[-1])); (yyval) = (yyvsp[0]); } -#line 3008 "awkgram.c" /* yacc.c:1646 */ +#line 3009 "awkgram.c" /* yacc.c:1646 */ break; case 76: -#line 1179 "awkgram.y" /* yacc.c:1646 */ +#line 1180 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3014 "awkgram.c" /* yacc.c:1646 */ +#line 3015 "awkgram.c" /* yacc.c:1646 */ break; case 77: -#line 1181 "awkgram.y" /* yacc.c:1646 */ +#line 1182 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_push_re; (yyval) = (yyvsp[0]); } -#line 3023 "awkgram.c" /* yacc.c:1646 */ +#line 3024 "awkgram.c" /* yacc.c:1646 */ break; case 78: -#line 1189 "awkgram.y" /* yacc.c:1646 */ +#line 1190 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3029 "awkgram.c" /* yacc.c:1646 */ +#line 3030 "awkgram.c" /* yacc.c:1646 */ break; case 79: -#line 1191 "awkgram.y" /* yacc.c:1646 */ +#line 1192 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3035 "awkgram.c" /* yacc.c:1646 */ +#line 3036 "awkgram.c" /* yacc.c:1646 */ break; case 81: -#line 1201 "awkgram.y" /* yacc.c:1646 */ +#line 1202 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3043 "awkgram.c" /* yacc.c:1646 */ +#line 3044 "awkgram.c" /* yacc.c:1646 */ break; case 82: -#line 1208 "awkgram.y" /* yacc.c:1646 */ +#line 1209 "awkgram.y" /* yacc.c:1646 */ { in_print = false; in_parens = 0; (yyval) = NULL; } -#line 3053 "awkgram.c" /* yacc.c:1646 */ +#line 3054 "awkgram.c" /* yacc.c:1646 */ break; case 83: -#line 1213 "awkgram.y" /* yacc.c:1646 */ +#line 1214 "awkgram.y" /* yacc.c:1646 */ { in_print = false; in_parens = 0; } -#line 3059 "awkgram.c" /* yacc.c:1646 */ +#line 3060 "awkgram.c" /* yacc.c:1646 */ break; case 84: -#line 1214 "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 @@ -3067,136 +3068,136 @@ regular_print: yyerror(_("multistage two-way pipelines don't work")); (yyval) = list_prepend((yyvsp[0]), (yyvsp[-2])); } -#line 3071 "awkgram.c" /* yacc.c:1646 */ +#line 3072 "awkgram.c" /* yacc.c:1646 */ break; case 85: -#line 1225 "awkgram.y" /* yacc.c:1646 */ +#line 1226 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_condition((yyvsp[-3]), (yyvsp[-5]), (yyvsp[0]), NULL, NULL); } -#line 3079 "awkgram.c" /* yacc.c:1646 */ +#line 3080 "awkgram.c" /* yacc.c:1646 */ break; case 86: -#line 1230 "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 3087 "awkgram.c" /* yacc.c:1646 */ +#line 3088 "awkgram.c" /* yacc.c:1646 */ break; case 91: -#line 1247 "awkgram.y" /* yacc.c:1646 */ +#line 1248 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3093 "awkgram.c" /* yacc.c:1646 */ +#line 3094 "awkgram.c" /* yacc.c:1646 */ break; case 92: -#line 1249 "awkgram.y" /* yacc.c:1646 */ +#line 1250 "awkgram.y" /* yacc.c:1646 */ { bcfree((yyvsp[-1])); (yyval) = (yyvsp[0]); } -#line 3102 "awkgram.c" /* yacc.c:1646 */ +#line 3103 "awkgram.c" /* yacc.c:1646 */ break; case 93: -#line 1257 "awkgram.y" /* yacc.c:1646 */ +#line 1258 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3108 "awkgram.c" /* yacc.c:1646 */ +#line 3109 "awkgram.c" /* yacc.c:1646 */ break; case 94: -#line 1259 "awkgram.y" /* yacc.c:1646 */ +#line 1260 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3114 "awkgram.c" /* yacc.c:1646 */ +#line 3115 "awkgram.c" /* yacc.c:1646 */ break; case 95: -#line 1264 "awkgram.y" /* yacc.c:1646 */ +#line 1265 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->param_count = 0; (yyval) = list_create((yyvsp[0])); } -#line 3123 "awkgram.c" /* yacc.c:1646 */ +#line 3124 "awkgram.c" /* yacc.c:1646 */ break; case 96: -#line 1269 "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 3133 "awkgram.c" /* yacc.c:1646 */ +#line 3134 "awkgram.c" /* yacc.c:1646 */ break; case 97: -#line 1275 "awkgram.y" /* yacc.c:1646 */ +#line 1276 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3139 "awkgram.c" /* yacc.c:1646 */ +#line 3140 "awkgram.c" /* yacc.c:1646 */ break; case 98: -#line 1277 "awkgram.y" /* yacc.c:1646 */ +#line 1278 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3145 "awkgram.c" /* yacc.c:1646 */ +#line 3146 "awkgram.c" /* yacc.c:1646 */ break; case 99: -#line 1279 "awkgram.y" /* yacc.c:1646 */ +#line 1280 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-2]); } -#line 3151 "awkgram.c" /* yacc.c:1646 */ +#line 3152 "awkgram.c" /* yacc.c:1646 */ break; case 100: -#line 1285 "awkgram.y" /* yacc.c:1646 */ +#line 1286 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3157 "awkgram.c" /* yacc.c:1646 */ +#line 3158 "awkgram.c" /* yacc.c:1646 */ break; case 101: -#line 1287 "awkgram.y" /* yacc.c:1646 */ +#line 1288 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3163 "awkgram.c" /* yacc.c:1646 */ +#line 3164 "awkgram.c" /* yacc.c:1646 */ break; case 102: -#line 1292 "awkgram.y" /* yacc.c:1646 */ +#line 1293 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3169 "awkgram.c" /* yacc.c:1646 */ +#line 3170 "awkgram.c" /* yacc.c:1646 */ break; case 103: -#line 1294 "awkgram.y" /* yacc.c:1646 */ +#line 1295 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3175 "awkgram.c" /* yacc.c:1646 */ +#line 3176 "awkgram.c" /* yacc.c:1646 */ break; case 104: -#line 1299 "awkgram.y" /* yacc.c:1646 */ +#line 1300 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_expression_list(NULL, (yyvsp[0])); } -#line 3181 "awkgram.c" /* yacc.c:1646 */ +#line 3182 "awkgram.c" /* yacc.c:1646 */ break; case 105: -#line 1301 "awkgram.y" /* yacc.c:1646 */ +#line 1302 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0])); yyerrok; } -#line 3190 "awkgram.c" /* yacc.c:1646 */ +#line 3191 "awkgram.c" /* yacc.c:1646 */ break; case 106: -#line 1306 "awkgram.y" /* yacc.c:1646 */ +#line 1307 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3196 "awkgram.c" /* yacc.c:1646 */ +#line 3197 "awkgram.c" /* yacc.c:1646 */ break; case 107: -#line 1308 "awkgram.y" /* yacc.c:1646 */ +#line 1309 "awkgram.y" /* yacc.c:1646 */ { /* * Returning the expression list instead of NULL lets @@ -3204,52 +3205,52 @@ regular_print: */ (yyval) = (yyvsp[-1]); } -#line 3208 "awkgram.c" /* yacc.c:1646 */ +#line 3209 "awkgram.c" /* yacc.c:1646 */ break; case 108: -#line 1316 "awkgram.y" /* yacc.c:1646 */ +#line 1317 "awkgram.y" /* yacc.c:1646 */ { /* Ditto */ (yyval) = mk_expression_list((yyvsp[-2]), (yyvsp[0])); } -#line 3217 "awkgram.c" /* yacc.c:1646 */ +#line 3218 "awkgram.c" /* yacc.c:1646 */ break; case 109: -#line 1321 "awkgram.y" /* yacc.c:1646 */ +#line 1322 "awkgram.y" /* yacc.c:1646 */ { /* Ditto */ (yyval) = (yyvsp[-2]); } -#line 3226 "awkgram.c" /* yacc.c:1646 */ +#line 3227 "awkgram.c" /* yacc.c:1646 */ break; case 110: -#line 1330 "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 3237 "awkgram.c" /* yacc.c:1646 */ +#line 3238 "awkgram.c" /* yacc.c:1646 */ break; case 111: -#line 1337 "awkgram.y" /* yacc.c:1646 */ +#line 1338 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3243 "awkgram.c" /* yacc.c:1646 */ +#line 3244 "awkgram.c" /* yacc.c:1646 */ break; case 112: -#line 1339 "awkgram.y" /* yacc.c:1646 */ +#line 1340 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_boolean((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3249 "awkgram.c" /* yacc.c:1646 */ +#line 3250 "awkgram.c" /* yacc.c:1646 */ break; case 113: -#line 1341 "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, @@ -3265,11 +3266,11 @@ regular_print: (yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1])); } } -#line 3269 "awkgram.c" /* yacc.c:1646 */ +#line 3270 "awkgram.c" /* yacc.c:1646 */ break; case 114: -#line 1357 "awkgram.y" /* yacc.c:1646 */ +#line 1358 "awkgram.y" /* yacc.c:1646 */ { if (do_lint_old) warning_ln((yyvsp[-1])->source_line, @@ -3279,91 +3280,91 @@ regular_print: (yyvsp[-1])->expr_count = 1; (yyval) = list_append(list_merge((yyvsp[-2]), (yyvsp[0])), (yyvsp[-1])); } -#line 3283 "awkgram.c" /* yacc.c:1646 */ +#line 3284 "awkgram.c" /* yacc.c:1646 */ break; case 115: -#line 1367 "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 3294 "awkgram.c" /* yacc.c:1646 */ +#line 3295 "awkgram.c" /* yacc.c:1646 */ break; case 116: -#line 1374 "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 3300 "awkgram.c" /* yacc.c:1646 */ +#line 3301 "awkgram.c" /* yacc.c:1646 */ break; case 117: -#line 1376 "awkgram.y" /* yacc.c:1646 */ +#line 1377 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3306 "awkgram.c" /* yacc.c:1646 */ +#line 3307 "awkgram.c" /* yacc.c:1646 */ break; case 118: -#line 1381 "awkgram.y" /* yacc.c:1646 */ +#line 1382 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3312 "awkgram.c" /* yacc.c:1646 */ +#line 3313 "awkgram.c" /* yacc.c:1646 */ break; case 119: -#line 1383 "awkgram.y" /* yacc.c:1646 */ +#line 1384 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3318 "awkgram.c" /* yacc.c:1646 */ +#line 3319 "awkgram.c" /* yacc.c:1646 */ break; case 120: -#line 1385 "awkgram.y" /* yacc.c:1646 */ +#line 1386 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_assign_quotient; (yyval) = (yyvsp[0]); } -#line 3327 "awkgram.c" /* yacc.c:1646 */ +#line 3328 "awkgram.c" /* yacc.c:1646 */ break; case 121: -#line 1393 "awkgram.y" /* yacc.c:1646 */ +#line 1394 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3333 "awkgram.c" /* yacc.c:1646 */ +#line 3334 "awkgram.c" /* yacc.c:1646 */ break; case 122: -#line 1395 "awkgram.y" /* yacc.c:1646 */ +#line 1396 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3339 "awkgram.c" /* yacc.c:1646 */ +#line 3340 "awkgram.c" /* yacc.c:1646 */ break; case 123: -#line 1400 "awkgram.y" /* yacc.c:1646 */ +#line 1401 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3345 "awkgram.c" /* yacc.c:1646 */ +#line 3346 "awkgram.c" /* yacc.c:1646 */ break; case 124: -#line 1402 "awkgram.y" /* yacc.c:1646 */ +#line 1403 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3351 "awkgram.c" /* yacc.c:1646 */ +#line 3352 "awkgram.c" /* yacc.c:1646 */ break; case 125: -#line 1407 "awkgram.y" /* yacc.c:1646 */ +#line 1408 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3357 "awkgram.c" /* yacc.c:1646 */ +#line 3358 "awkgram.c" /* yacc.c:1646 */ break; case 126: -#line 1409 "awkgram.y" /* yacc.c:1646 */ +#line 1410 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3363 "awkgram.c" /* yacc.c:1646 */ +#line 3364 "awkgram.c" /* yacc.c:1646 */ break; case 127: -#line 1411 "awkgram.y" /* yacc.c:1646 */ +#line 1412 "awkgram.y" /* yacc.c:1646 */ { int count = 2; bool is_simple_var = false; @@ -3410,47 +3411,47 @@ regular_print: max_args = count; } } -#line 3414 "awkgram.c" /* yacc.c:1646 */ +#line 3415 "awkgram.c" /* yacc.c:1646 */ break; case 129: -#line 1463 "awkgram.y" /* yacc.c:1646 */ +#line 1464 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3420 "awkgram.c" /* yacc.c:1646 */ +#line 3421 "awkgram.c" /* yacc.c:1646 */ break; case 130: -#line 1465 "awkgram.y" /* yacc.c:1646 */ +#line 1466 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3426 "awkgram.c" /* yacc.c:1646 */ +#line 3427 "awkgram.c" /* yacc.c:1646 */ break; case 131: -#line 1467 "awkgram.y" /* yacc.c:1646 */ +#line 1468 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3432 "awkgram.c" /* yacc.c:1646 */ +#line 3433 "awkgram.c" /* yacc.c:1646 */ break; case 132: -#line 1469 "awkgram.y" /* yacc.c:1646 */ +#line 1470 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3438 "awkgram.c" /* yacc.c:1646 */ +#line 3439 "awkgram.c" /* yacc.c:1646 */ break; case 133: -#line 1471 "awkgram.y" /* yacc.c:1646 */ +#line 1472 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3444 "awkgram.c" /* yacc.c:1646 */ +#line 3445 "awkgram.c" /* yacc.c:1646 */ break; case 134: -#line 1473 "awkgram.y" /* yacc.c:1646 */ +#line 1474 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3450 "awkgram.c" /* yacc.c:1646 */ +#line 3451 "awkgram.c" /* yacc.c:1646 */ break; case 135: -#line 1475 "awkgram.y" /* yacc.c:1646 */ +#line 1476 "awkgram.y" /* yacc.c:1646 */ { /* * In BEGINFILE/ENDFILE, allow `getline [var] < file' @@ -3464,29 +3465,29 @@ regular_print: _("non-redirected `getline' undefined inside END action")); (yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input); } -#line 3468 "awkgram.c" /* yacc.c:1646 */ +#line 3469 "awkgram.c" /* yacc.c:1646 */ break; case 136: -#line 1489 "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 3477 "awkgram.c" /* yacc.c:1646 */ +#line 3478 "awkgram.c" /* yacc.c:1646 */ break; case 137: -#line 1494 "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 3486 "awkgram.c" /* yacc.c:1646 */ +#line 3487 "awkgram.c" /* yacc.c:1646 */ break; case 138: -#line 1499 "awkgram.y" /* yacc.c:1646 */ +#line 1500 "awkgram.y" /* yacc.c:1646 */ { if (do_lint_old) { warning_ln((yyvsp[-1])->source_line, @@ -3506,64 +3507,64 @@ regular_print: (yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1])); } } -#line 3510 "awkgram.c" /* yacc.c:1646 */ +#line 3511 "awkgram.c" /* yacc.c:1646 */ break; case 139: -#line 1524 "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 3519 "awkgram.c" /* yacc.c:1646 */ +#line 3520 "awkgram.c" /* yacc.c:1646 */ break; case 140: -#line 1530 "awkgram.y" /* yacc.c:1646 */ +#line 1531 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3525 "awkgram.c" /* yacc.c:1646 */ +#line 3526 "awkgram.c" /* yacc.c:1646 */ break; case 141: -#line 1532 "awkgram.y" /* yacc.c:1646 */ +#line 1533 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3531 "awkgram.c" /* yacc.c:1646 */ +#line 3532 "awkgram.c" /* yacc.c:1646 */ break; case 142: -#line 1534 "awkgram.y" /* yacc.c:1646 */ +#line 1535 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3537 "awkgram.c" /* yacc.c:1646 */ +#line 3538 "awkgram.c" /* yacc.c:1646 */ break; case 143: -#line 1536 "awkgram.y" /* yacc.c:1646 */ +#line 1537 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3543 "awkgram.c" /* yacc.c:1646 */ +#line 3544 "awkgram.c" /* yacc.c:1646 */ break; case 144: -#line 1538 "awkgram.y" /* yacc.c:1646 */ +#line 1539 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3549 "awkgram.c" /* yacc.c:1646 */ +#line 3550 "awkgram.c" /* yacc.c:1646 */ break; case 145: -#line 1540 "awkgram.y" /* yacc.c:1646 */ +#line 1541 "awkgram.y" /* yacc.c:1646 */ { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } -#line 3555 "awkgram.c" /* yacc.c:1646 */ +#line 3556 "awkgram.c" /* yacc.c:1646 */ break; case 146: -#line 1545 "awkgram.y" /* yacc.c:1646 */ +#line 1546 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_create((yyvsp[0])); } -#line 3563 "awkgram.c" /* yacc.c:1646 */ +#line 3564 "awkgram.c" /* yacc.c:1646 */ break; case 147: -#line 1549 "awkgram.y" /* yacc.c:1646 */ +#line 1550 "awkgram.y" /* yacc.c:1646 */ { if ((yyvsp[0])->opcode == Op_match_rec) { (yyvsp[0])->opcode = Op_nomatch; @@ -3595,37 +3596,37 @@ regular_print: } } } -#line 3599 "awkgram.c" /* yacc.c:1646 */ +#line 3600 "awkgram.c" /* yacc.c:1646 */ break; case 148: -#line 1581 "awkgram.y" /* yacc.c:1646 */ +#line 1582 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3605 "awkgram.c" /* yacc.c:1646 */ +#line 3606 "awkgram.c" /* yacc.c:1646 */ break; case 149: -#line 1583 "awkgram.y" /* yacc.c:1646 */ +#line 1584 "awkgram.y" /* yacc.c:1646 */ { (yyval) = snode((yyvsp[-1]), (yyvsp[-3])); if ((yyval) == NULL) YYABORT; } -#line 3615 "awkgram.c" /* yacc.c:1646 */ +#line 3616 "awkgram.c" /* yacc.c:1646 */ break; case 150: -#line 1589 "awkgram.y" /* yacc.c:1646 */ +#line 1590 "awkgram.y" /* yacc.c:1646 */ { (yyval) = snode((yyvsp[-1]), (yyvsp[-3])); if ((yyval) == NULL) YYABORT; } -#line 3625 "awkgram.c" /* yacc.c:1646 */ +#line 3626 "awkgram.c" /* yacc.c:1646 */ break; case 151: -#line 1595 "awkgram.y" /* yacc.c:1646 */ +#line 1596 "awkgram.y" /* yacc.c:1646 */ { static bool warned = false; @@ -3638,45 +3639,45 @@ regular_print: if ((yyval) == NULL) YYABORT; } -#line 3642 "awkgram.c" /* yacc.c:1646 */ +#line 3643 "awkgram.c" /* yacc.c:1646 */ break; case 154: -#line 1610 "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 3651 "awkgram.c" /* yacc.c:1646 */ +#line 3652 "awkgram.c" /* yacc.c:1646 */ break; case 155: -#line 1615 "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 3660 "awkgram.c" /* yacc.c:1646 */ +#line 3661 "awkgram.c" /* yacc.c:1646 */ break; case 156: -#line 1620 "awkgram.y" /* yacc.c:1646 */ +#line 1621 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_create((yyvsp[0])); } -#line 3668 "awkgram.c" /* yacc.c:1646 */ +#line 3669 "awkgram.c" /* yacc.c:1646 */ break; case 157: -#line 1624 "awkgram.y" /* yacc.c:1646 */ +#line 1625 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_create((yyvsp[0])); } -#line 3676 "awkgram.c" /* yacc.c:1646 */ +#line 3677 "awkgram.c" /* yacc.c:1646 */ break; case 158: -#line 1628 "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 @@ -3691,11 +3692,11 @@ regular_print: (yyval) = list_append((yyvsp[0]), (yyvsp[-1])); } } -#line 3695 "awkgram.c" /* yacc.c:1646 */ +#line 3696 "awkgram.c" /* yacc.c:1646 */ break; case 159: -#line 1643 "awkgram.y" /* yacc.c:1646 */ +#line 1644 "awkgram.y" /* yacc.c:1646 */ { /* * was: $$ = $2 @@ -3705,20 +3706,20 @@ regular_print: (yyvsp[-1])->memory = make_number(0.0); (yyval) = list_append((yyvsp[0]), (yyvsp[-1])); } -#line 3709 "awkgram.c" /* yacc.c:1646 */ +#line 3710 "awkgram.c" /* yacc.c:1646 */ break; case 160: -#line 1656 "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 3718 "awkgram.c" /* yacc.c:1646 */ +#line 3719 "awkgram.c" /* yacc.c:1646 */ break; case 161: -#line 1661 "awkgram.y" /* yacc.c:1646 */ +#line 1662 "awkgram.y" /* yacc.c:1646 */ { /* indirect function call */ INSTRUCTION *f, *t; @@ -3751,11 +3752,11 @@ regular_print: (yyval) = list_prepend((yyvsp[0]), t); } -#line 3755 "awkgram.c" /* yacc.c:1646 */ +#line 3756 "awkgram.c" /* yacc.c:1646 */ break; case 162: -#line 1697 "awkgram.y" /* yacc.c:1646 */ +#line 1698 "awkgram.y" /* yacc.c:1646 */ { param_sanity((yyvsp[-1])); (yyvsp[-3])->opcode = Op_func_call; @@ -3769,49 +3770,49 @@ regular_print: (yyval) = list_append(t, (yyvsp[-3])); } } -#line 3773 "awkgram.c" /* yacc.c:1646 */ +#line 3774 "awkgram.c" /* yacc.c:1646 */ break; case 163: -#line 1714 "awkgram.y" /* yacc.c:1646 */ +#line 1715 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3779 "awkgram.c" /* yacc.c:1646 */ +#line 3780 "awkgram.c" /* yacc.c:1646 */ break; case 164: -#line 1716 "awkgram.y" /* yacc.c:1646 */ +#line 1717 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3785 "awkgram.c" /* yacc.c:1646 */ +#line 3786 "awkgram.c" /* yacc.c:1646 */ break; case 165: -#line 1721 "awkgram.y" /* yacc.c:1646 */ +#line 1722 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3791 "awkgram.c" /* yacc.c:1646 */ +#line 3792 "awkgram.c" /* yacc.c:1646 */ break; case 166: -#line 1723 "awkgram.y" /* yacc.c:1646 */ +#line 1724 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3797 "awkgram.c" /* yacc.c:1646 */ +#line 3798 "awkgram.c" /* yacc.c:1646 */ break; case 167: -#line 1728 "awkgram.y" /* yacc.c:1646 */ +#line 1729 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3803 "awkgram.c" /* yacc.c:1646 */ +#line 3804 "awkgram.c" /* yacc.c:1646 */ break; case 168: -#line 1730 "awkgram.y" /* yacc.c:1646 */ +#line 1731 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_merge((yyvsp[-1]), (yyvsp[0])); } -#line 3811 "awkgram.c" /* yacc.c:1646 */ +#line 3812 "awkgram.c" /* yacc.c:1646 */ break; case 169: -#line 1737 "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 */ @@ -3825,11 +3826,11 @@ regular_print: sub_counter++; /* count # of dimensions */ (yyval) = (yyvsp[0]); } -#line 3829 "awkgram.c" /* yacc.c:1646 */ +#line 3830 "awkgram.c" /* yacc.c:1646 */ break; case 170: -#line 1754 "awkgram.y" /* yacc.c:1646 */ +#line 1755 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *t = (yyvsp[-1]); if ((yyvsp[-1]) == NULL) { @@ -3843,31 +3844,31 @@ regular_print: (yyvsp[0])->sub_count = count_expressions(&t, false); (yyval) = list_append(t, (yyvsp[0])); } -#line 3847 "awkgram.c" /* yacc.c:1646 */ +#line 3848 "awkgram.c" /* yacc.c:1646 */ break; case 171: -#line 1771 "awkgram.y" /* yacc.c:1646 */ +#line 1772 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); } -#line 3853 "awkgram.c" /* yacc.c:1646 */ +#line 3854 "awkgram.c" /* yacc.c:1646 */ break; case 172: -#line 1773 "awkgram.y" /* yacc.c:1646 */ +#line 1774 "awkgram.y" /* yacc.c:1646 */ { (yyval) = list_merge((yyvsp[-1]), (yyvsp[0])); } -#line 3861 "awkgram.c" /* yacc.c:1646 */ +#line 3862 "awkgram.c" /* yacc.c:1646 */ break; case 173: -#line 1780 "awkgram.y" /* yacc.c:1646 */ +#line 1781 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[-1]); } -#line 3867 "awkgram.c" /* yacc.c:1646 */ +#line 3868 "awkgram.c" /* yacc.c:1646 */ break; case 174: -#line 1785 "awkgram.y" /* yacc.c:1646 */ +#line 1786 "awkgram.y" /* yacc.c:1646 */ { char *var_name = (yyvsp[0])->lextok; @@ -3875,22 +3876,22 @@ regular_print: (yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new); (yyval) = list_create((yyvsp[0])); } -#line 3879 "awkgram.c" /* yacc.c:1646 */ +#line 3880 "awkgram.c" /* yacc.c:1646 */ break; case 175: -#line 1793 "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 3890 "awkgram.c" /* yacc.c:1646 */ +#line 3891 "awkgram.c" /* yacc.c:1646 */ break; case 176: -#line 1803 "awkgram.y" /* yacc.c:1646 */ +#line 1804 "awkgram.y" /* yacc.c:1646 */ { INSTRUCTION *ip = (yyvsp[0])->nexti; if (ip->opcode == Op_push @@ -3902,73 +3903,73 @@ regular_print: } else (yyval) = (yyvsp[0]); } -#line 3906 "awkgram.c" /* yacc.c:1646 */ +#line 3907 "awkgram.c" /* yacc.c:1646 */ break; case 177: -#line 1815 "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 3916 "awkgram.c" /* yacc.c:1646 */ +#line 3917 "awkgram.c" /* yacc.c:1646 */ break; case 178: -#line 1824 "awkgram.y" /* yacc.c:1646 */ +#line 1825 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_postincrement; } -#line 3924 "awkgram.c" /* yacc.c:1646 */ +#line 3925 "awkgram.c" /* yacc.c:1646 */ break; case 179: -#line 1828 "awkgram.y" /* yacc.c:1646 */ +#line 1829 "awkgram.y" /* yacc.c:1646 */ { (yyvsp[0])->opcode = Op_postdecrement; } -#line 3932 "awkgram.c" /* yacc.c:1646 */ +#line 3933 "awkgram.c" /* yacc.c:1646 */ break; case 180: -#line 1831 "awkgram.y" /* yacc.c:1646 */ +#line 1832 "awkgram.y" /* yacc.c:1646 */ { (yyval) = NULL; } -#line 3938 "awkgram.c" /* yacc.c:1646 */ +#line 3939 "awkgram.c" /* yacc.c:1646 */ break; case 182: -#line 1839 "awkgram.y" /* yacc.c:1646 */ +#line 1840 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3944 "awkgram.c" /* yacc.c:1646 */ +#line 3945 "awkgram.c" /* yacc.c:1646 */ break; case 183: -#line 1843 "awkgram.y" /* yacc.c:1646 */ +#line 1844 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3950 "awkgram.c" /* yacc.c:1646 */ +#line 3951 "awkgram.c" /* yacc.c:1646 */ break; case 186: -#line 1852 "awkgram.y" /* yacc.c:1646 */ +#line 1853 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3956 "awkgram.c" /* yacc.c:1646 */ +#line 3957 "awkgram.c" /* yacc.c:1646 */ break; case 187: -#line 1856 "awkgram.y" /* yacc.c:1646 */ +#line 1857 "awkgram.y" /* yacc.c:1646 */ { (yyval) = (yyvsp[0]); yyerrok; } -#line 3962 "awkgram.c" /* yacc.c:1646 */ +#line 3963 "awkgram.c" /* yacc.c:1646 */ break; case 188: -#line 1860 "awkgram.y" /* yacc.c:1646 */ +#line 1861 "awkgram.y" /* yacc.c:1646 */ { yyerrok; } -#line 3968 "awkgram.c" /* yacc.c:1646 */ +#line 3969 "awkgram.c" /* yacc.c:1646 */ break; -#line 3972 "awkgram.c" /* yacc.c:1646 */ +#line 3973 "awkgram.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4196,7 +4197,7 @@ yyreturn: #endif return yyresult; } -#line 1862 "awkgram.y" /* yacc.c:1906 */ +#line 1863 "awkgram.y" /* yacc.c:1906 */ struct token { diff --git a/awkgram.y b/awkgram.y index d054ec9b..5e3bade9 100644 --- a/awkgram.y +++ b/awkgram.y @@ -228,6 +228,7 @@ rule : pattern action { (void) append_rule($1, $2); + first_rule = false; } | pattern statement_term { diff --git a/test/ChangeLog b/test/ChangeLog index 500fdb02..75278015 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2015-01-16 Arnold D. Robbins + + * Makefile.am (profile8): New test. + * profile8.awk, profile8.ok: New files. + 2015-01-14 Arnold D. Robbins * Makefile.am (dumpvars): Grep out ENVIRON and PROCINFO since diff --git a/test/Makefile.am b/test/Makefile.am index c3d8309d..a60547ff 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1727,6 +1727,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 3c036351..73012c81 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2152,6 +2152,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/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 +} + -- cgit v1.2.3 From f25f9c52b1ab284ac1055b4f8321a2da33e81fcb Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 19 Jan 2015 05:29:09 +0200 Subject: Finish adding profile8 test. --- test/ChangeLog | 5 +++++ test/Makefile.am | 5 ++++- test/Makefile.in | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index 75278015..19105027 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2015-01-19 Arnold D. Robbins + + * Makefile.am (profile8): Actually add the test and the files. + Thanks to Hermann Peifer for the report. + 2015-01-16 Arnold D. Robbins * Makefile.am (profile8): New test. diff --git a/test/Makefile.am b/test/Makefile.am index a60547ff..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 \ diff --git a/test/Makefile.in b/test/Makefile.in index 73012c81..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 \ -- cgit v1.2.3 From a07103b076a9a88d89bf063396a74f2272749cf4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 19 Jan 2015 06:31:11 +0200 Subject: Update to bison 3.0.3. --- ChangeLog | 6 ++++++ NEWS | 3 ++- awkgram.c | 6 +++--- command.c | 6 +++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 605ed80d..05594a8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-19 Arnold D. Robbins + + * awkgram.c: Update to bison 3.0.3. + * command.c: Ditto. + * NEWS: Note same. + 2015-01-15 Arnold D. Robbins * dfa.h, dfa.c: Sync with grep. Mainly copyright updates. diff --git a/NEWS b/NEWS index 673c1cda..cbb2d227 100644 --- a/NEWS +++ b/NEWS @@ -41,7 +41,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/awkgram.c b/awkgram.c index 99f067e7..2407d220 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" diff --git a/command.c b/command.c index 2d4bc814..389814a5 100644 --- a/command.c +++ b/command.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.3. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" -- cgit v1.2.3 From d680707683794b92f2fc69e71dcb5b2a154598be Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 19 Jan 2015 06:32:17 +0200 Subject: Doc edits. --- doc/ChangeLog | 5 + doc/gawk.info | 1155 +++++++++++++++++++++++++++-------------------------- doc/gawk.texi | 34 +- doc/gawkinet.info | 6 +- doc/gawkinet.texi | 2 +- doc/gawktexi.in | 34 +- 6 files changed, 623 insertions(+), 613 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index d2b9f236..7f2341b5 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2015-01-19 Arnold D. Robbins + + * gawkinet.texi: Fix capitalization in document title. + * gawktexi.in: Here we again: Starting on more O'Reilly fixes. + 2014-12-26 Antonio Giovanni Colombo * gawktexi.in (Glossary): Really sort the items. diff --git a/doc/gawk.info b/doc/gawk.info index 4b016405..47f21442 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. @@ -747,10 +747,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 @@ -774,16 +774,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. @@ -792,9 +792,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 @@ -833,7 +833,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 @@ -925,7 +925,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 @@ -937,10 +937,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 @@ -953,7 +953,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: @@ -1013,9 +1013,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'. @@ -1046,9 +1046,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 also described, as well as sorting arrays in + `gawk'. It also describes how `gawk' provides arrays of + arrays. - *note Functions::, describes the built-in functions `awk' and `gawk' provide, as well as how to define your own functions. @@ -34301,558 +34302,558 @@ Index Tag Table: Node: Top1204 Node: Foreword342156 -Node: Foreword446598 -Node: Preface48120 -Ref: Preface-Footnote-150991 -Ref: Preface-Footnote-251098 -Ref: Preface-Footnote-351331 -Node: History51473 -Node: Names53819 -Ref: Names-Footnote-154913 -Node: This Manual55059 -Ref: This Manual-Footnote-161546 -Node: Conventions61646 -Node: Manual History63984 -Ref: Manual History-Footnote-166966 -Ref: Manual History-Footnote-267007 -Node: How To Contribute67081 -Node: Acknowledgments68210 -Node: Getting Started73015 -Node: Running gawk75448 -Node: One-shot76638 -Node: Read Terminal77886 -Node: Long79913 -Node: Executable Scripts81429 -Ref: Executable Scripts-Footnote-184218 -Node: Comments84321 -Node: Quoting86803 -Node: DOS Quoting92327 -Node: Sample Data Files93002 -Node: Very Simple95597 -Node: Two Rules100495 -Node: More Complex102381 -Node: Statements/Lines105243 -Ref: Statements/Lines-Footnote-1109698 -Node: Other Features109963 -Node: When110894 -Ref: When-Footnote-1112648 -Node: Intro Summary112713 -Node: Invoking Gawk113596 -Node: Command Line115110 -Node: Options115908 -Ref: Options-Footnote-1131841 -Ref: Options-Footnote-2132070 -Node: Other Arguments132095 -Node: Naming Standard Input135043 -Node: Environment Variables136136 -Node: AWKPATH Variable136694 -Ref: AWKPATH Variable-Footnote-1139997 -Ref: AWKPATH Variable-Footnote-2140042 -Node: AWKLIBPATH Variable140302 -Node: Other Environment Variables141445 -Node: Exit Status145173 -Node: Include Files145849 -Node: Loading Shared Libraries149446 -Node: Obsolete150873 -Node: Undocumented151570 -Node: Invoking Summary151837 -Node: Regexp153501 -Node: Regexp Usage154955 -Node: Escape Sequences156992 -Node: Regexp Operators163003 -Ref: Regexp Operators-Footnote-1170429 -Ref: Regexp Operators-Footnote-2170576 -Node: Bracket Expressions170674 -Ref: table-char-classes172689 -Node: Leftmost Longest175613 -Node: Computed Regexps176915 -Node: GNU Regexp Operators180312 -Node: Case-sensitivity183985 -Ref: Case-sensitivity-Footnote-1186870 -Ref: Case-sensitivity-Footnote-2187105 -Node: Regexp Summary187213 -Node: Reading Files188680 -Node: Records190774 -Node: awk split records191507 -Node: gawk split records196422 -Ref: gawk split records-Footnote-1200966 -Node: Fields201003 -Ref: Fields-Footnote-1203779 -Node: Nonconstant Fields203865 -Ref: Nonconstant Fields-Footnote-1206108 -Node: Changing Fields206312 -Node: Field Separators212241 -Node: Default Field Splitting214946 -Node: Regexp Field Splitting216063 -Node: Single Character Fields219413 -Node: Command Line Field Separator220472 -Node: Full Line Fields223684 -Ref: Full Line Fields-Footnote-1225201 -Ref: Full Line Fields-Footnote-2225247 -Node: Field Splitting Summary225348 -Node: Constant Size227422 -Node: Splitting By Content232011 -Ref: Splitting By Content-Footnote-1236005 -Node: Multiple Line236168 -Ref: Multiple Line-Footnote-1242054 -Node: Getline242233 -Node: Plain Getline244445 -Node: Getline/Variable247085 -Node: Getline/File248233 -Node: Getline/Variable/File249617 -Ref: Getline/Variable/File-Footnote-1251220 -Node: Getline/Pipe251307 -Node: Getline/Variable/Pipe253990 -Node: Getline/Coprocess255121 -Node: Getline/Variable/Coprocess256373 -Node: Getline Notes257112 -Node: Getline Summary259904 -Ref: table-getline-variants260316 -Node: Read Timeout261145 -Ref: Read Timeout-Footnote-1264970 -Node: Command-line directories265028 -Node: Input Summary265933 -Node: Input Exercises269234 -Node: Printing269962 -Node: Print271739 -Node: Print Examples273196 -Node: Output Separators275975 -Node: OFMT277993 -Node: Printf279347 -Node: Basic Printf280132 -Node: Control Letters281702 -Node: Format Modifiers285685 -Node: Printf Examples291694 -Node: Redirection294180 -Node: Special FD301021 -Ref: Special FD-Footnote-1304181 -Node: Special Files304255 -Node: Other Inherited Files304872 -Node: Special Network305872 -Node: Special Caveats306734 -Node: Close Files And Pipes307685 -Ref: Close Files And Pipes-Footnote-1314867 -Ref: Close Files And Pipes-Footnote-2315015 -Node: Output Summary315165 -Node: Output Exercises316163 -Node: Expressions316843 -Node: Values318028 -Node: Constants318706 -Node: Scalar Constants319397 -Ref: Scalar Constants-Footnote-1320256 -Node: Nondecimal-numbers320506 -Node: Regexp Constants323524 -Node: Using Constant Regexps324049 -Node: Variables327192 -Node: Using Variables327847 -Node: Assignment Options329758 -Node: Conversion331633 -Node: Strings And Numbers332157 -Ref: Strings And Numbers-Footnote-1335222 -Node: Locale influences conversions335331 -Ref: table-locale-affects338078 -Node: All Operators338666 -Node: Arithmetic Ops339296 -Node: Concatenation341801 -Ref: Concatenation-Footnote-1344620 -Node: Assignment Ops344726 -Ref: table-assign-ops349705 -Node: Increment Ops350977 -Node: Truth Values and Conditions354415 -Node: Truth Values355500 -Node: Typing and Comparison356549 -Node: Variable Typing357359 -Node: Comparison Operators361012 -Ref: table-relational-ops361422 -Node: POSIX String Comparison364917 -Ref: POSIX String Comparison-Footnote-1365989 -Node: Boolean Ops366127 -Ref: Boolean Ops-Footnote-1370606 -Node: Conditional Exp370697 -Node: Function Calls372424 -Node: Precedence376304 -Node: Locales379965 -Node: Expressions Summary381597 -Node: Patterns and Actions384157 -Node: Pattern Overview385277 -Node: Regexp Patterns386956 -Node: Expression Patterns387499 -Node: Ranges391209 -Node: BEGIN/END394315 -Node: Using BEGIN/END395076 -Ref: Using BEGIN/END-Footnote-1397810 -Node: I/O And BEGIN/END397916 -Node: BEGINFILE/ENDFILE400230 -Node: Empty403131 -Node: Using Shell Variables403448 -Node: Action Overview405721 -Node: Statements408047 -Node: If Statement409895 -Node: While Statement411390 -Node: Do Statement413419 -Node: For Statement414563 -Node: Switch Statement417720 -Node: Break Statement420102 -Node: Continue Statement422143 -Node: Next Statement423970 -Node: Nextfile Statement426351 -Node: Exit Statement428981 -Node: Built-in Variables431384 -Node: User-modified432517 -Ref: User-modified-Footnote-1440198 -Node: Auto-set440260 -Ref: Auto-set-Footnote-1453295 -Ref: Auto-set-Footnote-2453500 -Node: ARGC and ARGV453556 -Node: Pattern Action Summary457774 -Node: Arrays460201 -Node: Array Basics461530 -Node: Array Intro462374 -Ref: figure-array-elements464338 -Ref: Array Intro-Footnote-1466864 -Node: Reference to Elements466992 -Node: Assigning Elements469444 -Node: Array Example469935 -Node: Scanning an Array471693 -Node: Controlling Scanning474709 -Ref: Controlling Scanning-Footnote-1479905 -Node: Numeric Array Subscripts480221 -Node: Uninitialized Subscripts482406 -Node: Delete484023 -Ref: Delete-Footnote-1486766 -Node: Multidimensional486823 -Node: Multiscanning489920 -Node: Arrays of Arrays491509 -Node: Arrays Summary496268 -Node: Functions498360 -Node: Built-in499259 -Node: Calling Built-in500337 -Node: Numeric Functions502328 -Ref: Numeric Functions-Footnote-1506345 -Ref: Numeric Functions-Footnote-2506702 -Ref: Numeric Functions-Footnote-3506750 -Node: String Functions507022 -Ref: String Functions-Footnote-1530497 -Ref: String Functions-Footnote-2530626 -Ref: String Functions-Footnote-3530874 -Node: Gory Details530961 -Ref: table-sub-escapes532742 -Ref: table-sub-proposed534262 -Ref: table-posix-sub535626 -Ref: table-gensub-escapes537162 -Ref: Gory Details-Footnote-1537994 -Node: I/O Functions538145 -Ref: I/O Functions-Footnote-1545363 -Node: Time Functions545510 -Ref: Time Functions-Footnote-1555998 -Ref: Time Functions-Footnote-2556066 -Ref: Time Functions-Footnote-3556224 -Ref: Time Functions-Footnote-4556335 -Ref: Time Functions-Footnote-5556447 -Ref: Time Functions-Footnote-6556674 -Node: Bitwise Functions556940 -Ref: table-bitwise-ops557502 -Ref: Bitwise Functions-Footnote-1561811 -Node: Type Functions561980 -Node: I18N Functions563131 -Node: User-defined564776 -Node: Definition Syntax565581 -Ref: Definition Syntax-Footnote-1570988 -Node: Function Example571059 -Ref: Function Example-Footnote-1573978 -Node: Function Caveats574000 -Node: Calling A Function574518 -Node: Variable Scope575476 -Node: Pass By Value/Reference578464 -Node: Return Statement581959 -Node: Dynamic Typing584940 -Node: Indirect Calls585869 -Ref: Indirect Calls-Footnote-1597171 -Node: Functions Summary597299 -Node: Library Functions600001 -Ref: Library Functions-Footnote-1603610 -Ref: Library Functions-Footnote-2603753 -Node: Library Names603924 -Ref: Library Names-Footnote-1607378 -Ref: Library Names-Footnote-2607601 -Node: General Functions607687 -Node: Strtonum Function608790 -Node: Assert Function611812 -Node: Round Function615136 -Node: Cliff Random Function616677 -Node: Ordinal Functions617693 -Ref: Ordinal Functions-Footnote-1620756 -Ref: Ordinal Functions-Footnote-2621008 -Node: Join Function621219 -Ref: Join Function-Footnote-1622988 -Node: Getlocaltime Function623188 -Node: Readfile Function626932 -Node: Shell Quoting628902 -Node: Data File Management630303 -Node: Filetrans Function630935 -Node: Rewind Function634991 -Node: File Checking636378 -Ref: File Checking-Footnote-1637710 -Node: Empty Files637911 -Node: Ignoring Assigns639890 -Node: Getopt Function641441 -Ref: Getopt Function-Footnote-1652903 -Node: Passwd Functions653103 -Ref: Passwd Functions-Footnote-1661940 -Node: Group Functions662028 -Ref: Group Functions-Footnote-1669922 -Node: Walking Arrays670135 -Node: Library Functions Summary671738 -Node: Library Exercises673139 -Node: Sample Programs674419 -Node: Running Examples675189 -Node: Clones675917 -Node: Cut Program677141 -Node: Egrep Program686860 -Ref: Egrep Program-Footnote-1694358 -Node: Id Program694468 -Node: Split Program698113 -Ref: Split Program-Footnote-1701561 -Node: Tee Program701689 -Node: Uniq Program704478 -Node: Wc Program711897 -Ref: Wc Program-Footnote-1716147 -Node: Miscellaneous Programs716241 -Node: Dupword Program717454 -Node: Alarm Program719485 -Node: Translate Program724289 -Ref: Translate Program-Footnote-1728854 -Node: Labels Program729124 -Ref: Labels Program-Footnote-1732475 -Node: Word Sorting732559 -Node: History Sorting736630 -Node: Extract Program738466 -Node: Simple Sed745991 -Node: Igawk Program749059 -Ref: Igawk Program-Footnote-1763383 -Ref: Igawk Program-Footnote-2763584 -Ref: Igawk Program-Footnote-3763706 -Node: Anagram Program763821 -Node: Signature Program766878 -Node: Programs Summary768125 -Node: Programs Exercises769318 -Ref: Programs Exercises-Footnote-1773449 -Node: Advanced Features773540 -Node: Nondecimal Data775488 -Node: Array Sorting777078 -Node: Controlling Array Traversal777775 -Ref: Controlling Array Traversal-Footnote-1786108 -Node: Array Sorting Functions786226 -Ref: Array Sorting Functions-Footnote-1790115 -Node: Two-way I/O790311 -Ref: Two-way I/O-Footnote-1795256 -Ref: Two-way I/O-Footnote-2795442 -Node: TCP/IP Networking795524 -Node: Profiling798397 -Node: Advanced Features Summary805944 -Node: Internationalization807877 -Node: I18N and L10N809357 -Node: Explaining gettext810043 -Ref: Explaining gettext-Footnote-1815068 -Ref: Explaining gettext-Footnote-2815252 -Node: Programmer i18n815417 -Ref: Programmer i18n-Footnote-1820283 -Node: Translator i18n820332 -Node: String Extraction821126 -Ref: String Extraction-Footnote-1822257 -Node: Printf Ordering822343 -Ref: Printf Ordering-Footnote-1825129 -Node: I18N Portability825193 -Ref: I18N Portability-Footnote-1827648 -Node: I18N Example827711 -Ref: I18N Example-Footnote-1830514 -Node: Gawk I18N830586 -Node: I18N Summary831224 -Node: Debugger832563 -Node: Debugging833585 -Node: Debugging Concepts834026 -Node: Debugging Terms835879 -Node: Awk Debugging838451 -Node: Sample Debugging Session839345 -Node: Debugger Invocation839865 -Node: Finding The Bug841249 -Node: List of Debugger Commands847724 -Node: Breakpoint Control849057 -Node: Debugger Execution Control852753 -Node: Viewing And Changing Data856117 -Node: Execution Stack859495 -Node: Debugger Info861132 -Node: Miscellaneous Debugger Commands865149 -Node: Readline Support870178 -Node: Limitations871070 -Node: Debugging Summary873184 -Node: Arbitrary Precision Arithmetic874352 -Node: Computer Arithmetic875768 -Ref: table-numeric-ranges879366 -Ref: Computer Arithmetic-Footnote-1880225 -Node: Math Definitions880282 -Ref: table-ieee-formats883570 -Ref: Math Definitions-Footnote-1884174 -Node: MPFR features884279 -Node: FP Math Caution885950 -Ref: FP Math Caution-Footnote-1887000 -Node: Inexactness of computations887369 -Node: Inexact representation888328 -Node: Comparing FP Values889685 -Node: Errors accumulate890767 -Node: Getting Accuracy892200 -Node: Try To Round894862 -Node: Setting precision895761 -Ref: table-predefined-precision-strings896445 -Node: Setting the rounding mode898234 -Ref: table-gawk-rounding-modes898598 -Ref: Setting the rounding mode-Footnote-1902053 -Node: Arbitrary Precision Integers902232 -Ref: Arbitrary Precision Integers-Footnote-1905218 -Node: POSIX Floating Point Problems905367 -Ref: POSIX Floating Point Problems-Footnote-1909240 -Node: Floating point summary909278 -Node: Dynamic Extensions911472 -Node: Extension Intro913024 -Node: Plugin License914290 -Node: Extension Mechanism Outline915087 -Ref: figure-load-extension915515 -Ref: figure-register-new-function916995 -Ref: figure-call-new-function917999 -Node: Extension API Description919985 -Node: Extension API Functions Introduction921435 -Node: General Data Types926259 -Ref: General Data Types-Footnote-1931998 -Node: Memory Allocation Functions932297 -Ref: Memory Allocation Functions-Footnote-1935136 -Node: Constructor Functions935232 -Node: Registration Functions936966 -Node: Extension Functions937651 -Node: Exit Callback Functions939948 -Node: Extension Version String941196 -Node: Input Parsers941861 -Node: Output Wrappers951740 -Node: Two-way processors956255 -Node: Printing Messages958459 -Ref: Printing Messages-Footnote-1959535 -Node: Updating `ERRNO'959687 -Node: Requesting Values960427 -Ref: table-value-types-returned961155 -Node: Accessing Parameters962112 -Node: Symbol Table Access963343 -Node: Symbol table by name963857 -Node: Symbol table by cookie965838 -Ref: Symbol table by cookie-Footnote-1969982 -Node: Cached values970045 -Ref: Cached values-Footnote-1973544 -Node: Array Manipulation973635 -Ref: Array Manipulation-Footnote-1974733 -Node: Array Data Types974770 -Ref: Array Data Types-Footnote-1977425 -Node: Array Functions977517 -Node: Flattening Arrays981371 -Node: Creating Arrays988263 -Node: Extension API Variables993034 -Node: Extension Versioning993670 -Node: Extension API Informational Variables995571 -Node: Extension API Boilerplate996636 -Node: Finding Extensions1000445 -Node: Extension Example1001005 -Node: Internal File Description1001777 -Node: Internal File Ops1005844 -Ref: Internal File Ops-Footnote-11017514 -Node: Using Internal File Ops1017654 -Ref: Using Internal File Ops-Footnote-11020037 -Node: Extension Samples1020310 -Node: Extension Sample File Functions1021836 -Node: Extension Sample Fnmatch1029474 -Node: Extension Sample Fork1030965 -Node: Extension Sample Inplace1032180 -Node: Extension Sample Ord1033855 -Node: Extension Sample Readdir1034691 -Ref: table-readdir-file-types1035567 -Node: Extension Sample Revout1036378 -Node: Extension Sample Rev2way1036968 -Node: Extension Sample Read write array1037708 -Node: Extension Sample Readfile1039648 -Node: Extension Sample Time1040743 -Node: Extension Sample API Tests1042092 -Node: gawkextlib1042583 -Node: Extension summary1045241 -Node: Extension Exercises1048930 -Node: Language History1049652 -Node: V7/SVR3.11051308 -Node: SVR41053489 -Node: POSIX1054934 -Node: BTL1056323 -Node: POSIX/GNU1057057 -Node: Feature History1062621 -Node: Common Extensions1075719 -Node: Ranges and Locales1077043 -Ref: Ranges and Locales-Footnote-11081661 -Ref: Ranges and Locales-Footnote-21081688 -Ref: Ranges and Locales-Footnote-31081922 -Node: Contributors1082143 -Node: History summary1087684 -Node: Installation1089054 -Node: Gawk Distribution1090000 -Node: Getting1090484 -Node: Extracting1091307 -Node: Distribution contents1092942 -Node: Unix Installation1098659 -Node: Quick Installation1099276 -Node: Additional Configuration Options1101700 -Node: Configuration Philosophy1103438 -Node: Non-Unix Installation1105807 -Node: PC Installation1106265 -Node: PC Binary Installation1107584 -Node: PC Compiling1109432 -Ref: PC Compiling-Footnote-11112453 -Node: PC Testing1112562 -Node: PC Using1113738 -Node: Cygwin1117853 -Node: MSYS1118676 -Node: VMS Installation1119176 -Node: VMS Compilation1119968 -Ref: VMS Compilation-Footnote-11121190 -Node: VMS Dynamic Extensions1121248 -Node: VMS Installation Details1122932 -Node: VMS Running1125184 -Node: VMS GNV1128020 -Node: VMS Old Gawk1128754 -Node: Bugs1129224 -Node: Other Versions1133107 -Node: Installation summary1139535 -Node: Notes1140591 -Node: Compatibility Mode1141456 -Node: Additions1142238 -Node: Accessing The Source1143163 -Node: Adding Code1144599 -Node: New Ports1150764 -Node: Derived Files1155246 -Ref: Derived Files-Footnote-11160721 -Ref: Derived Files-Footnote-21160755 -Ref: Derived Files-Footnote-31161351 -Node: Future Extensions1161465 -Node: Implementation Limitations1162071 -Node: Extension Design1163319 -Node: Old Extension Problems1164473 -Ref: Old Extension Problems-Footnote-11165990 -Node: Extension New Mechanism Goals1166047 -Ref: Extension New Mechanism Goals-Footnote-11169407 -Node: Extension Other Design Decisions1169596 -Node: Extension Future Growth1171704 -Node: Old Extension Mechanism1172540 -Node: Notes summary1174302 -Node: Basic Concepts1175488 -Node: Basic High Level1176169 -Ref: figure-general-flow1176441 -Ref: figure-process-flow1177040 -Ref: Basic High Level-Footnote-11180269 -Node: Basic Data Typing1180454 -Node: Glossary1183782 -Node: Copying1208940 -Node: GNU Free Documentation License1246496 -Node: Index1271632 +Node: Foreword446600 +Node: Preface48131 +Ref: Preface-Footnote-151002 +Ref: Preface-Footnote-251109 +Ref: Preface-Footnote-351342 +Node: History51484 +Node: Names53835 +Ref: Names-Footnote-154928 +Node: This Manual55074 +Ref: This Manual-Footnote-161579 +Node: Conventions61679 +Node: Manual History64017 +Ref: Manual History-Footnote-166999 +Ref: Manual History-Footnote-267040 +Node: How To Contribute67114 +Node: Acknowledgments68243 +Node: Getting Started73048 +Node: Running gawk75481 +Node: One-shot76671 +Node: Read Terminal77919 +Node: Long79946 +Node: Executable Scripts81462 +Ref: Executable Scripts-Footnote-184251 +Node: Comments84354 +Node: Quoting86836 +Node: DOS Quoting92360 +Node: Sample Data Files93035 +Node: Very Simple95630 +Node: Two Rules100528 +Node: More Complex102414 +Node: Statements/Lines105276 +Ref: Statements/Lines-Footnote-1109731 +Node: Other Features109996 +Node: When110927 +Ref: When-Footnote-1112681 +Node: Intro Summary112746 +Node: Invoking Gawk113629 +Node: Command Line115143 +Node: Options115941 +Ref: Options-Footnote-1131874 +Ref: Options-Footnote-2132103 +Node: Other Arguments132128 +Node: Naming Standard Input135076 +Node: Environment Variables136169 +Node: AWKPATH Variable136727 +Ref: AWKPATH Variable-Footnote-1140030 +Ref: AWKPATH Variable-Footnote-2140075 +Node: AWKLIBPATH Variable140335 +Node: Other Environment Variables141478 +Node: Exit Status145206 +Node: Include Files145882 +Node: Loading Shared Libraries149479 +Node: Obsolete150906 +Node: Undocumented151603 +Node: Invoking Summary151870 +Node: Regexp153534 +Node: Regexp Usage154988 +Node: Escape Sequences157025 +Node: Regexp Operators163036 +Ref: Regexp Operators-Footnote-1170462 +Ref: Regexp Operators-Footnote-2170609 +Node: Bracket Expressions170707 +Ref: table-char-classes172722 +Node: Leftmost Longest175646 +Node: Computed Regexps176948 +Node: GNU Regexp Operators180345 +Node: Case-sensitivity184018 +Ref: Case-sensitivity-Footnote-1186903 +Ref: Case-sensitivity-Footnote-2187138 +Node: Regexp Summary187246 +Node: Reading Files188713 +Node: Records190807 +Node: awk split records191540 +Node: gawk split records196455 +Ref: gawk split records-Footnote-1200999 +Node: Fields201036 +Ref: Fields-Footnote-1203812 +Node: Nonconstant Fields203898 +Ref: Nonconstant Fields-Footnote-1206141 +Node: Changing Fields206345 +Node: Field Separators212274 +Node: Default Field Splitting214979 +Node: Regexp Field Splitting216096 +Node: Single Character Fields219446 +Node: Command Line Field Separator220505 +Node: Full Line Fields223717 +Ref: Full Line Fields-Footnote-1225234 +Ref: Full Line Fields-Footnote-2225280 +Node: Field Splitting Summary225381 +Node: Constant Size227455 +Node: Splitting By Content232044 +Ref: Splitting By Content-Footnote-1236038 +Node: Multiple Line236201 +Ref: Multiple Line-Footnote-1242087 +Node: Getline242266 +Node: Plain Getline244478 +Node: Getline/Variable247118 +Node: Getline/File248266 +Node: Getline/Variable/File249650 +Ref: Getline/Variable/File-Footnote-1251253 +Node: Getline/Pipe251340 +Node: Getline/Variable/Pipe254023 +Node: Getline/Coprocess255154 +Node: Getline/Variable/Coprocess256406 +Node: Getline Notes257145 +Node: Getline Summary259937 +Ref: table-getline-variants260349 +Node: Read Timeout261178 +Ref: Read Timeout-Footnote-1265003 +Node: Command-line directories265061 +Node: Input Summary265966 +Node: Input Exercises269267 +Node: Printing269995 +Node: Print271772 +Node: Print Examples273229 +Node: Output Separators276008 +Node: OFMT278026 +Node: Printf279380 +Node: Basic Printf280165 +Node: Control Letters281735 +Node: Format Modifiers285718 +Node: Printf Examples291727 +Node: Redirection294213 +Node: Special FD301054 +Ref: Special FD-Footnote-1304214 +Node: Special Files304288 +Node: Other Inherited Files304905 +Node: Special Network305905 +Node: Special Caveats306767 +Node: Close Files And Pipes307718 +Ref: Close Files And Pipes-Footnote-1314900 +Ref: Close Files And Pipes-Footnote-2315048 +Node: Output Summary315198 +Node: Output Exercises316196 +Node: Expressions316876 +Node: Values318061 +Node: Constants318739 +Node: Scalar Constants319430 +Ref: Scalar Constants-Footnote-1320289 +Node: Nondecimal-numbers320539 +Node: Regexp Constants323557 +Node: Using Constant Regexps324082 +Node: Variables327225 +Node: Using Variables327880 +Node: Assignment Options329791 +Node: Conversion331666 +Node: Strings And Numbers332190 +Ref: Strings And Numbers-Footnote-1335255 +Node: Locale influences conversions335364 +Ref: table-locale-affects338111 +Node: All Operators338699 +Node: Arithmetic Ops339329 +Node: Concatenation341834 +Ref: Concatenation-Footnote-1344653 +Node: Assignment Ops344759 +Ref: table-assign-ops349738 +Node: Increment Ops351010 +Node: Truth Values and Conditions354448 +Node: Truth Values355533 +Node: Typing and Comparison356582 +Node: Variable Typing357392 +Node: Comparison Operators361045 +Ref: table-relational-ops361455 +Node: POSIX String Comparison364950 +Ref: POSIX String Comparison-Footnote-1366022 +Node: Boolean Ops366160 +Ref: Boolean Ops-Footnote-1370639 +Node: Conditional Exp370730 +Node: Function Calls372457 +Node: Precedence376337 +Node: Locales379998 +Node: Expressions Summary381630 +Node: Patterns and Actions384190 +Node: Pattern Overview385310 +Node: Regexp Patterns386989 +Node: Expression Patterns387532 +Node: Ranges391242 +Node: BEGIN/END394348 +Node: Using BEGIN/END395109 +Ref: Using BEGIN/END-Footnote-1397843 +Node: I/O And BEGIN/END397949 +Node: BEGINFILE/ENDFILE400263 +Node: Empty403164 +Node: Using Shell Variables403481 +Node: Action Overview405754 +Node: Statements408080 +Node: If Statement409928 +Node: While Statement411423 +Node: Do Statement413452 +Node: For Statement414596 +Node: Switch Statement417753 +Node: Break Statement420135 +Node: Continue Statement422176 +Node: Next Statement424003 +Node: Nextfile Statement426384 +Node: Exit Statement429014 +Node: Built-in Variables431417 +Node: User-modified432550 +Ref: User-modified-Footnote-1440231 +Node: Auto-set440293 +Ref: Auto-set-Footnote-1453328 +Ref: Auto-set-Footnote-2453533 +Node: ARGC and ARGV453589 +Node: Pattern Action Summary457807 +Node: Arrays460234 +Node: Array Basics461563 +Node: Array Intro462407 +Ref: figure-array-elements464371 +Ref: Array Intro-Footnote-1466897 +Node: Reference to Elements467025 +Node: Assigning Elements469477 +Node: Array Example469968 +Node: Scanning an Array471726 +Node: Controlling Scanning474742 +Ref: Controlling Scanning-Footnote-1479938 +Node: Numeric Array Subscripts480254 +Node: Uninitialized Subscripts482439 +Node: Delete484056 +Ref: Delete-Footnote-1486799 +Node: Multidimensional486856 +Node: Multiscanning489953 +Node: Arrays of Arrays491542 +Node: Arrays Summary496301 +Node: Functions498393 +Node: Built-in499292 +Node: Calling Built-in500370 +Node: Numeric Functions502361 +Ref: Numeric Functions-Footnote-1506378 +Ref: Numeric Functions-Footnote-2506735 +Ref: Numeric Functions-Footnote-3506783 +Node: String Functions507055 +Ref: String Functions-Footnote-1530530 +Ref: String Functions-Footnote-2530659 +Ref: String Functions-Footnote-3530907 +Node: Gory Details530994 +Ref: table-sub-escapes532775 +Ref: table-sub-proposed534295 +Ref: table-posix-sub535659 +Ref: table-gensub-escapes537195 +Ref: Gory Details-Footnote-1538027 +Node: I/O Functions538178 +Ref: I/O Functions-Footnote-1545396 +Node: Time Functions545543 +Ref: Time Functions-Footnote-1556031 +Ref: Time Functions-Footnote-2556099 +Ref: Time Functions-Footnote-3556257 +Ref: Time Functions-Footnote-4556368 +Ref: Time Functions-Footnote-5556480 +Ref: Time Functions-Footnote-6556707 +Node: Bitwise Functions556973 +Ref: table-bitwise-ops557535 +Ref: Bitwise Functions-Footnote-1561844 +Node: Type Functions562013 +Node: I18N Functions563164 +Node: User-defined564809 +Node: Definition Syntax565614 +Ref: Definition Syntax-Footnote-1571021 +Node: Function Example571092 +Ref: Function Example-Footnote-1574011 +Node: Function Caveats574033 +Node: Calling A Function574551 +Node: Variable Scope575509 +Node: Pass By Value/Reference578497 +Node: Return Statement581992 +Node: Dynamic Typing584973 +Node: Indirect Calls585902 +Ref: Indirect Calls-Footnote-1597204 +Node: Functions Summary597332 +Node: Library Functions600034 +Ref: Library Functions-Footnote-1603643 +Ref: Library Functions-Footnote-2603786 +Node: Library Names603957 +Ref: Library Names-Footnote-1607411 +Ref: Library Names-Footnote-2607634 +Node: General Functions607720 +Node: Strtonum Function608823 +Node: Assert Function611845 +Node: Round Function615169 +Node: Cliff Random Function616710 +Node: Ordinal Functions617726 +Ref: Ordinal Functions-Footnote-1620789 +Ref: Ordinal Functions-Footnote-2621041 +Node: Join Function621252 +Ref: Join Function-Footnote-1623021 +Node: Getlocaltime Function623221 +Node: Readfile Function626965 +Node: Shell Quoting628935 +Node: Data File Management630336 +Node: Filetrans Function630968 +Node: Rewind Function635024 +Node: File Checking636411 +Ref: File Checking-Footnote-1637743 +Node: Empty Files637944 +Node: Ignoring Assigns639923 +Node: Getopt Function641474 +Ref: Getopt Function-Footnote-1652936 +Node: Passwd Functions653136 +Ref: Passwd Functions-Footnote-1661973 +Node: Group Functions662061 +Ref: Group Functions-Footnote-1669955 +Node: Walking Arrays670168 +Node: Library Functions Summary671771 +Node: Library Exercises673172 +Node: Sample Programs674452 +Node: Running Examples675222 +Node: Clones675950 +Node: Cut Program677174 +Node: Egrep Program686893 +Ref: Egrep Program-Footnote-1694391 +Node: Id Program694501 +Node: Split Program698146 +Ref: Split Program-Footnote-1701594 +Node: Tee Program701722 +Node: Uniq Program704511 +Node: Wc Program711930 +Ref: Wc Program-Footnote-1716180 +Node: Miscellaneous Programs716274 +Node: Dupword Program717487 +Node: Alarm Program719518 +Node: Translate Program724322 +Ref: Translate Program-Footnote-1728887 +Node: Labels Program729157 +Ref: Labels Program-Footnote-1732508 +Node: Word Sorting732592 +Node: History Sorting736663 +Node: Extract Program738499 +Node: Simple Sed746024 +Node: Igawk Program749092 +Ref: Igawk Program-Footnote-1763416 +Ref: Igawk Program-Footnote-2763617 +Ref: Igawk Program-Footnote-3763739 +Node: Anagram Program763854 +Node: Signature Program766911 +Node: Programs Summary768158 +Node: Programs Exercises769351 +Ref: Programs Exercises-Footnote-1773482 +Node: Advanced Features773573 +Node: Nondecimal Data775521 +Node: Array Sorting777111 +Node: Controlling Array Traversal777808 +Ref: Controlling Array Traversal-Footnote-1786141 +Node: Array Sorting Functions786259 +Ref: Array Sorting Functions-Footnote-1790148 +Node: Two-way I/O790344 +Ref: Two-way I/O-Footnote-1795289 +Ref: Two-way I/O-Footnote-2795475 +Node: TCP/IP Networking795557 +Node: Profiling798430 +Node: Advanced Features Summary805977 +Node: Internationalization807910 +Node: I18N and L10N809390 +Node: Explaining gettext810076 +Ref: Explaining gettext-Footnote-1815101 +Ref: Explaining gettext-Footnote-2815285 +Node: Programmer i18n815450 +Ref: Programmer i18n-Footnote-1820316 +Node: Translator i18n820365 +Node: String Extraction821159 +Ref: String Extraction-Footnote-1822290 +Node: Printf Ordering822376 +Ref: Printf Ordering-Footnote-1825162 +Node: I18N Portability825226 +Ref: I18N Portability-Footnote-1827681 +Node: I18N Example827744 +Ref: I18N Example-Footnote-1830547 +Node: Gawk I18N830619 +Node: I18N Summary831257 +Node: Debugger832596 +Node: Debugging833618 +Node: Debugging Concepts834059 +Node: Debugging Terms835912 +Node: Awk Debugging838484 +Node: Sample Debugging Session839378 +Node: Debugger Invocation839898 +Node: Finding The Bug841282 +Node: List of Debugger Commands847757 +Node: Breakpoint Control849090 +Node: Debugger Execution Control852786 +Node: Viewing And Changing Data856150 +Node: Execution Stack859528 +Node: Debugger Info861165 +Node: Miscellaneous Debugger Commands865182 +Node: Readline Support870211 +Node: Limitations871103 +Node: Debugging Summary873217 +Node: Arbitrary Precision Arithmetic874385 +Node: Computer Arithmetic875801 +Ref: table-numeric-ranges879399 +Ref: Computer Arithmetic-Footnote-1880258 +Node: Math Definitions880315 +Ref: table-ieee-formats883603 +Ref: Math Definitions-Footnote-1884207 +Node: MPFR features884312 +Node: FP Math Caution885983 +Ref: FP Math Caution-Footnote-1887033 +Node: Inexactness of computations887402 +Node: Inexact representation888361 +Node: Comparing FP Values889718 +Node: Errors accumulate890800 +Node: Getting Accuracy892233 +Node: Try To Round894895 +Node: Setting precision895794 +Ref: table-predefined-precision-strings896478 +Node: Setting the rounding mode898267 +Ref: table-gawk-rounding-modes898631 +Ref: Setting the rounding mode-Footnote-1902086 +Node: Arbitrary Precision Integers902265 +Ref: Arbitrary Precision Integers-Footnote-1905251 +Node: POSIX Floating Point Problems905400 +Ref: POSIX Floating Point Problems-Footnote-1909273 +Node: Floating point summary909311 +Node: Dynamic Extensions911505 +Node: Extension Intro913057 +Node: Plugin License914323 +Node: Extension Mechanism Outline915120 +Ref: figure-load-extension915548 +Ref: figure-register-new-function917028 +Ref: figure-call-new-function918032 +Node: Extension API Description920018 +Node: Extension API Functions Introduction921468 +Node: General Data Types926292 +Ref: General Data Types-Footnote-1932031 +Node: Memory Allocation Functions932330 +Ref: Memory Allocation Functions-Footnote-1935169 +Node: Constructor Functions935265 +Node: Registration Functions936999 +Node: Extension Functions937684 +Node: Exit Callback Functions939981 +Node: Extension Version String941229 +Node: Input Parsers941894 +Node: Output Wrappers951773 +Node: Two-way processors956288 +Node: Printing Messages958492 +Ref: Printing Messages-Footnote-1959568 +Node: Updating `ERRNO'959720 +Node: Requesting Values960460 +Ref: table-value-types-returned961188 +Node: Accessing Parameters962145 +Node: Symbol Table Access963376 +Node: Symbol table by name963890 +Node: Symbol table by cookie965871 +Ref: Symbol table by cookie-Footnote-1970015 +Node: Cached values970078 +Ref: Cached values-Footnote-1973577 +Node: Array Manipulation973668 +Ref: Array Manipulation-Footnote-1974766 +Node: Array Data Types974803 +Ref: Array Data Types-Footnote-1977458 +Node: Array Functions977550 +Node: Flattening Arrays981404 +Node: Creating Arrays988296 +Node: Extension API Variables993067 +Node: Extension Versioning993703 +Node: Extension API Informational Variables995604 +Node: Extension API Boilerplate996669 +Node: Finding Extensions1000478 +Node: Extension Example1001038 +Node: Internal File Description1001810 +Node: Internal File Ops1005877 +Ref: Internal File Ops-Footnote-11017547 +Node: Using Internal File Ops1017687 +Ref: Using Internal File Ops-Footnote-11020070 +Node: Extension Samples1020343 +Node: Extension Sample File Functions1021869 +Node: Extension Sample Fnmatch1029507 +Node: Extension Sample Fork1030998 +Node: Extension Sample Inplace1032213 +Node: Extension Sample Ord1033888 +Node: Extension Sample Readdir1034724 +Ref: table-readdir-file-types1035600 +Node: Extension Sample Revout1036411 +Node: Extension Sample Rev2way1037001 +Node: Extension Sample Read write array1037741 +Node: Extension Sample Readfile1039681 +Node: Extension Sample Time1040776 +Node: Extension Sample API Tests1042125 +Node: gawkextlib1042616 +Node: Extension summary1045274 +Node: Extension Exercises1048963 +Node: Language History1049685 +Node: V7/SVR3.11051341 +Node: SVR41053522 +Node: POSIX1054967 +Node: BTL1056356 +Node: POSIX/GNU1057090 +Node: Feature History1062654 +Node: Common Extensions1075752 +Node: Ranges and Locales1077076 +Ref: Ranges and Locales-Footnote-11081694 +Ref: Ranges and Locales-Footnote-21081721 +Ref: Ranges and Locales-Footnote-31081955 +Node: Contributors1082176 +Node: History summary1087717 +Node: Installation1089087 +Node: Gawk Distribution1090033 +Node: Getting1090517 +Node: Extracting1091340 +Node: Distribution contents1092975 +Node: Unix Installation1098692 +Node: Quick Installation1099309 +Node: Additional Configuration Options1101733 +Node: Configuration Philosophy1103471 +Node: Non-Unix Installation1105840 +Node: PC Installation1106298 +Node: PC Binary Installation1107617 +Node: PC Compiling1109465 +Ref: PC Compiling-Footnote-11112486 +Node: PC Testing1112595 +Node: PC Using1113771 +Node: Cygwin1117886 +Node: MSYS1118709 +Node: VMS Installation1119209 +Node: VMS Compilation1120001 +Ref: VMS Compilation-Footnote-11121223 +Node: VMS Dynamic Extensions1121281 +Node: VMS Installation Details1122965 +Node: VMS Running1125217 +Node: VMS GNV1128053 +Node: VMS Old Gawk1128787 +Node: Bugs1129257 +Node: Other Versions1133140 +Node: Installation summary1139568 +Node: Notes1140624 +Node: Compatibility Mode1141489 +Node: Additions1142271 +Node: Accessing The Source1143196 +Node: Adding Code1144632 +Node: New Ports1150797 +Node: Derived Files1155279 +Ref: Derived Files-Footnote-11160754 +Ref: Derived Files-Footnote-21160788 +Ref: Derived Files-Footnote-31161384 +Node: Future Extensions1161498 +Node: Implementation Limitations1162104 +Node: Extension Design1163352 +Node: Old Extension Problems1164506 +Ref: Old Extension Problems-Footnote-11166023 +Node: Extension New Mechanism Goals1166080 +Ref: Extension New Mechanism Goals-Footnote-11169440 +Node: Extension Other Design Decisions1169629 +Node: Extension Future Growth1171737 +Node: Old Extension Mechanism1172573 +Node: Notes summary1174335 +Node: Basic Concepts1175521 +Node: Basic High Level1176202 +Ref: figure-general-flow1176474 +Ref: figure-process-flow1177073 +Ref: Basic High Level-Footnote-11180302 +Node: Basic Data Typing1180487 +Node: Glossary1183815 +Node: Copying1208973 +Node: GNU Free Documentation License1246529 +Node: Index1271665  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 95844125..de2f6ace 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -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. @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 @@ -1169,7 +1169,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. @@ -1246,15 +1246,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. @@ -1262,12 +1262,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. @@ -1342,7 +1342,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 @@ -1489,7 +1489,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 @@ -1502,10 +1502,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 @@ -1518,7 +1518,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 @@ -1578,7 +1578,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 +@ulink{http://www.gnu.org/software/gawk/manual/, HTML} +versions of the @value{DOCUMENT}. @end ifnotinfo There are sidebars @@ -1611,7 +1613,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: @@ -1658,7 +1660,7 @@ 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. +covers @command{awk}'s one-and-only data structure: the associative array. 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. 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 8182790c..460fc7dd 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -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. @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 @@ -1164,7 +1164,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. @@ -1241,15 +1241,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. @@ -1257,12 +1257,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. @@ -1337,7 +1337,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 @@ -1456,7 +1456,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 @@ -1469,10 +1469,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 @@ -1485,7 +1485,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 @@ -1545,7 +1545,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 +@ulink{http://www.gnu.org/software/gawk/manual/, HTML} +versions of the @value{DOCUMENT}. @end ifnotinfo There are sidebars @@ -1578,7 +1580,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: @@ -1625,7 +1627,7 @@ 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. +covers @command{awk}'s one-and-only data structure: the associative array. 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. -- cgit v1.2.3 From 611ebfe5c55849245d47b4c5878eb85b27861f12 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 20 Jan 2015 21:55:01 +0200 Subject: O'Reilly fixes. --- doc/ChangeLog | 4 + doc/gawk.info | 1216 +++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 104 ++--- doc/gawktexi.in | 104 ++--- 4 files changed, 721 insertions(+), 707 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 7f2341b5..f6c1eaf0 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2015-01-20 Arnold D. Robbins + + * gawktexi.in: O'Reilly fixes. + 2015-01-19 Arnold D. Robbins * gawkinet.texi: Fix capitalization in document title. diff --git a/doc/gawk.info b/doc/gawk.info index 47f21442..3f32c445 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -1047,8 +1047,8 @@ in *note Sample Programs::, should be of interest. - *note Arrays::, covers `awk''s one-and-only data structure: the associative array. 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 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 @@ -1057,14 +1057,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 +1095,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 +1112,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 +1141,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 +1154,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 +1170,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 +1193,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 +1222,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 +1285,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 +1298,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 +1307,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 +1347,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 +1401,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 +1472,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 +1487,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 +1503,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 +1578,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 +1709,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 +1804,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 +1831,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 +1840,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 +1902,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 +1934,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 +1970,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 +2043,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 @@ -32474,7 +32472,7 @@ Index * exit the debugger: Miscellaneous Debugger Commands. (line 99) * exp: Numeric Functions. (line 18) -* expand utility: Very Simple. (line 72) +* expand utility: Very Simple. (line 73) * Expat XML parser library: gawkextlib. (line 33) * exponent: Numeric Functions. (line 18) * expressions: Expressions. (line 6) @@ -34311,549 +34309,549 @@ Node: History51484 Node: Names53835 Ref: Names-Footnote-154928 Node: This Manual55074 -Ref: This Manual-Footnote-161579 -Node: Conventions61679 -Node: Manual History64017 -Ref: Manual History-Footnote-166999 -Ref: Manual History-Footnote-267040 -Node: How To Contribute67114 -Node: Acknowledgments68243 -Node: Getting Started73048 -Node: Running gawk75481 -Node: One-shot76671 -Node: Read Terminal77919 -Node: Long79946 -Node: Executable Scripts81462 -Ref: Executable Scripts-Footnote-184251 -Node: Comments84354 -Node: Quoting86836 -Node: DOS Quoting92360 -Node: Sample Data Files93035 -Node: Very Simple95630 -Node: Two Rules100528 -Node: More Complex102414 -Node: Statements/Lines105276 -Ref: Statements/Lines-Footnote-1109731 -Node: Other Features109996 -Node: When110927 -Ref: When-Footnote-1112681 -Node: Intro Summary112746 -Node: Invoking Gawk113629 -Node: Command Line115143 -Node: Options115941 -Ref: Options-Footnote-1131874 -Ref: Options-Footnote-2132103 -Node: Other Arguments132128 -Node: Naming Standard Input135076 -Node: Environment Variables136169 -Node: AWKPATH Variable136727 -Ref: AWKPATH Variable-Footnote-1140030 -Ref: AWKPATH Variable-Footnote-2140075 -Node: AWKLIBPATH Variable140335 -Node: Other Environment Variables141478 -Node: Exit Status145206 -Node: Include Files145882 -Node: Loading Shared Libraries149479 -Node: Obsolete150906 -Node: Undocumented151603 -Node: Invoking Summary151870 -Node: Regexp153534 -Node: Regexp Usage154988 -Node: Escape Sequences157025 -Node: Regexp Operators163036 -Ref: Regexp Operators-Footnote-1170462 -Ref: Regexp Operators-Footnote-2170609 -Node: Bracket Expressions170707 -Ref: table-char-classes172722 -Node: Leftmost Longest175646 -Node: Computed Regexps176948 -Node: GNU Regexp Operators180345 -Node: Case-sensitivity184018 -Ref: Case-sensitivity-Footnote-1186903 -Ref: Case-sensitivity-Footnote-2187138 -Node: Regexp Summary187246 -Node: Reading Files188713 -Node: Records190807 -Node: awk split records191540 -Node: gawk split records196455 -Ref: gawk split records-Footnote-1200999 -Node: Fields201036 -Ref: Fields-Footnote-1203812 -Node: Nonconstant Fields203898 -Ref: Nonconstant Fields-Footnote-1206141 -Node: Changing Fields206345 -Node: Field Separators212274 -Node: Default Field Splitting214979 -Node: Regexp Field Splitting216096 -Node: Single Character Fields219446 -Node: Command Line Field Separator220505 -Node: Full Line Fields223717 -Ref: Full Line Fields-Footnote-1225234 -Ref: Full Line Fields-Footnote-2225280 -Node: Field Splitting Summary225381 -Node: Constant Size227455 -Node: Splitting By Content232044 -Ref: Splitting By Content-Footnote-1236038 -Node: Multiple Line236201 -Ref: Multiple Line-Footnote-1242087 -Node: Getline242266 -Node: Plain Getline244478 -Node: Getline/Variable247118 -Node: Getline/File248266 -Node: Getline/Variable/File249650 -Ref: Getline/Variable/File-Footnote-1251253 -Node: Getline/Pipe251340 -Node: Getline/Variable/Pipe254023 -Node: Getline/Coprocess255154 -Node: Getline/Variable/Coprocess256406 -Node: Getline Notes257145 -Node: Getline Summary259937 -Ref: table-getline-variants260349 -Node: Read Timeout261178 -Ref: Read Timeout-Footnote-1265003 -Node: Command-line directories265061 -Node: Input Summary265966 -Node: Input Exercises269267 -Node: Printing269995 -Node: Print271772 -Node: Print Examples273229 -Node: Output Separators276008 -Node: OFMT278026 -Node: Printf279380 -Node: Basic Printf280165 -Node: Control Letters281735 -Node: Format Modifiers285718 -Node: Printf Examples291727 -Node: Redirection294213 -Node: Special FD301054 -Ref: Special FD-Footnote-1304214 -Node: Special Files304288 -Node: Other Inherited Files304905 -Node: Special Network305905 -Node: Special Caveats306767 -Node: Close Files And Pipes307718 -Ref: Close Files And Pipes-Footnote-1314900 -Ref: Close Files And Pipes-Footnote-2315048 -Node: Output Summary315198 -Node: Output Exercises316196 -Node: Expressions316876 -Node: Values318061 -Node: Constants318739 -Node: Scalar Constants319430 -Ref: Scalar Constants-Footnote-1320289 -Node: Nondecimal-numbers320539 -Node: Regexp Constants323557 -Node: Using Constant Regexps324082 -Node: Variables327225 -Node: Using Variables327880 -Node: Assignment Options329791 -Node: Conversion331666 -Node: Strings And Numbers332190 -Ref: Strings And Numbers-Footnote-1335255 -Node: Locale influences conversions335364 -Ref: table-locale-affects338111 -Node: All Operators338699 -Node: Arithmetic Ops339329 -Node: Concatenation341834 -Ref: Concatenation-Footnote-1344653 -Node: Assignment Ops344759 -Ref: table-assign-ops349738 -Node: Increment Ops351010 -Node: Truth Values and Conditions354448 -Node: Truth Values355533 -Node: Typing and Comparison356582 -Node: Variable Typing357392 -Node: Comparison Operators361045 -Ref: table-relational-ops361455 -Node: POSIX String Comparison364950 -Ref: POSIX String Comparison-Footnote-1366022 -Node: Boolean Ops366160 -Ref: Boolean Ops-Footnote-1370639 -Node: Conditional Exp370730 -Node: Function Calls372457 -Node: Precedence376337 -Node: Locales379998 -Node: Expressions Summary381630 -Node: Patterns and Actions384190 -Node: Pattern Overview385310 -Node: Regexp Patterns386989 -Node: Expression Patterns387532 -Node: Ranges391242 -Node: BEGIN/END394348 -Node: Using BEGIN/END395109 -Ref: Using BEGIN/END-Footnote-1397843 -Node: I/O And BEGIN/END397949 -Node: BEGINFILE/ENDFILE400263 -Node: Empty403164 -Node: Using Shell Variables403481 -Node: Action Overview405754 -Node: Statements408080 -Node: If Statement409928 -Node: While Statement411423 -Node: Do Statement413452 -Node: For Statement414596 -Node: Switch Statement417753 -Node: Break Statement420135 -Node: Continue Statement422176 -Node: Next Statement424003 -Node: Nextfile Statement426384 -Node: Exit Statement429014 -Node: Built-in Variables431417 -Node: User-modified432550 -Ref: User-modified-Footnote-1440231 -Node: Auto-set440293 -Ref: Auto-set-Footnote-1453328 -Ref: Auto-set-Footnote-2453533 -Node: ARGC and ARGV453589 -Node: Pattern Action Summary457807 -Node: Arrays460234 -Node: Array Basics461563 -Node: Array Intro462407 -Ref: figure-array-elements464371 -Ref: Array Intro-Footnote-1466897 -Node: Reference to Elements467025 -Node: Assigning Elements469477 -Node: Array Example469968 -Node: Scanning an Array471726 -Node: Controlling Scanning474742 -Ref: Controlling Scanning-Footnote-1479938 -Node: Numeric Array Subscripts480254 -Node: Uninitialized Subscripts482439 -Node: Delete484056 -Ref: Delete-Footnote-1486799 -Node: Multidimensional486856 -Node: Multiscanning489953 -Node: Arrays of Arrays491542 -Node: Arrays Summary496301 -Node: Functions498393 -Node: Built-in499292 -Node: Calling Built-in500370 -Node: Numeric Functions502361 -Ref: Numeric Functions-Footnote-1506378 -Ref: Numeric Functions-Footnote-2506735 -Ref: Numeric Functions-Footnote-3506783 -Node: String Functions507055 -Ref: String Functions-Footnote-1530530 -Ref: String Functions-Footnote-2530659 -Ref: String Functions-Footnote-3530907 -Node: Gory Details530994 -Ref: table-sub-escapes532775 -Ref: table-sub-proposed534295 -Ref: table-posix-sub535659 -Ref: table-gensub-escapes537195 -Ref: Gory Details-Footnote-1538027 -Node: I/O Functions538178 -Ref: I/O Functions-Footnote-1545396 -Node: Time Functions545543 -Ref: Time Functions-Footnote-1556031 -Ref: Time Functions-Footnote-2556099 -Ref: Time Functions-Footnote-3556257 -Ref: Time Functions-Footnote-4556368 -Ref: Time Functions-Footnote-5556480 -Ref: Time Functions-Footnote-6556707 -Node: Bitwise Functions556973 -Ref: table-bitwise-ops557535 -Ref: Bitwise Functions-Footnote-1561844 -Node: Type Functions562013 -Node: I18N Functions563164 -Node: User-defined564809 -Node: Definition Syntax565614 -Ref: Definition Syntax-Footnote-1571021 -Node: Function Example571092 -Ref: Function Example-Footnote-1574011 -Node: Function Caveats574033 -Node: Calling A Function574551 -Node: Variable Scope575509 -Node: Pass By Value/Reference578497 -Node: Return Statement581992 -Node: Dynamic Typing584973 -Node: Indirect Calls585902 -Ref: Indirect Calls-Footnote-1597204 -Node: Functions Summary597332 -Node: Library Functions600034 -Ref: Library Functions-Footnote-1603643 -Ref: Library Functions-Footnote-2603786 -Node: Library Names603957 -Ref: Library Names-Footnote-1607411 -Ref: Library Names-Footnote-2607634 -Node: General Functions607720 -Node: Strtonum Function608823 -Node: Assert Function611845 -Node: Round Function615169 -Node: Cliff Random Function616710 -Node: Ordinal Functions617726 -Ref: Ordinal Functions-Footnote-1620789 -Ref: Ordinal Functions-Footnote-2621041 -Node: Join Function621252 -Ref: Join Function-Footnote-1623021 -Node: Getlocaltime Function623221 -Node: Readfile Function626965 -Node: Shell Quoting628935 -Node: Data File Management630336 -Node: Filetrans Function630968 -Node: Rewind Function635024 -Node: File Checking636411 -Ref: File Checking-Footnote-1637743 -Node: Empty Files637944 -Node: Ignoring Assigns639923 -Node: Getopt Function641474 -Ref: Getopt Function-Footnote-1652936 -Node: Passwd Functions653136 -Ref: Passwd Functions-Footnote-1661973 -Node: Group Functions662061 -Ref: Group Functions-Footnote-1669955 -Node: Walking Arrays670168 -Node: Library Functions Summary671771 -Node: Library Exercises673172 -Node: Sample Programs674452 -Node: Running Examples675222 -Node: Clones675950 -Node: Cut Program677174 -Node: Egrep Program686893 -Ref: Egrep Program-Footnote-1694391 -Node: Id Program694501 -Node: Split Program698146 -Ref: Split Program-Footnote-1701594 -Node: Tee Program701722 -Node: Uniq Program704511 -Node: Wc Program711930 -Ref: Wc Program-Footnote-1716180 -Node: Miscellaneous Programs716274 -Node: Dupword Program717487 -Node: Alarm Program719518 -Node: Translate Program724322 -Ref: Translate Program-Footnote-1728887 -Node: Labels Program729157 -Ref: Labels Program-Footnote-1732508 -Node: Word Sorting732592 -Node: History Sorting736663 -Node: Extract Program738499 -Node: Simple Sed746024 -Node: Igawk Program749092 -Ref: Igawk Program-Footnote-1763416 -Ref: Igawk Program-Footnote-2763617 -Ref: Igawk Program-Footnote-3763739 -Node: Anagram Program763854 -Node: Signature Program766911 -Node: Programs Summary768158 -Node: Programs Exercises769351 -Ref: Programs Exercises-Footnote-1773482 -Node: Advanced Features773573 -Node: Nondecimal Data775521 -Node: Array Sorting777111 -Node: Controlling Array Traversal777808 -Ref: Controlling Array Traversal-Footnote-1786141 -Node: Array Sorting Functions786259 -Ref: Array Sorting Functions-Footnote-1790148 -Node: Two-way I/O790344 -Ref: Two-way I/O-Footnote-1795289 -Ref: Two-way I/O-Footnote-2795475 -Node: TCP/IP Networking795557 -Node: Profiling798430 -Node: Advanced Features Summary805977 -Node: Internationalization807910 -Node: I18N and L10N809390 -Node: Explaining gettext810076 -Ref: Explaining gettext-Footnote-1815101 -Ref: Explaining gettext-Footnote-2815285 -Node: Programmer i18n815450 -Ref: Programmer i18n-Footnote-1820316 -Node: Translator i18n820365 -Node: String Extraction821159 -Ref: String Extraction-Footnote-1822290 -Node: Printf Ordering822376 -Ref: Printf Ordering-Footnote-1825162 -Node: I18N Portability825226 -Ref: I18N Portability-Footnote-1827681 -Node: I18N Example827744 -Ref: I18N Example-Footnote-1830547 -Node: Gawk I18N830619 -Node: I18N Summary831257 -Node: Debugger832596 -Node: Debugging833618 -Node: Debugging Concepts834059 -Node: Debugging Terms835912 -Node: Awk Debugging838484 -Node: Sample Debugging Session839378 -Node: Debugger Invocation839898 -Node: Finding The Bug841282 -Node: List of Debugger Commands847757 -Node: Breakpoint Control849090 -Node: Debugger Execution Control852786 -Node: Viewing And Changing Data856150 -Node: Execution Stack859528 -Node: Debugger Info861165 -Node: Miscellaneous Debugger Commands865182 -Node: Readline Support870211 -Node: Limitations871103 -Node: Debugging Summary873217 -Node: Arbitrary Precision Arithmetic874385 -Node: Computer Arithmetic875801 -Ref: table-numeric-ranges879399 -Ref: Computer Arithmetic-Footnote-1880258 -Node: Math Definitions880315 -Ref: table-ieee-formats883603 -Ref: Math Definitions-Footnote-1884207 -Node: MPFR features884312 -Node: FP Math Caution885983 -Ref: FP Math Caution-Footnote-1887033 -Node: Inexactness of computations887402 -Node: Inexact representation888361 -Node: Comparing FP Values889718 -Node: Errors accumulate890800 -Node: Getting Accuracy892233 -Node: Try To Round894895 -Node: Setting precision895794 -Ref: table-predefined-precision-strings896478 -Node: Setting the rounding mode898267 -Ref: table-gawk-rounding-modes898631 -Ref: Setting the rounding mode-Footnote-1902086 -Node: Arbitrary Precision Integers902265 -Ref: Arbitrary Precision Integers-Footnote-1905251 -Node: POSIX Floating Point Problems905400 -Ref: POSIX Floating Point Problems-Footnote-1909273 -Node: Floating point summary909311 -Node: Dynamic Extensions911505 -Node: Extension Intro913057 -Node: Plugin License914323 -Node: Extension Mechanism Outline915120 -Ref: figure-load-extension915548 -Ref: figure-register-new-function917028 -Ref: figure-call-new-function918032 -Node: Extension API Description920018 -Node: Extension API Functions Introduction921468 -Node: General Data Types926292 -Ref: General Data Types-Footnote-1932031 -Node: Memory Allocation Functions932330 -Ref: Memory Allocation Functions-Footnote-1935169 -Node: Constructor Functions935265 -Node: Registration Functions936999 -Node: Extension Functions937684 -Node: Exit Callback Functions939981 -Node: Extension Version String941229 -Node: Input Parsers941894 -Node: Output Wrappers951773 -Node: Two-way processors956288 -Node: Printing Messages958492 -Ref: Printing Messages-Footnote-1959568 -Node: Updating `ERRNO'959720 -Node: Requesting Values960460 -Ref: table-value-types-returned961188 -Node: Accessing Parameters962145 -Node: Symbol Table Access963376 -Node: Symbol table by name963890 -Node: Symbol table by cookie965871 -Ref: Symbol table by cookie-Footnote-1970015 -Node: Cached values970078 -Ref: Cached values-Footnote-1973577 -Node: Array Manipulation973668 -Ref: Array Manipulation-Footnote-1974766 -Node: Array Data Types974803 -Ref: Array Data Types-Footnote-1977458 -Node: Array Functions977550 -Node: Flattening Arrays981404 -Node: Creating Arrays988296 -Node: Extension API Variables993067 -Node: Extension Versioning993703 -Node: Extension API Informational Variables995604 -Node: Extension API Boilerplate996669 -Node: Finding Extensions1000478 -Node: Extension Example1001038 -Node: Internal File Description1001810 -Node: Internal File Ops1005877 -Ref: Internal File Ops-Footnote-11017547 -Node: Using Internal File Ops1017687 -Ref: Using Internal File Ops-Footnote-11020070 -Node: Extension Samples1020343 -Node: Extension Sample File Functions1021869 -Node: Extension Sample Fnmatch1029507 -Node: Extension Sample Fork1030998 -Node: Extension Sample Inplace1032213 -Node: Extension Sample Ord1033888 -Node: Extension Sample Readdir1034724 -Ref: table-readdir-file-types1035600 -Node: Extension Sample Revout1036411 -Node: Extension Sample Rev2way1037001 -Node: Extension Sample Read write array1037741 -Node: Extension Sample Readfile1039681 -Node: Extension Sample Time1040776 -Node: Extension Sample API Tests1042125 -Node: gawkextlib1042616 -Node: Extension summary1045274 -Node: Extension Exercises1048963 -Node: Language History1049685 -Node: V7/SVR3.11051341 -Node: SVR41053522 -Node: POSIX1054967 -Node: BTL1056356 -Node: POSIX/GNU1057090 -Node: Feature History1062654 -Node: Common Extensions1075752 -Node: Ranges and Locales1077076 -Ref: Ranges and Locales-Footnote-11081694 -Ref: Ranges and Locales-Footnote-21081721 -Ref: Ranges and Locales-Footnote-31081955 -Node: Contributors1082176 -Node: History summary1087717 -Node: Installation1089087 -Node: Gawk Distribution1090033 -Node: Getting1090517 -Node: Extracting1091340 -Node: Distribution contents1092975 -Node: Unix Installation1098692 -Node: Quick Installation1099309 -Node: Additional Configuration Options1101733 -Node: Configuration Philosophy1103471 -Node: Non-Unix Installation1105840 -Node: PC Installation1106298 -Node: PC Binary Installation1107617 -Node: PC Compiling1109465 -Ref: PC Compiling-Footnote-11112486 -Node: PC Testing1112595 -Node: PC Using1113771 -Node: Cygwin1117886 -Node: MSYS1118709 -Node: VMS Installation1119209 -Node: VMS Compilation1120001 -Ref: VMS Compilation-Footnote-11121223 -Node: VMS Dynamic Extensions1121281 -Node: VMS Installation Details1122965 -Node: VMS Running1125217 -Node: VMS GNV1128053 -Node: VMS Old Gawk1128787 -Node: Bugs1129257 -Node: Other Versions1133140 -Node: Installation summary1139568 -Node: Notes1140624 -Node: Compatibility Mode1141489 -Node: Additions1142271 -Node: Accessing The Source1143196 -Node: Adding Code1144632 -Node: New Ports1150797 -Node: Derived Files1155279 -Ref: Derived Files-Footnote-11160754 -Ref: Derived Files-Footnote-21160788 -Ref: Derived Files-Footnote-31161384 -Node: Future Extensions1161498 -Node: Implementation Limitations1162104 -Node: Extension Design1163352 -Node: Old Extension Problems1164506 -Ref: Old Extension Problems-Footnote-11166023 -Node: Extension New Mechanism Goals1166080 -Ref: Extension New Mechanism Goals-Footnote-11169440 -Node: Extension Other Design Decisions1169629 -Node: Extension Future Growth1171737 -Node: Old Extension Mechanism1172573 -Node: Notes summary1174335 -Node: Basic Concepts1175521 -Node: Basic High Level1176202 -Ref: figure-general-flow1176474 -Ref: figure-process-flow1177073 -Ref: Basic High Level-Footnote-11180302 -Node: Basic Data Typing1180487 -Node: Glossary1183815 -Node: Copying1208973 -Node: GNU Free Documentation License1246529 -Node: Index1271665 +Ref: This Manual-Footnote-161574 +Node: Conventions61674 +Node: Manual History64011 +Ref: Manual History-Footnote-167004 +Ref: Manual History-Footnote-267045 +Node: How To Contribute67119 +Node: Acknowledgments68248 +Node: Getting Started73065 +Node: Running gawk75504 +Node: One-shot76694 +Node: Read Terminal77958 +Node: Long79989 +Node: Executable Scripts81502 +Ref: Executable Scripts-Footnote-184291 +Node: Comments84394 +Node: Quoting86876 +Node: DOS Quoting92394 +Node: Sample Data Files93069 +Node: Very Simple95664 +Node: Two Rules100563 +Node: More Complex102449 +Node: Statements/Lines105311 +Ref: Statements/Lines-Footnote-1109766 +Node: Other Features110031 +Node: When110962 +Ref: When-Footnote-1112716 +Node: Intro Summary112781 +Node: Invoking Gawk113664 +Node: Command Line115178 +Node: Options115976 +Ref: Options-Footnote-1131909 +Ref: Options-Footnote-2132138 +Node: Other Arguments132163 +Node: Naming Standard Input135111 +Node: Environment Variables136204 +Node: AWKPATH Variable136762 +Ref: AWKPATH Variable-Footnote-1140065 +Ref: AWKPATH Variable-Footnote-2140110 +Node: AWKLIBPATH Variable140370 +Node: Other Environment Variables141513 +Node: Exit Status145241 +Node: Include Files145917 +Node: Loading Shared Libraries149514 +Node: Obsolete150941 +Node: Undocumented151638 +Node: Invoking Summary151905 +Node: Regexp153569 +Node: Regexp Usage155023 +Node: Escape Sequences157060 +Node: Regexp Operators163071 +Ref: Regexp Operators-Footnote-1170497 +Ref: Regexp Operators-Footnote-2170644 +Node: Bracket Expressions170742 +Ref: table-char-classes172757 +Node: Leftmost Longest175681 +Node: Computed Regexps176983 +Node: GNU Regexp Operators180380 +Node: Case-sensitivity184053 +Ref: Case-sensitivity-Footnote-1186938 +Ref: Case-sensitivity-Footnote-2187173 +Node: Regexp Summary187281 +Node: Reading Files188748 +Node: Records190842 +Node: awk split records191575 +Node: gawk split records196490 +Ref: gawk split records-Footnote-1201034 +Node: Fields201071 +Ref: Fields-Footnote-1203847 +Node: Nonconstant Fields203933 +Ref: Nonconstant Fields-Footnote-1206176 +Node: Changing Fields206380 +Node: Field Separators212309 +Node: Default Field Splitting215014 +Node: Regexp Field Splitting216131 +Node: Single Character Fields219481 +Node: Command Line Field Separator220540 +Node: Full Line Fields223752 +Ref: Full Line Fields-Footnote-1225269 +Ref: Full Line Fields-Footnote-2225315 +Node: Field Splitting Summary225416 +Node: Constant Size227490 +Node: Splitting By Content232079 +Ref: Splitting By Content-Footnote-1236073 +Node: Multiple Line236236 +Ref: Multiple Line-Footnote-1242122 +Node: Getline242301 +Node: Plain Getline244513 +Node: Getline/Variable247153 +Node: Getline/File248301 +Node: Getline/Variable/File249685 +Ref: Getline/Variable/File-Footnote-1251288 +Node: Getline/Pipe251375 +Node: Getline/Variable/Pipe254058 +Node: Getline/Coprocess255189 +Node: Getline/Variable/Coprocess256441 +Node: Getline Notes257180 +Node: Getline Summary259972 +Ref: table-getline-variants260384 +Node: Read Timeout261213 +Ref: Read Timeout-Footnote-1265038 +Node: Command-line directories265096 +Node: Input Summary266001 +Node: Input Exercises269302 +Node: Printing270030 +Node: Print271807 +Node: Print Examples273264 +Node: Output Separators276043 +Node: OFMT278061 +Node: Printf279415 +Node: Basic Printf280200 +Node: Control Letters281770 +Node: Format Modifiers285753 +Node: Printf Examples291762 +Node: Redirection294248 +Node: Special FD301089 +Ref: Special FD-Footnote-1304249 +Node: Special Files304323 +Node: Other Inherited Files304940 +Node: Special Network305940 +Node: Special Caveats306802 +Node: Close Files And Pipes307753 +Ref: Close Files And Pipes-Footnote-1314935 +Ref: Close Files And Pipes-Footnote-2315083 +Node: Output Summary315233 +Node: Output Exercises316231 +Node: Expressions316911 +Node: Values318096 +Node: Constants318774 +Node: Scalar Constants319465 +Ref: Scalar Constants-Footnote-1320324 +Node: Nondecimal-numbers320574 +Node: Regexp Constants323592 +Node: Using Constant Regexps324117 +Node: Variables327260 +Node: Using Variables327915 +Node: Assignment Options329826 +Node: Conversion331701 +Node: Strings And Numbers332225 +Ref: Strings And Numbers-Footnote-1335290 +Node: Locale influences conversions335399 +Ref: table-locale-affects338146 +Node: All Operators338734 +Node: Arithmetic Ops339364 +Node: Concatenation341869 +Ref: Concatenation-Footnote-1344688 +Node: Assignment Ops344794 +Ref: table-assign-ops349773 +Node: Increment Ops351045 +Node: Truth Values and Conditions354483 +Node: Truth Values355568 +Node: Typing and Comparison356617 +Node: Variable Typing357427 +Node: Comparison Operators361080 +Ref: table-relational-ops361490 +Node: POSIX String Comparison364985 +Ref: POSIX String Comparison-Footnote-1366057 +Node: Boolean Ops366195 +Ref: Boolean Ops-Footnote-1370674 +Node: Conditional Exp370765 +Node: Function Calls372492 +Node: Precedence376372 +Node: Locales380033 +Node: Expressions Summary381665 +Node: Patterns and Actions384225 +Node: Pattern Overview385345 +Node: Regexp Patterns387024 +Node: Expression Patterns387567 +Node: Ranges391277 +Node: BEGIN/END394383 +Node: Using BEGIN/END395144 +Ref: Using BEGIN/END-Footnote-1397878 +Node: I/O And BEGIN/END397984 +Node: BEGINFILE/ENDFILE400298 +Node: Empty403199 +Node: Using Shell Variables403516 +Node: Action Overview405789 +Node: Statements408115 +Node: If Statement409963 +Node: While Statement411458 +Node: Do Statement413487 +Node: For Statement414631 +Node: Switch Statement417788 +Node: Break Statement420170 +Node: Continue Statement422211 +Node: Next Statement424038 +Node: Nextfile Statement426419 +Node: Exit Statement429049 +Node: Built-in Variables431452 +Node: User-modified432585 +Ref: User-modified-Footnote-1440266 +Node: Auto-set440328 +Ref: Auto-set-Footnote-1453363 +Ref: Auto-set-Footnote-2453568 +Node: ARGC and ARGV453624 +Node: Pattern Action Summary457842 +Node: Arrays460269 +Node: Array Basics461598 +Node: Array Intro462442 +Ref: figure-array-elements464406 +Ref: Array Intro-Footnote-1466932 +Node: Reference to Elements467060 +Node: Assigning Elements469512 +Node: Array Example470003 +Node: Scanning an Array471761 +Node: Controlling Scanning474777 +Ref: Controlling Scanning-Footnote-1479973 +Node: Numeric Array Subscripts480289 +Node: Uninitialized Subscripts482474 +Node: Delete484091 +Ref: Delete-Footnote-1486834 +Node: Multidimensional486891 +Node: Multiscanning489988 +Node: Arrays of Arrays491577 +Node: Arrays Summary496336 +Node: Functions498428 +Node: Built-in499327 +Node: Calling Built-in500405 +Node: Numeric Functions502396 +Ref: Numeric Functions-Footnote-1506413 +Ref: Numeric Functions-Footnote-2506770 +Ref: Numeric Functions-Footnote-3506818 +Node: String Functions507090 +Ref: String Functions-Footnote-1530565 +Ref: String Functions-Footnote-2530694 +Ref: String Functions-Footnote-3530942 +Node: Gory Details531029 +Ref: table-sub-escapes532810 +Ref: table-sub-proposed534330 +Ref: table-posix-sub535694 +Ref: table-gensub-escapes537230 +Ref: Gory Details-Footnote-1538062 +Node: I/O Functions538213 +Ref: I/O Functions-Footnote-1545431 +Node: Time Functions545578 +Ref: Time Functions-Footnote-1556066 +Ref: Time Functions-Footnote-2556134 +Ref: Time Functions-Footnote-3556292 +Ref: Time Functions-Footnote-4556403 +Ref: Time Functions-Footnote-5556515 +Ref: Time Functions-Footnote-6556742 +Node: Bitwise Functions557008 +Ref: table-bitwise-ops557570 +Ref: Bitwise Functions-Footnote-1561879 +Node: Type Functions562048 +Node: I18N Functions563199 +Node: User-defined564844 +Node: Definition Syntax565649 +Ref: Definition Syntax-Footnote-1571056 +Node: Function Example571127 +Ref: Function Example-Footnote-1574046 +Node: Function Caveats574068 +Node: Calling A Function574586 +Node: Variable Scope575544 +Node: Pass By Value/Reference578532 +Node: Return Statement582027 +Node: Dynamic Typing585008 +Node: Indirect Calls585937 +Ref: Indirect Calls-Footnote-1597239 +Node: Functions Summary597367 +Node: Library Functions600069 +Ref: Library Functions-Footnote-1603678 +Ref: Library Functions-Footnote-2603821 +Node: Library Names603992 +Ref: Library Names-Footnote-1607446 +Ref: Library Names-Footnote-2607669 +Node: General Functions607755 +Node: Strtonum Function608858 +Node: Assert Function611880 +Node: Round Function615204 +Node: Cliff Random Function616745 +Node: Ordinal Functions617761 +Ref: Ordinal Functions-Footnote-1620824 +Ref: Ordinal Functions-Footnote-2621076 +Node: Join Function621287 +Ref: Join Function-Footnote-1623056 +Node: Getlocaltime Function623256 +Node: Readfile Function627000 +Node: Shell Quoting628970 +Node: Data File Management630371 +Node: Filetrans Function631003 +Node: Rewind Function635059 +Node: File Checking636446 +Ref: File Checking-Footnote-1637778 +Node: Empty Files637979 +Node: Ignoring Assigns639958 +Node: Getopt Function641509 +Ref: Getopt Function-Footnote-1652971 +Node: Passwd Functions653171 +Ref: Passwd Functions-Footnote-1662008 +Node: Group Functions662096 +Ref: Group Functions-Footnote-1669990 +Node: Walking Arrays670203 +Node: Library Functions Summary671806 +Node: Library Exercises673207 +Node: Sample Programs674487 +Node: Running Examples675257 +Node: Clones675985 +Node: Cut Program677209 +Node: Egrep Program686928 +Ref: Egrep Program-Footnote-1694426 +Node: Id Program694536 +Node: Split Program698181 +Ref: Split Program-Footnote-1701629 +Node: Tee Program701757 +Node: Uniq Program704546 +Node: Wc Program711965 +Ref: Wc Program-Footnote-1716215 +Node: Miscellaneous Programs716309 +Node: Dupword Program717522 +Node: Alarm Program719553 +Node: Translate Program724357 +Ref: Translate Program-Footnote-1728922 +Node: Labels Program729192 +Ref: Labels Program-Footnote-1732543 +Node: Word Sorting732627 +Node: History Sorting736698 +Node: Extract Program738534 +Node: Simple Sed746059 +Node: Igawk Program749127 +Ref: Igawk Program-Footnote-1763451 +Ref: Igawk Program-Footnote-2763652 +Ref: Igawk Program-Footnote-3763774 +Node: Anagram Program763889 +Node: Signature Program766946 +Node: Programs Summary768193 +Node: Programs Exercises769386 +Ref: Programs Exercises-Footnote-1773517 +Node: Advanced Features773608 +Node: Nondecimal Data775556 +Node: Array Sorting777146 +Node: Controlling Array Traversal777843 +Ref: Controlling Array Traversal-Footnote-1786176 +Node: Array Sorting Functions786294 +Ref: Array Sorting Functions-Footnote-1790183 +Node: Two-way I/O790379 +Ref: Two-way I/O-Footnote-1795324 +Ref: Two-way I/O-Footnote-2795510 +Node: TCP/IP Networking795592 +Node: Profiling798465 +Node: Advanced Features Summary806012 +Node: Internationalization807945 +Node: I18N and L10N809425 +Node: Explaining gettext810111 +Ref: Explaining gettext-Footnote-1815136 +Ref: Explaining gettext-Footnote-2815320 +Node: Programmer i18n815485 +Ref: Programmer i18n-Footnote-1820351 +Node: Translator i18n820400 +Node: String Extraction821194 +Ref: String Extraction-Footnote-1822325 +Node: Printf Ordering822411 +Ref: Printf Ordering-Footnote-1825197 +Node: I18N Portability825261 +Ref: I18N Portability-Footnote-1827716 +Node: I18N Example827779 +Ref: I18N Example-Footnote-1830582 +Node: Gawk I18N830654 +Node: I18N Summary831292 +Node: Debugger832631 +Node: Debugging833653 +Node: Debugging Concepts834094 +Node: Debugging Terms835947 +Node: Awk Debugging838519 +Node: Sample Debugging Session839413 +Node: Debugger Invocation839933 +Node: Finding The Bug841317 +Node: List of Debugger Commands847792 +Node: Breakpoint Control849125 +Node: Debugger Execution Control852821 +Node: Viewing And Changing Data856185 +Node: Execution Stack859563 +Node: Debugger Info861200 +Node: Miscellaneous Debugger Commands865217 +Node: Readline Support870246 +Node: Limitations871138 +Node: Debugging Summary873252 +Node: Arbitrary Precision Arithmetic874420 +Node: Computer Arithmetic875836 +Ref: table-numeric-ranges879434 +Ref: Computer Arithmetic-Footnote-1880293 +Node: Math Definitions880350 +Ref: table-ieee-formats883638 +Ref: Math Definitions-Footnote-1884242 +Node: MPFR features884347 +Node: FP Math Caution886018 +Ref: FP Math Caution-Footnote-1887068 +Node: Inexactness of computations887437 +Node: Inexact representation888396 +Node: Comparing FP Values889753 +Node: Errors accumulate890835 +Node: Getting Accuracy892268 +Node: Try To Round894930 +Node: Setting precision895829 +Ref: table-predefined-precision-strings896513 +Node: Setting the rounding mode898302 +Ref: table-gawk-rounding-modes898666 +Ref: Setting the rounding mode-Footnote-1902121 +Node: Arbitrary Precision Integers902300 +Ref: Arbitrary Precision Integers-Footnote-1905286 +Node: POSIX Floating Point Problems905435 +Ref: POSIX Floating Point Problems-Footnote-1909308 +Node: Floating point summary909346 +Node: Dynamic Extensions911540 +Node: Extension Intro913092 +Node: Plugin License914358 +Node: Extension Mechanism Outline915155 +Ref: figure-load-extension915583 +Ref: figure-register-new-function917063 +Ref: figure-call-new-function918067 +Node: Extension API Description920053 +Node: Extension API Functions Introduction921503 +Node: General Data Types926327 +Ref: General Data Types-Footnote-1932066 +Node: Memory Allocation Functions932365 +Ref: Memory Allocation Functions-Footnote-1935204 +Node: Constructor Functions935300 +Node: Registration Functions937034 +Node: Extension Functions937719 +Node: Exit Callback Functions940016 +Node: Extension Version String941264 +Node: Input Parsers941929 +Node: Output Wrappers951808 +Node: Two-way processors956323 +Node: Printing Messages958527 +Ref: Printing Messages-Footnote-1959603 +Node: Updating `ERRNO'959755 +Node: Requesting Values960495 +Ref: table-value-types-returned961223 +Node: Accessing Parameters962180 +Node: Symbol Table Access963411 +Node: Symbol table by name963925 +Node: Symbol table by cookie965906 +Ref: Symbol table by cookie-Footnote-1970050 +Node: Cached values970113 +Ref: Cached values-Footnote-1973612 +Node: Array Manipulation973703 +Ref: Array Manipulation-Footnote-1974801 +Node: Array Data Types974838 +Ref: Array Data Types-Footnote-1977493 +Node: Array Functions977585 +Node: Flattening Arrays981439 +Node: Creating Arrays988331 +Node: Extension API Variables993102 +Node: Extension Versioning993738 +Node: Extension API Informational Variables995639 +Node: Extension API Boilerplate996704 +Node: Finding Extensions1000513 +Node: Extension Example1001073 +Node: Internal File Description1001845 +Node: Internal File Ops1005912 +Ref: Internal File Ops-Footnote-11017582 +Node: Using Internal File Ops1017722 +Ref: Using Internal File Ops-Footnote-11020105 +Node: Extension Samples1020378 +Node: Extension Sample File Functions1021904 +Node: Extension Sample Fnmatch1029542 +Node: Extension Sample Fork1031033 +Node: Extension Sample Inplace1032248 +Node: Extension Sample Ord1033923 +Node: Extension Sample Readdir1034759 +Ref: table-readdir-file-types1035635 +Node: Extension Sample Revout1036446 +Node: Extension Sample Rev2way1037036 +Node: Extension Sample Read write array1037776 +Node: Extension Sample Readfile1039716 +Node: Extension Sample Time1040811 +Node: Extension Sample API Tests1042160 +Node: gawkextlib1042651 +Node: Extension summary1045309 +Node: Extension Exercises1048998 +Node: Language History1049720 +Node: V7/SVR3.11051376 +Node: SVR41053557 +Node: POSIX1055002 +Node: BTL1056391 +Node: POSIX/GNU1057125 +Node: Feature History1062689 +Node: Common Extensions1075787 +Node: Ranges and Locales1077111 +Ref: Ranges and Locales-Footnote-11081729 +Ref: Ranges and Locales-Footnote-21081756 +Ref: Ranges and Locales-Footnote-31081990 +Node: Contributors1082211 +Node: History summary1087752 +Node: Installation1089122 +Node: Gawk Distribution1090068 +Node: Getting1090552 +Node: Extracting1091375 +Node: Distribution contents1093010 +Node: Unix Installation1098727 +Node: Quick Installation1099344 +Node: Additional Configuration Options1101768 +Node: Configuration Philosophy1103506 +Node: Non-Unix Installation1105875 +Node: PC Installation1106333 +Node: PC Binary Installation1107652 +Node: PC Compiling1109500 +Ref: PC Compiling-Footnote-11112521 +Node: PC Testing1112630 +Node: PC Using1113806 +Node: Cygwin1117921 +Node: MSYS1118744 +Node: VMS Installation1119244 +Node: VMS Compilation1120036 +Ref: VMS Compilation-Footnote-11121258 +Node: VMS Dynamic Extensions1121316 +Node: VMS Installation Details1123000 +Node: VMS Running1125252 +Node: VMS GNV1128088 +Node: VMS Old Gawk1128822 +Node: Bugs1129292 +Node: Other Versions1133175 +Node: Installation summary1139603 +Node: Notes1140659 +Node: Compatibility Mode1141524 +Node: Additions1142306 +Node: Accessing The Source1143231 +Node: Adding Code1144667 +Node: New Ports1150832 +Node: Derived Files1155314 +Ref: Derived Files-Footnote-11160789 +Ref: Derived Files-Footnote-21160823 +Ref: Derived Files-Footnote-31161419 +Node: Future Extensions1161533 +Node: Implementation Limitations1162139 +Node: Extension Design1163387 +Node: Old Extension Problems1164541 +Ref: Old Extension Problems-Footnote-11166058 +Node: Extension New Mechanism Goals1166115 +Ref: Extension New Mechanism Goals-Footnote-11169475 +Node: Extension Other Design Decisions1169664 +Node: Extension Future Growth1171772 +Node: Old Extension Mechanism1172608 +Node: Notes summary1174370 +Node: Basic Concepts1175556 +Node: Basic High Level1176237 +Ref: figure-general-flow1176509 +Ref: figure-process-flow1177108 +Ref: Basic High Level-Footnote-11180337 +Node: Basic Data Typing1180522 +Node: Glossary1183850 +Node: Copying1209008 +Node: GNU Free Documentation License1246564 +Node: Index1271700  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index de2f6ace..c0c672f1 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 @@ -1579,7 +1579,7 @@ This @value{DOCUMENT} has the difficult task of being both a tutorial and a refe 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 Info and -@ulink{http://www.gnu.org/software/gawk/manual/, HTML} +@uref{http://www.gnu.org/software/gawk/manual/, HTML} versions of the @value{DOCUMENT}. @end ifnotinfo @@ -1661,9 +1661,9 @@ doing something when a record is matched, and the predefined variables @item @ref{Arrays}, covers @command{awk}'s one-and-only data structure: the associative array. -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. +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}, @@ -1675,17 +1675,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} @@ -1738,7 +1738,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 @@ -1781,7 +1781,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. @@ -1808,7 +1808,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. @@ -1851,7 +1851,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 @@ -1878,7 +1878,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}.'' @@ -1914,7 +1914,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.'' @@ -1949,12 +1949,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 @@ -2014,7 +2014,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 @@ -2026,7 +2026,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 @@ -2041,7 +2041,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 @@ -2051,7 +2051,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/, @@ -2105,7 +2105,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. @@ -2116,12 +2116,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, @@ -2149,7 +2155,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 @@ -2233,9 +2239,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. @@ -2243,7 +2249,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 @@ -2253,8 +2259,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. @@ -2365,9 +2371,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 @@ -2441,8 +2447,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) @@ -2461,12 +2467,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 @@ -2487,10 +2493,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 @@ -2594,7 +2600,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. @@ -2808,7 +2814,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 @@ -2945,7 +2951,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: @@ -2984,7 +2990,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: @@ -2995,11 +3001,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 @@ -3098,7 +3104,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 @@ -3132,7 +3138,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 @@ -3179,7 +3185,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 @@ -3200,7 +3206,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 @@ -3287,7 +3293,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 diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 460fc7dd..5cff1e5f 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 @@ -1546,7 +1546,7 @@ This @value{DOCUMENT} has the difficult task of being both a tutorial and a refe 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 Info and -@ulink{http://www.gnu.org/software/gawk/manual/, HTML} +@uref{http://www.gnu.org/software/gawk/manual/, HTML} versions of the @value{DOCUMENT}. @end ifnotinfo @@ -1628,9 +1628,9 @@ doing something when a record is matched, and the predefined variables @item @ref{Arrays}, covers @command{awk}'s one-and-only data structure: the associative array. -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. +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}, @@ -1642,17 +1642,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} @@ -1705,7 +1705,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 @@ -1748,7 +1748,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. @@ -1775,7 +1775,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. @@ -1818,7 +1818,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 @@ -1845,7 +1845,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}.'' @@ -1881,7 +1881,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.'' @@ -1916,12 +1916,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 @@ -1981,7 +1981,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 @@ -1993,7 +1993,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 @@ -2008,7 +2008,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 @@ -2018,7 +2018,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/, @@ -2072,7 +2072,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. @@ -2083,12 +2083,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, @@ -2116,7 +2122,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 @@ -2200,9 +2206,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. @@ -2210,7 +2216,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 @@ -2220,8 +2226,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. @@ -2332,9 +2338,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 @@ -2408,8 +2414,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) @@ -2428,12 +2434,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 @@ -2454,10 +2460,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 @@ -2561,7 +2567,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. @@ -2719,7 +2725,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 @@ -2856,7 +2862,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: @@ -2895,7 +2901,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: @@ -2906,11 +2912,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 @@ -3009,7 +3015,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 @@ -3043,7 +3049,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 @@ -3090,7 +3096,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 @@ -3111,7 +3117,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 @@ -3198,7 +3204,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 -- cgit v1.2.3 From f1aae2393344a21675bc3d5f3c24f9b555c5744b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 20 Jan 2015 21:58:17 +0200 Subject: Remove unneeded calls to make_aname. --- ChangeLog | 9 ++++++++- gawkapi.c | 1 - symbol.c | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05594a8c..57663dc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-01-20 Arnold D. Robbins + + * 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 * awkgram.c: Update to bison 3.0.3. @@ -1585,7 +1592,7 @@ 2012-12-25 Arnold D. Robbins 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/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/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); -- cgit v1.2.3 From 501f5c4fc53a1c74a8a4074832dcc2bd72224ed6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 20 Jan 2015 22:00:37 +0200 Subject: Fix a typo. --- doc/gawk.info | 892 ++++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 2 +- doc/gawktexi.in | 2 +- 3 files changed, 448 insertions(+), 448 deletions(-) diff --git a/doc/gawk.info b/doc/gawk.info index 3f32c445..b81c0700 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -5916,7 +5916,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 @@ -34408,450 +34408,450 @@ Node: Getline Notes257180 Node: Getline Summary259972 Ref: table-getline-variants260384 Node: Read Timeout261213 -Ref: Read Timeout-Footnote-1265038 -Node: Command-line directories265096 -Node: Input Summary266001 -Node: Input Exercises269302 -Node: Printing270030 -Node: Print271807 -Node: Print Examples273264 -Node: Output Separators276043 -Node: OFMT278061 -Node: Printf279415 -Node: Basic Printf280200 -Node: Control Letters281770 -Node: Format Modifiers285753 -Node: Printf Examples291762 -Node: Redirection294248 -Node: Special FD301089 -Ref: Special FD-Footnote-1304249 -Node: Special Files304323 -Node: Other Inherited Files304940 -Node: Special Network305940 -Node: Special Caveats306802 -Node: Close Files And Pipes307753 -Ref: Close Files And Pipes-Footnote-1314935 -Ref: Close Files And Pipes-Footnote-2315083 -Node: Output Summary315233 -Node: Output Exercises316231 -Node: Expressions316911 -Node: Values318096 -Node: Constants318774 -Node: Scalar Constants319465 -Ref: Scalar Constants-Footnote-1320324 -Node: Nondecimal-numbers320574 -Node: Regexp Constants323592 -Node: Using Constant Regexps324117 -Node: Variables327260 -Node: Using Variables327915 -Node: Assignment Options329826 -Node: Conversion331701 -Node: Strings And Numbers332225 -Ref: Strings And Numbers-Footnote-1335290 -Node: Locale influences conversions335399 -Ref: table-locale-affects338146 -Node: All Operators338734 -Node: Arithmetic Ops339364 -Node: Concatenation341869 -Ref: Concatenation-Footnote-1344688 -Node: Assignment Ops344794 -Ref: table-assign-ops349773 -Node: Increment Ops351045 -Node: Truth Values and Conditions354483 -Node: Truth Values355568 -Node: Typing and Comparison356617 -Node: Variable Typing357427 -Node: Comparison Operators361080 -Ref: table-relational-ops361490 -Node: POSIX String Comparison364985 -Ref: POSIX String Comparison-Footnote-1366057 -Node: Boolean Ops366195 -Ref: Boolean Ops-Footnote-1370674 -Node: Conditional Exp370765 -Node: Function Calls372492 -Node: Precedence376372 -Node: Locales380033 -Node: Expressions Summary381665 -Node: Patterns and Actions384225 -Node: Pattern Overview385345 -Node: Regexp Patterns387024 -Node: Expression Patterns387567 -Node: Ranges391277 -Node: BEGIN/END394383 -Node: Using BEGIN/END395144 -Ref: Using BEGIN/END-Footnote-1397878 -Node: I/O And BEGIN/END397984 -Node: BEGINFILE/ENDFILE400298 -Node: Empty403199 -Node: Using Shell Variables403516 -Node: Action Overview405789 -Node: Statements408115 -Node: If Statement409963 -Node: While Statement411458 -Node: Do Statement413487 -Node: For Statement414631 -Node: Switch Statement417788 -Node: Break Statement420170 -Node: Continue Statement422211 -Node: Next Statement424038 -Node: Nextfile Statement426419 -Node: Exit Statement429049 -Node: Built-in Variables431452 -Node: User-modified432585 -Ref: User-modified-Footnote-1440266 -Node: Auto-set440328 -Ref: Auto-set-Footnote-1453363 -Ref: Auto-set-Footnote-2453568 -Node: ARGC and ARGV453624 -Node: Pattern Action Summary457842 -Node: Arrays460269 -Node: Array Basics461598 -Node: Array Intro462442 -Ref: figure-array-elements464406 -Ref: Array Intro-Footnote-1466932 -Node: Reference to Elements467060 -Node: Assigning Elements469512 -Node: Array Example470003 -Node: Scanning an Array471761 -Node: Controlling Scanning474777 -Ref: Controlling Scanning-Footnote-1479973 -Node: Numeric Array Subscripts480289 -Node: Uninitialized Subscripts482474 -Node: Delete484091 -Ref: Delete-Footnote-1486834 -Node: Multidimensional486891 -Node: Multiscanning489988 -Node: Arrays of Arrays491577 -Node: Arrays Summary496336 -Node: Functions498428 -Node: Built-in499327 -Node: Calling Built-in500405 -Node: Numeric Functions502396 -Ref: Numeric Functions-Footnote-1506413 -Ref: Numeric Functions-Footnote-2506770 -Ref: Numeric Functions-Footnote-3506818 -Node: String Functions507090 -Ref: String Functions-Footnote-1530565 -Ref: String Functions-Footnote-2530694 -Ref: String Functions-Footnote-3530942 -Node: Gory Details531029 -Ref: table-sub-escapes532810 -Ref: table-sub-proposed534330 -Ref: table-posix-sub535694 -Ref: table-gensub-escapes537230 -Ref: Gory Details-Footnote-1538062 -Node: I/O Functions538213 -Ref: I/O Functions-Footnote-1545431 -Node: Time Functions545578 -Ref: Time Functions-Footnote-1556066 -Ref: Time Functions-Footnote-2556134 -Ref: Time Functions-Footnote-3556292 -Ref: Time Functions-Footnote-4556403 -Ref: Time Functions-Footnote-5556515 -Ref: Time Functions-Footnote-6556742 -Node: Bitwise Functions557008 -Ref: table-bitwise-ops557570 -Ref: Bitwise Functions-Footnote-1561879 -Node: Type Functions562048 -Node: I18N Functions563199 -Node: User-defined564844 -Node: Definition Syntax565649 -Ref: Definition Syntax-Footnote-1571056 -Node: Function Example571127 -Ref: Function Example-Footnote-1574046 -Node: Function Caveats574068 -Node: Calling A Function574586 -Node: Variable Scope575544 -Node: Pass By Value/Reference578532 -Node: Return Statement582027 -Node: Dynamic Typing585008 -Node: Indirect Calls585937 -Ref: Indirect Calls-Footnote-1597239 -Node: Functions Summary597367 -Node: Library Functions600069 -Ref: Library Functions-Footnote-1603678 -Ref: Library Functions-Footnote-2603821 -Node: Library Names603992 -Ref: Library Names-Footnote-1607446 -Ref: Library Names-Footnote-2607669 -Node: General Functions607755 -Node: Strtonum Function608858 -Node: Assert Function611880 -Node: Round Function615204 -Node: Cliff Random Function616745 -Node: Ordinal Functions617761 -Ref: Ordinal Functions-Footnote-1620824 -Ref: Ordinal Functions-Footnote-2621076 -Node: Join Function621287 -Ref: Join Function-Footnote-1623056 -Node: Getlocaltime Function623256 -Node: Readfile Function627000 -Node: Shell Quoting628970 -Node: Data File Management630371 -Node: Filetrans Function631003 -Node: Rewind Function635059 -Node: File Checking636446 -Ref: File Checking-Footnote-1637778 -Node: Empty Files637979 -Node: Ignoring Assigns639958 -Node: Getopt Function641509 -Ref: Getopt Function-Footnote-1652971 -Node: Passwd Functions653171 -Ref: Passwd Functions-Footnote-1662008 -Node: Group Functions662096 -Ref: Group Functions-Footnote-1669990 -Node: Walking Arrays670203 -Node: Library Functions Summary671806 -Node: Library Exercises673207 -Node: Sample Programs674487 -Node: Running Examples675257 -Node: Clones675985 -Node: Cut Program677209 -Node: Egrep Program686928 -Ref: Egrep Program-Footnote-1694426 -Node: Id Program694536 -Node: Split Program698181 -Ref: Split Program-Footnote-1701629 -Node: Tee Program701757 -Node: Uniq Program704546 -Node: Wc Program711965 -Ref: Wc Program-Footnote-1716215 -Node: Miscellaneous Programs716309 -Node: Dupword Program717522 -Node: Alarm Program719553 -Node: Translate Program724357 -Ref: Translate Program-Footnote-1728922 -Node: Labels Program729192 -Ref: Labels Program-Footnote-1732543 -Node: Word Sorting732627 -Node: History Sorting736698 -Node: Extract Program738534 -Node: Simple Sed746059 -Node: Igawk Program749127 -Ref: Igawk Program-Footnote-1763451 -Ref: Igawk Program-Footnote-2763652 -Ref: Igawk Program-Footnote-3763774 -Node: Anagram Program763889 -Node: Signature Program766946 -Node: Programs Summary768193 -Node: Programs Exercises769386 -Ref: Programs Exercises-Footnote-1773517 -Node: Advanced Features773608 -Node: Nondecimal Data775556 -Node: Array Sorting777146 -Node: Controlling Array Traversal777843 -Ref: Controlling Array Traversal-Footnote-1786176 -Node: Array Sorting Functions786294 -Ref: Array Sorting Functions-Footnote-1790183 -Node: Two-way I/O790379 -Ref: Two-way I/O-Footnote-1795324 -Ref: Two-way I/O-Footnote-2795510 -Node: TCP/IP Networking795592 -Node: Profiling798465 -Node: Advanced Features Summary806012 -Node: Internationalization807945 -Node: I18N and L10N809425 -Node: Explaining gettext810111 -Ref: Explaining gettext-Footnote-1815136 -Ref: Explaining gettext-Footnote-2815320 -Node: Programmer i18n815485 -Ref: Programmer i18n-Footnote-1820351 -Node: Translator i18n820400 -Node: String Extraction821194 -Ref: String Extraction-Footnote-1822325 -Node: Printf Ordering822411 -Ref: Printf Ordering-Footnote-1825197 -Node: I18N Portability825261 -Ref: I18N Portability-Footnote-1827716 -Node: I18N Example827779 -Ref: I18N Example-Footnote-1830582 -Node: Gawk I18N830654 -Node: I18N Summary831292 -Node: Debugger832631 -Node: Debugging833653 -Node: Debugging Concepts834094 -Node: Debugging Terms835947 -Node: Awk Debugging838519 -Node: Sample Debugging Session839413 -Node: Debugger Invocation839933 -Node: Finding The Bug841317 -Node: List of Debugger Commands847792 -Node: Breakpoint Control849125 -Node: Debugger Execution Control852821 -Node: Viewing And Changing Data856185 -Node: Execution Stack859563 -Node: Debugger Info861200 -Node: Miscellaneous Debugger Commands865217 -Node: Readline Support870246 -Node: Limitations871138 -Node: Debugging Summary873252 -Node: Arbitrary Precision Arithmetic874420 -Node: Computer Arithmetic875836 -Ref: table-numeric-ranges879434 -Ref: Computer Arithmetic-Footnote-1880293 -Node: Math Definitions880350 -Ref: table-ieee-formats883638 -Ref: Math Definitions-Footnote-1884242 -Node: MPFR features884347 -Node: FP Math Caution886018 -Ref: FP Math Caution-Footnote-1887068 -Node: Inexactness of computations887437 -Node: Inexact representation888396 -Node: Comparing FP Values889753 -Node: Errors accumulate890835 -Node: Getting Accuracy892268 -Node: Try To Round894930 -Node: Setting precision895829 -Ref: table-predefined-precision-strings896513 -Node: Setting the rounding mode898302 -Ref: table-gawk-rounding-modes898666 -Ref: Setting the rounding mode-Footnote-1902121 -Node: Arbitrary Precision Integers902300 -Ref: Arbitrary Precision Integers-Footnote-1905286 -Node: POSIX Floating Point Problems905435 -Ref: POSIX Floating Point Problems-Footnote-1909308 -Node: Floating point summary909346 -Node: Dynamic Extensions911540 -Node: Extension Intro913092 -Node: Plugin License914358 -Node: Extension Mechanism Outline915155 -Ref: figure-load-extension915583 -Ref: figure-register-new-function917063 -Ref: figure-call-new-function918067 -Node: Extension API Description920053 -Node: Extension API Functions Introduction921503 -Node: General Data Types926327 -Ref: General Data Types-Footnote-1932066 -Node: Memory Allocation Functions932365 -Ref: Memory Allocation Functions-Footnote-1935204 -Node: Constructor Functions935300 -Node: Registration Functions937034 -Node: Extension Functions937719 -Node: Exit Callback Functions940016 -Node: Extension Version String941264 -Node: Input Parsers941929 -Node: Output Wrappers951808 -Node: Two-way processors956323 -Node: Printing Messages958527 -Ref: Printing Messages-Footnote-1959603 -Node: Updating `ERRNO'959755 -Node: Requesting Values960495 -Ref: table-value-types-returned961223 -Node: Accessing Parameters962180 -Node: Symbol Table Access963411 -Node: Symbol table by name963925 -Node: Symbol table by cookie965906 -Ref: Symbol table by cookie-Footnote-1970050 -Node: Cached values970113 -Ref: Cached values-Footnote-1973612 -Node: Array Manipulation973703 -Ref: Array Manipulation-Footnote-1974801 -Node: Array Data Types974838 -Ref: Array Data Types-Footnote-1977493 -Node: Array Functions977585 -Node: Flattening Arrays981439 -Node: Creating Arrays988331 -Node: Extension API Variables993102 -Node: Extension Versioning993738 -Node: Extension API Informational Variables995639 -Node: Extension API Boilerplate996704 -Node: Finding Extensions1000513 -Node: Extension Example1001073 -Node: Internal File Description1001845 -Node: Internal File Ops1005912 -Ref: Internal File Ops-Footnote-11017582 -Node: Using Internal File Ops1017722 -Ref: Using Internal File Ops-Footnote-11020105 -Node: Extension Samples1020378 -Node: Extension Sample File Functions1021904 -Node: Extension Sample Fnmatch1029542 -Node: Extension Sample Fork1031033 -Node: Extension Sample Inplace1032248 -Node: Extension Sample Ord1033923 -Node: Extension Sample Readdir1034759 -Ref: table-readdir-file-types1035635 -Node: Extension Sample Revout1036446 -Node: Extension Sample Rev2way1037036 -Node: Extension Sample Read write array1037776 -Node: Extension Sample Readfile1039716 -Node: Extension Sample Time1040811 -Node: Extension Sample API Tests1042160 -Node: gawkextlib1042651 -Node: Extension summary1045309 -Node: Extension Exercises1048998 -Node: Language History1049720 -Node: V7/SVR3.11051376 -Node: SVR41053557 -Node: POSIX1055002 -Node: BTL1056391 -Node: POSIX/GNU1057125 -Node: Feature History1062689 -Node: Common Extensions1075787 -Node: Ranges and Locales1077111 -Ref: Ranges and Locales-Footnote-11081729 -Ref: Ranges and Locales-Footnote-21081756 -Ref: Ranges and Locales-Footnote-31081990 -Node: Contributors1082211 -Node: History summary1087752 -Node: Installation1089122 -Node: Gawk Distribution1090068 -Node: Getting1090552 -Node: Extracting1091375 -Node: Distribution contents1093010 -Node: Unix Installation1098727 -Node: Quick Installation1099344 -Node: Additional Configuration Options1101768 -Node: Configuration Philosophy1103506 -Node: Non-Unix Installation1105875 -Node: PC Installation1106333 -Node: PC Binary Installation1107652 -Node: PC Compiling1109500 -Ref: PC Compiling-Footnote-11112521 -Node: PC Testing1112630 -Node: PC Using1113806 -Node: Cygwin1117921 -Node: MSYS1118744 -Node: VMS Installation1119244 -Node: VMS Compilation1120036 -Ref: VMS Compilation-Footnote-11121258 -Node: VMS Dynamic Extensions1121316 -Node: VMS Installation Details1123000 -Node: VMS Running1125252 -Node: VMS GNV1128088 -Node: VMS Old Gawk1128822 -Node: Bugs1129292 -Node: Other Versions1133175 -Node: Installation summary1139603 -Node: Notes1140659 -Node: Compatibility Mode1141524 -Node: Additions1142306 -Node: Accessing The Source1143231 -Node: Adding Code1144667 -Node: New Ports1150832 -Node: Derived Files1155314 -Ref: Derived Files-Footnote-11160789 -Ref: Derived Files-Footnote-21160823 -Ref: Derived Files-Footnote-31161419 -Node: Future Extensions1161533 -Node: Implementation Limitations1162139 -Node: Extension Design1163387 -Node: Old Extension Problems1164541 -Ref: Old Extension Problems-Footnote-11166058 -Node: Extension New Mechanism Goals1166115 -Ref: Extension New Mechanism Goals-Footnote-11169475 -Node: Extension Other Design Decisions1169664 -Node: Extension Future Growth1171772 -Node: Old Extension Mechanism1172608 -Node: Notes summary1174370 -Node: Basic Concepts1175556 -Node: Basic High Level1176237 -Ref: figure-general-flow1176509 -Ref: figure-process-flow1177108 -Ref: Basic High Level-Footnote-11180337 -Node: Basic Data Typing1180522 -Node: Glossary1183850 -Node: Copying1209008 -Node: GNU Free Documentation License1246564 -Node: Index1271700 +Ref: Read Timeout-Footnote-1265037 +Node: Command-line directories265095 +Node: Input Summary266000 +Node: Input Exercises269301 +Node: Printing270029 +Node: Print271806 +Node: Print Examples273263 +Node: Output Separators276042 +Node: OFMT278060 +Node: Printf279414 +Node: Basic Printf280199 +Node: Control Letters281769 +Node: Format Modifiers285752 +Node: Printf Examples291761 +Node: Redirection294247 +Node: Special FD301088 +Ref: Special FD-Footnote-1304248 +Node: Special Files304322 +Node: Other Inherited Files304939 +Node: Special Network305939 +Node: Special Caveats306801 +Node: Close Files And Pipes307752 +Ref: Close Files And Pipes-Footnote-1314934 +Ref: Close Files And Pipes-Footnote-2315082 +Node: Output Summary315232 +Node: Output Exercises316230 +Node: Expressions316910 +Node: Values318095 +Node: Constants318773 +Node: Scalar Constants319464 +Ref: Scalar Constants-Footnote-1320323 +Node: Nondecimal-numbers320573 +Node: Regexp Constants323591 +Node: Using Constant Regexps324116 +Node: Variables327259 +Node: Using Variables327914 +Node: Assignment Options329825 +Node: Conversion331700 +Node: Strings And Numbers332224 +Ref: Strings And Numbers-Footnote-1335289 +Node: Locale influences conversions335398 +Ref: table-locale-affects338145 +Node: All Operators338733 +Node: Arithmetic Ops339363 +Node: Concatenation341868 +Ref: Concatenation-Footnote-1344687 +Node: Assignment Ops344793 +Ref: table-assign-ops349772 +Node: Increment Ops351044 +Node: Truth Values and Conditions354482 +Node: Truth Values355567 +Node: Typing and Comparison356616 +Node: Variable Typing357426 +Node: Comparison Operators361079 +Ref: table-relational-ops361489 +Node: POSIX String Comparison364984 +Ref: POSIX String Comparison-Footnote-1366056 +Node: Boolean Ops366194 +Ref: Boolean Ops-Footnote-1370673 +Node: Conditional Exp370764 +Node: Function Calls372491 +Node: Precedence376371 +Node: Locales380032 +Node: Expressions Summary381664 +Node: Patterns and Actions384224 +Node: Pattern Overview385344 +Node: Regexp Patterns387023 +Node: Expression Patterns387566 +Node: Ranges391276 +Node: BEGIN/END394382 +Node: Using BEGIN/END395143 +Ref: Using BEGIN/END-Footnote-1397877 +Node: I/O And BEGIN/END397983 +Node: BEGINFILE/ENDFILE400297 +Node: Empty403198 +Node: Using Shell Variables403515 +Node: Action Overview405788 +Node: Statements408114 +Node: If Statement409962 +Node: While Statement411457 +Node: Do Statement413486 +Node: For Statement414630 +Node: Switch Statement417787 +Node: Break Statement420169 +Node: Continue Statement422210 +Node: Next Statement424037 +Node: Nextfile Statement426418 +Node: Exit Statement429048 +Node: Built-in Variables431451 +Node: User-modified432584 +Ref: User-modified-Footnote-1440265 +Node: Auto-set440327 +Ref: Auto-set-Footnote-1453362 +Ref: Auto-set-Footnote-2453567 +Node: ARGC and ARGV453623 +Node: Pattern Action Summary457841 +Node: Arrays460268 +Node: Array Basics461597 +Node: Array Intro462441 +Ref: figure-array-elements464405 +Ref: Array Intro-Footnote-1466931 +Node: Reference to Elements467059 +Node: Assigning Elements469511 +Node: Array Example470002 +Node: Scanning an Array471760 +Node: Controlling Scanning474776 +Ref: Controlling Scanning-Footnote-1479972 +Node: Numeric Array Subscripts480288 +Node: Uninitialized Subscripts482473 +Node: Delete484090 +Ref: Delete-Footnote-1486833 +Node: Multidimensional486890 +Node: Multiscanning489987 +Node: Arrays of Arrays491576 +Node: Arrays Summary496335 +Node: Functions498427 +Node: Built-in499326 +Node: Calling Built-in500404 +Node: Numeric Functions502395 +Ref: Numeric Functions-Footnote-1506412 +Ref: Numeric Functions-Footnote-2506769 +Ref: Numeric Functions-Footnote-3506817 +Node: String Functions507089 +Ref: String Functions-Footnote-1530564 +Ref: String Functions-Footnote-2530693 +Ref: String Functions-Footnote-3530941 +Node: Gory Details531028 +Ref: table-sub-escapes532809 +Ref: table-sub-proposed534329 +Ref: table-posix-sub535693 +Ref: table-gensub-escapes537229 +Ref: Gory Details-Footnote-1538061 +Node: I/O Functions538212 +Ref: I/O Functions-Footnote-1545430 +Node: Time Functions545577 +Ref: Time Functions-Footnote-1556065 +Ref: Time Functions-Footnote-2556133 +Ref: Time Functions-Footnote-3556291 +Ref: Time Functions-Footnote-4556402 +Ref: Time Functions-Footnote-5556514 +Ref: Time Functions-Footnote-6556741 +Node: Bitwise Functions557007 +Ref: table-bitwise-ops557569 +Ref: Bitwise Functions-Footnote-1561878 +Node: Type Functions562047 +Node: I18N Functions563198 +Node: User-defined564843 +Node: Definition Syntax565648 +Ref: Definition Syntax-Footnote-1571055 +Node: Function Example571126 +Ref: Function Example-Footnote-1574045 +Node: Function Caveats574067 +Node: Calling A Function574585 +Node: Variable Scope575543 +Node: Pass By Value/Reference578531 +Node: Return Statement582026 +Node: Dynamic Typing585007 +Node: Indirect Calls585936 +Ref: Indirect Calls-Footnote-1597238 +Node: Functions Summary597366 +Node: Library Functions600068 +Ref: Library Functions-Footnote-1603677 +Ref: Library Functions-Footnote-2603820 +Node: Library Names603991 +Ref: Library Names-Footnote-1607445 +Ref: Library Names-Footnote-2607668 +Node: General Functions607754 +Node: Strtonum Function608857 +Node: Assert Function611879 +Node: Round Function615203 +Node: Cliff Random Function616744 +Node: Ordinal Functions617760 +Ref: Ordinal Functions-Footnote-1620823 +Ref: Ordinal Functions-Footnote-2621075 +Node: Join Function621286 +Ref: Join Function-Footnote-1623055 +Node: Getlocaltime Function623255 +Node: Readfile Function626999 +Node: Shell Quoting628969 +Node: Data File Management630370 +Node: Filetrans Function631002 +Node: Rewind Function635058 +Node: File Checking636445 +Ref: File Checking-Footnote-1637777 +Node: Empty Files637978 +Node: Ignoring Assigns639957 +Node: Getopt Function641508 +Ref: Getopt Function-Footnote-1652970 +Node: Passwd Functions653170 +Ref: Passwd Functions-Footnote-1662007 +Node: Group Functions662095 +Ref: Group Functions-Footnote-1669989 +Node: Walking Arrays670202 +Node: Library Functions Summary671805 +Node: Library Exercises673206 +Node: Sample Programs674486 +Node: Running Examples675256 +Node: Clones675984 +Node: Cut Program677208 +Node: Egrep Program686927 +Ref: Egrep Program-Footnote-1694425 +Node: Id Program694535 +Node: Split Program698180 +Ref: Split Program-Footnote-1701628 +Node: Tee Program701756 +Node: Uniq Program704545 +Node: Wc Program711964 +Ref: Wc Program-Footnote-1716214 +Node: Miscellaneous Programs716308 +Node: Dupword Program717521 +Node: Alarm Program719552 +Node: Translate Program724356 +Ref: Translate Program-Footnote-1728921 +Node: Labels Program729191 +Ref: Labels Program-Footnote-1732542 +Node: Word Sorting732626 +Node: History Sorting736697 +Node: Extract Program738533 +Node: Simple Sed746058 +Node: Igawk Program749126 +Ref: Igawk Program-Footnote-1763450 +Ref: Igawk Program-Footnote-2763651 +Ref: Igawk Program-Footnote-3763773 +Node: Anagram Program763888 +Node: Signature Program766945 +Node: Programs Summary768192 +Node: Programs Exercises769385 +Ref: Programs Exercises-Footnote-1773516 +Node: Advanced Features773607 +Node: Nondecimal Data775555 +Node: Array Sorting777145 +Node: Controlling Array Traversal777842 +Ref: Controlling Array Traversal-Footnote-1786175 +Node: Array Sorting Functions786293 +Ref: Array Sorting Functions-Footnote-1790182 +Node: Two-way I/O790378 +Ref: Two-way I/O-Footnote-1795323 +Ref: Two-way I/O-Footnote-2795509 +Node: TCP/IP Networking795591 +Node: Profiling798464 +Node: Advanced Features Summary806011 +Node: Internationalization807944 +Node: I18N and L10N809424 +Node: Explaining gettext810110 +Ref: Explaining gettext-Footnote-1815135 +Ref: Explaining gettext-Footnote-2815319 +Node: Programmer i18n815484 +Ref: Programmer i18n-Footnote-1820350 +Node: Translator i18n820399 +Node: String Extraction821193 +Ref: String Extraction-Footnote-1822324 +Node: Printf Ordering822410 +Ref: Printf Ordering-Footnote-1825196 +Node: I18N Portability825260 +Ref: I18N Portability-Footnote-1827715 +Node: I18N Example827778 +Ref: I18N Example-Footnote-1830581 +Node: Gawk I18N830653 +Node: I18N Summary831291 +Node: Debugger832630 +Node: Debugging833652 +Node: Debugging Concepts834093 +Node: Debugging Terms835946 +Node: Awk Debugging838518 +Node: Sample Debugging Session839412 +Node: Debugger Invocation839932 +Node: Finding The Bug841316 +Node: List of Debugger Commands847791 +Node: Breakpoint Control849124 +Node: Debugger Execution Control852820 +Node: Viewing And Changing Data856184 +Node: Execution Stack859562 +Node: Debugger Info861199 +Node: Miscellaneous Debugger Commands865216 +Node: Readline Support870245 +Node: Limitations871137 +Node: Debugging Summary873251 +Node: Arbitrary Precision Arithmetic874419 +Node: Computer Arithmetic875835 +Ref: table-numeric-ranges879433 +Ref: Computer Arithmetic-Footnote-1880292 +Node: Math Definitions880349 +Ref: table-ieee-formats883637 +Ref: Math Definitions-Footnote-1884241 +Node: MPFR features884346 +Node: FP Math Caution886017 +Ref: FP Math Caution-Footnote-1887067 +Node: Inexactness of computations887436 +Node: Inexact representation888395 +Node: Comparing FP Values889752 +Node: Errors accumulate890834 +Node: Getting Accuracy892267 +Node: Try To Round894929 +Node: Setting precision895828 +Ref: table-predefined-precision-strings896512 +Node: Setting the rounding mode898301 +Ref: table-gawk-rounding-modes898665 +Ref: Setting the rounding mode-Footnote-1902120 +Node: Arbitrary Precision Integers902299 +Ref: Arbitrary Precision Integers-Footnote-1905285 +Node: POSIX Floating Point Problems905434 +Ref: POSIX Floating Point Problems-Footnote-1909307 +Node: Floating point summary909345 +Node: Dynamic Extensions911539 +Node: Extension Intro913091 +Node: Plugin License914357 +Node: Extension Mechanism Outline915154 +Ref: figure-load-extension915582 +Ref: figure-register-new-function917062 +Ref: figure-call-new-function918066 +Node: Extension API Description920052 +Node: Extension API Functions Introduction921502 +Node: General Data Types926326 +Ref: General Data Types-Footnote-1932065 +Node: Memory Allocation Functions932364 +Ref: Memory Allocation Functions-Footnote-1935203 +Node: Constructor Functions935299 +Node: Registration Functions937033 +Node: Extension Functions937718 +Node: Exit Callback Functions940015 +Node: Extension Version String941263 +Node: Input Parsers941928 +Node: Output Wrappers951807 +Node: Two-way processors956322 +Node: Printing Messages958526 +Ref: Printing Messages-Footnote-1959602 +Node: Updating `ERRNO'959754 +Node: Requesting Values960494 +Ref: table-value-types-returned961222 +Node: Accessing Parameters962179 +Node: Symbol Table Access963410 +Node: Symbol table by name963924 +Node: Symbol table by cookie965905 +Ref: Symbol table by cookie-Footnote-1970049 +Node: Cached values970112 +Ref: Cached values-Footnote-1973611 +Node: Array Manipulation973702 +Ref: Array Manipulation-Footnote-1974800 +Node: Array Data Types974837 +Ref: Array Data Types-Footnote-1977492 +Node: Array Functions977584 +Node: Flattening Arrays981438 +Node: Creating Arrays988330 +Node: Extension API Variables993101 +Node: Extension Versioning993737 +Node: Extension API Informational Variables995638 +Node: Extension API Boilerplate996703 +Node: Finding Extensions1000512 +Node: Extension Example1001072 +Node: Internal File Description1001844 +Node: Internal File Ops1005911 +Ref: Internal File Ops-Footnote-11017581 +Node: Using Internal File Ops1017721 +Ref: Using Internal File Ops-Footnote-11020104 +Node: Extension Samples1020377 +Node: Extension Sample File Functions1021903 +Node: Extension Sample Fnmatch1029541 +Node: Extension Sample Fork1031032 +Node: Extension Sample Inplace1032247 +Node: Extension Sample Ord1033922 +Node: Extension Sample Readdir1034758 +Ref: table-readdir-file-types1035634 +Node: Extension Sample Revout1036445 +Node: Extension Sample Rev2way1037035 +Node: Extension Sample Read write array1037775 +Node: Extension Sample Readfile1039715 +Node: Extension Sample Time1040810 +Node: Extension Sample API Tests1042159 +Node: gawkextlib1042650 +Node: Extension summary1045308 +Node: Extension Exercises1048997 +Node: Language History1049719 +Node: V7/SVR3.11051375 +Node: SVR41053556 +Node: POSIX1055001 +Node: BTL1056390 +Node: POSIX/GNU1057124 +Node: Feature History1062688 +Node: Common Extensions1075786 +Node: Ranges and Locales1077110 +Ref: Ranges and Locales-Footnote-11081728 +Ref: Ranges and Locales-Footnote-21081755 +Ref: Ranges and Locales-Footnote-31081989 +Node: Contributors1082210 +Node: History summary1087751 +Node: Installation1089121 +Node: Gawk Distribution1090067 +Node: Getting1090551 +Node: Extracting1091374 +Node: Distribution contents1093009 +Node: Unix Installation1098726 +Node: Quick Installation1099343 +Node: Additional Configuration Options1101767 +Node: Configuration Philosophy1103505 +Node: Non-Unix Installation1105874 +Node: PC Installation1106332 +Node: PC Binary Installation1107651 +Node: PC Compiling1109499 +Ref: PC Compiling-Footnote-11112520 +Node: PC Testing1112629 +Node: PC Using1113805 +Node: Cygwin1117920 +Node: MSYS1118743 +Node: VMS Installation1119243 +Node: VMS Compilation1120035 +Ref: VMS Compilation-Footnote-11121257 +Node: VMS Dynamic Extensions1121315 +Node: VMS Installation Details1122999 +Node: VMS Running1125251 +Node: VMS GNV1128087 +Node: VMS Old Gawk1128821 +Node: Bugs1129291 +Node: Other Versions1133174 +Node: Installation summary1139602 +Node: Notes1140658 +Node: Compatibility Mode1141523 +Node: Additions1142305 +Node: Accessing The Source1143230 +Node: Adding Code1144666 +Node: New Ports1150831 +Node: Derived Files1155313 +Ref: Derived Files-Footnote-11160788 +Ref: Derived Files-Footnote-21160822 +Ref: Derived Files-Footnote-31161418 +Node: Future Extensions1161532 +Node: Implementation Limitations1162138 +Node: Extension Design1163386 +Node: Old Extension Problems1164540 +Ref: Old Extension Problems-Footnote-11166057 +Node: Extension New Mechanism Goals1166114 +Ref: Extension New Mechanism Goals-Footnote-11169474 +Node: Extension Other Design Decisions1169663 +Node: Extension Future Growth1171771 +Node: Old Extension Mechanism1172607 +Node: Notes summary1174369 +Node: Basic Concepts1175555 +Node: Basic High Level1176236 +Ref: figure-general-flow1176508 +Ref: figure-process-flow1177107 +Ref: Basic High Level-Footnote-11180336 +Node: Basic Data Typing1180521 +Node: Glossary1183849 +Node: Copying1209007 +Node: GNU Free Documentation License1246563 +Node: Index1271699  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index c0c672f1..afb94551 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -8754,7 +8754,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/gawktexi.in b/doc/gawktexi.in index 5cff1e5f..b346e219 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -8355,7 +8355,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 -- cgit v1.2.3