diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 81fa5962a5..da6d1c6b3e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,32 @@ +19991005-08:36 GMT+1 Victor Szel + * source/vm/main*.c + source/vm/Makefile + include/ctoharb.h + ! Some cleanup on the new main() functions. + (using header file, fixed CVS headers, added copyright header, removed a TODO, + TO DO -> TODO, Hungarian notation, global var name, 0 -> NULL, + added to GNU makefile, std main return value missing.) + * makefile.b40 (removed) + makefile.b32 + make_b40.bat + + makefile.b40 removed, since from now on makefile.b32 provides + the same functionality when B40 macro is defined. See make_b40.bat. + * *.bat + *.b?? + hbpplib.b32 (removed) + + Further uniformized. + + hbpp.exe make process uncommented from make_b16.bat. + We will see how it works. + + hbpplib.b32 incorporated into hbpp.b32 + - hbpp.b16 (removed) + makefile.b16 + make_b16.bat + - hbpp.b16 removed, since it was not used, and is now incorporated to + makefile.b16. + * source/runner/stdalone/hbrun.prg + + Using OutStd() instead of QOUT() to enable output redirecting like in + other command line utilites. + 19991005-07:55 GMT+1 Antonio Linares + New file source/vm/mainstd.c (entry point for std applications) + New file source/vm/mainwin.c (entry point for win appplications) diff --git a/harbour/gt.b32 b/harbour/gt.b32 index fb18ce54d8..d3cf59a685 100644 --- a/harbour/gt.b32 +++ b/harbour/gt.b32 @@ -48,5 +48,5 @@ numtxten.c : numtxten.prg harbour.exe bin\harbour $< /n /osource\tools\ /iinclude .c.obj: - bcc32 -c -O2 -I.\include -o$@ $< - tlib .\lib\b32\hbgt.lib -+$@,, + bcc32 -c -O2 -Iinclude -o$@ $< + tlib lib\b32\hbgt.lib -+$@,, diff --git a/harbour/hbpp.b16 b/harbour/hbpp.b16 deleted file mode 100644 index 5f3ea0bdb9..0000000000 --- a/harbour/hbpp.b16 +++ /dev/null @@ -1,11 +0,0 @@ -# -# $Id$ -# - -# makefile for Borland C/C++ 16 bits - -PROJECT: hbpp.exe - -hbpp.exe : source\pp\stdalone\hbpp.c - bcc -ml -Iinclude source\pp\stdalone\hbpp.c source\pp\hbpp.lib lib\b16\hbpp.lib - del source\pp\stdalone\hbpp.obj diff --git a/harbour/hbpp.b32 b/harbour/hbpp.b32 index 4c135458ca..b7a3d0a09a 100644 --- a/harbour/hbpp.b32 +++ b/harbour/hbpp.b32 @@ -4,8 +4,24 @@ # makefile for Borland C/C++ 32 bits -PROJECT: hbpp.exe +.path.c = source\pp +.path.h = include +.path.lib = lib\b32 +.path.obj = obj + +PROJECT: lib\b32\hbpp.lib hbpp.exe + +lib\b32\hbpp.lib : hbppint.obj hbpp.obj table.obj hbpplib.obj + +hbppint.obj : hbppint.c +hbpp.obj : hbpp.c +table.obj : table.c +hbpplib.obj : hbpplib.c + +.c.obj : + bcc32 -c -O2 -Iinclude -o$@ $< + tlib lib\b32\hbpp.lib -+$@,, hbpp.exe : source\pp\stdalone\hbpp.c - bcc32 -O2 -ebin\hbpp.exe -Iinclude source\pp\stdalone\hbpp.c lib\b32\hbpp.lib + bcc32 -O2 -ebin\hbpp.exe -Iinclude source\pp\stdalone\hbpp.c lib\b32\hbpp.lib del source\pp\stdalone\hbpp.obj diff --git a/harbour/hbpplib.b32 b/harbour/hbpplib.b32 deleted file mode 100644 index 1cd63f428f..0000000000 --- a/harbour/hbpplib.b32 +++ /dev/null @@ -1,22 +0,0 @@ -# -# $Id$ -# - -# makefile for Borland C/C++ 32 bits -# Preprocessor Library makefile - -.path.c = source\pp -.path.h = include -.path.lib = lib\b32 -.path.obj = obj - -lib\b32\hbpp.lib : hbppint.obj hbpp.obj table.obj hbpplib.obj - -hbppint.obj : hbppint.c -hbpp.obj : hbpp.c -table.obj : table.c -hbpplib.obj : hbpplib.c - -.c.obj : - bcc32 -c -O2 -I.\include;.\source\pp -o$@ $< - tlib .\lib\b32\hbpp.lib -+$@,, diff --git a/harbour/include/ctoharb.h b/harbour/include/ctoharb.h index 0ae249ceed..6097654e4c 100644 --- a/harbour/include/ctoharb.h +++ b/harbour/include/ctoharb.h @@ -69,6 +69,10 @@ #include "extend.h" +/* Harbour virtual machine init/exit functions */ +extern void hb_vmInit( void ); +extern void hb_vmQuit( void ); + /* Harbour virtual machine functions */ extern void hb_vmExecute( BYTE * pCode, PHB_SYMB pSymbols ); /* invokes the virtual machine */ extern void hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ); /* statics symbols initialization */ diff --git a/harbour/make_b16.bat b/harbour/make_b16.bat index 63aad0589d..8a74b04f92 100644 --- a/harbour/make_b16.bat +++ b/harbour/make_b16.bat @@ -3,5 +3,5 @@ rem rem $Id$ rem -make -fmakefile.b16 -rem make -fhbpp.b16 +make -fmakefile.b16 > make.err +edit make.err diff --git a/harbour/make_b32.bat b/harbour/make_b32.bat index 35c5d62620..3fdceb4f8e 100644 --- a/harbour/make_b32.bat +++ b/harbour/make_b32.bat @@ -3,11 +3,10 @@ rem rem $Id$ rem -make -fhbpplib.b32 > build32.err -make -fmakefile.b32 >> build32.err -make -fterminal.b32 >> build32.err -make -fgt.b32 >> build32.err -make -frdd.b32 >> build32.err -rem make -fhbpp.b32 >> build32.err -make -frunner.b32 >> build32.err -edit build32.err +make -fhbpp.b32 >> make.err +make -fmakefile.b32 >> make.err +make -fterminal.b32 >> make.err +make -fgt.b32 >> make.err +make -frdd.b32 >> make.err +make -frunner.b32 >> make.err +notepad make.err diff --git a/harbour/make_b40.bat b/harbour/make_b40.bat index 0ee1d89a29..b4668b7259 100644 --- a/harbour/make_b40.bat +++ b/harbour/make_b40.bat @@ -3,11 +3,10 @@ rem rem $Id$ rem -make -fhbpplib.b32 > build40.err -make -fmakefile.b40 >> build40.err -make -fterminal.b32 >> build40.err -make -fgt.b32 >> build40.err -make -frdd.b32 >> build40.err -rem make -fhbpp.b32 >> build40.err -make -frunner.b32 >> build40.err -Notepad build40.err +make -DB40 -fhbpp.b32 >> make.err +make -DB40 -fmakefile.b32 >> make.err +make -DB40 -fterminal.b32 >> make.err +make -DB40 -fgt.b32 >> make.err +make -DB40 -frdd.b32 >> make.err +make -DB40 -frunner.b32 >> make.err +notepad make.err diff --git a/harbour/make_vc.bat b/harbour/make_vc.bat index 2ef5140bbb..c3d4dd3225 100644 --- a/harbour/make_vc.bat +++ b/harbour/make_vc.bat @@ -3,6 +3,5 @@ rem rem $Id$ rem -if exist buildvc.err del buildVC.err -nmake /f makefile.vc %1 > BuildVC.err -notepad buildVC.err +nmake /f makefile.vc %1 > make.err +notepad make.err diff --git a/harbour/makefile.b16 b/harbour/makefile.b16 index 6dae0915cd..b567d61a1b 100644 --- a/harbour/makefile.b16 +++ b/harbour/makefile.b16 @@ -4,84 +4,129 @@ # makefile for Borland C/C++ 16 bits -.path.c = source\compiler;source\vm;source\rtl;source\tools +.path.c = source\compiler;source\vm;source\rtl;source\tools;source\rtl\gt;source\rtl\natmsg;source\pp;source\rdd .path.h = include .path.l = source\compiler .path.y = source\compiler .path.exe = bin .path.lib = lib\b16 .path.obj = obj -.path.prg = source\rtl;source\tools +.path.prg = source\rtl;source\tools;source\debug -PROJECT: harbour.lib lib\b16\terminal.lib harbour.exe +PROJECT: harbour.lib lib\b16\terminal.lib harbour.exe hbpp.exe -harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj dates.obj \ - dates2.obj datesx.obj cmdarg.obj \ - debug.obj descend.obj devoutp.obj dynsym.obj environ.obj terror.obj \ - errorapi.obj errorsys.obj harbinit.obj extend.obj files.obj fm.obj \ - hardcr.obj initsymb.obj itemapi.obj math.obj memofile.obj memvars.obj \ - mathx.obj mtran.obj objfunc.obj set.obj setcolor.obj stringp.obj \ - strings.obj stringsx.obj tclass.obj transfrm.obj +harbour.lib : achoice.obj adir.obj alert.obj arrays.obj asort.obj \ + browdb.obj \ + classes.obj codebloc.obj copyfile.obj \ + dates.obj dates2.obj datesx.obj debug.obj debugger.obj descend.obj devoutp.obj \ + dir.obj do.obj dynsym.obj environ.obj terror.obj cmdarg.obj \ + errorapi.obj errorsys.obj harbinit.obj extend.obj fileread.obj filesys.obj fm.obj \ + hardcr.obj hb_f.obj hvm.obj initsymb.obj inkey.obj itemapi.obj \ + langapi.obj math.obj mathx.obj memofile.obj memvars.obj menuto.obj mtran.obj msgen.obj \ + objfunc.obj readvar.obj xsavescr.obj memvarbl.obj \ + set.obj setcolor.obj setkey.obj strfmt.obj strings.obj symbols.obj stringp.obj \ + stringsx.obj tbcolumn.obj tbrowse.obj tbrwtext.obj tclass.obj tget.obj tgetlist.obj tone.obj transfrm.obj lib\b16\terminal.lib : console.obj console.obj : console.c extend.h hbdefs.h - bcc -c -O2 -I.\include -o$@ source\rtl\console.c - tlib .\lib\b16\terminal.lib -+$@,, + bcc -c -O2 -Iinclude -o$@ source\rtl\console.c + tlib lib\b16\terminal.lib -+$@,, +achoice.obj : achoice.c extend.h hbdefs.h +adir.obj : adir.c extend.h hbdefs.h +alert.obj : alert.c extend.h hbdefs.h arrays.obj : arrays.c extend.h hbdefs.h asort.obj : asort.c extend.h hbdefs.h +browdb.obj : browdb.c extend.h hbdefs.h classes.obj : classes.c extend.h hbdefs.h cmdarg.obj : cmdarg.c extend.h hbdefs.h codebloc.obj : codebloc.c extend.h hbdefs.h +copyfile.obj : copyfile.c extend.h hbdefs.h dates.obj : dates.c extend.h hbdefs.h dates2.obj : dates2.c extend.h hbdefs.h datesx.obj : datesx.c extend.h hbdefs.h debug.obj : debug.c extend.h hbdefs.h +debugger.obj : debugger.c extend.h hbdefs.h descend.obj : descend.c extend.h hbdefs.h +devout.obj : devout.c extend.h hbdefs.h devoutp.obj : devoutp.c extend.h hbdefs.h +dir.obj : dir.c extend.h hbdefs.h +do.obj : do.c extend.h hbdefs.h dynsym.obj : dynsym.c extend.h hbdefs.h environ.obj : environ.c extend.h hbdefs.h +terror.obj : terror.c extend.h hbdefs.h errorapi.obj : errorapi.c extend.h hbdefs.h errorsys.obj : errorsys.c extend.h hbdefs.h extend.obj : extend.c extend.h hbdefs.h -files.obj : extend.c extend.h hbdefs.h +fileread.obj : fileread.c extend.h hbdefs.h +filesys.obj : filesys.c extend.h hbdefs.h fm.obj : fm.c extend.h hbdefs.h harbinit.obj : harbinit.c extend.h hbdefs.h hardcr.obj : hardcr.c extend.h hbdefs.h +hb_f.obj : hb_f.c extend.h hbdefs.h +hvm.obj : hvm.c extend.h hbdefs.h initsymb.obj : initsymb.c extend.h hbdefs.h +inkey.obj : inkey.c extend.h hbdefs.h itemapi.obj : itemapi.c extend.h hbdefs.h +langapi.obj : langapi.c extend.h hbdefs.h math.obj : math.c extend.h hbdefs.h mathx.obj : mathx.c extend.h hbdefs.h memofile.obj : memofile.c extend.h hbdefs.h +memvarbl.obj : memvarbl.c extend.h hbdefs.h memvars.obj : memvars.c extend.h hbdefs.h +menuto.obj : menuto.c extend.h hbdefs.h +msgen.obj : msgen.c extend.h hbdefs.h mtran.obj : mtran.c extend.h hbdefs.h objfunc.obj : objfunc.c extend.h hbdefs.h set.obj : set.c extend.h hbdefs.h setcolor.obj : setcolor.c extend.h hbdefs.h init.h pcode.h +setkey.obj : setkey.c extend.h hbdefs.h +strfmt.obj : strfmt.c extend.h hbdefs.h stringp.obj : stringp.c extend.h hbdefs.h strings.obj : strings.c extend.h hbdefs.h stringsx.obj : stringsx.c extend.h hbdefs.h +tbcolumn.obj : tbcolumn.c extend.h hbdefs.h +tbrowse.obj : tbrowse.c extend.h hbdefs.h +tbrwtext.obj : tbrwtext.c extend.h hbdefs.h tclass.obj : tclass.c extend.h hbdefs.h -terror.obj : terror.c extend.h hbdefs.h +tget.obj : tget.c extend.h hbdefs.h +tgetlist.obj : tgetlist.c extend.h hbdefs.h +tone.obj : tone.c extend.h init.h inkey.h transfrm.obj : transfrm.c extend.h hbdefs.h +readvar.obj : readvar.c extend.h hbdefs.h +xsavescr.obj : xsavescr.c extend.h hbdefs.h +achoice.c : achoice.prg harbour.exe +adir.c : adir.prg harbour.exe +alert.c : alert.prg harbour.exe asort.c : asort.prg harbour.exe -devout.c : devout.prg harbour.exe +browdb.c : browdb.prg harbour.exe +debugger.c : debugger.prg harbour.exe +devoutp.c : devoutp.prg harbour.exe terror.c : terror.prg harbour.exe errorsys.c : errorsys.prg harbour.exe +fileread.c : fileread.prg harbour.exe harbinit.c : harbinit.prg harbour.exe +memvarbl.c : memvarbl.prg harbour.exe +menuto.c : menuto.prg harbour.exe objfunc.c : objfunc.prg harbour.exe +setkey.c : setkey.prg harbour.exe stringp.c : stringp.prg harbour.exe +tbcolumn.c : tbcolumn.prg harbour.exe +tbrowse.c : tbrowse.prg harbour.exe tclass.c : tclass.prg harbour.exe +tget.c : tget.prg harbour.exe +tgetlist.c : tgetlist.prg harbour.exe +readvar.c : readvar.prg harbour.exe +xsavescr.c : xsavescr.prg harbour.exe .prg.c: - bin\harbour $< /n /osource\rtl + bin\harbour $< /n /osource\rtl\ /iinclude .c.obj: - bcc -c -ml -O2 -I.\include -o$@ -DHARBOUR_USE_DOS_GTAPI $< - - tlib .\lib\b16\harbour.lib -+$@,, + bcc -c -ml -O2 -Iinclude -o$@ -DHARBOUR_USE_DOS_GTAPI $< + tlib lib\b16\harbour.lib -+$@,, harbour.exe : harboury.c harbourl.c harbour.obj echo -ml -O2 > bld.31 @@ -102,5 +147,9 @@ harbourl.c : harbour.l flex -i -8 -osource\compiler\harbourl.c source\compiler\harbour.l harbour.obj : harbour.c - bcc -c -ml -O2 -I.\include -osource\compiler\harbour.obj \ + bcc -c -ml -O2 -Iinclude -osource\compiler\harbour.obj \ source\compiler\harbour.c + +hbpp.exe : source\pp\stdalone\hbpp.c + bcc -ml -Iinclude source\pp\stdalone\hbpp.c lib\b16\hbpp.lib + del source\pp\stdalone\hbpp.obj diff --git a/harbour/makefile.b32 b/harbour/makefile.b32 index 50d400d691..fd0398c90f 100644 --- a/harbour/makefile.b32 +++ b/harbour/makefile.b32 @@ -4,7 +4,14 @@ # makefile for Borland C/C++ 32 bits -.path.asm = source\compiler +# avoid optimizer bug, when using compiler version 4.0 +!if $d(B40) + BCC_OPT = +!else + BCC_OPT = -O2 +!endif + +.path.asm = source\vm .path.c = source\compiler;source\vm;source\rtl;source\tools;source\rtl\gt;source\rtl\natmsg;source\pp;source\rdd .path.h = include .path.l = source\compiler @@ -28,6 +35,8 @@ harbour.lib : achoice.obj adir.obj alert.obj arrays.obj asort.obj \ set.obj setcolor.obj setkey.obj strfmt.obj strings.obj symbols.obj stringp.obj \ stringsx.obj tbcolumn.obj tbrowse.obj tbrwtext.obj tclass.obj tget.obj tgetlist.obj tone.obj transfrm.obj +symbols.obj : symbols.asm + achoice.obj : achoice.c extend.h hbdefs.h adir.obj : adir.c extend.h hbdefs.h alert.obj : alert.c extend.h hbdefs.h @@ -70,9 +79,10 @@ mainwin.obj : mainwin.c extend.h hbdefs.h math.obj : math.c extend.h hbdefs.h mathx.obj : mathx.c extend.h hbdefs.h memofile.obj : memofile.c extend.h hbdefs.h +memvarbl.obj : memvarbl.c extend.h hbdefs.h memvars.obj : memvars.c extend.h hbdefs.h menuto.obj : menuto.c extend.h hbdefs.h -msges.obj : msges.c extend.h hbdefs.h +msgen.obj : msgen.c extend.h hbdefs.h mtran.obj : mtran.c extend.h hbdefs.h objfunc.obj : objfunc.c extend.h hbdefs.h set.obj : set.c extend.h hbdefs.h @@ -92,7 +102,6 @@ tone.obj : tone.c extend.h init.h inkey.h transfrm.obj : transfrm.c extend.h hbdefs.h readvar.obj : readvar.c extend.h hbdefs.h xsavescr.obj : xsavescr.c extend.h hbdefs.h -memvarbl.obj : memvarbl.c extend.h hbdefs.h achoice.c : achoice.prg harbour.exe adir.c : adir.prg harbour.exe @@ -105,6 +114,7 @@ terror.c : terror.prg harbour.exe errorsys.c : errorsys.prg harbour.exe fileread.c : fileread.prg harbour.exe harbinit.c : harbinit.prg harbour.exe +memvarbl.c : memvarbl.prg harbour.exe menuto.c : menuto.prg harbour.exe objfunc.c : objfunc.prg harbour.exe setkey.c : setkey.prg harbour.exe @@ -116,19 +126,22 @@ tget.c : tget.prg harbour.exe tgetlist.c : tgetlist.prg harbour.exe readvar.c : readvar.prg harbour.exe xsavescr.c : xsavescr.prg harbour.exe -memvarbl.c : memvarbl.prg harbour.exe + +.asm.obj: + tasm32 $<, $@ + tlib lib\b32\harbour.lib -+$@,, .prg.c: bin\harbour $< /n /osource\rtl\ /iinclude .c.obj: - bcc32 -c -O2 -I.\include -o$@ -DHARBOUR_USE_WIN_GTAPI $< - tlib .\lib\b32\harbour.lib -+$@,, + bcc32 $(BCC_OPT) -c -Iinclude -o$@ -DHARBOUR_USE_WIN_GTAPI $< + tlib lib\b32\harbour.lib -+$@,, harbour.exe : harboury.c harbourl.c genc.obj genhrb.obj genjava.obj genrc.obj genpas.obj genobj32.obj harbour.obj compiler.h hbppint.c hbpp.c table.c - echo -O2 > bld.32 + echo $(BCC_OPT) > bld.32 echo -ebin\harbour.exe >> bld.32 - echo -Iinclude;source\compiler >> bld.32 + echo -Iinclude >> bld.32 echo source\compiler\harboury.c >> bld.32 echo source\compiler\harbourl.c >> bld.32 echo source\compiler\genobj32.obj >> bld.32 @@ -143,6 +156,8 @@ harbour.exe : harboury.c harbourl.c genc.obj genhrb.obj genjava.obj genrc.obj ge echo source\pp\table.c >> bld.32 bcc32 @bld.32 del bld.32 + del harboury.obj + del harbourl.obj harboury.c : harbour.y bison -d -v -y -osource\compiler\harboury.c source\compiler\harbour.y @@ -151,29 +166,29 @@ harbourl.c : harbour.l flex -i -8 -osource\compiler\harbourl.c source\compiler\harbour.l genobj32.obj : genobj32.c - bcc32 -c -O2 -I.\include -osource\compiler\genobj32.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\genobj32.obj \ source\compiler\genobj32.c genc.obj : genc.c - bcc32 -c -O2 -I.\include -osource\compiler\genc.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\genc.obj \ source\compiler\genc.c genhrb.obj : genhrb.c - bcc32 -c -O2 -I.\include -osource\compiler\genhrb.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\genhrb.obj \ source\compiler\genhrb.c genrc.obj : genrc.c - bcc32 -c -O2 -I.\include -osource\compiler\genrc.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\genrc.obj \ source\compiler\genrc.c genjava.obj : genjava.c - bcc32 -c -O2 -I.\include -osource\compiler\genjava.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\genjava.obj \ source\compiler\genjava.c genpas.obj : genpas.c - bcc32 -c -O2 -I.\include -osource\compiler\genpas.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\genpas.obj \ source\compiler\genpas.c harbour.obj : harbour.c - bcc32 -c -O2 -I.\include -osource\compiler\harbour.obj \ + bcc32 $(BCC_OPT) -c -Iinclude -osource\compiler\harbour.obj \ source\compiler\harbour.c diff --git a/harbour/makefile.b40 b/harbour/makefile.b40 deleted file mode 100644 index b0c92aa423..0000000000 --- a/harbour/makefile.b40 +++ /dev/null @@ -1,151 +0,0 @@ -# -# $Id$ -# - -# makefile for Borland C/C++ 32 bits - -.path.asm = source\compiler -.path.c = source\compiler;source\vm;source\rtl;source\tools;source\rtl\gt;source\rtl\natmsg;source\pp;source\rdd -.path.h = include -.path.l = source\compiler -.path.y = source\compiler -.path.exe = bin -.path.lib = lib\b32 -.path.obj = obj;source\compiler -.path.prg = source\rtl;source\tools - -PROJECT: harbour.exe harbour.lib lib\b32\terminal.lib lib\b32\termwin.lib - -harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj alert.obj \ - dates.obj dates2.obj datesx.obj debug.obj descend.obj devoutp.obj \ - dir.obj dynsym.obj environ.obj terror.obj menu.obj cmdarg.obj \ - errorapi.obj errorsys.obj harbinit.obj extend.obj files.obj \ - hardcr.obj hb_f.obj initsymb.obj inkey.obj itemapi.obj memvars.obj \ - memofile.obj math.obj mathx.obj msguk.obj mtran.obj objfunc.obj \ - set.obj setcolor.obj symbols.obj strings.obj stringp.obj \ - stringsx.obj tclass.obj transfrm.obj copyfile.obj - -symbols.obj : symbols.asm - -copyfile.obj : copyfile.c extend.h hbdefs.h -arrays.obj : arrays.c extend.h hbdefs.h -asort.obj : asort.c extend.h hbdefs.h -classes.obj : classes.c extend.h hbdefs.h -cmdarg.obj : cmdarg.c extend.h hbdefs.h -codebloc.obj : codebloc.c extend.h hbdefs.h -dates.obj : dates.c extend.h hbdefs.h -dates2.obj : dates2.c extend.h hbdefs.h -datesx.obj : datesx.c extend.h hbdefs.h -debug.obj : debug.c extend.h hbdefs.h -descend.obj : descend.c extend.h hbdefs.h -devout.obj : devout.c extend.h hbdefs.h -dir.obj : dir.c extend.h hbdefs.h -dynsym.obj : dynsym.c extend.h hbdefs.h -environ.obj : environ.c extend.h hbdefs.h -terror.obj : terror.c extend.h hbdefs.h -errorapi.obj : errorapi.c extend.h hbdefs.h -errorsys.obj : errorsys.c extend.h hbdefs.h -extend.obj : extend.c extend.h hbdefs.h -filesys.obj : filesys.c extend.h hbdefs.h -fm.obj : fm.c extend.h hbdefs.h -harbinit.obj : harbinit.c extend.h hbdefs.h -hardcr.obj : hardcr.c extend.h hbdefs.h -hb_f.obj : hb_f.c extend.h hbdefs.h -initsymb.obj : initsymb.c extend.h hbdefs.h -inkey.obj : inkey.c extend.h hbdefs.h -itemapi.obj : itemapi.c extend.h hbdefs.h -math.obj : math.c extend.h hbdefs.h -memvars.obj : memvars.c extend.h hbdefs.h -memofile.obj : memofile.c extend.h hbdefs.h -mathx.obj : mathx.c extend.h hbdefs.h -msguk.obj : msguk.c extend.h hbdefs.h -mtran.obj : mtran.c extend.h hbdefs.h -objfunc.obj : objfunc.c extend.h hbdefs.h -set.obj : set.c extend.h hbdefs.h -setcolor.obj : setcolor.c extend.h hbdefs.h init.h pcode.h -stringp.obj : stringp.c extend.h hbdefs.h -strings.obj : strings.c extend.h hbdefs.h -stringsx.obj : stringsx.c extend.h hbdefs.h -tclass.obj : tclass.c extend.h hbdefs.h -transfrm.obj : transfrm.c extend.h hbdefs.h -menu.obj : menu.c extend.h hbdefs.h -alert.obj : alert.c extend.h hbdefs.h - -asort.c : asort.prg harbour.exe -devoutp.c : devoutp.prg harbour.exe -terror.c : terror.prg harbour.exe -errorsys.c : errorsys.prg harbour.exe -harbinit.c : harbinit.prg harbour.exe -objfunc.c : objfunc.prg harbour.exe -stringp.c : stringp.prg harbour.exe -tclass.c : tclass.prg harbour.exe -menu.c : menu.prg harbour.exe -alert.c : alert.prg harbour.exe - -.asm.obj: - tasm32 $<, $@ - tlib .\lib\b32\harbour.lib -+$@,, - -.prg.c: - bin\harbour $< /n /osource\rtl /iinclude - -.c.obj: - bcc32 -c -I.\include -o$@ -DHARBOUR_USE_WIN_GTAPI $< - tlib .\lib\b32\harbour.lib -+$@,, - -harbour.exe : harboury.c harbourl.c genc.obj genhrb.obj genjava.obj genrc.obj genpas.obj genobj32.obj harbour.obj compiler.h hbppint.c hbpp.c table.c - echo -ebin\harbour.exe >> bld.32 - echo -Iinclude >> bld.32 - echo source\compiler\harboury.c >> bld.32 - echo source\compiler\harbourl.c >> bld.32 - echo source\compiler\genobj32.obj >> bld.32 - echo source\compiler\genc.obj >> bld.32 - echo source\compiler\genhrb.obj >> bld.32 - echo source\compiler\genjava.obj >> bld.32 - echo source\compiler\genrc.obj >> bld.32 - echo source\compiler\genpas.obj >> bld.32 - echo source\compiler\harbour.obj >> bld.32 - echo source\pp\hbppint.c >> bld.32 - echo source\pp\hbpp.c >> bld.32 - echo source\pp\table.c >> bld.32 - bcc32 @bld.32 - del bld.32 - del harboury.obj - del harbourl.obj - del hbppint.obj - del hbpp.obj - del table.obj - -harboury.c : harbour.y - bison -d -v -y -osource\compiler\harboury.c source\compiler\harbour.y - -harbourl.c : harbour.l - flex -i -8 -osource\compiler\harbourl.c source\compiler\harbour.l - -genobj32.obj : genobj32.c - bcc32 -c -I.\include -osource\compiler\genobj32.obj \ - source\compiler\genobj32.c - -genc.obj : genc.c - bcc32 -c -I.\include -osource\compiler\genc.obj \ - source\compiler\genc.c - -genhrb.obj : genhrb.c - bcc32 -c -I.\include -osource\compiler\genhrb.obj \ - source\compiler\genhrb.c - -genrc.obj : genrc.c - bcc32 -c -I.\include -osource\compiler\genrc.obj \ - source\compiler\genrc.c - -genjava.obj : genjava.c - bcc32 -c -I.\include -osource\compiler\genjava.obj \ - source\compiler\genjava.c - -genpas.obj : genpas.c - bcc32 -c -I.\include -osource\compiler\genpas.obj \ - source\compiler\genpas.c - -harbour.obj : harbour.c - bcc32 -c -I.\include -osource\compiler\harbour.obj \ - source\compiler\harbour.c diff --git a/harbour/rdd.b32 b/harbour/rdd.b32 index 5de86baa54..0024b8e75b 100644 --- a/harbour/rdd.b32 +++ b/harbour/rdd.b32 @@ -32,8 +32,8 @@ delim0.obj : delim0.c delim1.obj : delim1.c .c.obj : - bcc32 -c -O2 -I.\include -o$@ -v $< - tlib .\lib\b32\rdd.lib -+$@,, + bcc32 -c -O2 -Iinclude -o$@ -v $< + tlib lib\b32\rdd.lib -+$@,, .prg.c: bin\harbour $< /n /osource\rdd\ /iinclude diff --git a/harbour/runner.b32 b/harbour/runner.b32 index 9dc08ba5b7..3e66997624 100644 --- a/harbour/runner.b32 +++ b/harbour/runner.b32 @@ -24,8 +24,8 @@ external.c : external.prg bin\harbour $< /n /osource\runner\stdalone\ /iinclude /p .c.obj: - bcc32 -c -O2 -I.\include -v -o$@ -DHARBOUR_USE_WIN_GTAPI $< - tlib .\lib\b32\runner.lib -+$@,, + bcc32 -c -O2 -Iinclude -v -o$@ -DHARBOUR_USE_WIN_GTAPI $< + tlib lib\b32\runner.lib -+$@,, hbrun.exe : hbrun.c external.c runlib.c echo -v -O2 > bld.32 diff --git a/harbour/source/runner/stdalone/hbrun.prg b/harbour/source/runner/stdalone/hbrun.prg index fa98d223e2..9df6e43e8f 100644 --- a/harbour/source/runner/stdalone/hbrun.prg +++ b/harbour/source/runner/stdalone/hbrun.prg @@ -39,10 +39,10 @@ FUNCTION Main( cHRBFile, cPar1, cPar2, cPar3, cPar4, cPar5, cPar6, cPar7, cPar8, LOCAL xRetVal IF Empty( cHRBFile ) - ?? "Harbour Runner" - ? "Copyright 1999, http://www.harbour-project.org" - ? - ? "Syntax: hbrun [parameters]" + OutStd( "Harbour Runner" + HB_OSNewLine() +; + "Copyright 1999, http://www.harbour-project.org" + HB_OSNewLine() +; + HB_OSNewLine() +; + "Syntax: hbrun [parameters]" + HB_OSNewLine() ) ELSE xRetVal := __hrbRun( cHRBFile, cPar1, cPar2, cPar3, cPar4, cPar5, cPar6, cPar7, cPar8, cPar9 ) ENDIF diff --git a/harbour/source/vm/Makefile b/harbour/source/vm/Makefile index 2efa075c3d..d5801a84fc 100644 --- a/harbour/source/vm/Makefile +++ b/harbour/source/vm/Makefile @@ -10,6 +10,7 @@ C_SOURCES=\ dynsym.c \ hvm.c \ initsymb.c \ + mainstd.c \ LIB=vm diff --git a/harbour/source/vm/mainstd.c b/harbour/source/vm/mainstd.c index 06200ce8f5..534e15f838 100644 --- a/harbour/source/vm/mainstd.c +++ b/harbour/source/vm/mainstd.c @@ -1,15 +1,46 @@ /* - * $Id + * $Id$ */ -/* Std applications entry point */ +/* + * Harbour Project source code: + * Std applications entry point + * + * 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/). + * + */ -void hb_vmInit( void ); -void hb_vmQuit( void ); +#include "extend.h" +#include "ctoharb.h" int main( int argc, char * argv[] ) { hb_cmdargInit( argc, argv ); hb_vmInit(); hb_vmQuit(); + + return 0; } diff --git a/harbour/source/vm/mainwin.c b/harbour/source/vm/mainwin.c index a61321e9a3..039b89b98e 100644 --- a/harbour/source/vm/mainwin.c +++ b/harbour/source/vm/mainwin.c @@ -1,8 +1,37 @@ /* - * $Id + * $Id$ */ -/* Windows applications entry point */ +/* + * Harbour Project source code: + * Windows applications entry point + * + * 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/). + * + */ #include @@ -10,20 +39,22 @@ void hb_cmdargInit( int argc, char * argv[] ); void hb_vmInit( void ); void hb_vmQuit( void ); -HANDLE hb_hInstance = 0, hb_hPrevInstance = 0; +HANDLE hb_g_hInstance = 0, hb_g_hPrevInstance = 0; int WINAPI WinMain( HINSTANCE hInstance, /* handle to current instance */ HINSTANCE hPrevInstance, /* handle to previous instance */ LPSTR lpCmdLine, /* pointer to command line */ - int nCmdShow ) /* show state of window */ + int iCmdShow ) /* show state of window */ { - char * argv[ 1 ]; /* TO DO: parse lpCmdLine and generate the proper values */ + char * argv[ 1 ]; /* TODO: parse lpCmdLine and generate the proper values */ - argv[ 0 ] = 0; /* temporary workaround */ + argv[ 0 ] = NULL; /* temporary workaround */ hb_cmdargInit( 0, argv ); hb_vmInit(); hb_vmQuit(); - return 0; /* TO DO: return the proper exit value */ + /* NOTE: The exit value is set by _exit() */ + + return 0; } diff --git a/harbour/terminal.b32 b/harbour/terminal.b32 index 88cc196781..078ab37db9 100644 --- a/harbour/terminal.b32 +++ b/harbour/terminal.b32 @@ -18,7 +18,7 @@ gtapi.obj : gtapi.c extend.h hbdefs.h gtwin.obj : gtwin.c extend.h hbdefs.h .c.obj: - bcc32 -wmsg -c -O2 -DHARBOUR_USE_WIN_GTAPI -I.\include -v -o$@ $< - tlib .\lib\b32\terminal.lib -+$@,, - bcc32 -wmsg -c -O2 -I.\include -v -o$@ $< - tlib .\lib\b32\termwin.lib -+$@,, + bcc32 -wmsg -c -O2 -DHARBOUR_USE_WIN_GTAPI -Iinclude -v -o$@ $< + tlib lib\b32\terminal.lib -+$@,, + bcc32 -wmsg -c -O2 -Iinclude -v -o$@ $< + tlib lib\b32\termwin.lib -+$@,,