2007-11-18 13:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/xhb/hbcompat.ch
     + Added xhb SecondsSleep() translation.

   * contrib/freeimage/make_b32.bat
   * contrib/freeimage/make_vc.bat
   * contrib/firebird/make_b32.bat
   * contrib/firebird/make_vc.bat
     ! Some fixes.

   * contrib/libct/cttime.prg
     ! SECTOTIME() fix. Borrowed from xhb.

   * contrib/apollo/apollo.c
   * contrib/apollo/make_b32.bat
   * contrib/apollo/make_vc.bat
     ! Fixed and tested with latest downloadable package.

   * contrib/win32/w32_tprn.prg
   * contrib/win32/w32_prn.c
     + Minor fix (from xhb)

   * source/rtl/errorint.c
     ! Defaulting all string parameters to "" when they are NULL 
       to avoid any potential problems later in the function.

   * source/rtl/hbgtcore.c
     % Passing NULL instead of "" in hb_errInternal() calls.

   * source/vm/itemapi.c
     ! Internal error is lauched in case the parameters passed 
       to hb_itemPutCLConst() are violating string item rules.
       Thanks for Mindaugas for the suggestion.
       TOFIX: Since this violation will most probably happen in 
              contrib/win32 OLE code, we'll need to fix that 
              code too.

   * utils/hbmake/hbmake.prg
     ! Fixed to not request wvtgui.lib.
This commit is contained in:
Viktor Szakats
2007-11-18 12:46:48 +00:00
parent 16d2cf86ff
commit fde4638c38
16 changed files with 153 additions and 51 deletions

View File

@@ -8,6 +8,46 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2007-11-18 13:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/hbcompat.ch
+ Added xhb SecondsSleep() translation.
* contrib/freeimage/make_b32.bat
* contrib/freeimage/make_vc.bat
* contrib/firebird/make_b32.bat
* contrib/firebird/make_vc.bat
! Some fixes.
* contrib/libct/cttime.prg
! SECTOTIME() fix. Borrowed from xhb.
* contrib/apollo/apollo.c
* contrib/apollo/make_b32.bat
* contrib/apollo/make_vc.bat
! Fixed and tested with latest downloadable package.
* contrib/win32/w32_tprn.prg
* contrib/win32/w32_prn.c
+ Minor fix (from xhb)
* source/rtl/errorint.c
! Defaulting all string parameters to "" when they are NULL
to avoid any potential problems later in the function.
* source/rtl/hbgtcore.c
% Passing NULL instead of "" in hb_errInternal() calls.
* source/vm/itemapi.c
! Internal error is lauched in case the parameters passed
to hb_itemPutCLConst() are violating string item rules.
Thanks for Mindaugas for the suggestion.
TOFIX: Since this violation will most probably happen in
contrib/win32 OLE code, we'll need to fix that
code too.
* utils/hbmake/hbmake.prg
! Fixed to not request wvtgui.lib.
2007-11-17 12:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/make_b32.bat
* contrib/make_vc.bat

View File

