diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | awkgram.c | 90 | ||||
-rw-r--r-- | awkgram.y | 90 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 990 | ||||
-rw-r--r-- | doc/gawk.texi | 11 | ||||
-rw-r--r-- | doc/gawktexi.in | 11 |
7 files changed, 630 insertions, 573 deletions
@@ -1,3 +1,9 @@ +2014-07-03 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y (nextc): Add bool check_for_bad parameter to check + for bad characters in the source program. + (yylex): Adjust calls. + 2014-06-24 Arnold D. Robbins <arnold@skeeve.com> * main.c (main): The --pretty-print option no longer runs the @@ -5135,7 +5135,7 @@ tokexpand() #if MBS_SUPPORT static int -nextc(void) +nextc(bool check_for_bad) { if (gawk_mb_cur_max > 1) { again: @@ -5186,14 +5186,19 @@ again: 0 : work_ring_idx + 1; cur_char_ring[work_ring_idx] = 0; } + if (check_for_bad && iscntrl(*lexptr) && ! isspace(*lexptr)) + fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), *lexptr); return (int) (unsigned char) *lexptr++; } else { do { if (lexeof) return END_FILE; - if (lexptr && lexptr < lexend) - return ((int) (unsigned char) *lexptr++); + if (lexptr && lexptr < lexend) { + if (check_for_bad && iscntrl(*lexptr) && ! isspace(*lexptr)) + fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), *lexptr); + return ((int) (unsigned char) *lexptr++); + } } while (get_src_buf()); return END_SRC; } @@ -5202,13 +5207,16 @@ again: #else /* MBS_SUPPORT */ int -nextc() +nextc(bool check_for_bad) { do { if (lexeof) return END_FILE; - if (lexptr && lexptr < lexend) + if (lexptr && lexptr < lexend) { + if (check_for_bad && iscntrl(*lexptr) && ! isspace(*lexptr)) + fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), *lexptr); return ((int) (unsigned char) *lexptr++); + } } while (get_src_buf()); return END_SRC; } @@ -5237,13 +5245,13 @@ allow_newline(void) int c; for (;;) { - c = nextc(); + c = nextc(true); if (c == END_FILE) { pushback(); break; } if (c == '#') { - while ((c = nextc()) != '\n' && c != END_FILE) + while ((c = nextc(false)) != '\n' && c != END_FILE) continue; if (c == END_FILE) { pushback(); @@ -5315,7 +5323,7 @@ yylex(void) if (lasttok == LEX_EOF) /* error earlier in current source, must give up !! */ return 0; - c = nextc(); + c = nextc(true); if (c == END_SRC) return 0; if (c == END_FILE) @@ -5357,12 +5365,12 @@ yylex(void) want_regexp = false; tok = tokstart; for (;;) { - c = nextc(); + c = nextc(true); if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) { case '[': /* one day check for `.' and `=' too */ - if (nextc() == ':' || in_brack == 0) + if (nextc(true) == ':' || in_brack == 0) in_brack++; pushback(); break; @@ -5376,7 +5384,7 @@ yylex(void) in_brack--; break; case '\\': - if ((c = nextc()) == END_FILE) { + if ((c = nextc(true)) == END_FILE) { pushback(); yyerror(_("unterminated regexp ends with `\\' at end of file")); goto end_regexp; /* kludge */ @@ -5396,7 +5404,7 @@ end_regexp: yylval = GET_INSTRUCTION(Op_token); yylval->lextok = estrdup(tokstart, tok - tokstart); if (do_lint) { - int peek = nextc(); + int peek = nextc(true); pushback(); if (peek == 'i' || peek == 's') { @@ -5426,7 +5434,7 @@ end_regexp: retry: /* skipping \r is a hack, but windows is just too pervasive. sigh. */ - while ((c = nextc()) == ' ' || c == '\t' || c == '\r') + while ((c = nextc(true)) == ' ' || c == '\t' || c == '\r') continue; lexeme = lexptr ? lexptr - 1 : lexptr; @@ -5448,7 +5456,7 @@ retry: return lasttok = NEWLINE; case '#': /* it's a comment */ - while ((c = nextc()) != '\n') { + while ((c = nextc(false)) != '\n') { if (c == END_FILE) return lasttok = NEWLINE_EOF; } @@ -5468,7 +5476,7 @@ retry: */ if (! do_traditional) { /* strip trailing white-space and/or comment */ - while ((c = nextc()) == ' ' || c == '\t' || c == '\r') + while ((c = nextc(true)) == ' ' || c == '\t' || c == '\r') continue; if (c == '#') { static bool warned = false; @@ -5478,16 +5486,16 @@ retry: lintwarn( _("use of `\\ #...' line continuation is not portable")); } - while ((c = nextc()) != '\n') + while ((c = nextc(false)) != '\n') if (c == END_FILE) break; } pushback(); } #endif /* RELAXED_CONTINUATION */ - c = nextc(); + c = nextc(true); if (c == '\r') /* allow MS-DOS files. bleah */ - c = nextc(); + c = nextc(true); if (c == '\n') { sourceline++; goto retry; @@ -5526,7 +5534,7 @@ retry: case '[': return lasttok = c; case ']': - c = nextc(); + c = nextc(true); pushback(); if (c == '[') { yylval = GET_INSTRUCTION(Op_sub_array); @@ -5538,7 +5546,7 @@ retry: return ']'; case '*': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_assign_times); return lasttok = ASSIGNOP; } else if (do_posix) { @@ -5549,7 +5557,7 @@ retry: /* make ** and **= aliases for ^ and ^= */ static bool did_warn_op = false, did_warn_assgn = false; - if (nextc() == '=') { + if (nextc(true) == '=') { if (! did_warn_assgn) { did_warn_assgn = true; if (do_lint) @@ -5577,7 +5585,7 @@ retry: return lasttok = '*'; case '/': - if (nextc() == '=') { + if (nextc(true) == '=') { pushback(); return lasttok = SLASH_BEFORE_EQUAL; } @@ -5586,7 +5594,7 @@ retry: return lasttok = '/'; case '%': - if (nextc() == '=') { + if (nextc(true) == '=') { yylval = GET_INSTRUCTION(Op_assign_mod); return lasttok = ASSIGNOP; } @@ -5598,7 +5606,7 @@ retry: { static bool did_warn_op = false, did_warn_assgn = false; - if (nextc() == '=') { + if (nextc(true) == '=') { if (do_lint_old && ! did_warn_assgn) { did_warn_assgn = true; warning(_("operator `^=' is not supported in old awk")); @@ -5616,7 +5624,7 @@ retry: } case '+': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_assign_plus); return lasttok = ASSIGNOP; } @@ -5629,7 +5637,7 @@ retry: return lasttok = '+'; case '!': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_notequal); return lasttok = RELOP; } @@ -5642,7 +5650,7 @@ retry: return lasttok = '!'; case '<': - if (nextc() == '=') { + if (nextc(true) == '=') { yylval = GET_INSTRUCTION(Op_leq); return lasttok = RELOP; } @@ -5651,7 +5659,7 @@ retry: return lasttok = '<'; case '=': - if (nextc() == '=') { + if (nextc(true) == '=') { yylval = GET_INSTRUCTION(Op_equal); return lasttok = RELOP; } @@ -5660,7 +5668,7 @@ retry: return lasttok = ASSIGN; case '>': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_geq); return lasttok = RELOP; } else if (c == '>') { @@ -5699,7 +5707,7 @@ retry: case '"': string: esc_seen = false; - while ((c = nextc()) != '"') { + while ((c = nextc(true)) != '"') { if (c == '\n') { pushback(); yyerror(_("unterminated string")); @@ -5707,7 +5715,7 @@ retry: } if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) && c == '\\') { - c = nextc(); + c = nextc(true); if (c == '\n') { sourceline++; continue; @@ -5741,7 +5749,7 @@ retry: return lasttok = YSTRING; case '-': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_assign_minus); return lasttok = ASSIGNOP; } @@ -5754,7 +5762,7 @@ retry: return lasttok = '-'; case '.': - c = nextc(); + c = nextc(true); pushback(); if (! isdigit(c)) return lasttok = '.'; @@ -5782,7 +5790,7 @@ retry: if (do_traditional) goto done; if (tok == tokstart + 2) { - int peek = nextc(); + int peek = nextc(true); if (isxdigit(peek)) { inhex = true; @@ -5810,8 +5818,8 @@ retry: break; } seen_e = true; - if ((c = nextc()) == '-' || c == '+') { - int c2 = nextc(); + if ((c = nextc(true)) == '-' || c == '+') { + int c2 = nextc(true); if (isdigit(c2)) { tokadd(c); @@ -5858,7 +5866,7 @@ retry: } if (gotnumber) break; - c = nextc(); + c = nextc(true); } pushback(); @@ -5907,7 +5915,7 @@ retry: return lasttok = YNUMBER; case '&': - if ((c = nextc()) == '&') { + if ((c = nextc(true)) == '&') { yylval = GET_INSTRUCTION(Op_and); allow_newline(); return lasttok = LEX_AND; @@ -5917,7 +5925,7 @@ retry: return lasttok = '&'; case '|': - if ((c = nextc()) == '|') { + if ((c = nextc(true)) == '|') { yylval = GET_INSTRUCTION(Op_or); allow_newline(); return lasttok = LEX_OR; @@ -5958,7 +5966,7 @@ retry: * occasions where the interactions are funny. */ if (! do_traditional && c == '_' && lasttok != '$') { - if ((c = nextc()) == '"') { + if ((c = nextc(true)) == '"') { intlstr = true; goto string; } @@ -5970,7 +5978,7 @@ retry: tok = tokstart; while (c != END_FILE && is_identchar(c)) { tokadd(c); - c = nextc(); + c = nextc(true); } tokadd('\0'); pushback(); @@ -2796,7 +2796,7 @@ tokexpand() #if MBS_SUPPORT static int -nextc(void) +nextc(bool check_for_bad) { if (gawk_mb_cur_max > 1) { again: @@ -2847,14 +2847,19 @@ again: 0 : work_ring_idx + 1; cur_char_ring[work_ring_idx] = 0; } + if (check_for_bad && iscntrl(*lexptr) && ! isspace(*lexptr)) + fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), *lexptr); return (int) (unsigned char) *lexptr++; } else { do { if (lexeof) return END_FILE; - if (lexptr && lexptr < lexend) - return ((int) (unsigned char) *lexptr++); + if (lexptr && lexptr < lexend) { + if (check_for_bad && iscntrl(*lexptr) && ! isspace(*lexptr)) + fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), *lexptr); + return ((int) (unsigned char) *lexptr++); + } } while (get_src_buf()); return END_SRC; } @@ -2863,13 +2868,16 @@ again: #else /* MBS_SUPPORT */ int -nextc() +nextc(bool check_for_bad) { do { if (lexeof) return END_FILE; - if (lexptr && lexptr < lexend) + if (lexptr && lexptr < lexend) { + if (check_for_bad && iscntrl(*lexptr) && ! isspace(*lexptr)) + fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), *lexptr); return ((int) (unsigned char) *lexptr++); + } } while (get_src_buf()); return END_SRC; } @@ -2898,13 +2906,13 @@ allow_newline(void) int c; for (;;) { - c = nextc(); + c = nextc(true); if (c == END_FILE) { pushback(); break; } if (c == '#') { - while ((c = nextc()) != '\n' && c != END_FILE) + while ((c = nextc(false)) != '\n' && c != END_FILE) continue; if (c == END_FILE) { pushback(); @@ -2976,7 +2984,7 @@ yylex(void) if (lasttok == LEX_EOF) /* error earlier in current source, must give up !! */ return 0; - c = nextc(); + c = nextc(true); if (c == END_SRC) return 0; if (c == END_FILE) @@ -3018,12 +3026,12 @@ yylex(void) want_regexp = false; tok = tokstart; for (;;) { - c = nextc(); + c = nextc(true); if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) { case '[': /* one day check for `.' and `=' too */ - if (nextc() == ':' || in_brack == 0) + if (nextc(true) == ':' || in_brack == 0) in_brack++; pushback(); break; @@ -3037,7 +3045,7 @@ yylex(void) in_brack--; break; case '\\': - if ((c = nextc()) == END_FILE) { + if ((c = nextc(true)) == END_FILE) { pushback(); yyerror(_("unterminated regexp ends with `\\' at end of file")); goto end_regexp; /* kludge */ @@ -3057,7 +3065,7 @@ end_regexp: yylval = GET_INSTRUCTION(Op_token); yylval->lextok = estrdup(tokstart, tok - tokstart); if (do_lint) { - int peek = nextc(); + int peek = nextc(true); pushback(); if (peek == 'i' || peek == 's') { @@ -3087,7 +3095,7 @@ end_regexp: retry: /* skipping \r is a hack, but windows is just too pervasive. sigh. */ - while ((c = nextc()) == ' ' || c == '\t' || c == '\r') + while ((c = nextc(true)) == ' ' || c == '\t' || c == '\r') continue; lexeme = lexptr ? lexptr - 1 : lexptr; @@ -3109,7 +3117,7 @@ retry: return lasttok = NEWLINE; case '#': /* it's a comment */ - while ((c = nextc()) != '\n') { + while ((c = nextc(false)) != '\n') { if (c == END_FILE) return lasttok = NEWLINE_EOF; } @@ -3129,7 +3137,7 @@ retry: */ if (! do_traditional) { /* strip trailing white-space and/or comment */ - while ((c = nextc()) == ' ' || c == '\t' || c == '\r') + while ((c = nextc(true)) == ' ' || c == '\t' || c == '\r') continue; if (c == '#') { static bool warned = false; @@ -3139,16 +3147,16 @@ retry: lintwarn( _("use of `\\ #...' line continuation is not portable")); } - while ((c = nextc()) != '\n') + while ((c = nextc(false)) != '\n') if (c == END_FILE) break; } pushback(); } #endif /* RELAXED_CONTINUATION */ - c = nextc(); + c = nextc(true); if (c == '\r') /* allow MS-DOS files. bleah */ - c = nextc(); + c = nextc(true); if (c == '\n') { sourceline++; goto retry; @@ -3187,7 +3195,7 @@ retry: case '[': return lasttok = c; case ']': - c = nextc(); + c = nextc(true); pushback(); if (c == '[') { yylval = GET_INSTRUCTION(Op_sub_array); @@ -3199,7 +3207,7 @@ retry: return ']'; case '*': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_assign_times); return lasttok = ASSIGNOP; } else if (do_posix) { @@ -3210,7 +3218,7 @@ retry: /* make ** and **= aliases for ^ and ^= */ static bool did_warn_op = false, did_warn_assgn = false; - if (nextc() == '=') { + if (nextc(true) == '=') { if (! did_warn_assgn) { did_warn_assgn = true; if (do_lint) @@ -3238,7 +3246,7 @@ retry: return lasttok = '*'; case '/': - if (nextc() == '=') { + if (nextc(true) == '=') { pushback(); return lasttok = SLASH_BEFORE_EQUAL; } @@ -3247,7 +3255,7 @@ retry: return lasttok = '/'; case '%': - if (nextc() == '=') { + if (nextc(true) == '=') { yylval = GET_INSTRUCTION(Op_assign_mod); return lasttok = ASSIGNOP; } @@ -3259,7 +3267,7 @@ retry: { static bool did_warn_op = false, did_warn_assgn = false; - if (nextc() == '=') { + if (nextc(true) == '=') { if (do_lint_old && ! did_warn_assgn) { did_warn_assgn = true; warning(_("operator `^=' is not supported in old awk")); @@ -3277,7 +3285,7 @@ retry: } case '+': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_assign_plus); return lasttok = ASSIGNOP; } @@ -3290,7 +3298,7 @@ retry: return lasttok = '+'; case '!': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_notequal); return lasttok = RELOP; } @@ -3303,7 +3311,7 @@ retry: return lasttok = '!'; case '<': - if (nextc() == '=') { + if (nextc(true) == '=') { yylval = GET_INSTRUCTION(Op_leq); return lasttok = RELOP; } @@ -3312,7 +3320,7 @@ retry: return lasttok = '<'; case '=': - if (nextc() == '=') { + if (nextc(true) == '=') { yylval = GET_INSTRUCTION(Op_equal); return lasttok = RELOP; } @@ -3321,7 +3329,7 @@ retry: return lasttok = ASSIGN; case '>': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_geq); return lasttok = RELOP; } else if (c == '>') { @@ -3360,7 +3368,7 @@ retry: case '"': string: esc_seen = false; - while ((c = nextc()) != '"') { + while ((c = nextc(true)) != '"') { if (c == '\n') { pushback(); yyerror(_("unterminated string")); @@ -3368,7 +3376,7 @@ retry: } if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) && c == '\\') { - c = nextc(); + c = nextc(true); if (c == '\n') { sourceline++; continue; @@ -3402,7 +3410,7 @@ retry: return lasttok = YSTRING; case '-': - if ((c = nextc()) == '=') { + if ((c = nextc(true)) == '=') { yylval = GET_INSTRUCTION(Op_assign_minus); return lasttok = ASSIGNOP; } @@ -3415,7 +3423,7 @@ retry: return lasttok = '-'; case '.': - c = nextc(); + c = nextc(true); pushback(); if (! isdigit(c)) return lasttok = '.'; @@ -3443,7 +3451,7 @@ retry: if (do_traditional) goto done; if (tok == tokstart + 2) { - int peek = nextc(); + int peek = nextc(true); if (isxdigit(peek)) { inhex = true; @@ -3471,8 +3479,8 @@ retry: break; } seen_e = true; - if ((c = nextc()) == '-' || c == '+') { - int c2 = nextc(); + if ((c = nextc(true)) == '-' || c == '+') { + int c2 = nextc(true); if (isdigit(c2)) { tokadd(c); @@ -3519,7 +3527,7 @@ retry: } if (gotnumber) break; - c = nextc(); + c = nextc(true); } pushback(); @@ -3568,7 +3576,7 @@ retry: return lasttok = YNUMBER; case '&': - if ((c = nextc()) == '&') { + if ((c = nextc(true)) == '&') { yylval = GET_INSTRUCTION(Op_and); allow_newline(); return lasttok = LEX_AND; @@ -3578,7 +3586,7 @@ retry: return lasttok = '&'; case '|': - if ((c = nextc()) == '|') { + if ((c = nextc(true)) == '|') { yylval = GET_INSTRUCTION(Op_or); allow_newline(); return lasttok = LEX_OR; @@ -3619,7 +3627,7 @@ retry: * occasions where the interactions are funny. */ if (! do_traditional && c == '_' && lasttok != '$') { - if ((c = nextc()) == '"') { + if ((c = nextc(true)) == '"') { intlstr = true; goto string; } @@ -3631,7 +3639,7 @@ retry: tok = tokstart; while (c != END_FILE && is_identchar(c)) { tokadd(c); - c = nextc(); + c = nextc(true); } tokadd('\0'); pushback(); diff --git a/doc/ChangeLog b/doc/ChangeLog index 6f50befe..51704349 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2014-07-04 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Bracket Expressions): Add a note about how to + match ASCII characters. Thanks to Hermann Peifer. + 2014-06-25 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Update permissions on copyright page per diff --git a/doc/gawk.info b/doc/gawk.info index 34a83bef..8326cf82 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3663,6 +3663,14 @@ set had other alphabetic characters in it, this would not match them. With the POSIX character classes, you can write `/[[:alnum:]]/' to match the alphabetic and numeric characters in your character set. + Some utilities that match regular expressions provide a non-standard +`[:ascii:]' character class; `awk' does not. However, you can simulate +such a construct using `[\x00-\x7F]'. This matches all values +numerically between zero and 127, which is the defined range of the +ASCII character set. Use a complemented character list +(`[^\x00-\x7F]') to match any single-byte characters that are not in +the ASCII range. + Two additional special sequences can appear in bracket expressions. These apply to non-ASCII character sets, which can have single symbols (called "collating elements") that are represented with more than one @@ -31477,13 +31485,13 @@ Index * bracket expressions, character classes: Bracket Expressions. (line 30) * bracket expressions, collating elements: Bracket Expressions. - (line 69) + (line 77) * bracket expressions, collating symbols: Bracket Expressions. - (line 76) + (line 84) * bracket expressions, complemented: Regexp Operators. (line 64) * bracket expressions, equivalence classes: Bracket Expressions. - (line 82) -* bracket expressions, non-ASCII: Bracket Expressions. (line 69) + (line 90) +* bracket expressions, non-ASCII: Bracket Expressions. (line 77) * bracket expressions, range expressions: Bracket Expressions. (line 6) * break debugger command: Breakpoint Control. (line 11) @@ -31601,8 +31609,8 @@ Index * Close, Diane <1>: Contributors. (line 20) * Close, Diane: Manual History. (line 41) * Collado, Manuel: Acknowledgments. (line 60) -* collating elements: Bracket Expressions. (line 69) -* collating symbols: Bracket Expressions. (line 76) +* collating elements: Bracket Expressions. (line 77) +* collating symbols: Bracket Expressions. (line 84) * Colombo, Antonio <1>: Contributors. (line 137) * Colombo, Antonio: Acknowledgments. (line 60) * columns, aligning: Print Examples. (line 70) @@ -32394,7 +32402,7 @@ Index * gawk, bitwise operations in: Bitwise Functions. (line 39) * gawk, break statement in: Break Statement. (line 51) * gawk, built-in variables and: Built-in Variables. (line 14) -* gawk, character classes and: Bracket Expressions. (line 90) +* gawk, character classes and: Bracket Expressions. (line 98) * gawk, coding style in: Adding Code. (line 39) * gawk, command-line options, and regular expressions: GNU Regexp Operators. (line 70) @@ -32670,7 +32678,7 @@ Index (line 13) * internationalization, localization: User-modified. (line 152) * internationalization, localization, character classes: Bracket Expressions. - (line 90) + (line 98) * internationalization, localization, gawk and: Internationalization. (line 13) * internationalization, localization, locale categories: Explaining gettext. @@ -34009,488 +34017,488 @@ Ref: Regexp Operators-Footnote-1165183 Ref: Regexp Operators-Footnote-2165330 Node: Bracket Expressions165428 Ref: table-char-classes167318 -Node: GNU Regexp Operators169841 -Node: Case-sensitivity173564 -Ref: Case-sensitivity-Footnote-1176456 -Ref: Case-sensitivity-Footnote-2176691 -Node: Leftmost Longest176799 -Node: Computed Regexps178000 -Node: Regexp Summary181372 -Node: Reading Files182843 -Node: Records184935 -Node: awk split records185678 -Node: gawk split records190536 -Ref: gawk split records-Footnote-1195057 -Node: Fields195094 -Ref: Fields-Footnote-1198058 -Node: Nonconstant Fields198144 -Ref: Nonconstant Fields-Footnote-1200374 -Node: Changing Fields200576 -Node: Field Separators206530 -Node: Default Field Splitting209232 -Node: Regexp Field Splitting210349 -Node: Single Character Fields213690 -Node: Command Line Field Separator214749 -Node: Full Line Fields218091 -Ref: Full Line Fields-Footnote-1218599 -Node: Field Splitting Summary218645 -Ref: Field Splitting Summary-Footnote-1221744 -Node: Constant Size221845 -Node: Splitting By Content226452 -Ref: Splitting By Content-Footnote-1230202 -Node: Multiple Line230242 -Ref: Multiple Line-Footnote-1236098 -Node: Getline236277 -Node: Plain Getline238493 -Node: Getline/Variable240588 -Node: Getline/File241735 -Node: Getline/Variable/File243119 -Ref: Getline/Variable/File-Footnote-1244718 -Node: Getline/Pipe244805 -Node: Getline/Variable/Pipe247504 -Node: Getline/Coprocess248611 -Node: Getline/Variable/Coprocess249863 -Node: Getline Notes250600 -Node: Getline Summary253404 -Ref: table-getline-variants253812 -Node: Read Timeout254724 -Ref: Read Timeout-Footnote-1258551 -Node: Command line directories258609 -Node: Input Summary259513 -Node: Input Exercises262650 -Node: Printing263383 -Node: Print265105 -Node: Print Examples266446 -Node: Output Separators269225 -Node: OFMT271241 -Node: Printf272599 -Node: Basic Printf273505 -Node: Control Letters275044 -Node: Format Modifiers278896 -Node: Printf Examples284923 -Node: Redirection287387 -Node: Special Files294359 -Node: Special FD294890 -Ref: Special FD-Footnote-1298514 -Node: Special Network298588 -Node: Special Caveats299438 -Node: Close Files And Pipes300234 -Ref: Close Files And Pipes-Footnote-1307395 -Ref: Close Files And Pipes-Footnote-2307543 -Node: Output Summary307693 -Node: Output exercises308690 -Node: Expressions309370 -Node: Values310555 -Node: Constants311231 -Node: Scalar Constants311911 -Ref: Scalar Constants-Footnote-1312770 -Node: Nondecimal-numbers313020 -Node: Regexp Constants316020 -Node: Using Constant Regexps316495 -Node: Variables319565 -Node: Using Variables320220 -Node: Assignment Options321944 -Node: Conversion323819 -Node: Strings And Numbers324343 -Ref: Strings And Numbers-Footnote-1327405 -Node: Locale influences conversions327514 -Ref: table-locale-affects330231 -Node: All Operators330819 -Node: Arithmetic Ops331449 -Node: Concatenation333954 -Ref: Concatenation-Footnote-1336750 -Node: Assignment Ops336870 -Ref: table-assign-ops341853 -Node: Increment Ops343170 -Node: Truth Values and Conditions346608 -Node: Truth Values347691 -Node: Typing and Comparison348740 -Node: Variable Typing349533 -Ref: Variable Typing-Footnote-1353433 -Node: Comparison Operators353555 -Ref: table-relational-ops353965 -Node: POSIX String Comparison357515 -Ref: POSIX String Comparison-Footnote-1358599 -Node: Boolean Ops358737 -Ref: Boolean Ops-Footnote-1362807 -Node: Conditional Exp362898 -Node: Function Calls364625 -Node: Precedence368505 -Node: Locales372174 -Node: Expressions Summary373805 -Node: Patterns and Actions376346 -Node: Pattern Overview377462 -Node: Regexp Patterns379139 -Node: Expression Patterns379682 -Node: Ranges383463 -Node: BEGIN/END386569 -Node: Using BEGIN/END387331 -Ref: Using BEGIN/END-Footnote-1390067 -Node: I/O And BEGIN/END390173 -Node: BEGINFILE/ENDFILE392458 -Node: Empty395389 -Node: Using Shell Variables395706 -Node: Action Overview397989 -Node: Statements400316 -Node: If Statement402164 -Node: While Statement403662 -Node: Do Statement405706 -Node: For Statement406862 -Node: Switch Statement410014 -Node: Break Statement412117 -Node: Continue Statement414172 -Node: Next Statement415965 -Node: Nextfile Statement418355 -Node: Exit Statement421010 -Node: Built-in Variables423414 -Node: User-modified424541 -Ref: User-modified-Footnote-1432230 -Node: Auto-set432292 -Ref: Auto-set-Footnote-1445211 -Ref: Auto-set-Footnote-2445416 -Node: ARGC and ARGV445472 -Node: Pattern Action Summary449326 -Node: Arrays451549 -Node: Array Basics453098 -Node: Array Intro453924 -Ref: figure-array-elements455897 -Node: Reference to Elements458304 -Node: Assigning Elements460577 -Node: Array Example461068 -Node: Scanning an Array462800 -Node: Controlling Scanning465815 -Ref: Controlling Scanning-Footnote-1470988 -Node: Delete471304 -Ref: Delete-Footnote-1474069 -Node: Numeric Array Subscripts474126 -Node: Uninitialized Subscripts476309 -Node: Multidimensional477934 -Node: Multiscanning481027 -Node: Arrays of Arrays482616 -Node: Arrays Summary487279 -Node: Functions489384 -Node: Built-in490257 -Node: Calling Built-in491335 -Node: Numeric Functions493323 -Ref: Numeric Functions-Footnote-1497157 -Ref: Numeric Functions-Footnote-2497514 -Ref: Numeric Functions-Footnote-3497562 -Node: String Functions497831 -Ref: String Functions-Footnote-1520842 -Ref: String Functions-Footnote-2520971 -Ref: String Functions-Footnote-3521219 -Node: Gory Details521306 -Ref: table-sub-escapes522975 -Ref: table-sub-posix-92524329 -Ref: table-sub-proposed525680 -Ref: table-posix-sub527034 -Ref: table-gensub-escapes528579 -Ref: Gory Details-Footnote-1529755 -Ref: Gory Details-Footnote-2529806 -Node: I/O Functions529957 -Ref: I/O Functions-Footnote-1537080 -Node: Time Functions537227 -Ref: Time Functions-Footnote-1547691 -Ref: Time Functions-Footnote-2547759 -Ref: Time Functions-Footnote-3547917 -Ref: Time Functions-Footnote-4548028 -Ref: Time Functions-Footnote-5548140 -Ref: Time Functions-Footnote-6548367 -Node: Bitwise Functions548633 -Ref: table-bitwise-ops549195 -Ref: Bitwise Functions-Footnote-1553440 -Node: Type Functions553624 -Node: I18N Functions554766 -Node: User-defined556411 -Node: Definition Syntax557215 -Ref: Definition Syntax-Footnote-1562394 -Node: Function Example562463 -Ref: Function Example-Footnote-1565107 -Node: Function Caveats565129 -Node: Calling A Function565647 -Node: Variable Scope566602 -Node: Pass By Value/Reference569590 -Node: Return Statement573098 -Node: Dynamic Typing576082 -Node: Indirect Calls577011 -Node: Functions Summary586724 -Node: Library Functions589263 -Ref: Library Functions-Footnote-1592881 -Ref: Library Functions-Footnote-2593024 -Node: Library Names593195 -Ref: Library Names-Footnote-1596668 -Ref: Library Names-Footnote-2596888 -Node: General Functions596974 -Node: Strtonum Function598002 -Node: Assert Function600782 -Node: Round Function604108 -Node: Cliff Random Function605649 -Node: Ordinal Functions606665 -Ref: Ordinal Functions-Footnote-1609742 -Ref: Ordinal Functions-Footnote-2609994 -Node: Join Function610205 -Ref: Join Function-Footnote-1611976 -Node: Getlocaltime Function612176 -Node: Readfile Function615912 -Node: Data File Management617751 -Node: Filetrans Function618383 -Node: Rewind Function622452 -Node: File Checking623839 -Ref: File Checking-Footnote-1624971 -Node: Empty Files625172 -Node: Ignoring Assigns627151 -Node: Getopt Function628705 -Ref: Getopt Function-Footnote-1640008 -Node: Passwd Functions640211 -Ref: Passwd Functions-Footnote-1649190 -Node: Group Functions649278 -Ref: Group Functions-Footnote-1657219 -Node: Walking Arrays657432 -Node: Library Functions Summary659035 -Node: Library exercises660423 -Node: Sample Programs661703 -Node: Running Examples662473 -Node: Clones663201 -Node: Cut Program664425 -Node: Egrep Program674293 -Ref: Egrep Program-Footnote-1682264 -Node: Id Program682374 -Node: Split Program686038 -Ref: Split Program-Footnote-1689576 -Node: Tee Program689704 -Node: Uniq Program692511 -Node: Wc Program699941 -Ref: Wc Program-Footnote-1704206 -Node: Miscellaneous Programs704298 -Node: Dupword Program705511 -Node: Alarm Program707542 -Node: Translate Program712356 -Ref: Translate Program-Footnote-1716747 -Ref: Translate Program-Footnote-2717017 -Node: Labels Program717151 -Ref: Labels Program-Footnote-1720522 -Node: Word Sorting720606 -Node: History Sorting724649 -Node: Extract Program726485 -Node: Simple Sed734021 -Node: Igawk Program737083 -Ref: Igawk Program-Footnote-1751394 -Ref: Igawk Program-Footnote-2751595 -Node: Anagram Program751733 -Node: Signature Program754801 -Node: Programs Summary756048 -Node: Programs Exercises757263 -Node: Advanced Features760914 -Node: Nondecimal Data762862 -Node: Array Sorting764439 -Node: Controlling Array Traversal765136 -Node: Array Sorting Functions773416 -Ref: Array Sorting Functions-Footnote-1777323 -Node: Two-way I/O777517 -Ref: Two-way I/O-Footnote-1783033 -Node: TCP/IP Networking783115 -Node: Profiling785959 -Node: Advanced Features Summary793510 -Node: Internationalization795374 -Node: I18N and L10N796854 -Node: Explaining gettext797540 -Ref: Explaining gettext-Footnote-1802680 -Ref: Explaining gettext-Footnote-2802864 -Node: Programmer i18n803029 -Node: Translator i18n807254 -Node: String Extraction808048 -Ref: String Extraction-Footnote-1809009 -Node: Printf Ordering809095 -Ref: Printf Ordering-Footnote-1811877 -Node: I18N Portability811941 -Ref: I18N Portability-Footnote-1814390 -Node: I18N Example814453 -Ref: I18N Example-Footnote-1817175 -Node: Gawk I18N817247 -Node: I18N Summary817885 -Node: Debugger819224 -Node: Debugging820246 -Node: Debugging Concepts820687 -Node: Debugging Terms822543 -Node: Awk Debugging825140 -Node: Sample Debugging Session826032 -Node: Debugger Invocation826552 -Node: Finding The Bug827885 -Node: List of Debugger Commands834367 -Node: Breakpoint Control835699 -Node: Debugger Execution Control839363 -Node: Viewing And Changing Data842723 -Node: Execution Stack846081 -Node: Debugger Info847594 -Node: Miscellaneous Debugger Commands851588 -Node: Readline Support856772 -Node: Limitations857664 -Node: Debugging Summary859938 -Node: Arbitrary Precision Arithmetic861102 -Node: Computer Arithmetic862431 -Ref: Computer Arithmetic-Footnote-1866818 -Node: Math Definitions866875 -Ref: table-ieee-formats869759 -Node: MPFR features870263 -Node: FP Math Caution871905 -Ref: FP Math Caution-Footnote-1872946 -Node: Inexactness of computations873315 -Node: Inexact representation874263 -Node: Comparing FP Values875618 -Node: Errors accumulate876582 -Node: Getting Accuracy878015 -Node: Try To Round880674 -Node: Setting precision881573 -Ref: table-predefined-precision-strings882255 -Node: Setting the rounding mode884048 -Ref: table-gawk-rounding-modes884412 -Ref: Setting the rounding mode-Footnote-1887866 -Node: Arbitrary Precision Integers888045 -Ref: Arbitrary Precision Integers-Footnote-1891048 -Node: POSIX Floating Point Problems891197 -Ref: POSIX Floating Point Problems-Footnote-1895073 -Node: Floating point summary895111 -Node: Dynamic Extensions897328 -Node: Extension Intro898880 -Node: Plugin License900145 -Node: Extension Mechanism Outline900830 -Ref: figure-load-extension901254 -Ref: figure-load-new-function902739 -Ref: figure-call-new-function903741 -Node: Extension API Description905725 -Node: Extension API Functions Introduction907175 -Node: General Data Types912040 -Ref: General Data Types-Footnote-1917733 -Node: Requesting Values918032 -Ref: table-value-types-returned918769 -Node: Memory Allocation Functions919727 -Ref: Memory Allocation Functions-Footnote-1922474 -Node: Constructor Functions922570 -Node: Registration Functions924328 -Node: Extension Functions925013 -Node: Exit Callback Functions927315 -Node: Extension Version String928564 -Node: Input Parsers929214 -Node: Output Wrappers939017 -Node: Two-way processors943533 -Node: Printing Messages945737 -Ref: Printing Messages-Footnote-1946814 -Node: Updating `ERRNO'946966 -Node: Accessing Parameters947705 -Node: Symbol Table Access948935 -Node: Symbol table by name949449 -Node: Symbol table by cookie951425 -Ref: Symbol table by cookie-Footnote-1955558 -Node: Cached values955621 -Ref: Cached values-Footnote-1959125 -Node: Array Manipulation959216 -Ref: Array Manipulation-Footnote-1960314 -Node: Array Data Types960353 -Ref: Array Data Types-Footnote-1963056 -Node: Array Functions963148 -Node: Flattening Arrays967022 -Node: Creating Arrays973874 -Node: Extension API Variables978605 -Node: Extension Versioning979241 -Node: Extension API Informational Variables981142 -Node: Extension API Boilerplate982228 -Node: Finding Extensions986032 -Node: Extension Example986592 -Node: Internal File Description987322 -Node: Internal File Ops991413 -Ref: Internal File Ops-Footnote-11002845 -Node: Using Internal File Ops1002985 -Ref: Using Internal File Ops-Footnote-11005332 -Node: Extension Samples1005600 -Node: Extension Sample File Functions1007124 -Node: Extension Sample Fnmatch1014692 -Node: Extension Sample Fork1016174 -Node: Extension Sample Inplace1017387 -Node: Extension Sample Ord1019062 -Node: Extension Sample Readdir1019898 -Ref: table-readdir-file-types1020754 -Node: Extension Sample Revout1021553 -Node: Extension Sample Rev2way1022144 -Node: Extension Sample Read write array1022885 -Node: Extension Sample Readfile1024764 -Node: Extension Sample API Tests1025864 -Node: Extension Sample Time1026389 -Node: gawkextlib1027704 -Node: Extension summary1030517 -Node: Extension Exercises1034210 -Node: Language History1034932 -Node: V7/SVR3.11036575 -Node: SVR41038895 -Node: POSIX1040337 -Node: BTL1041723 -Node: POSIX/GNU1042457 -Node: Feature History1048056 -Node: Common Extensions1061186 -Node: Ranges and Locales1062498 -Ref: Ranges and Locales-Footnote-11067115 -Ref: Ranges and Locales-Footnote-21067142 -Ref: Ranges and Locales-Footnote-31067376 -Node: Contributors1067597 -Node: History summary1073022 -Node: Installation1074391 -Node: Gawk Distribution1075342 -Node: Getting1075826 -Node: Extracting1076650 -Node: Distribution contents1078292 -Node: Unix Installation1084062 -Node: Quick Installation1084679 -Node: Additional Configuration Options1087121 -Node: Configuration Philosophy1088859 -Node: Non-Unix Installation1091210 -Node: PC Installation1091668 -Node: PC Binary Installation1092979 -Node: PC Compiling1094827 -Ref: PC Compiling-Footnote-11097826 -Node: PC Testing1097931 -Node: PC Using1099107 -Node: Cygwin1103265 -Node: MSYS1104074 -Node: VMS Installation1104588 -Node: VMS Compilation1105384 -Ref: VMS Compilation-Footnote-11106606 -Node: VMS Dynamic Extensions1106664 -Node: VMS Installation Details1108037 -Node: VMS Running1110289 -Node: VMS GNV1113123 -Node: VMS Old Gawk1113846 -Node: Bugs1114316 -Node: Other Versions1118320 -Node: Installation summary1124575 -Node: Notes1125631 -Node: Compatibility Mode1126496 -Node: Additions1127278 -Node: Accessing The Source1128203 -Node: Adding Code1129639 -Node: New Ports1135817 -Node: Derived Files1140298 -Ref: Derived Files-Footnote-11145379 -Ref: Derived Files-Footnote-21145413 -Ref: Derived Files-Footnote-31146009 -Node: Future Extensions1146123 -Node: Implementation Limitations1146729 -Node: Extension Design1147977 -Node: Old Extension Problems1149131 -Ref: Old Extension Problems-Footnote-11150648 -Node: Extension New Mechanism Goals1150705 -Ref: Extension New Mechanism Goals-Footnote-11154065 -Node: Extension Other Design Decisions1154254 -Node: Extension Future Growth1156360 -Node: Old Extension Mechanism1157196 -Node: Notes summary1158958 -Node: Basic Concepts1160144 -Node: Basic High Level1160825 -Ref: figure-general-flow1161097 -Ref: figure-process-flow1161696 -Ref: Basic High Level-Footnote-11164925 -Node: Basic Data Typing1165110 -Node: Glossary1168438 -Node: Copying1193590 -Node: GNU Free Documentation License1231146 -Node: Index1256282 +Node: GNU Regexp Operators170258 +Node: Case-sensitivity173981 +Ref: Case-sensitivity-Footnote-1176873 +Ref: Case-sensitivity-Footnote-2177108 +Node: Leftmost Longest177216 +Node: Computed Regexps178417 +Node: Regexp Summary181789 +Node: Reading Files183260 +Node: Records185352 +Node: awk split records186095 +Node: gawk split records190953 +Ref: gawk split records-Footnote-1195474 +Node: Fields195511 +Ref: Fields-Footnote-1198475 +Node: Nonconstant Fields198561 +Ref: Nonconstant Fields-Footnote-1200791 +Node: Changing Fields200993 +Node: Field Separators206947 +Node: Default Field Splitting209649 +Node: Regexp Field Splitting210766 +Node: Single Character Fields214107 +Node: Command Line Field Separator215166 +Node: Full Line Fields218508 +Ref: Full Line Fields-Footnote-1219016 +Node: Field Splitting Summary219062 +Ref: Field Splitting Summary-Footnote-1222161 +Node: Constant Size222262 +Node: Splitting By Content226869 +Ref: Splitting By Content-Footnote-1230619 +Node: Multiple Line230659 +Ref: Multiple Line-Footnote-1236515 +Node: Getline236694 +Node: Plain Getline238910 +Node: Getline/Variable241005 +Node: Getline/File242152 +Node: Getline/Variable/File243536 +Ref: Getline/Variable/File-Footnote-1245135 +Node: Getline/Pipe245222 +Node: Getline/Variable/Pipe247921 +Node: Getline/Coprocess249028 +Node: Getline/Variable/Coprocess250280 +Node: Getline Notes251017 +Node: Getline Summary253821 +Ref: table-getline-variants254229 +Node: Read Timeout255141 +Ref: Read Timeout-Footnote-1258968 +Node: Command line directories259026 +Node: Input Summary259930 +Node: Input Exercises263067 +Node: Printing263800 +Node: Print265522 +Node: Print Examples266863 +Node: Output Separators269642 +Node: OFMT271658 +Node: Printf273016 +Node: Basic Printf273922 +Node: Control Letters275461 +Node: Format Modifiers279313 +Node: Printf Examples285340 +Node: Redirection287804 +Node: Special Files294776 +Node: Special FD295307 +Ref: Special FD-Footnote-1298931 +Node: Special Network299005 +Node: Special Caveats299855 +Node: Close Files And Pipes300651 +Ref: Close Files And Pipes-Footnote-1307812 +Ref: Close Files And Pipes-Footnote-2307960 +Node: Output Summary308110 +Node: Output exercises309107 +Node: Expressions309787 +Node: Values310972 +Node: Constants311648 +Node: Scalar Constants312328 +Ref: Scalar Constants-Footnote-1313187 +Node: Nondecimal-numbers313437 +Node: Regexp Constants316437 +Node: Using Constant Regexps316912 +Node: Variables319982 +Node: Using Variables320637 +Node: Assignment Options322361 +Node: Conversion324236 +Node: Strings And Numbers324760 +Ref: Strings And Numbers-Footnote-1327822 +Node: Locale influences conversions327931 +Ref: table-locale-affects330648 +Node: All Operators331236 +Node: Arithmetic Ops331866 +Node: Concatenation334371 +Ref: Concatenation-Footnote-1337167 +Node: Assignment Ops337287 +Ref: table-assign-ops342270 +Node: Increment Ops343587 +Node: Truth Values and Conditions347025 +Node: Truth Values348108 +Node: Typing and Comparison349157 +Node: Variable Typing349950 +Ref: Variable Typing-Footnote-1353850 +Node: Comparison Operators353972 +Ref: table-relational-ops354382 +Node: POSIX String Comparison357932 +Ref: POSIX String Comparison-Footnote-1359016 +Node: Boolean Ops359154 +Ref: Boolean Ops-Footnote-1363224 +Node: Conditional Exp363315 +Node: Function Calls365042 +Node: Precedence368922 +Node: Locales372591 +Node: Expressions Summary374222 +Node: Patterns and Actions376763 +Node: Pattern Overview377879 +Node: Regexp Patterns379556 +Node: Expression Patterns380099 +Node: Ranges383880 +Node: BEGIN/END386986 +Node: Using BEGIN/END387748 +Ref: Using BEGIN/END-Footnote-1390484 +Node: I/O And BEGIN/END390590 +Node: BEGINFILE/ENDFILE392875 +Node: Empty395806 +Node: Using Shell Variables396123 +Node: Action Overview398406 +Node: Statements400733 +Node: If Statement402581 +Node: While Statement404079 +Node: Do Statement406123 +Node: For Statement407279 +Node: Switch Statement410431 +Node: Break Statement412534 +Node: Continue Statement414589 +Node: Next Statement416382 +Node: Nextfile Statement418772 +Node: Exit Statement421427 +Node: Built-in Variables423831 +Node: User-modified424958 +Ref: User-modified-Footnote-1432647 +Node: Auto-set432709 +Ref: Auto-set-Footnote-1445628 +Ref: Auto-set-Footnote-2445833 +Node: ARGC and ARGV445889 +Node: Pattern Action Summary449743 +Node: Arrays451966 +Node: Array Basics453515 +Node: Array Intro454341 +Ref: figure-array-elements456314 +Node: Reference to Elements458721 +Node: Assigning Elements460994 +Node: Array Example461485 +Node: Scanning an Array463217 +Node: Controlling Scanning466232 +Ref: Controlling Scanning-Footnote-1471405 +Node: Delete471721 +Ref: Delete-Footnote-1474486 +Node: Numeric Array Subscripts474543 +Node: Uninitialized Subscripts476726 +Node: Multidimensional478351 +Node: Multiscanning481444 +Node: Arrays of Arrays483033 +Node: Arrays Summary487696 +Node: Functions489801 +Node: Built-in490674 +Node: Calling Built-in491752 +Node: Numeric Functions493740 +Ref: Numeric Functions-Footnote-1497574 +Ref: Numeric Functions-Footnote-2497931 +Ref: Numeric Functions-Footnote-3497979 +Node: String Functions498248 +Ref: String Functions-Footnote-1521259 +Ref: String Functions-Footnote-2521388 +Ref: String Functions-Footnote-3521636 +Node: Gory Details521723 +Ref: table-sub-escapes523392 +Ref: table-sub-posix-92524746 +Ref: table-sub-proposed526097 +Ref: table-posix-sub527451 +Ref: table-gensub-escapes528996 +Ref: Gory Details-Footnote-1530172 +Ref: Gory Details-Footnote-2530223 +Node: I/O Functions530374 +Ref: I/O Functions-Footnote-1537497 +Node: Time Functions537644 +Ref: Time Functions-Footnote-1548108 +Ref: Time Functions-Footnote-2548176 +Ref: Time Functions-Footnote-3548334 +Ref: Time Functions-Footnote-4548445 +Ref: Time Functions-Footnote-5548557 +Ref: Time Functions-Footnote-6548784 +Node: Bitwise Functions549050 +Ref: table-bitwise-ops549612 +Ref: Bitwise Functions-Footnote-1553857 +Node: Type Functions554041 +Node: I18N Functions555183 +Node: User-defined556828 +Node: Definition Syntax557632 +Ref: Definition Syntax-Footnote-1562811 +Node: Function Example562880 +Ref: Function Example-Footnote-1565524 +Node: Function Caveats565546 +Node: Calling A Function566064 +Node: Variable Scope567019 +Node: Pass By Value/Reference570007 +Node: Return Statement573515 +Node: Dynamic Typing576499 +Node: Indirect Calls577428 +Node: Functions Summary587141 +Node: Library Functions589680 +Ref: Library Functions-Footnote-1593298 +Ref: Library Functions-Footnote-2593441 +Node: Library Names593612 +Ref: Library Names-Footnote-1597085 +Ref: Library Names-Footnote-2597305 +Node: General Functions597391 +Node: Strtonum Function598419 +Node: Assert Function601199 +Node: Round Function604525 +Node: Cliff Random Function606066 +Node: Ordinal Functions607082 +Ref: Ordinal Functions-Footnote-1610159 +Ref: Ordinal Functions-Footnote-2610411 +Node: Join Function610622 +Ref: Join Function-Footnote-1612393 +Node: Getlocaltime Function612593 +Node: Readfile Function616329 +Node: Data File Management618168 +Node: Filetrans Function618800 +Node: Rewind Function622869 +Node: File Checking624256 +Ref: File Checking-Footnote-1625388 +Node: Empty Files625589 +Node: Ignoring Assigns627568 +Node: Getopt Function629122 +Ref: Getopt Function-Footnote-1640425 +Node: Passwd Functions640628 +Ref: Passwd Functions-Footnote-1649607 +Node: Group Functions649695 +Ref: Group Functions-Footnote-1657636 +Node: Walking Arrays657849 +Node: Library Functions Summary659452 +Node: Library exercises660840 +Node: Sample Programs662120 +Node: Running Examples662890 +Node: Clones663618 +Node: Cut Program664842 +Node: Egrep Program674710 +Ref: Egrep Program-Footnote-1682681 +Node: Id Program682791 +Node: Split Program686455 +Ref: Split Program-Footnote-1689993 +Node: Tee Program690121 +Node: Uniq Program692928 +Node: Wc Program700358 +Ref: Wc Program-Footnote-1704623 +Node: Miscellaneous Programs704715 +Node: Dupword Program705928 +Node: Alarm Program707959 +Node: Translate Program712773 +Ref: Translate Program-Footnote-1717164 +Ref: Translate Program-Footnote-2717434 +Node: Labels Program717568 +Ref: Labels Program-Footnote-1720939 +Node: Word Sorting721023 +Node: History Sorting725066 +Node: Extract Program726902 +Node: Simple Sed734438 +Node: Igawk Program737500 +Ref: Igawk Program-Footnote-1751811 +Ref: Igawk Program-Footnote-2752012 +Node: Anagram Program752150 +Node: Signature Program755218 +Node: Programs Summary756465 +Node: Programs Exercises757680 +Node: Advanced Features761331 +Node: Nondecimal Data763279 +Node: Array Sorting764856 +Node: Controlling Array Traversal765553 +Node: Array Sorting Functions773833 +Ref: Array Sorting Functions-Footnote-1777740 +Node: Two-way I/O777934 +Ref: Two-way I/O-Footnote-1783450 +Node: TCP/IP Networking783532 +Node: Profiling786376 +Node: Advanced Features Summary793927 +Node: Internationalization795791 +Node: I18N and L10N797271 +Node: Explaining gettext797957 +Ref: Explaining gettext-Footnote-1803097 +Ref: Explaining gettext-Footnote-2803281 +Node: Programmer i18n803446 +Node: Translator i18n807671 +Node: String Extraction808465 +Ref: String Extraction-Footnote-1809426 +Node: Printf Ordering809512 +Ref: Printf Ordering-Footnote-1812294 +Node: I18N Portability812358 +Ref: I18N Portability-Footnote-1814807 +Node: I18N Example814870 +Ref: I18N Example-Footnote-1817592 +Node: Gawk I18N817664 +Node: I18N Summary818302 +Node: Debugger819641 +Node: Debugging820663 +Node: Debugging Concepts821104 +Node: Debugging Terms822960 +Node: Awk Debugging825557 +Node: Sample Debugging Session826449 +Node: Debugger Invocation826969 +Node: Finding The Bug828302 +Node: List of Debugger Commands834784 +Node: Breakpoint Control836116 +Node: Debugger Execution Control839780 +Node: Viewing And Changing Data843140 +Node: Execution Stack846498 +Node: Debugger Info848011 +Node: Miscellaneous Debugger Commands852005 +Node: Readline Support857189 +Node: Limitations858081 +Node: Debugging Summary860355 +Node: Arbitrary Precision Arithmetic861519 +Node: Computer Arithmetic862848 +Ref: Computer Arithmetic-Footnote-1867235 +Node: Math Definitions867292 +Ref: table-ieee-formats870176 +Node: MPFR features870680 +Node: FP Math Caution872322 +Ref: FP Math Caution-Footnote-1873363 +Node: Inexactness of computations873732 +Node: Inexact representation874680 +Node: Comparing FP Values876035 +Node: Errors accumulate876999 +Node: Getting Accuracy878432 +Node: Try To Round881091 +Node: Setting precision881990 +Ref: table-predefined-precision-strings882672 +Node: Setting the rounding mode884465 +Ref: table-gawk-rounding-modes884829 +Ref: Setting the rounding mode-Footnote-1888283 +Node: Arbitrary Precision Integers888462 +Ref: Arbitrary Precision Integers-Footnote-1891465 +Node: POSIX Floating Point Problems891614 +Ref: POSIX Floating Point Problems-Footnote-1895490 +Node: Floating point summary895528 +Node: Dynamic Extensions897745 +Node: Extension Intro899297 +Node: Plugin License900562 +Node: Extension Mechanism Outline901247 +Ref: figure-load-extension901671 +Ref: figure-load-new-function903156 +Ref: figure-call-new-function904158 +Node: Extension API Description906142 +Node: Extension API Functions Introduction907592 +Node: General Data Types912457 +Ref: General Data Types-Footnote-1918150 +Node: Requesting Values918449 +Ref: table-value-types-returned919186 +Node: Memory Allocation Functions920144 +Ref: Memory Allocation Functions-Footnote-1922891 +Node: Constructor Functions922987 +Node: Registration Functions924745 +Node: Extension Functions925430 +Node: Exit Callback Functions927732 +Node: Extension Version String928981 +Node: Input Parsers929631 +Node: Output Wrappers939434 +Node: Two-way processors943950 +Node: Printing Messages946154 +Ref: Printing Messages-Footnote-1947231 +Node: Updating `ERRNO'947383 +Node: Accessing Parameters948122 +Node: Symbol Table Access949352 +Node: Symbol table by name949866 +Node: Symbol table by cookie951842 +Ref: Symbol table by cookie-Footnote-1955975 +Node: Cached values956038 +Ref: Cached values-Footnote-1959542 +Node: Array Manipulation959633 +Ref: Array Manipulation-Footnote-1960731 +Node: Array Data Types960770 +Ref: Array Data Types-Footnote-1963473 +Node: Array Functions963565 +Node: Flattening Arrays967439 +Node: Creating Arrays974291 +Node: Extension API Variables979022 +Node: Extension Versioning979658 +Node: Extension API Informational Variables981559 +Node: Extension API Boilerplate982645 +Node: Finding Extensions986449 +Node: Extension Example987009 +Node: Internal File Description987739 +Node: Internal File Ops991830 +Ref: Internal File Ops-Footnote-11003262 +Node: Using Internal File Ops1003402 +Ref: Using Internal File Ops-Footnote-11005749 +Node: Extension Samples1006017 +Node: Extension Sample File Functions1007541 +Node: Extension Sample Fnmatch1015109 +Node: Extension Sample Fork1016591 +Node: Extension Sample Inplace1017804 +Node: Extension Sample Ord1019479 +Node: Extension Sample Readdir1020315 +Ref: table-readdir-file-types1021171 +Node: Extension Sample Revout1021970 +Node: Extension Sample Rev2way1022561 +Node: Extension Sample Read write array1023302 +Node: Extension Sample Readfile1025181 +Node: Extension Sample API Tests1026281 +Node: Extension Sample Time1026806 +Node: gawkextlib1028121 +Node: Extension summary1030934 +Node: Extension Exercises1034627 +Node: Language History1035349 +Node: V7/SVR3.11036992 +Node: SVR41039312 +Node: POSIX1040754 +Node: BTL1042140 +Node: POSIX/GNU1042874 +Node: Feature History1048473 +Node: Common Extensions1061603 +Node: Ranges and Locales1062915 +Ref: Ranges and Locales-Footnote-11067532 +Ref: Ranges and Locales-Footnote-21067559 +Ref: Ranges and Locales-Footnote-31067793 +Node: Contributors1068014 +Node: History summary1073439 +Node: Installation1074808 +Node: Gawk Distribution1075759 +Node: Getting1076243 +Node: Extracting1077067 +Node: Distribution contents1078709 +Node: Unix Installation1084479 +Node: Quick Installation1085096 +Node: Additional Configuration Options1087538 +Node: Configuration Philosophy1089276 +Node: Non-Unix Installation1091627 +Node: PC Installation1092085 +Node: PC Binary Installation1093396 +Node: PC Compiling1095244 +Ref: PC Compiling-Footnote-11098243 +Node: PC Testing1098348 +Node: PC Using1099524 +Node: Cygwin1103682 +Node: MSYS1104491 +Node: VMS Installation1105005 +Node: VMS Compilation1105801 +Ref: VMS Compilation-Footnote-11107023 +Node: VMS Dynamic Extensions1107081 +Node: VMS Installation Details1108454 +Node: VMS Running1110706 +Node: VMS GNV1113540 +Node: VMS Old Gawk1114263 +Node: Bugs1114733 +Node: Other Versions1118737 +Node: Installation summary1124992 +Node: Notes1126048 +Node: Compatibility Mode1126913 +Node: Additions1127695 +Node: Accessing The Source1128620 +Node: Adding Code1130056 +Node: New Ports1136234 +Node: Derived Files1140715 +Ref: Derived Files-Footnote-11145796 +Ref: Derived Files-Footnote-21145830 +Ref: Derived Files-Footnote-31146426 +Node: Future Extensions1146540 +Node: Implementation Limitations1147146 +Node: Extension Design1148394 +Node: Old Extension Problems1149548 +Ref: Old Extension Problems-Footnote-11151065 +Node: Extension New Mechanism Goals1151122 +Ref: Extension New Mechanism Goals-Footnote-11154482 +Node: Extension Other Design Decisions1154671 +Node: Extension Future Growth1156777 +Node: Old Extension Mechanism1157613 +Node: Notes summary1159375 +Node: Basic Concepts1160561 +Node: Basic High Level1161242 +Ref: figure-general-flow1161514 +Ref: figure-process-flow1162113 +Ref: Basic High Level-Footnote-11165342 +Node: Basic Data Typing1165527 +Node: Glossary1168855 +Node: Copying1194007 +Node: GNU Free Documentation License1231563 +Node: Index1256699 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 341bd62d..3bfeb3f6 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -5450,6 +5450,17 @@ With the POSIX character classes, you can write @code{/[[:alnum:]]/} to match the alphabetic and numeric characters in your character set. +@c Thanks to +@c Date: Tue, 01 Jul 2014 07:39:51 +0200 +@c From: Hermann Peifer <peifer@gmx.eu> +Some utilities that match regular expressions provide a non-standard +@code{[:ascii:]} character class; @command{awk} does not. However, you +can simulate such a construct using @code{[\x00-\x7F]}. This matches +all values numerically between zero and 127, which is the defined +range of the ASCII character set. Use a complemented character list +(@code{[^\x00-\x7F]}) to match any single-byte characters that are not +in the ASCII range. + @cindex bracket expressions, collating elements @cindex bracket expressions, non-ASCII @cindex collating elements diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 53df7d32..ea28861e 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -5295,6 +5295,17 @@ With the POSIX character classes, you can write @code{/[[:alnum:]]/} to match the alphabetic and numeric characters in your character set. +@c Thanks to +@c Date: Tue, 01 Jul 2014 07:39:51 +0200 +@c From: Hermann Peifer <peifer@gmx.eu> +Some utilities that match regular expressions provide a non-standard +@code{[:ascii:]} character class; @command{awk} does not. However, you +can simulate such a construct using @code{[\x00-\x7F]}. This matches +all values numerically between zero and 127, which is the defined +range of the ASCII character set. Use a complemented character list +(@code{[^\x00-\x7F]}) to match any single-byte characters that are not +in the ASCII range. + @cindex bracket expressions, collating elements @cindex bracket expressions, non-ASCII @cindex collating elements |