]> Kevux Git Server - fll/commitdiff
Cleanup: Always have private-common.h and private-common.c for programs.
authorKevin Day <thekevinday@gmail.com>
Sat, 1 May 2021 22:31:49 +0000 (17:31 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 1 May 2021 22:31:49 +0000 (17:31 -0500)
I am now introducing a new standard practice of always having a private-common.h and private-common.c for programs.
The private data types shared across the program will be stored in these.
These will also provide any functions for allocating, deallocating, or otherwise managing those private structures.

This makes no effort to move over or implement any of the allocation/deallocation functions.

Individual programs will be updated on an as able basis to address this.

The Controller program already has this but it has a bit more than this practice.
The Controller program will see some structural cleanup in the future.

106 files changed:
level_3/byte_dump/c/byte_dump.c
level_3/byte_dump/c/private-byte_dump.c
level_3/byte_dump/c/private-byte_dump.h
level_3/byte_dump/c/private-common.c [new file with mode: 0644]
level_3/byte_dump/c/private-common.h [new file with mode: 0644]
level_3/byte_dump/data/build/settings
level_3/control/c/control.c
level_3/control/c/private-common.c [new file with mode: 0644]
level_3/control/c/private-common.h [new file with mode: 0644]
level_3/control/c/private-control.c
level_3/control/data/build/settings
level_3/fake/c/fake.c
level_3/fake/c/private-build.c
level_3/fake/c/private-build.h
level_3/fake/c/private-clean.c
level_3/fake/c/private-common.c [new file with mode: 0644]
level_3/fake/c/private-common.h [new file with mode: 0644]
level_3/fake/c/private-fake.c
level_3/fake/c/private-fake.h
level_3/fake/c/private-make.c
level_3/fake/c/private-make.h
level_3/fake/c/private-print.c
level_3/fake/c/private-skeleton.c
level_3/fake/c/private-skeleton.h
level_3/fake/data/build/settings
level_3/firewall/c/firewall.c
level_3/firewall/c/private-common.c [new file with mode: 0644]
level_3/firewall/c/private-common.h [new file with mode: 0644]
level_3/firewall/c/private-firewall.c
level_3/firewall/c/private-firewall.h
level_3/firewall/data/build/settings
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/private-common.c [new file with mode: 0644]
level_3/fss_basic_list_read/c/private-common.h [new file with mode: 0644]
level_3/fss_basic_list_read/c/private-fss_basic_list_read.c
level_3/fss_basic_list_read/c/private-fss_basic_list_read.h
level_3/fss_basic_list_read/data/build/settings
level_3/fss_basic_list_write/c/fss_basic_list_write.c
level_3/fss_basic_list_write/c/private-common.c [new file with mode: 0644]
level_3/fss_basic_list_write/c/private-common.h [new file with mode: 0644]
level_3/fss_basic_list_write/c/private-fss_basic_list_write.c
level_3/fss_basic_list_write/data/build/settings
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/private-common.c [new file with mode: 0644]
level_3/fss_basic_read/c/private-common.h [new file with mode: 0644]
level_3/fss_basic_read/c/private-fss_basic_read.c
level_3/fss_basic_read/c/private-fss_basic_read.h
level_3/fss_basic_read/data/build/settings
level_3/fss_basic_write/c/fss_basic_write.c
level_3/fss_basic_write/c/private-common.c [new file with mode: 0644]
level_3/fss_basic_write/c/private-common.h [new file with mode: 0644]
level_3/fss_basic_write/c/private-fss_basic_write.c
level_3/fss_basic_write/data/build/settings
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_read/c/private-common.c [new file with mode: 0644]
level_3/fss_embedded_list_read/c/private-common.h [new file with mode: 0644]
level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c
level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h
level_3/fss_embedded_list_read/data/build/settings
level_3/fss_embedded_list_write/c/fss_embedded_list_write.c
level_3/fss_embedded_list_write/c/private-common.c [new file with mode: 0644]
level_3/fss_embedded_list_write/c/private-common.h [new file with mode: 0644]
level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c
level_3/fss_embedded_list_write/data/build/settings
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/private-common.c [new file with mode: 0644]
level_3/fss_extended_list_read/c/private-common.h [new file with mode: 0644]
level_3/fss_extended_list_read/c/private-fss_extended_list_read.c
level_3/fss_extended_list_read/c/private-fss_extended_list_read.h
level_3/fss_extended_list_read/data/build/settings
level_3/fss_extended_list_write/c/fss_extended_list_write.c
level_3/fss_extended_list_write/c/private-common.c [new file with mode: 0644]
level_3/fss_extended_list_write/c/private-common.h [new file with mode: 0644]
level_3/fss_extended_list_write/c/private-fss_extended_list_write.c
level_3/fss_extended_list_write/data/build/settings
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/private-common.c [new file with mode: 0644]
level_3/fss_extended_read/c/private-common.h [new file with mode: 0644]
level_3/fss_extended_read/c/private-fss_extended_read.c
level_3/fss_extended_read/c/private-fss_extended_read.h
level_3/fss_extended_read/data/build/settings
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_extended_write/c/private-common.c [new file with mode: 0644]
level_3/fss_extended_write/c/private-common.h [new file with mode: 0644]
level_3/fss_extended_write/c/private-fss_extended_write.c
level_3/fss_extended_write/data/build/settings
level_3/fss_status_code/c/fss_status_code.c
level_3/fss_status_code/c/private-common.c [new file with mode: 0644]
level_3/fss_status_code/c/private-common.h [new file with mode: 0644]
level_3/fss_status_code/c/private-fss_status_code.c
level_3/fss_status_code/data/build/settings
level_3/iki_read/c/iki_read.c
level_3/iki_read/c/private-common.c [new file with mode: 0644]
level_3/iki_read/c/private-common.h [new file with mode: 0644]
level_3/iki_read/c/private-iki_read.c
level_3/iki_read/data/build/settings
level_3/iki_write/c/iki_write.c
level_3/iki_write/c/private-common.c [new file with mode: 0644]
level_3/iki_write/c/private-common.h [new file with mode: 0644]
level_3/iki_write/c/private-iki_write.c
level_3/iki_write/data/build/settings
level_3/status_code/c/private-common.c [new file with mode: 0644]
level_3/status_code/c/private-common.h [new file with mode: 0644]
level_3/status_code/c/private-status_code.c
level_3/status_code/c/status_code.c
level_3/status_code/data/build/settings

index c12ccdcf10f30db80f2ef6a4d4716fa2f8e12b03..e41fceebb004e23d3128d2c7332d46f60a8c3b8b 100644 (file)
@@ -1,4 +1,5 @@
 #include "byte_dump.h"
+#include "private-common.h"
 #include "private-byte_dump.h"
 
 #ifdef __cplusplus
index 130df38e5a5967cf2492debe910ad4ba10ef638f..53eda39edbb73199b59e2342648f5b2ae6882296 100644 (file)
@@ -1,4 +1,5 @@
 #include "byte_dump.h"
+#include "private-common.h"
 #include "private-byte_dump.h"
 
 #ifdef __cplusplus
index 982bd52b01f4b8e623ba175abecc8afbcd1d54ce..9fb714a631320c294d681cb682df9c5e2b140ef3 100644 (file)
@@ -13,49 +13,6 @@ extern "C" {
 #endif
 
 /**
- * A main structure for character row and column position (cell).
- *
- * column: The column position associated with the character cell.
- * row:    The row position associated with the character cell.
- */
-#ifndef _di_byte_dump_cell_t_
-  typedef struct {
-    uint8_t  column;
-    uint64_t row;
-  } byte_dump_cell_t;
-
-  #define byte_dump_cell_t_initialize \
-    { \
-      0, \
-      0, \
-    }
-#endif // _di_byte_dump_cell_t_
-
-/**
- * A main structure for character main that overflowed from a previous line.
- *
- * UTF-8 Characters bytes may overflow beyond the main.width.
- * These overflowed bytes should still have placeholders printed in the next text-mode print.
- *
- * bytes: The number of previous bytes that overflowed from the previous line.
- *        This is used to print the placeholders for the "text" option.
- * invalid: The specific invalid value provided representing the overflowed bytes.
- *          This is used to print the placeholders.
- */
-#ifndef _di_byte_dump_previous_t_
-  typedef struct {
-    uint8_t bytes;
-    uint8_t invalid;
-  } byte_dump_previous_t;
-
-  #define byte_dump_previous_t_initialize \
-    { \
-      0, \
-      0, \
-    }
-#endif // _di_byte_previous_cell_
-
-/**
  * Dump the contents of the file to standard out.
  *
  * @param main
diff --git a/level_3/byte_dump/c/private-common.c b/level_3/byte_dump/c/private-common.c
new file mode 100644 (file)
index 0000000..820be90
--- /dev/null
@@ -0,0 +1,10 @@
+#include "byte_dump.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/byte_dump/c/private-common.h b/level_3/byte_dump/c/private-common.h
new file mode 100644 (file)
index 0000000..6604c7e
--- /dev/null
@@ -0,0 +1,62 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Byte Dump
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A main structure for character row and column position (cell).
+ *
+ * column: The column position associated with the character cell.
+ * row:    The row position associated with the character cell.
+ */
+#ifndef _di_byte_dump_cell_t_
+  typedef struct {
+    uint8_t  column;
+    uint64_t row;
+  } byte_dump_cell_t;
+
+  #define byte_dump_cell_t_initialize \
+    { \
+      0, \
+      0, \
+    }
+#endif // _di_byte_dump_cell_t_
+
+/**
+ * A main structure for character main that overflowed from a previous line.
+ *
+ * UTF-8 Characters bytes may overflow beyond the main.width.
+ * These overflowed bytes should still have placeholders printed in the next text-mode print.
+ *
+ * bytes: The number of previous bytes that overflowed from the previous line.
+ *        This is used to print the placeholders for the "text" option.
+ * invalid: The specific invalid value provided representing the overflowed bytes.
+ *          This is used to print the placeholders.
+ */
+#ifndef _di_byte_dump_previous_t_
+  typedef struct {
+    uint8_t bytes;
+    uint8_t invalid;
+  } byte_dump_previous_t;
+
+  #define byte_dump_previous_t_initialize \
+    { \
+      0, \
+      0, \
+    }
+#endif // _di_byte_previous_cell_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 29d514207fa155730e507fbac9095204d27924b4..32acc074e586071da4822a1d810281684799f2ad 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_program -lfl_console -lfl_conversion -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library byte_dump.c private-byte_dump.c
+build_sources_library byte_dump.c private-common.c private-byte_dump.c
 build_sources_program main.c
 build_sources_headers byte_dump.h
 build_sources_script
index a848a7478d5ba15c61e1bb196c6c94cc06cad08c..c73006f4e9eb44efd3158882813c1284ae60e543 100644 (file)
@@ -1,4 +1,5 @@
 #include "control.h"
+#include "private-common.h"
 #include "private-control.h"
 
 #ifdef __cplusplus
diff --git a/level_3/control/c/private-common.c b/level_3/control/c/private-common.c
new file mode 100644 (file)
index 0000000..d869788
--- /dev/null
@@ -0,0 +1,10 @@
+#include "control.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/control/c/private-common.h b/level_3/control/c/private-common.h
new file mode 100644 (file)
index 0000000..e69de29
index 60009467d47c03c530e9ac1ca2b06a515b737dc9..36996d8dc25967dee22764ac52055e66e56318d5 100644 (file)
@@ -1,2 +1,3 @@
 #include "control.h"
+#include "private-common.h"
 #include "private-control.h"
index 652563f78ce0153d012a233d05fb7ddcbf31102d..812d9abf0939252b234cb440c024ebb919505615 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_program -lfl_console -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library control.c private-control.c
+build_sources_library control.c private-common.c private-control.c
 build_sources_program main.c
 build_sources_headers control.h
 build_sources_script
index b5a78a50327478df261bc3224123b32fad11e247..1c4bdea4471d7c7b8011416733a1636d093dbbb4 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-clean.h"
index 8fc0e17d3a638aed49e9849c0fca2e67cf7602d4..89688520f8439a19147fc7da83f1024306520692 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-make.h"
index 077fabdf8c785f13f5be93e188c0e80149444537..97451318354197f7a955852c02fb720505899082 100644 (file)
 extern "C" {
 #endif
 
-#ifndef _di_fake_build_setting_t_
-  typedef struct {
-    uint8_t build_language;
-
-    uint8_t version_target;
-
-    bool build_script;
-    bool build_shared;
-    bool build_static;
-
-    bool path_standard;
-    bool path_headers_preserve;
-
-    bool search_exclusive;
-    bool search_shared;
-    bool search_static;
-
-    f_string_dynamic_t build_compiler;
-    f_string_dynamic_t build_indexer;
-    f_string_dynamic_t path_headers;
-    f_string_dynamic_t path_language;
-    f_string_dynamic_t path_library_script;
-    f_string_dynamic_t path_library_shared;
-    f_string_dynamic_t path_library_static;
-    f_string_dynamic_t path_program_script;
-    f_string_dynamic_t path_program_shared;
-    f_string_dynamic_t path_program_static;
-    f_string_dynamic_t path_sources;
-    f_string_dynamic_t process_post;
-    f_string_dynamic_t process_pre;
-    f_string_dynamic_t project_name;
-    f_string_dynamic_t version_major;
-    f_string_dynamic_t version_micro;
-    f_string_dynamic_t version_minor;
-
-    f_string_dynamics_t build_libraries;
-    f_string_dynamics_t build_sources_headers;
-    f_string_dynamics_t build_sources_library;
-    f_string_dynamics_t build_sources_program;
-    f_string_dynamics_t build_sources_setting;
-    f_string_dynamics_t build_sources_script;
-    f_string_dynamics_t defines_all;
-    f_string_dynamics_t defines_shared;
-    f_string_dynamics_t defines_static;
-    f_string_dynamics_t environment;
-    f_string_dynamics_t flags_all;
-    f_string_dynamics_t flags_library;
-    f_string_dynamics_t flags_program;
-    f_string_dynamics_t flags_shared;
-    f_string_dynamics_t flags_static;
-    f_string_dynamics_t modes;
-    f_string_dynamics_t modes_default;
-  } fake_build_setting_t;
-
-  #define fake_build_setting_t_initialize { \
-    0, \
-    0, \
-    F_true, \
-    F_true, \
-    F_true, \
-    F_true, \
-    F_true, \
-    F_true, \
-    F_true, \
-    F_true, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-  }
-
-  #define macro_fake_build_setting_t_delete_simple(setting) \
-    macro_f_string_dynamic_t_delete_simple(setting.build_compiler); \
-    macro_f_string_dynamic_t_delete_simple(setting.build_indexer); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_headers); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_language); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_library_script); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_library_shared); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_library_static); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_program_script); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_program_shared); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_program_static); \
-    macro_f_string_dynamic_t_delete_simple(setting.path_sources); \
-    macro_f_string_dynamic_t_delete_simple(setting.process_post); \
-    macro_f_string_dynamic_t_delete_simple(setting.process_pre); \
-    macro_f_string_dynamic_t_delete_simple(setting.project_name); \
-    macro_f_string_dynamic_t_delete_simple(setting.version_major); \
-    macro_f_string_dynamic_t_delete_simple(setting.version_micro); \
-    macro_f_string_dynamic_t_delete_simple(setting.version_minor); \
-    macro_f_string_dynamics_t_delete_simple(setting.build_libraries); \
-    macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers); \
-    macro_f_string_dynamics_t_delete_simple(setting.build_sources_library); \
-    macro_f_string_dynamics_t_delete_simple(setting.build_sources_program); \
-    macro_f_string_dynamics_t_delete_simple(setting.build_sources_setting); \
-    macro_f_string_dynamics_t_delete_simple(setting.build_sources_script); \
-    macro_f_string_dynamics_t_delete_simple(setting.defines_all); \
-    macro_f_string_dynamics_t_delete_simple(setting.defines_shared); \
-    macro_f_string_dynamics_t_delete_simple(setting.defines_static); \
-    macro_f_string_dynamics_t_delete_simple(setting.environment); \
-    macro_f_string_dynamics_t_delete_simple(setting.flags_all); \
-    macro_f_string_dynamics_t_delete_simple(setting.flags_library); \
-    macro_f_string_dynamics_t_delete_simple(setting.flags_program); \
-    macro_f_string_dynamics_t_delete_simple(setting.flags_shared); \
-    macro_f_string_dynamics_t_delete_simple(setting.flags_static); \
-    macro_f_string_dynamics_t_delete_simple(setting.modes); \
-    macro_f_string_dynamics_t_delete_simple(setting.modes_default);
-
-  #define fake_build_setting_name_build_compiler         "build_compiler"
-  #define fake_build_setting_name_build_language         "build_language"
-  #define fake_build_setting_name_build_libraries        "build_libraries"
-  #define fake_build_setting_name_build_indexer          "build_indexer"
-  #define fake_build_setting_name_build_script           "build_script"
-  #define fake_build_setting_name_build_shared           "build_shared"
-  #define fake_build_setting_name_build_sources_headers  "build_sources_headers"
-  #define fake_build_setting_name_build_sources_library  "build_sources_library"
-  #define fake_build_setting_name_build_sources_program  "build_sources_program"
-  #define fake_build_setting_name_build_sources_settings "build_sources_setting"
-  #define fake_build_setting_name_build_sources_script   "build_sources_script"
-  #define fake_build_setting_name_build_static           "build_static"
-  #define fake_build_setting_name_defines_all            "defines_all"
-  #define fake_build_setting_name_defines_shared         "defines_shared"
-  #define fake_build_setting_name_defines_static         "defines_static"
-  #define fake_build_setting_name_environment            "environment"
-  #define fake_build_setting_name_flags_all              "flags_all"
-  #define fake_build_setting_name_flags_library          "flags_library"
-  #define fake_build_setting_name_flags_program          "flags_program"
-  #define fake_build_setting_name_flags_shared           "flags_shared"
-  #define fake_build_setting_name_flags_static           "flags_static"
-  #define fake_build_setting_name_modes                  "modes"
-  #define fake_build_setting_name_modes_default          "modes_default"
-  #define fake_build_setting_name_path_headers           "path_headers"
-  #define fake_build_setting_name_path_headers_preserve  "path_headers_preserve"
-  #define fake_build_setting_name_path_language          "path_language"
-  #define fake_build_setting_name_path_library_script    "path_library_script"
-  #define fake_build_setting_name_path_library_shared    "path_library_shared"
-  #define fake_build_setting_name_path_library_static    "path_library_static"
-  #define fake_build_setting_name_path_program_script    "path_program_script"
-  #define fake_build_setting_name_path_program_shared    "path_program_shared"
-  #define fake_build_setting_name_path_program_static    "path_program_static"
-  #define fake_build_setting_name_path_sources           "path_sources"
-  #define fake_build_setting_name_path_standard          "path_standard"
-  #define fake_build_setting_name_process_post           "process_post"
-  #define fake_build_setting_name_process_pre            "process_pre"
-  #define fake_build_setting_name_project_name           "project_name"
-  #define fake_build_setting_name_search_exclusive       "search_exclusive"
-  #define fake_build_setting_name_search_shared          "search_shared"
-  #define fake_build_setting_name_search_static          "search_static"
-  #define fake_build_setting_name_version_major          "version_major"
-  #define fake_build_setting_name_version_micro          "version_micro"
-  #define fake_build_setting_name_version_minor          "version_minor"
-  #define fake_build_setting_name_version_target         "version_target"
-
-  #define fake_build_setting_name_build_compiler_length         14
-  #define fake_build_setting_name_build_language_length         14
-  #define fake_build_setting_name_build_libraries_length        15
-  #define fake_build_setting_name_build_indexer_length          13
-  #define fake_build_setting_name_build_script_length           12
-  #define fake_build_setting_name_build_shared_length           12
-  #define fake_build_setting_name_build_sources_headers_length  21
-  #define fake_build_setting_name_build_sources_library_length  21
-  #define fake_build_setting_name_build_sources_program_length  21
-  #define fake_build_setting_name_build_sources_settings_length 22
-  #define fake_build_setting_name_build_sources_script_length   20
-  #define fake_build_setting_name_build_static_length           12
-  #define fake_build_setting_name_environment_length            11
-  #define fake_build_setting_name_defines_all_length            11
-  #define fake_build_setting_name_defines_shared_length         14
-  #define fake_build_setting_name_defines_static_length         14
-  #define fake_build_setting_name_flags_all_length              9
-  #define fake_build_setting_name_flags_library_length          13
-  #define fake_build_setting_name_flags_program_length          13
-  #define fake_build_setting_name_flags_shared_length           12
-  #define fake_build_setting_name_flags_static_length           12
-  #define fake_build_setting_name_modes_length                  5
-  #define fake_build_setting_name_modes_default_length          13
-  #define fake_build_setting_name_path_headers_length           12
-  #define fake_build_setting_name_path_headers_preserve_length  21
-  #define fake_build_setting_name_path_language_length          13
-  #define fake_build_setting_name_path_library_script_length    19
-  #define fake_build_setting_name_path_library_shared_length    19
-  #define fake_build_setting_name_path_library_static_length    19
-  #define fake_build_setting_name_path_program_script_length    19
-  #define fake_build_setting_name_path_program_shared_length    19
-  #define fake_build_setting_name_path_program_static_length    19
-  #define fake_build_setting_name_path_sources_length           12
-  #define fake_build_setting_name_path_standard_length          13
-  #define fake_build_setting_name_process_post_length           12
-  #define fake_build_setting_name_process_pre_length            11
-  #define fake_build_setting_name_project_name_length           12
-  #define fake_build_setting_name_search_exclusive_length       16
-  #define fake_build_setting_name_search_shared_length          13
-  #define fake_build_setting_name_search_static_length          13
-  #define fake_build_setting_name_version_major_length          13
-  #define fake_build_setting_name_version_micro_length          13
-  #define fake_build_setting_name_version_minor_length          13
-  #define fake_build_setting_name_version_target_length         14
-
-  #define fake_build_setting_total 44
-
-  #define fake_build_setting_default_version "0"
-
-  #define fake_build_setting_default_version_length 1
-#endif // _di_fake_build_setting_t_
-
-#ifndef _di_fake_build_stage_t_
-  typedef struct {
-    f_string_dynamic_t file_libraries_script;
-    f_string_dynamic_t file_libraries_shared;
-    f_string_dynamic_t file_libraries_static;
-    f_string_dynamic_t file_objects_static;
-    f_string_dynamic_t file_process_post;
-    f_string_dynamic_t file_process_pre;
-    f_string_dynamic_t file_programs_script;
-    f_string_dynamic_t file_programs_shared;
-    f_string_dynamic_t file_programs_static;
-    f_string_dynamic_t file_skeleton;
-    f_string_dynamic_t file_sources_headers;
-    f_string_dynamic_t file_sources_script;
-    f_string_dynamic_t file_sources_settings;
-  } fake_build_stage_t;
-
-  #define fake_build_stage_t_initialize { \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-  }
-
-  #define fake_build_stage_total 13
-
-  #define macro_fake_build_stage_t_delete_simple(stage) \
-    macro_f_string_dynamic_t_delete_simple(stage.file_libraries_script); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_libraries_shared); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_libraries_static); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_objects_static); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_process_post); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_process_pre); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_programs_script); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_programs_shared); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_programs_static); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_skeleton); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_sources_headers); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_sources_script); \
-    macro_f_string_dynamic_t_delete_simple(stage.file_sources_settings);
-
-  #define fake_build_stage_built            ".built"
-  #define fake_build_stage_libraries_script "libraries_script"
-  #define fake_build_stage_libraries_shared "libraries_shared"
-  #define fake_build_stage_libraries_static "libraries_static"
-  #define fake_build_stage_objects_static   "objects_static"
-  #define fake_build_stage_process_post     "process_post"
-  #define fake_build_stage_process_pre      "process_pre"
-  #define fake_build_stage_programs_script  "programs_script"
-  #define fake_build_stage_programs_shared  "programs_shared"
-  #define fake_build_stage_programs_static  "programs_static"
-  #define fake_build_stage_separate         "-"
-  #define fake_build_stage_skeleton         "skeleton"
-  #define fake_build_stage_sources_headers  "sources_headers"
-  #define fake_build_stage_sources_script   "sources_script"
-  #define fake_build_stage_sources_settings "sources_settings"
-
-  #define fake_build_stage_built_length            6
-  #define fake_build_stage_libraries_script_length 16
-  #define fake_build_stage_libraries_shared_length 16
-  #define fake_build_stage_libraries_static_length 16
-  #define fake_build_stage_objects_static_length   14
-  #define fake_build_stage_process_post_length     12
-  #define fake_build_stage_process_pre_length      11
-  #define fake_build_stage_programs_script_length  15
-  #define fake_build_stage_programs_shared_length  15
-  #define fake_build_stage_programs_static_length  15
-  #define fake_build_stage_separate_length         1
-  #define fake_build_stage_skeleton_length         8
-  #define fake_build_stage_sources_headers_length  15
-  #define fake_build_stage_sources_script_length   14
-  #define fake_build_stage_sources_settings_length 16
-#endif // _di_fake_build_stage_t_
-
-#ifndef _di_fake_build_data_t_
-  typedef struct {
-    fake_build_setting_t setting;
-    f_string_maps_t environment;
-  } fake_build_data_t;
-
-  #define fake_build_data_t_initialize { \
-    fake_build_setting_t_initialize, \
-    f_string_maps_t_initialize, \
-  }
-
-  #define macro_fake_build_main_delete_simple(build) \
-    macro_fake_build_setting_t_delete_simple(build.setting) \
-    macro_f_string_maps_t_delete_simple(build.environment);
-#endif // _di_fake_build_data_t_
-
-#ifndef _di_fake_build_parameter_
-  #define fake_build_parameter_library_include            "-I"
-  #define fake_build_parameter_library_link_file          "-l"
-  #define fake_build_parameter_library_link_path          "-L"
-  #define fake_build_parameter_library_name_prefix        "lib"
-  #define fake_build_parameter_library_name_suffix_shared ".so"
-  #define fake_build_parameter_library_name_suffix_static ".a"
-  #define fake_build_parameter_library_output             "-o"
-  #define fake_build_parameter_library_separator          "."
-  #define fake_build_parameter_library_shared             "-shared"
-  #define fake_build_parameter_library_static             "-static"
-  #define fake_build_parameter_library_shared_prefix      "-Wl,-soname,"
-
-  #define fake_build_parameter_library_include_length            2
-  #define fake_build_parameter_library_link_file_length          2
-  #define fake_build_parameter_library_link_path_length          2
-  #define fake_build_parameter_library_name_prefix_length        3
-  #define fake_build_parameter_library_name_suffix_shared_length 3
-  #define fake_build_parameter_library_name_suffix_static_length 2
-  #define fake_build_parameter_library_output_length             2
-  #define fake_build_parameter_library_separator_length          1
-  #define fake_build_parameter_library_shared_length             7
-  #define fake_build_parameter_library_static_length             7
-  #define fake_build_parameter_library_shared_prefix_length      12
-
-  #define fake_build_parameter_object_compile     "-c"
-  #define fake_build_parameter_object_name_suffix ".o"
-  #define fake_build_parameter_object_output      "-o"
-  #define fake_build_parameter_object_static      "-static"
-
-  #define fake_build_parameter_object_compile_length     2
-  #define fake_build_parameter_object_name_suffix_length 2
-  #define fake_build_parameter_object_output_length      2
-  #define fake_build_parameter_object_static_length      7
-
-  #define fake_build_parameter_object_link_arguments "rcs"
-
-  #define fake_build_parameter_object_link_arguments_length 3
-#endif // _di_fake_build_parameter_
-
 /**
  * Add the standard arguments for building a library/program.
  *
index e04bd68f2d8542da48b9d8b350ebe10e061eaa3e..c002ce97352d49316cc6d35cefb21998753ac088 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-clean.h"
diff --git a/level_3/fake/c/private-common.c b/level_3/fake/c/private-common.c
new file mode 100644 (file)
index 0000000..1d7722e
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fake.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/private-common.h
new file mode 100644 (file)
index 0000000..3dd5aba
--- /dev/null
@@ -0,0 +1,794 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Featureless Make
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fake_build_setting_t_
+  typedef struct {
+    uint8_t build_language;
+
+    uint8_t version_target;
+
+    bool build_script;
+    bool build_shared;
+    bool build_static;
+
+    bool path_standard;
+    bool path_headers_preserve;
+
+    bool search_exclusive;
+    bool search_shared;
+    bool search_static;
+
+    f_string_dynamic_t build_compiler;
+    f_string_dynamic_t build_indexer;
+    f_string_dynamic_t path_headers;
+    f_string_dynamic_t path_language;
+    f_string_dynamic_t path_library_script;
+    f_string_dynamic_t path_library_shared;
+    f_string_dynamic_t path_library_static;
+    f_string_dynamic_t path_program_script;
+    f_string_dynamic_t path_program_shared;
+    f_string_dynamic_t path_program_static;
+    f_string_dynamic_t path_sources;
+    f_string_dynamic_t process_post;
+    f_string_dynamic_t process_pre;
+    f_string_dynamic_t project_name;
+    f_string_dynamic_t version_major;
+    f_string_dynamic_t version_micro;
+    f_string_dynamic_t version_minor;
+
+    f_string_dynamics_t build_libraries;
+    f_string_dynamics_t build_sources_headers;
+    f_string_dynamics_t build_sources_library;
+    f_string_dynamics_t build_sources_program;
+    f_string_dynamics_t build_sources_setting;
+    f_string_dynamics_t build_sources_script;
+    f_string_dynamics_t defines_all;
+    f_string_dynamics_t defines_shared;
+    f_string_dynamics_t defines_static;
+    f_string_dynamics_t environment;
+    f_string_dynamics_t flags_all;
+    f_string_dynamics_t flags_library;
+    f_string_dynamics_t flags_program;
+    f_string_dynamics_t flags_shared;
+    f_string_dynamics_t flags_static;
+    f_string_dynamics_t modes;
+    f_string_dynamics_t modes_default;
+  } fake_build_setting_t;
+
+  #define fake_build_setting_t_initialize { \
+    0, \
+    0, \
+    F_true, \
+    F_true, \
+    F_true, \
+    F_true, \
+    F_true, \
+    F_true, \
+    F_true, \
+    F_true, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+  }
+
+  #define macro_fake_build_setting_t_delete_simple(setting) \
+    macro_f_string_dynamic_t_delete_simple(setting.build_compiler); \
+    macro_f_string_dynamic_t_delete_simple(setting.build_indexer); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_headers); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_language); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_library_script); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_library_shared); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_library_static); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_program_script); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_program_shared); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_program_static); \
+    macro_f_string_dynamic_t_delete_simple(setting.path_sources); \
+    macro_f_string_dynamic_t_delete_simple(setting.process_post); \
+    macro_f_string_dynamic_t_delete_simple(setting.process_pre); \
+    macro_f_string_dynamic_t_delete_simple(setting.project_name); \
+    macro_f_string_dynamic_t_delete_simple(setting.version_major); \
+    macro_f_string_dynamic_t_delete_simple(setting.version_micro); \
+    macro_f_string_dynamic_t_delete_simple(setting.version_minor); \
+    macro_f_string_dynamics_t_delete_simple(setting.build_libraries); \
+    macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers); \
+    macro_f_string_dynamics_t_delete_simple(setting.build_sources_library); \
+    macro_f_string_dynamics_t_delete_simple(setting.build_sources_program); \
+    macro_f_string_dynamics_t_delete_simple(setting.build_sources_setting); \
+    macro_f_string_dynamics_t_delete_simple(setting.build_sources_script); \
+    macro_f_string_dynamics_t_delete_simple(setting.defines_all); \
+    macro_f_string_dynamics_t_delete_simple(setting.defines_shared); \
+    macro_f_string_dynamics_t_delete_simple(setting.defines_static); \
+    macro_f_string_dynamics_t_delete_simple(setting.environment); \
+    macro_f_string_dynamics_t_delete_simple(setting.flags_all); \
+    macro_f_string_dynamics_t_delete_simple(setting.flags_library); \
+    macro_f_string_dynamics_t_delete_simple(setting.flags_program); \
+    macro_f_string_dynamics_t_delete_simple(setting.flags_shared); \
+    macro_f_string_dynamics_t_delete_simple(setting.flags_static); \
+    macro_f_string_dynamics_t_delete_simple(setting.modes); \
+    macro_f_string_dynamics_t_delete_simple(setting.modes_default);
+
+  #define fake_build_setting_name_build_compiler         "build_compiler"
+  #define fake_build_setting_name_build_language         "build_language"
+  #define fake_build_setting_name_build_libraries        "build_libraries"
+  #define fake_build_setting_name_build_indexer          "build_indexer"
+  #define fake_build_setting_name_build_script           "build_script"
+  #define fake_build_setting_name_build_shared           "build_shared"
+  #define fake_build_setting_name_build_sources_headers  "build_sources_headers"
+  #define fake_build_setting_name_build_sources_library  "build_sources_library"
+  #define fake_build_setting_name_build_sources_program  "build_sources_program"
+  #define fake_build_setting_name_build_sources_settings "build_sources_setting"
+  #define fake_build_setting_name_build_sources_script   "build_sources_script"
+  #define fake_build_setting_name_build_static           "build_static"
+  #define fake_build_setting_name_defines_all            "defines_all"
+  #define fake_build_setting_name_defines_shared         "defines_shared"
+  #define fake_build_setting_name_defines_static         "defines_static"
+  #define fake_build_setting_name_environment            "environment"
+  #define fake_build_setting_name_flags_all              "flags_all"
+  #define fake_build_setting_name_flags_library          "flags_library"
+  #define fake_build_setting_name_flags_program          "flags_program"
+  #define fake_build_setting_name_flags_shared           "flags_shared"
+  #define fake_build_setting_name_flags_static           "flags_static"
+  #define fake_build_setting_name_modes                  "modes"
+  #define fake_build_setting_name_modes_default          "modes_default"
+  #define fake_build_setting_name_path_headers           "path_headers"
+  #define fake_build_setting_name_path_headers_preserve  "path_headers_preserve"
+  #define fake_build_setting_name_path_language          "path_language"
+  #define fake_build_setting_name_path_library_script    "path_library_script"
+  #define fake_build_setting_name_path_library_shared    "path_library_shared"
+  #define fake_build_setting_name_path_library_static    "path_library_static"
+  #define fake_build_setting_name_path_program_script    "path_program_script"
+  #define fake_build_setting_name_path_program_shared    "path_program_shared"
+  #define fake_build_setting_name_path_program_static    "path_program_static"
+  #define fake_build_setting_name_path_sources           "path_sources"
+  #define fake_build_setting_name_path_standard          "path_standard"
+  #define fake_build_setting_name_process_post           "process_post"
+  #define fake_build_setting_name_process_pre            "process_pre"
+  #define fake_build_setting_name_project_name           "project_name"
+  #define fake_build_setting_name_search_exclusive       "search_exclusive"
+  #define fake_build_setting_name_search_shared          "search_shared"
+  #define fake_build_setting_name_search_static          "search_static"
+  #define fake_build_setting_name_version_major          "version_major"
+  #define fake_build_setting_name_version_micro          "version_micro"
+  #define fake_build_setting_name_version_minor          "version_minor"
+  #define fake_build_setting_name_version_target         "version_target"
+
+  #define fake_build_setting_name_build_compiler_length         14
+  #define fake_build_setting_name_build_language_length         14
+  #define fake_build_setting_name_build_libraries_length        15
+  #define fake_build_setting_name_build_indexer_length          13
+  #define fake_build_setting_name_build_script_length           12
+  #define fake_build_setting_name_build_shared_length           12
+  #define fake_build_setting_name_build_sources_headers_length  21
+  #define fake_build_setting_name_build_sources_library_length  21
+  #define fake_build_setting_name_build_sources_program_length  21
+  #define fake_build_setting_name_build_sources_settings_length 22
+  #define fake_build_setting_name_build_sources_script_length   20
+  #define fake_build_setting_name_build_static_length           12
+  #define fake_build_setting_name_environment_length            11
+  #define fake_build_setting_name_defines_all_length            11
+  #define fake_build_setting_name_defines_shared_length         14
+  #define fake_build_setting_name_defines_static_length         14
+  #define fake_build_setting_name_flags_all_length              9
+  #define fake_build_setting_name_flags_library_length          13
+  #define fake_build_setting_name_flags_program_length          13
+  #define fake_build_setting_name_flags_shared_length           12
+  #define fake_build_setting_name_flags_static_length           12
+  #define fake_build_setting_name_modes_length                  5
+  #define fake_build_setting_name_modes_default_length          13
+  #define fake_build_setting_name_path_headers_length           12
+  #define fake_build_setting_name_path_headers_preserve_length  21
+  #define fake_build_setting_name_path_language_length          13
+  #define fake_build_setting_name_path_library_script_length    19
+  #define fake_build_setting_name_path_library_shared_length    19
+  #define fake_build_setting_name_path_library_static_length    19
+  #define fake_build_setting_name_path_program_script_length    19
+  #define fake_build_setting_name_path_program_shared_length    19
+  #define fake_build_setting_name_path_program_static_length    19
+  #define fake_build_setting_name_path_sources_length           12
+  #define fake_build_setting_name_path_standard_length          13
+  #define fake_build_setting_name_process_post_length           12
+  #define fake_build_setting_name_process_pre_length            11
+  #define fake_build_setting_name_project_name_length           12
+  #define fake_build_setting_name_search_exclusive_length       16
+  #define fake_build_setting_name_search_shared_length          13
+  #define fake_build_setting_name_search_static_length          13
+  #define fake_build_setting_name_version_major_length          13
+  #define fake_build_setting_name_version_micro_length          13
+  #define fake_build_setting_name_version_minor_length          13
+  #define fake_build_setting_name_version_target_length         14
+
+  #define fake_build_setting_total 44
+
+  #define fake_build_setting_default_version "0"
+
+  #define fake_build_setting_default_version_length 1
+#endif // _di_fake_build_setting_t_
+
+#ifndef _di_fake_build_stage_t_
+  typedef struct {
+    f_string_dynamic_t file_libraries_script;
+    f_string_dynamic_t file_libraries_shared;
+    f_string_dynamic_t file_libraries_static;
+    f_string_dynamic_t file_objects_static;
+    f_string_dynamic_t file_process_post;
+    f_string_dynamic_t file_process_pre;
+    f_string_dynamic_t file_programs_script;
+    f_string_dynamic_t file_programs_shared;
+    f_string_dynamic_t file_programs_static;
+    f_string_dynamic_t file_skeleton;
+    f_string_dynamic_t file_sources_headers;
+    f_string_dynamic_t file_sources_script;
+    f_string_dynamic_t file_sources_settings;
+  } fake_build_stage_t;
+
+  #define fake_build_stage_t_initialize { \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+  }
+
+  #define fake_build_stage_total 13
+
+  #define macro_fake_build_stage_t_delete_simple(stage) \
+    macro_f_string_dynamic_t_delete_simple(stage.file_libraries_script); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_libraries_shared); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_libraries_static); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_objects_static); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_process_post); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_process_pre); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_programs_script); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_programs_shared); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_programs_static); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_skeleton); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_sources_headers); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_sources_script); \
+    macro_f_string_dynamic_t_delete_simple(stage.file_sources_settings);
+
+  #define fake_build_stage_built            ".built"
+  #define fake_build_stage_libraries_script "libraries_script"
+  #define fake_build_stage_libraries_shared "libraries_shared"
+  #define fake_build_stage_libraries_static "libraries_static"
+  #define fake_build_stage_objects_static   "objects_static"
+  #define fake_build_stage_process_post     "process_post"
+  #define fake_build_stage_process_pre      "process_pre"
+  #define fake_build_stage_programs_script  "programs_script"
+  #define fake_build_stage_programs_shared  "programs_shared"
+  #define fake_build_stage_programs_static  "programs_static"
+  #define fake_build_stage_separate         "-"
+  #define fake_build_stage_skeleton         "skeleton"
+  #define fake_build_stage_sources_headers  "sources_headers"
+  #define fake_build_stage_sources_script   "sources_script"
+  #define fake_build_stage_sources_settings "sources_settings"
+
+  #define fake_build_stage_built_length            6
+  #define fake_build_stage_libraries_script_length 16
+  #define fake_build_stage_libraries_shared_length 16
+  #define fake_build_stage_libraries_static_length 16
+  #define fake_build_stage_objects_static_length   14
+  #define fake_build_stage_process_post_length     12
+  #define fake_build_stage_process_pre_length      11
+  #define fake_build_stage_programs_script_length  15
+  #define fake_build_stage_programs_shared_length  15
+  #define fake_build_stage_programs_static_length  15
+  #define fake_build_stage_separate_length         1
+  #define fake_build_stage_skeleton_length         8
+  #define fake_build_stage_sources_headers_length  15
+  #define fake_build_stage_sources_script_length   14
+  #define fake_build_stage_sources_settings_length 16
+#endif // _di_fake_build_stage_t_
+
+#ifndef _di_fake_build_data_t_
+  typedef struct {
+    fake_build_setting_t setting;
+    f_string_maps_t environment;
+  } fake_build_data_t;
+
+  #define fake_build_data_t_initialize { \
+    fake_build_setting_t_initialize, \
+    f_string_maps_t_initialize, \
+  }
+
+  #define macro_fake_build_main_delete_simple(build) \
+    macro_fake_build_setting_t_delete_simple(build.setting) \
+    macro_f_string_maps_t_delete_simple(build.environment);
+#endif // _di_fake_build_data_t_
+
+#ifndef _di_fake_build_parameter_
+  #define fake_build_parameter_library_include            "-I"
+  #define fake_build_parameter_library_link_file          "-l"
+  #define fake_build_parameter_library_link_path          "-L"
+  #define fake_build_parameter_library_name_prefix        "lib"
+  #define fake_build_parameter_library_name_suffix_shared ".so"
+  #define fake_build_parameter_library_name_suffix_static ".a"
+  #define fake_build_parameter_library_output             "-o"
+  #define fake_build_parameter_library_separator          "."
+  #define fake_build_parameter_library_shared             "-shared"
+  #define fake_build_parameter_library_static             "-static"
+  #define fake_build_parameter_library_shared_prefix      "-Wl,-soname,"
+
+  #define fake_build_parameter_library_include_length            2
+  #define fake_build_parameter_library_link_file_length          2
+  #define fake_build_parameter_library_link_path_length          2
+  #define fake_build_parameter_library_name_prefix_length        3
+  #define fake_build_parameter_library_name_suffix_shared_length 3
+  #define fake_build_parameter_library_name_suffix_static_length 2
+  #define fake_build_parameter_library_output_length             2
+  #define fake_build_parameter_library_separator_length          1
+  #define fake_build_parameter_library_shared_length             7
+  #define fake_build_parameter_library_static_length             7
+  #define fake_build_parameter_library_shared_prefix_length      12
+
+  #define fake_build_parameter_object_compile     "-c"
+  #define fake_build_parameter_object_name_suffix ".o"
+  #define fake_build_parameter_object_output      "-o"
+  #define fake_build_parameter_object_static      "-static"
+
+  #define fake_build_parameter_object_compile_length     2
+  #define fake_build_parameter_object_name_suffix_length 2
+  #define fake_build_parameter_object_output_length      2
+  #define fake_build_parameter_object_static_length      7
+
+  #define fake_build_parameter_object_link_arguments "rcs"
+
+  #define fake_build_parameter_object_link_arguments_length 3
+#endif // _di_fake_build_parameter_
+
+#ifndef _di_fake_common_
+  #define fake_common_initial_buffer_max 131072 // 128k max default initial buffer size.
+
+  #define fake_common_setting_bool_yes "yes"
+  #define fake_common_setting_bool_no  "no"
+
+  #define fake_common_setting_bool_yes_length 3
+  #define fake_common_setting_bool_no_length  2
+#endif // _di_fake_common_
+
+#ifndef _di_fake_make_section_
+  #define fake_make_section_main     "main"
+  #define fake_make_section_settings "settings"
+
+  #define fake_make_section_main_length     4
+  #define fake_make_section_settings_length 8
+
+  #define fake_make_section_stack_max 8192 // maximum stack call depth.
+#endif // _di_fake_make_section_
+
+#ifndef _di_fake_make_setting_t_
+  typedef struct {
+    bool load_build;
+
+    uint8_t fail;
+
+    f_string_map_multis_t parameter;
+  } fake_make_setting_t;
+
+  #define fake_make_setting_t_initialize { \
+    0, \
+    0, \
+    f_string_map_multis_t_initialize, \
+  }
+
+  #define macro_fake_make_setting_t_delete_simple(setting) \
+    macro_f_string_map_multis_t_delete_simple(setting.parameter)
+
+  #define fake_make_setting_compiler    "compiler"
+  #define fake_make_setting_define      "define"
+  #define fake_make_setting_environment "environment"
+  #define fake_make_setting_fail        "fail"
+  #define fake_make_setting_linker      "linker"
+  #define fake_make_setting_load_build  "load_build"
+  #define fake_make_setting_parameter   "parameter"
+  #define fake_make_setting_return      "return"
+
+  #define fake_make_setting_compiler_length    8
+  #define fake_make_setting_define_length      6
+  #define fake_make_setting_environment_length 11
+  #define fake_make_setting_fail_length        4
+  #define fake_make_setting_linker_length      6
+  #define fake_make_setting_load_build_length  10
+  #define fake_make_setting_parameter_length   9
+  #define fake_make_setting_return_length      6
+#endif // _di_fake_make_setting_t_
+
+#ifndef _di_fake_make_operation_
+  #define fake_make_operation_break    "break"
+  #define fake_make_operation_build    "build"
+  #define fake_make_operation_clean    "clean"
+  #define fake_make_operation_clone    "clone"
+  #define fake_make_operation_compile  "compile"
+  #define fake_make_operation_copy     "copy"
+  #define fake_make_operation_define   "define"
+  #define fake_make_operation_delete   "delete"
+  #define fake_make_operation_deletes  "deletes"
+  #define fake_make_operation_else     "else"
+  #define fake_make_operation_exit     "exit"
+  #define fake_make_operation_fail     "fail"
+  #define fake_make_operation_group    "group"
+  #define fake_make_operation_groups   "groups"
+  #define fake_make_operation_if       "if"
+  #define fake_make_operation_index    "index"
+  #define fake_make_operation_link     "link"
+  #define fake_make_operation_mode     "mode"
+  #define fake_make_operation_modes    "modes"
+  #define fake_make_operation_move     "move"
+  #define fake_make_operation_operate  "operate"
+  #define fake_make_operation_owner    "owner"
+  #define fake_make_operation_owners   "owners"
+  #define fake_make_operation_pop      "pop"
+  #define fake_make_operation_print    "print"
+  #define fake_make_operation_run      "run"
+  #define fake_make_operation_shell    "shell"
+  #define fake_make_operation_skeleton "skeleton"
+  #define fake_make_operation_to       "to"
+  #define fake_make_operation_top      "top"
+  #define fake_make_operation_touch    "touch"
+
+  #define fake_make_operation_break_length    5
+  #define fake_make_operation_build_length    5
+  #define fake_make_operation_clean_length    5
+  #define fake_make_operation_clone_length    5
+  #define fake_make_operation_compile_length  7
+  #define fake_make_operation_copy_length     4
+  #define fake_make_operation_define_length   6
+  #define fake_make_operation_delete_length   6
+  #define fake_make_operation_deletes_length  7
+  #define fake_make_operation_else_length     4
+  #define fake_make_operation_exit_length     4
+  #define fake_make_operation_fail_length     4
+  #define fake_make_operation_group_length    5
+  #define fake_make_operation_groups_length   6
+  #define fake_make_operation_if_length       2
+  #define fake_make_operation_index_length    5
+  #define fake_make_operation_link_length     4
+  #define fake_make_operation_mode_length     4
+  #define fake_make_operation_modes_length    5
+  #define fake_make_operation_move_length     4
+  #define fake_make_operation_operate_length  7
+  #define fake_make_operation_owner_length    5
+  #define fake_make_operation_owners_length   6
+  #define fake_make_operation_pop_length      3
+  #define fake_make_operation_print_length    5
+  #define fake_make_operation_run_length      3
+  #define fake_make_operation_shell_length    5
+  #define fake_make_operation_skeleton_length 8
+  #define fake_make_operation_to_length       2
+  #define fake_make_operation_top_length      3
+  #define fake_make_operation_touch_length    5
+
+  enum {
+    fake_make_operation_type_break = 1,
+    fake_make_operation_type_build,
+    fake_make_operation_type_clean,
+    fake_make_operation_type_clone,
+    fake_make_operation_type_compile,
+    fake_make_operation_type_copy,
+    fake_make_operation_type_define,
+    fake_make_operation_type_delete,
+    fake_make_operation_type_deletes,
+    fake_make_operation_type_else,
+    fake_make_operation_type_exit,
+    fake_make_operation_type_fail,
+    fake_make_operation_type_group,
+    fake_make_operation_type_groups,
+    fake_make_operation_type_if,
+    fake_make_operation_type_index,
+    fake_make_operation_type_link,
+    fake_make_operation_type_mode,
+    fake_make_operation_type_modes,
+    fake_make_operation_type_move,
+    fake_make_operation_type_operate,
+    fake_make_operation_type_owner,
+    fake_make_operation_type_owners,
+    fake_make_operation_type_pop,
+    fake_make_operation_type_print,
+    fake_make_operation_type_run,
+    fake_make_operation_type_shell,
+    fake_make_operation_type_skeleton,
+    fake_make_operation_type_to,
+    fake_make_operation_type_top,
+    fake_make_operation_type_touch,
+  };
+
+  #define fake_make_operation_total 31
+
+  #define fake_make_operation_argument_environment "environment"
+  #define fake_make_operation_argument_failure     "failure"
+  #define fake_make_operation_argument_file        "file"
+  #define fake_make_operation_argument_directory   "directory"
+  #define fake_make_operation_argument_error       "error"
+  #define fake_make_operation_argument_exit        "exit"
+  #define fake_make_operation_argument_has         "has"
+  #define fake_make_operation_argument_ignore      "ignore"
+  #define fake_make_operation_argument_is          "is"
+  #define fake_make_operation_argument_parameter   "parameter"
+  #define fake_make_operation_argument_point       "point"
+  #define fake_make_operation_argument_recursive   "recursive"
+  #define fake_make_operation_argument_success     "success"
+  #define fake_make_operation_argument_target      "target"
+  #define fake_make_operation_argument_warn        "warn"
+
+  #define fake_make_operation_argument_environment_length 11
+  #define fake_make_operation_argument_failure_length     7
+  #define fake_make_operation_argument_file_length        4
+  #define fake_make_operation_argument_directory_length   9
+  #define fake_make_operation_argument_error_length       5
+  #define fake_make_operation_argument_exit_length        4
+  #define fake_make_operation_argument_has_length         3
+  #define fake_make_operation_argument_ignore_length      6
+  #define fake_make_operation_argument_is_length          2
+  #define fake_make_operation_argument_parameter_length   9
+  #define fake_make_operation_argument_point_length       5
+  #define fake_make_operation_argument_recursive_length   9
+  #define fake_make_operation_argument_success_length     7
+  #define fake_make_operation_argument_target_length      6
+  #define fake_make_operation_argument_warn_length        4
+
+  #define fake_make_operation_argument_if_defined       "defined"
+  #define fake_make_operation_argument_if_equal         "=="
+  #define fake_make_operation_argument_if_equal_not     "<>"
+  #define fake_make_operation_argument_if_exists        "exists"
+  #define fake_make_operation_argument_if_failure       "failure"
+  #define fake_make_operation_argument_if_greater       ">"
+  #define fake_make_operation_argument_if_greater_equal ">="
+  #define fake_make_operation_argument_if_group         "group"
+  #define fake_make_operation_argument_if_is            "is"
+  #define fake_make_operation_argument_if_is_for        "for"
+  #define fake_make_operation_argument_if_less          "<"
+  #define fake_make_operation_argument_if_less_equal    "<="
+  #define fake_make_operation_argument_if_mode          "mode"
+  #define fake_make_operation_argument_if_owner         "owner"
+  #define fake_make_operation_argument_if_success       "success"
+
+  #define fake_make_operation_argument_if_defined_length       7
+  #define fake_make_operation_argument_if_equal_length         2
+  #define fake_make_operation_argument_if_equal_not_length     2
+  #define fake_make_operation_argument_if_exists_length        6
+  #define fake_make_operation_argument_if_failure_length       7
+  #define fake_make_operation_argument_if_greater_length       1
+  #define fake_make_operation_argument_if_greater_equal_length 2
+  #define fake_make_operation_argument_if_group_length         5
+  #define fake_make_operation_argument_if_is_length            2
+  #define fake_make_operation_argument_if_is_for_length        3
+  #define fake_make_operation_argument_if_less_length          1
+  #define fake_make_operation_argument_if_less_equal_length    2
+  #define fake_make_operation_argument_if_mode_length          4
+  #define fake_make_operation_argument_if_owner_length         5
+  #define fake_make_operation_argument_if_success_length       7
+
+  enum {
+    fake_make_operation_if_type_else_false = 1,
+    fake_make_operation_if_type_else_false_next,
+    fake_make_operation_if_type_else_false_next_always,
+    fake_make_operation_if_type_else_true,
+    fake_make_operation_if_type_else_true_next,
+    fake_make_operation_if_type_false,
+    fake_make_operation_if_type_false_always,
+    fake_make_operation_if_type_false_always_next,
+    fake_make_operation_if_type_false_next,
+    fake_make_operation_if_type_if_defined,
+    fake_make_operation_if_type_if_equal,
+    fake_make_operation_if_type_if_equal_not,
+    fake_make_operation_if_type_if_exists,
+    fake_make_operation_if_type_if_failure,
+    fake_make_operation_if_type_if_greater,
+    fake_make_operation_if_type_if_greater_equal,
+    fake_make_operation_if_type_if_group,
+    fake_make_operation_if_type_if_is,
+    fake_make_operation_if_type_if_less,
+    fake_make_operation_if_type_if_less_equal,
+    fake_make_operation_if_type_if_mode,
+    fake_make_operation_if_type_if_owner,
+    fake_make_operation_if_type_if_success,
+    fake_make_operation_if_type_true,
+    fake_make_operation_if_type_true_next,
+  };
+
+  enum {
+    fake_make_operation_fail_type_exit = 1,
+    fake_make_operation_fail_type_warn,
+    fake_make_operation_fail_type_ignore,
+  };
+
+  #define fake_make_operation_recursion_depth_max 65535
+#endif // _di_fake_make_operation_
+
+#ifndef _di_fake_make_parameter_t_
+  #define fake_make_parameter_variable_build     "build"
+  #define fake_make_parameter_variable_color     "color"
+  #define fake_make_parameter_variable_data      "data"
+  #define fake_make_parameter_variable_define    "define"
+  #define fake_make_parameter_variable_fakefile  "fakefile"
+  #define fake_make_parameter_variable_mode      "mode"
+  #define fake_make_parameter_variable_process   "process"
+  #define fake_make_parameter_variable_return    "return"
+  #define fake_make_parameter_variable_settings  "settings"
+  #define fake_make_parameter_variable_sources   "sources"
+  #define fake_make_parameter_variable_verbosity "verbosity"
+  #define fake_make_parameter_variable_work      "work"
+
+  #define fake_make_parameter_variable_build_length     5
+  #define fake_make_parameter_variable_color_length     5
+  #define fake_make_parameter_variable_data_length      4
+  #define fake_make_parameter_variable_define_length    6
+  #define fake_make_parameter_variable_fakefile_length  8
+  #define fake_make_parameter_variable_mode_length      4
+  #define fake_make_parameter_variable_process_length   7
+  #define fake_make_parameter_variable_return_length    6
+  #define fake_make_parameter_variable_settings_length  8
+  #define fake_make_parameter_variable_sources_length   7
+  #define fake_make_parameter_variable_verbosity_length 9
+  #define fake_make_parameter_variable_work_length      4
+
+  typedef struct {
+    f_string_dynamics_t build;
+    f_string_dynamics_t color;
+    f_string_dynamics_t data;
+    f_string_dynamics_t define;
+    f_string_dynamics_t fakefile;
+    f_string_dynamics_t mode;
+    f_string_dynamics_t process;
+    f_string_dynamics_t settings;
+    f_string_dynamics_t sources;
+    f_string_dynamics_t verbosity;
+    f_string_dynamics_t work;
+  } fake_make_parameter_t;
+
+  #define fake_make_parameter_t_initialize { \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+    f_string_dynamics_t_initialize, \
+  }
+
+  #define macro_fake_make_parameter_delete_simple(parameter) \
+    macro_f_string_dynamics_t_delete_simple(parameter.build); \
+    macro_f_string_dynamics_t_delete_simple(parameter.color); \
+    macro_f_string_dynamics_t_delete_simple(parameter.data); \
+    macro_f_string_dynamics_t_delete_simple(parameter.define); \
+    macro_f_string_dynamics_t_delete_simple(parameter.fakefile); \
+    macro_f_string_dynamics_t_delete_simple(parameter.mode); \
+    macro_f_string_dynamics_t_delete_simple(parameter.process); \
+    macro_f_string_dynamics_t_delete_simple(parameter.settings); \
+    macro_f_string_dynamics_t_delete_simple(parameter.sources); \
+    macro_f_string_dynamics_t_delete_simple(parameter.verbosity); \
+    macro_f_string_dynamics_t_delete_simple(parameter.work);
+#endif // _di_fake_make_parameter_t_
+
+#ifndef _di_fake_make_path_t_
+  typedef struct {
+    f_file_t top;
+    f_file_t current;
+
+    f_string_dynamics_t stack;
+  } fake_make_path_t;
+
+  #define fake_make_path_t_initialize { \
+    f_file_t_initialize, \
+    f_file_t_initialize, \
+    f_string_dynamics_t_initialize, \
+  }
+
+  #define macro_fake_make_path_delete_simple(path) \
+    macro_f_string_dynamics_t_delete_simple(path.stack);
+#endif // _di_fake_make_path_t_
+
+#ifndef _di_fake_make_data_t_
+  typedef struct {
+    fake_build_setting_t setting_build;
+    fake_make_setting_t setting_make;
+
+    f_string_maps_t environment;
+
+    fake_make_parameter_t parameter;
+    fake_make_path_t path; // @todo review this, check if path.current is used anymore.
+
+    fll_error_print_t error;
+
+    f_fss_nameds_t fakefile;
+
+    f_string_dynamic_t buffer;
+    f_string_dynamic_t path_cache;
+
+    f_array_length_t main;
+  } fake_make_data_t;
+
+  #define fake_make_data_t_initialize { \
+    fake_build_setting_t_initialize, \
+    fake_make_setting_t_initialize, \
+    f_string_maps_t_initialize, \
+    fake_make_parameter_t_initialize, \
+    fake_make_path_t_initialize, \
+    fll_error_print_t_initialize, \
+    f_fss_nameds_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    f_string_dynamic_t_initialize, \
+    0, \
+  }
+
+  #define macro_fake_make_data_t_delete_simple(structure) \
+    macro_fake_build_setting_t_delete_simple(structure.setting_build) \
+    macro_fake_make_setting_t_delete_simple(structure.setting_make) \
+    macro_f_string_maps_t_delete_simple(structure.environment); \
+    macro_fake_make_parameter_delete_simple(structure.parameter) \
+    macro_fake_make_path_delete_simple(structure.path) \
+    macro_f_fss_nameds_t_delete_simple(structure.fakefile) \
+    macro_f_string_dynamic_t_delete_simple(structure.buffer); \
+    macro_f_string_dynamic_t_delete_simple(structure.path_cache);
+#endif // _di_fake_make_data_t_
+
+#ifndef _di_fake_skeleton_content_
+  #define fake_make_skeleton_content_defines      "# fss-0000\n\n"
+  #define fake_make_skeleton_content_dependencies "# fss-0000\n\n"
+  #define fake_make_skeleton_content_fakefile     "# fss-0005 iki-0002\n\nsettings:\n  fail exit\n\nmain:\n\n"
+  #define fake_make_skeleton_content_settings     "# fss-0001\n\n"
+
+  #define fake_make_skeleton_content_defines_length      12
+  #define fake_make_skeleton_content_dependencies_length 12
+  #define fake_make_skeleton_content_fakefile_length     51
+  #define fake_make_skeleton_content_settings_length     12
+#endif // _di_fake_skeleton_content_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 2f5d1b94648ba9ed0334cd88c157957d353a6fe8..c18d14ed05e6646142682817afcb44a5c18bd2ef 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-make.h"
index 4e7712486bff999277f697fb9d2b2931695930ba..e7f87b971bfdc4857516092f08e900015f64acc5 100644 (file)
 extern "C" {
 #endif
 
-#ifndef _di_fake_common_
-  #define fake_common_initial_buffer_max 131072 // 128k max default initial buffer size.
-
-  #define fake_common_setting_bool_yes "yes"
-  #define fake_common_setting_bool_no  "no"
-
-  #define fake_common_setting_bool_yes_length 3
-  #define fake_common_setting_bool_no_length  2
-#endif // _di_fake_common_
-
 /**
  * Execute the given command and arguments.
  *
index a9ee57a4e4d30c22db211b4516b69c383566bab9..b8a3f00b48d62bca594265f83257fd43f6e5a30c 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-clean.h"
index b9e92cbfd3a1cf78897f54dcf95dd0c2e0552e4d..0cbd5f671e79a95704110565d5e94bae2b9654e9 100644 (file)
 extern "C" {
 #endif
 
-#ifndef _di_fake_make_section_
-  #define fake_make_section_main     "main"
-  #define fake_make_section_settings "settings"
-
-  #define fake_make_section_main_length     4
-  #define fake_make_section_settings_length 8
-
-  #define fake_make_section_stack_max 8192 // maximum stack call depth.
-#endif // _di_fake_make_section_
-
-#ifndef _di_fake_make_setting_t_
-  typedef struct {
-    bool load_build;
-
-    uint8_t fail;
-
-    f_string_map_multis_t parameter;
-  } fake_make_setting_t;
-
-  #define fake_make_setting_t_initialize { \
-    0, \
-    0, \
-    f_string_map_multis_t_initialize, \
-  }
-
-  #define macro_fake_make_setting_t_delete_simple(setting) \
-    macro_f_string_map_multis_t_delete_simple(setting.parameter)
-
-  #define fake_make_setting_compiler    "compiler"
-  #define fake_make_setting_define      "define"
-  #define fake_make_setting_environment "environment"
-  #define fake_make_setting_fail        "fail"
-  #define fake_make_setting_linker      "linker"
-  #define fake_make_setting_load_build  "load_build"
-  #define fake_make_setting_parameter   "parameter"
-  #define fake_make_setting_return      "return"
-
-  #define fake_make_setting_compiler_length    8
-  #define fake_make_setting_define_length      6
-  #define fake_make_setting_environment_length 11
-  #define fake_make_setting_fail_length        4
-  #define fake_make_setting_linker_length      6
-  #define fake_make_setting_load_build_length  10
-  #define fake_make_setting_parameter_length   9
-  #define fake_make_setting_return_length      6
-#endif // _di_fake_make_setting_t_
-
-#ifndef _di_fake_make_operation_
-  #define fake_make_operation_break    "break"
-  #define fake_make_operation_build    "build"
-  #define fake_make_operation_clean    "clean"
-  #define fake_make_operation_clone    "clone"
-  #define fake_make_operation_compile  "compile"
-  #define fake_make_operation_copy     "copy"
-  #define fake_make_operation_define   "define"
-  #define fake_make_operation_delete   "delete"
-  #define fake_make_operation_deletes  "deletes"
-  #define fake_make_operation_else     "else"
-  #define fake_make_operation_exit     "exit"
-  #define fake_make_operation_fail     "fail"
-  #define fake_make_operation_group    "group"
-  #define fake_make_operation_groups   "groups"
-  #define fake_make_operation_if       "if"
-  #define fake_make_operation_index    "index"
-  #define fake_make_operation_link     "link"
-  #define fake_make_operation_mode     "mode"
-  #define fake_make_operation_modes    "modes"
-  #define fake_make_operation_move     "move"
-  #define fake_make_operation_operate  "operate"
-  #define fake_make_operation_owner    "owner"
-  #define fake_make_operation_owners   "owners"
-  #define fake_make_operation_pop      "pop"
-  #define fake_make_operation_print    "print"
-  #define fake_make_operation_run      "run"
-  #define fake_make_operation_shell    "shell"
-  #define fake_make_operation_skeleton "skeleton"
-  #define fake_make_operation_to       "to"
-  #define fake_make_operation_top      "top"
-  #define fake_make_operation_touch    "touch"
-
-  #define fake_make_operation_break_length    5
-  #define fake_make_operation_build_length    5
-  #define fake_make_operation_clean_length    5
-  #define fake_make_operation_clone_length    5
-  #define fake_make_operation_compile_length  7
-  #define fake_make_operation_copy_length     4
-  #define fake_make_operation_define_length   6
-  #define fake_make_operation_delete_length   6
-  #define fake_make_operation_deletes_length  7
-  #define fake_make_operation_else_length     4
-  #define fake_make_operation_exit_length     4
-  #define fake_make_operation_fail_length     4
-  #define fake_make_operation_group_length    5
-  #define fake_make_operation_groups_length   6
-  #define fake_make_operation_if_length       2
-  #define fake_make_operation_index_length    5
-  #define fake_make_operation_link_length     4
-  #define fake_make_operation_mode_length     4
-  #define fake_make_operation_modes_length    5
-  #define fake_make_operation_move_length     4
-  #define fake_make_operation_operate_length  7
-  #define fake_make_operation_owner_length    5
-  #define fake_make_operation_owners_length   6
-  #define fake_make_operation_pop_length      3
-  #define fake_make_operation_print_length    5
-  #define fake_make_operation_run_length      3
-  #define fake_make_operation_shell_length    5
-  #define fake_make_operation_skeleton_length 8
-  #define fake_make_operation_to_length       2
-  #define fake_make_operation_top_length      3
-  #define fake_make_operation_touch_length    5
-
-  enum {
-    fake_make_operation_type_break = 1,
-    fake_make_operation_type_build,
-    fake_make_operation_type_clean,
-    fake_make_operation_type_clone,
-    fake_make_operation_type_compile,
-    fake_make_operation_type_copy,
-    fake_make_operation_type_define,
-    fake_make_operation_type_delete,
-    fake_make_operation_type_deletes,
-    fake_make_operation_type_else,
-    fake_make_operation_type_exit,
-    fake_make_operation_type_fail,
-    fake_make_operation_type_group,
-    fake_make_operation_type_groups,
-    fake_make_operation_type_if,
-    fake_make_operation_type_index,
-    fake_make_operation_type_link,
-    fake_make_operation_type_mode,
-    fake_make_operation_type_modes,
-    fake_make_operation_type_move,
-    fake_make_operation_type_operate,
-    fake_make_operation_type_owner,
-    fake_make_operation_type_owners,
-    fake_make_operation_type_pop,
-    fake_make_operation_type_print,
-    fake_make_operation_type_run,
-    fake_make_operation_type_shell,
-    fake_make_operation_type_skeleton,
-    fake_make_operation_type_to,
-    fake_make_operation_type_top,
-    fake_make_operation_type_touch,
-  };
-
-  #define fake_make_operation_total 31
-
-  #define fake_make_operation_argument_environment "environment"
-  #define fake_make_operation_argument_failure     "failure"
-  #define fake_make_operation_argument_file        "file"
-  #define fake_make_operation_argument_directory   "directory"
-  #define fake_make_operation_argument_error       "error"
-  #define fake_make_operation_argument_exit        "exit"
-  #define fake_make_operation_argument_has         "has"
-  #define fake_make_operation_argument_ignore      "ignore"
-  #define fake_make_operation_argument_is          "is"
-  #define fake_make_operation_argument_parameter   "parameter"
-  #define fake_make_operation_argument_point       "point"
-  #define fake_make_operation_argument_recursive   "recursive"
-  #define fake_make_operation_argument_success     "success"
-  #define fake_make_operation_argument_target      "target"
-  #define fake_make_operation_argument_warn        "warn"
-
-  #define fake_make_operation_argument_environment_length 11
-  #define fake_make_operation_argument_failure_length     7
-  #define fake_make_operation_argument_file_length        4
-  #define fake_make_operation_argument_directory_length   9
-  #define fake_make_operation_argument_error_length       5
-  #define fake_make_operation_argument_exit_length        4
-  #define fake_make_operation_argument_has_length         3
-  #define fake_make_operation_argument_ignore_length      6
-  #define fake_make_operation_argument_is_length          2
-  #define fake_make_operation_argument_parameter_length   9
-  #define fake_make_operation_argument_point_length       5
-  #define fake_make_operation_argument_recursive_length   9
-  #define fake_make_operation_argument_success_length     7
-  #define fake_make_operation_argument_target_length      6
-  #define fake_make_operation_argument_warn_length        4
-
-  #define fake_make_operation_argument_if_defined       "defined"
-  #define fake_make_operation_argument_if_equal         "=="
-  #define fake_make_operation_argument_if_equal_not     "<>"
-  #define fake_make_operation_argument_if_exists        "exists"
-  #define fake_make_operation_argument_if_failure       "failure"
-  #define fake_make_operation_argument_if_greater       ">"
-  #define fake_make_operation_argument_if_greater_equal ">="
-  #define fake_make_operation_argument_if_group         "group"
-  #define fake_make_operation_argument_if_is            "is"
-  #define fake_make_operation_argument_if_is_for        "for"
-  #define fake_make_operation_argument_if_less          "<"
-  #define fake_make_operation_argument_if_less_equal    "<="
-  #define fake_make_operation_argument_if_mode          "mode"
-  #define fake_make_operation_argument_if_owner         "owner"
-  #define fake_make_operation_argument_if_success       "success"
-
-  #define fake_make_operation_argument_if_defined_length       7
-  #define fake_make_operation_argument_if_equal_length         2
-  #define fake_make_operation_argument_if_equal_not_length     2
-  #define fake_make_operation_argument_if_exists_length        6
-  #define fake_make_operation_argument_if_failure_length       7
-  #define fake_make_operation_argument_if_greater_length       1
-  #define fake_make_operation_argument_if_greater_equal_length 2
-  #define fake_make_operation_argument_if_group_length         5
-  #define fake_make_operation_argument_if_is_length            2
-  #define fake_make_operation_argument_if_is_for_length        3
-  #define fake_make_operation_argument_if_less_length          1
-  #define fake_make_operation_argument_if_less_equal_length    2
-  #define fake_make_operation_argument_if_mode_length          4
-  #define fake_make_operation_argument_if_owner_length         5
-  #define fake_make_operation_argument_if_success_length       7
-
-  enum {
-    fake_make_operation_if_type_else_false = 1,
-    fake_make_operation_if_type_else_false_next,
-    fake_make_operation_if_type_else_false_next_always,
-    fake_make_operation_if_type_else_true,
-    fake_make_operation_if_type_else_true_next,
-    fake_make_operation_if_type_false,
-    fake_make_operation_if_type_false_always,
-    fake_make_operation_if_type_false_always_next,
-    fake_make_operation_if_type_false_next,
-    fake_make_operation_if_type_if_defined,
-    fake_make_operation_if_type_if_equal,
-    fake_make_operation_if_type_if_equal_not,
-    fake_make_operation_if_type_if_exists,
-    fake_make_operation_if_type_if_failure,
-    fake_make_operation_if_type_if_greater,
-    fake_make_operation_if_type_if_greater_equal,
-    fake_make_operation_if_type_if_group,
-    fake_make_operation_if_type_if_is,
-    fake_make_operation_if_type_if_less,
-    fake_make_operation_if_type_if_less_equal,
-    fake_make_operation_if_type_if_mode,
-    fake_make_operation_if_type_if_owner,
-    fake_make_operation_if_type_if_success,
-    fake_make_operation_if_type_true,
-    fake_make_operation_if_type_true_next,
-  };
-
-  enum {
-    fake_make_operation_fail_type_exit = 1,
-    fake_make_operation_fail_type_warn,
-    fake_make_operation_fail_type_ignore,
-  };
-
-  #define fake_make_operation_recursion_depth_max 65535
-#endif // _di_fake_make_operation_
-
-#ifndef _di_fake_make_parameter_t_
-  #define fake_make_parameter_variable_build     "build"
-  #define fake_make_parameter_variable_color     "color"
-  #define fake_make_parameter_variable_data      "data"
-  #define fake_make_parameter_variable_define    "define"
-  #define fake_make_parameter_variable_fakefile  "fakefile"
-  #define fake_make_parameter_variable_mode      "mode"
-  #define fake_make_parameter_variable_process   "process"
-  #define fake_make_parameter_variable_return    "return"
-  #define fake_make_parameter_variable_settings  "settings"
-  #define fake_make_parameter_variable_sources   "sources"
-  #define fake_make_parameter_variable_verbosity "verbosity"
-  #define fake_make_parameter_variable_work      "work"
-
-  #define fake_make_parameter_variable_build_length     5
-  #define fake_make_parameter_variable_color_length     5
-  #define fake_make_parameter_variable_data_length      4
-  #define fake_make_parameter_variable_define_length    6
-  #define fake_make_parameter_variable_fakefile_length  8
-  #define fake_make_parameter_variable_mode_length      4
-  #define fake_make_parameter_variable_process_length   7
-  #define fake_make_parameter_variable_return_length    6
-  #define fake_make_parameter_variable_settings_length  8
-  #define fake_make_parameter_variable_sources_length   7
-  #define fake_make_parameter_variable_verbosity_length 9
-  #define fake_make_parameter_variable_work_length      4
-
-  typedef struct {
-    f_string_dynamics_t build;
-    f_string_dynamics_t color;
-    f_string_dynamics_t data;
-    f_string_dynamics_t define;
-    f_string_dynamics_t fakefile;
-    f_string_dynamics_t mode;
-    f_string_dynamics_t process;
-    f_string_dynamics_t settings;
-    f_string_dynamics_t sources;
-    f_string_dynamics_t verbosity;
-    f_string_dynamics_t work;
-  } fake_make_parameter_t;
-
-  #define fake_make_parameter_t_initialize { \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-    f_string_dynamics_t_initialize, \
-  }
-
-  #define macro_fake_make_parameter_delete_simple(parameter) \
-    macro_f_string_dynamics_t_delete_simple(parameter.build); \
-    macro_f_string_dynamics_t_delete_simple(parameter.color); \
-    macro_f_string_dynamics_t_delete_simple(parameter.data); \
-    macro_f_string_dynamics_t_delete_simple(parameter.define); \
-    macro_f_string_dynamics_t_delete_simple(parameter.fakefile); \
-    macro_f_string_dynamics_t_delete_simple(parameter.mode); \
-    macro_f_string_dynamics_t_delete_simple(parameter.process); \
-    macro_f_string_dynamics_t_delete_simple(parameter.settings); \
-    macro_f_string_dynamics_t_delete_simple(parameter.sources); \
-    macro_f_string_dynamics_t_delete_simple(parameter.verbosity); \
-    macro_f_string_dynamics_t_delete_simple(parameter.work);
-#endif // _di_fake_make_parameter_t_
-
-#ifndef _di_fake_make_path_t_
-  typedef struct {
-    f_file_t top;
-    f_file_t current;
-
-    f_string_dynamics_t stack;
-  } fake_make_path_t;
-
-  #define fake_make_path_t_initialize { \
-    f_file_t_initialize, \
-    f_file_t_initialize, \
-    f_string_dynamics_t_initialize, \
-  }
-
-  #define macro_fake_make_path_delete_simple(path) \
-    macro_f_string_dynamics_t_delete_simple(path.stack);
-#endif // _di_fake_make_path_t_
-
-#ifndef _di_fake_make_data_t_
-  typedef struct {
-    fake_build_setting_t setting_build;
-    fake_make_setting_t setting_make;
-
-    f_string_maps_t environment;
-
-    fake_make_parameter_t parameter;
-    fake_make_path_t path; // @todo review this, check if path.current is used anymore.
-
-    fll_error_print_t error;
-
-    f_fss_nameds_t fakefile;
-
-    f_string_dynamic_t buffer;
-    f_string_dynamic_t path_cache;
-
-    f_array_length_t main;
-  } fake_make_data_t;
-
-  #define fake_make_data_t_initialize { \
-    fake_build_setting_t_initialize, \
-    fake_make_setting_t_initialize, \
-    f_string_maps_t_initialize, \
-    fake_make_parameter_t_initialize, \
-    fake_make_path_t_initialize, \
-    fll_error_print_t_initialize, \
-    f_fss_nameds_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    f_string_dynamic_t_initialize, \
-    0, \
-  }
-
-  #define macro_fake_make_data_t_delete_simple(structure) \
-    macro_fake_build_setting_t_delete_simple(structure.setting_build) \
-    macro_fake_make_setting_t_delete_simple(structure.setting_make) \
-    macro_f_string_maps_t_delete_simple(structure.environment); \
-    macro_fake_make_parameter_delete_simple(structure.parameter) \
-    macro_fake_make_path_delete_simple(structure.path) \
-    macro_f_fss_nameds_t_delete_simple(structure.fakefile) \
-    macro_f_string_dynamic_t_delete_simple(structure.buffer); \
-    macro_f_string_dynamic_t_delete_simple(structure.path_cache);
-#endif // _di_fake_make_data_t_
-
 /**
  * Assure that a path is within the project root path.
  *
index 06ca369c9a589e64e62206998f2b88cdf1a226d5..8b976df337f5e6c9e0b8331e4ed7ad4653346ef5 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-clean.h"
index 1c6797bd33ad3b7a43846c9966ecf656834ced23..ee3af32b5a5f97bc9b21bbbe627d8e4833620f31 100644 (file)
@@ -1,4 +1,5 @@
 #include "fake.h"
+#include "private-common.h"
 #include "private-fake.h"
 #include "private-build.h"
 #include "private-make.h"
index ceeb41e747e644fc6d4cd58ae49c4931c4f768ff..b3273adc374ce9de2923db7c097e495b6835cce7 100644 (file)
@@ -8,18 +8,6 @@
 #ifndef _PRIVATE_skeleton_h
 #define _PRIVATE_skeleton_h
 
-#ifndef _di_fake_skeleton_content_
-  #define fake_make_skeleton_content_defines      "# fss-0000\n\n"
-  #define fake_make_skeleton_content_dependencies "# fss-0000\n\n"
-  #define fake_make_skeleton_content_fakefile     "# fss-0005 iki-0002\n\nsettings:\n  fail exit\n\nmain:\n\n"
-  #define fake_make_skeleton_content_settings     "# fss-0001\n\n"
-
-  #define fake_make_skeleton_content_defines_length      12
-  #define fake_make_skeleton_content_dependencies_length 12
-  #define fake_make_skeleton_content_fakefile_length     51
-  #define fake_make_skeleton_content_settings_length     12
-#endif // _di_fake_skeleton_content_
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index ac580c7a61fa32d40af27d0c6c00b1cd24059e3d..3b53d9e7f09092941e5dfb1617fc78828167e39b 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc -lcap
 build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_path -lfll_program -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_status -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_print -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fake.c private-fake.c private-clean.c private-build.c private-make.c private-print.c private-skeleton.c
+build_sources_library fake.c private-common.c private-fake.c private-clean.c private-build.c private-make.c private-print.c private-skeleton.c
 build_sources_program main.c
 build_sources_headers fake.h
 build_sources_script
index 34c78ba67ed22b965e8df36a9f47818d7e4d332b..744063f85eb8c5d1d7f309cdbc4b2c5294b40c5f 100644 (file)
@@ -5,6 +5,7 @@
  * Licenses: lgplv2.1
  */
 #include "firewall.h"
