DragonFly BSD
DragonFly commits List (threaded) for 2011-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Peter Avalos <pavalos@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 21 Aug 2011 16:32:29 -0700 (PDT)

commit 21f23b600b1633d7eea0f62ce0ad54fddf497728
Author: Peter Avalos <pavalos@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]