Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
From: Chris Herborth <cherborth@qnx.com>
Subject: Re: Anyone having problem with 'man' permissions?
Date: Thu, 05 Aug 2004 14:00:50 -0400
Organization: QNX Software Systems Ltd.
Lines: 53
Message-ID: <cetski$g7u$1@sea.gmane.org>
References: <000601c47959$a89a9610$0100a8c0@asswipe> <cetqlc$asj$1@sea.gmane.org> <6.1.0.6.0.20040805134603.033540d8@pop.prospeed.net>
Reply-To: cherborth@qnx.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: mobius.qnx.com
User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)
In-Reply-To: <6.1.0.6.0.20040805134603.033540d8@pop.prospeed.net>
X-IsSubscribed: yes

Larry Hall wrote:
>>I haven't seen that, but when I try to use 'man', I get this error:
>>
>>troff: fatal error: can't open ` -P-c -mandoc': No such file or directory
>>
>>I've tried tracking down this problem, presumably in one of the shell scripts (such as /usr/bin/nroff), without luck.
> 
> Just a WAG but I'd suggest checking you '/usr/sharemisc/man.conf' file 
> for it's NROFF settings.  Looks like yours is adding a '-P' option 
> without proper spacing.

It's got this:

NROFF           /usr/bin/nroff -c -mandoc

/usr/bin/nroff has this inside:

   case $1 in
     -c)
       opts="$opts -P-c" ;;
     -h)
       opts="$opts -P-h" ;;

adding spaces between -P and {-c,-h} gives this error:

troff: fatal error: can't open ` -P -c -mandoc': No such file or directory

Adding -x to #!/bin/sh in /usr/bin/nroff suggests that for "man foo" the 
"foo" doesn't make it into the call to groff at the end of the script 
and that the additional args are being passed as a single argument:

CHerborth@qnxws7083 [502]: man bash
+ prog=/usr/bin/nroff
+ opts=
+ opts= -P-c
+ shift
+ opts= -P-c -mandoc
+ shift
+ : /usr/bin
+ export GROFF_BIN_PATH
+ 
PATH=/usr/bin:/c/emacs-21.3/bin:/cygdrive/d/cherborth/bin:/usr/local/bin:/usr/
bin:/bin:/usr/X11R6/bin:/cygdrive/d/cherborth/bin:/usr/bin:/cygdrive/c/WINDOWS/s
ystem32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Progra
m Files/ATI Technologies/ATI Control Panel:/cygdrive/c/Program 
Files/Common File
s/GTK/2.0/bin:.:/cygdrive/c/QNX6.3.0/host/win32/x86/usr/bin:/cygdrive/c/Program
Files/QNX Software Systems/bin groff -mtty-char -Tascii  -P-c -mandoc
troff: fatal error: can't open ` -P-c -mandoc': No such file or directory

-- 
Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.


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