+#include "private-common.h"
 #include "private-firewall.h"
 
 #ifdef __cplusplus
diff --git a/level_3/firewall/c/private-common.c b/level_3/firewall/c/private-common.c
new file mode 100644 (file)
index 0000000..5fb28f6
--- /dev/null
@@ -0,0 +1,10 @@
+#include "firewall.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/firewall/c/private-common.h b/level_3/firewall/c/private-common.h
new file mode 100644 (file)
index 0000000..a2a18af
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Firewall
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+  bool is_global;
+  bool is_main;
+  bool is_stop;
+  bool is_lock;
+
+  f_array_length_t device;
+
+  f_string_dynamic_t buffer;
+  f_array_length_t chain;
+  f_array_lengths_t chain_ids;
+  f_fss_objects_t chain_objects;
+  f_fss_contents_t chain_contents;
+  f_fss_objects_t rule_objects;
+  f_fss_contents_t rule_contents;
+} firewall_local_data_t;
+
+#define firewall_local_data_t_initialize \
+  { \
+    F_true, \
+    F_false, \
+    F_false, \
+    F_false, \
+    0, \
+    f_string_dynamic_t_initialize, \
+    0, \
+    f_array_lengths_t_initialize, \
+    f_fss_objects_t_initialize, \
+    f_fss_contents_t_initialize, \
+    f_fss_objects_t_initialize, \
+    f_fss_contents_t_initialize, \
+  }
+
+typedef struct {
+  bool has_main;
+  bool has_stop;
+  bool has_lock;
+
+  f_array_length_t main_at;
+  f_array_length_t stop_at;
+  f_array_length_t lock_at;
+} firewall_reserved_chains_t;
+
+#define firewall_reserved_chains_t_initialize \
+  { \
+    F_false, \
+    F_false, \
+    F_false, \
+    0, \
+    0, \
+    0, \
+  }
+
+#define macro_firewall_delete_fss_buffers(status, buffer, objects, contents) \
+  macro_f_string_dynamic_t_delete_simple(buffer); \
+  macro_f_fss_objects_t_delete_simple(objects); \
+  macro_f_fss_contents_t_delete_simple(contents);
+
+#define macro_firewall_concat_string(destination, source, length) \
+  memcpy((void *)(destination), source, length);
+
+#define macro_firewall_rule_contents_has_incorrect_items(index, total_items) \
+  local.rule_contents.array[index].used <= 0 || local.rule_contents.array[index].used > total_items
+
+// the buffer start to stop points are inclusive such that the size is ((stop - start) + 1).
+#define macro_firewall_string_dynamic_size(structure, index) \
+  (structure.string[index].stop - structure.string[index].start) + 1
+
+// the buffer start to stop points are inclusive such that the size is ((stop - start) + 1).
+#define macro_firewall_structure_size(structure, index) \
+  (structure.array[index].stop - structure.array[index].start) + 1
+
+// TODO: temporarily added, convert this to a function below.
+// TODO: also report: f_color_print(main.error.to.stream, main.context.set.error, "CRITICAL ERROR: Unable to allocate memory.%c", f_string_eol_s[0]);
+#define macro_firewall_append_argument_to_arguments(status, arguments, argument) \
+  if (arguments.used == arguments.size) { \
+    macro_f_string_dynamics_t_resize(status, arguments, arguments.used + firewall_default_allocation_step); \
+    \
+    if (F_status_is_error(status)) break; \
+  } \
+  \
+  arguments.array[arguments.used].string = argument.string; \
+  arguments.array[arguments.used].size   = argument.size; \
+  arguments.array[arguments.used].used   = argument.used; \
+  arguments.used++; \
+  \
+  macro_f_string_dynamic_t_clear(argument);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 4bf70b16b4e93c88689d9aea100f8165caf4e9b7..5831b1750d48dddec008e0bcd1961036c4b64bfa 100644 (file)
@@ -1,4 +1,5 @@
 #include "firewall.h"
