diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a6cb87ff35..74733f65f1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,34 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-11 01:52 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * source/rtl/tpopup.prg + ! Fixed a few problems regarding HB_EXTENSION guards. + (one method declaration was mistakenly guarded, and one + IF construct broke when compiled without HB_EXTENSION) + + * source/rtl/mlcfunc.c + * source/rtl/alert.prg + ! Fixed unused var warnings when HB_EXTENSION is off. + + * contrib/hgf/tests/bld_b32.bat + ! Some more fixes. (removed hard coded BCC path, and + a few wrong dirs) + ; For me form3.hbf works without a closing EOL, under Windows. + So the problem might rather be something else. For sure though, + HBPersistent()'s EOL detection and handling is not portable (TOFIX). + + * source/compiler/hbcomp.c + ! Reverted previous change for non-Unix platforms, regaring + command-line output. Now Harbour will again use stderr/stdout + about the same way CA-Cl*pper does. However odd this is, + most DOS/Windows programs work this way, so the "when in Rome" + rule got in effect here. Otherwise, any DOS/Windows build + output (BC/VC/GCC) goes to stdout, _except_ Harbour + errors/warnings, and this is not a good thing. Still, the + //STDOUT:, //STDERR: compiler switches could come handy to + override the platform defaults. + 2007-11-11 00:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/std.ch * Removed HB_EXTENSION guard from around SET commands diff --git a/harbour/contrib/hgf/tests/bld_b32.bat b/harbour/contrib/hgf/tests/bld_b32.bat index b792bad916..3f144e458f 100644 --- a/harbour/contrib/hgf/tests/bld_b32.bat +++ b/harbour/contrib/hgf/tests/bld_b32.bat @@ -3,67 +3,63 @@ rem rem $Id$ rem -CLS - if A%1 == A GOTO :SYNTAX if NOT EXIST %1.prg GOTO :NOEXIST -ECHO Compiling... +ECHO Build: Compiling... set hdir=..\..\.. -set bcdir=C:\bcc55\bin -%hdir%\bin\harbour %1 /n /p /i..\include;%hdir%\include %2 %3 > bld_b32.log +%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include %2 %3 > bld_b32.log type bld_b32.log IF ERRORLEVEL 1 PAUSE IF ERRORLEVEL 1 GOTO EXIT -echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc -%BCDIR%\bcc32 -M -c @b32.bc +echo -O2 -e%1.exe -I%hdir%\include %1.c > bld_b32.mak +bcc32 -M -c @bld_b32.mak :ENDCOMPILE -echo c0w32.obj + > b32.bc -echo %1.obj, + >> b32.bc -echo %1.exe, + >> b32.bc -echo %1.map, + >> b32.bc -echo %hdir%\lib\rtl.lib + >> b32.bc -echo %hdir%\lib\vm.lib + >> b32.bc -echo %hdir%\lib\gtwin.lib + >> b32.bc -echo %hdir%\lib\lang.lib + >> b32.bc -echo %hdir%\lib\macro.lib + >> b32.bc -echo %hdir%\lib\rdd.lib + >> b32.bc -echo %hdir%\lib\dbfntx.lib + >> b32.bc -echo %hdir%\lib\dbfcdx.lib + >> b32.bc -echo %hdir%\lib\debug.lib + >> b32.bc -echo %hdir%\lib\common.lib + >> b32.bc -echo %hdir%\lib\pp.lib + >> b32.bc -echo %hdir%\lib\hbsix.lib + >> b32.bc -echo %hdir%\lib\dbffpt.lib + >> b32.bc -echo %hdir%\lib\hgfwin32.lib + >> b32.bc +echo c0w32.obj + > bld_b32.mak +echo %1.obj, + >> bld_b32.mak +echo %1.exe, + >> bld_b32.mak +echo %1.map, + >> bld_b32.mak +echo %hdir%\lib\rtl.lib + >> bld_b32.mak +echo %hdir%\lib\vm.lib + >> bld_b32.mak +echo %hdir%\lib\gtwin.lib + >> bld_b32.mak +echo %hdir%\lib\lang.lib + >> bld_b32.mak +echo %hdir%\lib\macro.lib + >> bld_b32.mak +echo %hdir%\lib\rdd.lib + >> bld_b32.mak +echo %hdir%\lib\dbfntx.lib + >> bld_b32.mak +echo %hdir%\lib\dbfcdx.lib + >> bld_b32.mak +echo %hdir%\lib\debug.lib + >> bld_b32.mak +echo %hdir%\lib\common.lib + >> bld_b32.mak +echo %hdir%\lib\pp.lib + >> bld_b32.mak +echo %hdir%\lib\hbsix.lib + >> bld_b32.mak +echo %hdir%\lib\dbffpt.lib + >> bld_b32.mak +echo %hdir%\lib\hgfwin32.lib + >> bld_b32.mak rem Uncomment these two lines to use Advantage RDD -rem echo %hdir%\lib\rddads.lib + >> b32.bc -rem echo %hdir%\lib\ace32.lib + >> b32.bc +rem echo %hdir%\lib\rddads.lib + >> bld_b32.mak +rem echo %hdir%\lib\ace32.lib + >> bld_b32.mak -echo %BCDIR%\lib\cw32.lib + >> b32.bc -echo %BCDIR%\lib\import32.lib, >> b32.bc +echo cw32.lib + >> bld_b32.mak +echo import32.lib, >> bld_b32.mak -ECHO * -ECHO Linking... +ECHO Build: Linking... rem Use these flags to avoid the console window creation -rem %BCDIR%\ilink32 -Gn -aa -Tpe -s @b32.bc -%BCDIR%\ilink32 -Gn -Tpe -s @b32.bc +rem ilink32 -Gn -aa -Tpe -s @bld_b32.mak +ilink32 -Gn -Tpe -s @bld_b32.mak rem delete temporary files del %1.c -del b32.bc -del bld_b32.log del %1.map del %1.obj del %1.tds +del bld_b32.mak +del bld_b32.log IF ERRORLEVEL 1 GOTO LINKERROR -ECHO * Application successfully built +ECHO Build: Done. %1 GOTO EXIT ECHO @@ -74,10 +70,10 @@ rem PAUSE * Linking errors * GOTO EXIT :SYNTAX -ECHO SYNTAX: Build [Program] {-- Don't specify .prg extension +ECHO SYNTAX: bld_b32 [Program] {-- Don't specify .prg extension GOTO EXIT :NOEXIST -ECHO The specified PRG %1 does not exist +ECHO Build: The specified %1.prg does not exist :EXIT diff --git a/harbour/source/compiler/hbcomp.c b/harbour/source/compiler/hbcomp.c index 94bce17cfe..6ad790ddee 100644 --- a/harbour/source/compiler/hbcomp.c +++ b/harbour/source/compiler/hbcomp.c @@ -294,7 +294,11 @@ void hb_compOutStd( HB_COMP_DECL, const char * szMessage ) if( HB_COMP_PARAM->outStdFunc ) HB_COMP_PARAM->outStdFunc( HB_COMP_PARAM->cargo, szMessage ); else +#if defined( OS_UNIX_COMPATIBLE ) fprintf( stdout, "%s", szMessage ); fflush( stdout ); +#else + fprintf( stderr, "%s", szMessage ); fflush( stderr ); +#endif } } @@ -305,6 +309,10 @@ void hb_compOutErr( HB_COMP_DECL, const char * szMessage ) if( HB_COMP_PARAM->outErrFunc ) HB_COMP_PARAM->outErrFunc( HB_COMP_PARAM->cargo, szMessage ); else +#if defined( OS_UNIX_COMPATIBLE ) fprintf( stderr, "%s", szMessage ); fflush( stderr ); +#else + fprintf( stdout, "%s", szMessage ); fflush( stdout ); +#endif } } diff --git a/harbour/source/rtl/alert.prg b/harbour/source/rtl/alert.prg index 27faf406e4..b85f0cacd0 100644 --- a/harbour/source/rtl/alert.prg +++ b/harbour/source/rtl/alert.prg @@ -46,10 +46,14 @@ STATIC s_lNoAlert #endif FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay ) - LOCAL cMessage, cLine, cColorHigh + LOCAL cMessage + LOCAL cColorHigh LOCAL aOptionsOK LOCAL nEval +#ifdef HB_EXTENSION LOCAL lFirst + LOCAL cLine +#endif #ifdef HB_C52_UNDOC diff --git a/harbour/source/rtl/mlcfunc.c b/harbour/source/rtl/mlcfunc.c index 892972c152..399d0be4c5 100644 --- a/harbour/source/rtl/mlcfunc.c +++ b/harbour/source/rtl/mlcfunc.c @@ -147,9 +147,9 @@ static PHB_EOL_INFO hb_mlGetEOLs( int iParam, int * piEOLs ) { PHB_EOL_INFO pEOLs = NULL; int iEOLs = 0; - char * szEOL; #ifdef HB_EXTENSION + char * szEOL; ULONG ulLen, ul; szEOL = hb_parc( iParam ); @@ -189,6 +189,8 @@ static PHB_EOL_INFO hb_mlGetEOLs( int iParam, int * piEOLs ) } } } +#else + HB_SYMBOL_UNUSED( iParam ); #endif if( iEOLs == 0 ) diff --git a/harbour/source/rtl/tpopup.prg b/harbour/source/rtl/tpopup.prg index 632bc33775..0468984eff 100644 --- a/harbour/source/rtl/tpopup.prg +++ b/harbour/source/rtl/tpopup.prg @@ -96,6 +96,7 @@ CREATE CLASS POPUPMENU FUNCTION HBPopUpMenu METHOD border( cBorder ) SETGET METHOD bottom( nBottom ) SETGET METHOD colorSpec( cColorSpec ) SETGET + METHOD current() SETGET METHOD itemCount() SETGET METHOD left( nLeft ) SETGET METHOD right( nRight ) SETGET @@ -108,7 +109,6 @@ CREATE CLASS POPUPMENU FUNCTION HBPopUpMenu METHOD setCoors( nRow, nCol, lTop ) /* NOTE: This method is a Harbour extension [vszakats] */ METHOD isShortCut( nKey, nID ) /* NOTE: This method is a Harbour extension [vszakats] */ METHOD isQuick( nKey, nID ) /* NOTE: This method is a Harbour extension [vszakats] */ - METHOD current() SETGET /* NOTE: This method is a Harbour extension [vszakats] */ #endif PROTECTED: @@ -447,15 +447,16 @@ METHOD hitTest( nMRow, nMCol ) CLASS POPUPMENU nMCol < ::nRight nPos := nMRow - ::nTop + DO CASE #ifdef HB_EXTENSION - IF !::aItems[ nPos ]:enabled + CASE !::aItems[ nPos ]:enabled RETURN HTNOWHERE #endif - ELSEIF ::aItems[ nPos ]:caption == MENU_SEPARATOR + CASE ::aItems[ nPos ]:caption == MENU_SEPARATOR RETURN HTSEPARATOR - ELSE + OTHERWISE RETURN nPos - ENDIF + ENDCASE ENDCASE RETURN HTNOWHERE