clean up mkfile; fix winctlprint bug reported by peter canning
This commit is contained in:
parent
f755d50401
commit
627bae9c76
4 changed files with 15 additions and 21 deletions
|
|
@ -255,7 +255,7 @@ xfidread(Xfid *x)
|
|||
int n, q;
|
||||
uint off;
|
||||
char *b;
|
||||
char buf[128];
|
||||
char buf[256];
|
||||
Window *w;
|
||||
|
||||
q = FILE(x->f->qid);
|
||||
|
|
@ -295,18 +295,22 @@ xfidread(Xfid *x)
|
|||
break;
|
||||
|
||||
case QWctl:
|
||||
winctlprint(w, buf, 1);
|
||||
goto Readbuf;
|
||||
b = winctlprint(w, buf, 1);
|
||||
goto Readb;
|
||||
|
||||
Readbuf:
|
||||
n = strlen(buf);
|
||||
b = buf;
|
||||
Readb:
|
||||
n = strlen(b);
|
||||
if(off > n)
|
||||
off = n;
|
||||
if(off+x->fcall.count > n)
|
||||
x->fcall.count = n-off;
|
||||
fc.count = x->fcall.count;
|
||||
fc.data = buf+off;
|
||||
fc.data = b+off;
|
||||
respond(x, &fc, nil);
|
||||
if(b != buf)
|
||||
free(b);
|
||||
break;
|
||||
|
||||
case QWevent:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue