From cf3606d47973f3b35c03bec2db3f99be7f5c44d5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 6 Oct 1999 12:55:16 +0000 Subject: [PATCH] 19991006-14:35 GMT+1 --- harbour/ChangeLog | 28 +++++ harbour/doc/funclist.txt | 3 +- harbour/include/hbextern.ch | 67 ++++++++++++ harbour/source/rtl/Makefile | 2 + harbour/source/rtl/dummy.prg | 107 +++++++++++++++++++ harbour/source/rtl/rddord.prg | 23 ---- harbour/source/rtl/readkey.prg | 59 ++++++++++ harbour/source/runner/stdalone/external.prg | 67 ++++++++++++ harbour/tests/{run_b32.bat => bld_b32o.bat} | 3 +- harbour/tests/{run_tsta.bat => run_test.bat} | 3 + 10 files changed, 337 insertions(+), 25 deletions(-) create mode 100644 harbour/source/rtl/dummy.prg create mode 100644 harbour/source/rtl/readkey.prg rename harbour/tests/{run_b32.bat => bld_b32o.bat} (94%) rename harbour/tests/{run_tsta.bat => run_test.bat} (63%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ad13d01f51..4b9bea2dc6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,31 @@ +19991006-14:35 GMT+1 Victor Szel + * source/rtl/dummy.prg + source/rtl/Makefile + source/rtl/rddord.prg + include/hbextern.ch + source/runner/stdalone/external.prg + + All not yet implemented function skeletons added or moved to dummy.prg + so that the number of unresolved externals will be reduced, and we can + have a better view about what is left to do. Also updating EXTERNAL.PRG + and HBEXTERN.CH will not be needed so frequently. + * doc/funclist.txt + source/rtl/readkey.prg + source/rtl/Makefile + + READKEY() added. + * doc/funclist.txt + + ORDCONDSET() added to the TODO list. + * source/runner/stdalone/external.prg + include/hbextern.ch + + MEMOLINE()/MLCOUNT() added. + * tests/run_tsta.bat -> tests/run_test.bat + * Renamed. + + Comments. + * tests/run_b32.bat -> tests/bld_b32o.bat + ! Small fix. + * Renamed. + + !! WARNING !! Please modify non-GNU make files. + 19991006-13:19 GMT+1 Victor Szel * source/rtl/memoline.c source/rtl/mlcount.c diff --git a/harbour/doc/funclist.txt b/harbour/doc/funclist.txt index 3c88d463fa..019a1c29fe 100644 --- a/harbour/doc/funclist.txt +++ b/harbour/doc/funclist.txt @@ -194,7 +194,7 @@ RDDREGISTER ;R; RDDSETDEFAULT ;R; READEXIT ;R; READINSERT ;R; -READKEY ;N; +READKEY ;R; READMODAL ;R; READVAR ;R; RECCOUNT ;R; @@ -247,6 +247,7 @@ DBRLOCKLIST ;R; DBRUNLOCK ;R; ORDBAGEXT ;N; ORDBAGNAME ;N; +ORDCONDSET ;N; ORDCREATE ;N; ORDDESTROY ;N; ORDFOR ;N; diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index 447336accb..df3c46d3ff 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -33,6 +33,9 @@ * */ +EXTERNAL MEMOLINE +EXTERNAL MLCOUNT + // Files from: vm // // @@ -727,4 +730,68 @@ EXTERNAL NUMTOTXTHU EXTERNAL DEFAULT EXTERNAL TOCHAR EXTERNAL DEBUG +// +//symbols from file: rtl\dummy.prg +// +EXTERNAL ORDBAGEXT +EXTERNAL ORDBAGNAME +EXTERNAL ORDCONDSET +EXTERNAL ORDCREATE +EXTERNAL ORDDESTROY +EXTERNAL ORDFOR +EXTERNAL ORDKEY +EXTERNAL ORDLISTADD +EXTERNAL ORDLISTCLEAR +EXTERNAL ORDLISTREBUILD +EXTERNAL ORDNAME +EXTERNAL ORDNUMBER +EXTERNAL ORDSETFOCUS +EXTERNAL INDEXORD +EXTERNAL DBSEEK +EXTERNAL DBSETFILTER +EXTERNAL DBCLEARFILTER +EXTERNAL DBSETRELATION +EXTERNAL DBCLEARRELATION +EXTERNAL DBEVAL +EXTERNAL DBFILTER +EXTERNAL MEMOEDIT +EXTERNAL MLCTOPOS +EXTERNAL MLPOS +EXTERNAL MPOSTOLC +EXTERNAL __DBAPP +EXTERNAL __DBCONTINUE +EXTERNAL __DBCOPY +EXTERNAL __DBCOPYSTRUCT +EXTERNAL __DBCOPYXSTRUCT +EXTERNAL __DBCREATE +EXTERNAL __DBDELIM +EXTERNAL __DBJOIN +EXTERNAL __DBLIST +EXTERNAL __DBLOCATE +EXTERNAL __DBPACK +EXTERNAL __DBSDF +EXTERNAL __DBSORT +EXTERNAL __DBTOTAL +EXTERNAL __DBUPDATE +EXTERNAL __DBZAP +EXTERNAL __LABELFORM +EXTERNAL __REPORTFORM +EXTERNAL __SETFORMAT +EXTERNAL __TYPEFILE +EXTERNAL BROWSE +EXTERNAL DBEDIT +EXTERNAL ISPRINTER +EXTERNAL NETNAME +EXTERNAL READKEY +EXTERNAL GETACTIVE +EXTERNAL GETAPPLYKEY +EXTERNAL GETDOSETKEY +EXTERNAL GETPOSTVALIDATE +EXTERNAL GETPREVALIDATE +EXTERNAL GETREADER +EXTERNAL READFORMAT +EXTERNAL READKILL +EXTERNAL READUPDATED +EXTERNAL UPDATED +EXTERNAL __QQPUB //------------------------------------------------------------ diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 6e7f99ecdf..15844cca26 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -49,12 +49,14 @@ PRG_SOURCES=\ browdb.prg \ devoutp.prg \ dircmd.prg \ + dummy.prg \ errorsys.prg \ fieldbl.prg \ harbinit.prg \ memvarbl.prg \ menuto.prg \ objfunc.prg \ + readkey.prg \ readvar.prg \ rddord.prg \ setfunc.prg \ diff --git a/harbour/source/rtl/dummy.prg b/harbour/source/rtl/dummy.prg new file mode 100644 index 0000000000..c0813681b4 --- /dev/null +++ b/harbour/source/rtl/dummy.prg @@ -0,0 +1,107 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Dummy functions until they are not implemented + * + * 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/). + * + */ + +/* TODO: Dummy functions, should be removed when implemented. */ + +FUNCTION ordBagExt() ; RETURN "" +FUNCTION ordBagName() ; RETURN "" +FUNCTION ordCondSet() ; RETURN NIL +FUNCTION ordCreate() ; RETURN NIL +FUNCTION ordDestroy() ; RETURN NIL +FUNCTION ordFor() ; RETURN NIL +FUNCTION ordKey() ; RETURN "" +FUNCTION ordListAdd() ; RETURN NIL +FUNCTION ordListClear() ; RETURN NIL +FUNCTION ordListRebuild() ; RETURN NIL +FUNCTION ordName() ; RETURN "" +FUNCTION ordNumber() ; RETURN 0 +FUNCTION ordSetFocus() ; RETURN 0 +FUNCTION IndexOrd() ; RETURN 0 + +FUNCTION dbSeek() ; RETURN .F. +FUNCTION dbSetFilter() ; RETURN NIL +FUNCTION dbClearFilter() ; RETURN NIL +FUNCTION dbSetRelation() ; RETURN NIL +FUNCTION dbClearRelation() ; RETURN NIL +FUNCTION dbEval() ; RETURN NIL +FUNCTION dbFilter() ; RETURN "" + +FUNCTION MemoEdit( str ) ; RETURN str +FUNCTION MLCToPos() ; RETURN 0 +FUNCTION MLPos() ; RETURN 0 +FUNCTION MPosToLC() ; RETURN 0 + +FUNCTION __dbApp() ; RETURN NIL +FUNCTION __dbContinue() ; RETURN NIL +FUNCTION __dbCopy() ; RETURN NIL +FUNCTION __dbCopyStruct() ; RETURN NIL +FUNCTION __dbCopyXStruct() ; RETURN NIL +FUNCTION __dbCreate() ; RETURN NIL +FUNCTION __dbDelim() ; RETURN NIL +FUNCTION __dbJoin() ; RETURN NIL +FUNCTION __dbList() ; RETURN NIL +FUNCTION __dbLocate() ; RETURN NIL +FUNCTION __dbPack() ; RETURN NIL +FUNCTION __dbSDF() ; RETURN NIL +FUNCTION __dbSort() ; RETURN NIL +FUNCTION __dbTotal() ; RETURN NIL +FUNCTION __dbUpdate() ; RETURN NIL +FUNCTION __dbZap() ; RETURN NIL + +FUNCTION __LabelForm() ; RETURN NIL +FUNCTION __ReportForm() ; RETURN NIL + +FUNCTION __SetFormat() ; RETURN NIL +FUNCTION __TypeFile() ; RETURN NIL + +FUNCTION Browse() ; RETURN .T. +FUNCTION dbEdit() ; RETURN NIL +FUNCTION IsPrinter() ; RETURN .T. +FUNCTION NetName() ; RETURN "" +FUNCTION ReadKey() ; RETURN 0 + +FUNCTION GetActive() ; RETURN NIL +FUNCTION GetApplyKey() ; RETURN NIL +FUNCTION GetDoSetKey() ; RETURN NIL +FUNCTION GetPostValidate() ; RETURN NIL +FUNCTION GetPreValidate() ; RETURN NIL +FUNCTION GetReader() ; RETURN NIL +FUNCTION ReadFormat() ; RETURN NIL +FUNCTION ReadKill() ; RETURN NIL +FUNCTION ReadUpdated() ; RETURN .T. +FUNCTION Updated() ; RETURN .T. + +FUNCTION __qqPub() ; RETURN NIL + diff --git a/harbour/source/rtl/rddord.prg b/harbour/source/rtl/rddord.prg index c015ccb7dc..b2c823b467 100644 --- a/harbour/source/rtl/rddord.prg +++ b/harbour/source/rtl/rddord.prg @@ -74,26 +74,3 @@ FUNCTION IndexKey( nOrder ) RETURN "" -/* TODO: Dummy functions, should be removed when implemented. */ - -STATIC FUNCTION ordCreate() - RETURN "" - -STATIC FUNCTION ordListAdd() - RETURN NIL - -STATIC FUNCTION ordListClear() - RETURN NIL - -STATIC FUNCTION ordListRebuild() - RETURN NIL - -STATIC FUNCTION ordSetFocus() - RETURN "" - -STATIC FUNCTION ordBagExt() - RETURN "" - -STATIC FUNCTION ordKey() - RETURN "" - diff --git a/harbour/source/rtl/readkey.prg b/harbour/source/rtl/readkey.prg new file mode 100644 index 0000000000..2cf860ff03 --- /dev/null +++ b/harbour/source/rtl/readkey.prg @@ -0,0 +1,59 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * READKEY() 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 "inkey.ch" + +FUNCTION ReadKey() + LOCAL nKey := LastKey() + + DO CASE + CASE nKey == K_UP ; nKey := 4 // NOTE: NG says 5 incorrectly + CASE nKey == K_DOWN ; nKey := 5 // NOTE: NG says 2 incorrectly + CASE nKey == K_PGUP ; nKey := 6 + CASE nKey == K_PGDN ; nKey := 7 + CASE nKey == K_CTRL_PGUP ; nKey := 34 // NOTE: NG says 31 incorrectly + CASE nKey == K_CTRL_PGDN ; nKey := 35 // NOTE: NG says 30 incorrectly + CASE nKey == K_ESC ; nKey := 12 + CASE nKey == K_CTRL_W ; nKey := 14 + CASE nKey == K_ENTER ; nKey := 15 + CASE nKey >= K_SPACE ; nKey := 15 + OTHERWISE ; RETURN 0 + ENDCASE + + IF Updated() + nKey += 256 + ENDIF + + RETURN nKey diff --git a/harbour/source/runner/stdalone/external.prg b/harbour/source/runner/stdalone/external.prg index 447336accb..df3c46d3ff 100644 --- a/harbour/source/runner/stdalone/external.prg +++ b/harbour/source/runner/stdalone/external.prg @@ -33,6 +33,9 @@ * */ +EXTERNAL MEMOLINE +EXTERNAL MLCOUNT + // Files from: vm // // @@ -727,4 +730,68 @@ EXTERNAL NUMTOTXTHU EXTERNAL DEFAULT EXTERNAL TOCHAR EXTERNAL DEBUG +// +//symbols from file: rtl\dummy.prg +// +EXTERNAL ORDBAGEXT +EXTERNAL ORDBAGNAME +EXTERNAL ORDCONDSET +EXTERNAL ORDCREATE +EXTERNAL ORDDESTROY +EXTERNAL ORDFOR +EXTERNAL ORDKEY +EXTERNAL ORDLISTADD +EXTERNAL ORDLISTCLEAR +EXTERNAL ORDLISTREBUILD +EXTERNAL ORDNAME +EXTERNAL ORDNUMBER +EXTERNAL ORDSETFOCUS +EXTERNAL INDEXORD +EXTERNAL DBSEEK +EXTERNAL DBSETFILTER +EXTERNAL DBCLEARFILTER +EXTERNAL DBSETRELATION +EXTERNAL DBCLEARRELATION +EXTERNAL DBEVAL +EXTERNAL DBFILTER +EXTERNAL MEMOEDIT +EXTERNAL MLCTOPOS +EXTERNAL MLPOS +EXTERNAL MPOSTOLC +EXTERNAL __DBAPP +EXTERNAL __DBCONTINUE +EXTERNAL __DBCOPY +EXTERNAL __DBCOPYSTRUCT +EXTERNAL __DBCOPYXSTRUCT +EXTERNAL __DBCREATE +EXTERNAL __DBDELIM +EXTERNAL __DBJOIN +EXTERNAL __DBLIST +EXTERNAL __DBLOCATE +EXTERNAL __DBPACK +EXTERNAL __DBSDF +EXTERNAL __DBSORT +EXTERNAL __DBTOTAL +EXTERNAL __DBUPDATE +EXTERNAL __DBZAP +EXTERNAL __LABELFORM +EXTERNAL __REPORTFORM +EXTERNAL __SETFORMAT +EXTERNAL __TYPEFILE +EXTERNAL BROWSE +EXTERNAL DBEDIT +EXTERNAL ISPRINTER +EXTERNAL NETNAME +EXTERNAL READKEY +EXTERNAL GETACTIVE +EXTERNAL GETAPPLYKEY +EXTERNAL GETDOSETKEY +EXTERNAL GETPOSTVALIDATE +EXTERNAL GETPREVALIDATE +EXTERNAL GETREADER +EXTERNAL READFORMAT +EXTERNAL READKILL +EXTERNAL READUPDATED +EXTERNAL UPDATED +EXTERNAL __QQPUB //------------------------------------------------------------ diff --git a/harbour/tests/run_b32.bat b/harbour/tests/bld_b32o.bat similarity index 94% rename from harbour/tests/run_b32.bat rename to harbour/tests/bld_b32o.bat index b98859f18f..001406e337 100644 --- a/harbour/tests/run_b32.bat +++ b/harbour/tests/bld_b32o.bat @@ -5,4 +5,5 @@ rem ..\bin\harbour %1 /n /i..\include /gf tlink32 -L..\lib\b32;c:\bc5\lib c:\bc5\lib\c0x32.obj %1.obj hvm.obj,%1.exe,, harbour.lib terminal.lib import32.lib cw32mt.lib -del %1.c +del %1.obj + diff --git a/harbour/tests/run_tsta.bat b/harbour/tests/run_test.bat similarity index 63% rename from harbour/tests/run_tsta.bat rename to harbour/tests/run_test.bat index adfbb3d041..8f7d396210 100644 --- a/harbour/tests/run_tsta.bat +++ b/harbour/tests/run_test.bat @@ -3,6 +3,9 @@ rem rem $Id$ rem +rem ; Generate test_all.bat call run_prg.bat test_all + +rem ; Run test_all.bat call test_all.bat del test_all.bat