equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
2 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
3 * Use is subject to license terms. |
3 * Use is subject to license terms. |
4 */ |
4 */ |
5 |
5 |
6 /* |
6 /* |
7 * Copyright (c) 1980 Regents of the University of California. |
7 * Copyright (c) 1980 Regents of the University of California. |
8 * All rights reserved. The Berkeley software License Agreement |
8 * All rights reserved. The Berkeley software License Agreement |
9 * specifies the terms and conditions for redistribution. |
9 * specifies the terms and conditions for redistribution. |
10 */ |
10 */ |
|
11 |
|
12 #pragma ident "%Z%%M% %I% %E% SMI" |
11 |
13 |
12 /* |
14 /* |
13 * This localtime is a modified version of offtime from libc, which does not |
15 * This localtime is a modified version of offtime from libc, which does not |
14 * bother to figure out the time zone from the kernel, from environment |
16 * bother to figure out the time zone from the kernel, from environment |
15 * variables, or from Unix files. |
17 * variables, or from Unix files. |
145 |
147 |
146 |
148 |
147 #define dysize(A) (((A)%4)? 365: 366) |
149 #define dysize(A) (((A)%4)? 365: 366) |
148 #define CBUFSIZ 26 |
150 #define CBUFSIZ 26 |
149 |
151 |
150 static char *ct_numb(); |
|
151 |
|
152 /* |
152 /* |
153 * POSIX.1c standard version of the function asctime_r. |
153 * POSIX.1c standard version of the function asctime_r. |
154 * User gets it via static asctime_r from the header file. |
154 * User gets it via static asctime_r from the header file. |
155 */ |
155 */ |
156 char * |
156 char * |
157 __posix_asctime_r(const struct tm *t, char *cbuf) |
157 __posix_asctime_r(const struct tm *t, char *cbuf) |
158 { |
158 { |
159 const char *Date = "Day Mon 00 00:00:00 1900\n"; |
159 const char *Date = "Day Mon 00 00:00:00 1900\n"; |
160 const char *Day = "SunMonTueWedThuFriSat"; |
160 const char *Day = "SunMonTueWedThuFriSat"; |
161 const char *Month = "JanFebMarAprMayJunJulAugSepOctNovDec"; |
161 const char *Month = "JanFebMarAprMayJunJulAugSepOctNovDec"; |
|
162 static char *ct_numb(); |
162 const char *ncp; |
163 const char *ncp; |
163 const int *tp; |
164 const int *tp; |
164 char *cp; |
165 char *cp; |
165 |
166 |
166 if (t == NULL) |
167 if (t == NULL) |