From 9c7c77bc8540bea6021b03f8d945f417b4443965 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 15 Sep 2009 15:44:56 +0000 Subject: [PATCH] 2009-09-15 17:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * tests/menutest.prg ! Deleted COLOR keywords from examples. This seems to be an xhb extension no present in Harbour or Clipper. * source/rtl/menuto.prg + Added NOTE documenting the __ATPROMPT() cColor parameter is a Harbour extension. (it's valid because this is an undocumented/internal function) * contrib/xhb/hbcompat.ch + Added @ PROMPT + COLOR keyword. Please test, I don't know if it collides with std.ch definition. --- harbour/ChangeLog | 14 ++++++++++++++ harbour/contrib/xhb/hbcompat.ch | 3 +++ harbour/source/rtl/menuto.prg | 2 ++ harbour/tests/menutest.prg | 16 ++++++++-------- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3b8f676e61..a76f88ccb8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-15 17:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * tests/menutest.prg + ! Deleted COLOR keywords from examples. This seems to be an xhb + extension no present in Harbour or Clipper. + + * source/rtl/menuto.prg + + Added NOTE documenting the __ATPROMPT() cColor parameter is + a Harbour extension. (it's valid because this is an + undocumented/internal function) + + * contrib/xhb/hbcompat.ch + + Added @ PROMPT + COLOR keyword. + Please test, I don't know if it collides with std.ch definition. + 2009-09-15 17:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbwin/win_com.c * initialize s_PortData structure at application startup diff --git a/harbour/contrib/xhb/hbcompat.ch b/harbour/contrib/xhb/hbcompat.ch index 10e33b4cf0..5e49e93f5d 100644 --- a/harbour/contrib/xhb/hbcompat.ch +++ b/harbour/contrib/xhb/hbcompat.ch @@ -502,6 +502,9 @@ #translate ( ^^ ) => ( HB_BITXOR( (), () ) ) #endif + #command @ , PROMPT [ MESSAGE ] [ COLOR ] => ; + __AtPrompt( , , , , ) + #endif #endif /* __HARBOUR__ */ diff --git a/harbour/source/rtl/menuto.prg b/harbour/source/rtl/menuto.prg index b68805ea7d..d235a23eb6 100644 --- a/harbour/source/rtl/menuto.prg +++ b/harbour/source/rtl/menuto.prg @@ -24,6 +24,8 @@ THREAD STATIC t_aLevel := {} THREAD STATIC t_nPointer := 1 +/* NOTE: parameter is a Harbour extension. */ + FUNCTION __AtPrompt( nRow, nCol, cPrompt, cMsg, cColor ) IF t_nPointer < 1 diff --git a/harbour/tests/menutest.prg b/harbour/tests/menutest.prg index a1fa4ed6f1..ec3bea589a 100644 --- a/harbour/tests/menutest.prg +++ b/harbour/tests/menutest.prg @@ -14,10 +14,10 @@ procedure main() clear screen - @ 1, 10 prompt 'Menu Item 1' message 'Menu Message 1' Color "w/b+,w/b,w/r,n/w" - @ 2, 10 prompt 'Menu Item 2' message 'Menu Message 2' Color "w/r+,bg/b,w/r,n/w" - @ 3, 10 prompt 'Menu Item 3' message 'Menu Message 3' Color "w/g+,r/b,w/r,n/w" - @ 4, 10 prompt 'Menu Item 4' message 'Menu Message 4' Color "w/bg+,g/b,w/r,n/w" + @ 1, 10 prompt 'Menu Item 1' message 'Menu Message 1' + @ 2, 10 prompt 'Menu Item 2' message 'Menu Message 2' + @ 3, 10 prompt 'Menu Item 3' message 'Menu Message 3' + @ 4, 10 prompt 'Menu Item 4' message 'Menu Message 4' @ 6, 10 say 'Testing with LOCAL parameter' @ 7, 10 say 'Press F8 to recurse into MENU TO' @@ -32,10 +32,10 @@ procedure main() clear screen - @ 1, 10 prompt 'Menu Item 1' message 'Menu Message 1' Color "g/b+,w/b,w/r,n/w" - @ 2, 10 prompt 'Menu Item 2' message 'Menu Message 2' Color "r/b+,w/b,w/r,n/w" - @ 3, 10 prompt 'Menu Item 3' message 'Menu Message 3' Color "b/w+,w/b,w/r,n/w" - @ 4, 10 prompt 'Menu Item 4' message 'Menu Message 4' Color "g/b+,w/b,w/r,n/w" + @ 1, 10 prompt 'Menu Item 1' message 'Menu Message 1' + @ 2, 10 prompt 'Menu Item 2' message 'Menu Message 2' + @ 3, 10 prompt 'Menu Item 3' message 'Menu Message 3' + @ 4, 10 prompt 'Menu Item 4' message 'Menu Message 4' @ 6, 10 say 'Testing with MEMVAR parameter' @ 7, 10 say 'Press F8 to recurse into MENU TO'