2012-10-23 14:48 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/xhb/hbcompat.ch
  * include/harbour.hbx
  * src/debug/debugger.prg
  * src/rtl/achoice.prg
  * src/rtl/inkey.c
  * src/rtl/memoedit.prg
    + added HB_KEYSETLAST() which is the successor of
      HB_SETLASTKEY() but renamed to put it into the
      right namespace. HB_SETLASTKEY() is deprecated
      and will disappear after the second major release.

  * utils/hbmk2/hbmk2.prg
    + added interactive keyboard functions to trigger
      full screen UI in scripts

  * contrib/hbct/tests/*.prg
    % deleted #include "ct.ch" where it's not used
    ! added #require "ct.ch" where ct.ch is #included

  * contrib/hbct/tests/csetarge.prg
    % CLS not needed anymore to force interactive UI

  * contrib/hbfbird/firebird.c
    ! typo in comment

  * contrib/hbct/tests/math.prg
    * minor
This commit is contained in:
Viktor Szakats
2012-10-23 12:54:45 +00:00
parent 76686c179b
commit bd2db96eb1
63 changed files with 79 additions and 121 deletions

View File

@@ -16,6 +16,35 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-23 14:48 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/xhb/hbcompat.ch
* include/harbour.hbx
* src/debug/debugger.prg
* src/rtl/achoice.prg
* src/rtl/inkey.c
* src/rtl/memoedit.prg
+ added HB_KEYSETLAST() which is the successor of
HB_SETLASTKEY() but renamed to put it into the
right namespace. HB_SETLASTKEY() is deprecated
and will disappear after the second major release.
* utils/hbmk2/hbmk2.prg
+ added interactive keyboard functions to trigger
full screen UI in scripts
* contrib/hbct/tests/*.prg
% deleted #include "ct.ch" where it's not used
! added #require "ct.ch" where ct.ch is #included
* contrib/hbct/tests/csetarge.prg
% CLS not needed anymore to force interactive UI
* contrib/hbfbird/firebird.c
! typo in comment
* contrib/hbct/tests/math.prg
* minor
2012-10-23 12:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/include/hbvm.h
* harbour/src/vm/hvm.c

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr := "This is a test!"

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbct"
#include "ct.ch"
PROCEDURE Main()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbct"
#include "ct.ch"
PROCEDURE Main()

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbct"
#include "ct.ch"
PROCEDURE Main()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -56,8 +56,6 @@
#define hb_ntos( n ) LTrim( Str( n ) )
#endif
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr := "...This...is...a...test!"

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbct"
#include "ct.ch"
PROCEDURE Main()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL nTotal := 0

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,20 +52,20 @@
*
*/
#require "hbct"
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif
#include "ct.ch"
PROCEDURE main
PROCEDURE Main()
LOCAL cRet, olderr
ctinit()
CLS
? "Begin test of CSETARGERR()"
?

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -86,6 +86,7 @@ PROCEDURE Main()
? "FLOOR( -1.1 ) = -2 // CT3"
? Space( 7 ), FLOOR( -1.1 ), " <-- CT for Harbour"
?
WAIT4()
? "CEILING( 1.9 ) = 2 // CT3"
@@ -114,7 +115,6 @@ PROCEDURE Main()
WAIT4()
? "LOG10( 0.01 ) = -2.00 // CT3"
? Space( 7 ), LOG10( 0.01 ), " <-- CT for Harbour"
?

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr := ".,.This.,.is.,.a.,.test!"
@@ -65,9 +63,9 @@ PROCEDURE Main()
// Some simple tests
? " Simple tests:"
? [ numtoken("Hello, World!") == 2 ? ------------------------------> ] + Str( numtoken("Hello, World!" ),2 )
? [ numtoken("This is good. See you! How do you do?",".!?") == 3 ? -> ] + Str( numtoken("This is good. See you! How do you do?",".!?" ),2 )
? [ numtoken("one,,three,four,,six",",",1) == 6 ? -----------------> ] + Str( numtoken("one,,three,four,,six",",",1 ),2 )
? [ numtoken("Hello, World!") == 2 ? ------------------------------> ] + Str( numtoken( "Hello, World!" ),2 )
? [ numtoken("This is good. See you! How do you do?",".!?") == 3 ? -> ] + Str( numtoken( "This is good. See you! How do you do?", ".!?" ), 2 )
? [ numtoken("one,,three,four,,six",",",1) == 6 ? -----------------> ] + Str( numtoken( "one,,three,four,,six", ",", 1 ), 2 )
?
? [ # of tokens in the string "] + cStr + ["]

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cWildcard := " "

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr, nLen

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -60,8 +60,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr1 := "A,BB,CCC,DDDD,EEEEE,FFFFFF"

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr := ".,.This.,.is.,.a.,.test!"
@@ -68,11 +66,11 @@ PROCEDURE Main()
? [ tokenlower("Hello, World, here I am!") == "hello, world, here i am!" ?]
? [ -> "] + tokenlower( "Hello, World, here I am!" ) + ["]
? [ tokenlower("Hello, World, here I am!",,3) == "hello, world, here I am!" ?]
? [ -> "] + tokenlower( "Hello, World, here I am!",,3 ) + ["]
? [ -> "] + tokenlower( "Hello, World, here I am!",, 3 ) + ["]
? [ tokenlower("Hello, World, here I am!",",",3) == "hello, World, here I am!" ?]
? [ -> "] + tokenlower( "Hello, World, here I am!",",",3 ) + ["]
? [ -> "] + tokenlower( "Hello, World, here I am!", ",", 3 ) + ["]
? [ tokenlower("Hello, World, here I am!"," W") == "hello, World, here i am!" ?]
? [ -> "] + tokenlower( "Hello, World, here I am!"," W" ) + ["]
? [ -> "] + tokenlower( "Hello, World, here I am!", " W" ) + ["]
?
? [ Lowercase the tokens in the string "] + cStr + ["]

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#endif

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL cStr := ".,.This.,.is.,.a.,.test!"
@@ -68,11 +66,11 @@ PROCEDURE Main()
? [ tokenupper("Hello, world, here I am!") == "Hello, World, Here I Am!" ?]
? [ -> "] + tokenupper( "Hello, world, here I am!" ) + ["]
? [ tokenupper("Hello, world, here I am!",,3) == "Hello, World, Here I am!" ?]
? [ -> "] + tokenupper( "Hello, world, here I am!",,3 ) + ["]
? [ -> "] + tokenupper( "Hello, world, here I am!",, 3 ) + ["]
? [ tokenupper("Hello, world, here I am!",",",3) == "Hello, world, here I am!" ?]
? [ -> "] + tokenupper( "Hello, world, here I am!",",",3 ) + ["]
? [ -> "] + tokenupper( "Hello, world, here I am!", ",", 3 ) + ["]
? [ tokenupper("Hello, world, here I am!"," w") == "Hello, wOrld, Here I Am!" ?]
? [ -> "] + tokenupper( "Hello, world, here I am!"," w" ) + ["]
? [ -> "] + tokenupper( "Hello, world, here I am!", " w" ) + ["]
?
? [ Uppercase the tokens in the string "] + cStr + ["]

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -52,8 +52,6 @@
*
*/
#include "ct.ch"
PROCEDURE Main()
ctinit()

View File

@@ -54,7 +54,7 @@
#include <time.h>
/* NOTE: Ugly hack to avoid this error when compiler with BCC 5.8.2 and above:
/* NOTE: Ugly hack to avoid this error when compiled with BCC 5.8.2 and above:
Error E2238 C:\...\Firebird-2.1.1\include\ibase.h 82: Multiple declaration for 'intptr_t' */
#if ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 )
/* Prevent inclusion of <stdint.h> from hbdefs.h */
@@ -464,7 +464,6 @@ HB_FUNC( FBQUERY )
}
else
hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
HB_FUNC( FBFETCH )

