summaryrefslogtreecommitdiffstats
path: root/usr.bin/pr/pr.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1999-11-30 15:09:26 +0000
committerache <ache@FreeBSD.org>1999-11-30 15:09:26 +0000
commit6bb6d94196a5509b8054bd3fa893cdd6f389c639 (patch)
tree9254848d165df4d1622bb473b2ff5d19cb52cbf5 /usr.bin/pr/pr.c
parente25c88391a154000f257c361888277d349b2223f (diff)
downloadFreeBSD-src-6bb6d94196a5509b8054bd3fa893cdd6f389c639.zip
FreeBSD-src-6bb6d94196a5509b8054bd3fa893cdd6f389c639.tar.gz
Change meaning of newly introduced -L option - it helps lpr later
Diffstat (limited to 'usr.bin/pr/pr.c')
-rw-r--r--usr.bin/pr/pr.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c
index aaaf389..d01728a 100644
--- a/usr.bin/pr/pr.c
+++ b/usr.bin/pr/pr.c
@@ -1560,11 +1560,11 @@ void
usage()
{
(void)fputs(
- "usage: pr [+page] [-col] [-adFLmrt] [-e[ch][gap]] [-h header]\n",err);
+ "usage: pr [+page] [-col] [-adFmrt] [-e[ch][gap]] [-h header]\n",err);
(void)fputs(
" [-i[ch][gap]] [-l line] [-n[ch][width]] [-o offset]\n",err);
(void)fputs(
- " [-s[ch]] [-w width] [-] [file ...]\n", err);
+ " [-L locale] [-s[ch]] [-w width] [-] [file ...]\n", err);
}
/*
@@ -1581,7 +1581,7 @@ setup(argc, argv)
int iflag = 0;
int wflag = 0;
int cflag = 0;
- int Lflag = 0;
+ char *Lflag = NULL;
if (isatty(fileno(stdout))) {
/*
@@ -1593,7 +1593,7 @@ setup(argc, argv)
}
} else
err = stderr;
- while ((c = egetopt(argc, argv, "#adFmrte?h:i?Ll:n?o:s?w:")) != -1) {
+ while ((c = egetopt(argc, argv, "#adFmrte?h:i?L:l:n?o:s?w:")) != -1) {
switch (c) {
case '+':
if ((pgnm = atoi(eoptarg)) < 1) {
@@ -1665,7 +1665,7 @@ setup(argc, argv)
ogap = OGAP;
break;
case 'L':
- Lflag++;
+ Lflag = eoptarg;
break;
case 'l':
if (!isdigit((unsigned char)*eoptarg) || ((lines=atoi(eoptarg)) < 1)) {
@@ -1817,8 +1817,7 @@ setup(argc, argv)
}
timefrmt = TIMEFMT;
- if (!Lflag)
- (void) setlocale(LC_TIME, "");
+ (void) setlocale(LC_TIME, (Lflag != NULL) ? Lflag : "");
return(0);
}
OpenPOWER on IntegriCloud