2009-11-17 04:26 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/xhbfunc.c
+ Ported CURDIRX() function from xhb.
It's not exactly the same as xhb version uses hb_fsCurDirBuffEx()
internally, and I couldn't decipher the added feature above
hb_fsCurDirBuff().
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-11-17 04:26 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/xhb/xhbfunc.c
|
||||
+ Ported CURDIRX() function from xhb.
|
||||
It's not exactly the same as xhb version uses hb_fsCurDirBuffEx()
|
||||
internally, and I couldn't decipher the added feature above
|
||||
hb_fsCurDirBuff().
|
||||
|
||||
2009-11-17 04:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* INSTALL
|
||||
* Minor formatting.
|
||||
|
||||
@@ -227,6 +227,33 @@ HB_FUNC( HB_F_EOF )
|
||||
hb_fsSetFError( uiError );
|
||||
}
|
||||
|
||||
HB_FUNC( CURDIRX )
|
||||
{
|
||||
HB_ERRCODE uiErrorOld = hb_fsError();
|
||||
char * pbyBuffer = ( char * ) hb_xgrab( HB_PATH_MAX + 1 );
|
||||
PHB_ITEM pDrv = hb_param( 1, HB_IT_STRING );
|
||||
BYTE cCurDrv = hb_fsCurDrv();
|
||||
BYTE cDrv;
|
||||
|
||||
if( pDrv && hb_parclen( 1 ) > 0 )
|
||||
{
|
||||
cDrv = ( BYTE ) ( HB_TOUPPER( *hb_itemGetCPtr( pDrv ) ) - 'A' );
|
||||
if( cDrv != cCurDrv )
|
||||
hb_fsChDrv( cDrv );
|
||||
}
|
||||
else
|
||||
cDrv = cCurDrv;
|
||||
|
||||
/* NOTE: hb_fsCurDirBuffEx() in xhb, but I couldn't decipher the difference. [vszakats] */
|
||||
hb_fsCurDirBuff( cDrv, pbyBuffer, HB_PATH_MAX );
|
||||
|
||||
hb_retc_buffer( pbyBuffer );
|
||||
|
||||
hb_fsChDrv( cCurDrv );
|
||||
|
||||
hb_fsSetError( uiErrorOld );
|
||||
}
|
||||
|
||||
HB_FUNC_EXTERN( HB_CSTR );
|
||||
|
||||
HB_FUNC( CSTR )
|
||||
|
||||
Reference in New Issue
Block a user