From 4e36c6b41f859b2d1068c720ce5d27e747b02de1 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 18 Apr 2000 23:30:42 +0000 Subject: [PATCH] 20000419-00:28 GMT+1 Victor Szakats --- harbour/ChangeLog | 46 ++++++++++++++++ harbour/bin/bld.bat | 35 ++++++------ harbour/bin/bld.cmd | 35 ++++++------ harbour/bin/bld.sh | 14 ++--- harbour/include/hbver.h | 2 +- harbour/include/set.ch | 5 +- harbour/makefile.bc | 15 ++++++ harbour/source/lang/Makefile | 2 + harbour/source/rtl/dateshb.c | 8 +-- harbour/source/rtl/gt_tpl/gt_tpl.c | 2 +- harbour/source/rtl/gtapi.c | 9 ++-- harbour/source/rtl/gtcrs/gtcrs.c | 4 +- harbour/source/rtl/gtdos/gtdos.c | 2 +- harbour/source/rtl/gtos2/gtos2.c | 2 +- harbour/source/rtl/gtpca/gtpca.c | 2 +- harbour/source/rtl/gtsln/gtsln.c | 2 +- harbour/source/rtl/gtstd/gtstd.c | 2 +- harbour/source/rtl/gtwin/gtwin.c | 2 +- harbour/source/vm/asort.c | 16 +++--- harbour/tests/Makefile | 3 ++ harbour/tests/testcdx.prg | 25 +++++++++ harbour/tests/tstasort.prg | 65 +++++++++++++++++++++++ harbour/tests/vmasort.prg | 85 ++++++++++++++++++++++++++++++ 23 files changed, 313 insertions(+), 70 deletions(-) create mode 100644 harbour/tests/testcdx.prg create mode 100644 harbour/tests/tstasort.prg create mode 100644 harbour/tests/vmasort.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0358caeeb5..40ecf6ec7e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,9 +1,55 @@ +20000419-00:28 GMT+1 Victor Szakats + + * source/rtl/gtcrs/gtcrs.c + ! Removed "Linux" from the version string. + + * source/rtl/dateshb.c + % Local variables removed, non-standard string conversion, slow sprintf() + call removed. Now using hb_retd() to return the value. It's faster and + smaller now. + + * source/lang/Makefile + * makefile.bc + + New languages added. + + * include/hbver.h + * Date bumped. + + * include/set.ch + * __SET_COUNT_HB -> HB_SET_COUNT + + * bin/bld.* + ! Redone some undocumented changes in the build batch files. + + + tests/testcdx.prg + * tests/Makefile + + New test file added. + + * source/rtl/gt*/gt*.c + ! All hb_gt_xPutch() functions made static. + + * source/rtl/gtapi.c + - Removed obsolete #define (hb_gtRepChar() related) + + ; by Jose Lalin + * source/vm/asort.c + % hb_itemLess fixed to handle LOGICAL values that were missed from + first implementation + * tests/ + + tstasort.prg + little test which gives the same results when asorting without + codeblock and shows an error with codeblock. + + vmasort.prg + massive VM and aSort test + C53 fails when executed with a value greater than 5. + 20000418-19:30 GMT-3 Luiz Rafael Culik >>>>>> 1.1996 2000-04-18 14:55 GMT-4 David G. Holm * source/rtl/gtwin/gtwin.c ! Don't generate a key code for Caps Lock. diff --git a/harbour/bin/bld.bat b/harbour/bin/bld.bat index ccd0a07c36..ece9e199fd 100644 --- a/harbour/bin/bld.bat +++ b/harbour/bin/bld.bat @@ -101,19 +101,21 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= :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 "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtdos if not "%HB_COMPILER%" == "bcc16" goto A_DOS_BCC16_NOT - echo -O2 -mh %CFLAGS% -I..\include -L..\lib > build.tmp + echo -O2 -d -mh %CFLAGS% -I..\include -L..\lib > build.tmp echo -e%1.exe %1.c >> build.tmp echo tools.lib >> build.tmp echo debug.lib >> build.tmp echo vm.lib >> build.tmp echo rtl.lib >> build.tmp - echo %HB_GT_LIB%.lib >> build.tmp + echo %_HB_GT_LIB%.lib >> build.tmp echo lang.lib >> build.tmp echo rdd.lib >> build.tmp echo macro.lib >> build.tmp @@ -134,7 +136,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= echo -ldebug >> build.tmp echo -lvm >> build.tmp echo -lrtl >> build.tmp - echo -l%HB_GT_LIB% >> build.tmp + echo -l%_HB_GT_LIB% >> build.tmp echo -llang >> build.tmp echo -lrdd >> build.tmp echo -lrtl >> build.tmp @@ -150,42 +152,41 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= :A_DOS_DJGPP_NOT - if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon goto END :A_W32 if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 - if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtwin + if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtwin - if "%HB_COMPILER%" == "bcc32" bcc32 -O2 %CFLAGS% -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %HB_GT_LIB%.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib - if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA %CFLAGS% -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib + if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -d %CFLAGS% -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %_HB_GT_LIB%.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib + if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "msvc" cl -TP -W3 %CFLAGS% -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%_HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning - if "%HB_GT_LIB%" == "gtwin" set HB_GT_LIB= goto END :A_OS2 if not "%HB_ARCHITECTURE%" == "os2" goto A_LINUX - if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtos2 + if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtos2 - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I..\include %1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\vm.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib + if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I..\include %1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%_HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\vm.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib goto END :A_LINUX if not "%HB_ARCHITECTURE%" == "linux" goto BAD_ARCH - if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtstd + if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtstd - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I../include -L../lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I../include -L../lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon goto END :CLEANUP diff --git a/harbour/bin/bld.cmd b/harbour/bin/bld.cmd index 9daa5a33d5..7bbc3ca4c0 100644 --- a/harbour/bin/bld.cmd +++ b/harbour/bin/bld.cmd @@ -101,19 +101,21 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= :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 "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtdos if not "%HB_COMPILER%" == "bcc16" goto A_DOS_BCC16_NOT - echo -O2 -mh %CFLAGS% -I..\include -L..\lib > build.tmp + echo -O2 -d -mh %CFLAGS% -I..\include -L..\lib > build.tmp echo -e%1.exe %1.c >> build.tmp echo tools.lib >> build.tmp echo debug.lib >> build.tmp echo vm.lib >> build.tmp echo rtl.lib >> build.tmp - echo %HB_GT_LIB%.lib >> build.tmp + echo %_HB_GT_LIB%.lib >> build.tmp echo lang.lib >> build.tmp echo rdd.lib >> build.tmp echo macro.lib >> build.tmp @@ -134,7 +136,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= echo -ldebug >> build.tmp echo -lvm >> build.tmp echo -lrtl >> build.tmp - echo -l%HB_GT_LIB% >> build.tmp + echo -l%_HB_GT_LIB% >> build.tmp echo -llang >> build.tmp echo -lrdd >> build.tmp echo -lrtl >> build.tmp @@ -150,40 +152,41 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= :A_DOS_DJGPP_NOT - if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon goto END :A_W32 if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 - if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtwin + if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtwin - if "%HB_COMPILER%" == "bcc32" bcc32 -O2 %CFLAGS% -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %HB_GT_LIB%.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib - if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA %CFLAGS% -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib + if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -d %CFLAGS% -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %_HB_GT_LIB%.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib + if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe %CFLAGS% -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "msvc" cl -TP -W3 %CFLAGS% -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%_HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning + goto END :A_OS2 if not "%HB_ARCHITECTURE%" == "os2" goto A_LINUX - if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtos2 + if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtos2 - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I..\include %1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\vm.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib + if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ /C- /Tp %CFLAGS% -I..\include %1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%_HB_GT_LIB%.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\vm.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib goto END :A_LINUX if not "%HB_ARCHITECTURE%" == "linux" goto BAD_ARCH - if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtstd + if "%HB_GT_LIB%" == "" set _HB_GT_LIB=gtstd - if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I../include -L../lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "gcc" gcc %1.c %CFLAGS% -I../include -L../lib -ltools -ldebug -lvm -lrtl -l%_HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon goto END :CLEANUP diff --git a/harbour/bin/bld.sh b/harbour/bin/bld.sh index aa0cce2027..97d8f5888b 100644 --- a/harbour/bin/bld.sh +++ b/harbour/bin/bld.sh @@ -81,10 +81,10 @@ else if [ "$HB_ARCHITECTURE" == "dos" ]; then - if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtdos; fi + if [ -z "$HB_GT_LIB" ]; then HB_GT_LIB=gtdos; fi if [ "$HB_COMPILER" == "bcc16" ]; then - bcc -O2 -mh $CFLAGS -I..\include -L..\lib $1.c tools.lib debug.lib vm.lib rtl.lib $HB_GT_LIB.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib + bcc -O2 -mh -d $CFLAGS -I..\include -L..\lib $1.c tools.lib debug.lib vm.lib rtl.lib $HB_GT_LIB.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib elif [ "$HB_COMPILER" == "djgpp" ]; then gcc $1.c -o$1.exe $CFLAGS -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfnt -ldbfcd -lcommo elif [ "$HB_COMPILER" == "rsx32" ]; then @@ -95,10 +95,10 @@ else elif [ "$HB_ARCHITECTURE" == "w32" ]; then - if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtwin; fi + if [ -z "$HB_GT_LIB" ]; then HB_GT_LIB=gtwin; fi if [ "$HB_COMPILER" == "bcc32" ]; then - bcc32 -O2 $CFLAGS -I..\include -L..\lib $1.c tools.lib debug.lib vm.lib rtl.lib $HB_GT_LIB.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib + bcc32 -O2 -d $CFLAGS -I..\include -L..\lib $1.c tools.lib debug.lib vm.lib rtl.lib $HB_GT_LIB.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib elif [ "$HB_COMPILER" == "gcc" ]; then gcc $1.c -o$1.exe $CFLAGS -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon elif [ "$HB_COMPILER" == "mingw32" ]; then @@ -106,7 +106,7 @@ else elif [ "$HB_COMPILER" == "rsxnt" ]; then gcc $1.c -Zwin32 $CFLAGS -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon elif [ "$HB_COMPILER" == "msvc" ]; then - cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA $CFLAGS -I..\include $1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\$HB_GT_LIB.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib + cl -TP -W3 $CFLAGS -I..\include $1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\$HB_GT_LIB.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib echo Ignore LNK4033 warning else echo Error: HB_COMPILER value is unsupported. @@ -114,7 +114,7 @@ else elif [ "$HB_ARCHITECTURE" == "os2" ]; then - if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtos2; fi + if [ -z "$HB_GT_LIB" ]; then HB_GT_LIB=gtos2; fi if [ "$HB_COMPILER" == "gcc" ]; then gcc $1.c $CFLAGS -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon @@ -126,7 +126,7 @@ else elif [ "$HB_ARCHITECTURE" == "linux" ]; then - if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtstd; fi + if [ -z "$HB_GT_LIB" ]; then HB_GT_LIB=gtstd; fi if [ "$HB_COMPILER" == "gcc" ]; then gcc $1.c $CFLAGS -I../include -L../lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon diff --git a/harbour/include/hbver.h b/harbour/include/hbver.h index 571cb5037b..c51a5a2538 100644 --- a/harbour/include/hbver.h +++ b/harbour/include/hbver.h @@ -42,6 +42,6 @@ #define HB_VER_BUILD 33 /* Build number */ #define HB_VER_YEAR 2000 /* Build year */ #define HB_VER_MONTH 04 /* Build month */ -#define HB_VER_DAY 14 /* Build day */ +#define HB_VER_DAY 18 /* Build day */ #endif /* HB_VER_H_ */ diff --git a/harbour/include/set.ch b/harbour/include/set.ch index 1409cc8c2b..c471207df2 100644 --- a/harbour/include/set.ch +++ b/harbour/include/set.ch @@ -97,8 +97,9 @@ #define _SET_COUNT 47 -#define _SET_LANGUAGE 100 +#define _SET_LANGUAGE 100 -#define __SET_COUNT_HB 1 +#define HB_SET_BASE 100 +#define HB_SET_COUNT 1 #endif /* _SET_CH */ diff --git a/harbour/makefile.bc b/harbour/makefile.bc index 4705dbf9b2..a24a392449 100644 --- a/harbour/makefile.bc +++ b/harbour/makefile.bc @@ -302,9 +302,12 @@ LANG_LIB_OBJS = \ $(OBJ_DIR)\msgeu.obj \ $(OBJ_DIR)\msgfr.obj \ $(OBJ_DIR)\msggl.obj \ + $(OBJ_DIR)\msghe862.obj \ + $(OBJ_DIR)\msghewin.obj \ $(OBJ_DIR)\msghu852.obj \ $(OBJ_DIR)\msghucwi.obj \ $(OBJ_DIR)\msghuwin.obj \ + $(OBJ_DIR)\msgis850.obj \ $(OBJ_DIR)\msgpt.obj \ $(OBJ_DIR)\msgro.obj @@ -1610,6 +1613,14 @@ $(OBJ_DIR)\msggl.obj : $(LANG_DIR)\msggl.c $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** tlib $(LANG_LIB) $(ARFLAGS) -+$@,, +$(OBJ_DIR)\msghe862.obj : $(LANG_DIR)\msghe862.c + $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** + tlib $(LANG_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\msghewin.obj : $(LANG_DIR)\msghewin.c + $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** + tlib $(LANG_LIB) $(ARFLAGS) -+$@,, + $(OBJ_DIR)\msghu852.obj : $(LANG_DIR)\msghu852.c $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** tlib $(LANG_LIB) $(ARFLAGS) -+$@,, @@ -1622,6 +1633,10 @@ $(OBJ_DIR)\msghuwin.obj : $(LANG_DIR)\msghuwin.c $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** tlib $(LANG_LIB) $(ARFLAGS) -+$@,, +$(OBJ_DIR)\msgis850.obj : $(LANG_DIR)\msgis850.c + $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** + tlib $(LANG_LIB) $(ARFLAGS) -+$@,, + $(OBJ_DIR)\msgpt.obj : $(LANG_DIR)\msgpt.c $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** tlib $(LANG_LIB) $(ARFLAGS) -+$@,, diff --git a/harbour/source/lang/Makefile b/harbour/source/lang/Makefile index 4b9834dd5a..14519c806c 100644 --- a/harbour/source/lang/Makefile +++ b/harbour/source/lang/Makefile @@ -11,6 +11,8 @@ C_SOURCES=\ msgeu.c \ msgfr.c \ msggl.c \ + msghe862.c \ + msghewin.c \ msghu852.c \ msghucwi.c \ msghuwin.c \ diff --git a/harbour/source/rtl/dateshb.c b/harbour/source/rtl/dateshb.c index f0ce7b0cd9..723ba7cc2e 100644 --- a/harbour/source/rtl/dateshb.c +++ b/harbour/source/rtl/dateshb.c @@ -323,13 +323,11 @@ HB_FUNC( TIME ) HB_FUNC( DATE ) { - char szResult[ 9 ]; - #if defined(HB_OS_WIN_32) { SYSTEMTIME st; GetLocalTime( &st ); - sprintf( szResult, "%04d%02d%02d", st.wYear, st.wMonth, st.wDay ); + hb_retd( st.wYear, st.wMonth, st.wDay ); } #else { @@ -338,11 +336,9 @@ HB_FUNC( DATE ) time( &t ); oTime = localtime( &t ); - sprintf( szResult, "%04d%02d%02d", oTime->tm_year + 1900, oTime->tm_mon + 1, oTime->tm_mday ); + hb_retd( oTime->tm_year + 1900, oTime->tm_mon + 1, oTime->tm_mday ); } #endif - - hb_retds( szResult ); } HB_FUNC( DOW ) diff --git a/harbour/source/rtl/gt_tpl/gt_tpl.c b/harbour/source/rtl/gt_tpl/gt_tpl.c index 6c1584fadf..f9874d6e6c 100644 --- a/harbour/source/rtl/gt_tpl/gt_tpl.c +++ b/harbour/source/rtl/gt_tpl/gt_tpl.c @@ -225,7 +225,7 @@ void hb_gt_SetCursorStyle( USHORT uiStyle ) } } -void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) +static void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %i)", uiRow, uiCol, (int) byAttr, byChar)); diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index 01c2beaa98..9f64ec715e 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -190,7 +190,9 @@ USHORT hb_gtBox( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, B } else hb_gt_HorizLine( uiTop, uiLeft, uiRight, szBox[ 1 ], ( BYTE ) s_pColor[ s_uiColorIndex ] ); + hb_gtSetPos( uiTop + 1, uiLeft + 1 ); + return 0; } else @@ -217,6 +219,7 @@ USHORT hb_gtBoxD( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight ) } else hb_gt_HorizLine( uiTop, uiLeft, uiRight, _B_DOUBLE_V, ( BYTE ) s_pColor[ s_uiColorIndex ] ); + hb_gtSetPos( uiTop + 1, uiLeft + 1 ); return 0; @@ -245,6 +248,7 @@ USHORT hb_gtBoxS( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight ) } else hb_gt_HorizLine( uiTop, uiLeft, uiRight, _B_SINGLE_H, ( BYTE ) s_pColor[ s_uiColorIndex ] ); + hb_gtSetPos( uiTop + 1, uiLeft + 1 ); return 0; @@ -695,11 +699,6 @@ USHORT hb_gtRectSize( USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRig return 0; } -/* NOTE: Above this buffer size the function will allocate dynamic memory and - will be slower. [vszakats] */ - -#define REPCHAR_BUFFER_SIZE 255 - USHORT hb_gtRepChar( USHORT uiRow, USHORT uiCol, BYTE byChar, USHORT uiCount ) { HB_TRACE(HB_TR_DEBUG, ("hb_gtRepChar(%hu, %hu, %d, %hu)", uiRow, uiCol, (int) byChar, uiCount)); diff --git a/harbour/source/rtl/gtcrs/gtcrs.c b/harbour/source/rtl/gtcrs/gtcrs.c index 367dcc30ab..9e98c9e1d0 100644 --- a/harbour/source/rtl/gtcrs/gtcrs.c +++ b/harbour/source/rtl/gtcrs/gtcrs.c @@ -474,7 +474,7 @@ void hb_gt_SetCursorStyle( USHORT uiStyle ) curs_set( 1 ); } -void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) +static void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %i)", uiRow, uiCol, (int) byAttr, byChar)); @@ -748,7 +748,7 @@ static void gt_SetRC(int r, int c) char * hb_gt_Version( void ) { - return "Harbour Terminal: ncurses (Linux console)"; + return "Harbour Terminal: ncurses"; } USHORT hb_gt_DispCount() diff --git a/harbour/source/rtl/gtdos/gtdos.c b/harbour/source/rtl/gtdos/gtdos.c index c4a59c9492..4e256702f4 100644 --- a/harbour/source/rtl/gtdos/gtdos.c +++ b/harbour/source/rtl/gtdos/gtdos.c @@ -606,7 +606,7 @@ static void hb_gt_xGetXY( USHORT cRow, USHORT cCol, BYTE * attr, BYTE * ch ) #endif } -void hb_gt_xPutch( USHORT cRow, USHORT cCol, BYTE attr, BYTE ch ) +static void hb_gt_xPutch( USHORT cRow, USHORT cCol, BYTE attr, BYTE ch ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %d", cRow, cCol, (int) attr, (int) ch)); diff --git a/harbour/source/rtl/gtos2/gtos2.c b/harbour/source/rtl/gtos2/gtos2.c index 1407a38818..3194a034bc 100644 --- a/harbour/source/rtl/gtos2/gtos2.c +++ b/harbour/source/rtl/gtos2/gtos2.c @@ -597,7 +597,7 @@ static void hb_gt_xGetXY( USHORT cRow, USHORT cCol, BYTE * attr, BYTE * ch ) } -void hb_gt_xPutch( USHORT cRow, USHORT cCol, BYTE attr, BYTE ch ) +static void hb_gt_xPutch( USHORT cRow, USHORT cCol, BYTE attr, BYTE ch ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %d", cRow, cCol, (int) attr, (int) ch)); diff --git a/harbour/source/rtl/gtpca/gtpca.c b/harbour/source/rtl/gtpca/gtpca.c index 087820039f..18ae712896 100644 --- a/harbour/source/rtl/gtpca/gtpca.c +++ b/harbour/source/rtl/gtpca/gtpca.c @@ -297,7 +297,7 @@ void hb_gt_SetCursorStyle( USHORT style ) HB_SYMBOL_UNUSED( style ); } -void hb_gt_xPutch( USHORT usRow, USHORT usCol, BYTE attr, BYTE byChar ) +static void hb_gt_xPutch( USHORT usRow, USHORT usCol, BYTE attr, BYTE byChar ) { char tmp[ 2 ]; HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %i)", usRow, usCol, (int) attr, byChar)); diff --git a/harbour/source/rtl/gtsln/gtsln.c b/harbour/source/rtl/gtsln/gtsln.c index b427de2781..66ec826ce7 100644 --- a/harbour/source/rtl/gtsln/gtsln.c +++ b/harbour/source/rtl/gtsln/gtsln.c @@ -228,7 +228,7 @@ void hb_gt_SetCursorStyle( USHORT uiStyle ) } } -void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) +static void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %i)", uiRow, uiCol, (int) byAttr, byChar)); { diff --git a/harbour/source/rtl/gtstd/gtstd.c b/harbour/source/rtl/gtstd/gtstd.c index d8cc624ae3..09e85fcd50 100644 --- a/harbour/source/rtl/gtstd/gtstd.c +++ b/harbour/source/rtl/gtstd/gtstd.c @@ -230,7 +230,7 @@ void hb_gt_SetCursorStyle( USHORT uiCursorStyle ) s_uiCursorStyle = uiCursorStyle; } -void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) +static void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE byAttr, BYTE byChar ) { HB_TRACE(HB_TR_DEBUG, ("hb_gt_xPutch(%hu, %hu, %d, %i)", uiRow, uiCol, (int) byAttr, byAttr)); diff --git a/harbour/source/rtl/gtwin/gtwin.c b/harbour/source/rtl/gtwin/gtwin.c index 73d3b1280c..88914ec30b 100644 --- a/harbour/source/rtl/gtwin/gtwin.c +++ b/harbour/source/rtl/gtwin/gtwin.c @@ -802,7 +802,7 @@ void hb_gt_SetCursorStyle( USHORT style ) SetConsoleCursorInfo( s_HActive, &cci ); } -void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE attr, BYTE byChar ) +static void hb_gt_xPutch( USHORT uiRow, USHORT uiCol, BYTE attr, BYTE byChar ) { DWORD dwWritten; COORD coord; diff --git a/harbour/source/vm/asort.c b/harbour/source/vm/asort.c index bc165bbbca..0fe43b8f76 100644 --- a/harbour/source/vm/asort.c +++ b/harbour/source/vm/asort.c @@ -68,7 +68,7 @@ static BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2 ) else { /* NOTE: For non-matching types CA-Cl*pper sorts always like this: - Array/Object Block String Date Numeric NIL [jlalin] */ + Array/Object Block String Logical Date Numeric NIL [jlalin] */ int iWeight1; int iWeight2; @@ -76,16 +76,18 @@ static BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2 ) if( HB_IS_ARRAY( pItem1 ) ) iWeight1 = 1; else if( HB_IS_BLOCK( pItem1 ) ) iWeight1 = 2; else if( HB_IS_STRING( pItem1 ) ) iWeight1 = 3; - else if( HB_IS_DATE( pItem1 ) ) iWeight1 = 4; - else if( HB_IS_NUMERIC( pItem1 ) ) iWeight1 = 5; - else iWeight1 = 6; + else if( HB_IS_LOGICAL( pItem1 ) ) iWeight1 = 4; + else if( HB_IS_DATE( pItem1 ) ) iWeight1 = 5; + else if( HB_IS_NUMERIC( pItem1 ) ) iWeight1 = 6; + else iWeight1 = 7; if( HB_IS_ARRAY( pItem2 ) ) iWeight2 = 1; else if( HB_IS_BLOCK( pItem2 ) ) iWeight2 = 2; else if( HB_IS_STRING( pItem2 ) ) iWeight2 = 3; - else if( HB_IS_DATE( pItem2 ) ) iWeight2 = 4; - else if( HB_IS_NUMERIC( pItem2 ) ) iWeight2 = 5; - else iWeight2 = 6; + else if( HB_IS_LOGICAL( pItem2 ) ) iWeight2 = 4; + else if( HB_IS_DATE( pItem2 ) ) iWeight2 = 5; + else if( HB_IS_NUMERIC( pItem2 ) ) iWeight2 = 6; + else iWeight2 = 7; return iWeight1 < iWeight2; } diff --git a/harbour/tests/Makefile b/harbour/tests/Makefile index 13aa99fbec..4c3947959c 100644 --- a/harbour/tests/Makefile +++ b/harbour/tests/Makefile @@ -127,6 +127,7 @@ PRG_SOURCES=\ test_all.prg \ testbrdb.prg \ testbrw.prg \ + testcdx.prg \ testcgi.prg \ testdbf.prg \ testerro.prg \ @@ -144,10 +145,12 @@ PRG_SOURCES=\ testvars.prg \ testwarn.prg \ tstalias.prg \ + tstasort.prg \ tstcolor.prg \ tstdbi.prg \ tstdspac.prg \ version.prg \ + vmasort.prg \ while.prg \ PRG_HEADERS=\ diff --git a/harbour/tests/testcdx.prg b/harbour/tests/testcdx.prg new file mode 100644 index 0000000000..903923420d --- /dev/null +++ b/harbour/tests/testcdx.prg @@ -0,0 +1,25 @@ +// +// $Id$ +// + +function Main() + + local aStruct := { { "CHARACTER", "C", 25, 0 }, ; + { "NUMERIC", "N", 8, 0 }, ; + { "DOUBLE", "N", 8, 2 }, ; + { "DATE", "D", 8, 0 }, ; + { "LOGICAL", "L", 1, 0 } } + + REQUEST DBFCDX + + rddSetDefault( "DBFCDX" ) + + FErase( "testcdx.cdx" ) +// dbCreate( "testcdx", aStruct, "DBFCDX" ) + dbUseArea( ,, "testcdx", "MYALIAS" ) + ordCreate( "testcdx", "1Tag ", "Character", { || Character }, .F. ) + ordCreate( "testcdx", "2Tag ", "Character", { || Character }, .F. ) +// ? MYALIAS->CHARACTER + +return nil + diff --git a/harbour/tests/tstasort.prg b/harbour/tests/tstasort.prg new file mode 100644 index 0000000000..521882caa9 --- /dev/null +++ b/harbour/tests/tstasort.prg @@ -0,0 +1,65 @@ +// +// $Id$ +// + +function main() + + local oError := ErrorNew() + + local a := { 3, 2, 1 } + local b := { 10 } + local c := { 2, .T., "B", NIL, { 1 }, {|| b }, oError, Date(), 1, .F., "A", NIL, Date() - 1, { 0 }, {|| a }, oError } + local t + + ? + ? + ? "Original.....:", aDump( t := a ) + ? "Asort.c......:", aDump( aSort( t := aClone( a ) ) ) + ? "Asort.c.block:", aDump( aSort( t := aClone( a ), , , {| x, y | x < y } ) ) + ? + ? "Original.....:", aDump( t := b ) + ? "Asort.c......:", aDump( aSort( t := aClone( b ) ) ) + ? "Asort.c.block:", aDump( aSort( t := aClone( b ), , , {| x, y | x < y } ) ) + ? + ? "Original.....:", aDump( t := c ) + ? "Asort.c......:", aDump( aSort( t := aClone( c ) ) ) + ? "Asort.c.block:", aDump( aSort( t := aClone( c ), , , {| x, y | x < y } ) ) + +return nil + +function aDump( a ) + + local cStr := "" + local n := len( a ) + local i + + for i := 1 to n + cStr += alltrim( xToStr( a[i] ) ) + " " + next + +return cStr + +function xToStr( xValue ) + + LOCAL cType := ValType( xValue ) + + do case + case cType == "C" .or. cType == "M" + return xValue + case cType == "N" + return AllTrim( Str( xValue ) ) + case cType == "D" + return DToC( xValue ) + case cType == "L" + return if( xValue, ".T.", ".F." ) + case cType == "U" + return "NIL" + case cType == "A" + return "{.}" + case cType == "B" + return "{|| }" + case cType == "O" + return "[O]" + endcase + +return xValue diff --git a/harbour/tests/vmasort.prg b/harbour/tests/vmasort.prg new file mode 100644 index 0000000000..d79a721d6a --- /dev/null +++ b/harbour/tests/vmasort.prg @@ -0,0 +1,85 @@ +// +// $Id$ +// + +function Main( nPass ) + + LOCAL aTest + LOCAL aOrig + + if nPass == NIL + nPass := 1 + else + nPass := Val( nPass ) + endif + + ? "Testing aSort with " + Str( nPass ) + " loops." + ? + aTest := aMkArray( nPass ) + aOrig := aClone( aTest ) + + set( _SET_DATEFORMAT, "mm/dd/yyyy" ) + + ? "Original.....:", aDump( aOrig ) + ? "Asort.c......:", aDump( aSort( aTest ) ) +// ? "Asort.c.block:", aDump( aSort( aTest, , , {| x, y | x < y } ) ) + +return nil + +static function aMkArray( nPass ) + + LOCAL aData := {} + LOCAL n + LOCAL nMult := 200 + LOCAL nMid := ( nMult / 2 ) + 1 + LOCAL nMax := nPass * nMult + + for n := 1 to nMax + aAdd( aData, NIL ) + aAdd( aData, nMid - n ) + aAdd( aData, Date() - n ) + aAdd( aData, if( n % 2 == 0, .f., .t. ) ) + aAdd( aData, Replicate( Chr( 64 + ( n % 256 ) ) , nPass ) ) + aAdd( aData, {|| n } ) + aAdd( aData, Array( n ) ) + aAdd( aData, ErrorNew() ) + next + +return aData + +function aDump( a ) + + local cStr := "" + local n := len( a ) + local i + + for i := 1 to n + cStr += alltrim( xToStr( a[i] ) ) + " " + next + +return cStr + +function xToStr( xValue ) + + LOCAL cType := ValType( xValue ) + + do case + case cType == "C" .or. cType == "M" + return xValue + case cType == "N" + return AllTrim( Str( xValue ) ) + case cType == "D" + return DToC( xValue ) + case cType == "L" + return if( xValue, ".T.", ".F." ) + case cType == "U" + return "NIL" + case cType == "A" + return "{.}" + case cType == "B" + return "{|| }" + case cType == "O" + return "[O]" + endcase + +return xValue