@@ -58,7 +58,7 @@
#define MAX_STR_LEN 255
#include "hbapi.h"
#include "sde60.h"
#include "sde61.h"
/* -----------------29/12/2001 19:21-----------------

View File

@@ -3,6 +3,12 @@ rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem IMPORTANT: You'll need FREE Apollo headers and lib and this envvar
rem to be set to successfully build this library:
rem set APOLLODIR=C:\Apollo
rem ---------------------------------------------------------------
rem ---------------------------------------------------------------
rem This is a generic template file, if it doesn't fit your own needs
rem please DON'T MODIFY IT.
@@ -20,6 +26,8 @@ if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=make.exe
if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes
set HB_MAKEFILE=..\mtpl_%HB_CC_NAME%.mak
set C_USR=%C_USR% -I%APOLLODIR%\include
rem ---------------------------------------------------------------
rem Save the user value, force silent file overwrite with COPY
@@ -37,6 +45,8 @@ if "%1" == "INSTALL" goto INSTALL
:BUILD
implib ..\..\lib\%HB_CC_NAME%\sde61.lib %APOLLODIR%\sde61.dll
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% %1 %2 %3 > make_%HB_CC_NAME%.log
if errorlevel 1 if "%HB_SHOW_ERRORS%" == "yes" notepad make_%HB_CC_NAME%.log
goto EXIT
@@ -51,6 +61,13 @@ if "%1" == "INSTALL" goto INSTALL
:INSTALL
set _HB_INSTALL_PREFIX=%HB_INSTALL_PREFIX%
if "%_HB_INSTALL_PREFIX%" == "" set _HB_INSTALL_PREFIX=..\..
set _HB_LIB_INSTALL=%HB_LIB_INSTALL%
if "%_HB_LIB_INSTALL%" == "" set _HB_LIB_INSTALL=%_HB_INSTALL_PREFIX%\lib
copy ..\..\lib\%HB_CC_NAME%\sde61.lib %_HB_LIB_INSTALL%
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% INSTALL > nul
goto EXIT

View File

@@ -3,6 +3,12 @@ rem
rem $Id$
rem
rem ---------------------------------------------------------------
rem IMPORTANT: You'll need FREE Apollo headers and lib and this envvar
rem to be set to successfully build this library:
rem set APOLLODIR=C:\Apollo
rem ---------------------------------------------------------------
rem ---------------------------------------------------------------
rem This is a generic template file, if it doesn't fit your own needs
rem please DON'T MODIFY IT.
@@ -20,6 +26,8 @@ if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=nmake.exe
if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes
set HB_MAKEFILE=..\mtpl_%HB_CC_NAME%.mak
set C_USR=%C_USR% -I%APOLLODIR%\include
rem ---------------------------------------------------------------
rem Save the user value, force silent file overwrite with COPY
@@ -37,6 +45,24 @@ if "%1" == "INSTALL" goto INSTALL
:BUILD
rem ---------------------------------------------------------------
rem This .dll to .lib conversion needs GNU sed.exe in the path
rem ---------------------------------------------------------------
echo./[ \t]*ordinal hint/,/^^[ \t]*Summary/{> _temp.sed
echo. /^^[ \t]\+[0-9]\+/{>> _temp.sed
echo. s/^^[ \t]\+[0-9]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+\(.*\)/\1/p>> _temp.sed
echo. }>> _temp.sed
echo.}>> _temp.sed
DUMPBIN /EXPORTS %APOLLODIR%\sde61.dll > _dump.tmp
echo.LIBRARY %APOLLODIR%\sde61.dll > _temp.def
echo.EXPORTS >> _temp.def
sed -nf _temp.sed < _dump.tmp >> _temp.def
LIB /MACHINE:X86 /DEF:_temp.def /OUT:..\..\lib\%HB_CC_NAME%\sde61.lib
del _dump.tmp
del _temp.def
del _temp.sed
rem ---------------------------------------------------------------
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% %1 %2 %3 > make_%HB_CC_NAME%.log
if errorlevel 1 if "%HB_SHOW_ERRORS%" == "yes" notepad make_%HB_CC_NAME%.log
goto EXIT
@@ -51,6 +77,13 @@ if "%1" == "INSTALL" goto INSTALL
:INSTALL
set _HB_INSTALL_PREFIX=%HB_INSTALL_PREFIX%
if "%_HB_INSTALL_PREFIX%" == "" set _HB_INSTALL_PREFIX=..\..
set _HB_LIB_INSTALL=%HB_LIB_INSTALL%
if "%_HB_LIB_INSTALL%" == "" set _HB_LIB_INSTALL=%_HB_INSTALL_PREFIX%\lib
copy ..\..\lib\%HB_CC_NAME%\sde61.lib %_HB_LIB_INSTALL%
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% INSTALL > nul
goto EXIT

View File

@@ -21,7 +21,6 @@ rem set HB_MAKE_PROGRAM=
rem set HB_MAKE_FLAGS=
rem ---------------------------------------------------------------
if "%HB_DLL_DIR%" == "" set HB_DLL_DIR=%SystemRoot%\system32
if "%HB_CC_NAME%" == "" set HB_CC_NAME=b32
if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=make.exe
if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes

View File

@@ -21,7 +21,6 @@ rem set HB_MAKE_PROGRAM=
rem set HB_MAKE_FLAGS=
rem ---------------------------------------------------------------
if "%HB_DLL_DIR%" == "" set HB_DLL_DIR=%SystemRoot%\system32
if "%HB_CC_NAME%" == "" set HB_CC_NAME=vc
if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=nmake.exe
if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes

View File

@@ -22,7 +22,6 @@ rem set HB_MAKE_PROGRAM=
rem set HB_MAKE_FLAGS=
rem ---------------------------------------------------------------
if "%HB_DLL_DIR%" == "" set HB_DLL_DIR=%SystemRoot%\system32
if "%HB_CC_NAME%" == "" set HB_CC_NAME=b32
if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=make.exe
if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes

View File

@@ -22,7 +22,6 @@ rem set HB_MAKE_PROGRAM=
rem set HB_MAKE_FLAGS=
rem ---------------------------------------------------------------
if "%HB_DLL_DIR%" == "" set HB_DLL_DIR=%SystemRoot%\system32
if "%HB_CC_NAME%" == "" set HB_CC_NAME=vc
if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=nmake.exe
if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes

View File

@@ -88,7 +88,7 @@ else
endif
n := int( n % 86400 )
for i := 1 to 3
h := strzero( n % 60, 2 ) + h
h := strzero( n % 60, 2 ) + iif( len( h ) == 0, "", ":") + h
n := int( n / 60 )
next
return h

View File

@@ -453,15 +453,15 @@ HB_FUNC( WIN32_SETDOCUMENTPROPERTIES )
HANDLE hPrinter;
char * pszPrinterName = hb_parc( 2 );
LPTSTR lpPrinterName = pszPrinterName ? HB_TCHAR_CONVTO( pszPrinterName ) : NULL;
PDEVMODE pDevMode = NULL;
LONG lSize;
if( OpenPrinter( lpPrinterName, &hPrinter, NULL ) )
{
lSize = DocumentProperties( 0, hPrinter, lpPrinterName, pDevMode, pDevMode, 0 );
PDEVMODE pDevMode = NULL;
LONG lSize = DocumentProperties( 0, hPrinter, lpPrinterName, pDevMode, pDevMode, 0 );
if( lSize > 0 )
{
pDevMode = ( PDEVMODE ) hb_xgrab( lSize );
if( pDevMode )
{
DocumentProperties( 0, hPrinter, lpPrinterName, pDevMode, pDevMode, DM_OUT_BUFFER );

View File

@@ -217,52 +217,52 @@ CLASS WIN32PRN
METHOD GetDeviceCaps( nCaps ) INLINE win32_GetDeviceCaps( ::hPrinterDC, nCaps)
VAR PrinterName INIT ""
VAR Printing INIT .F.
VAR HavePrinted INIT .F.
VAR hPrinterDc INIT 0
VAR PrinterName INIT ""
VAR Printing INIT .F.
VAR HavePrinted INIT .F.
VAR hPrinterDc INIT 0
// These next 4 variables must be set before calling ::Create() if
// you wish to alter the defaults
VAR FormType INIT 0
VAR BinNumber INIT 0
VAR Landscape INIT .F.
VAR Copies INIT 1
VAR FormType INIT 0
VAR BinNumber INIT 0
VAR Landscape INIT .F.
VAR Copies INIT 1
VAR SetFontOk INIT .F.
VAR FontName INIT "" // Current Point size for font
VAR FontPointSize INIT 12 // Point size for font
VAR FontWidth INIT {0,0} // {Mul, Div} Calc width: nWidth:= MulDiv(nMul, GetDeviceCaps(shDC,LOGPIXELSX), nDiv)
// If font width is specified it is in "characters per inch" to emulate DotMatrix
VAR fBold INIT 0 HIDDEN // font darkness weight ( Bold). See wingdi.h or WIN SDK CreateFont() for valid values
VAR fUnderLine INIT .F. HIDDEN // UnderLine is on or off
VAR fItalic INIT .F. HIDDEN // Italic is on or off
VAR fCharSet INIT 1 HIDDEN // Default character set == DEFAULT_CHARSET ( see wingdi.h )
VAR SetFontOk INIT .F.
VAR FontName INIT "" // Current Point size for font
VAR FontPointSize INIT 12 // Point size for font
VAR FontWidth INIT {0,0} // {Mul, Div} Calc width: nWidth:= MulDiv(nMul, GetDeviceCaps(shDC,LOGPIXELSX), nDiv)
// If font width is specified it is in "characters per inch" to emulate DotMatrix
VAR fBold INIT 0 HIDDEN // font darkness weight ( Bold). See wingdi.h or WIN SDK CreateFont() for valid values
VAR fUnderLine INIT .F. HIDDEN // UnderLine is on or off
VAR fItalic INIT .F. HIDDEN // Italic is on or off
VAR fCharSet INIT 1 HIDDEN // Default character set == DEFAULT_CHARSET ( see wingdi.h )
VAR PixelsPerInchY
VAR PixelsPerInchX
VAR PageHeight INIT 0
VAR PageWidth INIT 0
VAR TopMargin INIT 0
VAR BottomMargin INIT 0
VAR LeftMargin INIT 0
VAR RightMargin INIT 0
VAR LineHeight INIT 0
VAR CharHeight INIT 0
VAR CharWidth INIT 0
VAR fCharWidth INIT 0 HIDDEN
VAR BitmapsOk INIT .F.
VAR NumColors INIT 1
VAR fDuplexType INIT 0 HIDDEN //DMDUP_SIMPLEX, 22/02/2007 change to 0 to use default printer settings
VAR fPrintQuality INIT 0 HIDDEN //DMRES_HIGH, 22/02/2007 change to 0 to use default printer settings
VAR fNewDuplexType INIT 0 HIDDEN
VAR fNewPrintQuality INIT 0 HIDDEN
VAR fOldLandScape INIT .F. HIDDEN
VAR fOldBinNumber INIT 0 HIDDEN
VAR fOldFormType INIT 0 HIDDEN
VAR PageHeight INIT 0
VAR PageWidth INIT 0
VAR TopMargin INIT 0
VAR BottomMargin INIT 0
VAR LeftMargin INIT 0
VAR RightMargin INIT 0
VAR LineHeight INIT 0
VAR CharHeight INIT 0
VAR CharWidth INIT 0
VAR fCharWidth INIT 0 HIDDEN
VAR BitmapsOk INIT .F.
VAR NumColors INIT 1
VAR fDuplexType INIT 0 HIDDEN // DMDUP_SIMPLEX, 22/02/2007 change to 0 to use default printer settings
VAR fPrintQuality INIT 0 HIDDEN // DMRES_HIGH, 22/02/2007 change to 0 to use default printer settings
VAR fNewDuplexType INIT 0 HIDDEN
VAR fNewPrintQuality INIT 0 HIDDEN
VAR fOldLandScape INIT .F. HIDDEN
VAR fOldBinNumber INIT 0 HIDDEN
VAR fOldFormType INIT 0 HIDDEN
VAR PosX INIT 0
VAR PosY INIT 0
VAR PosX INIT 0
VAR PosY INIT 0
VAR TextColor
VAR BkColor
@@ -315,6 +315,8 @@ METHOD Create() CLASS WIN32PRN
::fOldFormType:= ::FormType // Last formtype used
::fOldLandScape:= ::LandScape
::fOldBinNumber:= ::BinNumber
::fNewDuplexType := ::fDuplexType
::fNewPrintQuality := ::fPrintQuality
Result:= .T.
ENDIF
RETURN(Result)

View File

@@ -71,6 +71,7 @@
#xtranslate hb_CStr([<x,...>]) => CStr(<x>)
#xtranslate hb_DirExists(<x>) => IsDirectory(<x>)
#xtranslate hb_rddInfo([<x,...>]) => rddInfo(<x>)
#xtranslate hb_idleSleep([<x,...>]) => SecondsSleep(<x>)
#xtranslate hb_HexToNum([<c,...>]) => HexToNum(<c>)
#xtranslate hb_NumToHex([<n,...>]) => NumToHex(<n>)
@@ -129,6 +130,7 @@
#xtranslate setLastKey([<x,...>]) => hb_setLastKey(<x>)
#xtranslate CStr([<x,...>]) => hb_CStr(<x>)
#xtranslate IsDirectory(<x>) => hb_DirExists(<x>)
#xtranslate SecondsSleep([<x,...>]) => hb_idleSleep(<x>)
#xtranslate HexToNum([<c,...>]) => hb_HexToNum(<c>)
#xtranslate NumToHex([<n,...>]) => hb_NumToHex(<n>)

View File

@@ -63,6 +63,15 @@ void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1,
char buffer[ 1024 ];
BOOL fLang;
if( szText == NULL )
szText = "";
if( szPar1 == NULL )
szPar1 = "";
if( szPar2 == NULL )
szPar2 = "";
HB_TRACE(HB_TR_DEBUG, ("hb_errInternal(%lu, %s, %s, %s)", ulIntCode, szText, szPar1, szPar2));
fLang = ( hb_langID() != NULL );

View File

@@ -3235,7 +3235,7 @@ HB_EXPORT BOOL hb_gtLoad( const char * szGtName, PHB_GT_FUNCS pFuncTable )
memcpy( s_gtInit[ iPos ]->pSuperTable, pFuncTable, sizeof( HB_GT_FUNCS ) );
if( !s_gtInit[ iPos ]->init( pFuncTable ) )
{
hb_errInternal( 9999, "Internal error: screen driver initialization failure", "", "" );
hb_errInternal( 9999, "Internal error: screen driver initialization failure", NULL, NULL );
}
s_gtLinkOrder[ s_iGtLinkCount++ ] = iPos;
return TRUE;
@@ -3289,7 +3289,7 @@ HB_EXPORT void hb_gtStartupInit( void )
return;
}
hb_errInternal( 9998, "Internal error: screen driver initialization failure", "", "" );
hb_errInternal( 9998, "Internal error: screen driver initialization failure", NULL, NULL );
/* force linking HB_GTSYS() */
HB_FUNC_EXEC( HB_GTSYS );

