]> Kevux Git Server - fll/commitdiff
Progress: Continue program related work, updating fss_write.
authorKevin Day <thekevinday@gmail.com>
Tue, 29 Nov 2022 03:38:03 +0000 (21:38 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 29 Nov 2022 03:38:03 +0000 (21:38 -0600)
The work continues, focusing on preparing fss_write for handling all currently written fss_*_write programs.
This should also pave the way for supporting other fss-???? standards than are currently directly represented.

The individual write programs will be linked to the same library fss_write is.
These individual write programs will act as if they were passed the "--as XXXX".
For example, fss_basic_list would operate the same as "fss_write -a fss-0002".

Some of the programs may have vastly different functionality than others.
In any case that code can be shared that code will be shared.

66 files changed:
level_3/fss_write/c/basic/basic.c [deleted file]
level_3/fss_write/c/basic/common.c
level_3/fss_write/c/basic/common.h
level_3/fss_write/c/basic/fss_write.c [new file with mode: 0644]
level_3/fss_write/c/basic/fss_write.h [moved from level_3/fss_write/c/basic/basic.h with 58% similarity]
level_3/fss_write/c/basic/main.c
level_3/fss_write/c/basic/print.c
level_3/fss_write/c/basic/private-common.c
level_3/fss_write/c/basic/private-print.c
level_3/fss_write/c/basic/private-write.c
level_3/fss_write/c/basic_list/basic_list.c [deleted file]
level_3/fss_write/c/basic_list/common.c
level_3/fss_write/c/basic_list/common.h
level_3/fss_write/c/basic_list/fss_write.c [new file with mode: 0644]
level_3/fss_write/c/basic_list/fss_write.h [moved from level_3/fss_write/c/basic_list/basic_list.h with 58% similarity]
level_3/fss_write/c/basic_list/main.c
level_3/fss_write/c/basic_list/print.c
level_3/fss_write/c/basic_list/private-common.c
level_3/fss_write/c/basic_list/private-print.c
level_3/fss_write/c/basic_list/private-write.c
level_3/fss_write/c/embedded_list/common.c
level_3/fss_write/c/embedded_list/common.h
level_3/fss_write/c/embedded_list/embedded_list.c [deleted file]
level_3/fss_write/c/embedded_list/fss_write.c [new file with mode: 0644]
level_3/fss_write/c/embedded_list/fss_write.h [moved from level_3/fss_write/c/embedded_list/embedded_list.h with 57% similarity]
level_3/fss_write/c/embedded_list/main.c
level_3/fss_write/c/embedded_list/print.c
level_3/fss_write/c/embedded_list/private-common.c
level_3/fss_write/c/embedded_list/private-print.c
level_3/fss_write/c/embedded_list/private-write.c
level_3/fss_write/c/extended/common.c
level_3/fss_write/c/extended/common.h
level_3/fss_write/c/extended/extended.c [deleted file]
level_3/fss_write/c/extended/fss_write.c [new file with mode: 0644]
level_3/fss_write/c/extended/fss_write.h [moved from level_3/fss_write/c/extended/extended.h with 58% similarity]
level_3/fss_write/c/extended/main.c
level_3/fss_write/c/extended/print.c
level_3/fss_write/c/extended/private-common.c
level_3/fss_write/c/extended/private-print.c
level_3/fss_write/c/extended/private-write.c
level_3/fss_write/c/extended_list/common.c
level_3/fss_write/c/extended_list/common.h
level_3/fss_write/c/extended_list/extended_list.c [deleted file]
level_3/fss_write/c/extended_list/fss_write.c [new file with mode: 0644]
level_3/fss_write/c/extended_list/fss_write.h [moved from level_3/fss_write/c/extended_list/extended_list.h with 55% similarity]
level_3/fss_write/c/extended_list/main.c
level_3/fss_write/c/extended_list/print.c
level_3/fss_write/c/extended_list/private-common.c
level_3/fss_write/c/extended_list/private-print.c
level_3/fss_write/c/extended_list/private-write.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/main/fss_write.h
level_3/fss_write/c/main/main.c
level_3/fss_write/c/main/main.h [new file with mode: 0644]
level_3/fss_write/c/main/print.c
level_3/fss_write/c/payload/common.c
level_3/fss_write/c/payload/common.h
level_3/fss_write/c/payload/fss_write.c [moved from level_3/fss_write/c/payload/payload.c with 95% similarity]
level_3/fss_write/c/payload/fss_write.h [moved from level_3/fss_write/c/payload/payload.h with 86% similarity]
level_3/fss_write/c/payload/main.c
level_3/fss_write/c/payload/print.c
level_3/fss_write/c/payload/private-common.c
level_3/fss_write/c/payload/private-print.c
level_3/fss_write/c/payload/private-write.c
level_3/fss_write/data/build/settings

diff --git a/level_3/fss_write/c/basic/basic.c b/level_3/fss_write/c/basic/basic.c
deleted file mode 100644 (file)
index 4fd48b9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "fss_write_basic.h"
-#include "private-common.h"
-#include "private-basic.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_basic_process_help_
-  void fss_write_basic_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
-    fss_write_basic_print_help(main, setting);
-  }
-#endif // _di_fss_write_basic_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
index 3b1ba69f88db3ca842875e7e4f68fe8a7229bd3d..f6993c76b6147b291017394627d4d3441947215c 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic.h"
+#include "fss_write.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -6,6 +6,10 @@ extern "C" {
 
 #ifndef _di_fss_write_basic_strings_
   const f_string_static_t fss_write_basic_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_basic_standard_s, 0, FSS_WRITE_basic_standard_s_length);
+
+  const f_string_static_t fss_write_format_code_short_0000_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0000_s, 0, FSS_WRITE_format_code_short_0000_s_length);
+  const f_string_static_t fss_write_format_code_long_0000_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0000_s, 0, FSS_WRITE_format_code_long_0000_s_length);
+  const f_string_static_t fss_write_format_code_human_0000_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0000_s, 0, FSS_WRITE_format_code_human_0000_s_length);
 #endif // _di_fss_write_basic_strings_
 
 #ifdef __cplusplus
