aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--custom.h14
-rw-r--r--dfa.c420
-rw-r--r--dfa.h18
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info1032
-rw-r--r--doc/gawk.texi17
-rw-r--r--doc/gawktexi.in17
8 files changed, 808 insertions, 724 deletions
diff --git a/ChangeLog b/ChangeLog
index 1131b381..45125c1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-05-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * custom.h (_GL_PURE): Move definition to here. Sigh.
+ * dfa.h, dfa.c: Sync with GNU grep. Sigh.
+
+ Unrelated:
+
+ * custom.h: Remove stuff for Ultrix 4.3. No one has such
+ systems anymore; this just got missed earlier.
+
2014-05-11 Arnold D. Robbins <arnold@skeeve.com>
* debug.c (do_eval): Repair fix of 2014-05-09 and use
diff --git a/custom.h b/custom.h
index 36b4aa0b..efaa0f27 100644
--- a/custom.h
+++ b/custom.h
@@ -47,12 +47,6 @@
#define HAVE_MKTIME 1
#endif
-/* For ULTRIX 4.3 */
-#ifdef ultrix
-#define HAVE_MKTIME 1
-#define GETGROUPS_NOT_STANDARD 1
-#endif
-
/* For whiny users */
#ifdef USE_INCLUDED_STRFTIME
#undef HAVE_STRFTIME
@@ -76,3 +70,11 @@
extern int setenv(const char *name, const char *value, int rewrite);
extern int unsetenv(const char *name);
#endif
+
+/* Junk for dfa.[ch] */
+/* The __pure__ attribute was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
diff --git a/dfa.c b/dfa.c
index d306d5c9..c959ad4f 100644
--- a/dfa.c
+++ b/dfa.c
@@ -55,7 +55,6 @@
host does not conform to Posix. */
#define ISASCIIDIGIT(c) ((unsigned) (c) - '0' <= 9)
-/* gettext.h ensures that we don't use gettext if ENABLE_NLS is not defined */
#include "gettext.h"
#define _(str) gettext (str)
@@ -66,15 +65,6 @@
# include <wctype.h>
#endif
-#ifdef GAWK
-/* The __pure__ attribute was added in gcc 2.96. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
-#endif
-#endif /* GAWK */
-
#include "xalloc.h"
#include "dfa.h"
@@ -103,24 +93,29 @@ extern int gawk_mb_cur_max;
# undef clrbit
#endif
-/* Number of bits in an unsigned char. */
-#ifndef CHARBITS
-# define CHARBITS 8
-#endif
-
/* First integer value that is greater than any character code. */
-#define NOTCHAR (1 << CHARBITS)
+enum { NOTCHAR = 1 << CHAR_BIT };
-/* INTBITS need not be exact, just a lower bound. */
-#ifndef INTBITS
-# define INTBITS (CHARBITS * sizeof (int))
-#endif
+/* This represents part of a character class. It must be unsigned and
+ at least CHARCLASS_WORD_BITS wide. Any excess bits are zero. */
+typedef unsigned int charclass_word;
+
+/* The number of bits used in a charclass word. utf8_classes assumes
+ this is exactly 32. */
+enum { CHARCLASS_WORD_BITS = 32 };
-/* Number of ints required to hold a bit for every character. */
-#define CHARCLASS_INTS ((NOTCHAR + INTBITS - 1) / INTBITS)
+/* The maximum useful value of a charclass_word; all used bits are 1. */
+#define CHARCLASS_WORD_MASK \
+ (((charclass_word) 1 << (CHARCLASS_WORD_BITS - 1) << 1) - 1)
+
+/* Number of words required to hold a bit for every character. */
+enum
+{
+ CHARCLASS_WORDS = (NOTCHAR + CHARCLASS_WORD_BITS - 1) / CHARCLASS_WORD_BITS
+};
/* Sets of unsigned characters are stored as bit vectors in arrays of ints. */
-typedef unsigned int charclass[CHARCLASS_INTS];
+typedef charclass_word charclass[CHARCLASS_WORDS];
/* Convert a possibly-signed character to an unsigned character. This is
a bit safer than casting to unsigned char, since it catches some type
@@ -223,27 +218,25 @@ enum
a backtracking matcher. */
BEGLINE, /* BEGLINE is a terminal symbol that matches
- the empty string if it is at the beginning
- of a line. */
+ the empty string at the beginning of a
+ line. */
ENDLINE, /* ENDLINE is a terminal symbol that matches
- the empty string if it is at the end of
- a line. */
+ the empty string at the end of a line. */
BEGWORD, /* BEGWORD is a terminal symbol that matches
- the empty string if it is at the beginning
- of a word. */
+ the empty string at the beginning of a
+ word. */
ENDWORD, /* ENDWORD is a terminal symbol that matches
- the empty string if it is at the end of
- a word. */
+ the empty string at the end of a word. */
LIMWORD, /* LIMWORD is a terminal symbol that matches
- the empty string if it is at the beginning
- or the end of a word. */
+ the empty string at the beginning or the
+ end of a word. */
NOTLIMWORD, /* NOTLIMWORD is a terminal symbol that
- matches the empty string if it is not at
+ matches the empty string not at
the beginning or end of a word. */
QMARK, /* QMARK is an operator of one argument that
@@ -324,8 +317,8 @@ typedef struct
size_t hash; /* Hash of the positions of this state. */
position_set elems; /* Positions this state could match. */
unsigned char context; /* Context from previous state. */
- bool has_backref; /* True if this state matches a \<digit>. */
- bool has_mbcset; /* True if this state matches a MBCSET. */
+ bool has_backref; /* This state matches a \<digit>. */
+ bool has_mbcset; /* This state matches a MBCSET. */
unsigned short constraint; /* Constraint for this state to accept. */
token first_end; /* Token value of the first END in elems. */
position_set mbps; /* Positions which can match multibyte
@@ -377,7 +370,8 @@ struct dfa
size_t nleaves; /* Number of leaves on the parse tree. */
size_t nregexps; /* Count of parallel regexps being built
with dfaparse. */
- bool multibyte; /* True iff MB_CUR_MAX > 1. */
+ bool fast; /* The DFA is fast. */
+ bool multibyte; /* MB_CUR_MAX > 1. */
token utf8_anychar_classes[5]; /* To lower ANYCHAR in UTF-8 locales. */
mbstate_t mbs; /* Multibyte conversion state. */
@@ -404,9 +398,8 @@ struct dfa
#if MBS_SUPPORT
/* A table indexed by byte values that contains the corresponding wide
- character (if any) for that byte. WEOF means the byte is the
- leading byte of a multibyte character. Invalid and null bytes are
- mapped to themselves. */
+ character (if any) for that byte. WEOF means the byte is not a
+ valid single-byte character. */
wint_t mbrtowc_cache[NOTCHAR];
#endif
@@ -431,7 +424,7 @@ struct dfa
matching the given position in a string
matching the regexp. Allocated to the
maximum possible position index. */
- bool searchflag; /* True if we are supposed to build a searching
+ bool searchflag; /* We are supposed to build a searching
as opposed to an exact matcher. A searching
matcher finds the first and shortest string
matching a regexp anywhere in the buffer,
@@ -474,11 +467,10 @@ struct dfa
/* Some macros for user access to dfa internals. */
-/* ACCEPTING returns true if s could possibly be an accepting state of r. */
+/* S could possibly be an accepting state of R. */
#define ACCEPTING(s, r) ((r).states[s].constraint)
-/* ACCEPTS_IN_CONTEXT returns true if the given state accepts in the
- specified context. */
+/* STATE accepts in the specified context. */
#define ACCEPTS_IN_CONTEXT(prev, curr, state, dfa) \
SUCCEEDS_IN_CONTEXT ((dfa).states[state].constraint, prev, curr)
@@ -496,14 +488,7 @@ dfambcache (struct dfa *d)
unsigned char uc = i;
mbstate_t s = { 0 };
wchar_t wc;
- wint_t wi;
- switch (mbrtowc (&wc, &c, 1, &s))
- {
- default: wi = wc; break;
- case (size_t) -2: wi = WEOF; break;
- case (size_t) -1: wi = uc; break;
- }
- d->mbrtowc_cache[uc] = wi;
+ d->mbrtowc_cache[uc] = mbrtowc (&wc, &c, 1, &s) <= 1 ? wc : WEOF;
}
#endif
}
@@ -512,11 +497,12 @@ dfambcache (struct dfa *d)
/* Store into *PWC the result of converting the leading bytes of the
multibyte buffer S of length N bytes, using the mbrtowc_cache in *D
and updating the conversion state in *D. On conversion error,
- convert just a single byte as-is. Return the number of bytes
+ convert just a single byte, to WEOF. Return the number of bytes
converted.
This differs from mbrtowc (PWC, S, N, &D->mbs) as follows:
+ * PWC points to wint_t, not to wchar_t.
* The last arg is a dfa *D instead of merely a multibyte conversion
state D->mbs. D also contains an mbrtowc_cache for speed.
* N must be at least 1.
@@ -526,18 +512,21 @@ dfambcache (struct dfa *d)
* D->mbs is always valid afterwards.
* *PWC is always set to something. */
static size_t
-mbs_to_wchar (wchar_t *pwc, char const *s, size_t n, struct dfa *d)
+mbs_to_wchar (wint_t *pwc, char const *s, size_t n, struct dfa *d)
{
unsigned char uc = s[0];
wint_t wc = d->mbrtowc_cache[uc];
if (wc == WEOF)
{
- size_t nbytes = mbrtowc (pwc, s, n, &d->mbs);
+ wchar_t wch;
+ size_t nbytes = mbrtowc (&wch, s, n, &d->mbs);
if (0 < nbytes && nbytes < (size_t) -2)
- return nbytes;
+ {
+ *pwc = wch;
+ return nbytes;
+ }
memset (&d->mbs, 0, sizeof d->mbs);
- wc = uc;
}
*pwc = wc;
@@ -628,19 +617,20 @@ prtok (token t)
static bool
tstbit (unsigned int b, charclass const c)
{
- return c[b / INTBITS] >> b % INTBITS & 1;
+ return c[b / CHARCLASS_WORD_BITS] >> b % CHARCLASS_WORD_BITS & 1;
}
static void
setbit (unsigned int b, charclass c)
{
- c[b / INTBITS] |= 1U << b % INTBITS;
+ c[b / CHARCLASS_WORD_BITS] |= (charclass_word) 1 << b % CHARCLASS_WORD_BITS;
}
static void
clrbit (unsigned int b, charclass c)
{
- c[b / INTBITS] &= ~(1U << b % INTBITS);
+ c[b / CHARCLASS_WORD_BITS] &= ~((charclass_word) 1
+ << b % CHARCLASS_WORD_BITS);
}
static void
@@ -660,8 +650,8 @@ notset (charclass s)
{
int i;
- for (i = 0; i < CHARCLASS_INTS; ++i)
- s[i] = ~s[i];
+ for (i = 0; i < CHARCLASS_WORDS; ++i)
+ s[i] = CHARCLASS_WORD_MASK & ~s[i];
}
static bool
@@ -675,9 +665,9 @@ equal (charclass const s1, charclass const s2)
and return its new address. Although PTR may be null, the returned
value is never null.
- The array holds *NALLOC items; *NALLOC must be zero if PTR is null,
- and is updated on reallocation. ITEMSIZE is the size of one item.
- Avoid O(N**2) behavior on arrays growing linearly. */
+ The array holds *NALLOC items; *NALLOC is updated on reallocation.
+ ITEMSIZE is the size of one item. Avoid O(N**2) behavior on arrays
+ growing linearly. */
static void *
maybe_realloc (void *ptr, size_t nitems, size_t *nalloc, size_t itemsize)
{
@@ -740,7 +730,7 @@ static charclass newline;
# define is_valid_unibyte_character(c) (! (MBS_SUPPORT && btowc (c) == WEOF))
#endif
-/* Return non-zero if C is a "word-constituent" byte; zero otherwise. */
+/* C is a "word-constituent" byte. */
#define IS_WORD_CONSTITUENT(C) \
(is_valid_unibyte_character (C) && (isalnum (C) || (C) == '_'))
@@ -844,7 +834,7 @@ using_utf8 (void)
return utf8;
}
-/* Return true if the current locale is known to be a unibyte locale
+/* The current locale is known to be a unibyte locale
without multicharacter collating sequences and where range
comparisons simply use the native encoding. These locales can be
processed more efficiently. */
@@ -852,7 +842,7 @@ using_utf8 (void)
static bool
using_simple_locale (void)
{
- /* True if the native character set is known to be compatible with
+ /* The native character set is known to be compatible with
the C locale. The following test isn't perfect, but it's good
enough in practice, as only ASCII and EBCDIC are in common use
and this test correctly accepts ASCII and rejects EBCDIC. */
@@ -868,7 +858,7 @@ using_simple_locale (void)
&& '}' == 125 && '~' == 126)
};
- if (! native_c_charset || MB_CUR_MAX > 1)
+ if (! native_c_charset || dfa->multibyte)
return false;
else
{
@@ -892,20 +882,28 @@ using_simple_locale (void)
static char const *lexptr; /* Pointer to next input character. */
static size_t lexleft; /* Number of characters remaining. */
static token lasttok; /* Previous token returned; initially END. */
-static bool laststart; /* True if we're separated from beginning or (,
+static bool laststart; /* We're separated from beginning or (,
| only by zero-width characters. */
static size_t parens; /* Count of outstanding left parens. */
static int minrep, maxrep; /* Repeat counts for {m,n}. */
static int cur_mb_len = 1; /* Length of the multibyte representation of
wctok. */
-/* These variables are used only if (MB_CUR_MAX > 1). */
-static wchar_t wctok; /* Wide character representation of the current
- multibyte character. */
+
+static wint_t wctok; /* Wide character representation of the current
+ multibyte character, or WEOF if there was
+ an encoding error. Used only if
+ MB_CUR_MAX > 1. */
#if MBS_SUPPORT
-/* Note that characters become unsigned here. */
+/* Fetch the next lexical input character. Set C (of type int) to the
+ next input byte, except set C to EOF if the input is a multibyte
+ character of length greater than 1. Set WC (of type wint_t) to the
+ value of the input if it is a valid multibyte character (possibly
+ of length 1); otherwise set WC to WEOF. If there is no more input,
+ report EOFERR if EOFERR is not null, and return lasttok = END
+ otherwise. */
# define FETCH_WC(c, wc, eoferr) \
do { \
if (! lexleft) \
@@ -917,7 +915,7 @@ static wchar_t wctok; /* Wide character representation of the current
} \
else \
{ \
- wchar_t _wc; \
+ wint_t _wc; \
size_t nbytes = mbs_to_wchar (&_wc, lexptr, lexleft, dfa); \
cur_mb_len = nbytes; \
(wc) = _wc; \
@@ -1044,7 +1042,7 @@ parse_bracket_exp (void)
int c, c1, c2;
charclass ccl;
- /* True if this is a bracket expression that dfaexec is known to
+ /* This is a bracket expression that dfaexec is known to
process correctly. */
bool known_bracket_exp = true;
@@ -1095,7 +1093,7 @@ parse_bracket_exp (void)
colon_warning_state = (c == ':');
do
{
- c1 = EOF; /* mark c1 is not initialized". */
+ c1 = NOTCHAR; /* Mark c1 as not initialized. */
colon_warning_state &= ~2;
/* Note that if we're looking at some other [:...:] construct,
@@ -1104,13 +1102,13 @@ parse_bracket_exp (void)
dfa is ever called. */
if (c == '[')
{
-#define MAX_BRACKET_STRING_LEN 32
- char str[MAX_BRACKET_STRING_LEN + 1];
FETCH_WC (c1, wc1, _("unbalanced ["));
if ((c1 == ':' && (syntax_bits & RE_CHAR_CLASSES))
|| c1 == '.' || c1 == '=')
{
+ enum { MAX_BRACKET_STRING_LEN = 32 };
+ char str[MAX_BRACKET_STRING_LEN + 1];
size_t len = 0;
for (;;)
{
@@ -1173,7 +1171,7 @@ parse_bracket_exp (void)
if (c == '\\' && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS))
FETCH_WC (c, wc, _("unbalanced ["));
- if (c1 == EOF)
+ if (c1 == NOTCHAR)
FETCH_WC (c1, wc1, _("unbalanced ["));
if (c1 == '-')
@@ -1201,19 +1199,22 @@ parse_bracket_exp (void)
to the pair of ranges, [m-z] [M-Z]. Although this code
is wrong in multiple ways, it's never used in practice.
FIXME: Remove this (and related) unused code. */
- work_mbc->ranges
- = maybe_realloc (work_mbc->ranges, work_mbc->nranges + 2,
- &ranges_al, sizeof *work_mbc->ranges);
- work_mbc->ranges[work_mbc->nranges].beg
- = case_fold ? towlower (wc) : wc;
- work_mbc->ranges[work_mbc->nranges++].end
- = case_fold ? towlower (wc2) : wc2;
-
- if (case_fold && (iswalpha (wc) || iswalpha (wc2)))
+ if (wc != WEOF && wc2 != WEOF)
{
- work_mbc->ranges[work_mbc->nranges].beg = towupper (wc);
+ work_mbc->ranges
+ = maybe_realloc (work_mbc->ranges, work_mbc->nranges + 2,
+ &ranges_al, sizeof *work_mbc->ranges);
+ work_mbc->ranges[work_mbc->nranges].beg
+ = case_fold ? towlower (wc) : wc;
work_mbc->ranges[work_mbc->nranges++].end
- = towupper (wc2);
+ = case_fold ? towlower (wc2) : wc2;
+
+ if (case_fold && (iswalpha (wc) || iswalpha (wc2)))
+ {
+ work_mbc->ranges[work_mbc->nranges].beg = towupper (wc);
+ work_mbc->ranges[work_mbc->nranges++].end
+ = towupper (wc2);
+ }
}
}
else if (using_simple_locale ())
@@ -1257,22 +1258,23 @@ parse_bracket_exp (void)
continue;
}
- if (case_fold)
+ if (wc == WEOF)
+ known_bracket_exp = false;
+ else
{
- wchar_t folded[CASE_FOLDED_BUFSIZE];
- int i, n = case_folded_counterparts (wc, folded);
- work_mbc->chars = maybe_realloc (work_mbc->chars,
- work_mbc->nchars + n, &chars_al,
- sizeof *work_mbc->chars);
+ wchar_t folded[CASE_FOLDED_BUFSIZE + 1];
+ int i;
+ int n = (case_fold ? case_folded_counterparts (wc, folded + 1) + 1
+ : 1);
+ folded[0] = wc;
for (i = 0; i < n; i++)
if (!setbit_wc (folded[i], ccl))
- work_mbc->chars[work_mbc->nchars++] = folded[i];
- }
- if (!setbit_wc (wc, ccl))
- {
- work_mbc->chars = maybe_realloc (work_mbc->chars, work_mbc->nchars,
- &chars_al, sizeof *work_mbc->chars);
- work_mbc->chars[work_mbc->nchars++] = wc;
+ {
+ work_mbc->chars
+ = maybe_realloc (work_mbc->chars, work_mbc->nchars,
+ &chars_al, sizeof *work_mbc->chars);
+ work_mbc->chars[work_mbc->nchars++] = folded[i];
+ }
}
}
while ((wc = wc1, (c = c1) != ']'));
@@ -1305,7 +1307,7 @@ parse_bracket_exp (void)
static token
lex (void)
{
- unsigned int c, c2;
+ int c, c2;
bool backslash = false;
charclass ccl;
int i;
@@ -1319,8 +1321,6 @@ lex (void)
for (i = 0; i < 2; ++i)
{
FETCH_WC (c, wctok, NULL);
- if (c == (unsigned int) EOF)
- goto normal_char;
switch (c)
{
@@ -1660,8 +1660,12 @@ addtok_mb (token t, int mbprop)
--depth;
break;
+ case BACKREF:
+ dfa->fast = false;
+ /* fallthrough */
default:
++dfa->nleaves;
+ /* fallthrough */
case EMPTY:
++depth;
break;
@@ -1772,11 +1776,21 @@ add_utf8_anychar (void)
{
#if MBS_SUPPORT
static const charclass utf8_classes[5] = {
- {0, 0, 0, 0, ~0, ~0, 0, 0}, /* 80-bf: non-leading bytes */
- {~0, ~0, ~0, ~0, 0, 0, 0, 0}, /* 00-7f: 1-byte sequence */
- {0, 0, 0, 0, 0, 0, ~3, 0}, /* c2-df: 2-byte sequence */
- {0, 0, 0, 0, 0, 0, 0, 0xffff}, /* e0-ef: 3-byte sequence */
- {0, 0, 0, 0, 0, 0, 0, 0xff0000} /* f0-f7: 4-byte sequence */
+ /* 80-bf: non-leading bytes. */
+ {0, 0, 0, 0, CHARCLASS_WORD_MASK, CHARCLASS_WORD_MASK, 0, 0},
+
+ /* 00-7f: 1-byte sequence. */
+ {CHARCLASS_WORD_MASK, CHARCLASS_WORD_MASK, CHARCLASS_WORD_MASK,
+ CHARCLASS_WORD_MASK, 0, 0, 0, 0},
+
+ /* c2-df: 2-byte sequence. */
+ {0, 0, 0, 0, 0, 0, ~3 & CHARCLASS_WORD_MASK, 0},
+
+ /* e0-ef: 3-byte sequence. */
+ {0, 0, 0, 0, 0, 0, 0, 0xffff},
+
+ /* f0-f7: 4-byte sequence. */
+ {0, 0, 0, 0, 0, 0, 0, 0xff0000}
};
const unsigned int n = sizeof (utf8_classes) / sizeof (utf8_classes[0]);
unsigned int i;
@@ -1858,16 +1872,21 @@ atom (void)
{
if (MBS_SUPPORT && tok == WCHAR)
{
- addtok_wc (wctok);
-
- if (case_fold)
+ if (wctok == WEOF)
+ addtok (BACKREF);
+ else
{
- wchar_t folded[CASE_FOLDED_BUFSIZE];
- int i, n = case_folded_counterparts (wctok, folded);
- for (i = 0; i < n; i++)
+ addtok_wc (wctok);
+
+ if (case_fold)
{
- addtok_wc (folded[i]);
- addtok (OR);
+ wchar_t folded[CASE_FOLDED_BUFSIZE];
+ int i, n = case_folded_counterparts (wctok, folded);
+ for (i = 0; i < n; i++)
+ {
+ addtok_wc (folded[i]);
+ addtok (OR);
+ }
}
}
@@ -2213,13 +2232,11 @@ state_index (struct dfa *d, position_set const *s, int context)
constraint. Repeat exhaustively until no funny positions are left.
S->elems must be large enough to hold the result. */
static void
-epsclosure (position_set * s, struct dfa const *d)
+epsclosure (position_set *s, struct dfa const *d, char *visited)
{
size_t i, j;
position p, old;
-
- /* Array of booleans, large enough to use char, not int. */
- char *visited = xzalloc (d->tindex);
+ bool initialized = false;
for (i = 0; i < s->nelem; ++i)
if (d->tokens[s->elems[i].index] >= NOTCHAR
@@ -2230,6 +2247,11 @@ epsclosure (position_set * s, struct dfa const *d)
#endif
&& d->tokens[s->elems[i].index] < CSET)
{
+ if (!initialized)
+ {
+ memset (visited, 0, d->tindex * sizeof (*visited));
+ initialized = true;
+ }
old = s->elems[i];
p.constraint = old.constraint;
delete (s->elems[i], s);
@@ -2270,8 +2292,6 @@ epsclosure (position_set * s, struct dfa const *d)
/* Force rescan to start at the beginning. */
i = -1;
}
-
- free (visited);
}
/* Returns the set of contexts for which there is at least one
@@ -2286,7 +2306,7 @@ charclass_context (charclass c)
if (tstbit (eolbyte, c))
context |= CTX_NEWLINE;
- for (j = 0; j < CHARCLASS_INTS; ++j)
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
{
if (c[j] & letters[j])
context |= CTX_LETTER;
@@ -2398,6 +2418,7 @@ dfaanalyze (struct dfa *d, int searchflag)
int separate_contexts; /* Context wanted by some position. */
size_t i, j;
position *pos;
+ char *visited = xnmalloc (d->tindex, sizeof *visited);
#ifdef DEBUG
fprintf (stderr, "dfaanalyze:\n");
@@ -2438,6 +2459,7 @@ dfaanalyze (struct dfa *d, int searchflag)
merge (&tmp, &d->follows[pos[j].index], &merged);
copy (&merged, &d->follows[pos[j].index]);
}
+ /* fallthrough */
case QMARK:
/* A QMARK or STAR node is automatically nullable. */
@@ -2558,7 +2580,7 @@ dfaanalyze (struct dfa *d, int searchflag)
putc ('\n', stderr);
#endif
copy (&d->follows[i], &merged);
- epsclosure (&merged, d);
+ epsclosure (&merged, d, visited);
copy (&merged, &d->follows[i]);
}
@@ -2567,7 +2589,7 @@ dfaanalyze (struct dfa *d, int searchflag)
merged.nelem = 0;
for (i = 0; i < stk[-1].nfirstpos; ++i)
insert (firstpos[i], &merged);
- epsclosure (&merged, d);
+ epsclosure (&merged, d, visited);
/* Build the initial state. */
separate_contexts = state_separate_contexts (&merged);
@@ -2578,6 +2600,7 @@ dfaanalyze (struct dfa *d, int searchflag)
free (posalloc);
free (stkalloc);
free (merged.elems);
+ free (visited);
}
@@ -2619,11 +2642,11 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
size_t ngrps = 0; /* Number of groups actually used. */
position pos; /* Current position being considered. */
charclass matches; /* Set of matching characters. */
- unsigned int matchesf; /* Nonzero if matches is nonempty. */
+ charclass_word matchesf; /* Nonzero if matches is nonempty. */
charclass intersect; /* Intersection with some label set. */
- unsigned int intersectf; /* Nonzero if intersect is nonempty. */
+ charclass_word intersectf; /* Nonzero if intersect is nonempty. */
charclass leftovers; /* Stuff in the label that didn't match. */
- unsigned int leftoversf; /* Nonzero if leftovers is nonempty. */
+ charclass_word leftoversf; /* Nonzero if leftovers is nonempty. */
position_set follows; /* Union of the follows of some group. */
position_set tmp; /* Temporary space for merging sets. */
int possible_contexts; /* Contexts that this group can match. */
@@ -2631,7 +2654,7 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
state_num state; /* New state. */
state_num state_newline; /* New state on a newline transition. */
state_num state_letter; /* New state on a letter transition. */
- bool next_isnt_1st_byte = false; /* Flag if we can't add state0. */
+ bool next_isnt_1st_byte = false; /* We can't add state0. */
size_t i, j, k;
zeroset (matches);
@@ -2643,21 +2666,24 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
setbit (d->tokens[pos.index], matches);
else if (d->tokens[pos.index] >= CSET)
copyset (d->charclasses[d->tokens[pos.index] - CSET], matches);
- else if (MBS_SUPPORT
- && (d->tokens[pos.index] == ANYCHAR
- || d->tokens[pos.index] == MBCSET))
- /* MB_CUR_MAX > 1 */
+ else
{
- /* ANYCHAR and MBCSET must match with a single character, so we
- must put it to d->states[s].mbps, which contains the positions
- which can match with a single character not a byte. */
- if (d->states[s].mbps.nelem == 0)
- alloc_position_set (&d->states[s].mbps, 1);
- insert (pos, &(d->states[s].mbps));
+ if (MBS_SUPPORT
+ && (d->tokens[pos.index] == MBCSET
+ || d->tokens[pos.index] == ANYCHAR))
+ {
+ /* MB_CUR_MAX > 1 */
+ if (d->tokens[pos.index] == MBCSET)
+ d->states[s].has_mbcset = true;
+ /* ANYCHAR and MBCSET must match with a single character, so we
+ must put it to d->states[s].mbps, which contains the positions
+ which can match with a single character not a byte. */
+ if (d->states[s].mbps.nelem == 0)
+ alloc_position_set (&d->states[s].mbps, 1);
+ insert (pos, &(d->states[s].mbps));
+ }
continue;
}
- else
- continue;
/* Some characters may need to be eliminated from matches because
they fail in the current context. */
@@ -2665,21 +2691,21 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
{
if (!SUCCEEDS_IN_CONTEXT (pos.constraint,
d->states[s].context, CTX_NEWLINE))
- for (j = 0; j < CHARCLASS_INTS; ++j)
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
matches[j] &= ~newline[j];
if (!SUCCEEDS_IN_CONTEXT (pos.constraint,
d->states[s].context, CTX_LETTER))
- for (j = 0; j < CHARCLASS_INTS; ++j)
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
matches[j] &= ~letters[j];
if (!SUCCEEDS_IN_CONTEXT (pos.constraint,
d->states[s].context, CTX_NONE))
- for (j = 0; j < CHARCLASS_INTS; ++j)
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
matches[j] &= letters[j] | newline[j];
/* If there are no characters left, there's no point in going on. */
- for (j = 0; j < CHARCLASS_INTS && !matches[j]; ++j)
+ for (j = 0; j < CHARCLASS_WORDS && !matches[j]; ++j)
continue;
- if (j == CHARCLASS_INTS)
+ if (j == CHARCLASS_WORDS)
continue;
}
@@ -2695,17 +2721,17 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
/* Check if this group's label has a nonempty intersection with
matches. */
intersectf = 0;
- for (k = 0; k < CHARCLASS_INTS; ++k)
+ for (k = 0; k < CHARCLASS_WORDS; ++k)
intersectf |= intersect[k] = matches[k] & labels[j][k];
if (!intersectf)
continue;
/* It does; now find the set differences both ways. */
leftoversf = matchesf = 0;
- for (k = 0; k < CHARCLASS_INTS; ++k)
+ for (k = 0; k < CHARCLASS_WORDS; ++k)
{
/* Even an optimizing compiler can't know this for sure. */
- int match = matches[k], label = labels[j][k];
+ charclass_word match = matches[k], label = labels[j][k];
leftoversf |= leftovers[k] = ~match & label;
matchesf |= matches[k] = match & ~label;
@@ -2819,10 +2845,11 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
/* If we are building a searching matcher, throw in the positions
of state 0 as well. */
- if (d->searchflag
- && (!MBS_SUPPORT || (!d->multibyte || !next_isnt_1st_byte)))
- for (j = 0; j < d->states[0].elems.nelem; ++j)
- insert (d->states[0].elems.elems[j], &follows);
+ if (d->searchflag && (!d->multibyte || !next_isnt_1st_byte))
+ {
+ merge (&d->states[0].elems, &follows, &tmp);
+ copy (&tmp, &follows);
+ }
/* Find out if the new state will want any context information. */
possible_contexts = charclass_context (labels[i]);
@@ -2843,11 +2870,11 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
state_letter = state;
/* Set the transitions for each character in the current label. */
- for (j = 0; j < CHARCLASS_INTS; ++j)
- for (k = 0; k < INTBITS; ++k)
- if (labels[i][j] & 1U << k)
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
+ for (k = 0; k < CHARCLASS_WORD_BITS; ++k)
+ if (labels[i][j] >> k & 1)
{
- int c = j * INTBITS + k;
+ int c = j * CHARCLASS_WORD_BITS + k;
if (c == eolbyte)
trans[c] = state_newline;
@@ -3020,7 +3047,7 @@ transit_state_singlebyte (struct dfa *d, state_num s, unsigned char const *p,
match, in bytes. POS is the position of the ".". */
static int
match_anychar (struct dfa *d, state_num s, position pos,
- wchar_t wc, size_t mbclen)
+ wint_t wc, size_t mbclen)
{
int context;
@@ -3035,6 +3062,8 @@ match_anychar (struct dfa *d, state_num s, position pos,
if (syntax_bits & RE_DOT_NOT_NULL)
return 0;
}
+ else if (wc == WEOF)
+ return 0;
context = wchar_context (wc);
if (!SUCCEEDS_IN_CONTEXT (pos.constraint, d->states[s].context, context))
@@ -3048,7 +3077,7 @@ match_anychar (struct dfa *d, state_num s, position pos,
POS is the position of the bracket expression. */
static int
match_mb_charset (struct dfa *d, state_num s, position pos,
- char const *p, wchar_t wc, size_t match_len)
+ char const *p, wint_t wc, size_t match_len)
{
size_t i;
bool match; /* Matching succeeded. */
@@ -3071,6 +3100,8 @@ match_mb_charset (struct dfa *d, state_num s, position pos,
if (syntax_bits & RE_DOT_NOT_NULL)
return 0;
}
+ else if (wc == WEOF)
+ return 0;
context = wchar_context (wc);
if (!SUCCEEDS_IN_CONTEXT (pos.constraint, d->states[s].context, context))
@@ -3149,7 +3180,7 @@ charset_matched:
The caller MUST free the array which this function return. */
static int *
check_matching_with_multibyte_ops (struct dfa *d, state_num s,
- char const *p, wchar_t wc, size_t mbclen)
+ char const *p, wint_t wc, size_t mbclen)
{
size_t i;
int *rarray;
@@ -3184,7 +3215,7 @@ check_matching_with_multibyte_ops (struct dfa *d, state_num s,
static status_transit_state
transit_state_consume_1char (struct dfa *d, state_num s,
unsigned char const **pp,
- wchar_t wc, size_t mbclen,
+ wint_t wc, size_t mbclen,
int *match_lens)
{
size_t i, j;
@@ -3235,7 +3266,7 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
int *match_lens = NULL;
size_t nelem = d->states[s].mbps.nelem; /* Just a alias. */
unsigned char const *p1 = *pp;
- wchar_t wc;
+ wint_t wc;
if (nelem > 0)
/* This state has (a) multibyte operator(s).
@@ -3364,13 +3395,13 @@ dfaexec (struct dfa *d, char const *begin, char *end,
state must skip the bytes that are not a single
byte character nor the first byte of a multibyte
character. */
- wchar_t wc;
+ wint_t wc;
while (mbp < p)
mbp += mbs_to_wchar (&wc, (char const *) mbp,
end - (char const *) mbp, d);
p = mbp;
- if ((char *) p >= end)
+ if ((char *) p > end)
{
p = NULL;
goto done;
@@ -3477,24 +3508,16 @@ dfaexec (struct dfa *d, char const *begin, char *end,
return (char *) p;
}
-/* Search through a buffer looking for a potential match for D.
- Return the offset of the byte after the first potential match.
- If there is no match, return (size_t) -1. If D lacks a superset
- so it's not known whether there is a match, return (size_t) -2.
- BEGIN points to the beginning of the buffer, and END points to the
- first byte after its end. Store a sentinel byte (usually newline)
- in *END, so the actual buffer must be one byte longer. If COUNT is
- non-NULL, increment *COUNT once for each newline processed. */
-size_t
-dfahint (struct dfa *d, char const *begin, char *end, size_t *count)
+struct dfa *
+dfasuperset (struct dfa const *d)
{
- if (! d->superset)
- return -2;
- else
- {
- char const *match = dfaexec (d->superset, begin, end, 1, count, NULL);
- return match ? match - begin : -1;
- }
+ return d->superset;
+}
+
+bool
+dfaisfast (struct dfa const *d)
+{
+ return d->fast;
}
static void
@@ -3534,12 +3557,14 @@ dfainit (struct dfa *d)
{
memset (d, 0, sizeof *d);
d->multibyte = MB_CUR_MAX > 1;
+ d->fast = !d->multibyte;
}
static void
dfaoptimize (struct dfa *d)
{
size_t i;
+ bool have_backref = false;
if (!MBS_SUPPORT || !using_utf8 ())
return;
@@ -3551,6 +3576,9 @@ dfaoptimize (struct dfa *d)
case ANYCHAR:
/* Lowered. */
abort ();
+ case BACKREF:
+ have_backref = true;
+ break;
case MBCSET:
/* Requires multi-byte algorithm. */
return;
@@ -3559,12 +3587,20 @@ dfaoptimize (struct dfa *d)
}
}
+ if (!have_backref && d->superset)
+ {
+ /* The superset DFA is not likely to be much faster, so remove it. */
+ dfafree (d->superset);
+ free (d->superset);
+ d->superset = NULL;
+ }
+
free_mbdata (d);
d->multibyte = false;
}
static void
-dfasuperset (struct dfa *d)
+dfassbuild (struct dfa *d)
{
size_t i, j;
charclass ccl;
@@ -3616,8 +3652,11 @@ dfasuperset (struct dfa *d)
case NOTLIMWORD:
if (d->multibyte)
{
- /* Ignore these constraints. */
+ /* These constraints aren't supported in a multibyte locale.
+ Ignore them in the superset DFA, and treat them as
+ backreferences in the main DFA. */
sup->tokens[j++] = EMPTY;
+ d->tokens[i] = BACKREF;
break;
}
default:
@@ -3647,11 +3686,14 @@ dfacomp (char const *s, size_t len, struct dfa *d, int searchflag)
dfambcache (d);
dfaparse (s, len, d);
dfamust (d);
+ dfassbuild (d);
dfaoptimize (d);
- dfasuperset (d);
dfaanalyze (d, searchflag);
if (d->superset)
- dfaanalyze (d->superset, searchflag);
+ {
+ d->fast = true;
+ dfaanalyze (d->superset, searchflag);
+ }
}
/* Free the storage held by the components of a dfa. */
diff --git a/dfa.h b/dfa.h
index 15142362..4eb42968 100644
--- a/dfa.h
+++ b/dfa.h
@@ -75,16 +75,14 @@ extern void dfacomp (char const *, size_t, struct dfa *, int);
extern char *dfaexec (struct dfa *d, char const *begin, char *end,
int newline, size_t *count, int *backref);
-/* Search through a buffer looking for a potential match for D.
- Return the offset of the byte after the first potential match.
- If there is no match, return (size_t) -1. If D lacks a superset
- so it's not known whether there is a match, return (size_t) -2.
- BEGIN points to the beginning of the buffer, and END points to the
- first byte after its end. Store a sentinel byte (usually newline)
- in *END, so the actual buffer must be one byte longer. If COUNT is
- non-NULL, increment *COUNT once for each newline processed. */
-extern size_t dfahint (struct dfa *d, char const *begin, char *end,
- size_t *count);
+/* Return a superset for D. The superset matches everything that D
+ matches, along with some other strings (though the latter should be
+ rare, for efficiency reasons). Return a null pointer if no useful
+ superset is available. */
+extern struct dfa *dfasuperset (struct dfa const *d) _GL_ATTRIBUTE_PURE;
+
+/* The DFA is likely to be fast. */
+extern bool dfaisfast (struct dfa const *) _GL_ATTRIBUTE_PURE;
/* Free the storage held by the components of a struct dfa. */
extern void dfafree (struct dfa *);
diff --git a/doc/ChangeLog b/doc/ChangeLog
index b9909498..167bb9fe 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Fix real preface for docbook.
+
2014-05-13 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Complete formatting for FOR_PRINT and not FOR_PRINT.
diff --git a/doc/gawk.info b/doc/gawk.info
index 1824c649..4c824f32 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1300,12 +1300,6 @@ also must acknowledge my gratitude to G-d, for the many opportunities
He has sent my way, as well as for the gifts He has given me with which
to take advantage of those opportunities.
-
-Arnold Robbins
-Nof Ayalon
-ISRAEL
-May, 2014
-

File: gawk.info, Node: Getting Started, Next: Invoking Gawk, Prev: Preface, Up: Top
@@ -33227,518 +33221,518 @@ Ref: Manual History-Footnote-164040
Ref: Manual History-Footnote-264081
Node: How To Contribute64155
Node: Acknowledgments65394
-Node: Getting Started69588
-Node: Running gawk71967
-Node: One-shot73157
-Node: Read Terminal74382
-Ref: Read Terminal-Footnote-176032
-Ref: Read Terminal-Footnote-276308
-Node: Long76479
-Node: Executable Scripts77855
-Ref: Executable Scripts-Footnote-179688
-Ref: Executable Scripts-Footnote-279790
-Node: Comments80337
-Node: Quoting82804
-Node: DOS Quoting88120
-Node: Sample Data Files88795
-Node: Very Simple91310
-Node: Two Rules95960
-Node: More Complex97855
-Ref: More Complex-Footnote-1100787
-Node: Statements/Lines100872
-Ref: Statements/Lines-Footnote-1105327
-Node: Other Features105592
-Node: When106520
-Node: Invoking Gawk108668
-Node: Command Line110131
-Node: Options110914
-Ref: Options-Footnote-1126726
-Node: Other Arguments126751
-Node: Naming Standard Input129413
-Node: Environment Variables130507
-Node: AWKPATH Variable131065
-Ref: AWKPATH Variable-Footnote-1133843
-Ref: AWKPATH Variable-Footnote-2133888
-Node: AWKLIBPATH Variable134148
-Node: Other Environment Variables134907
-Node: Exit Status138562
-Node: Include Files139237
-Node: Loading Shared Libraries142815
-Node: Obsolete144198
-Node: Undocumented144895
-Node: Regexp145137
-Node: Regexp Usage146526
-Node: Escape Sequences148559
-Node: Regexp Operators154226
-Ref: Regexp Operators-Footnote-1161706
-Ref: Regexp Operators-Footnote-2161853
-Node: Bracket Expressions161951
-Ref: table-char-classes163841
-Node: GNU Regexp Operators166364
-Node: Case-sensitivity170087
-Ref: Case-sensitivity-Footnote-1172979
-Ref: Case-sensitivity-Footnote-2173214
-Node: Leftmost Longest173322
-Node: Computed Regexps174523
-Node: Reading Files177872
-Node: Records179874
-Node: awk split records180609
-Node: gawk split records185467
-Ref: gawk split records-Footnote-1189988
-Node: Fields190025
-Ref: Fields-Footnote-1192989
-Node: Nonconstant Fields193075
-Ref: Nonconstant Fields-Footnote-1195305
-Node: Changing Fields195507
-Node: Field Separators201461
-Node: Default Field Splitting204163
-Node: Regexp Field Splitting205280
-Node: Single Character Fields208621
-Node: Command Line Field Separator209680
-Node: Full Line Fields213022
-Ref: Full Line Fields-Footnote-1213530
-Node: Field Splitting Summary213576
-Ref: Field Splitting Summary-Footnote-1216675
-Node: Constant Size216776
-Node: Splitting By Content221383
-Ref: Splitting By Content-Footnote-1225133
-Node: Multiple Line225173
-Ref: Multiple Line-Footnote-1231029
-Node: Getline231208
-Node: Plain Getline233424
-Node: Getline/Variable235519
-Node: Getline/File236666
-Node: Getline/Variable/File238050
-Ref: Getline/Variable/File-Footnote-1239649
-Node: Getline/Pipe239736
-Node: Getline/Variable/Pipe242435
-Node: Getline/Coprocess243542
-Node: Getline/Variable/Coprocess244794
-Node: Getline Notes245531
-Node: Getline Summary248335
-Ref: table-getline-variants248743
-Node: Read Timeout249655
-Ref: Read Timeout-Footnote-1253482
-Node: Command line directories253540
-Node: Printing254422
-Node: Print256053
-Node: Print Examples257394
-Node: Output Separators260173
-Node: OFMT262189
-Node: Printf263547
-Node: Basic Printf264453
-Node: Control Letters265992
-Node: Format Modifiers269846
-Node: Printf Examples275873
-Node: Redirection278580
-Node: Special Files285552
-Node: Special FD286085
-Ref: Special FD-Footnote-1289709
-Node: Special Network289783
-Node: Special Caveats290633
-Node: Close Files And Pipes291429
-Ref: Close Files And Pipes-Footnote-1298567
-Ref: Close Files And Pipes-Footnote-2298715
-Node: Expressions298865
-Node: Values299997
-Node: Constants300673
-Node: Scalar Constants301353
-Ref: Scalar Constants-Footnote-1302212
-Node: Nondecimal-numbers302462
-Node: Regexp Constants305462
-Node: Using Constant Regexps305937
-Node: Variables309007
-Node: Using Variables309662
-Node: Assignment Options311386
-Node: Conversion313261
-Ref: table-locale-affects318697
-Ref: Conversion-Footnote-1319321
-Node: All Operators319430
-Node: Arithmetic Ops320060
-Node: Concatenation322565
-Ref: Concatenation-Footnote-1325361
-Node: Assignment Ops325481
-Ref: table-assign-ops330464
-Node: Increment Ops331781
-Node: Truth Values and Conditions335219
-Node: Truth Values336302
-Node: Typing and Comparison337351
-Node: Variable Typing338144
-Ref: Variable Typing-Footnote-1342044
-Node: Comparison Operators342166
-Ref: table-relational-ops342576
-Node: POSIX String Comparison346124
-Ref: POSIX String Comparison-Footnote-1347208
-Node: Boolean Ops347346
-Ref: Boolean Ops-Footnote-1351416
-Node: Conditional Exp351507
-Node: Function Calls353234
-Node: Precedence356992
-Node: Locales360661
-Node: Patterns and Actions362264
-Node: Pattern Overview363318
-Node: Regexp Patterns364995
-Node: Expression Patterns365538
-Node: Ranges369319
-Node: BEGIN/END372425
-Node: Using BEGIN/END373187
-Ref: Using BEGIN/END-Footnote-1375923
-Node: I/O And BEGIN/END376029
-Node: BEGINFILE/ENDFILE378314
-Node: Empty381250
-Node: Using Shell Variables381567
-Node: Action Overview383850
-Node: Statements386195
-Node: If Statement388049
-Node: While Statement389548
-Node: Do Statement391592
-Node: For Statement392748
-Node: Switch Statement395900
-Node: Break Statement398003
-Node: Continue Statement400058
-Node: Next Statement401851
-Node: Nextfile Statement404241
-Node: Exit Statement406896
-Node: Built-in Variables409298
-Node: User-modified410394
-Ref: User-modified-Footnote-1418079
-Node: Auto-set418141
-Ref: Auto-set-Footnote-1431043
-Ref: Auto-set-Footnote-2431248
-Node: ARGC and ARGV431304
-Node: Arrays435158
-Node: Array Basics436656
-Node: Array Intro437482
-Ref: figure-array-elements439455
-Node: Reference to Elements441862
-Node: Assigning Elements444135
-Node: Array Example444626
-Node: Scanning an Array446358
-Node: Controlling Scanning449373
-Ref: Controlling Scanning-Footnote-1454546
-Node: Delete454862
-Ref: Delete-Footnote-1457627
-Node: Numeric Array Subscripts457684
-Node: Uninitialized Subscripts459867
-Node: Multidimensional461492
-Node: Multiscanning464585
-Node: Arrays of Arrays466174
-Node: Functions470814
-Node: Built-in471633
-Node: Calling Built-in472711
-Node: Numeric Functions474699
-Ref: Numeric Functions-Footnote-1478533
-Ref: Numeric Functions-Footnote-2478890
-Ref: Numeric Functions-Footnote-3478938
-Node: String Functions479207
-Ref: String Functions-Footnote-1502218
-Ref: String Functions-Footnote-2502347
-Ref: String Functions-Footnote-3502595
-Node: Gory Details502682
-Ref: table-sub-escapes504351
-Ref: table-sub-posix-92505705
-Ref: table-sub-proposed507056
-Ref: table-posix-sub508410
-Ref: table-gensub-escapes509955
-Ref: Gory Details-Footnote-1511131
-Ref: Gory Details-Footnote-2511182
-Node: I/O Functions511333
-Ref: I/O Functions-Footnote-1518456
-Node: Time Functions518603
-Ref: Time Functions-Footnote-1529067
-Ref: Time Functions-Footnote-2529135
-Ref: Time Functions-Footnote-3529293
-Ref: Time Functions-Footnote-4529404
-Ref: Time Functions-Footnote-5529516
-Ref: Time Functions-Footnote-6529743
-Node: Bitwise Functions530009
-Ref: table-bitwise-ops530571
-Ref: Bitwise Functions-Footnote-1534816
-Node: Type Functions535000
-Node: I18N Functions536142
-Node: User-defined537787
-Node: Definition Syntax538591
-Ref: Definition Syntax-Footnote-1543506
-Node: Function Example543575
-Ref: Function Example-Footnote-1546219
-Node: Function Caveats546241
-Node: Calling A Function546759
-Node: Variable Scope547714
-Node: Pass By Value/Reference550702
-Node: Return Statement554210
-Node: Dynamic Typing557192
-Node: Indirect Calls558121
-Node: Library Functions567808
-Ref: Library Functions-Footnote-1571321
-Ref: Library Functions-Footnote-2571464
-Node: Library Names571635
-Ref: Library Names-Footnote-1575108
-Ref: Library Names-Footnote-2575328
-Node: General Functions575414
-Node: Strtonum Function576442
-Node: Assert Function579372
-Node: Round Function582698
-Node: Cliff Random Function584239
-Node: Ordinal Functions585255
-Ref: Ordinal Functions-Footnote-1588332
-Ref: Ordinal Functions-Footnote-2588584
-Node: Join Function588795
-Ref: Join Function-Footnote-1590566
-Node: Getlocaltime Function590766
-Node: Readfile Function594507
-Node: Data File Management596346
-Node: Filetrans Function596978
-Node: Rewind Function601047
-Node: File Checking602434
-Node: Empty Files603528
-Node: Ignoring Assigns605758
-Node: Getopt Function607312
-Ref: Getopt Function-Footnote-1618615
-Node: Passwd Functions618818
-Ref: Passwd Functions-Footnote-1627796
-Node: Group Functions627884
-Node: Walking Arrays635968
-Node: Sample Programs638104
-Node: Running Examples638778
-Node: Clones639506
-Node: Cut Program640730
-Node: Egrep Program650581
-Ref: Egrep Program-Footnote-1658354
-Node: Id Program658464
-Node: Split Program662113
-Ref: Split Program-Footnote-1665632
-Node: Tee Program665760
-Node: Uniq Program668563
-Node: Wc Program675992
-Ref: Wc Program-Footnote-1680258
-Ref: Wc Program-Footnote-2680458
-Node: Miscellaneous Programs680550
-Node: Dupword Program681738
-Node: Alarm Program683769
-Node: Translate Program688576
-Ref: Translate Program-Footnote-1692963
-Ref: Translate Program-Footnote-2693211
-Node: Labels Program693345
-Ref: Labels Program-Footnote-1696716
-Node: Word Sorting696800
-Node: History Sorting700684
-Node: Extract Program702523
-Ref: Extract Program-Footnote-1710026
-Node: Simple Sed710154
-Node: Igawk Program713216
-Ref: Igawk Program-Footnote-1728387
-Ref: Igawk Program-Footnote-2728588
-Node: Anagram Program728726
-Node: Signature Program731794
-Node: Advanced Features732894
-Node: Nondecimal Data734780
-Node: Array Sorting736363
-Node: Controlling Array Traversal737060
-Node: Array Sorting Functions745344
-Ref: Array Sorting Functions-Footnote-1749213
-Node: Two-way I/O749407
-Ref: Two-way I/O-Footnote-1754839
-Node: TCP/IP Networking754921
-Node: Profiling757765
-Node: Internationalization765268
-Node: I18N and L10N766693
-Node: Explaining gettext767379
-Ref: Explaining gettext-Footnote-1772447
-Ref: Explaining gettext-Footnote-2772631
-Node: Programmer i18n772796
-Node: Translator i18n777023
-Node: String Extraction777817
-Ref: String Extraction-Footnote-1778778
-Node: Printf Ordering778864
-Ref: Printf Ordering-Footnote-1781646
-Node: I18N Portability781710
-Ref: I18N Portability-Footnote-1784159
-Node: I18N Example784222
-Ref: I18N Example-Footnote-1786860
-Node: Gawk I18N786932
-Node: Debugger787553
-Node: Debugging788524
-Node: Debugging Concepts788957
-Node: Debugging Terms790813
-Node: Awk Debugging793410
-Node: Sample Debugging Session794302
-Node: Debugger Invocation794822
-Node: Finding The Bug796155
-Node: List of Debugger Commands802642
-Node: Breakpoint Control803976
-Node: Debugger Execution Control807640
-Node: Viewing And Changing Data811000
-Node: Execution Stack814356
-Node: Debugger Info815823
-Node: Miscellaneous Debugger Commands819817
-Node: Readline Support824995
-Node: Limitations825826
-Node: Arbitrary Precision Arithmetic828078
-Ref: Arbitrary Precision Arithmetic-Footnote-1829727
-Node: General Arithmetic829875
-Node: Floating Point Issues831595
-Node: String Conversion Precision832476
-Ref: String Conversion Precision-Footnote-1834181
-Node: Unexpected Results834290
-Node: POSIX Floating Point Problems836443
-Ref: POSIX Floating Point Problems-Footnote-1840268
-Node: Integer Programming840306
-Node: Floating-point Programming842045
-Ref: Floating-point Programming-Footnote-1848376
-Ref: Floating-point Programming-Footnote-2848646
-Node: Floating-point Representation848910
-Node: Floating-point Context850075
-Ref: table-ieee-formats850914
-Node: Rounding Mode852298
-Ref: table-rounding-modes852777
-Ref: Rounding Mode-Footnote-1855792
-Node: Gawk and MPFR855971
-Node: Arbitrary Precision Floats857380
-Ref: Arbitrary Precision Floats-Footnote-1859823
-Node: Setting Precision860139
-Ref: table-predefined-precision-strings860825
-Node: Setting Rounding Mode862970
-Ref: table-gawk-rounding-modes863374
-Node: Floating-point Constants864561
-Node: Changing Precision865990
-Ref: Changing Precision-Footnote-1867387
-Node: Exact Arithmetic867561
-Node: Arbitrary Precision Integers870699
-Ref: Arbitrary Precision Integers-Footnote-1873714
-Node: Dynamic Extensions873861
-Node: Extension Intro875319
-Node: Plugin License876584
-Node: Extension Mechanism Outline877269
-Ref: load-extension877686
-Ref: load-new-function879164
-Ref: call-new-function880159
-Node: Extension API Description882174
-Node: Extension API Functions Introduction883461
-Node: General Data Types888388
-Ref: General Data Types-Footnote-1894083
-Node: Requesting Values894382
-Ref: table-value-types-returned895119
-Node: Memory Allocation Functions896073
-Ref: Memory Allocation Functions-Footnote-1898819
-Node: Constructor Functions898915
-Node: Registration Functions900673
-Node: Extension Functions901358
-Node: Exit Callback Functions903660
-Node: Extension Version String904909
-Node: Input Parsers905559
-Node: Output Wrappers915316
-Node: Two-way processors919826
-Node: Printing Messages922034
-Ref: Printing Messages-Footnote-1923111
-Node: Updating `ERRNO'923263
-Node: Accessing Parameters924002
-Node: Symbol Table Access925232
-Node: Symbol table by name925746
-Node: Symbol table by cookie927722
-Ref: Symbol table by cookie-Footnote-1931854
-Node: Cached values931917
-Ref: Cached values-Footnote-1935407
-Node: Array Manipulation935498
-Ref: Array Manipulation-Footnote-1936596
-Node: Array Data Types936635
-Ref: Array Data Types-Footnote-1939338
-Node: Array Functions939430
-Node: Flattening Arrays943266
-Node: Creating Arrays950118
-Node: Extension API Variables954843
-Node: Extension Versioning955479
-Node: Extension API Informational Variables957380
-Node: Extension API Boilerplate958466
-Node: Finding Extensions962270
-Node: Extension Example962830
-Node: Internal File Description963560
-Node: Internal File Ops967651
-Ref: Internal File Ops-Footnote-1979160
-Node: Using Internal File Ops979300
-Ref: Using Internal File Ops-Footnote-1981647
-Node: Extension Samples981913
-Node: Extension Sample File Functions983437
-Node: Extension Sample Fnmatch991924
-Node: Extension Sample Fork993693
-Node: Extension Sample Inplace994906
-Node: Extension Sample Ord996684
-Node: Extension Sample Readdir997520
-Node: Extension Sample Revout999052
-Node: Extension Sample Rev2way999645
-Node: Extension Sample Read write array1000335
-Node: Extension Sample Readfile1002218
-Node: Extension Sample API Tests1003318
-Node: Extension Sample Time1003843
-Node: gawkextlib1005207
-Node: Language History1007988
-Node: V7/SVR3.11009581
-Node: SVR41011901
-Node: POSIX1013343
-Node: BTL1014729
-Node: POSIX/GNU1015463
-Node: Feature History1021062
-Node: Common Extensions1034038
-Node: Ranges and Locales1035350
-Ref: Ranges and Locales-Footnote-11039967
-Ref: Ranges and Locales-Footnote-21039994
-Ref: Ranges and Locales-Footnote-31040228
-Node: Contributors1040449
-Node: Installation1045830
-Node: Gawk Distribution1046724
-Node: Getting1047208
-Node: Extracting1048034
-Node: Distribution contents1049726
-Node: Unix Installation1055447
-Node: Quick Installation1056064
-Node: Additional Configuration Options1058510
-Node: Configuration Philosophy1060246
-Node: Non-Unix Installation1062600
-Node: PC Installation1063058
-Node: PC Binary Installation1064369
-Node: PC Compiling1066217
-Node: PC Testing1069177
-Node: PC Using1070353
-Node: Cygwin1074521
-Node: MSYS1075330
-Node: VMS Installation1075844
-Node: VMS Compilation1076640
-Ref: VMS Compilation-Footnote-11077892
-Node: VMS Dynamic Extensions1077950
-Node: VMS Installation Details1079323
-Node: VMS Running1081574
-Node: VMS GNV1084408
-Node: VMS Old Gawk1085131
-Node: Bugs1085601
-Node: Other Versions1089519
-Node: Notes1095603
-Node: Compatibility Mode1096403
-Node: Additions1097186
-Node: Accessing The Source1098113
-Node: Adding Code1099553
-Node: New Ports1105598
-Node: Derived Files1109733
-Ref: Derived Files-Footnote-11115054
-Ref: Derived Files-Footnote-21115088
-Ref: Derived Files-Footnote-31115688
-Node: Future Extensions1115786
-Node: Implementation Limitations1116369
-Node: Extension Design1117617
-Node: Old Extension Problems1118771
-Ref: Old Extension Problems-Footnote-11120279
-Node: Extension New Mechanism Goals1120336
-Ref: Extension New Mechanism Goals-Footnote-11123701
-Node: Extension Other Design Decisions1123887
-Node: Extension Future Growth1125993
-Node: Old Extension Mechanism1126829
-Node: Basic Concepts1128569
-Node: Basic High Level1129250
-Ref: figure-general-flow1129522
-Ref: figure-process-flow1130121
-Ref: Basic High Level-Footnote-11133350
-Node: Basic Data Typing1133535
-Node: Glossary1136890
-Node: Copying1162121
-Node: GNU Free Documentation License1199677
-Node: Index1224813
+Node: Getting Started69543
+Node: Running gawk71922
+Node: One-shot73112
+Node: Read Terminal74337
+Ref: Read Terminal-Footnote-175987
+Ref: Read Terminal-Footnote-276263
+Node: Long76434
+Node: Executable Scripts77810
+Ref: Executable Scripts-Footnote-179643
+Ref: Executable Scripts-Footnote-279745
+Node: Comments80292
+Node: Quoting82759
+Node: DOS Quoting88075
+Node: Sample Data Files88750
+Node: Very Simple91265
+Node: Two Rules95915
+Node: More Complex97810
+Ref: More Complex-Footnote-1100742
+Node: Statements/Lines100827
+Ref: Statements/Lines-Footnote-1105282
+Node: Other Features105547
+Node: When106475
+Node: Invoking Gawk108623
+Node: Command Line110086
+Node: Options110869
+Ref: Options-Footnote-1126681
+Node: Other Arguments126706
+Node: Naming Standard Input129368
+Node: Environment Variables130462
+Node: AWKPATH Variable131020
+Ref: AWKPATH Variable-Footnote-1133798
+Ref: AWKPATH Variable-Footnote-2133843
+Node: AWKLIBPATH Variable134103
+Node: Other Environment Variables134862
+Node: Exit Status138517
+Node: Include Files139192
+Node: Loading Shared Libraries142770
+Node: Obsolete144153
+Node: Undocumented144850
+Node: Regexp145092
+Node: Regexp Usage146481
+Node: Escape Sequences148514
+Node: Regexp Operators154181
+Ref: Regexp Operators-Footnote-1161661
+Ref: Regexp Operators-Footnote-2161808
+Node: Bracket Expressions161906
+Ref: table-char-classes163796
+Node: GNU Regexp Operators166319
+Node: Case-sensitivity170042
+Ref: Case-sensitivity-Footnote-1172934
+Ref: Case-sensitivity-Footnote-2173169
+Node: Leftmost Longest173277
+Node: Computed Regexps174478
+Node: Reading Files177827
+Node: Records179829
+Node: awk split records180564
+Node: gawk split records185422
+Ref: gawk split records-Footnote-1189943
+Node: Fields189980
+Ref: Fields-Footnote-1192944
+Node: Nonconstant Fields193030
+Ref: Nonconstant Fields-Footnote-1195260
+Node: Changing Fields195462
+Node: Field Separators201416
+Node: Default Field Splitting204118
+Node: Regexp Field Splitting205235
+Node: Single Character Fields208576
+Node: Command Line Field Separator209635
+Node: Full Line Fields212977
+Ref: Full Line Fields-Footnote-1213485
+Node: Field Splitting Summary213531
+Ref: Field Splitting Summary-Footnote-1216630
+Node: Constant Size216731
+Node: Splitting By Content221338
+Ref: Splitting By Content-Footnote-1225088
+Node: Multiple Line225128
+Ref: Multiple Line-Footnote-1230984
+Node: Getline231163
+Node: Plain Getline233379
+Node: Getline/Variable235474
+Node: Getline/File236621
+Node: Getline/Variable/File238005
+Ref: Getline/Variable/File-Footnote-1239604
+Node: Getline/Pipe239691
+Node: Getline/Variable/Pipe242390
+Node: Getline/Coprocess243497
+Node: Getline/Variable/Coprocess244749
+Node: Getline Notes245486
+Node: Getline Summary248290
+Ref: table-getline-variants248698
+Node: Read Timeout249610
+Ref: Read Timeout-Footnote-1253437
+Node: Command line directories253495
+Node: Printing254377
+Node: Print256008
+Node: Print Examples257349
+Node: Output Separators260128
+Node: OFMT262144
+Node: Printf263502
+Node: Basic Printf264408
+Node: Control Letters265947
+Node: Format Modifiers269801
+Node: Printf Examples275828
+Node: Redirection278535
+Node: Special Files285507
+Node: Special FD286040
+Ref: Special FD-Footnote-1289664
+Node: Special Network289738
+Node: Special Caveats290588
+Node: Close Files And Pipes291384
+Ref: Close Files And Pipes-Footnote-1298522
+Ref: Close Files And Pipes-Footnote-2298670
+Node: Expressions298820
+Node: Values299952
+Node: Constants300628
+Node: Scalar Constants301308
+Ref: Scalar Constants-Footnote-1302167
+Node: Nondecimal-numbers302417
+Node: Regexp Constants305417
+Node: Using Constant Regexps305892
+Node: Variables308962
+Node: Using Variables309617
+Node: Assignment Options311341
+Node: Conversion313216
+Ref: table-locale-affects318652
+Ref: Conversion-Footnote-1319276
+Node: All Operators319385
+Node: Arithmetic Ops320015
+Node: Concatenation322520
+Ref: Concatenation-Footnote-1325316
+Node: Assignment Ops325436
+Ref: table-assign-ops330419
+Node: Increment Ops331736
+Node: Truth Values and Conditions335174
+Node: Truth Values336257
+Node: Typing and Comparison337306
+Node: Variable Typing338099
+Ref: Variable Typing-Footnote-1341999
+Node: Comparison Operators342121
+Ref: table-relational-ops342531
+Node: POSIX String Comparison346079
+Ref: POSIX String Comparison-Footnote-1347163
+Node: Boolean Ops347301
+Ref: Boolean Ops-Footnote-1351371
+Node: Conditional Exp351462
+Node: Function Calls353189
+Node: Precedence356947
+Node: Locales360616
+Node: Patterns and Actions362219
+Node: Pattern Overview363273
+Node: Regexp Patterns364950
+Node: Expression Patterns365493
+Node: Ranges369274
+Node: BEGIN/END372380
+Node: Using BEGIN/END373142
+Ref: Using BEGIN/END-Footnote-1375878
+Node: I/O And BEGIN/END375984
+Node: BEGINFILE/ENDFILE378269
+Node: Empty381205
+Node: Using Shell Variables381522
+Node: Action Overview383805
+Node: Statements386150
+Node: If Statement388004
+Node: While Statement389503
+Node: Do Statement391547
+Node: For Statement392703
+Node: Switch Statement395855
+Node: Break Statement397958
+Node: Continue Statement400013
+Node: Next Statement401806
+Node: Nextfile Statement404196
+Node: Exit Statement406851
+Node: Built-in Variables409253
+Node: User-modified410349
+Ref: User-modified-Footnote-1418034
+Node: Auto-set418096
+Ref: Auto-set-Footnote-1430998
+Ref: Auto-set-Footnote-2431203
+Node: ARGC and ARGV431259
+Node: Arrays435113
+Node: Array Basics436611
+Node: Array Intro437437
+Ref: figure-array-elements439410
+Node: Reference to Elements441817
+Node: Assigning Elements444090
+Node: Array Example444581
+Node: Scanning an Array446313
+Node: Controlling Scanning449328
+Ref: Controlling Scanning-Footnote-1454501
+Node: Delete454817
+Ref: Delete-Footnote-1457582
+Node: Numeric Array Subscripts457639
+Node: Uninitialized Subscripts459822
+Node: Multidimensional461447
+Node: Multiscanning464540
+Node: Arrays of Arrays466129
+Node: Functions470769
+Node: Built-in471588
+Node: Calling Built-in472666
+Node: Numeric Functions474654
+Ref: Numeric Functions-Footnote-1478488
+Ref: Numeric Functions-Footnote-2478845
+Ref: Numeric Functions-Footnote-3478893
+Node: String Functions479162
+Ref: String Functions-Footnote-1502173
+Ref: String Functions-Footnote-2502302
+Ref: String Functions-Footnote-3502550
+Node: Gory Details502637
+Ref: table-sub-escapes504306
+Ref: table-sub-posix-92505660
+Ref: table-sub-proposed507011
+Ref: table-posix-sub508365
+Ref: table-gensub-escapes509910
+Ref: Gory Details-Footnote-1511086
+Ref: Gory Details-Footnote-2511137
+Node: I/O Functions511288
+Ref: I/O Functions-Footnote-1518411
+Node: Time Functions518558
+Ref: Time Functions-Footnote-1529022
+Ref: Time Functions-Footnote-2529090
+Ref: Time Functions-Footnote-3529248
+Ref: Time Functions-Footnote-4529359
+Ref: Time Functions-Footnote-5529471
+Ref: Time Functions-Footnote-6529698
+Node: Bitwise Functions529964
+Ref: table-bitwise-ops530526
+Ref: Bitwise Functions-Footnote-1534771
+Node: Type Functions534955
+Node: I18N Functions536097
+Node: User-defined537742
+Node: Definition Syntax538546
+Ref: Definition Syntax-Footnote-1543461
+Node: Function Example543530
+Ref: Function Example-Footnote-1546174
+Node: Function Caveats546196
+Node: Calling A Function546714
+Node: Variable Scope547669
+Node: Pass By Value/Reference550657
+Node: Return Statement554165
+Node: Dynamic Typing557147
+Node: Indirect Calls558076
+Node: Library Functions567763
+Ref: Library Functions-Footnote-1571276
+Ref: Library Functions-Footnote-2571419
+Node: Library Names571590
+Ref: Library Names-Footnote-1575063
+Ref: Library Names-Footnote-2575283
+Node: General Functions575369
+Node: Strtonum Function576397
+Node: Assert Function579327
+Node: Round Function582653
+Node: Cliff Random Function584194
+Node: Ordinal Functions585210
+Ref: Ordinal Functions-Footnote-1588287
+Ref: Ordinal Functions-Footnote-2588539
+Node: Join Function588750
+Ref: Join Function-Footnote-1590521
+Node: Getlocaltime Function590721
+Node: Readfile Function594462
+Node: Data File Management596301
+Node: Filetrans Function596933
+Node: Rewind Function601002
+Node: File Checking602389
+Node: Empty Files603483
+Node: Ignoring Assigns605713
+Node: Getopt Function607267
+Ref: Getopt Function-Footnote-1618570
+Node: Passwd Functions618773
+Ref: Passwd Functions-Footnote-1627751
+Node: Group Functions627839
+Node: Walking Arrays635923
+Node: Sample Programs638059
+Node: Running Examples638733
+Node: Clones639461
+Node: Cut Program640685
+Node: Egrep Program650536
+Ref: Egrep Program-Footnote-1658309
+Node: Id Program658419
+Node: Split Program662068
+Ref: Split Program-Footnote-1665587
+Node: Tee Program665715
+Node: Uniq Program668518
+Node: Wc Program675947
+Ref: Wc Program-Footnote-1680213
+Ref: Wc Program-Footnote-2680413
+Node: Miscellaneous Programs680505
+Node: Dupword Program681693
+Node: Alarm Program683724
+Node: Translate Program688531
+Ref: Translate Program-Footnote-1692918
+Ref: Translate Program-Footnote-2693166
+Node: Labels Program693300
+Ref: Labels Program-Footnote-1696671
+Node: Word Sorting696755
+Node: History Sorting700639
+Node: Extract Program702478
+Ref: Extract Program-Footnote-1709981
+Node: Simple Sed710109
+Node: Igawk Program713171
+Ref: Igawk Program-Footnote-1728342
+Ref: Igawk Program-Footnote-2728543
+Node: Anagram Program728681
+Node: Signature Program731749
+Node: Advanced Features732849
+Node: Nondecimal Data734735
+Node: Array Sorting736318
+Node: Controlling Array Traversal737015
+Node: Array Sorting Functions745299
+Ref: Array Sorting Functions-Footnote-1749168
+Node: Two-way I/O749362
+Ref: Two-way I/O-Footnote-1754794
+Node: TCP/IP Networking754876
+Node: Profiling757720
+Node: Internationalization765223
+Node: I18N and L10N766648
+Node: Explaining gettext767334
+Ref: Explaining gettext-Footnote-1772402
+Ref: Explaining gettext-Footnote-2772586
+Node: Programmer i18n772751
+Node: Translator i18n776978
+Node: String Extraction777772
+Ref: String Extraction-Footnote-1778733
+Node: Printf Ordering778819
+Ref: Printf Ordering-Footnote-1781601
+Node: I18N Portability781665
+Ref: I18N Portability-Footnote-1784114
+Node: I18N Example784177
+Ref: I18N Example-Footnote-1786815
+Node: Gawk I18N786887
+Node: Debugger787508
+Node: Debugging788479
+Node: Debugging Concepts788912
+Node: Debugging Terms790768
+Node: Awk Debugging793365
+Node: Sample Debugging Session794257
+Node: Debugger Invocation794777
+Node: Finding The Bug796110
+Node: List of Debugger Commands802597
+Node: Breakpoint Control803931
+Node: Debugger Execution Control807595
+Node: Viewing And Changing Data810955
+Node: Execution Stack814311
+Node: Debugger Info815778
+Node: Miscellaneous Debugger Commands819772
+Node: Readline Support824950
+Node: Limitations825781
+Node: Arbitrary Precision Arithmetic828033
+Ref: Arbitrary Precision Arithmetic-Footnote-1829682
+Node: General Arithmetic829830
+Node: Floating Point Issues831550
+Node: String Conversion Precision832431
+Ref: String Conversion Precision-Footnote-1834136
+Node: Unexpected Results834245
+Node: POSIX Floating Point Problems836398
+Ref: POSIX Floating Point Problems-Footnote-1840223
+Node: Integer Programming840261
+Node: Floating-point Programming842000
+Ref: Floating-point Programming-Footnote-1848331
+Ref: Floating-point Programming-Footnote-2848601
+Node: Floating-point Representation848865
+Node: Floating-point Context850030
+Ref: table-ieee-formats850869
+Node: Rounding Mode852253
+Ref: table-rounding-modes852732
+Ref: Rounding Mode-Footnote-1855747
+Node: Gawk and MPFR855926
+Node: Arbitrary Precision Floats857335
+Ref: Arbitrary Precision Floats-Footnote-1859778
+Node: Setting Precision860094
+Ref: table-predefined-precision-strings860780
+Node: Setting Rounding Mode862925
+Ref: table-gawk-rounding-modes863329
+Node: Floating-point Constants864516
+Node: Changing Precision865945
+Ref: Changing Precision-Footnote-1867342
+Node: Exact Arithmetic867516
+Node: Arbitrary Precision Integers870654
+Ref: Arbitrary Precision Integers-Footnote-1873669
+Node: Dynamic Extensions873816
+Node: Extension Intro875274
+Node: Plugin License876539
+Node: Extension Mechanism Outline877224
+Ref: load-extension877641
+Ref: load-new-function879119
+Ref: call-new-function880114
+Node: Extension API Description882129
+Node: Extension API Functions Introduction883416
+Node: General Data Types888343
+Ref: General Data Types-Footnote-1894038
+Node: Requesting Values894337
+Ref: table-value-types-returned895074
+Node: Memory Allocation Functions896028
+Ref: Memory Allocation Functions-Footnote-1898774
+Node: Constructor Functions898870
+Node: Registration Functions900628
+Node: Extension Functions901313
+Node: Exit Callback Functions903615
+Node: Extension Version String904864
+Node: Input Parsers905514
+Node: Output Wrappers915271
+Node: Two-way processors919781
+Node: Printing Messages921989
+Ref: Printing Messages-Footnote-1923066
+Node: Updating `ERRNO'923218
+Node: Accessing Parameters923957
+Node: Symbol Table Access925187
+Node: Symbol table by name925701
+Node: Symbol table by cookie927677
+Ref: Symbol table by cookie-Footnote-1931809
+Node: Cached values931872
+Ref: Cached values-Footnote-1935362
+Node: Array Manipulation935453
+Ref: Array Manipulation-Footnote-1936551
+Node: Array Data Types936590
+Ref: Array Data Types-Footnote-1939293
+Node: Array Functions939385
+Node: Flattening Arrays943221
+Node: Creating Arrays950073
+Node: Extension API Variables954798
+Node: Extension Versioning955434
+Node: Extension API Informational Variables957335
+Node: Extension API Boilerplate958421
+Node: Finding Extensions962225
+Node: Extension Example962785
+Node: Internal File Description963515
+Node: Internal File Ops967606
+Ref: Internal File Ops-Footnote-1979115
+Node: Using Internal File Ops979255
+Ref: Using Internal File Ops-Footnote-1981602
+Node: Extension Samples981868
+Node: Extension Sample File Functions983392
+Node: Extension Sample Fnmatch991879
+Node: Extension Sample Fork993648
+Node: Extension Sample Inplace994861
+Node: Extension Sample Ord996639
+Node: Extension Sample Readdir997475
+Node: Extension Sample Revout999007
+Node: Extension Sample Rev2way999600
+Node: Extension Sample Read write array1000290
+Node: Extension Sample Readfile1002173
+Node: Extension Sample API Tests1003273
+Node: Extension Sample Time1003798
+Node: gawkextlib1005162
+Node: Language History1007943
+Node: V7/SVR3.11009536
+Node: SVR41011856
+Node: POSIX1013298
+Node: BTL1014684
+Node: POSIX/GNU1015418
+Node: Feature History1021017
+Node: Common Extensions1033993
+Node: Ranges and Locales1035305
+Ref: Ranges and Locales-Footnote-11039922
+Ref: Ranges and Locales-Footnote-21039949
+Ref: Ranges and Locales-Footnote-31040183
+Node: Contributors1040404
+Node: Installation1045785
+Node: Gawk Distribution1046679
+Node: Getting1047163
+Node: Extracting1047989
+Node: Distribution contents1049681
+Node: Unix Installation1055402
+Node: Quick Installation1056019
+Node: Additional Configuration Options1058465
+Node: Configuration Philosophy1060201
+Node: Non-Unix Installation1062555
+Node: PC Installation1063013
+Node: PC Binary Installation1064324
+Node: PC Compiling1066172
+Node: PC Testing1069132
+Node: PC Using1070308
+Node: Cygwin1074476
+Node: MSYS1075285
+Node: VMS Installation1075799
+Node: VMS Compilation1076595
+Ref: VMS Compilation-Footnote-11077847
+Node: VMS Dynamic Extensions1077905
+Node: VMS Installation Details1079278
+Node: VMS Running1081529
+Node: VMS GNV1084363
+Node: VMS Old Gawk1085086
+Node: Bugs1085556
+Node: Other Versions1089474
+Node: Notes1095558
+Node: Compatibility Mode1096358
+Node: Additions1097141
+Node: Accessing The Source1098068
+Node: Adding Code1099508
+Node: New Ports1105553
+Node: Derived Files1109688
+Ref: Derived Files-Footnote-11115009
+Ref: Derived Files-Footnote-21115043
+Ref: Derived Files-Footnote-31115643
+Node: Future Extensions1115741
+Node: Implementation Limitations1116324
+Node: Extension Design1117572
+Node: Old Extension Problems1118726
+Ref: Old Extension Problems-Footnote-11120234
+Node: Extension New Mechanism Goals1120291
+Ref: Extension New Mechanism Goals-Footnote-11123656
+Node: Extension Other Design Decisions1123842
+Node: Extension Future Growth1125948
+Node: Old Extension Mechanism1126784
+Node: Basic Concepts1128524
+Node: Basic High Level1129205
+Ref: figure-general-flow1129477
+Ref: figure-process-flow1130076
+Ref: Basic High Level-Footnote-11133305
+Node: Basic Data Typing1133490
+Node: Glossary1136845
+Node: Copying1162076
+Node: GNU Free Documentation License1199632
+Node: Index1224768

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 10ddd235..9422f43b 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -1131,6 +1131,21 @@ March, 2001
@c
@c 12/2000: Chuck wants the preface & intro combined.
+@c This bit is post-processed by a script which turns the chapter
+@c tag into a preface tag, and moves this stuff to before the title.
+@c Bleah.
+@docbook
+ <prefaceinfo>
+ <author>
+ <firstname>Arnold</firstname>
+ <surname>Robbins</surname>
+ <affiliation><jobtitle>Nof Ayalon</jobtitle></affiliation>
+ <affiliation><jobtitle>ISRAEL</jobtitle></affiliation>
+ </author>
+ <date>June, 2014</date>
+ </prefaceinfo>
+@end docbook
+
Several kinds of tasks occur repeatedly
when working with text files.
You might want to extract certain lines and discard the rest.
@@ -2022,12 +2037,14 @@ which they raised and educated me.
Finally, I also must acknowledge my gratitude to G-d, for the many opportunities
He has sent my way, as well as for the gifts He has given me with which to
take advantage of those opportunities.
+@iftex
@sp 2
@noindent
Arnold Robbins @*
Nof Ayalon @*
ISRAEL @*
May, 2014
+@end iftex
@ifnotinfo
@part @value{PART1}The @command{awk} Language
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index d45cae06..2edeacc8 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -1126,6 +1126,21 @@ March, 2001
@c
@c 12/2000: Chuck wants the preface & intro combined.
+@c This bit is post-processed by a script which turns the chapter
+@c tag into a preface tag, and moves this stuff to before the title.
+@c Bleah.
+@docbook
+ <prefaceinfo>
+ <author>
+ <firstname>Arnold</firstname>
+ <surname>Robbins</surname>
+ <affiliation><jobtitle>Nof Ayalon</jobtitle></affiliation>
+ <affiliation><jobtitle>ISRAEL</jobtitle></affiliation>
+ </author>
+ <date>June, 2014</date>
+ </prefaceinfo>
+@end docbook
+
Several kinds of tasks occur repeatedly
when working with text files.
You might want to extract certain lines and discard the rest.
@@ -1989,12 +2004,14 @@ which they raised and educated me.
Finally, I also must acknowledge my gratitude to G-d, for the many opportunities
He has sent my way, as well as for the gifts He has given me with which to
take advantage of those opportunities.
+@iftex
@sp 2
@noindent
Arnold Robbins @*
Nof Ayalon @*
ISRAEL @*
May, 2014
+@end iftex
@ifnotinfo
@part @value{PART1}The @command{awk} Language