+#include "private-common.h"
 #include "private-firewall.h"
 
 #ifdef __cplusplus
index e2e5e6cb17014614a049f4ca7ad323c4cc96d6fc..8bb836a29f4191912ac8da5fa80e7c8f967645b7 100644 (file)
 extern "C" {
 #endif
 
-typedef struct {
-  bool is_global;
-  bool is_main;
-  bool is_stop;
-  bool is_lock;
-
-  f_array_length_t device;
-
-  f_string_dynamic_t buffer;
-  f_array_length_t chain;
-  f_array_lengths_t chain_ids;
-  f_fss_objects_t chain_objects;
-  f_fss_contents_t chain_contents;
-  f_fss_objects_t rule_objects;
-  f_fss_contents_t rule_contents;
-} firewall_local_data_t;
-
-#define firewall_local_data_t_initialize \
-  { \
-    F_true, \
-    F_false, \
-    F_false, \
-    F_false, \
-    0, \
-    f_string_dynamic_t_initialize, \
-    0, \
-    f_array_lengths_t_initialize, \
-    f_fss_objects_t_initialize, \
-    f_fss_contents_t_initialize, \
-    f_fss_objects_t_initialize, \
-    f_fss_contents_t_initialize, \
-  }
-
-typedef struct {
-  bool has_main;
-  bool has_stop;
-  bool has_lock;
-
-  f_array_length_t main_at;
-  f_array_length_t stop_at;
-  f_array_length_t lock_at;
-} firewall_reserved_chains_t;
-
-#define firewall_reserved_chains_t_initialize \
-  { \
-    F_false, \
-    F_false, \
-    F_false, \
-    0, \
-    0, \
-    0, \
-  }
-
-#define macro_firewall_delete_fss_buffers(status, buffer, objects, contents) \
-  macro_f_string_dynamic_t_delete_simple(buffer); \
-  macro_f_fss_objects_t_delete_simple(objects); \
-  macro_f_fss_contents_t_delete_simple(contents);
-
-#define macro_firewall_concat_string(destination, source, length) \
-  memcpy((void *)(destination), source, length);
-
-#define macro_firewall_rule_contents_has_incorrect_items(index, total_items) \
-  local.rule_contents.array[index].used <= 0 || local.rule_contents.array[index].used > total_items
-
-// the buffer start to stop points are inclusive such that the size is ((stop - start) + 1).
-#define macro_firewall_string_dynamic_size(structure, index) \
-  (structure.string[index].stop - structure.string[index].start) + 1
-
-// the buffer start to stop points are inclusive such that the size is ((stop - start) + 1).
-#define macro_firewall_structure_size(structure, index) \
-  (structure.array[index].stop - structure.array[index].start) + 1
-
-// TODO: temporarily added, convert this to a function below.
-// TODO: also report: f_color_print(main.error.to.stream, main.context.set.error, "CRITICAL ERROR: Unable to allocate memory.%c", f_string_eol_s[0]);
-#define macro_firewall_append_argument_to_arguments(status, arguments, argument) \
-  if (arguments.used == arguments.size) { \
-    macro_f_string_dynamics_t_resize(status, arguments, arguments.used + firewall_default_allocation_step); \
-    \
-    if (F_status_is_error(status)) break; \
-  } \
-  \
-  arguments.array[arguments.used].string = argument.string; \
-  arguments.array[arguments.used].size   = argument.size; \
-  arguments.array[arguments.used].used   = argument.used; \
-  arguments.used++; \
-  \
-  macro_f_string_dynamic_t_clear(argument);
-
 /**
  * Perform commands.
  *
index 9c3df9a377c7a5a9e6597dcd823eff13a4b06fea..f7e6c1de9e726fa23d30b3e97d7e5a4080d801fc 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc -lcap
 build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_program -lfl_console -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_status -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library firewall.c private-firewall.c
+build_sources_library firewall.c private-common.c private-firewall.c
 build_sources_program main.c
 build_sources_headers firewall.h
 build_sources_script
index 8f60b67c70fccc0c603ade65bbd5971f3def764d..8bad606a0899e472dd04949982f0e6a9167a1a24 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_list_read.h"
+#include "private-common.h"
 #include "private-fss_basic_list_read.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_basic_list_read/c/private-common.c b/level_3/fss_basic_list_read/c/private-common.c
new file mode 100644 (file)
index 0000000..745408c
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_basic_list_read.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_basic_list_read/c/private-common.h b/level_3/fss_basic_list_read/c/private-common.h
new file mode 100644 (file)
index 0000000..93ad6b7
--- /dev/null
@@ -0,0 +1,116 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Basic List Read
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure of parameters applied at some depth.
+ *
+ * depth: the depth number in which this is to be processed at.
+ *
+ * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
+ * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
+ *
+ * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
+ * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
+ */
+#ifndef _di_fss_basic_list_read_depth_t_
+  typedef struct {
+    f_array_length_t depth;
+
+    f_array_length_t index_at;
+    f_array_length_t index_name;
+
+    f_number_unsigned_t value_at;
+    f_string_dynamic_t  value_name;
+  } fss_basic_list_read_depth_t;
+
+  #define fss_basic_list_read_depth_t_initialize \
+    { \
+      0, \
+      0, \
+      0, \
+      0, \
+      f_string_dynamic_t_initialize, \
+    }
+
+  #define macro_fss_basic_list_read_depth_t_clear(structure) \
+    structure.depth = 0; \
+    structure.index_at = 0; \
+    structure.index_name = 0; \
+    structure.value_at = 0; \
+    macro_f_string_dynamic_t_clear(structure.value_name)
+
+  #define macro_fss_basic_list_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name);
+#endif // _di_fss_basic_list_read_depth_t_
+
+/**
+ * An array of depth parameters.
+ *
+ * array: the array of depths.
+ * size: total amount of allocated space.
+ * used: total number of allocated spaces used.
+ */
+#ifndef _di_fss_basic_list_read_depths_t_
+  typedef struct {
+    fss_basic_list_read_depth_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } fss_basic_list_read_depths_t;
+
+  #define fss_basic_list_read_depths_t_initialize { 0, 0, 0 }
+
+  #define macro_fss_basic_list_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
+
+  #define macro_fss_basic_list_read_depths_t_delete_simple(depths) \
+    depths.used = depths.size; \
+    while (depths.used > 0) { \
+      depths.used--; \
+      macro_fss_basic_list_read_depth_t_delete_simple(depths.array[depths.used]); \
+    } \
+    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_basic_list_read_depth_t)
+
+  #define macro_fss_basic_list_read_depths_t_resize(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_basic_list_read_depth_t_delete_simple(depths.array[i]); \
+      } \
+    } \
+    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_basic_list_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+
+  #define macro_fss_basic_list_read_depths_t_adjust(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_basic_list_read_depth_t_delete_simple(depths.array[i]); \
+      } \
+    } \
+    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_basic_list_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+#endif // _di_fss_basic_list_read_depths_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index ea29bfdf88933dff8a10bcde8b8157fa24805477..8b70e6ef81c66fa43ff4259657d03712d532efb3 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_list_read.h"
+#include "private-common.h"
 #include "private-fss_basic_list_read.h"
 
 #ifdef __cplusplus
