Change meaning of newly introduced -L option - it helps lpr later

This commit is contained in:
Andrey A. Chernov 1999-11-30 15:09:26 +00:00
parent ec99e32256
commit 4bf9895e55
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53955
2 changed files with 15 additions and 10 deletions

View File

@ -50,7 +50,7 @@
.Bk -words
.Op Fl Ar column
.Ek
.Op Fl adFLmrt
.Op Fl adFmrt
.Bk -words
.Oo
.Op Fl e
@ -59,6 +59,9 @@
.Oc
.Ek
.Bk -words
.Op Fl L Ar locale
.Ek
.Bk -words
.Op Fl h Ar header
.Ek
.Bk -words
@ -218,8 +221,11 @@ If any nondigit character,
is specified, it is used as the output
.Em <tab>
character.
.It Fl L
Do not use time locale for header.
.It Fl L Ar locale
Use
.Ar locale
specified as argument instead of one found in environment.
Use "C" to reset locale to default.
.It Fl l Ar lines
Override the 66 line default and reset the page length to
.Ar lines .

View File

@ -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);
}