From 81795871b7a636c1e4ea6ee5dbe149f0775c9730 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 25 Nov 2009 16:16:29 +0000 Subject: [PATCH] 2009-11-25 17:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/Makefile + contrib/hbwin/legacycv.c * contrib/hbwin/win_os.prg * contrib/hbwin/win_osc.c * contrib/hbwin/win_tprn.prg + Added new names for win version support functions: WIN_OSISNT() <= OS_ISWINNT() WIN_OSISNT351() <= OS_ISWINNT351() WIN_OSISNT4() <= OS_ISWINNT4() WIN_OSIS2000ORUPPER() <= OS_ISWIN2000_OR_LATER() WIN_OSIS2000() <= OS_ISWIN2000() WIN_OSISXP() <= OS_ISWINXP() WIN_OSIS2003() <= OS_ISWIN2003() WIN_OSISVISTA() <= OS_ISWINVISTA() WIN_OSIS7() <= OS_ISWIN7() WIN_OSIS9X() <= OS_ISWIN9X() WIN_OSIS95() <= OS_ISWIN95() WIN_OSIS98() <= OS_ISWIN98() WIN_OSISME() <= OS_ISWINME() WIN_OSISTSCLIENT() <= OS_ISWTSCLIENT() WIN_OSVERSIONINFO() <= OS_VERSIONINFO() WIN_OSNETREGOK() <= OS_NETREGOK() WIN_OSNETVREDIROK() <= OS_NETVREDIROK() ; Old names still work, and they are guarded with HB_WIN_LEGACY_LEVEL_OFF macro, in case someone would like to disable them. Please use new names, old names may disappear in the future. * contrib/hbwin/wce_simc.c * contrib/hbwin/wce_smsc.c * contrib/hbwin/wce_sim.prg + Added new names for WinCE SMS/SIM support functions: WCE_SIMINITIALIZE() <= SIMINITIALIZE() WCE_SIMDEINITIALIZE() <= SIMDEINITIALIZE() WCE_SIMPHONEBOOKSTATUS() <= SIMPHONEBOOKSTATUS() WCE_SIMREADPHONEBOOKENTRY() <= SIMREADPHONEBOOKENTRY() WCE_SIMWRITEPHONEBOOKENTRY() <= SIMWRITEPHONEBOOKENTRY() WCE_SIMDELETEPHONEBOOKENTRY() <= SIMDELETEPHONEBOOKENTRY() WCE_SMSSENDMESSAGE() <= SMSSENDMESSAGE() ; INCOMPATIBLE. ; NOTE: With these changes hbwin namespace is clean except for legacy definitions and .dll functions. DLL functions need a major overhaul anyway (plus there is Xbase++ and xhb compatibility concerns there), so for now it's OK. --- harbour/ChangeLog | 46 ++++++++++++++++++ harbour/contrib/hbwin/Makefile | 1 + harbour/contrib/hbwin/legacycv.c | 75 ++++++++++++++++++++++++++++++ harbour/contrib/hbwin/wce_sim.prg | 14 +++--- harbour/contrib/hbwin/wce_simc.c | 12 ++--- harbour/contrib/hbwin/wce_smsc.c | 2 +- harbour/contrib/hbwin/win_os.prg | 22 ++++----- harbour/contrib/hbwin/win_osc.c | 30 ++++++------ harbour/contrib/hbwin/win_tprn.prg | 2 +- 9 files changed, 163 insertions(+), 41 deletions(-) create mode 100644 harbour/contrib/hbwin/legacycv.c diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 86f1330807..39c6b3e5d0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,52 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-25 17:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/Makefile + + contrib/hbwin/legacycv.c + * contrib/hbwin/win_os.prg + * contrib/hbwin/win_osc.c + * contrib/hbwin/win_tprn.prg + + Added new names for win version support functions: + WIN_OSISNT() <= OS_ISWINNT() + WIN_OSISNT351() <= OS_ISWINNT351() + WIN_OSISNT4() <= OS_ISWINNT4() + WIN_OSIS2000ORUPPER() <= OS_ISWIN2000_OR_LATER() + WIN_OSIS2000() <= OS_ISWIN2000() + WIN_OSISXP() <= OS_ISWINXP() + WIN_OSIS2003() <= OS_ISWIN2003() + WIN_OSISVISTA() <= OS_ISWINVISTA() + WIN_OSIS7() <= OS_ISWIN7() + WIN_OSIS9X() <= OS_ISWIN9X() + WIN_OSIS95() <= OS_ISWIN95() + WIN_OSIS98() <= OS_ISWIN98() + WIN_OSISME() <= OS_ISWINME() + WIN_OSISTSCLIENT() <= OS_ISWTSCLIENT() + WIN_OSVERSIONINFO() <= OS_VERSIONINFO() + WIN_OSNETREGOK() <= OS_NETREGOK() + WIN_OSNETVREDIROK() <= OS_NETVREDIROK() + ; Old names still work, and they are guarded with HB_WIN_LEGACY_LEVEL_OFF + macro, in case someone would like to disable them. + Please use new names, old names may disappear in the future. + + * contrib/hbwin/wce_simc.c + * contrib/hbwin/wce_smsc.c + * contrib/hbwin/wce_sim.prg + + Added new names for WinCE SMS/SIM support functions: + WCE_SIMINITIALIZE() <= SIMINITIALIZE() + WCE_SIMDEINITIALIZE() <= SIMDEINITIALIZE() + WCE_SIMPHONEBOOKSTATUS() <= SIMPHONEBOOKSTATUS() + WCE_SIMREADPHONEBOOKENTRY() <= SIMREADPHONEBOOKENTRY() + WCE_SIMWRITEPHONEBOOKENTRY() <= SIMWRITEPHONEBOOKENTRY() + WCE_SIMDELETEPHONEBOOKENTRY() <= SIMDELETEPHONEBOOKENTRY() + WCE_SMSSENDMESSAGE() <= SMSSENDMESSAGE() + ; INCOMPATIBLE. + + ; NOTE: With these changes hbwin namespace is clean except + for legacy definitions and .dll functions. DLL functions + need a major overhaul anyway (plus there is Xbase++ and + xhb compatibility concerns there), so for now it's OK. + 2009-11-25 16:56 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/hvm.c % minor improvement diff --git a/harbour/contrib/hbwin/Makefile b/harbour/contrib/hbwin/Makefile index dd466dcfd2..7cfc471663 100644 --- a/harbour/contrib/hbwin/Makefile +++ b/harbour/contrib/hbwin/Makefile @@ -15,6 +15,7 @@ C_SOURCES := \ legacycd.c \ legacyco.c \ legacycp.c \ + legacycv.c \ wce_simc.c \ wce_smsc.c \ win_com.c \ diff --git a/harbour/contrib/hbwin/legacycv.c b/harbour/contrib/hbwin/legacycv.c new file mode 100644 index 0000000000..dd7157d80f --- /dev/null +++ b/harbour/contrib/hbwin/legacycv.c @@ -0,0 +1,75 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Compatibility calls (Printer support). + * + * Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#include "hbapi.h" + +#if !defined( HB_WIN_LEGACY_LEVEL_OFF ) + +HB_FUNC_EXTERN( WIN_OSISNT ) ; HB_FUNC( OS_ISWINNT ) { HB_FUNC_EXEC( WIN_OSISNT ); } +HB_FUNC_EXTERN( WIN_OSISNT351 ) ; HB_FUNC( OS_ISWINNT351 ) { HB_FUNC_EXEC( WIN_OSISNT351 ); } +HB_FUNC_EXTERN( WIN_OSISNT4 ) ; HB_FUNC( OS_ISWINNT4 ) { HB_FUNC_EXEC( WIN_OSISNT4 ); } +HB_FUNC_EXTERN( WIN_OSIS2000ORUPPER ) ; HB_FUNC( OS_ISWIN2000_OR_LATER ) { HB_FUNC_EXEC( WIN_OSIS2000ORUPPER ); } +HB_FUNC_EXTERN( WIN_OSIS2000 ) ; HB_FUNC( OS_ISWIN2000 ) { HB_FUNC_EXEC( WIN_OSIS2000 ); } +HB_FUNC_EXTERN( WIN_OSISXP ) ; HB_FUNC( OS_ISWINXP ) { HB_FUNC_EXEC( WIN_OSISXP ); } +HB_FUNC_EXTERN( WIN_OSIS2003 ) ; HB_FUNC( OS_ISWIN2003 ) { HB_FUNC_EXEC( WIN_OSIS2003 ); } +HB_FUNC_EXTERN( WIN_OSISVISTA ) ; HB_FUNC( OS_ISWINVISTA ) { HB_FUNC_EXEC( WIN_OSISVISTA ); } +HB_FUNC_EXTERN( WIN_OSIS7 ) ; HB_FUNC( OS_ISWIN7 ) { HB_FUNC_EXEC( WIN_OSIS7 ); } +HB_FUNC_EXTERN( WIN_OSIS9X ) ; HB_FUNC( OS_ISWIN9X ) { HB_FUNC_EXEC( WIN_OSIS9X ); } +HB_FUNC_EXTERN( WIN_OSIS95 ) ; HB_FUNC( OS_ISWIN95 ) { HB_FUNC_EXEC( WIN_OSIS95 ); } +HB_FUNC_EXTERN( WIN_OSIS98 ) ; HB_FUNC( OS_ISWIN98 ) { HB_FUNC_EXEC( WIN_OSIS98 ); } +HB_FUNC_EXTERN( WIN_OSISME ) ; HB_FUNC( OS_ISWINME ) { HB_FUNC_EXEC( WIN_OSISME ); } +HB_FUNC_EXTERN( WIN_OSISTSCLIENT ) ; HB_FUNC( OS_ISWTSCLIENT ) { HB_FUNC_EXEC( WIN_OSISTSCLIENT ); } +HB_FUNC_EXTERN( WIN_OSVERSIONINFO ) ; HB_FUNC( OS_VERSIONINFO ) { HB_FUNC_EXEC( WIN_OSVERSIONINFO ); } +HB_FUNC_EXTERN( WIN_OSNETREGOK ) ; HB_FUNC( OS_NETREGOK ) { HB_FUNC_EXEC( WIN_OSNETREGOK ); } +HB_FUNC_EXTERN( WIN_OSNETVREDIROK ) ; HB_FUNC( OS_NETVREDIROK ) { HB_FUNC_EXEC( WIN_OSNETVREDIROK ); } + +#endif diff --git a/harbour/contrib/hbwin/wce_sim.prg b/harbour/contrib/hbwin/wce_sim.prg index 32ff20e09b..7b0fd19b3e 100644 --- a/harbour/contrib/hbwin/wce_sim.prg +++ b/harbour/contrib/hbwin/wce_sim.prg @@ -83,7 +83,7 @@ METHOD New() CLASS wce_sim METHOD lInitialize() CLASS wce_sim - LOCAL nResult := SimInitialize( @::hSim ) + LOCAL nResult := wce_SimInitialize( @::hSim ) ::lInitialized := ( nResult == SIM_E_OK ) ::nLastError := nResult @@ -99,7 +99,7 @@ METHOD lDeInitialize() CLASS wce_sim RETURN .F. ENDIF - nResult := SimDeInitialize( ::hSim ) + nResult := wce_SimDeInitialize( ::hSim ) ::lInitialized := !( nResult == SIM_E_OK ) ::nLastError := nResult @@ -117,7 +117,7 @@ METHOD lNumberOfPhoneBookEntries( nType, /* @ */ nTotal, /* @ */ nUsed ) CLASS w DEFAULT nType TO SIM_PBSTORAGE_SIM - nResult := SimPhoneBookStatus( ::hSim, nType, @nTotal, @nUsed ) + nResult := wce_SimPhoneBookStatus( ::hSim, nType, @nTotal, @nUsed ) ::nLastError := nResult RETURN nResult == SIM_E_OK @@ -145,7 +145,7 @@ METHOD aGetAllPhoneBookEntries( nType ) CLASS wce_sim FOR nPos := 1 TO nUsed aEntry := {} - nResult := SimReadPhoneBookEntry( ::hSim, nType, nPos, @aEntry ) + nResult := wce_SimReadPhoneBookEntry( ::hSim, nType, nPos, @aEntry ) IF nResult != SIM_E_OK ::nLastError := nResult EXIT @@ -170,7 +170,7 @@ METHOD lGetSimPhoneEntry( nPos, nType, /* @ */ aEntry ) CLASS wce_sim DEFAULT nType TO SIM_PBSTORAGE_SIM - nResult := SimReadPhoneBookEntry( ::hSim, nType, nPos, @a ) + nResult := wce_SimReadPhoneBookEntry( ::hSim, nType, nPos, @a ) aEntry := { a } ::nLastError := nResult @@ -189,7 +189,7 @@ METHOD lSetSimPhoneEntry( nPos, nType, cNumber, cName, nPlan, nAddrType ) CLASS DEFAULT nPos TO SIM_PBINDEX_FIRSTAVAILABLE DEFAULT nType TO SIM_PBSTORAGE_SIM - nResult := SimWritePhoneBookEntry( ::hSim, nType, nPos, cNumber, cName, nPlan, nAddrType ) + nResult := wce_SimWritePhoneBookEntry( ::hSim, nType, nPos, cNumber, cName, nPlan, nAddrType ) ::nLastError := nResult RETURN nResult == SIM_E_OK @@ -205,7 +205,7 @@ METHOD lDelSimPhoneEntry( nPos, nType ) CLASS wce_sim DEFAULT nType TO SIM_PBSTORAGE_SIM - nResult := SimDeletePhoneBookEntry( ::hSim, nType, nPos ) + nResult := wce_SimDeletePhoneBookEntry( ::hSim, nType, nPos ) ::nLastError := nResult RETURN nResult == SIM_E_OK diff --git a/harbour/contrib/hbwin/wce_simc.c b/harbour/contrib/hbwin/wce_simc.c index ec69a75005..4031b5b829 100644 --- a/harbour/contrib/hbwin/wce_simc.c +++ b/harbour/contrib/hbwin/wce_simc.c @@ -59,7 +59,7 @@ #include -HB_FUNC( SIMINITIALIZE ) /* hSim by reference, lNotifications */ +HB_FUNC( WCE_SIMINITIALIZE ) /* hSim by reference, lNotifications */ { HSIM hSim = 0; HRESULT hResult = SimInitialize( hb_parl( 2 ) ? SIM_INIT_SIMCARD_NOTIFICATIONS : 0, NULL, 0, &hSim ); @@ -68,12 +68,12 @@ HB_FUNC( SIMINITIALIZE ) /* hSim by reference, lNotifications */ hb_retnl( hResult ); } -HB_FUNC( SIMDEINITIALIZE ) /* hSim */ +HB_FUNC( WCE_SIMDEINITIALIZE ) /* hSim */ { hb_retnl( SimDeinitialize( ( HSIM ) hb_parptr( 1 ) ) ); } -HB_FUNC( SIMPHONEBOOKSTATUS ) /* hSim, nLocation, @nTotal, @nUsed */ +HB_FUNC( WCE_SIMPHONEBOOKSTATUS ) /* hSim, nLocation, @nTotal, @nUsed */ { DWORD dwUsed = 0, dwTotal = 0; HRESULT hResult = SimGetPhonebookStatus( ( HSIM ) hb_parptr( 1 ), ( DWORD ) hb_parnl( 2 ) /* dwLocation */, &dwUsed, &dwTotal ); @@ -84,7 +84,7 @@ HB_FUNC( SIMPHONEBOOKSTATUS ) /* hSim, nLocation, @nTotal, @nUsed */ hb_retnl( hResult ); } -HB_FUNC( SIMREADPHONEBOOKENTRY ) /* hSim, nLocation, nPos, @aEntry */ +HB_FUNC( WCE_SIMREADPHONEBOOKENTRY ) /* hSim, nLocation, nPos, @aEntry */ { HSIM hSim = ( HSIM ) hb_parptr( 1 ); DWORD dwIndex = ( DWORD ) hb_parnl( 3 ); @@ -114,7 +114,7 @@ HB_FUNC( SIMREADPHONEBOOKENTRY ) /* hSim, nLocation, nPos, @aEntry */ HB_TCHAR_FREE( szText ); } -HB_FUNC( SIMWRITEPHONEBOOKENTRY ) /* hSim, nLocation, nPos, cNumber, cName, nPlan, nAddrType */ +HB_FUNC( WCE_SIMWRITEPHONEBOOKENTRY ) /* hSim, nLocation, nPos, cNumber, cName, nPlan, nAddrType */ { SIMPHONEBOOKENTRY PhoneEntry; wchar_t * lpwszAddress = HB_TCHAR_CONVTO( hb_parcx( 4 ) ); @@ -133,7 +133,7 @@ HB_FUNC( SIMWRITEPHONEBOOKENTRY ) /* hSim, nLocation, nPos, cNumber, cName, nPla HB_TCHAR_FREE( lpwszText ); } -HB_FUNC( SIMDELETEPHONEBOOKENTRY ) /* hSim, nLocation, nPos */ +HB_FUNC( WCE_SIMDELETEPHONEBOOKENTRY ) /* hSim, nLocation, nPos */ { hb_retnl( SimDeletePhonebookEntry( ( HSIM ) hb_parptr( 1 ), ( DWORD ) hb_parnl( 2 ), ( DWORD ) hb_parnl( 3 ) ) ); } diff --git a/harbour/contrib/hbwin/wce_smsc.c b/harbour/contrib/hbwin/wce_smsc.c index 7c58784fcf..958a984a9f 100644 --- a/harbour/contrib/hbwin/wce_smsc.c +++ b/harbour/contrib/hbwin/wce_smsc.c @@ -58,7 +58,7 @@ #include -HB_FUNC( SMSSENDMESSAGE ) /* cMessage, cNumber */ +HB_FUNC( WCE_SMSSENDMESSAGE ) /* cMessage, cNumber */ { SMS_HANDLE smshHandle = 0; HRESULT hr = SmsOpen( SMS_MSGTYPE_TEXT, SMS_MODE_SEND, &smshHandle, NULL ); /* try to open an SMS Handle */ diff --git a/harbour/contrib/hbwin/win_os.prg b/harbour/contrib/hbwin/win_os.prg index a4d1e45806..52d5c273d6 100644 --- a/harbour/contrib/hbwin/win_os.prg +++ b/harbour/contrib/hbwin/win_os.prg @@ -68,7 +68,7 @@ /* NOTE: To change any of these registry settings Administrator rights are required by default in Windows. [vszakats] */ -FUNCTION OS_NETREGOK( lSetIt, lDoVista ) +FUNCTION WIN_OSNETREGOK( lSetIt, lDoVista ) LOCAL rVal := .T. LOCAL cKeySrv LOCAL cKeyWks @@ -76,9 +76,9 @@ FUNCTION OS_NETREGOK( lSetIt, lDoVista ) DEFAULT lSetIt TO .F. DEFAULT lDoVista TO .T. - IF !lDoVista .AND. OS_ISWINVISTA() + IF ! lDoVista .AND. ( win_osIsVista() .OR. win_osIs7() ) * - ELSEIF OS_ISWIN9X() + ELSEIF win_osIs9X() rVal := QueryRegistry( HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Services\VxD\VREDIR", "DiscardCacheOnOpen", 1, lSetIt ) ELSE cKeySrv := "System\CurrentControlSet\Services\LanmanServer\Parameters" @@ -98,28 +98,28 @@ FUNCTION OS_NETREGOK( lSetIt, lDoVista ) rVal := rVal .AND. QueryRegistry( HKEY_LOCAL_MACHINE, cKeyWks, "UtilizeNtCaching", 0, lSetIt ) rVal := rVal .AND. QueryRegistry( HKEY_LOCAL_MACHINE, cKeyWks, "UseLockReadUnlock", 0, lSetIt ) - IF OS_ISWIN2000_OR_LATER() + IF win_osis2000OrUpper() rVal := rVal .AND. QueryRegistry( HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Services\MRXSmb\Parameters", "OpLocksDisabled", 1, lSetIt ) ENDIF ENDIF RETURN rVal -FUNCTION OS_NETVREDIROK( nResult ) +FUNCTION WIN_OSNETVREDIROK( nResult ) LOCAL cWinDir LOCAL cFile LOCAL a nResult := 0 - IF OS_ISWIN9X() - cWinDir := GETENV( "WINDIR" ) /* Get the folder that Windows is installed in */ - IF EMPTY( cWinDir ) + IF win_osIs9X() + cWinDir := GetEnv( "WINDIR" ) /* Get the folder that Windows is installed in */ + IF Empty( cWinDir ) cWinDir := "C:\WINDOWS" ENDIF cFile := cWinDir + "\SYSTEM\VREDIR.VXD" - a := DIRECTORY( cFile ) /* Check for faulty files. */ - IF !EMPTY( a ) + a := Directory( cFile ) /* Check for faulty files. */ + IF ! Empty( a ) IF a[ 1, F_SIZE ] == 156749 .AND. a[ 1, F_TIME ] == "11:11:10" nResult := 1111 ELSEIF a[ 1, F_SIZE ] == 140343 .AND. a[ 1, F_TIME ] == "09:50:00" @@ -128,4 +128,4 @@ FUNCTION OS_NETVREDIROK( nResult ) ENDIF ENDIF - RETURN EMPTY( nResult ) + RETURN Empty( nResult ) diff --git a/harbour/contrib/hbwin/win_osc.c b/harbour/contrib/hbwin/win_osc.c index 816be2866c..615a0f286d 100644 --- a/harbour/contrib/hbwin/win_osc.c +++ b/harbour/contrib/hbwin/win_osc.c @@ -61,14 +61,14 @@ static void getwinver( OSVERSIONINFO * pOSvi ) GetVersionEx( pOSvi ); } -HB_FUNC( OS_ISWINNT ) +HB_FUNC( WIN_OSISNT ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwPlatformId == VER_PLATFORM_WIN32_NT ); } -HB_FUNC( OS_ISWINNT351 ) +HB_FUNC( WIN_OSISNT351 ) { OSVERSIONINFO osvi; getwinver( &osvi ); @@ -76,7 +76,7 @@ HB_FUNC( OS_ISWINNT351 ) && osvi.dwMajorVersion == 3 && osvi.dwMinorVersion == 51 ); } -HB_FUNC( OS_ISWINNT4 ) +HB_FUNC( WIN_OSISNT4 ) { OSVERSIONINFO osvi; getwinver( &osvi ); @@ -84,56 +84,56 @@ HB_FUNC( OS_ISWINNT4 ) && osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0 ); } -HB_FUNC( OS_ISWIN2000_OR_LATER ) +HB_FUNC( WIN_OSIS2000ORUPPER ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwMajorVersion >= 5 ); } -HB_FUNC( OS_ISWIN2000 ) +HB_FUNC( WIN_OSIS2000 ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ); } -HB_FUNC( OS_ISWINXP ) +HB_FUNC( WIN_OSISXP ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ); } -HB_FUNC( OS_ISWIN2003 ) +HB_FUNC( WIN_OSIS2003 ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 ); } -HB_FUNC( OS_ISWINVISTA ) +HB_FUNC( WIN_OSISVISTA ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ); } -HB_FUNC( OS_ISWIN7 ) +HB_FUNC( WIN_OSIS7 ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 ); } -HB_FUNC( OS_ISWIN9X ) +HB_FUNC( WIN_OSIS9X ) { OSVERSIONINFO osvi; getwinver( &osvi ); hb_retl( osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ); } -HB_FUNC( OS_ISWIN95 ) +HB_FUNC( WIN_OSIS95 ) { OSVERSIONINFO osvi; getwinver( &osvi ); @@ -141,7 +141,7 @@ HB_FUNC( OS_ISWIN95 ) && osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0 ); } -HB_FUNC( OS_ISWIN98 ) +HB_FUNC( WIN_OSIS98 ) { OSVERSIONINFO osvi; getwinver( &osvi ); @@ -149,7 +149,7 @@ HB_FUNC( OS_ISWIN98 ) && osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10 ); } -HB_FUNC( OS_ISWINME ) +HB_FUNC( WIN_OSISME ) { OSVERSIONINFO osvi; getwinver( &osvi ); @@ -157,7 +157,7 @@ HB_FUNC( OS_ISWINME ) && osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90 ); } -HB_FUNC( OS_ISWTSCLIENT ) +HB_FUNC( WIN_OSISTSCLIENT ) { HB_BOOL bResult = FALSE; OSVERSIONINFO osvi; @@ -173,7 +173,7 @@ HB_FUNC( OS_ISWTSCLIENT ) hb_retl( bResult ); } -HB_FUNC( OS_VERSIONINFO ) +HB_FUNC( WIN_OSVERSIONINFO ) { PHB_ITEM pArray = hb_itemArrayNew( 5 ); OSVERSIONINFO osvi; diff --git a/harbour/contrib/hbwin/win_tprn.prg b/harbour/contrib/hbwin/win_tprn.prg index d5eab0daa8..d1d1fe96bd 100644 --- a/harbour/contrib/hbwin/win_tprn.prg +++ b/harbour/contrib/hbwin/win_tprn.prg @@ -333,7 +333,7 @@ METHOD EndPage( lStartNewPage ) CLASS WIN_PRN win_EndPage( ::hPrinterDC ) IF lStartNewPage ::StartPage() - IF OS_ISWIN9X() // Reset font on Win9X + IF win_osIs9X() // Reset font on Win9X ::SetFont() ENDIF ENDIF