This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

makewhatis -s option can't take >1 parameters


I found that the "-s" option to makewhatis cannot take
multiple sections.  If you try to supply multiple
sections, they are incorrectly interpreted as a
manpath.

For example:
% makewhatis -s '1 2'
No such directory 2

You might wonder why anyone would ever want to use
"-s".  (A comment in the code says that it might be
obsoleted soon.)  I need to use "-s" because section
8c, containing imapd, is not supplied in the default
section list.  However, if I use "makewhatis -s 8c"
alone, the whatis database loses information about all
the other sections.  I need to be able to run
"makewhatis -s '1 2 3 4 5 6 7 8 9 n l 8c'".

I looked into the source, and determined that there is
a simple fix.  The problem is caused by the use of $*
in a 'for' loop to reference the command-line
arguments.  This causes any argument that contains
multiple words to become multiple arguments.  The "$@"
construct is specifically designed to work around
this: bash expands "$@" to a quoted word for every
argument.

Thus, changing line 71 from:
for name in $*
to:
for name in "$@"
solves the problem.

This is based on a fresh download of the stable branch
from redhat.com from a couple hours ago:

% cygcheck -s

Cygwin Win95/NT Configuration Diagnostics
Current System Time: Tue Dec 09 18:01:59 2003

Windows 2000 Professional Ver 5.0 Build 2195 Service
Pack 4

% cygcheck -c man
Cygwin Package Information
Package              Version        Status
man                  1.5j-2         OK

I hope this is helpful.

-Matt Carter

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]