2012-10-07 18:06 UTC+0200 Viktor Szakats (harbour syenar.net)

* src/debug/dbgtinp.prg
  * src/debug/dbghelp.prg
  * src/debug/dbgtmenu.prg
  * src/debug/dbgtmitm.prg
  * src/debug/dbgtwin.prg
  * src/debug/dbgwa.prg
  * contrib/hbtip/tests/tiptest.prg
    ! fixed drawing and keyboard handling to be unicode compatible

  * contrib/hbxpp/hbxpp.ch
    + added unicode compatible box drawing macros

  * contrib/hbmxml/tests/custom.prg
    ! use Chr() instead of using keyboard macro

  * contrib/hbnf/doc/en/setkeys.txt
  * contrib/hbnf/doc/en/setlastk.txt
    ! use unicode compatible code

  * contrib/hbtip/smtpcli.prg
  * contrib/hbtip/thtml.prg
    * use string literal instead of chr() call

  * tests/db_brows.prg
    ! fixed mistake in a recently added hb_keyChar() check
This commit is contained in:
Viktor Szakats
2012-10-07 16:14:10 +00:00
parent 08ea92693e
commit 7c33ccc88d
15 changed files with 62 additions and 33 deletions

View File

@@ -16,6 +16,33 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-07 18:06 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/debug/dbgtinp.prg
* src/debug/dbghelp.prg
* src/debug/dbgtmenu.prg
* src/debug/dbgtmitm.prg
* src/debug/dbgtwin.prg
* src/debug/dbgwa.prg
* contrib/hbtip/tests/tiptest.prg
! fixed drawing and keyboard handling to be unicode compatible
* contrib/hbxpp/hbxpp.ch
+ added unicode compatible box drawing macros
* contrib/hbmxml/tests/custom.prg
! use Chr() instead of using keyboard macro
* contrib/hbnf/doc/en/setkeys.txt
* contrib/hbnf/doc/en/setlastk.txt
! use unicode compatible code
* contrib/hbtip/smtpcli.prg
* contrib/hbtip/thtml.prg
* use string literal instead of chr() call
* tests/db_brows.prg
! fixed mistake in a recently added hb_keyChar() check
2012-10-07 17:25 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/debug/debugger.prg
! replaced KEYBOARD cmd unicode compatible call

View File

@@ -5,7 +5,6 @@
#xtranslate _ENCODE( <xData> ) => ( hb_base64encode( hb_serialize( mxmlGetCustom( <xData> ) ) ) )
#include "hbmxml.ch"
#include "hbinkey.ch"
PROCEDURE main()
@@ -116,7 +115,7 @@ FUNCTION whitespace_cb( node, where )
nLevel := 0
ENDIF
RETURN Replicate( Chr( HB_K_TAB ), nLevel )
RETURN Replicate( Chr( 9 ), nLevel )
ELSEIF where == MXML_WS_AFTER_CLOSE .OR. ;
( ( name == "group".OR. name == "option" .OR. name == "choice" ) .AND. ;

View File

@@ -29,12 +29,12 @@
* work. If this makes you uncomfortable, then don't use this function,
* you worthless crybaby.
* $EXAMPLES$
* keyboard chr( K_ESC )
* hb_keyPut( K_ESC )
*
* ? lastkey() // returns 27
* ? LastKey() // returns 27
*
* FT_LastKey( K_F1 )
*
* ? lastkey() // now returns 28
* ? LastKey() // now returns 28
* $END$
*/

View File

@@ -29,12 +29,12 @@
* work. If this makes you uncomfortable, then don't use this function,
* you worthless crybaby.
* $EXAMPLES$
* keyboard chr( K_ESC )
* hb_keyPut( K_ESC )
*
* ? lastkey() // returns 27
* ? LastKey() // returns 27
*
* FT_LastKey( K_F1 )
*
* ? lastkey() // now returns 28
* ? LastKey() // now returns 28
* $END$
*/

View File

@@ -277,7 +277,7 @@ METHOD SendMail( oTIpMail ) CLASS TIpClientSmtp
cTo := oTIpMail:getFieldPart( "To" )
cTo := StrTran( cTo, tip_CRLF() )
cTo := StrTran( cTo, Chr( 9 ) )
cTo := StrTran( cTo, Chr( 32 ) )
cTo := StrTran( cTo, " " )
FOR EACH cTo IN hb_regexSplit( ",", cTo )
::rcpt( cTo )

View File

@@ -165,10 +165,10 @@ PROCEDURE Terminate()
PROCEDURE ShowGauge( nSent, nSize )
@ 6, 5 SAY "Sending: " + Replicate( Chr( 176 ), 60 )
@ 6, 5 SAY "Sending: " + Replicate( hb_UTF8ToStr( "░" ), 60 )
/* nSent may be zero */
IF nSent > 0
@ 6, 14 SAY Replicate( Chr( 219 ), 60 * nSent / nSize )
@ 6, 14 SAY Replicate( hb_UTF8ToStr( "█" ), 60 * nSent / nSize )
ENDIF
RETURN

View File

@@ -645,7 +645,7 @@ METHOD new( oParent, cTagName, cAttrib, cContent ) CLASS THtmlNode
IF HB_ISSTRING( oParent )
// a HTML string is passed -> build new tree of objects
IF Chr( 9 ) $ oParent
oParent := StrTran( oParent, Chr( 9 ), Chr( 32 ) )
oParent := StrTran( oParent, Chr( 9 ), " " )
ENDIF
::root := Self
::htmlTagName := "_root_"

View File

@@ -87,6 +87,8 @@
#define B_FAT ( Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + ;
Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) )
#define HB_B_THIN_UNI hb_UTF8ToStrBox( "█▀███▄██" )
#define HB_B_FAT_UNI hb_UTF8ToStrBox( "████████" )
/* TEXT INTO <varname> [WRAP [<cEOL>]] [TRIMMED] */
#xcommand TEXT INTO <v> [<wrp:WRAP>] [<trm:TRIMMED>] => ;

