diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-06-08 23:00:07 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-06-08 23:00:07 +0300 |
commit | 35f20969b80eaa1eaf4d778dfa2b0f1f6637b8d3 (patch) | |
tree | c38ff52d63463e11019eb8a2c8a4a0b65dd53a06 | |
parent | 337e1e6b1c142c2b800d316e477973d29c0659a1 (diff) | |
parent | 4bf0a8ccb72ea56ae4e7f576dd1902603b521e8d (diff) | |
download | egawk-35f20969b80eaa1eaf4d778dfa2b0f1f6637b8d3.tar.gz egawk-35f20969b80eaa1eaf4d778dfa2b0f1f6637b8d3.tar.bz2 egawk-35f20969b80eaa1eaf4d778dfa2b0f1f6637b8d3.zip |
Merge branch 'gawk-4.1-stable'
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | dfa.c | 17 | ||||
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 1204 | ||||
-rw-r--r-- | doc/gawk.texi | 163 | ||||
-rw-r--r-- | doc/gawktexi.in | 163 | ||||
-rw-r--r-- | helpers/ChangeLog | 4 | ||||
-rw-r--r-- | helpers/testdfa.c | 31 | ||||
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/Makefile.in | 2 |
11 files changed, 998 insertions, 600 deletions
@@ -1,3 +1,7 @@ +2014-06-08 Arnold D. Robbins <arnold@skeeve.com> + + * dfa.c: Sync with GNU grep. + 2014-06-03 Arnold D. Robbins <arnold@skeeve.com> * dfa.c (mbs_to_wchar): Define a macro if not MBS. @@ -3836,19 +3836,6 @@ icatalloc (char *old, char const *new) return result; } -static char *_GL_ATTRIBUTE_PURE -istrstr (char const *lookin, char const *lookfor) -{ - char const *cp; - size_t len; - - len = strlen (lookfor); - for (cp = lookin; *cp != '\0'; ++cp) - if (strncmp (cp, lookfor, len) == 0) - return (char *) cp; - return NULL; -} - static void freelist (char **cpp) { @@ -3864,7 +3851,7 @@ enlist (char **cpp, char *new, size_t len) new[len] = '\0'; /* Is there already something in the list that's new (or longer)? */ for (i = 0; cpp[i] != NULL; ++i) - if (istrstr (cpp[i], new) != NULL) + if (strstr (cpp[i], new) != NULL) { free (new); return cpp; @@ -3872,7 +3859,7 @@ enlist (char **cpp, char *new, size_t len) /* Eliminate any obsoleted strings. */ j = 0; while (cpp[j] != NULL) - if (istrstr (new, cpp[j]) == NULL) + if (strstr (new, cpp[j]) == NULL) ++j; else { diff --git a/doc/ChangeLog b/doc/ChangeLog index 61052c98..734e84f2 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2014-06-08 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Start adding "Summary" sections. + 2014-06-03 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Restore macros for file name vs. filename etc. diff --git a/doc/gawk.info b/doc/gawk.info index 244a836d..9847e6be 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -126,8 +126,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) includes command-line syntax. * One-shot:: Running a short throwaway `awk' program. -* Read Terminal:: Using no input files (input from - the keyboard instead). +* Read Terminal:: Using no input files (input from the + keyboard instead). * Long:: Putting permanent `awk' programs in files. * Executable Scripts:: Making self-contained `awk' @@ -149,6 +149,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Other Features:: Other Features of `awk'. * When:: When to use `gawk' and when to use other things. +* Intro Summary:: Summary of the introduction. * Command Line:: How to run `awk'. * Options:: Command-line options and their meanings. @@ -170,6 +171,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. * Regexp Usage:: How to Use Regular Expressions. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. @@ -178,8 +180,12 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. +* awk split records:: How standard `awk' splits + records. +* gawk split records:: How `gawk' splits records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. * Changing Fields:: Changing the Contents of a Field. @@ -636,8 +642,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) `gawk'. * New Ports:: Porting `gawk' to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the @@ -1351,6 +1357,7 @@ like this: * Other Features:: Other Features of `awk'. * When:: When to use `gawk' and when to use other things. +* Intro Summary:: Summary of the introduction. File: gawk.info, Node: Running gawk, Next: Sample Data Files, Up: Getting Started @@ -2194,7 +2201,7 @@ most of the variables and many of the functions. They are described systematically in *note Built-in Variables::, and *note Built-in::. -File: gawk.info, Node: When, Prev: Other Features, Up: Getting Started +File: gawk.info, Node: When, Next: Intro Summary, Prev: Other Features, Up: Getting Started 1.8 When to Use `awk' ===================== @@ -2235,6 +2242,30 @@ languages may require more lines of source code than the equivalent efficiently. +File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started + +1.9 Summary +=========== + + * Programs in `awk' consist of PATTERN-ACTION pairs. + + * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to + run `awk'. + + * You may use the special `#!' header line to create `awk' programs + that are directly executable. + + * Comments in `awk' programs start with `#' and continue to the end + of the same line. + + * Be aware of quoting issues when writing `awk' programs as part of + a larger shell script (or MS-Windows batch file). + + * You may use backslash continuation to continue a source line. + Lines are automatically continued after a comma, open brace, + question mark, colon, `||', `&&', `do' and `else'. + + File: gawk.info, Node: Invoking Gawk, Next: Regexp, Prev: Getting Started, Up: Top 2 Running `awk' and `gawk' @@ -2264,6 +2295,7 @@ this major node that don't interest you right now. * Loading Shared Libraries:: Loading shared libraries into your program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. File: gawk.info, Node: Command Line, Next: Options, Up: Invoking Gawk @@ -3094,7 +3126,7 @@ worked. As of version 4.0, they are no longer interpreted specially by `gawk'. (Use `PROCINFO' instead; see *note Auto-set::.) -File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk +File: gawk.info, Node: Undocumented, Next: Invoking Summary, Prev: Obsolete, Up: Invoking Gawk 2.10 Undocumented Options and Features ====================================== @@ -3104,6 +3136,48 @@ File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk This minor node intentionally left blank. +File: gawk.info, Node: Invoking Summary, Prev: Undocumented, Up: Invoking Gawk + +2.11 Summary +============ + + * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to + run `awk'. + + * The three standard `awk' options are `-f', `-F' and `-v'. `gawk' + supplies these and many others, as well as corresponding GNU-style + long options. + + * Non-option command-line arguments are usually treated as file + names, unless they have the form `VAR=VALUE', in which case they + are taken as variable assignments to be performed at that point in + processing the input. + + * All non-option command-line arguments, excluding the program text, + are placed in the `ARGV' array. Adjusting `ARGC' and `ARGV' + affects how `awk' processes input. + + * You can use a single minus sign (`-') to refer to standard input + on the command line. + + * `gawk' pays attention to a number of environment variables. + `AWKPATH', `AWKLIBPATH', and `POSIXLY_CORRECT' are the most + important ones. + + * `gawk''s exit status conveys information to the program that + invoked it. Use the `exit' statement from within an `awk' program + to set the exit status. + + * `gawk' allows you to include other `awk' source files into your + program using the `@include' statement and/or the `-i' and `-f' + command-line options. + + * `gawk' allows you to load additional functions written in C or C++ + using the `@load' statement and/or the `-l' option. (This + advanced feature is described later on in *note Dynamic + Extensions::.) + + File: gawk.info, Node: Regexp, Next: Reading Files, Prev: Invoking Gawk, Up: Top 3 Regular Expressions @@ -3132,6 +3206,7 @@ you specify more complicated classes of strings. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. File: gawk.info, Node: Regexp Usage, Next: Escape Sequences, Up: Regexp @@ -3811,7 +3886,7 @@ this principle is also important for regexp-based record and field splitting (*note Records::, and also *note Field Separators::). -File: gawk.info, Node: Computed Regexps, Prev: Leftmost Longest, Up: Regexp +File: gawk.info, Node: Computed Regexps, Next: Regexp Summary, Prev: Leftmost Longest, Up: Regexp 3.8 Using Dynamic Regexps ========================= @@ -3890,6 +3965,44 @@ inside a bracket expression for a dynamic regexp: often in practice, but it's worth noting for future reference. +File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp + +3.9 Summary +=========== + + * Regular expressions describe sets of strings to be matched. In + `awk', regular expression constants are written enclosed between + slashes: `/'...`/'. + + * Regexp constants may be used by standalone in patterns and in + conditional expressions, or as part of matching expressions using + the `~' and `!~' operators. + + * Escape sequences let you represent non-printable characters and + also let you represent regexp metacharacters as literal characters + to be matched. + + * Regexp operators provide grouping, alternation and repetition. + + * Bracket expressions give you a shorthand for specifyings sets of + characters that can match at a particular point in a regexp. + Within bracket expressions, POSIX character classes let you specify + certain groups of characters in a locale-independent fashion. + + * `gawk''s `IGNORECASE' variable lets you control the case + sensitivity of regexp matching. In other `awk' versions, use + `tolower()' or `toupper()'. + + * Regular expressions match the leftmost longest text in the string + being matched. This matters for cases where you need to know the + extent of the match, such as for text substitution and when the + record separator is a regexp. + + * Matching expressions may use dynamic regexps; that is string values + treated as regular expressions. + + + File: gawk.info, Node: Reading Files, Next: Printing, Prev: Regexp, Up: Top 4 Reading Input Files @@ -3946,8 +4059,8 @@ is never automatically reset to zero. * Menu: -* awk split records:: How standard `awk' splits records. -* gawk split records:: How `gawk' splits records. +* awk split records:: How standard `awk' splits records. +* gawk split records:: How `gawk' splits records. File: gawk.info, Node: awk split records, Next: gawk split records, Up: Records @@ -8029,7 +8142,7 @@ has the value one if `x' contains `foo', such as `"Oh, what a fool am I!"'. The righthand operand of the `~' and `!~' operators may be either a -regexp constant (`/.../') or an ordinary expression. In the latter +regexp constant (`/'...`/') or an ordinary expression. In the latter case, the value of the expression as a string is used as a dynamic regexp (*note Regexp Usage::; also *note Computed Regexps::). @@ -27423,8 +27536,8 @@ as well as any considerations you should bear in mind. `gawk'. * New Ports:: Porting `gawk' to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions @@ -33226,537 +33339,540 @@ Index Tag Table: Node: Top1292 -Node: Foreword40830 -Node: Preface45175 -Ref: Preface-Footnote-148322 -Ref: Preface-Footnote-248429 -Node: History48661 -Node: Names51035 -Ref: Names-Footnote-152499 -Node: This Manual52572 -Ref: This Manual-Footnote-158351 -Node: Conventions58451 -Node: Manual History60607 -Ref: Manual History-Footnote-164046 -Ref: Manual History-Footnote-264087 -Node: How To Contribute64161 -Node: Acknowledgments65400 -Node: Getting Started69549 -Node: Running gawk71922 -Node: One-shot73112 -Node: Read Terminal74337 -Ref: Read Terminal-Footnote-175987 -Ref: Read Terminal-Footnote-276263 -Node: Long76434 -Node: Executable Scripts77782 -Ref: Executable Scripts-Footnote-179615 -Ref: Executable Scripts-Footnote-279717 -Node: Comments80250 -Node: Quoting82717 -Node: DOS Quoting88026 -Node: Sample Data Files88701 -Node: Very Simple91216 -Node: Two Rules95847 -Node: More Complex97742 -Ref: More Complex-Footnote-1100667 -Node: Statements/Lines100752 -Ref: Statements/Lines-Footnote-1105207 -Node: Other Features105472 -Node: When106400 -Node: Invoking Gawk108548 -Node: Command Line110011 -Node: Options110802 -Ref: Options-Footnote-1126586 -Node: Other Arguments126611 -Node: Naming Standard Input129252 -Node: Environment Variables130332 -Node: AWKPATH Variable130890 -Ref: AWKPATH Variable-Footnote-1133741 -Ref: AWKPATH Variable-Footnote-2133786 -Node: AWKLIBPATH Variable134046 -Node: Other Environment Variables134805 -Node: Exit Status138460 -Node: Include Files139135 -Node: Loading Shared Libraries142699 -Node: Obsolete144083 -Node: Undocumented144780 -Node: Regexp145022 -Node: Regexp Usage146411 -Node: Escape Sequences148444 -Node: Regexp Operators154111 -Ref: Regexp Operators-Footnote-1161591 -Ref: Regexp Operators-Footnote-2161738 -Node: Bracket Expressions161836 -Ref: table-char-classes163726 -Node: GNU Regexp Operators166249 -Node: Case-sensitivity169972 -Ref: Case-sensitivity-Footnote-1172864 -Ref: Case-sensitivity-Footnote-2173099 -Node: Leftmost Longest173207 -Node: Computed Regexps174408 -Node: Reading Files177757 -Node: Records179759 -Node: awk split records180494 -Node: gawk split records185352 -Ref: gawk split records-Footnote-1189873 -Node: Fields189910 -Ref: Fields-Footnote-1192874 -Node: Nonconstant Fields192960 -Ref: Nonconstant Fields-Footnote-1195190 -Node: Changing Fields195392 -Node: Field Separators201346 -Node: Default Field Splitting204048 -Node: Regexp Field Splitting205165 -Node: Single Character Fields208506 -Node: Command Line Field Separator209565 -Node: Full Line Fields212907 -Ref: Full Line Fields-Footnote-1213415 -Node: Field Splitting Summary213461 -Ref: Field Splitting Summary-Footnote-1216560 -Node: Constant Size216661 -Node: Splitting By Content221268 -Ref: Splitting By Content-Footnote-1225018 -Node: Multiple Line225058 -Ref: Multiple Line-Footnote-1230914 -Node: Getline231093 -Node: Plain Getline233309 -Node: Getline/Variable235404 -Node: Getline/File236551 -Node: Getline/Variable/File237927 -Ref: Getline/Variable/File-Footnote-1239526 -Node: Getline/Pipe239613 -Node: Getline/Variable/Pipe242312 -Node: Getline/Coprocess243419 -Node: Getline/Variable/Coprocess244671 -Node: Getline Notes245408 -Node: Getline Summary248212 -Ref: table-getline-variants248620 -Node: Read Timeout249532 -Ref: Read Timeout-Footnote-1253359 -Node: Command line directories253417 -Node: Printing254299 -Node: Print255923 -Node: Print Examples257264 -Node: Output Separators260043 -Node: OFMT262059 -Node: Printf263417 -Node: Basic Printf264323 -Node: Control Letters265862 -Node: Format Modifiers269716 -Node: Printf Examples275743 -Node: Redirection278450 -Node: Special Files285397 -Node: Special FD285913 -Ref: Special FD-Footnote-1289488 -Node: Special Network289562 -Node: Special Caveats290398 -Node: Close Files And Pipes291173 -Ref: Close Files And Pipes-Footnote-1298289 -Ref: Close Files And Pipes-Footnote-2298437 -Node: Expressions298587 -Node: Values299719 -Node: Constants300395 -Node: Scalar Constants301075 -Ref: Scalar Constants-Footnote-1301934 -Node: Nondecimal-numbers302184 -Node: Regexp Constants305184 -Node: Using Constant Regexps305659 -Node: Variables308729 -Node: Using Variables309384 -Node: Assignment Options311108 -Node: Conversion312975 -Ref: table-locale-affects318411 -Ref: Conversion-Footnote-1319035 -Node: All Operators319144 -Node: Arithmetic Ops319774 -Node: Concatenation322279 -Ref: Concatenation-Footnote-1325075 -Node: Assignment Ops325195 -Ref: table-assign-ops330178 -Node: Increment Ops331495 -Node: Truth Values and Conditions334933 -Node: Truth Values336016 -Node: Typing and Comparison337065 -Node: Variable Typing337858 -Ref: Variable Typing-Footnote-1341758 -Node: Comparison Operators341880 -Ref: table-relational-ops342290 -Node: POSIX String Comparison345838 -Ref: POSIX String Comparison-Footnote-1346922 -Node: Boolean Ops347060 -Ref: Boolean Ops-Footnote-1351130 -Node: Conditional Exp351221 -Node: Function Calls352948 -Node: Precedence356706 -Node: Locales360375 -Node: Patterns and Actions361978 -Node: Pattern Overview363032 -Node: Regexp Patterns364709 -Node: Expression Patterns365252 -Node: Ranges369033 -Node: BEGIN/END372139 -Node: Using BEGIN/END372901 -Ref: Using BEGIN/END-Footnote-1375637 -Node: I/O And BEGIN/END375743 -Node: BEGINFILE/ENDFILE378028 -Node: Empty380959 -Node: Using Shell Variables381276 -Node: Action Overview383559 -Node: Statements385886 -Node: If Statement387734 -Node: While Statement389232 -Node: Do Statement391276 -Node: For Statement392432 -Node: Switch Statement395584 -Node: Break Statement397687 -Node: Continue Statement399742 -Node: Next Statement401535 -Node: Nextfile Statement403925 -Node: Exit Statement406580 -Node: Built-in Variables408984 -Node: User-modified410080 -Ref: User-modified-Footnote-1417765 -Node: Auto-set417827 -Ref: Auto-set-Footnote-1430710 -Ref: Auto-set-Footnote-2430915 -Node: ARGC and ARGV430971 -Node: Arrays434810 -Node: Array Basics436308 -Node: Array Intro437134 -Ref: figure-array-elements439107 -Node: Reference to Elements441514 -Node: Assigning Elements443787 -Node: Array Example444278 -Node: Scanning an Array446010 -Node: Controlling Scanning449025 -Ref: Controlling Scanning-Footnote-1454198 -Node: Delete454514 -Ref: Delete-Footnote-1457279 -Node: Numeric Array Subscripts457336 -Node: Uninitialized Subscripts459519 -Node: Multidimensional461144 -Node: Multiscanning464237 -Node: Arrays of Arrays465826 -Node: Functions470466 -Node: Built-in471285 -Node: Calling Built-in472363 -Node: Numeric Functions474351 -Ref: Numeric Functions-Footnote-1478185 -Ref: Numeric Functions-Footnote-2478542 -Ref: Numeric Functions-Footnote-3478590 -Node: String Functions478859 -Ref: String Functions-Footnote-1501870 -Ref: String Functions-Footnote-2501999 -Ref: String Functions-Footnote-3502247 -Node: Gory Details502334 -Ref: table-sub-escapes504003 -Ref: table-sub-posix-92505357 -Ref: table-sub-proposed506708 -Ref: table-posix-sub508062 -Ref: table-gensub-escapes509607 -Ref: Gory Details-Footnote-1510783 -Ref: Gory Details-Footnote-2510834 -Node: I/O Functions510985 -Ref: I/O Functions-Footnote-1518108 -Node: Time Functions518255 -Ref: Time Functions-Footnote-1528719 -Ref: Time Functions-Footnote-2528787 -Ref: Time Functions-Footnote-3528945 -Ref: Time Functions-Footnote-4529056 -Ref: Time Functions-Footnote-5529168 -Ref: Time Functions-Footnote-6529395 -Node: Bitwise Functions529661 -Ref: table-bitwise-ops530223 -Ref: Bitwise Functions-Footnote-1534468 -Node: Type Functions534652 -Node: I18N Functions535794 -Node: User-defined537439 -Node: Definition Syntax538243 -Ref: Definition Syntax-Footnote-1543168 -Node: Function Example543237 -Ref: Function Example-Footnote-1545881 -Node: Function Caveats545903 -Node: Calling A Function546421 -Node: Variable Scope547376 -Node: Pass By Value/Reference550364 -Node: Return Statement553872 -Node: Dynamic Typing556856 -Node: Indirect Calls557785 -Node: Library Functions567472 -Ref: Library Functions-Footnote-1570985 -Ref: Library Functions-Footnote-2571128 -Node: Library Names571299 -Ref: Library Names-Footnote-1574772 -Ref: Library Names-Footnote-2574992 -Node: General Functions575078 -Node: Strtonum Function576106 -Node: Assert Function579036 -Node: Round Function582362 -Node: Cliff Random Function583903 -Node: Ordinal Functions584919 -Ref: Ordinal Functions-Footnote-1587996 -Ref: Ordinal Functions-Footnote-2588248 -Node: Join Function588459 -Ref: Join Function-Footnote-1590230 -Node: Getlocaltime Function590430 -Node: Readfile Function594166 -Node: Data File Management596005 -Node: Filetrans Function596637 -Node: Rewind Function600692 -Node: File Checking602079 -Ref: File Checking-Footnote-1603211 -Node: Empty Files603412 -Node: Ignoring Assigns605635 -Node: Getopt Function607166 -Ref: Getopt Function-Footnote-1618462 -Node: Passwd Functions618665 -Ref: Passwd Functions-Footnote-1627644 -Node: Group Functions627732 -Ref: Group Functions-Footnote-1635674 -Node: Walking Arrays635887 -Node: Sample Programs638023 -Node: Running Examples638697 -Node: Clones639425 -Node: Cut Program640649 -Node: Egrep Program650510 -Ref: Egrep Program-Footnote-1658439 -Node: Id Program658549 -Node: Split Program662213 -Ref: Split Program-Footnote-1665744 -Node: Tee Program665872 -Node: Uniq Program668679 -Node: Wc Program676109 -Ref: Wc Program-Footnote-1680377 -Ref: Wc Program-Footnote-2680577 -Node: Miscellaneous Programs680669 -Node: Dupword Program681857 -Node: Alarm Program683888 -Node: Translate Program688702 -Ref: Translate Program-Footnote-1693093 -Ref: Translate Program-Footnote-2693363 -Node: Labels Program693497 -Ref: Labels Program-Footnote-1696868 -Node: Word Sorting696952 -Node: History Sorting700995 -Node: Extract Program702831 -Ref: Extract Program-Footnote-1710406 -Node: Simple Sed710535 -Node: Igawk Program713597 -Ref: Igawk Program-Footnote-1728773 -Ref: Igawk Program-Footnote-2728974 -Node: Anagram Program729112 -Node: Signature Program732180 -Node: Advanced Features733427 -Node: Nondecimal Data735313 -Node: Array Sorting736890 -Node: Controlling Array Traversal737587 -Node: Array Sorting Functions745867 -Ref: Array Sorting Functions-Footnote-1749774 -Node: Two-way I/O749968 -Ref: Two-way I/O-Footnote-1755484 -Node: TCP/IP Networking755566 -Node: Profiling758410 -Node: Internationalization765918 -Node: I18N and L10N767343 -Node: Explaining gettext768029 -Ref: Explaining gettext-Footnote-1773169 -Ref: Explaining gettext-Footnote-2773353 -Node: Programmer i18n773518 -Node: Translator i18n777743 -Node: String Extraction778537 -Ref: String Extraction-Footnote-1779498 -Node: Printf Ordering779584 -Ref: Printf Ordering-Footnote-1782366 -Node: I18N Portability782430 -Ref: I18N Portability-Footnote-1784879 -Node: I18N Example784942 -Ref: I18N Example-Footnote-1787664 -Node: Gawk I18N787736 -Node: Debugger788349 -Node: Debugging789320 -Node: Debugging Concepts789761 -Node: Debugging Terms791617 -Node: Awk Debugging794214 -Node: Sample Debugging Session795106 -Node: Debugger Invocation795626 -Node: Finding The Bug796959 -Node: List of Debugger Commands803441 -Node: Breakpoint Control804773 -Node: Debugger Execution Control808437 -Node: Viewing And Changing Data811797 -Node: Execution Stack815155 -Node: Debugger Info816668 -Node: Miscellaneous Debugger Commands820662 -Node: Readline Support825846 -Node: Limitations826738 -Node: Arbitrary Precision Arithmetic828986 -Ref: Arbitrary Precision Arithmetic-Footnote-1830635 -Node: General Arithmetic830783 -Node: Floating Point Issues832503 -Node: String Conversion Precision833384 -Ref: String Conversion Precision-Footnote-1835089 -Node: Unexpected Results835198 -Node: POSIX Floating Point Problems837351 -Ref: POSIX Floating Point Problems-Footnote-1841172 -Node: Integer Programming841210 -Node: Floating-point Programming843021 -Ref: Floating-point Programming-Footnote-1849349 -Ref: Floating-point Programming-Footnote-2849619 -Node: Floating-point Representation849883 -Node: Floating-point Context851048 -Ref: table-ieee-formats851887 -Node: Rounding Mode853271 -Ref: table-rounding-modes853750 -Ref: Rounding Mode-Footnote-1856765 -Node: Gawk and MPFR856944 -Node: Arbitrary Precision Floats858353 -Ref: Arbitrary Precision Floats-Footnote-1860796 -Node: Setting Precision861117 -Ref: table-predefined-precision-strings861801 -Node: Setting Rounding Mode863946 -Ref: table-gawk-rounding-modes864350 -Node: Floating-point Constants865537 -Node: Changing Precision866989 -Ref: Changing Precision-Footnote-1868381 -Node: Exact Arithmetic868555 -Node: Arbitrary Precision Integers871689 -Ref: Arbitrary Precision Integers-Footnote-1874704 -Node: Dynamic Extensions874851 -Node: Extension Intro876309 -Node: Plugin License877574 -Node: Extension Mechanism Outline878259 -Ref: figure-load-extension878683 -Ref: figure-load-new-function880168 -Ref: figure-call-new-function881170 -Node: Extension API Description883154 -Node: Extension API Functions Introduction884604 -Node: General Data Types889470 -Ref: General Data Types-Footnote-1895163 -Node: Requesting Values895462 -Ref: table-value-types-returned896199 -Node: Memory Allocation Functions897157 -Ref: Memory Allocation Functions-Footnote-1899904 -Node: Constructor Functions900000 -Node: Registration Functions901758 -Node: Extension Functions902443 -Node: Exit Callback Functions904745 -Node: Extension Version String905995 -Node: Input Parsers906645 -Node: Output Wrappers916448 -Node: Two-way processors920964 -Node: Printing Messages923168 -Ref: Printing Messages-Footnote-1924245 -Node: Updating `ERRNO'924397 -Node: Accessing Parameters925136 -Node: Symbol Table Access926366 -Node: Symbol table by name926880 -Node: Symbol table by cookie928856 -Ref: Symbol table by cookie-Footnote-1932989 -Node: Cached values933052 -Ref: Cached values-Footnote-1936557 -Node: Array Manipulation936648 -Ref: Array Manipulation-Footnote-1937746 -Node: Array Data Types937785 -Ref: Array Data Types-Footnote-1940488 -Node: Array Functions940580 -Node: Flattening Arrays944454 -Node: Creating Arrays951306 -Node: Extension API Variables956037 -Node: Extension Versioning956673 -Node: Extension API Informational Variables958574 -Node: Extension API Boilerplate959660 -Node: Finding Extensions963464 -Node: Extension Example964024 -Node: Internal File Description964754 -Node: Internal File Ops968845 -Ref: Internal File Ops-Footnote-1980391 -Node: Using Internal File Ops980531 -Ref: Using Internal File Ops-Footnote-1982878 -Node: Extension Samples983146 -Node: Extension Sample File Functions984670 -Node: Extension Sample Fnmatch992238 -Node: Extension Sample Fork993705 -Node: Extension Sample Inplace994918 -Node: Extension Sample Ord996684 -Node: Extension Sample Readdir997520 -Ref: table-readdir-file-types998369 -Node: Extension Sample Revout999168 -Node: Extension Sample Rev2way999759 -Node: Extension Sample Read write array1000500 -Node: Extension Sample Readfile1002379 -Node: Extension Sample API Tests1003479 -Node: Extension Sample Time1004004 -Node: gawkextlib1005319 -Node: Language History1008106 -Node: V7/SVR3.11009700 -Node: SVR41012020 -Node: POSIX1013462 -Node: BTL1014848 -Node: POSIX/GNU1015582 -Node: Feature History1021181 -Node: Common Extensions1034293 -Node: Ranges and Locales1035605 -Ref: Ranges and Locales-Footnote-11040222 -Ref: Ranges and Locales-Footnote-21040249 -Ref: Ranges and Locales-Footnote-31040483 -Node: Contributors1040704 -Node: Installation1046142 -Node: Gawk Distribution1047036 -Node: Getting1047520 -Node: Extracting1048346 -Node: Distribution contents1049988 -Node: Unix Installation1055705 -Node: Quick Installation1056322 -Node: Additional Configuration Options1058764 -Node: Configuration Philosophy1060502 -Node: Non-Unix Installation1062853 -Node: PC Installation1063311 -Node: PC Binary Installation1064622 -Node: PC Compiling1066470 -Ref: PC Compiling-Footnote-11069469 -Node: PC Testing1069574 -Node: PC Using1070750 -Node: Cygwin1074908 -Node: MSYS1075717 -Node: VMS Installation1076231 -Node: VMS Compilation1077027 -Ref: VMS Compilation-Footnote-11078242 -Node: VMS Dynamic Extensions1078300 -Node: VMS Installation Details1079673 -Node: VMS Running1081919 -Node: VMS GNV1084753 -Node: VMS Old Gawk1085476 -Node: Bugs1085946 -Node: Other Versions1089950 -Node: Notes1096175 -Node: Compatibility Mode1096975 -Node: Additions1097757 -Node: Accessing The Source1098682 -Node: Adding Code1100118 -Node: New Ports1106296 -Node: Derived Files1110777 -Ref: Derived Files-Footnote-11115858 -Ref: Derived Files-Footnote-21115892 -Ref: Derived Files-Footnote-31116488 -Node: Future Extensions1116602 -Node: Implementation Limitations1117208 -Node: Extension Design1118456 -Node: Old Extension Problems1119610 -Ref: Old Extension Problems-Footnote-11121127 -Node: Extension New Mechanism Goals1121184 -Ref: Extension New Mechanism Goals-Footnote-11124545 -Node: Extension Other Design Decisions1124734 -Node: Extension Future Growth1126840 -Node: Old Extension Mechanism1127676 -Node: Basic Concepts1129416 -Node: Basic High Level1130097 -Ref: figure-general-flow1130369 -Ref: figure-process-flow1130968 -Ref: Basic High Level-Footnote-11134197 -Node: Basic Data Typing1134382 -Node: Glossary1137709 -Node: Copying1162861 -Node: GNU Free Documentation License1200417 -Node: Index1225553 +Node: Foreword41210 +Node: Preface45555 +Ref: Preface-Footnote-148702 +Ref: Preface-Footnote-248809 +Node: History49041 +Node: Names51415 +Ref: Names-Footnote-152879 +Node: This Manual52952 +Ref: This Manual-Footnote-158731 +Node: Conventions58831 +Node: Manual History60987 +Ref: Manual History-Footnote-164426 +Ref: Manual History-Footnote-264467 +Node: How To Contribute64541 +Node: Acknowledgments65780 +Node: Getting Started69929 +Node: Running gawk72363 +Node: One-shot73553 +Node: Read Terminal74778 +Ref: Read Terminal-Footnote-176428 +Ref: Read Terminal-Footnote-276704 +Node: Long76875 +Node: Executable Scripts78223 +Ref: Executable Scripts-Footnote-180056 +Ref: Executable Scripts-Footnote-280158 +Node: Comments80691 +Node: Quoting83158 +Node: DOS Quoting88467 +Node: Sample Data Files89142 +Node: Very Simple91657 +Node: Two Rules96288 +Node: More Complex98183 +Ref: More Complex-Footnote-1101108 +Node: Statements/Lines101193 +Ref: Statements/Lines-Footnote-1105648 +Node: Other Features105913 +Node: When106841 +Node: Intro Summary109011 +Node: Invoking Gawk109777 +Node: Command Line111292 +Node: Options112083 +Ref: Options-Footnote-1127867 +Node: Other Arguments127892 +Node: Naming Standard Input130533 +Node: Environment Variables131613 +Node: AWKPATH Variable132171 +Ref: AWKPATH Variable-Footnote-1135022 +Ref: AWKPATH Variable-Footnote-2135067 +Node: AWKLIBPATH Variable135327 +Node: Other Environment Variables136086 +Node: Exit Status139741 +Node: Include Files140416 +Node: Loading Shared Libraries143980 +Node: Obsolete145364 +Node: Undocumented146061 +Node: Invoking Summary146328 +Node: Regexp147908 +Node: Regexp Usage149358 +Node: Escape Sequences151391 +Node: Regexp Operators157058 +Ref: Regexp Operators-Footnote-1164538 +Ref: Regexp Operators-Footnote-2164685 +Node: Bracket Expressions164783 +Ref: table-char-classes166673 +Node: GNU Regexp Operators169196 +Node: Case-sensitivity172919 +Ref: Case-sensitivity-Footnote-1175811 +Ref: Case-sensitivity-Footnote-2176046 +Node: Leftmost Longest176154 +Node: Computed Regexps177355 +Node: Regexp Summary180727 +Node: Reading Files182199 +Node: Records184201 +Node: awk split records184944 +Node: gawk split records189802 +Ref: gawk split records-Footnote-1194323 +Node: Fields194360 +Ref: Fields-Footnote-1197324 +Node: Nonconstant Fields197410 +Ref: Nonconstant Fields-Footnote-1199640 +Node: Changing Fields199842 +Node: Field Separators205796 +Node: Default Field Splitting208498 +Node: Regexp Field Splitting209615 +Node: Single Character Fields212956 +Node: Command Line Field Separator214015 +Node: Full Line Fields217357 +Ref: Full Line Fields-Footnote-1217865 +Node: Field Splitting Summary217911 +Ref: Field Splitting Summary-Footnote-1221010 +Node: Constant Size221111 +Node: Splitting By Content225718 +Ref: Splitting By Content-Footnote-1229468 +Node: Multiple Line229508 +Ref: Multiple Line-Footnote-1235364 +Node: Getline235543 +Node: Plain Getline237759 +Node: Getline/Variable239854 +Node: Getline/File241001 +Node: Getline/Variable/File242377 +Ref: Getline/Variable/File-Footnote-1243976 +Node: Getline/Pipe244063 +Node: Getline/Variable/Pipe246762 +Node: Getline/Coprocess247869 +Node: Getline/Variable/Coprocess249121 +Node: Getline Notes249858 +Node: Getline Summary252662 +Ref: table-getline-variants253070 +Node: Read Timeout253982 +Ref: Read Timeout-Footnote-1257809 +Node: Command line directories257867 +Node: Printing258749 +Node: Print260373 +Node: Print Examples261714 +Node: Output Separators264493 +Node: OFMT266509 +Node: Printf267867 +Node: Basic Printf268773 +Node: Control Letters270312 +Node: Format Modifiers274166 +Node: Printf Examples280193 +Node: Redirection282900 +Node: Special Files289847 +Node: Special FD290363 +Ref: Special FD-Footnote-1293938 +Node: Special Network294012 +Node: Special Caveats294848 +Node: Close Files And Pipes295623 +Ref: Close Files And Pipes-Footnote-1302739 +Ref: Close Files And Pipes-Footnote-2302887 +Node: Expressions303037 +Node: Values304169 +Node: Constants304845 +Node: Scalar Constants305525 +Ref: Scalar Constants-Footnote-1306384 +Node: Nondecimal-numbers306634 +Node: Regexp Constants309634 +Node: Using Constant Regexps310109 +Node: Variables313179 +Node: Using Variables313834 +Node: Assignment Options315558 +Node: Conversion317425 +Ref: table-locale-affects322861 +Ref: Conversion-Footnote-1323485 +Node: All Operators323594 +Node: Arithmetic Ops324224 +Node: Concatenation326729 +Ref: Concatenation-Footnote-1329525 +Node: Assignment Ops329645 +Ref: table-assign-ops334628 +Node: Increment Ops335945 +Node: Truth Values and Conditions339383 +Node: Truth Values340466 +Node: Typing and Comparison341515 +Node: Variable Typing342308 +Ref: Variable Typing-Footnote-1346208 +Node: Comparison Operators346330 +Ref: table-relational-ops346740 +Node: POSIX String Comparison350290 +Ref: POSIX String Comparison-Footnote-1351374 +Node: Boolean Ops351512 +Ref: Boolean Ops-Footnote-1355582 +Node: Conditional Exp355673 +Node: Function Calls357400 +Node: Precedence361158 +Node: Locales364827 +Node: Patterns and Actions366430 +Node: Pattern Overview367484 +Node: Regexp Patterns369161 +Node: Expression Patterns369704 +Node: Ranges373485 +Node: BEGIN/END376591 +Node: Using BEGIN/END377353 +Ref: Using BEGIN/END-Footnote-1380089 +Node: I/O And BEGIN/END380195 +Node: BEGINFILE/ENDFILE382480 +Node: Empty385411 +Node: Using Shell Variables385728 +Node: Action Overview388011 +Node: Statements390338 +Node: If Statement392186 +Node: While Statement393684 +Node: Do Statement395728 +Node: For Statement396884 +Node: Switch Statement400036 +Node: Break Statement402139 +Node: Continue Statement404194 +Node: Next Statement405987 +Node: Nextfile Statement408377 +Node: Exit Statement411032 +Node: Built-in Variables413436 +Node: User-modified414532 +Ref: User-modified-Footnote-1422217 +Node: Auto-set422279 +Ref: Auto-set-Footnote-1435162 +Ref: Auto-set-Footnote-2435367 +Node: ARGC and ARGV435423 +Node: Arrays439262 +Node: Array Basics440760 +Node: Array Intro441586 +Ref: figure-array-elements443559 +Node: Reference to Elements445966 +Node: Assigning Elements448239 +Node: Array Example448730 +Node: Scanning an Array450462 +Node: Controlling Scanning453477 +Ref: Controlling Scanning-Footnote-1458650 +Node: Delete458966 +Ref: Delete-Footnote-1461731 +Node: Numeric Array Subscripts461788 +Node: Uninitialized Subscripts463971 +Node: Multidimensional465596 +Node: Multiscanning468689 +Node: Arrays of Arrays470278 +Node: Functions474918 +Node: Built-in475737 +Node: Calling Built-in476815 +Node: Numeric Functions478803 +Ref: Numeric Functions-Footnote-1482637 +Ref: Numeric Functions-Footnote-2482994 +Ref: Numeric Functions-Footnote-3483042 +Node: String Functions483311 +Ref: String Functions-Footnote-1506322 +Ref: String Functions-Footnote-2506451 +Ref: String Functions-Footnote-3506699 +Node: Gory Details506786 +Ref: table-sub-escapes508455 +Ref: table-sub-posix-92509809 +Ref: table-sub-proposed511160 +Ref: table-posix-sub512514 +Ref: table-gensub-escapes514059 +Ref: Gory Details-Footnote-1515235 +Ref: Gory Details-Footnote-2515286 +Node: I/O Functions515437 +Ref: I/O Functions-Footnote-1522560 +Node: Time Functions522707 +Ref: Time Functions-Footnote-1533171 +Ref: Time Functions-Footnote-2533239 +Ref: Time Functions-Footnote-3533397 +Ref: Time Functions-Footnote-4533508 +Ref: Time Functions-Footnote-5533620 +Ref: Time Functions-Footnote-6533847 +Node: Bitwise Functions534113 +Ref: table-bitwise-ops534675 +Ref: Bitwise Functions-Footnote-1538920 +Node: Type Functions539104 +Node: I18N Functions540246 +Node: User-defined541891 +Node: Definition Syntax542695 +Ref: Definition Syntax-Footnote-1547620 +Node: Function Example547689 +Ref: Function Example-Footnote-1550333 +Node: Function Caveats550355 +Node: Calling A Function550873 +Node: Variable Scope551828 +Node: Pass By Value/Reference554816 +Node: Return Statement558324 +Node: Dynamic Typing561308 +Node: Indirect Calls562237 +Node: Library Functions571924 +Ref: Library Functions-Footnote-1575437 +Ref: Library Functions-Footnote-2575580 +Node: Library Names575751 +Ref: Library Names-Footnote-1579224 +Ref: Library Names-Footnote-2579444 +Node: General Functions579530 +Node: Strtonum Function580558 +Node: Assert Function583488 +Node: Round Function586814 +Node: Cliff Random Function588355 +Node: Ordinal Functions589371 +Ref: Ordinal Functions-Footnote-1592448 +Ref: Ordinal Functions-Footnote-2592700 +Node: Join Function592911 +Ref: Join Function-Footnote-1594682 +Node: Getlocaltime Function594882 +Node: Readfile Function598618 +Node: Data File Management600457 +Node: Filetrans Function601089 +Node: Rewind Function605144 +Node: File Checking606531 +Ref: File Checking-Footnote-1607663 +Node: Empty Files607864 +Node: Ignoring Assigns610087 +Node: Getopt Function611618 +Ref: Getopt Function-Footnote-1622914 +Node: Passwd Functions623117 +Ref: Passwd Functions-Footnote-1632096 +Node: Group Functions632184 +Ref: Group Functions-Footnote-1640126 +Node: Walking Arrays640339 +Node: Sample Programs642475 +Node: Running Examples643149 +Node: Clones643877 +Node: Cut Program645101 +Node: Egrep Program654962 +Ref: Egrep Program-Footnote-1662891 +Node: Id Program663001 +Node: Split Program666665 +Ref: Split Program-Footnote-1670196 +Node: Tee Program670324 +Node: Uniq Program673131 +Node: Wc Program680561 +Ref: Wc Program-Footnote-1684829 +Ref: Wc Program-Footnote-2685029 +Node: Miscellaneous Programs685121 +Node: Dupword Program686309 +Node: Alarm Program688340 +Node: Translate Program693154 +Ref: Translate Program-Footnote-1697545 +Ref: Translate Program-Footnote-2697815 +Node: Labels Program697949 +Ref: Labels Program-Footnote-1701320 +Node: Word Sorting701404 +Node: History Sorting705447 +Node: Extract Program707283 +Ref: Extract Program-Footnote-1714858 +Node: Simple Sed714987 +Node: Igawk Program718049 +Ref: Igawk Program-Footnote-1733225 +Ref: Igawk Program-Footnote-2733426 +Node: Anagram Program733564 +Node: Signature Program736632 +Node: Advanced Features737879 +Node: Nondecimal Data739765 +Node: Array Sorting741342 +Node: Controlling Array Traversal742039 +Node: Array Sorting Functions750319 +Ref: Array Sorting Functions-Footnote-1754226 +Node: Two-way I/O754420 +Ref: Two-way I/O-Footnote-1759936 +Node: TCP/IP Networking760018 +Node: Profiling762862 +Node: Internationalization770370 +Node: I18N and L10N771795 +Node: Explaining gettext772481 +Ref: Explaining gettext-Footnote-1777621 +Ref: Explaining gettext-Footnote-2777805 +Node: Programmer i18n777970 +Node: Translator i18n782195 +Node: String Extraction782989 +Ref: String Extraction-Footnote-1783950 +Node: Printf Ordering784036 +Ref: Printf Ordering-Footnote-1786818 +Node: I18N Portability786882 +Ref: I18N Portability-Footnote-1789331 +Node: I18N Example789394 +Ref: I18N Example-Footnote-1792116 +Node: Gawk I18N792188 +Node: Debugger792801 +Node: Debugging793772 +Node: Debugging Concepts794213 +Node: Debugging Terms796069 +Node: Awk Debugging798666 +Node: Sample Debugging Session799558 +Node: Debugger Invocation800078 +Node: Finding The Bug801411 +Node: List of Debugger Commands807893 +Node: Breakpoint Control809225 +Node: Debugger Execution Control812889 +Node: Viewing And Changing Data816249 +Node: Execution Stack819607 +Node: Debugger Info821120 +Node: Miscellaneous Debugger Commands825114 +Node: Readline Support830298 +Node: Limitations831190 +Node: Arbitrary Precision Arithmetic833438 +Ref: Arbitrary Precision Arithmetic-Footnote-1835087 +Node: General Arithmetic835235 +Node: Floating Point Issues836955 +Node: String Conversion Precision837836 +Ref: String Conversion Precision-Footnote-1839541 +Node: Unexpected Results839650 +Node: POSIX Floating Point Problems841803 +Ref: POSIX Floating Point Problems-Footnote-1845624 +Node: Integer Programming845662 +Node: Floating-point Programming847473 +Ref: Floating-point Programming-Footnote-1853801 +Ref: Floating-point Programming-Footnote-2854071 +Node: Floating-point Representation854335 +Node: Floating-point Context855500 +Ref: table-ieee-formats856339 +Node: Rounding Mode857723 +Ref: table-rounding-modes858202 +Ref: Rounding Mode-Footnote-1861217 +Node: Gawk and MPFR861396 +Node: Arbitrary Precision Floats862805 +Ref: Arbitrary Precision Floats-Footnote-1865248 +Node: Setting Precision865569 +Ref: table-predefined-precision-strings866253 +Node: Setting Rounding Mode868398 +Ref: table-gawk-rounding-modes868802 +Node: Floating-point Constants869989 +Node: Changing Precision871441 +Ref: Changing Precision-Footnote-1872833 +Node: Exact Arithmetic873007 +Node: Arbitrary Precision Integers876141 +Ref: Arbitrary Precision Integers-Footnote-1879156 +Node: Dynamic Extensions879303 +Node: Extension Intro880761 +Node: Plugin License882026 +Node: Extension Mechanism Outline882711 +Ref: figure-load-extension883135 +Ref: figure-load-new-function884620 +Ref: figure-call-new-function885622 +Node: Extension API Description887606 +Node: Extension API Functions Introduction889056 +Node: General Data Types893922 +Ref: General Data Types-Footnote-1899615 +Node: Requesting Values899914 +Ref: table-value-types-returned900651 +Node: Memory Allocation Functions901609 +Ref: Memory Allocation Functions-Footnote-1904356 +Node: Constructor Functions904452 +Node: Registration Functions906210 +Node: Extension Functions906895 +Node: Exit Callback Functions909197 +Node: Extension Version String910447 +Node: Input Parsers911097 +Node: Output Wrappers920900 +Node: Two-way processors925416 +Node: Printing Messages927620 +Ref: Printing Messages-Footnote-1928697 +Node: Updating `ERRNO'928849 +Node: Accessing Parameters929588 +Node: Symbol Table Access930818 +Node: Symbol table by name931332 +Node: Symbol table by cookie933308 +Ref: Symbol table by cookie-Footnote-1937441 +Node: Cached values937504 +Ref: Cached values-Footnote-1941009 +Node: Array Manipulation941100 +Ref: Array Manipulation-Footnote-1942198 +Node: Array Data Types942237 +Ref: Array Data Types-Footnote-1944940 +Node: Array Functions945032 +Node: Flattening Arrays948906 +Node: Creating Arrays955758 +Node: Extension API Variables960489 +Node: Extension Versioning961125 +Node: Extension API Informational Variables963026 +Node: Extension API Boilerplate964112 +Node: Finding Extensions967916 +Node: Extension Example968476 +Node: Internal File Description969206 +Node: Internal File Ops973297 +Ref: Internal File Ops-Footnote-1984843 +Node: Using Internal File Ops984983 +Ref: Using Internal File Ops-Footnote-1987330 +Node: Extension Samples987598 +Node: Extension Sample File Functions989122 +Node: Extension Sample Fnmatch996690 +Node: Extension Sample Fork998157 +Node: Extension Sample Inplace999370 +Node: Extension Sample Ord1001136 +Node: Extension Sample Readdir1001972 +Ref: table-readdir-file-types1002821 +Node: Extension Sample Revout1003620 +Node: Extension Sample Rev2way1004211 +Node: Extension Sample Read write array1004952 +Node: Extension Sample Readfile1006831 +Node: Extension Sample API Tests1007931 +Node: Extension Sample Time1008456 +Node: gawkextlib1009771 +Node: Language History1012558 +Node: V7/SVR3.11014152 +Node: SVR41016472 +Node: POSIX1017914 +Node: BTL1019300 +Node: POSIX/GNU1020034 +Node: Feature History1025633 +Node: Common Extensions1038745 +Node: Ranges and Locales1040057 +Ref: Ranges and Locales-Footnote-11044674 +Ref: Ranges and Locales-Footnote-21044701 +Ref: Ranges and Locales-Footnote-31044935 +Node: Contributors1045156 +Node: Installation1050594 +Node: Gawk Distribution1051488 +Node: Getting1051972 +Node: Extracting1052798 +Node: Distribution contents1054440 +Node: Unix Installation1060157 +Node: Quick Installation1060774 +Node: Additional Configuration Options1063216 +Node: Configuration Philosophy1064954 +Node: Non-Unix Installation1067305 +Node: PC Installation1067763 +Node: PC Binary Installation1069074 +Node: PC Compiling1070922 +Ref: PC Compiling-Footnote-11073921 +Node: PC Testing1074026 +Node: PC Using1075202 +Node: Cygwin1079360 +Node: MSYS1080169 +Node: VMS Installation1080683 +Node: VMS Compilation1081479 +Ref: VMS Compilation-Footnote-11082694 +Node: VMS Dynamic Extensions1082752 +Node: VMS Installation Details1084125 +Node: VMS Running1086371 +Node: VMS GNV1089205 +Node: VMS Old Gawk1089928 +Node: Bugs1090398 +Node: Other Versions1094402 +Node: Notes1100627 +Node: Compatibility Mode1101427 +Node: Additions1102209 +Node: Accessing The Source1103134 +Node: Adding Code1104570 +Node: New Ports1110748 +Node: Derived Files1115229 +Ref: Derived Files-Footnote-11120310 +Ref: Derived Files-Footnote-21120344 +Ref: Derived Files-Footnote-31120940 +Node: Future Extensions1121054 +Node: Implementation Limitations1121660 +Node: Extension Design1122908 +Node: Old Extension Problems1124062 +Ref: Old Extension Problems-Footnote-11125579 +Node: Extension New Mechanism Goals1125636 +Ref: Extension New Mechanism Goals-Footnote-11128997 +Node: Extension Other Design Decisions1129186 +Node: Extension Future Growth1131292 +Node: Old Extension Mechanism1132128 +Node: Basic Concepts1133868 +Node: Basic High Level1134549 +Ref: figure-general-flow1134821 +Ref: figure-process-flow1135420 +Ref: Basic High Level-Footnote-11138649 +Node: Basic Data Typing1138834 +Node: Glossary1142161 +Node: Copying1167313 +Node: GNU Free Documentation License1204869 +Node: Index1230005 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index aefd080d..8bacaca7 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -471,8 +471,8 @@ particular records in a file and perform operations upon them. includes command-line syntax. * One-shot:: Running a short throwaway @command{awk} program. -* Read Terminal:: Using no input files (input from - the keyboard instead). +* Read Terminal:: Using no input files (input from the + keyboard instead). * Long:: Putting permanent @command{awk} programs in files. * Executable Scripts:: Making self-contained @command{awk} @@ -494,6 +494,7 @@ particular records in a file and perform operations upon them. * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. * Command Line:: How to run @command{awk}. * Options:: Command-line options and their meanings. @@ -515,6 +516,7 @@ particular records in a file and perform operations upon them. program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. * Regexp Usage:: How to Use Regular Expressions. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. @@ -523,8 +525,12 @@ particular records in a file and perform operations upon them. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. +* awk split records:: How standard @command{awk} splits + records. +* gawk split records:: How @command{gawk} splits records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. * Changing Fields:: Changing the Contents of a Field. @@ -981,8 +987,8 @@ particular records in a file and perform operations upon them. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the @@ -1300,9 +1306,6 @@ has been removed.) * Conventions:: Typographical Conventions. * Manual History:: Brief history of the GNU project and this @value{DOCUMENT}. -@ifset FOR_PRINT -* Staying current:: How to keep up. -@end ifset * How To Contribute:: Helping to save the world. * Acknowledgments:: Acknowledgments. @end menu @@ -1861,7 +1864,7 @@ find an error in this @value{DOCUMENT}, please report it! @xref{Bugs}, for information on submitting problem reports electronically. @ifset FOR_PRINT -@node Staying current +@c fakenode --- for prepinfo @unnumberedsec How to Stay Current It may be you have a version of @command{gawk} which is newer than the @@ -2178,6 +2181,7 @@ program looks like this: * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. @end menu @node Running gawk @@ -3369,6 +3373,39 @@ Programs in these languages may require more lines of source code than the equivalent @command{awk} programs, but they are easier to maintain and usually run more efficiently. +@node Intro Summary +@section Summary + +@itemize @value{BULLET} +@item +Programs in @command{awk} consist of @var{pattern}-@var{action} pairs. + +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +You may use the special @samp{#!} header line to create @command{awk} +programs that are directly executable. + +@item +Comments in @command{awk} programs start with @samp{#} and continue to +the end of the same line. + +@item +Be aware of quoting issues when writing @command{awk} programs as +part of a larger shell script (or MS-Windows batch file). + +@item +You may use backslash continuation to continue a source line. +Lines are automatically continued after +a comma, open brace, question mark, colon, +@samp{||}, @samp{&&}, @code{do} and @code{else}. +@end itemize + @node Invoking Gawk @chapter Running @command{awk} and @command{gawk} @@ -3397,6 +3434,7 @@ things in this @value{CHAPTER} that don't interest you right now. * Loading Shared Libraries:: Loading shared libraries into your program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. @end menu @node Command Line @@ -4566,6 +4604,58 @@ long-undocumented ``feature'' of Unix @code{awk}. @end ignore +@node Invoking Summary +@section Summary + +@itemize @value{BULLET} +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +The three standard @command{awk} options are @option{-f}, @option{-F} +and @option{-v}. @command{gawk} supplies these and many others, as well +as corresponding GNU-style long options. + +@item +Non-option command-line arguments are usually treated as @value{FN}s, +unless they have the form @samp{@var{var}=@var{value}}, in which case +they are taken as variable assignments to be performed at that point +in processing the input. + +@item +All non-option command-line arguments, excluding the program text, +are placed in the @code{ARGV} array. Adjusting @code{ARGC} and @code{ARGV} +affects how @command{awk} processes input. + +@item +You can use a single minus sign (@samp{-}) to refer to standard input +on the command line. + +@item +@command{gawk} pays attention to a number of environment variables. +@env{AWKPATH}, @env{AWKLIBPATH}, and @env{POSIXLY_CORRECT} are the +most important ones. + +@item +@command{gawk}'s exit status conveys information to the program +that invoked it. Use the @code{exit} statement from within +an @command{awk} program to set the exit status. + +@item +@command{gawk} allows you to include other @command{awk} source files into +your program using the @code{@@include} statement and/or the @option{-i} +and @option{-f} command-line options. + +@item +@command{gawk} allows you to load additional functions written in C +or C++ using the @code{@@load} statement and/or the @option{-l} option. +(This advanced feature is described later on in @ref{Dynamic Extensions}.) +@end itemize + @node Regexp @chapter Regular Expressions @cindex regexp @@ -4604,6 +4694,7 @@ regular expressions work, we present more complicated instances. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. @end menu @node Regexp Usage @@ -5841,6 +5932,52 @@ occur often in practice, but it's worth noting for future reference. @end ifnotdocbook @c ENDOFRANGE dregexp @c ENDOFRANGE regexpd + +@node Regexp Summary +@section Summary + +@itemize @value{BULLET} +@item +Regular expressions describe sets of strings to be matched. +In @command{awk}, regular expression constants are written enclosed +between slashes: @code{/}@dots{}@code{/}. + +@item +Regexp constants may be used by standalone in patterns and +in conditional expressions, or as part of matching expressions +using the @samp{~} and @samp{!~} operators. + +@item +Escape sequences let you represent non-printable characters and +also let you represent regexp metacharacters as literal characters +to be matched. + +@item +Regexp operators provide grouping, alternation and repetition. + +@item +Bracket expressions give you a shorthand for specifyings sets +of characters that can match at a particular point in a regexp. +Within bracket expressions, POSIX character classes let you specify +certain groups of characters in a locale-independent fashion. + +@item +@command{gawk}'s @code{IGNORECASE} variable lets you control the +case sensitivity of regexp matching. In other @command{awk} +versions, use @code{tolower()} or @code{toupper()}. + +@item +Regular expressions match the leftmost longest text in the string being +matched. This matters for cases where you need to know the extent of +the match, such as for text substitution and when the record separator +is a regexp. + +@item +Matching expressions may use dynamic regexps; that is string values +treated as regular expressions. + +@end itemize + @c ENDOFRANGE regexp @node Reading Files @@ -5913,8 +6050,8 @@ number of input records read so far from all @value{DF}s. It starts at zero, but is never automatically reset to zero. @menu -* awk split records:: How standard @command{awk} splits records. -* gawk split records:: How @command{gawk} splits records. +* awk split records:: How standard @command{awk} splits records. +* gawk split records:: How @command{gawk} splits records. @end menu @node awk split records @@ -11723,7 +11860,7 @@ has the value one if @code{x} contains @samp{foo}, such as @cindex @code{!} (exclamation point), @code{!~} operator @cindex exclamation point (@code{!}), @code{!~} operator The righthand operand of the @samp{~} and @samp{!~} operators may be -either a regexp constant (@code{/@dots{}/}) or an ordinary +either a regexp constant (@code{/}@dots{}@code{/}) or an ordinary expression. In the latter case, the value of the expression as a string is used as a dynamic regexp (@pxref{Regexp Usage}; also @pxref{Computed Regexps}). @@ -37296,8 +37433,8 @@ as well as any considerations you should bear in mind. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. @end menu @node Accessing The Source diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 11583184..181afa15 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -466,8 +466,8 @@ particular records in a file and perform operations upon them. includes command-line syntax. * One-shot:: Running a short throwaway @command{awk} program. -* Read Terminal:: Using no input files (input from - the keyboard instead). +* Read Terminal:: Using no input files (input from the + keyboard instead). * Long:: Putting permanent @command{awk} programs in files. * Executable Scripts:: Making self-contained @command{awk} @@ -489,6 +489,7 @@ particular records in a file and perform operations upon them. * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. * Command Line:: How to run @command{awk}. * Options:: Command-line options and their meanings. @@ -510,6 +511,7 @@ particular records in a file and perform operations upon them. program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. * Regexp Usage:: How to Use Regular Expressions. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. @@ -518,8 +520,12 @@ particular records in a file and perform operations upon them. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. +* awk split records:: How standard @command{awk} splits + records. +* gawk split records:: How @command{gawk} splits records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. * Changing Fields:: Changing the Contents of a Field. @@ -976,8 +982,8 @@ particular records in a file and perform operations upon them. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the @@ -1295,9 +1301,6 @@ has been removed.) * Conventions:: Typographical Conventions. * Manual History:: Brief history of the GNU project and this @value{DOCUMENT}. -@ifset FOR_PRINT -* Staying current:: How to keep up. -@end ifset * How To Contribute:: Helping to save the world. * Acknowledgments:: Acknowledgments. @end menu @@ -1828,7 +1831,7 @@ find an error in this @value{DOCUMENT}, please report it! @xref{Bugs}, for information on submitting problem reports electronically. @ifset FOR_PRINT -@node Staying current +@c fakenode --- for prepinfo @unnumberedsec How to Stay Current It may be you have a version of @command{gawk} which is newer than the @@ -2145,6 +2148,7 @@ program looks like this: * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. @end menu @node Running gawk @@ -3297,6 +3301,39 @@ Programs in these languages may require more lines of source code than the equivalent @command{awk} programs, but they are easier to maintain and usually run more efficiently. +@node Intro Summary +@section Summary + +@itemize @value{BULLET} +@item +Programs in @command{awk} consist of @var{pattern}-@var{action} pairs. + +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +You may use the special @samp{#!} header line to create @command{awk} +programs that are directly executable. + +@item +Comments in @command{awk} programs start with @samp{#} and continue to +the end of the same line. + +@item +Be aware of quoting issues when writing @command{awk} programs as +part of a larger shell script (or MS-Windows batch file). + +@item +You may use backslash continuation to continue a source line. +Lines are automatically continued after +a comma, open brace, question mark, colon, +@samp{||}, @samp{&&}, @code{do} and @code{else}. +@end itemize + @node Invoking Gawk @chapter Running @command{awk} and @command{gawk} @@ -3325,6 +3362,7 @@ things in this @value{CHAPTER} that don't interest you right now. * Loading Shared Libraries:: Loading shared libraries into your program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. @end menu @node Command Line @@ -4494,6 +4532,58 @@ long-undocumented ``feature'' of Unix @code{awk}. @end ignore +@node Invoking Summary +@section Summary + +@itemize @value{BULLET} +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +The three standard @command{awk} options are @option{-f}, @option{-F} +and @option{-v}. @command{gawk} supplies these and many others, as well +as corresponding GNU-style long options. + +@item +Non-option command-line arguments are usually treated as @value{FN}s, +unless they have the form @samp{@var{var}=@var{value}}, in which case +they are taken as variable assignments to be performed at that point +in processing the input. + +@item +All non-option command-line arguments, excluding the program text, +are placed in the @code{ARGV} array. Adjusting @code{ARGC} and @code{ARGV} +affects how @command{awk} processes input. + +@item +You can use a single minus sign (@samp{-}) to refer to standard input +on the command line. + +@item +@command{gawk} pays attention to a number of environment variables. +@env{AWKPATH}, @env{AWKLIBPATH}, and @env{POSIXLY_CORRECT} are the +most important ones. + +@item +@command{gawk}'s exit status conveys information to the program +that invoked it. Use the @code{exit} statement from within +an @command{awk} program to set the exit status. + +@item +@command{gawk} allows you to include other @command{awk} source files into +your program using the @code{@@include} statement and/or the @option{-i} +and @option{-f} command-line options. + +@item +@command{gawk} allows you to load additional functions written in C +or C++ using the @code{@@load} statement and/or the @option{-l} option. +(This advanced feature is described later on in @ref{Dynamic Extensions}.) +@end itemize + @node Regexp @chapter Regular Expressions @cindex regexp @@ -4532,6 +4622,7 @@ regular expressions work, we present more complicated instances. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. @end menu @node Regexp Usage @@ -5642,6 +5733,52 @@ occur often in practice, but it's worth noting for future reference. @end sidebar @c ENDOFRANGE dregexp @c ENDOFRANGE regexpd + +@node Regexp Summary +@section Summary + +@itemize @value{BULLET} +@item +Regular expressions describe sets of strings to be matched. +In @command{awk}, regular expression constants are written enclosed +between slashes: @code{/}@dots{}@code{/}. + +@item +Regexp constants may be used by standalone in patterns and +in conditional expressions, or as part of matching expressions +using the @samp{~} and @samp{!~} operators. + +@item +Escape sequences let you represent non-printable characters and +also let you represent regexp metacharacters as literal characters +to be matched. + +@item +Regexp operators provide grouping, alternation and repetition. + +@item +Bracket expressions give you a shorthand for specifyings sets +of characters that can match at a particular point in a regexp. +Within bracket expressions, POSIX character classes let you specify +certain groups of characters in a locale-independent fashion. + +@item +@command{gawk}'s @code{IGNORECASE} variable lets you control the +case sensitivity of regexp matching. In other @command{awk} +versions, use @code{tolower()} or @code{toupper()}. + +@item +Regular expressions match the leftmost longest text in the string being +matched. This matters for cases where you need to know the extent of +the match, such as for text substitution and when the record separator +is a regexp. + +@item +Matching expressions may use dynamic regexps; that is string values +treated as regular expressions. + +@end itemize + @c ENDOFRANGE regexp @node Reading Files @@ -5714,8 +5851,8 @@ number of input records read so far from all @value{DF}s. It starts at zero, but is never automatically reset to zero. @menu -* awk split records:: How standard @command{awk} splits records. -* gawk split records:: How @command{gawk} splits records. +* awk split records:: How standard @command{awk} splits records. +* gawk split records:: How @command{gawk} splits records. @end menu @node awk split records @@ -11103,7 +11240,7 @@ has the value one if @code{x} contains @samp{foo}, such as @cindex @code{!} (exclamation point), @code{!~} operator @cindex exclamation point (@code{!}), @code{!~} operator The righthand operand of the @samp{~} and @samp{!~} operators may be -either a regexp constant (@code{/@dots{}/}) or an ordinary +either a regexp constant (@code{/}@dots{}@code{/}) or an ordinary expression. In the latter case, the value of the expression as a string is used as a dynamic regexp (@pxref{Regexp Usage}; also @pxref{Computed Regexps}). @@ -36440,8 +36577,8 @@ as well as any considerations you should bear in mind. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. @end menu @node Accessing The Source diff --git a/helpers/ChangeLog b/helpers/ChangeLog index 17624c3f..c9121403 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2014-06-08 Arnold D. Robbins <arnold@skeeve.com> + + * testdfa.c: Minor improvements. + 2014-04-08 Arnold D. Robbins <arnold@skeeve.com> * 4.1.1: Release tar ball made. diff --git a/helpers/testdfa.c b/helpers/testdfa.c index 813acaab..25a229a2 100644 --- a/helpers/testdfa.c +++ b/helpers/testdfa.c @@ -40,14 +40,16 @@ #include <sys/stat.h> +#undef _Noreturn #define _Noreturn +#define _GL_ATTRIBUTE_PURE #include "dfa.h" const char *regexflags2str(int flags); char *databuf(int fd); const char * reflags2str(int flagval); int parse_escape(const char **string_ptr); -char *setup_pattern(const char *pattern, size_t len); +char *setup_pattern(const char *pattern, size_t *len); char casetable[]; reg_syntax_t syn; @@ -126,10 +128,10 @@ int main(int argc, char **argv) printf("Ignorecase: %s\nSyntax: %s\n", (ignorecase ? "true" : "false"), reflags2str(syn)); - printf("Pattern: /%s/\n", pattern); + printf("Pattern: /%s/, len = %d\n", pattern, len); - pattern = setup_pattern(pattern, len); - len = strlen(pattern); + pattern = setup_pattern(pattern, & len); + printf("After setup_pattern(), len = %d\n", len); pat.fastmap = (char *) malloc(256); if (pat.fastmap == NULL) { @@ -191,7 +193,10 @@ int main(int argc, char **argv) &count, &try_backref); data[len] = save; - printf("dfaexec returned %p (%.3s)\n", place, place); + if (place == NULL) + printf("dfaexec returned NULL\n"); + else + printf("dfaexec returned %d (%.3s)\n", place - data, place); /* release storage */ regfree(& pat); @@ -363,7 +368,7 @@ r_fatal(const char *mesg, ...) /* setup_pattern --- do what gawk does with the pattern string */ char * -setup_pattern(const char *pattern, size_t len) +setup_pattern(const char *pattern, size_t *len) { size_t is_multibyte = 0; int c, c2; @@ -377,7 +382,7 @@ setup_pattern(const char *pattern, size_t len) memset(& mbs, 0, sizeof(mbs)); src = pattern; - end = pattern + len; + end = pattern + *len; /* Handle escaped characters first. */ @@ -387,19 +392,19 @@ setup_pattern(const char *pattern, size_t len) * from that. */ if (buf == NULL) { - buf = (char *) malloc(len + 2); + buf = (char *) malloc(*len + 2); if (buf == NULL) { fprintf(stderr, "%s: malloc failed\n", __func__); exit(EXIT_FAILURE); } - buflen = len; - } else if (len > buflen) { - buf = (char *) realloc(buf, len + 2); + buflen = *len; + } else if (*len > buflen) { + buf = (char *) realloc(buf, *len + 2); if (buf == NULL) { fprintf(stderr, "%s: realloc failed\n", __func__); exit(EXIT_FAILURE); } - buflen = len; + buflen = *len; } dest = buf; @@ -487,7 +492,7 @@ setup_pattern(const char *pattern, size_t len) } /* while */ *dest = '\0'; - len = dest - buf; + *len = dest - buf; return buf; } diff --git a/test/ChangeLog b/test/ChangeLog index 5de042ea..cd5e5fa8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2014-06-08 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (dbugeval): Add leading @ to recipe. Ooops. + 2014-05-30 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (regnul1, regnul2): New tests. diff --git a/test/Makefile.am b/test/Makefile.am index 4f5f8c27..077c5ea2 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1944,7 +1944,7 @@ backsmalls2: dbugeval:: @echo $@ - $(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @$(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: diff --git a/test/Makefile.in b/test/Makefile.in index 25d26148..a603f0b4 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2367,7 +2367,7 @@ backsmalls2: dbugeval:: @echo $@ - $(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @$(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program |