index e2f9e858130f9bef6350c23aedea8c7d84eeafce..de6135e11ece629d8d41d2024cc4588312d21f8b 100644 (file)
@@ -22,9 +22,21 @@ extern "C" {
 #ifndef _di_fss_write_basic_strings_
   #define FSS_WRITE_basic_standard_s "FSS-0000 (Basic)"
 
+  #define FSS_WRITE_format_code_short_0000_s "0000"
+  #define FSS_WRITE_format_code_long_0000_s  "fss-0000"
+  #define FSS_WRITE_format_code_human_0000_s "basic"
+
   #define FSS_WRITE_basic_standard_s_length 16
 
+  #define FSS_WRITE_format_code_short_0000_s_length 4
+  #define FSS_WRITE_format_code_long_0000_s_length  8
+  #define FSS_WRITE_format_code_human_0000_s_length 5
+
   extern const f_string_static_t fss_write_basic_standard_s;
+
+  extern const f_string_static_t fss_write_format_code_short_0000_s;
+  extern const f_string_static_t fss_write_format_code_long_0000_s;
+  extern const f_string_static_t fss_write_format_code_human_0000_s;
 #endif // _di_fss_write_basic_strings_
 
 #ifdef __cplusplus
diff --git a/level_3/fss_write/c/basic/fss_write.c b/level_3/fss_write/c/basic/fss_write.c
new file mode 100644 (file)
index 0000000..9788cf0
--- /dev/null
@@ -0,0 +1,33 @@
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_basic_process_help_
+  void fss_write_basic_process_help(fll_program_data_t * const main, void * const setting) {
+
+    fss_write_basic_print_help((fss_write_setting_t *) setting, main->message);
+  }
+#endif // _di_fss_write_basic_process_help_
+
+#ifndef _di_fss_write_basic_process_normal_
+  void fss_write_basic_process_normal(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_basic_process_normal_
+
+#ifndef _di_fss_write_basic_process_pipe_
+  void fss_write_basic_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_basic_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
similarity index 58%
rename from level_3/fss_write/c/basic/basic.h
rename to level_3/fss_write/c/basic/fss_write.h
index a431e089b2c8b54301065107997809ae4d673758..b5a7bba491e210f3604aa4f9be92ab6bdd450d71 100644 (file)
@@ -26,6 +26,7 @@
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
@@ -59,20 +60,57 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This does not alter setting.status.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_basic_process_help_
+  extern void fss_write_basic_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
  *     F_interrupt on (exit) signal received.
  *
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_basic_process_normal_
+  extern void fss_write_basic_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
  *
- * @return
- *   F_none on success.
- *   F_failure (with error bit) for any other failure.
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This alters setting.status:
+ *     F_none on success.
+ *     F_data_not on success but pipe contained no relevant data.
+ *     F_basic on success and the basic has been printed.
+ *     F_interrupt on (exit) signal received.
+ *
+ *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
-#ifndef _di_fss_write_basic_process_help_
-  extern void fss_write_basic_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_basic_process_help_
+#ifndef _di_fss_write_basic_process_pipe_
+  extern void fss_write_basic_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_process_pipe_
 
 #ifdef __cplusplus
 } // extern "C"
index b982c3c56174f0bf99970d8b759493d4cf34c218..8b9a9e8dfa4de5838a9be9c0d37ecbd8cad68dea 100644 (file)
@@ -1,11 +1,11 @@
-#include "basic.h"
+#include "fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.process_help = &fss_write_basic_print_help;
+  setting.process_help = &fss_write_basic_process_help;
   setting.process_pipe = &fss_write_basic_process_pipe;
   setting.process_normal = &fss_write_basic_process_normal;
 
index 378d12aaca724cb1b6cca8902f7f50fffc6ecd6c..bc34f6bf24efc377bdd3c02839010051bf764535 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
@@ -16,6 +16,8 @@ extern "C" {
 
     fss_write_print_help(setting, print);
 
+    f_print_dynamic_raw(f_string_eol_s, print.to);
+
     fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
 
     // @todo
index a06220a539a89c1dfe6f41d47db07587f5bdfb64..8ae3dfd6992637e20900b850e562a8adfd3c3a05 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
index 4f1da6c1c694025665c41b91128a087ca884b08f..0f7be74819c62094b97eb8c9e97069f52f5adae1 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-print.h"
 
index 7197a2007881f9d0cd93358a336b45d9d0d0eebc..e3c2ad5c4f20b642f1fe1f8735bf3d043be13ae9 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-write.h"
 
diff --git a/level_3/fss_write/c/basic_list/basic_list.c b/level_3/fss_write/c/basic_list/basic_list.c
deleted file mode 100644 (file)
index 147d352..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "fss_write_basic_list.h"
-#include "private-common.h"
-#include "private-basic_list.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_basic_list_process_help_
-  void fss_write_basic_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
-    fss_write_basic_list_print_help(main, setting);
-  }
-#endif // _di_fss_write_basic_list_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
index ee136708a95a0ac3dca474c95e775fb7f77efdaa..477f698ba8fb587419c56d283217a70dfe814eab 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic_list.h"
+#include "fss_write.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -6,6 +6,10 @@ extern "C" {
 
 #ifndef _di_fss_write_basic_list_strings_
   const f_string_static_t fss_write_basic_list_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_basic_list_standard_s, 0, FSS_WRITE_basic_list_standard_s_length);
+
+  const f_string_static_t fss_write_format_code_short_0002_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0002_s, 0, FSS_WRITE_format_code_short_0002_s_length);
+  const f_string_static_t fss_write_format_code_long_0002_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0002_s, 0, FSS_WRITE_format_code_long_0002_s_length);
+  const f_string_static_t fss_write_format_code_human_0002_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0002_s, 0, FSS_WRITE_format_code_human_0002_s_length);
 #endif // _di_fss_write_basic_list_strings_
 
 #ifdef __cplusplus
