misc/version.c revisited

whitnl73 at juno.com whitnl73 at juno.com
Sat Apr 12 22:34:45 CDT 2003


Good day!

I still think an .mz (DOS) app should be allowed to see a user-specified
DOS version.

Lawson

OOPS, that one has been ignored twice.  I meant to leave the WARN
this time.


ChangeLog
	* misc/version.c: Lawson Whitney <whitnl73 at juno.com>
	Provide an appname for a DOS executable.


diff -urN was/misc/version.c is/misc/version.c
--- was/misc/version.c	Sat Apr 12 22:56:04 2003
+++ is/misc/version.c	Sat Apr 12 23:05:42 2003
@@ -338,10 +338,12 @@
     if (!GetModuleFileNameW( 0, buffer, MAX_PATH ))
     {
         WARN( "could not get module file name\n" );
-        return;
+        strncpyW( buffer, GetCommandLineW(), MAX_PATH);
+        if ((p = strchrW( buffer, ' '))) *p = 0;
     }
     init_done = TRUE;
     appname = buffer;
+    if ((p = strrchrW( appname, ':' ))) appname = p + 1;
     if ((p = strrchrW( appname, '/' ))) appname = p + 1;
     if ((p = strrchrW( appname, '\\' ))) appname = p + 1;




________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com



More information about the wine-patches mailing list