View File

@@ -320,6 +320,9 @@ HB_EXPORT PHB_ITEM hb_itemPutCLConst( PHB_ITEM pItem, const char * szText, ULONG
}
else
{
if( szText[ ulLen ] != '\0' )
hb_errInternal( 9999, "Internal error: hb_itemPutCLConst() missing termination character", NULL, NULL );
pItem->item.asString.value = ( char * ) szText;
pItem->item.asString.length = ulLen;
}

View File

@@ -3011,8 +3011,8 @@ Endif // Create and compile
FWrite( s_nMakeFileHandle, "LIBFILES = $(C4W)\c4wclass.lib $(C4W)\wbrowset.lib $(C4W)\otabt.lib $(C4W)\clip4win.lib " + IIF( ! s_lMt, cDefaultLibs, cDefaultLibsMt ) + CRLF )
ELSE
if lGtwvt
cDefaultLibs := strtran(cDefaultLibs,"gtwin.lib","gtwvt.lib wvtgui.lib")
cDefaultLibsMt := strtran(cDefaultLibsMt,"gtwin.lib","gtwvt.lib wvtgui.lib")
cDefaultLibs := strtran(cDefaultLibs,"gtwin.lib","gtwvt.lib")
cDefaultLibsMt := strtran(cDefaultLibsMt,"gtwin.lib","gtwvt.lib")
elseif lGtwvw
cDefaultLibs := if(lMWvW,'mwvw.lib ', '') + strtran(cDefaultLibs,"gtwin.lib","gtwvw.lib ")
cDefaultLibsMt := if(lMWvW,'mwvw.lib ', '') + strtran(cDefaultLibsMt,"gtwin.lib","gtwvw.lib ")