From d19b1b3d2b96de2f071446d001a7c6596c3a66a3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 18 Feb 2010 17:58:49 +0000 Subject: [PATCH] 2010-02-18 18:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/vm/cmdarg.c ! Fixed formatting. ! Fixed to enclose newly added code in {} block, otherwise it breaks with C compiler. - Deleted OS/2 specific guard in code section which is not anymore active to OS/2. * examples/gtwvw/hbgtwvw.h ! Fixed to not override manually set WINVER. ! Fixed to not set _WIN32_WINNT. --- harbour/ChangeLog | 12 ++++++++++++ harbour/examples/gtwvw/hbgtwvw.h | 8 ++++++-- harbour/src/vm/cmdarg.c | 27 ++++++++++++--------------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 98aff477a2..0292157023 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-18 18:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/cmdarg.c + ! Fixed formatting. + ! Fixed to enclose newly added code in {} block, otherwise + it breaks with C compiler. + - Deleted OS/2 specific guard in code section which is not + anymore active to OS/2. + + * examples/gtwvw/hbgtwvw.h + ! Fixed to not override manually set WINVER. + ! Fixed to not set _WIN32_WINNT. + 2010-02-18 18:45 UTC+0100 Maurilio Longo (maurilio.longo@libero.it) * src/vm/cmdarg.c ! fixed OS/2 was displaying the path of the first .exe with name equal diff --git a/harbour/examples/gtwvw/hbgtwvw.h b/harbour/examples/gtwvw/hbgtwvw.h index 28002fd6b8..89aeb4bd64 100644 --- a/harbour/examples/gtwvw/hbgtwvw.h +++ b/harbour/examples/gtwvw/hbgtwvw.h @@ -68,8 +68,12 @@ #define TTS_BALLOON 0x40 // added by MAG -#define WINVER 0x0500 -#define _WIN32_WINNT 0x0500 +#ifndef GRADIENT_FILL_RECT_H +#define GRADIENT_FILL_RECT_H 0x00000000 +#endif +#ifndef TPM_RECURSE +#define TPM_RECURSE 0x0001L +#endif #ifndef _WIN32_IE #define _WIN32_IE 0x0400 diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index 0ea203fd25..2da58a987a 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -156,16 +156,18 @@ void hb_cmdargUpdate( void ) } #elif defined( HB_OS_OS2 ) - PPIB ppib = NULL; - APIRET ulrc; + { + PPIB ppib = NULL; + APIRET ulrc; - ulrc = DosGetInfoBlocks( NULL, &ppib ); - if ( ulrc == NO_ERROR ) { - ulrc = DosQueryModuleName( ppib->pib_hmte, - HB_SIZEOFARRAY( s_szAppName ), - s_szAppName ); - if ( ulrc == NO_ERROR ) { - s_argv[ 0 ] = s_szAppName; + ulrc = DosGetInfoBlocks( NULL, &ppib ); + if( ulrc == NO_ERROR ) + { + ulrc = DosQueryModuleName( ppib->pib_hmte, + HB_SIZEOFARRAY( s_szAppName ), + s_szAppName ); + if( ulrc == NO_ERROR ) + s_argv[ 0 ] = s_szAppName; } } #else @@ -174,7 +176,7 @@ void hb_cmdargUpdate( void ) PHB_FNAME pFName = hb_fsFNameSplit( s_argv[ 0 ] ); HB_BOOL fInPath = HB_FALSE; - if( !pFName->szPath ) + if( ! pFName->szPath ) { char * pszPATH = hb_getenv( "PATH" ); @@ -184,11 +186,6 @@ void hb_cmdargUpdate( void ) hb_fsAddSearchPath( pszPATH, &pSearchPath ); pNextPath = pSearchPath; -# ifdef HB_OS_OS2 - if( !pFName->szExtension ) - pFName->szExtension = ".exe"; -# endif - while( pNextPath ) { pFName->szPath = pNextPath->szPath;