index c0beb2a14af67c46730caf948c874478173ad618..f0b39cdf90f081a1d36b80a89cfc134e5f6d028c 100644 (file)
@@ -22,9 +22,21 @@ extern "C" {
 #ifndef _di_fss_write_basic_list_strings_
   #define FSS_WRITE_basic_list_standard_s "FSS-0002 (Basic List)"
 
+  #define FSS_WRITE_format_code_short_0002_s "0002"
+  #define FSS_WRITE_format_code_long_0002_s  "fss-0002"
+  #define FSS_WRITE_format_code_human_0002_s "basic list"
+
   #define FSS_WRITE_basic_list_standard_s_length 21
 
+  #define FSS_WRITE_format_code_short_0002_s_length 4
+  #define FSS_WRITE_format_code_long_0002_s_length  8
+  #define FSS_WRITE_format_code_human_0002_s_length 10
+
   extern const f_string_static_t fss_write_basic_list_standard_s;
+
+  extern const f_string_static_t fss_write_format_code_short_0002_s;
+  extern const f_string_static_t fss_write_format_code_long_0002_s;
+  extern const f_string_static_t fss_write_format_code_human_0002_s;
 #endif // _di_fss_write_basic_list_strings_
 
 #ifdef __cplusplus
diff --git a/level_3/fss_write/c/basic_list/fss_write.c b/level_3/fss_write/c/basic_list/fss_write.c
new file mode 100644 (file)
index 0000000..ebc7a29
--- /dev/null
@@ -0,0 +1,33 @@
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_basic_list_process_help_
+  void fss_write_basic_list_process_help(fll_program_data_t * const main, void * const setting) {
+
+    fss_write_basic_list_print_help((fss_write_setting_t *) setting, main->message);
+  }
+#endif // _di_fss_write_basic_list_process_help_
+
+#ifndef _di_fss_write_basic_list_process_normal_
+  void fss_write_basic_list_process_normal(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_basic_list_process_normal_
+
+#ifndef _di_fss_write_basic_list_process_pipe_
+  void fss_write_basic_list_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_basic_list_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
similarity index 58%
rename from level_3/fss_write/c/basic_list/basic_list.h
rename to level_3/fss_write/c/basic_list/fss_write.h
index 1206d464a060b1316ae541af9bc4deb52c9b42e9..a40a7e4df70ac5acd133326f08ea7b890f1d5f62 100644 (file)
@@ -26,6 +26,7 @@
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
@@ -59,20 +60,57 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This does not alter setting.status.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_basic_list_process_help_
+  extern void fss_write_basic_list_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_list_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
  *     F_interrupt on (exit) signal received.
  *
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_basic_list_process_normal_
+  extern void fss_write_basic_list_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_list_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
  *
- * @return
- *   F_none on success.
- *   F_failure (with error bit) for any other failure.
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This alters setting.status:
+ *     F_none on success.
+ *     F_data_not on success but pipe contained no relevant data.
+ *     F_basic_list on success and the basic_list has been printed.
+ *     F_interrupt on (exit) signal received.
+ *
+ *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
-#ifndef _di_fss_write_basic_list_process_help_
-  extern void fss_write_basic_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_basic_list_process_help_
+#ifndef _di_fss_write_basic_list_process_pipe_
+  extern void fss_write_basic_list_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_list_process_pipe_
 
 #ifdef __cplusplus
 } // extern "C"
index 212c2d20d8edd2f30189bcc66854121bc0be4cf0..2d03b16e17572ff0f55ac75131c5b9e153ae69e3 100644 (file)
@@ -1,11 +1,11 @@
-#include "basic_list.h"
+#include "fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.process_help = &fss_write_basic_list_print_help;
+  setting.process_help = &fss_write_basic_list_process_help;
   setting.process_pipe = &fss_write_basic_list_process_pipe;
   setting.process_normal = &fss_write_basic_list_process_normal;
 
index 0b5dabfb9278203509aeb061dc70a2b49751bbb0..51ac9d36ec6a63d04a45a376698a071223980aea 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
@@ -16,6 +16,8 @@ extern "C" {
 
     fss_write_print_help(setting, print);
 
+    f_print_dynamic_raw(f_string_eol_s, print.to);
+
     fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
 
     // @todo
index 24b56dea43a1f68cb6a1e00e78d48136e4f5b604..8ae3dfd6992637e20900b850e562a8adfd3c3a05 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
index 237b20a8558a38c8fd0324f8c5bd0976ed00d032..0f7be74819c62094b97eb8c9e97069f52f5adae1 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-print.h"
 
index 98c2396679cb8e5cf84a2b88238ac4490db9954c..e3c2ad5c4f20b642f1fe1f8735bf3d043be13ae9 100644 (file)
@@ -1,4 +1,4 @@
-#include "basic_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-write.h"
 
index ce3090aab4cd795e2ce10daae053354a64d00d68..54f60c197600b24538f8aff7fa78474083cfb99e 100644 (file)
@@ -1,4 +1,4 @@
-#include "embedded_list.h"
+#include "fss_write.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -6,6 +6,10 @@ extern "C" {
 
 #ifndef _di_fss_write_embedded_list_strings_
   const f_string_static_t fss_write_embedded_list_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_embedded_list_standard_s, 0, FSS_WRITE_embedded_list_standard_s_length);
+
+  const f_string_static_t fss_write_format_code_short_0008_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0008_s, 0, FSS_WRITE_format_code_short_0008_s_length);
+  const f_string_static_t fss_write_format_code_long_0008_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0008_s, 0, FSS_WRITE_format_code_long_0008_s_length);
+  const f_string_static_t fss_write_format_code_human_0008_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0008_s, 0, FSS_WRITE_format_code_human_0008_s_length);
 #endif // _di_fss_write_embedded_list_strings_
 
 #ifdef __cplusplus
index 1a3c162aef5e8e6e82f9ab2bbb176e650ba008a9..296934b98c0f461aa26f63b1dc0301285586ec4f 100644 (file)
@@ -25,6 +25,22 @@ extern "C" {
   #define FSS_WRITE_embedded_list_standard_s_length 24
 
   extern const f_string_static_t fss_write_embedded_list_standard_s;
+
+  #define FSS_WRITE_format_code_short_0008_s "0008"
+  #define FSS_WRITE_format_code_long_0008_s  "fss-0008"
+  #define FSS_WRITE_format_code_human_0008_s "basic"
+
+  #define FSS_WRITE_basic_standard_s_length 16
+
+  #define FSS_WRITE_format_code_short_0008_s_length 4
+  #define FSS_WRITE_format_code_long_0008_s_length  8
+  #define FSS_WRITE_format_code_human_0008_s_length 5
+
+  extern const f_string_static_t fss_write_basic_standard_s;
+
+  extern const f_string_static_t fss_write_format_code_short_0008_s;
+  extern const f_string_static_t fss_write_format_code_long_0008_s;
+  extern const f_string_static_t fss_write_format_code_human_0008_s;
 #endif // _di_fss_write_embedded_list_strings_
 
 #ifdef __cplusplus
diff --git a/level_3/fss_write/c/embedded_list/embedded_list.c b/level_3/fss_write/c/embedded_list/embedded_list.c
deleted file mode 100644 (file)
index 3456ed3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "fss_write_embedded_list.h"
-#include "private-common.h"
-#include "private-embedded_list.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_embedded_list_process_help_
-  void fss_write_embedded_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
-    fss_write_embedded_list_print_help(main, setting);
-  }
-#endif // _di_fss_write_embedded_list_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_3/fss_write/c/embedded_list/fss_write.c b/level_3/fss_write/c/embedded_list/fss_write.c
new file mode 100644 (file)
index 0000000..4ad0c7f
--- /dev/null
@@ -0,0 +1,33 @@
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_embedded_list_process_help_
+  void fss_write_embedded_list_process_help(fll_program_data_t * const main, void * const setting) {
+
+    fss_write_embedded_list_print_help((fss_write_setting_t *) setting, main->message);
+  }
+#endif // _di_fss_write_embedded_list_process_help_
+
+#ifndef _di_fss_write_embedded_list_process_normal_
+  void fss_write_embedded_list_process_normal(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_embedded_list_process_normal_
+
+#ifndef _di_fss_write_embedded_list_process_pipe_
+  void fss_write_embedded_list_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_embedded_list_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
similarity index 57%
rename from level_3/fss_write/c/embedded_list/embedded_list.h
rename to level_3/fss_write/c/embedded_list/fss_write.h
index dc1e9e5c68e30cc1438401b90b86819a4f0c2ffa..60e2342371ea6e30b8d248ba235432b1b379ea1b 100644 (file)
@@ -26,6 +26,7 @@
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
@@ -58,20 +59,57 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This does not alter setting.status.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_embedded_list_process_help_
+  extern void fss_write_embedded_list_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_embedded_list_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
  *     F_interrupt on (exit) signal received.
  *
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_embedded_list_process_normal_
+  extern void fss_write_embedded_list_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_embedded_list_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
  *
- * @return
- *   F_none on success.
- *   F_failure (with error bit) for any other failure.
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This alters setting.status:
+ *     F_none on success.
+ *     F_data_not on success but pipe contained no relevant data.
+ *     F_embedded_list on success and the embedded_list has been printed.
+ *     F_interrupt on (exit) signal received.
+ *
+ *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
-#ifndef _di_fss_write_embedded_list_process_help_
-  extern void fss_write_embedded_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_embedded_list_process_help_
+#ifndef _di_fss_write_embedded_list_process_pipe_
+  extern void fss_write_embedded_list_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_embedded_list_process_pipe_
 
 #ifdef __cplusplus
 } // extern "C"
