Rev 4874 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | /* |
2 | * localtime.c |
||
3 | */ |
||
4 | |||
5 | /* |
||
6 | FUNCTION |
||
7 | < |
||
8 | |||
9 | INDEX |
||
10 | localtime |
||
11 | INDEX |
||
12 | localtime_r |
||
13 | |||
14 | ANSI_SYNOPSIS |
||
15 | #include |
||
16 | struct tm *localtime(time_t *<[clock]>); |
||
17 | struct tm *localtime_r(time_t *<[clock]>, struct tm *<[res]>); |
||
18 | |||
19 | TRAD_SYNOPSIS |
||
20 | #include |
||
21 | struct tm *localtime(<[clock]>) |
||
22 | time_t *<[clock]>; |
||
23 | struct tm *localtime(<[clock]>, <[res]>) |
||
24 | time_t *<[clock]>; |
||
25 | struct tm *<[res]>; |
||
26 | |||
27 | DESCRIPTION |
||
28 | < |
||
29 | converts its representation from the arithmetic representation to the |
||
30 | traditional representation defined by < |
||
31 | |||
32 | < |
||
33 | storage; each call to < |
||
34 | information generated by previous calls to either function. |
||
35 | |||
36 | < |
||
37 | |||
38 | RETURNS |
||
39 | A pointer to the traditional time representation (< |
||
40 | |||
41 | PORTABILITY |
||
42 | ANSI C requires < |
||
43 | |||
44 | < |
||
45 | */ |
||
46 | |||
47 | #include |
||
48 | #include |
||
49 | |||
50 | #ifndef _REENT_ONLY |
||
51 | |||
52 | struct tm * |
||
53 | _DEFUN (localtime, (tim_p), |
||
54 | _CONST time_t * tim_p) |
||
55 | { |
||
4921 | Serge | 56 | struct _reent *reent = _REENT; |
57 | |||
58 | _REENT_CHECK_TM(reent); |
||
59 | return localtime_r (tim_p, (struct tm *)_REENT_TM(reent)); |
||
4349 | Serge | 60 | } |
61 | |||
62 | #endif |