version 1.7, 2001/05/23 22:20:35 |
version 1.8, 2001/05/23 22:36:14 |
|
|
s = eread("Insert file: ", fname, NFILEN, EFNEW | EFCR | EFFILE); |
s = eread("Insert file: ", fname, NFILEN, EFNEW | EFCR | EFFILE); |
if (s != TRUE) |
if (s != TRUE) |
return (s); |
return (s); |
return insertfile(adjustname(fname), (char *)NULL, FALSE); |
return insertfile(adjustname(fname), NULL, FALSE); |
/* don't set buffer name */ |
/* don't set buffer name */ |
} |
} |
|
|
|
|
|
|
/* cheap */ |
/* cheap */ |
bp = curbp; |
bp = curbp; |
if (newname != (char *)NULL) |
if (newname != NULL) |
(void)strcpy(bp->b_fname, newname); |
(void)strcpy(bp->b_fname, newname); |
|
|
/* hard file open */ |
/* hard file open */ |
if ((s = ffropen(fname, needinfo ? bp : (BUFFER *) NULL)) == FIOERR) |
if ((s = ffropen(fname, needinfo ? bp : NULL)) == FIOERR) |
goto out; |
goto out; |
if (s == FIOFNF) { |
if (s == FIOFNF) { |
/* file not found */ |
/* file not found */ |
|
|
} |
} |
endoffile: |
endoffile: |
/* ignore errors */ |
/* ignore errors */ |
(void)ffclose((BUFFER *)NULL); |
ffclose(NULL); |
/* don't zap an error */ |
/* don't zap an error */ |
if (s == FIOEOF) { |
if (s == FIOEOF) { |
if (nline == 1) |
if (nline == 1) |