diff --git a/alloc.c b/alloc.c index c5b99b4..0061661 100644 --- a/alloc.c +++ b/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.7 2004/02/19 18:51:17 deraadt Exp $ */ +/* $OpenBSD: alloc.c,v 1.8 2008/07/21 17:30:08 millert Exp $ */ /*- * Copyright (c) 2002 Marc Espie. @@ -29,7 +29,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/alloc.c,v 1.7 2008/07/13 16:43:55 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/alloc.c,v 1.8 2008/08/02 17:45:09 tg Exp $"); struct link { struct link *prev; diff --git a/check.t b/check.t index f8a4474..40aeda0 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.219 2008/07/18 11:33:11 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.220 2008/08/02 17:45:10 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -7,7 +7,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R35 2008/07/18 + @(#)MIRBSD KSH R35 2008/08/02 description: Check version of shell. stdin: diff --git a/funcs.c b/funcs.c index 1549061..71650ec 100644 --- a/funcs.c +++ b/funcs.c @@ -1,11 +1,11 @@ /* $OpenBSD: c_ksh.c,v 1.31 2008/05/17 23:31:52 sobrado Exp $ */ -/* $OpenBSD: c_sh.c,v 1.37 2007/09/03 13:54:23 otto Exp $ */ +/* $OpenBSD: c_sh.c,v 1.38 2008/07/23 16:34:38 jaredy Exp $ */ /* $OpenBSD: c_test.c,v 1.17 2005/03/30 17:16:37 deraadt Exp $ */ /* $OpenBSD: c_ulimit.c,v 1.17 2008/03/21 12:51:19 millert Exp $ */ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.85 2008/07/14 12:29:05 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.86 2008/08/02 17:45:11 tg Exp $"); /* A leading = means assignments before command are kept; * a leading * means a POSIX special builtin; @@ -2225,7 +2225,8 @@ timex(struct op *t, int f) timerclear(&j_usrtime); timerclear(&j_systime); rv = execute(t->left, f | XTIME); - tf |= t->left->str[0]; + if (t->left->type == TCOM) + tf |= t->left->str[0]; gettimeofday(&tv1, NULL); getrusage(RUSAGE_SELF, &ru1); getrusage(RUSAGE_CHILDREN, &cru1); diff --git a/sh.h b/sh.h index a38a299..5947070 100644 --- a/sh.h +++ b/sh.h @@ -100,9 +100,9 @@ #define __SCCSID(x) __IDSTRING(sccsid,x) #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.229 2008/07/18 11:33:12 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.230 2008/08/02 17:45:12 tg Exp $"); #endif -#define MKSH_VERSION "R35 2008/07/18" +#define MKSH_VERSION "R35 2008/08/02" #ifndef MKSH_INCLUDES_ONLY diff --git a/syn.c b/syn.c index cb9eeca..004f3db 100644 --- a/syn.c +++ b/syn.c @@ -1,8 +1,8 @@ -/* $OpenBSD: syn.c,v 1.27 2006/04/10 14:38:59 jaredy Exp $ */ +/* $OpenBSD: syn.c,v 1.28 2008/07/23 16:34:38 jaredy Exp $ */ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.25 2008/07/18 11:33:13 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.26 2008/08/02 17:45:12 tg Exp $"); struct nesting_state { int start_token; /* token than began nesting (eg, FOR) */ @@ -413,7 +413,7 @@ get_command(int cf) t = pipeline(0); if (t) { t->str = alloc(2, ATEMP); - t->str[0] = 0; /* TF_* flags */ + t->str[0] = '\0'; /* TF_* flags */ t->str[1] = '\0'; } t = block(TTIME, t, NOBLOCK, NOWORDS);