summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/man
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-01-27 19:17:40 +0000
committerdes <des@FreeBSD.org>2001-01-27 19:17:40 +0000
commitc775307226e2e800b9ce620075be0b54e32176ed (patch)
tree2c4755543ff006f0c24326743fa00c697772a8c8 /gnu/usr.bin/man
parent3dbc9c1ca6805dfba7f81ec5c3174cdd1b46655e (diff)
downloadFreeBSD-src-c775307226e2e800b9ce620075be0b54e32176ed.zip
FreeBSD-src-c775307226e2e800b9ce620075be0b54e32176ed.tar.gz
Make an effort to actually pass the correct device to groff.
Diffstat (limited to 'gnu/usr.bin/man')
-rw-r--r--gnu/usr.bin/man/man/man.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c
index 7f16eb2..2e558c8 100644
--- a/gnu/usr.bin/man/man/man.c
+++ b/gnu/usr.bin/man/man/man.c
@@ -92,7 +92,7 @@ static char *alt_system_name;
#ifdef __FreeBSD__
/* short_locale without country suffix */
-static char *locale, *short_locale, *locale_opts, *locale_nroff;
+static char *locale, *short_locale, *locale_nroff;
static int use_original;
struct ltable {
char *lcode;
@@ -101,7 +101,7 @@ struct ltable {
static struct ltable ltable[] = {
{"KOI8-R", " -Tkoi8-r"},
{"ISO_8859-1", " -Tlatin1"},
- {NULL, NULL}
+ {NULL, " -Tascii"}
};
#endif
@@ -479,11 +479,10 @@ man_getopt (argc, argv)
tmp = short_locale + 3;
for (pltable = ltable; pltable->lcode != NULL; pltable++) {
- if (strcmp(pltable->lcode, tmp) == 0) {
- locale_nroff = pltable->nroff;
+ if (strcmp(pltable->lcode, tmp) == 0)
break;
- }
}
+ locale_nroff = pltable->nroff;
}
}
#endif
@@ -946,8 +945,7 @@ parse_roff_directive (cp, file, buf, bufsize)
#ifdef __FreeBSD__
char lbuf[FILENAME_MAX];
- snprintf(lbuf, sizeof(lbuf), "%s%s", NEQN,
- locale_opts == NULL ? " -Tascii" : locale_opts);
+ snprintf(lbuf, sizeof(lbuf), "%s%s", NEQN, locale_nroff);
add_directive (&first, lbuf, file, buf, bufsize);
#else
add_directive (&first, NEQN, file, buf, bufsize);
@@ -1025,8 +1023,7 @@ parse_roff_directive (cp, file, buf, bufsize)
#ifdef __FreeBSD__
char lbuf[FILENAME_MAX];
- snprintf(lbuf, sizeof(lbuf), "%s%s", NROFF,
- locale_opts == NULL ? " -Tascii" : locale_opts);
+ snprintf(lbuf, sizeof(lbuf), "%s%s", NROFF, locale_nroff);
add_directive (&first, lbuf, file, buf, bufsize);
#else
add_directive (&first, NROFF " -Tascii", file, buf, bufsize);
@@ -1589,7 +1586,6 @@ man (name)
#ifdef __FreeBSD__
l_found = 0;
if (locale != NULL) {
- locale_opts = locale_nroff;
snprintf(buf, sizeof(buf), "%s/%s", *mp, locale);
if (is_directory (buf))
l_found = try_section (buf, section, name, glob);
@@ -1598,7 +1594,6 @@ man (name)
if (is_directory (buf))
l_found = try_section (buf, section, name, glob);
}
- locale_opts = NULL;
}
if (!l_found) {
#endif
@@ -1626,7 +1621,6 @@ man (name)
#ifdef __FreeBSD__
l_found = 0;
if (locale != NULL) {
- locale_opts = locale_nroff;
snprintf(buf, sizeof(buf), "%s/%s", *mp, locale);
if (is_directory (buf))
l_found = try_section (buf, *sp, name, glob);
@@ -1635,7 +1629,6 @@ man (name)
if (is_directory (buf))
l_found = try_section (buf, *sp, name, glob);
}
- locale_opts = NULL;
}
if (!l_found) {
#endif
OpenPOWER on IntegriCloud