summaryrefslogtreecommitdiff
path: root/bin/ed
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/ed.117
-rw-r--r--bin/ed/io.c10
2 files changed, 6 insertions, 21 deletions
diff --git a/bin/ed/ed.1 b/bin/ed/ed.1
index 8359cf292fa..aefb0d59d12 100644
--- a/bin/ed/ed.1
+++ b/bin/ed/ed.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ed.1,v 1.69 2017/07/05 12:23:46 schwarze Exp $
+.\" $OpenBSD: ed.1,v 1.70 2018/04/26 12:18:54 martijn Exp $
.\"
.\" Copyright (c) 1993 Andrew Moore, Talke Studio.
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 5 2017 $
+.Dd $Mdocdate: April 26 2018 $
.Dt ED 1
.Os
.Sh NAME
@@ -807,19 +807,6 @@ additionally, it says behaviour for the
.Fl
option is
.Dq unspecified .
-.Pp
-The
-.St -p1003.1-2008
-specification says the
-.Ic l
-command should mark the ends of lines with a
-.Sq $
-character,
-and that
-.Sq $
-characters
-within the text should be output preceded by a backslash;
-this implementation does not support that.
.Sh HISTORY
An
.Nm
diff --git a/bin/ed/io.c b/bin/ed/io.c
index 13e2c583b8d..de2f2586b36 100644
--- a/bin/ed/io.c
+++ b/bin/ed/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.20 2017/04/26 21:25:43 naddy Exp $ */
+/* $OpenBSD: io.c,v 1.21 2018/04/26 12:18:54 martijn Exp $ */
/* $NetBSD: io.c,v 1.2 1995/03/21 09:04:43 cgd Exp $ */
/* io.c: This file contains the i/o routines for the ed line editor */
@@ -295,8 +295,8 @@ get_tty_line(void)
-#define ESCAPES "\a\b\f\n\r\t\v\\"
-#define ESCCHARS "abfnrtv\\"
+#define ESCAPES "\a\b\f\n\r\t\v\\$"
+#define ESCCHARS "abfnrtv\\$"
extern int rows;
extern int cols;
@@ -330,7 +330,7 @@ put_tty_line(char *s, int l, int n, int gflag)
#endif
}
if (gflag & GLS) {
- if (31 < *s && *s < 127 && *s != '\\')
+ if (31 < *s && *s < 127 && *s != '\\' && *s != '$')
putchar(*s);
else {
putchar('\\');
@@ -348,10 +348,8 @@ put_tty_line(char *s, int l, int n, int gflag)
} else
putchar(*s);
}
-#ifndef BACKWARDS
if (gflag & GLS)
putchar('$');
-#endif
putchar('\n');
return 0;
}