From 37bc1587e0fe1bf1e0ca04c4bd232455622dc809 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 6 Oct 2012 14:08:18 +0000 Subject: [PATCH] 2012-10-06 16:06 UTC+0200 Viktor Szakats (harbour syenar.net) * src/debug/dbgwa.prg * src/rtl/browse.prg * src/rtl/dbedit.prg % deleted EXIT from SWITCH statements' OTHERWISE branches. (it'd be nice if the compiler could ignore these automatically - in case it can be solved with low cost) --- harbour/ChangeLog | 8 ++++++++ harbour/src/debug/dbgwa.prg | 1 - harbour/src/rtl/browse.prg | 5 ++--- harbour/src/rtl/dbedit.prg | 1 - 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e11987fa16..dc0d8180eb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-06 16:06 UTC+0200 Viktor Szakats (harbour syenar.net) + * src/debug/dbgwa.prg + * src/rtl/browse.prg + * src/rtl/dbedit.prg + % deleted EXIT from SWITCH statements' OTHERWISE branches. + (it'd be nice if the compiler could ignore these + automatically - in case it can be solved with low cost) + 2012-10-06 15:54 UTC+0200 Viktor Szakats (vszakats syenar.net) * extras/gtwvw/tests/prog2.prg * extras/gtwvw/tests/wvwtest9.prg diff --git a/harbour/src/debug/dbgwa.prg b/harbour/src/debug/dbgwa.prg index 4e615ce3c5..e30842d58f 100644 --- a/harbour/src/debug/dbgwa.prg +++ b/harbour/src/debug/dbgwa.prg @@ -354,7 +354,6 @@ STATIC FUNCTION DbfInfo( aInfo ) EXIT OTHERWISE cValue := "Error" - EXIT ENDSWITCH AAdd( aInfo, Space( 8 ) + PadR( FieldName( nFor ), 10 ) + " = " + PadR( cValue, 17 ) ) diff --git a/harbour/src/rtl/browse.prg b/harbour/src/rtl/browse.prg index 3ee02b7fa7..986edfc7dc 100644 --- a/harbour/src/rtl/browse.prg +++ b/harbour/src/rtl/browse.prg @@ -67,7 +67,6 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight ) ENDIF lAppend := lKeyPressed := lRefresh := .F. - lContinue := .T. IF PCount() < 4 nTop := 1 @@ -107,6 +106,8 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight ) lKeyPressed := .T. ENDIF + lContinue := .T. + DO WHILE lContinue DO WHILE ! lKeyPressed .AND. ! oBrw:Stabilize() @@ -273,7 +274,6 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight ) nKey := K_ENTER lKeyPressed := .T. ENDIF - EXIT ENDSWITCH IF lRefresh @@ -393,7 +393,6 @@ STATIC FUNCTION ExitKey( lAppend ) OTHERWISE nKey := iif( nKey == K_ENTER .OR. ; !( hb_keyChar( nKey ) == "" ), K_RIGHT, 0 ) - EXIT ENDSWITCH RETURN nKey diff --git a/harbour/src/rtl/dbedit.prg b/harbour/src/rtl/dbedit.prg index 9190391c8e..322dfde007 100644 --- a/harbour/src/rtl/dbedit.prg +++ b/harbour/src/rtl/dbedit.prg @@ -276,7 +276,6 @@ FUNCTION DBEDIT( nTop, nLeft, nBottom, nRight, ; OTHERWISE lContinue := CallUser( oBrowse, xUserFunc, nKey, @lAppend, @lFlag ) lDoIdleCall := .F. - EXIT ENDSWITCH ENDIF ENDDO