diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-06-12 22:10:31 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-06-12 22:10:31 +0300 |
commit | 820b6a2ccb7859e15ade36af6ac1d0d08c1da4b1 (patch) | |
tree | e820c47953f997e8d267854fd921417d61d8ec3a /extension/time.c | |
parent | b4a2d75b7d9fd23069a55dc91a42f7fddd0c7570 (diff) | |
download | egawk-820b6a2ccb7859e15ade36af6ac1d0d08c1da4b1.tar.gz egawk-820b6a2ccb7859e15ade36af6ac1d0d08c1da4b1.tar.bz2 egawk-820b6a2ccb7859e15ade36af6ac1d0d08c1da4b1.zip |
Further cleanups and improvements in API.
Diffstat (limited to 'extension/time.c')
-rw-r--r-- | extension/time.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/extension/time.c b/extension/time.c index 4f590c88..09e71d0e 100644 --- a/extension/time.c +++ b/extension/time.c @@ -116,8 +116,7 @@ do_sleep(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "sleep: called with too many arguments"); - - if (get_curfunc_param(0, AWK_NUMBER, &num) == NULL) { + if (get_argument(0, AWK_NUMBER, &num) == NULL) { update_ERRNO_string("sleep: missing required numeric argument", 1); return make_number(-1, result); } @@ -151,7 +150,7 @@ do_sleep(int nargs, awk_value_t *result) #else /* no way to sleep on this platform */ rc = -1; - set_ERRNO("sleep: not supported on this platform"); + update_ERRNO_str("sleep: not supported on this platform", 0); #endif return make_number(rc, result); |