[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/modules/time.c,v
From: |
Eric Blake |
Subject: |
Changes to m4/modules/time.c,v |
Date: |
Sat, 10 Jun 2006 13:10:59 +0000 |
CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/06/10 13:10:57
Index: modules/time.c
===================================================================
RCS file: /sources/m4/m4/modules/time.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- modules/time.c 1 May 2005 11:10:05 -0000 1.13
+++ modules/time.c 10 Jun 2006 13:10:57 -0000 1.14
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -95,9 +95,13 @@
M4BUILTIN_HANDLER (ctime)
{
time_t t;
+ int i;
if (argc == 2)
- m4_numeric_arg (context, argc, argv, 1, (int *) &t);
+ {
+ m4_numeric_arg (context, argc, argv, 1, &i);
+ t = i;
+ }
else
t = time (0L);
@@ -140,10 +144,12 @@
M4BUILTIN_HANDLER (gmtime)
{
time_t t;
+ int i;
- if (!m4_numeric_arg (context, argc, argv, 1, (int *) &t))
+ if (!m4_numeric_arg (context, argc, argv, 1, &i))
return;
+ t = i;
format_tm (obs, gmtime (&t));
}
@@ -153,10 +159,12 @@
M4BUILTIN_HANDLER (localtime)
{
time_t t;
+ int i;
- if (!m4_numeric_arg (context, argc, argv, 1, (int *) &t))
+ if (!m4_numeric_arg (context, argc, argv, 1, &i))
return;
+ t = i;
format_tm (obs, localtime (&t));
}
@@ -201,9 +209,10 @@
char *buf;
int l;
- if (!m4_numeric_arg (context, argc, argv, 2, (int *) &t))
+ if (!m4_numeric_arg (context, argc, argv, 2, &l))
return;
+ t = l;
tm = localtime (&t);
buf = (char *) obstack_alloc (obs, 1024);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to m4/modules/time.c,v,
Eric Blake <=