2023-01-15 11:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbwin/win_prn1.c
    ! fixed parameter type in font enum callback

  * include/harbour.hbx
  * src/harbour.def
  * src/rtl/hbgtcore.c
    + added two new PRG functions:
         hb_gtExists( <cGtName> ) -> <lExists>
         hb_gtList() -> <aGtNames>

  * src/rtl/hbgtcore.c
    * changed the order of defualt GT initialization. Now GT specified by -gt*
      hbmk2 option has higher priority then GT chosen by
         request HB_GT_<name>_DEFAULT

  * include/hbapi.h
  * src/vm/set.c
    + added two C functions for OS codepage translations:
         char * hb_osStrEncode2( const char * pszName,
                                 char * pszBuffer, HB_SIZE nSize );
         HB_WCHAR * hb_osStrU16Encode2( const char * pszName,
                                        HB_WCHAR * pszBufferW, HB_SIZE nSize );

  * include/hbwinuni.h
    + added HB_CHARDUP2() macro for UNICODE/ANSI OS codepage translation

  * src/common/hbgete.c
    ! fixed memory allocation in MS-Windows version of hb_getenv_buffer()

  * src/pp/hbpp.c
    ! added integer range to HB_VER_REVID definition to pacify warning

  * src/rtl/cdpapi.c
    * minor simplification
This commit is contained in:
Przemysław Czerpak
2023-01-15 11:17:33 +01:00
parent 889ef46369
commit 2975eadbba
11 changed files with 123 additions and 18 deletions

View File

@@ -479,7 +479,9 @@ DYNAMIC hb_gfxPrimitive
DYNAMIC hb_gfxText
DYNAMIC hb_gtAlert
DYNAMIC hb_gtCreate
DYNAMIC hb_gtExists
DYNAMIC hb_gtInfo
DYNAMIC hb_gtList
DYNAMIC hb_gtLock
DYNAMIC hb_gtReload
DYNAMIC hb_gtSelect

View File

@@ -1226,11 +1226,13 @@ extern HB_EXPORT const char * hb_osDecodeCP( const char * szName, char ** pszFre
extern HB_EXPORT char * hb_osStrEncode( const char * pszName );
extern HB_EXPORT char * hb_osStrEncodeN( const char * pszName, HB_SIZE nLen );
extern HB_EXPORT char * hb_osStrEncode2( const char * pszName, char * pszBuffer, HB_SIZE nSize );
extern HB_EXPORT char * hb_osStrDecode( const char * pszName );
extern HB_EXPORT char * hb_osStrDecode2( const char * pszName, char * pszBuffer, HB_SIZE nSize );
#if defined( HB_OS_WIN )
extern HB_EXPORT HB_WCHAR * hb_osStrU16Encode( const char * pszName );
extern HB_EXPORT HB_WCHAR * hb_osStrU16EncodeN( const char * pszName, HB_SIZE nLen );
extern HB_EXPORT HB_WCHAR * hb_osStrU16Encode2( const char * pszName, HB_WCHAR * pszBufferW, HB_SIZE nSize );
extern HB_EXPORT char * hb_osStrU16Decode( const HB_WCHAR * pszNameW );
extern HB_EXPORT char * hb_osStrU16Decode2( const HB_WCHAR * pszNameW, char * pszBuffer, HB_SIZE nSize );
#endif

View File

@@ -81,6 +81,7 @@
#define HB_FSNAMECONV( fname, pfree ) ( ( LPCTSTR ) ( *( pfree ) = hb_fsNameConvU16( fname ) ) )
#define HB_CHARDUP( str ) hb_osStrU16Encode( str )
#define HB_CHARDUPN( str, len ) hb_osStrU16EncodeN( str, len )
#define HB_CHARDUP2( str, buf, len ) hb_osStrU16Encode2( str, buf, len )
#define HB_OSSTRDUP( str ) hb_osStrU16Decode( str )
#define HB_OSSTRDUP2( str, buf, len ) hb_osStrU16Decode2( str, buf, len )
#define HB_WINAPI_SYSTEM( cmd ) _wsystem( cmd )
@@ -120,6 +121,7 @@
#define HB_FSNAMECONV( fname, pfree ) hb_fsNameConv( fname, pfree )
#define HB_CHARDUP( str ) hb_osStrEncode( str )
#define HB_CHARDUPN( str, len ) hb_osStrEncodeN( str, len )
#define HB_CHARDUP2( str, buf, len ) hb_osStrEncode2( str, buf, len )
#define HB_OSSTRDUP( str ) hb_osStrDecode( str )
#define HB_OSSTRDUP2( str, buf, len ) hb_osStrDecode2( str, buf, len )
#define HB_WINAPI_SYSTEM( cmd ) system( cmd )