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/time.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/time.c')
-rw-r--r-- | extension/time.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/extension/time.c b/extension/time.c index e6b2b39f..01be7784 100644 --- a/extension/time.c +++ b/extension/time.c @@ -103,15 +103,12 @@ int plugin_is_GPL_compatible; * on the platform */ static awk_value_t * -do_gettimeofday(int nargs, awk_value_t *result) +do_gettimeofday(int nargs, awk_value_t *result, struct awk_ext_func *unused) { double curtime; assert(result != NULL); - if (do_lint && nargs > 0) - lintwarn(ext_id, _("gettimeofday: ignoring arguments")); - #if defined(HAVE_GETTIMEOFDAY) { struct timeval tv; @@ -153,7 +150,7 @@ do_gettimeofday(int nargs, awk_value_t *result) * did not complete successfully (perhaps interrupted) */ static awk_value_t * -do_sleep(int nargs, awk_value_t *result) +do_sleep(int nargs, awk_value_t *result, struct awk_ext_func *unused) { awk_value_t num; double secs; @@ -161,9 +158,6 @@ do_sleep(int nargs, awk_value_t *result) assert(result != NULL); - if (do_lint && nargs > 1) - lintwarn(ext_id, _("sleep: called with too many arguments")); - if (! get_argument(0, AWK_NUMBER, &num)) { update_ERRNO_string(_("sleep: missing required numeric argument")); return make_number(-1, result); @@ -212,8 +206,8 @@ do_sleep(int nargs, awk_value_t *result) } static awk_ext_func_t func_table[] = { - { "gettimeofday", do_gettimeofday, 0 }, - { "sleep", do_sleep, 1 }, + { "gettimeofday", do_gettimeofday, 0, 0, awk_false, NULL }, + { "sleep", do_sleep, 1, 1, awk_false, NULL }, }; /* define the dl_load function using the boilerplate macro */ |