diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-22 17:35:08 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-22 17:35:08 +0200 |
commit | cd820dc4359b8dc1a40fedc0c5d3924ed8f88df0 (patch) | |
tree | 17ce84a9a1907783c7839b2dd6fd9afefe303815 /extension/fnmatch.c | |
parent | 0eb15bcef4ca13a329c9bf3d5e608e29bbce42ad (diff) | |
parent | 0f15f82e19b32823fe3fdf51052389ca3b60e92e (diff) | |
download | egawk-cd820dc4359b8dc1a40fedc0c5d3924ed8f88df0.tar.gz egawk-cd820dc4359b8dc1a40fedc0c5d3924ed8f88df0.tar.bz2 egawk-cd820dc4359b8dc1a40fedc0c5d3924ed8f88df0.zip |
Merge branch 'master' into feature/regex-to-api
Diffstat (limited to 'extension/fnmatch.c')
-rw-r--r-- | extension/fnmatch.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/extension/fnmatch.c b/extension/fnmatch.c index f5fb02c6..5382e4bc 100644 --- a/extension/fnmatch.c +++ b/extension/fnmatch.c @@ -95,7 +95,7 @@ int plugin_is_GPL_compatible; /* do_fnmatch --- implement the fnmatch interface */ static awk_value_t * -do_fnmatch(int nargs, awk_value_t *result) +do_fnmatch(int nargs, awk_value_t *result, struct awk_ext_func *unused) { #ifdef HAVE_FNMATCH_H static int flags_mask = @@ -107,13 +107,8 @@ do_fnmatch(int nargs, awk_value_t *result) int int_flags, retval; make_number(-1.0, result); /* default return */ -#ifdef HAVE_FNMATCH - if (nargs < 3) { - warning(ext_id, _("fnmatch: called with less than three arguments")); - goto out; - } else if (do_lint && nargs > 3) - lintwarn(ext_id, _("fnmatch: called with more than three arguments")); +#ifdef HAVE_FNMATCH if (! get_argument(0, AWK_STRING, & pattern)) { warning(ext_id, _("fnmatch: could not get first argument")); goto out; @@ -199,7 +194,7 @@ init_fnmatch(void) } static awk_ext_func_t func_table[] = { - { "fnmatch", do_fnmatch, 3 }, + { "fnmatch", do_fnmatch, 3, 3, awk_false, NULL }, }; /* define the dl_load function using the boilerplate macro */ |