__p___argc, MSVCRT,__wine_get_main_args and ParseOptions
Francois Gouget
fgouget at free.fr
Tue Dec 4 02:15:45 CST 2001
On Tue, 20 Nov 2001, Uwe Bonnes wrote:
> Hallo,
>
> running with builtin msvcrt like
>
> > wine --dll msvcrt=b a.exe
[...]
> still counts _two_ arguments, as it sees "wine a.exe".
Yes, there is a problem. How did I miss it when I looked into the
parameter passing?
> For a short test I did
>
> hertz:/spare/bon/wine-clean> cvs -d $CVSROOT diff -u wine/misc/options.c
> Index: wine/misc/options.c
> ===================================================================
> RCS file: /home/wine/wine/misc/options.c,v
> retrieving revision 1.29
> diff -u -r1.29 options.c
> --- wine/misc/options.c 2001/11/06 00:49:48 1.29
> +++ wine/misc/options.c 2001/11/20 20:18:44
> @@ -356,8 +356,8 @@
> */
> int __wine_get_main_args( char ***argv )
> {
> - *argv = app_argv;
> - return app_argc;
> + *argv = &app_argv[1];
> + return app_argc-1;
> }
The problem with this patch is that it removes the application name
for Winelib applications. More investigation is needed...
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
I haven't lost my mind, it's backed up on tape around here somewhere...
More information about the wine-devel
mailing list