OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [time/] [ctime.c] - Blame information for rev 455

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/*
2
 * ctime.c
3
 * Original Author:     G. Haley
4
 */
5
 
6
/*
7
FUNCTION
8
<<ctime>>---convert time to local and format as string
9
 
10
INDEX
11
        ctime
12
INDEX
13
        ctime_r
14
 
15
ANSI_SYNOPSIS
16
        #include <time.h>
17
        char *ctime(const time_t *<[clock]>);
18
        char *ctime_r(const time_t *<[clock]>, char *<[buf]>);
19
 
20
TRAD_SYNOPSIS
21
        #include <time.h>
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 <<localtime>>)
31
and format it into a string of the form
32
. Wed Jun 15 11:38:07 1988\n\0
33
(like <<asctime>>).
34
 
35
RETURNS
36
A pointer to the string containing a formatted timestamp.
37
 
38
PORTABILITY
39
ANSI C requires <<ctime>>.
40
 
41
<<ctime>> requires no supporting OS subroutines.
42
*/
43
 
44
#include <time.h>
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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.