From acce93e3427ccaadd3192e9a2a61a4e128b4163e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 7 Jul 2012 18:40:04 -0500 Subject: [PATCH] Update: Report total number of content parts when doing a total This is uneeded for basic and basic list, but extended supports multiple content parts. When -t is passed while doing a selection using -c, report the total number of content parts instead of the total number found. --- level_3/fss_extended_read/c/fss_extended_read.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index d0205dc..7a37bc7 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -428,6 +428,10 @@ extern "C"{ } if (data->parameters[fss_extended_read_parameter_count].result == f_console_result_additional) { + if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { + total = data->contents.array[current].used; + } + if (found == target) { break; } else { @@ -438,7 +442,7 @@ extern "C"{ } } // for - if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found && data->parameters[fss_extended_read_parameter_count].result == f_console_result_none) { + if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { fprintf(f_standard_output, f_string_length_printf "\n", total); } } else { -- 1.8.3.1