diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 44f03887f0..4b48849ad0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,13 @@ +19991118-05:29 GMT+1 Victor Szel + - bin\buildexe*.bat + + bin\bld_tpl.* + * New style build batch file templates added instead of the long-named + ones. + * make_tpl.* + + Copyright info added. + * include/filesys.h + + Indenting corrected. + 19991117-13:05 GMT+1 Ryszard Glab *source/compiler/harbour.y @@ -153,7 +163,7 @@ source/rtl/text.prg source/rtl/harbinit.prg source/rtl/browse.prg - % Optimzalization. (FUNCTION/RETURN NIL->PROCEDURE) + % Optimization. (FUNCTION/RETURN NIL->PROCEDURE) * tests/memfile.prg + Added tests for long variable names. ! Make it possible to compile with CA-Cl*pper. diff --git a/harbour/bin/bld_tpl.bat b/harbour/bin/bld_tpl.bat new file mode 100644 index 0000000000..367db39aaa --- /dev/null +++ b/harbour/bin/bld_tpl.bat @@ -0,0 +1,115 @@ +@echo off +rem +rem $Id$ +rem + +rem Flavour: DOS/Windows batch file + +rem --------------------------------------------------------------- +rem Template to build a final Harbour executable, using Harbour +rem with the C code generation feature, then calling the proper C +rem linker/compiler. +rem +rem Copyright 1999 Victor Szel +rem See doc/license.txt for licensing terms. +rem --------------------------------------------------------------- + +rem set HB_ARCHITECTURE= +rem set HB_COMPILER= + +:START + + if "%HB_ARCHITECTURE%" == "" goto BAD_ARCH + if "%HB_COMPILER%" == "" goto BAD_COMP + + if not "%1" == "" goto COMPILE + +:HELP + + echo. + echo Usage: bld_tpl.bat filename + echo. + echo Notes: + echo. + echo - 'filename' is the .prg filename *without* extension. + echo - Don't forget to make a MAIN() function for you application. + echo - This batch file assumes you are in some directory off the main + echo harbour directory. + echo - Environment variable HB_ARCHITECTURE and HB_COMPILER should be set. + echo The following values are currently supported: + echo. + echo HB_ARCHITECTURE: + echo - dos + echo - w32 + echo - linux + echo - os2 + echo. + pause + echo HB_COMPILER: + echo - When HB_ARCHITECTURE=dos + echo - bcc31 (Borland C/C++ 3.1, 16-bit DOS) + echo - djgpp (GCC (DJGPP), 32-bit Windows) + echo - watcom + echo - When HB_ARCHITECTURE=w32 + echo - bcc32 + echo - gcc (GCC (Cygnus), 32-bit Windows) + echo - mingw32 (GCC (Cygnus/MingW32), Windows 32 bit (console mode)) + echo - icc + echo - msvc (MSVC v 12.00.8168, Windows 32 bit (console mode)) + echo - When HB_ARCHITECTURE=linux + echo - gcc + echo - When HB_ARCHITECTURE=os2 + echo - gcc (GCC (EMX), 32-bit OS/2) + echo - icc (ICC (IBM Visual Age C++ 3.0), 32-bit OS/2) + goto END + +:BAD_ARCH + + echo Error: HB_ARCHITECTURE is not set. + goto HELP + +:BAD_COMP + + echo Error: HB_COMPILER is not set. + goto HELP + +:COMPILE + + harbour %1.prg /n /i..\include + + if not "%HB_ARCHITECTURE%" == "dos" goto A_W32 + + if "%HB_COMPILER%" == "bcc31" bcc -O2 -mh -I..\include %1.c ..\lib\common.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\vm.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib + if "%HB_COMPILER%" == "djgpp" gcc %1.c -o%1.exe -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfnt -ldbfcd + goto END + +:A_W32 + + if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 + + if "%HB_COMPILER%" == "gcc" gcc %1.c -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + if "%HB_COMPILER%" == "mingw32" gcc %1.c -mno-cygwin -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -DHARBOUR_USE_WIN_GTAPI -I..\include %1.c /link /subsystem:CONSOLE ..\lib\harbour.lib ..\lib\terminal.lib ..\lib\hbtools.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\debug.lib + if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning + goto END + +:A_OS2 + + if not "%HB_ARCHITECTURE%" == "dos" goto A_LINUX + + if "%HB_COMPILER%" == "gcc" gcc %1.c -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp %1.c ..\lib\common.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\vm.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib + goto END + +:A_LINUX + + if not "%HB_ARCHITECTURE%" == "linux" goto CLEANUP + + if "%HB_COMPILER%" == "gcc" gcc %1.c -I../include -L../lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + goto END + +:CLEANUP + + del %1.c + +:END diff --git a/harbour/bin/bld_tpl.cmd b/harbour/bin/bld_tpl.cmd new file mode 100644 index 0000000000..e1361add14 --- /dev/null +++ b/harbour/bin/bld_tpl.cmd @@ -0,0 +1,115 @@ +@echo off +rem +rem $Id$ +rem + +rem Flavour: OS/2 command file + +rem --------------------------------------------------------------- +rem Template to build a final Harbour executable, using Harbour +rem with the C code generation feature, then calling the proper C +rem linker/compiler. +rem +rem Copyright 1999 Victor Szel +rem See doc/license.txt for licensing terms. +rem --------------------------------------------------------------- + +rem set HB_ARCHITECTURE= +rem set HB_COMPILER= + +:START + + if "%HB_ARCHITECTURE%" == "" goto BAD_ARCH + if "%HB_COMPILER%" == "" goto BAD_COMP + + if not "%1" == "" goto COMPILE + +:HELP + + echo. + echo Usage: bld_tpl.bat filename + echo. + echo Notes: + echo. + echo - 'filename' is the .prg filename *without* extension. + echo - Don't forget to make a MAIN() function for you application. + echo - This batch file assumes you are in some directory off the main + echo harbour directory. + echo - Environment variable HB_ARCHITECTURE and HB_COMPILER should be set. + echo The following values are currently supported: + echo. + echo HB_ARCHITECTURE: + echo - dos + echo - w32 + echo - linux + echo - os2 + echo. + pause + echo HB_COMPILER: + echo - When HB_ARCHITECTURE=dos + echo - bcc31 (Borland C/C++ 3.1, 16-bit DOS) + echo - djgpp (GCC (DJGPP), 32-bit Windows) + echo - watcom + echo - When HB_ARCHITECTURE=w32 + echo - bcc32 + echo - gcc (GCC (Cygnus), 32-bit Windows) + echo - mingw32 (GCC (Cygnus/MingW32), Windows 32 bit (console mode)) + echo - icc + echo - msvc (MSVC v 12.00.8168, Windows 32 bit (console mode)) + echo - When HB_ARCHITECTURE=linux + echo - gcc + echo - When HB_ARCHITECTURE=os2 + echo - gcc (GCC (EMX), 32-bit OS/2) + echo - icc (ICC (IBM Visual Age C++ 3.0), 32-bit OS/2) + goto END + +:BAD_ARCH + + echo Error: HB_ARCHITECTURE is not set. + goto HELP + +:BAD_COMP + + echo Error: HB_COMPILER is not set. + goto HELP + +:COMPILE + + harbour %1.prg /n /i..\include + + if not "%HB_ARCHITECTURE%" == "dos" goto A_W32 + + if "%HB_COMPILER%" == "bcc31" bcc -O2 -mh -I..\include %1.c ..\lib\common.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\vm.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib + if "%HB_COMPILER%" == "djgpp" gcc %1.c -o%1.exe -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfnt -ldbfcd + goto END + +:A_W32 + + if not "%HB_ARCHITECTURE%" == "w32" goto A_OS2 + + if "%HB_COMPILER%" == "gcc" gcc %1.c -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + if "%HB_COMPILER%" == "mingw32" gcc %1.c -mno-cygwin -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + if "%HB_COMPILER%" == "msvc" cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -DHARBOUR_USE_WIN_GTAPI -I..\include %1.c /link /subsystem:CONSOLE ..\lib\harbour.lib ..\lib\terminal.lib ..\lib\hbtools.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\debug.lib + if "%HB_COMPILER%" == "msvc" echo Ignore LNK4033 warning + goto END + +:A_OS2 + + if not "%HB_ARCHITECTURE%" == "dos" goto A_LINUX + + if "%HB_COMPILER%" == "gcc" gcc %1.c -I..\include -L..\lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + if "%HB_COMPILER%" == "icc" icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp %1.c ..\lib\common.lib ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\vm.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib + goto END + +:A_LINUX + + if not "%HB_ARCHITECTURE%" == "linux" goto CLEANUP + + if "%HB_COMPILER%" == "gcc" gcc %1.c -I../include -L../lib -lcommon -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx + goto END + +:CLEANUP + + del %1.c + +:END diff --git a/harbour/bin/buildexe-dos-bcc31.bat b/harbour/bin/buildexe-dos-bcc31.bat deleted file mode 100644 index b7987bdf8b..0000000000 --- a/harbour/bin/buildexe-dos-bcc31.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: Borland C/C++ 3.1 -rem Platform: 16-bit DOS -rem -rem Adapted from the MINGW32 version created by Victor Szel -rem by David G. Holm - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -bcc -O2 -mh -I..\include %1.c ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\vm.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib -del %1.c diff --git a/harbour/bin/buildexe-dos-djgpp.bat b/harbour/bin/buildexe-dos-djgpp.bat deleted file mode 100644 index 9de0793de7..0000000000 --- a/harbour/bin/buildexe-dos-djgpp.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: GCC (Cygnus) -rem Platform: 32-bit Windows -rem -rem Adapted from the MINGW32 version created by Victor Szel -rem by David G. Holm - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -gcc %1.c -o%1.exe -I..\include -L..\lib -lrtl -lrdd -lvm -lrdd -lrtl -ldbfnt -ldbfcd -del %1.c diff --git a/harbour/bin/buildexe-os2-gcc.cmd b/harbour/bin/buildexe-os2-gcc.cmd deleted file mode 100644 index 1b830d87cc..0000000000 --- a/harbour/bin/buildexe-os2-gcc.cmd +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: GCC (EMX) -rem Platform: 32-bit OS/2 -rem -rem Adapted from the MINGW32 version created by Victor Szel -rem by David G. Holm - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -gcc %1.c -I..\include -L..\lib -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx -del %1.c diff --git a/harbour/bin/buildexe-os2-icc.cmd b/harbour/bin/buildexe-os2-icc.cmd deleted file mode 100644 index 04cf521e63..0000000000 --- a/harbour/bin/buildexe-os2-icc.cmd +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: ICC (IBM Visual Age C++ 3.0) -rem Platform: 32-bit OS/2 -rem -rem Adapted from the MINGW32 version created by Victor Szel -rem by David G. Holm - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -icc /Gs+ /W2 /Se /Sd+ /Ti+ -I..\include /C- /Tp %1.c ..\lib\rtl.lib ..\lib\rdd.lib ..\lib\vm.lib ..\lib\rdd.lib ..\lib\rtl.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib -del %1.c diff --git a/harbour/bin/buildexe-w32-gcc.bat b/harbour/bin/buildexe-w32-gcc.bat deleted file mode 100644 index a2518a5681..0000000000 --- a/harbour/bin/buildexe-w32-gcc.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: GCC (Cygnus) -rem Platform: 32-bit Windows -rem -rem Adapted from the MINGW32 version created by Victor Szel -rem by David G. Holm - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -gcc %1.c -I..\include -L..\lib -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx -del %1.c diff --git a/harbour/bin/buildexe-w32-mingw32.bat b/harbour/bin/buildexe-w32-mingw32.bat deleted file mode 100644 index f5bd2cc75c..0000000000 --- a/harbour/bin/buildexe-w32-mingw32.bat +++ /dev/null @@ -1,27 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: Cygwin GCC compiler / MingW32 -rem Platform: Windows 32 bit (console mode) -rem -rem Maintainer: Victor Szel - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -gcc %1.c -mno-cygwin -I..\include -L..\lib -lrtl -lrdd -lvm -lrdd -lrtl -ldbfntx -ldbfcdx -del %1.c diff --git a/harbour/bin/buildexe-w32-msvc.bat b/harbour/bin/buildexe-w32-msvc.bat deleted file mode 100644 index ee3706b848..0000000000 --- a/harbour/bin/buildexe-w32-msvc.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem Harbour executable builder batch file -rem -rem Compiler: MSVC v 12.00.8168 -rem Platform: Windows 32 bit (console mode) -rem -rem Maintainer: Paul Tucker - -if not "%1" == "" goto compile - -echo. -echo Usage: buildexe.bat name -echo. -echo - 'name' is the .prg filename *without* extension. -echo - Don't forget to make a MAIN function for you application. -echo - This batch file assumes you are in some directory off the main harbour dir -exit - -:compile - -harbour %1.prg /n /i..\include -cl -Fd..\bin\harbour -w -Zi -TP -GZ -GA -DHARBOUR_USE_WIN_GTAPI -I..\include %1.c /link /subsystem:CONSOLE ..\obj\symbols.obj ..\lib\harbour.lib ..\lib\terminal.lib ..\lib\hbtools.lib ..\lib\dbfntx.lib ..\lib\dbfcdx.lib ..\lib\debug.lib -echo Ignore LNK4033 warning -del %1.c diff --git a/harbour/bin/empty b/harbour/bin/empty deleted file mode 100644 index c6cac69265..0000000000 --- a/harbour/bin/empty +++ /dev/null @@ -1 +0,0 @@ -empty diff --git a/harbour/include/filesys.h b/harbour/include/filesys.h index 3aa7b25704..e9f99ec70f 100644 --- a/harbour/include/filesys.h +++ b/harbour/include/filesys.h @@ -79,10 +79,10 @@ typedef int FHANDLE; /* Filename support */ typedef struct { - char szBuffer[ _POSIX_PATH_MAX + 3 ]; - char * szPath; - char * szName; - char * szExtension; + char szBuffer[ _POSIX_PATH_MAX + 3 ]; + char * szPath; + char * szName; + char * szExtension; } HB_FNAME, * PHB_FNAME, * HB_FNAME_PTR; extern BOOL hb_fsChDir ( BYTE * pDirName ); diff --git a/harbour/make_tpl.bat b/harbour/make_tpl.bat index 17f1d8a5a8..e8d8284bd9 100644 --- a/harbour/make_tpl.bat +++ b/harbour/make_tpl.bat @@ -11,6 +11,9 @@ rem the GNU make system for Harbour rem rem For further information about the GNU make system please rem check doc/gmake.txt +rem +rem Copyright 1999 Victor Szel +rem See doc/license.txt for licensing terms. rem --------------------------------------------------------------- rem --------------------------------------------------------------- diff --git a/harbour/make_tpl.cmd b/harbour/make_tpl.cmd index 9e8e3d98b5..8526af3c6d 100644 --- a/harbour/make_tpl.cmd +++ b/harbour/make_tpl.cmd @@ -3,7 +3,7 @@ rem rem $Id$ rem -rem Flavour: OS/2 +rem Flavour: OS/2 command file rem --------------------------------------------------------------- rem Template to initialize the environment before starting @@ -11,6 +11,9 @@ rem the GNU make system for Harbour rem rem For further information about the GNU make system please rem check doc/gmake.txt +rem +rem Copyright 1999 Victor Szel +rem See doc/license.txt for licensing terms. rem --------------------------------------------------------------- rem --------------------------------------------------------------- diff --git a/harbour/make_tpl.sh b/harbour/make_tpl.sh index 110c6f6e5a..1af56027c8 100644 --- a/harbour/make_tpl.sh +++ b/harbour/make_tpl.sh @@ -11,6 +11,9 @@ # # For further information about the GNU make system please # check doc/gmake.txt +# +# Copyright 1999 Victor Szel +# See doc/license.txt for licensing terms. # --------------------------------------------------------------- # ---------------------------------------------------------------