From owner-freebsd-current Sat Apr 8 14:02:27 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA23349 for current-outgoing; Sat, 8 Apr 1995 14:02:27 -0700 Received: from aries.ibms.sinica.edu.tw ([140.109.40.248]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id OAA23343 for ; Sat, 8 Apr 1995 14:02:22 -0700 Received: (from taob@localhost) by aries.ibms.sinica.edu.tw (8.6.11/8.6.9) id FAA07025; Sun, 9 Apr 1995 05:02:38 +0800 Date: Sun, 9 Apr 1995 05:02:36 +0800 (CST) From: Brian Tao To: FREEBSD-CURRENT-L Subject: Re: man(1) bug In-Reply-To: <199504081926.MAA15834@gndrsh.aac.dev.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: current-owner@FreeBSD.org Precedence: bulk Here's a simple patch that fixes the manpage-starting-with-a-number bug and the can't-find-the-[-man-page-bug. The second fix is really kludgy at the moment, but it's almost 5 am and I spent the last three hours on IRC walking a user through a new FreeBSD installation on his notebook with a zp0 PCMCIA network card, only to find out from a DOS diag utility that the card is toast. :( Anyhow, I'll try to come up with something cleaner tomorrow or the day after... oh, this is applied to /usr/src/gnu/usr.bin/man/man/man.c. 461c461 < if ((strcmp (*vs, name) == NULL) || (isdigit (name[0]))) --- > if ((strcmp (*vs, name) == NULL) || (isdigit (name[0]) && strlen(name) == 1)) 593c593 < sprintf (pathname, "%s/cat%s/%s.%s*", path, section, name, section); --- > sprintf (pathname, "%s/cat%s/\\%s.%s*", path, section, name, section); 595c595 < sprintf (pathname, "%s/man%s/%s.%s*", path, section, name, section); --- > sprintf (pathname, "%s/man%s/\\%s.%s*", path, section, name, section); 605c605 < sprintf (pathname, "%s/cat%s/%s.%c*", path, section, name, *section); --- > sprintf (pathname, "%s/cat%s/\\%s.%c*", path, section, name, *section); 607c607 < sprintf (pathname, "%s/man%s/%s.%c*", path, section, name, *section); --- > sprintf (pathname, "%s/man%s/\\%s.%c*", path, section, name, *section); 614c614 < sprintf (pathname, "%s/cat%s/%s.0*", path, section, name); --- > sprintf (pathname, "%s/cat%s/\\%s.0*", path, section, name); 616c616 < sprintf (pathname, "%s/man%s/%s.0*", path, section, name); --- > sprintf (pathname, "%s/man%s/\\%s.0*", path, section, name); -- Brian ("Though this be madness, yet there is method in't") Tao taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org