aboutsummaryrefslogtreecommitdiffstats
path: root/extension/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'extension/time.c')
-rw-r--r--extension/time.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/extension/time.c b/extension/time.c
index 60e569a8..7e3fc521 100644
--- a/extension/time.c
+++ b/extension/time.c
@@ -37,6 +37,10 @@
#include "config.h"
#include "gawkapi.h"
+#include "gettext.h"
+#define _(msgid) gettext(msgid)
+#define N_(msgid) msgid
+
static const gawk_api_t *api; /* for convenience macros to work */
static awk_ext_id_t *ext_id;
static awk_bool_t (*init_func)(void) = NULL;
@@ -66,7 +70,7 @@ do_gettimeofday(int nargs, awk_value_t *result)
assert(result != NULL);
if (do_lint && nargs > 0)
- lintwarn(ext_id, "gettimeofday: ignoring arguments");
+ lintwarn(ext_id, _("gettimeofday: ignoring arguments"));
#if defined(HAVE_GETTIMEOFDAY)
{
@@ -97,7 +101,7 @@ do_gettimeofday(int nargs, awk_value_t *result)
#else
/* no way to retrieve system time on this platform */
curtime = -1;
- update_ERRNO_string("gettimeofday: not supported on this platform");
+ update_ERRNO_string(_("gettimeofday: not supported on this platform"));
#endif
return make_number(curtime, result);
@@ -118,16 +122,16 @@ 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");
+ lintwarn(ext_id, _("sleep: called with too many arguments"));
if (! get_argument(0, AWK_NUMBER, &num)) {
- update_ERRNO_string("sleep: missing required numeric argument");
+ update_ERRNO_string(_("sleep: missing required numeric argument"));
return make_number(-1, result);
}
secs = num.num_value;
if (secs < 0) {
- update_ERRNO_string("sleep: argument is negative");
+ update_ERRNO_string(_("sleep: argument is negative"));
return make_number(-1, result);
}
@@ -154,7 +158,7 @@ do_sleep(int nargs, awk_value_t *result)
#else
/* no way to sleep on this platform */
rc = -1;
- update_ERRNO_str("sleep: not supported on this platform");
+ update_ERRNO_str(_("sleep: not supported on this platform"));
#endif
return make_number(rc, result);