add more compression suffixes and local suffixes.
This commit is contained in:
parent
b496a26a9d
commit
8818316ba3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: man.c,v 1.58 2013/10/06 16:43:41 christos Exp $ */
|
||||
/* $NetBSD: man.c,v 1.59 2013/10/06 17:14:49 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1993, 1994, 1995
|
||||
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993, 1994, 1995\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: man.c,v 1.58 2013/10/06 16:43:41 christos Exp $");
|
||||
__RCSID("$NetBSD: man.c,v 1.59 2013/10/06 17:14:49 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -556,11 +556,13 @@ manual(char *page, struct manstate *mp, glob_t *pg)
|
||||
|
||||
/* clip suffix for the suffix check below */
|
||||
if ((p = strrchr(escpage, '.')) != NULL) {
|
||||
if (strcmp(p, ".gz") == 0 || strcmp(p, ".bz2") == 0) {
|
||||
/* Should get suffixes from the configuration file */
|
||||
if (strcmp(p, ".gz") == 0 || strcmp(p, ".bz2") == 0 ||
|
||||
strcmp(p, ".Z") == 0 || strcmp(p, ".xz") == 0) {
|
||||
*p = '\0';
|
||||
p = strrchr(escpage, '.');
|
||||
}
|
||||
if (p && isdigit((unsigned char)p[1]))
|
||||
if (p && strchr("0123456789ln", p[1]) != NULL)
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user