mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-24 01:56:26 -05:00
file.c: remove crazy keyboard open/close calls
It seems to have something to do with some old DOS mode, and not having keyboard translation on ("Insert floppy A:" questions while opening files? Whatever). But this is while doing normal file opens, and it is just insane to open/close a tty across a file open. The possible tty init/exit sequence would mess up some of the file read/write messages. Reported-by: Bijan Soleymani <bijan@psq.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c0970c4220
commit
33676d6d23
8
file.c
8
file.c
@ -252,9 +252,6 @@ int readin(char *fname, int lockfl)
|
||||
/* let a user macro get hold of things...if he wants */
|
||||
execute(META | SPEC | 'R', FALSE, 1);
|
||||
|
||||
/* turn off ALL keyboard translation in case we get a dos error */
|
||||
TTkclose();
|
||||
|
||||
if ((s = ffropen(fname)) == FIOERR) /* Hard file open. */
|
||||
goto out;
|
||||
|
||||
@ -305,7 +302,6 @@ int readin(char *fname, int lockfl)
|
||||
mlwrite(mesg);
|
||||
|
||||
out:
|
||||
TTkopen(); /* open the keyboard again */
|
||||
for (wp = wheadp; wp != NULL; wp = wp->w_wndp) {
|
||||
if (wp->w_bufp == curbp) {
|
||||
wp->w_linep = lforw(curbp->b_linep);
|
||||
@ -478,11 +474,8 @@ int writeout(char *fn)
|
||||
if (s != TRUE)
|
||||
return s;
|
||||
#endif
|
||||
/* turn off ALL keyboard translation in case we get a dos error */
|
||||
TTkclose();
|
||||
|
||||
if ((s = ffwopen(fn)) != FIOSUC) { /* Open writes message. */
|
||||
TTkopen();
|
||||
return FALSE;
|
||||
}
|
||||
mlwrite("(Writing...)"); /* tell us were writing */
|
||||
@ -504,7 +497,6 @@ int writeout(char *fn)
|
||||
}
|
||||
} else /* Ignore close error */
|
||||
ffclose(); /* if a write error. */
|
||||
TTkopen();
|
||||
if (s != FIOSUC) /* Some sort of error. */
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user