index 4165637bf69263113ad8d1497b21dc7bb808d838..53e834fa3bb47f3a21b55e8535e3ecdbc0eae7a4 100644 (file)
@@ -13,103 +13,6 @@ extern "C" {
 #endif
 
 /**
- * A structure of parameters applied at some depth.
- *
- * depth: the depth number in which this is to be processed at.
- *
- * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
- * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
- *
- * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
- * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
- */
-#ifndef _di_fss_basic_list_read_depth_t_
-  typedef struct {
-    f_array_length_t depth;
-
-    f_array_length_t index_at;
-    f_array_length_t index_name;
-
-    f_number_unsigned_t value_at;
-    f_string_dynamic_t  value_name;
-  } fss_basic_list_read_depth_t;
-
-  #define fss_basic_list_read_depth_t_initialize \
-    { \
-      0, \
-      0, \
-      0, \
-      0, \
-      f_string_dynamic_t_initialize, \
-    }
-
-  #define macro_fss_basic_list_read_depth_t_clear(structure) \
-    structure.depth = 0; \
-    structure.index_at = 0; \
-    structure.index_name = 0; \
-    structure.value_at = 0; \
-    macro_f_string_dynamic_t_clear(structure.value_name)
-
-  #define macro_fss_basic_list_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name);
-#endif // _di_fss_basic_list_read_depth_t_
-
-/**
- * An array of depth parameters.
- *
- * array: the array of depths.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_fss_basic_list_read_depths_t_
-  typedef struct {
-    fss_basic_list_read_depth_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } fss_basic_list_read_depths_t;
-
-  #define fss_basic_list_read_depths_t_initialize { 0, 0, 0 }
-
-  #define macro_fss_basic_list_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
-
-  #define macro_fss_basic_list_read_depths_t_delete_simple(depths) \
-    depths.used = depths.size; \
-    while (depths.used > 0) { \
-      depths.used--; \
-      macro_fss_basic_list_read_depth_t_delete_simple(depths.array[depths.used]); \
-    } \
-    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_basic_list_read_depth_t)
-
-  #define macro_fss_basic_list_read_depths_t_resize(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_basic_list_read_depth_t_delete_simple(depths.array[i]); \
-      } \
-    } \
-    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_basic_list_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-
-  #define macro_fss_basic_list_read_depths_t_adjust(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_basic_list_read_depth_t_delete_simple(depths.array[i]); \
-      } \
-    } \
-    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_basic_list_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-#endif // _di_fss_basic_list_read_depths_t_
-
-/**
  * Pre-process the parameters, parsing out and handling the depth and depth related parameters.
  *
  * Will handle depth-sensitive parameter conflicts, such as --name being used with --at (which is not allowed).
index b7d6b5fbecaf5aa010eff0846543b7082d116f8a..73eb879f741a348c28db8f6e6590bb8a167960ba 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_basic_list_read.c private-fss_basic_list_read.c
+build_sources_library fss_basic_list_read.c private-common.c private-fss_basic_list_read.c
 build_sources_program main.c
 build_sources_headers fss_basic_list_read.h
 build_sources_script
index 2015af28725b6d749dcc62bd09ddee9409000c04..77472578f95a1d3f037b9d27423ed3bb6446d74b 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_list_write.h"
+#include "private-common.h"
 #include "private-fss_basic_list_write.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_basic_list_write/c/private-common.c b/level_3/fss_basic_list_write/c/private-common.c
new file mode 100644 (file)
index 0000000..1975491
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_basic_list_write.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_basic_list_write/c/private-common.h b/level_3/fss_basic_list_write/c/private-common.h
new file mode 100644 (file)
index 0000000..2c5f723
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Basic List Write
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index a7745b5701e6d67dba1d1ce1660838c4cc1a8928..fdca79916cb5de8c9c04c077e29f0f8c7f7b8c32 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_list_write.h"
+#include "private-common.h"
 #include "private-fss_basic_list_write.h"
 
 #ifdef __cplusplus
index 4708f21cf7fc93ba41d6a84970045433576f2e6e..5a683604165d3420435e70ee0f63bc948eac47a9 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_basic_list_write.c private-fss_basic_list_write.c
+build_sources_library fss_basic_list_write.c private-common.c private-fss_basic_list_write.c
 build_sources_program main.c
 build_sources_headers fss_basic_list_write.h
 build_sources_script
index 4135112eba1ca308f8471e70d59654614881f4fb..38a135b46d5ebb004488ed4653513f12a3e89ff5 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_read.h"
+#include "private-common.h"
 #include "private-fss_basic_read.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_basic_read/c/private-common.c b/level_3/fss_basic_read/c/private-common.c
new file mode 100644 (file)
index 0000000..b5e5148
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_basic_read.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_basic_read/c/private-common.h b/level_3/fss_basic_read/c/private-common.h
new file mode 100644 (file)
index 0000000..3857fed
--- /dev/null
@@ -0,0 +1,169 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Basic Read
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure of parameters applied at some depth.
+ *
+ * depth: the depth number in which this is to be processed at.
+ *
+ * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
+ * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
+ *
+ * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
+ * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
+ */
+#ifndef _di_fss_basic_read_depth_t_
+  typedef struct {
+    f_array_length_t depth;
+
+    f_array_length_t index_at;
+    f_array_length_t index_name;
+
+    f_number_unsigned_t value_at;
+    f_string_dynamic_t  value_name;
+  } fss_basic_read_depth_t;
+
+  #define fss_basic_read_depth_t_initialize \
+    { \
+      0, \
+      0, \
+      0, \
+      0, \
+      f_string_dynamic_t_initialize, \
+    }
+
+  #define macro_fss_basic_read_depth_t_clear(structure) \
+    structure.depth = 0; \
+    structure.index_at = 0; \
+    structure.index_name = 0; \
+    structure.value_at = 0; \
+    macro_f_string_dynamic_t_clear(structure.value_name)
+
+  #define macro_fss_basic_read_depth_t_delete(status, structure) status = macro_f_string_dynamic_t_delete_simple(structure.value_name);
+  #define macro_fss_basic_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name);
+#endif // _di_fss_basic_read_depth_t_
+
+/**
+ * An array of depth parameters.
+ *
+ * array: the array of depths.
+ * size: total amount of allocated space.
+ * used: total number of allocated spaces used.
+ */
+#ifndef _di_fss_basic_read_depths_t_
+  typedef struct {
+    fss_basic_read_depth_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } fss_basic_read_depths_t;
+
+  #define fss_basic_read_depths_t_initialize { 0, 0, 0 }
+
+  #define macro_fss_basic_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
+
+  #define macro_fss_basic_read_depths_t_delete(status, depths) \
+    status = F_none; \
+    depths.used = depths.size; \
+    while (depths.used > 0) { \
+      depths.used--; \
+      macro_fss_basic_read_depth_t_delete(status, depths.array[depths.used]); \
+      if (F_status_is_error(status)) break; \
+    } \
+    if (status == F_none) macro_f_memory_structure_delete(depths, fss_basic_read_depth_t)
+
+  #define macro_fss_basic_read_depths_t_delete_simple(depths) \
+    depths.used = depths.size; \
+    while (depths.used > 0) { \
+      depths.used--; \
+      macro_fss_basic_read_depth_t_delete_simple(depths.array[depths.used]); \
+    } \
+    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_basic_read_depth_t)
+
+  #define macro_fss_basic_read_depths_t_resize(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_basic_read_depth_t_delete(status, depths.array[i]); \
+        if (F_status_is_error(status)) break; \
+      } \
+    } \
+    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_basic_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+
+  #define macro_fss_basic_read_depths_t_adjust(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_basic_read_depth_t_delete(status, depths.array[i]); \
+        if (F_status_is_error(status)) break; \
+      } \
+    } \
+    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_basic_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+#endif // _di_fss_basic_read_depths_t_
+
+/**
+ * A structure for designating where within the buffer a particular file exists, using a statically allocated array.
+ *
+ * name: The name of the file representing the range. Set string to NULL to represent the STDIN pipe.
+ */
+#ifndef _di_fss_basic_read_file_t_
+  typedef struct {
+    f_string_t name;
+    f_string_range_t range;
+  } fss_basic_read_file_t;
+
+  #define fss_basic_read_file_t_initialize \
+    { \
+      f_string_t_initialize, \
+      f_string_range_t_initialize, \
+    }
+#endif // _di_fss_basic_read_file_t_
+
+/**
+ * An array of depth parameters.
+ *
+ * This is intended to be defined and used statically allocated and as such no dynamic allocation or dynamic deallocation methods are provided.
+ *
+ * The STDIN pipe is reserved for index 0 and as such size and used must be initialized to 1.
+ *
+ * array: The array of depths.
+ * size:  Total amount of allocated space.
+ * used:  Total number of allocated spaces used.
+ */
+#ifndef _di_fss_basic_read_files_t_
+  typedef struct {
+    fss_basic_read_file_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } fss_basic_read_files_t;
+
+  #define fss_basic_read_files_t_initialize { 0, 1, 1 }
+#endif // _di_fss_basic_read_files_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 0087bdcb941d2998fa2977e545d0ec89da07f233..6be3eca221b56632cb90094307f38f60ed6bfb62 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_read.h"
+#include "private-common.h"
 #include "private-fss_basic_read.h"
 
 #ifdef __cplusplus
