- mb_argv[mb_argc] = (char *) NULL;
-
- // this macro will free memory we used above
- #define ARGS_CLEANUP \
- for ( mb_argc = 0; mb_argv[mb_argc]; mb_argc++ ) \
- free(mb_argv[mb_argc])
-#else // ANSI
- // no need for cleanup
- #define ARGS_CLEANUP
-
- wxChar **mb_argv = argv;
-#endif // Unicode/ANSI
-
- // we want this function to work even if there is no wxApp so ensure that
- // we have a valid traits pointer
- wxConsoleAppTraits traitsConsole;
- wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
- if ( !traits )
- traits = &traitsConsole;
-
- // this struct contains all information which we pass to and from
- // wxAppTraits methods