aboutsummaryrefslogtreecommitdiffstats
path: root/extension/filefuncs.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-12-14 21:25:20 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-12-14 21:25:20 +0200
commit0855ef4db6d8e0d1d57776eb273c9de321bfd6cf (patch)
tree360dc72f0eecdeed3cb15154c55f767fa0508caa /extension/filefuncs.c
parent539de0a854fb94fd6ba47e91cee55f22fcd851a3 (diff)
downloadegawk-0855ef4db6d8e0d1d57776eb273c9de321bfd6cf.tar.gz
egawk-0855ef4db6d8e0d1d57776eb273c9de321bfd6cf.tar.bz2
egawk-0855ef4db6d8e0d1d57776eb273c9de321bfd6cf.zip
Fix lint stuff, arg checking. Add a data pointer. Pass finfo to functions.
Diffstat (limited to 'extension/filefuncs.c')
-rw-r--r--extension/filefuncs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index de293bee..696a8599 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -153,7 +153,7 @@ int plugin_is_GPL_compatible;
/* do_chdir --- provide dynamically loaded chdir() function for gawk */
static awk_value_t *
-do_chdir(int nargs, awk_value_t *result)
+do_chdir(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
awk_value_t newdir;
int ret = -1;
@@ -458,7 +458,7 @@ fill_stat_array(const char *name, awk_array_t array, struct stat *sbuf)
/* do_stat --- provide a stat() function for gawk */
static awk_value_t *
-do_stat(int nargs, awk_value_t *result)
+do_stat(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
awk_value_t file_param, array_param;
char *name;
@@ -503,7 +503,7 @@ do_stat(int nargs, awk_value_t *result)
/* do_statvfs --- provide a statvfs() function for gawk */
static awk_value_t *
-do_statvfs(int nargs, awk_value_t *result)
+do_statvfs(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
awk_value_t file_param, array_param;
char *name;
@@ -599,7 +599,7 @@ init_filefuncs(void)
*/
static awk_value_t *
-do_fts(int nargs, awk_value_t *result)
+do_fts(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
fatal(ext_id, _("fts is not supported on this system"));
@@ -814,7 +814,7 @@ process(FTS *heirarchy, awk_array_t destarray, int seedot)
*/
static awk_value_t *
-do_fts(int nargs, awk_value_t *result)
+do_fts(int nargs, awk_value_t *result, struct awk_ext_func *unused)
{
awk_value_t pathlist, flagval, dest;
awk_flat_array_t *path_array = NULL;
@@ -913,13 +913,13 @@ out:
#endif /* ! __MINGW32__ */
static awk_ext_func_t func_table[] = {
- { "chdir", do_chdir, 1, 1 },
- { "stat", do_stat, 3, 2 },
+ { "chdir", do_chdir, 1, 1, awk_false, NULL },
+ { "stat", do_stat, 2, 3, awk_false, NULL },
#ifndef __MINGW32__
- { "fts", do_fts, 3, 3 },
+ { "fts", do_fts, 3, 3, awk_false, NULL },
#endif
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)
- { "statvfs", do_statvfs, 2, 2 },
+ { "statvfs", do_statvfs, 2, 2, awk_false, NULL },
#endif
};