aboutsummaryrefslogtreecommitdiffstats
path: root/extension/fnmatch.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-12-22 17:29:53 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-12-22 17:29:53 +0200
commit2af62b50e5b9574c0e169fb4d99c4912e56eef1f (patch)
treef4f264291d6597090fb36fc7f7cd725a105f557c /extension/fnmatch.c
parent1358693d2464c89a8d715fa6104ed36b48e45990 (diff)
parent0f15f82e19b32823fe3fdf51052389ca3b60e92e (diff)
downloadegawk-2af62b50e5b9574c0e169fb4d99c4912e56eef1f.tar.gz
egawk-2af62b50e5b9574c0e169fb4d99c4912e56eef1f.tar.bz2
egawk-2af62b50e5b9574c0e169fb4d99c4912e56eef1f.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'extension/fnmatch.c')
-rw-r--r--extension/fnmatch.c11
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 */