git: sh: Add case statement fallthrough (with ';&' instead of ';;').

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Aug 21 16:33:38 PDT 2011


commit 21f23b600b1633d7eea0f62ce0ad54fddf497728
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sun Aug 21 14:45:13 2011 -0700

    sh: Add case statement fallthrough (with ';&' instead of ';;').
    
    Replacing ;; with the new control operator ;& will cause the next list
    to be executed as well without checking its pattern, continuing until
    a list ends with ;; or until the end of the case statement. This is
    like omitting "break" in a C "switch" statement.
    
    The sequence ;& was formerly invalid.
    
    This feature is proposed for the next POSIX issue in Austin Group
    issue #449.
    
    Obtained-from:   FreeBSD 223186

Summary of changes:
 bin/sh/eval.c                            |   10 +++++++-
 bin/sh/mktokens                          |    3 +-
 bin/sh/nodetypes                         |    5 ++-
 bin/sh/parser.c                          |   16 ++++++++----
 bin/sh/sh.1                              |    9 +++++-
 tools/regression/bin/sh/builtins/case9.0 |   39 ++++++++++++++++++++++++++++++
 6 files changed, 71 insertions(+), 11 deletions(-)
 create mode 100644 tools/regression/bin/sh/builtins/case9.0

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/21f23b600b1633d7eea0f62ce0ad54fddf497728


-- 
DragonFly BSD source repository





More information about the Commits mailing list