]> Kevux Git Server - fll/commitdiff
Update: Report total number of content parts when doing a total
authorKevin Day <kevin@kevux.org>
Sat, 7 Jul 2012 23:40:04 +0000 (18:40 -0500)
committerKevin Day <kevin@kevux.org>
Sat, 7 Jul 2012 23:40:04 +0000 (18:40 -0500)
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

index d0205dcd6b7cf220e65a32d7441c819ffb14c384..7a37bc7eb4a4c835cd48dc447a37a5c665e29844 100644 (file)
@@ -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 {