add a missing section header table index conversion
[tangerine.git] / compiler / clib / asctime_r.c
blobf41918e507bf87929ef986fb47c7681aeb0dd10e
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Convert a time into a string, reentrant.
6 */
8 /*****************************************************************************
10 NAME */
11 #include <time.h>
13 char * asctime_r (
15 /* SYNOPSIS */
16 const struct tm * tm,
17 char * buf)
19 /* FUNCTION
20 The asctime_r() function converts the broken-down time value tm
21 into a string with this format:
23 "Wed Jun 30 21:49:08 1993\n"
25 INPUTS
26 tm - The broken down time
27 buf - Buffer of at least 26 characters to store the string in
29 RESULT
30 The pointer passed in buf, containing the converted time. Note that
31 there is a newline at the end of the buffer.
33 NOTES
35 EXAMPLE
36 time_t tt;
37 struct tm tm;
38 char str[26];
40 // Get time
41 time (&tt);
43 // Break time up
44 localtime (&tt, &tm);
46 // Convert to string
47 asctime (&tm, str);
49 BUGS
51 SEE ALSO
52 time(), ctime_r(), gmtime_r(), localtime_r()
54 INTERNALS
56 ******************************************************************************/
58 strftime (buf, 26, "%C\n", tm);
60 return buf;
61 } /* asctime */