From 3a9cd7d74a74b2ee053f32b407f9eb1bcd8f7e25 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 14 Nov 2019 21:12:34 -0600 Subject: [PATCH] Update: print newline for empty content even when --at and --line, so long as --empty is specified --- level_3/fss_basic_read/c/private-fss_basic_read.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.c b/level_3/fss_basic_read/c/private-fss_basic_read.c index 1cff74f..4634314 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.c +++ b/level_3/fss_basic_read/c/private-fss_basic_read.c @@ -430,9 +430,14 @@ extern "C" { } if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) { - if (data->contents.array[depths.array[0].value_at].used > 0 && line == 0) { - f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[depths.array[0].value_at].array[0]); - fprintf(f_standard_output, "%c", f_string_eol); + if (line == 0) { + if (data->contents.array[depths.array[0].value_at].used > 0) { + f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[depths.array[0].value_at].array[0]); + fprintf(f_standard_output, "%c", f_string_eol); + } + else if (include_empty) { + fprintf(f_standard_output, "%c", f_string_eol); + } } return f_none; @@ -442,6 +447,9 @@ extern "C" { f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[depths.array[0].value_at].array[0]); fprintf(f_standard_output, "%c", f_string_eol); } + else if (include_empty) { + fprintf(f_standard_output, "%c", f_string_eol); + } } return f_none; -- 1.8.3.1