From 165ffd5d7ec09b7c6e47ed4f9e3557a224ed7f9a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 12 Oct 1999 01:01:53 +0000 Subject: [PATCH] 19991012-02:50 GMT+1 --- harbour/ChangeLog | 15 ++++++++ harbour/include/caundoc.api | Bin 2596 -> 2671 bytes harbour/source/rtl/Makefile | 5 ++- harbour/source/rtl/input.prg | 41 ++++++++++++++++++++ harbour/source/rtl/set.c | 2 + harbour/source/rtl/setta.prg | 37 ++++++++++++++++++ harbour/source/rtl/wait.prg | 70 +++++++++++++++++++++++++++++++++++ 7 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 harbour/source/rtl/input.prg create mode 100644 harbour/source/rtl/setta.prg create mode 100644 harbour/source/rtl/wait.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c8f31872f3..cf52106dd0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,18 @@ +19991012-02:50 GMT+1 Victor Szel + * include/caundoc.h + + _bcmp, _bscan added (thanks to Jose Lalin) + * source/rtl/set.c + + TOFIX: added for DEFPATH() + * source/rtl/Makefile + + source/rtl/input.prg + + source/rtl/setta.prg + + source/rtl/wait.prg + + __INPUT(), __WAIT(), SETTYPEAHEAD() functions added. + (Thanks to Jose Lalin) + Note that INPUT() is not yet working, since it require macro + functionality. + Please add them to non-GNU make systems. + 19991012-02:30 GMT+1 Victor Szel * source/rtl/filesys.c + Added some info about driver numbering to hb_fsChDrv(), hb_fsIsDrv(), diff --git a/harbour/include/caundoc.api b/harbour/include/caundoc.api index d0d4dba2e9da26db09ad89bc79f0f69a26e81e7a..56d36ad5d8d54a623dfaf503f9b8928758760769 100644 GIT binary patch delta 86 zcmZ1?@?K;E8<&@IN@`kWUaCTTQgUvA0s`cw<^lz{5YolTiFq0YI>~t@I?0*}AnA-E U4TS<7g=8SgD^bv#%*rJX0D}h^(EtDd delta 11 ScmaDavP5J98`tDOE;#@i69b3< diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 15844cca26..7418e70f69 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -53,6 +53,7 @@ PRG_SOURCES=\ errorsys.prg \ fieldbl.prg \ harbinit.prg \ + input.prg \ memvarbl.prg \ menuto.prg \ objfunc.prg \ @@ -61,6 +62,7 @@ PRG_SOURCES=\ rddord.prg \ setfunc.prg \ setkey.prg \ + setta.prg \ tclass.prg \ tbcolumn.prg \ tbrowse.prg \ @@ -68,7 +70,8 @@ PRG_SOURCES=\ text.prg \ tget.prg \ tgetlist.prg \ - xsavescr.prg + wait.prg \ + xsavescr.prg \ LIB=rtl diff --git a/harbour/source/rtl/input.prg b/harbour/source/rtl/input.prg new file mode 100644 index 0000000000..783923041a --- /dev/null +++ b/harbour/source/rtl/input.prg @@ -0,0 +1,41 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * __INPUT() undocumented function + * + * 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/). + * + */ + +FUNCTION __Input( cMessage ) + LOCAL cString := __Accept( cMessage ) + +// TOFIX: Uncomment this when macros are implemented +// RETURN iif( Empty( cString ), NIL, &cString ) + RETURN "" diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 3e17de9a26..804a36073b 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -1021,6 +1021,8 @@ void hb_setRelease( void ) hb_set.HB_SET_TYPEAHEAD = -1; hb_inkeyReset( TRUE ); /* Free keyboard typeahead buffer */ } +/* TOFIX: Clipper appends a slash after the path in this function */ + HARBOUR HB_DEFPATH( void ) { if( hb_set.HB_SET_DEFAULT ) diff --git a/harbour/source/rtl/setta.prg b/harbour/source/rtl/setta.prg new file mode 100644 index 0000000000..5d988911bf --- /dev/null +++ b/harbour/source/rtl/setta.prg @@ -0,0 +1,37 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * SETTYPEAHEAD() undocumented function + * + * 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/). + * + */ + +FUNCTION SetTypeahead( nSize ) + RETURN Set( _SET_TYPEAHEAD, nSize ) diff --git a/harbour/source/rtl/wait.prg b/harbour/source/rtl/wait.prg new file mode 100644 index 0000000000..f1368e10a8 --- /dev/null +++ b/harbour/source/rtl/wait.prg @@ -0,0 +1,70 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * __WAIT() undocumented function + * + * 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 "inkey.ch" + +FUNCTION __Wait( cString ) + LOCAL nKey + LOCAL bBlock + + IF cString == NIL + /* TODO: Here we can use LangApi to localize default message + */ + ? "Press any key to continue..." + ELSE + ? cString + ENDIF + + DO WHILE .T. + + nKey := Inkey( 0 ) + + IF ( bBlock := SetKey( nKey ) ) != NIL + Eval( bBlock, ProcName( 1 ), ProcLine( 1 ), "" ) + LOOP + ENDIF + + IF nKey >= 32 .and. nKey <= 255 + ?? Chr( nKey ) + ELSE + nKey := 0 + ENDIF + + EXIT + + ENDDO + + RETURN Chr( nKey ) +