[util] Replace setlinebuf

This commit is contained in:
Behdad Esfahbod 2018-01-10 16:47:47 +01:00
parent ff2083c53e
commit 746a37d5bd
1 changed files with 2 additions and 2 deletions

View File

@ -780,7 +780,7 @@ text_options_t::get_line (unsigned int *len)
gs = g_string_new (nullptr); gs = g_string_new (nullptr);
} }
setlinebuf (fp); setvbuf(fp, NULL, _IOLBF, BUFSIZ); //setlinebuf (fp);
g_string_set_size (gs, 0); g_string_set_size (gs, 0);
char buf[BUFSIZ]; char buf[BUFSIZ];
@ -819,7 +819,7 @@ output_options_t::get_file_handle (void)
fail (false, "Cannot open output file `%s': %s", fail (false, "Cannot open output file `%s': %s",
g_filename_display_name (output_file), strerror (errno)); g_filename_display_name (output_file), strerror (errno));
setlinebuf (fp); setvbuf(fp, NULL, _IOLBF, BUFSIZ); //setlinebuf (fp);
return fp; return fp;
} }