index d1b6448ff5b75804ec290ee3f1053f6cd1c4d36c..bd1d4eff21e4f34795b703120a610cc60379a639 100644 (file)
@@ -13,156 +13,6 @@ extern "C" {
 #endif
 
 /**
- * A structure of parameters applied at some depth.
- *
- * depth: the depth number in which this is to be processed at.
- *
- * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
- * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
- *
- * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
- * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
- */
-#ifndef _di_fss_basic_read_depth_t_
-  typedef struct {
-    f_array_length_t depth;
-
-    f_array_length_t index_at;
-    f_array_length_t index_name;
-
-    f_number_unsigned_t value_at;
-    f_string_dynamic_t  value_name;
-  } fss_basic_read_depth_t;
-
-  #define fss_basic_read_depth_t_initialize \
-    { \
-      0, \
-      0, \
-      0, \
-      0, \
-      f_string_dynamic_t_initialize, \
-    }
-
-  #define macro_fss_basic_read_depth_t_clear(structure) \
-    structure.depth = 0; \
-    structure.index_at = 0; \
-    structure.index_name = 0; \
-    structure.value_at = 0; \
-    macro_f_string_dynamic_t_clear(structure.value_name)
-
-  #define macro_fss_basic_read_depth_t_delete(status, structure) status = macro_f_string_dynamic_t_delete_simple(structure.value_name);
-  #define macro_fss_basic_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name);
-#endif // _di_fss_basic_read_depth_t_
-
-/**
- * An array of depth parameters.
- *
- * array: the array of depths.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_fss_basic_read_depths_t_
-  typedef struct {
-    fss_basic_read_depth_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } fss_basic_read_depths_t;
-
-  #define fss_basic_read_depths_t_initialize { 0, 0, 0 }
-
-  #define macro_fss_basic_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
-
-  #define macro_fss_basic_read_depths_t_delete(status, depths) \
-    status = F_none; \
-    depths.used = depths.size; \
-    while (depths.used > 0) { \
-      depths.used--; \
-      macro_fss_basic_read_depth_t_delete(status, depths.array[depths.used]); \
-      if (F_status_is_error(status)) break; \
-    } \
-    if (status == F_none) macro_f_memory_structure_delete(depths, fss_basic_read_depth_t)
-
-  #define macro_fss_basic_read_depths_t_delete_simple(depths) \
-    depths.used = depths.size; \
-    while (depths.used > 0) { \
-      depths.used--; \
-      macro_fss_basic_read_depth_t_delete_simple(depths.array[depths.used]); \
-    } \
-    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_basic_read_depth_t)
-
-  #define macro_fss_basic_read_depths_t_resize(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_basic_read_depth_t_delete(status, depths.array[i]); \
-        if (F_status_is_error(status)) break; \
-      } \
-    } \
-    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_basic_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-
-  #define macro_fss_basic_read_depths_t_adjust(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_basic_read_depth_t_delete(status, depths.array[i]); \
-        if (F_status_is_error(status)) break; \
-      } \
-    } \
-    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_basic_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-#endif // _di_fss_basic_read_depths_t_
-
-/**
- * A structure for designating where within the buffer a particular file exists, using a statically allocated array.
- *
- * name: The name of the file representing the range. Set string to NULL to represent the STDIN pipe.
- */
-#ifndef _di_fss_basic_read_file_t_
-  typedef struct {
-    f_string_t name;
-    f_string_range_t range;
-  } fss_basic_read_file_t;
-
-  #define fss_basic_read_file_t_initialize \
-    { \
-      f_string_t_initialize, \
-      f_string_range_t_initialize, \
-    }
-#endif // _di_fss_basic_read_file_t_
-
-/**
- * An array of depth parameters.
- *
- * This is intended to be defined and used statically allocated and as such no dynamic allocation or dynamic deallocation methods are provided.
- *
- * The STDIN pipe is reserved for index 0 and as such size and used must be initialized to 1.
- *
- * array: The array of depths.
- * size:  Total amount of allocated space.
- * used:  Total number of allocated spaces used.
- */
-#ifndef _di_fss_basic_read_files_t_
-  typedef struct {
-    fss_basic_read_file_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } fss_basic_read_files_t;
-
-  #define fss_basic_read_files_t_initialize { 0, 1, 1 }
-#endif // _di_fss_basic_read_files_t_
-
-/**
  * Process the parameters, parsing out and handling the depth and depth related parameters.
  *
  * Will handle depth-sensitive parameter conflicts, such as --name being used with --at (which is not allowed).
index 1a85cda098043a78a9db4e476d980aff6144ca22..fd524095d800c120c7f8337a76deda14ebb9ff4b 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_basic_read.c private-fss_basic_read.c
+build_sources_library fss_basic_read.c private-common.c private-fss_basic_read.c
 build_sources_program main.c
 build_sources_headers fss_basic_read.h
 build_sources_script
index e5a591b9ca27acf42ee66ca031520580df587590..9ec2ec82ff56ffd266c16515f8da90c5a8ce8df6 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_write.h"
+#include "private-common.h"
 #include "private-fss_basic_write.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_basic_write/c/private-common.c b/level_3/fss_basic_write/c/private-common.c
new file mode 100644 (file)
index 0000000..d1c0ac4
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_basic_write.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_basic_write/c/private-common.h b/level_3/fss_basic_write/c/private-common.h
new file mode 100644 (file)
index 0000000..bbd31e0
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Basic Write
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index d22004fd4b018bdb91fa6a0c9b545a76d8a8a41b..79463237d72ba2174293fb421652e07e310496b5 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_basic_write.h"
+#include "private-common.h"
 #include "private-fss_basic_write.h"
 
 #ifdef __cplusplus
index 48aa610c7a457d65c2349f1c5283e984d2b59c30..207bb583cc52dcbf93ea91e932edb1976bdce144 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_basic_write.c private-fss_basic_write.c
+build_sources_library fss_basic_write.c private-common.c private-fss_basic_write.c
 build_sources_program main.c
 build_sources_headers fss_basic_write.h
 build_sources_script
index 0c075b4849cb6d44422f007064ec59557945ef6a..6c6a611cb8a8687a56f6eb9173463585ad3fd8b8 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_embedded_list_read.h"
+#include "private-common.h"
 #include "private-fss_embedded_list_read.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_embedded_list_read/c/private-common.c b/level_3/fss_embedded_list_read/c/private-common.c
new file mode 100644 (file)
index 0000000..d62fdfa
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_embedded_list_read.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_embedded_list_read/c/private-common.h b/level_3/fss_embedded_list_read/c/private-common.h
new file mode 100644 (file)
index 0000000..6402e84
--- /dev/null
@@ -0,0 +1,141 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Embedded List Read
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure of parameters applied at some depth.
+ *
+ * depth: the depth number in which this is to be processed at.
+ *
+ * index_at:   position of the "--at" parameter value in the argv list, when 0 there is no parameter.
+ * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
+ *
+ * value_at:   the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
+ * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
+ */
+#ifndef _di_fss_embedded_list_read_depth_t_
+  typedef struct {
+    f_array_length_t depth;
+
+    f_array_length_t index_at;
+    f_array_length_t index_name;
+
+    f_number_unsigned_t value_at;
+    f_string_dynamic_t  value_name;
+  } fss_embedded_list_read_depth_t;
+
+  #define fss_embedded_list_read_depth_t_initialize \
+    { \
+      0, \
+      0, \
+      0, \
+      0, \
+      f_string_dynamic_t_initialize, \
+    }
+
+  #define macro_fss_embedded_list_read_depth_t_clear(structure) \
+    structure.depth = 0; \
+    structure.index_at = 0; \
+    structure.index_name = 0; \
+    structure.value_at = 0; \
+    macro_f_string_dynamic_t_clear(structure.value_name)
+
+  #define macro_fss_embedded_list_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name)
+#endif // _di_fss_embedded_list_read_depth_t_
+
+/**
+ * A structure containing a statically allocated array of booleans and the array length.
+ *
+ * skip: a statically allocated array representing list items that are to be skipped.
+ * used: the length of the statically allocated skip array.
+ */
+#ifndef _di_fss_embedded_list_read_skip_t_
+  typedef struct {
+    bool *skip;
+    f_array_length_t used;
+  } fss_embedded_list_read_skip_t;
+
+  #define fss_embedded_list_read_skip_t_initialize \
+    { \
+      0, \
+      0, \
+    }
+
+  #define macro_fss_embedded_list_read_skip_t_initialize(skip, used) \
+    { \
+      skip, \
+      used, \
+    }
+#endif // _di_fss_embedded_list_read_skip_t_
+
+/**
+ * An array of depth parameters.
+ *
+ * array: the array of depths.
+ * size: total amount of allocated space.
+ * used: total number of allocated spaces used.
+ */
+#ifndef _di_fss_embedded_list_read_depths_t_
+  typedef struct {
+    fss_embedded_list_read_depth_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } fss_embedded_list_read_depths_t;
+
+  #define fss_embedded_list_read_depths_t_initialize { 0, 0, 0 }
+
+  #define macro_fss_embedded_list_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
+
+  #define macro_fss_embedded_list_read_depths_t_delete_simple(depths) \
+    depths.used = depths.size; \
+    while (depths.used > 0) { \
+      depths.used--; \
+      macro_fss_embedded_list_read_depth_t_delete_simple(depths.array[depths.used]); \
+    } \
+    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_embedded_list_read_depth_t)
+
+  #define macro_fss_embedded_list_read_depths_t_resize(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_embedded_list_read_depth_t_delete_simple(depths.array[i]); \
+      } \
+    } \
+    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_embedded_list_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+
+  #define macro_fss_embedded_list_read_depths_t_adjust(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_embedded_list_read_depth_t_delete_simple(depths.array[i]); \
+      } \
+    } \
+    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_embedded_list_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+#endif // _di_fss_embedded_list_read_depths_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 0ff8104893f7a71a7e99e3ebcf45e7ebce9be9fc..26a1fa405a3f00bfaede1bd99f627d596031300c 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_embedded_list_read.h"
+#include "private-common.h"
 #include "private-fss_embedded_list_read.h"
 
 #ifdef __cplusplus
