From bba4046bb1f0cf0aa4e7b8874cc94ceadd5e5262 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 16 Sep 1999 09:34:13 +0000 Subject: [PATCH] 19990916-11:15 GMT+1 --- harbour/ChangeLog | 23 ++++++++++ harbour/makefile.b16 | 8 ++-- harbour/makefile.b31 | 3 +- harbour/makefile.b32 | 8 ++-- harbour/makefile.b40 | 8 ++-- harbour/makefile.vc | 6 ++- harbour/source/rtl/Makefile | 1 + harbour/source/rtl/achoice.prg | 15 +++---- harbour/source/rtl/adir.prg | 58 ++++++++++++------------ harbour/source/rtl/alert.prg | 25 +++++++---- harbour/source/rtl/asort.prg | 8 ++-- harbour/source/rtl/browdb.prg | 36 +++++++++------ harbour/source/rtl/devoutp.prg | 78 +++++++++++++++++---------------- harbour/source/rtl/errorsys.prg | 68 ++++++++++++---------------- harbour/source/rtl/harbinit.prg | 56 +++++++++++++++++++++++ harbour/source/rtl/memvarbl.prg | 62 +++++++++++++------------- harbour/source/rtl/menuto.prg | 27 +++++++----- harbour/source/rtl/objfunc.prg | 27 ++++++------ harbour/source/rtl/readvar.prg | 58 ++++++++++++------------ harbour/source/rtl/setkey.prg | 72 ++++++++++++++++-------------- harbour/source/rtl/tbcolumn.prg | 58 ++++++++++++------------ harbour/source/rtl/tbrowse.prg | 59 ++++++++++++------------- harbour/source/rtl/tclass.prg | 20 +++++---- harbour/source/rtl/terror.prg | 2 +- harbour/source/rtl/tget.prg | 2 +- harbour/source/rtl/tgetlist.prg | 2 +- harbour/source/rtl/xsavescr.prg | 2 +- harbour/source/vm/hvm.c | 25 +++++++++-- 28 files changed, 475 insertions(+), 342 deletions(-) create mode 100644 harbour/source/rtl/harbinit.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 01e2df154a..43c1815100 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,26 @@ +19990916-11:15 GMT+1 Victor Szel + + * source/vm/hvm.c + + __XHELP() function added. + ; So now if we had defined a function named HELP() in our app, it will be + called by default if the user presses the F1 key. Like in Clipper. + + Now using SYSINIT to force linking of the system init modul, instead of + ERRORSYS. Forcing ERRORNEW explicitly is not needed, so it's now removed. + * source/rtl/harbinit.prg + + ANNOUNCE SYSINIT added. + + __SETHELPK() function added. + * source/rtl/harbinit.prg (added) + source/rtl/errorsys.prg + source/rtl/Makefile + makefile.* + ! ClipInit() INIT procedure moved from ERRORSYS to a separate .prg, + this way the ERRORSYS.PRG module is completely replacable, like in + Clipper. + ( ! Borland and MSVC users please check the modified Makefiles ! ) + * source/rtl/*.prg + + All copyright header changed to the new one. + + Missing copyright headers added. + 19990916-13:07 GMT+3 Alexander Kresin * source/hbpp/hbpp.c * fixed bug with Release ( noted by David G. Holm ) diff --git a/harbour/makefile.b16 b/harbour/makefile.b16 index 19574d1b41..3152bb7743 100644 --- a/harbour/makefile.b16 +++ b/harbour/makefile.b16 @@ -1,6 +1,6 @@ -# +# # $Id$ -# +# # makefile for Borland C/C++ 16 bits @@ -18,7 +18,7 @@ PROJECT: harbour.lib libs\b16\terminal.lib libs\win16\terminal.lib harbour.exe harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj dates.obj \ dates2.obj datesx.obj \ debug.obj descend.obj devoutp.obj dynsym.obj environ.obj terror.obj \ - errorapi.obj errorsys.obj extend.obj files.obj fm.obj \ + errorapi.obj errorsys.obj harbinit.obj extend.obj files.obj fm.obj \ hardcr.obj initsymb.obj itemapi.obj math.obj memvars.obj \ mathx.obj mtran.obj objfunc.obj set.obj setcolor.obj stringp.obj \ strings.obj stringsx.obj tclass.obj transfrm.obj @@ -50,6 +50,7 @@ errorsys.obj : errorsys.c extend.h hbdefs.h extend.obj : extend.c extend.h hbdefs.h files.obj : extend.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 initsymb.obj : initsymb.c extend.h hbdefs.h itemapi.obj : itemapi.c extend.h hbdefs.h @@ -71,6 +72,7 @@ asort.c : asort.prg harbour.exe devout.c : devout.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 diff --git a/harbour/makefile.b31 b/harbour/makefile.b31 index 9d1c363d8c..92a51df616 100644 --- a/harbour/makefile.b31 +++ b/harbour/makefile.b31 @@ -20,7 +20,7 @@ PROJECT: harbour.lib hbtools.lib terminal.lib libs\win16\terminal.lib harbour.lib : arrays.obj asort.obj classes.obj codebloc.obj copyfile.obj \ dates.obj descend.obj devoutp.obj dir.obj dynsym.obj environ.obj \ - terror.obj errorapi.obj errorsys.obj extend.obj \ + terror.obj errorapi.obj errorsys.obj harbinit.obj extend.obj \ filesys.obj gtapi.obj hardcr.obj initsymb.obj itemapi.obj \ math.obj memvars.obj mtran.obj msguk.obj objfunc.obj \ set.obj setcolor.obj strings.obj symbols.obj \ @@ -62,6 +62,7 @@ extend.obj : extend.c extend.h hbdefs.h set.h dates.h filesys.obj : filesys.c extend.h hbdefs.h fm.obj : fm.c extend.h hbdefs.h gtapi.obj : gtapi.c extend.h hbdefs.h gtapi.h +harbinit.obj : harbinit.prg extend.h hbdefs.h init.h pcode.h hardcr.obj : hardcr.c extend.h hbdefs.h itemapi.obj : itemapi.c extend.h hbdefs.h ctoharb.h itemapi.h set.h dates.h math.obj : math.c extend.h hbdefs.h diff --git a/harbour/makefile.b32 b/harbour/makefile.b32 index 647fc18a50..af051aa452 100644 --- a/harbour/makefile.b32 +++ b/harbour/makefile.b32 @@ -1,6 +1,6 @@ -# +# # $Id$ -# +# # makefile for Borland C/C++ 32 bits @@ -21,7 +21,7 @@ harbour.lib : achoice.obj adir.obj alert.obj arrays.obj asort.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 \ - errorapi.obj errorsys.obj extend.obj fileread.obj filesys.obj fm.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 memvars.obj menuto.obj mtran.obj msges.obj \ objfunc.obj readvar.obj xsavescr.obj\ @@ -56,6 +56,7 @@ extend.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 @@ -98,6 +99,7 @@ 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 menuto.c : menuto.prg harbour.exe objfunc.c : objfunc.prg harbour.exe setkey.c : setkey.prg harbour.exe diff --git a/harbour/makefile.b40 b/harbour/makefile.b40 index a81bb2abe8..a506530db5 100644 --- a/harbour/makefile.b40 +++ b/harbour/makefile.b40 @@ -1,6 +1,6 @@ -# +# # $Id$ -# +# # makefile for Borland C/C++ 32 bits @@ -19,7 +19,7 @@ PROJECT: harbour.exe harbour.lib libs\b32\terminal.lib libs\win32\terminal.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 \ - errorapi.obj errorsys.obj extend.obj files.obj \ + errorapi.obj errorsys.obj harbinit.obj extend.obj files.obj \ hardcr.obj hb_f.obj initsymb.obj inkey.obj itemapi.obj memvars.obj \ math.obj mathx.obj msguk.obj mtran.obj objfunc.obj \ set.obj setcolor.obj symbols.obj strings.obj stringp.obj \ @@ -47,6 +47,7 @@ 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 @@ -72,6 +73,7 @@ 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 diff --git a/harbour/makefile.vc b/harbour/makefile.vc index c6c09a99b8..d175d66c1c 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -1,4 +1,4 @@ -# +# # $Id$ # @@ -81,6 +81,7 @@ HARBOUR_LIB_OBJS = \ $(OBJ_DIR)\filesys.obj \ $(OBJ_DIR)\fm.obj \ $(OBJ_DIR)\gtapi.obj \ + $(OBJ_DIR)\harbinit.obj \ $(OBJ_DIR)\hardcr.obj \ $(OBJ_DIR)\hvm.obj \ $(OBJ_DIR)\initsymb.obj \ @@ -389,6 +390,9 @@ $(OBJ_DIR)\gtapi.obj : $(RTL_DIR)\gtapi.c $(OBJ_DIR)\gtxxx.obj : $(RTL_DIR)\gtxxx.c $(CC) $(CLIBFLAGS) -Fo$@ $** +$(RTL_DIR)\harbinit.c : $(RTL_DIR)\harbinit.prg + $(HARBOUR_EXE) $** $(HARBOURFLAGS) -o$(**D) + $(OBJ_DIR)\hardcr.obj : $(RTL_DIR)\hardcr.c $(CC) $(CLIBFLAGS) -Fo$@ $** diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 2adef8c115..b554d1849c 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -46,6 +46,7 @@ PRG_SOURCES=\ browdb.prg \ devoutp.prg \ errorsys.prg \ + harbinit.prg \ memvarbl.prg \ menuto.prg \ objfunc.prg \ diff --git a/harbour/source/rtl/achoice.prg b/harbour/source/rtl/achoice.prg index 74364b32a1..a23f3cc3ce 100644 --- a/harbour/source/rtl/achoice.prg +++ b/harbour/source/rtl/achoice.prg @@ -3,14 +3,13 @@ */ /* - Harbour Project source code - www - http://www.Harbour-Project.org - - A pure Clipper emulation of the ACHOICE function. - - Author: Peter Townsend - Code donated to the Public Domain -*/ + * Harbour Project source code: + * ACHOICE() function + * + * Released to Public Domain by Peter Townsend + * www - http://www.harbour-project.org + * + */ #include "inkey.ch" #include "setcurs.ch" diff --git a/harbour/source/rtl/adir.prg b/harbour/source/rtl/adir.prg index 0d57e1b383..fcbab76ce5 100644 --- a/harbour/source/rtl/adir.prg +++ b/harbour/source/rtl/adir.prg @@ -3,35 +3,35 @@ */ /* - Harbour Project source code - - Clipper compatibility function ADIR(). - - Copyright (C) 1999 Victor Szel - 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/). -*/ + * Harbour Project source code: + * ADIR() function + * + * Copyright 1999 Victor Szel + * 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 "directry.ch" diff --git a/harbour/source/rtl/alert.prg b/harbour/source/rtl/alert.prg index c055435a1f..6aab400720 100644 --- a/harbour/source/rtl/alert.prg +++ b/harbour/source/rtl/alert.prg @@ -3,15 +3,24 @@ */ /* - Harbour Project source code - www - http://www.Harbour-Project.org + * Harbour Project source code: + * ALERT() function + * + * Released to Public Domain by Vladimir Kazimirchik + * www - http://www.harbour-project.org + * + */ - Written by Vladimir Kazimirchik - http://i.am/kzm - Clipper compatibility additions by Victor Szel - - Released into public domain. -*/ +/* + * The following parts are Copyright of the individual authors. + * www - http://www.harbour-project.org + * + * Copyright 1999 Victor Szel + * Changes for higher Clipper compatibility + * + * See doc/license.txt for licensing terms. + * + */ #include "box.ch" #include "inkey.ch" diff --git a/harbour/source/rtl/asort.prg b/harbour/source/rtl/asort.prg index 4b38fc820d..614c2ed62e 100644 --- a/harbour/source/rtl/asort.prg +++ b/harbour/source/rtl/asort.prg @@ -3,10 +3,11 @@ */ /* - * ASORT - Sort an array + * Harbour Project source code: + * ASORT() function * - * Copyright (C) 1999 Eddie Runia (eddie@runia.com) - * Part of the Harbour Project www.harbour-project.org + * Copyright 1999 Eddie Runia + * 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 @@ -29,6 +30,7 @@ * 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/). + * */ /* diff --git a/harbour/source/rtl/browdb.prg b/harbour/source/rtl/browdb.prg index 4ac540a15f..029b38ee3d 100644 --- a/harbour/source/rtl/browdb.prg +++ b/harbour/source/rtl/browdb.prg @@ -3,24 +3,34 @@ */ /* - * Harbour Class TBrowse - * Copyright(C) 1999 by Paul Tucker + * Harbour Project source code: + * TBROWSEDB() function + * + * Copyright 1999 Paul Tucker + * 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. + * 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: * - * 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. + * 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. * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to: + * 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/). * - * The Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. */ /* TODO: replace calls to _LastRec() and _Recno() with real versions. */ diff --git a/harbour/source/rtl/devoutp.prg b/harbour/source/rtl/devoutp.prg index 60a3964e42..179f37fe6c 100644 --- a/harbour/source/rtl/devoutp.prg +++ b/harbour/source/rtl/devoutp.prg @@ -3,44 +3,48 @@ */ /* - Harbour Project source code + * Harbour Project source code: + * DEVOUTPICT() function + * + * Copyright 1999 David G. Holm + * 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/). + * + */ - This file contains the Harbour function that outputs expressions - using picture transformations - - Copyright 1999 David G. Holm - 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/). - - V 1.4 Paul Tucker Second param to Devout should be - the color. - V 1.3 David G. Holm Added my email address. - V 1.2 David G. Holm Removed "(C)" from Copyright and - updated previous version comments. - V 1.1 David G. Holm Submitted to Harbour Project. - V 1.0 David G. Holm Initial version. -*/ +/* + * ChangeLog: + * + * V 1.4 Paul Tucker Second param to Devout should be + * the color. + * V 1.3 David G. Holm Added my email address. + * V 1.2 David G. Holm Removed "(C)" from Copyright and + * updated previous version comments. + * V 1.1 David G. Holm Submitted to Harbour Project. + * V 1.0 David G. Holm Initial version. + * + */ /* $DOC$ * $FUNCNAME$ diff --git a/harbour/source/rtl/errorsys.prg b/harbour/source/rtl/errorsys.prg index c0de98aa4c..48ff0dd12a 100644 --- a/harbour/source/rtl/errorsys.prg +++ b/harbour/source/rtl/errorsys.prg @@ -3,35 +3,35 @@ */ /* - Harbour Project source code - - The error handler - - Copyright 1999 Antonio Linares - 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/). -*/ + * Harbour Project source code: + * The default error handler + * + * Copyright 1999 Antonio Linares + * 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/). + * + */ // Standard Harbour ErrorSys system @@ -42,16 +42,6 @@ //----------------------------------------------------------------------------// -init procedure ClipInit - - public getlist := {} - - ErrorSys() - -return - -//----------------------------------------------------------------------------// - procedure ErrorSys ErrorBlock( { | oError | DefError( oError ) } ) diff --git a/harbour/source/rtl/harbinit.prg b/harbour/source/rtl/harbinit.prg new file mode 100644 index 0000000000..4ba6849348 --- /dev/null +++ b/harbour/source/rtl/harbinit.prg @@ -0,0 +1,56 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Main Harbour initialization functions CLIPINIT() + * + * Copyright 1999 Victor Szel + * 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 "inkey.ch" + +ANNOUNCE SysInit + +INIT PROCEDURE ClipInit + + PUBLIC getlist := {} + + ErrorSys() + + /* TOFIX: In Clipper this function is not called from here CLIPINIT(). */ + /* NOTE: In Clipper __SETHELPK() is called *after* ERRORSYS(). */ + __SetHelpK() + + RETURN + +FUNCTION __SetHelpK + + SET KEY K_F1 TO __XHELP + + RETURN NIL diff --git a/harbour/source/rtl/memvarbl.prg b/harbour/source/rtl/memvarbl.prg index e229d527f5..98fc527ff6 100644 --- a/harbour/source/rtl/memvarbl.prg +++ b/harbour/source/rtl/memvarbl.prg @@ -3,37 +3,35 @@ */ /* - Harbour Project source code - - This function returns a codeblock to set/get a value of PUBLIC - or PRIVATE variable - - Copyright 1999 Ryszard Glab - 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/). - -*/ + * Harbour Project source code: + * MEMVARBLOCK() function + * + * Copyright 1999 Ryszard Glab + * 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 "memvars.ch" @@ -82,7 +80,7 @@ FUNCTION MEMVARBLOCK( cMemvar ) IF ( ValType( cMemvar ) == "C" ) .AND. __mvSCOPE( cMemvar ) > MV_ERROR - RETURN {| x | IIF( PCOUNT() == 0, __mvGET( cMemvar ), __mvPUT( cMemvar, x ) ) } + RETURN {| x | iif( PCount() == 0, __mvGET( cMemvar ), __mvPUT( cMemvar, x ) ) } ENDIF RETURN NIL diff --git a/harbour/source/rtl/menuto.prg b/harbour/source/rtl/menuto.prg index a94a5a3a04..517d861da6 100644 --- a/harbour/source/rtl/menuto.prg +++ b/harbour/source/rtl/menuto.prg @@ -3,17 +3,24 @@ */ /* - Harbour Project source code - www - http://www.Harbour-Project.org + * Harbour Project source code: + * PROMPT/MENU TO commands + * + * Released to Public Domain by Phil Barnett + * www - http://www.harbour-project.org + * + */ - A pure Clipper emulation of the PROMPT/MENU TO commands. - - Author: Phil Barnett - Released to Public Domain - - Changes for higher Clipper compatibility by: - Victor Szel -*/ +/* + * The following parts are Copyright of the individual authors. + * www - http://www.harbour-project.org + * + * Copyright 1999 Victor Szel + * Changes for higher Clipper compatibility + * + * See doc/license.txt for licensing terms. + * + */ /* NOTE: Recursive use is supported */ diff --git a/harbour/source/rtl/objfunc.prg b/harbour/source/rtl/objfunc.prg index 9224c4c760..fb1c5fa27a 100644 --- a/harbour/source/rtl/objfunc.prg +++ b/harbour/source/rtl/objfunc.prg @@ -3,12 +3,11 @@ */ /* - * OBJFUNC + * Harbour Project source code: + * Dynamic Object management and misc. Object related functions * - * Contains additional object oriented functions - * - * Copyright (C) 1999 Eddie Runia - * Part of the Harbour Project www.harbour-project.org + * Copyright 1999 Eddie Runia + * 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 @@ -34,14 +33,16 @@ * */ -/* Harbour Project source code - http://www.Harbour-Project.org/ - - The following functions are Copyright 1999 Antonio Linares : - __objGetMsgList - - See doc/hdr_tpl.txt, Version 1.2 or later, for licensing terms. -*/ +/* + * The following parts are Copyright of the individual authors. + * www - http://www.harbour-project.org + * + * Copyright 1999 Antonio Linares + * __objGetMsgList + * + * See doc/license.txt for licensing terms. + * + */ #include "hboo.ch" #include "error.ch" diff --git a/harbour/source/rtl/readvar.prg b/harbour/source/rtl/readvar.prg index 3625dfad28..5bf6b2bcf0 100644 --- a/harbour/source/rtl/readvar.prg +++ b/harbour/source/rtl/readvar.prg @@ -3,35 +3,35 @@ */ /* - Harbour Project source code - - READVAR() - - Copyright (C) 1999 Victor Szel - 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/). -*/ + * Harbour Project source code: + * READVAR() function + * + * Copyright 1999 Victor Szel + * 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/). + * + */ FUNCTION ReadVar( cVarName ) STATIC s_cVarName := "" diff --git a/harbour/source/rtl/setkey.prg b/harbour/source/rtl/setkey.prg index d92f96217d..9fb6e82423 100644 --- a/harbour/source/rtl/setkey.prg +++ b/harbour/source/rtl/setkey.prg @@ -3,41 +3,45 @@ */ /* - Harbour Project source code + * Harbour Project source code: + * SETKEY() and related functions + * + * Copyright 1999 A White + * 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/). + * + */ - This file contains the Harbour function(s) that maintain the list - of set-keys (hot-keys). - - By: A White - awhite@user.rose.com - 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/). - - V 1.1 A White Fixed wrong parameter aClone() bug in SetKeySave() - Added SetKeyCheck() - Added SetKeyGet() - V 1.0 A White Initial version, submitted to Harbour Projects -*/ +/* + * ChangeLog: + * + * V 1.1 A White Fixed wrong parameter aClone() bug in SetKeySave() + * Added SetKeyCheck() + * Added SetKeyGet() + * V 1.0 A White Initial version, submitted to Harbour Projects + * + */ // macro substitutions to access sub-array elements of aSetKeys[] #define KEY 1 diff --git a/harbour/source/rtl/tbcolumn.prg b/harbour/source/rtl/tbcolumn.prg index aaf6699121..ced8d96092 100644 --- a/harbour/source/rtl/tbcolumn.prg +++ b/harbour/source/rtl/tbcolumn.prg @@ -3,35 +3,35 @@ */ /* - Harbour Project source code - - Harbour Class TBColumn - - Copyright 1999 Antonio Linares - 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/). -*/ + * Harbour Project source code: + * TBColumn Class + * + * Copyright 1999 Antonio Linares + * 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 "classes.ch" diff --git a/harbour/source/rtl/tbrowse.prg b/harbour/source/rtl/tbrowse.prg index 2b1d2cf586..2ea38dedb4 100644 --- a/harbour/source/rtl/tbrowse.prg +++ b/harbour/source/rtl/tbrowse.prg @@ -3,36 +3,35 @@ */ /* - Harbour Project source code - - Harbour Class TBrowse - - Copyright 1999 Antonio Linares - Portions Copyright(c) 1999 Alexander S.Kresin - 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/). -*/ + * Harbour Project source code: + * TBrowse Class + * + * Copyright 1999 Antonio Linares + * 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 "classes.ch" #include "color.ch" diff --git a/harbour/source/rtl/tclass.prg b/harbour/source/rtl/tclass.prg index 7d2baf3362..156774032e 100644 --- a/harbour/source/rtl/tclass.prg +++ b/harbour/source/rtl/tclass.prg @@ -33,15 +33,17 @@ * */ -/* Harbour Project source code - http://www.Harbour-Project.org/ - - The following functions are Copyright 1999 Eddie Runia : - Support for inheritance - Support for default DATA values - - See doc/hdr_tpl.txt, Version 1.2 or later, for licensing terms. -*/ +/* + * The following parts are Copyright of the individual authors. + * www - http://www.harbour-project.org + * + * Copyright 1999 Eddie Runia + * Support for inheritance + * Support for default DATA values + * + * See doc/license.txt for licensing terms. + * + */ // Harbour Class TClass to build classes diff --git a/harbour/source/rtl/terror.prg b/harbour/source/rtl/terror.prg index ad217d7c42..52193450d7 100644 --- a/harbour/source/rtl/terror.prg +++ b/harbour/source/rtl/terror.prg @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * Class Error + * Error Class * * Copyright 1999 Antonio Linares * www - http://www.harbour-project.org diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index bc64810abd..685373529c 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * Class Get + * Get Class * * Copyright 1999 Ignacio Ortiz de Zúniga * www - http://www.harbour-project.org diff --git a/harbour/source/rtl/tgetlist.prg b/harbour/source/rtl/tgetlist.prg index 737b322d6f..defd7d4b8d 100644 --- a/harbour/source/rtl/tgetlist.prg +++ b/harbour/source/rtl/tgetlist.prg @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * Class GetList + * GetList Class * * Copyright 1999 Antonio Linares * www - http://www.harbour-project.org diff --git a/harbour/source/rtl/xsavescr.prg b/harbour/source/rtl/xsavescr.prg index c8aa059073..81ab434980 100644 --- a/harbour/source/rtl/xsavescr.prg +++ b/harbour/source/rtl/xsavescr.prg @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * __XSAVESCREEN()/__XRESTSCREEN() + * __XSAVESCREEN()/__XRESTSCREEN() functions * * Copyright 1999 Paul Tucker * www - http://www.harbour-project.org diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index c77f447a0d..77ccca5043 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -56,8 +56,7 @@ typedef struct _SYMBOLS SYMBOLSCOPE hScope; /* scope collected from all symbols in module used to speed initialization code */ } SYMBOLS, * PSYMBOLS; /* structure to keep track of all modules symbol tables */ -extern HARBOUR HB_ERRORSYS( void ); -extern HARBOUR HB_ERRORNEW( void ); +extern HARBOUR HB_SYSINIT( void ); static void hb_vmPopAlias( void ); /* pops the workarea number form the eval stack */ static void hb_vmPopAliasedField( PHB_SYMB ); /* pops an aliased field from the eval stack*/ @@ -2840,8 +2839,7 @@ static void hb_vmDoInitFunctions( int argc, char * argv[] ) /* Don't make this function static, because it's not called from this file. */ void hb_vmForceLink( void ) { - HB_ERRORSYS(); - HB_ERRORNEW(); + HB_SYSINIT(); } /* ----------------------------- */ @@ -3128,3 +3126,22 @@ void hb_vmRequestCancel( void ) s_wActionRequest = HB_QUIT_REQUESTED; } } + +/* NOTE: This is an internal undocumented Clipper function, which will try + to call the function HELP() if it's defined. This is the default + SetKey() handler for the F1 key. */ + +HARBOUR HB___XHELP( void ) +{ + PHB_DYNS pDynSym = hb_dynsymGet( "HELP" ); + + if( pDynSym ) + { + hb_vmPushSymbol( pDynSym->pSymbol ); + hb_vmPushNil(); + hb_vmDo( 0 ); + + /* NOTE: Leave the return value as it is. */ + } +} +