summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-01-07 21:01:37 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-01-07 21:01:37 +0200
commitda0b4cf9b7eac0c0e9b8b47f456c748c8b1d3720 (patch)
tree999ff59072b85a7be151ab77b022f03a53f185cc
parent4eee688d1ff5059db3d40af26df188b90368589c (diff)
parent56213f42462dc91f4de5a509095dd8bfc4aeef84 (diff)
downloadgawk-new-vms.tar.gz
Merge branch 'gawk-4.1-stable' into new-vmsnew-vms
-rw-r--r--ChangeLog6
-rw-r--r--command.c6
-rw-r--r--command.y6
-rw-r--r--ext.c4
-rw-r--r--old-extension/ChangeLog7
-rw-r--r--old-extension/dbarray.awk2
-rw-r--r--old-extension/record.awk4
-rw-r--r--old-extension/spec_array.c2
-rw-r--r--old-extension/testsparr.awk2
9 files changed, 26 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 7907919c..04e7ff03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * command.y (next_word): Move into ifdef for HAVE_LIBREADLINE,
+ since it's only used by that code.
+ * ext.c (load_old_ext): Minor improvements.
+
2014-01-03 Arnold D. Robbins <arnold@skeeve.com>
* config.guess, config.rpath, config.sub, depcomp,
diff --git a/command.c b/command.c
index d170e4c1..91a8335e 100644
--- a/command.c
+++ b/command.c
@@ -99,10 +99,10 @@ static bool in_eval = false;
static const char start_EVAL[] = "function @eval(){";
static const char end_EVAL[] = "}";
static CMDARG *append_statement(CMDARG *stmt_list, char *stmt);
-static char *next_word(char *p, int len, char **endp);
static NODE *concat_args(CMDARG *a, int count);
#ifdef HAVE_LIBREADLINE
+static char *next_word(char *p, int len, char **endp);
static void history_expand_line(char **line);
static char *command_generator(const char *text, int state);
static char *srcfile_generator(const char *text, int state);
@@ -3395,6 +3395,8 @@ do_help(CMDARG *arg, int cmd)
}
+#ifdef HAVE_LIBREADLINE
+
/* next_word --- find the next word in a line to complete
* (word seperation characters are space and tab).
*/
@@ -3421,8 +3423,6 @@ next_word(char *p, int len, char **endp)
return p;
}
-#ifdef HAVE_LIBREADLINE
-
/* command_completion --- attempt to complete based on the word number in line;
* try to complete on command names if this is the first word; for the next
* word(s), the type of completion depends on the command name (first word).
diff --git a/command.y b/command.y
index f6c79812..acf4a602 100644
--- a/command.y
+++ b/command.y
@@ -51,10 +51,10 @@ static bool in_eval = false;
static const char start_EVAL[] = "function @eval(){";
static const char end_EVAL[] = "}";
static CMDARG *append_statement(CMDARG *stmt_list, char *stmt);
-static char *next_word(char *p, int len, char **endp);
static NODE *concat_args(CMDARG *a, int count);
#ifdef HAVE_LIBREADLINE
+static char *next_word(char *p, int len, char **endp);
static void history_expand_line(char **line);
static char *command_generator(const char *text, int state);
static char *srcfile_generator(const char *text, int state);
@@ -1459,6 +1459,8 @@ do_help(CMDARG *arg, int cmd)
}
+#ifdef HAVE_LIBREADLINE
+
/* next_word --- find the next word in a line to complete
* (word seperation characters are space and tab).
*/
@@ -1485,8 +1487,6 @@ next_word(char *p, int len, char **endp)
return p;
}
-#ifdef HAVE_LIBREADLINE
-
/* command_completion --- attempt to complete based on the word number in line;
* try to complete on command names if this is the first word; for the next
* word(s), the type of completion depends on the command name (first word).
diff --git a/ext.c b/ext.c
index 9e17761a..60765e07 100644
--- a/ext.c
+++ b/ext.c
@@ -174,9 +174,9 @@ load_old_ext(SRCFILE *s, const char *init_func, const char *fini_func, NODE *obj
fatal(_("`extension' is a gawk extension"));
if (lib_name == NULL)
- fatal(_("load_ext: received NULL lib_name"));
+ fatal(_("extension: received NULL lib_name"));
- if ((dl = dlopen(s->fullpath, flags)) == NULL)
+ if ((dl = dlopen(lib_name, flags)) == NULL)
fatal(_("extension: cannot open library `%s' (%s)"), lib_name,
dlerror());
diff --git a/old-extension/ChangeLog b/old-extension/ChangeLog
index a25295a6..55c8d31d 100644
--- a/old-extension/ChangeLog
+++ b/old-extension/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dbarray.awk: Use full name for lib to load in extenstion() call.
+ * record.awk: Ditto.
+ * testsparr.awk: Ditto.
+ * spec_array.c [SUPER]: Fix so that it will compile.
+
2013-01-06 Arnold D. Robbins <arnold@skeeve.com>
* bindarr.c, dbarray.awk, fileop.c, record.awk, sparr.c,
diff --git a/old-extension/dbarray.awk b/old-extension/dbarray.awk
index e0a3c093..1e31f58f 100644
--- a/old-extension/dbarray.awk
+++ b/old-extension/dbarray.awk
@@ -3,7 +3,7 @@
# @load "bindarr"
BEGIN {
- extension("bindarr")
+ extension("./bindarr.so")
}
function _db_count(symbol, sq,
diff --git a/old-extension/record.awk b/old-extension/record.awk
index 18a3ce48..ff89110d 100644
--- a/old-extension/record.awk
+++ b/old-extension/record.awk
@@ -30,8 +30,8 @@
#
BEGIN {
- extension("fileop.so")
- extension("bindarr.so")
+ extension("./fileop.so")
+ extension("./bindarr.so")
}
# _record_count --- return the number of records in file
diff --git a/old-extension/spec_array.c b/old-extension/spec_array.c
index 78b24018..248783bb 100644
--- a/old-extension/spec_array.c
+++ b/old-extension/spec_array.c
@@ -40,7 +40,7 @@ typedef struct spec_array {
* the base array is str_array.
*/
-#define SUPER(F) (*str_array_func[AFUNC(F)])
+#define SUPER(F) (*str_array_func[F ## _ind])
/*
diff --git a/old-extension/testsparr.awk b/old-extension/testsparr.awk
index 648a21a2..a9e3119d 100644
--- a/old-extension/testsparr.awk
+++ b/old-extension/testsparr.awk
@@ -1,6 +1,6 @@
# ../gawk -lsparr -f testsparr.awk
BEGIN {
- extension("sparr")
+ extension("./sparr.so")
print SYS["time"]
SYS["readline"] = "sparr.c";
printf("File %s has %d lines\n", SYS["readline"], length(READLINE))