|
|
|
@ -510,6 +510,7 @@ struct text_options_t : option_group_t |
|
|
|
|
text_file = nullptr; |
|
|
|
|
|
|
|
|
|
fp = nullptr; |
|
|
|
|
close_fp = false; |
|
|
|
|
gs = nullptr; |
|
|
|
|
line = nullptr; |
|
|
|
|
line_len = (unsigned int) -1; |
|
|
|
@ -524,7 +525,7 @@ struct text_options_t : option_group_t |
|
|
|
|
g_free (text_file); |
|
|
|
|
if (gs) |
|
|
|
|
g_string_free (gs, true); |
|
|
|
|
if (fp) |
|
|
|
|
if (close_fp) |
|
|
|
|
fclose (fp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -547,6 +548,7 @@ struct text_options_t : option_group_t |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
FILE *fp; |
|
|
|
|
bool close_fp; |
|
|
|
|
GString *gs; |
|
|
|
|
char *line; |
|
|
|
|
unsigned int line_len; |
|
|
|
@ -563,6 +565,7 @@ struct output_options_t : option_group_t |
|
|
|
|
explicit_output_format = false; |
|
|
|
|
|
|
|
|
|
fp = nullptr; |
|
|
|
|
close_fp = false; |
|
|
|
|
|
|
|
|
|
add_options (parser); |
|
|
|
|
} |
|
|
|
@ -570,7 +573,7 @@ struct output_options_t : option_group_t |
|
|
|
|
{ |
|
|
|
|
g_free (output_file); |
|
|
|
|
g_free (output_format); |
|
|
|
|
if (fp) |
|
|
|
|
if (close_fp) |
|
|
|
|
fclose (fp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -602,6 +605,7 @@ struct output_options_t : option_group_t |
|
|
|
|
bool explicit_output_format; |
|
|
|
|
|
|
|
|
|
mutable FILE *fp; |
|
|
|
|
bool close_fp; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct format_options_t : option_group_t |
|
|
|
|