From 40025c2fe83fb4cc3c7b26cc69ca099256c605d5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 14 Apr 2000 20:01:22 +0000 Subject: [PATCH] 20000414-22:03 GMT+1 Victor Szakats --- harbour/ChangeLog | 70 ++++++ harbour/bin/bld.bat | 22 +- harbour/bin/bld.cmd | 22 +- harbour/bin/bld.sh | 22 +- harbour/bin/bld_b16.bat | 1 + harbour/bin/bld_b32.bat | 2 +- harbour/bin/bld_b32o.bat | 2 +- harbour/bin/bld_b32w.bat | 2 +- harbour/bin/bld_vc.bat | 2 +- harbour/include/hbapi.h | 1 - harbour/include/hbapilng.h | 78 ++---- harbour/include/hbdate.h | 4 - harbour/include/hbextern.ch | 2 + harbour/include/hbsetup.ch | 7 + harbour/include/hbsetup.h | 9 - harbour/make_gnu.bat | 2 +- harbour/make_gnu.cmd | 2 +- harbour/make_gnu.sh | 2 +- harbour/makefile.bc | 43 +++- harbour/makefile.vc | 23 +- harbour/samples/guestbk/Makefile | 1 + harbour/samples/guestbk/bld_b32.bat | 1 + harbour/samples/hscript/Makefile | 1 + harbour/samples/hscript/bld_b32.bat | 2 +- harbour/samples/misc/Makefile | 1 + harbour/samples/pe/Makefile | 1 + harbour/source/Makefile | 3 +- harbour/source/lang/msg_tpl.c | 173 +++++++++++++ harbour/source/{rtl/natmsg => lang}/msgca.c | 0 .../source/{rtl/natmsg => lang}/msgcs852.c | 0 .../source/{rtl/natmsg => lang}/msgcskam.c | 0 harbour/source/{rtl/natmsg => lang}/msgde.c | 0 harbour/source/lang/msgen.c | 173 +++++++++++++ harbour/source/{rtl/natmsg => lang}/msgeo.c | 0 harbour/source/{rtl/natmsg => lang}/msges.c | 0 harbour/source/{rtl/natmsg => lang}/msgeu.c | 0 harbour/source/{rtl/natmsg => lang}/msgfr.c | 0 harbour/source/{rtl/natmsg => lang}/msggl.c | 0 .../source/{rtl/natmsg => lang}/msghe862.c | 0 .../source/{rtl/natmsg => lang}/msghewin.c | 0 harbour/source/lang/msghu852.c | 173 +++++++++++++ harbour/source/lang/msghucwi.c | 173 +++++++++++++ harbour/source/lang/msghuwin.c | 173 +++++++++++++ harbour/source/{rtl/natmsg => lang}/msgid.c | 0 harbour/source/{rtl/natmsg => lang}/msgit.c | 0 harbour/source/{rtl/natmsg => lang}/msgko.c | 0 harbour/source/{rtl/natmsg => lang}/msgnl.c | 0 .../source/{rtl/natmsg => lang}/msgpl852.c | 0 .../source/{rtl/natmsg => lang}/msgpliso.c | 0 .../source/{rtl/natmsg => lang}/msgplmaz.c | 0 harbour/source/{rtl/natmsg => lang}/msgpt.c | 0 .../source/{rtl/natmsg => lang}/msgru866.c | 0 .../source/{rtl/natmsg => lang}/msgruwin.c | 0 .../source/{rtl/natmsg => lang}/msgsr852.c | 0 .../source/{rtl/natmsg => lang}/msgzhbig.c | 0 harbour/source/{rtl/natmsg => lang}/msgzhgb.c | 0 harbour/source/rtl/Makefile | 2 - harbour/source/rtl/datec.c | 5 +- harbour/source/rtl/errorapi.c | 6 +- harbour/source/rtl/langapi.c | 228 ++++++++---------- harbour/source/rtl/natmsg.c | 25 +- harbour/source/rtl/natmsg/msg_tpl.c | 92 ------- harbour/source/rtl/natmsg/msgen.c | 92 ------- harbour/source/rtl/natmsg/msghu852.c | 92 ------- harbour/source/rtl/natmsg/msghucwi.c | 92 ------- harbour/source/rtl/natmsg/msghuwin.c | 92 ------- harbour/source/rtl/run.c | 3 + harbour/source/tools/dates2.c | 5 +- harbour/source/vm/harbinit.prg | 7 + harbour/tests/Makefile | 1 + harbour/utils/hbdoc/Makefile | 1 + harbour/utils/hbextern/Makefile | 1 + harbour/utils/hbrun/Makefile | 1 + harbour/utils/hbtest/Makefile | 1 + harbour/utils/hbtest/hbtest.prg | 11 +- 75 files changed, 1205 insertions(+), 745 deletions(-) create mode 100644 harbour/source/lang/msg_tpl.c rename harbour/source/{rtl/natmsg => lang}/msgca.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgcs852.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgcskam.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgde.c (100%) create mode 100644 harbour/source/lang/msgen.c rename harbour/source/{rtl/natmsg => lang}/msgeo.c (100%) rename harbour/source/{rtl/natmsg => lang}/msges.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgeu.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgfr.c (100%) rename harbour/source/{rtl/natmsg => lang}/msggl.c (100%) rename harbour/source/{rtl/natmsg => lang}/msghe862.c (100%) rename harbour/source/{rtl/natmsg => lang}/msghewin.c (100%) create mode 100644 harbour/source/lang/msghu852.c create mode 100644 harbour/source/lang/msghucwi.c create mode 100644 harbour/source/lang/msghuwin.c rename harbour/source/{rtl/natmsg => lang}/msgid.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgit.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgko.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgnl.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgpl852.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgpliso.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgplmaz.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgpt.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgru866.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgruwin.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgsr852.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgzhbig.c (100%) rename harbour/source/{rtl/natmsg => lang}/msgzhgb.c (100%) delete mode 100644 harbour/source/rtl/natmsg/msg_tpl.c delete mode 100644 harbour/source/rtl/natmsg/msgen.c delete mode 100644 harbour/source/rtl/natmsg/msghu852.c delete mode 100644 harbour/source/rtl/natmsg/msghucwi.c delete mode 100644 harbour/source/rtl/natmsg/msghuwin.c diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f6e8689c76..4ce31eaf3b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,73 @@ +20000414-22:03 GMT+1 Victor Szakats + + * make_gnu.* + + make output redirected to make_gnu.log by default. + + * include/hbapilng.h + * include/hbsetup.ch + * include/hbsetup.h + * include/hbextern.ch + * include/hbdate.h + * utils/hbtest/hbtest.prg + * source/tools/dates.c + * source/vm/harbinit.prg + * source/rtl/datec.c + * source/rtl/natmsg.c + * source/rtl/langapi.c + * source/rtl/Makefile + * source/rtl/errorsys.c + - source/rtl/natmsg/* + + source/lang/msg_tpl.c + + source/lang/msgen.c + + source/lang/msghu852.c + + source/lang/msg*.c + - source/rtl/msgxxx.c + * source/Makefile + * makefile.bc + * makefile.vc + * bin/bld*.* + * tests/Makefile + * samples/guestbk/makefile + * samples/guestbk/bld_b32.bat + * samples/hscript/makefile + * samples/hscript/bld_b32.bat + * samples/misc/makefile + * samples/pe/makefile + * utils/hbdoc/makefile + * utils/hbextern/makefile + * utils/hbrun/makefile + * utils/hbtest/makefile + ! runner lib removed from the GNU-make system + + New dynamic Language API added. Runtime selection of language, compile + time selection of the default language, multiple language support in + the same executable. + + NATMSG API now uses the Language API. + + HBTEST is now setting the language to EN before doing the tests. + * English and Hungarian 852 message modules converted to the new format, + and added to the makefiles. + + ; ! WARNING ! Please convert your language to the new format. Follow + MSG_TPL.C as a template. There are also some new items which should + be translated or adapted to your language. + (Don't forget to add a comma after each string item) + + ; Use -DHB_LANG_DEFAULT= (for example -DHB_LANG_DEFAULT=EN) + to specify the default language for your build. + + ; Use REQUEST HB_LANG_ to request the linkage of additional + language modules. + + ; Use hb_langSelect( "" ) to change the language at runtime. + + ; TODO: Startup code for MSC8 in language modules. + ; TODO: Convert the rest of the language modules to the new format. + + * source/rtl/run.c + ! TOFIX added. + + * include/hbapi.h + % Removed #include "hbdefs.h", because it was also included by hbvmpub.h. + 20000413-19:30 GMT-8 Ron Pinkas * source/compiler/hvm.c diff --git a/harbour/bin/bld.bat b/harbour/bin/bld.bat index 424df54077..742d6dbd61 100644 --- a/harbour/bin/bld.bat +++ b/harbour/bin/bld.bat @@ -107,9 +107,9 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtdos - if "%HB_COMPILER%" == "bcc16" bcc -O2 -mh -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %HB_GT_LIB%.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib - if "%HB_COMPILER%" == "djgpp" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfnt -ldbfcd -lcommo - if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "bcc16" bcc -O2 -mh -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%" == "djgpp" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfnt -ldbfcd -lcommo + if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 -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 @@ -118,11 +118,11 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtwin - if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %HB_GT_LIB%.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib - if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -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\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 -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 -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 -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 -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 -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 @@ -132,8 +132,8 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtos2 - if "%HB_COMPILER%" == "gcc" gcc %1.c -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp %1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%HB_GT_LIB%.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 -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+ -I..\include /C- /Tp %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 @@ -142,7 +142,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtstd - if "%HB_COMPILER%" == "gcc" gcc %1.c -I../include -L../lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "gcc" gcc %1.c -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 086f8cc5b4..2c2a54b4fc 100644 --- a/harbour/bin/bld.cmd +++ b/harbour/bin/bld.cmd @@ -107,9 +107,9 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtdos - if "%HB_COMPILER%" == "bcc16" bcc -O2 -mh -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %HB_GT_LIB%.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib - if "%HB_COMPILER%" == "djgpp" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfnt -ldbfcd -lcommo - if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "bcc16" bcc -O2 -mh -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%" == "djgpp" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfnt -ldbfcd -lcommo + if "%HB_COMPILER%" == "rsx32" gcc %1.c -Zrsx32 -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 @@ -118,11 +118,11 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtwin - if "%HB_COMPILER%" == "bcc32" bcc32 -O2 -I..\include -L..\lib %1.c tools.lib debug.lib vm.lib rtl.lib %HB_GT_LIB%.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib - if "%HB_COMPILER%" == "gcc" gcc %1.c -o%1.exe -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "mingw32" gcc %1.c -o%1.exe -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "rsxnt" gcc %1.c -Zwin32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -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\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 -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 -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 -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 -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 -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 @@ -132,8 +132,8 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtos2 - if "%HB_COMPILER%" == "gcc" gcc %1.c -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon - if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp %1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\%HB_GT_LIB%.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 -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+ -I..\include /C- /Tp %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 @@ -142,7 +142,7 @@ rem if "%HB_GT_LIB%" == "" set HB_GT_LIB= if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtstd - if "%HB_COMPILER%" == "gcc" gcc %1.c -I../include -L../lib -ltools -ldebug -lvm -lrtl -l%HB_GT_LIB% -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + if "%HB_COMPILER%" == "gcc" gcc %1.c -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 5b56a3aa2a..ee2f1812e9 100644 --- a/harbour/bin/bld.sh +++ b/harbour/bin/bld.sh @@ -86,11 +86,11 @@ else if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtdos; fi if [ "$HB_COMPILER" == "bcc16" ]; then - bcc -O2 -mh -I..\include -L..\lib $1.c tools.lib debug.lib vm.lib rtl.lib $HB_GT_LIB.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib + bcc -O2 -mh -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 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfnt -ldbfcd -lcommo + gcc $1.c -o$1.exe -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 - gcc $1.c -Zrsx32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + gcc $1.c -Zrsx32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon else echo Error: HB_COMPILER value is unsupported. fi @@ -100,15 +100,15 @@ else if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtwin; fi if [ "$HB_COMPILER" == "bcc32" ]; then - bcc32 -O2 -I..\include -L..\lib $1.c tools.lib debug.lib vm.lib rtl.lib $HB_GT_LIB.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib + bcc32 -O2 -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 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + gcc $1.c -o$1.exe -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 - gcc $1.c -o$1.exe -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + gcc $1.c -o$1.exe -mno-cygwin -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon elif [ "$HB_COMPILER" == "rsxnt" ]; then - gcc $1.c -Zwin32 -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + gcc $1.c -Zwin32 -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 -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\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx. + cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -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. echo Ignore LNK4033 warning else echo Error: HB_COMPILER value is unsupported. @@ -119,9 +119,9 @@ else if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtos2; fi if [ "$HB_COMPILER" == "gcc" ]; then - gcc $1.c -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + gcc $1.c -I..\include -L..\lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon elif [ "$HB_COMPILER" == "icc" ]; then - icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp $1.c ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\$HB_GT_LIB.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\vm.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.l + icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp $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.l else echo Error: HB_COMPILER value is unsupported. fi @@ -131,7 +131,7 @@ else if [ -z "$HB_GT_LIB" ]; then export HB_GT_LIB=gtstd; fi if [ "$HB_COMPILER" == "gcc" ]; then - gcc $1.c -I../include -L../lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon + gcc $1.c -I../include -L../lib -ltools -ldebug -lvm -lrtl -l$HB_GT_LIB -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbfntx -ldbfcdx -lcommon else echo Error: HB_COMPILER value is unsupported. fi diff --git a/harbour/bin/bld_b16.bat b/harbour/bin/bld_b16.bat index b4488e5663..74836a9514 100644 --- a/harbour/bin/bld_b16.bat +++ b/harbour/bin/bld_b16.bat @@ -11,6 +11,7 @@ echo debug.lib >> build.tmp echo vm.lib >> build.tmp echo rtl.lib >> build.tmp echo gtdos.lib >> build.tmp +echo lang.lib >> build.tmp echo rdd.lib >> build.tmp echo macro.lib >> build.tmp echo pp.lib >> build.tmp diff --git a/harbour/bin/bld_b32.bat b/harbour/bin/bld_b32.bat index 5f5069adf0..9fb34e8834 100644 --- a/harbour/bin/bld_b32.bat +++ b/harbour/bin/bld_b32.bat @@ -4,6 +4,6 @@ rem $Id$ rem ..\bin\harbour %1 %2 %3 /n /i..\include -bcc32 -O2 -I..\include -L..\lib -e%1.exe %1.c tools.lib debug.lib vm.lib rtl.lib gtwin.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib +bcc32 -O2 -I..\include -L..\lib -e%1.exe %1.c tools.lib debug.lib vm.lib rtl.lib gtwin.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib rem del %1.c diff --git a/harbour/bin/bld_b32o.bat b/harbour/bin/bld_b32o.bat index afb033bd08..2b64e3d016 100644 --- a/harbour/bin/bld_b32o.bat +++ b/harbour/bin/bld_b32o.bat @@ -6,6 +6,6 @@ rem rem NOTE: Experimental ..\bin\harbour %1 %2 %3 /n /i..\include /gf -tlink32 -L..\lib c0x32.obj %1.obj hvm.obj,%1.exe,, import32.lib cw32mt.lib tools.lib debug.lib vm.lib rtl.lib gtwin.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib +tlink32 -L..\lib c0x32.obj %1.obj hvm.obj,%1.exe,, import32.lib cw32mt.lib tools.lib debug.lib vm.lib rtl.lib gtwin.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib del %1.obj diff --git a/harbour/bin/bld_b32w.bat b/harbour/bin/bld_b32w.bat index 5358d1a70d..d9f46d21ca 100644 --- a/harbour/bin/bld_b32w.bat +++ b/harbour/bin/bld_b32w.bat @@ -4,6 +4,6 @@ rem $Id$ rem ..\bin\harbour %1 %2 %3 /n /i..\include -bcc32 -O2 -tW -I..\include -L..\lib -e%1.exe %1.c tools.lib debug.lib vm.lib rtl.lib gtwin.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib +bcc32 -O2 -tW -I..\include -L..\lib -e%1.exe %1.c tools.lib debug.lib vm.lib rtl.lib gtwin.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib rem del %1.c diff --git a/harbour/bin/bld_vc.bat b/harbour/bin/bld_vc.bat index b5a3fe56f1..a4dc177607 100644 --- a/harbour/bin/bld_vc.bat +++ b/harbour/bin/bld_vc.bat @@ -4,6 +4,6 @@ rem $Id$ rem ..\bin\harbour %1 %2 %3 /n /i..\include -cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\gtwin.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib +cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -I..\include %1.c /link /subsystem:CONSOLE ..\lib\tools.lib ..\lib\debug.lib ..\lib\vm.lib ..\lib\rtl.lib ..\lib\gtwin.lib ..\lib\lang.lib ..\lib\rdd.lib ..\lib\macro.lib ..\lib\pp.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\common.lib user32.lib rem del %1.c diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 649836c47b..c4be44ed9c 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -41,7 +41,6 @@ #ifndef HB_APIEXT_H_ #define HB_APIEXT_H_ -#include "hbdefs.h" #include "hbvmpub.h" #if defined(HB_EXTERN_C) diff --git a/harbour/include/hbapilng.h b/harbour/include/hbapilng.h index a66de1e064..12aaba0700 100644 --- a/harbour/include/hbapilng.h +++ b/harbour/include/hbapilng.h @@ -36,81 +36,51 @@ #ifndef HB_APILNG_H_ #define HB_APILNG_H_ -#include "hbsetup.h" +#include "hbdefs.h" +#include "hbvmpub.h" +#include "hbinit.h" #if defined(HB_EXTERN_C) extern "C" { #endif -#define HB_LANG_TEXT_DATEFMT 0 -#define HB_LANG_TEXT_YESCHAR 1 -#define HB_LANG_TEXT_NOCHAR 2 -#define HB_LANG_TEXT_MAX_ 3 +/* Macro to publish a specific language module, for both C and Harbour level */ +#define HB_LANG_ANNOUNCE( id ) HB_FUNC( HB_LANG_##id ) {} -#define HB_LANG_ED_MAX_ 51 -#define HB_LANG_EI_MAX_ 6 +/* Base values for the unified language item table */ +#define HB_LANG_ITEM_BASE_ID 0 +#define HB_LANG_ITEM_BASE_MONTH 6 +#define HB_LANG_ITEM_BASE_DAY 18 +#define HB_LANG_ITEM_BASE_NATMSG 25 +#define HB_LANG_ITEM_BASE_ERRDESC 38 +#define HB_LANG_ITEM_BASE_ERRINTR 89 +#define HB_LANG_ITEM_BASE_TEXT 95 +#define HB_LANG_ITEM_MAX_ 98 -/* ; */ - -typedef struct +typedef struct _HB_LANG { - BYTE nWeight; - BYTE nFlags; -} HB_LANGCHAR; - -typedef struct -{ - char * szName; - char * szID; - char * szCodepage; - char * szTextList [ HB_LANG_TEXT_MAX_ ]; - char * szMonthNameList [ 12 ]; - char * szDayNameList [ 7 ]; - char * szErrorDescList [ HB_LANG_ED_MAX_ ]; - char * szErrorIntrList [ HB_LANG_EI_MAX_ ]; - HB_LANGCHAR * langcharList [ 256 ]; + void * pItemList[ HB_LANG_ITEM_MAX_ ]; } HB_LANG, * PHB_LANG, * HB_LANG_PTR; -typedef struct _HB_LANGNODE -{ - PHB_LANG pLang; - struct _HB_LANGNODE * pNext; -} HB_LANGNODE, * PHB_LANGNODE; - -/* TODO: check if it have to be visible outside of langapi.c - * It it is required then there is a conflict: - * it is declared here as 'extern' and in langapi.c it is declared as - * 'static' - Watcom compiler reports error for this conflict - */ -/* extern PHB_LANG langDef; */ -extern PHB_LANGNODE langList; - /* Supported language list management */ -extern void hb_langListAdd ( PHB_LANG lang ); -extern PHB_LANG hb_langListFind ( char * szName ); -extern void hb_langListRelease ( void ); +extern BOOL hb_langRegister ( PHB_LANG lang ); +extern BOOL hb_langDeRegister ( char * pszID ); +extern PHB_LANG hb_langFind ( char * pszID ); /* Default language selection and data query */ -extern void hb_langDSet ( PHB_LANG lang ); -extern PHB_LANG hb_langDGet ( void ); +extern PHB_LANG hb_langSelect ( PHB_LANG lang ); +extern void * hb_langDGetItem ( int iIndex ); + +/* Compatibility interface */ -extern char * hb_langDGetName ( void ); -extern char * hb_langDGetID ( void ); -extern char * hb_langDGetText ( ULONG ulIndex ); -extern char * hb_langDGetDayName ( ULONG ulIndex ); -extern char * hb_langDGetMonthName ( ULONG ulIndex ); extern char * hb_langDGetErrorDesc ( ULONG ulIndex ); extern char * hb_langDGetErrorIntr ( ULONG ulIndex ); -/* Single language */ - -extern PHB_LANG hb_langNew ( void ); -extern void hb_langDelete ( PHB_LANG lang ); - #if defined(HB_EXTERN_C) } #endif #endif /* HB_APILNG_H_ */ + diff --git a/harbour/include/hbdate.h b/harbour/include/hbdate.h index 6b117902bd..fe15091f2a 100644 --- a/harbour/include/hbdate.h +++ b/harbour/include/hbdate.h @@ -42,10 +42,6 @@ extern "C" { #endif -/* In msgxxx.c modules */ -extern char * hb_dateMonthsName []; -extern char * hb_dateDaysName []; - extern double hb_dateSeconds( void ); extern char * hb_dateCMonth( int iMonth ); extern char * hb_dateCDOW( int iDay ); diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index 821701f102..3bb0e88dcb 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -892,4 +892,6 @@ EXTERNAL HB_FTEMPCREATE EXTERNAL __HRBRUN +EXTERNAL HB_LANGSELECT + #endif /* HB_EXTERN_CH_ */ diff --git a/harbour/include/hbsetup.ch b/harbour/include/hbsetup.ch index ecb75e0f15..0311309699 100644 --- a/harbour/include/hbsetup.ch +++ b/harbour/include/hbsetup.ch @@ -38,6 +38,13 @@ #ifndef HB_SETUP_CH_ #define HB_SETUP_CH_ +/* NOTE: You can select the default language modul used by Harbour, by + defining this to a valid language modul identifier. */ + +#ifndef HB_LANG_DEFAULT + #define HB_LANG_DEFAULT EN +#endif + /* NOTE: You can select here, which features you to include of the different Clipper implementations. */ diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 4a9f7498b8..e8aaa913d5 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -95,15 +95,6 @@ */ #define HB_FM_STATISTICS -/* *********************************************************************** - * This symbol defines which national language module should be included - * in the Harbour run time library. See source/rtl/msgxxx for all allowed - * values for in this manifest constant. - * - * By default it is disabled (symbol is not defined), which selects UK -*/ -/*#define HARBOUR_LANGUAGE_*/ - /* *********************************************************************** * This symbol defines if we want an ability to create and link OBJ files * generated by Harbour compiler diff --git a/harbour/make_gnu.bat b/harbour/make_gnu.bat index c849f7889a..3a568519f1 100644 --- a/harbour/make_gnu.bat +++ b/harbour/make_gnu.bat @@ -111,7 +111,7 @@ set HB_INC_INSTALL=include\ rem --------------------------------------------------------------- rem Start the GNU make system - make %1 %2 %3 %4 %5 %6 %7 %8 %9 + make %1 %2 %3 %4 %5 %6 %7 %8 %9 > make_gnu.log goto END :END diff --git a/harbour/make_gnu.cmd b/harbour/make_gnu.cmd index 04deb3c2a1..2eb51971f0 100644 --- a/harbour/make_gnu.cmd +++ b/harbour/make_gnu.cmd @@ -111,7 +111,7 @@ set HB_INC_INSTALL=include\ rem --------------------------------------------------------------- rem Start the GNU make system - make %1 %2 %3 %4 %5 %6 %7 %8 %9 + make %1 %2 %3 %4 %5 %6 %7 %8 %9 > make_gnu.log goto END :END diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index cb4bab4761..a02a4ef5e7 100644 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -101,6 +101,6 @@ else # --------------------------------------------------------------- # Start the GNU make system - make $* + make $* > make_gnu.log fi diff --git a/harbour/makefile.bc b/harbour/makefile.bc index cd2ef14f98..42111ddffa 100644 --- a/harbour/makefile.bc +++ b/harbour/makefile.bc @@ -66,6 +66,7 @@ INCLUDE_DIR = include COMMON_DIR = source\common COMPILER_DIR = source\compiler DEBUG_DIR = source\debug +LANG_DIR = source\lang MACRO_DIR = source\macro PP_DIR = source\pp RDD_DIR = source\rdd @@ -94,6 +95,7 @@ COMMON_LIB = $(LIB_DIR)\common.lib DBFCDX_LIB = $(LIB_DIR)\dbfcdx.lib DBFNTX_LIB = $(LIB_DIR)\dbfntx.lib DEBUG_LIB = $(LIB_DIR)\debug.lib +LANG_LIB = $(LIB_DIR)\lang.lib MACRO_LIB = $(LIB_DIR)\macro.lib NULSYS_LIB = $(LIB_DIR)\nulsys.lib PP_LIB = $(LIB_DIR)\pp.lib @@ -253,8 +255,6 @@ RTL_LIB_OBJS = \ $(OBJ_DIR)\word.obj \ $(OBJ_DIR)\xhelp.obj \ \ - $(OBJ_DIR)\msgxxx.obj \ - \ $(OBJ_DIR)\achoice.obj \ $(OBJ_DIR)\adir.obj \ $(OBJ_DIR)\alert.obj \ @@ -292,6 +292,16 @@ RTL_LIB_OBJS = \ $(OBJ_DIR)\wait.obj \ $(OBJ_DIR)\xsavescr.obj +# +# LANG.LIB rules +# + +LANG_LIB_OBJS = \ + $(OBJ_DIR)\msgen.obj \ + $(OBJ_DIR)\msghu852.obj \ + $(OBJ_DIR)\msghucwi.obj \ + $(OBJ_DIR)\msghuwin.obj + # # TOOLS.LIB rules # @@ -559,6 +569,7 @@ all: \ $(TOOLS_LIB) \ $(MACRO_LIB) \ $(DEBUG_LIB) \ + $(LANG_LIB) \ $(RDD_LIB) \ $(NULSYS_LIB) \ $(DBFNTX_LIB) \ @@ -577,6 +588,7 @@ $(COMMON_LIB) : $(COMMON_LIB_OBJS) $(DBFCDX_LIB) : $(DBFCDX_LIB_OBJS) $(DBFNTX_LIB) : $(DBFNTX_LIB_OBJS) $(DEBUG_LIB) : $(DEBUG_LIB_OBJS) +$(LANG_LIB) : $(LANG_LIB_OBJS) $(MACRO_LIB) : $(MACRO_LIB_OBJS) $(NULSYS_LIB) : $(NULSYS_LIB_OBJS) $(PP_LIB) : $(PP_LIB_OBJS) @@ -1244,10 +1256,6 @@ $(OBJ_DIR)\mousex.obj : $(RTL_DIR)\mousex.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(RTL_LIB) $(ARFLAGS) -+$@,, -$(OBJ_DIR)\msgxxx.obj : $(RTL_DIR)\msgxxx.c - $(CC) $(CLIBFLAGS) -I$(RTL_DIR) -o$@ $** - tlib $(RTL_LIB) $(ARFLAGS) -+$@,, - $(OBJ_DIR)\mtran.obj : $(RTL_DIR)\mtran.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(RTL_LIB) $(ARFLAGS) -+$@,, @@ -1570,6 +1578,26 @@ $(OBJ_DIR)\xsavescr.obj : $(OBJ_DIR)\xsavescr.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(RTL_LIB) $(ARFLAGS) -+$@,, +# +# LANG.LIB dependencies +# + +$(OBJ_DIR)\msgen.obj : $(LANG_DIR)\msgen.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) -+$@,, + +$(OBJ_DIR)\msghucwi.obj : $(LANG_DIR)\msghucwi.c + $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** + tlib $(LANG_LIB) $(ARFLAGS) -+$@,, + +$(OBJ_DIR)\msghuwin.obj : $(LANG_DIR)\msghuwin.c + $(CC) $(CLIBFLAGS) -I$(LANG_DIR) -o$@ $** + tlib $(LANG_LIB) $(ARFLAGS) -+$@,, + # # TOOLS.LIB dependencies # @@ -1927,6 +1955,7 @@ $(HBRUN_EXE) : $(HBRUN_EXE_OBJS) echo. $(VM_LIB) >> make.tmp echo. $(RTL_LIB) >> make.tmp echo. $(HB_GT_LIB) >> make.tmp + echo. $(LANG_LIB) >> make.tmp echo. $(RDD_LIB) >> make.tmp echo. $(MACRO_LIB) >> make.tmp echo. $(TOOLS_LIB) >> make.tmp @@ -1971,6 +2000,7 @@ $(HBTEST_EXE) : $(HBTEST_EXE_OBJS) echo. $(VM_LIB) >> make.tmp echo. $(RTL_LIB) >> make.tmp echo. $(HB_GT_LIB) >> make.tmp + echo. $(LANG_LIB) >> make.tmp echo. $(RDD_LIB) >> make.tmp echo. $(MACRO_LIB) >> make.tmp echo. $(DBFNTX_LIB) >> make.tmp @@ -2073,6 +2103,7 @@ $(HBDOC_EXE) : $(HBDOC_EXE_OBJS) echo. $(VM_LIB) >> make.tmp echo. $(RTL_LIB) >> make.tmp echo. $(HB_GT_LIB) >> make.tmp + echo. $(LANG_LIB) >> make.tmp echo. $(RDD_LIB) >> make.tmp echo. $(MACRO_LIB) >> make.tmp echo. $(TOOLS_LIB) >> make.tmp diff --git a/harbour/makefile.vc b/harbour/makefile.vc index a1c309a059..e3bb44282b 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -64,6 +64,7 @@ INCLUDE_DIR = include COMMON_DIR = source\common COMPILER_DIR = source\compiler DEBUG_DIR = source\debug +LANG_DIR = source\lang MACRO_DIR = source\macro PP_DIR = source\pp RDD_DIR = source\rdd @@ -93,6 +94,7 @@ COMMON_LIB = $(LIB_DIR)\common.lib DBFCDX_LIB = $(LIB_DIR)\dbfcdx.lib DBFNTX_LIB = $(LIB_DIR)\dbfntx.lib DEBUG_LIB = $(LIB_DIR)\debug.lib +LANG_LIB = $(LIB_DIR)\lang.lib MACRO_LIB = $(LIB_DIR)\macro.lib NULSYS_LIB = $(LIB_DIR)\nulsys.lib PP_LIB = $(LIB_DIR)\pp.lib @@ -138,6 +140,7 @@ LIBLIST = \ $(DEBUG_LIB) \ $(MACRO_LIB) \ $(PP_LIB) \ + $(LANG_LIB) \ $(RDD_LIB) \ $(DBFCDX_LIB) \ $(DBFNTX_LIB) \ @@ -288,8 +291,6 @@ RTL_LIB_OBJS = \ $(OBJ_DIR)\word.obj \ $(OBJ_DIR)\xhelp.obj \ \ - $(OBJ_DIR)\msgxxx.obj \ - \ $(OBJ_DIR)\achoice.obj \ $(OBJ_DIR)\adir.obj \ $(OBJ_DIR)\alert.obj \ @@ -327,6 +328,19 @@ RTL_LIB_OBJS = \ $(OBJ_DIR)\wait.obj \ $(OBJ_DIR)\xsavescr.obj +# +# LANG.LIB rules +# + +{$(LANG_DIR)}.c{$(OBJ_DIR)}.obj:: + $(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $< + +LANG_LIB_OBJS = \ + $(OBJ_DIR)\msgen.obj \ + $(OBJ_DIR)\msghu852.obj \ + $(OBJ_DIR)\msghucwi.obj \ + $(OBJ_DIR)\msghuwin.obj + # # TOOLS.LIB rules # @@ -603,6 +617,7 @@ all: zot \ $(TOOLS_LIB) \ $(MACRO_LIB) \ $(DEBUG_LIB) \ + $(LANG_LIB) \ $(RDD_LIB) \ $(NULSYS_LIB) \ $(DBFNTX_LIB) \ @@ -635,6 +650,7 @@ all: \ $(TOOLS_LIB) \ $(MACRO_LIB) \ $(DEBUG_LIB) \ + $(LANG_LIB) \ $(RDD_LIB) \ $(NULSYS_LIB) \ $(DBFNTX_LIB) \ @@ -752,6 +768,9 @@ $(MACRO_LIB) : $(MACRO_LIB_OBJS) $(PP_LIB) : $(PP_LIB_OBJS) lib /out:$@ $** +$(LANG_LIB) : $(LANG_LIB_OBJS) + lib /out:$@ $** + $(RDD_LIB) : $(RDD_LIB_OBJS) lib /out:$@ $** diff --git a/harbour/samples/guestbk/Makefile b/harbour/samples/guestbk/Makefile index 52ee4869fd..a4883d51ca 100644 --- a/harbour/samples/guestbk/Makefile +++ b/harbour/samples/guestbk/Makefile @@ -15,6 +15,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/samples/guestbk/bld_b32.bat b/harbour/samples/guestbk/bld_b32.bat index 1ed549a385..8c63568b94 100644 --- a/harbour/samples/guestbk/bld_b32.bat +++ b/harbour/samples/guestbk/bld_b32.bat @@ -14,6 +14,7 @@ echo debug.lib >> build.tmp echo vm.lib >> build.tmp echo rtl.lib >> build.tmp echo gtwin.lib >> build.tmp +echo lang.lib >> build.tmp echo rdd.lib >> build.tmp echo macro.lib >> build.tmp echo pp.lib >> build.tmp diff --git a/harbour/samples/hscript/Makefile b/harbour/samples/hscript/Makefile index 8697cd9132..af6b84ea58 100644 --- a/harbour/samples/hscript/Makefile +++ b/harbour/samples/hscript/Makefile @@ -13,6 +13,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/samples/hscript/bld_b32.bat b/harbour/samples/hscript/bld_b32.bat index 0808fab332..c53f7e35b3 100644 --- a/harbour/samples/hscript/bld_b32.bat +++ b/harbour/samples/hscript/bld_b32.bat @@ -4,5 +4,5 @@ rem $Id$ rem ..\..\bin\harbour hscript /n /i..\..\include -bcc32 -O2 -I..\..\include -L..\..\lib -ehscript.exe hscript.c debug.lib vm.lib rtl.lib gtwin.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib +bcc32 -O2 -I..\..\include -L..\..\lib -ehscript.exe hscript.c debug.lib vm.lib rtl.lib gtwin.lib lang.lib rdd.lib macro.lib pp.lib dbfntx.lib dbfcdx.lib common.lib rem del hscript.c diff --git a/harbour/samples/misc/Makefile b/harbour/samples/misc/Makefile index e26b687dac..702cd7cd54 100644 --- a/harbour/samples/misc/Makefile +++ b/harbour/samples/misc/Makefile @@ -8,6 +8,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/samples/pe/Makefile b/harbour/samples/pe/Makefile index 00b0b54ccf..c31ce25660 100644 --- a/harbour/samples/pe/Makefile +++ b/harbour/samples/pe/Makefile @@ -16,6 +16,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/source/Makefile b/harbour/source/Makefile index 6eb006e157..924a4d1d3b 100644 --- a/harbour/source/Makefile +++ b/harbour/source/Makefile @@ -10,8 +10,9 @@ DIRS=\ compiler \ rtl \ vm \ - rdd \ macro \ + lang \ + rdd \ debug \ tools \ diff --git a/harbour/source/lang/msg_tpl.c b/harbour/source/lang/msg_tpl.c new file mode 100644 index 0000000000..43f42621a9 --- /dev/null +++ b/harbour/source/lang/msg_tpl.c @@ -0,0 +1,173 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (Template) + * + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* Language name: */ +/* ISO language code (2 chars): (please look it up in /doc/lang_id.txt) */ +/* Codepage: */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "EN", /* ID */ + "English", /* Name (in English) */ + "English", /* Name (in native language) */ + "EN", /* RFC ID */ + "437", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + + /* Day names */ + + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Unknown error", + "Argument error", + "Bound error", + "String overflow", + "Numeric overflow", + "Zero divisor", + "Numeric error", + "Syntax error", + "Operation too complex", + "", + "", + "Memory low", + "Undefined function", + "No exported method", + "Variable does not exist", + "Alias does not exist", + "No exported variable", + "Illegal characters in alias", + "Alias already in use", + "", + "Create error", + "Open error", + "Close error", + "Read error", + "Write error", + "Print error", + "", + "", + "", + "", + "Operation not supported", + "Limit exceeded", + "Corruption detected", + "Data type error", + "Data width error", + "Workarea not in use", + "Workarea not indexed", + "Exclusive required", + "Lock required", + "Write not allowed", + "Append lock failed", + "Lock Failure", + "", + "", + "", + "array access", + "array assign", + "array dimension", + "not an array", + "conditional", + + /* Internal error names */ + + "Can't locate starting procedure", + "Can't allocate memory (%s)", + "Can't reallocate memory (%s)", + "Free called with null pointer", /* DEBUG */ + "Not implemented opcode (%s)", + "Not implemented (%s)", + + /* Texts */ + + "YYYY/MM/DD", + "Y", + "N" + } +}; + +HB_LANG_ANNOUNCE( TPL ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_TPL ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_TPL ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_TPL +#endif + diff --git a/harbour/source/rtl/natmsg/msgca.c b/harbour/source/lang/msgca.c similarity index 100% rename from harbour/source/rtl/natmsg/msgca.c rename to harbour/source/lang/msgca.c diff --git a/harbour/source/rtl/natmsg/msgcs852.c b/harbour/source/lang/msgcs852.c similarity index 100% rename from harbour/source/rtl/natmsg/msgcs852.c rename to harbour/source/lang/msgcs852.c diff --git a/harbour/source/rtl/natmsg/msgcskam.c b/harbour/source/lang/msgcskam.c similarity index 100% rename from harbour/source/rtl/natmsg/msgcskam.c rename to harbour/source/lang/msgcskam.c diff --git a/harbour/source/rtl/natmsg/msgde.c b/harbour/source/lang/msgde.c similarity index 100% rename from harbour/source/rtl/natmsg/msgde.c rename to harbour/source/lang/msgde.c diff --git a/harbour/source/lang/msgen.c b/harbour/source/lang/msgen.c new file mode 100644 index 0000000000..a0428341eb --- /dev/null +++ b/harbour/source/lang/msgen.c @@ -0,0 +1,173 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (EN) + * + * Copyright 2000 Victor Szakats + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* Language name: English */ +/* ISO language code (2 chars): EN */ +/* Codepage: ???? */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "EN", /* ID */ + "English", /* Name (in English) */ + "English", /* Name (in native language) */ + "EN", /* RFC ID */ + "437", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + + /* Day names */ + + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Unknown error", + "Argument error", + "Bound error", + "String overflow", + "Numeric overflow", + "Zero divisor", + "Numeric error", + "Syntax error", + "Operation too complex", + "", + "", + "Memory low", + "Undefined function", + "No exported method", + "Variable does not exist", + "Alias does not exist", + "No exported variable", + "Illegal characters in alias", + "Alias already in use", + "", + "Create error", + "Open error", + "Close error", + "Read error", + "Write error", + "Print error", + "", + "", + "", + "", + "Operation not supported", + "Limit exceeded", + "Corruption detected", + "Data type error", + "Data width error", + "Workarea not in use", + "Workarea not indexed", + "Exclusive required", + "Lock required", + "Write not allowed", + "Append lock failed", + "Lock Failure", + "", + "", + "", + "array access", + "array assign", + "array dimension", + "not an array", + "conditional", + + /* Internal error names */ + + "Can't locate starting procedure", + "Can't allocate memory (%s)", + "Can't reallocate memory (%s)", + "Free called with null pointer", /* DEBUG */ + "Not implemented opcode (%s)", + "Not implemented (%s)", + + /* Texts */ + + "YYYY/MM/DD", + "Y", + "N" + } +}; + +HB_LANG_ANNOUNCE( EN ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_EN ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_EN ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_EN +#endif + diff --git a/harbour/source/rtl/natmsg/msgeo.c b/harbour/source/lang/msgeo.c similarity index 100% rename from harbour/source/rtl/natmsg/msgeo.c rename to harbour/source/lang/msgeo.c diff --git a/harbour/source/rtl/natmsg/msges.c b/harbour/source/lang/msges.c similarity index 100% rename from harbour/source/rtl/natmsg/msges.c rename to harbour/source/lang/msges.c diff --git a/harbour/source/rtl/natmsg/msgeu.c b/harbour/source/lang/msgeu.c similarity index 100% rename from harbour/source/rtl/natmsg/msgeu.c rename to harbour/source/lang/msgeu.c diff --git a/harbour/source/rtl/natmsg/msgfr.c b/harbour/source/lang/msgfr.c similarity index 100% rename from harbour/source/rtl/natmsg/msgfr.c rename to harbour/source/lang/msgfr.c diff --git a/harbour/source/rtl/natmsg/msggl.c b/harbour/source/lang/msggl.c similarity index 100% rename from harbour/source/rtl/natmsg/msggl.c rename to harbour/source/lang/msggl.c diff --git a/harbour/source/rtl/natmsg/msghe862.c b/harbour/source/lang/msghe862.c similarity index 100% rename from harbour/source/rtl/natmsg/msghe862.c rename to harbour/source/lang/msghe862.c diff --git a/harbour/source/rtl/natmsg/msghewin.c b/harbour/source/lang/msghewin.c similarity index 100% rename from harbour/source/rtl/natmsg/msghewin.c rename to harbour/source/lang/msghewin.c diff --git a/harbour/source/lang/msghu852.c b/harbour/source/lang/msghu852.c new file mode 100644 index 0000000000..0dcb347fb0 --- /dev/null +++ b/harbour/source/lang/msghu852.c @@ -0,0 +1,173 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (HU852) + * + * Copyright 2000 Victor Szakats + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* Language name: Hungarian */ +/* ISO language code (2 chars): HU */ +/* Codepage: 852 */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "HU852", /* ID */ + "Hungarian", /* Name (in English) */ + "Magyar", /* Name (in native language) */ + "HU", /* RFC ID */ + "852", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "janu r", + "febru r", + "m rcius", + " prilis", + "m jus", + "jŁnius", + "jŁlius", + "augusztus", + "szeptember", + "okt˘ber", + "november", + "december", + + /* Day names */ + + "vas rnap", + "h‚tf‹", + "kedd", + "szerda", + "cst”rt”k", + "p‚ntek", + "szombat", + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Ismeretlen hiba", + "Param‚ter hiba", + "T”mbindex hiba", + "Karakteres v ltoz˘ tŁlcsordul s", + "Numerikus tŁlcsordul s", + "Null val val˘ oszt s", + "Numerikus hiba", + "Szintaktikus hiba", + "TŁl ”sszetett művelet", + "", + "", + "Kev‚s mem˘ria", + "Nem defini lt fggv‚ny", + "Nem export lt met˘dus", + "Nem l‚tez‹ v ltoz˘", + "Nem l‚tez‹ munkaterlet n‚v", + "Nem export lt v ltoz˘", + "Helytelen munkaterlet n‚v", + "M r haszn lt munkaterlet n‚v", + "", + "L‚trehoz si hiba", + "Megnyit si hiba", + "Lez r si hiba", + "Olvas si hiba", + "Ör s hiba", + "Nyomtat si hiba", + "", + "", + "", + "", + "Nem t mogatott művelet", + "Korl t tŁll‚pve", + "Index hiba felfedezve", + "Nem megfelel‹ adattĄpus", + "TŁl sz‚les adat", + "Nem megnyitott munkaterlet", + "Nem indexelt munkaterlet", + "Kiz r˘lagos megnyit si m˘d szks‚ges", + "Z rol s szks‚ges", + "Ör s nem megengedett", + "Z rol s nem sikerlt Łj rekord felvitelekor", + "Z rol s nem sikerlt", + "", + "", + "", + "t”mbelem hozz f‚r‚s", + "t”mbelem ‚rt‚kad s", + "t”mbelem dimenzi˘", + "nem t”mb", + "felt‚teles", + + /* Internal error names */ + + "Can't locate starting procedure", + "Can't allocate memory (%s)", + "Can't reallocate memory (%s)", + "Free called with null pointer", /* DEBUG */ + "Not implemented opcode (%s)", + "Not implemented (%s)", + + /* Texts */ + + "YYYY.MM.DD", + "I", + "N" + } +}; + +HB_LANG_ANNOUNCE( HU852 ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_HU852 ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_HU852 ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_HU852 +#endif + diff --git a/harbour/source/lang/msghucwi.c b/harbour/source/lang/msghucwi.c new file mode 100644 index 0000000000..94fc27408f --- /dev/null +++ b/harbour/source/lang/msghucwi.c @@ -0,0 +1,173 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (HUCWI) + * + * Copyright 2000 Victor Szakats + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* Language name: Hungarian */ +/* ISO language code (2 chars): HU */ +/* Codepage: CWI-2 */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "HUCWI", /* ID */ + "Hungarian", /* Name (in English) */ + "Magyar", /* Name (in native language) */ + "HU", /* RFC ID */ + "CWI-2", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "janu r", + "febru r", + "m rcius", + " prilis", + "m jus", + "jŁnius", + "jŁlius", + "augusztus", + "szeptember", + "okt˘ber", + "november", + "december", + + /* Day names */ + + "vas rnap", + "h‚tf“", + "kedd", + "szerda", + "cst”rt”k", + "p‚ntek", + "szombat", + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Ismeretlen hiba", + "Param‚ter hiba", + "T”mbindex hiba", + "Karakteres v ltoz˘ tŁlcsordul s", + "Numerikus tŁlcsordul s", + "Null val val˘ oszt s", + "Numerikus hiba", + "Szintaktikus hiba", + "TŁl ”sszetett m–velet", + "", + "", + "Kev‚s mem˘ria", + "Nem defini lt fggv‚ny", + "Nem export lt met˘dus", + "Nem l‚tez“ v ltoz˘", + "Nem l‚tez“ munkaterlet n‚v", + "Nem export lt v ltoz˘", + "Helytelen munkaterlet n‚v", + "M r haszn lt munkaterlet n‚v", + "", + "L‚trehoz si hiba", + "Megnyit si hiba", + "Lez r si hiba", + "Olvas si hiba", + "r s hiba", + "Nyomtat si hiba", + "", + "", + "", + "", + "Nem t mogatott m–velet", + "Korl t tŁll‚pve", + "Index hiba felfedezve", + "Nem megfelel“ adattĄpus", + "TŁl sz‚les adat", + "Nem megnyitott munkaterlet", + "Nem indexelt munkaterlet", + "Kiz r˘lagos megnyit si m˘d szks‚ges", + "Z rol s szks‚ges", + "r s nem megengedett", + "Z rol s nem sikerlt Łj rekord felvitelekor", + "Z rol s nem sikerlt", + "", + "", + "", + "t”mbelem hozz f‚r‚s", + "t”mbelem ‚rt‚kad s", + "t”mbelem dimenzi˘", + "nem t”mb", + "felt‚teles", + + /* Internal error names */ + + "Can't locate starting procedure", + "Can't allocate memory (%s)", + "Can't reallocate memory (%s)", + "Free called with null pointer", /* DEBUG */ + "Not implemented opcode (%s)", + "Not implemented (%s)", + + /* Texts */ + + "YYYY.MM.DD", + "I", + "N" + } +}; + +HB_LANG_ANNOUNCE( HUCWI ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_HUCWI ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_HUCWI ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_HUCWI +#endif + diff --git a/harbour/source/lang/msghuwin.c b/harbour/source/lang/msghuwin.c new file mode 100644 index 0000000000..4ac49fa0cb --- /dev/null +++ b/harbour/source/lang/msghuwin.c @@ -0,0 +1,173 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Language Support Module (HUWIN) + * + * Copyright 2000 Victor Szakats + * 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 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) 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 HRL + * and/or HVM code into it. + * + * 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 program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* Language name: Hungarian */ +/* ISO language code (2 chars): HU */ +/* Codepage: Windows-1 */ + +#include "hbapilng.h" + +static HB_LANG s_lang = +{ + { + /* Identification */ + + "HUWIN", /* ID */ + "Hungarian", /* Name (in English) */ + "Magyar", /* Name (in native language) */ + "HU", /* RFC ID */ + "Windows-1", /* Codepage */ + "$Revision$ $Date$", /* Version */ + + /* Month names */ + + "január", + "február", + "március", + "április", + "május", + "június", + "július", + "augusztus", + "szeptember", + "október", + "november", + "december", + + /* Day names */ + + "vasárnap", + "hétfő", + "kedd", + "szerda", + "csütörtök", + "péntek", + "szombat", + + /* CA-Cl*pper compatible natmsg items */ + + "Database Files # Records Last Update Size", + "Do you want more samples?", + "Page No.", + "** Subtotal **", + "* Subsubtotal *", + "*** Total ***", + "Ins", + " ", + "Invalid date", + "Range: ", + " - ", + "Y/N", + "INVALID EXPRESSION", + + /* Error description names */ + + "Ismeretlen hiba", + "Paraméter hiba", + "Tömbindex hiba", + "Karakteres változó túlcsordulás", + "Numerikus túlcsordulás", + "Nullával való osztás", + "Numerikus hiba", + "Szintaktikus hiba", + "Túl összetett művelet", + "", + "", + "Kevés memória", + "Nem definiált függvény", + "Nem exportált metódus", + "Nem létező változó", + "Nem létező munkaterület név", + "Nem exportált változó", + "Helytelen munkaterület név", + "Már használt munkaterület név", + "", + "Létrehozási hiba", + "Megnyitási hiba", + "Lezárási hiba", + "Olvasási hiba", + "Írás hiba", + "Nyomtatási hiba", + "", + "", + "", + "", + "Nem támogatott művelet", + "Korlát túllépve", + "Index hiba felfedezve", + "Nem megfelelő adattípus", + "Túl széles adat", + "Nem megnyitott munkaterület", + "Nem indexelt munkaterület", + "Kizárólagos megnyitási mód szükséges", + "Zárolás szükséges", + "Írás nem megengedett", + "Zárolás nem sikerült új rekord felvitelekor", + "Zárolás nem sikerült", + "", + "", + "", + "tömbelem hozzáférés", + "tömbelem értékadás", + "tömbelem dimenzió", + "nem tömb", + "feltételes", + + /* Internal error names */ + + "Can't locate starting procedure", + "Can't allocate memory (%s)", + "Can't reallocate memory (%s)", + "Free called with null pointer", /* DEBUG */ + "Not implemented opcode (%s)", + "Not implemented (%s)", + + /* Texts */ + + "YYYY.MM.DD", + "I", + "N" + } +}; + +HB_LANG_ANNOUNCE( HUWIN ); + +HB_CALL_ON_STARTUP_BEGIN( hb_lang_Init_HUWIN ) + hb_langRegister( &s_lang ); +HB_CALL_ON_STARTUP_END( hb_lang_Init_HUWIN ) +#if ! defined(__GNUC__) && ! defined(_MSC_VER) + #pragma startup hb_lang_Init_HUWIN +#endif + diff --git a/harbour/source/rtl/natmsg/msgid.c b/harbour/source/lang/msgid.c similarity index 100% rename from harbour/source/rtl/natmsg/msgid.c rename to harbour/source/lang/msgid.c diff --git a/harbour/source/rtl/natmsg/msgit.c b/harbour/source/lang/msgit.c similarity index 100% rename from harbour/source/rtl/natmsg/msgit.c rename to harbour/source/lang/msgit.c diff --git a/harbour/source/rtl/natmsg/msgko.c b/harbour/source/lang/msgko.c similarity index 100% rename from harbour/source/rtl/natmsg/msgko.c rename to harbour/source/lang/msgko.c diff --git a/harbour/source/rtl/natmsg/msgnl.c b/harbour/source/lang/msgnl.c similarity index 100% rename from harbour/source/rtl/natmsg/msgnl.c rename to harbour/source/lang/msgnl.c diff --git a/harbour/source/rtl/natmsg/msgpl852.c b/harbour/source/lang/msgpl852.c similarity index 100% rename from harbour/source/rtl/natmsg/msgpl852.c rename to harbour/source/lang/msgpl852.c diff --git a/harbour/source/rtl/natmsg/msgpliso.c b/harbour/source/lang/msgpliso.c similarity index 100% rename from harbour/source/rtl/natmsg/msgpliso.c rename to harbour/source/lang/msgpliso.c diff --git a/harbour/source/rtl/natmsg/msgplmaz.c b/harbour/source/lang/msgplmaz.c similarity index 100% rename from harbour/source/rtl/natmsg/msgplmaz.c rename to harbour/source/lang/msgplmaz.c diff --git a/harbour/source/rtl/natmsg/msgpt.c b/harbour/source/lang/msgpt.c similarity index 100% rename from harbour/source/rtl/natmsg/msgpt.c rename to harbour/source/lang/msgpt.c diff --git a/harbour/source/rtl/natmsg/msgru866.c b/harbour/source/lang/msgru866.c similarity index 100% rename from harbour/source/rtl/natmsg/msgru866.c rename to harbour/source/lang/msgru866.c diff --git a/harbour/source/rtl/natmsg/msgruwin.c b/harbour/source/lang/msgruwin.c similarity index 100% rename from harbour/source/rtl/natmsg/msgruwin.c rename to harbour/source/lang/msgruwin.c diff --git a/harbour/source/rtl/natmsg/msgsr852.c b/harbour/source/lang/msgsr852.c similarity index 100% rename from harbour/source/rtl/natmsg/msgsr852.c rename to harbour/source/lang/msgsr852.c diff --git a/harbour/source/rtl/natmsg/msgzhbig.c b/harbour/source/lang/msgzhbig.c similarity index 100% rename from harbour/source/rtl/natmsg/msgzhbig.c rename to harbour/source/lang/msgzhbig.c diff --git a/harbour/source/rtl/natmsg/msgzhgb.c b/harbour/source/lang/msgzhgb.c similarity index 100% rename from harbour/source/rtl/natmsg/msgzhgb.c rename to harbour/source/lang/msgzhgb.c diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 91bc7d5add..497270b2be 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -105,8 +105,6 @@ C_SOURCES=\ version.c \ word.c \ xhelp.c \ - \ - msgxxx.c \ PRG_SOURCES=\ achoice.prg \ diff --git a/harbour/source/rtl/datec.c b/harbour/source/rtl/datec.c index 7b5f521199..b9fbf1516d 100644 --- a/harbour/source/rtl/datec.c +++ b/harbour/source/rtl/datec.c @@ -36,20 +36,21 @@ #include "hbapi.h" #include "hbapiitm.h" #include "hbapierr.h" +#include "hbapilng.h" #include "hbdate.h" char * hb_dateCMonth( int iMonth ) { HB_TRACE(HB_TR_DEBUG, ("hb_dateCMonth(%d)", iMonth)); - return ( iMonth >= 1 && iMonth <= 12 ) ? hb_dateMonthsName[ iMonth - 1 ] : ""; + return ( iMonth >= 1 && iMonth <= 12 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 ) : ""; } char * hb_dateCDOW( int iDay ) { HB_TRACE(HB_TR_DEBUG, ("hb_dateCDOW(%d)", iDay)); - return ( iDay >= 1 && iDay <= 7 ) ? hb_dateDaysName[ iDay - 1 ] : ""; + return ( iDay >= 1 && iDay <= 7 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + iDay - 1 ) : ""; } HB_FUNC( CMONTH ) diff --git a/harbour/source/rtl/errorapi.c b/harbour/source/rtl/errorapi.c index dbeec26931..3ead81cfb9 100644 --- a/harbour/source/rtl/errorapi.c +++ b/harbour/source/rtl/errorapi.c @@ -665,7 +665,7 @@ PHB_ITEM hb_errRT_New( hb_errPutSubSystem( pError, szSubSystem ? szSubSystem : HB_ERR_SS_BASE ); hb_errPutGenCode( pError, ( USHORT ) ulGenCode ); hb_errPutSubCode( pError, ( USHORT ) ulSubCode ); - hb_errPutDescription( pError, szDescription ? szDescription : hb_langDGetErrorDesc( ulGenCode ) ); + hb_errPutDescription( pError, szDescription ? szDescription : ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) ); hb_errPutOperation( pError, szOperation ? szOperation : "" ); hb_errPutOsCode( pError, uiOsCode ); hb_errPutFlags( pError, uiFlags ); @@ -689,7 +689,7 @@ PHB_ITEM hb_errRT_New_Subst( hb_errPutSubSystem( pError, szSubSystem ? szSubSystem : HB_ERR_SS_BASE ); hb_errPutGenCode( pError, ( USHORT ) ulGenCode ); hb_errPutSubCode( pError, ( USHORT ) ulSubCode ); - hb_errPutDescription( pError, szDescription ? szDescription : hb_langDGetErrorDesc( ulGenCode ) ); + hb_errPutDescription( pError, szDescription ? szDescription : ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) ); hb_errPutOperation( pError, szOperation ? szOperation : "" ); hb_errPutOsCode( pError, uiOsCode ); hb_errPutFlags( pError, uiFlags | EF_CANSUBSTITUTE ); @@ -795,7 +795,7 @@ void hb_errInternal( ULONG ulIntCode, char * szText, char * szPar1, char * szPar hb_conOutErr( hb_conNewLine(), 0 ); sprintf( buffer, "Unrecoverable error %lu: ", ulIntCode ); hb_conOutErr( buffer, 0 ); - sprintf( buffer, szText != NULL ? szText : hb_langDGetErrorIntr( ulIntCode ), szPar1, szPar2 ); + sprintf( buffer, szText != NULL ? szText : ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR + ulIntCode ), szPar1, szPar2 ); hb_conOutErr( buffer, 0 ); hb_conOutErr( hb_conNewLine(), 0 ); diff --git a/harbour/source/rtl/langapi.c b/harbour/source/rtl/langapi.c index d338813c08..be8d0a4a07 100644 --- a/harbour/source/rtl/langapi.c +++ b/harbour/source/rtl/langapi.c @@ -36,179 +36,141 @@ #include "hbapi.h" #include "hbapilng.h" -static HB_LANG langEN = +/* Always link in the default language */ + +/* This hack is needed */ +#define HB_LANG_REQUEST( id ) HB_LANG_REQUEST_( id ) +#define HB_LANG_REQUEST_( id ) extern HB_FUNC( HB_LANG_##id ); \ + void hb_lang_ForceLink( void ) \ + { \ + HB_FUNCNAME( HB_LANG_##id )(); \ + } + +HB_LANG_REQUEST( HB_LANG_DEFAULT ); + +/* NOTE: This is the maximum number of registered languages, later this can be + made dynamic. */ +#define HB_LANG_MAX_ 64 + +static PHB_LANG s_langList[ HB_LANG_MAX_ ]; +static PHB_LANG s_lang = NULL; + +static int hb_langFindPos( char * pszID ) { - "English", /* Name */ - "EN", /* RFC ID */ - "437", /* Codepage */ - - /* Texts */ + int iPos; + if( pszID != NULL ) { - "YYYY/MM/DD", - "Y", - "N", - }, - - /* Month names */ - - { - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - }, - - /* Day names */ - - { - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - }, - - /* Error description names */ - - { - "Unknown error", - "Argument error", - "Bound error", - "String overflow", - "Numeric overflow", - "Zero divisor", - "Numeric error", - "Syntax error", - "Operation too complex", - "", - "", - "Memory low", - "Undefined function", - "No exported method", - "Variable does not exist", - "Alias does not exist", - "No exported variable", - "Illegal characters in alias", - "Alias already in use", - "", - "Create error", - "Open error", - "Close error", - "Read error", - "Write error", - "Print error", - "", - "", - "", - "", - "Operation not supported", - "Limit exceeded", - "Corruption detected", - "Data type error", - "Data width error", - "Workarea not in use", - "Workarea not indexed", - "Exclusive required", - "Lock required", - "Write not allowed", - "Append lock failed", - "Lock Failure", - "", - "", - "", - "Incorrect number of arguments", - "array access", - "array assign", - "array dimension", - "not an array", - "conditional" - }, - - /* Internal error names */ - - { - "Can't locate starting procedure", - "Can't allocate memory (%s)", - "Can't reallocate memory (%s)", - "Free called with null pointer", /* DEBUG */ - "Not implemented opcode (%s)", - "Not implemented (%s)" + for( iPos = 0; iPos < HB_LANG_MAX_; iPos++ ) + { + if( s_langList[ iPos ] != NULL && strcmp( ( char * ) s_langList[ iPos ]->pItemList[ 0 ], pszID ) == 0 ) + return iPos; + } } -}; -static PHB_LANG s_langDef = &langEN; + return -1; +} -void hb_langDSet ( PHB_LANG lang ) +BOOL hb_langRegister( PHB_LANG lang ) { - HB_TRACE(HB_TR_DEBUG, ("hb_langDSet(%p)", lang)); + HB_TRACE(HB_TR_DEBUG, ("hb_langRegister(%p)", lang)); if( lang ) - s_langDef = lang; + { + int iPos = hb_langFindPos( ( char * ) lang->pItemList[ HB_LANG_ITEM_BASE_ID + 0 ] ); + + if( iPos == -1 ) + { + for( iPos = 0; iPos < HB_LANG_MAX_; iPos++ ) + { + if( s_langList[ iPos ] == NULL ) + { + s_langList[ iPos ] = lang; + return TRUE; + } + } + } + else + { + s_langList[ iPos ] = lang; + return TRUE; + } + } + + return FALSE; } -PHB_LANG hb_langDGet ( void ) +BOOL hb_langDeRegister( char * pszID ) { - HB_TRACE(HB_TR_DEBUG, ("hb_langDGet()")); + int iPos; - return s_langDef; + HB_TRACE(HB_TR_DEBUG, ("hb_langDeRegister(%s)", pszID)); + + iPos = hb_langFindPos( pszID ); + + if( iPos != -1 ) + { + s_langList[ iPos ] = NULL; + return TRUE; + } + else + return FALSE; } -char * hb_langDGetName ( void ) +PHB_LANG hb_langFind( char * pszID ) { - HB_TRACE(HB_TR_DEBUG, ("hb_langDGetName()")); + int iPos; - return s_langDef->szName; + HB_TRACE(HB_TR_DEBUG, ("hb_langFind(%s)", pszID)); + + iPos = hb_langFindPos( pszID ); + + return iPos != -1 ? s_langList[ iPos ] : NULL; } -char * hb_langDGetID ( void ) +PHB_LANG hb_langSelect( PHB_LANG lang ) { - HB_TRACE(HB_TR_DEBUG, ("hb_langDGetID()")); + PHB_LANG langOld = s_lang; - return s_langDef->szID; + HB_TRACE(HB_TR_DEBUG, ("hb_langSelect(%p)", lang)); + + if( lang ) + s_lang = lang; + + return langOld; } -char * hb_langDGetText ( ULONG ulIndex ) +void * hb_langDGetItem( int iIndex ) { - HB_TRACE(HB_TR_DEBUG, ("hb_langDGetText(%lu)", ulIndex)); + HB_TRACE(HB_TR_DEBUG, ("hb_langDGetItem(%i)", iIndex)); - return s_langDef->szTextList[ ( ulIndex < sizeof( s_langDef->szTextList ) / sizeof( s_langDef->szTextList[ 0 ] ) ) ? ulIndex : 0 ]; + if( s_lang && iIndex >= 0 && iIndex < HB_LANG_ITEM_MAX_ ) + return s_lang->pItemList[ iIndex ]; + else + return NULL; } -char * hb_langDGetDayName ( ULONG ulIndex ) +HB_FUNC( HB_LANGSELECT ) { - HB_TRACE(HB_TR_DEBUG, ("hb_langDGetDayName(%lu)", ulIndex)); + hb_retc( ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ID + 0 ) ); - return s_langDef->szDayNameList[ ( ulIndex < sizeof( s_langDef->szDayNameList ) / sizeof( s_langDef->szDayNameList[ 0 ] ) ) ? ulIndex : 0 ]; + if( ISCHAR( 1 ) ) + hb_langSelect( hb_langFind( hb_parc( 1 ) ) ); } -char * hb_langDGetMonthName ( ULONG ulIndex ) -{ - HB_TRACE(HB_TR_DEBUG, ("hb_langDGetMonthName(%lu)", ulIndex)); - - return s_langDef->szMonthNameList[ ( ulIndex < sizeof( s_langDef->szMonthNameList ) / sizeof( s_langDef->szMonthNameList[ 0 ] ) ) ? ulIndex : 0 ]; -} +/* Compatibility interface */ char * hb_langDGetErrorDesc ( ULONG ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_langDGetErrorDesc(%lu)", ulIndex)); - return s_langDef->szErrorDescList[ ( ulIndex < sizeof( s_langDef->szErrorDescList ) / sizeof( s_langDef->szErrorDescList[ 0 ] ) ) ? ulIndex : 0 ]; + return ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulIndex ); } char * hb_langDGetErrorIntr ( ULONG ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_langDGetErrorIntr(%lu)", ulIndex)); - return s_langDef->szErrorIntrList[ ( ulIndex < sizeof( s_langDef->szErrorIntrList ) / sizeof( s_langDef->szErrorIntrList[ 0 ] ) ) ? ulIndex : 0 ]; + return ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR + ulIndex - 1 ); } + diff --git a/harbour/source/rtl/natmsg.c b/harbour/source/rtl/natmsg.c index 464bcd3834..3ddad61a1a 100644 --- a/harbour/source/rtl/natmsg.c +++ b/harbour/source/rtl/natmsg.c @@ -49,8 +49,8 @@ #include "hbapi.h" #include "hbapiitm.h" +#include "hbapilng.h" -/* TODO: Use the Language API to retrieve these strings. */ /* NOTE: Ad-hoc names mostly taken from various Clipper source files. These should be named properly if exported outside this file. [vszakats] */ @@ -69,42 +69,25 @@ #define _LF_YN 12 /* "Y/N" */ /* NOTE: This must be in uppercase. [vszakats] */ #define _INVALID_EXPR 13 /* "INVALID EXPRESSION" */ -static char * s_szMessages[] = -{ - "Database Files # Records Last Update Size", - "Do you want more samples?", - "Page No.", - "** Subtotal **", - "* Subsubtotal *", - "*** Total ***", - "Ins", - " ", - "Invalid date", - "Range: ", - " - ", - "Y/N", - "INVALID EXPRESSION" -}; - char * hb_nationGetMsg( USHORT uiMsg ) { HB_TRACE(HB_TR_DEBUG, ("hb_nationGetMsg(%hu)", uiMsg)); - return ( uiMsg >= 1 && uiMsg <= ( sizeof( s_szMessages ) / sizeof( char * ) ) ) ? s_szMessages[ uiMsg - 1 ] : ""; + return ( uiMsg >= 1 && uiMsg <= 13 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + uiMsg - 1 ) : ""; } HB_FUNC( ISAFFIRM ) { PHB_ITEM pItem = hb_param( 1, HB_IT_STRING ); - hb_retl( pItem && hb_itemGetCLen( pItem ) >= 1 && toupper( hb_itemGetCPtr( pItem )[ 0 ] ) == s_szMessages[ _LF_YN - 1 ][ 0 ] ); + hb_retl( pItem && hb_itemGetCLen( pItem ) >= 1 && toupper( hb_itemGetCPtr( pItem )[ 0 ] ) == ( ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + _LF_YN - 1 ) )[ 0 ] ); } HB_FUNC( ISNEGATIVE ) { PHB_ITEM pItem = hb_param( 1, HB_IT_STRING ); - hb_retl( pItem && hb_itemGetCLen( pItem ) >= 1 && toupper( hb_itemGetCPtr( pItem )[ 0 ] ) == s_szMessages[ _LF_YN - 1 ][ 2 ] ); + hb_retl( pItem && hb_itemGetCLen( pItem ) >= 1 && toupper( hb_itemGetCPtr( pItem )[ 0 ] ) == ( ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_NATMSG + _LF_YN - 1 ) )[ 2 ] ); } HB_FUNC( NATIONMSG ) diff --git a/harbour/source/rtl/natmsg/msg_tpl.c b/harbour/source/rtl/natmsg/msg_tpl.c deleted file mode 100644 index db44911cad..0000000000 --- a/harbour/source/rtl/natmsg/msg_tpl.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - */ - -/* Language Support Module */ - -/* Language name: */ -/* ISO language code (2 chars): (please look it up in /doc/lang_id.txt) */ -/* Codepage: */ - -#include "hbdefs.h" - -char *hb_dateMonthsName[ 12 ] = -{ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -}; - -char *hb_dateDaysName[ 7 ] = -{ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -}; - -char *hb_errorsGeneric[] = -{ - "Unknown error", - "Argument error", - "Bound error", - "String overflow", - "Numeric overflow", - "Zero divisor", - "Numeric error", - "Syntax error", - "Operation too complex", - "", - "", - "Memory low", - "Undefined function", - "No exported method", - "Variable does not exist", - "Alias does not exist", - "No exported variable", - "Illegal characters in alias", - "Alias already in use", - "", - "Create error", - "Open error", - "Close error", - "Read error", - "Write error", - "Print error", - "", - "", - "", - "", - "Operation not supported", - "Limit exceeded", - "Corruption detected", - "Data type error", - "Data width error", - "Workarea not in use", - "Workarea not indexed", - "Exclusive required", - "Lock required", - "Write not allowed", - "Append lock failed", - "Lock Failure", - "", - "", - "", - "Incorrect number of arguments", - "array access", - "array assign", - "not an array", - "conditional" -}; diff --git a/harbour/source/rtl/natmsg/msgen.c b/harbour/source/rtl/natmsg/msgen.c deleted file mode 100644 index 5944ac9ca2..0000000000 --- a/harbour/source/rtl/natmsg/msgen.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - */ - -/* Language Support Module */ - -/* Language name: English */ -/* ISO language code (2 chars): EN */ -/* Codepage: ???? */ - -#include "hbdefs.h" - -char *hb_dateMonthsName[ 12 ] = -{ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -}; - -char *hb_dateDaysName[ 7 ] = -{ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -}; - -char *hb_errorsGeneric[] = -{ - "Unknown error", - "Argument error", - "Bound error", - "String overflow", - "Numeric overflow", - "Zero divisor", - "Numeric error", - "Syntax error", - "Operation too complex", - "", - "", - "Memory low", - "Undefined function", - "No exported method", - "Variable does not exist", - "Alias does not exist", - "No exported variable", - "Illegal characters in alias", - "Alias already in use", - "", - "Create error", - "Open error", - "Close error", - "Read error", - "Write error", - "Print error", - "", - "", - "", - "", - "Operation not supported", - "Limit exceeded", - "Corruption detected", - "Data type error", - "Data width error", - "Workarea not in use", - "Workarea not indexed", - "Exclusive required", - "Lock required", - "Write not allowed", - "Append lock failed", - "Lock Failure", - "", - "", - "", - "Incorrect number of arguments", - "array access", - "array assign", - "not an array", - "conditional" -}; diff --git a/harbour/source/rtl/natmsg/msghu852.c b/harbour/source/rtl/natmsg/msghu852.c deleted file mode 100644 index c47a46f26d..0000000000 --- a/harbour/source/rtl/natmsg/msghu852.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - */ - -/* Language Support Module */ - -/* Language name: Hungarian */ -/* ISO language code (2 chars): HU */ -/* Codepage: 852 */ - -#include "hbdefs.h" - -char *hb_dateMonthsName[ 12 ] = -{ - "janu r", - "febru r", - "m rcius", - " prilis", - "m jus", - "jŁnius", - "jŁlius", - "augusztus", - "szeptember", - "okt˘ber", - "november", - "december" -}; - -char *hb_dateDaysName[ 7 ] = -{ - "vas rnap", - "h‚tf‹", - "kedd", - "szerda", - "cst”rt”k", - "p‚ntek", - "szombat" -}; - -char *hb_errorsGeneric[] = -{ - "Ismeretlen hiba", - "Param‚ter hiba", - "T”mbindex hiba", - "Karakteres v ltoz˘ tŁlcsordul s", - "Numerikus tŁlcsordul s", - "Null val val˘ oszt s", - "Numerikus hiba", - "Szintaktikus hiba", - "TŁl ”sszetett művelet", - "", - "", - "Kev‚s mem˘ria", - "Nem defini lt fggv‚ny", - "Nem export lt met˘dus", - "Nem l‚tez‹ v ltoz˘", - "Nem l‚tez‹ munkaterlet n‚v", - "Nem export lt v ltoz˘", - "Helytelen munkaterlet n‚v", - "M r haszn lt munkaterlet n‚v", - "", - "L‚trehoz si hiba", - "Megnyit si hiba", - "Lez r si hiba", - "Olvas si hiba", - "Ör s hiba", - "Nyomtat si hiba", - "", - "", - "", - "", - "Nem t mogatott művelet", - "Korl t tŁll‚pve", - "Index hiba felfedezve", - "Nem megfelel‹ adattĄpus", - "TŁl sz‚les adat", - "Nem megnyitott munkaterlet", - "Nem indexelt munkaterlet", - "Kiz r˘lagos megnyit si m˘d szks‚ges", - "Z rol s szks‚ges", - "Ör s nem megengedett", - "Z rol s nem sikerlt Łj rekord felvitelekor", - "Z rol s nem sikerlt", - "", - "", - "", - "Nem megfelel‹ sz mŁ param‚ter", - "t”mbelem hozz f‚r‚s", - "t”mbelem ‚rt‚kad s", - "nem t”mb", - "felt‚teles" -}; diff --git a/harbour/source/rtl/natmsg/msghucwi.c b/harbour/source/rtl/natmsg/msghucwi.c deleted file mode 100644 index 62d29429a8..0000000000 --- a/harbour/source/rtl/natmsg/msghucwi.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - */ - -/* Language Support Module */ - -/* Language name: Hungarian */ -/* ISO language code (2 chars): HU */ -/* Codepage: CWI-2 */ - -#include "hbdefs.h" - -char *hb_dateMonthsName[ 12 ] = -{ - "janu r", - "febru r", - "m rcius", - " prilis", - "m jus", - "jŁnius", - "jŁlius", - "augusztus", - "szeptember", - "okt˘ber", - "november", - "december" -}; - -char *hb_dateDaysName[ 7 ] = -{ - "vas rnap", - "h‚tf“", - "kedd", - "szerda", - "cst”rt”k", - "p‚ntek", - "szombat" -}; - -char *hb_errorsGeneric[] = -{ - "Ismeretlen hiba", - "Param‚ter hiba", - "T”mbindex hiba", - "Karakteres v ltoz˘ tŁlcsordul s", - "Numerikus tŁlcsordul s", - "Null val val˘ oszt s", - "Numerikus hiba", - "Szintaktikus hiba", - "TŁl ”sszetett m–velet", - "", - "", - "Kev‚s mem˘ria", - "Nem defini lt fggv‚ny", - "Nem export lt met˘dus", - "Nem l‚tez“ v ltoz˘", - "Nem l‚tez“ munkaterlet n‚v", - "Nem export lt v ltoz˘", - "Helytelen munkaterlet n‚v", - "M r haszn lt munkaterlet n‚v", - "", - "L‚trehoz si hiba", - "Megnyit si hiba", - "Lez r si hiba", - "Olvas si hiba", - "r s hiba", - "Nyomtat si hiba", - "", - "", - "", - "", - "Nem t mogatott m–velet", - "Korl t tŁll‚pve", - "Index hiba felfedezve", - "Nem megfelel“ adattĄpus", - "TŁl sz‚les adat", - "Nem megnyitott munkaterlet", - "Nem indexelt munkaterlet", - "Kiz r˘lagos megnyit si m˘d szks‚ges", - "Z rol s szks‚ges", - "r s nem megengedett", - "Z rol s nem sikerlt Łj rekord felvitelekor", - "Z rol s nem sikerlt", - "", - "", - "", - "Nem megfelel“ sz mŁ param‚ter", - "t”mbelem hozz f‚r‚s", - "t”mbelem ‚rt‚kad s", - "nem t”mb", - "felt‚teles" -}; diff --git a/harbour/source/rtl/natmsg/msghuwin.c b/harbour/source/rtl/natmsg/msghuwin.c deleted file mode 100644 index e2e628c788..0000000000 --- a/harbour/source/rtl/natmsg/msghuwin.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - */ - -/* Language Support Module */ - -/* Language name: Hungarian */ -/* ISO language code (2 chars): HU */ -/* Codepage: Windows-1 */ - -#include "hbdefs.h" - -char *hb_dateMonthsName[ 12 ] = -{ - "január", - "február", - "március", - "április", - "május", - "június", - "július", - "augusztus", - "szeptember", - "október", - "november", - "december" -}; - -char *hb_dateDaysName[ 7 ] = -{ - "vasárnap", - "hétfő", - "kedd", - "szerda", - "csütörtök", - "péntek", - "szombat" -}; - -char *hb_errorsGeneric[] = -{ - "Ismeretlen hiba", - "Paraméter hiba", - "Tömbindex hiba", - "Karakteres változó túlcsordulás", - "Numerikus túlcsordulás", - "Nullával való osztás", - "Numerikus hiba", - "Szintaktikus hiba", - "Túl összetett művelet", - "", - "", - "Kevés memória", - "Nem definiált függvény", - "Nem exportált metódus", - "Nem létező változó", - "Nem létező munkaterület név", - "Nem exportált változó", - "Helytelen munkaterület név", - "Már használt munkaterület név", - "", - "Létrehozási hiba", - "Megnyitási hiba", - "Lezárási hiba", - "Olvasási hiba", - "Írás hiba", - "Nyomtatási hiba", - "", - "", - "", - "", - "Nem támogatott művelet", - "Korlát túllépve", - "Index hiba felfedezve", - "Nem megfelelő adattípus", - "Túl széles adat", - "Nem megnyitott munkaterület", - "Nem indexelt munkaterület", - "Kizárólagos megnyitási mód szükséges", - "Zárolás szükséges", - "Írás nem megengedett", - "Zárolás nem sikerült új rekord felvitelekor", - "Zárolás nem sikerült", - "", - "", - "", - "Nem megfelelő számú paraméter", - "tömbelem hozzáférés", - "tömbelem értékadás", - "nem tömb", - "feltételes" -}; diff --git a/harbour/source/rtl/run.c b/harbour/source/rtl/run.c index 23e69e6ce0..6461051ec8 100644 --- a/harbour/source/rtl/run.c +++ b/harbour/source/rtl/run.c @@ -36,6 +36,9 @@ #include "hbapi.h" #include "hbapierr.h" +/* TOFIX: The screen buffer handling is not right for all platforms (Win32) + The output of the launched (DOS?) app is not visible. */ + HB_FUNC( __RUN ) { #if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__IBMCPP__) || defined(__GNUC__) diff --git a/harbour/source/tools/dates2.c b/harbour/source/tools/dates2.c index c2a34b7bcb..bab607d955 100644 --- a/harbour/source/tools/dates2.c +++ b/harbour/source/tools/dates2.c @@ -38,6 +38,7 @@ #include "hbapi.h" #include "hbapierr.h" #include "hbapiitm.h" +#include "hbapilng.h" #include "hbdate.h" static int hb__daysinmonth[ 12 ] = @@ -117,7 +118,7 @@ HB_FUNC( AMONTHS ) for( i = 0; i < 12; i++ ) { pString = hb_itemNew( NULL ); - hb_itemPutC( pString, hb_dateMonthsName[ i ] ); + hb_itemPutC( pString, ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + i ) ); hb_itemArrayPut( pReturn, i+1, pString ); hb_itemRelease ( pString ); } @@ -134,7 +135,7 @@ HB_FUNC( ADAYS ) for( i = 0; i < 7; i++ ) { pString = hb_itemNew( NULL ); - hb_itemPutC( pString, hb_dateDaysName[ i ] ); + hb_itemPutC( pString, ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + i ) ); hb_itemArrayPut( pReturn, i+1, pString ); hb_itemRelease ( pString ); } diff --git a/harbour/source/vm/harbinit.prg b/harbour/source/vm/harbinit.prg index 039b0885c8..37536685c5 100644 --- a/harbour/source/vm/harbinit.prg +++ b/harbour/source/vm/harbinit.prg @@ -56,6 +56,13 @@ INIT PROCEDURE ClipInit PUBLIC GetList := {} + /* Set the language to the default */ + + /* This is needed to stringify the language ID */ + #translate HB_LANG_SELECT_DEFAULT( ) => hb_langSelect( # ) + + HB_LANG_SELECT_DEFAULT( HB_LANG_DEFAULT ) + ErrorSys() /* TOFIX: In Clipper this function is not called from here CLIPINIT(). */ diff --git a/harbour/tests/Makefile b/harbour/tests/Makefile index 0c671ec2eb..243bd28e98 100644 --- a/harbour/tests/Makefile +++ b/harbour/tests/Makefile @@ -13,6 +13,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/utils/hbdoc/Makefile b/harbour/utils/hbdoc/Makefile index 7e495fb28e..51a0b57bb7 100644 --- a/harbour/utils/hbdoc/Makefile +++ b/harbour/utils/hbdoc/Makefile @@ -32,6 +32,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/utils/hbextern/Makefile b/harbour/utils/hbextern/Makefile index ba735005aa..aa82f08cbf 100644 --- a/harbour/utils/hbextern/Makefile +++ b/harbour/utils/hbextern/Makefile @@ -17,6 +17,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/utils/hbrun/Makefile b/harbour/utils/hbrun/Makefile index 0beab25628..0ca63bed9a 100644 --- a/harbour/utils/hbrun/Makefile +++ b/harbour/utils/hbrun/Makefile @@ -19,6 +19,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/utils/hbtest/Makefile b/harbour/utils/hbtest/Makefile index 49da08094a..ec38256f47 100644 --- a/harbour/utils/hbtest/Makefile +++ b/harbour/utils/hbtest/Makefile @@ -27,6 +27,7 @@ LIBS=\ debug \ vm \ rtl \ + lang \ rdd \ rtl \ vm \ diff --git a/harbour/utils/hbtest/hbtest.prg b/harbour/utils/hbtest/hbtest.prg index 66cecbfe24..476f344e5e 100644 --- a/harbour/utils/hbtest/hbtest.prg +++ b/harbour/utils/hbtest/hbtest.prg @@ -78,6 +78,10 @@ STATIC s_aSkipList STATIC s_nStartTime STATIC s_nEndTime +#ifdef __HARBOUR__ + REQUEST HB_LANG_EN +#endif + FUNCTION Main( cPar1, cPar2 ) OutStd( "Harbour Regression Test Suite" + HB_OSNewLine() +; @@ -205,10 +209,9 @@ STATIC FUNCTION TEST_BEGIN( cParam ) /* Set up the initial state */ -/* TODO: Need to add this, when multi language support will be available - to make sure all error messages comes in the original English - language. */ -/* SET LANGID TO EN */ +#ifdef __HARBOUR__ + hb_langSelect( "EN" ) +#endif SET DATE ANSI SET CENTURY ON SET EXACT OFF