]> Kevux Git Server - fll/commitdiff
Feature: Add support for printing partial data with or without closing data in fss_write.
authorKevin Day <thekevinday@gmail.com>
Sun, 11 Dec 2022 03:58:49 +0000 (21:58 -0600)
committerKevin Day <thekevinday@gmail.com>
Sun, 11 Dec 2022 03:58:49 +0000 (21:58 -0600)
The "complete" "partial" FSS write enumaration settings still prints the end of Object or Content data.
This "partial" simply does not print the end of line characters.

Change the behavior to act like the newly added feature regarting "complete" "trim".
Provide parameters to toggle on printing of the closing data.

18 files changed:
level_3/fss_write/c/basic/fss_write.c
level_3/fss_write/c/basic/print.c
level_3/fss_write/c/basic_list/fss_write.c
level_3/fss_write/c/basic_list/print.c
level_3/fss_write/c/embedded_list/fss_write.c
level_3/fss_write/c/embedded_list/print.c
level_3/fss_write/c/extended/fss_write.c
level_3/fss_write/c/extended/print.c
level_3/fss_write/c/extended_list/fss_write.c
level_3/fss_write/c/extended_list/print.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/main/main-print.c
level_3/fss_write/c/main/print.c
level_3/fss_write/c/main/print.h
level_3/fss_write/c/payload/fss_write.c
level_3/fss_write/c/payload/print.c

