diff options
-rw-r--r-- | sbin/disklabel/editor.c | 6 | ||||
-rw-r--r-- | sbin/fdisk/cmd.c | 7 | ||||
-rw-r--r-- | usr.bin/ftp/cmds.c | 6 | ||||
-rw-r--r-- | usr.bin/ftp/ftp.1 | 9 | ||||
-rw-r--r-- | usr.bin/man/man.1 | 4 | ||||
-rw-r--r-- | usr.bin/man/man.c | 6 | ||||
-rw-r--r-- | usr.bin/msgs/msgs.1 | 8 | ||||
-rw-r--r-- | usr.bin/msgs/msgs.c | 6 | ||||
-rw-r--r-- | usr.sbin/named/man/nslookup.8 | 5 | ||||
-rw-r--r-- | usr.sbin/named/nslookup/main.c | 6 |
10 files changed, 34 insertions, 29 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index a85aa926bf6..57402965be6 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.64 1999/06/06 18:42:29 aaron Exp $ */ +/* $OpenBSD: editor.c,v 1.65 1999/06/10 22:37:54 pjanzen Exp $ */ /* * Copyright (c) 1997-1999 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.64 1999/06/06 18:42:29 aaron Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.65 1999/06/10 22:37:54 pjanzen Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -309,7 +309,7 @@ editor(lp, f, dev, fstabfile) char *pager; extern char manpage[]; - if ((pager = getenv("PAGER")) == NULL) + if ((pager = getenv("PAGER")) == NULL || *pager == '\0') pager = _PATH_LESS; if ((fp = popen(pager, "w")) != NULL) { (void) fwrite(manpage, strlen(manpage), 1, fp); diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c index 88193040b5b..0e2949bd163 100644 --- a/sbin/fdisk/cmd.c +++ b/sbin/fdisk/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.20 1998/09/14 03:54:34 rahnds Exp $ */ +/* $OpenBSD: cmd.c,v 1.21 1999/06/10 22:38:01 pjanzen Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -384,12 +384,13 @@ Xmanual(cmd, disk, mbr, tt, offset) int offset; { char *pager = "/usr/bin/less"; + char *p; sig_t opipe = signal(SIGPIPE, SIG_IGN); extern char manpage[]; FILE *f; - if (getenv("PAGER")) - pager = getenv("PAGER"); + if ((p = getenv("PAGER")) != NULL && (*p != '\0')) + pager = p; f = popen(pager, "w"); if (f) { (void) fwrite(manpage, strlen(manpage), 1, f); diff --git a/usr.bin/ftp/cmds.c b/usr.bin/ftp/cmds.c index f0a9f412abf..412c411a820 100644 --- a/usr.bin/ftp/cmds.c +++ b/usr.bin/ftp/cmds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmds.c,v 1.29 1998/09/01 17:08:22 deraadt Exp $ */ +/* $OpenBSD: cmds.c,v 1.30 1999/06/10 22:38:02 pjanzen Exp $ */ /* $NetBSD: cmds.c,v 1.27 1997/08/18 10:20:15 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$OpenBSD: cmds.c,v 1.29 1998/09/01 17:08:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: cmds.c,v 1.30 1999/06/10 22:38:02 pjanzen Exp $"; #endif #endif /* not lint */ @@ -2195,7 +2195,7 @@ page(argc, argv) return; } p = getenv("PAGER"); - if (p == NULL) + if (p == NULL || (*p == '\0')) p = PAGER; if ((pager = malloc(strlen(p) + 2)) == NULL) errx(1, "Can't allocate memory for $PAGER"); diff --git a/usr.bin/ftp/ftp.1 b/usr.bin/ftp/ftp.1 index 03699d4f837..936fbb4491f 100644 --- a/usr.bin/ftp/ftp.1 +++ b/usr.bin/ftp/ftp.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ftp.1,v 1.25 1999/06/05 01:21:26 aaron Exp $ +.\" $OpenBSD: ftp.1,v 1.26 1999/06/10 22:38:02 pjanzen Exp $ .\" $NetBSD: ftp.1,v 1.22 1997/08/18 10:20:22 lukem Exp $ .\" .\" Copyright (c) 1985, 1989, 1990, 1993 @@ -680,8 +680,11 @@ Retrieve .Ic file and display with the program defined in .Ev PAGER -(which defaults to -.Xr more 1 ). +(defaulting to +.Xr more 1 +if +.Ev PAGER +is null or not defined). .It Ic passive Toggle passive mode. If passive mode is turned on (default is on), the ftp client will diff --git a/usr.bin/man/man.1 b/usr.bin/man/man.1 index 765d12b381f..0ca8cd9a90b 100644 --- a/usr.bin/man/man.1 +++ b/usr.bin/man/man.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: man.1,v 1.9 1999/06/05 01:21:33 aaron Exp $ +.\" $OpenBSD: man.1,v 1.10 1999/06/10 22:38:02 pjanzen Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -219,7 +219,7 @@ line in the .Nm configuration file. .It Ev PAGER -Any value of the environment variable +Any non-null value of the environment variable .Ev PAGER will be used instead of the standard pagination program, .Xr more 1 . diff --git a/usr.bin/man/man.c b/usr.bin/man/man.c index 6113244e275..7a35112010a 100644 --- a/usr.bin/man/man.c +++ b/usr.bin/man/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.12 1998/11/16 06:28:32 deraadt Exp $ */ +/* $OpenBSD: man.c,v 1.13 1999/06/10 22:38:02 pjanzen Exp $ */ /* $NetBSD: man.c,v 1.7 1995/09/28 06:05:34 tls Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95"; #else -static char rcsid[] = "$OpenBSD: man.c,v 1.12 1998/11/16 06:28:32 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: man.c,v 1.13 1999/06/10 22:38:02 pjanzen Exp $"; #endif #endif /* not lint */ @@ -163,7 +163,7 @@ main(argc, argv) if (!f_cat && !f_how && !f_where) if (!isatty(1)) f_cat = 1; - else if ((pager = getenv("PAGER")) != NULL) + else if ((pager = getenv("PAGER")) != NULL && (*pager != '\0')) pager = check_pager(pager); else pager = _PATH_PAGER; diff --git a/usr.bin/msgs/msgs.1 b/usr.bin/msgs/msgs.1 index 35d58aa068c..f12be01d2b3 100644 --- a/usr.bin/msgs/msgs.1 +++ b/usr.bin/msgs/msgs.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: msgs.1,v 1.6 1999/06/05 01:21:34 aaron Exp $ +.\" $OpenBSD: msgs.1,v 1.7 1999/06/10 22:38:03 pjanzen Exp $ .\" $NetBSD: msgs.1,v 1.5 1995/09/28 06:57:39 tls Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -61,7 +61,7 @@ of the system. The options available are as follows: .Bl -tag -width Fl .It Fl f -Do not say ``No new messages.''. +Do not say ``No new messages.'' This is useful in a .Pa .login file since this is often the case here. @@ -102,7 +102,7 @@ Pipe long messages through the program specified by the .Ev PAGER environment variable. If .Ev PAGER -is not defined, +is null or not defined, .Xr more 1 is used. .El @@ -218,7 +218,7 @@ uses the and .Ev TERM environment variables for the default home directory and -terminal type. If defined, the program specified by the +terminal type. If defined and non-null, the .Ev PAGER variable is invoked as the pagination program. .Sh FILES diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index b09f03d4d20..dc7e1061ae7 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msgs.c,v 1.13 1999/05/13 12:59:29 aaron Exp $ */ +/* $OpenBSD: msgs.c,v 1.14 1999/06/10 22:38:03 pjanzen Exp $ */ /* $NetBSD: msgs.c,v 1.7 1995/09/28 06:57:40 tls Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)msgs.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: msgs.c,v 1.13 1999/05/13 12:59:29 aaron Exp $"; +static char rcsid[] = "$OpenBSD: msgs.c,v 1.14 1999/06/10 22:38:03 pjanzen Exp $"; #endif #endif /* not lint */ @@ -642,7 +642,7 @@ int length; if (use_pager && length > Lpp) { signal(SIGPIPE, SIG_IGN); signal(SIGQUIT, SIG_IGN); - if ((env_pager = getenv("PAGER")) == NULL) { + if ((env_pager = getenv("PAGER")) == NULL || *env_pager == '\0') { snprintf(cmdbuf, sizeof(cmdbuf), _PATH_PAGER, Lpp); } else { snprintf(cmdbuf, sizeof(cmdbuf), env_pager); diff --git a/usr.sbin/named/man/nslookup.8 b/usr.sbin/named/man/nslookup.8 index f69cc7147e9..c0570859078 100644 --- a/usr.sbin/named/man/nslookup.8 +++ b/usr.sbin/named/man/nslookup.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: nslookup.8,v 1.4 1999/06/05 22:17:45 aaron Exp $ +.\" $OpenBSD: nslookup.8,v 1.5 1999/06/10 22:38:03 pjanzen Exp $ .\" .\" ++Copyright++ 1985, 1989 .\" - @@ -178,7 +178,8 @@ When output is directed to a file, hash marks are printed for every .sp 1 .IP "\fBview\fP \fIfilename\fP" Sorts and lists the output of previous \fBls\fP command(s) with -\fImore\fP(1). +PAGER if it is defined and non-null, or with +\fImore\fP(1) otherwise. .sp 1 .ne 4 .IP "\fBhelp\fP" diff --git a/usr.sbin/named/nslookup/main.c b/usr.sbin/named/nslookup/main.c index 98e03e8f0b5..c32792e7350 100644 --- a/usr.sbin/named/nslookup/main.c +++ b/usr.sbin/named/nslookup/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 1998/11/23 18:00:58 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.7 1999/06/10 22:38:03 pjanzen Exp $ */ /* * ++Copyright++ 1985, 1989 @@ -66,7 +66,7 @@ char copyright[] = static char sccsid[] = "@(#)main.c 5.42 (Berkeley) 3/3/91"; static char rcsid[] = "$From: main.c,v 8.4 1996/11/11 06:36:54 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.6 1998/11/23 18:00:58 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.7 1999/06/10 22:38:03 pjanzen Exp $"; #endif #endif /* not lint */ @@ -325,7 +325,7 @@ main(argc, argv) PrintHostInfo(stdout, "Default Server:", defaultPtr); pager = getenv("PAGER"); - if (pager == NULL) { + if (pager == NULL || *pager == '\0') { pager = _PATH_PAGERCMD; } |