mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Localize it
This commit is contained in:
parent
36a00a4b79
commit
bf4fce1a35
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17534
@ -82,10 +82,9 @@ printtime(ftime)
|
||||
time_t ftime;
|
||||
{
|
||||
int i;
|
||||
char *longstring, *ctime();
|
||||
time_t time();
|
||||
char longstring[80];
|
||||
|
||||
longstring = ctime((long *)&ftime);
|
||||
strftime(longstring, sizeof(longstring), "%c", localtime(&ftime));
|
||||
for (i = 4; i < 11; ++i)
|
||||
(void)putchar(longstring[i]);
|
||||
|
||||
|
@ -51,6 +51,7 @@ static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 4/16/94";
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@ -75,6 +76,8 @@ main(argc, argv)
|
||||
register char **p, **start;
|
||||
int Hflag, Lflag, Pflag, ch;
|
||||
|
||||
(void)setlocale(LC_ALL, "");
|
||||
|
||||
(void)time(&now); /* initialize the time-of-day */
|
||||
|
||||
p = start = argv;
|
||||
|
Loading…
Reference in New Issue
Block a user