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: switches could come handy to override 
       the platform defaults.
This commit is contained in:
Viktor Szakats
2007-11-11 01:07:49 +00:00
parent 0ebb791450
commit 0cf59b987f
6 changed files with 84 additions and 45 deletions

View File

@@ -8,6 +8,34 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
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

View File

@@ -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

View File

@@ -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
}
}

View File

@@ -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

View File

@@ -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 )

View File

@@ -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