summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-10-31 19:51:04 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-10-31 19:51:04 +0200
commit993eaa708f7785e0ab5c1b1e53ddf4abe1d835e4 (patch)
tree41af325f0266b3316de634a57fa12ffa2b86c6b2
parentcec88d59be5ef7c50647e45f5aeb3d9260236705 (diff)
downloadgawk-993eaa708f7785e0ab5c1b1e53ddf4abe1d835e4.tar.gz
Some minor fixes. See ChangeLog.
-rw-r--r--ChangeLog10
-rw-r--r--awkgram.c4
-rw-r--r--awkgram.y4
-rw-r--r--field.c2
-rw-r--r--gawkapi.h2
-rw-r--r--symbol.c12
6 files changed, 22 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index c0e13a11..a63223db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2012-10-31 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (want_regexp): Use as a bool, not as an int.
+ * field.c: Fix a comment.
+ * gawkapi.h: Add comment to include <errno.h>.
+ * symbol.c (load_symbols): ``No automatic aggregate initialization.''
+ Here too. Sigh again.
+
2012-10-28 Arnold D. Robbins <arnold@skeeve.com>
- * Update bison 2.6.3. Various files regenerated.
+ * Update to bison 2.6.4. Various files regenerated.
2012-10-27 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/awkgram.c b/awkgram.c
index 56b769f6..09ec7b1e 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -127,7 +127,7 @@ static ssize_t read_one_line(int fd, void *buffer, size_t count);
static int one_line_close(int fd);
static bool want_source = false;
-static bool want_regexp; /* lexical scanning kludge */
+static bool want_regexp = false; /* lexical scanning kludge */
static char *in_function; /* parsing kludge */
static bool symtab_used = false; /* program used SYMTAB */
static int rule = 0;
@@ -2345,7 +2345,7 @@ yyreduce:
case 33:
/* Line 1813 of yacc.c */
#line 401 "awkgram.y"
- { ++want_regexp; }
+ { want_regexp = true; }
break;
case 34:
diff --git a/awkgram.y b/awkgram.y
index 91e791ab..e7d44b83 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -86,7 +86,7 @@ static ssize_t read_one_line(int fd, void *buffer, size_t count);
static int one_line_close(int fd);
static bool want_source = false;
-static bool want_regexp; /* lexical scanning kludge */
+static bool want_regexp = false; /* lexical scanning kludge */
static char *in_function; /* parsing kludge */
static bool symtab_used = false; /* program used SYMTAB */
static int rule = 0;
@@ -398,7 +398,7 @@ regexp
* is a regexp so it should read up to the closing slash.
*/
: a_slash
- { ++want_regexp; }
+ { want_regexp = true; }
REGEXP /* The terminating '/' is consumed by yylex(). */
{
NODE *n, *exp;
diff --git a/field.c b/field.c
index 9b5a22cd..6bbab8d5 100644
--- a/field.c
+++ b/field.c
@@ -1075,7 +1075,7 @@ do_patsplit(int nargs)
if (sep_arr == arr)
fatal(_("patsplit: cannot use the same array for second and fourth args"));
- /* This checks need to be done before clearing any of the arrays */
+ /* These checks need to be done before clearing any of the arrays */
for (tmp = sep_arr->parent_array; tmp != NULL; tmp = tmp->parent_array)
if (tmp == arr)
fatal(_("patsplit: cannot use a subarray of second arg for fourth arg"));
diff --git a/gawkapi.h b/gawkapi.h
index 30b0e939..4466ef31 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -29,6 +29,8 @@
* You must include <stddef.h> or <stdlib.h> to get size_t's definition.
* You should also include <stdio.h> if you intend to use
* the dl_load_func convenience macro.
+ * To pass reasonable integer values for ERRNO, you will need to
+ * include <errno.h>.
*/
#ifndef _GAWK_API_H
diff --git a/symbol.c b/symbol.c
index dc87ed90..1e0e474b 100644
--- a/symbol.c
+++ b/symbol.c
@@ -521,16 +521,16 @@ load_symbols()
long i, j, max;
NODE *user, *extension, *untyped, *scalar, *array;
NODE **list;
- NODE *tables[] = {
- func_table,
- symbol_table,
- global_table,
- NULL
- };
+ NODE *tables[4];
if (PROCINFO_node == NULL)
return;
+ tables[0] = func_table;
+ tables[1] = symbol_table;
+ tables[2] = global_table;
+ tables[3] = NULL;
+
tmp = make_string("identifiers", 11);
aptr = assoc_lookup(PROCINFO_node, tmp);