From 161e99309f1bd6ca99378f50093524e1e7beda85 Mon Sep 17 00:00:00 2001 From: vszakats Date: Thu, 14 Mar 2013 22:35:16 +0100 Subject: [PATCH] 2013-03-14 18:36 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg ! fixed to not issue warning about missing sign tool if signing was not requested, plus, related optimization * bin/commit.hb ! fixed processing git output * contrib/hbct/getsecrt.prg ! GetSecret() fixed to turn on cursor while waiting * contrib/hbct/getsecrt.prg * contrib/hbct/getinput.prg * contrib/hbsqlit3/core.c * doc/en/rddmisc.txt ! formatting --- harbour/ChangeLog.txt | 17 +++++++ harbour/bin/commit.hb | 4 +- harbour/contrib/hbct/getinput.prg | 2 +- harbour/contrib/hbct/getsecrt.prg | 5 +- harbour/contrib/hbsqlit3/core.c | 2 +- harbour/doc/en/rddmisc.txt | 4 +- harbour/utils/hbmk2/hbmk2.prg | 78 ++++++++++++++++--------------- 7 files changed, 68 insertions(+), 44 deletions(-) diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index 328933a722..4704838643 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,23 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-14 18:36 UTC+0100 Viktor Szakats (harbour syenar.net) + * utils/hbmk2/hbmk2.prg + ! fixed to not issue warning about missing sign tool + if signing was not requested, plus, related optimization + + * bin/commit.hb + ! fixed processing git output + + * contrib/hbct/getsecrt.prg + ! GetSecret() fixed to turn on cursor while waiting + + * contrib/hbct/getsecrt.prg + * contrib/hbct/getinput.prg + * contrib/hbsqlit3/core.c + * doc/en/rddmisc.txt + ! formatting + 2013-03-14 20:10 UTC+0200 Pavel Tsarenko (tpe2 at mail.ru) * contrib/hbct/screen2.c * unicode support for SayMoveIn() and SaySpread() functions diff --git a/harbour/bin/commit.hb b/harbour/bin/commit.hb index 5c4df5ae2c..a983ac4dc2 100644 --- a/harbour/bin/commit.hb +++ b/harbour/bin/commit.hb @@ -159,6 +159,9 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges ) FOR EACH cLine IN aChanges IF ! Empty( cLine ) .AND. SubStr( cLine, 3, 1 ) == " " cStart := Left( cLine, 1 ) + IF Empty( Left( cLine, 1 ) ) + cStart := SubStr( cLine, 2, 1 ) + ENDIF SWITCH cStart CASE " " CASE "?" @@ -189,7 +192,6 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges ) RETURN aNew - STATIC FUNCTION Shell() LOCAL cShell diff --git a/harbour/contrib/hbct/getinput.prg b/harbour/contrib/hbct/getinput.prg index 2eff09548d..864c2a4230 100644 --- a/harbour/contrib/hbct/getinput.prg +++ b/harbour/contrib/hbct/getinput.prg @@ -64,7 +64,7 @@ FUNCTION GetInput( xVar, nRow, nCol, lSay, xPrompt ) hb_default( @lSay, .F. ) SetPos( nRow, nCol ) - IF xPrompt != Nil + IF xPrompt != NIL DevOut( xPrompt ) nRow := Row() nCol := Col() + 1 diff --git a/harbour/contrib/hbct/getsecrt.prg b/harbour/contrib/hbct/getsecrt.prg index ca655f2b15..9931527dd7 100644 --- a/harbour/contrib/hbct/getsecrt.prg +++ b/harbour/contrib/hbct/getsecrt.prg @@ -54,6 +54,7 @@ */ #include "getexit.ch" +#include "setcurs.ch" FUNCTION GetSecret( cVar, nRow, nCol, lSay, xPrompt ) @@ -68,7 +69,7 @@ FUNCTION GetSecret( cVar, nRow, nCol, lSay, xPrompt ) hb_default( @lSay, .F. ) SetPos( nRow, nCol ) - IF xPrompt != Nil + IF xPrompt != NIL DevOut( xPrompt ) nRow := Row() nCol := Col() + 1 @@ -128,7 +129,9 @@ STATIC PROCEDURE _SECRET( _cGetSecret, lHide, oGet, oGetList ) ENDIF DO WHILE oGet:exitState == GE_NOEXIT + SetCursor( iif( ReadStats( 17 /* SNSVCURSOR */ ) == SC_NONE, SC_NORMAL, ReadStats( 17 /* SNSVCURSOR */ ) ) ) nKey := Inkey( 0 ) + SetCursor( SC_NONE ) IF ( bKeyBlock := SetKey( nKey ) ) != NIL lHide := .F. Eval( bKeyBlock, ; diff --git a/harbour/contrib/hbsqlit3/core.c b/harbour/contrib/hbsqlit3/core.c index 8161ad3443..948547b057 100644 --- a/harbour/contrib/hbsqlit3/core.c +++ b/harbour/contrib/hbsqlit3/core.c @@ -1840,7 +1840,7 @@ HB_FUNC( SQLITE3_BUFF_TO_FILE ) Causes any pending database operation to abort and return at its earliest opportunity. - sqlite3_interrupt( db ) -> Nil + sqlite3_interrupt( db ) -> NIL */ HB_FUNC( SQLITE3_INTERRUPT ) diff --git a/harbour/doc/en/rddmisc.txt b/harbour/doc/en/rddmisc.txt index e61bc56cb9..b233020c77 100644 --- a/harbour/doc/en/rddmisc.txt +++ b/harbour/doc/en/rddmisc.txt @@ -163,8 +163,8 @@ USE test NEW ? "Is Bof()", Bof() dbGoTop() - While !Bof() - dbSkip(-1) + WHILE ! Bof() + dbSkip( -1 ) ENDDO ? "Is Bof()", Bof() USE diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 1f6b004728..9090f3acef 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -7415,54 +7415,56 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit /* Setup code signing for host platform */ - IF HBMK_ISPLAT( "win|wce" ) - IF ( cBin_Sign := FindInPath( "signtool.exe" ) ) != NIL /* in MS Windows SDK */ - cOpt_Sign := "sign {FS} -f {ID} -p {PW} -t {UT} {OB}" - IF AScan( hbmk[ _HBMK_aOPTS ], {| tmp | HBMK_IS_IN( Lower( tmp ), "-v|/v" ) } ) == 0 - AAdd( hbmk[ _HBMK_aOPTS ], "-q" ) - ENDIF - ELSEIF ( cBin_Sign := FindInPath( "posign.exe" ) ) != NIL /* in Pelles C 7.00.0 or newer */ - cBin_Sign := "posign.exe" - cOpt_Sign := "{FS} -pfx:{ID} -pwd:{PW} -timeurl:{UT} {OB}" - ELSE - _hbmk_OutErr( hbmk, I_( "Warning: Code signing skipped, because no supported code signing tool could be found." ) ) - ENDIF - ENDIF + IF ! Empty( cOpt_SignID ) .AND. ! hbmk[ _HBMK_lCreateLib ] - #if defined( __PLATFORM__DARWIN ) - IF HBMK_ISPLAT( "darwin" ) + DO CASE + CASE HBMK_ISPLAT( "win|wce" ) + IF ( cBin_Sign := FindInPath( "signtool.exe" ) ) != NIL /* in MS Windows SDK */ + cOpt_Sign := "sign {FS} -f {ID} -p {PW} -t {UT} {OB}" + IF AScan( hbmk[ _HBMK_aOPTS ], {| tmp | HBMK_IS_IN( Lower( tmp ), "-v|/v" ) } ) == 0 + AAdd( hbmk[ _HBMK_aOPTS ], "-q" ) + ENDIF + ELSEIF ( cBin_Sign := FindInPath( "posign.exe" ) ) != NIL /* in Pelles C 7.00.0 or newer */ + cBin_Sign := "posign.exe" + cOpt_Sign := "{FS} -pfx:{ID} -pwd:{PW} -timeurl:{UT} {OB}" + ELSE + _hbmk_OutErr( hbmk, I_( "Warning: Code signing skipped, because no supported code signing tool could be found." ) ) + ENDIF + #if defined( __PLATFORM__DARWIN ) + CASE HBMK_ISPLAT( "darwin" ) cBin_Sign := "codesign" cOpt_Sign := "{FS} -s {ID} -f {OB}" - ENDIF - #endif + #endif + ENDCASE - IF ! Empty( cOpt_SignID ) .AND. ! hbmk[ _HBMK_lCreateLib ] .AND. ! Empty( cBin_Sign ) + IF ! Empty( cBin_Sign ) - /* Code signing */ + /* Code signing */ - hReplace := { ; - "{FS}" => ArrayToList( hbmk[ _HBMK_aOPTS ] ), ; - "{UT}" => _HBMK_SIGN_TIMEURL, ; - "{ID}" => cOpt_SignID, ; - "{OB}" => FNameEscape( hbmk[ _HBMK_cPROGNAME ], nOpt_Esc, nOpt_FNF ), ; - "{PW}" => cOpt_SignPass } + hReplace := { ; + "{FS}" => ArrayToList( hbmk[ _HBMK_aOPTS ] ), ; + "{UT}" => _HBMK_SIGN_TIMEURL, ; + "{ID}" => cOpt_SignID, ; + "{OB}" => FNameEscape( hbmk[ _HBMK_cPROGNAME ], nOpt_Esc, nOpt_FNF ), ; + "{PW}" => cOpt_SignPass } - cCommand := cBin_Sign + " " + AllTrim( hb_StrReplace( cOpt_Sign, hReplace ) ) - hReplace[ "{PW}" ] := iif( Empty( cOpt_SignPass ), "", "***" ) - tmp1 := cBin_Sign + " " + AllTrim( hb_StrReplace( cOpt_Sign, hReplace ) ) + cCommand := cBin_Sign + " " + AllTrim( hb_StrReplace( cOpt_Sign, hReplace ) ) + hReplace[ "{PW}" ] := iif( Empty( cOpt_SignPass ), "", "***" ) + tmp1 := cBin_Sign + " " + AllTrim( hb_StrReplace( cOpt_Sign, hReplace ) ) - IF hbmk[ _HBMK_lTRACE ] - IF ! hbmk[ _HBMK_lQuiet ] - _hbmk_OutStd( hbmk, I_( "Code sign command:" ) ) - ENDIF - OutStd( tmp1 + _OUT_EOL ) - ENDIF - - IF ! hbmk[ _HBMK_lDONTEXEC ] .AND. ( tmp := hb_processRun( cCommand ) ) != 0 - _hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Running code sign command. %1$d:" ), tmp ) ) - IF ! hbmk[ _HBMK_lQuiet ] + IF hbmk[ _HBMK_lTRACE ] + IF ! hbmk[ _HBMK_lQuiet ] + _hbmk_OutStd( hbmk, I_( "Code sign command:" ) ) + ENDIF OutStd( tmp1 + _OUT_EOL ) ENDIF + + IF ! hbmk[ _HBMK_lDONTEXEC ] .AND. ( tmp := hb_processRun( cCommand ) ) != 0 + _hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Running code sign command. %1$d:" ), tmp ) ) + IF ! hbmk[ _HBMK_lQuiet ] + OutStd( tmp1 + _OUT_EOL ) + ENDIF + ENDIF ENDIF ENDIF ENDIF