Delete dead code and clean comments a little.
This commit is contained in:
parent
7d56d3747c
commit
427db879c9
@ -36,6 +36,11 @@
|
||||
static char sccsid[] = "@(#)ch.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
* Low level character input from the input file.
|
||||
* We use these special purpose routines which optimize moving
|
||||
@ -172,22 +177,17 @@ fch_get()
|
||||
if (ispipe)
|
||||
last_piped_pos += n;
|
||||
|
||||
p = &bp->data[bp->datasize];
|
||||
bp->datasize += n;
|
||||
|
||||
/*
|
||||
* Set an EOI marker in the buffered data itself. Then ensure the
|
||||
* data is "clean": there are no extra EOI chars in the data and
|
||||
* that the "meta" bit (the 0200 bit) is reset in each char;
|
||||
* also translate \r\n sequences to \n if -u flag not set.
|
||||
*/
|
||||
if (n == 0) {
|
||||
ch_fsize = pos;
|
||||
bp->data[bp->datasize++] = EOI;
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn EOI (nul) characters into 0200 since EOI has special meaning. */
|
||||
for (p = &bp->data[bp->datasize]; --n >= 0;) {
|
||||
*--p;
|
||||
--p;
|
||||
if (*p == EOI)
|
||||
*p = 0200;
|
||||
}
|
||||
|
@ -222,6 +222,13 @@ add_lnum(line, pos)
|
||||
* we get to p->next == &anchor. This also avoids
|
||||
* looking at the gap of the last one, which is
|
||||
* not computed by calcgap.
|
||||
*
|
||||
* XXX Should also ensure that we can determine the line
|
||||
* number in the case where we are reading from a pipe
|
||||
* and we no longer have the first block(s) of data from
|
||||
* the pipe buffered in ch.c. Further, keeping linenum
|
||||
* entries for lines in this case that have been thrown-
|
||||
* out of the buffer is fairly pointless.
|
||||
*/
|
||||
mingap = anchor.next->gap;
|
||||
for (p = anchor.next; p->next != &anchor; p = p->next)
|
||||
|
Loading…
Reference in New Issue
Block a user