diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1731756898..10ff1918c7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,32 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-29 07:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * include/hbextern.ch + ! HB_SETCODEPAGE() reference also guarded with HB_LEGACY_LEVEL2. + + * tests/wcecon.prg + * tests/gtkeys.prg + * examples/terminal/trm_cli.prg + * HB_SETCODEPAGE() -> HB_CDPSELECT(). + + * contrib/hbwin/win_prn2.c + + Added comment. + + * contrib/hbwin/legacy.prg + + Guarded with HB_WIN_LEGACY_LEVEL_OFF. + + * contrib/hbmysql/mysqlold.c + * contrib/hbodbc/odbcold.c + * contrib/hbwin/legacycd.c + * contrib/hbwin/legacyco.c + * contrib/hbwin/legacycp.c + * contrib/hbwin/legacycv.c + * contrib/hbwin/legacy.prg + + Guarded with HB_LEGACY_LEVEL3. + This means these will be removed after major release. + Please upgrade your code to use new function names. + 2009-11-29 07:23 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/cdpapi.c * HB_SETCODEPAGE() guarded as HB_LEGACY_LEVEL2 which means diff --git a/harbour/contrib/hbmysql/mysqlold.c b/harbour/contrib/hbmysql/mysqlold.c index 3501d5f843..657fb78461 100644 --- a/harbour/contrib/hbmysql/mysqlold.c +++ b/harbour/contrib/hbmysql/mysqlold.c @@ -52,7 +52,11 @@ #include "hbapi.h" -#if !defined( HB_MYSQL_LEGACY_LEVEL_OFF ) +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_MYSQL_LEGACY_LEVEL_OFF ) + #define HB_MYSQL_LEGACY_LEVEL_OFF +#endif + +#if ! defined( HB_MYSQL_LEGACY_LEVEL_OFF ) HB_FUNC_EXTERN( MYSQL_GET_SERVER_VERSION ) ; HB_FUNC( SQLVERSION ) { HB_FUNC_EXEC( MYSQL_GET_SERVER_VERSION ); } HB_FUNC_EXTERN( MYSQL_REAL_CONNECT ) ; HB_FUNC( SQLCONNECT ) { HB_FUNC_EXEC( MYSQL_REAL_CONNECT ); } diff --git a/harbour/contrib/hbodbc/odbcold.c b/harbour/contrib/hbodbc/odbcold.c index 9d0fe4d2a0..39e708a960 100644 --- a/harbour/contrib/hbodbc/odbcold.c +++ b/harbour/contrib/hbodbc/odbcold.c @@ -52,7 +52,11 @@ #include "hbapi.h" -#if !defined( HB_ODBC_LEGACY_LEVEL_OFF ) +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_ODBC_LEGACY_LEVEL_OFF ) + #define HB_ODBC_LEGACY_LEVEL_OFF +#endif + +#if ! defined( HB_ODBC_LEGACY_LEVEL_OFF ) HB_FUNC_EXTERN( SQLALLOCENV ) ; HB_FUNC( SQLALLOCEN ) { HB_FUNC_EXEC( SQLALLOCENV ); } HB_FUNC_EXTERN( SQLALLOCCONNECT ) ; HB_FUNC( SQLALLOCCO ) { HB_FUNC_EXEC( SQLALLOCCONNECT ); } diff --git a/harbour/contrib/hbwin/legacy.prg b/harbour/contrib/hbwin/legacy.prg index 3873bf9855..08f6517965 100644 --- a/harbour/contrib/hbwin/legacy.prg +++ b/harbour/contrib/hbwin/legacy.prg @@ -57,6 +57,12 @@ #include "common.ch" #include "error.ch" +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_WIN_LEGACY_LEVEL_OFF ) + #define HB_WIN_LEGACY_LEVEL_OFF +#endif + +#if ! defined( HB_WIN_LEGACY_LEVEL_OFF ) + #define EG_OLEEXCEPTION 1001 STATIC s_bBreak := { | oError | Break( oError ) } @@ -350,3 +356,5 @@ ENDCLASS CREATE CLASS Win32Bmp FROM WIN_BMP ENDCLASS + +#endif diff --git a/harbour/contrib/hbwin/legacycd.c b/harbour/contrib/hbwin/legacycd.c index 55828d7e46..4caa349419 100644 --- a/harbour/contrib/hbwin/legacycd.c +++ b/harbour/contrib/hbwin/legacycd.c @@ -61,7 +61,11 @@ #include "hbapi.h" -#ifndef HB_WIN_LEGACY_LEVEL_OFF +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_WIN_LEGACY_LEVEL_OFF ) + #define HB_WIN_LEGACY_LEVEL_OFF +#endif + +#if ! defined( HB_WIN_LEGACY_LEVEL_OFF ) /* Please use WAPI_GETLASTERROR(). */ HB_FUNC( GETLASTERROR ) diff --git a/harbour/contrib/hbwin/legacyco.c b/harbour/contrib/hbwin/legacyco.c index 6d7399ba56..6b4b6f63dd 100644 --- a/harbour/contrib/hbwin/legacyco.c +++ b/harbour/contrib/hbwin/legacyco.c @@ -62,7 +62,11 @@ #include "hbapi.h" #include "hbwinole.h" -#ifndef HB_WIN_LEGACY_LEVEL_OFF +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_WIN_LEGACY_LEVEL_OFF ) + #define HB_WIN_LEGACY_LEVEL_OFF +#endif + +#if ! defined( HB_WIN_LEGACY_LEVEL_OFF ) HB_FUNC_EXTERN( WIN_OLEERROR ); diff --git a/harbour/contrib/hbwin/legacycp.c b/harbour/contrib/hbwin/legacycp.c index e5907a54fa..16353b67d5 100644 --- a/harbour/contrib/hbwin/legacycp.c +++ b/harbour/contrib/hbwin/legacycp.c @@ -52,7 +52,11 @@ #include "hbapi.h" -#if !defined( HB_WIN_LEGACY_LEVEL_OFF ) +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_WIN_LEGACY_LEVEL_OFF ) + #define HB_WIN_LEGACY_LEVEL_OFF +#endif + +#if ! defined( HB_WIN_LEGACY_LEVEL_OFF ) HB_FUNC_EXTERN( WIN_PRINTEREXISTS ) ; HB_FUNC( PRINTEREXISTS ) { HB_FUNC_EXEC( WIN_PRINTEREXISTS ); } HB_FUNC_EXTERN( WIN_PRINTERGETDEFAULT ) ; HB_FUNC( GETDEFAULTPRINTER ) { HB_FUNC_EXEC( WIN_PRINTERGETDEFAULT ); } diff --git a/harbour/contrib/hbwin/legacycv.c b/harbour/contrib/hbwin/legacycv.c index dd7157d80f..beb57768ec 100644 --- a/harbour/contrib/hbwin/legacycv.c +++ b/harbour/contrib/hbwin/legacycv.c @@ -52,7 +52,11 @@ #include "hbapi.h" -#if !defined( HB_WIN_LEGACY_LEVEL_OFF ) +#if ! defined( HB_LEGACY_LEVEL3 ) && ! defined( HB_WIN_LEGACY_LEVEL_OFF ) + #define HB_WIN_LEGACY_LEVEL_OFF +#endif + +#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 ); } diff --git a/harbour/contrib/hbwin/win_prn2.c b/harbour/contrib/hbwin/win_prn2.c index 630dfea832..40012a3ba7 100644 --- a/harbour/contrib/hbwin/win_prn2.c +++ b/harbour/contrib/hbwin/win_prn2.c @@ -349,6 +349,7 @@ HB_FUNC( WIN_PRINTERSTATUS ) HB_FUNC( WIN_PRINTERPORTTONAME ) { + /* Set default return value */ hb_retc_null(); if( hb_parclen( 1 ) > 0 ) @@ -383,13 +384,12 @@ HB_FUNC( WIN_PRINTERPORTTONAME ) if( bFound ) { char * pszPrinterName = HB_TCHAR_CONVFROM( pPrinterEnum->pPrinterName ); - hb_retc( pszPrinterName ); - HB_TCHAR_FREE( pszPrinterName ); } } } + hb_xfree( pPrinterEnumBak ); } } @@ -440,6 +440,7 @@ HB_FUNC( WIN_PRINTFILERAW ) WritePrinter( hPrinter, pbyBuffer, nRead, &dwWritten ); } + iResult = 1; hb_fsClose( fhnd ); } diff --git a/harbour/examples/terminal/trm_cli.prg b/harbour/examples/terminal/trm_cli.prg index fd2b359f57..3e0233dd10 100644 --- a/harbour/examples/terminal/trm_cli.prg +++ b/harbour/examples/terminal/trm_cli.prg @@ -572,7 +572,7 @@ Static Function TrmInitFont() hb_gtInfo( HB_GTI_CODEPAGE, 255 ) /* Set EN CP-437 encoding */ - hb_setCodePage( "EN" ) + hb_cdpSelect( "EN" ) hb_setTermCP( "EN" ) #ifdef __WINCE__ @@ -587,7 +587,7 @@ Static Function TrmInitFont() Local nScrWidth Wvt_SetCodepage( 255 ) - hb_setCodePage( "EN" ) + hb_cdpSelect( "EN" ) hb_setTermCP( "EN" ) if empty( cFont ) diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index de950df6ec..79341f2cf7 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -841,7 +841,9 @@ EXTERNAL HB_CDPLIST EXTERNAL HB_CDPUNIID EXTERNAL HB_CDPINFO EXTERNAL HB_CDPSELECT +#ifdef HB_LEGACY_LEVEL2 EXTERNAL HB_SETCODEPAGE +#endif EXTERNAL HB_TRANSLATE EXTERNAL HB_STRTOUTF8 EXTERNAL HB_UTF8TOSTR diff --git a/harbour/tests/gtkeys.prg b/harbour/tests/gtkeys.prg index e896552c46..c67e4d81f6 100644 --- a/harbour/tests/gtkeys.prg +++ b/harbour/tests/gtkeys.prg @@ -218,7 +218,7 @@ setcancel(.f.) #ifdef __HARBOUR__ set(_SET_EVENTMASK,INKEY_ALL) hb_gtInfo(HB_GTI_ESCDELAY,50) - hb_setCodePage( "PLMAZ" ) + hb_cdpSelect( "PLMAZ" ) hb_setTermCP( "PLISO" ) ? hb_gtVersion(1), hb_gtVersion() #endif diff --git a/harbour/tests/wcecon.prg b/harbour/tests/wcecon.prg index 1ef193cd0e..ab59567cce 100644 --- a/harbour/tests/wcecon.prg +++ b/harbour/tests/wcecon.prg @@ -26,7 +26,7 @@ proc main() hb_gtInfo( HB_GTI_CODEPAGE, 255 ) /* Set EN CP-437 encoding */ - hb_setCodePage( "EN" ) + hb_cdpSelect( "EN" ) hb_setTermCP( "EN" ) /* Set font size */