nano-devel
[Top][All Lists]
Advanced

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

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


From: David Lawrence Ramsey
Subject: [Nano-devel] possible fix for bug with -I/--ignorercfiles
Date: Mon, 22 Jul 2002 14:11:34 -0700 (PDT)

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.


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!

_____________________________________________________________
Promote your group and strengthen ties to your members with address@hidden by 
Everyone.net  http://www.everyone.net/?btn=tag

Attachment: nanonorc.patch
Description: Binary data


reply via email to

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