This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add locale/charset support to mkshortcut


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]