[util] Set stdio files to line buffering
So we can stream lines to hb-shape and read output.
This commit is contained in:
parent
80fd574320
commit
ff2083c53e
|
@ -780,6 +780,8 @@ text_options_t::get_line (unsigned int *len)
|
||||||
gs = g_string_new (nullptr);
|
gs = g_string_new (nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setlinebuf (fp);
|
||||||
|
|
||||||
g_string_set_size (gs, 0);
|
g_string_set_size (gs, 0);
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
while (fgets (buf, sizeof (buf), fp)) {
|
while (fgets (buf, sizeof (buf), fp)) {
|
||||||
|
@ -817,6 +819,8 @@ 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);
|
||||||
|
|
||||||
return fp;
|
return fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue