diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7884fd1368..ca9a47d1da 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,48 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-04-29 13:05 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * common.mak + * source/rdd/Makefile + * source/rdd/dbstrux.prg + * source/rdd/rddord.prg + + source/rdd/rddordu.prg + + source/rdd/dbstruxu.prg + + Moved some UNDOC functions to separate files. + * Removed STRICT guard from _dtxCondSet(). + + * include/hbextern.ch + ! Added missing _dtxCondSet(). + + * source/rtl/colorind.c + * source/rtl/direct.c + * Minor formatting. + + * source/vm/asort.c + ! Changed one direct item access to item API call. + + * contrib/rddads/ads.ch + * contrib/rddads/adsfunc.c + * contrib/rddads/ads1.c + ! Added support for ADS9 VFP file type and fields. + ; Borrowed from xhb / Luiz Rafael Culik. + (changed to compile using original - older - ADS headers) + ; Please review & test. + + * source/vm/pcount.c + % Minor opt. + + * contrib/hbtip/sendmail.prg + ! SF bugtracker#1934698 fix applied. Thanks Chen. + + - contrib/hbapollo/tests/bld.bat + * contrib/hbapollo/tests/bld_b32.bat + % Using central bld.bat instead of modified local copy. + + + contrib/gtwvg/tests/bld_b32.bat + + Added BCC32 build batch file for GTWVG tests. + ; NOTE: demowvg still doesn't seem to work. + 2008-04-28 18:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/gtwin/gtwin.c * added mouse wheel support to GTWIN diff --git a/harbour/common.mak b/harbour/common.mak index a5e1594e65..92d2666637 100644 --- a/harbour/common.mak +++ b/harbour/common.mak @@ -881,10 +881,12 @@ RDD_LIB_OBJS = \ $(OBJ_DIR)\dbsort$(OBJEXT) \ $(OBJ_DIR)\dbsortx$(OBJEXT) \ $(OBJ_DIR)\dbstrux$(OBJEXT) \ + $(OBJ_DIR)\dbstruxu$(OBJEXT) \ $(OBJ_DIR)\dbstruxx$(OBJEXT) \ $(OBJ_DIR)\dbupdat$(OBJEXT) \ $(OBJ_DIR)\dbupdatx$(OBJEXT) \ $(OBJ_DIR)\rddord$(OBJEXT) \ + $(OBJ_DIR)\rddordu$(OBJEXT) \ $(OBJ_DIR)\rddsys$(OBJEXT) \ #********************************************************** diff --git a/harbour/contrib/gtwvg/tests/bld_b32.bat b/harbour/contrib/gtwvg/tests/bld_b32.bat new file mode 100644 index 0000000000..ff31d7dc42 --- /dev/null +++ b/harbour/contrib/gtwvg/tests/bld_b32.bat @@ -0,0 +1,18 @@ +@echo off +rem +rem $Id$ +rem + +rem --------------------------------------------------------------- +rem This is a generic template file, if it doesn't fit your own needs +rem please DON'T MODIFY IT. +rem +rem Instead, make a local copy and modify that one, or make a call to +rem this batch file from your customized one. [vszakats] +rem --------------------------------------------------------------- + +set HB_ARCHITECTURE=w32 +set HB_COMPILER=bcc32 +set HB_USER_LIBS=gtwvg.lib + +call ..\..\..\bin\bld.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index 39e5be15e7..1a76e88116 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -23,18 +23,6 @@ // Thanks Peter Rees! You have laid the foundation! // //-------------------------------------------------------------------// -#pragma BEGINDUMP - -#include "hbapi.h" -#include "hbapiitm.h" -#include - -HB_FUNC( UIDEBUG ) -{ - OutputDebugString( hb_parc( 1 ) ); -} - -#pragma ENDDUMP //-------------------------------------------------------------------// #include 'inkey.ch' @@ -2108,3 +2096,15 @@ FUNCTION DrawSlide( hDlg, nSlide ) //-------------------------------------------------------------------// +#pragma BEGINDUMP + +#include "hbapi.h" +#include "hbapiitm.h" +#include + +HB_FUNC( UIDEBUG ) +{ + OutputDebugString( hb_parc( 1 ) ); +} + +#pragma ENDDUMP diff --git a/harbour/contrib/hbapollo/tests/bld.bat b/harbour/contrib/hbapollo/tests/bld.bat deleted file mode 100644 index 7ee22870da..0000000000 --- a/harbour/contrib/hbapollo/tests/bld.bat +++ /dev/null @@ -1,273 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem --------------------------------------------------------------- -rem This is a generic template file, if it doesn't fit your own needs -rem please DON'T MODIFY IT. -rem -rem Instead, make a local copy and modify that one, or make a call to -rem this batch file from your customized one. [vszakats] -rem --------------------------------------------------------------- - -rem --------------------------------------------------------------- -rem Template to build a final Harbour executable, using Harbour -rem with the C code generation feature, then calling the proper C -rem linker/compiler. -rem -rem Copyright 1999-2004 Viktor Szakats (viktor.szakats@syenar.hu) -rem See doc/license.txt for licensing terms. -rem --------------------------------------------------------------- - -rem if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=w32 -rem if "%HB_COMPILER%" == "" set HB_COMPILER=mingw32 -rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= - -if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=..\bin\ -if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=..\lib\ -if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=..\include\ - -:START - - if "%HB_ARCHITECTURE%" == "" goto NO_ARCH - if "%HB_COMPILER%" == "" goto NO_COMP - - if not "%1" == "" goto COMPILE - -:HELP - - echo. - echo Usage: bld filename - echo. - echo Notes: - echo. - echo - 'filename' is the .prg filename *without* extension. - echo - Don't forget to make a MAIN() function for you application. - echo - This batch file assumes you are in some directory off the main - echo harbour directory. - echo - Environment variables HB_ARCHITECTURE, HB_COMPILER, HB_GT_LIB - echo should be set. Setting HB_GT_LIB is optional. - echo The following values are currently supported: - echo. - echo HB_ARCHITECTURE: - echo - dos (HB_GT_LIB=gtdos by default) - echo - w32 (HB_GT_LIB=gtwin by default) - echo - linux (HB_GT_LIB=gtstd by default) - echo - os2 (HB_GT_LIB=gtos2 by default) - echo. - pause - echo HB_COMPILER: - echo - When HB_ARCHITECTURE=dos - echo - bcc16 (Borland C++ 3.x, 4.x, 5.0x, DOS 16-bit) - echo - djgpp (Delorie GNU C, DOS 32-bit) - echo - rxs32 (EMX/RSXNT/DOS GNU C, DOS 32-bit) - echo - watcom (OpenWatcom, DOS 32-bit) - echo - When HB_ARCHITECTURE=w32 - echo - bcc32 (Borland C++ 4.x, 5.x, Windows 32-bit) - echo - gcc (Cygnus/Cygwin GNU C, Windows 32-bit) - echo - mingw32 (Cygnus/MinGW GNU C, Windows 32-bit) - echo - rxsnt (EMX/RSXNT/Win32 GNU C, Windows 32-bit) - echo - icc (IBM Visual Age C++, Windows 32-bit) - echo - msvc (Microsoft Visual C++, Windows 32-bit) - echo - watcom (OpenWatcom, Windows 32-bit) - echo - When HB_ARCHITECTURE=linux - echo - gcc (GNU C, 32-bit) - echo - When HB_ARCHITECTURE=os2 - echo - gcc (EMX GNU C, OS/2 32-bit) - echo - icc (IBM Visual Age C++ 3.0, OS/2 32-bit) - echo. - pause - echo HB_GT_LIB: - echo - gtstd (Standard streaming) (for all architectures) - echo - gtdos (DOS console) (for dos architecture) - echo - gtwin (Win32 console) (for w32 architecture) - echo - gtos2 (OS/2 console) (for os2 architecture) - echo - gtpca (PC ANSI console) (for all architectures) - echo - gtcrs (Curses console) (for linux, w32 architectures) - echo - gtsln (Slang console) (for linux, w32 architectures) - goto END - -:NO_ARCH - - echo Error: HB_ARCHITECTURE is not set. - goto HELP - -:NO_COMP - - echo Error: HB_COMPILER is not set. - goto HELP - -:BAD_ARCH - - echo Error: HB_ARCHITECTURE value is unsupported. - goto HELP - -:BAD_COMP - - echo Error: HB_COMPILER value is unsupported. - goto HELP - -:COMPILE - - %HB_BIN_INSTALL%\harbour %1.prg -n -q0 -gc0 -i%HB_INC_INSTALL% %2 %3 %HARBOURFLAGS% - -:A_DOS - - if not "%HB_GT_LIB%" == "" set _HB_GT_LIB=%HB_GT_LIB% - - if not "%HB_ARCHITECTURE%" == "dos" goto A_W32 - - if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtdos - - if not "%HB_COMPILER%" == "bcc16" goto A_DOS_BCC16_NOT - - echo -O2 -d -mh %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% > build.tmp - echo -e%1.exe >> build.tmp - echo %1.c >> build.tmp - echo hbcpage.lib >> build.tmp - echo hbdebug.lib >> build.tmp - echo hbvm.lib >> build.tmp - echo hbrtl.lib >> build.tmp - echo %_HB_GT_LIB%.lib >> build.tmp - echo hblang.lib >> build.tmp - echo hbrdd.lib >> build.tmp - echo hbmacro.lib >> build.tmp - echo hbpp.lib >> build.tmp - echo rddfpt.lib >> build.tmp - echo rddntx.lib >> build.tmp - echo rddcdx.lib >> build.tmp - echo hbsix.lib >> build.tmp - echo hbcommon.lib >> build.tmp - bcc @build.tmp - del build.tmp - goto END - -:A_DOS_BCC16_NOT - - if not "%HB_COMPILER%" == "djgpp" goto A_DOS_DJGPP_NOT - - echo %1.c > build.tmp - echo -o%1.exe %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% >> build.tmp - echo -lhbcpage >> build.tmp - echo -lhbdebug >> build.tmp - echo -lhbvm >> build.tmp - echo -lhbrtl >> build.tmp - echo -l%_HB_GT_LIB% >> build.tmp - echo -lhblang >> build.tmp - echo -lhbrdd >> build.tmp - echo -lhbrtl >> build.tmp - echo -lhbvm >> build.tmp - echo -lhbmacro >> build.tmp - echo -lhbpp >> build.tmp - echo -lrddfpt >> build.tmp - echo -lrddntx >> build.tmp - echo -lrddcdx >> build.tmp - echo -lhbsix >> build.tmp - echo -lhbcommon >> build.tmp - echo -lm >> build.tmp - gcc @build.tmp - del build.tmp - goto END - -:A_DOS_DJGPP_NOT - - if not "%HB_COMPILER%" == "rsx32" GOTO A_DOS_RSX32_NOT - - gcc %1.c -Zrsx32 %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon - goto END - -:A_DOS_RSX32_NOT - - if not "%HB_COMPILER%" == "watcom" goto END - - wpp386 -j -w3 -d2 -5s -5r -fp5 -oxehtz -zq -zt0 -bt=DOS %1.c -fo=%1.obj - echo debug all OP osn=DOS OP stack=65536 OP CASEEXACT OP stub=cwstub.exe NAME %1.exe > build.tmp - echo FILE %1.obj >> build.tmp - echo LIB hbcpage.lib >> build.tmp - echo LIB hbdebug.lib >> build.tmp - echo LIB hbvm.lib >> build.tmp - echo LIB hbrtl.lib >> build.tmp - echo LIB %_HB_GT_LIB%.lib >> build.tmp - echo LIB hblang.lib >> build.tmp - echo LIB hbrdd.lib >> build.tmp - echo LIB hbmacro.lib >> build.tmp - echo LIB hbpp.lib >> build.tmp - echo LIB rddntx.lib >> build.tmp - echo LIB rddcdx.lib >> build.tmp - echo LIB rddfpt.lib >> build.tmp - echo LIB hbsix.lib >> build.tmp - echo LIB hbcommon.lib >> build.tmp - wlink @build.tmp - del build.tmp - goto END - -:A_W32 - -if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 - - if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtwin - - if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -d %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% %1.c %HB_USER_LIBS% hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib %_HB_GT_LIB%.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddfpt.lib rddntx.lib rddcdx.lib hbsix.lib hbcommon.lib hbapollo.lib sde60.lib - - if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon - if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I%HB_INC_INSTALL% %HB_INC_TEMP% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon - if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon - - if "%HB_COMPILER%" == "msvc" cl -TP -W3 %CFLAGS% -I%HB_INC_INSTALL% %1.c /link /subsystem:CONSOLE %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\%_HB_GT_LIB%.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib user32.lib winspool.lib - if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning - -:C_WATCOM - - if not "%HB_COMPILER%" == "watcom" goto end - - wpp386 -j -w3 -d2 -5s -5r -fp5 -oxehtz -zq -zt0 -mf -bt=NT %1.c -fo=%1.obj - echo debug all OP osn=NT OP stack=65536 OP CASEEXACT NAME %1.exe > build.tmp - echo FILE %1.obj >> build.tmp - echo LIB hbcpage.lib >> build.tmp - echo LIB hbdebug.lib >> build.tmp - echo LIB hbvm.lib >> build.tmp - echo LIB hbrtl.lib >> build.tmp - echo LIB %_HB_GT_LIB%.lib >> build.tmp - echo LIB hblang.lib >> build.tmp - echo LIB hbmacro.lib >> build.tmp - echo LIB hbpp.lib >> build.tmp - echo LIB rddntx.lib >> build.tmp - echo LIB rddcdx.lib >> build.tmp - echo LIB rddfpt.lib >> build.tmp - echo LIB hbsix.lib >> build.tmp - echo LIB hbrdd.lib >> build.tmp - echo LIB hbcommon.lib >> build.tmp - echo LIB kernel32.lib >> build.tmp - echo LIB user32.lib >> build.tmp - echo LIB winspool.lib >> build.tmp - echo LIB oleaut32.lib >> build.tmp - echo LIB uuid.lib >> build.tmp - wlink @build.tmp - del build.tmp - goto END - -:A_OS2 - - if not "%HB_ARCHITECTURE%" == "os2" goto A_LINUX - - if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtos2 - - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L%HB_LIB_INSTALL% -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon - if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I%HB_INC_INSTALL% %1.c %HB_LIB_INSTALL%\hbcpage.lib %HB_LIB_INSTALL%\hbdebug.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\%_HB_GT_LIB%.lib %HB_LIB_INSTALL%\hblang.lib %HB_LIB_INSTALL%\hbrdd.lib %HB_LIB_INSTALL%\hbrtl.lib %HB_LIB_INSTALL%\hbvm.lib %HB_LIB_INSTALL%\hbmacro.lib %HB_LIB_INSTALL%\hbpp.lib %HB_LIB_INSTALL%\rddfpt.lib %HB_LIB_INSTALL%\rddntx.lib %HB_LIB_INSTALL%\rddcdx.lib %HB_LIB_INSTALL%\hbsix.lib %HB_LIB_INSTALL%\hbcommon.lib - goto END - -:A_LINUX - - if not "%HB_ARCHITECTURE%" == "linux" goto BAD_ARCH - - if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtstd - - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I%HB_INC_INSTALL% -L../lib -lhbcpage -lhbdebug -lhbvm -lhbrtl -l%_HB_GT_LIB% -lhblang -lhbrdd -lhbrtl -lhbvm -lhbmacro -lhbpp -lrddfpt -lrddntx -lrddcdx -lhbsix -lhbcommon - goto END - -:CLEANUP - - del %1.c - -:END diff --git a/harbour/contrib/hbapollo/tests/bld_b32.bat b/harbour/contrib/hbapollo/tests/bld_b32.bat index bd27176818..df3565bc60 100644 --- a/harbour/contrib/hbapollo/tests/bld_b32.bat +++ b/harbour/contrib/hbapollo/tests/bld_b32.bat @@ -11,8 +11,8 @@ rem Instead, make a local copy and modify that one, or make a call to rem this batch file from your customized one. [vszakats] rem --------------------------------------------------------------- -cls set HB_ARCHITECTURE=w32 set HB_COMPILER=bcc32 +set HB_USER_LIBS=hbapollo.lib sde60.lib -call bld.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 +call ..\..\..\bin\bld.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/harbour/contrib/hbtip/sendmail.prg b/harbour/contrib/hbtip/sendmail.prg index a92a11d654..39b517a00f 100644 --- a/harbour/contrib/hbtip/sendmail.prg +++ b/harbour/contrib/hbtip/sendmail.prg @@ -373,7 +373,7 @@ FUNCTION HB_SendMail( cServer, nPort, cFrom, aTo, aCC, aBCC, cBody, cSubject, aF NEXT IF lRead - oMail:hHeaders[ "Disposition-Notification-To" ] := cUser + oMail:hHeaders[ "Disposition-Notification-To" ] := cFrom ENDIF IF nPriority != 3 diff --git a/harbour/contrib/rddads/ads.ch b/harbour/contrib/rddads/ads.ch index f2acf114c2..59342f8cb4 100644 --- a/harbour/contrib/rddads/ads.ch +++ b/harbour/contrib/rddads/ads.ch @@ -54,6 +54,7 @@ #define ADS_NTX 1 #define ADS_CDX 2 #define ADS_ADT 3 +#define ADS_VFP 4 /* Advantage Optimized Filter (AOF) optimization levels */ #define ADS_OPTIMIZED_FULL 1 diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 05ca92fe85..2cf63c5d93 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -89,6 +89,9 @@ static USHORT s_uiRddIdADS = ( USHORT ) -1; static USHORT s_uiRddIdADT = ( USHORT ) -1; static USHORT s_uiRddIdADSNTX = ( USHORT ) -1; static USHORT s_uiRddIdADSCDX = ( USHORT ) -1; +#if ADS_REQUIRE_VERSION >= 900 +static USHORT s_uiRddIdADSVFP = ( USHORT ) -1; +#endif static RDDFUNCS adsSuper; @@ -266,9 +269,18 @@ static BOOL adsIndexKeyCmp( ADSHANDLE hIndex, UNSIGNED8 * pszKey, UNSIGNED16 u16 static int adsGetFileType( USHORT uiRddID ) { - return ( uiRddID == s_uiRddIdADSCDX ? ADS_CDX : - ( uiRddID == s_uiRddIdADSNTX ? ADS_NTX : - ( uiRddID == s_uiRddIdADT ? ADS_ADT : adsFileType ) ) ); + if( uiRddID == s_uiRddIdADSCDX ) + return ADS_CDX; + else if( uiRddID == s_uiRddIdADSNTX ) + return ADS_NTX; + else if( uiRddID == s_uiRddIdADT ) + return ADS_ADT; +#if ADS_REQUIRE_VERSION >= 900 + else if( uiRddID == s_uiRddIdADSVFP ) + return ADS_VFP; +#endif + + return adsFileType; } static const char * adsTableExt( int iFileType ) @@ -278,14 +290,30 @@ static const char * adsTableExt( int iFileType ) static const char * adsMemoExt( int iFileType ) { - return iFileType == ADS_ADT ? ".adm" : - ( iFileType == ADS_CDX ? ".fpt" : ".dbt" ); + switch( iFileType ) + { + case ADS_ADT: return ".adm"; + case ADS_CDX: return ".fpt"; +#if ADS_REQUIRE_VERSION >= 900 + case ADS_VFP: return ".fpt"; +#endif + } + + return ".dbt"; } static const char * adsIndexExt( int iFileType ) { - return iFileType == ADS_ADT ? ".adi" : - ( iFileType == ADS_CDX ? ".cdx" : ".ntx" ); + switch( iFileType ) + { + case ADS_ADT: return ".adi"; + case ADS_CDX: return ".cdx"; +#if ADS_REQUIRE_VERSION >= 900 + case ADS_VFP: return ".cdx"; +#endif + } + + return ".ntx"; } static ADSHANDLE hb_adsFindBag( ADSAREAP pArea, char * szBagName ) @@ -1444,7 +1472,12 @@ static ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) case 'A': case '+': +#if ADS_REQUIRE_VERSION >= 900 + if( pArea->iFileType == ADS_ADT || + pArea->iFileType == ADS_VFP ) +#else if( pArea->iFileType == ADS_ADT ) +#endif { dbFieldInfo.uiType = HB_FT_AUTOINC; dbFieldInfo.uiTypeExtended = ADS_AUTOINC; @@ -1465,7 +1498,12 @@ static ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) { dbFieldInfo.uiType = HB_FT_BLOB; dbFieldInfo.uiTypeExtended = ADS_BINARY; +#if ADS_REQUIRE_VERSION >= 900 + dbFieldInfo.uiLen = ( pArea->iFileType == ADS_ADT ) ? 9 : + ( pArea->iFileType == ADS_VFP ) ? 4 : 10; +#else dbFieldInfo.uiLen = ( pArea->iFileType == ADS_ADT ) ? 9 : 10; +#endif dbFieldInfo.uiFlags = HB_FF_BINARY; } else @@ -1514,7 +1552,12 @@ static ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) break; case '@': +#if ADS_REQUIRE_VERSION >= 900 + if( pArea->iFileType == ADS_ADT || + pArea->iFileType == ADS_VFP ) +#else if( pArea->iFileType == ADS_ADT ) +#endif { dbFieldInfo.uiType = HB_FT_DAYTIME; dbFieldInfo.uiTypeExtended = ADS_TIMESTAMP; @@ -1564,6 +1607,19 @@ static ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) dbFieldInfo.uiLen = 4; } } +#if ADS_REQUIRE_VERSION >= 900 + else if( pArea->iFileType == ADS_VFP && + ( iNameLen >= 4 && + hb_strnicmp( szFieldType, "timestamp", iNameLen ) == 0 ) ) + { + if( iNameLen > 4 ) + { + dbFieldInfo.uiType = HB_FT_DAYTIME; + dbFieldInfo.uiTypeExtended = ADS_TIMESTAMP; + dbFieldInfo.uiLen = 8; + } + } +#endif else return FAILURE; break; @@ -1592,6 +1648,20 @@ static ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct ) return FAILURE; break; +#if ADS_REQUIRE_VERSION >= 900 + case 'Y': + if( pArea->iFileType == ADS_VFP) + { + dbFieldInfo.uiType = HB_FT_CURRENCY; + dbFieldInfo.uiTypeExtended = ADS_MONEY; + dbFieldInfo.uiLen = 8; + dbFieldInfo.uiDec = 4; + } + else + return FAILURE; + break; +#endif + case 'P': dbFieldInfo.uiType = HB_FT_IMAGE; dbFieldInfo.uiTypeExtended = ADS_IMAGE; @@ -1705,6 +1775,7 @@ static ERRCODE adsFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ITE case HB_FT_BLOB: hb_itemPutC( pItem, "BINARY" ); break; + case HB_FT_IMAGE: hb_itemPutC( pItem, "IMAGE" ); break; @@ -1760,6 +1831,10 @@ static ERRCODE adsFieldInfo( AREAP pArea, USHORT uiIndex, USHORT uiType, PHB_ITE hb_itemPutC( pItem, "CURDOUBLE" ); break; + case HB_FT_CURRENCY: + hb_itemPutC( pItem, "Y" ); + break; + default: hb_itemPutC( pItem, "U" ); break; @@ -1953,6 +2028,7 @@ static ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) case HB_FT_LONG: case HB_FT_DOUBLE: case HB_FT_CURDOUBLE: + case HB_FT_CURRENCY: { DOUBLE dVal = 0; @@ -1963,7 +2039,8 @@ static ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) pArea->fEof = TRUE; } if( pField->uiTypeExtended == ADS_CURDOUBLE || - pField->uiTypeExtended == ADS_DOUBLE ) + pField->uiTypeExtended == ADS_DOUBLE || + pField->uiTypeExtended == ADS_MONEY ) { hb_itemPutNDLen( pItem, dVal, 20 - ( pField->uiDec > 0 ? ( pField->uiDec + 1 ) : 0 ), @@ -2229,6 +2306,7 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) case HB_FT_DAYTIME: case HB_FT_AUTOINC: case HB_FT_CURDOUBLE: + case HB_FT_CURRENCY: if( HB_IS_NUMERIC( pItem ) ) { bTypeError = FALSE; @@ -2571,6 +2649,9 @@ static ERRCODE adsCreate( ADSAREAP pArea, LPDBOPENINFO pCreateInfo ) case HB_FT_CURDOUBLE: /* "Z" */ cType = "CurD"; break; + case HB_FT_CURRENCY: /* "Z" */ + cType = "money"; + break; } if( cType == NULL ) @@ -2832,6 +2913,13 @@ static ERRCODE adsNewArea( ADSAREAP pArea ) pArea->iFileType = ADS_CDX; pArea->uiMaxFieldNameLength = ADS_MAX_DBF_FIELD_NAME; } +#if ADS_REQUIRE_VERSION >= 900 + else if( pArea->rddID == s_uiRddIdADSVFP ) + { + pArea->iFileType = ADS_VFP; + pArea->uiMaxFieldNameLength = ADS_MAX_DBF_FIELD_NAME; + } +#endif else /* if( pArea->rddID == s_uiRddIdADS ) */ { pArea->iFileType = adsFileType; @@ -2887,7 +2975,12 @@ static ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) { char * szSQL = hb_adsOemToAnsi( szFile, strlen( szFile ) ); +#if ADS_REQUIRE_VERSION >= 900 + if( pArea->iFileType == ADS_CDX || + pArea->iFileType == ADS_VFP ) +#else if( pArea->iFileType == ADS_CDX ) +#endif { AdsStmtSetTableType( hStatement, pArea->iFileType ); } @@ -3017,6 +3110,12 @@ static ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo ) dbFieldInfo.uiDec = ( USHORT ) pusDecimals; break; + case ADS_MONEY: + dbFieldInfo.uiType = HB_FT_CURRENCY; + AdsGetFieldDecimals( pArea->hTable, szName, &pusDecimals ); + dbFieldInfo.uiDec = ( USHORT ) pusDecimals; + break; + case ADS_INTEGER: case ADS_SHORTINT: dbFieldInfo.uiType = HB_FT_INTEGER; @@ -3146,6 +3245,11 @@ static ERRCODE adsSysName( ADSAREAP pArea, BYTE * pBuffer ) case ADS_CDX: hb_strncpy( ( char * ) pBuffer, "ADSCDX", HARBOUR_MAX_RDD_DRIVERNAME_LENGTH ); break; +#if ADS_REQUIRE_VERSION >= 900 + case ADS_VFP: + hb_strncpy( ( char * ) pBuffer, "ADSVFP", HARBOUR_MAX_RDD_DRIVERNAME_LENGTH ); + break; +#endif case ADS_ADT: hb_strncpy( ( char * ) pBuffer, "ADSADT", HARBOUR_MAX_RDD_DRIVERNAME_LENGTH ); break; diff --git a/harbour/contrib/rddads/adsfunc.c b/harbour/contrib/rddads/adsfunc.c index a349db57b3..6e06663345 100644 --- a/harbour/contrib/rddads/adsfunc.c +++ b/harbour/contrib/rddads/adsfunc.c @@ -1380,6 +1380,12 @@ HB_FUNC( ADSCREATESQLSTATEMENT ) { AdsStmtSetTableType( adsStatementHandle, ADS_CDX ); } +#if ADS_REQUIRE_VERSION >= 900 + if( hb_parni( 2 ) == ADS_VFP ) + { + AdsStmtSetTableType( adsStatementHandle, ADS_VFP ); + } +#endif if( !hb_rddInsertAreaNode( "ADS" ) ) { diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index a2de35c36d..7522a16d53 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -616,6 +616,7 @@ EXTERNAL __QQPUB EXTERNAL _EINSTVAR EXTERNAL _NATMSGVER EXTERNAL _NATSORTVER +EXTERNAL _DTXCONDSET EXTERNAL DBGSHADOW EXTERNAL DEFPATH EXTERNAL ISAFFIRM diff --git a/harbour/source/rdd/Makefile b/harbour/source/rdd/Makefile index 318292eadb..d2b23a5323 100644 --- a/harbour/source/rdd/Makefile +++ b/harbour/source/rdd/Makefile @@ -35,12 +35,14 @@ PRG_SOURCES=\ dbsort.prg \ dbsortx.prg \ dbstrux.prg \ + dbstruxu.prg \ dbstruxx.prg \ dbtotal.prg \ dbtotalx.prg \ dbupdat.prg \ dbupdatx.prg \ rddord.prg \ + rddordu.prg \ rddsys.prg \ LIBNAME=hbrdd diff --git a/harbour/source/rdd/dbstrux.prg b/harbour/source/rdd/dbstrux.prg index d98b94abe8..39cbee8ac4 100644 --- a/harbour/source/rdd/dbstrux.prg +++ b/harbour/source/rdd/dbstrux.prg @@ -158,15 +158,6 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDD, lNew, cAlias, cCodePage, nConne RETURN Used() -/* NOTE: Undocumented, internal Clipper function */ - -#ifdef HB_C52_UNDOC - -FUNCTION __FLEDIT( aStruct, aFieldList ) - RETURN __dbStructFilter( aStruct, aFieldList ) - -#endif - /* NOTE: Internal helper function, CA-Cl*pper name is: __FLEDIT() */ FUNCTION __dbStructFilter( aStruct, aFieldList ) diff --git a/harbour/source/rdd/dbstruxu.prg b/harbour/source/rdd/dbstruxu.prg new file mode 100644 index 0000000000..3d3f6733ef --- /dev/null +++ b/harbour/source/rdd/dbstruxu.prg @@ -0,0 +1,62 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * __FLEDIT() undocumented function + * + * Copyright 1999 {list of individual authors and e-mail addresses} + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#include "common.ch" + +/* NOTE: Undocumented, internal Clipper function */ + +#ifdef HB_C52_UNDOC + +FUNCTION __FLEDIT( aStruct, aFieldList ) + RETURN __dbStructFilter( aStruct, aFieldList ) + +#endif diff --git a/harbour/source/rdd/rddord.prg b/harbour/source/rdd/rddord.prg index a900911488..86b47212c9 100644 --- a/harbour/source/rdd/rddord.prg +++ b/harbour/source/rdd/rddord.prg @@ -94,17 +94,3 @@ FUNCTION IndexKey( nOrder ) FUNCTION ordSetRelation( xArea, bRelation, cRelation ) RETURN dbSetRelation( xArea, bRelation, cRelation, .T. ) - -/* NOTE: Undocumented Clipper function */ - -#ifdef HB_C52_UNDOC -#ifdef HB_C52_STRICT - -FUNCTION _dtxCondSet( cFor, bFor, lAll, bWhile, bEval, nEvery, xDummy, nRecNo, nNext, nRecord, lRest ) - - HB_SYMBOL_UNUSED( xDummy ) - - RETURN ordCondSet( cFor, bFor, lAll, bWhile, bEval, nEvery, nRecNo, nNext, nRecord, lRest ) - -#endif -#endif diff --git a/harbour/source/rdd/rddordu.prg b/harbour/source/rdd/rddordu.prg new file mode 100644 index 0000000000..72d4e4f575 --- /dev/null +++ b/harbour/source/rdd/rddordu.prg @@ -0,0 +1,65 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Old style order management functions + * + * Copyright 1999 {list of individual authors and e-mail addresses} + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#include "common.ch" + +/* NOTE: Undocumented Clipper function */ + +#ifdef HB_C52_UNDOC + +FUNCTION _dtxCondSet( cFor, bFor, lAll, bWhile, bEval, nEvery, xDummy, nRecNo, nNext, nRecord, lRest ) + + HB_SYMBOL_UNUSED( xDummy ) + + RETURN ordCondSet( cFor, bFor, lAll, bWhile, bEval, nEvery, nRecNo, nNext, nRecord, lRest ) + +#endif diff --git a/harbour/source/rtl/colorind.c b/harbour/source/rtl/colorind.c index 5f1479b72a..815e5aaca3 100644 --- a/harbour/source/rtl/colorind.c +++ b/harbour/source/rtl/colorind.c @@ -63,7 +63,7 @@ HB_FUNC( HB_COLORINDEX ) /* Skip the given number of commas */ - for( ulColorPos = 0 ; pszColor[ ulColorPos ] != '\0' && uiColorIndex > 0 ; ulColorPos++ ) + for( ulColorPos = 0; pszColor[ ulColorPos ] != '\0' && uiColorIndex > 0; ulColorPos++ ) { if( pszColor[ ulColorPos ] == ',' ) uiColorIndex--; diff --git a/harbour/source/rtl/direct.c b/harbour/source/rtl/direct.c index ed384849c3..adabe9232d 100644 --- a/harbour/source/rtl/direct.c +++ b/harbour/source/rtl/direct.c @@ -98,7 +98,7 @@ #include "directry.ch" -/* NOTE: 8.3 three support should be added in a separate way, like +/* NOTE: 8.3 support should be added in a separate way, like as a function which converts full names to 8.3 names, since this issue is very much platform specific, and this is not the only place which may need the conversion [vszakats]. */ @@ -146,10 +146,10 @@ HB_FUNC( DIRECTORY ) */ int iLen = strlen( szDirSpec ) - 1; #ifdef OS_HAS_DRIVE_LETTER - if( szDirSpec[iLen] == OS_PATH_DELIMITER || - szDirSpec[iLen] == OS_DRIVE_DELIMITER ) + if( szDirSpec[ iLen ] == OS_PATH_DELIMITER || + szDirSpec[ iLen ] == OS_DRIVE_DELIMITER ) #else - if( szDirSpec[iLen] == OS_PATH_DELIMITER ) + if( szDirSpec[ iLen ] == OS_PATH_DELIMITER ) #endif { if( fFree ) diff --git a/harbour/source/vm/asort.c b/harbour/source/vm/asort.c index c3b75eeda4..b6f005831b 100644 --- a/harbour/source/vm/asort.c +++ b/harbour/source/vm/asort.c @@ -86,7 +86,7 @@ static BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock ) else if( HB_IS_NUMERIC( pItem1 ) && HB_IS_NUMERIC( pItem2 ) ) return hb_itemGetND( pItem1 ) < hb_itemGetND( pItem2 ); else if( HB_IS_DATE( pItem1 ) && HB_IS_DATE( pItem2 ) ) - return pItem1->item.asDate.value < pItem2->item.asDate.value; + return hb_itemGetDL( pItem1 ) < hb_itemGetDL( pItem2 ); else if( HB_IS_LOGICAL( pItem1 ) && HB_IS_LOGICAL( pItem2 ) ) return hb_itemGetL( pItem1 ) < hb_itemGetL( pItem2 ); else diff --git a/harbour/source/vm/pcount.c b/harbour/source/vm/pcount.c index 2ab94193cb..b1fbc25d8e 100644 --- a/harbour/source/vm/pcount.c +++ b/harbour/source/vm/pcount.c @@ -58,7 +58,5 @@ HB_FUNC( PCOUNT ) { /* Skip current function */ - PHB_ITEM pBase = hb_stackItem( hb_stackBaseItem()->item.asSymbol.stackstate->lBaseItem ); - - hb_retni( pBase->item.asSymbol.paramcnt ); + hb_retni( ( hb_stackItem( hb_stackBaseItem()->item.asSymbol.stackstate->lBaseItem ) )->item.asSymbol.paramcnt ); }