index fec94f57ec975892e80af57c7c1bc309a3b613ad..bef1732a5609f9e7d70bccc00c972b52889b4f80 100644 (file)
@@ -1,11 +1,11 @@
-#include "embedded_list.h"
+#include "fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.process_help = &fss_write_embedded_list_print_help;
+  setting.process_help = &fss_write_embedded_list_process_help;
   setting.process_pipe = &fss_write_embedded_list_process_pipe;
   setting.process_normal = &fss_write_embedded_list_process_normal;
 
index 174016caef850f2c7d62c4a3d534ce4e53b18fb3..a1ee9f18055196806c20f871859806ecd67f3143 100644 (file)
@@ -1,4 +1,4 @@
-#include "embedded_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
@@ -16,6 +16,8 @@ extern "C" {
 
     fss_write_print_help(setting, print);
 
+    f_print_dynamic_raw(f_string_eol_s, print.to);
+
     fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
 
     // @todo
index 59e28ca9eb3847745bfad3368173774dc11d6cca..8ae3dfd6992637e20900b850e562a8adfd3c3a05 100644 (file)
@@ -1,4 +1,4 @@
-#include "embedded_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
index 0661540ac794d748a831375ad4e18e92a1976dc9..0f7be74819c62094b97eb8c9e97069f52f5adae1 100644 (file)
@@ -1,4 +1,4 @@
-#include "embedded_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-print.h"
 
index 543fd73368d6ce0524203c43de2c259c04fc354a..e3c2ad5c4f20b642f1fe1f8735bf3d043be13ae9 100644 (file)
@@ -1,4 +1,4 @@
-#include "embedded_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-write.h"
 
index 4d18b02fc7f783f8404e00281619595d508213dd..18ea2c131e4f39b03de51c7585e5eaba24f641ce 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended.h"
+#include "fss_write.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -6,6 +6,10 @@ extern "C" {
 
 #ifndef _di_fss_write_extended_strings_
   const f_string_static_t fss_write_extended_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_extended_standard_s, 0, FSS_WRITE_extended_standard_s_length);
+
+  const f_string_static_t fss_write_format_code_short_0001_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0001_s, 0, FSS_WRITE_format_code_short_0001_s_length);
+  const f_string_static_t fss_write_format_code_long_0001_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0001_s, 0, FSS_WRITE_format_code_long_0001_s_length);
+  const f_string_static_t fss_write_format_code_human_0001_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0001_s, 0, FSS_WRITE_format_code_human_0001_s_length);
 #endif // _di_fss_write_extended_strings_
 
 #ifdef __cplusplus
