diff options
-rw-r--r-- | doc/README.DGAWK | 304 | ||||
-rw-r--r-- | doc/gawk.info | 1713 | ||||
-rw-r--r-- | doc/gawk.texi | 950 | ||||
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/Makefile.am | 1 | ||||
-rw-r--r-- | test/Makefile.in | 1 |
6 files changed, 998 insertions, 1975 deletions
diff --git a/doc/README.DGAWK b/doc/README.DGAWK deleted file mode 100644 index ac54e29c..00000000 --- a/doc/README.DGAWK +++ /dev/null @@ -1,304 +0,0 @@ -INVOKING: - - Invoking dgawk is similar to gawk. Run dgawk with all options and arguments as -you would supply to gawk. Command line scripts can not be debugged using dgawk. -dgawk expects at least one program text included via the -f option. If you include -programs using the --source option, dgawk will not stop at instructions originating -from that source. - -USAGE: - - $> dgawk -f foo.awk - dgawk> list - ... - dgawk> break 5 - ... - dgawk> run - ... - dgawk> next - ... - dgawk> continue - ... - dgawk> quit - - -COMMANDS: - - * help [command] - prints a list of all commands and short descriptions. - 'help command' prints the information about command 'command'. - - * info source|sources|variables|functions|break|frame|args|locals|display|watch - * source - name of the current source file. Each time the program stops, the - current source file is the file containing the current instruction. - When dgawk first starts, the current source file is the first file - included via the -f option. The 'list filename:lineno' command can - be used at any time to change the current source. - * sources - list all program sources. - * variables - list all global variables. - * functions - list all function definitions including source file names and - line numbers. - * break - list all currently set breakpoints. - * frame - description of the selected stack frame. - * args - arguments of the selected frame. - * locals - local variables of the selected frame. - * display - list of all items in the automatic display list. - * watch - list of all items in the watch list. - - * list [-|+|n|filename:n|m-n|function] - prints specified lines (default 15) from the current source file - or file named 'filename'. - - print lines before the lines last printed. - + print lines after the lines last printed. - list without any argument does the same thing. - n print lines centered around line number 'n'. - m-n print lines from 'm' to 'n'. - filename:n print lines centered around line number 'n' in - source file 'filename'. May change current source file. - function print lines centered around beginning of the - function 'function'. May change current source file. - - * break [[filename:]n|function] - Without any argument, sets a breakpoint at the next instruction - to be executed in the selected stack frame. - n set a breakpoint at line number 'n' in the current - source file. - filename:n set a breakpoint at line number 'n' in source file - 'filename'. - function set a breakpoint at entry to function (first instruction) - 'function'. - - * tbreak [[filename:]n|function] - set a temporary breakpoint (enabled for only one stop). - - * disable [n1 n2 ...] [m-n] - disable specified breakpoints or a range of breakpoints. Without - any argument, disables all breakpoints. - - * enable [once|del] [n1 n2 ...] [m-n] - enable specified breakpoints or a range of breakpoints. Without - any argument, enables all breakpoints. - once enable breakpoint(s) temporarily, then disable it when - the program stops at the breakpoint. - del enable breakpoint(s) tempoarily, then delete it when - the program stops at the breakpoint. - - * delete [n1 n2 ...] [m-n] - delete specified breakpoints or a range of breakpoints. Deletes - all defined breakpoints if no argument is supplied. - - * clear [[filename:]n|function] - without any argument, deletes any breakpoint at the next instruction - to be executed in the selected stack frame. If the program stops at - a breakpoint, this will delete that breakpoint so that the program - does not stop at that location again. - n delete breakpoint(s) set at line number 'n' in current - source file. - filename:n delete breakpoint(s) set at line number 'n' in source - file 'filename'. - function delete breakpoint(s) set at entry to function 'function'. - - * ignore N COUNT - ignore breakpoint N COUNT times before stopping. - - * run - starts/restarts execution of the program. When restarting, dgawk retains - current breakpoints, watchpoints, command history, automatic display - variables and debugger options. - - * frame [N] - select and print (frame number, function and argument names, source file, - and the source line) stack frame N. Frame 0 is the currently executing - or innermost frame (function call), frame 1 is the frame that called the - innermost one. The highest numbered frame is the one for 'main'. - - * up [COUNT] - move COUNT (default 1) frames up the stack toward the outermost frame. - selects and prints the frame. - - * down [COUNT] - move COUNT (default 1) frames down the stack toward the innermost frame. - selects and prints the frame. - - * backtrace [COUNT] - print backtrace of all function calls (stack frames), or innermost COUNT - frames if COUNT > 0. Prints outermost -COUNT frames for COUNT < 0. - Displays name and arguments to each function, source filename and line number. - - * continue [COUNT] - resume program execution. If continued from a breakpoint and COUNT is - specified, ignores the breakpoint at that location next COUNT times before - stopping. - - * step [COUNT] - continue execution until control reaches a different source line in the - current stack frame. Step steps inside any function called within the line. - If the argument COUNT is supplied, steps that many times before stopping, - unless it encounters a breakpoint (or watchpoint). - - * next [COUNT] - continue execution to the next source line, stepping over function calls. - The argument COUNT controls how many times to repeat the action as - in step. - - * stepi [COUNT] - execute one (or COUNT) instruction(s), stepping inside function calls. - - * nexti [COUNT] - execute one (or COUNT) instruction(s), stepping over function calls. - - * finish - execute program until the selected stack frame returns. - Prints the returned value. - - * return [value] - cancel execution of a function call. If 'value' (either string or number) - is specified, it is used as the function's return value. If used in a - frame other than the the innermost one (currently executing function i.e. - frame number 0), discards all outer frames in addition to the selected one, - and the caller of that frame becomes the innermost frame. - - * until [[filename:]n|function] - without any argument, continues execution until a line past the current - line in current stack frame is reached. With argument, - continues execution until the specified location is reached, or the current - stack frame returns. - - * print var1[,|\s|\t var2 ...] - print the value of a gawk variable or field. Fields must be referenced by - constants: - dgawk> print $3 - prints the third field in the input record (if the specified field does not - exist, it will print 'Null field'). Variable can be an array element, with - the subscripts being constant values. To print the contents of an array, - prefix the name of the array with the '@' symbol: - gawk> print @a - prints the index and the corresponding value for all elements in array 'a'. - - * printf format, [arg], ... - print formatted text. May include escape sequences, such as `\n'. - No newline is printed unless specified one. - - * set var=value - assign a constant (number or string) value to a gawk variable or field. - String values must be enclosed between double quotes("). - - * display [var|$n] - add variable 'var' (or field $n) to the automatic display list. The - value of the variable or field is displayed each time the program stops. - Each variable added to the list is identified by a unique number: - dgawk> display x - 10: x = 1 - displays the assigned item number, the variable name and its current value. - If the display variable refers to a function parameter, it is silently - deleted from the list as soon as the execution reaches a context where - no such variable of the given name exists. - Without argument, displays the current values of items on the list. - - * undisplay [N] - remove item number N (or all items) from the automatic display list. - - * watch var|$n - add variable 'var' (or field $n) to the watch list. dgawk will stop whenever - the value of the variable or field changes. Each watched item is assigned a - number which can be used to delete it from the watch list using the - unwatch command. - - * unwatch [N] - remove item number N (or all items) from the watch list. - - * option [name[=value]] - without argument, displays the available debugger options - and their current values. 'option name' shows the current - value of the named option. 'option name=value' assigns - a new value to the named option. - Available options: - * listsize - the number of lines that list prints. The default is 15. - * prompt - debugger prompt. The default is "dgawk> ". - * trace [on|off] - turns instruction tracing on or off. The default is off. - * outfile - sends gawk output to a file; debugger output still goes - to stdout. An empty string ("") resets output to stdout. - * save_history [on|off] - save command history to file ./.dgawk_history. The default is 'on'. - * history_size - maximum no of lines to keep in history file ./.dgawk_history. - The default is 100. - * save_options [on|off] - save current options to file ./.dgawkrc on quit. The default is 'on'. - Options are read back in next session on startup. - - * commands [N] - * silent - * end - 'commands' sets list of commands to be executed when stopped at - a breakpoint or watchpoint. N is the breakpoint or watchpoint number. - Without a number, refers to the last one set. The actual commands follow - starting on the next line and are terminated by the 'end' command. - If the command 'silent' is in the list, the usual messages about stopping - at a breakpoint and the sourceline are not printed. Any command - in the list that resumes execution (e.g. continue) terminates the list - (an implicit end), and subsequent commands are ignored. - - dgawk> commands - > silent - > printf "A silent breakpoint; i = %d\n", i - > info locals - > set i = 10 - > continue - > end - dgawk> - - * source filename - run command(s) from a file; an error in any command does not - terminate execution of subsequent commands. Comments (lines starting - with #) are allowed in a command file. Empty lines are ignored, does not - repeat last command. Can't restart program by having more than one run - command in the file. - Can also use the '-R file' OR '--command=file' command line option to - execute commands from a file non-interactively. - - * save filename - saves the commands from the current session to the given filename, - so it can be replayed using the source command. - - * quit - quit debugger. - - -READLINE SUPPORT: - - If compiled with readline library, you can take advantage of its command -completion and history expansion feature. The following types of completion -are available: - * command completion - command names. - * source filename completion - source file names. Relevant commands are list, break, tbreak, until, - and clear. - * argument completion - non-number arguments to a command. Relevant commands are info and enable. - * variable name completion - global variable names, and function arguments in the current context - if the program is running. Relevant commands are print, set, watch, - and display. - -REFERENCES: - - * Debugging with GDB, the manual for the GNU Source-Level Debugger. - Much of the contents of this README shamelessly stolen and adapted from it. - * GNU Readline User's Manual - * GNU History User's Manual diff --git a/doc/gawk.info b/doc/gawk.info index 5aa4ad96..d6f23a7d 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -467,13 +467,6 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * VMS Running:: How to run `gawk' under VMS. * VMS POSIX:: Alternate instructions for VMS POSIX. * VMS Old Gawk:: An old version comes with some VMS systems. -* Unsupported:: Systems whose ports are no longer - supported. -* Atari Installation:: Installing `gawk' on the Atari ST. -* Atari Compiling:: Compiling `gawk' on Atari. -* Atari Using:: Running `gawk' on Atari. -* BeOS Installation:: Installing `gawk' on BeOS. -* Tandem Installation:: Installing `gawk' on a Tandem. * Bugs:: Reporting Problems and Bugs. * Other Versions:: Other freely available `awk' implementations. @@ -1560,8 +1553,8 @@ shell won't be part of the picture, and you can say what you mean. File: gawk.info, Node: DOS Quoting, Up: Quoting -1.1.6.1 Quoting in Windows Batch Files -...................................... +1.1.6.1 Quoting in MS-Windows Batch Files +......................................... Although this Info file generally only worries about POSIX systems and the POSIX shell, the following issue arises often enough for many users @@ -19283,6 +19276,9 @@ introduced the following changes into the language: * The concept of a numeric string and tighter comparison rules to go with it (*note Typing and Comparison::). + * The use of built-in variables as function names is forbidden + (*note Definition Syntax::. + * More complete documentation of many of the previously undocumented features of the language. @@ -19313,6 +19309,18 @@ standard: * The `fflush()' built-in function is not supported (*note I/O Functions::). + * The ability for `FS' and for the third argument to `split()' to be + null strings (*note Single Character Fields::). + + * The `nextfile' statement (*note Nextfile Statement::). + + * The ability to delete all of an array at once with `delete ARRAY' + (*note Delete::). + + * The ability for the `length()' function to accept an array + argument and return the number of elements in the array. (*note + String Functions::). + The 2008 POSIX standard can be found online at `http://www.opengroup.org/onlinepubs/9699919799/'. @@ -19327,12 +19335,6 @@ his version available via his home page (*note Other Versions::). This minor node describes extensions in his version of `awk' that are not in POSIX `awk': - * The `-mf N' and `-mr N' command-line options to set the maximum - number of fields and the maximum record size, respectively (*note - Options::). As a side note, his `awk' no longer needs these - options; it continues to accept them to avoid breaking old - programs. - * The `fflush()' built-in function for flushing buffered output (*note I/O Functions::). @@ -19369,264 +19371,145 @@ File: gawk.info, Node: POSIX/GNU, Next: Contributors, Prev: BTL, Up: Languag A.5 Extensions in `gawk' Not in POSIX `awk' =========================================== -The GNU implementation, `gawk', adds a large number of features. This -minor node lists them in the order they were added to `gawk'. They can -all be disabled with either the `--traditional' or `--posix' options +The GNU implementation, `gawk', adds a large number of features. They +can all be disabled with either the `--traditional' or `--posix' options (*note Options::). - Version 2.10 of `gawk' introduced the following features: - - * The `AWKPATH' environment variable for specifying a path search for - the `-f' command-line option (*note Options::). - - * The `IGNORECASE' variable and its effects (*note - Case-sensitivity::). - - * The `/dev/stdin', `/dev/stdout', `/dev/stderr' and `/dev/fd/N' - special file names (*note Special Files::). + A number of features have come and gone over the years. This minor +node summarizes the additional features over POSIX `awk' that are in +the current version of `gawk'. - Version 2.13 of `gawk' introduced the following features: - - * The `FIELDWIDTHS' variable and its effects (*note Constant Size::). - - * The `systime()' and `strftime()' built-in functions for obtaining - and printing timestamps (*note Time Functions::). - - * The `-W lint' option to provide error and portability checking for - both the source code and at runtime (*note Options::). - - * The `-W compat' option to turn off the GNU extensions (*note - Options::). - - * The `-W posix' option for full POSIX compliance (*note Options::). - - Version 2.14 of `gawk' introduced the following feature: - - * The `next file' statement for skipping to the next data file - (*note Nextfile Statement::). - - Version 2.15 of `gawk' introduced the following features: - - * The `ARGIND' variable, which tracks the movement of `FILENAME' - through `ARGV' (*note Built-in Variables::). - - * The `ERRNO' variable, which contains the system error message when - `getline' returns -1 or `close()' fails (*note Built-in - Variables::). - - * The `/dev/pid', `/dev/ppid', `/dev/pgrpid', and `/dev/user' file - name interpretation. (As of version 3.2, these names are no - longer supported.) - - * The ability to delete all of an array at once with `delete ARRAY' - (*note Delete::). + * Additional built-in variables: - * The ability to use GNU-style long-named options that start with - `--' (*note Options::). + - The `ARGIND' `BINMODE', `ERRNO', `FIELDWIDTHS', `FPAT', + `IGNORECASE', `LINT', `PROCINFO', `TEXTDOMAIN', and `RT' + variables (*note Built-in Variables::). - * The `--source' option for mixing command-line and library-file - source code (*note Options::). + * Special files in I/O redirections: - Version 3.0 of `gawk' introduced the following features: + - The `/dev/stdin', `/dev/stdout', `/dev/stderr' and + `/dev/fd/N' special file names (*note Special Files::). - * `IGNORECASE' changed, now applying to string comparison as well as - regexp operations (*note Case-sensitivity::). + - The `/inet', `/inet4', and `/inet6' special files for TCP/IP + networking using `|&' to specify which version of the IP + protocol to use. (*note TCP/IP Networking::). - * The `RT' variable that contains the input text that matched `RS' - (*note Records::). + * Changes and/or additions to the language: - * Full support for both POSIX and GNU regexps (*note Regexp::). + - Full support for both POSIX and GNU regexps, with interval + expressions being matched by default. (*note Regexp::). - * The `gensub()' function for more powerful text manipulation (*note - String Functions::). - - * The `strftime()' function acquired a default time format, allowing - it to be called with no arguments (*note Time Functions::). - - * The ability for `FS' and for the third argument to `split()' to be - null strings (*note Single Character Fields::). - - * The ability for `RS' to be a regexp (*note Records::). - - * The `next file' statement became `nextfile' (*note Nextfile - Statement::). - - * The `--lint-old' option to warn about constructs that are not - available in the original Version 7 Unix version of `awk' (*note - V7/SVR3.1::). - - * The `-m' option and the `fflush()' function from the Bell - Laboratories research version of `awk' (*note Options::; also - *note I/O Functions::). - - * The `--re-interval' option to provide interval expressions in - regexps (*note Regexp Operators::). - - * The `--traditional' option was added as a better name for - `--compat' (*note Options::). - - * The use of GNU Autoconf to control the configuration process - (*note Quick Installation::). - - - Version 3.1 of `gawk' introduced the following features: - - * The `BINMODE' special variable for non-POSIX systems, which allows - binary I/O for input and/or output files (*note PC Using::). - - * The `LINT' special variable, which dynamically controls lint - warnings (*note Built-in Variables::). - - * The `PROCINFO' array for providing process-related information - (*note Built-in Variables::). - - * The `TEXTDOMAIN' special variable for setting an application's - internationalization text domain (*note Built-in Variables::, and - *note Internationalization::). - - * The ability to use octal and hexadecimal constants in `awk' - program source code (*note Nondecimal-numbers::). - - * The `|&' operator for two-way I/O to a coprocess (*note Two-way - I/O::). - - * The `/inet' special files for TCP/IP networking using `|&' (*note - TCP/IP Networking::). - - * The optional second argument to `close()' that allows closing one - end of a two-way pipe to a coprocess (*note Two-way I/O::). - - * The optional third argument to the `match()' function for - capturing text-matching subexpressions within a regexp (*note - String Functions::). - - * Positional specifiers in `printf' formats for making translations - easier (*note Printf Ordering::). - - * The `asort()' and `asorti()' functions for sorting arrays (*note - Array Sorting::). + - The ability for `FS' and for the third argument to `split()' + to be null strings (*note Single Character Fields::). - * The `bindtextdomain()', `dcgettext()' and `dcngettext()' functions - for internationalization (*note Programmer i18n::). + - The ability for `RS' to be a regexp (*note Records::). - * The `extension()' built-in function and the ability to add new - built-in functions dynamically (*note Dynamic Extensions::). + - The ability to use octal and hexadecimal constants in `awk' + program source code (*note Nondecimal-numbers::). - * The `mktime()' built-in function for creating timestamps (*note - Time Functions::). + - The `|&' operator for two-way I/O to a coprocess (*note + Two-way I/O::). - * The `and()', `or()', `xor()', `compl()', `lshift()', `rshift()', - and `strtonum()' built-in functions (*note Bitwise Functions::). + - Indirect function calls (*note Indirect Calls::). - * The support for `next file' as two words was removed completely - (*note Nextfile Statement::). + - Directories on the command line produce a warning and are + skipped (*note Command line directories::). - * The `--dump-variables' option to print a list of all global - variables (*note Options::). + * New keywords: - * The `--gen-po' command-line option and the use of a leading - underscore to mark strings that should be translated (*note String - Extraction::). + - The `BEGINFILE' and `ENDFILE' special patterns. (*note + BEGINFILE/ENDFILE::). - * The `--non-decimal-data' option to allow non-decimal input data - (*note Nondecimal Data::). + - The ability to delete all of an array at once with `delete + ARRAY' (*note Delete::). - * The `--profile' option and `pgawk', the profiling version of - `gawk', for producing execution profiles of `awk' programs (*note - Profiling::). + - The `nextfile' statement (*note Nextfile Statement::). - * The `--use-lc-numeric' option to force `gawk' to use the locale's - decimal point for parsing input data (*note Conversion::). + - The `switch' statement (*note Switch Statement::). - * The `--enable-portals' configuration option to enable special - treatment of pathnames that begin with `/p' as BSD portals. (This - option is no longer available; the related code was removed since - it was never used.) + * Changes to standard `awk' functions: - * The use of GNU Automake to help in standardizing the configuration - process (*note Quick Installation::). + - The optional second argument to `close()' that allows closing + one end of a two-way pipe to a coprocess (*note Two-way + I/O::). - * The use of GNU `gettext' for `gawk''s own message output (*note - Gawk I18N::). + - POSIX compliance for `gsub()' and `sub()' (*note Gory + Details::). - * BeOS support (*note BeOS Installation::). + - The `length()' function accepts an array argument and returns + the number of elements in the array (*note String + Functions::). - * Tandem support (*note Tandem Installation::). + - The optional third argument to the `match()' function for + capturing text-matching subexpressions within a regexp (*note + String Functions::). - * The Atari port became officially unsupported (*note Atari - Installation::). + - Positional specifiers in `printf' formats for making + translations easier (*note Printf Ordering::). - * The source code now uses new-style function definitions. + - The `split()' function's additional optional fourth argument + which is an array to hold the text of the field separators. + (*note String Functions::). - * The `--disable-lint' configuration option to disable lint checking - at compile time (*note Additional Configuration Options::). + * Additional functions only in `gawk': - * The `--with-whiny-user-strftime' configuration option to force the - use of the included version of the `strftime()' function for - deficient systems (*note Additional Configuration Options::). + - The `and()', `or()', `xor()', `compl()', `lshift()', and + `rshift()', functions for bit manipulation (*note Bitwise + Functions::). - * POSIX compliance for `sub()' and `gsub()' (*note Gory Details::). + - The `asort()' and `asorti()' functions for sorting arrays + (*note Array Sorting::). - * The `--exec' option, for use in CGI scripts (*note Options::). + - The `bindtextdomain()', `dcgettext()' and `dcngettext()' + functions for internationalization (*note Programmer i18n::). - * The `length()' function was extended to accept an array argument - and return the number of elements in the array (*note String - Functions::). + - The `extension()' built-in function and the ability to add + new functions dynamically (*note Dynamic Extensions::). - * The `strftime()' function acquired a third argument to enable - printing times as UTC (*note Time Functions::). + - The `fflush()' function from the Bell Laboratories research + version of `awk' (*note I/O Functions::). - Version 3.2 of `gawk' introduced the following features: + - The `gensub()', `patsplit()', and `strtonum()' functions for + more powerful text manipulation (*note String Functions::). - * The special files `/dev/pid', `/dev/ppid', `/dev/pgrpid', and - `/dev/user' were removed entirely (*note Obsolete::). + - The `mktime()', `systime()', and `strftime()' functions for + working with timestamps (*note Time Functions::). - * The `\s' and `\S' escapae sequences in regular expressions (*note - GNU Regexp Operators::). + * Changes and/or additions in the command line options: - * Interval expressions became part of the default matching done if - not in POSIX mode or in compatibility mode. (*note Regexp - Operators::). + - The `AWKPATH' environment variable for specifying a path + search for the `-f' command-line option (*note Options::). - * The `split()' function was given the additional optional fourth - argument which is an array to hold the text of the field - separators. (*note String Functions::). + - The ability to use GNU-style long-named options that start + with `--' and the `--characters-as-bytes', `--compat', + `--dump-variables', `--exec', `--gen-pot', `--lint', + `--lint-old', `--non-decimal-data', `--posix', `--profile', + `--re-interval', `--sandbox', `--source', `--traditional', and + `--use-lc-numeric' options (*note Options::). - * The `BEGINFILE' and `ENDFILE' special patterns. (*note - BEGINFILE/ENDFILE::). + * Support for the following obsolete systems was removed from the + code and the documentation: - * The `switch' statement was enabled by default. (*note Switch - Statement::). + - Atari. - * The `--sandbox' and `--characters-as-bytes' options (*note - Options::). + - Amiga. - * Indirect function calls (*note Indirect Calls::). + - BeOS. - * The `--gen-po' command-line option was renamed `--gen-pot' (*note - String Extraction::). + - Cray. - * Directories on the command line produce a warning and are skipped - (*note Command line directories::). + - MIPS RiscOS. - * The `FPAT' variable and its effects (*note Splitting By Content::). + - MS-DOS with the Microsoft Compiler. - * `PROCINFO["strftime"]' was added (*note Auto-set::). + - MS-Windows with the Microsoft Compiler. - * The `patsplit()' function (*note String Functions::). + - NeXT. - * The `/inet4' and `/inet6' special files for TCP/IP networking - using `|&' to specify which version of the IP protocol to use. - The option to use a raw IP socket was removed, since it was never - implemented (*note TCP/IP Networking::). + - SunOS 3.x, Sun 386 (Road Runner). - * The `--compat', `--copyleft' and `--usage' options were removed. + - Tandem (non-POSIX). - * The `break' and `continue' statements may no longer be used - outside a loop, even with `--traditional' (*note Break - Statement::, and *note Continue Statement::). - - * The `--enable-portals' configuration option was removed. @@ -19684,12 +19567,14 @@ Info file, in approximate chronological order: * Scott Deifik currently maintains the MS-DOS port. - * Juan Grigera provided a port to Windows32 systems. + * Juan Grigera provided a port to Windows32 systems. (This is no + longer supported.) - * Dr. Darrel Hankerson acts as coordinator for the various ports to - different PC platforms and creates binary distributions for - various PC operating systems. He is also instrumental in keeping - the documentation up to date for the various PC platforms. + * For many years, Dr. Darrel Hankerson acted as coordinator for the + various ports to different PC platforms and created binary + distributions for various PC operating systems. He was also + instrumental in keeping the documentation up to date for the + various PC platforms. * Christos Zoulas provided the `extension()' built-in function for dynamically adding new modules. @@ -19699,7 +19584,8 @@ Info file, in approximate chronological order: the `|&' operator. * Stephen Davies provided the initial port to Tandem systems and its - documentation. + documentation. He was also instrumental in the initial work to + integrate the byte-code internals into the `gawk' code base. * Matthew Woehlke provided improvements for Tandem's POSIX-compliant systems. @@ -19722,7 +19608,10 @@ Info file, in approximate chronological order: statements. * Patrick T.J. McPhee contributed the code for dynamic loading in - Windows32 environments. + Windows32 environments. (This is no longer supported) + + * John Haque reworked the `gawk' internals to use a byte-code engine, + providing the `dgawk' debugger for `awk' programs. * Arnold Robbins has been working on `gawk' since 1988, at first helping David Trueman, and as the primary maintainer since around @@ -19746,7 +19635,6 @@ people who did the respective ports. * Unix Installation:: Installing `gawk' under various versions of Unix. * Non-Unix Installation:: Installation on Other Operating Systems. -* Unsupported:: Systems whose ports are no longer supported. * Bugs:: Reporting Problems and Bugs. * Other Versions:: Other freely available `awk' implementations. @@ -19795,8 +19683,10 @@ File: gawk.info, Node: Extracting, Next: Distribution contents, Prev: Getting B.1.2 Extracting the Distribution --------------------------------- -`gawk' is distributed as a `tar' file compressed with the GNU Zip -program, `gzip'. +`gawk' is distributed as several `tar' file compressed with different +compression programs: `gzip', `bzip2', and `xz'. For simplicity, the +rest of these instructions assume you are using the one compressed with +the GNU Zip program, `gzip'. Once you have the distribution (for example, `gawk-4.0.0.tar.gz'), use `gzip' to expand the file and then use `tar' to extract it. You @@ -19805,7 +19695,13 @@ can use the following pipeline to produce the `gawk' distribution: # Under System V, add 'o' to the tar options gzip -d -c gawk-4.0.0.tar.gz | tar -xvpf - -This creates a directory named `gawk-4.0.0' in the current directory. + On a system with GNU `tar', you can let `tar' do the decompression +for you: + + tar -xvpzf gawk-4.0.0.tar.gz + +Extracting the archive creates a directory named `gawk-4.0.0' in the +current directory. The distribution file name is of the form `gawk-V.R.P.tar.gz'. The V represents the major version of `gawk', the R represents the current @@ -19813,7 +19709,7 @@ release of version V, and the P represents a "patch level", meaning that minor bugs have been fixed in the release. The current patch level is 0, but when retrieving distributions, you should get the version with the highest version, release, and patch level. (Note, -however, that patch levels greater than or equal to 80 denote "beta" or +however, that patch levels greater than or equal to 70 denote "beta" or nonproduction software; you might not want to retrieve such a version unless you don't mind experimenting.) If you are not on a Unix system, you need to make other arrangements for getting and extracting the @@ -19889,16 +19785,17 @@ Various `.c', `.y', and `.h' files `doc/gawk.texi' The Texinfo source file for this Info file. It should be - processed with TeX to produce a printed document, and with - `makeinfo' to produce an Info or HTML file. + processed with TeX (via `texi2dvi' or `texi2pdf') to produce a + printed document, and with `makeinfo' to produce an Info or HTML + file. `doc/gawk.info' The generated Info file for this Info file. `doc/gawkinet.texi' The Texinfo source file for *Note Top::. It should be processed - with TeX to produce a printed document and with `makeinfo' to - produce an Info or HTML file. + with TeX (via `texi2dvi' or `texi2pdf') to produce a printed + document and with `makeinfo' to produce an Info or HTML file. `doc/gawkinet.info' The generated Info file for `TCP/IP Internetworking with `gawk''. @@ -19917,11 +19814,9 @@ Various `.c', `.y', and `.h' files `Makefile.in' files used by `autoconf' and `configure'. `Makefile.in' -`acconfig.h' -`acinclude.m4' `aclocal.m4' `configh.in' -`configure.in' +`configure.ac' `configure' `custom.h' `missing_d/*' @@ -19949,19 +19844,11 @@ Various `.c', `.y', and `.h' files of the programs in this Info file are available in appropriate subdirectories of `awklib/eg'. -`unsupported/atari/*' - Files needed for building `gawk' on an Atari ST (*note Atari - Installation::, for details). - -`unsupported/tandem/*' - Files needed for building `gawk' on a Tandem (*note Tandem - Installation::, for details). - `posix/*' Files needed for building `gawk' on POSIX-compliant systems. `pc/*' - Files needed for building `gawk' under MS Windows and OS/2 (*note + Files needed for building `gawk' under MS-Windows and OS/2 (*note PC Installation::, for details). `vms/*' @@ -19977,8 +19864,8 @@ Various `.c', `.y', and `.h' files File: gawk.info, Node: Unix Installation, Next: Non-Unix Installation, Prev: Gawk Distribution, Up: Installation -B.2 Compiling and Installing `gawk' on Unix -=========================================== +B.2 Compiling and Installing `gawk' on Unix-like Systems +======================================================== Usually, you can compile and install `gawk' by typing only two commands. However, if you use an unusual system, you may need to @@ -19993,15 +19880,19 @@ configure `gawk' for your system yourself. File: gawk.info, Node: Quick Installation, Next: Additional Configuration Options, Up: Unix Installation -B.2.1 Compiling `gawk' for Unix -------------------------------- +B.2.1 Compiling `gawk' for Unix-like Systems +-------------------------------------------- -After you have extracted the `gawk' distribution, `cd' to +The normal installation steps should work on all modern commercial +Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin +environment for MS-Windows. + + After you have extracted the `gawk' distribution, `cd' to `gawk-4.0.0'. Like most GNU software, `gawk' is configured -automatically for your Unix system by running the `configure' program. -This program is a Bourne shell script that is generated automatically -using GNU `autoconf'. (The `autoconf' software is described fully -starting with *note Top::.) +automatically for your system by running the `configure' program. This +program is a Bourne shell script that is generated automatically using +GNU `autoconf'. (The `autoconf' software is described fully starting +with *note Top::.) To configure `gawk', simply run `configure': @@ -20045,13 +19936,13 @@ command line when compiling `gawk' from scratch, including: `--with-whiny-user-strftime' Force use of the included version of the `strftime()' function for - deficient systems + deficient systems. `--disable-lint' - This option disables all lint checking within `gawk'. The - `--lint' and `--lint-old' options (*note Options::) are accepted, - but silently do nothing. Similarly, setting the `LINT' variable - (*note User-modified::) has no effect on the running `awk' program. + Disable all lint checking within `gawk'. The `--lint' and + `--lint-old' options (*note Options::) are accepted, but silently + do nothing. Similarly, setting the `LINT' variable (*note + User-modified::) has no effect on the running `awk' program. When used with GCC's automatic dead-code-elimination, this option cuts almost 200K bytes off the size of the `gawk' executable on @@ -20067,13 +19958,8 @@ command line when compiling `gawk' from scratch, including: desirable, but it may bring you some slight performance improvement. - As of version 3.1.5, the `--with-included-gettext' configuration -option is no longer available, since `gawk' expects the GNU `gettext' -library to be installed as an external library. - - As of version 3.1.8, the `--disable-libsigsegv' configuration option -is no longer available, since `gawk' expects the GNU `libsigsegv' -library to be installed as an external library. + Use the command `./configure --help' to see the full list of options +that `configure' supplies. File: gawk.info, Node: Configuration Philosophy, Prev: Additional Configuration Options, Up: Unix Installation @@ -20082,13 +19968,13 @@ B.2.3 The Configuration Process ------------------------------- This minor node is of interest only if you know something about using -the C language and the Unix operating system. +the C language and Unix-like operating systems. The source code for `gawk' generally attempts to adhere to formal standards wherever possible. This means that `gawk' uses library routines that are specified by the ISO C standard and by the POSIX -operating system interface standard. When using an ISO C compiler, -function prototypes are used to help improve the compile-time checking. +operating system interface standard. The `gawk' source code requires +using an ISO C compiler (the 1990 standard). Many Unix systems do not support all of either the ISO or the POSIX standards. The `missing_d' subdirectory in the `gawk' distribution @@ -20100,9 +19986,10 @@ that describe features of the particular operating system where you are attempting to compile `gawk'. The three things described by this file are: what header files are available, so that they can be correctly included, what (supposedly) standard functions are actually available -in your C libraries, and various miscellaneous facts about your variant -of Unix. For example, there may not be an `st_blksize' element in the -`stat' structure. In this case, `HAVE_ST_BLKSIZE' is undefined. +in your C libraries, and various miscellaneous facts about your +operating system. For example, there may not be an `st_blksize' +element in the `stat' structure. In this case, `HAVE_ST_BLKSIZE' is +undefined. It is possible for your C compiler to lie to `configure'. It may do so by not exiting with an error when a library function is not @@ -20114,14 +20001,14 @@ is automatically included by `config.h'. It is also possible that the `configure' program generated by `autoconf' will not work on your system in some other fashion. If you -do have a problem, the file `configure.in' is the input for `autoconf'. +do have a problem, the file `configure.ac' is the input for `autoconf'. You may be able to change this file and generate a new version of `configure' that works on your system (*note Bugs::, for information on how to report problems in configuring `gawk'). The same mechanism may -be used to send in updates to `configure.in' and/or `custom.h'. +be used to send in updates to `configure.ac' and/or `custom.h'. -File: gawk.info, Node: Non-Unix Installation, Next: Unsupported, Prev: Unix Installation, Up: Installation +File: gawk.info, Node: Non-Unix Installation, Next: Bugs, Prev: Unix Installation, Up: Installation B.3 Installation on Other Operating Systems =========================================== @@ -20142,13 +20029,14 @@ B.3.1 Installation on PC Operating Systems ------------------------------------------ This minor node covers installation and usage of `gawk' on x86 machines -running DOS, any version of Windows, or OS/2. In this minor node, the -term "Windows32" refers to any of Windows-95/98/ME/NT/2000/XP/Vista/7. - - The limitations of DOS (and DOS shells under Windows or OS/2) has -meant that various "DOS extenders" are often used with programs such as -`gawk'. The varying capabilities of Microsoft Windows 3.1 and -Windows32 can add to the confusion. For an overview of the +running MS-DOS, any version of MS-Windows, or OS/2. In this minor +node, the term "Windows32" refers to any of Microsoft +Windows-95/98/ME/NT/2000/XP/Vista/7. + + The limitations of MS-DOS (and MS-DOS shells under Windows32 or +OS/2) has meant that various "DOS extenders" are often used with +programs such as `gawk'. The varying capabilities of Microsoft Windows +3.1 and Windows32 can add to the confusion. For an overview of the considerations, please refer to `README_d/README.pc' in the distribution. @@ -20170,7 +20058,7 @@ File: gawk.info, Node: PC Binary Installation, Next: PC Compiling, Up: PC Ins B.3.1.1 Installing a Prepared Distribution for PC Systems ......................................................... -If you have received a binary distribution prepared by the DOS +If you have received a binary distribution prepared by the MS-DOS maintainers, then `gawk' and the necessary support files appear under the `gnu' directory, with executables in `gnu/bin', libraries in `gnu/lib/awk', and manual pages under `gnu/man'. This is designed for @@ -20188,17 +20076,17 @@ directory of your preferred drive. Set `UNIXROOT' to your installation drive (e.g., `e:') if you want to install `gawk' onto another drive than the hardcoded default `c:'. Executables appear in `/usr/bin', libraries under `/usr/share/awk', manual pages under `/usr/man', -Texinfo documentation under `/usr/info' and NLS files under -`/usr/share/locale'. If you already have a file `/usr/info/dir' from -another package _do not overwrite it!_ Instead enter the following -commands at your prompt (replace `x:' by your installation drive): +Texinfo documentation under `/usr/info', and NLS files under +`/usr/share/locale'. Note that the files can be installed anywhere +provided `AWKPATH' is set properly. + + If you already have a file `/usr/info/dir' from another package _do +not overwrite it!_ Instead enter the following commands at your prompt +(replace `x:' by your installation drive): install-info --info-dir=x:/usr/info x:/usr/info/gawk.info install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info - However, the files can be installed anywhere provided `AWKPATH' is -set properly. - The binary distribution may contain a separate file containing additional or more detailed installation instructions. @@ -20209,8 +20097,8 @@ B.3.1.2 Compiling `gawk' for PC Operating Systems ................................................. `gawk' can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP; MS-DOS only) or Eberhard -Mattes (EMX; MS-DOS, Windows32 and OS/2). The file +development tools from DJ Delorie (DJGPP: MS-DOS only) or Eberhard +Mattes (EMX: MS-DOS, Windows32 and OS/2). The file `README_d/README.pc' in the `gawk' distribution contains additional notes, and `pc/Makefile' contains important information on compilation options. @@ -20298,7 +20186,7 @@ B.3.1.3 Testing `gawk' on PC Operating Systems Using `make' to run the standard tests and to install `gawk' requires additional Unix-like tools, including `sh', `sed', and `cp'. In order to run the tests, the `test/*.ok' files may need to be converted so -that they have the usual DOS-style end-of-line markers. Most of the +that they have the usual MS-DOS-style end-of-line markers. Most of the tests work properly with Stewartson's shell along with the companion utilities or appropriate GNU utilities. However, some editing of `test/Makefile' is required. It is recommended that you copy the file @@ -20336,14 +20224,14 @@ this specific drive is also searched for program files. E.g., if `".;c:/usr/share/awk;e:/usr/share/awk"'. An `sh'-like shell (as opposed to `command.com' under MS-DOS or -`cmd.exe' under Windows or OS/2) may be useful for `awk' programming. +`cmd.exe' under MS-Windows or OS/2) may be useful for `awk' programming. The DJGPP collection of tools includes an MS-DOS port of Bash, and several shells are available for OS/2, including `ksh'. - Under Windows, OS/2 and DOS, `gawk' (and many other text programs) -silently translate end-of-line `"\r\n"' to `"\n"' on input and `"\n"' -to `"\r\n"' on output. A special `BINMODE' variable allows control -over these translations and is interpreted as follows: + Under MS-Windows, OS/2 and MS-DOS, `gawk' (and many other text +programs) silently translate end-of-line `"\r\n"' to `"\n"' on input +and `"\n"' to `"\r\n"' on output. A special `BINMODE' variable allows +control over these translations and is interpreted as follows: * If `BINMODE' is `"r"', or one, then binary mode is set on read (i.e., no translations on reads). @@ -20366,19 +20254,19 @@ command line. `BINMODE' is set at the time a file or pipe is opened and cannot be changed mid-stream. The name `BINMODE' was chosen to match `mawk' (*note Other -Versions::). Both `mawk' and `gawk' handle `BINMODE' similarly; -however, `mawk' adds a `-W BINMODE=N' option and an environment -variable that can set `BINMODE', `RS', and `ORS'. The files -`binmode[1-3].awk' (under `gnu/lib/awk' in some of the prepared -distributions) have been chosen to match `mawk''s `-W BINMODE=N' -option. These can be changed or discarded; in particular, the setting -of `RS' giving the fewest "surprises" is open to debate. `mawk' uses -`RS = "\r\n"' if binary mode is set on read, which is appropriate for -files with the DOS-style end-of-line. +Versions::). `mawk' and `gawk' handle `BINMODE' similarly; however, +`mawk' adds a `-W BINMODE=N' option and an environment variable that +can set `BINMODE', `RS', and `ORS'. The files `binmode[1-3].awk' +(under `gnu/lib/awk' in some of the prepared distributions) have been +chosen to match `mawk''s `-W BINMODE=N' option. These can be changed +or discarded; in particular, the setting of `RS' giving the fewest +"surprises" is open to debate. `mawk' uses `RS = "\r\n"' if binary +mode is set on read, which is appropriate for files with the +MS-DOS-style end-of-line. To illustrate, the following examples set binary mode on writes for -standard output and other files, and set `ORS' as the "usual" DOS-style -end-of-line: +standard output and other files, and set `ORS' as the "usual" +MS-DOS-style end-of-line: gawk -v BINMODE=2 -v ORS="\r\n" ... @@ -20405,12 +20293,12 @@ File: gawk.info, Node: Cygwin, Next: MSYS, Prev: PC Using, Up: PC Installati B.3.1.5 Using `gawk' In The Cygwin Environment .............................................. -`gawk' can be built and used "out of the box" under Windows if you are -using the Cygwin environment (http://www.cygwin.com). This environment -provides an excellent simulation of Unix, using the GNU tools, such as -Bash, the GNU Compiler Collection (GCC), GNU Make, and other GNU tools. -Compilation and installation for Cygwin is the same as for a Unix -system: +`gawk' can be built and used "out of the box" under MS-Windows if you +are using the Cygwin environment (http://www.cygwin.com). This +environment provides an excellent simulation of Unix, using the GNU +tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, and +other GNU tools. Compilation and installation for Cygwin is the same +as for a Unix system: tar -xvpzf gawk-4.0.0.tar.gz cd gawk-4.0.0 @@ -20431,13 +20319,13 @@ File: gawk.info, Node: MSYS, Prev: Cygwin, Up: PC Installation B.3.1.6 Using `gawk' In The MSYS Environment ............................................ -In the MSYS environment under Windows, `gawk' automatically uses binary -mode for reading and writing files. Thus there is no need to use the -`BINMODE' variable. +In the MSYS environment under MS-Windows, `gawk' automatically uses +binary mode for reading and writing files. Thus there is no need to +use the `BINMODE' variable. This can cause problems with other Unix-like components that have -been ported to Windows that expect `gawk' to do automatic translation -of `"\r\n"', since it won't. Caveat Emptor! +been ported to MS-Windows that expect `gawk' to do automatic +translation of `"\r\n"', since it won't. Caveat Emptor! File: gawk.info, Node: VMS Installation, Prev: PC Installation, Up: Non-Unix Installation @@ -20614,220 +20502,15 @@ B.3.2.5 Some VMS Systems Have An Old Version of `gawk' Some versions of VMS have an old version of `gawk'. To access it, define a symbol, as follows: - $ gawk :== $ sys$common:[syshlp.examples.tcpip.snmp]gawk.exe - - This is apparently version 2.15.6, which is quite old. We recommend -compiling and using the current version. - - -File: gawk.info, Node: Unsupported, Next: Bugs, Prev: Non-Unix Installation, Up: Installation - -B.4 Unsupported Operating System Ports -====================================== - -This sections describes systems for which the `gawk' port is no longer -supported. - -* Menu: - -* Atari Installation:: Installing `gawk' on the Atari ST. -* BeOS Installation:: Installing `gawk' on BeOS. -* Tandem Installation:: Installing `gawk' on a Tandem. - - -File: gawk.info, Node: Atari Installation, Next: BeOS Installation, Up: Unsupported - -B.4.1 Installing `gawk' on the Atari ST ---------------------------------------- - -The Atari port is no longer supported. It is included for those who -might want to use it but it is no longer being actively maintained. - - There are no substantial differences when installing `gawk' on -various Atari models. Compiled `gawk' executables do not require a -large amount of memory with most `awk' programs, and should run on all -Motorola processor-based models (called further ST, even if that is not -exactly right). - - In order to use `gawk', you need to have a shell, either text or -graphics, that does not map all the characters of a command line to -uppercase. Maintaining case distinction in option flags is very -important (*note Options::). These days this is the default and it may -only be a problem for some very old machines. If your system does not -preserve the case of option flags, you need to upgrade your tools. -Support for I/O redirection is necessary to make it easy to import -`awk' programs from other environments. Pipes are nice to have but not -vital. - -* Menu: - -* Atari Compiling:: Compiling `gawk' on Atari. -* Atari Using:: Running `gawk' on Atari. - - -File: gawk.info, Node: Atari Compiling, Next: Atari Using, Up: Atari Installation - -B.4.1.1 Compiling `gawk' on the Atari ST -........................................ - -A proper compilation of `gawk' sources when `sizeof(int)' differs from -`sizeof(void *)' requires an ISO C compiler. An initial port was done -with `gcc'. You may actually prefer executables where `int()'s are -four bytes wide but the other variant works as well. - - You may need quite a bit of memory when trying to recompile the -`gawk' sources, as some source files (`regex.c' in particular) are quite -big. If you run out of memory compiling such a file, try reducing the -optimization level for this particular file, which may help. - - With a reasonable shell (Bash will do), you have a pretty good chance -that the `configure' utility will succeed, and in particular if you run -GNU/Linux, MiNT or a similar operating system. Otherwise sample -versions of `config.h' and `Makefile.st' are given in the `atari' -subdirectory and can be edited and copied to the corresponding files in -the main source directory. Even if `configure' produces something, it -might be advisable to compare its results with the sample versions and -possibly make adjustments. - - Some `gawk' source code fragments depend on a preprocessor define -`atarist'. This basically assumes the TOS environment with `gcc'. -Modify these sections as appropriate if they are not right for your -environment. Also see the remarks about `AWKPATH' and `envsep' in -*note Atari Using::. - - As shipped, the sample `config.h' claims that the `system()' -function is missing from the libraries, which is not true, and an -alternative implementation of this function is provided in -`unsupported/atari/system.c'. Depending upon your particular -combination of shell and operating system, you might want to change the -file to indicate that `system()' is available. - - -File: gawk.info, Node: Atari Using, Prev: Atari Compiling, Up: Atari Installation - -B.4.1.2 Running `gawk' on the Atari ST -...................................... - -An executable version of `gawk' should be placed, as usual, anywhere in -your `PATH' where your shell can find it. - - While executing, the Atari version of `gawk' creates a number of -temporary files. When using `gcc' libraries for TOS, `gawk' looks for -either of the environment variables, `TEMP' or `TMPDIR', in that order. -If either one is found, its value is assumed to be a directory for -temporary files. This directory must exist, and if you can spare the -memory, it is a good idea to put it on a RAM drive. If neither `TEMP' -nor `TMPDIR' are found, then `gawk' uses the current directory for its -temporary files. - - The ST version of `gawk' searches for its program files, as -described in *note AWKPATH Variable::. The default value for the -`AWKPATH' variable is taken from `DEFPATH' defined in `Makefile'. The -sample `gcc'/TOS `Makefile' for the ST in the distribution sets -`DEFPATH' to `".,c:\lib\awk,c:\gnu\lib\awk"'. The search path can be -modified by explicitly setting `AWKPATH' to whatever you want. Note -that colons cannot be used on the ST to separate elements in the -`AWKPATH' variable, since they have another reserved meaning. Instead, -you must use a comma to separate elements in the path. When -recompiling, the separating character can be modified by initializing -the `envsep' variable in `unsupported/atari/gawkmisc.atr' to another -value. - - Although `awk' allows great flexibility in doing I/O redirections -from within a program, this facility should be used with care on the ST -running under TOS. In some circumstances, the OS routines for -file-handle pool processing lose track of certain events, causing the -computer to crash and requiring a reboot. Often a warm reboot is -sufficient. Fortunately, this happens infrequently and in rather -esoteric situations. In particular, avoid having one part of an `awk' -program using `print' statements explicitly redirected to -`/dev/stdout', while other `print' statements use the default standard -output, and a calling shell has redirected standard output to a file. - - When `gawk' is compiled with the ST version of `gcc' and its usual -libraries, it accepts both `/' and `\' as path separators. While this -is convenient, it should be remembered that this removes one -technically valid character (`/') from your file name. It may also -create problems for external programs called via the `system()' -function, which may not support this convention. Whenever it is -possible that a file created by `gawk' will be used by some other -program, use only backslashes. Also remember that in `awk', -backslashes in strings have to be doubled in order to get literal -backslashes (*note Escape Sequences::). - - -File: gawk.info, Node: BeOS Installation, Next: Tandem Installation, Prev: Atari Installation, Up: Unsupported - -B.4.2 Installing `gawk' on BeOS -------------------------------- - -Since BeOS DR9, all the tools that you should need to build `gawk' are -included with BeOS. The process is basically identical to the Unix -process of running `configure' and then `make'. Full instructions are -given below. - - You can compile `gawk' under BeOS by extracting the standard sources -and running `configure'. You _must_ specify the location prefix for the -installation directory. For BeOS DR9 and beyond, the best directory to -use is `/boot/home/config', so the `configure' command is: - - configure --prefix=/boot/home/config - - This installs the compiled application into `/boot/home/config/bin', -which is already specified in the standard `PATH'. - - Once the configuration process is completed, you can run `make', and -then `make install': - - $ make - ... - $ make install - - BeOS uses Bash as its shell; thus, you use `gawk' the same way you -would under Unix. If these steps do not work, please send in a bug -report (*note Bugs::). + $ gawk :== $sys$common:[syshlp.examples.tcpip.snmp]gawk.exe - -File: gawk.info, Node: Tandem Installation, Prev: BeOS Installation, Up: Unsupported - -B.4.3 Installing `gawk' on a Tandem ------------------------------------ - -The Tandem port is only minimally supported. The port's contributor no -longer has access to a Tandem system. - - The Tandem port was done on a Cyclone machine running D20. The port -is pretty clean and all facilities seem to work except for the I/O -piping facilities (*note Getline/Pipe::, *note Getline/Variable/Pipe::, -and *note Redirection::), which is just too foreign a concept for -Tandem. - - To build a Tandem executable from source, download all of the files -so that the file names on the Tandem box conform to the restrictions of -D20. For example, `array.c' becomes `ARRAYC', and `awk.h' becomes -`AWKH'. The totally Tandem-specific files are in the `tandem' -"subvolume" (`unsupported/tandem' in the `gawk' distribution) and -should be copied to the main source directory before building `gawk'. - - The file `compit' can then be used to compile and bind an executable. -Alas, there is no `configure' or `make'. - - Usage is the same as for Unix, except that D20 requires all `{' and -`}' characters to be escaped with `~' on the command line (but _not_ in -script files). Also, the standard Tandem syntax for `/in filename,out -filename/' must be used instead of the usual Unix `<' and `>' for file -redirection. (Redirection options on `getline', `print' etc., are -supported.) - - The `-mr VAL' option (*note Options::) has been "stolen" to enable -Tandem users to process fixed-length records with no "end-of-line" -character. That is, `-mr 74' tells `gawk' to read the input file as -fixed 74-byte records. + This is apparently version 2.15.6, which is extremely old. We +recommend compiling and using the current version. -File: gawk.info, Node: Bugs, Next: Other Versions, Prev: Unsupported, Up: Installation +File: gawk.info, Node: Bugs, Next: Other Versions, Prev: Non-Unix Installation, Up: Installation -B.5 Reporting Problems and Bugs +B.4 Reporting Problems and Bugs =============================== There is nothing more dangerous than a bored archeologist. @@ -20851,21 +20534,22 @@ compile `gawk', and the exact results `gawk' gave you. Also say what you expected to occur; this helps us decide whether the problem is really in the documentation. + Please include the version number of `gawk' you are using. You can +get this information with the command `gawk --version'. + Once you have a precise problem, send email to <bug-gawk@gnu.org>. - Please include the version number of `gawk' you are using. You can -get this information with the command `gawk --version'. Using this -address automatically sends a carbon copy of your mail to me. If -necessary, I can be reached directly at <arnold@skeeve.com>. The bug -reporting address is preferred since the email list is archived at the -GNU Project. _All email should be in English, since that is my native -language._ + Using this address automatically sends a carbon copy of your mail to +me. If necessary, I can be reached directly at <arnold@skeeve.com>. +The bug reporting address is preferred since the email list is archived +at the GNU Project. _All email should be in English, since that is my +native language._ *Caution:* Do _not_ try to report bugs in `gawk' by posting to the Usenet/Internet newsgroup `comp.lang.awk'. While the `gawk' developers do occasionally read this newsgroup, there is no guarantee that we will see your posting. The steps described above are the official -recognized ways for reporting bugs. +recognized ways for reporting bugs. Really. NOTE: Many distributions of GNU/Linux and the various BSD-based operating systems have their own bug reporting systems. If you @@ -20896,6 +20580,7 @@ considered authoritative if it conflicts with this Info file. MS-Windows using MINGW Eli Zaretskii, <eliz@gnu.org>. Scott Deifik, <scottd.mail@sbcglobal.net>. OS/2 Andreas Buening, <andreas.buening@nexgo.de> +Tandem (POSIX-compliant) Matthew Woehlke, <mw_triad@users.sourceforge.net> VMS Pat Rankin, <rankin@pactechdata.com>. z/OS (OS/390) Dave Pitts, <pitts@cozx.com>. @@ -20905,7 +20590,7 @@ your report to the <bug-gawk@gnu.org> email list as well. File: gawk.info, Node: Other Versions, Prev: Bugs, Up: Installation -B.6 Other Freely Available `awk' Implementations +B.5 Other Freely Available `awk' Implementations ================================================ It's kind of fun to put comments like this in your awk code. @@ -20946,9 +20631,9 @@ Unix `awk' `http://www.skeeve.com/gawk/mawk1.3.3.tar.gz'. In 2009, Thomas Dickey took on `mawk' maintenance. Basic - information is availabe on the project's web page + information is available on the project's web page (http://www.invisible-island.net/mawk/mawk.html). The download - URL is `ftp://invisible-island.net/mawk/mawk.tar.gz'. + URL is `http://invisible-island.net/datafiles/release/mawk.tar.gz'. Once you have it, `gunzip' may be used to decompress this file. Installation is similar to `gawk''s (*note Unix Installation::). @@ -20992,8 +20677,10 @@ Unix `awk' The `awk' translator is released under the GPL, and the library is under the LGPL. - To get `awka', go to `http://awka.sourceforge.net'. You can reach - Andrew Sumner at <andrew@zbcom.net>. + To get `awka', go to `http://sourceforge.net/projects/awka'. + + The project seems to be frozen; no new code changes have been made + since approximately 2003. `pawk' Nelson H.F. Beebe at the University of Utah has modified the Bell @@ -21004,14 +20691,14 @@ Unix `awk' `http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'. The OpenSolaris POSIX `awk' - The version of `awk' in `/usr/xpg4/bin' on Solaris is POSIX - compliant. It is based on the `awk' from Mortice Kern Systems for - PCs. The source code can be downloaded from the OpenSolaris web - site (http://www.opensolaris.org). This author was able to make - it compile and work under GNU/Linux with 1-2 hours of work. - Making it more generally portable (using GNU Autoconf and/or - Automake) would take more work, and this has not been done, at - least to our knowledge. + The version of `awk' in `/usr/xpg4/bin' on Solaris is more-or-less + POSIX compliant. It is based on the `awk' from Mortice Kern + Systems for PCs. The source code can be downloaded from the + OpenSolaris web site (http://www.opensolaris.org). This author + was able to make it compile and work under GNU/Linux with 1-2 + hours of work. Making it more generally portable (using GNU + Autoconf and/or Automake) would take more work, and this has not + been done, at least to our knowledge. `jawk' This is an interpreter for `awk' written in Java. It claims to be @@ -22917,7 +22604,7 @@ Octal are written in C using a leading `0', to indicate their base. Thus, `013' is 11 (one times 8 plus 3). -P1003.2 +P1003.1, P1003.2 See "POSIX." Pattern @@ -22934,10 +22621,7 @@ POSIX The name for a series of standards that specify a Portable Operating System interface. The "IX" denotes the Unix heritage of these standards. The main standard of interest for `awk' users is - `IEEE Standard for Information Technology, Standard 1003.2-1992, - Portable Operating System Interface (POSIX) Part 2: Shell and - Utilities'. Informally, this standard is often referred to as - simply "P1003.2." + `IEEE Standard for Information Technology, Standard 1003.1-2008'. Precedence The order in which operations are performed when operators are used @@ -24865,7 +24549,6 @@ Index * asterisk (*), *= operator <1>: Precedence. (line 95) * asterisk (*), *= operator: Assignment Ops. (line 129) * atan2() function: Numeric Functions. (line 11) -* atari: Atari Installation. (line 9) * awf (amazingly workable formatter) program: Glossary. (line 20) * awk language, POSIX version: Assignment Ops. (line 136) * awk programs <1>: Two Rules. (line 6) @@ -24978,7 +24661,7 @@ Index * backtrace debugger command: Dgawk Stack. (line 13) * BBS-list file: Sample Data Files. (line 6) * Beebe, Nelson: Acknowledgments. (line 59) -* Beebe, Nelson H.F.: Other Versions. (line 93) +* Beebe, Nelson H.F.: Other Versions. (line 95) * BEGIN pattern <1>: BEGIN/END. (line 6) * BEGIN pattern <2>: Field Separators. (line 44) * BEGIN pattern: Records. (line 29) @@ -25005,8 +24688,7 @@ Index * BEGINFILE special pattern: BEGINFILE/ENDFILE. (line 6) * beginfile() user-defined function: Filetrans Function. (line 62) * Bell Laboratories awk extensions: BTL. (line 6) -* Benzinger, Michael: Contributors. (line 89) -* BeOS: BeOS Installation. (line 6) +* Benzinger, Michael: Contributors. (line 92) * Berry, Karl: Acknowledgments. (line 32) * binary input/output: User-modified. (line 10) * bindtextdomain() function (C library): Explaining gettext. (line 49) @@ -25036,12 +24718,12 @@ Index * Brennan, Michael <2>: Simple Sed. (line 25) * Brennan, Michael <3>: Two-way I/O. (line 6) * Brennan, Michael: Delete. (line 51) -* Broder, Alan J.: Contributors. (line 80) -* Brown, Martin: Contributors. (line 75) -* BSD-based operating systems: Glossary. (line 583) +* Broder, Alan J.: Contributors. (line 83) +* Brown, Martin: Contributors. (line 78) +* BSD-based operating systems: Glossary. (line 580) * bt debugger command (alias for backtrace): Dgawk Stack. (line 13) -* Buening, Andreas <1>: Bugs. (line 70) -* Buening, Andreas <2>: Contributors. (line 84) +* Buening, Andreas <1>: Bugs. (line 71) +* Buening, Andreas <2>: Contributors. (line 87) * Buening, Andreas: Acknowledgments. (line 59) * buffering, input/output <1>: Two-way I/O. (line 70) * buffering, input/output: I/O Functions. (line 131) @@ -25049,8 +24731,8 @@ Index * buffers, flushing: I/O Functions. (line 29) * buffers, operators for: GNU Regexp Operators. (line 48) -* bug reports, email address, bug-gawk@gnu.org: Bugs. (line 27) -* bug-gawk@gnu.org bug reporting address: Bugs. (line 27) +* bug reports, email address, bug-gawk@gnu.org: Bugs. (line 30) +* bug-gawk@gnu.org bug reporting address: Bugs. (line 30) * built-in functions: Functions. (line 6) * built-in functions, evaluation order: Calling Built-in. (line 30) * built-in variables: Built-in Variables. (line 6) @@ -25144,7 +24826,7 @@ Index * commenting: Comments. (line 6) * commenting, backslash continuation and: Statements/Lines. (line 75) * common extensions, \x escape sequence: Escape Sequences. (line 61) -* comp.lang.awk newsgroup: Bugs. (line 37) +* comp.lang.awk newsgroup: Bugs. (line 38) * comparison expressions: Typing and Comparison. (line 9) * comparison expressions, as patterns: Expression Patterns. (line 14) @@ -25159,8 +24841,9 @@ Index * compatibility mode (gawk), specifying: Options. (line 78) * compiled programs <1>: Glossary. (line 155) * compiled programs: Basic High Level. (line 15) -* compiling gawk for DOS and Windows: PC Compiling. (line 13) -* compiling gawk with EMX for OS/2 and Windows: PC Compiling. (line 28) +* compiling gawk for MS-DOS and MS-Windows: PC Compiling. (line 13) +* compiling gawk with EMX for OS/2 and MS-Windows: PC Compiling. + (line 28) * compl() function (gawk): Bitwise Functions. (line 42) * complement, bitwise: Bitwise Functions. (line 25) * compound statements, control statements and: Statements. (line 10) @@ -25203,7 +24886,7 @@ Index * ctime() user-defined function: Function Example. (line 72) * currency symbols, localization: Explaining gettext. (line 103) * custom.h file: Configuration Philosophy. - (line 29) + (line 30) * cut utility: Cut Program. (line 6) * cut.awk program: Cut Program. (line 45) * Cygwin build of gawk: Cygwin. (line 6) @@ -25259,7 +24942,7 @@ Index * dates, converting to timestamps: Time Functions. (line 74) * dates, information related to, localization: Explaining gettext. (line 115) -* Davies, Stephen <1>: Contributors. (line 69) +* Davies, Stephen <1>: Contributors. (line 71) * Davies, Stephen: Acknowledgments. (line 59) * dcgettext() function (gawk) <1>: Programmer i18n. (line 19) * dcgettext() function (gawk): I18N Functions. (line 22) @@ -25370,7 +25053,7 @@ Index * decimal point character, locale specific: Options. (line 222) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) -* Deifik, Scott <1>: Bugs. (line 69) +* Deifik, Scott <1>: Bugs. (line 70) * Deifik, Scott <2>: Contributors. (line 53) * Deifik, Scott: Acknowledgments. (line 59) * delete debugger command: Breakpoint Control. (line 58) @@ -25484,7 +25167,7 @@ Index * elements in arrays, deleting: Delete. (line 6) * elements in arrays, order of: Scanning an Array. (line 48) * elements in arrays, scanning: Scanning an Array. (line 6) -* email address for bug reports, bug-gawk@gnu.org: Bugs. (line 27) +* email address for bug reports, bug-gawk@gnu.org: Bugs. (line 30) * EMISTERED: TCP/IP Networking. (line 6) * empty pattern: Empty. (line 6) * empty strings, See null strings: Regexp Field Splitting. @@ -25720,7 +25403,7 @@ Index * Free Software Foundation (FSF) <1>: Glossary. (line 286) * Free Software Foundation (FSF) <2>: Getting. (line 10) * Free Software Foundation (FSF): Manual History. (line 6) -* FreeBSD: Glossary. (line 583) +* FreeBSD: Glossary. (line 580) * FS variable <1>: User-modified. (line 56) * FS variable: Field Separators. (line 14) * FS variable, --field-separator option and: Options. (line 21) @@ -25914,9 +25597,8 @@ Index * GNU long options, printing list of: Options. (line 142) * GNU Project <1>: Glossary. (line 304) * GNU Project: Manual History. (line 11) -* GNU/Linux <1>: Glossary. (line 583) -* GNU/Linux <2>: Atari Compiling. (line 16) -* GNU/Linux <3>: I18N Example. (line 55) +* GNU/Linux <1>: Glossary. (line 580) +* GNU/Linux <2>: I18N Example. (line 55) * GNU/Linux: Manual History. (line 28) * GPL (General Public License) <1>: Glossary. (line 295) * GPL (General Public License): Manual History. (line 11) @@ -25933,12 +25615,13 @@ Index * gsub() function, escape processing: Gory Details. (line 6) * h debugger command (alias for help): Miscellaneous Dgawk Commands. (line 71) -* Hankerson, Darrel <1>: Contributors. (line 57) +* Hankerson, Darrel <1>: Contributors. (line 58) * Hankerson, Darrel: Acknowledgments. (line 59) +* Haque, John <1>: Contributors. (line 98) * Haque, John: Acknowledgments. (line 59) * Hartholz, Elaine: Acknowledgments. (line 37) * Hartholz, Marshall: Acknowledgments. (line 37) -* Hasegawa, Isamu: Contributors. (line 86) +* Hasegawa, Isamu: Contributors. (line 89) * help debugger command: Miscellaneous Dgawk Commands. (line 71) * hexadecimal numbers: Nondecimal-numbers. (line 6) @@ -26007,9 +25690,6 @@ Index * input/output, from BEGIN and END: I/O And BEGIN/END. (line 6) * input/output, two-way: Two-way I/O. (line 44) * insomnia, cure for: Alarm Program. (line 6) -* installation, atari: Atari Installation. (line 9) -* installation, beos: BeOS Installation. (line 6) -* installation, tandem: Tandem Installation. (line 6) * installation, vms: VMS Installation. (line 6) * installing gawk: Installation. (line 6) * INT signal (MS-Windows): Profiling. (line 207) @@ -26045,11 +25725,11 @@ Index * Jacobs, Andrew: Passwd Functions. (line 90) * Jaegermann, Michal <1>: Contributors. (line 45) * Jaegermann, Michal: Acknowledgments. (line 59) -* Java implementation of awk: Other Versions. (line 111) -* jawk: Other Versions. (line 111) +* Java implementation of awk: Other Versions. (line 113) +* jawk: Other Versions. (line 113) * Jedi knights: Undocumented. (line 6) * join() user-defined function: Join Function. (line 18) -* Kahrs, Ju"rgen <1>: Contributors. (line 65) +* Kahrs, Ju"rgen <1>: Contributors. (line 67) * Kahrs, Ju"rgen: Acknowledgments. (line 59) * Kasal, Stepan: Acknowledgments. (line 59) * Kenobi, Obi-Wan: Undocumented. (line 6) @@ -26090,7 +25770,7 @@ Index * length() function: String Functions. (line 137) * Lesser General Public License (LGPL): Glossary. (line 374) * LGPL (Lesser General Public License): Glossary. (line 374) -* Libmawk: Other Versions. (line 130) +* Libmawk: Other Versions. (line 132) * libraries of awk functions: Library Functions. (line 6) * libraries of awk functions, assertions: Assert Function. (line 6) * libraries of awk functions, associative arrays and: Library Names. @@ -26136,9 +25816,8 @@ Index * lint checking, undefined functions: Pass By Value/Reference. (line 88) * LINT variable: User-modified. (line 98) -* Linux <1>: Glossary. (line 583) -* Linux <2>: Atari Compiling. (line 16) -* Linux <3>: I18N Example. (line 55) +* Linux <1>: Glossary. (line 580) +* Linux <2>: I18N Example. (line 55) * Linux: Manual History. (line 28) * list debugger command: Miscellaneous Dgawk Commands. (line 77) @@ -26182,7 +25861,7 @@ Index * matching, leftmost longest: Multiple Line. (line 26) * matching, null strings: Gory Details. (line 96) * mawk program: Other Versions. (line 34) -* McPhee, Patrick: Contributors. (line 92) +* McPhee, Patrick: Contributors. (line 95) * memory, releasing: Internals. (line 92) * message object files: Explaining gettext. (line 41) * message object files, converting from portable object files: I18N Example. @@ -26208,7 +25887,7 @@ Index * nargs internal variable: Internals. (line 46) * nawk utility: Names. (line 17) * negative zero: Unexpected Results. (line 28) -* NetBSD: Glossary. (line 583) +* NetBSD: Glossary. (line 580) * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Boolean Ops. (line 67) @@ -26225,7 +25904,6 @@ Index (line 19) * next debugger command: Dgawk Execution Control. (line 43) -* next file statement: POSIX/GNU. (line 155) * next statement <1>: Next Statement. (line 6) * next statement: Boolean Ops. (line 85) * next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36) @@ -26299,8 +25977,8 @@ Index * OFS variable <1>: User-modified. (line 124) * OFS variable <2>: Output Separators. (line 6) * OFS variable: Changing Fields. (line 64) -* OpenBSD: Glossary. (line 583) -* OpenSolaris: Other Versions. (line 101) +* OpenBSD: Glossary. (line 580) +* OpenSolaris: Other Versions. (line 103) * operating systems, BSD-based: Manual History. (line 28) * operating systems, PC, gawk on: PC Using. (line 6) * operating systems, PC, gawk on, installing: PC Installation. @@ -26368,6 +26046,7 @@ Index * output, standard: Special FD. (line 6) * p debugger command (alias for print): Viewing And Changing Data. (line 36) +* P1003.1 POSIX standard: Glossary. (line 427) * P1003.2 POSIX standard: Glossary. (line 427) * parameters, number of: Internals. (line 46) * parentheses (): Regexp Operators. (line 78) @@ -26384,7 +26063,7 @@ Index * patterns, ranges in: Ranges. (line 6) * patterns, regexp constants as: Expression Patterns. (line 36) * patterns, types of: Pattern Overview. (line 15) -* pawk profiling Bell Labs awk: Other Versions. (line 93) +* pawk profiling Bell Labs awk: Other Versions. (line 95) * PC operating systems, gawk on: PC Using. (line 6) * PC operating systems, gawk on, installing: PC Installation. (line 6) * percent sign (%), % operator: Precedence. (line 55) @@ -26392,7 +26071,7 @@ Index * percent sign (%), %= operator: Assignment Ops. (line 129) * period (.): Regexp Operators. (line 43) * PERL: Future Extensions. (line 6) -* Peters, Arno: Contributors. (line 77) +* Peters, Arno: Contributors. (line 80) * Peterson, Hal: Contributors. (line 40) * pgawk program: Profiling. (line 6) * pgawk program, awkprof.out file: Profiling. (line 10) @@ -26401,7 +26080,7 @@ Index (line 6) * pipes, input: Getline/Pipe. (line 6) * pipes, output: Redirection. (line 57) -* Pitts, Dave <1>: Bugs. (line 72) +* Pitts, Dave <1>: Bugs. (line 74) * Pitts, Dave: Acknowledgments. (line 59) * plus sign (+): Regexp Operators. (line 101) * plus sign (+), + operator: Precedence. (line 52) @@ -26562,12 +26241,12 @@ Index * pwcat program: Passwd Functions. (line 23) * q debugger command (alias for quit): Miscellaneous Dgawk Commands. (line 104) -* QSE Awk: Other Versions. (line 126) +* QSE Awk: Other Versions. (line 128) * question mark (?) <1>: GNU Regexp Operators. (line 59) * question mark (?): Regexp Operators. (line 110) * question mark (?), ?: operator: Precedence. (line 92) -* QuikTrim Awk: Other Versions. (line 119) +* QuikTrim Awk: Other Versions. (line 121) * quit debugger command: Miscellaneous Dgawk Commands. (line 104) * QUIT signal (MS-Windows): Profiling. (line 207) @@ -26587,7 +26266,7 @@ Index * random numbers, seed of: Numeric Functions. (line 63) * range expressions: Character Lists. (line 6) * range patterns: Ranges. (line 6) -* Rankin, Pat <1>: Bugs. (line 71) +* Rankin, Pat <1>: Bugs. (line 73) * Rankin, Pat <2>: Contributors. (line 35) * Rankin, Pat <3>: Assignment Ops. (line 100) * Rankin, Pat: Acknowledgments. (line 59) @@ -26678,8 +26357,8 @@ Index * RLENGTH variable: Auto-set. (line 176) * RLENGTH variable, match() function and: String Functions. (line 194) * Robbins, Arnold <1>: Future Extensions. (line 6) -* Robbins, Arnold <2>: Bugs. (line 29) -* Robbins, Arnold <3>: Contributors. (line 95) +* Robbins, Arnold <2>: Bugs. (line 32) +* Robbins, Arnold <3>: Contributors. (line 101) * Robbins, Arnold <4>: Alarm Program. (line 6) * Robbins, Arnold <5>: Passwd Functions. (line 90) * Robbins, Arnold <6>: Getline/Pipe. (line 36) @@ -26788,7 +26467,7 @@ Index * single-precision floating-point: Basic Data Typing. (line 33) * Skywalker, Luke: Undocumented. (line 6) * sleep utility: Alarm Program. (line 109) -* Solaris, POSIX compliant awk: Other Versions. (line 101) +* Solaris, POSIX compliant awk: Other Versions. (line 103) * sort function, arrays, sorting: Array Sorting. (line 6) * sort utility: Word Sorting. (line 56) * sort utility, coprocesses and: Two-way I/O. (line 83) @@ -26882,7 +26561,6 @@ Index * system() function: I/O Functions. (line 64) * systime() function (gawk): Time Functions. (line 64) * t debugger command (alias for tbreak): Breakpoint Control. (line 84) -* tandem: Tandem Installation. (line 6) * tbreak debugger command: Breakpoint Control. (line 84) * Tcl: Library Names. (line 57) * TCP/IP: TCP/IP Networking. (line 6) @@ -26988,7 +26666,7 @@ Index (line 6) * uniq utility: Uniq Program. (line 6) * uniq.awk program: Uniq Program. (line 65) -* Unix: Glossary. (line 583) +* Unix: Glossary. (line 580) * Unix awk, backslashes in escape sequences: Escape Sequences. (line 125) * Unix awk, close() function and: Close Files And Pipes. @@ -27078,7 +26756,8 @@ Index * whitespace, functions, calling: Calling Built-in. (line 10) * whitespace, newlines as: Options. (line 205) * Williams, Kent: Contributors. (line 37) -* Woehlke, Matthew: Contributors. (line 72) +* Woehlke, Matthew <1>: Bugs. (line 72) +* Woehlke, Matthew: Contributors. (line 75) * Woods, John: Contributors. (line 28) * word boundaries, matching: GNU Regexp Operators. (line 38) @@ -27094,11 +26773,11 @@ Index * XML: Internals. (line 162) * XOR bitwise operation: Bitwise Functions. (line 6) * xor() function (gawk): Bitwise Functions. (line 54) -* Zaretskii, Eli <1>: Bugs. (line 69) +* Zaretskii, Eli <1>: Bugs. (line 70) * Zaretskii, Eli: Acknowledgments. (line 59) * zero, negative vs. positive: Unexpected Results. (line 28) * zerofile.awk program: Empty Files. (line 21) -* Zoulas, Christos: Contributors. (line 62) +* Zoulas, Christos: Contributors. (line 64) * {} (braces), actions and: Action Overview. (line 19) * {} (braces), pgawk program: Profiling. (line 137) * {} (braces), statements, grouping: Statements. (line 10) @@ -27127,410 +26806,404 @@ Index Tag Table: Node: Top1340 -Node: Foreword30345 -Node: Preface34665 -Ref: Preface-Footnote-137617 -Ref: Preface-Footnote-237723 -Node: History37955 -Node: Names40187 -Ref: Names-Footnote-141664 -Node: This Manual41736 -Ref: This Manual-Footnote-146634 -Node: Conventions46734 -Node: Manual History48793 -Ref: Manual History-Footnote-151971 -Ref: Manual History-Footnote-252012 -Node: How To Contribute52086 -Node: Acknowledgments53230 -Node: Getting Started57499 -Node: Running gawk59878 -Node: One-shot61064 -Node: Read Terminal62289 -Ref: Read Terminal-Footnote-163939 -Ref: Read Terminal-Footnote-264213 -Node: Long64384 -Node: Executable Scripts65760 -Ref: Executable Scripts-Footnote-167621 -Ref: Executable Scripts-Footnote-267723 -Node: Comments68174 -Node: Quoting70542 -Node: DOS Quoting75159 -Node: Sample Data Files75828 -Node: Very Simple78860 -Node: Two Rules83457 -Node: More Complex85604 -Ref: More Complex-Footnote-188534 -Node: Statements/Lines88614 -Ref: Statements/Lines-Footnote-192972 -Node: Other Features93237 -Node: When94106 -Node: Invoking Gawk96249 -Node: Command Line97634 -Node: Options98417 -Ref: Options-Footnote-1111763 -Node: Other Arguments111788 -Node: Naming Standard Input114451 -Node: Environment Variables115415 -Node: AWKPATH Variable115859 -Ref: AWKPATH Variable-Footnote-1118596 -Node: Other Environment Variables118856 -Node: Exit Status121204 -Node: Include Files121879 -Node: Obsolete125270 -Node: Undocumented125956 -Node: Regexp126197 -Node: Regexp Usage127649 -Node: Escape Sequences129675 -Node: Regexp Operators135418 -Ref: Regexp Operators-Footnote-1142590 -Ref: Regexp Operators-Footnote-2142737 -Node: Character Lists142835 -Ref: table-char-classes144610 -Node: GNU Regexp Operators147235 -Node: Case-sensitivity150948 -Ref: Case-sensitivity-Footnote-1153903 -Ref: Case-sensitivity-Footnote-2154138 -Node: Leftmost Longest154246 -Node: Computed Regexps155447 -Node: Locales158864 -Node: Reading Files162406 -Node: Records164347 -Ref: Records-Footnote-1173019 -Node: Fields173056 -Ref: Fields-Footnote-1176088 -Node: Nonconstant Fields176174 -Node: Changing Fields178376 -Node: Field Separators183661 -Node: Default Field Splitting186290 -Node: Regexp Field Splitting187407 -Node: Single Character Fields190757 -Node: Command Line Field Separator191808 -Node: Field Splitting Summary195247 -Ref: Field Splitting Summary-Footnote-1198433 -Node: Constant Size198534 -Node: Splitting By Content203096 -Ref: Splitting By Content-Footnote-1206822 -Node: Multiple Line206862 -Ref: Multiple Line-Footnote-1212709 -Node: Getline212888 -Node: Plain Getline215116 -Node: Getline/Variable217205 -Node: Getline/File218346 -Node: Getline/Variable/File219668 -Ref: Getline/Variable/File-Footnote-1221267 -Node: Getline/Pipe221354 -Node: Getline/Variable/Pipe223902 -Node: Getline/Coprocess225009 -Node: Getline/Variable/Coprocess226252 -Node: Getline Notes226966 -Node: Getline Summary228908 -Ref: table-getline-variants229192 -Node: Command line directories230097 -Node: Printing230722 -Node: Print232353 -Node: Print Examples233690 -Node: Output Separators236474 -Node: OFMT238233 -Node: Printf239591 -Node: Basic Printf240497 -Node: Control Letters242034 -Node: Format Modifiers245846 -Node: Printf Examples251857 -Node: Redirection254572 -Node: Special Files261550 -Node: Special FD262083 -Ref: Special FD-Footnote-1265658 -Node: Special Network265732 -Node: Special Caveats266587 -Node: Close Files And Pipes267381 -Ref: Close Files And Pipes-Footnote-1274325 -Ref: Close Files And Pipes-Footnote-2274473 -Node: Expressions274623 -Node: Values275692 -Node: Constants276368 -Node: Scalar Constants277048 -Ref: Scalar Constants-Footnote-1277907 -Node: Nondecimal-numbers278089 -Node: Regexp Constants281148 -Node: Using Constant Regexps281623 -Node: Variables284628 -Node: Using Variables285283 -Node: Assignment Options287010 -Node: Conversion288891 -Ref: table-locale-affects294265 -Ref: Conversion-Footnote-1294889 -Node: All Operators294998 -Node: Arithmetic Ops295628 -Node: Concatenation298127 -Ref: Concatenation-Footnote-1300920 -Node: Assignment Ops301039 -Ref: table-assign-ops306027 -Node: Increment Ops307428 -Node: Truth Values and Conditions310906 -Node: Truth Values311989 -Node: Typing and Comparison313037 -Node: Variable Typing313826 -Ref: Variable Typing-Footnote-1317723 -Node: Comparison Operators317845 -Ref: table-relational-ops318255 -Node: POSIX String Comparison321804 -Ref: POSIX String Comparison-Footnote-1322761 -Node: Boolean Ops322899 -Ref: Boolean Ops-Footnote-1326977 -Node: Conditional Exp327068 -Node: Function Calls328800 -Node: Precedence332359 -Node: Patterns and Actions336012 -Node: Pattern Overview337066 -Node: Regexp Patterns338732 -Node: Expression Patterns339275 -Node: Ranges342849 -Node: BEGIN/END345815 -Node: Using BEGIN/END346565 -Ref: Using BEGIN/END-Footnote-1349296 -Node: I/O And BEGIN/END349410 -Node: Empty351679 -Node: BEGINFILE/ENDFILE352013 -Node: Using Shell Variables354838 -Node: Action Overview357117 -Node: Statements359474 -Node: If Statement361333 -Node: While Statement362832 -Node: Do Statement364876 -Node: For Statement366032 -Node: Switch Statement369184 -Node: Break Statement371281 -Node: Continue Statement373257 -Node: Next Statement374958 -Node: Nextfile Statement377340 -Node: Exit Statement379858 -Node: Built-in Variables382189 -Node: User-modified383284 -Ref: User-modified-Footnote-1391285 -Node: Auto-set391347 -Ref: Auto-set-Footnote-1400330 -Node: ARGC and ARGV400535 -Node: Arrays404294 -Node: Array Basics405865 -Node: Array Intro406576 -Node: Reference to Elements410894 -Node: Assigning Elements413164 -Node: Array Example413655 -Node: Scanning an Array415387 -Node: Delete417664 -Ref: Delete-Footnote-1420062 -Node: Numeric Array Subscripts420119 -Node: Uninitialized Subscripts422302 -Node: Multi-dimensional423930 -Node: Multi-scanning427021 -Node: Array Sorting428605 -Ref: Array Sorting-Footnote-1431803 -Node: Arrays of Arrays431997 -Node: Functions436159 -Node: Built-in436981 -Node: Calling Built-in437995 -Node: Numeric Functions439971 -Ref: Numeric Functions-Footnote-1443680 -Ref: Numeric Functions-Footnote-2444016 -Ref: Numeric Functions-Footnote-3444064 -Node: String Functions444333 -Ref: String Functions-Footnote-1466132 -Ref: String Functions-Footnote-2466261 -Ref: String Functions-Footnote-3466509 -Node: Gory Details466596 -Ref: table-sub-escapes468253 -Ref: table-posix-sub469567 -Ref: table-gensub-escapes470467 -Node: I/O Functions471638 -Ref: I/O Functions-Footnote-1478335 -Node: Time Functions478482 -Ref: Time Functions-Footnote-1489349 -Ref: Time Functions-Footnote-2489417 -Ref: Time Functions-Footnote-3489575 -Ref: Time Functions-Footnote-4489686 -Ref: Time Functions-Footnote-5489798 -Ref: Time Functions-Footnote-6490025 -Node: Bitwise Functions490291 -Ref: table-bitwise-ops490849 -Ref: Bitwise Functions-Footnote-1495009 -Node: I18N Functions495193 -Node: User-defined496823 -Node: Definition Syntax497627 -Ref: Definition Syntax-Footnote-1502257 -Node: Function Example502326 -Node: Function Caveats504920 -Node: Calling A Function505341 -Node: Variable Scope506430 -Node: Pass By Value/Reference508358 -Node: Return Statement511798 -Node: Dynamic Typing514740 -Node: Indirect Calls515477 -Node: Internationalization525162 -Node: I18N and L10N526590 -Node: Explaining gettext527276 -Ref: Explaining gettext-Footnote-1532338 -Ref: Explaining gettext-Footnote-2532521 -Node: Programmer i18n532686 -Node: Translator i18n536949 -Node: String Extraction537742 -Ref: String Extraction-Footnote-1538703 -Node: Printf Ordering538789 -Ref: Printf Ordering-Footnote-1541573 -Node: I18N Portability541637 -Ref: I18N Portability-Footnote-1544086 -Node: I18N Example544149 -Ref: I18N Example-Footnote-1546784 -Node: Gawk I18N546856 -Node: Advanced Features547425 -Node: Nondecimal Data548744 -Node: Two-way I/O550305 -Ref: Two-way I/O-Footnote-1555719 -Node: TCP/IP Networking555796 -Node: Profiling558568 -Node: Library Functions565968 -Ref: Library Functions-Footnote-1568938 -Node: Library Names569109 -Ref: Library Names-Footnote-1572580 -Ref: Library Names-Footnote-2572800 -Node: General Functions572886 -Node: Nextfile Function573949 -Node: Strtonum Function578330 -Node: Assert Function581281 -Node: Round Function584607 -Node: Cliff Random Function586148 -Node: Ordinal Functions587164 -Ref: Ordinal Functions-Footnote-1590234 -Ref: Ordinal Functions-Footnote-2590486 -Node: Join Function590702 -Ref: Join Function-Footnote-1592473 -Node: Gettimeofday Function592673 -Node: Data File Management596388 -Node: Filetrans Function597020 -Node: Rewind Function601257 -Node: File Checking602710 -Node: Empty Files603804 -Node: Ignoring Assigns606034 -Node: Getopt Function607587 -Ref: Getopt Function-Footnote-1618912 -Node: Passwd Functions619115 -Ref: Passwd Functions-Footnote-1628103 -Node: Group Functions628191 -Node: Sample Programs636271 -Node: Running Examples636936 -Node: Clones637664 -Node: Cut Program638787 -Node: Egrep Program648628 -Ref: Egrep Program-Footnote-1656399 -Node: Id Program656509 -Node: Split Program660125 -Ref: Split Program-Footnote-1663644 -Node: Tee Program663772 -Node: Uniq Program666575 -Node: Wc Program673998 -Ref: Wc Program-Footnote-1678262 -Node: Miscellaneous Programs678462 -Node: Dupword Program679582 -Node: Alarm Program681613 -Node: Translate Program686335 -Ref: Translate Program-Footnote-1690714 -Ref: Translate Program-Footnote-2690942 -Node: Labels Program691076 -Ref: Labels Program-Footnote-1694447 -Node: Word Sorting694531 -Node: History Sorting698876 -Node: Extract Program700714 -Ref: Extract Program-Footnote-1708140 -Node: Simple Sed708268 -Node: Igawk Program711330 -Ref: Igawk Program-Footnote-1726364 -Ref: Igawk Program-Footnote-2726565 -Node: Signature Program726703 -Node: Debugger727783 -Node: Debugging728694 -Node: Debugging Concepts729008 -Node: Debugging Terms730864 -Node: Awk Debugging733409 -Node: Sample dgawk session734301 -Node: dgawk invocation734793 -Node: Finding The Bug735975 -Node: List of Debugger Commands742534 -Node: Breakpoint Control743845 -Node: Dgawk Execution Control747171 -Node: Viewing And Changing Data750522 -Node: Dgawk Stack753831 -Node: Dgawk Info755291 -Node: Miscellaneous Dgawk Commands759239 -Node: Readline Support764953 -Node: Dgawk Limitations765780 -Node: Language History767919 -Node: V7/SVR3.1769296 -Node: SVR4771591 -Node: POSIX773036 -Node: BTL774748 -Node: POSIX/GNU776438 -Node: Contributors786244 -Node: Installation789853 -Node: Gawk Distribution790824 -Node: Getting791308 -Node: Extracting792134 -Node: Distribution contents793522 -Node: Unix Installation798595 -Node: Quick Installation799186 -Node: Additional Configuration Options800888 -Node: Configuration Philosophy802651 -Node: Non-Unix Installation805015 -Node: PC Installation805480 -Node: PC Binary Installation806755 -Node: PC Compiling808598 -Node: PC Testing812004 -Node: PC Using812825 -Node: Cygwin816992 -Node: MSYS817985 -Node: VMS Installation818493 -Node: VMS Compilation819097 -Node: VMS Installation Details820674 -Node: VMS Running822304 -Node: VMS POSIX823901 -Node: VMS Old Gawk825199 -Node: Unsupported825668 -Node: Atari Installation826130 -Node: Atari Compiling827417 -Node: Atari Using829306 -Node: BeOS Installation832153 -Node: Tandem Installation833298 -Node: Bugs834977 -Node: Other Versions838809 -Node: Notes844172 -Node: Compatibility Mode844864 -Node: Additions845647 -Node: Adding Code846397 -Node: New Ports852449 -Node: Dynamic Extensions856581 -Node: Internals857962 -Node: Plugin License868367 -Node: Sample Library869001 -Node: Internal File Description869665 -Node: Internal File Ops873360 -Ref: Internal File Ops-Footnote-1878236 -Node: Using Internal File Ops878384 -Node: Future Extensions880409 -Node: Basic Concepts884446 -Node: Basic High Level885203 -Ref: Basic High Level-Footnote-1889322 -Node: Basic Data Typing889516 -Node: Floating Point Issues893953 -Node: String Conversion Precision895036 -Ref: String Conversion Precision-Footnote-1896730 -Node: Unexpected Results896839 -Node: POSIX Floating Point Problems898665 -Ref: POSIX Floating Point Problems-Footnote-1902364 -Node: Glossary902402 -Node: Copying926185 -Node: GNU Free Documentation License963742 -Node: next-edition988886 -Node: unresolved989238 -Node: revision989738 -Node: consistency990161 -Node: Index993514 +Node: Foreword29910 +Node: Preface34230 +Ref: Preface-Footnote-137182 +Ref: Preface-Footnote-237288 +Node: History37520 +Node: Names39752 +Ref: Names-Footnote-141229 +Node: This Manual41301 +Ref: This Manual-Footnote-146199 +Node: Conventions46299 +Node: Manual History48358 +Ref: Manual History-Footnote-151536 +Ref: Manual History-Footnote-251577 +Node: How To Contribute51651 +Node: Acknowledgments52795 +Node: Getting Started57064 +Node: Running gawk59443 +Node: One-shot60629 +Node: Read Terminal61854 +Ref: Read Terminal-Footnote-163504 +Ref: Read Terminal-Footnote-263778 +Node: Long63949 +Node: Executable Scripts65325 +Ref: Executable Scripts-Footnote-167186 +Ref: Executable Scripts-Footnote-267288 +Node: Comments67739 +Node: Quoting70107 +Node: DOS Quoting74724 +Node: Sample Data Files75399 +Node: Very Simple78431 +Node: Two Rules83028 +Node: More Complex85175 +Ref: More Complex-Footnote-188105 +Node: Statements/Lines88185 +Ref: Statements/Lines-Footnote-192543 +Node: Other Features92808 +Node: When93677 +Node: Invoking Gawk95820 +Node: Command Line97205 +Node: Options97988 +Ref: Options-Footnote-1111334 +Node: Other Arguments111359 +Node: Naming Standard Input114022 +Node: Environment Variables114986 +Node: AWKPATH Variable115430 +Ref: AWKPATH Variable-Footnote-1118167 +Node: Other Environment Variables118427 +Node: Exit Status120775 +Node: Include Files121450 +Node: Obsolete124841 +Node: Undocumented125527 +Node: Regexp125768 +Node: Regexp Usage127220 +Node: Escape Sequences129246 +Node: Regexp Operators134989 +Ref: Regexp Operators-Footnote-1142161 +Ref: Regexp Operators-Footnote-2142308 +Node: Character Lists142406 +Ref: table-char-classes144181 +Node: GNU Regexp Operators146806 +Node: Case-sensitivity150519 +Ref: Case-sensitivity-Footnote-1153474 +Ref: Case-sensitivity-Footnote-2153709 +Node: Leftmost Longest153817 +Node: Computed Regexps155018 +Node: Locales158435 +Node: Reading Files161977 +Node: Records163918 +Ref: Records-Footnote-1172590 +Node: Fields172627 +Ref: Fields-Footnote-1175659 +Node: Nonconstant Fields175745 +Node: Changing Fields177947 +Node: Field Separators183232 +Node: Default Field Splitting185861 +Node: Regexp Field Splitting186978 +Node: Single Character Fields190328 +Node: Command Line Field Separator191379 +Node: Field Splitting Summary194818 +Ref: Field Splitting Summary-Footnote-1198004 +Node: Constant Size198105 +Node: Splitting By Content202667 +Ref: Splitting By Content-Footnote-1206393 +Node: Multiple Line206433 +Ref: Multiple Line-Footnote-1212280 +Node: Getline212459 +Node: Plain Getline214687 +Node: Getline/Variable216776 +Node: Getline/File217917 +Node: Getline/Variable/File219239 +Ref: Getline/Variable/File-Footnote-1220838 +Node: Getline/Pipe220925 +Node: Getline/Variable/Pipe223473 +Node: Getline/Coprocess224580 +Node: Getline/Variable/Coprocess225823 +Node: Getline Notes226537 +Node: Getline Summary228479 +Ref: table-getline-variants228763 +Node: Command line directories229668 +Node: Printing230293 +Node: Print231924 +Node: Print Examples233261 +Node: Output Separators236045 +Node: OFMT237804 +Node: Printf239162 +Node: Basic Printf240068 +Node: Control Letters241605 +Node: Format Modifiers245417 +Node: Printf Examples251428 +Node: Redirection254143 +Node: Special Files261121 +Node: Special FD261654 +Ref: Special FD-Footnote-1265229 +Node: Special Network265303 +Node: Special Caveats266158 +Node: Close Files And Pipes266952 +Ref: Close Files And Pipes-Footnote-1273896 +Ref: Close Files And Pipes-Footnote-2274044 +Node: Expressions274194 +Node: Values275263 +Node: Constants275939 +Node: Scalar Constants276619 +Ref: Scalar Constants-Footnote-1277478 +Node: Nondecimal-numbers277660 +Node: Regexp Constants280719 +Node: Using Constant Regexps281194 +Node: Variables284199 +Node: Using Variables284854 +Node: Assignment Options286581 +Node: Conversion288462 +Ref: table-locale-affects293836 +Ref: Conversion-Footnote-1294460 +Node: All Operators294569 +Node: Arithmetic Ops295199 +Node: Concatenation297698 +Ref: Concatenation-Footnote-1300491 +Node: Assignment Ops300610 +Ref: table-assign-ops305598 +Node: Increment Ops306999 +Node: Truth Values and Conditions310477 +Node: Truth Values311560 +Node: Typing and Comparison312608 +Node: Variable Typing313397 +Ref: Variable Typing-Footnote-1317294 +Node: Comparison Operators317416 +Ref: table-relational-ops317826 +Node: POSIX String Comparison321375 +Ref: POSIX String Comparison-Footnote-1322332 +Node: Boolean Ops322470 +Ref: Boolean Ops-Footnote-1326548 +Node: Conditional Exp326639 +Node: Function Calls328371 +Node: Precedence331930 +Node: Patterns and Actions335583 +Node: Pattern Overview336637 +Node: Regexp Patterns338303 +Node: Expression Patterns338846 +Node: Ranges342420 +Node: BEGIN/END345386 +Node: Using BEGIN/END346136 +Ref: Using BEGIN/END-Footnote-1348867 +Node: I/O And BEGIN/END348981 +Node: Empty351250 +Node: BEGINFILE/ENDFILE351584 +Node: Using Shell Variables354409 +Node: Action Overview356688 +Node: Statements359045 +Node: If Statement360904 +Node: While Statement362403 +Node: Do Statement364447 +Node: For Statement365603 +Node: Switch Statement368755 +Node: Break Statement370852 +Node: Continue Statement372828 +Node: Next Statement374529 +Node: Nextfile Statement376911 +Node: Exit Statement379429 +Node: Built-in Variables381760 +Node: User-modified382855 +Ref: User-modified-Footnote-1390856 +Node: Auto-set390918 +Ref: Auto-set-Footnote-1399901 +Node: ARGC and ARGV400106 +Node: Arrays403865 +Node: Array Basics405436 +Node: Array Intro406147 +Node: Reference to Elements410465 +Node: Assigning Elements412735 +Node: Array Example413226 +Node: Scanning an Array414958 +Node: Delete417235 +Ref: Delete-Footnote-1419633 +Node: Numeric Array Subscripts419690 +Node: Uninitialized Subscripts421873 +Node: Multi-dimensional423501 +Node: Multi-scanning426592 +Node: Array Sorting428176 +Ref: Array Sorting-Footnote-1431374 +Node: Arrays of Arrays431568 +Node: Functions435730 +Node: Built-in436552 +Node: Calling Built-in437566 +Node: Numeric Functions439542 +Ref: Numeric Functions-Footnote-1443251 +Ref: Numeric Functions-Footnote-2443587 +Ref: Numeric Functions-Footnote-3443635 +Node: String Functions443904 +Ref: String Functions-Footnote-1465703 +Ref: String Functions-Footnote-2465832 +Ref: String Functions-Footnote-3466080 +Node: Gory Details466167 +Ref: table-sub-escapes467824 +Ref: table-posix-sub469138 +Ref: table-gensub-escapes470038 +Node: I/O Functions471209 +Ref: I/O Functions-Footnote-1477906 +Node: Time Functions478053 +Ref: Time Functions-Footnote-1488920 +Ref: Time Functions-Footnote-2488988 +Ref: Time Functions-Footnote-3489146 +Ref: Time Functions-Footnote-4489257 +Ref: Time Functions-Footnote-5489369 +Ref: Time Functions-Footnote-6489596 +Node: Bitwise Functions489862 +Ref: table-bitwise-ops490420 +Ref: Bitwise Functions-Footnote-1494580 +Node: I18N Functions494764 +Node: User-defined496394 +Node: Definition Syntax497198 +Ref: Definition Syntax-Footnote-1501828 +Node: Function Example501897 +Node: Function Caveats504491 +Node: Calling A Function504912 +Node: Variable Scope506001 +Node: Pass By Value/Reference507929 +Node: Return Statement511369 +Node: Dynamic Typing514311 +Node: Indirect Calls515048 +Node: Internationalization524733 +Node: I18N and L10N526161 +Node: Explaining gettext526847 +Ref: Explaining gettext-Footnote-1531909 +Ref: Explaining gettext-Footnote-2532092 +Node: Programmer i18n532257 +Node: Translator i18n536520 +Node: String Extraction537313 +Ref: String Extraction-Footnote-1538274 +Node: Printf Ordering538360 +Ref: Printf Ordering-Footnote-1541144 +Node: I18N Portability541208 +Ref: I18N Portability-Footnote-1543657 +Node: I18N Example543720 +Ref: I18N Example-Footnote-1546355 +Node: Gawk I18N546427 +Node: Advanced Features546996 +Node: Nondecimal Data548315 +Node: Two-way I/O549876 +Ref: Two-way I/O-Footnote-1555290 +Node: TCP/IP Networking555367 +Node: Profiling558139 +Node: Library Functions565539 +Ref: Library Functions-Footnote-1568509 +Node: Library Names568680 +Ref: Library Names-Footnote-1572151 +Ref: Library Names-Footnote-2572371 +Node: General Functions572457 +Node: Nextfile Function573520 +Node: Strtonum Function577901 +Node: Assert Function580852 +Node: Round Function584178 +Node: Cliff Random Function585719 +Node: Ordinal Functions586735 +Ref: Ordinal Functions-Footnote-1589805 +Ref: Ordinal Functions-Footnote-2590057 +Node: Join Function590273 +Ref: Join Function-Footnote-1592044 +Node: Gettimeofday Function592244 +Node: Data File Management595959 +Node: Filetrans Function596591 +Node: Rewind Function600828 +Node: File Checking602281 +Node: Empty Files603375 +Node: Ignoring Assigns605605 +Node: Getopt Function607158 +Ref: Getopt Function-Footnote-1618483 +Node: Passwd Functions618686 +Ref: Passwd Functions-Footnote-1627674 +Node: Group Functions627762 +Node: Sample Programs635842 +Node: Running Examples636507 +Node: Clones637235 +Node: Cut Program638358 +Node: Egrep Program648199 +Ref: Egrep Program-Footnote-1655970 +Node: Id Program656080 +Node: Split Program659696 +Ref: Split Program-Footnote-1663215 +Node: Tee Program663343 +Node: Uniq Program666146 +Node: Wc Program673569 +Ref: Wc Program-Footnote-1677833 +Node: Miscellaneous Programs678033 +Node: Dupword Program679153 +Node: Alarm Program681184 +Node: Translate Program685906 +Ref: Translate Program-Footnote-1690285 +Ref: Translate Program-Footnote-2690513 +Node: Labels Program690647 +Ref: Labels Program-Footnote-1694018 +Node: Word Sorting694102 +Node: History Sorting698447 +Node: Extract Program700285 +Ref: Extract Program-Footnote-1707711 +Node: Simple Sed707839 +Node: Igawk Program710901 +Ref: Igawk Program-Footnote-1725935 +Ref: Igawk Program-Footnote-2726136 +Node: Signature Program726274 +Node: Debugger727354 +Node: Debugging728265 +Node: Debugging Concepts728579 +Node: Debugging Terms730435 +Node: Awk Debugging732980 +Node: Sample dgawk session733872 +Node: dgawk invocation734364 +Node: Finding The Bug735546 +Node: List of Debugger Commands742105 +Node: Breakpoint Control743416 +Node: Dgawk Execution Control746742 +Node: Viewing And Changing Data750093 +Node: Dgawk Stack753402 +Node: Dgawk Info754862 +Node: Miscellaneous Dgawk Commands758810 +Node: Readline Support764524 +Node: Dgawk Limitations765351 +Node: Language History767490 +Node: V7/SVR3.1768867 +Node: SVR4771162 +Node: POSIX772607 +Node: BTL774862 +Node: POSIX/GNU776266 +Node: Contributors781396 +Node: Installation785341 +Node: Gawk Distribution786235 +Node: Getting786719 +Node: Extracting787545 +Node: Distribution contents789223 +Node: Unix Installation794088 +Node: Quick Installation794705 +Node: Additional Configuration Options796595 +Node: Configuration Philosophy798072 +Node: Non-Unix Installation800414 +Node: PC Installation800872 +Node: PC Binary Installation802171 +Node: PC Compiling804019 +Node: PC Testing807425 +Node: PC Using808249 +Node: Cygwin812426 +Node: MSYS813423 +Node: VMS Installation813937 +Node: VMS Compilation814541 +Node: VMS Installation Details816118 +Node: VMS Running817748 +Node: VMS POSIX819345 +Node: VMS Old Gawk820643 +Node: Bugs821115 +Node: Other Versions825045 +Node: Notes830493 +Node: Compatibility Mode831185 +Node: Additions831968 +Node: Adding Code832718 +Node: New Ports838770 +Node: Dynamic Extensions842902 +Node: Internals844283 +Node: Plugin License854688 +Node: Sample Library855322 +Node: Internal File Description855986 +Node: Internal File Ops859681 +Ref: Internal File Ops-Footnote-1864557 +Node: Using Internal File Ops864705 +Node: Future Extensions866730 +Node: Basic Concepts870767 +Node: Basic High Level871524 +Ref: Basic High Level-Footnote-1875643 +Node: Basic Data Typing875837 +Node: Floating Point Issues880274 +Node: String Conversion Precision881357 +Ref: String Conversion Precision-Footnote-1883051 +Node: Unexpected Results883160 +Node: POSIX Floating Point Problems884986 +Ref: POSIX Floating Point Problems-Footnote-1888685 +Node: Glossary888723 +Node: Copying912358 +Node: GNU Free Documentation License949915 +Node: next-edition975059 +Node: unresolved975411 +Node: revision975911 +Node: consistency976334 +Node: Index979687 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 59e1f2fd..70207459 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -1,14 +1,18 @@ \input texinfo @c -*-texinfo-*- @ignore TODO: - Globally add () after awk function names. Go through CAUTION, NOTE, @strong, @quotation, etc. Document common extensions with COMMONEXT marking & index entry. Pick a reasonable name for BWK awk and use it everywhere (search for Bell Laboratories) Review use of "Modern xxx systems..." + Fix refs to other info docs to use @inforef. DONE: Globally add () after built in function names. + Globally add () after awk function names. + Check use of 3.2 vs. 4.0 everywhere. + DOS vs MS-DOS + MS-Windows vs MS Windows @end ignore @c %**start of header (This is for running Texinfo on a region.) @setfilename gawk.info @@ -662,13 +666,6 @@ particular records in a file and perform operations upon them. * VMS Running:: How to run @command{gawk} under VMS. * VMS POSIX:: Alternate instructions for VMS POSIX. * VMS Old Gawk:: An old version comes with some VMS systems. -* Unsupported:: Systems whose ports are no longer - supported. -* Atari Installation:: Installing @command{gawk} on the Atari ST. -* Atari Compiling:: Compiling @command{gawk} on Atari. -* Atari Using:: Running @command{gawk} on Atari. -* BeOS Installation:: Installing @command{gawk} on BeOS. -* Tandem Installation:: Installing @command{gawk} on a Tandem. * Bugs:: Reporting Problems and Bugs. * Other Versions:: Other freely available @command{awk} implementations. @@ -2233,7 +2230,7 @@ program, it is probably best to move it into a separate file, where the shell won't be part of the picture, and you can say what you mean. @node DOS Quoting -@subsubsection Quoting in Windows Batch Files +@subsubsection Quoting in MS-Windows Batch Files @ignore Date: Wed, 21 May 2008 09:58:43 +0200 (CEST) @@ -2280,7 +2277,7 @@ gawk "@{ print \"\042\" $0 \"\042\" @}" @var{file} @node Sample Data Files @section @value{DDF}s for the Examples -@c For gawk >= 3.2, update these data files. No-one has such slow modems! +@c For gawk >= 4.0, update these data files. No-one has such slow modems! @cindex input files, examples @cindex @code{BBS-list} file @@ -25733,7 +25730,7 @@ The conditional expression using the ternary operator @samp{?:} (@pxref{Conditional Exp}). @item -The expression @samp{@var{index-variable} in @var{array}} outside of @samp{for} +The expression @samp{@var{index-variable} in @var{array}} outside of @code{for} statements (@pxref{Reference to Elements}). @item @@ -25858,6 +25855,10 @@ The concept of a numeric string and tighter comparison rules to go with it (@pxref{Typing and Comparison}). @item +The use of built-in variables as function names is forbidden +(@pxref{Definition Syntax}. + +@item More complete documentation of many of the previously undocumented features of the language. @end itemize @@ -25902,6 +25903,24 @@ data (@pxref{Locales}). @item The @code{fflush()} built-in function is not supported (@pxref{I/O Functions}). + +@item +The ability for @code{FS} and for the third +argument to @code{split()} to be null strings +(@pxref{Single Character Fields}). + +@item +The @code{nextfile} statement +(@pxref{Nextfile Statement}). + +@item +The ability to delete all of an array at once with @samp{delete @var{array}} +(@pxref{Delete}). + +@item +The ability for the @code{length()} function to accept an array argument and +return the number of elements in the array. +(@pxref{String Functions}). @end itemize The 2008 POSIX standard can be found online at @@ -25923,6 +25942,7 @@ This @value{SECTION} describes extensions in his version of @command{awk} that a not in POSIX @command{awk}: @itemize @bullet +@ignore @item The @samp{-mf @var{N}} and @samp{-mr @var{N}} command-line options to set the maximum number of fields and the maximum @@ -25930,6 +25950,7 @@ record size, respectively (@pxref{Options}). As a side note, his @command{awk} no longer needs these options; it continues to accept them to avoid breaking old programs. +@end ignore @item The @code{fflush()} built-in function for flushing buffered output @@ -25989,19 +26010,6 @@ return the number of elements in the array. @node POSIX/GNU @appendixsec Extensions in @command{gawk} Not in POSIX @command{awk} -@ignore -I've tried to follow this general order, esp.@: for the 3.0 and 3.1 sections: - variables - special files - language changes (e.g., hex constants) - differences in standard awk functions - new gawk functions - new keywords - new command-line options - new ports -Within each category, be alphabetical. -@end ignore - @c STARTOFRANGE fripls @cindex compatibility mode (@command{gawk}), extensions @c STARTOFRANGE exgnot @@ -26009,121 +26017,63 @@ Within each category, be alphabetical. @c STARTOFRANGE posnot @cindex POSIX, @command{gawk} extensions not included in The GNU implementation, @command{gawk}, adds a large number of features. -This @value{SECTION} lists them in the order they were added to @command{gawk}. They can all be disabled with either the @option{--traditional} or @option{--posix} options (@pxref{Options}). -Version 2.10 of @command{gawk} introduced the following features: +A number of features have come and gone over the years. This @value{SECTION} +summarizes the additional features over POSIX @command{awk} that are +in the current version of @command{gawk}. @itemize @bullet -@item -The @env{AWKPATH} environment variable for specifying a path search for -the @option{-f} command-line option -(@pxref{Options}). @item -The @code{IGNORECASE} variable and its effects -(@pxref{Case-sensitivity}). +Additional built-in variables: +@itemize @minus @item -The @file{/dev/stdin}, @file{/dev/stdout}, @file{/dev/stderr} and -@file{/dev/fd/@var{N}} special @value{FN}s -(@pxref{Special Files}). -@end itemize - -Version 2.13 of @command{gawk} introduced the following features: - -@itemize @bullet -@item -The @code{FIELDWIDTHS} variable and its effects -(@pxref{Constant Size}). - -@item -The @code{systime()} and @code{strftime()} built-in functions for obtaining -and printing timestamps -(@pxref{Time Functions}). - -@item -The @option{-W lint} option to provide error and portability checking -for both the source code and at runtime -(@pxref{Options}). - -@item -The @option{-W compat} option to turn off the GNU extensions -(@pxref{Options}). - -@item -The @option{-W posix} option for full POSIX compliance -(@pxref{Options}). -@end itemize - -Version 2.14 of @command{gawk} introduced the following feature: - -@itemize @bullet -@item -The @code{next file} statement for skipping to the next @value{DF} -(@pxref{Nextfile Statement}). -@end itemize - -Version 2.15 of @command{gawk} introduced the following features: - -@itemize @bullet -@item -The @code{ARGIND} variable, which tracks the movement of @code{FILENAME} -through @code{ARGV} (@pxref{Built-in Variables}). - -@item -The @code{ERRNO} variable, which contains the system error message when -@code{getline} returns @minus{}1 or @code{close()} fails +The +@code{ARGIND} +@code{BINMODE}, +@code{ERRNO}, +@code{FIELDWIDTHS}, +@code{FPAT}, +@code{IGNORECASE}, +@code{LINT}, +@code{PROCINFO}, +@code{TEXTDOMAIN}, +and +@code{RT} +variables (@pxref{Built-in Variables}). +@end itemize @item -The @file{/dev/pid}, @file{/dev/ppid}, @file{/dev/pgrpid}, and -@file{/dev/user} @value{FN} interpretation. -(As of @value{PVERSION} 3.2, these names are no longer supported.) - -@item -The ability to delete all of an array at once with @samp{delete @var{array}} -(@pxref{Delete}). +Special files in I/O redirections: +@itemize @minus{} @item -The ability to use GNU-style long-named options that start with @option{--} -(@pxref{Options}). +The @file{/dev/stdin}, @file{/dev/stdout}, @file{/dev/stderr} and +@file{/dev/fd/@var{N}} special @value{FN}s +(@pxref{Special Files}). @item -The @option{--source} option for mixing command-line and library-file -source code -(@pxref{Options}). +The @file{/inet}, @file{/inet4}, and @samp{/inet6} special files for +TCP/IP networking using @samp{|&} to specify which version of the +IP protocol to use. +(@pxref{TCP/IP Networking}). @end itemize -Version 3.0 of @command{gawk} introduced the following features: - -@itemize @bullet @item -@code{IGNORECASE} changed, now applying to string comparison as well -as regexp operations -(@pxref{Case-sensitivity}). - -@item -The @code{RT} variable that contains the input text that -matched @code{RS} -(@pxref{Records}). +Changes and/or additions to the language: +@itemize @minus{} @item -Full support for both POSIX and GNU regexps +Full support for both POSIX and GNU regexps, with interval +expressions being matched by default. (@pxref{Regexp}). @item -The @code{gensub()} function for more powerful text manipulation -(@pxref{String Functions}). - -@item -The @code{strftime()} function acquired a default time format, -allowing it to be called with no arguments -(@pxref{Time Functions}). - -@item The ability for @code{FS} and for the third argument to @code{split()} to be null strings (@pxref{Single Character Fields}). @@ -26133,81 +26083,61 @@ The ability for @code{RS} to be a regexp (@pxref{Records}). @item -The @code{next file} statement became @code{nextfile} -(@pxref{Nextfile Statement}). - -@item -The @option{--lint-old} option to -warn about constructs that are not available in -the original Version 7 Unix version of @command{awk} -(@pxref{V7/SVR3.1}). - -@item -The @option{-m} option and the @code{fflush()} function from the -Bell Laboratories research version of @command{awk} -(@pxref{Options}; also -@pxref{I/O Functions}). +The ability to use octal and hexadecimal constants in @command{awk} +program source code +(@pxref{Nondecimal-numbers}). @item -The @option{--re-interval} option to provide interval expressions in regexps -(@pxref{Regexp Operators}). +The @samp{|&} operator for two-way I/O to a coprocess +(@pxref{Two-way I/O}). @item -The @option{--traditional} option was added as a better name for -@option{--compat} (@pxref{Options}). +Indirect function calls +(@pxref{Indirect Calls}). @item -The use of GNU Autoconf to control the configuration process -(@pxref{Quick Installation}). - -@ignore -@item -Amiga support -(@pxref{Amiga Installation}). -@end ignore - +Directories on the command line produce a warning and are skipped +(@pxref{Command line directories}). @end itemize -Version 3.1 of @command{gawk} introduced the following features: +@item +New keywords: -@itemize @bullet +@itemize @minus{} @item -The @code{BINMODE} special variable for non-POSIX systems, -which allows binary I/O for input and/or output files -(@pxref{PC Using}). +The @code{BEGINFILE} and @code{ENDFILE} special patterns. +(@pxref{BEGINFILE/ENDFILE}). @item -The @code{LINT} special variable, which dynamically controls lint warnings -(@pxref{Built-in Variables}). +The ability to delete all of an array at once with @samp{delete @var{array}} +(@pxref{Delete}). @item -The @code{PROCINFO} array for providing process-related information -(@pxref{Built-in Variables}). +The @code{nextfile} statement +(@pxref{Nextfile Statement}). @item -The @code{TEXTDOMAIN} special variable for setting an application's -internationalization text domain -(@pxref{Built-in Variables}, -and -@ref{Internationalization}). +The @code{switch} statement +(@pxref{Switch Statement}). +@end itemize @item -The ability to use octal and hexadecimal constants in @command{awk} -program source code -(@pxref{Nondecimal-numbers}). +Changes to standard @command{awk} functions: +@itemize @minus @item -The @samp{|&} operator for two-way I/O to a coprocess +The optional second argument to @code{close()} that allows closing one end +of a two-way pipe to a coprocess (@pxref{Two-way I/O}). @item -The @file{/inet} special files for TCP/IP networking using @samp{|&} -(@pxref{TCP/IP Networking}). +POSIX compliance for @code{gsub()} and @code{sub()} +(@pxref{Gory Details}). @item -The optional second argument to @code{close()} that allows closing one end -of a two-way pipe to a coprocess -(@pxref{Two-way I/O}). +The @code{length()} function accepts an array argument +and returns the number of elements in the array +(@pxref{String Functions}). @item The optional third argument to the @code{match()} function @@ -26220,23 +26150,15 @@ making translations easier (@pxref{Printf Ordering}). @item -The @code{asort()} and @code{asorti()} functions for sorting arrays -(@pxref{Array Sorting}). - -@item -The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} functions -for internationalization -(@pxref{Programmer i18n}). - -@item -The @code{extension()} built-in function and the ability to add -new built-in functions dynamically -(@pxref{Dynamic Extensions}). +The @code{split()} function's additional optional fourth +argument which is an array to hold the text of the field separators. +(@pxref{String Functions}). +@end itemize @item -The @code{mktime()} built-in function for creating timestamps -(@pxref{Time Functions}). +Additional functions only in @command{gawk}: +@itemize @minus @item The @code{and()}, @@ -26244,179 +26166,114 @@ The @code{xor()}, @code{compl()}, @code{lshift()}, -@code{rshift()}, and -@code{strtonum()} built-in -functions +@code{rshift()}, +functions for bit manipulation (@pxref{Bitwise Functions}). @item -@cindex @code{next file} statement -The support for @samp{next file} as two words was removed completely -(@pxref{Nextfile Statement}). - -@item -The @option{--dump-variables} option to print a list of all global variables -(@pxref{Options}). - -@item -The @option{--gen-po} command-line option and the use of a leading -underscore to mark strings that should be translated -(@pxref{String Extraction}). - -@item -The @option{--non-decimal-data} option to allow non-decimal -input data -(@pxref{Nondecimal Data}). - -@item -The @option{--profile} option and @command{pgawk}, the -profiling version of @command{gawk}, for producing execution -profiles of @command{awk} programs -(@pxref{Profiling}). - -@item -The @option{--use-lc-numeric} option to force @command{gawk} -to use the locale's decimal point for parsing input data -(@pxref{Conversion}). - -@item -The @option{--enable-portals} configuration option to enable special -treatment of pathnames that begin with @file{/p} as BSD portals. (This -option is no longer available; the related code was removed since it -was never used.) - -@item -The use of GNU Automake to help in standardizing the configuration process -(@pxref{Quick Installation}). - -@item -The use of GNU @code{gettext} for @command{gawk}'s own message output -(@pxref{Gawk I18N}). - -@item -BeOS support -(@pxref{BeOS Installation}). - -@item -Tandem support -(@pxref{Tandem Installation}). - -@item -The Atari port became officially unsupported -(@pxref{Atari Installation}). - -@item -The source code now uses new-style function definitions. - -@item -The @option{--disable-lint} configuration option to disable lint checking -at compile time -(@pxref{Additional Configuration Options}). +The @code{asort()} and @code{asorti()} functions for sorting arrays +(@pxref{Array Sorting}). @item -The @option{--with-whiny-user-strftime} configuration option -to force the use -of the included version of the @code{strftime()} -function for deficient systems -(@pxref{Additional Configuration Options}). - +The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} +functions for internationalization +(@pxref{Programmer i18n}). @item -POSIX compliance for @code{sub()} and @code{gsub()} -(@pxref{Gory Details}). +The @code{extension()} built-in function and the ability to add +new functions dynamically +(@pxref{Dynamic Extensions}). @item -The @option{--exec} option, for use in CGI scripts -(@pxref{Options}). +The @code{fflush()} function from the +Bell Laboratories research version of @command{awk} +(@pxref{I/O Functions}). @item -The @code{length()} function was extended to accept an array argument -and return the number of elements in the array +The @code{gensub()}, @code{patsplit()}, and @code{strtonum()} functions +for more powerful text manipulation (@pxref{String Functions}). @item -The @code{strftime()} function acquired a third argument to -enable printing times as UTC +The @code{mktime()}, @code{systime()}, and @code{strftime()} +functions for working with timestamps (@pxref{Time Functions}). @end itemize -Version 3.2 of @command{gawk} introduced the following features: -@itemize @bullet @item -The special files @file{/dev/pid}, @file{/dev/ppid}, @file{/dev/pgrpid}, and -@file{/dev/user} were removed entirely -(@pxref{Obsolete}). +Changes and/or additions in the command line options: +@itemize @minus @item -The @code{\s} and @code{\S} escapae sequences in regular expressions -(@pxref{GNU Regexp Operators}). +The @env{AWKPATH} environment variable for specifying a path search for +the @option{-f} command-line option +(@pxref{Options}). @item -Interval expressions became part of the default matching done if not -in POSIX mode or in compatibility mode. -(@pxref{Regexp Operators}). +The ability to use GNU-style long-named options that start with @option{--} +and the +@option{--characters-as-bytes}, +@option{--compat}, +@option{--dump-variables}, +@option{--exec}, +@option{--gen-pot}, +@option{--lint}, +@option{--lint-old}, +@option{--non-decimal-data}, +@option{--posix}, +@option{--profile}, +@option{--re-interval}, +@option{--sandbox}, +@option{--source}, +@option{--traditional}, +and +@option{--use-lc-numeric} +options +(@pxref{Options}). +@end itemize -@item -The @code{split()} function was given the additional optional fourth -argument which is an array to hold the text of the field separators. -(@pxref{String Functions}). -@item -The @code{BEGINFILE} and @code{ENDFILE} special patterns. -(@pxref{BEGINFILE/ENDFILE}). +@c new ports @item -The @code{switch} statement was enabled by default. -(@pxref{Switch Statement}). +Support for the following obsolete systems was removed from the code +and the documentation: +@c nested table +@itemize @minus @item -The @option{--sandbox} and @option{--characters-as-bytes} options -(@pxref{Options}). +Atari. @item -Indirect function calls -(@pxref{Indirect Calls}). +Amiga. @item -The @option{--gen-po} command-line option was renamed @option{--gen-pot} -(@pxref{String Extraction}). +BeOS. @item -Directories on the command line produce a warning and are skipped -(@pxref{Command line directories}). +Cray. @item -The @code{FPAT} variable and its effects -(@pxref{Splitting By Content}). +MIPS RiscOS. @item -@code{PROCINFO["strftime"]} was added -(@pxref{Auto-set}). +MS-DOS with the Microsoft Compiler. @item -The @code{patsplit()} function -(@pxref{String Functions}). +MS-Windows with the Microsoft Compiler. @item -The @file{/inet4} and @samp{/inet6} special files for TCP/IP networking -using @samp{|&} to specify which version of the IP protocol to use. -The option to use a raw IP socket was removed, since it was never implemented -(@pxref{TCP/IP Networking}). +NeXT. @item -The @option{--compat}, @option{--copyleft} and @option{--usage} -options were removed. +SunOS 3.x, Sun 386 (Road Runner). @item -The @code{break} and @code{continue} statements may no longer -be used outside a loop, even with @option{--traditional} -(@pxref{Break Statement}, and -@pxref{Continue Statement}). +Tandem (non-POSIX). -@item -The @option{--enable-portals} configuration option was removed. +@end itemize @end itemize @@ -26534,13 +26391,15 @@ currently maintains the MS-DOS port. @cindex Grigera, Juan Juan Grigera provided a port to Windows32 systems. +(This is no longer supported.) @item @cindex Hankerson, Darrel +For many years, Dr.@: Darrel Hankerson -acts as coordinator for the various ports to different PC platforms -and creates binary distributions for various PC operating systems. -He is also instrumental in keeping the documentation up to date for +acted as coordinator for the various ports to different PC platforms +and created binary distributions for various PC operating systems. +He was also instrumental in keeping the documentation up to date for the various PC platforms. @item @@ -26559,12 +26418,13 @@ code and documentation, and motivated the inclusion of the @samp{|&} operator. @cindex Davies, Stephen Stephen Davies provided the initial port to Tandem systems and its documentation. +He was also instrumental in the initial work to integrate the +byte-code internals into the @command{gawk} code base. @item @cindex Woehlke, Matthew Matthew Woehlke -provided improvements for Tandem's POSIX-compliant -systems. +provided improvements for Tandem's POSIX-compliant systems. @item @cindex Brown, Martin @@ -26602,6 +26462,13 @@ Michael Benzinger contributed the initial code for @code{switch} statements. @cindex McPhee, Patrick Patrick T.J.@: McPhee contributed the code for dynamic loading in Windows32 environments. +(This is no longer supported) + +@item +@cindex Haque, John +John Haque +reworked the @command{gawk} internals to use a byte-code engine, +providing the @command{dgawk} debugger for @command{awk} programs. @item @cindex Robbins, Arnold @@ -26632,7 +26499,6 @@ the respective ports. * Unix Installation:: Installing @command{gawk} under various versions of Unix. * Non-Unix Installation:: Installation on Other Operating Systems. -* Unsupported:: Systems whose ports are no longer supported. * Bugs:: Reporting Problems and Bugs. * Other Versions:: Other freely available @command{awk} implementations. @@ -26684,8 +26550,10 @@ will be less busy, and you can usually find one closer to your site. @node Extracting @appendixsubsec Extracting the Distribution -@command{gawk} is distributed as a @code{tar} file compressed with the -GNU Zip program, @code{gzip}. +@command{gawk} is distributed as several @code{tar} file compressed with +different compression programs: @command{gzip}, @command{bzip2}, +and @command{xz}. For simplicity, the rest of these instructions assume +you are using the one compressed with the GNU Zip program, @code{gzip}. Once you have the distribution (for example, @file{gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz}), @@ -26698,8 +26566,16 @@ pipeline to produce the @command{gawk} distribution: gzip -d -c gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz | tar -xvpf - @end example +On a system with GNU @command{tar}, you can let @command{tar} +do the decompression for you: + +@example +tar -xvpzf gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz +@end example + @noindent -This creates a directory named @file{gawk-@value{VERSION}.@value{PATCHLEVEL}} +Extracting the archive +creates a directory named @file{gawk-@value{VERSION}.@value{PATCHLEVEL}} in the current directory. The distribution @value{FN} is of the form @@ -26710,7 +26586,7 @@ the @var{P} represents a @dfn{patch level}, meaning that minor bugs have been fixed in the release. The current patch level is @value{PATCHLEVEL}, but when retrieving distributions, you should get the version with the highest version, release, and patch level. (Note, however, that patch levels greater than -or equal to 80 denote ``beta'' or nonproduction software; you might not want +or equal to 70 denote ``beta'' or nonproduction software; you might not want to retrieve such a version unless you don't mind experimenting.) If you are not on a Unix system, you need to make other arrangements for getting and extracting the @command{gawk} distribution. You should consult @@ -26790,7 +26666,9 @@ This is distributed for the convenience of Unix users. @cindex Texinfo @item doc/gawk.texi The Texinfo source file for this @value{DOCUMENT}. -It should be processed with @TeX{} to produce a printed document, and +It should be processed with @TeX{} +(via @command{texi2dvi} or @command{texi2pdf}) +to produce a printed document, and with @command{makeinfo} to produce an Info or HTML file. @item doc/gawk.info @@ -26804,7 +26682,9 @@ The Texinfo source file for @ifnotinfo @cite{TCP/IP Internetworking with @command{gawk}}. @end ifnotinfo -It should be processed with @TeX{} to produce a printed document and +It should be processed with @TeX{} +(via @command{texi2dvi} or @command{texi2pdf}) +to produce a printed document and with @command{makeinfo} to produce an Info or HTML file. @item doc/gawkinet.info @@ -26827,11 +26707,9 @@ the @file{Makefile.in} files used by @command{autoconf} and @command{configure}. @item Makefile.in -@itemx acconfig.h -@itemx acinclude.m4 @itemx aclocal.m4 @itemx configh.in -@itemx configure.in +@itemx configure.ac @itemx configure @itemx custom.h @itemx missing_d/* @@ -26862,19 +26740,11 @@ They are installed as part of the installation process. The rest of the programs in this @value{DOCUMENT} are available in appropriate subdirectories of @file{awklib/eg}. -@item unsupported/atari/* -Files needed for building @command{gawk} on an Atari ST -(@pxref{Atari Installation}, for details). - -@item unsupported/tandem/* -Files needed for building @command{gawk} on a Tandem -(@pxref{Tandem Installation}, for details). - @item posix/* Files needed for building @command{gawk} on POSIX-compliant systems. @item pc/* -Files needed for building @command{gawk} under MS Windows and OS/2 +Files needed for building @command{gawk} under MS-Windows and OS/2 (@pxref{PC Installation}, for details). @item vms/* @@ -26891,7 +26761,7 @@ be confident of a successful port. @c ENDOFRANGE gawdis @node Unix Installation -@appendixsec Compiling and Installing @command{gawk} on Unix +@appendixsec Compiling and Installing @command{gawk} on Unix-like Systems Usually, you can compile and install @command{gawk} by typing only two commands. However, if you use an unusual system, you may need @@ -26904,20 +26774,25 @@ to configure @command{gawk} for your system yourself. @end menu @node Quick Installation -@appendixsubsec Compiling @command{gawk} for Unix +@appendixsubsec Compiling @command{gawk} for Unix-like Systems + +The normal installation steps should work on all modern commercial +Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin +environment for MS-Windows. -@c @cindex installation, unix After you have extracted the @command{gawk} distribution, @command{cd} to @file{gawk-@value{VERSION}.@value{PATCHLEVEL}}. Like most GNU software, @command{gawk} is configured -automatically for your Unix system by running the @command{configure} program. +automatically for your system by running the @command{configure} program. This program is a Bourne shell script that is generated automatically using GNU @command{autoconf}. @ifnotinfo (The @command{autoconf} software is described fully in @cite{Autoconf---Generating Automatic Configuration Scripts}, -which is available from the Free Software Foundation.) +which can be found online at +@uref{http://www.gnu.org/software/autoconf/manual/index.html, +the Free Software Foundation's web site}.) @end ifnotinfo @ifinfo (The @command{autoconf} software is described fully starting with @@ -26981,12 +26856,12 @@ command line when compiling @command{gawk} from scratch, including: @cindex configuration option, @code{--with-whiny-user-strftime} @item --with-whiny-user-strftime Force use of the included version of the @code{strftime()} -function for deficient systems +function for deficient systems. @cindex @code{--disable-lint} configuration option @cindex configuration option, @code{--disable-lint} @item --disable-lint -This option disables all lint checking within @code{gawk}. The +Disable all lint checking within @code{gawk}. The @option{--lint} and @option{--lint-old} options (@pxref{Options}) are accepted, but silently do nothing. @@ -27011,26 +26886,22 @@ This is usually not desirable, but it may bring you some slight performance improvement. @end table -As of @value{PVERSION} 3.1.5, the @option{--with-included-gettext} configuration -option is no longer available, since @command{gawk} expects the -GNU @code{gettext} library to be installed as an external library. - -As of @value{PVERSION} 3.1.8, the @option{--disable-libsigsegv} configuration -option is no longer available, since @command{gawk} expects the -GNU @code{libsigsegv} library to be installed as an external library. +Use the command @samp{./configure --help} to see the full list of +options that @command{configure} supplies. @node Configuration Philosophy @appendixsubsec The Configuration Process @cindex @command{gawk}, configuring This @value{SECTION} is of interest only if you know something about using the -C language and the Unix operating system. +C language and Unix-like operating systems. The source code for @command{gawk} generally attempts to adhere to formal standards wherever possible. This means that @command{gawk} uses library routines that are specified by the ISO C standard and by the POSIX -operating system interface standard. When using an ISO C compiler, -function prototypes are used to help improve the compile-time checking. +operating system interface standard. +The @command{gawk} source code requires using an ISO C compiler (the 1990 +standard). Many Unix systems do not support all of either the ISO or the POSIX standards. The @file{missing_d} subdirectory in the @command{gawk} @@ -27043,7 +26914,7 @@ where you are attempting to compile @command{gawk}. The three things described by this file are: what header files are available, so that they can be correctly included, what (supposedly) standard functions are actually available in your C libraries, and various miscellaneous -facts about your variant of Unix. For example, there may not be an +facts about your operating system. For example, there may not be an @code{st_blksize} element in the @code{stat} structure. In this case, @samp{HAVE_ST_BLKSIZE} is undefined. @@ -27059,12 +26930,12 @@ should not have. @file{custom.h} is automatically included by It is also possible that the @command{configure} program generated by @command{autoconf} will not work on your system in some other fashion. -If you do have a problem, the file @file{configure.in} is the input for +If you do have a problem, the file @file{configure.ac} is the input for @command{autoconf}. You may be able to change this file and generate a new version of @command{configure} that works on your system (@pxref{Bugs}, for information on how to report problems in configuring @command{gawk}). -The same mechanism may be used to send in updates to @file{configure.in} +The same mechanism may be used to send in updates to @file{configure.ac} and/or @file{custom.h}. @node Non-Unix Installation @@ -27088,11 +26959,11 @@ various non-Unix systems. @cindex PC operating systems@comma{} @command{gawk} on, installing @cindex operating systems, PC@comma{} @command{gawk} on, installing This @value{SECTION} covers installation and usage of @command{gawk} on x86 machines -running DOS, any version of Windows, or OS/2. +running MS-DOS, any version of MS-Windows, or OS/2. In this @value{SECTION}, the term ``Windows32'' -refers to any of Windows-95/98/ME/NT/2000/XP/Vista/7. +refers to any of Microsoft Windows-95/98/ME/NT/2000/XP/Vista/7. -The limitations of DOS (and DOS shells under Windows or OS/2) has meant +The limitations of MS-DOS (and MS-DOS shells under Windows32 or OS/2) has meant that various ``DOS extenders'' are often used with programs such as @command{gawk}. The varying capabilities of Microsoft Windows 3.1 and Windows32 can add to the confusion. For an overview of the @@ -27114,7 +26985,7 @@ distribution. @node PC Binary Installation @appendixsubsubsec Installing a Prepared Distribution for PC Systems -If you have received a binary distribution prepared by the DOS +If you have received a binary distribution prepared by the MS-DOS maintainers, then @command{gawk} and the necessary support files appear under the @file{gnu} directory, with executables in @file{gnu/bin}, libraries in @file{gnu/lib/awk}, and manual pages under @file{gnu/man}. @@ -27133,7 +27004,11 @@ directory of your preferred drive. Set @env{UNIXROOT} to your installation drive (e.g., @samp{e:}) if you want to install @command{gawk} onto another drive than the hardcoded default @samp{c:}. Executables appear in @file{/usr/bin}, libraries under @file{/usr/share/awk}, manual pages under @file{/usr/man}, -Texinfo documentation under @file{/usr/info} and NLS files under @file{/usr/share/locale}. +Texinfo documentation under @file{/usr/info}, and NLS files +under @file{/usr/share/locale}. +Note that the files can be installed anywhere provided @env{AWKPATH} is +set properly. + If you already have a file @file{/usr/info/dir} from another package @emph{do not overwrite it!} Instead enter the following commands at your prompt (replace @samp{x:} by your installation drive): @@ -27143,9 +27018,6 @@ install-info --info-dir=x:/usr/info x:/usr/info/gawk.info install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info @end example -However, the files can be installed anywhere provided @env{AWKPATH} is -set properly. - The binary distribution may contain a separate file containing additional or more detailed installation instructions. @@ -27153,13 +27025,13 @@ or more detailed installation instructions. @appendixsubsubsec Compiling @command{gawk} for PC Operating Systems @command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP; MS-DOS only) or Eberhard -Mattes (EMX; MS-DOS, Windows32 and OS/2). The file +development tools from DJ Delorie (DJGPP: MS-DOS only) or Eberhard +Mattes (EMX: MS-DOS, Windows32 and OS/2). The file @file{README_d/README.pc} in the @command{gawk} distribution contains additional notes, and @file{pc/Makefile} contains important information on compilation options. -@cindex compiling @command{gawk} for DOS and Windows +@cindex compiling @command{gawk} for MS-DOS and MS-Windows To build @command{gawk} for MS-DOS and Windows32, copy the files in the @file{pc} directory (@emph{except} for @file{ChangeLog}) to the directory with the rest of the @command{gawk} sources, then invoke @@ -27176,29 +27048,29 @@ build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. @uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) To build a native MS-Windows binary of @command{gawk}, type @samp{make mingw32}. -@cindex compiling @command{gawk} with EMX for OS/2 and Windows +@cindex compiling @command{gawk} with EMX for OS/2 and MS-Windows The 32 bit EMX version of @command{gawk} works ``out of the box'' under OS/2. In principle, it is possible to compile @command{gawk} the following way: @example -$ ./configure -$ make +$ @kbd{./configure} +$ @kbd{make} @end example This is not recommended, though. To get an OMF executable you should use the following commands at your @command{sh} prompt: @example -$ CPPFLAGS="-D__ST_MT_ERRNO__" -$ export CPPFLAGS -$ CFLAGS="-O2 -Zomf -Zmt" -$ export CFLAGS -$ LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000" -$ export LDFLAGS -$ RANLIB="echo" -$ export RANLIB -$ ./configure --prefix=c:/usr --without-included-gettext -$ make AR=emxomfar +$ @kbd{CPPFLAGS="-D__ST_MT_ERRNO__"} +$ @kbd{export CPPFLAGS} +$ @kbd{CFLAGS="-O2 -Zomf -Zmt"} +$ @kbd{export CFLAGS} +$ @kbd{LDFLAGS="-s -Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"} +$ @kbd{export LDFLAGS} +$ @kbd{RANLIB="echo"} +$ @kbd{export RANLIB} +$ @kbd{./configure --prefix=c:/usr --without-included-gettext} +$ @kbd{make AR=emxomfar} @end example These are just suggestions. You may use any other set of (self-consistent) @@ -27217,23 +27089,23 @@ NLS entirely (@option{--disable-nls}). If you use GCC 2.95 it is recommended to use also: @example -$ LIBS="-lgcc" -$ export LIBS +$ @kbd{LIBS="-lgcc"} +$ @kbd{export LIBS} @end example You can also get an @code{a.out} executable if you prefer: @example -$ CPPFLAGS="-D__ST_MT_ERRNO__" -$ export CPPFLAGS -$ CFLAGS="-O2 -Zmt" -$ export CFLAGS -$ LDFLAGS="-s -Zstack 0x6000" -$ LIBS="-lgcc" -$ unset RANLIB +$ @kbd{CPPFLAGS="-D__ST_MT_ERRNO__"} +$ @kbd{export CPPFLAGS} +$ @kbd{CFLAGS="-O2 -Zmt"} +$ @kbd{export CFLAGS} +$ @kbd{LDFLAGS="-s -Zstack 0x6000"} +$ @kbd{LIBS="-lgcc"} +$ @kbd{unset RANLIB} @c $ ./configure --prefix=c:/usr --without-included-gettext -$ ./configure --prefix=c:/usr -$ make +$ @kbd{./configure --prefix=c:/usr} +$ @kbd{make} @end example @quotation NOTE @@ -27254,7 +27126,6 @@ Most OS/2 ports of GNU @command{make} are not able to handle the Makefiles of this package. If you encounter any problems with @command{make}, try GNU Make 3.79.1 or later versions. You should find the latest version on -@c @uref{http://www.unixos2.org/sw/pub/binary/make/} or on @uref{ftp://hobbes.nmsu.edu/pub/os2/}. @end quotation @@ -27264,7 +27135,7 @@ find the latest version on Using @command{make} to run the standard tests and to install @command{gawk} requires additional Unix-like tools, including @command{sh}, @command{sed}, and @command{cp}. In order to run the tests, the @file{test/*.ok} files may need to -be converted so that they have the usual DOS-style end-of-line markers. Most +be converted so that they have the usual MS-DOS-style end-of-line markers. Most of the tests work properly with Stewartson's shell along with the companion utilities or appropriate GNU utilities. However, some editing of @file{test/Makefile} is required. It is recommended that you copy the file @@ -27312,13 +27183,13 @@ E.g., if @env{UNIXROOT} is set to @file{e:} the complete default search path is @code{@w{".;c:/usr/share/awk;e:/usr/share/awk"}}. An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS -or @command{cmd.exe} under Windows or OS/2) may be useful for @command{awk} programming. +or @command{cmd.exe} under MS-Windows or OS/2) may be useful for @command{awk} programming. The DJGPP collection of tools includes an MS-DOS port of Bash, and several shells are available for OS/2, including @command{ksh}. @cindex differences in @command{awk} and @command{gawk}, @code{BINMODE} variable @cindex @code{BINMODE} variable -Under Windows, OS/2 and DOS, @command{gawk} (and many other text programs) silently +Under MS-Windows, OS/2 and MS-DOS, @command{gawk} (and many other text programs) silently translate end-of-line @code{"\r\n"} to @code{"\n"} on input and @code{"\n"} to @code{"\r\n"} on output. A special @code{BINMODE} variable allows control over these translations and is interpreted as follows: @@ -27357,7 +27228,7 @@ changed mid-stream. The name @code{BINMODE} was chosen to match @command{mawk} (@pxref{Other Versions}). -Both @command{mawk} and @command{gawk} handle @code{BINMODE} similarly; however, +@command{mawk} and @command{gawk} handle @code{BINMODE} similarly; however, @command{mawk} adds a @samp{-W BINMODE=@var{N}} option and an environment variable that can set @code{BINMODE}, @code{RS}, and @code{ORS}. The files @file{binmode[1-3].awk} (under @file{gnu/lib/awk} in some of the @@ -27365,10 +27236,10 @@ prepared distributions) have been chosen to match @command{mawk}'s @samp{-W BINMODE=@var{N}} option. These can be changed or discarded; in particular, the setting of @code{RS} giving the fewest ``surprises'' is open to debate. @command{mawk} uses @samp{RS = "\r\n"} if binary mode is set on read, which is -appropriate for files with the DOS-style end-of-line. +appropriate for files with the MS-DOS-style end-of-line. To illustrate, the following examples set binary mode on writes for standard -output and other files, and set @code{ORS} as the ``usual'' DOS-style +output and other files, and set @code{ORS} as the ``usual'' MS-DOS-style end-of-line: @example @@ -27408,7 +27279,7 @@ moved into the @code{BEGIN} rule. @cindex Cygwin build of @command{gawk} @cindex using @command{gawk} on Cygwin -@command{gawk} can be built and used ``out of the box'' under Windows +@command{gawk} can be built and used ``out of the box'' under MS-Windows if you are using the @uref{http://www.cygwin.com, Cygwin environment}. This environment provides an excellent simulation of Unix, using the GNU tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, @@ -27436,12 +27307,12 @@ for any other environment on MS-Windows. @node MSYS @appendixsubsubsec Using @command{gawk} In The MSYS Environment -In the MSYS environment under Windows, @command{gawk} automatically +In the MSYS environment under MS-Windows, @command{gawk} automatically uses binary mode for reading and writing files. Thus there is no need to use the @code{BINMODE} variable. This can cause problems with other Unix-like components that have -been ported to Windows that expect @command{gawk} to do automatic +been ported to MS-Windows that expect @command{gawk} to do automatic translation of @code{"\r\n"}, since it won't. Caveat Emptor! @node VMS Installation @@ -27470,14 +27341,14 @@ also a @file{Makefile} for use with the @code{MMS} utility. From the source directory, use either: @example -$ @@[.VMS]VMSBUILD.COM +$ @kbd{@@[.VMS]VMSBUILD.COM} @end example @noindent or: @example -$ MMS/DESCRIPTION=[.VMS]DESCRIP.MMS GAWK +$ @kbd{MMS/DESCRIPTION=[.VMS]DESCRIP.MMS GAWK} @end example Depending upon which C compiler you are using, follow one of the sets @@ -27516,7 +27387,7 @@ To install @command{gawk}, all you need is a ``foreign'' command, which is a @code{DCL} symbol whose value begins with a dollar sign. For example: @example -$ GAWK :== $disk1:[gnubin]GAWK +$ @kbd{GAWK :== $disk1:[gnubin]GAWK} @end example @noindent @@ -27531,7 +27402,7 @@ to run @command{gawk}. Optionally, the help entry can be loaded into a VMS help library: @example -$ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP +$ @kbd{LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP} @end example @noindent @@ -27540,7 +27411,7 @@ the standard VMS library @samp{HELPLIB}.) After loading the help text, the command: @example -$ HELP GAWK +$ @kbd{HELP GAWK} @end example @noindent @@ -27568,8 +27439,8 @@ should run correctly. Here are a couple of trivial tests: @example -$ gawk -- "BEGIN @{print ""Hello, World!""@}" -$ gawk -"W" version +$ @kbd{gawk -- "BEGIN @{print ""Hello, World!""@}"} +$ @kbd{gawk -"W" version} ! could also be -"W version" or "-W version" @end example @@ -27591,8 +27462,8 @@ process) are present, there is no ambiguity and @option{--} can be omitted. @cindex search paths, for source files The default search path, when looking for @command{awk} program files specified by the @option{-f} option, is @code{"SYS$DISK:[],AWK_LIBRARY:"}. The logical -name @samp{AWKPATH} can be used to override this default. The format -of @samp{AWKPATH} is a comma-separated list of directory specifications. +name @env{AWKPATH} can be used to override this default. The format +of @env{AWKPATH} is a comma-separated list of directory specifications. When defining it, the value should be quoted so that it retains a single translation and not a multitranslation @code{RMS} searchlist. @@ -27607,8 +27478,8 @@ Make sure that the two scripts, @file{configure} and necessary. Then execute the following two commands: @example -psx> CC=vms/posix-cc.sh configure -psx> make CC=c89 gawk +psx> @kbd{CC=vms/posix-cc.sh configure} +psx> @kbd{make CC=c89 gawk} @end example @noindent @@ -27634,223 +27505,12 @@ Some versions of VMS have an old version of @command{gawk}. To access it, define a symbol, as follows: @example -$ @kbd{gawk :== $ sys$common:[syshlp.examples.tcpip.snmp]gawk.exe} +$ @kbd{gawk :== $sys$common:[syshlp.examples.tcpip.snmp]gawk.exe} @end example -This is apparently @value{PVERSION} 2.15.6, which is quite old. We +This is apparently @value{PVERSION} 2.15.6, which is extremely old. We recommend compiling and using the current version. -@node Unsupported -@appendixsec Unsupported Operating System Ports - -This sections describes systems for which -the @command{gawk} port is no longer supported. - -@menu -* Atari Installation:: Installing @command{gawk} on the Atari ST. -* BeOS Installation:: Installing @command{gawk} on BeOS. -* Tandem Installation:: Installing @command{gawk} on a Tandem. -@end menu - -@node Atari Installation -@appendixsubsec Installing @command{gawk} on the Atari ST - -The Atari port is no longer supported. It is -included for those who might want to use it but it is no longer being -actively maintained. - -@c based on material from Michal Jaegermann <michal@gortel.phys.ualberta.ca>, now michal@harddata.com -@cindex atari -@cindex installation, atari -There are no substantial differences when installing @command{gawk} on -various Atari models. Compiled @command{gawk} executables do not require -a large amount of memory with most @command{awk} programs, and should run on all -Motorola processor-based models (called further ST, even if that is not -exactly right). - -In order to use @command{gawk}, you need to have a shell, either text or -graphics, that does not map all the characters of a command line to -uppercase. Maintaining case distinction in option flags is very -important (@pxref{Options}). -These days this is the default and it may only be a problem for some -very old machines. If your system does not preserve the case of option -flags, you need to upgrade your tools. Support for I/O -redirection is necessary to make it easy to import @command{awk} programs -from other environments. Pipes are nice to have but not vital. - -@menu -* Atari Compiling:: Compiling @command{gawk} on Atari. -* Atari Using:: Running @command{gawk} on Atari. -@end menu - -@node Atari Compiling -@appendixsubsubsec Compiling @command{gawk} on the Atari ST - -A proper compilation of @command{gawk} sources when @code{sizeof(int)} -differs from @code{sizeof(void *)} requires an ISO C compiler. An initial -port was done with @command{gcc}. You may actually prefer executables -where @code{int()}s are four bytes wide but the other variant works as well. - -You may need quite a bit of memory when trying to recompile the @command{gawk} -sources, as some source files (@file{regex.c} in particular) are quite -big. If you run out of memory compiling such a file, try reducing the -optimization level for this particular file, which may help. - -@cindex Linux -@cindex GNU/Linux -With a reasonable shell (Bash will do), you have a pretty good chance -that the @command{configure} utility will succeed, and in particular if -you run GNU/Linux, MiNT or a similar operating system. Otherwise -sample versions of @file{config.h} and @file{Makefile.st} are given in the -@file{atari} subdirectory and can be edited and copied to the -corresponding files in the main source directory. Even if -@command{configure} produces something, it might be advisable to compare -its results with the sample versions and possibly make adjustments. - -Some @command{gawk} source code fragments depend on a preprocessor define -@samp{atarist}. This basically assumes the TOS environment with @command{gcc}. -Modify these sections as appropriate if they are not right for your -environment. Also see the remarks about @env{AWKPATH} and @code{envsep} in -@ref{Atari Using}. - -As shipped, the sample @file{config.h} claims that the @code{system()} -function is missing from the libraries, which is not true, and an -alternative implementation of this function is provided in -@file{unsupported/atari/system.c}. -Depending upon your particular combination of -shell and operating system, you might want to change the file to indicate -that @code{system()} is available. - -@node Atari Using -@appendixsubsubsec Running @command{gawk} on the Atari ST - -An executable version of @command{gawk} should be placed, as usual, -anywhere in your @env{PATH} where your shell can find it. - -While executing, the Atari version of @command{gawk} creates a number of temporary files. When -using @command{gcc} libraries for TOS, @command{gawk} looks for either of -the environment variables, @env{TEMP} or @env{TMPDIR}, in that order. -If either one is found, its value is assumed to be a directory for -temporary files. This directory must exist, and if you can spare the -memory, it is a good idea to put it on a RAM drive. If neither -@env{TEMP} nor @env{TMPDIR} are found, then @command{gawk} uses the -current directory for its temporary files. - -The ST version of @command{gawk} searches for its program files, as described in -@ref{AWKPATH Variable}. -The default value for the @env{AWKPATH} variable is taken from -@code{DEFPATH} defined in @file{Makefile}. The sample @command{gcc}/TOS -@file{Makefile} for the ST in the distribution sets @code{DEFPATH} to -@code{@w{".,c:\lib\awk,c:\gnu\lib\awk"}}. The search path can be -modified by explicitly setting @env{AWKPATH} to whatever you want. -Note that colons cannot be used on the ST to separate elements in the -@env{AWKPATH} variable, since they have another reserved meaning. -Instead, you must use a comma to separate elements in the path. When -recompiling, the separating character can be modified by initializing -the @code{envsep} variable in @file{unsupported/atari/gawkmisc.atr} to another -value. - -Although @command{awk} allows great flexibility in doing I/O redirections -from within a program, this facility should be used with care on the ST -running under TOS. In some circumstances, the OS routines for file-handle -pool processing lose track of certain events, causing the -computer to crash and requiring a reboot. Often a warm reboot is -sufficient. Fortunately, this happens infrequently and in rather -esoteric situations. In particular, avoid having one part of an -@command{awk} program using @code{print} statements explicitly redirected -to @file{/dev/stdout}, while other @code{print} statements use the -default standard output, and a calling shell has redirected standard -output to a file. -@c 10/2000: Is this still true, now that gawk does /dev/stdout internally? - -When @command{gawk} is compiled with the ST version of @command{gcc} and its -usual libraries, it accepts both @samp{/} and @samp{\} as path separators. -While this is convenient, it should be remembered that this removes one -technically valid character (@samp{/}) from your @value{FN}. -It may also create problems for external programs called via the @code{system()} -function, which may not support this convention. Whenever it is possible -that a file created by @command{gawk} will be used by some other program, -use only backslashes. Also remember that in @command{awk}, backslashes in -strings have to be doubled in order to get literal backslashes -(@pxref{Escape Sequences}). - -@node BeOS Installation -@appendixsubsec Installing @command{gawk} on BeOS -@cindex BeOS -@cindex installation, beos - -@c From email contributed by Martin Brown, mc@whoever.com -Since BeOS DR9, all the tools that you should need to build @code{gawk} are -included with BeOS. The process is basically identical to the Unix process -of running @command{configure} and then @command{make}. Full instructions are given below. - -You can compile @command{gawk} under BeOS by extracting the standard sources -and running @command{configure}. You @emph{must} specify the location -prefix for the installation directory. For BeOS DR9 and beyond, the best directory to -use is @file{/boot/home/config}, so the @command{configure} command is: - -@example -configure --prefix=/boot/home/config -@end example - -This installs the compiled application into @file{/boot/home/config/bin}, -which is already specified in the standard @env{PATH}. - -Once the configuration process is completed, you can run @command{make}, -and then @samp{make install}: - -@example -$ make -@dots{} -$ make install -@end example - -BeOS uses Bash as its shell; thus, you use @command{gawk} the same way you would -under Unix. -If these steps do not work, please send in a bug report -(@pxref{Bugs}). - -@node Tandem Installation -@appendixsubsec Installing @command{gawk} on a Tandem -@cindex tandem -@cindex installation, tandem - -The Tandem port is only minimally supported. -The port's contributor no longer has access to a Tandem system. - -@c This section based on README.Tandem by Stephen Davies (scldad@sdc.com.au) -The Tandem port was done on a Cyclone machine running D20. -The port is pretty clean and all facilities seem to work except for -the I/O piping facilities -(@pxref{Getline/Pipe}, -@ref{Getline/Variable/Pipe}, -and -@ref{Redirection}), -which is just too foreign a concept for Tandem. - -To build a Tandem executable from source, download all of the files so -that the @value{FN}s on the Tandem box conform to the restrictions of D20. -For example, @file{array.c} becomes @file{ARRAYC}, and @file{awk.h} -becomes @file{AWKH}. The totally Tandem-specific files are in the -@file{tandem} ``subvolume'' (@file{unsupported/tandem} in the @command{gawk} -distribution) and should be copied to the main source directory before -building @command{gawk}. - -The file @file{compit} can then be used to compile and bind an executable. -Alas, there is no @command{configure} or @command{make}. - -Usage is the same as for Unix, except that D20 requires all @samp{@{} and -@samp{@}} characters to be escaped with @samp{~} on the command line -(but @emph{not} in script files). Also, the standard Tandem syntax for -@samp{/in filename,out filename/} must be used instead of the usual -Unix @samp{<} and @samp{>} for file redirection. (Redirection options -on @code{getline}, @code{print} etc., are supported.) - -The @samp{-mr @var{val}} option -(@pxref{Options}) -has been ``stolen'' to enable Tandem users to process fixed-length -records with no ``end-of-line'' character. That is, @samp{-mr 74} tells -@command{gawk} to read the input file as fixed 74-byte records. @c ENDOFRANGE opgawx @c ENDOFRANGE pcgawon @@ -27884,17 +27544,25 @@ the compiler you used to compile @command{gawk}, and the exact results @command{gawk} gave you. Also say what you expected to occur; this helps us decide whether the problem is really in the documentation. +Please include the version number of @command{gawk} you are using. +You can get this information with the command @samp{gawk --version}. + @cindex @code{bug-gawk@@gnu.org} bug reporting address @cindex email address for bug reports, @code{bug-gawk@@gnu.org} @cindex bug reports, email address, @code{bug-gawk@@gnu.org} Once you have a precise problem, send email to @email{bug-gawk@@gnu.org}. @cindex Robbins, Arnold -Please include the version number of @command{gawk} you are using. -You can get this information with the command @samp{gawk --version}. Using this address automatically sends a carbon copy of your mail to me. If necessary, I can be reached directly at -@email{arnold@@skeeve.com}. The bug reporting address is preferred since the +@c Don't put real address into web pages, to avoid robots, spiders, etc. +@ifhtml +``arnold at skeeve dot com.'' +@end ifhtml +@ifnothtml +@email{arnold@@skeeve.com}. +@end ifnothtml +The bug reporting address is preferred since the email list is archived at the GNU Project. @emph{All email should be in English, since that is my native language.} @@ -27904,6 +27572,7 @@ posting to the Usenet/Internet newsgroup @code{comp.lang.awk}. While the @command{gawk} developers do occasionally read this newsgroup, there is no guarantee that we will see your posting. The steps described above are the official recognized ways for reporting bugs. +Really. @quotation NOTE Many distributions of GNU/Linux and the various BSD-based operating systems @@ -27933,41 +27602,16 @@ The people maintaining the non-Unix ports of @command{gawk} are as follows: @multitable {Tandem (POSIX-compliant)} {123456789012345678901234567890123456789001234567890} -@ignore -@c Fred is no longer living, sadly. -@cindex Fish, Fred -@item Amiga @tab Fred Fish, @email{fnf@@ninemoons.com}. - -@c not supported -@cindex Brown, Martin -@item BeOS @tab Martin Brown, @email{mc@@whoever.com}. - -@c @cindex Hankerson, Darrel -@item MS-DOS @tab Scott Deifik, @email{scottd.mail@@sbcglobal.net}. -@c and Darrel Hankerson, @email{hankedr@@auburn.edu}. -@end ignore - @cindex Zaretskii, Eli @cindex Deifik, Scott @item MS-Windows using MINGW @tab Eli Zaretskii, @email{eliz@@gnu.org}. @item @tab Scott Deifik, @email{scottd.mail@@sbcglobal.net}. -@c not supported -@ignore -@cindex Grigera, Juan -@item MS-Windows @tab Juan Grigera, @email{juan@@grigera.com.ar}. -@end ignore - @cindex Buening, Andreas @item OS/2 @tab Andreas Buening, @email{andreas.buening@@nexgo.de} -@ignore -@cindex Davies, Stephen -@item Tandem @tab Stephen Davies, @email{scldad@@sdc.com.au}. - @cindex Woehlke, Matthew @item Tandem (POSIX-compliant) @tab Matthew Woehlke, @email{mw_triad@@users.sourceforge.net} -@end ignore @cindex Rankin, Pat @item VMS @tab Pat Rankin, @email{rankin@@pactechdata.com}. @@ -28052,9 +27696,10 @@ no longer has it. A copy has been made available at @uref{http://www.skeeve.com/gawk/mawk1.3.3.tar.gz}. In 2009, Thomas Dickey took on @command{mawk} maintenance. -Basic information is availabe on +Basic information is available on @uref{http://www.invisible-island.net/mawk/mawk.html, the project's web page}. -The download URL is @uref{ftp://invisible-island.net/mawk/mawk.tar.gz}. +The download URL is +@url{http://invisible-island.net/datafiles/release/mawk.tar.gz}. Once you have it, @command{gunzip} may be used to decompress this file. Installation @@ -28124,8 +27769,11 @@ It also has a number of extensions. The @command{awk} translator is released under the GPL, and the library is under the LGPL. -To get @command{awka}, go to @uref{http://awka.sourceforge.net}. -You can reach Andrew Sumner at @email{andrew@@zbcom.net}. +To get @command{awka}, go to @url{http://sourceforge.net/projects/awka}. +@c You can reach Andrew Sumner at @email{andrew@@zbcom.net}. + +The project seems to be frozen; no new code changes have been made +since approximately 2003. @cindex Beebe, Nelson H.F.@: @cindex @command{pawk} profiling Bell Labs @command{awk} @@ -28144,6 +27792,7 @@ or @cindex Solaris, POSIX compliant @command{awk} @item The OpenSolaris POSIX @command{awk} The version of @command{awk} in @file{/usr/xpg4/bin} on Solaris is +more-or-less POSIX compliant. It is based on the @command{awk} from Mortice Kern Systems for PCs. The source code can be downloaded from the @uref{http://www.opensolaris.org, OpenSolaris web site}. @@ -30612,8 +30261,9 @@ Base-eight notation, where the digits are @code{0}--@code{7}. Octal numbers are written in C using a leading @samp{0}, to indicate their base. Thus, @code{013} is 11 (one times 8 plus 3). +@cindex P1003.1 POSIX standard @cindex P1003.2 POSIX standard -@item P1003.2 +@item P1003.1, P1003.2 See ``POSIX.'' @item Pattern @@ -30631,9 +30281,7 @@ The name for a series of standards that specify a Portable Operating System interface. The ``IX'' denotes the Unix heritage of these standards. The main standard of interest for @command{awk} users is -@cite{IEEE Standard for Information Technology, Standard 1003.2-1992, -Portable Operating System Interface (POSIX) Part 2: Shell and Utilities}. -Informally, this standard is often referred to as simply ``P1003.2.'' +@cite{IEEE Standard for Information Technology, Standard 1003.1-2008}. @item Precedence The order in which operations are performed when operators are used diff --git a/test/ChangeLog b/test/ChangeLog index 99cc80fc..03262534 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 26 13:54:21 2010 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): Include profile2.ok in the list. Oops. + Mon Dec 13 13:54:56 2010 Arnold D. Robbins <arnold@skeeve.com> * localenl.sh: Use --posix option. diff --git a/test/Makefile.am b/test/Makefile.am index fad37cbd..0ac57bd7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -515,6 +515,7 @@ EXTRA_DIST = \ prdupval.awk \ prdupval.in \ prdupval.ok \ + profile2.ok \ prec.awk \ prec.ok \ printf0.awk \ diff --git a/test/Makefile.in b/test/Makefile.in index 39f317e6..58d0e6f4 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -700,6 +700,7 @@ EXTRA_DIST = \ prdupval.awk \ prdupval.in \ prdupval.ok \ + profile2.ok \ prec.awk \ prec.ok \ printf0.awk \ |