DragonFly commits List (threaded) for 2011-08
git: sh: Add case statement fallthrough (with ';&' instead of ';;').
Author: Peter Avalos <email@example.com>
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
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
DragonFly BSD source repository