Read in text mode in a needed place only
Converting CR+LF to LF in blocking_read() which is a underlying read function, may affect to the functions which do not perform line-based operation. modified: funcs.c modified: main.c modified: misc.c modified: os2.c modified: shf.c
This commit is contained in:
3
os2.c
3
os2.c
@@ -191,7 +191,8 @@ void os2_init(int *argcp, const char ***argvp)
|
||||
init_extlibpath();
|
||||
env_slashify();
|
||||
|
||||
setmode(STDIN_FILENO, O_TEXT);
|
||||
if (!isatty(STDIN_FILENO))
|
||||
setmode(STDIN_FILENO, O_BINARY);
|
||||
if (!isatty(STDOUT_FILENO))
|
||||
setmode(STDOUT_FILENO, O_BINARY);
|
||||
if (!isatty(STDERR_FILENO))
|
||||
|
Reference in New Issue
Block a user