diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-16 14:02:26 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-12-16 14:02:26 +0200 |
commit | 570758ee453fb42451f52a451e75d0a51c732cde (patch) | |
tree | e4a85c39cbde09a813cd3e0342392493ef64eeda /interpret.h | |
parent | 0855ef4db6d8e0d1d57776eb273c9de321bfd6cf (diff) | |
download | egawk-570758ee453fb42451f52a451e75d0a51c732cde.tar.gz egawk-570758ee453fb42451f52a451e75d0a51c732cde.tar.bz2 egawk-570758ee453fb42451f52a451e75d0a51c732cde.zip |
Further improvements to min/max args code and doc.
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/interpret.h b/interpret.h index 79e7228e..7a8db88d 100644 --- a/interpret.h +++ b/interpret.h @@ -955,18 +955,18 @@ arrayfor: case Op_ext_builtin: { - int arg_count = pc->expr_count; + size_t arg_count = pc->expr_count; awk_ext_func_t *f = pc[1].c_func; - int min_req = f->min_required_args; - int max_expect = f->max_expected_args; + size_t min_req = f->min_required_args; + size_t max_expect = f->max_expected_args; awk_value_t result; if (arg_count < min_req) - fatal(_("%s: called with %d arguments, expecting at least %d"), + fatal(_("%s: called with %lu arguments, expecting at least %lu"), pc[1].func_name, arg_count, min_req); - if (do_lint && ! f->suppress_lint && arg_count > max_expect) - lintwarn(_("%s: called with %d arguments, expecting no more than %d"), + if (do_lint && max_expect > 0 && arg_count > max_expect && ! f->suppress_lint) + lintwarn(_("%s: called with %lu arguments, expecting no more than %lu"), pc[1].func_name, arg_count, max_expect); PUSH_CODE(pc); |