diff options
author | ache <ache@FreeBSD.org> | 1996-08-12 11:39:24 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-08-12 11:39:24 +0000 |
commit | 47124e7ef453009ed52092a0e2f4568a759db2dd (patch) | |
tree | d2a8966f17dcc8f77376db179056e0a734f24750 /usr.bin/find | |
parent | e37075011a9565ba98e9e8ad503badbf970eddf3 (diff) | |
download | FreeBSD-src-47124e7ef453009ed52092a0e2f4568a759db2dd.zip FreeBSD-src-47124e7ef453009ed52092a0e2f4568a759db2dd.tar.gz |
Localize it
Diffstat (limited to 'usr.bin/find')
-rw-r--r-- | usr.bin/find/ls.c | 5 | ||||
-rw-r--r-- | usr.bin/find/main.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/find/ls.c b/usr.bin/find/ls.c index 929ef79..29c068d 100644 --- a/usr.bin/find/ls.c +++ b/usr.bin/find/ls.c @@ -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]); diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c index 6cc6435..c7110ab 100644 --- a/usr.bin/find/main.c +++ b/usr.bin/find/main.c @@ -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; |