aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-05-16 12:09:03 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-05-16 12:09:03 +0300
commit67feb4fd1ad858fb67dcb3fcb25bd2bcfe80d777 (patch)
tree3ca80f946d8293860938bcdebe7862d9a35c8038
parentaf0e307c34759a6e6d27c94219df47b56545ec00 (diff)
parent353b9af72c79e25ba2d45c62d543536aa82c02cf (diff)
downloadegawk-67feb4fd1ad858fb67dcb3fcb25bd2bcfe80d777.tar.gz
egawk-67feb4fd1ad858fb67dcb3fcb25bd2bcfe80d777.tar.bz2
egawk-67feb4fd1ad858fb67dcb3fcb25bd2bcfe80d777.zip
Merge branch 'gawk-4.1-stable'
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info606
-rw-r--r--doc/gawk.texi92
-rw-r--r--doc/gawktexi.in92
4 files changed, 403 insertions, 391 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 800bb4d8..3464b006 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-16 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Edits through Chapter 14.
+
2014-05-15 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Fix displays for docbook, edits through Chapter 11.
diff --git a/doc/gawk.info b/doc/gawk.info
index a21116f2..d958e7b2 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -18179,8 +18179,8 @@ your data as numeric:
The `print' statement treats its expressions as strings. Although the
fields can act as numbers when necessary, they are still strings, so
-`print' does not try to treat them numerically. You may need to add
-zero to a field to force it to be treated as a number. For example:
+`print' does not try to treat them numerically. You need to add zero
+to a field to force it to be treated as a number. For example:
$ echo 0123 123 0x123 | gawk --non-decimal-data '
> { print $1, $2, $3
@@ -18195,7 +18195,7 @@ request it.
CAUTION: _Use of this option is not recommended._ It can break old
programs very badly. Instead, use the `strtonum()' function to
- convert your data (*note Nondecimal-numbers::). This makes your
+ convert your data (*note String Functions::). This makes your
programs easier to write and easier to read, and leads to less
surprising results.
@@ -18234,7 +18234,7 @@ you do this.
*note Controlling Scanning::, describes how you can assign special,
pre-defined values to `PROCINFO["sorted_in"]' in order to control the
-order in which `gawk' will traverse an array during a `for' loop.
+order in which `gawk' traverses an array during a `for' loop.
In addition, the value of `PROCINFO["sorted_in"]' can be a function
name. This lets you traverse an array based on any custom criterion.
@@ -18507,9 +18507,9 @@ become the values of the result array:
So far, so good. Now it starts to get interesting. Both `asort()'
and `asorti()' accept a third string argument to control comparison of
-array elements. In *note String Functions::, we ignored this third
-argument; however, the time has now come to describe how this argument
-affects these two functions.
+array elements. When we introduced `asort()' and `asorti()' in *note
+String Functions::, we ignored this third argument; however, now is the
+time to describe how this argument affects these two functions.
Basically, the third argument specifies how the array is to be
sorted. There are two possibilities. As with `PROCINFO["sorted_in"]',
@@ -18657,7 +18657,8 @@ the `gawk' program. Once all of the data has been read, `gawk'
terminates the coprocess and exits.
As a side note, the assignment `LC_ALL=C' in the `sort' command
-ensures traditional Unix (ASCII) sorting from `sort'.
+ensures traditional Unix (ASCII) sorting from `sort'. This is not
+strictly necessary here, but it's good to know how to do this.
You may also use pseudo-ttys (ptys) for two-way communication
instead of pipes, if your system supports them. This is done on a
@@ -18669,10 +18670,10 @@ per-command basis, by setting a special element in the `PROCINFO' array
print ... |& command # start two-way pipe
...
-Using ptys avoids the buffer deadlock issues described earlier, at some
-loss in performance. If your system does not have ptys, or if all the
-system's ptys are in use, `gawk' automatically falls back to using
-regular pipes.
+Using ptys usually avoids the buffer deadlock issues described earlier,
+at some loss in performance. If your system does not have ptys, or if
+all the system's ptys are in use, `gawk' automatically falls back to
+using regular pipes.
---------- Footnotes ----------
@@ -18953,7 +18954,7 @@ As usual, the profiled version of the program is written to
`awkprof.out', or to a different file if one specified with the
`--profile' option.
- Along with the regular profile, as shown earlier, the profile
+ Along with the regular profile, as shown earlier, the profile file
includes a trace of any active functions:
# Function Call Stack:
@@ -19037,6 +19038,7 @@ File: gawk.info, Node: Explaining gettext, Next: Programmer i18n, Prev: I18N
13.2 GNU `gettext'
==================
+`gawk' uses GNU `gettext' to provide its internationalization features.
The facilities in GNU `gettext' focus on messages; strings printed by a
program, either directly or via formatting with `printf' or
`sprintf()'.(1)
@@ -19183,7 +19185,7 @@ internationalization:
for translation at runtime. String constants without a leading
underscore are not translated.
-``dcgettext(STRING' [`,' DOMAIN [`,' CATEGORY ]]`)''
+``dcgettext(STRING' [`,' DOMAIN [`,' CATEGORY]]`)''
Return the translation of STRING in text domain DOMAIN for locale
category CATEGORY. The default value for DOMAIN is the current
value of `TEXTDOMAIN'. The default value for CATEGORY is
@@ -19200,7 +19202,7 @@ internationalization:
be simple and to allow for reasonable `awk'-style default
arguments.
-``dcngettext(STRING1, STRING2, NUMBER' [`,' DOMAIN [`,' CATEGORY ]]`)''
+``dcngettext(STRING1, STRING2, NUMBER' [`,' DOMAIN [`,' CATEGORY]]`)''
Return the plural form used for NUMBER of the translation of
STRING1 and STRING2 in text domain DOMAIN for locale category
CATEGORY. STRING1 is the English singular variant of a message,
@@ -19516,19 +19518,20 @@ Following are the translations:
msgstr "Like, the scoop is"
The next step is to make the directory to hold the binary message
-object file and then to create the `guide.gmo' file. The directory
+object file and then to create the `guide.mo' file. We pretend that
+our file is to be used in the `en_US.UTF-8' locale. The directory
layout shown here is standard for GNU `gettext' on GNU/Linux systems.
Other versions of `gettext' may use a different layout:
- $ mkdir en_US en_US/LC_MESSAGES
+ $ mkdir en_US.UTF-8 en_US.UTF-8/LC_MESSAGES
The `msgfmt' utility does the conversion from human-readable `.po'
-file to machine-readable `.gmo' file. By default, `msgfmt' creates a
+file to machine-readable `.mo' file. By default, `msgfmt' creates a
file named `messages'. This file must be renamed and placed in the
proper directory so that `gawk' can find it:
$ msgfmt guide-mellow.po
- $ mv messages en_US/LC_MESSAGES/guide.gmo
+ $ mv messages en_US.UTF-8/LC_MESSAGES/guide.mo
Finally, we run the program to test it:
@@ -19592,8 +19595,8 @@ program is easy.

