aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjohn haque <j.eh@mchsi.com>2011-08-21 05:54:38 -0500
committerjohn haque <j.eh@mchsi.com>2011-10-12 07:46:07 -0500
commitf0866c5197ee0c01fd1ded16e364cbe612c271be (patch)
treebece1471f69606eea216154b2d7a480cd90c0a20
parent1fea520248b42ca995c8797698c60301ea42ffe9 (diff)
downloadegawk-f0866c5197ee0c01fd1ded16e364cbe612c271be.tar.gz
egawk-f0866c5197ee0c01fd1ded16e364cbe612c271be.tar.bz2
egawk-f0866c5197ee0c01fd1ded16e364cbe612c271be.zip
Add a test file, cleanup code and update doc.
-rw-r--r--ChangeLog97
-rw-r--r--array.c7
-rw-r--r--awk.h22
-rw-r--r--awkgram.c11
-rw-r--r--awkgram.y11
-rw-r--r--builtin.c8
-rw-r--r--cint_array.c19
-rw-r--r--command.c9
-rw-r--r--command.y9
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info1294
-rw-r--r--doc/gawk.texi29
-rw-r--r--eval.c19
-rw-r--r--extension/ChangeLog4
-rw-r--r--field.c2
-rw-r--r--int_array.c35
-rw-r--r--main.c8
-rw-r--r--node.c115
-rw-r--r--symbol.h6
-rw-r--r--test/fnarray2.in1
20 files changed, 883 insertions, 827 deletions
diff --git a/ChangeLog b/ChangeLog
index 4edb164c..f8a285ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,103 @@
* dfa.c: Sync with GNU grep.
+2011-08-31 John Haque <j.eh@mchsi.com>
+
+ Grammar related changes: Simplify grammar for user-defined
+ functions and general cleanups.
+
+ * symbol.c: New file.
+ * awkgram.y: Move symbol table related routines to the
+ new file.
+ (rule, func_name, function_prologue, param_list): Reworked.
+ (install_function, check_params): Do all error checkings
+ for the function name and parameters before installing in
+ the symbol table.
+ (mk_function): Finalize function definition.
+ (func_install, append_param, dup_params): Nuked.
+ * symbol.c (make_params): allocate function parameter nodes
+ for the symbol table. Use the hash node as Node_param_list;
+ Saves a NODE for each parameter.
+ (install_params): Install function parameters into the symbol
+ table.
+ (remove_params): Remove parameters out of the symbol table.
+ * awk.h (parmlist, FUNC): Nuked.
+ (fparms): New define.
+
+
+ Dynamically loaded function parameters are now handled like
+ those for a builtin.
+
+ * awk.h (Node_ext_func, Op_ext_builtin): New types.
+ (Op_ext_func): Nuked.
+ * ext.c (make_builtin): Simplified.
+ (get_curfunc_arg_count): Nuked; Use the argument 'nargs' of
+ the extension function instead.
+ (get_argument, get_actual_argument): Adjust.
+ * eval.c (r_interpret): Update case Op_func_call for a dynamic
+ extension function. Handle the new opcode Op_ext_builtin.
+ * pprint (profile.c): Adjust.
+
+
+ Use a single variable to process gawk options.
+
+ * awk.h (do_flags): New variable.
+ (DO_LINT_INVALID, DO_LINT_ALL, DO_LINT_OLD, DO_TRADITIONAL,
+ DO_POSIX, DO_INTL, DO_NON_DEC_DATA, DO_INTERVALS,
+ DO_PROFILING, DO_DUMP_VARS, DO_TIDY_MEM,
+ DO_SANDBOX): New defines.
+ (do_traditional, do_posix, do_intervals, do_intl,
+ do_non_decimal_data, do_profiling, do_dump_vars,
+ do_tidy_mem, do_sandbox, do_lint,
+ do_lint_old): Defined as macros.
+ * main.c: Remove definitions of the do_XX variables. Add
+ do_flags definition.
+ * debug.c (execute_code, do_eval, parse_condition): Save
+ do_flags before executing/parsing and restore afterwards.
+
+
+ Nuke PERM flag. Always increment/decrement the reference
+ count for a Node_val. Simplifies macros and avoids
+ occassional memory leaks, specially in the debugger.
+
+ * awk.h (UPREF, DEREF, dupnode, unref): Simplified.
+ (mk_number): Nuked.
+ * (*.c): Increment the reference count of Nnull_string before
+ assigning as a value.
+
+
+ Revamped array handling mechanism for more speed and
+ less memory consumption.
+
+ * awk.h (union bucket_item, BUCKET): New definitions. Used as
+ bucket elements for the hash table implementations of arrays;
+ 40% space saving in 32 bit x86.
+ (buckets, nodes, array_funcs, array_base, array_capacity,
+ xarray, alookup, aexists, aclear, aremove, alist,
+ acopy, adump, NUM_AFUNCS): New defines.
+ (array_empty): New macro to test for an empty array.
+ (assoc_lookup, in_array): Defined as macros.
+ (enum assoc_list_flags): New declaration.
+ (Node_ahash, NUMIND): Nuked.
+ * eval.c (r_interpret): Adjust cases Op_subscript,
+ Op_subscript_lhs, Op_store_var and Op_arrayfor_incr.
+ * node.c (dupnode, unref): Removed code related to Node_ahash.
+ * str_array.c: New file to handle array with string indices.
+ * int_array.c: New file to handle array with integer indices.
+ * cint_array.c: New file. Special handling of arrays with
+ (mostly) consecutive integer indices.
+
+
+ Memory pool management reworked to handle NODE and BUCKET.
+
+ * awk.h (struct block_item, BLOCK, block_id): New definitions.
+ (getblock, freeblock): New macros.
+ (getbucket, freebucket): New macros to allocate and deallocate
+ a BUCKET.
+ (getnode, freenode): Adjusted.
+ * node.c (more_nodes): Nuked.
+ (more_blocks): New routine to allocate blocks of memory.
+
2011-08-24 Arnold D. Robbins <arnold@skeeve.com>
Fix pty co-process communication on Ubuntu GNU/Linux.
diff --git a/array.c b/array.c
index 91b87572..3ffc0dbb 100644
--- a/array.c
+++ b/array.c
@@ -48,10 +48,11 @@ static array_ptr *atypes[MAX_ATYPE];
static int num_atypes = 0;
/*
+ * register_array_func --- add routines to handle arrays.
+ *
* index 0 : initialization.
* index 1 : check if index is compatible.
* index 8 : array dump, memory and other statistics (do_adump).
- * Also used by debugger 'examine' command.
*/
@@ -69,6 +70,7 @@ register_array_func(array_ptr *afunc)
return FALSE;
}
+
/* array_init --- register all builtin array types */
void
@@ -79,6 +81,7 @@ array_init()
(void) register_array_func(cint_array_func);
}
+
/* make_array --- create an array node */
NODE *
@@ -438,7 +441,7 @@ concat_exp(int nargs, int do_subsep)
DEREF(r);
}
- return make_str_node(str, len);
+ return make_str_node(str, len, ALREADY_MALLOCED);
}
diff --git a/awk.h b/awk.h
index a942f8c7..f65426b7 100644
--- a/awk.h
+++ b/awk.h
@@ -418,13 +418,13 @@ typedef struct exp_node {
/* Node_hashnode, Node_param_list */
#define hnext sub.nodep.r.rptr
-#define hname vname
-#define hlength sub.nodep.reserved
+#define hname vname
+#define hlength sub.nodep.reserved
#define hcode sub.nodep.cnt
#define hvalue sub.nodep.x.extra
/* Node_param_list, Node_func */
-#define param_cnt sub.nodep.l.ll
+#define param_cnt sub.nodep.l.ll
/* Node_param_list */
#define param vname
@@ -437,13 +437,13 @@ typedef struct exp_node {
#define re_flags sub.nodep.reflags
#define re_text lnode
#define re_exp sub.nodep.x.extra
-#define re_cnt flags
+#define re_cnt flags
/* Node_val */
#define stptr sub.val.sp
#define stlen sub.val.slen
#define valref sub.val.sref
-#define stfmt sub.val.idx
+#define stfmt sub.val.idx
#define wstptr sub.val.wsp
#define wstlen sub.val.wslen
#define numbr sub.val.fltnum
@@ -1036,7 +1036,6 @@ extern int do_flags;
#define do_dump_vars (do_flags & DO_DUMP_VARS)
#define do_tidy_mem (do_flags & DO_TIDY_MEM)
#define do_sandbox (do_flags & DO_SANDBOX)
-#define do_annotate (do_flags & DO_ANNOTATE)
extern int do_optimize;
@@ -1181,8 +1180,11 @@ extern STACK_ITEM *stack_top;
#define getbucket(b) getblock(b, BLOCK_BUCKET, BUCKET *)
#define freebucket(b) freeblock(b, BLOCK_BUCKET)
-#define make_string(s, l) r_make_str_node((s), (size_t) (l), FALSE)
-#define make_str_node(s, l) r_make_str_node((s), (size_t) (l), TRUE)
+#define make_string(s, l) r_make_str_node((s), (l), 0)
+#define make_str_node(s, l, f) r_make_str_node((s), (l), (f))
+
+#define SCAN 1
+#define ALREADY_MALLOCED 2
#define cant_happen() r_fatal("internal error line %d, file: %s", \
__LINE__, __FILE__)
@@ -1279,6 +1281,7 @@ extern NODE *get_array(NODE *symbol, int canfatal);
extern const char *make_aname(const NODE *symbol);
extern const char *array_vname(const NODE *symbol);
extern void array_init(void);
+extern int register_array_func(array_ptr *afunc);
extern void set_SUBSEP(void);
extern NODE *concat_exp(int nargs, int do_subsep);
extern void assoc_clear(NODE *symbol);
@@ -1481,11 +1484,10 @@ extern AWKNUM r_force_number(NODE *n);
extern NODE *format_val(const char *format, int index, NODE *s);
extern NODE *r_dupnode(NODE *n);
extern NODE *make_number(AWKNUM x);
-extern NODE *r_make_str_node(const char *s, size_t len, int already_malloced);
+extern NODE *r_make_str_node(const char *s, size_t len, int flags);
extern void *more_blocks(int id);
extern void r_unref(NODE *tmp);
extern int parse_escape(const char **string_ptr);
-extern size_t scan_escape(char *s, size_t len);
#if MBS_SUPPORT
extern NODE *str2wstr(NODE *n, size_t **ptr);
extern NODE *wstr2str(NODE *n);
diff --git a/awkgram.c b/awkgram.c
index ba9a9042..b9e30020 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -2330,7 +2330,7 @@ yyreduce:
_("regexp constant `/%s/' looks like a C comment, but is not"), re);
}
- exp = make_str_node(re, len);
+ exp = make_str_node(re, len, ALREADY_MALLOCED);
n = make_regnode(Node_regex, exp);
if (n == NULL) {
unref(exp);
@@ -5438,7 +5438,6 @@ yylex(void)
int mid;
static int did_newline = FALSE;
char *tokkey;
- size_t toklen;
int inhex = FALSE;
int intlstr = FALSE;
AWKNUM d;
@@ -5873,16 +5872,14 @@ retry:
tokadd(c);
}
yylval = GET_INSTRUCTION(Op_token);
- toklen = tok - tokstart;
if (want_source) {
- yylval->lextok = estrdup(tokstart, toklen);
+ yylval->lextok = estrdup(tokstart, tok - tokstart);
return lasttok = FILENAME;
}
yylval->opcode = Op_push_i;
- if (esc_seen)
- toklen = scan_escape(tokstart, toklen);
- yylval->memory = make_string(tokstart, toklen);
+ yylval->memory = make_str_node(tokstart,
+ tok - tokstart, esc_seen ? SCAN : 0);
if (intlstr) {
yylval->memory->flags |= INTLSTR;
intlstr = FALSE;
diff --git a/awkgram.y b/awkgram.y
index e2725a90..2157d3e8 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -392,7 +392,7 @@ regexp
_("regexp constant `/%s/' looks like a C comment, but is not"), re);
}
- exp = make_str_node(re, len);
+ exp = make_str_node(re, len, ALREADY_MALLOCED);
n = make_regnode(Node_regex, exp);
if (n == NULL) {
unref(exp);
@@ -2741,7 +2741,6 @@ yylex(void)
int mid;
static int did_newline = FALSE;
char *tokkey;
- size_t toklen;
int inhex = FALSE;
int intlstr = FALSE;
AWKNUM d;
@@ -3176,16 +3175,14 @@ retry:
tokadd(c);
}
yylval = GET_INSTRUCTION(Op_token);
- toklen = tok - tokstart;
if (want_source) {
- yylval->lextok = estrdup(tokstart, toklen);
+ yylval->lextok = estrdup(tokstart, tok - tokstart);
return lasttok = FILENAME;
}
yylval->opcode = Op_push_i;
- if (esc_seen)
- toklen = scan_escape(tokstart, toklen);
- yylval->memory = make_string(tokstart, toklen);
+ yylval->memory = make_str_node(tokstart,
+ tok - tokstart, esc_seen ? SCAN : 0);
if (intlstr) {
yylval->memory->flags |= INTLSTR;
intlstr = FALSE;
diff --git a/builtin.c b/builtin.c
index f5aa503d..bf688581 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1348,7 +1348,7 @@ out2:
_("too many arguments supplied for format string"));
}
bchunk(s0, s1 - s0);
- r = make_str_node(obuf, obufout - obuf);
+ r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED);
obuf = NULL;
out:
{
@@ -1612,7 +1612,7 @@ do_substr(int nargs)
wp++;
}
*cp = '\0';
- r = make_str_node(substr, cp - substr);
+ r = make_str_node(substr, cp - substr, ALREADY_MALLOCED);
}
#else
r = make_string(t1->stptr + indx, length);
@@ -2724,7 +2724,7 @@ done:
if (matches > 0) {
/* return the result string */
DEREF(t);
- return make_str_node(buf, textlen);
+ return make_str_node(buf, textlen, ALREADY_MALLOCED);
}
/* return the original string */
@@ -2736,7 +2736,7 @@ done:
DEREF(t);
else if (matches > 0) {
unref(*lhs);
- *lhs = make_str_node(buf, textlen);
+ *lhs = make_str_node(buf, textlen, ALREADY_MALLOCED);
}
return make_number((AWKNUM) matches);
diff --git a/cint_array.c b/cint_array.c
index e7eb09fb..72cd7370 100644
--- a/cint_array.c
+++ b/cint_array.c
@@ -464,17 +464,19 @@ cint_dump(NODE *symbol, NODE *ndump)
NODE *tn, *xn = NULL;
int indent_level;
size_t i;
- long cint_size = 0, int_size = 0;
+ long cint_size = 0, xsize = 0;
AWKNUM kb = 0;
extern AWKNUM int_kilobytes(NODE *symbol);
+ extern AWKNUM str_kilobytes(NODE *symbol);
+ extern array_ptr int_array_func[];
indent_level = ndump->alevel;
if (symbol->xarray != NULL) {
xn = symbol->xarray;
- int_size = xn->table_size; /* FIXME -- can be int_array or str_array */
+ xsize = xn->table_size;
}
- cint_size = symbol->table_size - int_size;
+ cint_size = symbol->table_size - xsize;
if ((symbol->flags & XARRAY) == 0)
fprintf(output_fp, "%s `%s'\n",
@@ -493,7 +495,7 @@ cint_dump(NODE *symbol, NODE *ndump)
fprintf(output_fp, "THRESHOLD: %ld\n", THRESHOLD);
indent(indent_level);
fprintf(output_fp, "table_size: %ld (total), %ld (cint), %ld (int + str)\n",
- symbol->table_size, cint_size, int_size);
+ symbol->table_size, cint_size, xsize);
indent(indent_level);
fprintf(output_fp, "array_capacity: %lu\n", (unsigned long) symbol->array_capacity);
indent(indent_level);
@@ -508,8 +510,13 @@ cint_dump(NODE *symbol, NODE *ndump)
}
kb += (INT32_BIT * sizeof(NODE *)) / 1024.0; /* symbol->nodes */
kb += (symbol->array_capacity * sizeof(NODE *)) / 1024.0; /* value nodes in Node_array_leaf(s) */
- if (xn != NULL)
- kb += int_kilobytes(xn); /* FIXME: can be str_array or int_array ? */
+ if (xn != NULL) {
+ if (xn->array_funcs == int_array_func)
+ kb += int_kilobytes(xn);
+ else
+ kb += str_kilobytes(xn);
+ }
+
indent(indent_level);
fprintf(output_fp, "memory: %.2g kB (total)\n", kb);
diff --git a/command.c b/command.c
index b705d5e0..c3fea2b8 100644
--- a/command.c
+++ b/command.c
@@ -3177,6 +3177,7 @@ again:
if (c == '"') {
char *str, *p;
+ int flags = ALREADY_MALLOCED;
int esc_seen = FALSE;
toklen = lexend - lexptr;
@@ -3209,12 +3210,10 @@ err:
append_cmdarg(yylval);
return D_STRING;
} else { /* awk string */
- size_t len;
- len = p - str;
if (esc_seen)
- len = scan_escape(str, len);
+ flags |= SCAN;
yylval = mk_cmdarg(D_node);
- yylval->a_node = make_str_node(str, len);
+ yylval->a_node = make_str_node(str, p - str, flags);
append_cmdarg(yylval);
return D_NODE;
}
@@ -3364,7 +3363,7 @@ concat_args(CMDARG *arg, int count)
}
str[len] = '\0';
efree(tmp);
- return make_str_node(str, len);
+ return make_str_node(str, len, ALREADY_MALLOCED);
}
/* find_command --- find the index in 'cmdtab' using exact,
diff --git a/command.y b/command.y
index d2a61a0d..18ef0613 100644
--- a/command.y
+++ b/command.y
@@ -1163,6 +1163,7 @@ again:
if (c == '"') {
char *str, *p;
+ int flags = ALREADY_MALLOCED;
int esc_seen = FALSE;
toklen = lexend - lexptr;
@@ -1195,12 +1196,10 @@ err:
append_cmdarg(yylval);
return D_STRING;
} else { /* awk string */
- size_t len;
- len = p - str;
if (esc_seen)
- len = scan_escape(str, len);
+ flags |= SCAN;
yylval = mk_cmdarg(D_node);
- yylval->a_node = make_str_node(str, len);
+ yylval->a_node = make_str_node(str, p - str, flags);
append_cmdarg(yylval);
return D_NODE;
}
@@ -1350,7 +1349,7 @@ concat_args(CMDARG *arg, int count)
}
str[len] = '\0';
efree(tmp);
- return make_str_node(str, len);
+ return make_str_node(str, len, ALREADY_MALLOCED);
}
/* find_command --- find the index in 'cmdtab' using exact,
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 53ab79a9..aa365d70 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -4,6 +4,10 @@
Jeroen Schot <schot@A-Eskwadraat.nl>.
* gawk.texi: Some minor fixes.
+2011-08-31 John Haque <j.eh@mchsi.com>
+
+ * gawk.texi: Updated gawk dynamic extension doc.
+
2011-07-28 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi (Gory Details): Restore text on historical behavior
diff --git a/doc/gawk.info b/doc/gawk.info
index 13245683..619faffa 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -1,4 +1,4 @@
-This is gawk.info, produced by makeinfo version 4.13 from gawk.texi.
+This is gawk.info, produced by makeinfo version 4.8 from gawk.texi.
INFO-DIR-SECTION Text creation and manipulation
START-INFO-DIR-ENTRY
@@ -781,7 +781,7 @@ A Rose by Any Other Name
========================
The `awk' language has evolved over the years. Full details are
-provided in *note Language History::. The language described in this
+provided in *Note Language History::. The language described in this
Info file is often referred to as "new `awk'" (`nawk').
Because of this, there are systems with multiple versions of `awk'.
@@ -842,78 +842,78 @@ illustrates the concept currently being described.
While this Info file is aimed principally at people who have not been
exposed to `awk', there is a lot of information here that even the `awk'
expert should find useful. In particular, the description of POSIX
-`awk' and the example programs in *note Library Functions::, and in
-*note Sample Programs::, should be of interest.
+`awk' and the example programs in *Note Library Functions::, and in
+*Note Sample Programs::, should be of interest.
- *note Getting Started::, provides the essentials you need to know to
+ *Note Getting Started::, provides the essentials you need to know to
begin using `awk'.
- *note Invoking Gawk::, describes how to run `gawk', the meaning of
+ *Note Invoking Gawk::, describes how to run `gawk', the meaning of
its command-line options, and how it finds `awk' program source files.
- *note Regexp::, introduces regular expressions in general, and in
+ *Note Regexp::, introduces regular expressions in general, and in
particular the flavors supported by POSIX `awk' and `gawk'.
- *note Reading Files::, describes how `awk' reads your data. It
+ *Note Reading Files::, describes how `awk' reads your data. It
introduces the concepts of records and fields, as well as the `getline'
command. I/O redirection is first described here. Network I/O is also
briefly introduced here.
- *note Printing::, describes how `awk' programs can produce output
+ *Note Printing::, describes how `awk' programs can produce output
with `print' and `printf'.
- *note Expressions::, describes expressions, which are the basic
+ *Note Expressions::, describes expressions, which are the basic
building blocks for getting most things done in a program.
- *note Patterns and Actions::, describes how to write patterns for
+ *Note Patterns and Actions::, describes how to write patterns for
matching records, actions for doing something when a record is matched,
and the built-in variables `awk' and `gawk' use.
- *note Arrays::, covers `awk''s one-and-only data structure:
+ *Note Arrays::, covers `awk''s one-and-only data structure:
associative arrays. Deleting array elements and whole arrays is also
described, as well as sorting arrays in `gawk'. It also describes how
`gawk' provides arrays of arrays.
- *note Functions::, describes the built-in functions `awk' and `gawk'
+ *Note Functions::, describes the built-in functions `awk' and `gawk'
provide, as well as how to define your own functions.
- *note Internationalization::, describes special features in `gawk'
+ *Note Internationalization::, describes special features in `gawk'
for translating program messages into different languages at runtime.
- *note Advanced Features::, describes a number of `gawk'-specific
+ *Note Advanced Features::, describes a number of `gawk'-specific
advanced features. Of particular note are the abilities to have
two-way communications with another process, perform TCP/IP networking,
and profile your `awk' programs.
- *note Library Functions::, and *note Sample Programs::, provide many
+ *Note Library Functions::, and *Note Sample Programs::, provide many
sample `awk' programs. Reading them allows you to see `awk' solving
real problems.
- *note Debugger::, describes the `awk' debugger, `dgawk'.
+ *Note Debugger::, describes the `awk' debugger, `dgawk'.
- *note Language History::, describes how the `awk' language has
+ *Note Language History::, describes how the `awk' language has
evolved since its first release to present. It also describes how
`gawk' has acquired features over time.
- *note Installation::, describes how to get `gawk', how to compile it
+ *Note Installation::, describes how to get `gawk', how to compile it
on POSIX-compatible systems, and how to compile and use it on different
non-POSIX systems. It also describes how to report bugs in `gawk' and
where to get other freely available `awk' implementations.
- *note Notes::, describes how to disable `gawk''s extensions, as well
+ *Note Notes::, describes how to disable `gawk''s extensions, as well
as how to contribute new code to `gawk', how to write extension
libraries, and some possible future directions for `gawk' development.
- *note Basic Concepts::, provides some very cursory background
+ *Note Basic Concepts::, provides some very cursory background
material for those who are completely unfamiliar with computer
programming. Also centralized there is a discussion of some of the
issues surrounding floating-point numbers.
- The *note Glossary::, defines most, if not all, the significant
+ The *Note Glossary::, defines most, if not all, the significant
terms used throughout the book. If you find terms that you aren't
familiar with, try looking them up here.
- *note Copying::, and *note GNU Free Documentation License::, present
+ *Note Copying::, and *Note GNU Free Documentation License::, present
the licenses that cover the `gawk' source code and this Info file,
respectively.
@@ -1029,7 +1029,7 @@ Guide'.
This edition maintains the basic structure of the previous editions.
For Edition 4.0, the content has been thoroughly reviewed and updated.
All references to versions prior to 4.0 have been removed. Of
-significant note for this edition is *note Debugger::.
+significant note for this edition is *Note Debugger::.
`GAWK: Effective AWK Programming' will undoubtedly continue to
evolve. An electronic version comes with the `gawk' distribution from
@@ -1041,7 +1041,7 @@ electronically.
(1) GNU stands for "GNU's not Unix."
- (2) The terminology "GNU/Linux" is explained in the *note Glossary::.
+ (2) The terminology "GNU/Linux" is explained in the *Note Glossary::.

File: gawk.info, Node: How To Contribute, Next: Acknowledgments, Prev: Manual History, Up: Preface
@@ -1143,7 +1143,7 @@ this team of fine people.
byte-code interpreter, including the debugger. Stephen Davies
contributed to the effort to bring the byte-code changes into the
mainstream code base. Efraim Yawitz contributed the initial text of
-*note Debugger::.
+*Note Debugger::.
I would like to thank Brian Kernighan for invaluable assistance
during the testing and debugging of `gawk', and for ongoing help and
@@ -1277,7 +1277,7 @@ programs from shell scripts, because it avoids the need for a separate
file for the `awk' program. A self-contained shell script is more
reliable because there are no other files to misplace.
- *note Very Simple::, presents several short, self-contained programs.
+ *Note Very Simple::, presents several short, self-contained programs.

File: gawk.info, Node: Read Terminal, Next: Long, Prev: One-shot, Up: Running gawk
@@ -1462,7 +1462,7 @@ programs, but this usually isn't very useful; the purpose of a comment
is to help you or another person understand the program when reading it
at a later time.
- CAUTION: As mentioned in *note One-shot::, you can enclose small
+ CAUTION: As mentioned in *Note One-shot::, you can enclose small
to medium programs in single quotes, in order to keep your shell
scripts self-contained. When doing so, _don't_ put an apostrophe
(i.e., a single quote) into a comment (or anywhere else in your
@@ -1524,7 +1524,7 @@ Shell). If you use the C shell, you're on your own.
quotes. The shell does no interpretation of the quoted text,
passing it on verbatim to the command. It is _impossible_ to
embed a single quote inside single-quoted text. Refer back to
- *note Comments::, for an example of what happens if you try.
+ *Note Comments::, for an example of what happens if you try.
* Double quotes protect most things between the opening and closing
quotes. The shell does at least variable and command substitution
@@ -1536,7 +1536,7 @@ Shell). If you use the C shell, you're on your own.
the characters `$', ``', `\', and `"', all of which must be
preceded by a backslash within double-quoted text if they are to
be passed on literally to the program. (The leading backslash is
- stripped first.) Thus, the example seen in *note Read Terminal::,
+ stripped first.) Thus, the example seen in *Note Read Terminal::,
is applicable:
$ awk "BEGIN { print \"Don't Panic!\" }"
@@ -1691,7 +1691,7 @@ Miscellaneous File Operations: (emacs)Misc File Ops, for more
information). Using this information, create your own `BBS-list' and
`inventory-shipped' files and practice what you learn in this Info file.
- If you are using the stand-alone version of Info, see *note Extract
+ If you are using the stand-alone version of Info, see *Note Extract
Program::, for an `awk' program that extracts these data files from
`gawk.texi', the Texinfo source file for this Info file.
@@ -2033,7 +2033,7 @@ minor node could also be written this way:
---------- Footnotes ----------
(1) The `?' and `:' referred to here is the three-operand
-conditional expression described in *note Conditional Exp::. Splitting
+conditional expression described in *Note Conditional Exp::. Splitting
lines after `?' and `:' is a minor `gawk' extension; if `--posix' is
specified (*note Options::), then this extension is disabled.
@@ -2056,7 +2056,7 @@ determining the type of a variable, and array sorting.
As we develop our presentation of the `awk' language, we introduce
most of the variables and many of the functions. They are described
-systematically in *note Built-in Variables::, and *note Built-in::.
+systematically in *Note Built-in Variables::, and *Note Built-in::.

File: gawk.info, Node: When, Prev: Other Features, Up: Getting Started
@@ -2214,7 +2214,7 @@ The following list describes options mandated by the POSIX standard:
This is useful if you have file names that start with `-', or in
shell scripts, if you have file names that will be specified by
the user that could start with `-'. It is also useful for passing
- options on to the `awk' program; see *note Getopt Function::.
+ options on to the `awk' program; see *Note Getopt Function::.
The following list describes `gawk'-specific options:
@@ -2233,7 +2233,7 @@ The following list describes options mandated by the POSIX standard:
Specify "compatibility mode", in which the GNU extensions to the
`awk' language are disabled, so that `gawk' behaves just like
Brian Kernighan's version `awk'. *Note POSIX/GNU::, which
- summarizes the extensions. Also see *note Compatibility Mode::.
+ summarizes the extensions. Also see *Note Compatibility Mode::.
`-C'
`--copyright'
@@ -2421,7 +2421,7 @@ if they had been concatenated together into one big file. This is
useful for creating libraries of `awk' functions. These functions can
be written once and then retrieved from a standard place, instead of
having to be included into each individual program. (As mentioned in
-*note Definition Syntax::, function names must be unique.)
+*Note Definition Syntax::, function names must be unique.)
With standard `awk', library functions can still be used, even if
the program is entered at the terminal, by specifying `-f /dev/tty'.
@@ -2479,7 +2479,7 @@ File: gawk.info, Node: Other Arguments, Next: Naming Standard Input, Prev: Op
Any additional arguments on the command line are normally treated as
input files to be processed in the order specified. However, an
argument that has the form `VAR=VALUE', assigns the value VALUE to the
-variable VAR--it does not specify a file at all. (See *note Assignment
+variable VAR--it does not specify a file at all. (See *Note Assignment
Options::.)
All these arguments are made available to your `awk' program in the
@@ -2795,7 +2795,7 @@ reducing the need for writing complex and tedious command lines. In
particular, `@include' is very useful for writing CGI scripts to be run
from web pages.
- As mentioned in *note AWKPATH Variable::, the current directory is
+ As mentioned in *Note AWKPATH Variable::, the current directory is
always searched first for source files, before searching in `AWKPATH',
and this also applies to files named with `@include'.
@@ -2813,7 +2813,7 @@ they will _not_ be in the next release).
The process-related special files `/dev/pid', `/dev/ppid',
`/dev/pgrpid', and `/dev/user' were deprecated in `gawk' 3.1, but still
worked. As of version 4.0, they are no longer interpreted specially by
-`gawk'. (Use `PROCINFO' instead; see *note Auto-set::.)
+`gawk'. (Use `PROCINFO' instead; see *Note Auto-set::.)

File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk
@@ -3006,7 +3006,7 @@ with a backslash have special meaning in regexps. *Note GNU Regexp
Operators::.
In a regexp, a backslash before any character that is not in the
-previous list and not listed in *note GNU Regexp Operators::, means
+previous list and not listed in *Note GNU Regexp Operators::, means
that the next character should be taken literally, even if it would
normally be a regexp operator. For example, `/a\+b/' matches the three
characters `a+b'.
@@ -3021,7 +3021,7 @@ character not shown in the previous list.
early, as soon as `awk' reads your program.
* `gawk' processes both regexp constants and dynamic regexps (*note
- Computed Regexps::), for the special operators listed in *note GNU
+ Computed Regexps::), for the special operators listed in *Note GNU
Regexp Operators::.
* A backslash before any other character means to treat that
@@ -3050,7 +3050,7 @@ Advanced Notes: Escape Sequences for Metacharacters
---------------------------------------------------
Suppose you use an octal or hexadecimal escape to represent a regexp
-metacharacter. (See *note Regexp Operators::.) Does `awk' treat the
+metacharacter. (See *Note Regexp Operators::.) Does `awk' treat the
character as a literal character or as a regexp operator?
Historically, such characters were taken literally. (d.c.)
@@ -3070,7 +3070,7 @@ You can combine regular expressions with special characters, called
"regular expression operators" or "metacharacters", to increase the
power and versatility of regular expressions.
- The escape sequences described in *note Escape Sequences::, are
+ The escape sequences described in *Note Escape Sequences::, are
valid inside a regexp. They are introduced by a `\' and are recognized
and converted into corresponding real characters as the very first step
in processing regexps.
@@ -3120,7 +3120,7 @@ sequences and that are not listed in the table stand for themselves:
the characters that are enclosed in the square brackets. For
example, `[MVX]' matches any one of the characters `M', `V', or
`X' in a string. A full discussion of what can be inside the
- square brackets of a bracket expression is given in *note Bracket
+ square brackets of a bracket expression is given in *Note Bracket
Expressions::.
`[^ ...]'
@@ -3247,7 +3247,7 @@ those listed between the opening and closing square brackets.
characters separated by a hyphen. It matches any single character that
sorts between the two characters, based upon the system's native
character set. For example, `[0-9]' is equivalent to `[0123456789]'.
-(See *note Ranges and Locales::, for an explanation of how the POSIX
+(See *Note Ranges and Locales::, for an explanation of how the POSIX
standard and `gawk' have changed over time. This is mainly of
historical interest.)
@@ -3273,7 +3273,7 @@ differs between the United States and France.
A character class is only valid in a regexp _inside_ the brackets of
a bracket expression. Character classes consist of `[:', a keyword
-denoting the class, and `:]'. *note table-char-classes:: lists the
+denoting the class, and `:]'. *Note table-char-classes:: lists the
character classes defined by the POSIX standard.
Class Meaning
@@ -3404,7 +3404,7 @@ GNU `\b' appears to be the lesser of two evils.
No options
In the default case, `gawk' provides all the facilities of POSIX
- regexps and the GNU regexp operators described in *note Regexp
+ regexps and the GNU regexp operators described in *Note Regexp
Operators::.
`--posix'
@@ -3955,7 +3955,7 @@ that the multiplication is done before the `$' operation; they are
necessary whenever there is a binary operator in the field-number
expression. This example, then, prints the hours of operation (the
fourth field) for every line of the file `BBS-list'. (All of the `awk'
-operators are listed, in order of decreasing precedence, in *note
+operators are listed, in order of decreasing precedence, in *Note
Precedence::.)
If the field number you compute is zero, you get the entire record.
@@ -3965,7 +3965,7 @@ not allowed; trying to reference one usually terminates the program.
negative field number. `gawk' notices this and terminates your
program. Other `awk' implementations may behave differently.)
- As mentioned in *note Fields::, `awk' stores the current record's
+ As mentioned in *Note Fields::, `awk' stores the current record's
number of fields in the built-in variable `NF' (also *note Built-in
Variables::). The expression `$NF' is not a special feature--it is the
direct consequence of evaluating `NF' and using its value as a field
@@ -5226,7 +5226,7 @@ in mind:
probably by accident, and you should reconsider what it is you're
trying to accomplish.
- * *note Getline Summary::, presents a table summarizing the
+ * *Note Getline Summary::, presents a table summarizing the
`getline' variants and which variables they can affect. It is
worth noting that those variants which do not use redirection can
cause `FILENAME' to be updated if they cause `awk' to start
@@ -5238,7 +5238,7 @@ File: gawk.info, Node: Getline Summary, Prev: Getline Notes, Up: Getline
4.9.10 Summary of `getline' Variants
------------------------------------
-*note table-getline-variants:: summarizes the eight variants of
+*Note table-getline-variants:: summarizes the eight variants of
`getline', listing which built-in variables are set by each one, and
whether the variant is standard or a `gawk' extension.
@@ -5286,7 +5286,7 @@ and the `printf' statement for fancier formatting. The `print'
statement is not limited when computing _which_ values to print.
However, with two exceptions, you cannot specify _how_ to print
them--how many columns, whether to use exponential notation or not, and
-so on. (For the exceptions, *note Output Separators::, and *note
+so on. (For the exceptions, *note Output Separators::, and *Note
OFMT::.) For printing with specifications, you need the `printf'
statement (*note Printf::).
@@ -5473,7 +5473,7 @@ that string. `awk' uses the `sprintf()' function to do this conversion
`sprintf()' function accepts a "format specification" that tells it how
to format numbers (or strings), and that there are a number of
different ways in which numbers can be formatted. The different format
-specifications are discussed more fully in *note Control Letters::.
+specifications are discussed more fully in *Note Control Letters::.
The built-in variable `OFMT' contains the default format
specification that `print' uses with `sprintf()' when it wants to
@@ -5523,8 +5523,8 @@ A simple `printf' statement looks like this:
printf FORMAT, ITEM1, ITEM2, ...
The entire list of arguments may optionally be enclosed in parentheses.
-The parentheses are necessary if any of the item expressions use the `>'
-relational operator; otherwise, it can be confused with an output
+The parentheses are necessary if any of the item expressions use the
+`>' relational operator; otherwise, it can be confused with an output
redirection (*note Redirection::).
The difference between `printf' and `print' is the FORMAT argument.
@@ -5730,12 +5730,12 @@ which they may appear:
-| 1,234,567 Results in US English UTF locale
For more information about locales and internationalization issues,
- see *note Locales::.
+ see *Note Locales::.
NOTE: The `'' flag is a nice feature, but its use complicates
things: it becomes difficult to use it in command-line
programs. For information on appropriate quoting tricks, see
- *note Quoting::.
+ *Note Quoting::.
`WIDTH'
This is a number specifying the desired minimum width of a field.
@@ -5976,7 +5976,7 @@ work identically for `printf':
The message is built using string concatenation and saved in the
variable `m'. It's then sent down the pipeline to the `mail'
program. (The parentheses group the items to concatenate--see
- *note Concatenation::.)
+ *Note Concatenation::.)
The `close()' function is called here because it's a good idea to
close the pipe as soon as all the intended output has been sent to
@@ -6161,7 +6161,7 @@ essential pieces of information for making a networking connection.
These file names are used with the `|&' operator for communicating with
a coprocess (*note Two-way I/O::). This is an advanced feature,
mentioned here only for completeness. Full discussion is delayed until
-*note TCP/IP Networking::.
+*Note TCP/IP Networking::.

File: gawk.info, Node: Special Caveats, Prev: Special Network, Up: Special Files
@@ -6308,7 +6308,7 @@ to `close()'. As in any other call to `close()', the first argument is
the name of the command or special file used to start the coprocess.
The second argument should be a string, with either of the values
`"to"' or `"from"'. Case does not matter. As this is an advanced
-feature, a more complete discussion is delayed until *note Two-way
+feature, a more complete discussion is delayed until *Note Two-way
I/O::, which discusses it in more detail and gives an example.
Advanced Notes: Using `close()''s Return Value
@@ -6497,7 +6497,7 @@ option; *note Nondecimal Data::.) If you have octal or hexadecimal
data, you can use the `strtonum()' function (*note String Functions::)
to convert the data into a number. Most of the time, you will want to
use octal or hexadecimal constants when working with the built-in bit
-manipulation functions; see *note Bitwise Functions::, for more
+manipulation functions; see *Note Bitwise Functions::, for more
information.
Unlike some early C implementations, `8' and `9' are not valid in
@@ -6780,7 +6780,7 @@ your programs, just port `gawk' itself. *Note Print::, for more
information on the `print' statement.
And, once again, where you are can matter when it comes to converting
-between numbers and strings. In *note Locales::, we mentioned that the
+between numbers and strings. In *Note Locales::, we mentioned that the
local character set and language (the locale) can affect how `gawk'
matches characters. The locale also affects numeric formats. In
particular, for `awk' programs, it affects the decimal point character.
@@ -6821,7 +6821,7 @@ character. (`gawk' also uses the locale's decimal point character when
in POSIX mode, either via `--posix', or the `POSIXLY_CORRECT'
environment variable.)
- *note table-locale-affects:: describes the cases in which the
+ *Note table-locale-affects:: describes the cases in which the
locale's decimal point character is used and when a period is used.
Some of these features have not been described yet.
@@ -6837,7 +6837,7 @@ Table 6.1: Locale Decimal Point versus A Period
Finally, modern day formal standards and IEEE standard floating point
representation can have an unusual but important effect on the way
`gawk' converts some special string values to numbers. The details are
-presented in *note POSIX Floating Point Problems::.
+presented in *Note POSIX Floating Point Problems::.
---------- Footnotes ----------
@@ -7148,7 +7148,7 @@ righthand expression. For example:
The indices of `bar' are practically guaranteed to be different, because
`rand()' returns different values each time it is called. (Arrays and
the `rand()' function haven't been covered yet. *Note Arrays::, and
-see *note Numeric Functions::, for more information). This example
+see *Note Numeric Functions::, for more information). This example
illustrates an important fact about assignment operators: the lefthand
expression is only evaluated _once_. It is up to the implementation as
to which expression is evaluated first, the lefthand or the righthand.
@@ -7159,7 +7159,7 @@ Consider this example:
The value of `a[3]' could be either two or four.
- *note table-assign-ops:: lists the arithmetic assignment operators.
+ *Note table-assign-ops:: lists the arithmetic assignment operators.
In each case, the righthand operand is an expression whose value is
converted to a number.
@@ -7197,7 +7197,7 @@ A workaround is:
awk '/[=]=/' /dev/null
`gawk' does not have this problem, nor do the other freely available
-versions described in *note Other Versions::.
+versions described in *Note Other Versions::.

File: gawk.info, Node: Increment Ops, Prev: Assignment Ops, Up: All Operators
@@ -7462,7 +7462,7 @@ File: gawk.info, Node: Comparison Operators, Next: POSIX String Comparison, P
"Comparison expressions" compare strings or numbers for relationships
such as equality. They are written using "relational operators", which
-are a superset of those in C. *note table-relational-ops:: describes
+are a superset of those in C. *Note table-relational-ops:: describes
them.
Expression Result
@@ -7638,8 +7638,8 @@ Boolean operators are:
if ($0 ~ /2400/ || $0 ~ /foo/) print
The subexpression BOOLEAN2 is evaluated only if BOOLEAN1 is false.
- This can make a difference when BOOLEAN2 contains expressions that
- have side effects.
+ This can make a difference when BOOLEAN2 contains expressions
+ that have side effects.
`! BOOLEAN'
True if BOOLEAN is false. For example, the following program
@@ -7649,7 +7649,7 @@ Boolean operators are:
BEGIN { if (! ("HOME" in ENVIRON))
print "no home!" }
- (The `in' operator is described in *note Reference to Elements::.)
+ (The `in' operator is described in *Note Reference to Elements::.)
The `&&' and `||' operators are called "short-circuit" operators
because of the way they work. Evaluation of the full expression is
@@ -7679,7 +7679,7 @@ using `!'. The next rule prints lines as long as `interested' is true.
When a line is seen whose first field is `END', `interested' is toggled
back to false.(1)
- NOTE: The `next' statement is discussed in *note Next Statement::.
+ NOTE: The `next' statement is discussed in *Note Next Statement::.
`next' tells `awk' to skip the rest of the rules, get the next
record, and start processing the rules over again at the top. The
reason it's there is to avoid printing the bracketing `START' and
@@ -7782,7 +7782,7 @@ User-defined::).
As an advanced feature, `gawk' provides indirect function calls,
which is a way to choose the function to call at runtime, instead of
when you write the source code to your program. We defer discussion of
-this feature until later; see *note Indirect Calls::.
+this feature until later; see *Note Indirect Calls::.
Like every other expression, the function call has a value, which is
computed by the function based on the arguments you give it. In this
@@ -7942,12 +7942,12 @@ make several function calls, _per input character_, to find the record
terminator.
According to POSIX, string comparison is also affected by locales
-(similar to regular expressions). The details are presented in *note
+(similar to regular expressions). The details are presented in *Note
POSIX String Comparison::.
Finally, the locale affects the value of the decimal point character
used when `gawk' parses input data. This is discussed in detail in
-*note Conversion::.
+*Note Conversion::.

File: gawk.info, Node: Patterns and Actions, Next: Arrays, Prev: Expressions, Up: Top
@@ -8048,7 +8048,7 @@ otherwise, it depends on only what has happened so far in the execution
of the `awk' program.
Comparison expressions, using the comparison operators described in
-*note Typing and Comparison::, are a very common kind of pattern.
+*Note Typing and Comparison::, are a very common kind of pattern.
Regexp matching and nonmatching are also very common expressions. The
left operand of the `~' and `!~' operators is a string. The right
operand is either a constant regular expression enclosed in slashes
@@ -8114,7 +8114,7 @@ inside Boolean patterns. Likewise, the special patterns `BEGIN', `END',
expressions and cannot appear inside Boolean patterns.
The precedence of the different operators which can appear in
-patterns is described in *note Precedence::.
+patterns is described in *Note Precedence::.

File: gawk.info, Node: Ranges, Next: BEGIN/END, Prev: Expression Patterns, Up: Pattern Overview
@@ -8300,7 +8300,7 @@ explicitly.
`BEGIN' rule, because the implicit
read-a-record-and-match-against-the-rules loop has not started yet.
Similarly, those statements are not valid in an `END' rule, since all
-the input has been read. (*Note Next Statement::, and see *note
+the input has been read. (*Note Next Statement::, and see *Note
Nextfile Statement::.)

@@ -8839,7 +8839,7 @@ Statement::.)
}
The `break' statement is also used to break out of the `switch'
-statement. This is discussed in *note Switch Statement::.
+statement. This is discussed in *Note Switch Statement::.
The `break' statement has no meaning when used outside the body of a
loop or `switch'. However, although it was never documented,
@@ -8936,7 +8936,7 @@ beginning, in the following manner:
Because of the `next' statement, the program's subsequent rules won't
see the bad record. The error message is redirected to the standard
error output stream, as error messages should be. For more detail see
-*note Special Files::.
+*Note Special Files::.
If the `next' statement causes the end of the input to be reached,
then the code in any `END' rules is executed. *Note BEGIN/END::.
@@ -9107,7 +9107,7 @@ specific to `gawk' are marked with a pound sign (`#').
string value of `"rw"' or `"wr"' indicates that all files should
use binary I/O. Any other string value is treated the same as
`"rw"', but causes `gawk' to generate a warning message.
- `BINMODE' is described in more detail in *note PC Using::.
+ `BINMODE' is described in more detail in *Note PC Using::.
This variable is a `gawk' extension. In other `awk'
implementations (except `mawk', *note Other Versions::), or if
@@ -9411,7 +9411,7 @@ with a pound sign (`#').
If this element exists in `PROCINFO', its value controls the
order in which array indices will be processed by `for (index
in array) ...' loops. Since this is an advanced feature, we
- defer the full description until later; see *note Scanning an
+ defer the full description until later; see *Note Scanning an
Array::.
`PROCINFO["strftime"]'
@@ -9432,7 +9432,7 @@ with a pound sign (`#').
The `PROCINFO' array is also used to cause coprocesses to
communicate over pseudo-ttys instead of through two-way pipes;
- this is discussed further in *note Two-way I/O::.
+ this is discussed further in *Note Two-way I/O::.
This array is a `gawk' extension. In other `awk' implementations,
or if `gawk' is in compatibility mode (*note Options::), it is not
@@ -9494,7 +9494,7 @@ File: gawk.info, Node: ARGC and ARGV, Prev: Auto-set, Up: Built-in Variables
7.5.3 Using `ARGC' and `ARGV'
-----------------------------
-*note Auto-set::, presented the following program describing the
+*Note Auto-set::, presented the following program describing the
information contained in `ARGC' and `ARGV':
$ awk 'BEGIN {
@@ -9550,7 +9550,7 @@ elements from `ARGV' (*note Delete::).
All of these actions are typically done in the `BEGIN' rule, before
actual processing of the input begins. *Note Split Program::, and see
-*note Tee Program::, for examples of each way of removing elements from
+*Note Tee Program::, for examples of each way of removing elements from
`ARGV'. The following fragment processes `ARGV' in order to examine,
and then remove, command-line options:
@@ -9730,7 +9730,7 @@ from English to French:
Here we decided to translate the number one in both spelled-out and
numeric form--thus illustrating that a single array can have both
numbers and strings as indices. In fact, array subscripts are always
-strings; this is discussed in more detail in *note Numeric Array
+strings; this is discussed in more detail in *Note Numeric Array
Subscripts::. Here, the number `1' isn't double-quoted, since `awk'
automatically converts it to a string.
@@ -9931,11 +9931,11 @@ produce strange results. It is best to avoid such things.
As an extension, `gawk' makes it possible for you to loop over the
elements of an array in order, based on the value of
`PROCINFO["sorted_in"]' (*note Auto-set::). This is an advanced
-feature, so discussion of it is delayed until *note Controlling Array
+feature, so discussion of it is delayed until *Note Controlling Array
Traversal::.
In addition, `gawk' provides built-in functions for sorting arrays;
-see *note Array Sorting Functions::.
+see *Note Array Sorting Functions::.

File: gawk.info, Node: Delete, Next: Numeric Array Subscripts, Prev: Array Basics, Up: Arrays
@@ -10636,7 +10636,7 @@ pound sign (`#'):
asort(a, a, "descending")
- The `asort()' function is described in more detail in *note Array
+ The `asort()' function is described in more detail in *Note Array
Sorting Functions::. `asort()' is a `gawk' extension; it is not
available in compatibility mode (*note Options::).
@@ -10645,7 +10645,7 @@ pound sign (`#'):
similarly to `asort()', however, the _indices_ are sorted, instead
of the values. (Here too, `IGNORECASE' affects the sorting.)
- The `asorti()' function is described in more detail in *note Array
+ The `asorti()' function is described in more detail in *Note Array
Sorting Functions::. `asorti()' is a `gawk' extension; it is not
available in compatibility mode (*note Options::).
@@ -11128,7 +11128,7 @@ replacement string to determine what to generate.
At both levels, `awk' looks for a defined set of characters that can
come after a backslash. At the lexical level, it looks for the escape
-sequences listed in *note Escape Sequences::. Thus, for every `\' that
+sequences listed in *Note Escape Sequences::. Thus, for every `\' that
`awk' processes at the runtime level, you must type two backslashes at
the lexical level. When a character that is not valid for an escape
sequence follows the `\', Brian Kernighan's `awk' and `gawk' both
@@ -11141,7 +11141,7 @@ Historically, the `sub()' and `gsub()' functions treated the two
character sequence `\&' specially; this sequence was replaced in the
generated text with a single `&'. Any other `\' within the REPLACEMENT
string that did not precede an `&' was passed through unchanged. This
-is illustrated in *note table-sub-escapes::.
+is illustrated in *Note table-sub-escapes::.
You type `sub()' sees `sub()' generates
------- --------- --------------
@@ -11153,8 +11153,7 @@ is illustrated in *note table-sub-escapes::.
`\\\\\\&' `\\\&' a literal `\\&'
`\\q' `\q' a literal `\q'
-Table 9.1: Historical Escape Sequence Processing for `sub()' and
-`gsub()'
+Table 9.1: Historical Escape Sequence Processing for `sub()' and `gsub()'
This table shows both the lexical-level processing, where an odd number
of backslashes becomes an even number at the runtime level, as well as
@@ -11169,7 +11168,7 @@ get a literal `\' followed by the matched text.
says that `sub()' and `gsub()' look for either a `\' or an `&' after
the `\'. If either one follows a `\', that character is output
literally. The interpretation of `\' and `&' then becomes as shown in
-*note table-sub-posix-92::.
+*Note table-sub-posix-92::.
You type `sub()' sees `sub()' generates
------- --------- --------------
@@ -11196,7 +11195,7 @@ problems:
submitted proposed text for a revised standard that reverts to rules
that correspond more closely to the original existing practice. The
proposed rules have special cases that make it possible to produce a
-`\' preceding the matched text. This is shown in *note
+`\' preceding the matched text. This is shown in *Note
table-sub-proposed::.
You type `sub()' sees `sub()' generates
@@ -11224,7 +11223,7 @@ except for one case.
The POSIX rules state that `\&' in the replacement string produces a
literal `&', `\\' produces a literal `\', and `\' followed by anything
else is not special; the `\' is placed straight into the output. These
-rules are presented in *note table-posix-sub::.
+rules are presented in *Note table-posix-sub::.
You type `sub()' sees `sub()' generates
------- --------- --------------
@@ -11255,7 +11254,7 @@ level, whenever `gawk' sees a `\', if the following character is a
digit, then the text that matched the corresponding parenthesized
subexpression is placed in the generated output. Otherwise, no matter
what character follows the `\', it appears in the generated text and
-the `\' does not, as shown in *note table-gensub-escapes::.
+the `\' does not, as shown in *Note table-gensub-escapes::.
You type `gensub()' sees `gensub()' generates
------- ------------ -----------------
@@ -11784,7 +11783,7 @@ supports all of the conversions listed here.
(5) If you don't understand any of this, don't worry about it; these
facilities are meant to make it easier to "internationalize" programs.
-Other internationalization features are described in *note
+Other internationalization features are described in *Note
Internationalization::.
(6) This is because ISO C leaves the behavior of the C version of
@@ -11804,7 +11803,7 @@ File: gawk.info, Node: Bitwise Functions, Next: Type Functions, Prev: Time Fu
Many languages provide the ability to perform "bitwise" operations
on two integer numbers. In other words, the operation is performed on
each successive pair of bits in the operands. Three common operations
-are bitwise AND, OR, and XOR. The operations are described in *note
+are bitwise AND, OR, and XOR. The operations are described in *Note
table-bitwise-ops::.
Bit Operator
@@ -12072,7 +12071,7 @@ act of a function calling itself is called "recursion".
All the built-in functions return a value to their caller.
User-defined functions can do also, using the `return' statement, which
-is described in detail in *note Return Statement::. Many of the
+is described in detail in *Note Return Statement::. Many of the
subsequent examples in this minor node use the `return' statement.
In many `awk' implementations, including `gawk', the keyword
@@ -13005,7 +13004,7 @@ internationalization:
`"LC_MESSAGES"'.
If you supply a value for CATEGORY, it must be a string equal to
- one of the known locale categories described in *note Explaining
+ one of the known locale categories described in *Note Explaining
gettext::. You must also supply a text domain. Use `TEXTDOMAIN'
if you want to use the current domain.
@@ -13037,7 +13036,7 @@ internationalization:
current binding for the given DOMAIN.
To use these facilities in your `awk' program, follow the steps
-outlined in *note Explaining gettext::, like so:
+outlined in *Note Explaining gettext::, like so:
1. Set the variable `TEXTDOMAIN' to the text domain of your program.
This is best done in a `BEGIN' rule (*note BEGIN/END::), or it can
@@ -13400,7 +13399,7 @@ full detail, along with the basics of TCP/IP networking. Finally,
`gawk' can "profile" an `awk' program, making it possible to tune it
for performance.
- *note Dynamic Extensions::, discusses the ability to dynamically add
+ *Note Dynamic Extensions::, discusses the ability to dynamically add
new built-in functions to `gawk'. As this feature is still immature
and likely to change, its description is relegated to an appendix.
@@ -13718,7 +13717,7 @@ File: gawk.info, Node: Controlling Scanning, Prev: Controlling Scanning With A
11.2.1.2 Controlling Array Scanning Order
.........................................
-As described in *note Controlling Scanning With A Function::, you can
+As described in *Note Controlling Scanning With A Function::, you can
provide the name of a function as the value of `PROCINFO["sorted_in"]'
to specify custom sorting criteria.
@@ -14351,14 +14350,14 @@ File: gawk.info, Node: Library Functions, Next: Sample Programs, Prev: Advanc
12 A Library of `awk' Functions
*******************************
-*note User-defined::, describes how to write your own `awk' functions.
+*Note User-defined::, describes how to write your own `awk' functions.
Writing functions is important, because it allows you to encapsulate
algorithms and program tasks in a single place. It simplifies
programming, making program development more manageable, and making
programs more readable.
One valuable way to learn a new programming language is to _read_
-programs in that language. To that end, this major node and *note
+programs in that language. To that end, this major node and *Note
Sample Programs::, provide a good-sized body of code for you to read,
and hopefully, to learn from.
@@ -14367,16 +14366,16 @@ of the sample programs presented later in this Info file use these
functions. The functions are presented here in a progression from
simple to complex.
- *note Extract Program::, presents a program that you can use to
+ *Note Extract Program::, presents a program that you can use to
extract the source code for these example library functions and
programs from the Texinfo source for this Info file. (This has already
been done as part of the `gawk' distribution.)
If you have written one or more useful, general-purpose `awk'
functions and would like to contribute them to the `awk' user
-community, see *note How To Contribute::, for more information.
+community, see *Note How To Contribute::, for more information.
- The programs in this major node and in *note Sample Programs::,
+ The programs in this major node and in *Note Sample Programs::,
freely use features that are `gawk'-specific. Rewriting these programs
for different implementations of `awk' is pretty straightforward.
@@ -14478,7 +14477,7 @@ program, leading to bugs that are very difficult to track down:
single associative array to hold the values needed by the library
function(s), or "package." This significantly decreases the number of
actual global names in use. For example, the functions described in
-*note Passwd Functions::, might have used array elements
+*Note Passwd Functions::, might have used array elements
`PW_data["inited"]', `PW_data["total"]', `PW_data["count"]', and
`PW_data["awklib"]', instead of `_pw_inited', `_pw_awklib', `_pw_total',
and `_pw_count'.
@@ -14916,7 +14915,7 @@ File: gawk.info, Node: Gettimeofday Function, Prev: Join Function, Up: Genera
12.2.7 Managing the Time of Day
-------------------------------
-The `systime()' and `strftime()' functions described in *note Time
+The `systime()' and `strftime()' functions described in *Note Time
Functions::, provide the minimum functionality necessary for dealing
with the time of day in human readable form. While `strftime()' is
extensive, the control formats are not necessarily easy to remember or
@@ -14988,7 +14987,7 @@ current time formatted in the same way as the `date' utility:
The string indices are easier to use and read than the various
formats required by `strftime()'. The `alarm' program presented in
-*note Alarm Program::, uses this function. A more general design for
+*Note Alarm Program::, uses this function. A more general design for
the `gettimeofday()' function would have allowed the user to supply an
optional timestamp value to use instead of the current time.
@@ -15089,7 +15088,7 @@ solves the problem:
END { endfile(_filename_) }
- *note Wc Program::, shows how this library function can be used and
+ *Note Wc Program::, shows how this library function can be used and
how it simplifies writing the main program.
Advanced Notes: So Why Does `gawk' have `BEGINFILE' and `ENDFILE'?
@@ -15143,7 +15142,7 @@ over with it from the top. For lack of a better name, we'll call it
This code relies on the `ARGIND' variable (*note Auto-set::), which
is specific to `gawk'. If you are not using `gawk', you can use ideas
-presented in *note Filetrans Function::, to either update `ARGIND' on
+presented in *Note Filetrans Function::, to either update `ARGIND' on
your own or modify this code as appropriate.
The `rewind()' function also relies on the `nextfile' keyword (*note
@@ -15176,7 +15175,7 @@ program to your `awk' program:
This works, because the `getline' won't be fatal. Removing the
element from `ARGV' with `delete' skips the file (since it's no longer
-in the list). See also *note ARGC and ARGV::.
+in the list). See also *Note ARGC and ARGV::.

File: gawk.info, Node: Empty Files, Next: Ignoring Assigns, Prev: File Checking, Up: Data File Management
@@ -15194,7 +15193,7 @@ program code.
Using `gawk''s `ARGIND' variable (*note Built-in Variables::), it is
possible to detect when an empty data file has been skipped. Similar
-to the library file presented in *note Filetrans Function::, the
+to the library file presented in *Note Filetrans Function::, the
following library file calls a function named `zerofile()' that the
user must provide. The arguments passed are the file name and the
position in `ARGV' where it was found:
@@ -15562,7 +15561,7 @@ that it does not try to interpret the `-a', etc., as its own options.
`Optind', so that `awk' does not try to process the command-line
options as file names.
- Several of the sample programs presented in *note Sample Programs::,
+ Several of the sample programs presented in *Note Sample Programs::,
use `getopt()' to process their arguments.
---------- Footnotes ----------
@@ -15807,7 +15806,7 @@ once. If you are worried about squeezing every last cycle out of your
this is not necessary, since most `awk' programs are I/O-bound, and
such a change would clutter up the code.
- The `id' program in *note Id Program::, uses these functions.
+ The `id' program in *Note Id Program::, uses these functions.
---------- Footnotes ----------
@@ -15820,7 +15819,7 @@ File: gawk.info, Node: Group Functions, Next: Walking Arrays, Prev: Passwd Fu
12.6 Reading the Group Database
===============================
-Much of the discussion presented in *note Passwd Functions::, applies
+Much of the discussion presented in *Note Passwd Functions::, applies
to the group database as well. Although there has traditionally been a
well-known file (`/etc/group') in a well-known format, the POSIX
standard only provides a set of C library routines (`<grp.h>' and
@@ -16046,7 +16045,7 @@ body of `_gr_init()' into a `BEGIN' rule).
associative arrays. The functions that the user calls are themselves
very simple, relying on `awk''s associative arrays to do work.
- The `id' program in *note Id Program::, uses these functions.
+ The `id' program in *Note Id Program::, uses these functions.

File: gawk.info, Node: Walking Arrays, Prev: Group Functions, Up: Library Functions
@@ -16054,7 +16053,7 @@ File: gawk.info, Node: Walking Arrays, Prev: Group Functions, Up: Library Fun
12.7 Traversing Arrays of Arrays
================================
-*note Arrays of Arrays::, described how `gawk' provides arrays of
+*Note Arrays of Arrays::, described how `gawk' provides arrays of
arrays. In particular, any element of an array may be either a scalar,
or another array. The `isarray()' function (*note Type Functions::)
lets you distinguish an array from a scalar. The following function,
@@ -16105,12 +16104,12 @@ File: gawk.info, Node: Sample Programs, Next: Debugger, Prev: Library Functio
13 Practical `awk' Programs
***************************
-*note Library Functions::, presents the idea that reading programs in a
+*Note Library Functions::, presents the idea that reading programs in a
language contributes to learning that language. This major node
continues that theme, presenting a potpourri of `awk' programs for your
reading enjoyment.
- Many of these programs use library functions presented in *note
+ Many of these programs use library functions presented in *Note
Library Functions::.
* Menu:
@@ -16285,7 +16284,7 @@ by characters, the output field separator is set to the null string:
Using a single space (`" "') for the value of `FS' is incorrect--`awk'
would separate fields with runs of spaces, TABs, and/or newlines, and
we want them to be separated with individual spaces. Also remember
-that after `getopt()' is through (as described in *note Getopt
+that after `getopt()' is through (as described in *Note Getopt
Function::), we have to clear out all the elements of `ARGV' from 1 to
`Optind', so that `awk' does not try to process the command-line options
as file names.
@@ -16790,7 +16789,7 @@ to something like `myfileaa', `myfileab', and so on, supply an
additional argument that specifies the file name prefix.
Here is a version of `split' in `awk'. It uses the `ord()' and
-`chr()' functions presented in *note Ordinal Functions::.
+`chr()' functions presented in *Note Ordinal Functions::.
The program first sets its defaults, and then tests to make sure
there are not too many arguments. It then looks at each argument in
@@ -17324,7 +17323,7 @@ in its length. Next, `lines' is incremented for each line read, and
---------- Footnotes ----------
(1) `wc' can't just use the value of `FNR' in `endfile()'. If you
-examine the code in *note Filetrans Function::, you will see that `FNR'
+examine the code in *Note Filetrans Function::, you will see that `FNR'
has already been reset by the time `endfile()' is called.
(2) Since `gawk' understands multibyte locales, this code counts
@@ -17420,7 +17419,7 @@ prints the message on the standard output. In addition, you can give it
the number of times to repeat the message as well as a delay between
repetitions.
- This program uses the `gettimeofday()' function from *note
+ This program uses the `gettimeofday()' function from *Note
Gettimeofday Function::.
All the work is done in the `BEGIN' rule. The first part is argument
@@ -17928,7 +17927,7 @@ File: gawk.info, Node: Extract Program, Next: Simple Sed, Prev: History Sorti
13.3.7 Extracting Programs from Texinfo Source Files
----------------------------------------------------
-The nodes *note Library Functions::, and *note Sample Programs::, are
+The nodes *Note Library Functions::, and *Note Sample Programs::, are
the top level nodes for a large number of `awk' programs. If you want
to experiment with these programs, it is tedious to have to type them
in by hand. Here we present a program that can extract parts of a
@@ -18209,7 +18208,7 @@ File: gawk.info, Node: Igawk Program, Next: Anagram Program, Prev: Simple Sed
13.3.9 An Easy Way to Use Library Functions
-------------------------------------------
-In *note Include Files::, we saw how `gawk' provides a built-in
+In *Note Include Files::, we saw how `gawk' provides a built-in
file-inclusion capability. However, this is a `gawk' extension. This
minor node provides the motivation for making file inclusion available
for standard `awk', and shows how to do it using a combination of shell
@@ -19324,7 +19323,7 @@ execution of the program than we saw in our earlier example:
`si' [COUNT]
Execute one (or COUNT) instruction(s), stepping inside function
calls. (For illustration of what is meant by an "instruction" in
- `gawk', see the output shown under `dump' in *note Miscellaneous
+ `gawk', see the output shown under `dump' in *Note Miscellaneous
Dgawk Commands::.)
`until' [[FILENAME`:']N | FUNCTION]
@@ -19730,7 +19729,7 @@ limitations. A few which are worth being aware of are:
Rather, it just responds `syntax error'. When you do figure out
what your mistake was, though, you'll feel like a real guru.
- * If you perused the dump of opcodes in *note Miscellaneous Dgawk
+ * If you perused the dump of opcodes in *Note Miscellaneous Dgawk
Commands::, (or if you are already familiar with `gawk' internals),
you will realize that much of the internal manipulation of data in
`gawk', as in many interpreters, is done on a stack. `Op_push',
@@ -19750,7 +19749,7 @@ limitations. A few which are worth being aware of are:
you are expected to know what `/[^[:alnum:][:blank:]]/' means.
* `dgawk' is designed to be used by running a program (with all its
- parameters) on the command line, as described in *note dgawk
+ parameters) on the command line, as described in *Note dgawk
invocation::. There is no way (as of now) to attach or "break in"
to a running program. This seems reasonable for a language which
is used mainly for quickly executing, short programs.
@@ -19940,7 +19939,7 @@ Other Versions::).
This minor node describes common extensions that originally appeared
in his version of `awk'.
- * The `**' and `**=' operators (*note Arithmetic Ops:: and *note
+ * The `**' and `**=' operators (*note Arithmetic Ops:: and *Note
Assignment Ops::).
* The use of `func' as an abbreviation for `function' (*note
@@ -20333,7 +20332,7 @@ Info file, in approximate chronological order:
* John Haque reworked the `gawk' internals to use a byte-code engine,
providing the `dgawk' debugger for `awk' programs.
- * Efraim Yawitz contributed the original text for *note Debugger::.
+ * Efraim Yawitz contributed the original text for *Note Debugger::.
* Arnold Robbins has been working on `gawk' since 1988, at first
helping David Trueman, and as the primary maintainer since around
@@ -20537,7 +20536,7 @@ Various `.c', `.y', and `.h' files
`doc/igawk.1'
The `troff' source for a manual page describing the `igawk'
- program presented in *note Igawk Program::.
+ program presented in *Note Igawk Program::.
`doc/Makefile.in'
The input file used during the configuration process to generate
@@ -20557,7 +20556,7 @@ Various `.c', `.y', and `.h' files
`missing_d/*'
`m4/*'
These files and subdirectories are used when configuring `gawk'
- for various Unix systems. They are explained in *note Unix
+ for various Unix systems. They are explained in *Note Unix
Installation::.
`po/*'
@@ -20572,8 +20571,8 @@ Various `.c', `.y', and `.h' files
programs from the Texinfo source file for this Info file. It also
contains a `Makefile.in' file, which `configure' uses to generate
a `Makefile'. `Makefile.am' is used by GNU Automake to create
- `Makefile.in'. The library functions from *note Library
- Functions::, and the `igawk' program from *note Igawk Program::,
+ `Makefile.in'. The library functions from *Note Library
+ Functions::, and the `igawk' program from *Note Igawk Program::,
are included as ready-to-use files in the `gawk' distribution.
They are installed as part of the installation process. The rest
of the programs in this Info file are available in appropriate
@@ -20938,7 +20937,7 @@ MS-DOS or MS-Windows. EMX (OS/2 only) does support at least the `|&'
operator.
The MS-DOS and MS-Windows versions of `gawk' search for program
-files as described in *note AWKPATH Variable::. However, semicolons
+files as described in *Note AWKPATH Variable::. However, semicolons
(rather than colons) separate elements in the `AWKPATH' variable. If
`AWKPATH' is not set or is empty, then the default search path for
MS-Windows and MS-DOS versions is `".;c:/lib/awk;c:/gnu/lib/awk"'.
@@ -21472,7 +21471,7 @@ File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions
C.2.1 Accessing The `gawk' Git Repository
-----------------------------------------
-As `gawk' is Free Software, the source code is always available. *note
+As `gawk' is Free Software, the source code is always available. *Note
Gawk Distribution::, describes how to get and build the formal,
released versions of `gawk'.
@@ -21492,7 +21491,7 @@ access the repository using:
git clone http://git.savannah.gnu.org/r/gawk.git
Once you have made changes, you can use `git diff' to produce a
-patch, and send that to the `gawk' maintainer; see *note Bugs:: for how
+patch, and send that to the `gawk' maintainer; see *Note Bugs:: for how
to do that.
Finally, if you cannot install Git (e.g., if it hasn't been ported
@@ -21641,7 +21640,7 @@ C.2.3 Porting `gawk' to a New Operating System
If you want to port `gawk' to a new operating system, there are several
steps:
- 1. Follow the guidelines in *note Adding Code::, concerning coding
+ 1. Follow the guidelines in *Note Adding Code::, concerning coding
style, submission of diffs, and so on.
2. Be prepared to sign the appropriate paperwork. In order for the
@@ -21791,16 +21790,9 @@ when writing extensions. The next minor node shows how they are used:
is current. It may end up calling an internal `gawk' function.
It also guarantees that the wide string is zero-terminated.
-`size_t get_curfunc_arg_count(void)'
- This function returns the actual number of parameters passed to
- the current function. Inside the code of an extension this can be
- used to determine the maximum index which is safe to use with
- `get_actual_argument'. If this value is greater than `nargs', the
- function was called incorrectly from the `awk' program.
-
`nargs'
- Inside an extension function, this is the maximum number of
- expected parameters, as set by the `make_builtin()' function.
+ Inside an extension function, this is the actual number of
+ parameters passed to the current function.
`n->stptr'
`n->stlen'
@@ -21828,12 +21820,10 @@ when writing extensions. The next minor node shows how they are used:
Clears the associative array pointed to by `n'. Make sure that
`n->type == Node_var_array' first.
-`NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference)'
+`NODE **assoc_lookup(NODE *symbol, NODE *subs)'
Finds, and installs if necessary, array elements. `symbol' is the
array, `subs' is the subscript. This is usually a value created
- with `make_string()' (see below). `reference' should be `TRUE' if
- it is an error to use the value before it is created. Typically,
- `FALSE' is the correct value to use from extension functions.
+ with `make_string()' (see below).
`NODE *make_string(char *s, size_t len)'
Take a C string and turn it into a pointer to a `NODE' that can be
@@ -22135,7 +22125,7 @@ other POSIX-compliant systems:(1)
NODE *newdir;
int ret = -1;
- if (do_lint && get_curfunc_arg_count() != 1)
+ if (do_lint && nargs != 1)
lintwarn("chdir: called with incorrect number of arguments");
newdir = get_scalar_argument(0, FALSE);
@@ -22192,7 +22182,7 @@ declarations and argument checking:
char *pmode; /* printable mode */
char *type = "unknown";
- if (do_lint && get_curfunc_arg_count() > 2)
+ if (do_lint && nargs > 2)
lintwarn("stat: called with too many arguments");
Then comes the actual work. First, the function gets the arguments.
@@ -22219,15 +22209,15 @@ link. If there's an error, it sets `ERRNO' and returns:
calls are shown here, since they all follow the same pattern:
/* fill in the array */
- aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4));
*aptr = dupnode(file);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4));
*aptr = make_number((AWKNUM) sbuf.st_mode);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5));
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
unref(tmp);
@@ -22558,7 +22548,7 @@ larger range of values. The disadvantage is that there are numbers
that they cannot represent exactly. `awk' uses "double precision"
floating-point numbers, which can hold more digits than "single
precision" floating-point numbers. Floating-point issues are discussed
-more fully in *note Floating Point Issues::.
+more fully in *Note Floating Point Issues::.
At the very lowest level, computers store values as groups of binary
digits, or "bits". Modern computers group bits into groups of eight,
@@ -22581,7 +22571,7 @@ or "binary", base 8 or "octal", and base 16 or "hexadecimal". In
binary, each column represents two times the value in the column to its
right. Each column may contain either a 0 or a 1. Thus, binary 1010
represents 1 times 8, plus 0 times 4, plus 1 times 2, plus 0 times 1,
-or decimal 10. Octal and hexadecimal are discussed more in *note
+or decimal 10. Octal and hexadecimal are discussed more in *Note
Nondecimal-numbers::.
Programs are written in programming languages. Hundreds, if not
@@ -22898,7 +22888,7 @@ Bit
floating-point numbers, character data, addresses of other memory
objects, or other data. `awk' lets you work with floating-point
numbers and strings. `gawk' lets you manipulate bit values with
- the built-in functions described in *note Bitwise Functions::.
+ the built-in functions described in *Note Bitwise Functions::.
Computers are often defined by how many bits they use to represent
integer values. Typical systems are 32-bit systems, but 64-bit
@@ -23081,7 +23071,7 @@ Field
built-in variable `FIELDWIDTHS' to describe their lengths. If you
wish to specify the contents of fields instead of the field
separator, you can use the built-in variable `FPAT' to do so.
- (*Note Field Separators::, *note Constant Size::, and *note
+ (*Note Field Separators::, *Note Constant Size::, and *Note
Splitting By Content::.)
Flag
@@ -23316,7 +23306,7 @@ Redirection
`|', and `|&' operators. You can redirect the output of the
`print' and `printf' statements to a file or a system command,
using the `>', `>>', `|', and `|&' operators. (*Note Getline::,
- and *note Redirection::.)
+ and *Note Redirection::.)
Regexp
See "Regular Expression."
@@ -24709,7 +24699,7 @@ Index
* * (asterisk), * operator, as regexp operator: Regexp Operators.
(line 87)
* * (asterisk), * operator, null strings, matching: Gory Details.
- (line 164)
+ (line 163)
* * (asterisk), ** operator <1>: Precedence. (line 49)
* * (asterisk), ** operator: Arithmetic Ops. (line 81)
* * (asterisk), **= operator <1>: Precedence. (line 95)
@@ -24949,7 +24939,7 @@ Index
(line 23)
* advanced features, network connections, See Also networks, connections: Advanced Features.
(line 6)
-* advanced features, null strings, matching: Gory Details. (line 164)
+* advanced features, null strings, matching: Gory Details. (line 163)
* advanced features, operators, precedence: Increment Ops. (line 61)
* advanced features, piping into sh: Redirection. (line 143)
* advanced features, regexp constants: Assignment Ops. (line 148)
@@ -24988,18 +24978,18 @@ Index
* arguments, command-line, invoking awk: Command Line. (line 6)
* arguments, in function calls: Function Calls. (line 16)
* arguments, processing: Getopt Function. (line 6)
-* arguments, retrieving: Internals. (line 120)
+* arguments, retrieving: Internals. (line 111)
* arithmetic operators: Arithmetic Ops. (line 6)
* arrays: Arrays. (line 6)
* arrays, as parameters to functions: Pass By Value/Reference.
(line 47)
* arrays, associative: Array Intro. (line 50)
-* arrays, associative, clearing: Internals. (line 75)
+* arrays, associative, clearing: Internals. (line 68)
* arrays, associative, library functions and: Library Names. (line 57)
* arrays, deleting entire contents: Delete. (line 39)
* arrays, elements, assigning: Assigning Elements. (line 6)
* arrays, elements, deleting: Delete. (line 6)
-* arrays, elements, installing: Internals. (line 79)
+* arrays, elements, installing: Internals. (line 72)
* arrays, elements, order of: Scanning an Array. (line 48)
* arrays, elements, referencing: Reference to Elements.
(line 6)
@@ -25038,15 +25028,15 @@ Index
* assignment operators, evaluation order: Assignment Ops. (line 111)
* assignment operators, lvalues/rvalues: Assignment Ops. (line 32)
* assignments as filenames: Ignoring Assigns. (line 6)
-* assoc_clear() internal function: Internals. (line 75)
-* assoc_lookup() internal function: Internals. (line 79)
+* assoc_clear() internal function: Internals. (line 68)
+* assoc_lookup() internal function: Internals. (line 72)
* associative arrays: Array Intro. (line 50)
* asterisk (*), * operator, as multiplication operator: Precedence.
(line 55)
* asterisk (*), * operator, as regexp operator: Regexp Operators.
(line 87)
* asterisk (*), * operator, null strings, matching: Gory Details.
- (line 164)
+ (line 163)
* asterisk (*), ** operator <1>: Precedence. (line 49)
* asterisk (*), ** operator: Arithmetic Ops. (line 81)
* asterisk (*), **= operator <1>: Precedence. (line 95)
@@ -25310,7 +25300,7 @@ Index
* close() function, two-way pipes and: Two-way I/O. (line 77)
* Close, Diane <1>: Contributors. (line 21)
* Close, Diane: Manual History. (line 41)
-* close_func() input method: Internals. (line 160)
+* close_func() input method: Internals. (line 151)
* collating elements: Bracket Expressions. (line 69)
* collating symbols: Bracket Expressions. (line 76)
* Colombo, Antonio: Acknowledgments. (line 60)
@@ -25683,7 +25673,7 @@ Index
* DuBois, John: Acknowledgments. (line 60)
* dump debugger command: Miscellaneous Dgawk Commands.
(line 9)
-* dupnode() internal function: Internals. (line 96)
+* dupnode() internal function: Internals. (line 87)
* dupword.awk program: Dupword Program. (line 31)
* e debugger command (alias for enable): Breakpoint Control. (line 72)
* EBCDIC: Ordinal Functions. (line 45)
@@ -25724,7 +25714,7 @@ Index
* endgrent() user-defined function: Group Functions. (line 218)
* endpwent() function (C library): Passwd Functions. (line 210)
* endpwent() user-defined function: Passwd Functions. (line 213)
-* ENVIRON array <1>: Internals. (line 149)
+* ENVIRON array <1>: Internals. (line 140)
* ENVIRON array: Auto-set. (line 60)
* environment variables: Auto-set. (line 60)
* epoch, definition of: Glossary. (line 239)
@@ -25733,7 +25723,7 @@ Index
* equals sign (=), == operator: Comparison Operators.
(line 11)
* EREs (Extended Regular Expressions): Bracket Expressions. (line 24)
-* ERRNO variable <1>: Internals. (line 139)
+* ERRNO variable <1>: Internals. (line 130)
* ERRNO variable <2>: TCP/IP Networking. (line 54)
* ERRNO variable <3>: Auto-set. (line 72)
* ERRNO variable <4>: BEGINFILE/ENDFILE. (line 26)
@@ -25782,7 +25772,7 @@ Index
(line 9)
* expressions, selecting: Conditional Exp. (line 6)
* Extended Regular Expressions (EREs): Bracket Expressions. (line 24)
-* eXtensible Markup Language (XML): Internals. (line 160)
+* eXtensible Markup Language (XML): Internals. (line 151)
* extension() function (gawk): Using Internal File Ops.
(line 15)
* extensions, Brian Kernighan's awk <1>: Other Versions. (line 13)
@@ -26004,7 +25994,7 @@ Index
* functions, names of <1>: Definition Syntax. (line 20)
* functions, names of: Arrays. (line 18)
* functions, recursive: Definition Syntax. (line 73)
-* functions, return values, setting: Internals. (line 139)
+* functions, return values, setting: Internals. (line 130)
* functions, string-translation: I18N Functions. (line 6)
* functions, undefined: Pass By Value/Reference.
(line 71)
@@ -26118,12 +26108,11 @@ Index
* gensub() function (gawk): Using Constant Regexps.
(line 43)
* gensub() function (gawk), escape processing: Gory Details. (line 6)
-* get_actual_argument() internal function: Internals. (line 125)
-* get_argument() internal function: Internals. (line 120)
-* get_array_argument() internal macro: Internals. (line 136)
-* get_curfunc_arg_count() internal function: Internals. (line 42)
-* get_record() input method: Internals. (line 160)
-* get_scalar_argument() internal macro: Internals. (line 133)
+* get_actual_argument() internal function: Internals. (line 116)
+* get_argument() internal function: Internals. (line 111)
+* get_array_argument() internal macro: Internals. (line 127)
+* get_record() input method: Internals. (line 151)
+* get_scalar_argument() internal macro: Internals. (line 124)
* getaddrinfo() function (C library): TCP/IP Networking. (line 38)
* getgrent() function (C library): Group Functions. (line 6)
* getgrent() user-defined function: Group Functions. (line 6)
@@ -26276,37 +26265,36 @@ Index
* integers: Basic Data Typing. (line 21)
* integers, unsigned: Basic Data Typing. (line 30)
* interacting with other programs: I/O Functions. (line 63)
-* internal constant, INVALID_HANDLE: Internals. (line 160)
-* internal function, assoc_clear(): Internals. (line 75)
-* internal function, assoc_lookup(): Internals. (line 79)
-* internal function, dupnode(): Internals. (line 96)
+* internal constant, INVALID_HANDLE: Internals. (line 151)
+* internal function, assoc_clear(): Internals. (line 68)
+* internal function, assoc_lookup(): Internals. (line 72)
+* internal function, dupnode(): Internals. (line 87)
* internal function, force_number(): Internals. (line 27)
* internal function, force_string(): Internals. (line 32)
* internal function, force_wstring(): Internals. (line 37)
-* internal function, get_actual_argument(): Internals. (line 125)
-* internal function, get_argument(): Internals. (line 120)
-* internal function, get_curfunc_arg_count(): Internals. (line 42)
-* internal function, iop_alloc(): Internals. (line 160)
-* internal function, make_builtin(): Internals. (line 106)
-* internal function, make_number(): Internals. (line 91)
-* internal function, make_string(): Internals. (line 86)
-* internal function, register_deferred_variable(): Internals. (line 149)
-* internal function, register_open_hook(): Internals. (line 160)
-* internal function, unref(): Internals. (line 101)
-* internal function, update_ERRNO(): Internals. (line 139)
-* internal function, update_ERRNO_saved(): Internals. (line 144)
-* internal macro, get_array_argument(): Internals. (line 136)
-* internal macro, get_scalar_argument(): Internals. (line 133)
-* internal structure, IOBUF: Internals. (line 160)
+* internal function, get_actual_argument(): Internals. (line 116)
+* internal function, get_argument(): Internals. (line 111)
+* internal function, iop_alloc(): Internals. (line 151)
+* internal function, make_builtin(): Internals. (line 97)
+* internal function, make_number(): Internals. (line 82)
+* internal function, make_string(): Internals. (line 77)
+* internal function, register_deferred_variable(): Internals. (line 140)
+* internal function, register_open_hook(): Internals. (line 151)
+* internal function, unref(): Internals. (line 92)
+* internal function, update_ERRNO(): Internals. (line 130)
+* internal function, update_ERRNO_saved(): Internals. (line 135)
+* internal macro, get_array_argument(): Internals. (line 127)
+* internal macro, get_scalar_argument(): Internals. (line 124)
+* internal structure, IOBUF: Internals. (line 151)
* internal type, AWKNUM: Internals. (line 19)
* internal type, NODE: Internals. (line 23)
-* internal variable, nargs: Internals. (line 49)
-* internal variable, stlen: Internals. (line 53)
-* internal variable, stptr: Internals. (line 53)
-* internal variable, type: Internals. (line 66)
-* internal variable, vname: Internals. (line 71)
-* internal variable, wstlen: Internals. (line 61)
-* internal variable, wstptr: Internals. (line 61)
+* internal variable, nargs: Internals. (line 42)
+* internal variable, stlen: Internals. (line 46)
+* internal variable, stptr: Internals. (line 46)
+* internal variable, type: Internals. (line 59)
+* internal variable, vname: Internals. (line 64)
+* internal variable, wstlen: Internals. (line 54)
+* internal variable, wstptr: Internals. (line 54)
* internationalization <1>: I18N and L10N. (line 6)
* internationalization: I18N Functions. (line 6)
* internationalization, localization <1>: Internationalization.
@@ -26326,10 +26314,10 @@ Index
* interpreted programs <1>: Glossary. (line 361)
* interpreted programs: Basic High Level. (line 14)
* interval expressions: Regexp Operators. (line 116)
-* INVALID_HANDLE internal constant: Internals. (line 160)
+* INVALID_HANDLE internal constant: Internals. (line 151)
* inventory-shipped file: Sample Data Files. (line 32)
-* IOBUF internal structure: Internals. (line 160)
-* iop_alloc() internal function: Internals. (line 160)
+* IOBUF internal structure: Internals. (line 151)
+* iop_alloc() internal function: Internals. (line 151)
* isarray() function (gawk): Type Functions. (line 11)
* ISO: Glossary. (line 372)
* ISO 8859-1: Glossary. (line 141)
@@ -26456,9 +26444,9 @@ Index
* lvalues/rvalues: Assignment Ops. (line 32)
* mailing labels, printing: Labels Program. (line 6)
* mailing list, GNITS: Acknowledgments. (line 52)
-* make_builtin() internal function: Internals. (line 106)
-* make_number() internal function: Internals. (line 91)
-* make_string() internal function: Internals. (line 86)
+* make_builtin() internal function: Internals. (line 97)
+* make_number() internal function: Internals. (line 82)
+* make_string() internal function: Internals. (line 77)
* mark parity: Ordinal Functions. (line 45)
* marked string extraction (internationalization): String Extraction.
(line 6)
@@ -26470,10 +26458,10 @@ Index
* matching, expressions, See comparison expressions: Typing and Comparison.
(line 9)
* matching, leftmost longest: Multiple Line. (line 26)
-* matching, null strings: Gory Details. (line 164)
+* matching, null strings: Gory Details. (line 163)
* mawk program: Other Versions. (line 35)
* McPhee, Patrick: Contributors. (line 100)
-* memory, releasing: Internals. (line 101)
+* memory, releasing: Internals. (line 92)
* message object files: Explaining gettext. (line 41)
* message object files, converting from portable object files: I18N Example.
(line 62)
@@ -26495,7 +26483,7 @@ Index
* namespace issues <1>: Library Names. (line 6)
* namespace issues: Arrays. (line 18)
* namespace issues, functions: Definition Syntax. (line 20)
-* nargs internal variable: Internals. (line 49)
+* nargs internal variable: Internals. (line 42)
* nawk utility: Names. (line 17)
* negative zero: Unexpected Results. (line 28)
* NetBSD: Glossary. (line 611)
@@ -26537,7 +26525,7 @@ Index
(line 49)
* noassign.awk program: Ignoring Assigns. (line 15)
* NODE internal type: Internals. (line 23)
-* nodes, duplicating: Internals. (line 96)
+* nodes, duplicating: Internals. (line 87)
* not Boolean-logic operator: Boolean Ops. (line 6)
* NR variable <1>: Auto-set. (line 118)
* NR variable: Records. (line 6)
@@ -26551,14 +26539,14 @@ Index
* null strings, as array subscripts: Uninitialized Subscripts.
(line 43)
* null strings, converting numbers to strings: Conversion. (line 21)
-* null strings, matching: Gory Details. (line 164)
+* null strings, matching: Gory Details. (line 163)
* null strings, quoting and: Quoting. (line 62)
* number sign (#), #! (executable scripts): Executable Scripts.
(line 6)
* number sign (#), #! (executable scripts), portability issues with: Executable Scripts.
(line 6)
* number sign (#), commenting: Comments. (line 6)
-* numbers: Internals. (line 91)
+* numbers: Internals. (line 82)
* numbers, as array subscripts: Numeric Array Subscripts.
(line 6)
* numbers, as values of characters: Ordinal Functions. (line 6)
@@ -26661,7 +26649,7 @@ Index
(line 36)
* P1003.1 POSIX standard: Glossary. (line 454)
* P1003.2 POSIX standard: Glossary. (line 454)
-* parameters, number of: Internals. (line 49)
+* parameters, number of: Internals. (line 42)
* parentheses (): Regexp Operators. (line 79)
* parentheses (), pgawk program: Profiling. (line 141)
* password file: Passwd Functions. (line 16)
@@ -26767,7 +26755,7 @@ Index
* POSIX awk, field separators and: Fields. (line 6)
* POSIX awk, FS variable and: User-modified. (line 66)
* POSIX awk, function keyword in: Definition Syntax. (line 83)
-* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 54)
+* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 53)
* POSIX awk, functions and, length(): String Functions. (line 175)
* POSIX awk, GNU long options and: Options. (line 15)
* POSIX awk, interval expressions in: Regexp Operators. (line 135)
@@ -26825,7 +26813,7 @@ Index
* private variables: Library Names. (line 11)
* processes, two-way communications with: Two-way I/O. (line 23)
* processing data: Basic High Level. (line 6)
-* PROCINFO array <1>: Internals. (line 149)
+* PROCINFO array <1>: Internals. (line 140)
* PROCINFO array <2>: Id Program. (line 15)
* PROCINFO array <3>: Group Functions. (line 6)
* PROCINFO array <4>: Passwd Functions. (line 6)
@@ -26921,8 +26909,8 @@ Index
* regexp constants, slashes vs. quotes: Computed Regexps. (line 28)
* regexp constants, vs. string constants: Computed Regexps. (line 38)
* regexp, See regular expressions: Regexp. (line 6)
-* register_deferred_variable() internal function: Internals. (line 149)
-* register_open_hook() internal function: Internals. (line 160)
+* register_deferred_variable() internal function: Internals. (line 140)
+* register_open_hook() internal function: Internals. (line 151)
* regular expressions: Regexp. (line 6)
* regular expressions as field separators: Field Separators. (line 50)
* regular expressions, anchors in: Regexp Operators. (line 22)
@@ -27148,8 +27136,8 @@ Index
(line 68)
* stepi debugger command: Dgawk Execution Control.
(line 76)
-* stlen internal variable: Internals. (line 53)
-* stptr internal variable: Internals. (line 53)
+* stlen internal variable: Internals. (line 46)
+* stptr internal variable: Internals. (line 46)
* stream editors <1>: Simple Sed. (line 6)
* stream editors: Field Splitting Summary.
(line 47)
@@ -27160,7 +27148,7 @@ Index
(line 6)
* string operators: Concatenation. (line 9)
* string-matching operators: Regexp Usage. (line 19)
-* strings: Internals. (line 86)
+* strings: Internals. (line 77)
* strings, converting <1>: Bitwise Functions. (line 107)
* strings, converting: Conversion. (line 6)
* strings, converting, numbers to: User-modified. (line 28)
@@ -27290,7 +27278,7 @@ Index
* trunc-mod operation: Arithmetic Ops. (line 66)
* truth values: Truth Values. (line 6)
* type conversion: Conversion. (line 21)
-* type internal variable: Internals. (line 66)
+* type internal variable: Internals. (line 59)
* u debugger command (alias for until): Dgawk Execution Control.
(line 83)
* undefined functions: Pass By Value/Reference.
@@ -27316,15 +27304,15 @@ Index
(line 72)
* Unix, awk scripts and: Executable Scripts. (line 6)
* UNIXROOT variable, on OS/2 systems: PC Using. (line 17)
-* unref() internal function: Internals. (line 101)
+* unref() internal function: Internals. (line 92)
* unsigned integers: Basic Data Typing. (line 30)
* until debugger command: Dgawk Execution Control.
(line 83)
* unwatch debugger command: Viewing And Changing Data.
(line 84)
* up debugger command: Dgawk Stack. (line 33)
-* update_ERRNO() internal function: Internals. (line 139)
-* update_ERRNO_saved() internal function: Internals. (line 144)
+* update_ERRNO() internal function: Internals. (line 130)
+* update_ERRNO_saved() internal function: Internals. (line 135)
* user database, reading: Passwd Functions. (line 6)
* user-defined, functions: User-defined. (line 6)
* user-defined, functions, counts: Profiling. (line 132)
@@ -27375,7 +27363,7 @@ Index
* vertical bar (|), || operator <1>: Precedence. (line 89)
* vertical bar (|), || operator: Boolean Ops. (line 57)
* Vinschen, Corinna: Acknowledgments. (line 60)
-* vname internal variable: Internals. (line 71)
+* vname internal variable: Internals. (line 64)
* w debugger command (alias for watch): Viewing And Changing Data.
(line 67)
* w utility: Constant Size. (line 22)
@@ -27409,11 +27397,11 @@ Index
* words, counting: Wc Program. (line 6)
* words, duplicate, searching for: Dupword Program. (line 6)
* words, usage counts, generating: Word Sorting. (line 6)
-* wstlen internal variable: Internals. (line 61)
-* wstptr internal variable: Internals. (line 61)
+* wstlen internal variable: Internals. (line 54)
+* wstptr internal variable: Internals. (line 54)
* xgawk: Other Versions. (line 119)
* xgettext utility: String Extraction. (line 13)
-* XML (eXtensible Markup Language): Internals. (line 160)
+* XML (eXtensible Markup Language): Internals. (line 151)
* XOR bitwise operation: Bitwise Functions. (line 6)
* xor() function (gawk): Bitwise Functions. (line 54)
* Yawitz, Efraim: Contributors. (line 106)
@@ -27450,418 +27438,418 @@ Index

Tag Table:
-Node: Top1346
-Node: Foreword33440
-Node: Preface37785
-Ref: Preface-Footnote-140838
-Ref: Preface-Footnote-240944
-Node: History41176
-Node: Names43567
-Ref: Names-Footnote-145044
-Node: This Manual45116
-Ref: This Manual-Footnote-150063
-Node: Conventions50163
-Node: Manual History52297
-Ref: Manual History-Footnote-155567
-Ref: Manual History-Footnote-255608
-Node: How To Contribute55682
-Node: Acknowledgments56826
-Node: Getting Started61157
-Node: Running gawk63536
-Node: One-shot64722
-Node: Read Terminal65947
-Ref: Read Terminal-Footnote-167597
-Ref: Read Terminal-Footnote-267873
-Node: Long68044
-Node: Executable Scripts69420
-Ref: Executable Scripts-Footnote-171289
-Ref: Executable Scripts-Footnote-271391
-Node: Comments71842
-Node: Quoting74309
-Node: DOS Quoting78932
-Node: Sample Data Files79607
-Node: Very Simple82639
-Node: Two Rules87238
-Node: More Complex89385
-Ref: More Complex-Footnote-192315
-Node: Statements/Lines92400
-Ref: Statements/Lines-Footnote-196862
-Node: Other Features97127
-Node: When98055
-Node: Invoking Gawk100202
-Node: Command Line101587
-Node: Options102370
-Ref: Options-Footnote-1115807
-Node: Other Arguments115832
-Node: Naming Standard Input118490
-Node: Environment Variables119584
-Node: AWKPATH Variable120028
-Ref: AWKPATH Variable-Footnote-1122625
-Node: Other Environment Variables122885
-Node: Exit Status125225
-Node: Include Files125900
-Node: Obsolete129385
-Node: Undocumented130071
-Node: Regexp130312
-Node: Regexp Usage131701
-Node: Escape Sequences133727
-Node: Regexp Operators139490
-Ref: Regexp Operators-Footnote-1146687
-Ref: Regexp Operators-Footnote-2146834
-Node: Bracket Expressions146932
-Ref: table-char-classes148822
-Node: GNU Regexp Operators151345
-Node: Case-sensitivity155068
-Ref: Case-sensitivity-Footnote-1158036
-Ref: Case-sensitivity-Footnote-2158271
-Node: Leftmost Longest158379
-Node: Computed Regexps159580
-Node: Reading Files162990
-Node: Records164931
-Ref: Records-Footnote-1173605
-Node: Fields173642
-Ref: Fields-Footnote-1176675
-Node: Nonconstant Fields176761
-Node: Changing Fields178963
-Node: Field Separators184941
-Node: Default Field Splitting187570
-Node: Regexp Field Splitting188687
-Node: Single Character Fields192029
-Node: Command Line Field Separator193088
-Node: Field Splitting Summary196529
-Ref: Field Splitting Summary-Footnote-1199721
-Node: Constant Size199822
-Node: Splitting By Content204406
-Ref: Splitting By Content-Footnote-1208132
-Node: Multiple Line208172
-Ref: Multiple Line-Footnote-1214019
-Node: Getline214198
-Node: Plain Getline216426
-Node: Getline/Variable218515
-Node: Getline/File219656
-Node: Getline/Variable/File220978
-Ref: Getline/Variable/File-Footnote-1222577
-Node: Getline/Pipe222664
-Node: Getline/Variable/Pipe225224
-Node: Getline/Coprocess226331
-Node: Getline/Variable/Coprocess227574
-Node: Getline Notes228288
-Node: Getline Summary230230
-Ref: table-getline-variants230573
-Node: Command line directories231429
-Node: Printing232054
-Node: Print233685
-Node: Print Examples235022
-Node: Output Separators237806
-Node: OFMT239566
-Node: Printf240924
-Node: Basic Printf241830
-Node: Control Letters243369
-Node: Format Modifiers247181
-Node: Printf Examples253190
-Node: Redirection255905
-Node: Special Files262889
-Node: Special FD263422
-Ref: Special FD-Footnote-1267047
-Node: Special Network267121
-Node: Special Caveats267971
-Node: Close Files And Pipes268767
-Ref: Close Files And Pipes-Footnote-1275790
-Ref: Close Files And Pipes-Footnote-2275938
-Node: Expressions276088
-Node: Values277220
-Node: Constants277896
-Node: Scalar Constants278576
-Ref: Scalar Constants-Footnote-1279435
-Node: Nondecimal-numbers279617
-Node: Regexp Constants282676
-Node: Using Constant Regexps283151
-Node: Variables286206
-Node: Using Variables286861
-Node: Assignment Options288585
-Node: Conversion290457
-Ref: table-locale-affects295833
-Ref: Conversion-Footnote-1296457
-Node: All Operators296566
-Node: Arithmetic Ops297196
-Node: Concatenation299701
-Ref: Concatenation-Footnote-1302494
-Node: Assignment Ops302614
-Ref: table-assign-ops307602
-Node: Increment Ops309010
-Node: Truth Values and Conditions312480
-Node: Truth Values313563
-Node: Typing and Comparison314612
-Node: Variable Typing315401
-Ref: Variable Typing-Footnote-1319298
-Node: Comparison Operators319420
-Ref: table-relational-ops319830
-Node: POSIX String Comparison323379
-Ref: POSIX String Comparison-Footnote-1324335
-Node: Boolean Ops324473
-Ref: Boolean Ops-Footnote-1328551
-Node: Conditional Exp328642
-Node: Function Calls330374
-Node: Precedence333968
-Node: Locales337637
-Node: Patterns and Actions338726
-Node: Pattern Overview339780
-Node: Regexp Patterns341446
-Node: Expression Patterns341989
-Node: Ranges345674
-Node: BEGIN/END348640
-Node: Using BEGIN/END349402
-Ref: Using BEGIN/END-Footnote-1352133
-Node: I/O And BEGIN/END352239
-Node: BEGINFILE/ENDFILE354521
-Node: Empty357414
-Node: Using Shell Variables357730
-Node: Action Overview360015
-Node: Statements362372
-Node: If Statement364226
-Node: While Statement365725
-Node: Do Statement367769
-Node: For Statement368925
-Node: Switch Statement372077
-Node: Break Statement374174
-Node: Continue Statement376164
-Node: Next Statement377951
-Node: Nextfile Statement380341
-Node: Exit Statement382886
-Node: Built-in Variables385302
-Node: User-modified386397
-Ref: User-modified-Footnote-1394423
-Node: Auto-set394485
-Ref: Auto-set-Footnote-1403776
-Node: ARGC and ARGV403981
-Node: Arrays407832
-Node: Array Basics409337
-Node: Array Intro410048
-Node: Reference to Elements414366
-Node: Assigning Elements416636
-Node: Array Example417127
-Node: Scanning an Array418859
-Node: Delete421525
-Ref: Delete-Footnote-1423960
-Node: Numeric Array Subscripts424017
-Node: Uninitialized Subscripts426200
-Node: Multi-dimensional427828
-Node: Multi-scanning430922
-Node: Arrays of Arrays432506
-Node: Functions437083
-Node: Built-in437905
-Node: Calling Built-in438983
-Node: Numeric Functions440971
-Ref: Numeric Functions-Footnote-1444736
-Ref: Numeric Functions-Footnote-2445093
-Ref: Numeric Functions-Footnote-3445141
-Node: String Functions445410
-Ref: String Functions-Footnote-1468907
-Ref: String Functions-Footnote-2469036
-Ref: String Functions-Footnote-3469284
-Node: Gory Details469371
-Ref: table-sub-escapes471050
-Ref: table-sub-posix-92472404
-Ref: table-sub-proposed473747
-Ref: table-posix-sub475097
-Ref: table-gensub-escapes476643
-Ref: Gory Details-Footnote-1477850
-Ref: Gory Details-Footnote-2477901
-Node: I/O Functions478052
-Ref: I/O Functions-Footnote-1484707
-Node: Time Functions484854
-Ref: Time Functions-Footnote-1495746
-Ref: Time Functions-Footnote-2495814
-Ref: Time Functions-Footnote-3495972
-Ref: Time Functions-Footnote-4496083
-Ref: Time Functions-Footnote-5496195
-Ref: Time Functions-Footnote-6496422
-Node: Bitwise Functions496688
-Ref: table-bitwise-ops497246
-Ref: Bitwise Functions-Footnote-1501406
-Node: Type Functions501590
-Node: I18N Functions502060
-Node: User-defined503687
-Node: Definition Syntax504491
-Ref: Definition Syntax-Footnote-1509401
-Node: Function Example509470
-Node: Function Caveats512064
-Node: Calling A Function512485
-Node: Variable Scope513600
-Node: Pass By Value/Reference515575
-Node: Return Statement519015
-Node: Dynamic Typing521996
-Node: Indirect Calls522731
-Node: Internationalization532416
-Node: I18N and L10N533842
-Node: Explaining gettext534528
-Ref: Explaining gettext-Footnote-1539594
-Ref: Explaining gettext-Footnote-2539778
-Node: Programmer i18n539943
-Node: Translator i18n544143
-Node: String Extraction544936
-Ref: String Extraction-Footnote-1545897
-Node: Printf Ordering545983
-Ref: Printf Ordering-Footnote-1548767
-Node: I18N Portability548831
-Ref: I18N Portability-Footnote-1551280
-Node: I18N Example551343
-Ref: I18N Example-Footnote-1553978
-Node: Gawk I18N554050
-Node: Advanced Features554667
-Node: Nondecimal Data556180
-Node: Array Sorting557763
-Node: Controlling Array Traversal558463
-Node: Controlling Scanning With A Function559210
-Node: Controlling Scanning566913
-Ref: Controlling Scanning-Footnote-1570714
-Node: Array Sorting Functions571030
-Ref: Array Sorting Functions-Footnote-1574546
-Ref: Array Sorting Functions-Footnote-2574639
-Node: Two-way I/O574833
-Ref: Two-way I/O-Footnote-1580265
-Node: TCP/IP Networking580335
-Node: Profiling583179
-Node: Library Functions590653
-Ref: Library Functions-Footnote-1593660
-Node: Library Names593831
-Ref: Library Names-Footnote-1597302
-Ref: Library Names-Footnote-2597522
-Node: General Functions597608
-Node: Strtonum Function598561
-Node: Assert Function601491
-Node: Round Function604817
-Node: Cliff Random Function606360
-Node: Ordinal Functions607376
-Ref: Ordinal Functions-Footnote-1610446
-Ref: Ordinal Functions-Footnote-2610698
-Node: Join Function610907
-Ref: Join Function-Footnote-1612678
-Node: Gettimeofday Function612878
-Node: Data File Management616593
-Node: Filetrans Function617225
-Node: Rewind Function621364
-Node: File Checking622751
-Node: Empty Files623845
-Node: Ignoring Assigns626075
-Node: Getopt Function627628
-Ref: Getopt Function-Footnote-1638932
-Node: Passwd Functions639135
-Ref: Passwd Functions-Footnote-1648110
-Node: Group Functions648198
-Node: Walking Arrays656282
-Node: Sample Programs657851
-Node: Running Examples658516
-Node: Clones659244
-Node: Cut Program660468
-Node: Egrep Program670313
-Ref: Egrep Program-Footnote-1678086
-Node: Id Program678196
-Node: Split Program681812
-Ref: Split Program-Footnote-1685331
-Node: Tee Program685459
-Node: Uniq Program688262
-Node: Wc Program695691
-Ref: Wc Program-Footnote-1699957
-Ref: Wc Program-Footnote-2700157
-Node: Miscellaneous Programs700249
-Node: Dupword Program701437
-Node: Alarm Program703468
-Node: Translate Program708217
-Ref: Translate Program-Footnote-1712604
-Ref: Translate Program-Footnote-2712832
-Node: Labels Program712966
-Ref: Labels Program-Footnote-1716337
-Node: Word Sorting716421
-Node: History Sorting720305
-Node: Extract Program722144
-Ref: Extract Program-Footnote-1729627
-Node: Simple Sed729755
-Node: Igawk Program732817
-Ref: Igawk Program-Footnote-1747974
-Ref: Igawk Program-Footnote-2748175
-Node: Anagram Program748313
-Node: Signature Program751381
-Node: Debugger752481
-Node: Debugging753392
-Node: Debugging Concepts753805
-Node: Debugging Terms755661
-Node: Awk Debugging758284
-Node: Sample dgawk session759176
-Node: dgawk invocation759668
-Node: Finding The Bug760850
-Node: List of Debugger Commands767336
-Node: Breakpoint Control768647
-Node: Dgawk Execution Control772283
-Node: Viewing And Changing Data775634
-Node: Dgawk Stack778971
-Node: Dgawk Info780431
-Node: Miscellaneous Dgawk Commands784379
-Node: Readline Support789807
-Node: Dgawk Limitations790645
-Node: Language History792834
-Node: V7/SVR3.1794346
-Node: SVR4796667
-Node: POSIX798109
-Node: BTL799117
-Node: POSIX/GNU799851
-Node: Common Extensions805002
-Node: Ranges and Locales806109
-Ref: Ranges and Locales-Footnote-1810716
-Node: Contributors810937
-Node: Installation815199
-Node: Gawk Distribution816093
-Node: Getting816577
-Node: Extracting817403
-Node: Distribution contents819095
-Node: Unix Installation824317
-Node: Quick Installation824934
-Node: Additional Configuration Options826896
-Node: Configuration Philosophy828373
-Node: Non-Unix Installation830715
-Node: PC Installation831173
-Node: PC Binary Installation832472
-Node: PC Compiling834320
-Node: PC Testing837264
-Node: PC Using838440
-Node: Cygwin842625
-Node: MSYS843625
-Node: VMS Installation844139
-Node: VMS Compilation844742
-Ref: VMS Compilation-Footnote-1845749
-Node: VMS Installation Details845807
-Node: VMS Running847442
-Node: VMS Old Gawk849049
-Node: Bugs849523
-Node: Other Versions853376
-Node: Notes858657
-Node: Compatibility Mode859349
-Node: Additions860132
-Node: Accessing The Source860944
-Node: Adding Code862369
-Node: New Ports868336
-Node: Dynamic Extensions872449
-Node: Internals873825
-Node: Plugin License882928
-Node: Sample Library883562
-Node: Internal File Description884248
-Node: Internal File Ops887963
-Ref: Internal File Ops-Footnote-1892744
-Node: Using Internal File Ops892884
-Node: Future Extensions895261
-Node: Basic Concepts897765
-Node: Basic High Level898522
-Ref: Basic High Level-Footnote-1902557
-Node: Basic Data Typing902742
-Node: Floating Point Issues907267
-Node: String Conversion Precision908350
-Ref: String Conversion Precision-Footnote-1910050
-Node: Unexpected Results910159
-Node: POSIX Floating Point Problems911985
-Ref: POSIX Floating Point Problems-Footnote-1915690
-Node: Glossary915728
-Node: Copying940704
-Node: GNU Free Documentation License978261
-Node: Index1003398
+Node: Top1345
+Node: Foreword33439
+Node: Preface37784
+Ref: Preface-Footnote-140837
+Ref: Preface-Footnote-240943
+Node: History41175
+Node: Names43566
+Ref: Names-Footnote-145043
+Node: This Manual45115
+Ref: This Manual-Footnote-150062
+Node: Conventions50162
+Node: Manual History52296
+Ref: Manual History-Footnote-155566
+Ref: Manual History-Footnote-255607
+Node: How To Contribute55681
+Node: Acknowledgments56825
+Node: Getting Started61156
+Node: Running gawk63535
+Node: One-shot64721
+Node: Read Terminal65946
+Ref: Read Terminal-Footnote-167596
+Ref: Read Terminal-Footnote-267872
+Node: Long68043
+Node: Executable Scripts69419
+Ref: Executable Scripts-Footnote-171288
+Ref: Executable Scripts-Footnote-271390
+Node: Comments71841
+Node: Quoting74308
+Node: DOS Quoting78931
+Node: Sample Data Files79606
+Node: Very Simple82638
+Node: Two Rules87237
+Node: More Complex89384
+Ref: More Complex-Footnote-192314
+Node: Statements/Lines92399
+Ref: Statements/Lines-Footnote-196861
+Node: Other Features97126
+Node: When98054
+Node: Invoking Gawk100201
+Node: Command Line101586
+Node: Options102369
+Ref: Options-Footnote-1115806
+Node: Other Arguments115831
+Node: Naming Standard Input118489
+Node: Environment Variables119583
+Node: AWKPATH Variable120027
+Ref: AWKPATH Variable-Footnote-1122624
+Node: Other Environment Variables122884
+Node: Exit Status125224
+Node: Include Files125899
+Node: Obsolete129384
+Node: Undocumented130070
+Node: Regexp130311
+Node: Regexp Usage131700
+Node: Escape Sequences133726
+Node: Regexp Operators139489
+Ref: Regexp Operators-Footnote-1146686
+Ref: Regexp Operators-Footnote-2146833
+Node: Bracket Expressions146931
+Ref: table-char-classes148821
+Node: GNU Regexp Operators151344
+Node: Case-sensitivity155067
+Ref: Case-sensitivity-Footnote-1158035
+Ref: Case-sensitivity-Footnote-2158270
+Node: Leftmost Longest158378
+Node: Computed Regexps159579
+Node: Reading Files162989
+Node: Records164930
+Ref: Records-Footnote-1173604
+Node: Fields173641
+Ref: Fields-Footnote-1176674
+Node: Nonconstant Fields176760
+Node: Changing Fields178962
+Node: Field Separators184940
+Node: Default Field Splitting187569
+Node: Regexp Field Splitting188686
+Node: Single Character Fields192028
+Node: Command Line Field Separator193087
+Node: Field Splitting Summary196528
+Ref: Field Splitting Summary-Footnote-1199720
+Node: Constant Size199821
+Node: Splitting By Content204405
+Ref: Splitting By Content-Footnote-1208131
+Node: Multiple Line208171
+Ref: Multiple Line-Footnote-1214018
+Node: Getline214197
+Node: Plain Getline216425
+Node: Getline/Variable218514
+Node: Getline/File219655
+Node: Getline/Variable/File220977
+Ref: Getline/Variable/File-Footnote-1222576
+Node: Getline/Pipe222663
+Node: Getline/Variable/Pipe225223
+Node: Getline/Coprocess226330
+Node: Getline/Variable/Coprocess227573
+Node: Getline Notes228287
+Node: Getline Summary230229
+Ref: table-getline-variants230572
+Node: Command line directories231428
+Node: Printing232053
+Node: Print233684
+Node: Print Examples235021
+Node: Output Separators237805
+Node: OFMT239565
+Node: Printf240923
+Node: Basic Printf241829
+Node: Control Letters243368
+Node: Format Modifiers247180
+Node: Printf Examples253189
+Node: Redirection255904
+Node: Special Files262888
+Node: Special FD263421
+Ref: Special FD-Footnote-1267046
+Node: Special Network267120
+Node: Special Caveats267970
+Node: Close Files And Pipes268766
+Ref: Close Files And Pipes-Footnote-1275789
+Ref: Close Files And Pipes-Footnote-2275937
+Node: Expressions276087
+Node: Values277219
+Node: Constants277895
+Node: Scalar Constants278575
+Ref: Scalar Constants-Footnote-1279434
+Node: Nondecimal-numbers279616
+Node: Regexp Constants282675
+Node: Using Constant Regexps283150
+Node: Variables286205
+Node: Using Variables286860
+Node: Assignment Options288584
+Node: Conversion290456
+Ref: table-locale-affects295832
+Ref: Conversion-Footnote-1296456
+Node: All Operators296565
+Node: Arithmetic Ops297195
+Node: Concatenation299700
+Ref: Concatenation-Footnote-1302493
+Node: Assignment Ops302613
+Ref: table-assign-ops307601
+Node: Increment Ops309009
+Node: Truth Values and Conditions312479
+Node: Truth Values313562
+Node: Typing and Comparison314611
+Node: Variable Typing315400
+Ref: Variable Typing-Footnote-1319297
+Node: Comparison Operators319419
+Ref: table-relational-ops319829
+Node: POSIX String Comparison323378
+Ref: POSIX String Comparison-Footnote-1324334
+Node: Boolean Ops324472
+Ref: Boolean Ops-Footnote-1328550
+Node: Conditional Exp328641
+Node: Function Calls330373
+Node: Precedence333967
+Node: Locales337636
+Node: Patterns and Actions338725
+Node: Pattern Overview339779
+Node: Regexp Patterns341445
+Node: Expression Patterns341988
+Node: Ranges345673
+Node: BEGIN/END348639
+Node: Using BEGIN/END349401
+Ref: Using BEGIN/END-Footnote-1352132
+Node: I/O And BEGIN/END352238
+Node: BEGINFILE/ENDFILE354520
+Node: Empty357413
+Node: Using Shell Variables357729
+Node: Action Overview360014
+Node: Statements362371
+Node: If Statement364225
+Node: While Statement365724
+Node: Do Statement367768
+Node: For Statement368924
+Node: Switch Statement372076
+Node: Break Statement374173
+Node: Continue Statement376163
+Node: Next Statement377950
+Node: Nextfile Statement380340
+Node: Exit Statement382885
+Node: Built-in Variables385301
+Node: User-modified386396
+Ref: User-modified-Footnote-1394422
+Node: Auto-set394484
+Ref: Auto-set-Footnote-1403775
+Node: ARGC and ARGV403980
+Node: Arrays407831
+Node: Array Basics409336
+Node: Array Intro410047
+Node: Reference to Elements414365
+Node: Assigning Elements416635
+Node: Array Example417126
+Node: Scanning an Array418858
+Node: Delete421524
+Ref: Delete-Footnote-1423959
+Node: Numeric Array Subscripts424016
+Node: Uninitialized Subscripts426199
+Node: Multi-dimensional427827
+Node: Multi-scanning430921
+Node: Arrays of Arrays432505
+Node: Functions437082
+Node: Built-in437904
+Node: Calling Built-in438982
+Node: Numeric Functions440970
+Ref: Numeric Functions-Footnote-1444735
+Ref: Numeric Functions-Footnote-2445092
+Ref: Numeric Functions-Footnote-3445140
+Node: String Functions445409
+Ref: String Functions-Footnote-1468906
+Ref: String Functions-Footnote-2469035
+Ref: String Functions-Footnote-3469283
+Node: Gory Details469370
+Ref: table-sub-escapes471049
+Ref: table-sub-posix-92472403
+Ref: table-sub-proposed473746
+Ref: table-posix-sub475096
+Ref: table-gensub-escapes476642
+Ref: Gory Details-Footnote-1477849
+Ref: Gory Details-Footnote-2477900
+Node: I/O Functions478051
+Ref: I/O Functions-Footnote-1484706
+Node: Time Functions484853
+Ref: Time Functions-Footnote-1495745
+Ref: Time Functions-Footnote-2495813
+Ref: Time Functions-Footnote-3495971
+Ref: Time Functions-Footnote-4496082
+Ref: Time Functions-Footnote-5496194
+Ref: Time Functions-Footnote-6496421
+Node: Bitwise Functions496687
+Ref: table-bitwise-ops497245
+Ref: Bitwise Functions-Footnote-1501405
+Node: Type Functions501589
+Node: I18N Functions502059
+Node: User-defined503686
+Node: Definition Syntax504490
+Ref: Definition Syntax-Footnote-1509400
+Node: Function Example509469
+Node: Function Caveats512063
+Node: Calling A Function512484
+Node: Variable Scope513599
+Node: Pass By Value/Reference515574
+Node: Return Statement519014
+Node: Dynamic Typing521995
+Node: Indirect Calls522730
+Node: Internationalization532415
+Node: I18N and L10N533841
+Node: Explaining gettext534527
+Ref: Explaining gettext-Footnote-1539593
+Ref: Explaining gettext-Footnote-2539777
+Node: Programmer i18n539942
+Node: Translator i18n544142
+Node: String Extraction544935
+Ref: String Extraction-Footnote-1545896
+Node: Printf Ordering545982
+Ref: Printf Ordering-Footnote-1548766
+Node: I18N Portability548830
+Ref: I18N Portability-Footnote-1551279
+Node: I18N Example551342
+Ref: I18N Example-Footnote-1553977
+Node: Gawk I18N554049
+Node: Advanced Features554666
+Node: Nondecimal Data556179
+Node: Array Sorting557762
+Node: Controlling Array Traversal558462
+Node: Controlling Scanning With A Function559209
+Node: Controlling Scanning566912
+Ref: Controlling Scanning-Footnote-1570713
+Node: Array Sorting Functions571029
+Ref: Array Sorting Functions-Footnote-1574545
+Ref: Array Sorting Functions-Footnote-2574638
+Node: Two-way I/O574832
+Ref: Two-way I/O-Footnote-1580264
+Node: TCP/IP Networking580334
+Node: Profiling583178
+Node: Library Functions590652
+Ref: Library Functions-Footnote-1593659
+Node: Library Names593830
+Ref: Library Names-Footnote-1597301
+Ref: Library Names-Footnote-2597521
+Node: General Functions597607
+Node: Strtonum Function598560
+Node: Assert Function601490
+Node: Round Function604816
+Node: Cliff Random Function606359
+Node: Ordinal Functions607375
+Ref: Ordinal Functions-Footnote-1610445
+Ref: Ordinal Functions-Footnote-2610697
+Node: Join Function610906
+Ref: Join Function-Footnote-1612677
+Node: Gettimeofday Function612877
+Node: Data File Management616592
+Node: Filetrans Function617224
+Node: Rewind Function621363
+Node: File Checking622750
+Node: Empty Files623844
+Node: Ignoring Assigns626074
+Node: Getopt Function627627
+Ref: Getopt Function-Footnote-1638931
+Node: Passwd Functions639134
+Ref: Passwd Functions-Footnote-1648109
+Node: Group Functions648197
+Node: Walking Arrays656281
+Node: Sample Programs657850
+Node: Running Examples658515
+Node: Clones659243
+Node: Cut Program660467
+Node: Egrep Program670312
+Ref: Egrep Program-Footnote-1678085
+Node: Id Program678195
+Node: Split Program681811
+Ref: Split Program-Footnote-1685330
+Node: Tee Program685458
+Node: Uniq Program688261
+Node: Wc Program695690
+Ref: Wc Program-Footnote-1699956
+Ref: Wc Program-Footnote-2700156
+Node: Miscellaneous Programs700248
+Node: Dupword Program701436
+Node: Alarm Program703467
+Node: Translate Program708216
+Ref: Translate Program-Footnote-1712603
+Ref: Translate Program-Footnote-2712831
+Node: Labels Program712965
+Ref: Labels Program-Footnote-1716336
+Node: Word Sorting716420
+Node: History Sorting720304
+Node: Extract Program722143
+Ref: Extract Program-Footnote-1729626
+Node: Simple Sed729754
+Node: Igawk Program732816
+Ref: Igawk Program-Footnote-1747973
+Ref: Igawk Program-Footnote-2748174
+Node: Anagram Program748312
+Node: Signature Program751380
+Node: Debugger752480
+Node: Debugging753391
+Node: Debugging Concepts753804
+Node: Debugging Terms755660
+Node: Awk Debugging758283
+Node: Sample dgawk session759175
+Node: dgawk invocation759667
+Node: Finding The Bug760849
+Node: List of Debugger Commands767335
+Node: Breakpoint Control768646
+Node: Dgawk Execution Control772282
+Node: Viewing And Changing Data775633
+Node: Dgawk Stack778970
+Node: Dgawk Info780430
+Node: Miscellaneous Dgawk Commands784378
+Node: Readline Support789806
+Node: Dgawk Limitations790644
+Node: Language History792833
+Node: V7/SVR3.1794345
+Node: SVR4796666
+Node: POSIX798108
+Node: BTL799116
+Node: POSIX/GNU799850
+Node: Common Extensions805001
+Node: Ranges and Locales806108
+Ref: Ranges and Locales-Footnote-1810715
+Node: Contributors810936
+Node: Installation815198
+Node: Gawk Distribution816092
+Node: Getting816576
+Node: Extracting817402
+Node: Distribution contents819094
+Node: Unix Installation824316
+Node: Quick Installation824933
+Node: Additional Configuration Options826895
+Node: Configuration Philosophy828372
+Node: Non-Unix Installation830714
+Node: PC Installation831172
+Node: PC Binary Installation832471
+Node: PC Compiling834319
+Node: PC Testing837263
+Node: PC Using838439
+Node: Cygwin842624
+Node: MSYS843624
+Node: VMS Installation844138
+Node: VMS Compilation844741
+Ref: VMS Compilation-Footnote-1845748
+Node: VMS Installation Details845806
+Node: VMS Running847441
+Node: VMS Old Gawk849048
+Node: Bugs849522
+Node: Other Versions853375
+Node: Notes858656
+Node: Compatibility Mode859348
+Node: Additions860131
+Node: Accessing The Source860943
+Node: Adding Code862368
+Node: New Ports868335
+Node: Dynamic Extensions872448
+Node: Internals873824
+Node: Plugin License882343
+Node: Sample Library882977
+Node: Internal File Description883663
+Node: Internal File Ops887378
+Ref: Internal File Ops-Footnote-1892102
+Node: Using Internal File Ops892242
+Node: Future Extensions894619
+Node: Basic Concepts897123
+Node: Basic High Level897880
+Ref: Basic High Level-Footnote-1901915
+Node: Basic Data Typing902100
+Node: Floating Point Issues906625
+Node: String Conversion Precision907708
+Ref: String Conversion Precision-Footnote-1909408
+Node: Unexpected Results909517
+Node: POSIX Floating Point Problems911343
+Ref: POSIX Floating Point Problems-Footnote-1915048
+Node: Glossary915086
+Node: Copying940062
+Node: GNU Free Documentation License977619
+Node: Index1002756

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 930f9345..17703504 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -29140,22 +29140,12 @@ macro guarantees that a @code{NODE}'s wide-string value is current.
It may end up calling an internal @command{gawk} function.
It also guarantees that the wide string is zero-terminated.
-@cindex @code{get_curfunc_arg_count()} internal function
-@cindex internal function, @code{get_curfunc_arg_count()}
-@item size_t get_curfunc_arg_count(void)
-This function returns the actual number of parameters passed
-to the current function. Inside the code of an extension
-this can be used to determine the maximum index which is
-safe to use with @code{get_actual_argument}. If this value is
-greater than @code{nargs}, the function was
-called incorrectly from the @command{awk} program.
-
@cindex parameters@comma{} number of
@cindex @code{nargs} internal variable
@cindex internal variable, @code{nargs}
@item nargs
-Inside an extension function, this is the maximum number of
-expected parameters, as set by the @code{make_builtin()} function.
+Inside an extension function, this is the actual number of
+parameters passed to the current function.
@cindex @code{stptr} internal variable
@cindex internal variable, @code{stptr}
@@ -29201,13 +29191,10 @@ Make sure that @samp{n->type == Node_var_array} first.
@cindex arrays, elements, installing
@cindex @code{assoc_lookup()} internal function
@cindex internal function, @code{assoc_lookup()}
-@item NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference)
+@item NODE **assoc_lookup(NODE *symbol, NODE *subs)
Finds, and installs if necessary, array elements.
@code{symbol} is the array, @code{subs} is the subscript.
This is usually a value created with @code{make_string()} (see below).
-@code{reference} should be @code{TRUE} if it is an error to use the
-value before it is created. Typically, @code{FALSE} is the
-correct value to use from extension functions.
@cindex strings
@cindex @code{make_string()} internal function
@@ -29591,7 +29578,7 @@ do_chdir(int nargs)
NODE *newdir;
int ret = -1;
- if (do_lint && get_curfunc_arg_count() != 1)
+ if (do_lint && nargs != 1)
lintwarn("chdir: called with incorrect number of arguments");
newdir = get_scalar_argument(0, FALSE);
@@ -29664,7 +29651,7 @@ do_stat(int nargs)
char *pmode; /* printable mode */
char *type = "unknown";
- if (do_lint && get_curfunc_arg_count() > 2)
+ if (do_lint && nargs > 2)
lintwarn("stat: called with too many arguments");
@end example
@@ -29698,15 +29685,15 @@ calls are shown here, since they all follow the same pattern:
@example
/* fill in the array */
- aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4));
*aptr = dupnode(file);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4));
*aptr = make_number((AWKNUM) sbuf.st_mode);
unref(tmp);
- aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5));
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
unref(tmp);
diff --git a/eval.c b/eval.c
index e5e07385..47b6ca10 100644
--- a/eval.c
+++ b/eval.c
@@ -1999,32 +1999,32 @@ top:
break;
case Op_equal:
- r = make_number((AWKNUM) cmp_scalar() == 0);
+ r = make_number((AWKNUM) (cmp_scalar() == 0));
REPLACE(r);
break;
case Op_notequal:
- r = make_number((AWKNUM) cmp_scalar() != 0);
+ r = make_number((AWKNUM) (cmp_scalar() != 0));
REPLACE(r);
break;
case Op_less:
- r = make_number((AWKNUM) cmp_scalar() < 0);
+ r = make_number((AWKNUM) (cmp_scalar() < 0));
REPLACE(r);
break;
case Op_greater:
- r = make_number((AWKNUM) cmp_scalar() > 0);
+ r = make_number((AWKNUM) (cmp_scalar() > 0));
REPLACE(r);
break;
case Op_leq:
- r = make_number((AWKNUM) cmp_scalar() <= 0);
+ r = make_number((AWKNUM) (cmp_scalar() <= 0));
REPLACE(r);
break;
case Op_geq:
- r = make_number((AWKNUM) cmp_scalar() >= 0);
+ r = make_number((AWKNUM) (cmp_scalar() >= 0));
REPLACE(r);
break;
@@ -2226,7 +2226,7 @@ mod:
memcpy(p, t1->stptr, t1->stlen);
memcpy(p + t1->stlen, t2->stptr, t2->stlen);
unref(*lhs);
- t1 = *lhs = make_str_node(p, nlen);
+ t1 = *lhs = make_str_node(p, nlen, ALREADY_MALLOCED);
}
DEREF(t2);
break;
@@ -2332,11 +2332,6 @@ mod:
break;
case Op_arrayfor_init:
-#define idx_list sub.nodep.r.av
-#define num_idx sub.nodep.reflags
-#define cur_idx sub.nodep.l.ll
-#define for_array sub.nodep.rn
-
{
NODE **list = NULL;
NODE *array, *sort_str;
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 8aaeb418..dff4cf67 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,7 @@
+2011-08-31 John Haque <j.eh@mchsi.com>
+ * arrayparm.c, filefuncs.c, fork.c, ordchr.c, readfile.c,
+ rwarray.c, testarg.c: Updated.
+
2011-06-23 Arnold D. Robbins <arnold@skeeve.com>
* ChangeLog.0: Rotated ChangeLog into this file.
diff --git a/field.c b/field.c
index af987fad..91789d2f 100644
--- a/field.c
+++ b/field.c
@@ -185,7 +185,7 @@ rebuild_record()
}
}
}
- tmp = make_str_node(ops, tlen);
+ tmp = make_str_node(ops, tlen, ALREADY_MALLOCED);
/*
* Since we are about to unref fields_arr[0], we want to find
diff --git a/int_array.c b/int_array.c
index 913e154b..7bbfb585 100644
--- a/int_array.c
+++ b/int_array.c
@@ -663,35 +663,28 @@ static uint32_t
int_hash(uint32_t k, uint32_t hsize)
{
-/*
- * Bob Jenkins
- * http://burtleburtle.net/bob/hash/integer.html
+/* Code snippet copied from:
+ * Hash functions (http://www.azillionmonkeys.com/qed/hash.html).
+ * Copyright 2004-2008 by Paul Hsieh. Licenced under LGPL 2.1.
*/
-#if 0
- /* 6-shifts vs 7-shifts below */
- k = (k+0x7ed55d16) + (k<<12);
- k = (k^0xc761c23c) ^ (k>>19);
- k = (k+0x165667b1) + (k<<5);
- k = (k+0xd3a2646c) ^ (k<<9);
- k = (k+0xfd7046c5) + (k<<3);
- k = (k^0xb55a4f09) ^ (k>>16);
-#endif
-
- k -= (k << 6);
- k ^= (k >> 17);
- k -= (k << 9);
- k ^= (k << 4);
- k -= (k << 3);
- k ^= (k << 10);
- k ^= (k >> 15);
+ /* This is the final mixing function used by Paul Hsieh
+ * in SuperFastHash.
+ */
+
+ k ^= k << 3;
+ k += k >> 5;
+ k ^= k << 4;
+ k += k >> 17;
+ k ^= k << 25;
+ k += k >> 6;
if (k >= hsize)
k %= hsize;
return k;
}
-/* assoc_find --- locate symbol[subs] */
+/* int_find --- locate symbol[subs] */
static inline NODE **
int_find(NODE *symbol, long k, uint32_t hash1)
diff --git a/main.c b/main.c
index 71699fdf..6b24a80b 100644
--- a/main.c
+++ b/main.c
@@ -827,7 +827,6 @@ static void
cmdline_fs(char *str)
{
NODE **tmp;
- size_t len;
tmp = &FS_node->var_value;
unref(*tmp);
@@ -845,8 +844,7 @@ cmdline_fs(char *str)
str[0] = '\t';
}
- len = scan_escape(str, strlen(str)); /* do process escapes */
- *tmp = make_string(str, len);
+ *tmp = make_str_node(str, strlen(str), SCAN); /* do process escapes */
set_FS();
}
@@ -1137,7 +1135,6 @@ int
arg_assign(char *arg, int initing)
{
char *cp, *cp2;
- size_t cplen;
int badvar;
NODE *var;
NODE *it;
@@ -1199,8 +1196,7 @@ arg_assign(char *arg, int initing)
* BWK awk expands escapes inside assignments.
* This makes sense, so we do it too.
*/
- cplen = scan_escape(cp, strlen(cp));
- it = make_string(cp, cplen);
+ it = make_str_node(cp, strlen(cp), SCAN);
it->flags |= MAYBE_NUM;
#ifdef LC_NUMERIC
/*
diff --git a/node.c b/node.c
index a16c9e0e..73d3ec41 100644
--- a/node.c
+++ b/node.c
@@ -340,29 +340,77 @@ make_number(AWKNUM x)
/* r_make_str_node --- make a string node */
NODE *
-r_make_str_node(const char *s, size_t len, int already_malloced)
+r_make_str_node(const char *s, size_t len, int flags)
{
NODE *r;
-
getnode(r);
r->type = Node_val;
+ r->numbr = 0;
r->flags = (MALLOC|STRING|STRCUR);
r->valref = 1;
- r->numbr = 0;
r->stfmt = -1;
- r->stlen = len;
+
#if MBS_SUPPORT
r->wstptr = NULL;
r->wstlen = 0;
#endif /* MBS_SUPPORT */
- if (already_malloced)
+ if (flags & ALREADY_MALLOCED)
r->stptr = (char *) s;
else {
- emalloc(r->stptr, char *, len + 2, "make_string");
+ emalloc(r->stptr, char *, len + 2, "r_make_str_node");
memcpy(r->stptr, s, len);
}
r->stptr[len] = '\0';
+
+ if ((flags & SCAN) != 0) { /* scan for escape sequences */
+ const char *pf;
+ char *ptm;
+ int c;
+ const char *end;
+#if MBS_SUPPORT
+ mbstate_t cur_state;
+
+ memset(& cur_state, 0, sizeof(cur_state));
+#endif
+
+ end = &(r->stptr[len]);
+ for (pf = ptm = r->stptr; pf < end;) {
+#if MBS_SUPPORT
+ /*
+ * Keep multibyte characters together. This avoids
+ * problems if a subsequent byte of a multibyte
+ * character happens to be a backslash.
+ */
+ if (gawk_mb_cur_max > 1) {
+ int mblen = mbrlen(pf, end-pf, &cur_state);
+
+ if (mblen > 1) {
+ int i;
+
+ for (i = 0; i < mblen; i++)
+ *ptm++ = *pf++;
+ continue;
+ }
+ }
+#endif
+ c = *pf++;
+ if (c == '\\') {
+ c = parse_escape(&pf);
+ if (c < 0) {
+ if (do_lint)
+ lintwarn(_("backslash at end of string"));
+ c = '\\';
+ }
+ *ptm++ = c;
+ } else
+ *ptm++ = c;
+ }
+ len = ptm - r->stptr;
+ erealloc(r->stptr, char *, len + 1, "r_make_str_node");
+ r->stptr[len] = '\0';
+ }
+ r->stlen = len;
return r;
}
@@ -529,61 +577,6 @@ parse_escape(const char **string_ptr)
}
}
-
-/* scan_escape --- scan for escape sequences */
-
-size_t
-scan_escape(char *s, size_t len)
-{
- const char *pf;
- char *ptm;
- int c;
- const char *end;
-#if MBS_SUPPORT
- mbstate_t cur_state;
-
- memset(& cur_state, 0, sizeof(cur_state));
-#endif
-
- end = & s[len];
- for (pf = ptm = s; pf < end;) {
-#if MBS_SUPPORT
- /*
- * Keep multibyte characters together. This avoids
- * problems if a subsequent byte of a multibyte
- * character happens to be a backslash.
- */
- if (gawk_mb_cur_max > 1) {
- int mblen = mbrlen(pf, end-pf, &cur_state);
-
- if (mblen > 1) {
- int i;
-
- for (i = 0; i < mblen; i++)
- *ptm++ = *pf++;
- continue;
- }
- }
-#endif
- c = *pf++;
- if (c == '\\') {
- c = parse_escape(&pf);
- if (c < 0) {
- if (do_lint)
- lintwarn(_("backslash at end of string"));
- c = '\\';
- }
- *ptm++ = c;
- } else
- *ptm++ = c;
- }
-
- len = ptm - s;
- s[len] = '\0';
- return len;
-}
-
-
/* isnondecimal --- return true if number is not a decimal number */
int
diff --git a/symbol.h b/symbol.h
deleted file mode 100644
index d5c2d85a..00000000
--- a/symbol.h
+++ /dev/null
@@ -1,6 +0,0 @@
-extern NODE *install_symbol(char *name, NODETYPE type);
-extern NODE *lookup(const char *name);
-extern void install_params(NODE *paramtab, int pcount);
-extern void remove_params(NODE *paramtab, int pcount);
-extern NODE *remove_symbol(char *name);
-extern void destroy_symbol(char *name);
diff --git a/test/fnarray2.in b/test/fnarray2.in
new file mode 100644
index 00000000..587be6b4
--- /dev/null
+++ b/test/fnarray2.in
@@ -0,0 +1 @@
+x