aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/sed.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-06-26 00:03:55 +0000
committerrsc <devnull@localhost>2006-06-26 00:03:55 +0000
commita09e85757d8163ff759112a14f308e465b38b52a (patch)
treee934d6d47dd9bdd10fd3ac5a2b5f48c8a2c78817 /src/cmd/sed.c
parentd5cada1329391f91034feaed9a7fc58bee45b9f8 (diff)
downloadplan9port-a09e85757d8163ff759112a14f308e465b38b52a.tar.gz
plan9port-a09e85757d8163ff759112a14f308e465b38b52a.tar.bz2
plan9port-a09e85757d8163ff759112a14f308e465b38b52a.zip
add -l flag
Diffstat (limited to 'src/cmd/sed.c')
-rw-r--r--src/cmd/sed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/sed.c b/src/cmd/sed.c
index ddbcbf81..a463e071 100644
--- 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