misc/version.c (revisited)

whitnl73 at juno.com whitnl73 at juno.com
Fri Jan 10 11:30:45 CST 2003


Good day!

This will at least get DOS (6.22) debug to start.  Next I will see about
getting it to work.

Regards,

Lawson

Oops, forgot a ChangeLog.

ChangeLog:
	* misc/version.c:
	Lawson Whitney <whitnl73 at juno.com>
	Make [Version] work for MZ executables too.

diff -urN was/misc/version.c is/misc/version.c
--- was/misc/version.c	Tue Oct  8 18:50:14 2002
+++ is/misc/version.c	Fri Jan 10 10:54:28 2003
@@ -336,11 +336,12 @@
     if (init_done) return;
     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