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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [time/] [asctime.c] - Blame information for rev 258

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

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * asctime.c
3
 * Original Author:     G. Haley
4
 *
5
 * Converts the broken down time in the structure pointed to by tim_p into a
6
 * string of the form
7
 *
8
 * Wed Jun 15 11:38:07 1988\n\0
9
 *
10
 * Returns a pointer to the string.
11
 */
12
 
13
/*
14
FUNCTION
15
<<asctime>>---format time as string
16
 
17
INDEX
18
        asctime
19
INDEX
20
        _asctime_r
21
 
22
ANSI_SYNOPSIS
23
        #include <time.h>
24
        char *asctime(const struct tm *<[clock]>);
25
        char *_asctime_r(const struct tm *<[clock]>, char *<[buf]>);
26
 
27
TRAD_SYNOPSIS
28
        #include <time.h>
29
        char *asctime(<[clock]>)
30
        struct tm *<[clock]>;
31
        char *asctime_r(<[clock]>)
32
        struct tm *<[clock]>;
33
        char *<[buf]>;
34
 
35
DESCRIPTION
36
Format the time value at <[clock]> into a string of the form
37
. Wed Jun 15 11:38:07 1988\n\0
38
The string is generated in a static buffer; each call to <<asctime>>
39
overwrites the string generated by previous calls.
40
 
41
RETURNS
42
A pointer to the string containing a formatted timestamp.
43
 
44
PORTABILITY
45
ANSI C requires <<asctime>>.
46
 
47
<<asctime>> requires no supporting OS subroutines.
48
*/
49
 
50
#include <time.h>
51
#include <_ansi.h>
52
#include <reent.h>
53
 
54
#ifndef _REENT_ONLY
55
 
56
char *
57
_DEFUN (asctime, (tim_p),
58
        _CONST struct tm *tim_p)
59
{
60
  _REENT_CHECK_ASCTIME_BUF(_REENT);
61
  return asctime_r (tim_p, _REENT_ASCTIME_BUF(_REENT));
62
}
63
 
64
#endif

powered by: WebSVN 2.1.0

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