Re: [Autogen-users] windows + libopts
Brought to you by:
bkorb
From: Nikos M. <nm...@gn...> - 2012-11-26 08:36:31
|
On 11/26/2012 01:12 AM, Bruce Korb wrote: > The whole machination is about not having to know if you are printing > a format for a long option, a short option, an option without hyphen > introductions or options in GNU format or in the more elaborate > "autoopts native" format. (This is allowed when all command line > arguments must be options.) So "pzOptFmt" will point to one of these: [...] > So there needs to be some windows only code that checks the value of > "pAT->pzOptFmt": > #ifdef WINDOWS > if (pAT->pzOptFmt == zGnuOptFmt) > snprintf(z, sizeof(z), "--%s%s", pOD->pz_Name, pzArgType); > else if (pAT->pzOptFmt == zGnuOptFmt + 2) > snprintf(z, sizeof(z), "%s%s", pOD->pz_Name, pzArgType); > else > #endif It works perfectly, thank you. To work I replaced #ifdef WINDOWS with #ifdef _WIN32. regards, Nikos |