Sync with 4.4BSD-Lite2

This commit is contained in:
tls 1995-09-28 06:05:11 +00:00
parent 5b36a1959d
commit 7f429c3306
5 changed files with 46 additions and 27 deletions

View File

@ -1,3 +1,4 @@
# $NetBSD: Makefile,v 1.6 1995/09/28 06:05:11 tls Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= man

View File

@ -1,5 +1,7 @@
/* $NetBSD: config.c,v 1.7 1995/09/28 06:05:21 tls Exp $ */
/*
* Copyright (c) 1989, 1993
* Copyright (c) 1989, 1993, 1995
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -32,7 +34,11 @@
*/
#ifndef lint
static char sccsid[] = "@(#)config.c 8.7 (Berkeley) 1/3/94";
#if 0
static char sccsid[] = "@(#)config.c 8.8 (Berkeley) 1/31/95";
#else
static char rcsid[] = "$NetBSD: config.c,v 1.7 1995/09/28 06:05:21 tls Exp $";
#endif
#endif /* not lint */
#include <sys/types.h>
@ -122,6 +128,8 @@ config(fname)
TAILQ_INSERT_TAIL(&tp->list, ep, q);
}
}
fclose(cfp);
}
/*

View File

@ -1,3 +1,5 @@
/* $NetBSD: config.h,v 1.2 1995/09/28 06:05:28 tls Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California.

View File

@ -1,5 +1,7 @@
/* $NetBSD: man.c,v 1.7 1995/09/28 06:05:34 tls Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
* Copyright (c) 1987, 1993, 1994, 1995
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -33,12 +35,16 @@
#ifndef lint
static char copyright[] =
"@(#) Copyright (c) 1987, 1993\n\
"@(#) Copyright (c) 1987, 1993, 1994, 1995\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)man.c 8.16 (Berkeley) 4/16/94";
#if 0
static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95";
#else
static char rcsid[] = "$NetBSD: man.c,v 1.7 1995/09/28 06:05:34 tls Exp $";
#endif
#endif /* not lint */
#include <sys/param.h>
@ -492,35 +498,35 @@ build_page(fmt, pathp)
warnx("Formatting manual page...");
}
/*
* Historically man chdir'd to the root of the man tree.
* This was used in man pages that contained relative ".so"
* directives (including other man pages for command aliases etc.)
* It even went one step farther, by examining the first line
* of the man page and parsing the .so filename so it would
* make hard(?) links to the cat'ted man pages for space savings.
* (We don't do that here, but we could).
*/
/*
* Historically man chdir'd to the root of the man tree.
* This was used in man pages that contained relative ".so"
* directives (including other man pages for command aliases etc.)
* It even went one step farther, by examining the first line
* of the man page and parsing the .so filename so it would
* make hard(?) links to the cat'ted man pages for space savings.
* (We don't do that here, but we could).
*/
/* copy and find the end */
for (b = buf, p = *pathp; (*b++ = *p++) != '\0';)
continue;
/* skip the last two path components, page name and man[n] */
for (--b, n = 2; b != buf; b--)
if (*b == '/')
if (--n == 0) {
*b = '\0';
(void) chdir(buf);
}
/* copy and find the end */
for (b = buf, p = *pathp; (*b++ = *p++) != '\0';)
continue;
/* skip the last two path components, page name and man[n] */
for (--b, n = 2; b != buf; b--)
if (*b == '/')
if (--n == 0) {
*b = '\0';
(void) chdir(buf);
}
/* Add a remove-when-done list. */
if ((intmpp = getlist("_intmp")) == NULL)
intmpp = addlist("_intmp");
/* Move to the printf(3) format string. */
for (; *fmt && isspace(*fmt); ++fmt)
continue;
for (; *fmt && isspace(*fmt); ++fmt);
/*
* Get a temporary file and build a version of the file

View File

@ -1,3 +1,5 @@
/* $NetBSD: pathnames.h,v 1.3 1995/09/28 06:05:40 tls Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.