index cb6e720b5a053d2b924101f27900be072ee04f04..31a946ada868bcffdba8d5627fab35f913ac315e 100644 (file)
@@ -13,128 +13,6 @@ extern "C" {
 #endif
 
 /**
- * A structure of parameters applied at some depth.
- *
- * depth: the depth number in which this is to be processed at.
- *
- * index_at:   position of the "--at" parameter value in the argv list, when 0 there is no parameter.
- * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
- *
- * value_at:   the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
- * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
- */
-#ifndef _di_fss_embedded_list_read_depth_t_
-  typedef struct {
-    f_array_length_t depth;
-
-    f_array_length_t index_at;
-    f_array_length_t index_name;
-
-    f_number_unsigned_t value_at;
-    f_string_dynamic_t  value_name;
-  } fss_embedded_list_read_depth_t;
-
-  #define fss_embedded_list_read_depth_t_initialize \
-    { \
-      0, \
-      0, \
-      0, \
-      0, \
-      f_string_dynamic_t_initialize, \
-    }
-
-  #define macro_fss_embedded_list_read_depth_t_clear(structure) \
-    structure.depth = 0; \
-    structure.index_at = 0; \
-    structure.index_name = 0; \
-    structure.value_at = 0; \
-    macro_f_string_dynamic_t_clear(structure.value_name)
-
-  #define macro_fss_embedded_list_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name)
-#endif // _di_fss_embedded_list_read_depth_t_
-
-/**
- * A structure containing a statically allocated array of booleans and the array length.
- *
- * skip: a statically allocated array representing list items that are to be skipped.
- * used: the length of the statically allocated skip array.
- */
-#ifndef _di_fss_embedded_list_read_skip_t_
-  typedef struct {
-    bool *skip;
-    f_array_length_t used;
-  } fss_embedded_list_read_skip_t;
-
-  #define fss_embedded_list_read_skip_t_initialize \
-    { \
-      0, \
-      0, \
-    }
-
-  #define macro_fss_embedded_list_read_skip_t_initialize(skip, used) \
-    { \
-      skip, \
-      used, \
-    }
-#endif // _di_fss_embedded_list_read_skip_t_
-
-/**
- * An array of depth parameters.
- *
- * array: the array of depths.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_fss_embedded_list_read_depths_t_
-  typedef struct {
-    fss_embedded_list_read_depth_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } fss_embedded_list_read_depths_t;
-
-  #define fss_embedded_list_read_depths_t_initialize { 0, 0, 0 }
-
-  #define macro_fss_embedded_list_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
-
-  #define macro_fss_embedded_list_read_depths_t_delete_simple(depths) \
-    depths.used = depths.size; \
-    while (depths.used > 0) { \
-      depths.used--; \
-      macro_fss_embedded_list_read_depth_t_delete_simple(depths.array[depths.used]); \
-    } \
-    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_embedded_list_read_depth_t)
-
-  #define macro_fss_embedded_list_read_depths_t_resize(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_embedded_list_read_depth_t_delete_simple(depths.array[i]); \
-      } \
-    } \
-    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_embedded_list_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-
-  #define macro_fss_embedded_list_read_depths_t_adjust(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_embedded_list_read_depth_t_delete_simple(depths.array[i]); \
-      } \
-    } \
-    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_embedded_list_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-#endif // _di_fss_embedded_list_read_depths_t_
-
-/**
  * Pre-process the parameters, parsing out and handling the depth and depth related parameters.
  *
  * Will handle depth-sensitive parameter conflicts, such as --name being used with --at (which is not allowed).
index 8c646b391d72ffd1d5e7cf5af4ffb5887434469c..1d03e1ed01d95d9ff4a13575f70fe14adf1fb150 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_embedded_list_read.c private-fss_embedded_list_read.c
+build_sources_library fss_embedded_list_read.c private-common.c private-fss_embedded_list_read.c
 build_sources_program main.c
 build_sources_headers fss_embedded_list_read.h
 build_sources_script
index 08dd966ab04151fed0cbd9a246dad6ef657e1e47..07c7e8f29b3032ac54f79b2a9a37b89dc37e7193 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_embedded_list_write.h"
+#include "private-common.h"
 #include "private-fss_embedded_list_write.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_embedded_list_write/c/private-common.c b/level_3/fss_embedded_list_write/c/private-common.c
new file mode 100644 (file)
index 0000000..16c4cbb
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_embedded_list_write.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_embedded_list_write/c/private-common.h b/level_3/fss_embedded_list_write/c/private-common.h
new file mode 100644 (file)
index 0000000..db0f899
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Embedded List Write
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index e79e99d17daaa87675242d9075b1e132c6c6fcb8..324fb06ee87829f77cc9e69c625624abe2d4a994 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_embedded_list_write.h"
+#include "private-common.h"
 #include "private-fss_embedded_list_write.h"
 
 #ifdef __cplusplus
index 7595f7fe37a03cc7898cd03564b5ae49797c0433..a564014c320a9b0379504c88cb94b7953a2205f3 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_embedded_list_write.c private-fss_embedded_list_write.c
+build_sources_library fss_embedded_list_write.c private-common.c private-fss_embedded_list_write.c
 build_sources_program main.c
 build_sources_headers fss_embedded_list_write.h
 build_sources_script
index 567fc2caeb32ac0befed12e5b28c3db68c4f2bfc..e9fc3214d5598783e1c8e941af7e5a0c917a3db6 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_list_read.h"
+#include "private-common.h"
 #include "private-fss_extended_list_read.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_extended_list_read/c/private-common.c b/level_3/fss_extended_list_read/c/private-common.c
new file mode 100644 (file)
index 0000000..24bf332
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_extended_list_read.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_extended_list_read/c/private-common.h b/level_3/fss_extended_list_read/c/private-common.h
new file mode 100644 (file)
index 0000000..34e928d
--- /dev/null
@@ -0,0 +1,118 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Extended List Read
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure of parameters applied at some depth.
+ *
+ * depth: the depth number in which this is to be processed at.
+ *
+ * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
+ * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
+ *
+ * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
+ * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
+ */
+#ifndef _di_fss_extended_list_read_depth_t_
+  typedef struct {
+    f_array_length_t depth;
+
+    f_array_length_t index_at;
+    f_array_length_t index_name;
+
+    f_number_unsigned_t value_at;
+    f_string_dynamic_t  value_name;
+  } fss_extended_list_read_depth_t;
+
+  #define fss_extended_list_read_depth_t_initialize \
+    { \
+      0, \
+      0, \
+      0, \
+      0, \
+      f_string_dynamic_t_initialize, \
+    }
+
+  #define macro_fss_extended_list_read_depth_t_clear(structure) \
+    structure.depth = 0; \
+    structure.index_at = 0; \
+    structure.index_name = 0; \
+    structure.value_at = 0; \
+    macro_f_string_dynamic_t_clear(structure.value_name)
+
+  #define macro_fss_extended_list_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name)
+#endif // _di_fss_extended_list_read_depth_t_
+
+/**
+ * An array of depth parameters.
+ *
+ * array: the array of depths.
+ * size: total amount of allocated space.
+ * used: total number of allocated spaces used.
+ */
+#ifndef _di_fss_extended_list_read_depths_t_
+  typedef struct {
+    fss_extended_list_read_depth_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } fss_extended_list_read_depths_t;
+
+  #define fss_extended_list_read_depths_t_initialize { 0, 0, 0 }
+
+  #define macro_fss_extended_list_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
+
+  #define macro_fss_extended_list_read_depths_t_delete_simple(depths) \
+    depths.used = depths.size; \
+    while (depths.used > 0) { \
+      depths.used--; \
+      macro_fss_extended_list_read_depth_t_delete_simple(depths.array[depths.used]); \
+    } \
+    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_extended_list_read_depth_t)
+
+  #define macro_fss_extended_list_read_depths_t_resize(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_extended_list_read_depth_t_delete_simple(depths.array[i]); \
+        if (F_status_is_error(status)) break; \
+      } \
+    } \
+    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_extended_list_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+
+  #define macro_fss_extended_list_read_depths_t_adjust(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_extended_list_read_depth_t_delete_simple(depths.array[i]); \
+        if (F_status_is_error(status)) break; \
+      } \
+    } \
+    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_extended_list_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+#endif // _di_fss_extended_list_read_depths_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index fa587506b999fc586a830a73f2f69adb0b90044b..c5a105fc891971a16a302ef5f9fbeccb1e78f4af 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_list_read.h"
+#include "private-common.h"
 #include "private-fss_extended_list_read.h"
 
 #ifdef __cplusplus