View File

@@ -99,8 +99,8 @@ PROCEDURE __dbgHelp( nTopic )
STATIC PROCEDURE PaintWindow( oDlg, oBrw, aTopics )
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 13, oDlg:nBottom - 1, oDlg:nLeft + 13, HB_B_SINGLE_UNI, oDlg:cColor )
hb_dispOutAt( oDlg:nTop , oDlg:nLeft + 13 , Chr( 194 ), oDlg:cColor )
hb_dispOutAt( oDlg:nBottom , oDlg:nLeft + 13 , Chr( 193 ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nTop , oDlg:nLeft + 13, hb_UTF8ToStrBox( "┬" ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nBottom , oDlg:nLeft + 13, hb_UTF8ToStrBox( "┴" ), oDlg:cColor )
oBrw:ForceStable()
ShowTopic( oDlg, aTopics, oBrw:Cargo, 0 ) // Start on page 1
@@ -259,7 +259,8 @@ STATIC FUNCTION GetTopics()
{ "Script files", } }
aTopics[ 1 ][ 2 ] := ;
{ " " + Chr( 24 ) + Chr( 25 ) + " Select help topic.",;
{ " " + Chr( 24 ) /* LOW-ASCII "↑" */ + Chr( 25 ) /* LOW-ASCII "↓" */ +;
" Select help topic.",;
" PageUp Page help text down.",;
" PageDn Page help text down.",;
" Esc Returns to debugger." }

View File

@@ -196,11 +196,11 @@ METHOD applyKey( nKey ) CLASS HbDbInput
Set( _SET_INSERT, !Set( _SET_INSERT ) )
EXIT
OTHERWISE
IF nKey >= 32 .AND. nKey <= 255
IF !( hb_keyChar( nKey ) == "" )
IF Set( _SET_INSERT )
::cValue := Left( Stuff( ::cValue, ::nPos, 0, Chr( nKey ) ), ::nSize )
::cValue := Left( Stuff( ::cValue, ::nPos, 0, hb_keyChar( nKey ) ), ::nSize )
ELSE
::cValue := Stuff( ::cValue, ::nPos, 1, Chr( nKey ) )
::cValue := Stuff( ::cValue, ::nPos, 1, hb_keyChar( nKey ) )
ENDIF
IF ::nPos < ::nSize
::nPos++

View File

@@ -237,8 +237,8 @@ METHOD Display() CLASS HBDbMenu
FOR n := 1 TO Len( ::aItems )
IF ::aItems[ n ]:cPrompt == "-" // Separator
hb_dispOutAt( ::aItems[ n ]:nRow, ::nLeft,;
Chr( 195 ) + Replicate( Chr( 196 ), ::nRight - ::nLeft - 1 ) + Chr( 180 ) )
hb_dispOutAtBox( ::aItems[ n ]:nRow, ::nLeft,;
hb_UTF8ToStrBox( "├" + Replicate( "─", ::nRight - ::nLeft - 1 ) + "┤" ) )
ELSE
::aItems[ n ]:Display( ::cClrPopup, ::cClrHotKey )
ENDIF
@@ -481,9 +481,9 @@ METHOD ProcessKey( nKey ) CLASS HBDbMenu
OTHERWISE
IF ::nOpenPopup > 0
IF IsAlpha( Chr( nKey ) )
IF IsAlpha( hb_keyChar( nKey ) )
oPopup := ::aItems[ ::nOpenPopup ]:bAction
nPopup := oPopup:GetHotKeyPos( Upper( Chr( nKey ) ) )
nPopup := oPopup:GetHotKeyPos( Upper( hb_keyChar( nKey ) ) )
IF nPopup > 0 .AND. oPopup:nOpenPopup != nPopup
oPopup:DeHilite()
oPopup:ShowPopup( nPopup )

View File

@@ -98,6 +98,6 @@ METHOD Display( cClrText, cClrHotKey ) CLASS HBDbMenuItem
( nAt := At( "~", ::cPrompt ) ) - 1,;
SubStr( ::cPrompt, nAt + 1, 1 ), cClrHotKey )
hb_dispOutAt( ::nRow, ::nCol, iif( ::lChecked, Chr( 251 ), "" ), cClrText )
hb_dispOutAtBox( ::nRow, ::nCol, iif( ::lChecked, hb_UTF8ToStrBox( "√" ), "" ), cClrText )
RETURN Self

View File

@@ -198,7 +198,7 @@ METHOD Refresh() CLASS HBDbWindow
DispBegin()
hb_dispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, iif( ::lFocused, HB_B_DOUBLE_UNI, HB_B_SINGLE_UNI ), ::cColor )
hb_dispOutAt( ::nTop, ::nLeft + 1, "[" + Chr( 254 ) + "]", ::cColor )
hb_dispOutAtBox( ::nTop, ::nLeft + 1, hb_UTF8ToStrBox( "[■]" ), ::cColor )
::ShowCaption( ::cCaption )
@@ -290,7 +290,7 @@ METHOD Move() Class HBDbWindow
DO WHILE .T.
RestScreen( ,,,, ::cBackImage )
hb_dispBox( ::nTop, ::nLeft, ::nRight, ::nBottom, Replicate( Chr( 176 ), 8 ) + " " )
hb_dispBox( ::nTop, ::nLeft, ::nRight, ::nBottom, Replicate( hb_UTF8ToStrBox( "░" ), 8 ) + " " )
nKey := Inkey( 0 )
@@ -337,7 +337,7 @@ METHOD Move() Class HBDbWindow
ENDIF
ENDDO
// __Keyboard( Chr( 0 ) ), Inkey() )
// hb_keyPut( 0 ); Inkey()
RETURN NIL

