various bug fixes

This commit is contained in:
rsc 2004-05-14 15:14:21 +00:00
parent a796abef16
commit 1a8f27c350
14 changed files with 1236 additions and 9 deletions

View file

@ -663,12 +663,12 @@ rowload(Row *row, char *file, int initing)
break;
wincleartag(w);
textinsert(&w->tag, w->tag.file->b.nc, r+n+1, nr-(n+1), TRUE);
free(r);
if(ndumped >= 0){
/* simplest thing is to put it in a file and load that */
sprint(buf, "/tmp/d%d.%.4sacme", getpid(), getuser());
fd = create(buf, OWRITE|ORCLOSE, 0600);
if(fd < 0){
free(r);
warning(nil, "can't create temp file: %r\n");
goto Rescue2;
}
@ -679,6 +679,7 @@ rowload(Row *row, char *file, int initing)
if(rune == '\n')
line++;
if(rune == (Rune)Beof){
free(r);
Bterm(bout);
free(bout);
close(fd);
@ -696,6 +697,7 @@ rowload(Row *row, char *file, int initing)
winsettag(w);
}else if(dumpid==0 && r[ns+1]!='+' && r[ns+1]!='-')
get(&w->body, nil, nil, FALSE, XXX, nil, 0);
free(r);
if(fontr){
fontx(&w->body, nil, nil, 0, 0, fontr, nfontr);
free(fontr);