* use (``foo'') instead of (<em>foo</em>)

* order SEE ALSO on man section then alphabetical
* add -w to usage string
* deprecate register
* minor code move in newman section, to follow style of oldman section
This commit is contained in:
lukem 1997-11-02 00:23:36 +00:00
parent 699c57c48b
commit b0b8aac67b
2 changed files with 21 additions and 22 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: getNAME.8,v 1.1 1997/11/01 15:03:53 mrg Exp $
.\" $NetBSD: getNAME.8,v 1.2 1997/11/02 00:23:36 lukem Exp $
.\"
.\" Copyright (c) 1997 Matthew R. Green
.\" All rights reserved.
@ -48,11 +48,11 @@ returns data for use in an
database.
.Nm
is designed to be called from
.Xr makewhatis 8 ,
.Xr makewhatis 8
or other manual grovelling tools, not to be used directly.
.Sh OPTIONS
The following options are available:
.Bl -tag -width 123456
.Bl -tag -width Ds
.It Fl i
The
.Fl i
@ -68,11 +68,11 @@ option returns information useful for creating a table of contents.
The
.Fl w
option determines whether traditional man
.Sy (OLD) ,
.Pq Dq OLD ,
new mandoc
.Sy (NEW) ,
.Pq Dq NEW ,
or some unknown
.Sy (UNKNOWN)
.Pq Dq UNKNOWN
format exists.
.El
.Sh HISTORY
@ -85,6 +85,6 @@ It would be nice if
.Nm
could deal with preformatted manuals.
.Sh SEE ALSO
.Xr man 1 ,
.Xr catman 8 ,
.Xr makewhatis 8 ,
.Xr man 1 .
.Xr makewhatis 8

View File

@ -1,4 +1,4 @@
/* $NetBSD: getNAME.c,v 1.8 1997/11/01 15:03:54 mrg Exp $ */
/* $NetBSD: getNAME.c,v 1.9 1997/11/02 00:23:37 lukem Exp $ */
/*-
* Copyright (c) 1980, 1993
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)getNAME.c 8.1 (Berkeley) 6/30/93";
#else
__RCSID("$NetBSD: getNAME.c,v 1.8 1997/11/01 15:03:54 mrg Exp $");
__RCSID("$NetBSD: getNAME.c,v 1.9 1997/11/02 00:23:37 lukem Exp $");
#endif
#endif /* not lint */
@ -129,13 +129,8 @@ getfrom(pathname)
if ((headbuf[1] == 'T' && headbuf[2] == 'H') ||
(headbuf[1] == 't' && headbuf[2] == 'h'))
break;
if (headbuf[1] == 'D' && headbuf[2] == 't') {
if (typeflag) {
printf("%-60s NEW\n", pathname);
return;
}
if (headbuf[1] == 'D' && headbuf[2] == 't')
goto newman;
}
}
if (typeflag) {
printf("%-60s OLD\n", pathname);
@ -191,6 +186,10 @@ getfrom(pathname)
return;
newman:
if (typeflag) {
printf("%-60s NEW\n", pathname);
return;
}
for (;;) {
if (fgets(linbuf, sizeof linbuf, stdin) == NULL)
return;
@ -265,7 +264,7 @@ newman:
void
trimln(cp)
register char *cp;
char *cp;
{
while (*cp)
@ -278,7 +277,7 @@ void
doname(name)
char *name;
{
register char *dp = name, *ep;
char *dp = name, *ep;
again:
while (*dp && *dp != '.')
@ -302,7 +301,7 @@ void
split(line, name)
char *line, *name;
{
register char *cp, *dp;
char *cp, *dp;
char *sp, *sep;
cp = strchr(line, '-');
@ -317,7 +316,7 @@ split(line, name)
for (sep = "", dp = line; dp && *dp; dp = cp, sep = "\n") {
cp = strchr(dp, ',');
if (cp) {
register char *tp;
char *tp;
for (tp = cp - 1; *tp == ' ' || *tp == '\t'; tp--)
;
@ -335,7 +334,7 @@ void
dorefname(name)
char *name;
{
register char *dp = name, *ep;
char *dp = name, *ep;
again:
while (*dp && *dp != '.')
@ -356,6 +355,6 @@ again:
void
usage()
{
(void)fprintf(stderr, "usage: getNAME [-it] file ...\n");
(void)fprintf(stderr, "usage: getNAME [-itw] file ...\n");
exit(1);
}