sh: Add case statement fallthrough (with ';&' instead of ';;').
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 21:45:13 +0000 (14:45 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 21:45:13 +0000 (14:45 -0700)
commit21f23b600b1633d7eea0f62ce0ad54fddf497728
tree220cc94396d5b04bb208ab1018594dc25e58b13c
parent6a2acd5391a461a9359149fd9f93283b222b8e5e
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
bin/sh/eval.c
bin/sh/mktokens
bin/sh/nodetypes
bin/sh/parser.c
bin/sh/sh.1
tools/regression/bin/sh/builtins/case9.0 [new file with mode: 0644]