Pull in some of the lpt_port_test fixes from lpt.c.
[unix-history] / bin / ed / ed.1
index e9a3180..3bc77b0 100644 (file)
@@ -134,7 +134,7 @@ The default filename is set to
 only if it is not prefixed with a bang.
 
 .SS LINE ADDRESSING
 only if it is not prefixed with a bang.
 
 .SS LINE ADDRESSING
-An address represents the number of line in the buffer.
+An address represents the number of line in the buffer.
 .B ed
 maintains a
 .I current address
 .B ed
 maintains a
 .I current address
@@ -165,25 +165,26 @@ and is legal wherever it makes sense.
 
 An address range is two addresses separated either by a comma or
 semi-colon. The value of the first address in a range cannot exceed the
 
 An address range is two addresses separated either by a comma or
 semi-colon. The value of the first address in a range cannot exceed the
-value of the the second.  If an
+value of the the second.  If only one address is given in a range, then
+the second address is set to the given address.  If an
 .IR n- tuple
 of addresses is given where
 .I n > 2,
 .IR n- tuple
 of addresses is given where
 .I n > 2,
-then the corresponding range is determined by the last two addresses
-in the
+then the corresponding range is determined by the last two addresses in
+the
 .IR n- tuple.
 .IR n- tuple.
-If only one address is expected, then the last
-address is used.
+If only one address is expected, then the last address is used.
 
 Each address in a comma-delimited range is interpreted relative to the
 current address.  In a semi-colon-delimited range, the first address is
 used to set the current address, and the second address is interpreted
 relative to the first.
 
 
 Each address in a comma-delimited range is interpreted relative to the
 current address.  In a semi-colon-delimited range, the first address is
 used to set the current address, and the second address is interpreted
 relative to the first.
 
+
 The following address symbols are recognized.
 
 .TP 8
 The following address symbols are recognized.
 
 .TP 8
-\fR.\fR
+\&.
 The current line (address) in the buffer.
 
 .TP 8
 The current line (address) in the buffer.
 
 .TP 8
@@ -511,7 +512,9 @@ The current address is set to the last line read.
 .RI e \ !command
 Edits the standard output of
 .IR `!command' ,
 .RI e \ !command
 Edits the standard output of
 .IR `!command' ,
-executed as described below.
+(see
+.RI ! command
+below).
 The default filename is unchanged.
 Any lines in the buffer are deleted before the output of
 .I command
 The default filename is unchanged.
 Any lines in the buffer are deleted before the output of
 .I command
@@ -629,6 +632,12 @@ deleted or otherwise modified.
 .TP 8
 (.,.)l
 Prints the addressed lines unambiguously.
 .TP 8
 (.,.)l
 Prints the addressed lines unambiguously.
+If a single line fills for than one screen (as might be the case
+when viewing a binary file, for instance), a `--More--' 
+prompt is printed on the last line. 
+.B ed
+waits until the RETURN key is pressed
+before displaying the next screen. 
 The current address is set to the last line
 printed.
 
 The current address is set to the last line
 printed.
 
@@ -689,7 +698,9 @@ Reads
 to after the addressed line
 the standard output of
 .IR `!command' ,
 to after the addressed line
 the standard output of
 .IR `!command' ,
-executed as described below.
+(see the
+.RI ! command
+below).
 The default filename is unchanged.
 The current address is set to the last line read.
 
 The default filename is unchanged.
 The current address is set to the last line read.
 
@@ -707,9 +718,9 @@ matching a regular expression
 with
 .IR replacement .
 By default, only the first match in each line is replaced.
 with
 .IR replacement .
 By default, only the first match in each line is replaced.
-The
+If the
 .I `g'
 .I `g'
-(global) suffix causes every match to be replaced.
+(global) suffix is given, then every match to be replaced.
 The
 .I `n'
 suffix, where
 The
 .I `n'
 suffix, where
@@ -724,7 +735,10 @@ The current address is set the last line affected.
 .I re
 and
 .I replacement
 .I re
 and
 .I replacement
-may be delimited by any character other than space and newline.
+may be delimited by any character other than space and newline
+(see the
+.I `s'
+command below).
 If one or two of the last delimiters is omitted, then the last line
 affected is printed as though the print suffix
 .I `p'
 If one or two of the last delimiters is omitted, then the last line
 affected is printed as though the print suffix
 .I `p'
@@ -755,12 +769,18 @@ if they are escaped with a backslash (\\).
 Repeats the last substitution.
 This form of the
 .I `s'
 Repeats the last substitution.
 This form of the
 .I `s'
-command may be suffixed with
-any combination of the characters
+command accepts a count suffix
+.IR `n' ,
+or any combination of the characters
 .IR `r' ,
 .IR `g' ,
 and
 .IR `p' .
 .IR `r' ,
 .IR `g' ,
 and
 .IR `p' .
+If a count suffix
+.I `n'
+is given, then only the
+.IR n th
+match is replaced.
 The
 .I `r'
 suffix causes
 The
 .I `r'
 suffix causes
@@ -840,7 +860,9 @@ command.
 .RI (1,$)w \ !command
 Writes the addressed lines to the standard input of
 .IR `!command' ,
 .RI (1,$)w \ !command
 Writes the addressed lines to the standard input of
 .IR `!command' ,
-executed as described below.
+(see the
+.RI ! command
+below).
 The default filename and current address are unchanged.
 
 .TP 8
 The default filename and current address are unchanged.
 
 .TP 8
@@ -890,13 +912,6 @@ When the shell returns from execution, a `!'
 is printed to the standard output.
 The current line is unchanged.
 
 is printed to the standard output.
 The current line is unchanged.
 
-.TP 8
-.RI (.,.)! command
-Replaces the addressed lines with the output of
-.I `!command'
-as described above.
-The current address is set to the last line read.
-
 .TP 8
 ($)=
 Prints the line number of the addressed line.
 .TP 8
 ($)=
 Prints the line number of the addressed line.