Fix 15-year-old sam protocol bug.

This commit is contained in:
rsc 2007-01-12 15:57:34 +00:00
parent ad2922ef28
commit 78439d25f8
4 changed files with 34 additions and 34 deletions

View file

@ -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);
@ -79,6 +79,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)
{
@ -323,3 +337,4 @@ rdata(List *r, Posn p1, Posn n)
}
return rg;
}