]> Kevux Git Server - fll/commitdiff
Update: print the open/closing for the FSS Basic List Read and FSS Extended List...
authorKevin Day <thekevinday@gmail.com>
Sat, 24 Oct 2020 23:45:22 +0000 (18:45 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 24 Oct 2020 23:48:51 +0000 (18:48 -0500)
When both -o/--object and -c/--content parameters are specified, print the relevant open and close parts.

level_3/fss_basic_list_read/c/private-fss_basic_list_read.c
level_3/fss_extended_list_read/c/private-fss_extended_list_read.c

index 1e1783a2285a5228df561165408e8a666e9b96fa..9105126a010d9c3315a510e9f3eb332a3bf7761f 100644 (file)
@@ -588,7 +588,12 @@ extern "C" {
       fprintf(data.output.stream, "%c", fss_basic_list_read_pipe_content_start);
     }
     else {
-      fprintf(data.output.stream, "%c", f_fss_eol);
+      if (data.parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) {
+        fprintf(data.output.stream, "%c%c", f_fss_basic_list_open, f_fss_basic_list_open_end);
+      }
+      else {
+        fprintf(data.output.stream, "%c", f_fss_eol);
+      }
     }
   }
 #endif // _di_fss_basic_list_read_print_object_end_
index cd4286b146a409b8d1b8fc256f58472569d1b56c..04dc532d51f3a5dc9ff8a8b21e83046a6f81ad16 100644 (file)
@@ -471,10 +471,7 @@ extern "C" {
 
             if (items->array[i].content.used > 0) {
               f_print_except_dynamic_partial(data->output.stream, data->buffer, items->array[i].content.array[0], *contents_delimits);
-
-              if (data->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) {
-                fprintf(data->output.stream, "%c", fss_extended_list_read_pipe_content_end);
-              }
+              fss_extended_list_read_print_content_end(*data);
             }
             else if (include_empty) {
               fss_extended_list_read_print_set_end(*data);
@@ -803,7 +800,12 @@ extern "C" {
       fprintf(data.output.stream, "%c", fss_extended_list_read_pipe_content_start);
     }
     else {
-      fprintf(data.output.stream, "%c", f_fss_eol);
+      if (data.parameters[fss_extended_list_read_parameter_content].result == f_console_result_found) {
+        fprintf(data.output.stream, "%c%c", f_fss_extended_list_open, f_fss_extended_list_open_end);
+      }
+      else {
+        fprintf(data.output.stream, "%c", f_fss_eol);
+      }
     }
   }
 #endif // _di_fss_extended_list_read_print_object_end_
@@ -815,7 +817,12 @@ extern "C" {
       fprintf(data.output.stream, "%c", fss_extended_list_read_pipe_content_start);
     }
     else {
-      fprintf(data.output.stream, "%c", f_fss_eol);
+      if (data.parameters[fss_extended_list_read_parameter_object].result == f_console_result_found) {
+        fprintf(data.output.stream, "%c%c", f_fss_extended_list_close, f_fss_extended_list_close_end);
+      }
+      else {
+        fprintf(data.output.stream, "%c", f_fss_eol);
+      }
     }
   }
 #endif // _di_fss_extended_list_read_print_content_end_
@@ -836,7 +843,12 @@ extern "C" {
       fprintf(data.output.stream, "%c", fss_extended_list_read_pipe_content_end);
     }
     else {
-      fprintf(data.output.stream, "%c", f_fss_eol);
+      if (data.parameters[fss_extended_list_read_parameter_object].result == f_console_result_found) {
+        fprintf(data.output.stream, "%c%c", f_fss_extended_list_close, f_fss_extended_list_close_end);
+      }
+      else {
+        fprintf(data.output.stream, "%c", f_fss_eol);
+      }
     }
   }
 #endif // _di_fss_extended_list_read_print_set_end_