index 1825471bea6ceb821b8528709a0dfb62235f3b3b..3eb9ed5c226070021d2768a4674822f640964dc5 100644 (file)
@@ -13,105 +13,6 @@ extern "C" {
 #endif
 
 /**
- * A structure of parameters applied at some depth.
- *
- * depth: the depth number in which this is to be processed at.
- *
- * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
- * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
- *
- * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
- * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
- */
-#ifndef _di_fss_extended_list_read_depth_t_
-  typedef struct {
-    f_array_length_t depth;
-
-    f_array_length_t index_at;
-    f_array_length_t index_name;
-
-    f_number_unsigned_t value_at;
-    f_string_dynamic_t  value_name;
-  } fss_extended_list_read_depth_t;
-
-  #define fss_extended_list_read_depth_t_initialize \
-    { \
-      0, \
-      0, \
-      0, \
-      0, \
-      f_string_dynamic_t_initialize, \
-    }
-
-  #define macro_fss_extended_list_read_depth_t_clear(structure) \
-    structure.depth = 0; \
-    structure.index_at = 0; \
-    structure.index_name = 0; \
-    structure.value_at = 0; \
-    macro_f_string_dynamic_t_clear(structure.value_name)
-
-  #define macro_fss_extended_list_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name)
-#endif // _di_fss_extended_list_read_depth_t_
-
-/**
- * An array of depth parameters.
- *
- * array: the array of depths.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_fss_extended_list_read_depths_t_
-  typedef struct {
-    fss_extended_list_read_depth_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } fss_extended_list_read_depths_t;
-
-  #define fss_extended_list_read_depths_t_initialize { 0, 0, 0 }
-
-  #define macro_fss_extended_list_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
-
-  #define macro_fss_extended_list_read_depths_t_delete_simple(depths) \
-    depths.used = depths.size; \
-    while (depths.used > 0) { \
-      depths.used--; \
-      macro_fss_extended_list_read_depth_t_delete_simple(depths.array[depths.used]); \
-    } \
-    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_extended_list_read_depth_t)
-
-  #define macro_fss_extended_list_read_depths_t_resize(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_extended_list_read_depth_t_delete_simple(depths.array[i]); \
-        if (F_status_is_error(status)) break; \
-      } \
-    } \
-    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_extended_list_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-
-  #define macro_fss_extended_list_read_depths_t_adjust(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_extended_list_read_depth_t_delete_simple(depths.array[i]); \
-        if (F_status_is_error(status)) break; \
-      } \
-    } \
-    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_extended_list_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-#endif // _di_fss_extended_list_read_depths_t_
-
-/**
  * Pre-process the parameters, parsing out and handling the depth and depth related parameters.
  *
  * Will handle depth-sensitive parameter conflicts, such as --name being used with --at (which is not allowed).
index b312f39e79b5f61e1487ed0acf4789d18d18722c..b8448f6d39b769e5f0e01ad782306a04fcb31385 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_extended_list_read.c private-fss_extended_list_read.c
+build_sources_library fss_extended_list_read.c private-common.c private-fss_extended_list_read.c
 build_sources_program main.c
 build_sources_headers fss_extended_list_read.h
 build_sources_script
index e105cfbdef18e2cddcfceb67ca0c8e3ff944ec7e..78869db3d9d08fe57b9436a99648afa782dbffe4 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_list_write.h"
+#include "private-common.h"
 #include "private-fss_extended_list_write.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_extended_list_write/c/private-common.c b/level_3/fss_extended_list_write/c/private-common.c
new file mode 100644 (file)
index 0000000..4e3d529
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_extended_list_write.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_extended_list_write/c/private-common.h b/level_3/fss_extended_list_write/c/private-common.h
new file mode 100644 (file)
index 0000000..e72a46d
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Extended List Write
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 561a46c507af7acad07f37d4cb7105ba7613c0d3..acdb66c377aa922c75250debe584e351cabf8c81 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_list_write.h"
+#include "private-common.h"
 #include "private-fss_extended_list_write.h"
 
 #ifdef __cplusplus
index 13dbe49549d86885850533e55016b9db2f2be13b..1c4b86ac71b8bdb278d2afe296bd575bc59aab1a 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_extended_list_write.c private-fss_extended_list_write.c
+build_sources_library fss_extended_list_write.c private-common.c private-fss_extended_list_write.c
 build_sources_program main.c
 build_sources_headers fss_extended_list_write.h
 build_sources_script
index 0677a8460bc7147b61b72bc1be0e2fc77b145de5..4d2a59703c229049ffbd57bee80b4ea92d9c2b8c 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_read.h"
+#include "private-common.h"
 #include "private-fss_extended_read.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_extended_read/c/private-common.c b/level_3/fss_extended_read/c/private-common.c
new file mode 100644 (file)
index 0000000..71344c8
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_extended_read.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_extended_read/c/private-common.h b/level_3/fss_extended_read/c/private-common.h
new file mode 100644 (file)
index 0000000..5644c68
--- /dev/null
@@ -0,0 +1,116 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Extended Read
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure of parameters applied at some depth.
+ *
+ * depth: the depth number in which this is to be processed at.
+ *
+ * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
+ * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
+ *
+ * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
+ * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
+ */
+#ifndef _di_fss_extended_read_depth_t_
+  typedef struct {
+    f_array_length_t depth;
+
+    f_array_length_t index_at;
+    f_array_length_t index_name;
+
+    f_number_unsigned_t value_at;
+    f_string_dynamic_t  value_name;
+  } fss_extended_read_depth_t;
+
+  #define fss_extended_read_depth_t_initialize \
+    { \
+      0, \
+      0, \
+      0, \
+      0, \
+      f_string_dynamic_t_initialize, \
+    }
+
+  #define macro_fss_extended_read_depth_t_clear(structure) \
+    structure.depth = 0; \
+    structure.index_at = 0; \
+    structure.index_name = 0; \
+    structure.value_at = 0; \
+    macro_f_string_dynamic_t_clear(structure.value_name)
+
+  #define macro_fss_extended_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name)
+#endif // _di_fss_extended_read_depth_t_
+
+/**
+ * An array of depth parameters.
+ *
+ * array: the array of depths.
+ * size: total amount of allocated space.
+ * used: total number of allocated spaces used.
+ */
+#ifndef _di_fss_extended_read_depths_t_
+  typedef struct {
+    fss_extended_read_depth_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } fss_extended_read_depths_t;
+
+  #define fss_extended_read_depths_t_initialize { 0, 0, 0 }
+
+  #define macro_fss_extended_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
+
+  #define macro_fss_extended_read_depths_t_delete_simple(depths) \
+    depths.used = depths.size; \
+    while (depths.used > 0) { \
+      depths.used--; \
+      macro_fss_extended_read_depth_t_delete_simple(depths.array[depths.used]); \
+    } \
+    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_extended_read_depth_t)
+
+  #define macro_fss_extended_read_depths_t_resize(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_extended_read_depth_t_delete_simple(depths.array[i]); \
+      } \
+    } \
+    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_extended_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+
+  #define macro_fss_extended_read_depths_t_adjust(status, depths, new_length) \
+    status = F_none; \
+    if (new_length < depths.size) { \
+      f_array_length_t i = depths.size - new_length; \
+      for (; i < depths.size; i++) { \
+        macro_fss_extended_read_depth_t_delete_simple(depths.array[i]); \
+      } \
+    } \
+    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_extended_read_depth_t), (void **) & depths.array); \
+    if (status == F_none) { \
+      depths.size = new_length; \
+      if (depths.used > depths.size) depths.used = new_length; \
+    }
+#endif // _di_fss_extended_read_depths_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 56931c9ee26b74734ef7842f99fd9747169628b9..78bc3db7896db7b95ee98dc9390f178a187f8c98 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_read.h"
+#include "private-common.h"
 #include "private-fss_extended_read.h"
 
 #ifdef __cplusplus
