diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/ChangeLog | 5 | ||||
-rw-r--r-- | extension/filefuncs.c | 4 | ||||
-rw-r--r-- | extension/testext.c | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog index f324bdeb..c54d3b25 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2014-09-29 Arnold D. Robbins <arnold@skeeve.com> + + * filefuncs.c: Minor edits to sync with documentation. + * testext.c: Add test to get PROCINFO, expected to fail. + 2014-08-12 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (RM): Define for makes that don't have it, diff --git a/extension/filefuncs.c b/extension/filefuncs.c index d5249a4e..a20e9ff7 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -145,7 +145,7 @@ static const char *ext_version = "filefuncs extension: version 1.0"; int plugin_is_GPL_compatible; -/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ +/* do_chdir --- provide dynamically loaded chdir() function for gawk */ static awk_value_t * do_chdir(int nargs, awk_value_t *result) @@ -448,7 +448,7 @@ fill_stat_array(const char *name, awk_array_t array, struct stat *sbuf) } } - array_set(array, "type", make_const_string(type, strlen(type), &tmp)); + array_set(array, "type", make_const_string(type, strlen(type), & tmp)); return 0; } diff --git a/extension/testext.c b/extension/testext.c index 2dda339f..7462265b 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -302,6 +302,12 @@ var_test(int nargs, awk_value_t *result) goto out; } + /* look up PROCINFO - should fail */ + if (sym_lookup("PROCINFO", AWK_ARRAY, & value)) + printf("var_test: sym_lookup of PROCINFO failed - got a value!\n"); + else + printf("var_test: sym_lookup of PROCINFO passed - did not get a value\n"); + /* look up a reserved variable - should pass */ if (sym_lookup("ARGC", AWK_NUMBER, & value)) printf("var_test: sym_lookup of ARGC passed - got a value!\n"); |