diff options
| author | rsc <devnull@localhost> | 2007-01-12 15:57:34 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2007-01-12 15:57:34 +0000 |
| commit | 78439d25f8b2f6f2289e9f4e4400e0f7cdb5fa70 (patch) | |
| tree | 52eeabba50ee6446174e9228a5e27f68c4fd631e /src/cmd/sam/rasp.c | |
| parent | ad2922ef28f026b8bbd0aee30d92f703613c1486 (diff) | |
| download | plan9port-78439d25f8b2f6f2289e9f4e4400e0f7cdb5fa70.tar.gz plan9port-78439d25f8b2f6f2289e9f4e4400e0f7cdb5fa70.zip | |
Fix 15-year-old sam protocol bug.
Diffstat (limited to 'src/cmd/sam/rasp.c')
| -rw-r--r-- | src/cmd/sam/rasp.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/cmd/sam/rasp.c b/src/cmd/sam/rasp.c index 829a7b49..5a691129 100644 --- a/src/cmd/sam/rasp.c +++ b/src/cmd/sam/rasp.c @@ -3,7 +3,7 @@ * GROWDATASIZE must be big enough that all errors go out as Hgrowdata's, * so they will be scrolled into visibility in the ~~sam~~ window (yuck!). */ -#define GROWDATASIZE 50 /* if size is > this, send data with grow */ +#define GROWDATASIZE 50 /* if size is <= this, send data with grow */ void rcut(List*, Posn, Posn); int rterm(List*, Posn); @@ -80,6 +80,20 @@ raspdone(File *f, int toterm) } void +raspflush(File *f) +{ + if(grown){ + outTsll(Hgrow, f->tag, growpos, grown); + grown = 0; + } + else if(shrunk){ + outTsll(Hcut, f->tag, shrinkpos, shrunk); + shrunk = 0; + } + outflush(); +} + +void raspdelete(File *f, uint p1, uint p2, int toterm) { long n; @@ -323,3 +337,4 @@ rdata(List *r, Posn p1, Posn n) } return rg; } + |