index 3e633181718d47fca0da371665b370da868744bc..4bafcbc48f8596179013b31e452fa971336b131e 100644 (file)
@@ -22,9 +22,21 @@ extern "C" {
 #ifndef _di_fss_write_extended_strings_
   #define FSS_WRITE_extended_standard_s "FSS-0001 (Extended)"
 
+  #define FSS_WRITE_format_code_short_0001_s "0001"
+  #define FSS_WRITE_format_code_long_0001_s  "fss-0001"
+  #define FSS_WRITE_format_code_human_0001_s "extended"
+
   #define FSS_WRITE_extended_standard_s_length 19
 
+  #define FSS_WRITE_format_code_short_0001_s_length 4
+  #define FSS_WRITE_format_code_long_0001_s_length  8
+  #define FSS_WRITE_format_code_human_0001_s_length 8
+
   extern const f_string_static_t fss_write_extended_standard_s;
+
+  extern const f_string_static_t fss_write_format_code_short_0001_s;
+  extern const f_string_static_t fss_write_format_code_long_0001_s;
+  extern const f_string_static_t fss_write_format_code_human_0001_s;
 #endif // _di_fss_write_extended_strings_
 
 #ifdef __cplusplus
diff --git a/level_3/fss_write/c/extended/extended.c b/level_3/fss_write/c/extended/extended.c
deleted file mode 100644 (file)
index 7076971..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "fss_write_extended.h"
-#include "private-common.h"
-#include "private-extended.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_extended_process_help_
-  void fss_write_extended_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
-    fss_write_extended_print_help(main, setting);
-  }
-#endif // _di_fss_write_extended_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_3/fss_write/c/extended/fss_write.c b/level_3/fss_write/c/extended/fss_write.c
new file mode 100644 (file)
index 0000000..e76f0f4
--- /dev/null
@@ -0,0 +1,33 @@
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_extended_process_help_
+  void fss_write_extended_process_help(fll_program_data_t * const main, void * const setting) {
+
+    fss_write_extended_print_help((fss_write_setting_t *) setting, main->message);
+  }
+#endif // _di_fss_write_extended_process_help_
+
+#ifndef _di_fss_write_extended_process_normal_
+  void fss_write_extended_process_normal(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_extended_process_normal_
+
+#ifndef _di_fss_write_extended_process_pipe_
+  void fss_write_extended_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_extended_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
similarity index 58%
rename from level_3/fss_write/c/extended/extended.h
rename to level_3/fss_write/c/extended/fss_write.h
index dd0bf6ed065ceeec6323d3bad729eac3b1b95dca..608a8ac09204b982b40361d21bf9ce943b0daa84 100644 (file)
@@ -26,6 +26,7 @@
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
@@ -51,7 +52,6 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-
 /**
  * Process help for FSS-0001 (Extended).
  *
@@ -59,20 +59,57 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This does not alter setting.status.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_extended_process_help_
+  extern void fss_write_extended_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
  *     F_interrupt on (exit) signal received.
  *
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_extended_process_normal_
+  extern void fss_write_extended_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
  *
- * @return
- *   F_none on success.
- *   F_failure (with error bit) for any other failure.
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This alters setting.status:
+ *     F_none on success.
+ *     F_data_not on success but pipe contained no relevant data.
+ *     F_extended on success and the extended has been printed.
+ *     F_interrupt on (exit) signal received.
+ *
+ *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
-#ifndef _di_fss_write_extended_process_help_
-  extern void fss_write_extended_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_extended_process_help_
+#ifndef _di_fss_write_extended_process_pipe_
+  extern void fss_write_extended_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_process_pipe_
 
 #ifdef __cplusplus
 } // extern "C"
index b6dc078f88ee929b37e87a2d6de6cb6b0adafe56..70fc136610246f224b52f3de0eca297225579ce5 100644 (file)
@@ -1,11 +1,11 @@
-#include "extended.h"
+#include "fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.process_help = &fss_write_extended_print_help;
+  setting.process_help = &fss_write_extended_process_help;
   setting.process_pipe = &fss_write_extended_process_pipe;
   setting.process_normal = &fss_write_extended_process_normal;
 
index b698a8fd495100b3f7464b47c64152a0f666a759..c634825d0c2474a3edb16a2d2db3b12e2e12042b 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
@@ -16,6 +16,8 @@ extern "C" {
 
     fss_write_print_help(setting, print);
 
+    f_print_dynamic_raw(f_string_eol_s, print.to);
+
     fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
 
     // @todo
index b7b6f0b3793c7dcb5c4906a62c5881bfc0e33776..8ae3dfd6992637e20900b850e562a8adfd3c3a05 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
index cd8abd998e40ff39c42e423a1f5c582bcbb51215..0f7be74819c62094b97eb8c9e97069f52f5adae1 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-print.h"
 
index 44291210a2846d1b2e816d072900a5b4839acac5..e3c2ad5c4f20b642f1fe1f8735bf3d043be13ae9 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-write.h"
 
index 60b8a80ac972d836ecf0e7636e867fef35b65bbe..20157d411ff066ca3a3b4a07509dda3c593b57e0 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended_list.h"
+#include "fss_write.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -6,6 +6,10 @@ extern "C" {
 
 #ifndef _di_fss_write_extended_list_strings_
   const f_string_static_t fss_write_extended_list_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_extended_list_standard_s, 0, FSS_WRITE_extended_list_standard_s_length);
+
+  const f_string_static_t fss_write_format_code_short_0003_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0003_s, 0, FSS_WRITE_format_code_short_0003_s_length);
+  const f_string_static_t fss_write_format_code_long_0003_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0003_s, 0, FSS_WRITE_format_code_long_0003_s_length);
+  const f_string_static_t fss_write_format_code_human_0003_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0003_s, 0, FSS_WRITE_format_code_human_0003_s_length);
 #endif // _di_fss_write_extended_list_strings_
 
 #ifdef __cplusplus
index 4e79e1437aa230a241fe1faf18b1b4890fa11339..5257247c0fc4aad84c1cb54e8b7413b37f7340c7 100644 (file)
@@ -20,11 +20,23 @@ extern "C" {
  * The FSS-0001 (Extended List) specific strings.
  */
 #ifndef _di_fss_write_extended_list_strings_
-  #define FSS_WRITE_extended_list_standard_s "FSS-0001 (Extended List)"
+  #define FSS_WRITE_extended_list_standard_s "FSS-0003 (Extended List)"
+
+  #define FSS_WRITE_format_code_short_0003_s "0003"
+  #define FSS_WRITE_format_code_long_0003_s  "fss-0003"
+  #define FSS_WRITE_format_code_human_0003_s "extended list"
 
   #define FSS_WRITE_extended_list_standard_s_length 24
 
+  #define FSS_WRITE_format_code_short_0003_s_length 4
+  #define FSS_WRITE_format_code_long_0003_s_length  8
+  #define FSS_WRITE_format_code_human_0003_s_length 13
+
   extern const f_string_static_t fss_write_extended_list_standard_s;
+
+  extern const f_string_static_t fss_write_format_code_short_0003_s;
+  extern const f_string_static_t fss_write_format_code_long_0003_s;
+  extern const f_string_static_t fss_write_format_code_human_0003_s;
 #endif // _di_fss_write_extended_list_strings_
 
 #ifdef __cplusplus
diff --git a/level_3/fss_write/c/extended_list/extended_list.c b/level_3/fss_write/c/extended_list/extended_list.c
deleted file mode 100644 (file)
index dbb6e0b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "fss_write_extended_list.h"
-#include "private-common.h"
-#include "private-extended_list.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_extended_list_process_help_
-  void fss_write_extended_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
-    fss_write_extended_list_print_help(main, setting);
-  }
-#endif // _di_fss_write_extended_list_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_3/fss_write/c/extended_list/fss_write.c b/level_3/fss_write/c/extended_list/fss_write.c
new file mode 100644 (file)
index 0000000..f0775dc
--- /dev/null
@@ -0,0 +1,33 @@
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_extended_list_process_help_
+  void fss_write_extended_list_process_help(fll_program_data_t * const main, void * const setting) {
+
+    fss_write_extended_list_print_help((fss_write_setting_t *) setting, main->message);
+  }
+#endif // _di_fss_write_extended_list_process_help_
+
+#ifndef _di_fss_write_extended_list_process_normal_
+  void fss_write_extended_list_process_normal(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_extended_list_process_normal_
+
+#ifndef _di_fss_write_extended_list_process_pipe_
+  void fss_write_extended_list_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+    // @todo
+  }
+#endif // _di_fss_write_extended_list_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
similarity index 55%
rename from level_3/fss_write/c/extended_list/extended_list.h
rename to level_3/fss_write/c/extended_list/fss_write.h
index d08abd324f18dff34cc2c40519979f69687227df..f047b5f9821f3ac6587abc4fdfe4a0ef22f2a95c 100644 (file)
@@ -26,6 +26,7 @@
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
@@ -43,9 +44,9 @@
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
-#include <program/fss_write/extended/common.h>
+#include <program/fss_write/extended_list/common.h>
 #include <program/fss_write/main/common.h>
-#include <program/fss_write/extended/print.h>
+#include <program/fss_write/extended_list/print.h>
 #include <program/fss_write/main/print.h>
 
 #ifdef __cplusplus
@@ -59,20 +60,57 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This does not alter setting.status.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_extended_list_process_help_
+  extern void fss_write_extended_list_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_list_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
  *     F_interrupt on (exit) signal received.
  *
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_extended_list_process_normal_
+  extern void fss_write_extended_list_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_list_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
  *
- * @return
- *   F_none on success.
- *   F_failure (with error bit) for any other failure.
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This alters setting.status:
+ *     F_none on success.
+ *     F_data_not on success but pipe contained no relevant data.
+ *     F_extended_list on success and the extended_list has been printed.
+ *     F_interrupt on (exit) signal received.
+ *
+ *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
-#ifndef _di_fss_write_extended_list_process_help_
-  extern void fss_write_extended_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_extended_list_process_help_
+#ifndef _di_fss_write_extended_list_process_pipe_
+  extern void fss_write_extended_list_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_list_process_pipe_
 
 #ifdef __cplusplus
 } // extern "C"
index 4a2b2e51585d26631e773b1d53ab834e1bf95652..f6714b89beb93619df9835fb02fd37764f751dd7 100644 (file)
@@ -1,11 +1,11 @@
-#include "extended_list.h"
+#include "fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.process_help = &fss_write_extended_list_print_help;
+  setting.process_help = &fss_write_extended_list_process_help;
   setting.process_pipe = &fss_write_extended_list_process_pipe;
   setting.process_normal = &fss_write_extended_list_process_normal;
 
