plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit a09e85757d8163ff759112a14f308e465b38b52a
parent d5cada1329391f91034feaed9a7fc58bee45b9f8
Author: rsc <devnull@localhost>
Date:   Mon, 26 Jun 2006 00:03:55 +0000

add -l flag

Diffstat:
Msrc/cmd/sed.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/cmd/sed.c b/src/cmd/sed.c @@ -137,6 +137,7 @@ Rune *hspend = holdsp; /* End of hold data */ int nflag; /* Command line flags */ int gflag; +int lflag; int dolflag; /* Set when at true EOF */ int sflag; /* Set when substitution done */ @@ -234,6 +235,9 @@ main(int argc, char **argv) case 'g': gflag++; continue; + case 'l': + lflag++; + continue; default: fprint(2, "sed: Unknown flag: %c\n", ARGC()); continue; @@ -1315,6 +1319,8 @@ putline(Biobuf *bp, Rune *buf, int n) while (n--) Bputrune(bp, *buf++); Bputc(bp, '\n'); + if(lflag) + Bflush(bp); } int