Bug 13456

Summary: makewhatis(1) is confuisng with ``-'' symbol in ".Nd" field
Product: Base System Reporter: Alexey M. Zelkin <phantom>
Component: binAssignee: Alexey Zelkin <phantom>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Alexey M. Zelkin 1999-08-29 18:30:01 UTC
If ``-'' symbol present in .Nd (name description) field then makewhatis(1)
thinks that ``-'' present at begining of .Nd line. This caused following
strings in "whatis" database file:

BUS_READ_IVAR(9)	- BUS_WRITE_IVAR manipulate bus-specific device instance variables
cx(4)			- if_cx aynchronous/synhronous Cronyx-Sigma adapter driver

but it should look like

BUS_READ_IVAR(9), BUS_WRITE_IVAR(9) - manipulate bus-specific device instance variables
cx(4), if_cx(4)		- aynchronous/synhronous Cronyx-Sigma adapter driver

Fix: Fix is very simple. Original version has check for existence of the dash
(``-'') in description string. Now it checks for existence of the dash at
begining of the descritpion string.
How-To-Repeat: 
Use "apropos" or "man -k" for example:

cx(4)
draw_shadow(3)
fabs(3)
isinf(3)

etc. etc. etc.

Test case:

$ mv /usr/share/man/whatis /usr/share/man/whatis.b
$ patch < makewhatis.perl.patch
$ /usr/bin/makewhatis /usr/share/man
$ diff /usr/share/man/whatis.b /usr/share/man/whatis | less
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 1999-08-30 10:44:36 UTC
Responsible Changed
From-To: freebsd-bugs->mpp

Mike, does this look alright to you? 
Comment 2 Alexey Zelkin freebsd_committer freebsd_triage 1999-09-03 14:40:29 UTC
Responsible Changed
From-To: mpp->phantom

I'll go on with this problem. 

Approved by: mpp 
Comment 3 Alexey Zelkin freebsd_committer freebsd_triage 1999-09-06 06:42:59 UTC
State Changed
From-To: open->closed

Patch commited in -CURRENT and -STABLE. Thanks!