1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
#! /bin/sh -e
## 03_ed.1-cleanup.dpatch by Matt Kraai <kraai@alumni.carnegiemellon.edu>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: ed.1 cleanup to fix rendering and other issues
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
--- ed-0.2.orig/ed.1
+++ ed-0.2/ed.1
@@ -196,14 +196,14 @@
The last line in the buffer.
.TP 8
-n
+.I n
The
.IR n th,
line in the buffer
where
.I n
is a number in the range
-.I [0,$].
+.IR [0,$] .
.HP
-
@@ -215,9 +215,9 @@
and may be repeated with cumulative effect.
.HP
--\fIn\fR
+.RI - n
.TP 8
-^\fIn\fR
+.RI ^ n
The
.IR n th
previous line, where
@@ -235,7 +235,7 @@
.HP
+\fIn\fR
.TP 8
-whitespace \fIn\fR
+.I whitespace n
The
.IR n th
next line, where
@@ -253,16 +253,16 @@
%
The first through last lines in the buffer. This is equivalent to
the address range
-.I 1,$.
+.IR 1,$ .
.TP 8
;
The current through last lines in the buffer. This is equivalent to
the address range
-.I .,$.
+.IR .,$ .
.TP 8
-.RI / re/
+.RI / re /
The
next line containing the regular expression
.IR re .
@@ -271,7 +271,7 @@
// repeats the last search.
.TP 8
-.RI ? re?
+.RI ? re ?
The
previous line containing the regular expression
.IR re .
@@ -280,7 +280,7 @@
?? repeats the last search.
.TP 8
-.RI \' lc
+.RI ' lc
The
line previously marked by a
.I `k'
@@ -331,7 +331,7 @@
matches itself.
.TP 8
-\fR.\fR
+\&.
Matches any single character.
.TP 8
@@ -482,7 +482,7 @@
\fR\e+\fR
Matches the single character regular expression or subexpression
immediately preceding it one or more times. So the regular expression
-`a+' is shorthand for `aa*'. If \e+ occurs at the beginning of a
+`a\e+' is shorthand for `aa*'. If \e+ occurs at the beginning of a
regular expression or subexpression, then it matches a literal `+'.
@@ -564,7 +564,7 @@
The current address is set to the last line read.
.TP 8
-.RI e \ !command
+e !\fIcommand\fR
Edits the standard output of
.IR `!command' ,
(see
@@ -746,7 +746,7 @@
The current address is set to the last line read.
.TP 8
-.RI ($)r \ !command
+($)r !\fIcommand\fR
Reads
to after the addressed line
the standard output of
@@ -843,7 +843,7 @@
suffix toggles the global suffix of the last substitution.
The
.I `p'
-suffix toggles the print suffix of the last substitution
+suffix toggles the print suffix of the last substitution.
The current address is set to the last line affected.
.TP 8
@@ -909,7 +909,7 @@
command.
.TP 8
-.RI (1,$)w \ !command
+(1,$)w !\fIcommand\fR
Writes the addressed lines to the standard input of
.IR `!command' ,
(see the
|