View File

@@ -92,6 +92,7 @@
#xtranslate hb_libLoad([<x,...>]) => libLoad(<x>)
#xtranslate hb_libFree([<x,...>]) => libFree(<x>)
#xtranslate hb_adler32([<x,...>]) => hb_checksum(<x>)
#xtranslate hb_keySetLast([<x,...>]) => setLastKey(<x>)
#xtranslate hb_setLastKey([<x,...>]) => setLastKey(<x>)
#xtranslate hb_CStr([<x,...>]) => CStr(<x>)
#xtranslate hb_valToExp([<x,...>]) => ValToPrgExp(<x>)
@@ -359,7 +360,7 @@
#xtranslate libLoad([<x,...>]) => hb_libLoad(<x>)
#xtranslate libFree([<x,...>]) => hb_libFree(<x>)
#xtranslate hb_checksum([<x,...>]) => hb_adler32(<x>)
#xtranslate setLastKey([<x,...>]) => hb_setLastKey(<x>)
#xtranslate setLastKey([<x,...>]) => hb_keySetLast(<x>)
#xtranslate CStr([<x,...>]) => hb_CStr(<x>)
#xtranslate ValToPrgExp([<x,...>]) => hb_valToExp(<x>)
#xtranslate SecondsSleep([<x,...>]) => hb_idleSleep(<x>)

