This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] Add locale/charset support to mkshortcut
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin-apps at cygwin dot com
- Date: Sun, 15 Aug 2010 22:26:41 +0100
- Subject: Re: [PATCH] Add locale/charset support to mkshortcut
- References: <416096c61001031318r6b474297ua0bb8a9b8c770976@mail.gmail.com> <4B436D47.9040609@cwilson.fastmail.fm> <4C6857E6.4010409@cwilson.fastmail.fm>
On 15 August 2010 22:11, Charles Wilson wrote:
> On 1/5/2010 11:48 AM, Charles Wilson wrote:
>> Personally, I dislike global static variables. It's also bad practice
>> with popt, because a single program can have multiple parsing contexts.
>> (Not that any of the cygutils tools do this; so if you want to globally
>> modify all cygutils popt-using utilities to make optCon a static var, I
>> would accept that patch;
>
> I've made this change throughout.
>
>> I think that, in general, --help output should go to stdout, not stderr.
>> ÂAlso --usage, --license, and --version output. ÂHowever, if an *error*
>> is handled by printing the usage(), then it should go to stderr.
>>
>> That wasn't the case in mkshortcut. ÂSo, rather than removing the FILE *
>> argument -- since, as you noticed, all of the affected functions were
>> invariably called with stderr -- I'd prefer that the ?,u,v,l cases be
>> updated to call the appropriate function with stdout, but that existing
>> error handling cases call usage() with stderr. Â(Ick. ÂIt appears that
>> most of the other popt-using cygutils tools ALSO send everything always
>> to stderr. Well, this is an easy change. ÂLet's punt on this, too, and
>> I'll do it all-at-once)
>
> This too.
Thanks very much!
> So, if you want to forward port your locale/charset changes and
> cleanup-handling changes for mkshortcut (probably as two separate
> patches) I'll try to act on them more rapidly this time. :-)
So you'd be ok with not freeing stuff before exit()? That would make
things quite a bit easier. (Belated apologies for being too strident
about this back then.)
Andy