diff options
author | ache <ache@FreeBSD.org> | 2001-03-21 14:32:02 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-03-21 14:32:02 +0000 |
commit | eecf925bc54c442e8bed9adc3120d037a67ccd20 (patch) | |
tree | a0d4ab03802e80a62c0078a266767ac459fb3300 /usr.bin/pr/pr.c | |
parent | ca7feb0df3ef87b2be5b0d4e0c2440e9688d944f (diff) | |
download | FreeBSD-src-eecf925bc54c442e8bed9adc3120d037a67ccd20.zip FreeBSD-src-eecf925bc54c442e8bed9adc3120d037a67ccd20.tar.gz |
Use nl_langinfo instead of %Ef
Diffstat (limited to 'usr.bin/pr/pr.c')
-rw-r--r-- | usr.bin/pr/pr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index 817cc25..2e0376e 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -53,6 +53,7 @@ static char sccsid[] = "@(#)pr.c 8.2 (Berkeley) 4/16/94"; #include <ctype.h> #include <errno.h> +#include <langinfo.h> #include <locale.h> #include <signal.h> #include <stdio.h> @@ -1577,6 +1578,7 @@ setup(argc, argv) register char **argv; { register int c; + int d_first; int eflag = 0; int iflag = 0; int wflag = 0; @@ -1818,8 +1820,10 @@ setup(argc, argv) } } - timefrmt = TIMEFMT; (void) setlocale(LC_TIME, (Lflag != NULL) ? Lflag : ""); + d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); + timefrmt = d_first ? TIMEFMTD : TIMEFMTM; + return(0); } |