diff options
author | joerg <joerg@FreeBSD.org> | 1995-08-27 20:26:44 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-08-27 20:26:44 +0000 |
commit | 3de11c3b09cdec723b035bb30b7c9dd56e6a63fe (patch) | |
tree | aa25560c1b49997e050627ed8fb344509e6d8e8e /bin/sh/parser.c | |
parent | 036808c79be581b38c4def1672d9fe425496c53b (diff) | |
download | FreeBSD-src-3de11c3b09cdec723b035bb30b7c9dd56e6a63fe.zip FreeBSD-src-3de11c3b09cdec723b035bb30b7c9dd56e6a63fe.tar.gz |
Make the shell handle a null command in a &&/|| sequence correctly.
The && and || tokens do also terminate a command, not only the
newline.
While i was at it, disabled trace code by default, it served no good
purpose since it required the use of a debugger anyway to be turned
on. Instead, placed a hint in the Makefile on how to turn it on.
This makes the shell ~ 10 % faster and ~ 4 KB smaller. :)
Pointed out by: jan@physik.TU-Berlin.DE (Jan Riedinger)
Diffstat (limited to 'bin/sh/parser.c')
-rw-r--r-- | bin/sh/parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 1353b5b..83830ec 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: parser.c,v 1.6 1995/05/30 00:07:22 rgrimes Exp $ + * $Id: parser.c,v 1.7 1995/08/11 08:18:39 joerg Exp $ */ #ifndef lint @@ -442,6 +442,8 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : "")); checkkwd = 1; break; /* Handle an empty command like other simple commands. */ + case TAND: + case TOR: case TNL: case TWORD: tokpushback++; |