Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1906 | serge | 1 | /* |
2 | * ctime.c |
||
3 | * Original Author: G. Haley |
||
4 | */ |
||
5 | |||
6 | /* |
||
7 | FUNCTION |
||
8 | < |
||
9 | |||
10 | INDEX |
||
11 | ctime |
||
12 | INDEX |
||
13 | ctime_r |
||
14 | |||
15 | ANSI_SYNOPSIS |
||
16 | #include |
||
17 | char *ctime(const time_t *<[clock]>); |
||
18 | char *ctime_r(const time_t *<[clock]>, char *<[buf]>); |
||
19 | |||
20 | TRAD_SYNOPSIS |
||
21 | #include |
||
22 | char *ctime(<[clock]>) |
||
23 | time_t *<[clock]>; |
||
24 | |||
25 | char *ctime_r(<[clock]>, <[buf]>) |
||
26 | time_t *<[clock]>; |
||
27 | char *<[buf]>; |
||
28 | |||
29 | DESCRIPTION |
||
30 | Convert the time value at <[clock]> to local time (like < |
||
31 | and format it into a string of the form |
||
32 | . Wed Jun 15 11:38:07 1988\n\0 |
||
33 | (like < |
||
34 | |||
35 | RETURNS |
||
36 | A pointer to the string containing a formatted timestamp. |
||
37 | |||
38 | PORTABILITY |
||
39 | ANSI C requires < |
||
40 | |||
41 | < |
||
42 | */ |
||
43 | |||
44 | #include |
||
45 | |||
46 | #ifndef _REENT_ONLY |
||
47 | |||
48 | char * |
||
49 | _DEFUN (ctime, (tim_p), |
||
50 | _CONST time_t * tim_p) |
||
51 | { |
||
52 | return asctime (localtime (tim_p)); |
||
53 | } |
||
54 | |||
55 | #endif |