From db11c4a1cf53ecf63ddb58386c8c0981cc32b167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 6 Oct 2015 12:37:29 +0200 Subject: [PATCH] 2015-10-06 12:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/hbbfsock.c ! typo in comment * src/rtl/mlcfunc.c * casting * src/rtl/memoedit.prg * src/rtl/teditor.prg * formatting and few modifications to reduce some differences between core and Viktor's branch --- ChangeLog.txt | 12 ++++++++++++ src/rtl/hbbfsock.c | 2 +- src/rtl/memoedit.prg | 4 ++-- src/rtl/mlcfunc.c | 2 +- src/rtl/teditor.prg | 26 +++++++++++++------------- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0ea997c205..6fd9bfd2a0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,18 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-10-06 12:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/hbbfsock.c + ! typo in comment + + * src/rtl/mlcfunc.c + * casting + + * src/rtl/memoedit.prg + * src/rtl/teditor.prg + * formatting and few modifications to reduce some differences between + core and Viktor's branch + 2015-10-02 16:45 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * include/hbapigt.h * src/rtl/inkeyapi.c diff --git a/src/rtl/hbbfsock.c b/src/rtl/hbbfsock.c index eac83a4b29..43b81ee608 100644 --- a/src/rtl/hbbfsock.c +++ b/src/rtl/hbbfsock.c @@ -1,6 +1,6 @@ /* * Harbour Project source code: - * Harbour extended socket filter with ZLIB compression + * Harbour extended socket filter with BlowFish encryption * * Copyright 2015 Przemyslaw Czerpak * www - http://harbour-project.org diff --git a/src/rtl/memoedit.prg b/src/rtl/memoedit.prg index f732cdd77c..56b97bb2a2 100644 --- a/src/rtl/memoedit.prg +++ b/src/rtl/memoedit.prg @@ -305,8 +305,8 @@ METHOD InsertState( lInsState ) CLASS HBMemoEditor IF HB_ISLOGICAL( lInsState ) .AND. ::lEditAllow Set( _SET_INSERT, lInsState ) SetCursor( iif( lInsState, SC_INSERT, SC_NORMAL ) ) - IF SET( _SET_SCOREBOARD ) - hb_dispOutAt( 0, MaxCol() - 19, iif( lInsState, "", " " ) ) + IF Set( _SET_SCOREBOARD ) + hb_DispOutAt( 0, MaxCol() - 19, iif( lInsState, "", " " ) ) ENDIF ENDIF diff --git a/src/rtl/mlcfunc.c b/src/rtl/mlcfunc.c index 0bb2e10284..c040124470 100644 --- a/src/rtl/mlcfunc.c +++ b/src/rtl/mlcfunc.c @@ -660,7 +660,7 @@ HB_FUNC( HB_MLEVAL ) if( nRepl-- == 0 ) break; if( !cdp ) - pszLine[ nDst++ ] = ch; + pszLine[ nDst++ ] = ( char ) ch; else if( ! HB_CDPCHAR_PUT( cdp, pszLine, nLineLength + 1, &nDst, ch ) ) break; } diff --git a/src/rtl/teditor.prg b/src/rtl/teditor.prg index c18bb07812..8858b3088b 100644 --- a/src/rtl/teditor.prg +++ b/src/rtl/teditor.prg @@ -217,7 +217,7 @@ METHOD LoadText( cText ) CLASS HBEditor // Saves file being edited, if there is no file name does nothing, returns .T. if OK METHOD SaveFile() CLASS HBEditor - RETURN ! Empty( ::cFile ) .AND. ; + RETURN ! HB_ISNULL( ::cFile ) .AND. ; ! ::lDirty := ! hb_MemoWrit( ::cFile, ::GetText() ) // Add a new Line of text at end of current text @@ -243,7 +243,7 @@ METHOD RemoveLine( nRow ) CLASS HBEditor // Return line n of text METHOD GetLine( nRow ) CLASS HBEditor - RETURN iif( nRow >=1 .AND. nRow <= ::LineCount, ::aText[ nRow ]:cText, "" ) + RETURN iif( nRow >= 1 .AND. nRow <= ::LineCount, ::aText[ nRow ]:cText, "" ) // Return text length of line n METHOD LineLen( nRow ) CLASS HBEditor @@ -366,10 +366,10 @@ METHOD MoveCursor( nKey ) CLASS HBEditor SWITCH hb_keyStd( nKey ) CASE K_DOWN - IF ! ::lEditAllow - ::Goto( ::nFirstRow + ::nNumRows, ::nCol ) - ELSE + IF ::lEditAllow ::Goto( ::nRow + 1, ::nCol ) + ELSE + ::Goto( ::nFirstRow + ::nNumRows, ::nCol ) ENDIF EXIT @@ -382,10 +382,10 @@ METHOD MoveCursor( nKey ) CLASS HBEditor EXIT CASE K_UP - IF ! ::lEditAllow - ::Goto( ::nFirstRow - 1, ::nCol ) - ELSE + IF ::lEditAllow ::Goto( ::nRow - 1, ::nCol ) + ELSE + ::Goto( ::nFirstRow - 1, ::nCol ) ENDIF EXIT @@ -480,9 +480,9 @@ METHOD Edit( nPassedKey ) CLASS HBEditor CASE ( bKeyBlock := SetKey( nKeyStd ) ) != NIL Eval( bKeyBlock ) - CASE hb_ULen( cKey := iif( nKeyStd == K_TAB .AND. Set( _SET_INSERT ), ; - Space( TabCount( ::nTabWidth, ::nCol ) ), ; - hb_keyChar( nKey ) ) ) > 0 + CASE ! HB_ISNULL( cKey := iif( nKeyStd == K_TAB .AND. Set( _SET_INSERT ), ; + Space( TabCount( ::nTabWidth, ::nCol ) ), ; + hb_keyChar( nKey ) ) ) ::lDirty := .T. oLine := ::aText[ ::nRow ] IF ( nPos := ::nCol - hb_ULen( oLine:cText ) - 1 ) > 0 @@ -602,9 +602,9 @@ METHOD BrowseText( nPassedKey ) CLASS HBEditor DO WHILE ! ::lExitEdit IF nPassedKey == NIL - IF ( nKey := Inkey() ) == 0 + IF ( nKey := Inkey(, hb_bitOr( Set( _SET_EVENTMASK ), HB_INKEY_EXT ) ) ) == 0 ::IdleHook() - nKey := Inkey( 0 ) + nKey := Inkey( 0, hb_bitOr( Set( _SET_EVENTMASK ), HB_INKEY_EXT ) ) ENDIF ELSE nKey := nPassedKey