diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-22 17:37:49 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-22 17:37:49 +0200 |
commit | af6f677758c6b873fb3130b34705e2a705270a75 (patch) | |
tree | 64de0a1c1d969e5ce687e873535637c117d60935 /extension/fnmatch.c | |
parent | 293b5a86a9053668773e75b35682c41ca64e0db6 (diff) | |
parent | cd820dc4359b8dc1a40fedc0c5d3924ed8f88df0 (diff) | |
download | egawk-af6f677758c6b873fb3130b34705e2a705270a75.tar.gz egawk-af6f677758c6b873fb3130b34705e2a705270a75.tar.bz2 egawk-af6f677758c6b873fb3130b34705e2a705270a75.zip |
Merge branch 'feature/regex-to-api' into feature/andy
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 */ |