index 992627992ca5245918131b5018e315a9d3b72185..12c89751a553a3b3046d13748a59325614f4649e 100644 (file)
@@ -10,30 +10,42 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_basic_content_write(
-      *setting->content,
-      (setting->flag & fss_write_flag_partial_e)
-        ? f_fss_complete_partial_e
-        : f_fss_complete_full_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->content) {
+      setting->status = fl_fss_basic_content_write(
+        *setting->content,
+        (setting->flag & fss_write_flag_partial_e)
+          ? f_fss_complete_partial_e
+          : f_fss_complete_full_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_content_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_content_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_object_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_content_end_e) {
+        setting->status = f_string_dynamic_append(f_fss_basic_close_s, &setting->buffer);
 
-      return;
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_basic_process_content_
@@ -50,35 +62,49 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_basic_object_write(
-      *setting->object,
-      setting->quote.used
-        ? setting->quote.string[0]
-        : f_fss_quote_double_s.string[0],
-      (setting->flag & fss_write_flag_partial_e)
-        ? (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_partial_trim_e
-          : f_fss_complete_partial_e
-        : (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_full_trim_e
-          : f_fss_complete_full_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->object) {
+      setting->status = fl_fss_basic_object_write(
+        *setting->object,
+        setting->quote.used
+          ? setting->quote.string[0]
+          : f_fss_quote_double_s.string[0],
+        (setting->flag & fss_write_flag_partial_e)
+          ? (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_trim_e
+            : f_fss_complete_none_e
+          : (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_full_trim_e
+            : f_fss_complete_full_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_object_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_object_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_content_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_object_open_e) {
+        setting->status = f_string_dynamic_append(f_fss_basic_open_s, &setting->buffer);
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_basic_process_object_
index 09d3e5583e2ae2776919d82c25426e9c5b078164..aea1076d2cbefa4518e70949ed11467fb3284682 100644 (file)
@@ -21,6 +21,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     fl_print_format("%r  The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%r%r%]'", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_prepend_s, print.set->notable);
     fl_print_format(" does nothing.%r%r", print.to, f_string_eol_s, f_string_eol_s);
 
index 544f55fb85fc8292d72b86df37b88d7c21747b4e..f80dac2d5b87b3ba327a25deca30b2bc3c45cca1 100644 (file)
@@ -10,33 +10,45 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_basic_list_content_write(
-      *setting->content,
-      (setting->flag & fss_write_flag_partial_e)
-        ? f_fss_complete_partial_e
-        : (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_full_trim_e
-          : f_fss_complete_full_e,
-      &setting->prepend,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->content) {
+      setting->status = fl_fss_basic_list_content_write(
+        *setting->content,
+        (setting->flag & fss_write_flag_partial_e)
+          ? f_fss_complete_partial_e
+          : (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_full_trim_e
+            : f_fss_complete_full_e,
+        &setting->prepend,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_list_content_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_list_content_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_object_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_content_end_e) {
+        setting->status = f_string_dynamic_append(f_fss_basic_list_close_s, &setting->buffer);
 
-      return;
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_basic_list_process_content_
@@ -53,32 +65,50 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_basic_list_object_write(
-      *setting->object,
-      (setting->flag & fss_write_flag_partial_e)
-        ? (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_partial_trim_e
-          : f_fss_complete_partial_e
-        : (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_full_trim_e
-          : f_fss_complete_full_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->object) {
+      setting->status = fl_fss_basic_list_object_write(
+        *setting->object,
+        (setting->flag & fss_write_flag_partial_e)
+          ? (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_trim_e
+            : f_fss_complete_none_e
+          : (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_full_trim_e
+            : f_fss_complete_full_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_list_object_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_list_object_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_content_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_object_open_e) {
+        setting->status = f_string_dynamic_append(f_fss_basic_list_open_s, &setting->buffer);
+
+        if (F_status_is_error_not(setting->status)) {
+          setting->status = f_string_dynamic_append(f_fss_basic_list_open_end_s, &setting->buffer);
+        }
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_basic_list_process_object_
index 00f0e3bbce3d1a67f41c5febee3662f47720b851..3baec35ac6c7cec818bc60020e46d4321479a560 100644 (file)
@@ -21,6 +21,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     fl_print_format("%r  The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_single_s, print.set->notable);
     fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s);
 
index 6d6ee7353789489010e0cb4d17ba967d97ce0b35..543661d1fbefa0a1a7b73c4887eb1c366593f838 100644 (file)
@@ -10,34 +10,50 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_embedded_list_content_write(
-      *setting->content,
-      (setting->flag & fss_write_flag_partial_e)
-        ? f_fss_complete_partial_e
-        : last
-          ? f_fss_complete_end_e
-          : f_fss_complete_next_e,
-      &setting->prepend,
-      setting->ignores,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->content) {
+      setting->status = fl_fss_embedded_list_content_write(
+        *setting->content,
+        (setting->flag & fss_write_flag_partial_e)
+          ? f_fss_complete_partial_e
+          : last
+            ? f_fss_complete_end_e
+            : f_fss_complete_next_e,
+        &setting->prepend,
+        setting->ignores,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_embedded_list_content_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_embedded_list_content_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_object_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_content_end_e) {
+        setting->status = f_string_dynamic_append(f_fss_embedded_list_close_s, &setting->buffer);
 
-      return;
+        if (F_status_is_error_not(setting->status)) {
+          setting->status = f_string_dynamic_append(f_fss_embedded_list_close_end_s, &setting->buffer);
+        }
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_embedded_list_process_content_
@@ -54,32 +70,50 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_embedded_list_object_write(
-      *setting->object,
-      (setting->flag & fss_write_flag_partial_e)
-        ? (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_partial_trim_e
-          : f_fss_complete_partial_e
-        : (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_full_trim_e
-          : f_fss_complete_full_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->object) {
+      setting->status = fl_fss_embedded_list_object_write(
+        *setting->object,
+        (setting->flag & fss_write_flag_partial_e)
+          ? (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_trim_e
+            : f_fss_complete_none_e
+          : (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_full_trim_e
+            : f_fss_complete_full_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_embedded_list_object_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_embedded_list_object_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_content_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_object_open_e) {
+        setting->status = f_string_dynamic_append(f_fss_embedded_list_open_s, &setting->buffer);
+
+        if (F_status_is_error_not(setting->status)) {
+          setting->status = f_string_dynamic_append(f_fss_embedded_list_open_end_s, &setting->buffer);
+        }
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_embedded_list_process_object_
index d76789966b872574d0a4a8cd18ff8d6b9a90beed..752add9218995f183abcf4b15b69bc6ed7faccca 100644 (file)
@@ -21,6 +21,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     fl_print_format("%r  The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_single_s, print.set->notable);
     fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s);
 
index 44e65083d8193d838b17ba57ad1cd9bdbff70b59..86ec2424989bf832068229c92fd035145da2fef9 100644 (file)
@@ -10,35 +10,54 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_extended_content_write(
-      *setting->content,
-      setting->quote.used
-        ? setting->quote.string[0]
-        : f_fss_quote_double_s.string[0],
-      (setting->flag & fss_write_flag_partial_e)
-        ? f_fss_complete_partial_e
-        : last
-          ? f_fss_complete_end_e
-          : f_fss_complete_next_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->content) {
+      setting->status = fl_fss_extended_content_write(
+        *setting->content,
+        setting->quote.used
+          ? setting->quote.string[0]
+          : f_fss_quote_double_s.string[0],
+        (setting->flag & fss_write_flag_partial_e)
+          ? f_fss_complete_partial_e
+          : last
+            ? f_fss_complete_end_e
+            : f_fss_complete_next_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_extended_content_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_extended_content_write));
-
-      return;
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_object_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_content_end_e) {
+        setting->status = f_string_dynamic_append(f_fss_extended_close_s, &setting->buffer);
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
+      else if (setting->flag & fss_write_flag_content_next_e) {
+        setting->status = f_string_dynamic_append(f_fss_extended_next_s, &setting->buffer);
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_extended_process_content_
@@ -55,35 +74,48 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_extended_object_write(
-      *setting->object,
-      setting->quote.used
-        ? setting->quote.string[0]
-        : f_fss_quote_double_s.string[0],
-      (setting->flag & fss_write_flag_partial_e)
-        ? (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_partial_trim_e
-          : f_fss_complete_partial_e
-        : (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_full_trim_e
-          : f_fss_complete_full_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->object) {
+      setting->status = fl_fss_extended_object_write(
+        *setting->object,
+        setting->quote.used
+          ? setting->quote.string[0]
+          : f_fss_quote_double_s.string[0],
+        (setting->flag & fss_write_flag_partial_e)
+          ? (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_trim_e
+            : f_fss_complete_none_e
+          : (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_full_trim_e
+            : f_fss_complete_full_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_extended_object_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_extended_object_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_content_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_object_open_e) {
+        setting->status = f_string_dynamic_append(f_fss_extended_open_s, &setting->buffer);
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_extended_process_object_
index 428370aabc7aa2af394b761393d01040d8665603..c202009812c1f7ff93672872e6ec95bc092ff9e1 100644 (file)
@@ -21,6 +21,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     fl_print_format("%r  The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%r%r%]'", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_prepend_s, print.set->notable);
     fl_print_format(" does nothing.%r%r", print.to, f_string_eol_s, f_string_eol_s);
 
index 33423f2347d103cec9ae2221edbd7e3dfd0ef5c7..1496c2fb27e944b64c98edc4247bddafc55a3bf4 100644 (file)
@@ -10,34 +10,50 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_extended_list_content_write(
-      *setting->content,
-      (setting->flag & fss_write_flag_partial_e)
-        ? last
-          ? f_fss_complete_none_e
-          : f_fss_complete_partial_e
-        : f_fss_complete_full_e,
-      &setting->prepend,
-      setting->ignores,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(setting->status) == F_none_eol) {
-      setting->status = F_status_set_error(F_support_not);
-
-      fss_write_print_line_first_locked(setting, main->error);
-      fss_write_print_error_unsupported_eol(setting, main->error);
-      fss_write_print_line_last_locked(setting, main->error);
-
-      return;
+    if (setting->content) {
+      setting->status = fl_fss_extended_list_content_write(
+        *setting->content,
+        (setting->flag & fss_write_flag_partial_e)
+          ? last
+            ? f_fss_complete_none_e
+            : f_fss_complete_partial_e
+          : f_fss_complete_full_e,
+        &setting->prepend,
+        setting->ignores,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(setting->status) == F_none_eol) {
+        setting->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(setting, main->error);
+        fss_write_print_error_unsupported_eol(setting, main->error);
+        fss_write_print_line_last_locked(setting, main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(setting->status)) {
+        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_extended_list_content_write));
+
+        return;
+      }
     }
 
-    if (F_status_is_error(setting->status)) {
-      fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_extended_list_content_write));
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_object_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_content_end_e) {
+        setting->status = f_string_dynamic_append(f_fss_extended_list_close_s, &setting->buffer);
 
-      return;
+        if (F_status_is_error_not(setting->status)) {
+          setting->status = f_string_dynamic_append(f_fss_extended_list_close_end_s, &setting->buffer);
+        }
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_extended_list_process_content_
@@ -54,32 +70,50 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    setting->status = fl_fss_extended_list_object_write(
-      *setting->object,
-      (setting->flag & fss_write_flag_partial_e)
-        ? (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_partial_trim_e
-          : f_fss_complete_partial_e
-        : (setting->flag & fss_write_flag_trim_e)
-          ? f_fss_complete_full_trim_e
-          : f_fss_complete_full_e,
-      setting->state,
-      &setting->range,
-      &setting->buffer
-    );
-
-    if (F_status_set_fine(macro_fss_write_setting(setting)->status) == F_none_eol) {
-      macro_fss_write_setting(setting)->status = F_status_set_error(F_support_not);
+    if (setting->object) {
+      setting->status = fl_fss_extended_list_object_write(
+        *setting->object,
+        (setting->flag & fss_write_flag_partial_e)
+          ? (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_trim_e
+            : f_fss_complete_none_e
+          : (setting->flag & fss_write_flag_trim_e)
+            ? f_fss_complete_full_trim_e
+            : f_fss_complete_full_e,
+        setting->state,
+        &setting->range,
+        &setting->buffer
+      );
+
+      if (F_status_set_fine(macro_fss_write_setting(setting)->status) == F_none_eol) {
+        macro_fss_write_setting(setting)->status = F_status_set_error(F_support_not);
+
+        fss_write_print_line_first_locked(macro_fss_write_setting(setting), main->error);
+        fss_write_print_error_unsupported_eol(macro_fss_write_setting(setting), main->error);
+        fss_write_print_line_last_locked(macro_fss_write_setting(setting), main->error);
+
+        return;
+      }
+
+      if (F_status_is_error(macro_fss_write_setting(setting)->status)) {
+        fss_write_print_error(macro_fss_write_setting(setting), main->error, macro_fss_write_f(fl_fss_extended_list_object_write));
+
+        return;
+      }
+    }
 
-      fss_write_print_line_first_locked(macro_fss_write_setting(setting), main->error);
-      fss_write_print_error_unsupported_eol(macro_fss_write_setting(setting), main->error);
-      fss_write_print_line_last_locked(macro_fss_write_setting(setting), main->error);
+    if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_content_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+      if (setting->flag & fss_write_flag_object_open_e) {
+        setting->status = f_string_dynamic_append(f_fss_extended_list_open_s, &setting->buffer);
 
-      return;
-    }
+        if (F_status_is_error_not(setting->status)) {
+          setting->status = f_string_dynamic_append(f_fss_extended_list_open_end_s, &setting->buffer);
+        }
 
-    if (F_status_is_error(macro_fss_write_setting(setting)->status)) {
-      fss_write_print_error(macro_fss_write_setting(setting), main->error, macro_fss_write_f(fl_fss_extended_list_object_write));
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+        }
+      }
     }
   }
 #endif // _di_fss_write_extended_list_process_object_
index f24c56b216e3c0db4e488369d6acbeaa24fb6495..3a6d26a942f7a3a173edf4f8f304cdfa8c616328 100644 (file)
@@ -21,6 +21,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     fl_print_format("%r  The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_single_s, print.set->notable);
     fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s);
 
index b7941fa16b875183991786830e264a48ec66dc99..48794386ded222aeeb7d1be747b439201c3b115e 100644 (file)
@@ -27,10 +27,13 @@ extern "C" {
   const f_string_static_t fss_write_short_as_s = macro_f_string_static_t_initialize(FSS_WRITE_short_as_s, 0, FSS_WRITE_short_as_s_length);
   const f_string_static_t fss_write_short_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_short_backtick_s, 0, FSS_WRITE_short_backtick_s_length);
   const f_string_static_t fss_write_short_content_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_s, 0, FSS_WRITE_short_content_s_length);
+  const f_string_static_t fss_write_short_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_end_s, 0, FSS_WRITE_short_content_end_s_length);
+  const f_string_static_t fss_write_short_content_next_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_next_s, 0, FSS_WRITE_short_content_next_s_length);
   const f_string_static_t fss_write_short_double_s = macro_f_string_static_t_initialize(FSS_WRITE_short_double_s, 0, FSS_WRITE_short_double_s_length);
   const f_string_static_t fss_write_short_file_s = macro_f_string_static_t_initialize(FSS_WRITE_short_file_s, 0, FSS_WRITE_short_file_s_length);
   const f_string_static_t fss_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_short_ignore_s, 0, FSS_WRITE_short_ignore_s_length);
   const f_string_static_t fss_write_short_object_s = macro_f_string_static_t_initialize(FSS_WRITE_short_object_s, 0, FSS_WRITE_short_object_s_length);
+  const f_string_static_t fss_write_short_object_open_s = macro_f_string_static_t_initialize(FSS_WRITE_short_object_open_s, 0, FSS_WRITE_short_object_open_s_length);
   const f_string_static_t fss_write_short_partial_s = macro_f_string_static_t_initialize(FSS_WRITE_short_partial_s, 0, FSS_WRITE_short_partial_s_length);
   const f_string_static_t fss_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_WRITE_short_prepend_s, 0, FSS_WRITE_short_prepend_s_length);
   const f_string_static_t fss_write_short_single_s = macro_f_string_static_t_initialize(FSS_WRITE_short_single_s, 0, FSS_WRITE_short_single_s_length);
@@ -39,10 +42,13 @@ extern "C" {
   const f_string_static_t fss_write_long_as_s = macro_f_string_static_t_initialize(FSS_WRITE_long_as_s, 0, FSS_WRITE_long_as_s_length);
   const f_string_static_t fss_write_long_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_long_backtick_s, 0, FSS_WRITE_long_backtick_s_length);
   const f_string_static_t fss_write_long_content_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_s, 0, FSS_WRITE_long_content_s_length);
+  const f_string_static_t fss_write_long_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_end_s, 0, FSS_WRITE_long_content_end_s_length);
+  const f_string_static_t fss_write_long_content_next_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_next_s, 0, FSS_WRITE_long_content_next_s_length);
   const f_string_static_t fss_write_long_double_s = macro_f_string_static_t_initialize(FSS_WRITE_long_double_s, 0, FSS_WRITE_long_double_s_length);
   const f_string_static_t fss_write_long_file_s = macro_f_string_static_t_initialize(FSS_WRITE_long_file_s, 0, FSS_WRITE_long_file_s_length);
   const f_string_static_t fss_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_long_ignore_s, 0, FSS_WRITE_long_ignore_s_length);
   const f_string_static_t fss_write_long_object_s = macro_f_string_static_t_initialize(FSS_WRITE_long_object_s, 0, FSS_WRITE_long_object_s_length);
+  const f_string_static_t fss_write_long_object_open_s = macro_f_string_static_t_initialize(FSS_WRITE_long_object_open_s, 0, FSS_WRITE_long_object_open_s_length);
   const f_string_static_t fss_write_long_partial_s = macro_f_string_static_t_initialize(FSS_WRITE_long_partial_s, 0, FSS_WRITE_long_partial_s_length);
   const f_string_static_t fss_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_WRITE_long_prepend_s, 0, FSS_WRITE_long_prepend_s_length);
   const f_string_static_t fss_write_long_single_s = macro_f_string_static_t_initialize(FSS_WRITE_long_single_s, 0, FSS_WRITE_long_single_s_length);
@@ -556,6 +562,89 @@ extern "C" {
       setting->flag |= fss_write_flag_partial_e;
     }
 
+    {
+      const uint32_t has[] = {
+        fss_write_parameter_content_end_e,
+        fss_write_parameter_content_next_e,
+        fss_write_parameter_object_open_e,
+      };
+
+      const uint16_t has_flag[] = {
+        fss_write_flag_content_end_e,
+        fss_write_flag_content_next_e,
+        fss_write_flag_object_open_e,
+      };
+
+      const f_string_static_t has_string[] = {
+        fss_write_long_content_end_s,
+        fss_write_long_content_next_s,
+        fss_write_long_object_open_s,
+      };
+
+      const uint16_t has_cannots[][2] = {
+        { fss_write_parameter_content_next_e, fss_write_parameter_object_open_e },
+        { fss_write_parameter_content_end_e, fss_write_parameter_object_open_e },
+        { fss_write_parameter_content_end_e, fss_write_parameter_content_next_e },
+      };
+
+      const f_string_static_t has_cannots_string[][2] = {
+        { fss_write_long_content_next_s, fss_write_long_object_open_s },
+        { fss_write_long_content_end_s, fss_write_long_object_open_s },
+        { fss_write_long_content_end_s, fss_write_long_content_next_s },
+      };
+
+      for (uint8_t i = 0; i < 3; ++i) {
+
+        if (main->parameters.array[has[i]].result & f_console_result_found_e) {
+          if (setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e)) {
+            if (!(setting->flag & fss_write_flag_partial_e)) {
+              setting->status = F_status_set_error(F_parameter);
+
+              fss_write_print_line_first_locked(setting, main->error);
+
+              fll_program_print_error_parameter_cannot_use_with_without(
+                main->error,
+                f_console_symbol_long_normal_s,
+                f_console_symbol_long_normal_s,
+                f_console_symbol_long_normal_s,
+                has_string[i],
+                (setting->flag & fss_write_flag_object_e)
+                  ? fss_write_long_object_s
+                  : fss_write_long_content_s,
+                fss_write_long_partial_s
+              );
+
+              fss_write_print_line_last_locked(setting, main->error);
+
+              return;
+            }
+          }
+
+          if (main->parameters.array[has_cannots[i][0]].result & f_console_result_found_e) {
+            setting->status = F_status_set_error(F_parameter);
+
+            fss_write_print_line_first_locked(setting, main->error);
+            fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]);
+            fss_write_print_line_last_locked(setting, main->error);
+
+            return;
+          }
+
+          if (main->parameters.array[has_cannots[i][1]].result & f_console_result_found_e) {
+            setting->status = F_status_set_error(F_parameter);
+
+            fss_write_print_line_first_locked(setting, main->error);
+            fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]);
+            fss_write_print_line_last_locked(setting, main->error);
+
+            return;
+          }
+
+          setting->flag |= has_flag[i];
+        }
+      } // for
+    }
+
     if (setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e)) {
       if (setting->flag & fss_write_flag_object_e) {
         if (main->parameters.array[fss_write_parameter_object_e].locations.used != main->parameters.array[fss_write_parameter_object_e].values.used) {
index fcccbed9b5854f801dc080a5339bcc1cb1d27d25..05b585c6301b0b06c98748208fd103dd7ea85b13 100644 (file)
@@ -129,61 +129,76 @@ extern "C" {
  * The main program parameters.
  */
 #ifndef _di_fss_write_parameter_d_
-  #define FSS_WRITE_short_as_s       "a"
-  #define FSS_WRITE_short_backtick_s "b"
-  #define FSS_WRITE_short_content_s  "c"
-  #define FSS_WRITE_short_double_s   "d"
-  #define FSS_WRITE_short_file_s     "f"
-  #define FSS_WRITE_short_ignore_s   "I"
-  #define FSS_WRITE_short_object_s   "o"
-  #define FSS_WRITE_short_partial_s  "p"
-  #define FSS_WRITE_short_prepend_s  "P"
-  #define FSS_WRITE_short_single_s   "s"
-  #define FSS_WRITE_short_trim_s     "T"
-
-  #define FSS_WRITE_long_as_s       "as"
-  #define FSS_WRITE_long_backtick_s "backtick"
-  #define FSS_WRITE_long_content_s  "content"
-  #define FSS_WRITE_long_double_s   "double"
-  #define FSS_WRITE_long_file_s     "file"
-  #define FSS_WRITE_long_ignore_s   "ignore"
-  #define FSS_WRITE_long_object_s   "object"
-  #define FSS_WRITE_long_partial_s  "partial"
-  #define FSS_WRITE_long_prepend_s  "prepend"
-  #define FSS_WRITE_long_single_s   "single"
-  #define FSS_WRITE_long_trim_s     "trim"
-
-  #define FSS_WRITE_short_as_s_length       1
-  #define FSS_WRITE_short_backtick_s_length 1
-  #define FSS_WRITE_short_content_s_length  1
-  #define FSS_WRITE_short_double_s_length   1
-  #define FSS_WRITE_short_file_s_length     1
-  #define FSS_WRITE_short_ignore_s_length   1
-  #define FSS_WRITE_short_object_s_length   1
-  #define FSS_WRITE_short_partial_s_length  1
-  #define FSS_WRITE_short_prepend_s_length  1
-  #define FSS_WRITE_short_single_s_length   1
-  #define FSS_WRITE_short_trim_s_length     1
-
-  #define FSS_WRITE_long_as_s_length       2
-  #define FSS_WRITE_long_backtick_s_length 8
-  #define FSS_WRITE_long_content_s_length  7
-  #define FSS_WRITE_long_double_s_length   6
-  #define FSS_WRITE_long_file_s_length     4
-  #define FSS_WRITE_long_ignore_s_length   6
-  #define FSS_WRITE_long_object_s_length   6
-  #define FSS_WRITE_long_partial_s_length  7
-  #define FSS_WRITE_long_prepend_s_length  7
-  #define FSS_WRITE_long_single_s_length   6
-  #define FSS_WRITE_long_trim_s_length     4
+  #define FSS_WRITE_short_as_s           "a"
+  #define FSS_WRITE_short_backtick_s     "b"
+  #define FSS_WRITE_short_content_s      "c"
+  #define FSS_WRITE_short_content_end_s  "E"
+  #define FSS_WRITE_short_content_next_s "N"
+  #define FSS_WRITE_short_double_s       "d"
+  #define FSS_WRITE_short_file_s         "f"
+  #define FSS_WRITE_short_ignore_s       "I"
+  #define FSS_WRITE_short_object_s       "o"
+  #define FSS_WRITE_short_object_open_s  "O"
+  #define FSS_WRITE_short_partial_s      "p"
+  #define FSS_WRITE_short_prepend_s      "P"
+  #define FSS_WRITE_short_single_s       "s"
+  #define FSS_WRITE_short_trim_s         "T"
+
+  #define FSS_WRITE_long_as_s           "as"
+  #define FSS_WRITE_long_backtick_s     "backtick"
+  #define FSS_WRITE_long_content_s      "content"
+  #define FSS_WRITE_long_content_end_s  "content_end"
+  #define FSS_WRITE_long_content_next_s "content_next"
+  #define FSS_WRITE_long_double_s       "double"
+  #define FSS_WRITE_long_file_s         "file"
+  #define FSS_WRITE_long_ignore_s       "ignore"
+  #define FSS_WRITE_long_object_s       "object"
+  #define FSS_WRITE_long_object_open_s  "object_open"
+  #define FSS_WRITE_long_partial_s      "partial"
+  #define FSS_WRITE_long_prepend_s      "prepend"
+  #define FSS_WRITE_long_single_s       "single"
+  #define FSS_WRITE_long_trim_s         "trim"
+
+  #define FSS_WRITE_short_as_s_length           1
+  #define FSS_WRITE_short_backtick_s_length     1
+  #define FSS_WRITE_short_content_s_length      1
+  #define FSS_WRITE_short_content_end_s_length  1
+  #define FSS_WRITE_short_content_next_s_length 1
+  #define FSS_WRITE_short_double_s_length       1
+  #define FSS_WRITE_short_file_s_length         1
+  #define FSS_WRITE_short_ignore_s_length       1
+  #define FSS_WRITE_short_object_s_length       1
+  #define FSS_WRITE_short_object_open_s_length  1
+  #define FSS_WRITE_short_partial_s_length      1
+  #define FSS_WRITE_short_prepend_s_length      1
+  #define FSS_WRITE_short_single_s_length       1
+  #define FSS_WRITE_short_trim_s_length         1
+
+  #define FSS_WRITE_long_as_s_length           2
+  #define FSS_WRITE_long_backtick_s_length     8
+  #define FSS_WRITE_long_content_s_length      7
+  #define FSS_WRITE_long_content_end_s_length  11
+  #define FSS_WRITE_long_content_next_s_length 12
+  #define FSS_WRITE_long_double_s_length       6
+  #define FSS_WRITE_long_file_s_length         4
+  #define FSS_WRITE_long_ignore_s_length       6
+  #define FSS_WRITE_long_object_s_length       6
+  #define FSS_WRITE_long_object_open_s_length  11
+  #define FSS_WRITE_long_partial_s_length      7
+  #define FSS_WRITE_long_prepend_s_length      7
+  #define FSS_WRITE_long_single_s_length       6
+  #define FSS_WRITE_long_trim_s_length         4
 
   extern const f_string_static_t fss_write_short_as_s;
   extern const f_string_static_t fss_write_short_backtick_s;
   extern const f_string_static_t fss_write_short_content_s;
+  extern const f_string_static_t fss_write_short_content_end_s;
+  extern const f_string_static_t fss_write_short_content_next_s;
   extern const f_string_static_t fss_write_short_double_s;
   extern const f_string_static_t fss_write_short_file_s;
   extern const f_string_static_t fss_write_short_ignore_s;
   extern const f_string_static_t fss_write_short_object_s;
+  extern const f_string_static_t fss_write_short_object_open_s;
   extern const f_string_static_t fss_write_short_partial_s;
   extern const f_string_static_t fss_write_short_prepend_s;
   extern const f_string_static_t fss_write_short_single_s;
@@ -192,10 +207,13 @@ extern "C" {
   extern const f_string_static_t fss_write_long_as_s;
   extern const f_string_static_t fss_write_long_backtick_s;
   extern const f_string_static_t fss_write_long_content_s;
+  extern const f_string_static_t fss_write_long_content_end_s;
+  extern const f_string_static_t fss_write_long_content_next_s;
   extern const f_string_static_t fss_write_long_double_s;
   extern const f_string_static_t fss_write_long_file_s;
   extern const f_string_static_t fss_write_long_ignore_s;
   extern const f_string_static_t fss_write_long_object_s;
+  extern const f_string_static_t fss_write_long_object_open_s;
   extern const f_string_static_t fss_write_long_partial_s;
   extern const f_string_static_t fss_write_long_prepend_s;
   extern const f_string_static_t fss_write_long_single_s;
@@ -218,10 +236,13 @@ extern "C" {
     fss_write_parameter_as_e,
     fss_write_parameter_backtick_e,
     fss_write_parameter_content_e,
+    fss_write_parameter_content_end_e,
+    fss_write_parameter_content_next_e,
     fss_write_parameter_double_e,
     fss_write_parameter_file_e,
     fss_write_parameter_ignore_e,
     fss_write_parameter_object_e,
+    fss_write_parameter_object_open_e,
     fss_write_parameter_partial_e,
     fss_write_parameter_prepend_e,
     fss_write_parameter_single_e,
@@ -246,17 +267,20 @@ extern "C" {
       macro_f_console_parameter_t_initialize2(fss_write_short_as_s.string, fss_write_long_as_s.string, 0, 1, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_backtick_s.string, fss_write_long_backtick_s.string, 0, 0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_content_s.string, fss_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize2(fss_write_short_content_end_s.string, fss_write_long_content_end_s.string, 0, 0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize2(fss_write_short_content_next_s.string, fss_write_long_content_next_s.string, 0, 0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_double_s.string, fss_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_file_s.string, fss_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_ignore_s.string, fss_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_object_s.string, fss_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize2(fss_write_short_object_open_s.string, fss_write_long_object_open_s.string, 0, 0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_partial_s.string, fss_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_prepend_s.string, fss_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_single_s.string, fss_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize2(fss_write_short_trim_s.string, fss_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_write_total_parameters_d 23
+  #define fss_write_total_parameters_d 26
 #endif // _di_fss_write_parameter_d_
 
 /**
@@ -265,11 +289,14 @@ extern "C" {
  * fss_write_flag_*_e:
  *   - none:             No modes in use.
  *   - content:          The Content being written is specified.
+ *   - content_end:      The Content end characters are to be printed.
  *   - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
+ *   - content_next:     The Content next characters are to be printed.
  *   - file_to:          Using a specified destination file.
  *   - help:             Print help.
  *   - ignore:           Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
  *   - object:           The Object being written is specified.
+ *   - object_open:      The Object open characters are to be printed.
  *   - partial:          Do not write end of Object/Content character.
  *   - prepend:          Prepend the given white space characters to the start of each multi-line Content.
  *   - trim:             Trim Object names.
@@ -279,15 +306,18 @@ extern "C" {
   enum {
     fss_write_flag_none_e             = 0x0,
     fss_write_flag_content_e          = 0x1,
-    fss_write_flag_content_multiple_e = 0x2,
-    fss_write_flag_file_to_e          = 0x4,
-    fss_write_flag_help_e             = 0x8,
-    fss_write_flag_ignore_e           = 0x10,
-    fss_write_flag_object_e           = 0x20,
-    fss_write_flag_partial_e          = 0x40,
-    fss_write_flag_prepend_e          = 0x80,
-    fss_write_flag_trim_e             = 0x100,
-    fss_write_flag_version_e          = 0x200,
+    fss_write_flag_content_end_e      = 0x2,
+    fss_write_flag_content_multiple_e = 0x4,
+    fss_write_flag_content_next_e     = 0x8,
+    fss_write_flag_file_to_e          = 0x10,
+    fss_write_flag_help_e             = 0x20,
+    fss_write_flag_ignore_e           = 0x40,
+    fss_write_flag_object_e           = 0x80,
+    fss_write_flag_object_open_e      = 0x100,
+    fss_write_flag_partial_e          = 0x200,
+    fss_write_flag_prepend_e          = 0x400,
+    fss_write_flag_trim_e             = 0x800,
+    fss_write_flag_version_e          = 0x1000,
   }; // enum
 #endif // _di_fss_write_flag_e_
 
index 89a82c2473ed0f862fa5454cc8bda1701b2a317e..ddefbe8e2af7739be195f950d81ff55f88f885e3 100644 (file)
@@ -30,7 +30,7 @@ extern "C" {
       if (F_status_is_error(setting->status)) return;
     }
 
-    if (setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e)) {
+    if (setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e | fss_write_flag_object_open_e | fss_write_flag_content_next_e | fss_write_flag_content_end_e)) {
       setting->process_normal(main, setting);
       if (F_status_is_error(setting->status)) return;
     }
@@ -61,34 +61,45 @@ extern "C" {
     setting->content = 0;
     setting->contents = 0;
 
-    for (f_array_length_t i = 0; i < length; ++i) {
+    if (length) {
+      for (f_array_length_t i = 0; i < length; ++i) {
 
-      // @todo replace all signal checks with forked main process that independently checks and assigns main->signal_received.
-      if (!((++main->signal_check) % fss_write_signal_check_d)) {
-        if (fll_program_standard_signal_received(main)) {
-          setting->status = F_status_set_error(F_interrupt);
+        // @todo replace all signal checks with forked main process that independently checks and assigns main->signal_received.
+        if (!((++main->signal_check) % fss_write_signal_check_d)) {
+          if (fll_program_standard_signal_received(main)) {
+            setting->status = F_status_set_error(F_interrupt);
 
-          return;
+            return;
+          }
+
+          main->signal_check = 0;
         }
 
-        main->signal_check = 0;
-      }
+        if (setting->objects.used) {
+          setting->object = &setting->objects.array[i];
+        }
 
-      if (setting->objects.used) {
-        setting->object = &setting->objects.array[i];
-      }
+        if (setting->contentss.used) {
+          setting->contents = &setting->contentss.array[i];
+        }
 
-      if (setting->contentss.used) {
-        setting->contents = &setting->contentss.array[i];
-      }
+        if (setting->ignoress.used) {
+          setting->ignores = &setting->ignoress.array[i];
+        }
 
-      if (setting->ignoress.used) {
-        setting->ignores = &setting->ignoress.array[i];
-      }
+        setting->process_set(main, setting);
+        if (F_status_is_error(setting->status)) break;
+      } // for
+    }
+    else {
+      if (setting->flag & (fss_write_flag_object_open_e | fss_write_flag_content_next_e | fss_write_flag_content_end_e)) {
+        setting->object = 0;
+        setting->contents = 0;
+        setting->ignores = 0;
 
-      setting->process_set(main, setting);
-      if (F_status_is_error(setting->status)) break;
-    } // for
+        setting->process_set(main, setting);
+      }
+    }
   }
 #endif // _di_fss_write_process_normal_data_
 
@@ -406,37 +417,49 @@ extern "C" {
 
     setting->buffer.used = 0;
 
-    if ((!(setting->flag & fss_write_flag_partial_e) || (setting->flag & fss_write_flag_partial_e) && (setting->flag & fss_write_flag_object_e)) && setting->object) {
-      if (setting->object->used) {
-        setting->range.start = 0;
-        setting->range.stop = setting->object->used - 1;
-      }
-      else {
-        setting->range.start = 1;
-        setting->range.stop = 0;
-      }
+    if ((!(setting->flag & fss_write_flag_partial_e) || (setting->flag & fss_write_flag_partial_e) && (setting->flag & fss_write_flag_object_e)) && setting->object || (setting->flag & fss_write_flag_object_open_e)) {
 
-      setting->process_object(main, void_setting);
-      if (F_status_is_error(setting->status)) return;
-    }
-
-    if ((!(setting->flag & fss_write_flag_partial_e) || (setting->flag & fss_write_flag_partial_e) && (setting->flag & fss_write_flag_content_e)) && setting->contents) {
-      for (f_array_length_t i = 0; i < setting->contents->used; ++i) {
-
-        if (setting->contents->array[i].used) {
+      if (setting->object) {
+        if (setting->object->used) {
           setting->range.start = 0;
-          setting->range.stop = setting->contents->array[i].used - 1;
+          setting->range.stop = setting->object->used - 1;
         }
         else {
           setting->range.start = 1;
           setting->range.stop = 0;
         }
+      }
+
+      setting->process_object(main, void_setting);
+      if (F_status_is_error(setting->status)) return;
+    }
+
+    if ((!(setting->flag & fss_write_flag_partial_e) || (setting->flag & fss_write_flag_partial_e) && (setting->flag & fss_write_flag_content_e)) && setting->contents || (setting->flag & (fss_write_flag_content_next_e | fss_write_flag_content_end_e))) {
 
-        setting->content = &setting->contents->array[i];
+      if (setting->contents && setting->contents->used) {
+        for (f_array_length_t i = 0; i < setting->contents->used; ++i) {
 
-        setting->process_content(main, void_setting, i + 1 == setting->contents->used);
+          if (setting->contents->array[i].used) {
+            setting->range.start = 0;
+            setting->range.stop = setting->contents->array[i].used - 1;
+          }
+          else {
+            setting->range.start = 1;
+            setting->range.stop = 0;
+          }
+
+          setting->content = &setting->contents->array[i];
+
+          setting->process_content(main, void_setting, i + 1 == setting->contents->used);
+          if (F_status_is_error(setting->status)) return;
+        } // for
+      }
+      else {
+        setting->content = 0;
+
+        setting->process_content(main, void_setting, F_true);
         if (F_status_is_error(setting->status)) return;
-      } // for
+      }
     }
 
     if (setting->buffer.used) {
index 5150f8db7217b02c16d3c791290eb4518bdadd24..29e94d7309026adb746a1de7937ef5c1c3d4de93 100644 (file)
@@ -50,6 +50,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
     fl_print_format("  The '%[%r%r%]' parameter supports the following standards with the specified possible case-sensitive values:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_as_s, print.set->notable, f_string_eol_s);
index f45278f4e2fb3eab74f33303dce11a058f07e0ed..aa5f977076fe7f2803dbf555e72274ec709529b7 100644 (file)
@@ -120,20 +120,36 @@ extern "C" {
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_option(print, fss_write_short_file_s, fss_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   Specify a file to send data to.");
-    fll_program_print_help_option(print, fss_write_short_content_s, fss_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write.");
-    fll_program_print_help_option(print, fss_write_short_double_s, fss_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default).");
-    fll_program_print_help_option(print, fss_write_short_ignore_s, fss_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content.");
-    fll_program_print_help_option(print, fss_write_short_object_s, fss_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write.");
-    fll_program_print_help_option(print, fss_write_short_partial_s, fss_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character.");
-    fll_program_print_help_option(print, fss_write_short_prepend_s, fss_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content.");
-    fll_program_print_help_option(print, fss_write_short_single_s, fss_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes.");
-    fll_program_print_help_option(print, fss_write_short_trim_s, fss_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "   Trim Object names.");
+    fll_program_print_help_option(print, fss_write_short_file_s, fss_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Specify a file to send data to.");
+    fll_program_print_help_option(print, fss_write_short_content_s, fss_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     The Content to write.");
+    fll_program_print_help_option(print, fss_write_short_content_end_s, fss_write_long_content_end_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Write the end of Content characters.");
+    fll_program_print_help_option(print, fss_write_short_content_next_s, fss_write_long_content_next_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Write the next Content characters (separates multi-Content apart).");
+    fll_program_print_help_option(print, fss_write_short_double_s, fss_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      Use double quotes (default).");
+    fll_program_print_help_option(print, fss_write_short_ignore_s, fss_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      Ignore a given range within a Content.");
+    fll_program_print_help_option(print, fss_write_short_object_s, fss_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      The Object to write.");
+    fll_program_print_help_option(print, fss_write_short_object_open_s, fss_write_long_object_open_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Write the open Object characters.");
+    fll_program_print_help_option(print, fss_write_short_partial_s, fss_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Do not write a complete Object and Content set.");
+    fll_program_print_help_option(print, fss_write_short_prepend_s, fss_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "     Prepend the given white space characters to the start of each multi-line Content.");
+    fll_program_print_help_option(print, fss_write_short_single_s, fss_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "      Use single quotes.");
+    fll_program_print_help_option(print, fss_write_short_trim_s, fss_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Trim Object names.");
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
   }
 #endif // _di_fss_write_print_help_
 
+#ifndef _di_fss_write_print_help_end_next_
+  void fss_write_print_help_end_next(fss_write_setting_t * const setting, const fl_print_t print) {
+
+    fl_print_format("%r  The '%[%r%r%]',", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_object_open_s, print.set->notable);
+    fl_print_format(" '%[%r%r%]', and", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_content_next_s, print.set->notable);
+    fl_print_format(" '%[%r%r%]' help facilitate writing the designated data for when using", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_content_end_s, print.set->notable);
+    fl_print_format(" '%[%r%r%]'.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_partial_s, print.set->notable, f_string_eol_s);
+
+    fl_print_format("  These may also be used when there is no '%[%r%r%]' or", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_object_s, print.set->notable);
+    fl_print_format(" '%[%r%r%]' specified to only print the designated data.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_content_s, print.set->notable, f_string_eol_s);
+  }
+#endif // _di_fss_write_print_help_end_next_
+
 #ifndef _di_fss_write_print_help_pipe_
   void fss_write_print_help_pipe(fss_write_setting_t * const setting, const fl_print_t print) {
 
index 6ac12f829dc670a3a36902356e5312738ea3e9a7..e8f67c4e57fb5629ecb2870136ecc18c594d586e 100644 (file)
@@ -152,6 +152,22 @@ extern "C" {
 #endif // _di_fss_write_print_help_
 
 /**
+ * Print standard parts of the help regarding Object End, Content Next, and Content End usage.
+ *
+ * This is expected to be called as part of the help printing and does not perform any locking.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   The output structure to print to.
+ */
+#ifndef _di_fss_write_print_help_end_next_
+  extern void fss_write_print_help_end_next(fss_write_setting_t * const setting, const fl_print_t print);
+#endif // _di_fss_write_print_help_end_next_
+
+/**
  * Print standard parts of the help regarding pipe usage.
  *
  * This is expected to be called as part of the help printing and does not perform any locking.
index ad4a2e184781afc9b61af29d996964ff855a4d9a..024b3f66ea977542ef9437c1e4e333303fdb6c19 100644 (file)
@@ -378,8 +378,8 @@ extern "C" {
 
     fss_write_setting_t * const setting = macro_fss_write_setting(void_setting);
 
-    if ((!(setting->flag & fss_write_flag_partial_e) || (setting->flag & fss_write_flag_partial_e) && (setting->flag & fss_write_flag_object_e)) && setting->object) {
-      if (!(setting->flag & fss_write_flag_partial_e) && setting->contents && setting->contents->used) {
+    if ((!(setting->flag & fss_write_flag_partial_e) || (setting->flag & fss_write_flag_partial_e) && (setting->flag & fss_write_flag_object_e))) {
+      if (setting->object && !(setting->flag & fss_write_flag_partial_e) && setting->contents && setting->contents->used) {
         if (setting->object->used) {
           setting->range.start = 0;
           setting->range.stop = setting->object->used - 1;
@@ -417,73 +417,105 @@ extern "C" {
         }
       }
       else {
-        if (setting->object->used) {
-          setting->range.start = 0;
-          setting->range.stop = setting->object->used - 1;
-        }
-        else {
-          setting->range.start = 1;
-          setting->range.stop = 0;
-        }
+        if (setting->object) {
+          if (setting->object->used) {
+            setting->range.start = 0;
+            setting->range.stop = setting->object->used - 1;
+          }
+          else {
+            setting->range.start = 1;
+            setting->range.stop = 0;
+          }
 
-        setting->status = fl_fss_basic_list_object_write(
-          *setting->object,
-          (setting->flag & fss_write_flag_partial_e)
-            ? (setting->flag & fss_write_flag_trim_e)
-              ? f_fss_complete_partial_trim_e
-              : f_fss_complete_partial_e
-            : (setting->flag & fss_write_flag_trim_e)
-              ? f_fss_complete_full_trim_e
-              : f_fss_complete_full_e,
-          setting->state,
-          &setting->range,
-          &setting->buffer
-        );
+          setting->status = fl_fss_basic_list_object_write(
+            *setting->object,
+            (setting->flag & fss_write_flag_partial_e)
+              ? (setting->flag & fss_write_flag_trim_e)
+                ? f_fss_complete_trim_e
+                : f_fss_complete_none_e
+              : (setting->flag & fss_write_flag_trim_e)
+                ? f_fss_complete_full_trim_e
+                : f_fss_complete_full_e,
+            setting->state,
+            &setting->range,
+            &setting->buffer
+          );
+
+          if (F_status_set_fine(setting->status) == F_none_eol) {
+            setting->status = F_status_set_error(F_support_not);
 
-        if (F_status_set_fine(setting->status) == F_none_eol) {
-          setting->status = F_status_set_error(F_support_not);
+            fss_write_print_line_first_locked(setting, main->error);
+            fss_write_print_error_unsupported_eol(setting, main->error);
+            fss_write_print_line_last_locked(setting, main->error);
 
-          fss_write_print_line_first_locked(setting, main->error);
-          fss_write_print_error_unsupported_eol(setting, main->error);
-          fss_write_print_line_last_locked(setting, main->error);
+            return;
+          }
 
-          return;
+          if (F_status_is_error(setting->status)) {
+            fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_list_object_write));
+
+            return;
+          }
         }
 
-        if (F_status_is_error(setting->status)) {
-          fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_basic_list_object_write));
+        if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_content_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+          if (setting->flag & fss_write_flag_object_open_e) {
+            setting->status = f_string_dynamic_append(f_fss_basic_list_open_s, &setting->buffer);
 
-          return;
+            if (F_status_is_error_not(setting->status)) {
+              setting->status = f_string_dynamic_append(f_fss_basic_list_open_end_s, &setting->buffer);
+            }
+
+            if (F_status_is_error(setting->status)) {
+              fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
+
+              return;
+            }
+          }
         }
       }
     }
-    else if (setting->contents && setting->contents->used && setting->contents->array[0].used) {
-      setting->range.start = 0;
-      setting->range.stop = setting->contents->array[0].used - 1;
+    else {
+      if (setting->contents && setting->contents->used && setting->contents->array[0].used) {
+        setting->range.start = 0;
+        setting->range.stop = setting->contents->array[0].used - 1;
+
+        const f_string_static_t *prepend = 0;
 
-      const f_string_static_t *prepend = 0;
+        if (setting->flag & fss_write_flag_prepend_e) {
+          const f_array_length_t index = main->parameters.array[fss_write_parameter_prepend_e].values.array[main->parameters.array[fss_write_parameter_prepend_e].values.used - 1];
 
-      if (setting->flag & fss_write_flag_prepend_e) {
-        const f_array_length_t index = main->parameters.array[fss_write_parameter_prepend_e].values.array[main->parameters.array[fss_write_parameter_prepend_e].values.used - 1];
+          prepend = &main->parameters.arguments.array[index];
+        }
 
-        prepend = &main->parameters.arguments.array[index];
+        setting->status = fl_fss_basic_list_content_write(
+          setting->contents->array[0],
+          setting->object
+            ? f_fss_complete_full_e
+            : f_fss_complete_none_e,
+          prepend,
+          setting->state,
+          &setting->range,
+          &setting->buffer
+        );
+
+        if (F_status_is_error(setting->status)) {
+          fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_payload_content_write));
+
+          return;
+        }
       }
 
-      setting->status = fl_fss_basic_list_content_write(
-        setting->contents->array[0],
-        setting->object
-          ? f_fss_complete_full_e
-          : f_fss_complete_none_e,
-        prepend,
-        setting->state,
-        &setting->range,
-        &setting->buffer
-      );
+      if ((setting->flag & fss_write_flag_partial_e) && !(setting->flag & fss_write_flag_object_e) || !(setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e))) {
+        if (setting->flag & fss_write_flag_content_end_e) {
+          setting->status = f_string_dynamic_append(f_fss_basic_list_close_s, &setting->buffer);
 
-      if (F_status_is_error(setting->status)) {
-        fss_write_print_error(setting, main->error, macro_fss_write_f(fl_fss_payload_content_write));
+          if (F_status_is_error(setting->status)) {
+            fss_write_print_error(setting, main->error, macro_fss_write_f(f_string_dynamic_append));
 
-        return;
+            return;
+          }
+        }
       }
     }
 
index 925bd0581ee3b9a5943e77a40007b8719c4fad0a..b091049d84490f5a6095ec0e457daf20187f517e 100644 (file)
@@ -38,6 +38,8 @@ extern "C" {
 
     fss_write_print_help_pipe(setting, print);
 
+    fss_write_print_help_end_next(setting, print);
+
     fl_print_format("%r  The FSS-000E (Payload) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_single_s, print.set->notable);
     fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s);