version 1.88, 2012/12/27 18:51:52 |
version 1.89, 2013/02/15 15:12:25 |
|
|
dorevert(void) |
dorevert(void) |
{ |
{ |
int lineno; |
int lineno; |
|
struct undo_rec *rec; |
|
|
if (access(curbp->b_fname, F_OK|R_OK) != 0) { |
if (access(curbp->b_fname, F_OK|R_OK) != 0) { |
if (errno == ENOENT) |
if (errno == ENOENT) |
|
|
|
|
/* Prevent readin from asking if we want to kill the buffer. */ |
/* Prevent readin from asking if we want to kill the buffer. */ |
curbp->b_flag &= ~BFCHG; |
curbp->b_flag &= ~BFCHG; |
|
|
|
/* Clean up undo memory */ |
|
while ((rec = TAILQ_FIRST(&curbp->b_undo))) { |
|
TAILQ_REMOVE(&curbp->b_undo, rec, next); |
|
free_undo_record(rec); |
|
} |
|
|
if (readin(curbp->b_fname)) |
if (readin(curbp->b_fname)) |
return(setlineno(lineno)); |
return(setlineno(lineno)); |