Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 1999 20:15:09 +0400 (MSD)
From:      "Alexey Zelkin" <phantom@cris.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/13456: [PATCH] makewhatis(1) is confuisng with ``-'' symbol in ".Nd" field
Message-ID:  <199908291615.UAA02421@scorpion.crimea.ua>

next in thread | raw e-mail | index | archive | help

>Number:         13456
>Category:       bin
>Synopsis:       makewhatis(1) is confuisng with ``-'' symbol in ".Nd" field
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 29 10:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Zelkin
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Home
>Environment:

-current, last cvsuped this night

>Description:

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

>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

>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.

Index: makewhatis.perl
===================================================================
RCS file: /usr/local/CVSROOT/src/gnu/usr.bin/man/makewhatis/makewhatis.perl,v
retrieving revision 1.18
diff -c -r1.18 makewhatis.perl
*** makewhatis.perl	1998/08/05 03:44:14	1.18
--- makewhatis.perl	1999/08/29 18:02:51
***************
*** 368,374 ****
  		    $list .= $_;
  		    $list .= ' ';
  		} else {
! 		    $list .= '- ' if (!$flag && !/-/);
  		    $flag++;
  		    s/^\.[A-Z][a-z][ \t]*//;
  		    s/[ \t]+$//;
--- 368,374 ----
  		    $list .= $_;
  		    $list .= ' ';
  		} else {
! 		    $list .= '- ' if (!$flag && !/^- /);
  		    $flag++;
  		    s/^\.[A-Z][a-z][ \t]*//;
  		    s/[ \t]+$//;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908291615.UAA02421>