index 71e787db527b407d474cac2131dd839f0cd157ba..bcf4be7e3b203c52b325b92a22ee7069c12f48e0 100644 (file)
@@ -13,103 +13,6 @@ extern "C" {
 #endif
 
 /**
- * A structure of parameters applied at some depth.
- *
- * depth: the depth number in which this is to be processed at.
- *
- * index_at: position of the "--at" parameter value in the argv list, when 0 there is no parameter.
- * index_name: position of the "--name" parameter value in the argv list, when 0 there is no parameter.
- *
- * value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
- * value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
- */
-#ifndef _di_fss_extended_read_depth_t_
-  typedef struct {
-    f_array_length_t depth;
-
-    f_array_length_t index_at;
-    f_array_length_t index_name;
-
-    f_number_unsigned_t value_at;
-    f_string_dynamic_t  value_name;
-  } fss_extended_read_depth_t;
-
-  #define fss_extended_read_depth_t_initialize \
-    { \
-      0, \
-      0, \
-      0, \
-      0, \
-      f_string_dynamic_t_initialize, \
-    }
-
-  #define macro_fss_extended_read_depth_t_clear(structure) \
-    structure.depth = 0; \
-    structure.index_at = 0; \
-    structure.index_name = 0; \
-    structure.value_at = 0; \
-    macro_f_string_dynamic_t_clear(structure.value_name)
-
-  #define macro_fss_extended_read_depth_t_delete_simple(structure)  macro_f_string_dynamic_t_delete_simple(structure.value_name)
-#endif // _di_fss_extended_read_depth_t_
-
-/**
- * An array of depth parameters.
- *
- * array: the array of depths.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_fss_extended_read_depths_t_
-  typedef struct {
-    fss_extended_read_depth_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } fss_extended_read_depths_t;
-
-  #define fss_extended_read_depths_t_initialize { 0, 0, 0 }
-
-  #define macro_fss_extended_read_depths_t_clear(depths) macro_f_memory_structure_clear(depths)
-
-  #define macro_fss_extended_read_depths_t_delete_simple(depths) \
-    depths.used = depths.size; \
-    while (depths.used > 0) { \
-      depths.used--; \
-      macro_fss_extended_read_depth_t_delete_simple(depths.array[depths.used]); \
-    } \
-    if (!depths.used) macro_f_memory_structure_delete_simple(depths, fss_extended_read_depth_t)
-
-  #define macro_fss_extended_read_depths_t_resize(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_extended_read_depth_t_delete_simple(depths.array[i]); \
-      } \
-    } \
-    if (status == F_none) status = f_memory_resize(depths.size, new_length, sizeof(fss_extended_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-
-  #define macro_fss_extended_read_depths_t_adjust(status, depths, new_length) \
-    status = F_none; \
-    if (new_length < depths.size) { \
-      f_array_length_t i = depths.size - new_length; \
-      for (; i < depths.size; i++) { \
-        macro_fss_extended_read_depth_t_delete_simple(depths.array[i]); \
-      } \
-    } \
-    if (status == F_none) status = f_memory_adjust(depths.size, new_length, sizeof(fss_extended_read_depth_t), (void **) & depths.array); \
-    if (status == F_none) { \
-      depths.size = new_length; \
-      if (depths.used > depths.size) depths.used = new_length; \
-    }
-#endif // _di_fss_extended_read_depths_t_
-
-/**
  * Determine if the given depth is to be delimited or not.
  *
  * @param main
index 4f0e65fe742e63975861661277e81a574cefa784..3e137984a94314f1e22d825d31cfa1ec94ecdcd8 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_extended_read.c private-fss_extended_read.c
+build_sources_library fss_extended_read.c private-common.c private-fss_extended_read.c
 build_sources_program main.c
 build_sources_headers fss_extended_read.h
 build_sources_script
index 6263be91bbce3b695191d0ae80f88b0b4794a77f..2f8029ef4a22b823f47e08d91cdeb97e4f632462 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_write.h"
+#include "private-common.h"
 #include "private-fss_extended_write.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_extended_write/c/private-common.c b/level_3/fss_extended_write/c/private-common.c
new file mode 100644 (file)
index 0000000..635db9c
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_extended_write.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_extended_write/c/private-common.h b/level_3/fss_extended_write/c/private-common.h
new file mode 100644 (file)
index 0000000..3416f30
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Extended Write
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 9382e1c0913db71360b529c48fbbcf3097091ff2..bd98de221ab91d17b89b45e4c42f8a08097d1954 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_extended_write.h"
+#include "private-common.h"
 #include "private-fss_extended_write.h"
 
 #ifdef __cplusplus
index 3e047018c1752e1140a25405ba1f45551a46ad38..9ddbc348dac49b772d636e0d5396e248f0a33850 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_extended_write.c private-fss_extended_write.c
+build_sources_library fss_extended_write.c private-common.c private-fss_extended_write.c
 build_sources_program main.c
 build_sources_headers fss_extended_write.h
 build_sources_script
index 17f35b149a34c0e2bb92bd3a4fd8c0c0d0f4375b..aa6fa359fa70f06aff6022187d23ce8e2c2b777c 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_status_code.h"
+#include "private-common.h"
 #include "private-fss_status_code.h"
 
 #ifdef __cplusplus
diff --git a/level_3/fss_status_code/c/private-common.c b/level_3/fss_status_code/c/private-common.c
new file mode 100644 (file)
index 0000000..24a88a7
--- /dev/null
@@ -0,0 +1,10 @@
+#include "fss_status_code.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fss_status_code/c/private-common.h b/level_3/fss_status_code/c/private-common.h
new file mode 100644 (file)
index 0000000..9d44e9a
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Status Code
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 3179684ea03708bce80b760d45bd3ac3f56556c0..4b1f433cf5b1a578baba606d029721f1acc13448 100644 (file)
@@ -1,4 +1,5 @@
 #include "fss_status_code.h"
+#include "private-common.h"
 #include "private-fss_status_code.h"
 
 #ifdef __cplusplus
index 4b8748e367f7be41236504ccf4e71e84502edf08..0e5dc2cbf4a161e63cb68b992fbf953a26705dae 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_program -lfll_status -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_directory -lf_environment -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library fss_status_code.c private-fss_status_code.c
+build_sources_library fss_status_code.c private-common.c private-fss_status_code.c
 build_sources_program main.c
 build_sources_headers fss_status_code.h
 build_sources_script
index 077874c7ce9f9aa0aaefc7fb9e6dab758b2f162a..b7fc172168d0ef544568d331e36ba54e01e6d51c 100644 (file)
@@ -1,4 +1,5 @@
 #include "iki_read.h"
+#include "private-common.h"
 #include "private-iki_read.h"
 
 #ifdef __cplusplus
diff --git a/level_3/iki_read/c/private-common.c b/level_3/iki_read/c/private-common.c
new file mode 100644 (file)
index 0000000..ea6bcd8
--- /dev/null
@@ -0,0 +1,10 @@
+#include "iki_read.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_read/c/private-common.h b/level_3/iki_read/c/private-common.h
new file mode 100644 (file)
index 0000000..0b00619
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 80ea4380092b1d68ed5783e2d6a6474bc131bc8a..b8a9147c1a827d0607d90fcffae40cdff9336f64 100644 (file)
@@ -1,4 +1,5 @@
 #include "iki_read.h"
+#include "private-common.h"
 #include "private-iki_read.h"
 
 #ifdef __cplusplus
index ff22151e89f5a555e095b521304fdbcbfa54cff2..e80ded234e837a31d7c2dab0fcb542eaf65e3d71 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_program -lfl_console -lfl_conversion -lfl_iki -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library iki_read.c private-iki_read.c
+build_sources_library iki_read.c private-common.c private-iki_read.c
 build_sources_program main.c
 build_sources_headers iki_read.h
 build_sources_script
index db5e836d485b770cc77dd3c4c33fd2cdf7ae5667..6017a1237c6d7916c48cd55eefe7dcf509881eaa 100644 (file)
@@ -1,4 +1,5 @@
 #include "iki_write.h"
+#include "private-common.h"
 #include "private-iki_write.h"
 
 #ifdef __cplusplus
diff --git a/level_3/iki_write/c/private-common.c b/level_3/iki_write/c/private-common.c
new file mode 100644 (file)
index 0000000..f860d81
--- /dev/null
@@ -0,0 +1,10 @@
+#include "iki_write.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/iki_write/c/private-common.h b/level_3/iki_write/c/private-common.h
new file mode 100644 (file)
index 0000000..114ebf9
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index 510449be4869fe6d3fdc93e2df1f8d769abb9d3c..a0142c6490322734e94de6684faf514663ff381b 100644 (file)
@@ -1,4 +1,5 @@
 #include "iki_write.h"
+#include "private-common.h"
 #include "private-iki_write.h"
 
 #ifdef __cplusplus
index 62b66fa4be9080bf24e3d08c071b0032dc203348..5e72495b249de0c6c879478b591a91889a0730ce 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_iki -lfll_program -lfl_console -lfl_iki -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library iki_write.c private-iki_write.c
+build_sources_library iki_write.c private-common.c private-iki_write.c
 build_sources_program main.c
 build_sources_headers iki_write.h
 build_sources_script
diff --git a/level_3/status_code/c/private-common.c b/level_3/status_code/c/private-common.c
new file mode 100644 (file)
index 0000000..7540b79
--- /dev/null
@@ -0,0 +1,10 @@
+#include "status_code.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/status_code/c/private-common.h b/level_3/status_code/c/private-common.h
new file mode 100644 (file)
index 0000000..1b7c102
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ */
+#ifndef _PRIVATE_common_h
+#define _PRIVATE_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_common_h
index b0e6bddf18c5ffd92ce587cdaaa5ceb81cd6842b..5ebe0365e4b18e8bd3c071cc72ef859b345f7103 100644 (file)
@@ -1,4 +1,5 @@
 #include "status_code.h"
+#include "private-common.h"
 #include "private-status_code.h"
 
 #ifdef __cplusplus
index 81e0f44207335ce778837a2a1a69cb18cc886a29..5cd744000a2fbad7940230a612348ef1769f2f1b 100644 (file)
@@ -1,4 +1,5 @@
 #include "status_code.h"
+#include "private-common.h"
 #include "private-status_code.h"
 
 #ifdef __cplusplus
index 4249e00bd53420f040108b54141950c36ba015ce..110a5f55d51209ae30a568a3e1575450a3dd3146 100644 (file)
@@ -22,7 +22,7 @@ build_libraries -lc
 build_libraries-individual -lfll_error -lfll_program -lfll_status -lfl_console -lfl_conversion -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
-build_sources_library status_code.c private-status_code.c
+build_sources_library status_code.c private-common.c private-status_code.c
 build_sources_program main.c
 build_sources_headers status_code.h
 build_sources_script