View File

@@ -177,16 +177,16 @@ STATIC PROCEDURE DlgWorkAreaPaint( oDlg, aBrw )
/* Display separator lines */
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 12, oDlg:nBottom - 1, oDlg:nLeft + 12, HB_B_SINGLE_UNI, oDlg:cColor )
hb_dispOutAt( oDlg:nTop, oDlg:nLeft + 12, Chr( 194 ), oDlg:cColor )
hb_dispOutAt( oDlg:nBottom, oDlg:nLeft + 12, Chr( 193 ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nTop, oDlg:nLeft + 12, hb_UTF8ToStrBox( "┬" ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nBottom, oDlg:nLeft + 12, hb_UTF8ToStrBox( "┴" ), oDlg:cColor )
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 51, oDlg:nBottom - 1, oDlg:nLeft + 51, HB_B_SINGLE_UNI, oDlg:cColor )
hb_dispOutAt( oDlg:nTop, oDlg:nLeft + 51, Chr( 194 ), oDlg:cColor )
hb_dispOutAt( oDlg:nBottom, oDlg:nLeft + 51, Chr( 193 ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nTop, oDlg:nLeft + 51, hb_UTF8ToStrBox( "┬" ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nBottom, oDlg:nLeft + 51, hb_UTF8ToStrBox( "┴" ), oDlg:cColor )
hb_dispBox( oDlg:nTop + 6, oDlg:nLeft + 13, oDlg:nTop + 6, oDlg:nLeft + 50, HB_B_SINGLE_UNI, oDlg:cColor )
hb_dispOutAt( oDlg:nTop + 6, oDlg:nLeft + 12, Chr( 195 ), oDlg:cColor )
hb_dispOutAt( oDlg:nTop + 6, oDlg:nLeft + 51, Chr( 180 ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nTop + 6, oDlg:nLeft + 12, hb_UTF8ToStrBox( "├" ), oDlg:cColor )
hb_dispOutAtBox( oDlg:nTop + 6, oDlg:nLeft + 51, hb_UTF8ToStrBox( "┤" ), oDlg:cColor )
/* Display labels */

View File

@@ -371,7 +371,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
CASE xkey == K_ENTER .AND. predit < 2
rez := .F.
rezproc := xkey
CASE ( xkey == K_ENTER .OR. ! Empty( hb_keyChar( xkey ) ) ) .AND. predit > 1
CASE ( xkey == K_ENTER .OR. !( hb_keyChar( xkey ) == "" ) ) .AND. predit > 1
fipos := LI_COLPOS + LI_NLEFT - 1 - LI_FREEZE
IF LI_WHEN == NIL .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == NIL .OR. Eval( LI_WHEN[ fipos ] )
IF !( ValType( LI_MSED ) == "N" )