Module Name: src Committed By: christos Date: Sun Oct 6 17:14:49 UTC 2013
Modified Files: src/usr.bin/man: man.c Log Message: add more compression suffixes and local suffixes. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/usr.bin/man/man.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/man/man.c diff -u src/usr.bin/man/man.c:1.58 src/usr.bin/man/man.c:1.59 --- src/usr.bin/man/man.c:1.58 Sun Oct 6 12:43:41 2013 +++ src/usr.bin/man/man.c Sun Oct 6 13:14:49 2013 @@ -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, 19 #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, /* 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'; }