2 * Copyright 1987 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
7 * Copyright (c) 1980 Regents of the University of California.
8 * All rights reserved. The Berkeley software License Agreement
9 * specifies the terms and conditions for redistribution.
12 #pragma ident "%Z%%M% %I% %E% SMI"
21 static char *ct_numb(char *, int);
30 for (ncp
= "Day Mon 00 00:00:00 1900\n"; *cp
++ = *ncp
++;);
31 ncp
= &"SunMonTueWedThuFriSat"[3*t
->tm_wday
];
38 ncp
= &"JanFebMarAprMayJunJulAugSepOctNovDec"[(*tp
)*3];
42 cp
= ct_numb(cp
, *--tp
);
43 cp
= ct_numb(cp
, *--tp
+100);
44 cp
= ct_numb(cp
, *--tp
+100);
45 cp
= ct_numb(cp
, *--tp
+100);
46 cp
= ct_numb(cp
, (t
->tm_year
+ TM_YEAR_BASE
)/100);
48 cp
= ct_numb(cp
, t
->tm_year
+100);
53 ct_numb(char *cp
, int n
)
57 *cp
++ = (n
/10)%10 + '0';