aboutsummaryrefslogtreecommitdiffstats
path: root/extension/fnmatch.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-12-06 22:06:26 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-12-06 22:06:26 +0200
commitf2b6d100d8958a9c811c950f113a0ce38a25d484 (patch)
tree53c03280dab7f88134bbcdad1279f13cf12b0cf6 /extension/fnmatch.c
parent0dd8054d05d8286f2f7cbcf85456c6953a9b6146 (diff)
downloadegawk-f2b6d100d8958a9c811c950f113a0ce38a25d484.tar.gz
egawk-f2b6d100d8958a9c811c950f113a0ce38a25d484.tar.bz2
egawk-f2b6d100d8958a9c811c950f113a0ce38a25d484.zip
Add min_required and max_expected arg counts to API.
Diffstat (limited to 'extension/fnmatch.c')
-rw-r--r--extension/fnmatch.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/extension/fnmatch.c b/extension/fnmatch.c
index f5fb02c6..caf64a7b 100644
--- a/extension/fnmatch.c
+++ b/extension/fnmatch.c
@@ -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 },
};
/* define the dl_load function using the boilerplate macro */