Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * <<asctime>>---format time as string
23 * char *asctime(const struct tm *<[clock]>);
24 * char *asctime_r(const struct tm *<[clock]>, char *<[buf]>);
27 * char *asctime(<[clock]>)
28 * struct tm *<[clock]>;
29 * char *asctime_r(<[clock]>)
30 * struct tm *<[clock]>;
32 * Format the time value at <[clock]> into a string of the form
33 * . Wed Jun 15 11:38:07 1988\n\0
34 * The string is generated in a static buffer; each call to <<asctime>>
35 * overwrites the string generated by previous calls.
37 * A pointer to the string containing a formatted timestamp.
39 * ANSI C requires <<asctime>>.
40 * <<asctime>> requires no supporting OS subroutines.
48 #include <sys/reent.h>
53 Convert tm structure to string.
54 Converts data pointed by tim_p to a string containing time and date in readable format.
55 @return A pointer to the string containing the date
56 and time information in readable format.
57 The string pointed is statically allocated and
58 shared by ctime and asctime functions.
59 Each time one of these functions is called the content of the string is overwritten.
60 @param tim_p Pointer to tm structure containing time and date information to be converted.
63 asctime (const struct tm *tim_p)
65 return asctime_r (tim_p, _REENT->_asctime);