xref: /titanic_50/usr/src/lib/libbc/libc/gen/common/ctime.c (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1987 Regents of the University of California.
3*7c478bd9Sstevel@tonic-gate  * All rights reserved.
4*7c478bd9Sstevel@tonic-gate  *
5*7c478bd9Sstevel@tonic-gate  * This code is derived from software contributed to Berkeley by
6*7c478bd9Sstevel@tonic-gate  * Arthur Olson.
7*7c478bd9Sstevel@tonic-gate  *
8*7c478bd9Sstevel@tonic-gate  * Redistribution and use in source and binary forms are permitted
9*7c478bd9Sstevel@tonic-gate  * provided that the above copyright notice and this paragraph are
10*7c478bd9Sstevel@tonic-gate  * duplicated in all such forms and that any documentation,
11*7c478bd9Sstevel@tonic-gate  * advertising materials, and other materials related to such
12*7c478bd9Sstevel@tonic-gate  * distribution and use acknowledge that the software was developed
13*7c478bd9Sstevel@tonic-gate  * by the University of California, Berkeley.  The name of the
14*7c478bd9Sstevel@tonic-gate  * University may not be used to endorse or promote products derived
15*7c478bd9Sstevel@tonic-gate  * from this software without specific prior written permission.
16*7c478bd9Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17*7c478bd9Sstevel@tonic-gate  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18*7c478bd9Sstevel@tonic-gate  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19*7c478bd9Sstevel@tonic-gate  */
20*7c478bd9Sstevel@tonic-gate 
21*7c478bd9Sstevel@tonic-gate 
22*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
23*7c478bd9Sstevel@tonic-gate 	  /* from Arthur Olson's 3.1 */
24*7c478bd9Sstevel@tonic-gate 
25*7c478bd9Sstevel@tonic-gate /*LINTLIBRARY*/
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
28*7c478bd9Sstevel@tonic-gate #include <time.h>
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate char *
ctime(timep)31*7c478bd9Sstevel@tonic-gate ctime(timep)
32*7c478bd9Sstevel@tonic-gate time_t *	timep;
33*7c478bd9Sstevel@tonic-gate {
34*7c478bd9Sstevel@tonic-gate 	return asctime(localtime(timep));
35*7c478bd9Sstevel@tonic-gate }
36