2008-04-14 23:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/errorapi.c
* allow to pass NULL instead of PHB_ITEM pointer in argument list
of RT error functions:
hb_errRT_BASE()
hb_errRT_BASE_Ext1()
hb_errRT_BASE_Subst()
hb_errRT_BASE_SubstR()
to not force allocating dummy item in upper level code.
* harbour/source/rtl/mod.c
! small fix in substitued return value in code like:
proc main()
set fixed on
? transform(mod( 12345, 0 ),"")
return
* harbour/utils/hbmake/hbmlang.c
* harbour/utils/hbmake/hbmutils.prg
* harbour/utils/hbmake/hbmake.prg
! removed gtnul library - it does not longer exists
* minor formatting
This commit is contained in:
@@ -8,6 +8,29 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-04-14 23:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/errorapi.c
|
||||
* allow to pass NULL instead of PHB_ITEM pointer in argument list
|
||||
of RT error functions:
|
||||
hb_errRT_BASE()
|
||||
hb_errRT_BASE_Ext1()
|
||||
hb_errRT_BASE_Subst()
|
||||
hb_errRT_BASE_SubstR()
|
||||
to not force allocating dummy item in upper level code.
|
||||
|
||||
* harbour/source/rtl/mod.c
|
||||
! small fix in substitued return value in code like:
|
||||
proc main()
|
||||
set fixed on
|
||||
? transform(mod( 12345, 0 ),"")
|
||||
return
|
||||
|
||||
* harbour/utils/hbmake/hbmlang.c
|
||||
* harbour/utils/hbmake/hbmutils.prg
|
||||
* harbour/utils/hbmake/hbmake.prg
|
||||
! removed gtnul library - it does not longer exists
|
||||
* minor formatting
|
||||
|
||||
2008-04-14 01:53 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbtest/rt_main.h
|
||||
* Cleanup.
|
||||
|
||||
@@ -1050,7 +1050,9 @@ USHORT hb_errRT_BASE( ULONG ulGenCode, ULONG ulSubCode, const char * szDescripti
|
||||
va_start( va, ulArgCount );
|
||||
for( ulArgPos = 1; ulArgPos <= ulArgCount; ulArgPos++ )
|
||||
{
|
||||
hb_itemArrayPut( pArray, ulArgPos, va_arg( va, PHB_ITEM ) );
|
||||
PHB_ITEM pArg = va_arg( va, PHB_ITEM );
|
||||
if( pArg )
|
||||
hb_itemArrayPut( pArray, ulArgPos, pArg );
|
||||
}
|
||||
va_end( va );
|
||||
}
|
||||
@@ -1106,7 +1108,9 @@ USHORT hb_errRT_BASE_Ext1( ULONG ulGenCode, ULONG ulSubCode, const char * szDesc
|
||||
va_start( va, ulArgCount );
|
||||
for( ulArgPos = 1; ulArgPos <= ulArgCount; ulArgPos++ )
|
||||
{
|
||||
hb_itemArrayPut( pArray, ulArgPos, va_arg( va, PHB_ITEM ) );
|
||||
PHB_ITEM pArg = va_arg( va, PHB_ITEM );
|
||||
if( pArg )
|
||||
hb_itemArrayPut( pArray, ulArgPos, pArg );
|
||||
}
|
||||
va_end( va );
|
||||
}
|
||||
@@ -1161,7 +1165,9 @@ PHB_ITEM hb_errRT_BASE_Subst( ULONG ulGenCode, ULONG ulSubCode, const char * szD
|
||||
va_start( va, ulArgCount );
|
||||
for( ulArgPos = 1; ulArgPos <= ulArgCount; ulArgPos++ )
|
||||
{
|
||||
hb_itemArrayPut( pArray, ulArgPos, va_arg( va, PHB_ITEM ) );
|
||||
PHB_ITEM pArg = va_arg( va, PHB_ITEM );
|
||||
if( pArg )
|
||||
hb_itemArrayPut( pArray, ulArgPos, pArg );
|
||||
}
|
||||
va_end( va );
|
||||
}
|
||||
@@ -1215,7 +1221,9 @@ void hb_errRT_BASE_SubstR( ULONG ulGenCode, ULONG ulSubCode, const char * szDesc
|
||||
va_start( va, ulArgCount );
|
||||
for( ulArgPos = 1; ulArgPos <= ulArgCount; ulArgPos++ )
|
||||
{
|
||||
hb_itemArrayPut( pArray, ulArgPos, va_arg( va, PHB_ITEM ) );
|
||||
PHB_ITEM pArg = va_arg( va, PHB_ITEM );
|
||||
if( pArg )
|
||||
hb_itemArrayPut( pArray, ulArgPos, pArg );
|
||||
}
|
||||
va_end( va );
|
||||
}
|
||||
|
||||
@@ -68,11 +68,12 @@
|
||||
HB_FUNC( MOD )
|
||||
{
|
||||
PHB_ITEM pNumber = hb_param( 1, HB_IT_NUMERIC );
|
||||
PHB_ITEM pBase = hb_param( 2, HB_IT_NUMERIC );
|
||||
|
||||
if( pNumber && ISNUM( 2 ) )
|
||||
if( pNumber && pBase )
|
||||
{
|
||||
double dNumber = hb_itemGetND( pNumber );
|
||||
double dBase = hb_parnd( 2 ); /* dBase! Cool! */
|
||||
double dBase = hb_itemGetND( pBase ); /* dBase! Cool! */
|
||||
|
||||
if( dBase )
|
||||
{
|
||||
@@ -86,26 +87,26 @@ HB_FUNC( MOD )
|
||||
{
|
||||
PHB_ITEM pResult = hb_errRT_BASE_Subst( EG_ZERODIV, 1341, NULL, "%", HB_ERR_ARGS_BASEPARAMS );
|
||||
|
||||
/* In CA-Clipper MOD() function ignores substitution result
|
||||
* and return original numeric item keeping its internal
|
||||
* representation: integer or double, size and number of
|
||||
* decimal places, it can be seen in code like:
|
||||
* proc main()
|
||||
* set fixed on
|
||||
* ? transform(mod( 12345, 0 ),"")
|
||||
* return
|
||||
*
|
||||
* [druzus]
|
||||
*/
|
||||
if( pResult )
|
||||
{
|
||||
int iDec;
|
||||
|
||||
hb_itemReturn( pNumber );
|
||||
hb_itemRelease( pResult );
|
||||
|
||||
hb_itemGetNLen( pNumber, NULL, &iDec );
|
||||
|
||||
hb_retndlen( dNumber, 0, iDec );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PHB_ITEM pItemNIL = hb_itemNew( NULL );
|
||||
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1085, NULL, "%", 2, hb_pcount() > 0 ? hb_param( 1, HB_IT_ANY ) : pItemNIL, hb_pcount() > 1 ? hb_param( 2, HB_IT_ANY ) : pItemNIL );
|
||||
|
||||
hb_itemRelease( pItemNIL );
|
||||
}
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1085, NULL, "%", 2, hb_param( 1, HB_IT_ANY ), hb_param( 2, HB_IT_ANY ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1621,14 +1621,14 @@ FUNCTION CreateMakeFile( cFile, lCreateAndCompile )
|
||||
LOCAL cAppName := padr(s_cAppName,50)
|
||||
LOCAL cDefaultLibs := "hblang.lib hbvm.lib hbrtl.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbcommon.lib gtwin.lib hbcpage.lib hbpcre.lib hbhsx.lib hbsix.lib"
|
||||
LOCAL cDefGccLibs := "-lhbvm -lhbrtl -lhbpcre -lgtdos -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbhsx -lhbsix -lhbcommon -lhbcpage -lm"
|
||||
LOCAL cDefGccLibsUnix := "-lhbvm -lhbcpage -ltef -lhbrtl -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lhblang -lhbcommon -lhbnulrdd -lbmrddcdx -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbhsx -lhbusrrdd -lhbpcre -lgtnul -lgtsln -lshblang -lm -lrt"
|
||||
LOCAL cDefGccLibsw := "-lhbvm -lhbrtl -lhbpcre -lgtwin -lgtnul -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbhsx -lhbsix -lhbcommon -lhbcpage -lm"
|
||||
LOCAL cDefGccLibsUnix := "-lhbvm -lhbcpage -ltef -lhbrtl -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lhblang -lhbcommon -lhbnulrdd -lbmrddcdx -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbhsx -lhbusrrdd -lhbpcre -lgtsln -lshblang -lm -lrt"
|
||||
LOCAL cDefGccLibsw := "-lhbvm -lhbrtl -lhbpcre -lgtwin -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbhsx -lhbsix -lhbcommon -lhbcpage -lm"
|
||||
LOCAL cGccLibsOs2 := "-lhbvm -lhbrtl -lhbpcre -lgtos2 -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbhsx -lhbsix -lhbcommon -lhbcpage -lm"
|
||||
LOCAL cDefLibGccLibs := "-lhbvm -lhbrtl -lhbpcre -lgtcrs -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbhsx -lhbsix -lhbcommon -lhbcpage -lgtnul"
|
||||
LOCAL cDefLibGccLibs := "-lhbvm -lhbrtl -lhbpcre -lgtcrs -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbhsx -lhbsix -lhbcommon -lhbcpage"
|
||||
LOCAL cDefaultLibsMt := "lang.lib vmmt.lib rtlmt.lib rddmt.lib macromt.lib ppmt.lib dbfntxmt.lib dbfcdxmt.lib dbffptmt.lib common.lib gtwin.lib codepage.lib hbpcre.lib hsxmt.lib hbsixmt.lib"
|
||||
LOCAL cDefGccLibsUnixMt := "-lvmmt -lcodepage -ltef -lrtlmt -lrddmt -lrtl -lvmmt -lmacromt -lpp -llang -lcommon -lnulsys -lbmdbfcdx -ldbfntx -ldbfcdx -ldbffpt -lhbsix -lhsx -lusrrdd -lhbpcre -lgtnul -lgtsln -lslang -lm -lrt"
|
||||
LOCAL cDefGccLibsUnixMt := "-lvmmt -lcodepage -ltef -lrtlmt -lrddmt -lrtl -lvmmt -lmacromt -lpp -llang -lcommon -lnulsys -lbmdbfcdx -ldbfntx -ldbfcdx -ldbffpt -lhbsix -lhsx -lusrrdd -lhbpcre -lgtsln -lslang -lm -lrt"
|
||||
LOCAL cDefGccLibsMt := "-lvmmt -lrtlmt -lhbpcre -lgtdos -llang -lrddmt -lrtlmt -lvmmt -lmacromt -lppmt -ldbfntxmt -ldbfcdxmt -ldbffptmt -lhsxmt -lhbsixmt -lcommon -lcodepage -lm"
|
||||
LOCAL cDefGccLibsMtw := "-lvmmt -lrtlmt -lhbpcre -lgtwin -lgtnul -llang -lrddmt -lrtlmt -lvmmt -lmacromt -lppmt -ldbfntxmt -ldbfcdxmt -ldbffptmt -lhsxmt -lhbsixmt -lcommon -lcodepage -lm"
|
||||
LOCAL cDefGccLibsMtw := "-lvmmt -lrtlmt -lhbpcre -lgtwin -llang -lrddmt -lrtlmt -lvmmt -lmacromt -lppmt -ldbfntxmt -ldbfcdxmt -ldbffptmt -lhsxmt -lhbsixmt -lcommon -lcodepage -lm"
|
||||
LOCAL cGccLibsOs2Mt := "-lvmmt -lrtlmt -lhbpcre -lgtos2 -llang -lrddmt -lrtlmt -lvmmt -lmacromt -lppmt -ldbfntxmt -ldbfcdxmt -ldbffptmt -lhsxmt -lhbsixmt -lcommon -lcodepage -lm"
|
||||
// LOCAL cDefLibGccLibsMt := "-lvmmt -lrtlmt -lhbpcre -lgtcrs -llang -lrddmt -lrtlmt -lvmmt -lmacromt -lppmt -ldbfntxmt -ldbfcdxmt -ldbffptmt -lhsxmt -lhbsixmt -lcommon -lcodepage"
|
||||
LOCAL cDefLibGccLibsMt := "-lvmmt -lrtlmt -lhbpcre -lgtsln -llang -lrddmt -lrtlmt -lvmmt -lmacromt -lppmt -ldbfntxmt -ldbfcdxmt -ldbffptmt -lhsxmt -lhbsixmt -lcommon -lcodepage"
|
||||
@@ -2989,8 +2989,8 @@ Endif // Create and compile
|
||||
|
||||
IF s_lBcc .OR. s_lMSVcc .OR. s_lPocc
|
||||
if lFwh .or. lMiniGui .or. lC4W .or. lWhoo .or. lHwGui .or. lWhat32
|
||||
cDefaultLibs := strtran(cDefaultLibs,"gtwin.lib","gtgui.lib gtnul.lib")
|
||||
cDefaultLibsMt := strtran(cDefaultLibsMt,"gtwin.lib","gtgui.lib gtnul.lib")
|
||||
cDefaultLibs := strtran(cDefaultLibs,"gtwin.lib","gtgui.lib")
|
||||
cDefaultLibsMt := strtran(cDefaultLibsMt,"gtwin.lib","gtgui.lib")
|
||||
endif
|
||||
|
||||
IF lFwh
|
||||
|
||||
@@ -51,7 +51,9 @@
|
||||
|
||||
|
||||
#define HB_OS_WIN_32_USED
|
||||
#include <hbapi.h>
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapigt.h"
|
||||
#include <stdio.h>
|
||||
|
||||
HB_FUNC(GETUSERLANG)
|
||||
@@ -61,7 +63,7 @@ HB_FUNC(GETUSERLANG)
|
||||
#if defined(HB_OS_WIN_32) && (!defined(__RSXNT__)) && (!defined(__CYGWIN__))
|
||||
|
||||
{
|
||||
|
||||
|
||||
LANGID pLang=GetSystemDefaultLangID();
|
||||
|
||||
switch(pLang) {
|
||||
@@ -74,16 +76,16 @@ HB_FUNC(GETUSERLANG)
|
||||
|
||||
break;
|
||||
|
||||
case 0x0409 :
|
||||
case 0x0809 :
|
||||
case 0x0c09 :
|
||||
case 0x1009 :
|
||||
case 0x1409 :
|
||||
case 0x1809 :
|
||||
case 0x1c09 :
|
||||
case 0x2009 :
|
||||
case 0x2409 :
|
||||
case 0x2809 :
|
||||
case 0x0409 :
|
||||
case 0x0809 :
|
||||
case 0x0c09 :
|
||||
case 0x1009 :
|
||||
case 0x1409 :
|
||||
case 0x1809 :
|
||||
case 0x1c09 :
|
||||
case 0x2009 :
|
||||
case 0x2409 :
|
||||
case 0x2809 :
|
||||
case 0x2c09 :
|
||||
{
|
||||
lRet=2;
|
||||
@@ -92,49 +94,46 @@ HB_FUNC(GETUSERLANG)
|
||||
break;
|
||||
|
||||
case 0x040a :
|
||||
case 0x080a :
|
||||
case 0x0c0a :
|
||||
case 0x100a :
|
||||
case 0x140a :
|
||||
case 0x180a :
|
||||
case 0x1c0a :
|
||||
case 0x200a :
|
||||
case 0x240a :
|
||||
case 0x280a :
|
||||
case 0x2c0a :
|
||||
case 0x300a :
|
||||
case 0x340a :
|
||||
case 0x380a :
|
||||
case 0x3c0a :
|
||||
case 0x400a :
|
||||
case 0x440a :
|
||||
case 0x480a :
|
||||
case 0x4c0a :
|
||||
case 0x080a :
|
||||
case 0x0c0a :
|
||||
case 0x100a :
|
||||
case 0x140a :
|
||||
case 0x180a :
|
||||
case 0x1c0a :
|
||||
case 0x200a :
|
||||
case 0x240a :
|
||||
case 0x280a :
|
||||
case 0x2c0a :
|
||||
case 0x300a :
|
||||
case 0x340a :
|
||||
case 0x380a :
|
||||
case 0x3c0a :
|
||||
case 0x400a :
|
||||
case 0x440a :
|
||||
case 0x480a :
|
||||
case 0x4c0a :
|
||||
case 0x500a :
|
||||
{
|
||||
lRet=3;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
lRet=2;
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
lRet = 2 ;
|
||||
#endif
|
||||
hb_retnl( lRet );
|
||||
hb_retnl( lRet );
|
||||
}
|
||||
|
||||
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapigt.h"
|
||||
|
||||
/* Box array definitions */
|
||||
#define B_TOP 1
|
||||
#define B_LEFT 2
|
||||
@@ -242,7 +241,7 @@ HB_FUNC( GAUGEDISPLAY )
|
||||
|
||||
hb_gtSetColorStr( szOldColor );
|
||||
|
||||
hb_gaugeUpdate( pArray, (float) hb_arrayGetNL( pArray, B_PERCENT ) );
|
||||
hb_gaugeUpdate( pArray, ( float ) hb_arrayGetND( pArray, B_PERCENT ) );
|
||||
|
||||
hb_itemReturn( pArray );
|
||||
}
|
||||
@@ -271,7 +270,7 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent )
|
||||
int iMax;
|
||||
char szOldColor[ CLR_STRLEN ];
|
||||
char * szStr = " ";
|
||||
char szPct[ 4 ];
|
||||
char szPct[ 5 ];
|
||||
|
||||
hb_gtGetColorStr( szOldColor );
|
||||
hb_gtSetColorStr( hb_arrayGetCPtr( pArray, B_BARCOLOR ) );
|
||||
|
||||
@@ -549,7 +549,6 @@ FUNCTION GetInstaledLibs( clibs, lGcc )
|
||||
aadd(aDefLib,'gtcgi'+ cSuffix)
|
||||
aadd(aDefLib,'gtdos'+ cSuffix)
|
||||
aadd(aDefLib,'gtpca'+ cSuffix)
|
||||
aadd(aDefLib,'gtnul'+ cSuffix)
|
||||
aadd(aDefLib,'gtsln'+ cSuffix)
|
||||
aadd(aDefLib,'gtstd'+ cSuffix)
|
||||
aadd(aDefLib,'gttrm'+ cSuffix)
|
||||
|
||||
Reference in New Issue
Block a user