From 86d76b4e7ff4a329bc8432ba70e35eb9482ac4c4 Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Wed, 8 Sep 1999 04:21:05 +0000 Subject: [PATCH] See ChangeLog entry 19990908-00:05 EDT David G. Holm --- harbour/ChangeLog | 13 ++++++++++ harbour/source/rtl/environ.c | 46 ++++++++++-------------------------- harbour/source/rtl/tget.prg | 1 + 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 071e31d271..b6fd4415e5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,16 @@ +19990908-00:05 EDT David G. Holm + * source/rtl/environ.c + ! Version 1.43 added Windows code to detect the Windows version, but + it also replaced the DOS code to detect Windows with Windows code + to detect Windows. But Borland C 3.1 refuses to compile Windows code + when creating DOS programs and I suspect that other DOS compilers do + the same. So I restored version 1.42 and then put the Windows code + from version 1.43 back in the only place where it belongs. + - I removed the "95/98" designation from the Windows detection in DOS + mode, because that code should also be able to detect Windows 3.x. + * source/rtl/tget.prg + ! Added missing ::Display() at end of ::Delete() + 19990908-04:52 GMT+1 Victor Szel * tests/working/rtl_test.prg + Some tests now are only included when compiled with Harbour, to skip diff --git a/harbour/source/rtl/environ.c b/harbour/source/rtl/environ.c index b07e4128cf..c9f9a26ee6 100644 --- a/harbour/source/rtl/environ.c +++ b/harbour/source/rtl/environ.c @@ -8,26 +8,13 @@ * __RUN() */ -/* NOTE: Support for determining the window version by Luiz Rafael Culik - Culik@sl.conex.net +/* Note: The following #ifdef block for __IBMCPP__ must + be ahead of any and all #include statements! */ - -/* NOTE: The following #ifdef block for __IBMCPP__ must - be ahead of any and all #include statements! */ - #ifdef __IBMCPP__ #define INCL_DOSMISC #endif -/* NOTE: The following #ifdef block #including must - be ahead of any and all #include statements! */ - -#if defined(_Windows) || defined(_WIN32) - #if !defined(__CYGWIN__) - #include - #endif -#endif - #include "extend.h" #include "errorapi.h" #include "hbver.h" @@ -99,7 +86,7 @@ HARBOUR HB_OS( void ) /* TODO: add MSVC support but MSVC cannot detect any OS except Windows! */ #if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__MSC__) || defined(_MSC_VER) -#if defined(_Windows) || defined(_WIN32) || defined(__BORLANDC__) || defined(__MSC__) || defined(_MSC_VER) && !defined(__CYGWIN__) +#if defined(_Windows) || defined(_WIN32) /* NOTE: Support for determining the window version by Luiz Rafael Culik Culik@sl.conex.net @@ -136,7 +123,6 @@ HARBOUR HB_OS( void ) break; } } - #else #if defined(__MSC__) || defined(_MSC_VER) if( _osmode == _WIN_MODE ) @@ -147,24 +133,16 @@ HARBOUR HB_OS( void ) hb_osletter = 0; } #else - OSVERSIONINFO osVer; // for GetVersionEx() - osVer.dwOSVersionInfoSize = sizeof(osVer); - if (GetVersionEx(&osVer)) { - if (osVer.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS){ - - hb_osmajor = osVer.dwMajorVersion - hb_osminor = osVer.dwMinorVersion - hb_osletter = osVer.dwBuildNumber; - hb_os = "Windows 95/98"; + /* detect Windows */ + _AX = 0x160A; + geninterrupt( 0x2F ); + if( _AX == 0 ) + { + hb_osmajor = _BX / 256; + hb_osminor = _BX % 256; + hb_osletter = 0; + hb_os = "Windows"; } - if (osVer.dwPlatformId = VER_PLATFORM_WIN32_NT){ - - hb_osmajor = osVer.dwMajorVersion - hb_osminor = osVer.dwMinorVersion - hb_osletter = osVer.dwBuildNumber; - hb_os = "Windows NT"; - } -} #endif /* __MSC__ */ else { diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index 93160dc7a8..f59715bfad 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -741,6 +741,7 @@ METHOD _Delete() CLASS TGet endcase ::Assign() + ::Display() return Self