2009-02-10 03:52 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* contrib/hbssl/Makefile
    + Added new detection dir.

  * source/rtl/gtwvt/gtwvt.c
    + Added support for HB_GTI_BOXCP.
      (available for UNICODE builds only).

  * source/rtl/filesys.c
    + Added (untested) support for *NIX system to
      hb_fsBaseDirBuff() / HB_DIRBASE().
This commit is contained in:
Viktor Szakats
2009-02-10 03:19:10 +00:00
parent 4961857b2d
commit 7ee8e7a80f
4 changed files with 78 additions and 12 deletions

View File

@@ -8,6 +8,18 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-10 03:52 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbssl/Makefile
+ Added new detection dir.
* source/rtl/gtwvt/gtwvt.c
+ Added support for HB_GTI_BOXCP.
(available for UNICODE builds only).
* source/rtl/filesys.c
+ Added (untested) support for *NIX system to
hb_fsBaseDirBuff() / HB_DIRBASE().
2009-02-10 04:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
* covered some old functions marked as deprecated long time ago
@@ -2555,7 +2567,7 @@
+ Added Harbour bindings to OpenSSL.
Work in progress, but it's theoretically already functional.
To build, set your HB_DIR_OPENSSL or HB_INC_OPENSSL envvar.
; TOFIX: Makefile openssl autodetection should be adjusted.
; TOFIX: Makefile openssl autodetection should be adjusted. [DONE]
* contrib/examples/uhttpd
! Fixed SVN attributes. (except for /home dir)
@@ -3235,7 +3247,7 @@
always available.
; NOTE: This solution doesn't go as far as (GTWXC) to
graphically draw / emulate these chars.
; TODO: Add HB_GTI_BOXCP support to change hard-wired "EN" CP.
; TODO: Add HB_GTI_BOXCP support to change hard-wired "EN" CP. [DONE]
* include/hbapigt.h
* include/hbgtcore.h

View File

@@ -12,7 +12,7 @@ ifneq ($(HB_ARCHITECTURE),dos)
ifeq ($(HB_INC_OPENSSL),)
ifeq ($(HB_XBUILD),)
HB_INC_OPENSSL = /usr/include
HB_INC_OPENSSL = /usr/include /usr/local/ssl/include
endif
endif

View File

@@ -3216,17 +3216,53 @@ BYTE * hb_fsNameConv( BYTE * szFileName, BOOL * pfFree )
/* NOTE: pbyBuffer must be _POSIX_PATH_MAX + 1 long. */
void hb_fsBaseDirBuff( BYTE * pbyBuffer )
{
/* TOFIX: In *NIX systems, this will return the dir specified in the
program invocation command line. Some suggest that cwd
should be prepended, although this doesn't solve the
problem if the program is executed from the path. [vszakats] */
PHB_FNAME pFName = hb_fsFNameSplit( hb_cmdargARGV()[ 0 ] );
#if defined( HB_OS_UNIX_COMPATIBLE )
{
/* Assemble the full path of the program by taking the
current dir and appending the name of the program,
as specified on the command-line.
HB_OS_UNIX_COMPATIBLE might be too rough to decide
for this method, pls test on other platforms and refine.
[vszakats] */
pFName->szName = NULL;
pFName->szExtension = NULL;
char byCurDir[ _POSIX_PATH_MAX + 1 ];
char byBinDir[ _POSIX_PATH_MAX + 1 ];
hb_fsFNameMerge( ( char * ) pbyBuffer, pFName );
hb_xfree( pFName );
PHB_FNAME pFName = hb_fsFNameSplit( hb_cmdargARGV()[ 0 ] );
pFName->szName = NULL;
pFName->szExtension = NULL;
hb_fsFNameMerge( ( char * ) byBinDir, pFName );
hb_xfree( pFName );
/* Skip 'current dir' if present, and replace with cwd. */
if( byBinDir[ 0 ] == '.' && byBinDir[ 1 ] == HB_OS_PATH_DELIM_CHR )
{
byBinDir += 2;
hb_fsCurDirBuff( 0, ( BYTE * ) byCurDir, sizeof( byCurDir ) );
hb_strncpy( byBuffer, HB_OS_PATH_DELIM_CHR_STRING, sizeof( byBuffer ) - 1 );
if( byCurDir[ 0 ] != '\0' )
{
hb_strncat( byBuffer, byCurDir, sizeof( byBuffer ) - 1 );
hb_strncat( byBuffer, HB_OS_PATH_DELIM_CHR_STRING, sizeof( byBuffer ) - 1 );
}
}
hb_strncat( byBuffer, byBinDir, sizeof( byBuffer ) - 1 );
}
#else
{
PHB_FNAME pFName = hb_fsFNameSplit( hb_cmdargARGV()[ 0 ] );
pFName->szName = NULL;
pFName->szExtension = NULL;
hb_fsFNameMerge( ( char * ) pbyBuffer, pFName );
hb_xfree( pFName );
}
#endif
/* Convert from OS codepage */
{

View File

@@ -2268,6 +2268,24 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
break;
#if defined( UNICODE )
case HB_GTI_BOXCP:
{
const char * szVal;
pInfo->pResult = hb_itemPutC( pInfo->pResult,
pWVT->boxCDP ? pWVT->boxCDP->id : NULL );
szVal = hb_itemGetCPtr( pInfo->pNewVal );
if( szVal && *szVal )
{
PHB_CODEPAGE cdpBox = hb_cdpFind( szVal );
if( cdpBox )
pWVT->boxCDP = cdpBox;
}
break;
}
#endif
case HB_GTI_ICONFILE:
{
if( ( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING ) )