-#define MERGE_PRINT_LINE(part_line, line, flags) do { \
- char *merged_line = NULL; \
- if (part_line) \
- { \
- merged_line = str_concat (part_line, line); \
- free_null (part_line); \
- } \
- print_line (colors, bold, merged_line ? merged_line : line, flags); \
- free (merged_line); \
+#define MERGE_PRINT_LINE(part_line, line, flags, check_eof) do { \
+ char *current_line, *merged_line = NULL; \
+ if (part_line) \
+ { \
+ merged_line = str_concat (part_line, line); \
+ free_null (part_line); \
+ } \
+ current_line = merged_line ? merged_line : (char *)line; \
+ if (!check_eof || *current_line != '\0') \
+ print_line (colors, bold, current_line, flags); \
+ free (merged_line); \