From 2faa1f69a4a90d173f1454441bbdd2781c8cad97 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 14 Sep 1998 05:44:11 +0000 Subject: /usr/bin/help == man man" --- usr.bin/man/man.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'usr.bin/man/man.c') diff --git a/usr.bin/man/man.c b/usr.bin/man/man.c index f463bc64bcf..c32d968b2d0 100644 --- a/usr.bin/man/man.c +++ b/usr.bin/man/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.10 1998/07/20 01:15:25 deraadt Exp $ */ +/* $OpenBSD: man.c,v 1.11 1998/09/14 05:44:12 deraadt 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.10 1998/07/20 01:15:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: man.c,v 1.11 1998/09/14 05:44:12 deraadt Exp $"; #endif #endif /* not lint */ @@ -59,6 +59,7 @@ static char rcsid[] = "$OpenBSD: man.c,v 1.10 1998/07/20 01:15:25 deraadt Exp $" #include #include #include +#include #include #include #include @@ -96,6 +97,15 @@ main(argc, argv) char **ap, *cmd, *machine, *p, *p_add, *p_path, *pager, *sflag, *slashp; char *conffile, buf[MAXPATHLEN * 2]; + if (argv[1] == NULL && strcmp(basename(__progname), "help") == 0) { + static char *nargv[3]; + nargv[0] = "man"; + nargv[1] = "man"; + nargv[2] = NULL; + argv = nargv; + argc = 2; + } + machine = sflag = NULL; f_cat = f_how = 0; conffile = p_add = p_path = NULL; -- cgit v1.2.3-59-g8ed1b