diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ff49224dae..8e9d2e5f0e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -10,6 +10,17 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2012-11-23 00:17 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/xhb/xhbfunc.c + * src/rtl/console.c + * deprecated HB_OSNEWLINE() with HB_LEGACY_LEVEL4 (after + next release). Use HB_EOL() instead. + HB_OSNEWLINE() will continue to live as an xhb compatibility + function after that. + + * utils/hbmk2/hbmk2.prg + * minor cleanup to prev + 2012-11-22 19:16 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbsqlit3/core.c ! fixed sqlite_prepare() to convert strings to UTF-8 diff --git a/harbour/contrib/xhb/xhbfunc.c b/harbour/contrib/xhb/xhbfunc.c index 7137751faf..3f9f2cc18d 100644 --- a/harbour/contrib/xhb/xhbfunc.c +++ b/harbour/contrib/xhb/xhbfunc.c @@ -307,6 +307,23 @@ HB_FUNC( XHB_MEMOWRIT ) HB_FUNC_EXEC( MEMOWRIT ) } +#if ! defined( HB_LEGACY_LEVEL4 ) + +#if defined( HB_OS_UNIX ) && ! defined( HB_EOL_CRLF ) + static const char s_szCrLf[ CRLF_BUFFER_LEN ] = { HB_CHAR_LF, 0 }; + static const int s_iCrLfLen = 1; +#else + static const char s_szCrLf[ CRLF_BUFFER_LEN ] = { HB_CHAR_CR, HB_CHAR_LF, 0 }; + static const int s_iCrLfLen = 2; +#endif + +HB_FUNC( HB_OSNEWLINE ) +{ + hb_retc_const( s_szCrLf ); +} + +#endif + #if 0 HB_FUNC( HB_ISBYREF ) diff --git a/harbour/src/rtl/console.c b/harbour/src/rtl/console.c index f9a0c9ee05..1a90180403 100644 --- a/harbour/src/rtl/console.c +++ b/harbour/src/rtl/console.c @@ -208,12 +208,16 @@ HB_FUNC( HB_EOL ) hb_retc_const( s_szCrLf ); } +#if defined( HB_LEGACY_LEVEL4 ) + /* Deprecated */ HB_FUNC( HB_OSNEWLINE ) { hb_retc_const( s_szCrLf ); } +#endif + /* Output an item to STDOUT */ void hb_conOutStd( const char * szStr, HB_SIZE nLen ) { diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index a2cae4b1f7..27f937c556 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -9743,7 +9743,9 @@ STATIC FUNCTION HBC_Find( hbmk, cFile, nNesting ) hbmk[ _HBMK_cHB_INSTALL_ADD ] } FOR EACH aFile IN Directory( hb_DirSepAdd( cDir ), "D" ) - IF hb_FileExists( tmp := hb_DirSepAdd( cDir ) + aFile[ F_NAME ] + hb_ps() + hb_FNameNameExt( cFile ) ) + IF "D" $ aFile[ F_ATTR ] .AND. !( aFile[ F_NAME ] == "." ) .AND. !( aFile[ F_NAME ] == ".." ) .AND. ; + hb_FileExists( tmp := hb_DirSepAdd( cDir ) + aFile[ F_NAME ] + hb_ps() + hb_FNameNameExt( cFile ) ) + cFile := tmp lFound := .T. EXIT