File: gawk.info, Node: Debugging, Next: Sample Debugging Session, Up: Debugger
-14.1 Introduction to `gawk' Debugger
-====================================
+14.1 Introduction to The `gawk' Debugger
+========================================
This minor node introduces debugging in general and begins the
discussion of debugging in `gawk'.
@@ -19879,11 +19882,7 @@ typing `n' (for "next"):
decides whether to give the lines the special "field skipping" treatment
indicated by the `-f' command-line option. (Notice that we skipped
from where we were before at line 64 to here, since the condition in
-line 64
-
- if (fcount == 0 && charcount == 0)
-
-was false.)
+line 64 `if (fcount == 0 && charcount == 0)' was false.)
Continuing to step, we now get to the splitting of the current and
last records:
@@ -19989,7 +19988,7 @@ following descriptions, commands which may be abbreviated show the
abbreviation on a second description line. A debugger command name may
also be truncated if that partial name is unambiguous. The debugger has
the built-in capability to automatically repeat the previous command
-when just hitting <Enter>. This works for the commands `list', `next',
+just by hitting <Enter>. This works for the commands `list', `next',
`nexti', `step', `stepi' and `continue' executed without any argument.
* Menu:
@@ -20249,7 +20248,7 @@ AWK STATEMENTS
`set' VAR`='VALUE
Assign a constant (number or string) value to an `awk' variable or
field. String values must be enclosed between double quotes
- (`"..."').
+ (`"'...`"').
You can also set special `awk' variables, such as `FS', `NF',
`NR', etc.
@@ -20303,11 +20302,12 @@ are:
`frame' [N]
`f' [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 the main program.
+ Select and print 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 the main program. The printed information consists of
+ the frame number, function and argument names, source file, and
+ the source line.
`up' [COUNT]
Move COUNT (default 1) frames up the stack toward the outermost
@@ -20546,9 +20546,10 @@ File: gawk.info, Node: Readline Support, Next: Limitations, Prev: List of Deb
14.4 Readline Support
=====================
-If `gawk' is compiled with the `readline' library, you can take
-advantage of that library's command completion and history expansion
-features. The following types of completion are available:
+If `gawk' is compiled with the `readline' library
+(http://cnswww.cns.cwru.edu/php/chet/readline/readline.html), you can
+take advantage of that library's command completion and history
+expansion features. The following types of completion are available:
Command completion
Command names.
@@ -20587,15 +20588,14 @@ some limitations. A few which are worth being aware of are:
you will realize that much of the internal manipulation of data in
`gawk', as in many interpreters, is done on a stack. `Op_push',
`Op_pop', etc., are the "bread and butter" of most `gawk' code.
- Unfortunately, as of now, the `gawk' debugger does not allow you
- to examine the stack's contents.
- That is, the intermediate results of expression evaluation are on
- the stack, but cannot be printed. Rather, only variables which
- are defined in the program can be printed. Of course, a
- workaround for this is to use more explicit variables at the
- debugging stage and then change back to obscure, perhaps more
- optimal code later.
+ Unfortunately, as of now, the `gawk' debugger does not allow you
+ to examine the stack's contents. That is, the intermediate
+ results of expression evaluation are on the stack, but cannot be
+ printed. Rather, only variables which are defined in the program
+ can be printed. Of course, a workaround for this is to use more
+ explicit variables at the debugging stage and then change back to
+ obscure, perhaps more optimal code later.
* There is no way to look "inside" the process of compiling regular
expressions to see if you got it right. As an `awk' programmer,
@@ -30297,14 +30297,14 @@ Index
* -v option: Options. (line 32)
* -W option: Options. (line 46)
* . (period), regexp operator: Regexp Operators. (line 44)
-* .gmo files: Explaining gettext. (line 41)
-* .gmo files, converting from .po: I18N Example. (line 62)
+* .gmo files: Explaining gettext. (line 42)
* .gmo files, specifying directory of <1>: Programmer i18n. (line 47)
-* .gmo files, specifying directory of: Explaining gettext. (line 53)
+* .gmo files, specifying directory of: Explaining gettext. (line 54)
+* .mo files, converting from .po: I18N Example. (line 63)
* .po files <1>: Translator i18n. (line 6)
-* .po files: Explaining gettext. (line 36)
-* .po files, converting to .gmo: I18N Example. (line 62)
-* .pot files: Explaining gettext. (line 30)
+* .po files: Explaining gettext. (line 37)
+* .po files, converting to .mo: I18N Example. (line 63)
+* .pot files: Explaining gettext. (line 31)
* / (forward slash) to enclose regular expressions: Regexp. (line 10)
* / (forward slash), / operator: Precedence. (line 55)
* / (forward slash), /= operator <1>: Precedence. (line 95)
@@ -30409,7 +30409,7 @@ Index
* ^ (caret), regexp operator <1>: GNU Regexp Operators.
(line 59)
* ^ (caret), regexp operator: Regexp Operators. (line 22)
-* _ (underscore), C macro: Explaining gettext. (line 70)
+* _ (underscore), C macro: Explaining gettext. (line 71)
* _ (underscore), in names of private variables: Library Names.
(line 29)
* _ (underscore), translatable string: Programmer i18n. (line 69)
@@ -30709,7 +30709,7 @@ Index
* binary input/output: User-modified. (line 15)
* bindtextdomain <1>: Programmer i18n. (line 47)
* bindtextdomain: I18N Functions. (line 12)
-* bindtextdomain() function (C library): Explaining gettext. (line 49)
+* bindtextdomain() function (C library): Explaining gettext. (line 50)
* bindtextdomain() function (gawk), portability and: I18N Portability.
(line 33)
* BINMODE variable <1>: PC Using. (line 33)
@@ -30981,7 +30981,7 @@ Index
* csh utility, POSIXLY_CORRECT environment variable: Options. (line 355)
* csh utility, |& operator, comparison with: Two-way I/O. (line 44)
* ctime() user-defined function: Function Example. (line 73)
-* currency symbols, localization: Explaining gettext. (line 103)
+* currency symbols, localization: Explaining gettext. (line 104)
* current system time: Time Functions. (line 66)
* custom.h file: Configuration Philosophy.
(line 30)
@@ -31043,7 +31043,7 @@ Index
* date utility, POSIX: Time Functions. (line 254)
* dates, converting to timestamps: Time Functions. (line 76)
* dates, information related to, localization: Explaining gettext.
- (line 115)
+ (line 116)
* Davies, Stephen <1>: Contributors. (line 74)
* Davies, Stephen: Acknowledgments. (line 60)
* dcgettext <1>: Programmer i18n. (line 19)
@@ -31146,7 +31146,7 @@ Index
(line 83)
* debugger commands, unwatch: Viewing And Changing Data.
(line 84)
-* debugger commands, up: Execution Stack. (line 33)
+* debugger commands, up: Execution Stack. (line 34)
* debugger commands, w (watch): Viewing And Changing Data.
(line 67)
* debugger commands, watch: Viewing And Changing Data.
@@ -31485,14 +31485,14 @@ Index
* FILENAME variable: Reading Files. (line 6)
* FILENAME variable, getline, setting with: Getline Notes. (line 19)
* filenames, assignments as: Ignoring Assigns. (line 6)
-* files, .gmo: Explaining gettext. (line 41)
-* files, .gmo, converting from .po: I18N Example. (line 62)
+* files, .gmo: Explaining gettext. (line 42)
* files, .gmo, specifying directory of <1>: Programmer i18n. (line 47)
-* files, .gmo, specifying directory of: Explaining gettext. (line 53)
+* files, .gmo, specifying directory of: Explaining gettext. (line 54)
+* files, .mo, converting from .po: I18N Example. (line 63)
* files, .po <1>: Translator i18n. (line 6)
-* files, .po: Explaining gettext. (line 36)
-* files, .po, converting to .gmo: I18N Example. (line 62)
-* files, .pot: Explaining gettext. (line 30)
+* files, .po: Explaining gettext. (line 37)
+* files, .po, converting to .mo: I18N Example. (line 63)
+* files, .pot: Explaining gettext. (line 31)
* files, /dev/... special files: Special FD. (line 46)
* files, /inet/... (gawk): TCP/IP Networking. (line 6)
* files, /inet4/... (gawk): TCP/IP Networking. (line 6)
@@ -31509,23 +31509,23 @@ Index
* files, managing: Data File Management.
(line 6)
* files, managing, data file boundaries: Filetrans Function. (line 6)
-* files, message object: Explaining gettext. (line 41)
+* files, message object: Explaining gettext. (line 42)
* files, message object, converting from portable object files: I18N Example.
- (line 62)
+ (line 63)
* files, message object, specifying directory of <1>: Programmer i18n.
(line 47)
* files, message object, specifying directory of: Explaining gettext.
- (line 53)
+ (line 54)
* files, multiple passes over: Other Arguments. (line 49)
* files, multiple, duplicating output into: Tee Program. (line 6)
* files, output, See output files: Close Files And Pipes.
(line 6)
* files, password: Passwd Functions. (line 16)
* files, portable object <1>: Translator i18n. (line 6)
-* files, portable object: Explaining gettext. (line 36)
-* files, portable object template: Explaining gettext. (line 30)
+* files, portable object: Explaining gettext. (line 37)
+* files, portable object template: Explaining gettext. (line 31)
* files, portable object, converting to message object files: I18N Example.
- (line 62)
+ (line 63)
* files, portable object, generating: Options. (line 147)
* files, processing, ARGIND variable and: Auto-set. (line 51)
* files, reading: Rewind Function. (line 6)
@@ -31720,7 +31720,7 @@ Index
* gawk, newlines in: Statements/Lines. (line 12)
* gawk, octal numbers and: Nondecimal-numbers. (line 42)
* gawk, OS/2 version of: PC Using. (line 16)
-* gawk, PROCINFO array in <1>: Two-way I/O. (line 116)
+* gawk, PROCINFO array in <1>: Two-way I/O. (line 117)
* gawk, PROCINFO array in <2>: Time Functions. (line 47)
* gawk, PROCINFO array in: Auto-set. (line 136)
* gawk, regexp constants and: Using Constant Regexps.
@@ -31791,8 +31791,8 @@ Index
* getpwuid() function (C library): Passwd Functions. (line 188)
* getpwuid() user-defined function: Passwd Functions. (line 192)
* gettext library: Explaining gettext. (line 6)
-* gettext library, locale categories: Explaining gettext. (line 80)
-* gettext() function (C library): Explaining gettext. (line 62)
+* gettext library, locale categories: Explaining gettext. (line 81)
+* gettext() function (C library): Explaining gettext. (line 63)
* gettimeofday() extension function: Extension Sample Time.
(line 13)
* git utility <1>: Adding Code. (line 111)
@@ -31944,7 +31944,7 @@ Index
* internationalization, localization, gawk and: Internationalization.
(line 13)
* internationalization, localization, locale categories: Explaining gettext.
- (line 80)
+ (line 81)
* internationalization, localization, marked strings: Programmer i18n.
(line 14)
* internationalization, localization, portability and: I18N Portability.
@@ -31993,16 +31993,16 @@ Index
* labels.awk program: Labels Program. (line 51)
* languages, data-driven: Basic High Level. (line 85)
* Laurie, Dirk: Changing Precision. (line 6)
-* LC_ALL locale category: Explaining gettext. (line 120)
-* LC_COLLATE locale category: Explaining gettext. (line 93)
-* LC_CTYPE locale category: Explaining gettext. (line 97)
-* LC_MESSAGES locale category: Explaining gettext. (line 87)
+* LC_ALL locale category: Explaining gettext. (line 121)
+* LC_COLLATE locale category: Explaining gettext. (line 94)
+* LC_CTYPE locale category: Explaining gettext. (line 98)
+* LC_MESSAGES locale category: Explaining gettext. (line 88)
* LC_MESSAGES locale category, bindtextdomain() function (gawk): Programmer i18n.
(line 88)
-* LC_MONETARY locale category: Explaining gettext. (line 103)
-* LC_NUMERIC locale category: Explaining gettext. (line 107)
-* LC_RESPONSE locale category: Explaining gettext. (line 111)
-* LC_TIME locale category: Explaining gettext. (line 115)
+* LC_MONETARY locale category: Explaining gettext. (line 104)
+* LC_NUMERIC locale category: Explaining gettext. (line 108)
+* LC_RESPONSE locale category: Explaining gettext. (line 112)
+* LC_TIME locale category: Explaining gettext. (line 116)
* left angle bracket (<), < operator <1>: Precedence. (line 65)
* left angle bracket (<), < operator: Comparison Operators.
(line 11)
@@ -32071,7 +32071,7 @@ Index
* list function definitions, in debugger: Debugger Info. (line 30)
* loading, extensions: Options. (line 173)
* local variables, in a function: Variable Scope. (line 6)
-* locale categories: Explaining gettext. (line 80)
+* locale categories: Explaining gettext. (line 81)
* locale decimal point character: Options. (line 270)
* locale, definition of: Locales. (line 6)
* localization: I18N and L10N. (line 6)
@@ -32122,23 +32122,23 @@ Index
* mawk utility: Escape Sequences. (line 124)
* maximum precision supported by MPFR library: Auto-set. (line 221)
* McPhee, Patrick: Contributors. (line 100)
-* message object files: Explaining gettext. (line 41)
+* message object files: Explaining gettext. (line 42)
* message object files, converting from portable object files: I18N Example.
- (line 62)
+ (line 63)
* message object files, specifying directory of <1>: Programmer i18n.
(line 47)
* message object files, specifying directory of: Explaining gettext.
- (line 53)
+ (line 54)
* messages from extensions: Printing Messages. (line 6)
* metacharacters in regular expressions: Regexp Operators. (line 6)
* metacharacters, escape sequences for: Escape Sequences. (line 130)
* minimum precision supported by MPFR library: Auto-set. (line 224)
* mktime: Time Functions. (line 25)
* modifiers, in format specifiers: Format Modifiers. (line 6)
-* monetary information, localization: Explaining gettext. (line 103)
+* monetary information, localization: Explaining gettext. (line 104)
* Moore, Duncan: Getline Notes. (line 40)
* MPFR: Gawk and MPFR. (line 6)
-* msgfmt utility: I18N Example. (line 62)
+* msgfmt utility: I18N Example. (line 63)
* multiple precision: Arbitrary Precision Arithmetic.
(line 6)
* multiple-line records: Multiple Line. (line 6)
@@ -32370,7 +32370,7 @@ Index
* portability, example programs: Library Functions. (line 42)
* portability, functions, defining: Definition Syntax. (line 99)
* portability, gawk: New Ports. (line 6)
-* portability, gettext library and: Explaining gettext. (line 10)
+* portability, gettext library and: Explaining gettext. (line 11)
* portability, internationalization and: I18N Portability. (line 6)
* portability, length() function: String Functions. (line 176)
* portability, new awk vs. old awk: Conversion. (line 55)
@@ -32382,11 +32382,11 @@ Index
* portability, POSIXLY_CORRECT environment variable: Options. (line 360)
* portability, substr() function: String Functions. (line 510)
* portable object files <1>: Translator i18n. (line 6)
-* portable object files: Explaining gettext. (line 36)
+* portable object files: Explaining gettext. (line 37)
* portable object files, converting to message object files: I18N Example.
- (line 62)
+ (line 63)
* portable object files, generating: Options. (line 147)
-* portable object template files: Explaining gettext. (line 30)
+* portable object template files: Explaining gettext. (line 31)
* porting gawk: New Ports. (line 6)
* positional specifiers, printf statement <1>: Printf Ordering.
(line 6)
@@ -32484,7 +32484,7 @@ Index
* PROCINFO array <1>: Passwd Functions. (line 6)
* PROCINFO array <2>: Time Functions. (line 47)
* PROCINFO array: Auto-set. (line 136)
-* PROCINFO array, and communications via ptys: Two-way I/O. (line 116)
+* PROCINFO array, and communications via ptys: Two-way I/O. (line 117)
* PROCINFO array, and group membership: Group Functions. (line 6)
* PROCINFO array, and user and group ID numbers: Id Program. (line 15)
* PROCINFO array, testing the field splitting: Passwd Functions.
@@ -32852,7 +32852,7 @@ Index
* sort utility: Word Sorting. (line 50)
* sort utility, coprocesses and: Two-way I/O. (line 83)
* sorting characters in different languages: Explaining gettext.
- (line 93)
+ (line 94)
* source code, awka: Other Versions. (line 64)
* source code, Brian Kernighan's awk: Other Versions. (line 13)
* source code, Busybox Awk: Other Versions. (line 88)
@@ -32990,7 +32990,7 @@ Index
* TEXTDOMAIN variable: User-modified. (line 152)
* TEXTDOMAIN variable, BEGIN pattern and: Programmer i18n. (line 60)
* TEXTDOMAIN variable, portability and: I18N Portability. (line 20)
-* textdomain() function (C library): Explaining gettext. (line 27)
+* textdomain() function (C library): Explaining gettext. (line 28)
* tilde (~), ~ operator <1>: Expression Patterns. (line 24)
* tilde (~), ~ operator <2>: Precedence. (line 80)
* tilde (~), ~ operator <3>: Comparison Operators.
@@ -33001,7 +33001,7 @@ Index
* tilde (~), ~ operator: Regexp Usage. (line 19)
* time functions: Time Functions. (line 6)
* time, alarm clock example program: Alarm Program. (line 11)
-* time, localization and: Explaining gettext. (line 115)
+* time, localization and: Explaining gettext. (line 116)
* time, managing: Getlocaltime Function.
(line 6)
* time, retrieving: Time Functions. (line 17)
@@ -33064,7 +33064,7 @@ Index
(line 18)
* undefined functions: Pass By Value/Reference.
(line 71)
-* underscore (_), C macro: Explaining gettext. (line 70)
+* underscore (_), C macro: Explaining gettext. (line 71)
* underscore (_), in names of private variables: Library Names.
(line 29)
* underscore (_), translatable string: Programmer i18n. (line 69)
@@ -33092,7 +33092,7 @@ Index
(line 83)
* unwatch debugger command: Viewing And Changing Data.
(line 84)
-* up debugger command: Execution Stack. (line 33)
+* up debugger command: Execution Stack. (line 34)
* user database, reading: Passwd Functions. (line 6)
* user-defined functions: User-defined. (line 6)
* user-defined, functions, counts, in a profile: Profiling. (line 137)
@@ -33548,213 +33548,213 @@ Node: Anagram Program729474
Node: Signature Program732542
Node: Advanced Features733789
Node: Nondecimal Data735675
-Node: Array Sorting737258
-Node: Controlling Array Traversal737955
-Node: Array Sorting Functions746239
-Ref: Array Sorting Functions-Footnote-1750108
-Node: Two-way I/O750302
-Ref: Two-way I/O-Footnote-1755734
-Node: TCP/IP Networking755816
-Node: Profiling758660
-Node: Internationalization766163
-Node: I18N and L10N767588
-Node: Explaining gettext768274
-Ref: Explaining gettext-Footnote-1773342
-Ref: Explaining gettext-Footnote-2773526
-Node: Programmer i18n773691
-Node: Translator i18n777918
-Node: String Extraction778712
-Ref: String Extraction-Footnote-1779673
-Node: Printf Ordering779759
-Ref: Printf Ordering-Footnote-1782541
-Node: I18N Portability782605
-Ref: I18N Portability-Footnote-1785054
-Node: I18N Example785117
-Ref: I18N Example-Footnote-1787755
-Node: Gawk I18N787827
-Node: Debugger788448
-Node: Debugging789419
-Node: Debugging Concepts789852
-Node: Debugging Terms791708
-Node: Awk Debugging794305
-Node: Sample Debugging Session795197
-Node: Debugger Invocation795717
-Node: Finding The Bug797050
-Node: List of Debugger Commands803537
-Node: Breakpoint Control804871
-Node: Debugger Execution Control808535
-Node: Viewing And Changing Data811895
-Node: Execution Stack815251
-Node: Debugger Info816718
-Node: Miscellaneous Debugger Commands820712
-Node: Readline Support825896
-Node: Limitations826727
-Node: Arbitrary Precision Arithmetic828979
-Ref: Arbitrary Precision Arithmetic-Footnote-1830628
-Node: General Arithmetic830776
-Node: Floating Point Issues832496
-Node: String Conversion Precision833377
-Ref: String Conversion Precision-Footnote-1835082
-Node: Unexpected Results835191
-Node: POSIX Floating Point Problems837344
-Ref: POSIX Floating Point Problems-Footnote-1841169
-Node: Integer Programming841207
-Node: Floating-point Programming842946
-Ref: Floating-point Programming-Footnote-1849277
-Ref: Floating-point Programming-Footnote-2849547
-Node: Floating-point Representation849811
-Node: Floating-point Context850976
-Ref: table-ieee-formats851815
-Node: Rounding Mode853199
-Ref: table-rounding-modes853678
-Ref: Rounding Mode-Footnote-1856693
-Node: Gawk and MPFR856872
-Node: Arbitrary Precision Floats858281
-Ref: Arbitrary Precision Floats-Footnote-1860724
-Node: Setting Precision861040
-Ref: table-predefined-precision-strings861726
-Node: Setting Rounding Mode863871
-Ref: table-gawk-rounding-modes864275
-Node: Floating-point Constants865462
-Node: Changing Precision866891
-Ref: Changing Precision-Footnote-1868288
-Node: Exact Arithmetic868462
-Node: Arbitrary Precision Integers871600
-Ref: Arbitrary Precision Integers-Footnote-1874615
-Node: Dynamic Extensions874762
-Node: Extension Intro876220
-Node: Plugin License877485
-Node: Extension Mechanism Outline878170
-Ref: load-extension878587
-Ref: load-new-function880065
-Ref: call-new-function881060
-Node: Extension API Description883075
-Node: Extension API Functions Introduction884362
-Node: General Data Types889289
-Ref: General Data Types-Footnote-1894984
-Node: Requesting Values895283
-Ref: table-value-types-returned896020
-Node: Memory Allocation Functions896974
-Ref: Memory Allocation Functions-Footnote-1899720
-Node: Constructor Functions899816
-Node: Registration Functions901574
-Node: Extension Functions902259
-Node: Exit Callback Functions904561
-Node: Extension Version String905810
-Node: Input Parsers906460
-Node: Output Wrappers916217
-Node: Two-way processors920727
-Node: Printing Messages922935
-Ref: Printing Messages-Footnote-1924012
-Node: Updating `ERRNO'924164
-Node: Accessing Parameters924903
-Node: Symbol Table Access926133
-Node: Symbol table by name926647
-Node: Symbol table by cookie928623
-Ref: Symbol table by cookie-Footnote-1932755
-Node: Cached values932818
-Ref: Cached values-Footnote-1936308
-Node: Array Manipulation936399
-Ref: Array Manipulation-Footnote-1937497
-Node: Array Data Types937536
-Ref: Array Data Types-Footnote-1940239
-Node: Array Functions940331
-Node: Flattening Arrays944167
-Node: Creating Arrays951019
-Node: Extension API Variables955744
-Node: Extension Versioning956380
-Node: Extension API Informational Variables958281
-Node: Extension API Boilerplate959367
-Node: Finding Extensions963171
-Node: Extension Example963731
-Node: Internal File Description964461
-Node: Internal File Ops968552
-Ref: Internal File Ops-Footnote-1980061
-Node: Using Internal File Ops980201
-Ref: Using Internal File Ops-Footnote-1982548
-Node: Extension Samples982814
-Node: Extension Sample File Functions984338
-Node: Extension Sample Fnmatch992825
-Node: Extension Sample Fork994594
-Node: Extension Sample Inplace995807
-Node: Extension Sample Ord997585
-Node: Extension Sample Readdir998421
-Node: Extension Sample Revout999953
-Node: Extension Sample Rev2way1000546
-Node: Extension Sample Read write array1001236
-Node: Extension Sample Readfile1003119
-Node: Extension Sample API Tests1004219
-Node: Extension Sample Time1004744
-Node: gawkextlib1006108
-Node: Language History1008889
-Node: V7/SVR3.11010482
-Node: SVR41012802
-Node: POSIX1014244
-Node: BTL1015630
-Node: POSIX/GNU1016364
-Node: Feature History1021963
-Node: Common Extensions1034939
-Node: Ranges and Locales1036251
-Ref: Ranges and Locales-Footnote-11040868
-Ref: Ranges and Locales-Footnote-21040895
-Ref: Ranges and Locales-Footnote-31041129
-Node: Contributors1041350
-Node: Installation1046731
-Node: Gawk Distribution1047625
-Node: Getting1048109
-Node: Extracting1048935
-Node: Distribution contents1050627
-Node: Unix Installation1056348
-Node: Quick Installation1056965
-Node: Additional Configuration Options1059411
-Node: Configuration Philosophy1061147
-Node: Non-Unix Installation1063501
-Node: PC Installation1063959
-Node: PC Binary Installation1065270
-Node: PC Compiling1067118
-Node: PC Testing1070078
-Node: PC Using1071254
-Node: Cygwin1075422
-Node: MSYS1076231
-Node: VMS Installation1076745
-Node: VMS Compilation1077541
-Ref: VMS Compilation-Footnote-11078793
-Node: VMS Dynamic Extensions1078851
-Node: VMS Installation Details1080224
-Node: VMS Running1082475
-Node: VMS GNV1085309
-Node: VMS Old Gawk1086032
-Node: Bugs1086502
-Node: Other Versions1090420
-Node: Notes1096504
-Node: Compatibility Mode1097304
-Node: Additions1098087
-Node: Accessing The Source1099014
-Node: Adding Code1100454
-Node: New Ports1106499
-Node: Derived Files1110634
-Ref: Derived Files-Footnote-11115955
-Ref: Derived Files-Footnote-21115989
-Ref: Derived Files-Footnote-31116589
-Node: Future Extensions1116687
-Node: Implementation Limitations1117270
-Node: Extension Design1118518
-Node: Old Extension Problems1119672
-Ref: Old Extension Problems-Footnote-11121180
-Node: Extension New Mechanism Goals1121237
-Ref: Extension New Mechanism Goals-Footnote-11124602
-Node: Extension Other Design Decisions1124788
-Node: Extension Future Growth1126894
-Node: Old Extension Mechanism1127730
-Node: Basic Concepts1129470
-Node: Basic High Level1130151
-Ref: figure-general-flow1130423
-Ref: figure-process-flow1131022
-Ref: Basic High Level-Footnote-11134251
-Node: Basic Data Typing1134436
-Node: Glossary1137791
-Node: Copying1163022
-Node: GNU Free Documentation License1200578
-Node: Index1225714
+Node: Array Sorting737252
+Node: Controlling Array Traversal737949
+Node: Array Sorting Functions746229
+Ref: Array Sorting Functions-Footnote-1750136
+Node: Two-way I/O750330
+Ref: Two-way I/O-Footnote-1755846
+Node: TCP/IP Networking755928
+Node: Profiling758772
+Node: Internationalization766280
+Node: I18N and L10N767705
+Node: Explaining gettext768391
+Ref: Explaining gettext-Footnote-1773531
+Ref: Explaining gettext-Footnote-2773715
+Node: Programmer i18n773880
+Node: Translator i18n778105
+Node: String Extraction778899
+Ref: String Extraction-Footnote-1779860
+Node: Printf Ordering779946
+Ref: Printf Ordering-Footnote-1782728
+Node: I18N Portability782792
+Ref: I18N Portability-Footnote-1785241
+Node: I18N Example785304
+Ref: I18N Example-Footnote-1788026
+Node: Gawk I18N788098
+Node: Debugger788719
+Node: Debugging789690
+Node: Debugging Concepts790131
+Node: Debugging Terms791987
+Node: Awk Debugging794584
+Node: Sample Debugging Session795476
+Node: Debugger Invocation795996
+Node: Finding The Bug797329
+Node: List of Debugger Commands803811
+Node: Breakpoint Control805143
+Node: Debugger Execution Control808807
+Node: Viewing And Changing Data812167
+Node: Execution Stack815525
+Node: Debugger Info817038
+Node: Miscellaneous Debugger Commands821032
+Node: Readline Support826216
+Node: Limitations827108
+Node: Arbitrary Precision Arithmetic829356
+Ref: Arbitrary Precision Arithmetic-Footnote-1831005
+Node: General Arithmetic831153
+Node: Floating Point Issues832873
+Node: String Conversion Precision833754
+Ref: String Conversion Precision-Footnote-1835459
+Node: Unexpected Results835568
+Node: POSIX Floating Point Problems837721
+Ref: POSIX Floating Point Problems-Footnote-1841546
+Node: Integer Programming841584
+Node: Floating-point Programming843323
+Ref: Floating-point Programming-Footnote-1849654
+Ref: Floating-point Programming-Footnote-2849924
+Node: Floating-point Representation850188
+Node: Floating-point Context851353
+Ref: table-ieee-formats852192
+Node: Rounding Mode853576
+Ref: table-rounding-modes854055
+Ref: Rounding Mode-Footnote-1857070
+Node: Gawk and MPFR857249
+Node: Arbitrary Precision Floats858658
+Ref: Arbitrary Precision Floats-Footnote-1861101
+Node: Setting Precision861417
+Ref: table-predefined-precision-strings862103
+Node: Setting Rounding Mode864248
+Ref: table-gawk-rounding-modes864652
+Node: Floating-point Constants865839
+Node: Changing Precision867268
+Ref: Changing Precision-Footnote-1868665
+Node: Exact Arithmetic868839
+Node: Arbitrary Precision Integers871977
+Ref: Arbitrary Precision Integers-Footnote-1874992
+Node: Dynamic Extensions875139
+Node: Extension Intro876597
+Node: Plugin License877862
+Node: Extension Mechanism Outline878547
+Ref: load-extension878964
+Ref: load-new-function880442
+Ref: call-new-function881437
+Node: Extension API Description883452
+Node: Extension API Functions Introduction884739
+Node: General Data Types889666
+Ref: General Data Types-Footnote-1895361
+Node: Requesting Values895660
+Ref: table-value-types-returned896397
+Node: Memory Allocation Functions897351
+Ref: Memory Allocation Functions-Footnote-1900097
+Node: Constructor Functions900193
+Node: Registration Functions901951
+Node: Extension Functions902636
+Node: Exit Callback Functions904938
+Node: Extension Version String906187
+Node: Input Parsers906837
+Node: Output Wrappers916594
+Node: Two-way processors921104
+Node: Printing Messages923312
+Ref: Printing Messages-Footnote-1924389
+Node: Updating `ERRNO'924541
+Node: Accessing Parameters925280
+Node: Symbol Table Access926510
+Node: Symbol table by name927024
+Node: Symbol table by cookie929000
+Ref: Symbol table by cookie-Footnote-1933132
+Node: Cached values933195
+Ref: Cached values-Footnote-1936685
+Node: Array Manipulation936776
+Ref: Array Manipulation-Footnote-1937874
+Node: Array Data Types937913
+Ref: Array Data Types-Footnote-1940616
+Node: Array Functions940708
+Node: Flattening Arrays944544
+Node: Creating Arrays951396
+Node: Extension API Variables956121
+Node: Extension Versioning956757
+Node: Extension API Informational Variables958658
+Node: Extension API Boilerplate959744
+Node: Finding Extensions963548
+Node: Extension Example964108
+Node: Internal File Description964838
+Node: Internal File Ops968929
+Ref: Internal File Ops-Footnote-1980438
+Node: Using Internal File Ops980578
+Ref: Using Internal File Ops-Footnote-1982925
+Node: Extension Samples983191
+Node: Extension Sample File Functions984715
+Node: Extension Sample Fnmatch993202
+Node: Extension Sample Fork994971
+Node: Extension Sample Inplace996184
+Node: Extension Sample Ord997962
+Node: Extension Sample Readdir998798
+Node: Extension Sample Revout1000330
+Node: Extension Sample Rev2way1000923
+Node: Extension Sample Read write array1001613
+Node: Extension Sample Readfile1003496
+Node: Extension Sample API Tests1004596
+Node: Extension Sample Time1005121
+Node: gawkextlib1006485
+Node: Language History1009266
+Node: V7/SVR3.11010859
+Node: SVR41013179
+Node: POSIX1014621
+Node: BTL1016007
+Node: POSIX/GNU1016741
+Node: Feature History1022340
+Node: Common Extensions1035316
+Node: Ranges and Locales1036628
+Ref: Ranges and Locales-Footnote-11041245
+Ref: Ranges and Locales-Footnote-21041272
+Ref: Ranges and Locales-Footnote-31041506
+Node: Contributors1041727
+Node: Installation1047108
+Node: Gawk Distribution1048002
+Node: Getting1048486
+Node: Extracting1049312
+Node: Distribution contents1051004
+Node: Unix Installation1056725
+Node: Quick Installation1057342
+Node: Additional Configuration Options1059788
+Node: Configuration Philosophy1061524
+Node: Non-Unix Installation1063878
+Node: PC Installation1064336
+Node: PC Binary Installation1065647
+Node: PC Compiling1067495
+Node: PC Testing1070455
+Node: PC Using1071631
+Node: Cygwin1075799
+Node: MSYS1076608
+Node: VMS Installation1077122
+Node: VMS Compilation1077918
+Ref: VMS Compilation-Footnote-11079170
+Node: VMS Dynamic Extensions1079228
+Node: VMS Installation Details1080601
+Node: VMS Running1082852
+Node: VMS GNV1085686
+Node: VMS Old Gawk1086409
+Node: Bugs1086879
+Node: Other Versions1090797
+Node: Notes1096881
+Node: Compatibility Mode1097681
+Node: Additions1098464
+Node: Accessing The Source1099391
+Node: Adding Code1100831
+Node: New Ports1106876
+Node: Derived Files1111011
+Ref: Derived Files-Footnote-11116332
+Ref: Derived Files-Footnote-21116366
+Ref: Derived Files-Footnote-31116966
+Node: Future Extensions1117064
+Node: Implementation Limitations1117647
+Node: Extension Design1118895
+Node: Old Extension Problems1120049
+Ref: Old Extension Problems-Footnote-11121557
+Node: Extension New Mechanism Goals1121614
+Ref: Extension New Mechanism Goals-Footnote-11124979
+Node: Extension Other Design Decisions1125165
+Node: Extension Future Growth1127271
+Node: Old Extension Mechanism1128107
+Node: Basic Concepts1129847
+Node: Basic High Level1130528
+Ref: figure-general-flow1130800
+Ref: figure-process-flow1131399
+Ref: Basic High Level-Footnote-11134628
+Node: Basic Data Typing1134813
+Node: Glossary1138168
+Node: Copying1163399
+Node: GNU Free Documentation License1200955
+Node: Index1226091

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 08aa5ddd..b7ef9581 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -131,9 +131,15 @@
@set LEQ @math{@leq}
@set PI @math{@pi}
@end iftex
+@ifdocbook
+@set LEQ @inlineraw{docbook, &le;}
+@set PI @inlineraw{docbook, &pgr;}
+@end ifdocbook
@ifnottex
+@ifnotdocbook
@set LEQ <=
@set PI @i{pi}
+@end ifnotdocbook
@end ifnottex
@ifnottex
@@ -16051,13 +16057,7 @@ Optional parameters are enclosed in square brackets@w{ ([ ]):}
@cindex arctangent
Return the arctangent of @code{@var{y} / @var{x}} in radians.
You can use @samp{pi = atan2(0, -1)} to retrieve the value of
-@ifnotdocbook
@value{PI}.
-@end ifnotdocbook
-@docbook
-&pgr;.
-
-@end docbook
@item @code{cos(@var{x})}
@cindexawkfunc{cos}
@@ -25752,7 +25752,7 @@ $ @kbd{echo 0123 123 0x123 | gawk '@{ print $1, $2, $3 @}'}
The @code{print} statement treats its expressions as strings.
Although the fields can act as numbers when necessary,
they are still strings, so @code{print} does not try to treat them
-numerically. You may need to add zero to a field to force it to
+numerically. You need to add zero to a field to force it to
be treated as a number. For example:
@example
@@ -25774,7 +25774,7 @@ disabled. If you want it, you must explicitly request it.
@emph{Use of this option is not recommended.}
It can break old programs very badly.
Instead, use the @code{strtonum()} function to convert your data
-(@pxref{Nondecimal-numbers}).
+(@pxref{String Functions}).
This makes your programs easier to write and easier to read, and
leads to less surprising results.
@end quotation
@@ -25808,7 +25808,7 @@ lets you do this.
@ref{Controlling Scanning}, describes how you can assign special,
pre-defined values to @code{PROCINFO["sorted_in"]} in order to
-control the order in which @command{gawk} will traverse an array
+control the order in which @command{gawk} traverses an array
during a @code{for} loop.
In addition, the value of @code{PROCINFO["sorted_in"]} can be a function name.
@@ -26132,9 +26132,9 @@ END @{
So far, so good. Now it starts to get interesting. Both @code{asort()}
and @code{asorti()} accept a third string argument to control comparison
-of array elements. In @ref{String Functions}, we ignored this third
-argument; however, the time has now come to describe how this argument
-affects these two functions.
+of array elements. When we introduced @code{asort()} and @code{asorti()}
+in @ref{String Functions}, we ignored this third argument; however,
+now is the time to describe how this argument affects these two functions.
Basically, the third argument specifies how the array is to be sorted.
There are two possibilities. As with @code{PROCINFO["sorted_in"]},
@@ -26330,6 +26330,7 @@ has been read, @command{gawk} terminates the coprocess and exits.
As a side note, the assignment @samp{LC_ALL=C} in the @command{sort}
command ensures traditional Unix (ASCII) sorting from @command{sort}.
+This is not strictly necessary here, but it's good to know how to do this.
@cindex @command{gawk}, @code{PROCINFO} array in
@cindex @code{PROCINFO} array, and communications via ptys
@@ -26348,7 +26349,7 @@ print @dots{} |& command # start two-way pipe
@end example
@noindent
-Using ptys avoids the buffer deadlock issues described earlier, at some
+Using ptys usually avoids the buffer deadlock issues described earlier, at some
loss in performance. If your system does not have ptys, or if all the
system's ptys are in use, @command{gawk} automatically falls back to
using regular pipes.
@@ -26452,7 +26453,9 @@ See
@inforef{Top, , General Introduction, gawkinet, TCP/IP Internetworking with @command{gawk}},
@end ifinfo
@ifnotinfo
-See @cite{TCP/IP Internetworking with @command{gawk}},
+See
+@uref{http://www.gnu.org/software/gawk/manual/gawkinet/,
+@cite{TCP/IP Internetworking with @command{gawk}}},
which comes as part of the @command{gawk} distribution,
@end ifnotinfo
for a much more complete introduction and discussion, as well as
@@ -26731,7 +26734,7 @@ As usual, the profiled version of the program is written to
@file{awkprof.out}, or to a different file if one specified with
the @option{--profile} option.
-Along with the regular profile, as shown earlier, the profile
+Along with the regular profile, as shown earlier, the profile file
includes a trace of any active functions:
@example
@@ -26838,6 +26841,8 @@ monetary values are printed and read.
@cindex internationalizing a program
@c STARTOFRANGE gettex
@cindex @code{gettext} library
+@command{gawk} uses GNU @code{gettext} to provide its internationalization
+features.
The facilities in GNU @code{gettext} focus on messages; strings printed
by a program, either directly or via formatting with @code{printf} or
@code{sprintf()}.@footnote{For some operating systems, the @command{gawk}
@@ -27048,7 +27053,7 @@ are candidates for translation at runtime.
String constants without a leading underscore are not translated.
@cindexgawkfunc{dcgettext}
-@item @code{dcgettext(@var{string}} [@code{,} @var{domain} [@code{,} @var{category} ]]@code{)}
+@item @code{dcgettext(@var{string}} [@code{,} @var{domain} [@code{,} @var{category}]]@code{)}
Return the translation of @var{string} in
text domain @var{domain} for locale category @var{category}.
The default value for @var{domain} is the current value of @code{TEXTDOMAIN}.
@@ -27074,7 +27079,7 @@ default arguments.
@end quotation
@cindexgawkfunc{dcngettext}
-@item @code{dcngettext(@var{string1}, @var{string2}, @var{number}} [@code{,} @var{domain} [@code{,} @var{category} ]]@code{)}
+@item @code{dcngettext(@var{string1}, @var{string2}, @var{number}} [@code{,} @var{domain} [@code{,} @var{category}]]@code{)}
Return the plural form used for @var{number} of the
translation of @var{string1} and @var{string2} in text domain
@var{domain} for locale category @var{category}. @var{string1} is the
@@ -27502,33 +27507,34 @@ msgstr "Like, the scoop is"
@cindex Linux
@cindex GNU/Linux
The next step is to make the directory to hold the binary message object
-file and then to create the @file{guide.gmo} file.
+file and then to create the @file{guide.mo} file.
+We pretend that our file is to be used in the @code{en_US.UTF-8} locale.
The directory layout shown here is standard for GNU @code{gettext} on
GNU/Linux systems. Other versions of @code{gettext} may use a different
layout:
@example
-$ @kbd{mkdir en_US en_US/LC_MESSAGES}
+$ @kbd{mkdir en_US.UTF-8 en_US.UTF-8/LC_MESSAGES}
@end example
-@cindex @code{.po} files, converting to @code{.gmo}
-@cindex files, @code{.po}, converting to @code{.gmo}
-@cindex @code{.gmo} files, converting from @code{.po}
-@cindex files, @code{.gmo}, converting from @code{.po}
+@cindex @code{.po} files, converting to @code{.mo}
+@cindex files, @code{.po}, converting to @code{.mo}
+@cindex @code{.mo} files, converting from @code{.po}
+@cindex files, @code{.mo}, converting from @code{.po}
@cindex portable object files, converting to message object files
@cindex files, portable object, converting to message object files
@cindex message object files, converting from portable object files
@cindex files, message object, converting from portable object files
@cindex @command{msgfmt} utility
The @command{msgfmt} utility does the conversion from human-readable
-@file{.po} file to machine-readable @file{.gmo} file.
+@file{.po} file to machine-readable @file{.mo} file.
By default, @command{msgfmt} creates a file named @file{messages}.
This file must be renamed and placed in the proper directory so that
@command{gawk} can find it:
@example
$ @kbd{msgfmt guide-mellow.po}
-$ @kbd{mv messages en_US/LC_MESSAGES/guide.gmo}
+$ @kbd{mv messages en_US.UTF-8/LC_MESSAGES/guide.mo}
@end example
Finally, we run the program to test it:
@@ -27600,7 +27606,7 @@ how to use @command{gawk} for debugging your program is easy.
@end menu
@node Debugging
-@section Introduction to @command{gawk} Debugger
+@section Introduction to The @command{gawk} Debugger
This @value{SECTION} introduces debugging in general and begins
the discussion of debugging in @command{gawk}.
@@ -27915,13 +27921,7 @@ This tells us that @command{gawk} is now ready to execute line 67, which
decides whether to give the lines the special ``field skipping'' treatment
indicated by the @option{-f} command-line option. (Notice that we skipped
from where we were before at line 64 to here, since the condition in line 64
-
-@example
-if (fcount == 0 && charcount == 0)
-@end example
-
-@noindent
-was false.)
+@samp{if (fcount == 0 && charcount == 0)} was false.)
Continuing to step, we now get to the splitting of the current and
last records:
@@ -28056,7 +28056,7 @@ In the following descriptions, commands which may be abbreviated
show the abbreviation on a second description line.
A debugger command name may also be truncated if that partial
name is unambiguous. The debugger has the built-in capability to
-automatically repeat the previous command when just hitting @key{Enter}.
+automatically repeat the previous command just by hitting @key{Enter}.
This works for the commands @code{list}, @code{next}, @code{nexti}, @code{step}, @code{stepi}
and @code{continue} executed without any argument.
@@ -28418,7 +28418,7 @@ No newline is printed unless one is specified.
@item @code{set} @var{var}@code{=}@var{value}
Assign a constant (number or string) value to an @command{awk} variable
or field.
-String values must be enclosed between double quotes (@code{"@dots{}"}).
+String values must be enclosed between double quotes (@code{"}@dots{}@code{"}).
You can also set special @command{awk} variables, such as @code{FS},
@code{NF}, @code{NR}, etc.
@@ -28493,10 +28493,11 @@ Then select and print the frame.
@cindex @code{f} debugger command (alias for @code{frame})
@item @code{frame} [@var{n}]
@itemx @code{f} [@var{n}]
-Select and print (frame number, function and argument names, source file,
-and the source line) stack frame @var{n}. Frame 0 is the currently executing,
-or @dfn{innermost}, frame (function call), frame 1 is the frame that called the
-innermost one. The highest numbered frame is the one for the main program.
+Select and print stack frame @var{n}. Frame 0 is the currently executing,
+or @dfn{innermost}, frame (function call), frame 1 is the frame that
+called the innermost one. The highest numbered frame is the one for the
+main program. The printed information consists of the frame number,
+function and argument names, source file, and the source line.
@cindex debugger commands, @code{up}
@cindex @code{up} debugger command
@@ -28796,9 +28797,11 @@ fairly self-explanatory, and using @code{stepi} and @code{nexti} while
@cindex command completion, in debugger
@cindex history expansion, in debugger
-If @command{gawk} is compiled with the @code{readline} library, you
-can take advantage of that library's command completion and history expansion
-features. The following types of completion are available:
+If @command{gawk} is compiled with
+@uref{http://cnswww.cns.cwru.edu/php/chet/readline/readline.html,
+the @code{readline} library}, you can take advantage of that library's
+command completion and history expansion features. The following types
+of completion are available:
@table @asis
@item Command completion
@@ -28848,9 +28851,10 @@ If you perused the dump of opcodes in @ref{Miscellaneous Debugger Commands},
you will realize that much of the internal manipulation of data
in @command{gawk}, as in many interpreters, is done on a stack.
@code{Op_push}, @code{Op_pop}, etc., are the ``bread and butter'' of
-most @command{gawk} code. Unfortunately, as of now, the @command{gawk}
-debugger does not allow you to examine the stack's contents.
+most @command{gawk} code.
+Unfortunately, as of now, the @command{gawk}
+debugger does not allow you to examine the stack's contents.
That is, the intermediate results of expression evaluation are on the
stack, but cannot be printed. Rather, only variables which are defined
in the program can be printed. Of course, a workaround for
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 802fb536..6a37cc97 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -126,9 +126,15 @@
@set LEQ @math{@leq}
@set PI @math{@pi}
@end iftex
+@ifdocbook
+@set LEQ @inlineraw{docbook, &le;}
+@set PI @inlineraw{docbook, &pgr;}
+@end ifdocbook
@ifnottex
+@ifnotdocbook
@set LEQ <=
@set PI @i{pi}
+@end ifnotdocbook
@end ifnottex
@ifnottex
@@ -15385,13 +15391,7 @@ Optional parameters are enclosed in square brackets@w{ ([ ]):}
@cindex arctangent
Return the arctangent of @code{@var{y} / @var{x}} in radians.
You can use @samp{pi = atan2(0, -1)} to retrieve the value of
-@ifnotdocbook
@value{PI}.
-@end ifnotdocbook
-@docbook
-&pgr;.
-
-@end docbook
@item @code{cos(@var{x})}
@cindexawkfunc{cos}
@@ -24896,7 +24896,7 @@ $ @kbd{echo 0123 123 0x123 | gawk '@{ print $1, $2, $3 @}'}
The @code{print} statement treats its expressions as strings.
Although the fields can act as numbers when necessary,
they are still strings, so @code{print} does not try to treat them
-numerically. You may need to add zero to a field to force it to
+numerically. You need to add zero to a field to force it to
be treated as a number. For example:
@example
@@ -24918,7 +24918,7 @@ disabled. If you want it, you must explicitly request it.
@emph{Use of this option is not recommended.}
It can break old programs very badly.
Instead, use the @code{strtonum()} function to convert your data
-(@pxref{Nondecimal-numbers}).
+(@pxref{String Functions}).
This makes your programs easier to write and easier to read, and
leads to less surprising results.
@end quotation
@@ -24952,7 +24952,7 @@ lets you do this.
@ref{Controlling Scanning}, describes how you can assign special,
pre-defined values to @code{PROCINFO["sorted_in"]} in order to
-control the order in which @command{gawk} will traverse an array
+control the order in which @command{gawk} traverses an array
during a @code{for} loop.
In addition, the value of @code{PROCINFO["sorted_in"]} can be a function name.
@@ -25276,9 +25276,9 @@ END @{
So far, so good. Now it starts to get interesting. Both @code{asort()}
and @code{asorti()} accept a third string argument to control comparison
-of array elements. In @ref{String Functions}, we ignored this third
-argument; however, the time has now come to describe how this argument
-affects these two functions.
+of array elements. When we introduced @code{asort()} and @code{asorti()}
+in @ref{String Functions}, we ignored this third argument; however,
+now is the time to describe how this argument affects these two functions.
Basically, the third argument specifies how the array is to be sorted.
There are two possibilities. As with @code{PROCINFO["sorted_in"]},
@@ -25474,6 +25474,7 @@ has been read, @command{gawk} terminates the coprocess and exits.
As a side note, the assignment @samp{LC_ALL=C} in the @command{sort}
command ensures traditional Unix (ASCII) sorting from @command{sort}.
+This is not strictly necessary here, but it's good to know how to do this.
@cindex @command{gawk}, @code{PROCINFO} array in
@cindex @code{PROCINFO} array, and communications via ptys
@@ -25492,7 +25493,7 @@ print @dots{} |& command # start two-way pipe
@end example
@noindent
-Using ptys avoids the buffer deadlock issues described earlier, at some
+Using ptys usually avoids the buffer deadlock issues described earlier, at some
loss in performance. If your system does not have ptys, or if all the
system's ptys are in use, @command{gawk} automatically falls back to
using regular pipes.
@@ -25596,7 +25597,9 @@ See
@inforef{Top, , General Introduction, gawkinet, TCP/IP Internetworking with @command{gawk}},
@end ifinfo
@ifnotinfo
-See @cite{TCP/IP Internetworking with @command{gawk}},
+See
+@uref{http://www.gnu.org/software/gawk/manual/gawkinet/,
+@cite{TCP/IP Internetworking with @command{gawk}}},
which comes as part of the @command{gawk} distribution,
@end ifnotinfo
for a much more complete introduction and discussion, as well as
@@ -25875,7 +25878,7 @@ As usual, the profiled version of the program is written to
@file{awkprof.out}, or to a different file if one specified with
the @option{--profile} option.
-Along with the regular profile, as shown earlier, the profile
+Along with the regular profile, as shown earlier, the profile file
includes a trace of any active functions:
@example
@@ -25982,6 +25985,8 @@ monetary values are printed and read.
@cindex internationalizing a program
@c STARTOFRANGE gettex
@cindex @code{gettext} library
+@command{gawk} uses GNU @code{gettext} to provide its internationalization
+features.
The facilities in GNU @code{gettext} focus on messages; strings printed
by a program, either directly or via formatting with @code{printf} or
@code{sprintf()}.@footnote{For some operating systems, the @command{gawk}
@@ -26192,7 +26197,7 @@ are candidates for translation at runtime.
String constants without a leading underscore are not translated.
@cindexgawkfunc{dcgettext}
-@item @code{dcgettext(@var{string}} [@code{,} @var{domain} [@code{,} @var{category} ]]@code{)}
+@item @code{dcgettext(@var{string}} [@code{,} @var{domain} [@code{,} @var{category}]]@code{)}
Return the translation of @var{string} in
text domain @var{domain} for locale category @var{category}.
The default value for @var{domain} is the current value of @code{TEXTDOMAIN}.
@@ -26218,7 +26223,7 @@ default arguments.
@end quotation
@cindexgawkfunc{dcngettext}
-@item @code{dcngettext(@var{string1}, @var{string2}, @var{number}} [@code{,} @var{domain} [@code{,} @var{category} ]]@code{)}
+@item @code{dcngettext(@var{string1}, @var{string2}, @var{number}} [@code{,} @var{domain} [@code{,} @var{category}]]@code{)}
Return the plural form used for @var{number} of the
translation of @var{string1} and @var{string2} in text domain
@var{domain} for locale category @var{category}. @var{string1} is the
@@ -26646,33 +26651,34 @@ msgstr "Like, the scoop is"
@cindex Linux
@cindex GNU/Linux
The next step is to make the directory to hold the binary message object
-file and then to create the @file{guide.gmo} file.
+file and then to create the @file{guide.mo} file.
+We pretend that our file is to be used in the @code{en_US.UTF-8} locale.
The directory layout shown here is standard for GNU @code{gettext} on
GNU/Linux systems. Other versions of @code{gettext} may use a different
layout:
@example
-$ @kbd{mkdir en_US en_US/LC_MESSAGES}
+$ @kbd{mkdir en_US.UTF-8 en_US.UTF-8/LC_MESSAGES}
@end example
-@cindex @code{.po} files, converting to @code{.gmo}
-@cindex files, @code{.po}, converting to @code{.gmo}
-@cindex @code{.gmo} files, converting from @code{.po}
-@cindex files, @code{.gmo}, converting from @code{.po}
+@cindex @code{.po} files, converting to @code{.mo}
+@cindex files, @code{.po}, converting to @code{.mo}
+@cindex @code{.mo} files, converting from @code{.po}
+@cindex files, @code{.mo}, converting from @code{.po}
@cindex portable object files, converting to message object files
@cindex files, portable object, converting to message object files
@cindex message object files, converting from portable object files
@cindex files, message object, converting from portable object files
@cindex @command{msgfmt} utility
The @command{msgfmt} utility does the conversion from human-readable
-@file{.po} file to machine-readable @file{.gmo} file.
+@file{.po} file to machine-readable @file{.mo} file.
By default, @command{msgfmt} creates a file named @file{messages}.
This file must be renamed and placed in the proper directory so that
@command{gawk} can find it:
@example
$ @kbd{msgfmt guide-mellow.po}
-$ @kbd{mv messages en_US/LC_MESSAGES/guide.gmo}
+$ @kbd{mv messages en_US.UTF-8/LC_MESSAGES/guide.mo}
@end example
Finally, we run the program to test it:
@@ -26744,7 +26750,7 @@ how to use @command{gawk} for debugging your program is easy.
@end menu
@node Debugging
-@section Introduction to @command{gawk} Debugger
+@section Introduction to The @command{gawk} Debugger
This @value{SECTION} introduces debugging in general and begins
the discussion of debugging in @command{gawk}.
@@ -27059,13 +27065,7 @@ This tells us that @command{gawk} is now ready to execute line 67, which
decides whether to give the lines the special ``field skipping'' treatment
indicated by the @option{-f} command-line option. (Notice that we skipped
from where we were before at line 64 to here, since the condition in line 64
-
-@example
-if (fcount == 0 && charcount == 0)
-@end example
-
-@noindent
-was false.)
+@samp{if (fcount == 0 && charcount == 0)} was false.)
Continuing to step, we now get to the splitting of the current and
last records:
@@ -27200,7 +27200,7 @@ In the following descriptions, commands which may be abbreviated
show the abbreviation on a second description line.
A debugger command name may also be truncated if that partial
name is unambiguous. The debugger has the built-in capability to
-automatically repeat the previous command when just hitting @key{Enter}.
+automatically repeat the previous command just by hitting @key{Enter}.
This works for the commands @code{list}, @code{next}, @code{nexti}, @code{step}, @code{stepi}
and @code{continue} executed without any argument.
@@ -27562,7 +27562,7 @@ No newline is printed unless one is specified.
@item @code{set} @var{var}@code{=}@var{value}
Assign a constant (number or string) value to an @command{awk} variable
or field.
-String values must be enclosed between double quotes (@code{"@dots{}"}).
+String values must be enclosed between double quotes (@code{"}@dots{}@code{"}).
You can also set special @command{awk} variables, such as @code{FS},
@code{NF}, @code{NR}, etc.
@@ -27637,10 +27637,11 @@ Then select and print the frame.
@cindex @code{f} debugger command (alias for @code{frame})
@item @code{frame} [@var{n}]
@itemx @code{f} [@var{n}]
-Select and print (frame number, function and argument names, source file,
-and the source line) stack frame @var{n}. Frame 0 is the currently executing,
-or @dfn{innermost}, frame (function call), frame 1 is the frame that called the
-innermost one. The highest numbered frame is the one for the main program.
+Select and print stack frame @var{n}. Frame 0 is the currently executing,
+or @dfn{innermost}, frame (function call), frame 1 is the frame that
+called the innermost one. The highest numbered frame is the one for the
+main program. The printed information consists of the frame number,
+function and argument names, source file, and the source line.
@cindex debugger commands, @code{up}
@cindex @code{up} debugger command
@@ -27940,9 +27941,11 @@ fairly self-explanatory, and using @code{stepi} and @code{nexti} while
@cindex command completion, in debugger
@cindex history expansion, in debugger
-If @command{gawk} is compiled with the @code{readline} library, you
-can take advantage of that library's command completion and history expansion
-features. The following types of completion are available:
+If @command{gawk} is compiled with
+@uref{http://cnswww.cns.cwru.edu/php/chet/readline/readline.html,
+the @code{readline} library}, you can take advantage of that library's
+command completion and history expansion features. The following types
+of completion are available:
@table @asis
@item Command completion
@@ -27992,9 +27995,10 @@ If you perused the dump of opcodes in @ref{Miscellaneous Debugger Commands},
you will realize that much of the internal manipulation of data
in @command{gawk}, as in many interpreters, is done on a stack.
@code{Op_push}, @code{Op_pop}, etc., are the ``bread and butter'' of
-most @command{gawk} code. Unfortunately, as of now, the @command{gawk}
-debugger does not allow you to examine the stack's contents.
+most @command{gawk} code.
+Unfortunately, as of now, the @command{gawk}
+debugger does not allow you to examine the stack's contents.
That is, the intermediate results of expression evaluation are on the
stack, but cannot be printed. Rather, only variables which are defined
in the program can be printed. Of course, a workaround for