nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] possible fix for bug with -I/--ignorercfiles


From: Chris Allegretta
Subject: Re: [Nano-devel] possible fix for bug with -I/--ignorercfiles
Date: Mon, 22 Jul 2002 17:35:35 -0700
User-agent: Mutt/1.2.5.1i

On Mon, Jul 22, 2002 at 02:11:34PM -0700, David Lawrence Ramsey wrote:
> After some bizarre problems encountered today with nano
> compiled with --enable-nanorc (e. g. 'nano -r 72 -Q
> "anything"' results in the usage screen), I've figured out
> that the routine to reset getopt[_long]() after checking for
> -I/--ignorercfiles isn't properly resetting it.  (Carl
> Drinkwater's original version set a variable optreset to 1,
> presumably to handle this, but I can't find a reference to
> it in the getopt(3) manual, and gcc complains about its not
> existing.)  It apparently causes option arguments to be
> lost, leading to invalid command lines.  As a workaround for
> this, I've replaced the routine with a for loop searching
> through argv[] for "--", "-I", and/or "--ignorercfiles" and
> handling them; it's a bit uglier, but it appears to handle
> them properly, and with it, the above command line works
> again.  Or does anyone have a better way?  The patch (which
> also changes some spaces to tabs properly in nano.h) is
> attached.

I think it looks great.  Nice work, credited and committed.

Chris A
-- 
Chris Allegretta        http://www.asty.org

"Share and Enjoy" - Douglas Adams, 1952 - 2001



reply via email to

[Prev in Thread] Current Thread [Next in Thread]