index c1ebcc24ba6b11eb6d5fbaab171aebcbb3a368c1..7e882b0395b061267f52f0fe09a529cb88b1ac64 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
@@ -16,6 +16,8 @@ extern "C" {
 
     fss_write_print_help(setting, print);
 
+    f_print_dynamic_raw(f_string_eol_s, print.to);
+
     fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
 
     // @todo
index cd7888c223c15b7c5c721d26c9f07b590ddec629..8ae3dfd6992637e20900b850e562a8adfd3c3a05 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
index 1ac3a0de7d801dc4173eb1474e354d508e8e545f..0f7be74819c62094b97eb8c9e97069f52f5adae1 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-print.h"
 
index 40219c14bc520c954efcd8d4db252c8b39a59091..e3c2ad5c4f20b642f1fe1f8735bf3d043be13ae9 100644 (file)
@@ -1,4 +1,4 @@
-#include "extended_list.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-write.h"
 
index 609eece9e7d7410b2b12f70a1d30723b86c8959d..2d5802b3064280d71c8696175692d4beced1a9e2 100644 (file)
@@ -86,6 +86,32 @@ extern "C" {
 #endif // _di_fss_write_defines_
 
 /**
+ * Designate the supported formats for the main (fss_write) program.
+ *
+ * These are intended to be used for communicating or selecting an "--as" option.
+ *
+ * The digit value of the codes are intended to exactly match the numeric representation.
+ *
+ * fss_write_format_code_*_e:
+ *   - 0000: The FSS-0000 (Basic) format.
+ *   - 0001: The FSS-0001 (Extended) format.
+ *   - 0002: The FSS-0002 (Basic List) format.
+ *   - 0003: The FSS-0003 (Extended List) format.
+ *   - 0008: The FSS-0008 (Embedded List) format.
+ *   - 000e: The FSS-000E (Payload) format.
+ */
+#ifndef _di_fss_write_formats_
+  enum {
+    fss_write_format_code_0000_e = 0x0,
+    fss_write_format_code_0001_e = 0x1,
+    fss_write_format_code_0002_e = 0x2,
+    fss_write_format_code_0003_e = 0x3,
+    fss_write_format_code_0008_e = 0x8,
+    fss_write_format_code_000e_e = 0xe,
+  };
+#endif // _di_fss_write_formats_
+
+/**
  * A collection of static strings associated with FSS Payload Write.
  */
 #ifndef _di_fss_write_strings_
@@ -314,9 +340,9 @@ extern "C" {
     f_string_dynamics_t objects;
     f_string_dynamics_t contents;
 
-    void (*process_help)(fll_program_data_t * const main, fss_write_setting_t * const setting);
-    void (*process_normal)(fll_program_data_t * const main, fss_write_setting_t * const setting);
-    void (*process_pipe)(fll_program_data_t * const main, fss_write_setting_t * const setting);
+    void (*process_help)(fll_program_data_t * const main, void * const setting);
+    void (*process_normal)(fll_program_data_t * const main, void * const setting);
+    void (*process_pipe)(fll_program_data_t * const main, void * const setting);
   } fss_write_setting_t;
 
   #define fss_write_setting_t_initialize \
index 93779eec16888ea947b87c17f5e934f81155b50e..2e7ec1bac91447ec20b84414ceeed84fe2bbfd8d 100644 (file)
@@ -14,7 +14,7 @@ extern "C" {
     setting->status = F_none;
 
     if (setting->flag & fss_write_main_flag_help_e) {
-      fss_write_print_help(setting, main->message);
+      setting->process_help(main, (void *) setting);
 
       return;
     }
index b68c1d49d9bc22d00d83c1160ea0532702a43d58..4468f25ebfdf0c585cb6b0083e76469c40fe38d5 100644 (file)
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
 
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
-#include <fll/level_1/fss/basic_list.h>
 #include <fll/level_1/print.h>
 #include <fll/level_1/string.h>
 
 // FLL-2 includes.
 #include <fll/level_2/error.h>
-#include <fll/level_2/fss/payload.h>
 #include <fll/level_2/print.h>
 #include <fll/level_2/program.h>
 
 // FSS Write includes.
-#include <program/fss_write/common.h>
-#include <program/fss_write/print.h>
+#include <program/fss_write/main/common.h>
+#include <program/fss_write/main/print.h>
 
 #ifdef __cplusplus
 extern "C" {
index 738bc2d064090801f43a32ab4427fd12924cbb66..d8634d20c663b47505e4e245a0b6cc292d9249ed 100644 (file)
@@ -1,10 +1,11 @@
 #include "fss_write.h"
-#include "basic/basic.h"
-#include "basic_list/basic_list.h"
-#include "extended/extended.h"
-#include "extended_list/extended_list.h"
-#include "embedded_list/embedded_list.h"
-#include "payload/payload.h"
+#include "main.h"
+#include "../basic/fss_write.h"
+#include "../basic_list/fss_write.h"
+#include "../extended/fss_write.h"
+#include "../extended_list/fss_write.h"
+#include "../embedded_list/fss_write.h"
+#include "../payload/fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
@@ -13,7 +14,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   setting.state.data = (void *) &data;
 
   // Default to Basic.
-  setting.process_help = &fss_write_basic_print_help;
+  setting.process_help = &fss_write_main_process_help;
   setting.process_pipe = &fss_write_basic_process_pipe;
   setting.process_normal = &fss_write_basic_process_normal;
 
@@ -44,3 +45,75 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   return F_status_is_error(setting.status) ? 1 : 0;
 }
+
+#ifndef _di_fss_write_main_process_help_
+  void fss_write_main_process_help(fll_program_data_t * const main, void * const void_setting) {
+
+    fss_write_setting_t * const setting = (fss_write_setting_t *) void_setting;
+
+    f_file_stream_lock(main->message.to);
+
+    f_print_dynamic_raw(setting->line_first, main->message.to);
+
+    fll_program_print_help_header(main->message, fss_write_program_name_long_s, fss_write_program_version_s);
+
+    fss_write_print_help(setting, main->message);
+
+    fll_program_print_help_option(main->message, fss_write_short_as_s, fss_write_long_as_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Designate the supported format to write as.");
+
+    f_print_dynamic_raw(f_string_eol_s, main->message.to);
+    f_print_dynamic_raw(f_string_eol_s, main->message.to);
+
+    fll_program_print_help_usage(main->message, fss_write_program_name_s, f_string_empty_s);
+
+    f_print_dynamic_raw(f_string_eol_s, main->message.to);
+
+    fl_print_format("  The '%[%r%r%]' parameter supports the following standards with the specified possible case-sensitive values%r", main->message.to, main->message.set->notable, f_console_symbol_long_normal_s, fss_write_long_as_s, main->message.set->notable, f_string_eol_s);
+
+    // FSS-0000 (Basic)
+    fl_print_format("    - As %[%r%]         format: ", main->message.to, main->message.set->notable, fss_write_basic_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0000_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0000_s, main->message.set->notable);
+    fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0000_s, main->message.set->notable, f_string_eol_s);
+
+    // FSS-0001 (Extended)
+    fl_print_format("    - As %[%r%]      format: ", main->message.to, main->message.set->notable, fss_write_extended_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0001_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0001_s, main->message.set->notable);
+    fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0001_s, main->message.set->notable, f_string_eol_s);
+
+    // FSS-0002 (Basic List)
+    fl_print_format("    - As %[%r%]    format: ", main->message.to, main->message.set->notable, fss_write_basic_list_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0002_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0002_s, main->message.set->notable);
+    fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0002_s, main->message.set->notable, f_string_eol_s);
+
+    // FSS-0003 (Extended List)
+    fl_print_format("    - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_extended_list_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0003_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0003_s, main->message.set->notable);
+    fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0003_s, main->message.set->notable, f_string_eol_s);
+
+    // FSS-0008 (Embedded List)
+    fl_print_format("    - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_embedded_list_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0008_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0008_s, main->message.set->notable);
+    fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0008_s, main->message.set->notable, f_string_eol_s);
+
+    // FSS-000E (Payload)
+    fl_print_format("    - As %[%r%]       format: ", main->message.to, main->message.set->notable, fss_write_payload_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_000e_s, main->message.set->notable);
+    fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_000e_s, main->message.set->notable);
+    fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_000e_s, main->message.set->notable, f_string_eol_s);
+
+    f_print_dynamic_raw(f_string_eol_s, main->message.to);
+
+    fl_print_format("  The %[%r%] format is the default when no ", main->message.to, main->message.set->notable, fss_write_basic_standard_s, main->message.set->notable);
+    fl_print_format("'%[%r%r%]' is specified.%r", main->message.to, main->message.set->notable, f_console_symbol_long_normal_s, fss_write_long_as_s, main->message.set->notable, f_string_eol_s);
+
+    f_print_dynamic_raw(setting->line_last, main->message.to);
+
+    f_file_stream_flush(main->message.to);
+    f_file_stream_unlock(main->message.to);
+  }
+#endif // _di_fss_write_main_process_help_
diff --git a/level_3/fss_write/c/main/main.h b/level_3/fss_write/c/main/main.h
new file mode 100644 (file)
index 0000000..a4b3d5d
--- /dev/null
@@ -0,0 +1,42 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * This file is only ever included by main/main.c and should not normally be included anywhere else.
+ * Anything that wants to include this should be providing the "main" program functionality in some manner.
+ * Any program utilizing this should link to the "main" program library.
+ */
+#ifndef _fss_write_main_h
+#define _fss_write_main_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Process printing help for when not specifying "--as".
+ *
+ * @param main
+ *   The main program data.
+ * @param setting
+ *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
+ *
+ *   This does not alter setting.status.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_main_process_help_
+  extern void fss_write_main_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_main_process_help_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_main_h
index 7a9bf5db268baaa9e57eab7021f6e4a7ee25a813..8b29731a695b5a4008a3f953c4f5c47538386a56 100644 (file)
@@ -115,7 +115,6 @@ extern "C" {
     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);