View File

@@ -639,6 +639,7 @@ DYNAMIC hb_keyIns
DYNAMIC hb_keyLast
DYNAMIC hb_keyNext
DYNAMIC hb_keyPut
DYNAMIC hb_keySetLast
DYNAMIC hb_keyStd
DYNAMIC hb_langErrMsg
DYNAMIC hb_langMessage

View File

@@ -2185,7 +2185,7 @@ METHOD RestoreAppState() CLASS HBDebugger
Set( _SET_DIRCASE, ::nAppDirCase )
Set( _SET_FILECASE, ::nAppFileCase )
Set( _SET_TYPEAHEAD, ::nAppTypeAhead )
hb_SetLastKey( ::nAppLastKey )
hb_keySetLast( ::nAppLastKey )
RETURN NIL

View File

@@ -154,7 +154,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo
Eval( bAction, ProcName( 1 ), ProcLine( 1 ), "" )
IF Empty( NextKey() )
hb_setLastKey( 255 )
hb_keySetLast( 255 )
nKey := 0
ENDIF

View File

@@ -214,12 +214,18 @@ HB_FUNC( LASTKEY )
hb_retni( hb_inkeyLast( HB_INKEY_ALL ) );
}
HB_FUNC( HB_SETLASTKEY )
HB_FUNC( HB_KEYSETLAST )
{
if( HB_ISNUM( 1 ) )
hb_retni( hb_inkeySetLast( hb_parni( 1 ) ) );
}
#if defined( HB_LEGACY_LEVEL5 )
HB_FUNC_TRANSLATE( HB_SETLASTKEY, HB_KEYSETLAST )
#endif
HB_FUNC( HB_KEYCODE )
{
const char * szValue = hb_parc( 1 );

View File

@@ -172,7 +172,7 @@ METHOD KeyboardHook( nKey ) CLASS HBMemoEditor
SetPos( nRow, nCol )
IF nYesNoKey == Asc( "Y" ) .OR. nYesNoKey == Asc( "y" )
hb_SetLastKey( K_ESC ) /* Cl*pper compatibility */
hb_keySetLast( K_ESC ) /* Cl*pper compatibility */
::lSaved := .F.
::lExitEdit := .T.
ENDIF

View File

@@ -13243,7 +13243,7 @@ STATIC FUNCTION __hbshell_win_reg_app( lRegister, lAllUser, cAppPath )
/* List of Harbour RTL function typically used in
a full-screen CUI ("interactive") app */
STATIC FUNCTION __hbshell_detect_CUI_extern_positive()
RETURN {;
RETURN { ;
"COL" => NIL ,;
"DISPBEGIN" => NIL ,;
"DISPBOX" => NIL ,;
@@ -13255,18 +13255,27 @@ STATIC FUNCTION __hbshell_detect_CUI_extern_positive()
"HB_DISPBOX" => NIL ,;
"HB_DISPOUTAT" => NIL ,;
"HB_DISPOUTATBOX" => NIL ,;
"HB_KEYCLEAR" => NIL ,;
"HB_KEYINS" => NIL ,;
"HB_KEYLAST" => NIL ,;
"HB_KEYNEXT" => NIL ,;
"HB_KEYPUT" => NIL ,;
"HB_KEYSETLAST" => NIL ,;
"HB_KEYSTD" => NIL ,;
"HB_MGETBOUNDS" => NIL ,;
"HB_MMIDDLEDOWN" => NIL ,;
"HB_SCRMAXCOL" => NIL ,;
"HB_SCRMAXROW" => NIL ,;
"HB_SCROLL" => NIL ,;
"HB_SHADOW" => NIL ,;
"INKEY" => NIL ,;
"LASTKEY" => NIL ,;
"MAXCOL" => NIL ,;
"MAXROW" => NIL ,;
"HB_MMIDDLEDOWN" => NIL ,;
"MCOL" => NIL ,;
"MDBLCLK" => NIL ,;
"MHIDE" => NIL ,;
"MLEFTDOWN" => NIL ,;
"MMIDDLEDOWN" => NIL ,;
"MPRESENT" => NIL ,;
"MRESTSTATE" => NIL ,;
"MRIGHTDOWN" => NIL ,;
@@ -13276,6 +13285,7 @@ STATIC FUNCTION __hbshell_detect_CUI_extern_positive()
"MSETCURSOR" => NIL ,;
"MSETPOS" => NIL ,;
"MSHOW" => NIL ,;
"NEXTKEY" => NIL ,;
"RESTSCREEN" => NIL ,;
"ROW" => NIL ,;
"SAVESCREEN" => NIL ,;