diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bda74f00ad..d5cd9600e9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,18 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2004-06-08 22:50 UTC+0300 Phil Krylov + * source/rtl/inkey.c + ! Renamed SETLASTKEY() to HB_SETLASTKEY(). + * source/debug/debugger.prg + ! Changed SETLASTKEY() to HB_SETLASTKEY(). + + contrib/libct/setlast.prg + * contrib/libct/Makefile + * contrib/libct/ctflist.txt + * contrib/libct/makefile.bc + * contrib/libct/makefile.vc + + Reimplemented SETLASTKEY() through HB_SETLASTKEY() + 2004-06-08 22:10 UTC+0300 Phil Krylov - contrib/libct/setlast.prg * contrib/libct/Makefile diff --git a/harbour/contrib/libct/Makefile b/harbour/contrib/libct/Makefile index 43dfd09048..c74cee5e98 100644 --- a/harbour/contrib/libct/Makefile +++ b/harbour/contrib/libct/Makefile @@ -69,6 +69,7 @@ PRG_SOURCES= \ invertwin.prg \ numconv.prg \ screen2.prg \ + setlast.prg \ LIBNAME=ct diff --git a/harbour/contrib/libct/ctflist.txt b/harbour/contrib/libct/ctflist.txt index 2b72ff72e4..83925e0cc0 100644 --- a/harbour/contrib/libct/ctflist.txt +++ b/harbour/contrib/libct/ctflist.txt @@ -536,6 +536,7 @@ LASTKFUNC ;N; LASTKLINE ;N; LASTKPROC ;N; NUMFKEY ;N; +SETLASTKEY ;N; ; ; ;3.2 system info functions diff --git a/harbour/contrib/libct/makefile.bc b/harbour/contrib/libct/makefile.bc index 7d3841affe..34a4a185af 100644 --- a/harbour/contrib/libct/makefile.bc +++ b/harbour/contrib/libct/makefile.bc @@ -153,6 +153,7 @@ TOOLS_LIB_OBJS = \ $(OBJ_DIR)\invertwin.obj \ $(OBJ_DIR)\numconv.obj \ $(OBJ_DIR)\screen2.obj \ + $(OBJ_DIR)\setlast.obj \ # # Our default target @@ -443,3 +444,10 @@ $(OBJ_DIR)\screen2.obj : $(OBJ_DIR)\screen2.c $(CC) $(CLIBFLAGS) -o$@ $** tlib $(TOOLS_LIB) $(ARFLAGS) -+$@,, +$(OBJ_DIR)\setlast.c : $(TOOLS_DIR)\setlast.prg + $(HARBOUR_EXE) $(HARBOURFLAGS) $** -o$@ + +$(OBJ_DIR)\setlast.obj : $(OBJ_DIR)\setlast.c + $(CC) $(CLIBFLAGS) -o$@ $** + tlib $(TOOLS_LIB) $(ARFLAGS) -+$@,, + diff --git a/harbour/contrib/libct/makefile.vc b/harbour/contrib/libct/makefile.vc index 66c4d4e53c..f296de8b79 100644 --- a/harbour/contrib/libct/makefile.vc +++ b/harbour/contrib/libct/makefile.vc @@ -172,6 +172,7 @@ TOOLS_LIB_OBJS = \ $(OBJ_DIR)\invertwin.obj \ $(OBJ_DIR)\numconv.obj \ $(OBJ_DIR)\screen2.obj \ + $(OBJ_DIR)\setlast.obj \ # # Our default target @@ -241,6 +242,7 @@ CLEAN: -@if exist $(OBJ_DIR)\invertwin.* del $(OBJ_DIR)\invertwin.* -@if exist $(OBJ_DIR)\numconv.* del $(OBJ_DIR)\numconv.* -@if exist $(OBJ_DIR)\screen2.* del $(OBJ_DIR)\screen2.* + -@if exist $(OBJ_DIR)\setlast.* del $(OBJ_DIR)\setlast.* -@if exist $(TOOLS_LIB) del $(TOOLS_LIB) # diff --git a/harbour/contrib/libct/setlast.prg b/harbour/contrib/libct/setlast.prg new file mode 100644 index 0000000000..fc7a08dbed --- /dev/null +++ b/harbour/contrib/libct/setlast.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * CT3 Set Status functions: - SETLASTKEY() + * + * Copyright 2002 Walter Negro + * 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, or (at your option) + * any later version. + * + * 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 software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries 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 Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +/* $DOC$ + * $FUNCNAME$ + * SETLASTKEY() + * $CATEGORY$ + * CT3 Set Status functions + * $ONELINER$ + * $SYNTAX$ + * SETLASTKEY( ) -> + * $ARGUMENTS$ + * Designates the character code passed to LASTKEY(). + * $RETURNS$ + * SETLASTKEY() always returns a null string. + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * $TESTS$ + * $STATUS$ + * Started + * $COMPLIANCE$ + * $PLATFORMS$ + * All + * $FILES$ + * Source is setlast.prg, library is libct. + * $SEEALSO$ + * LASTKEY() + * $END$ + */ + +FUNCTION SETLASTKEY( nKey ) + + HB_SETLASTKEY( nKey ) + +RETURN "" + diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index e652e68924..172415633a 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -1364,7 +1364,7 @@ METHOD HandleEvent() CLASS TDebugger end /* Restore LastKey() */ - SetLastKey( nLastKey ) + HB_SetLastKey( nLastKey ) return nil METHOD Hide() CLASS TDebugger diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index 8e49d22c61..c3025047f3 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -385,7 +385,7 @@ HB_FUNC( LASTKEY ) hb_retni( hb_inkeyTranslate( s_inkeyLast, ( HB_inkey_enum ) hb_inkeyNext( ISNUM( 1 ) ? ( HB_inkey_enum ) hb_parni( 1 ) : hb_set.HB_SET_EVENTMASK ) ) ); } -HB_FUNC( SETLASTKEY ) +HB_FUNC( HB_SETLASTKEY ) { if( ISNUM(1) ) {