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/time.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/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 */ |