diff --git a/check.t b/check.t index fd14c76..8d401ad 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.90 2007/02/07 02:31:06 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.91 2007/02/16 17:46:41 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 R29 2007/02/07 + @(#)MIRBSD KSH R29 2007/02/16 description: Check version of shell. category: pdksh diff --git a/edit.c b/edit.c index 090304f..f09bb3d 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.81 2007/02/07 02:01:43 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.82 2007/02/16 17:46:42 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -739,8 +739,10 @@ x_escape(const char *s, size_t len, int (*putbuf_func) (const char *, size_t)) rval = -1; break; } - putbuf_func("\\", 1); + putbuf_func(s[add] == '\n' ? "'" : "\\", 1); putbuf_func(&s[add], 1); + if (s[add] == '\n') + putbuf_func("'", 1); add++; wlen -= add; diff --git a/sh.h b/sh.h index 8c7376e..7f15bb1 100644 --- a/sh.h +++ b/sh.h @@ -8,8 +8,8 @@ /* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */ -#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.111 2007/02/07 02:31:06 tg Exp $" -#define MKSH_VERSION "R29 2007/02/07" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.112 2007/02/16 17:46:42 tg Exp $" +#define MKSH_VERSION "R29 2007/02/16" #if HAVE_SYS_PARAM_H #include