diff options
author | Jari Aalto <jari.aalto@cante.net> | 2001-04-06 19:14:31 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:53 +0000 |
commit | 28ef6c316f1aff914bb95ac09787a3c83c1815fd (patch) | |
tree | 2812fe7ffc9beec4f99856906ddfcafda54cf16a /builtins/break.def | |
parent | bb70624e964126b7ac4ff085ba163a9c35ffa18f (diff) | |
download | android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.gz android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.bz2 android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.zip |
Imported from ../bash-2.05.tar.gz.
Diffstat (limited to 'builtins/break.def')
-rw-r--r-- | builtins/break.def | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtins/break.def b/builtins/break.def index d996536..778d1f8 100644 --- a/builtins/break.def +++ b/builtins/break.def @@ -40,6 +40,7 @@ $END #include "common.h" extern char *this_command_name; +extern int posixly_correct; static int check_loop_level (); @@ -61,7 +62,7 @@ break_builtin (list) int newbreak; if (check_loop_level () == 0) - return (EXECUTION_FAILURE); + return (EXECUTION_SUCCESS); newbreak = get_numeric_arg (list, 1); @@ -96,7 +97,7 @@ continue_builtin (list) int newcont; if (check_loop_level () == 0) - return (EXECUTION_FAILURE); + return (EXECUTION_SUCCESS); newcont = get_numeric_arg (list, 1); @@ -121,7 +122,7 @@ static int check_loop_level () { #if defined (BREAK_COMPLAINS) - if (loop_level == 0) + if (loop_level == 0 && posixly_correct == 0) builtin_error ("only meaningful in a `for', `while', or `until' loop"); #endif /* BREAK_COMPLAINS */ |