-    f_print_dynamic_raw(f_string_eol_s, print.to);
   }
 #endif // _di_fss_write_print_help_
 
index ad227987b8a5b9ee64551cdf1c090435402926ad..54bb78c8d909f160d27c46ef16473e0f9d4f0f30 100644 (file)
@@ -1,4 +1,4 @@
-#include "payload.h"
+#include "fss_write.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -6,6 +6,10 @@ extern "C" {
 
 #ifndef _di_fss_write_payload_strings_
   const f_string_static_t fss_write_payload_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_payload_standard_s, 0, FSS_WRITE_payload_standard_s_length);
+
+  const f_string_static_t fss_write_format_code_short_000e_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_000e_s, 0, FSS_WRITE_format_code_short_000e_s_length);
+  const f_string_static_t fss_write_format_code_long_000e_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_000e_s, 0, FSS_WRITE_format_code_long_000e_s_length);
+  const f_string_static_t fss_write_format_code_human_000e_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_000e_s, 0, FSS_WRITE_format_code_human_000e_s_length);
 #endif // _di_fss_write_payload_strings_
 
 #ifdef __cplusplus
index 6ea77f618a41dae56526fa82c1688540c276cd5e..afccfc6a35c5177098636234c5b74335bf41ccee 100644 (file)
@@ -22,9 +22,21 @@ extern "C" {
 #ifndef _di_fss_write_payload_strings_
   #define FSS_WRITE_payload_standard_s "FSS-000E (Payload)"
 
+  #define FSS_WRITE_format_code_short_000e_s "000e"
+  #define FSS_WRITE_format_code_long_000e_s  "fss-000e"
+  #define FSS_WRITE_format_code_human_000e_s "payload"
+
   #define FSS_WRITE_payload_standard_s_length 18
 
+  #define FSS_WRITE_format_code_short_000e_s_length 4
+  #define FSS_WRITE_format_code_long_000e_s_length  8
+  #define FSS_WRITE_format_code_human_000e_s_length 7
+
   extern const f_string_static_t fss_write_payload_standard_s;
+
+  extern const f_string_static_t fss_write_format_code_short_000e_s;
+  extern const f_string_static_t fss_write_format_code_long_000e_s;
+  extern const f_string_static_t fss_write_format_code_human_000e_s;
 #endif // _di_fss_write_payload_strings_
 
 #ifdef __cplusplus
similarity index 95%
rename from level_3/fss_write/c/payload/payload.c
rename to level_3/fss_write/c/payload/fss_write.c
index 0730dde2e36aca89590ad27e67437f3aea75fe69..9af12f868104e470fdf42b9691a7552aa646dccc 100644 (file)
@@ -1,6 +1,6 @@
-#include "fss_write_payload.h"
+#include "fss_write.h"
 #include "private-common.h"
-#include "private-payload.h"
+#include "private-write.h"
 #include "../main/fss_write.h"
 
 #ifdef __cplusplus
@@ -8,15 +8,16 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_payload_process_help_
-  void fss_write_payload_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
+  void fss_write_payload_process_help(fll_program_data_t * const main, void * const setting) {
 
-    fss_write_payload_print_help(main, setting);
+    fss_write_payload_print_help((fss_write_setting_t *) setting, main->message);
   }
 #endif // _di_fss_write_payload_process_help_
 
 #ifndef _di_fss_write_payload_process_normal_
-  void fss_write_payload_process_normal(fll_program_data_t * const main, fss_write_setting_t * const setting) {
+  void fss_write_payload_process_normal(fll_program_data_t * const main, void * const void_setting) {
 
+    fss_write_setting_t * const setting = (fss_write_setting_t *) void_setting;
     f_string_statics_t *objects = &setting->objects;
     f_string_statics_t *contents = &setting->contents;
     f_string_statics_t *data = &setting->objects;
@@ -50,8 +51,9 @@ extern "C" {
 #endif // _di_fss_write_payload_process_normal_
 
 #ifndef _di_fss_write_payload_process_pipe_
-  void fss_write_payload_process_pipe(fll_program_data_t * const main, fss_write_setting_t * const setting) {
+  void fss_write_payload_process_pipe(fll_program_data_t * const main, void * const void_setting) {
 
+    fss_write_setting_t * const setting = (fss_write_setting_t *) void_setting;
     f_status_t status_pipe = F_none;
     f_file_t input = f_file_t_initialize;
     input.id = F_type_descriptor_input_d;
@@ -182,7 +184,7 @@ extern "C" {
           printed |= 0x2;
 
           // Designate to read next block from pipe.
-          range.start = 1;fss_write_payload_process_set
+          range.start = 1; // fss_write_payload_process_set ??
           range.stop = 0;
 
           continue;
@@ -204,7 +206,7 @@ extern "C" {
 
               if (main->error.verbosity > f_console_verbosity_quiet_e) {
                 fss_write_print_line_first_locked(setting, main->error);
-                fss_write_print_error_one_content_only(setting, main->error, "FSS-000E (Payload)");
+                fss_write_print_error_one_content_only(setting, main->error, fss_write_payload_standard_s);
                 fss_write_print_line_last_locked(setting, main->error);
               }
 
@@ -344,7 +346,7 @@ extern "C" {
           setting->status = F_status_set_error(F_supported_not);
 
           fss_write_print_line_first_locked(setting, main->error);
-          fss_write_print_error_unsupported_eol(setting, main->error);
+          fss_write_print_error_unsupported_eol(setting, main->error, fss_write_payload_standard_s);
           fss_write_print_line_last_locked(setting, main->error);
 
           return;
@@ -383,7 +385,7 @@ extern "C" {
           setting->status = F_status_set_error(F_supported_not);
 
           fss_write_print_line_first_locked(setting, main->error);
-          fss_write_print_error_unsupported_eol(setting, main->error);
+          fss_write_print_error_unsupported_eol(setting, main->error, fss_write_payload_standard_s);
           fss_write_print_line_last_locked(setting, main->error);
 
           return;
similarity index 86%
rename from level_3/fss_write/c/payload/payload.h
rename to level_3/fss_write/c/payload/fss_write.h
index cfe94402bdb57da1391f6f1700c0a417580d08d0..90ce95761f3911914f78cc8b81946a54dd6bd28b 100644 (file)
@@ -26,6 +26,7 @@
 #include <fll/level_0/console.h>
 #include <fll/level_0/conversion.h>
 #include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
 #include <fll/level_0/pipe.h>
 #include <fll/level_0/print.h>
 #include <fll/level_0/signal.h>
@@ -59,19 +60,16 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
- *   This alters setting.status:
- *     F_none on success.
- *     F_interrupt on (exit) signal received.
- *
- *     F_parameter (with error bit) if main is NULL or setting is NULL.
+ *   This does not alter setting.status.
  *
  * @return
  *   F_none on success.
- *   F_failure (with error bit) for any other failure.
+ *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_payload_process_help_
-  extern void fss_write_payload_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
+  extern void fss_write_payload_process_help(fll_program_data_t * const main, void * const setting);
 #endif // _di_fss_write_payload_process_help_
 
 /**
@@ -81,6 +79,7 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
@@ -89,7 +88,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_payload_process_normal_
-  extern void fss_write_payload_process_normal(fll_program_data_t * const main, fss_write_setting_t * const setting);
+  extern void fss_write_payload_process_normal(fll_program_data_t * const main, void * const setting);
 #endif // _di_fss_write_payload_process_normal_
 
 /**
@@ -99,6 +98,7 @@ extern "C" {
  *   The main program data.
  * @param setting
  *   The main program settings.
+ *   Must be of type (fss_write_setting_t *).
  *
  *   This alters setting.status:
  *     F_none on success.
@@ -109,7 +109,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_payload_process_pipe_
-  extern void fss_write_payload_process_pipe(fll_program_data_t * const main, fss_write_setting_t * const setting);
+  extern void fss_write_payload_process_pipe(fll_program_data_t * const main, void * const setting);
 #endif // _di_fss_write_payload_process_pipe_
 
 /**
@@ -132,9 +132,9 @@ extern "C" {
  *   The content to escape and print.
  *   Set pointer address to 0 to not use.
  */
-#ifndef _di_fss_write_process_payload_set_
-  extern void fss_write_process_payload_set(fll_program_data_t * const main, fss_write_setting_t * const setting, const f_string_static_t *object, const f_string_static_t *content);
-#endif // _di_fss_write_process_payload_set_
+#ifndef _di_fss_write_payload_process_set_
+  extern void fss_write_payload_process_set(fll_program_data_t * const main, fss_write_setting_t * const setting, const f_string_static_t *object, const f_string_static_t *content);
+#endif // _di_fss_write_payload_process_set_
 
 #ifdef __cplusplus
 } // extern "C"
index 2fc9773e957c83b1c9e97e16a7e07b30950bfa9c..bfd607442bee3b87f47c00da64fbd46643b53406 100644 (file)
@@ -1,11 +1,11 @@
-#include "payload.h"
+#include "fss_write.h"
 
 int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.process_help = &fss_write_payload_print_help;
+  setting.process_help = &fss_write_payload_process_help;
   setting.process_pipe = &fss_write_payload_process_pipe;
   setting.process_normal = &fss_write_payload_process_normal;
 
index 95335a7689bc826f5b7a42a500431542be720073..1421d2280d07b3ccfa100686254112724bc9f010 100644 (file)
@@ -1,4 +1,4 @@
-#include "payload.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
@@ -16,6 +16,8 @@ extern "C" {
 
     fss_write_print_help(setting, print);
 
+    f_print_dynamic_raw(f_string_eol_s, print.to);
+
     fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
 
     fl_print_format("%r  The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%r", print.to, f_string_eol_s, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s);
index daf0cfdb1c6a5ea4516d3dd34ee3cbc50870b1ae..8ae3dfd6992637e20900b850e562a8adfd3c3a05 100644 (file)
@@ -1,4 +1,4 @@
-#include "payload.h"
+#include "fss_write.h"
 #include "private-common.h"
 
 #ifdef __cplusplus
index a0ccc02543b27f2305d08212a3a0d9abb77517f7..0f7be74819c62094b97eb8c9e97069f52f5adae1 100644 (file)
@@ -1,4 +1,4 @@
-#include "payload.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-print.h"
 
index 920117d0c8fd3639ff76e3ea9d0a499daacc15c4..e3c2ad5c4f20b642f1fe1f8735bf3d043be13ae9 100644 (file)
@@ -1,4 +1,4 @@
-#include "payload.h"
+#include "fss_write.h"
 #include "private-common.h"
 #include "private-write.h"
 
index 3cad9dc0b5d7e328bf4db46928a0140e1804c252..79e81d7341ce22eb3e6eb633ddad89df4c9dddc6 100644 (file)
@@ -32,7 +32,7 @@ build_sources_library payload/fss_write.c payload/common.c payload/print.c paylo
 
 build_sources_program main/main.c
 
-build_sources_headers main/fss_write.h main/common.h main/print.h main/private-common.h main/private-write.h
+build_sources_headers main/main.h main/fss_write.h main/common.h main/print.h main/private-common.h main/private-write.h
 build_sources_headers basic/fss_write.h basic/common.h basic/print.h basic/private-common.h basic/private-write.h basic/private-print.h
 build_sources_headers basic_list/fss_write.h basic_list/common.h basic_list/print.h basic_list/private-common.h basic_list/private-write.h basic_list/private-print.h
 build_sources_headers embedded_list/fss_write.h embedded_list/common.h embedded_list/print.h embedded_list/private-common.h embedded_list/private-write.h embedded_list/private-print.h