From: Kevin Day Date: Sat, 7 Jul 2012 23:40:04 +0000 (-0500) Subject: Update: Report total number of content parts when doing a total X-Git-Tag: 0.3.0~1 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=acce93e3427ccaadd3192e9a2a61a4e128b4163e;p=fll 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. --- 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 {