delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/09/18:21:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20031209232131.26096.qmail@web41403.mail.yahoo.com>
Date: Tue, 9 Dec 2003 15:21:31 -0800 (PST)
From: Matthew Carter <r_q_einstein-cygwin AT yahoo DOT com>
Subject: makewhatis -s option can't take >1 parameters
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019