pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
1998-01-29
1998-01-29 21:13:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>
05a6f1f89e91e7d3c78381dd46afb5bf9652b158 (
10
lines) (+
6
/-
4
)
[
Show
|
Annotate
]
Branch:
0.5
Fix for ctime().
Rev: src/builtin_functions.c:1.59
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
58
1997
/
11
/
17
03
:
23
:
14
hubbe
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
59
1998
/
01
/
29
21
:
13
:
47
grubba
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
109:
void f_ctime(INT32 args) {
-
INT32
i;
+
time_t
i;
+
if(!args) error("Too few arguments to ctime()\n"); if(sp[-args].type != T_INT) error("Bad argument 1 to ctime()\n");
-
i=sp[-args].u.integer;
+
i=
(time_t)
sp[-args].u.integer;
pop_n_elems(args);
-
push_string(make_shared_string(ctime(
(time_t *)
&i)));
+
push_string(make_shared_string(ctime(&i)));
} void f_lower_case(INT32 args)