]> Kevux Git Server - fll/commitdiff
Update: Callback changes and improvements.
authorKevin Day <Kevin@kevux.org>
Sun, 9 Feb 2025 06:20:23 +0000 (00:20 -0600)
committerKevin Day <Kevin@kevux.org>
Sun, 9 Feb 2025 06:20:23 +0000 (00:20 -0600)
The `void *(*)(void *)` function structure is being used so add that as a function callback type `f_void_pointer_call_t`.

Add `fl_print_call_t` function callback type.

Rename the console parameter callback from `callback` to `on_match`.
Add `f_console_parameters_call_t` function callback type.
Fix documentation comment where `length` should instead be `used`.

The `void_main` are now replaced with literal `main` type now that the typedef structure improvements are in place.

Shorten the `callback` name to `call`.
Use more typedefs for functions.
This better takes advantage of how functions are a "first class citizen" in C.

76 files changed:
build/stand_alone/byte_dump.config.h
build/stand_alone/example.config.h
build/stand_alone/fake.config.h
build/stand_alone/firewall.config.h
build/stand_alone/utf8.config.h
level_0/f_console/c/console.c
level_0/f_console/c/console/common.h
level_0/f_directory/c/directory/recurse_do.h
level_0/f_thread/c/thread.c
level_0/f_thread/c/thread.h
level_0/f_type/c/type/state.h
level_0/f_type/c/type/void.h
level_1/fl_print/c/print/common.h
level_3/fake/c/main/main.c
level_3/fss_read/c/basic/fss_read.c
level_3/fss_read/c/basic/fss_read.h
level_3/fss_read/c/basic/main.c
level_3/fss_read/c/basic_list/fss_read.c
level_3/fss_read/c/basic_list/fss_read.h
level_3/fss_read/c/basic_list/main.c
level_3/fss_read/c/embedded_list/fss_read.c
level_3/fss_read/c/embedded_list/fss_read.h
level_3/fss_read/c/embedded_list/main.c
level_3/fss_read/c/embedded_list/process.c
level_3/fss_read/c/embedded_list/process.h
level_3/fss_read/c/extended/fss_read.c
level_3/fss_read/c/extended/fss_read.h
level_3/fss_read/c/extended/main.c
level_3/fss_read/c/extended_list/fss_read.c
level_3/fss_read/c/extended_list/fss_read.h
level_3/fss_read/c/extended_list/main.c
level_3/fss_read/c/main/common.c
level_3/fss_read/c/main/common.h
level_3/fss_read/c/main/common/type.h
level_3/fss_read/c/main/fss_read.c
level_3/fss_read/c/main/fss_read.h
level_3/fss_read/c/main/main.c
level_3/fss_read/c/main/main.h
level_3/fss_read/c/main/print/data.c
level_3/fss_read/c/main/process.c
level_3/fss_read/c/main/process.h
level_3/fss_read/c/payload/fss_read.c
level_3/fss_read/c/payload/fss_read.h
level_3/fss_read/c/payload/main.c
level_3/fss_read/c/payload/print.c
level_3/fss_write/c/basic/fss_write.c
level_3/fss_write/c/basic/fss_write.h
level_3/fss_write/c/basic/main.c
level_3/fss_write/c/basic_list/fss_write.c
level_3/fss_write/c/basic_list/fss_write.h
level_3/fss_write/c/basic_list/main.c
level_3/fss_write/c/embedded_list/fss_write.c
level_3/fss_write/c/embedded_list/fss_write.h
level_3/fss_write/c/embedded_list/main.c
level_3/fss_write/c/extended/fss_write.c
level_3/fss_write/c/extended/fss_write.h
level_3/fss_write/c/extended/main.c
level_3/fss_write/c/extended_list/fss_write.c
level_3/fss_write/c/extended_list/fss_write.h
level_3/fss_write/c/extended_list/main.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/common/type.h
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/main/fss_write.h
level_3/fss_write/c/main/main.c
level_3/fss_write/c/main/main.h
level_3/fss_write/c/payload/fss_write.c
level_3/fss_write/c/payload/fss_write.h
level_3/fss_write/c/payload/main.c
level_3/iki_read/c/main/common/type.c
level_3/iki_read/c/main/common/type.h
level_3/iki_read/c/main/iki_read.c
level_3/iki_read/c/main/process.c
level_3/iki_write/c/main/common/type.h
level_3/iki_write/c/main/iki_write.c

index 8ad648b8739fcda2682b8a361d64dd874d637be9..6701a8bf427cf1c7710ef653bd5fb379909d8ca8 100644 (file)
 #define _di_fl_conversion_dynamic_to_signed_detect_
 #define _di_fl_conversion_dynamic_to_unsigned_
 //#define _di_fl_conversion_dynamic_to_unsigned_detect_
+#define _di_fl_print_call_t_
 //#define _di_fl_print_debug_s_
 //#define _di_fl_print_error_s_
 //#define _di_fl_print_format_
index 9c9bca5f70679ccd32a0b5e60076eb47e623ccfd..66362c2433b6631cafefaeafde323ee6bf2db3fb 100644 (file)
 #define _di_f_utf_unicode_to_
 #define _di_f_utf_width_e_
 #define _di_f_void_call_t_
+#define _di_fl_print_call_t_
 //#define _di_fl_print_debug_s_
 //#define _di_fl_print_error_s_
 //#define _di_fl_print_format_
index 56ec4a34f099719fb33c754937d3b9a7f51266f3..d3612b75b8e118d0b670d4cd60a6fb48f9dcd71e 100644 (file)
 //#define _di_fl_iki_read_
 //#define _di_fl_path_canonical_
 #define _di_fl_path_clean_
+#define _di_fl_print_call_t_
 //#define _di_fl_print_debug_s_
 //#define _di_fl_print_error_s_
 //#define _di_fl_print_format_
index 1b32b4f9b6bbad2b955e769a5de5f26d6994445d..2ad5eb2997b5ff7d4dda3604670beb73d2298457 100644 (file)
 #define _di_fl_iki_read_
 #define _di_fl_path_canonical_
 #define _di_fl_path_clean_
+#define _di_fl_print_call_t_
 //#define _di_fl_print_debug_s_
 //#define _di_fl_print_error_s_
 //#define _di_fl_print_format_
index 9621de3639baa1b387d8e2467dcf36d9605a9dd2..1218fb1bcca6170a3f5fd21fbf596684a4ffa54a 100644 (file)
 #define _di_fl_conversion_dynamic_to_signed_detect_
 #define _di_fl_conversion_dynamic_to_unsigned_
 //#define _di_fl_conversion_dynamic_to_unsigned_detect_
+#define _di_fl_print_call_t_
 //#define _di_fl_print_debug_s_
 //#define _di_fl_print_error_s_
 //#define _di_fl_print_format_
index 74c55ca4ea2be80356b7bf4930214ba7656d106d..3a4c57ba8a7dfc33f239f3376bfaae45e9aae6da 100644 (file)
@@ -204,11 +204,11 @@ extern "C" {
 
       // Additional parameters must always follow what requests ("needs") them.
       if (process.needs.used) {
-        if (parameters->callback) {
+        if (parameters->on_match) {
           process.type = f_console_parameter_state_type_need_e;
           process.at = process.needs.array[0];
 
-          parameters->callback(arguments, (void * const) parameters, &process, data);
+          parameters->on_match(arguments, (void * const) parameters, &process, data);
           if (F_status_is_error(state->status)) break;
           if (state->status == F_break) break;
           if (state->status == F_continue) continue;
@@ -235,11 +235,11 @@ extern "C" {
         continue;
       }
 
-      if (parameters->callback) {
+      if (parameters->on_match) {
         process.type = f_console_parameter_state_type_identify_e;
         process.at = 0;
 
-        parameters->callback(arguments, (void * const) parameters, &process, data);
+        parameters->on_match(arguments, (void * const) parameters, &process, data);
         if (F_status_is_error(state->status)) break;
         if (state->status == F_break) break;
         if (state->status == F_continue) continue;
@@ -279,11 +279,11 @@ extern "C" {
 
             process.width = macro_f_utf_byte_width_is(arguments.argv[process.location][process.location_sub]);
 
-            if (parameters->callback) {
+            if (parameters->on_match) {
               process.type = f_console_parameter_state_type_short_preprocess_e;
               process.at = i;
 
-              parameters->callback(arguments, (void * const) parameters, &process, data);
+              parameters->on_match(arguments, (void * const) parameters, &process, data);
               if (F_status_is_error(state->status)) break;
 
               if (state->status == F_break || state->status == F_continue) {
@@ -397,11 +397,11 @@ extern "C" {
               if (!parameters->array[i].match_short.string) continue;
               if (arguments.argv[process.location][process.location_sub] != *parameters->array[i].match_short.string) continue;
 
-              if (parameters->callback) {
+              if (parameters->on_match) {
                 process.type = f_console_parameter_state_type_short_e;
                 process.at = i;
 
-                parameters->callback(arguments, (void * const) parameters, &process, data);
+                parameters->on_match(arguments, (void * const) parameters, &process, data);
                 if (F_status_is_error(state->status)) break;
 
                 if (state->status == F_break || state->status == F_continue) {
@@ -502,11 +502,11 @@ extern "C" {
             if (!parameters->array[i].match_long.string) continue;
             if (strncmp(&arguments.argv[process.location][process.location_sub], parameters->array[i].match_long.string, parameters->array[i].match_long.used + 1)) continue;
 
-            if (parameters->callback) {
+            if (parameters->on_match) {
               process.type = f_console_parameter_state_type_long_e;
               process.at = i;
 
-              parameters->callback(arguments, (void * const) parameters, &process, data);
+              parameters->on_match(arguments, (void * const) parameters, &process, data);
               if (F_status_is_error(state->status)) break;
 
               if (state->status == F_break || state->status == F_continue) {
@@ -545,11 +545,11 @@ extern "C" {
             if (!parameters->array[i].match_simple.used && !parameters->array[i].match_simple.string) continue;
             if (strncmp(arguments.argv[process.location], parameters->array[i].match_simple.string, parameters->array[i].match_simple.used + 1)) continue;
 
-            if (parameters->callback) {
+            if (parameters->on_match) {
               process.type = f_console_parameter_state_type_simple_e;
               process.at = i;
 
-              parameters->callback(arguments, (void * const) parameters, &process, data);
+              parameters->on_match(arguments, (void * const) parameters, &process, data);
               if (F_status_is_error(state->status)) break;
 
               if (state->status == F_break || state->status == F_continue) {
@@ -615,11 +615,11 @@ extern "C" {
 
       // Add the missed parameter to the remaining array.
       if (!process.found) {
-        if (parameters->callback) {
+        if (parameters->on_match) {
           process.type = f_console_parameter_state_type_miss_e;
           process.at = 0;
 
-          parameters->callback(arguments, (void * const) parameters, &process, data);
+          parameters->on_match(arguments, (void * const) parameters, &process, data);
           if (F_status_is_error(state->status)) break;
           if (state->status == F_break) break;
           if (state->status == F_continue) continue;
@@ -642,11 +642,11 @@ extern "C" {
     } // while
 
     // Make sure the entire parameters arguments array is populated.
-    if (parameters->callback) {
+    if (parameters->on_match) {
       process.type = f_console_parameter_state_type_wrap_up_e;
       process.at = 0;
 
-      parameters->callback(arguments, (void * const) parameters, &process, data);
+      parameters->on_match(arguments, (void * const) parameters, &process, data);
     }
     else {
       state->status = F_process;
index 651c87cf39cca55fa39c6cd8c1664036a87d0f8c..5b3d8c18ca1634ff7163388182ed1c48f2f20163 100644 (file)
@@ -505,9 +505,9 @@ extern "C" {
  *   - array:     Intended to be populated with an array of f_console_parameter_t whose size is defined by the "used" property.
  *   - arguments: An array of arguments pointing to the argv[] strings with the string lengths already calculated (This is a dynamic array of f_string_static_t).
  *   - remaining: An array of indexes within the arguments representing unmatched parameters.
- *   - length:    The total number of parameters in the parameters array.
+ *   - used:      The total number of parameters in the parameters array.
  *
- * callback: A callback to perform when matched in order to handle condition values.
+ *   - on_match:  A callback to perform when matched in order to handle condition values.
  *
  * The callback function arguments:
  *   - arguments:  The console arguments being processed.
@@ -526,13 +526,15 @@ extern "C" {
  * Failure to properly handle this can lead to integrity and security issues.
  */
 #ifndef _di_f_console_parameters_t_
+  typedef void (*f_console_parameters_call_t) (const f_console_arguments_t arguments, void * const parameters, f_console_parameter_state_t * const state, void * const data);
+
   typedef struct {
     f_console_parameter_t *array;
     f_string_dynamics_t arguments;
     f_number_unsigneds_t remaining;
     f_number_unsigned_t used;
 
-    void (*callback)(const f_console_arguments_t arguments, void * const parameters, f_console_parameter_state_t * const state, void * const data);
+    f_console_parameters_call_t on_match;
   } f_console_parameters_t;
 
   #define f_console_parameters_t_initialize { \
@@ -543,12 +545,12 @@ extern "C" {
     0 \
   }
 
-  #define macro_f_console_parameters_t_initialize_1(parameters, used, callback) { \
+  #define macro_f_console_parameters_t_initialize_1(parameters, used, on_match) { \
     parameters, \
     f_string_dynamics_t_initialize, \
     f_number_unsigneds_t_initialize, \
     used, \
-    callback \
+    on_match \
   }
 #endif // _di_f_console_parameters_t_
 
index b00885bc04a3b01713b678cf702649d755303525..de95672306ce8dc409a999f470371f033369a8fa 100644 (file)
@@ -61,7 +61,7 @@ extern "C" {
 #ifndef _di_f_directory_recurse_do_t_
   typedef struct f_directory_recurse_do_t_ f_directory_recurse_do_t;
 
-  typedef void (*f_directory_recurse_do_call_t)(f_directory_recurse_do_t * const recurse, const f_string_static_t name, const uint16_t flag);
+  typedef void (*f_directory_recurse_do_call_t) (f_directory_recurse_do_t * const recurse, const f_string_static_t name, const uint16_t flag);
 
   struct f_directory_recurse_do_t_ {
     f_number_unsigned_t depth;
index e789c02446298c7a17ca6a7f8fcffd6c4d5a4b58..fb6b3b021d715b0e1d1e0e85ef680dbd2206abd3 100644 (file)
@@ -924,7 +924,7 @@ extern "C" {
 #endif // _di_f_thread_condition_wait_timed_
 
 #ifndef _di_f_thread_create_
-  f_status_t f_thread_create(const f_thread_attribute_t * const attribute, f_thread_id_t * const id, void *(*routine) (void *), void * const argument) {
+  f_status_t f_thread_create(const f_thread_attribute_t * const attribute, f_thread_id_t * const id, const f_void_pointer_call_t routine, void * const argument) {
     #ifndef _di_level_0_parameter_checking_
       if (!id) return F_status_set_error(F_parameter);
       if (!routine) return F_status_set_error(F_parameter);
index 7f64a06d0b92a03307c7b977336620521d21ecd5..80c9cc4965f4d26ad1dbfc535116620eead9c227 100644 (file)
@@ -1270,7 +1270,7 @@ extern "C" {
  * @see pthread_create()
  */
 #ifndef _di_f_thread_create_
-  extern f_status_t f_thread_create(const f_thread_attribute_t * const attribute, f_thread_id_t * const id, void *(*routine) (void *), void * const argument);
+  extern f_status_t f_thread_create(const f_thread_attribute_t * const attribute, f_thread_id_t * const id, const f_void_pointer_call_t routine, void * const argument);
 #endif // _di_f_thread_create_
 
 /**
index 83c5a45bf7b5aecd1fb4daeae721dc3a32ddb284..1c2c87b166ff7bd24192b7515117503e285f8b42 100644 (file)
@@ -69,7 +69,7 @@ extern "C" {
 #ifndef _di_f_state_t_
   typedef struct f_state_t_ f_state_t;
 
-  typedef void (*f_state_call_t)(f_state_t * const state, void * const internal);
+  typedef void (*f_state_call_t) (f_state_t * const state, void * const internal);
 
   struct f_state_t_ {
     uint16_t step_large;
index bdbe5c9c4799894c1f23c5562b43408c963adb82..b67cbc7173890fea899d9a9ded8d497b18d42fc7 100644 (file)
@@ -17,7 +17,7 @@ extern "C" {
 #endif
 
 /**
- * A generic callback function that accepts no parameters and returns no parameters.
+ * A generic callback function that accepts no parameters and returns no variables.
  */
 #ifndef _di_f_void_call_t_
   typedef void (*f_void_call_t) (void);
@@ -25,6 +25,15 @@ extern "C" {
   #define f_void_call_t_initialize 0
 #endif // _di_f_void_call_t_
 
+/**
+ * A generic callback function that accepts a single void pointer parameter and returns a void pointer.
+ */
+#ifndef _di_f_void_pointer_call_t_
+  typedef void *(*f_void_pointer_call_t) (void *);
+
+  #define f_void_call_t_initialize 0
+#endif // _di_f_void_pointer_call_t_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 044045fd7110989368af6ad783cf19e2435dad5a..f9ec5f8565c2a17373134f32d52ca492ad328ee5 100644 (file)
@@ -111,6 +111,15 @@ extern "C" {
   #define macro_fl_print_t_initialize_warning_2(suffix, set) macro_fl_print_t_initialize_1(macro_f_file_t_initialize_2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, 0, fl_print_warning_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set, 0)
 #endif // _di_fl_print_t_
 
+/**
+ * Provide a simple callback fo the print function where only fl_print_t is accepted.
+ *
+ * This returns a status.
+ */
+#ifndef _di_fl_print_call_t_
+  typedef f_status_t (*fl_print_call_t)(fl_print_t * const print);
+#endif // _di_fl_print_call_t_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 15bd06de2fe78edc7963dc43cfa6a5633a51c2c2..a774b69cd459ed77d6f879ef6929a2ea65e424f0 100644 (file)
@@ -27,7 +27,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   f_console_parameter_t parameters[] = fake_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
   data.program.parameters.used = fake_parameter_total_d;
-  data.program.parameters.callback = &fake_setting_load_parameter_callback;
+  data.program.parameters.on_match = &fake_setting_load_parameter_callback;
   data.program.environment = envp;
 
   if (f_pipe_input_exists()) {
index 5c183f1b5f488aafebd22b4500bf498f4559c709..78395933040dd4f45c73e5c304233a33687175b0 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_basic_process_help_
-  void fss_read_basic_process_help(void * const void_main) {
+  void fss_read_basic_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_basic_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_basic_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_basic_process_help_
 
 #ifndef _di_fss_read_basic_process_load_
-  void fss_read_basic_process_load(void * const void_main) {
+  void fss_read_basic_process_load(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     fll_fss_basic_read(main->setting.buffer, &main->setting.range, &main->setting.objects, &main->setting.contents, &main->setting.quotes_object, &main->setting.delimits_object, &main->setting.delimits_content, &main->setting.state);
 
index ad158038d5531194e19628c138fe6d073ffd3b70..134cdd47be4f67881c37d6e0efaf79b70b49af6f 100644 (file)
@@ -72,7 +72,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -81,7 +80,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_basic_process_help_
-  extern void fss_read_basic_process_help(void * const main);
+  extern void fss_read_basic_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_basic_process_help_
 
 /**
@@ -93,7 +92,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -111,7 +109,7 @@ extern "C" {
  * @see fss_read_file_identify()
  */
 #ifndef _di_fss_read_basic_process_load_
-  extern void fss_read_basic_process_load(void * const main);
+  extern void fss_read_basic_process_load(fss_read_main_t * const main);
 #endif // _di_fss_read_basic_process_load_
 
 #ifdef __cplusplus
index 88eae9bc73312bfba04e242782304eb3c49929dd..3627fffbed95ebfe9033b040211e2df9f98f75d8 100644 (file)
@@ -24,27 +24,27 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.standard = fss_read_basic_standard_s;
   data.setting.open_object = f_fss_basic_open_s;
 
-  data.callback.process_help = &fss_read_basic_process_help;
-  data.callback.process_last_line = &fss_read_process_last_line;
-  data.callback.process = &fss_read_process;
-
-  data.callback.process_at = &fss_read_process_at;
-  data.callback.process_at_line = &fss_read_process_at_line;
-  data.callback.process_columns = &fss_read_process_columns;
-  data.callback.process_load = &fss_read_basic_process_load;
-  data.callback.process_name = &fss_read_process_name;
-  data.callback.process_total = &fss_read_process_total;
-
-  data.callback.print_at = &fss_read_print_at;
-  data.callback.print_content = &fss_read_print_content;
-  data.callback.print_content_empty = &fss_read_print_content_empty;
-  data.callback.print_content_ignore = 0;
-  data.callback.print_content_next = 0;
-  data.callback.print_object = &fss_read_print_object;
-  data.callback.print_object_end = &fss_read_basic_print_object_end;
-  data.callback.print_object_end_content = &fss_read_print_object_end_content;
-  data.callback.print_object_end_empty = &fss_read_print_content_empty;
-  data.callback.print_set_end = &fss_read_print_set_end;
+  data.call.process_help = &fss_read_basic_process_help;
+  data.call.process_last_line = &fss_read_process_last_line;
+  data.call.process = &fss_read_process;
+
+  data.call.process_at = &fss_read_process_at;
+  data.call.process_at_line = &fss_read_process_at_line;
+  data.call.process_columns = &fss_read_process_columns;
+  data.call.process_load = &fss_read_basic_process_load;
+  data.call.process_name = &fss_read_process_name;
+  data.call.process_total = &fss_read_process_total;
+
+  data.call.print_at = &fss_read_print_at;
+  data.call.print_content = &fss_read_print_content;
+  data.call.print_content_empty = &fss_read_print_content_empty;
+  data.call.print_content_ignore = 0;
+  data.call.print_content_next = 0;
+  data.call.print_object = &fss_read_print_object;
+  data.call.print_object_end = &fss_read_basic_print_object_end;
+  data.call.print_object_end_content = &fss_read_print_object_end_content;
+  data.call.print_object_end_empty = &fss_read_print_content_empty;
+  data.call.print_set_end = &fss_read_print_set_end;
 
   f_console_parameter_t parameters[] = fss_read_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index c00338ff0399ca6695b0d0f4e4470ba57c8dbcc2..4a0bb1a3a295ca8d69a4254f10dbc592c3dbf1be 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_basic_list_process_help_
-  void fss_read_basic_list_process_help(void * const void_main) {
+  void fss_read_basic_list_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_basic_list_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_basic_list_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_basic_list_process_help_
 
 #ifndef _di_fss_read_basic_list_process_load_
-  void fss_read_basic_list_process_load(void * const void_main) {
+  void fss_read_basic_list_process_load(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     fll_fss_basic_list_read(main->setting.buffer, &main->setting.range, &main->setting.objects, &main->setting.contents, &main->setting.delimits_object, &main->setting.delimits_content, &main->setting.comments, &main->setting.state);
 
index b6378443faab69937868b4ec1fd548615a2711ec..531e0249e9655b83bc188e288b7f8b5b8e8936b2 100644 (file)
@@ -72,7 +72,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -81,7 +80,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_basic_list_process_help_
-  extern void fss_read_basic_list_process_help(void * const main);
+  extern void fss_read_basic_list_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_basic_list_process_help_
 
 /**
@@ -93,7 +92,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -111,7 +109,7 @@ extern "C" {
  * @see fss_read_file_identify()
  */
 #ifndef _di_fss_read_basic_list_process_load_
-  extern void fss_read_basic_list_process_load(void * const main);
+  extern void fss_read_basic_list_process_load(fss_read_main_t * const main);
 #endif // _di_fss_read_basic_list_process_load_
 
 #ifdef __cplusplus
index b22d94e837f1cce3323385248dcfecc20b58f69a..38f3ccfe052b03d9766ca231cb4b58c0e3a9ad84 100644 (file)
@@ -24,26 +24,26 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.standard = fss_read_basic_list_standard_s;
   data.setting.open_object = f_fss_basic_list_open_s;
 
-  data.callback.process_help = &fss_read_basic_list_process_help;
-  data.callback.process_last_line = &fss_read_process_last_line;
-  data.callback.process = &fss_read_process;
-
-  data.callback.process_at = &fss_read_process_at;
-  data.callback.process_at_line = &fss_read_process_at_line;
-  data.callback.process_columns = &fss_read_process_columns;
-  data.callback.process_load = &fss_read_basic_list_process_load;
-  data.callback.process_name = &fss_read_process_name;
-  data.callback.process_total = &fss_read_process_total_multiple;
-
-  data.callback.print_at = &fss_read_print_at;
-  data.callback.print_content = &fss_read_print_content;
-  data.callback.print_content_ignore = &fss_read_print_content_ignore;
-  data.callback.print_content_next = 0;
-  data.callback.print_object = &fss_read_print_object;
-  data.callback.print_object_end = &fss_read_basic_list_print_object_end;
-  data.callback.print_object_end_content = &fss_read_print_object_end_content;
-  data.callback.print_object_end_empty = &fss_read_print_object_end_empty;
-  data.callback.print_set_end = &fss_read_print_set_end_no_eol;
+  data.call.process_help = &fss_read_basic_list_process_help;
+  data.call.process_last_line = &fss_read_process_last_line;
+  data.call.process = &fss_read_process;
+
+  data.call.process_at = &fss_read_process_at;
+  data.call.process_at_line = &fss_read_process_at_line;
+  data.call.process_columns = &fss_read_process_columns;
+  data.call.process_load = &fss_read_basic_list_process_load;
+  data.call.process_name = &fss_read_process_name;
+  data.call.process_total = &fss_read_process_total_multiple;
+
+  data.call.print_at = &fss_read_print_at;
+  data.call.print_content = &fss_read_print_content;
+  data.call.print_content_ignore = &fss_read_print_content_ignore;
+  data.call.print_content_next = 0;
+  data.call.print_object = &fss_read_print_object;
+  data.call.print_object_end = &fss_read_basic_list_print_object_end;
+  data.call.print_object_end_content = &fss_read_print_object_end_content;
+  data.call.print_object_end_empty = &fss_read_print_object_end_empty;
+  data.call.print_set_end = &fss_read_print_set_end_no_eol;
 
   f_console_parameter_t parameters[] = fss_read_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index bcfa371e011d92a39d8ae436342c1b3086fdb599..29611b92be082c3fd0023c47913e5a8b3b3bc15d 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_embedded_list_process_help_
-  void fss_read_embedded_list_process_help(void * const void_main) {
+  void fss_read_embedded_list_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_embedded_list_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_embedded_list_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_embedded_list_process_help_
 
 #ifndef _di_fss_read_embedded_list_process_load_
-  void fss_read_embedded_list_process_load(void * const void_main) {
+  void fss_read_embedded_list_process_load(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     {
       f_state_t state = main->setting.state;
index 3d401f75020760af97dc075bb43248cfad5ba36b..60b98094c77f2a4549db3208b377d366e8a73419 100644 (file)
@@ -73,7 +73,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -82,7 +81,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_embedded_list_process_help_
-  extern void fss_read_embedded_list_process_help(void * const main);
+  extern void fss_read_embedded_list_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_embedded_list_process_help_
 
 /**
@@ -94,7 +93,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -112,7 +110,7 @@ extern "C" {
  * @see fss_read_file_identify()
  */
 #ifndef _di_fss_read_embedded_list_process_load_
-  extern void fss_read_embedded_list_process_load(void * const main);
+  extern void fss_read_embedded_list_process_load(fss_read_main_t * const main);
 #endif // _di_fss_read_embedded_list_process_load_
 
 #ifdef __cplusplus
index 2f9f46b346adc742421575826915022aebb9468c..2c309e5e135b661eb752b462f0aade260c0a9eea 100644 (file)
@@ -25,26 +25,26 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.standard = fss_read_embedded_list_standard_s;
   data.setting.open_object = f_fss_embedded_list_open_s;
 
-  data.callback.process_help = &fss_read_embedded_list_process_help;
-  data.callback.process_last_line = &fss_read_process_last_line;
-  data.callback.process = &fss_read_embedded_list_process;
-
-  data.callback.process_at = &fss_read_process_at;
-  data.callback.process_at_line = &fss_read_process_at_line;
-  data.callback.process_columns = &fss_read_process_columns;
-  data.callback.process_load = &fss_read_embedded_list_process_load;
-  data.callback.process_name = &fss_read_process_name;
-  data.callback.process_total = &fss_read_process_total_multiple;
-
-  data.callback.print_at = &fss_read_print_at;
-  data.callback.print_content = &fss_read_print_content;
-  data.callback.print_content_ignore = &fss_read_print_content_ignore;
-  data.callback.print_content_next = 0;
-  data.callback.print_object = &fss_read_print_object;
-  data.callback.print_object_end = &fss_read_embedded_list_print_object_end;
-  data.callback.print_object_end_content = &fss_read_print_object_end_content;
-  data.callback.print_object_end_empty = &fss_read_print_object_end_empty;
-  data.callback.print_set_end = &fss_read_embedded_list_print_set_end;
+  data.call.process_help = &fss_read_embedded_list_process_help;
+  data.call.process_last_line = &fss_read_process_last_line;
+  data.call.process = &fss_read_embedded_list_process;
+
+  data.call.process_at = &fss_read_process_at;
+  data.call.process_at_line = &fss_read_process_at_line;
+  data.call.process_columns = &fss_read_process_columns;
+  data.call.process_load = &fss_read_embedded_list_process_load;
+  data.call.process_name = &fss_read_process_name;
+  data.call.process_total = &fss_read_process_total_multiple;
+
+  data.call.print_at = &fss_read_print_at;
+  data.call.print_content = &fss_read_print_content;
+  data.call.print_content_ignore = &fss_read_print_content_ignore;
+  data.call.print_content_next = 0;
+  data.call.print_object = &fss_read_print_object;
+  data.call.print_object_end = &fss_read_embedded_list_print_object_end;
+  data.call.print_object_end_content = &fss_read_print_object_end_content;
+  data.call.print_object_end_empty = &fss_read_print_object_end_empty;
+  data.call.print_set_end = &fss_read_embedded_list_print_set_end;
 
   f_console_parameter_t parameters[] = fss_read_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index e6f91f3aa9e32501dcb586b86126f9f932370ebe..7f2e5128f5245697281f36f46ecb85d7540d34e2 100644 (file)
@@ -6,14 +6,12 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_embedded_list_process_
-  void fss_read_embedded_list_process(void * const void_main) {
+  void fss_read_embedded_list_process(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     // The process_load() callback is required to be non-NULL.
-    if (!main->callback.process_load) return;
+    if (!main->call.process_load) return;
 
     // This standard does not support multiple select, so any select greater than 0 can be predicted without processing the buffer.
     if ((main->setting.flag & fss_read_main_flag_select_d) && main->setting.select) {
@@ -44,7 +42,7 @@ extern "C" {
     main->setting.quotes_object.used = 0;
     main->setting.quotes_content.used = 0;
 
-    main->callback.process_load(main);
+    main->call.process_load(main);
     if (F_status_is_error(main->setting.state.status)) return;
 
     fss_read_embedded_list_process_determine_depth(main);
@@ -55,8 +53,8 @@ extern "C" {
 
     bool names[main->setting.objects.used];
 
-    if (main->callback.process_name) {
-      main->callback.process_name(main, names);
+    if (main->call.process_name) {
+      main->call.process_name(main, names);
       if (F_status_is_error(main->setting.state.status)) return;
     }
     else if (main->setting.objects.used) {
@@ -66,25 +64,25 @@ extern "C" {
     }
 
     if (main->setting.flag & fss_read_main_flag_total_d) {
-      if (main->callback.process_total) {
-        main->callback.process_total(main, names);
+      if (main->call.process_total) {
+        main->call.process_total(main, names);
       }
     }
     else if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) {
-      if (main->callback.process_at) {
-        main->callback.process_at(main, names, *delimits_object, *delimits_content);
+      if (main->call.process_at) {
+        main->call.process_at(main, names, *delimits_object, *delimits_content);
       }
     }
     else if (main->setting.flag & fss_read_main_flag_columns_d) {
-      if (main->callback.process_columns) {
-        main->callback.process_columns(main, names);
+      if (main->call.process_columns) {
+        main->call.process_columns(main, names);
       }
     }
     else {
       f_number_unsigned_t i = 0;
 
       if (main->setting.flag & fss_read_main_flag_line_d) {
-        if (main->callback.process_at_line) {
+        if (main->call.process_at_line) {
           f_number_unsigned_t line = 0;
 
           for (; i < main->setting.contents.used && main->setting.state.status != F_success; ++i) {
@@ -92,18 +90,18 @@ extern "C" {
             if (!names[i]) continue;
             if (fss_read_signal_check(main)) return;
 
-            main->callback.process_at_line(void_main, i, *delimits_object, *delimits_content, &line);
+            main->call.process_at_line(main, i, *delimits_object, *delimits_content, &line);
             if (F_status_is_error(main->setting.state.status)) return;
           } // for
         }
       }
-      else if (main->callback.print_at) {
+      else if (main->call.print_at) {
         for (; i < main->setting.contents.used; ++i) {
 
           if (!names[i]) continue;
           if (fss_read_signal_check(main)) return;
 
-          main->callback.print_at(&main->program.output, i, *delimits_object, *delimits_content);
+          main->call.print_at(&main->program.output, i, *delimits_object, *delimits_content);
         } // for
       }
     }
index eb7f7b1cb874e5ff348e4966437271df65c195f1..8fa924598627f105495f643f608ab58fe9d739ef 100644 (file)
@@ -23,7 +23,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -33,7 +32,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_embedded_list_process_
-  extern void fss_read_embedded_list_process(void * const main);
+  extern void fss_read_embedded_list_process(fss_read_main_t * const main);
 #endif // _di_fss_read_embedded_list_process_
 
 /**
index bead09655e90e367eebfa2b65aa668ea0f3ef3c7..e5ee3443d3f61ceef63c1edaecd31178b85be46e 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_extended_process_help_
-  void fss_read_extended_process_help(void * const void_main) {
+  void fss_read_extended_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_extended_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_extended_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_extended_process_help_
 
 #ifndef _di_fss_read_extended_process_load_
-  void fss_read_extended_process_load(void * const void_main) {
+  void fss_read_extended_process_load(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     fll_fss_extended_read(main->setting.buffer, &main->setting.range, &main->setting.objects, &main->setting.contents, &main->setting.quotes_object, &main->setting.quotes_content, &main->setting.delimits_object, &main->setting.delimits_content, &main->setting.state);
 
index aefd159bb06c57210b381e579fbfa3d71c9c919f..2a50d8fcb34e96ba34c4a1403713de5a13f283b1 100644 (file)
@@ -72,7 +72,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
@@ -81,7 +80,7 @@ extern "C" {
  *   If FALSE, then this is not the last Content in the Content set.
  */
 #ifndef _di_fss_read_extended_process_content_
-  extern void fss_read_extended_process_content(void * const main, const bool last);
+  extern void fss_read_extended_process_content(fss_read_main_t * const main, const bool last);
 #endif // _di_fss_read_extended_process_content_
 
 /**
@@ -91,7 +90,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -100,7 +98,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_extended_process_help_
-  extern void fss_read_extended_process_help(void * const main);
+  extern void fss_read_extended_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_extended_process_help_
 
 /**
@@ -112,7 +110,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -130,7 +127,7 @@ extern "C" {
  * @see fss_read_file_identify()
  */
 #ifndef _di_fss_read_extended_process_load_
-  extern void fss_read_extended_process_load(void * const main);
+  extern void fss_read_extended_process_load(fss_read_main_t * const main);
 #endif // _di_fss_read_extended_process_load_
 
 #ifdef __cplusplus
index a8954bcc1730c6c68d3e14cdf9d31cae128f64a2..b2d9fb99e933f61c72e78e97ec544d3721eb425e 100644 (file)
@@ -24,27 +24,27 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.standard = fss_read_extended_standard_s;
   data.setting.open_object = f_fss_extended_open_s;
 
-  data.callback.process_help = &fss_read_extended_process_help;
-  data.callback.process_last_line = &fss_read_process_last_line;
-  data.callback.process = &fss_read_process;
-
-  data.callback.process_at = &fss_read_process_at;
-  data.callback.process_at_line = &fss_read_process_at_line;
-  data.callback.process_columns = &fss_read_process_columns;
-  data.callback.process_load = &fss_read_extended_process_load;
-  data.callback.process_name = &fss_read_process_name;
-  data.callback.process_total = &fss_read_process_total;
-
-  data.callback.print_at = &fss_read_print_at;
-  data.callback.print_content = &fss_read_print_content;
-  data.callback.print_content_empty = &fss_read_print_content_empty;
-  data.callback.print_content_ignore = &fss_read_print_content_ignore;
-  data.callback.print_content_next = &fss_read_extended_print_content_next;
-  data.callback.print_object = &fss_read_print_object;
-  data.callback.print_object_end = &fss_read_extended_print_object_end;
-  data.callback.print_object_end_content = &fss_read_print_object_end_content;
-  data.callback.print_object_end_empty = &fss_read_print_content_empty;
-  data.callback.print_set_end = &fss_read_print_set_end;
+  data.call.process_help = &fss_read_extended_process_help;
+  data.call.process_last_line = &fss_read_process_last_line;
+  data.call.process = &fss_read_process;
+
+  data.call.process_at = &fss_read_process_at;
+  data.call.process_at_line = &fss_read_process_at_line;
+  data.call.process_columns = &fss_read_process_columns;
+  data.call.process_load = &fss_read_extended_process_load;
+  data.call.process_name = &fss_read_process_name;
+  data.call.process_total = &fss_read_process_total;
+
+  data.call.print_at = &fss_read_print_at;
+  data.call.print_content = &fss_read_print_content;
+  data.call.print_content_empty = &fss_read_print_content_empty;
+  data.call.print_content_ignore = &fss_read_print_content_ignore;
+  data.call.print_content_next = &fss_read_extended_print_content_next;
+  data.call.print_object = &fss_read_print_object;
+  data.call.print_object_end = &fss_read_extended_print_object_end;
+  data.call.print_object_end_content = &fss_read_print_object_end_content;
+  data.call.print_object_end_empty = &fss_read_print_content_empty;
+  data.call.print_set_end = &fss_read_print_set_end;
 
   f_console_parameter_t parameters[] = fss_read_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index affe47b8213db94a915f6144e8ba3d64f745f4a8..6f9df6693fbeed2192e07de368ef5fbbee4c0c64 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_extended_list_process_help_
-  void fss_read_extended_list_process_help(void * const void_main) {
+  void fss_read_extended_list_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_extended_list_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_extended_list_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_extended_list_process_help_
 
 #ifndef _di_fss_read_extended_list_process_load_
-  void fss_read_extended_list_process_load(void * const void_main) {
+  void fss_read_extended_list_process_load(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     fll_fss_extended_list_read(main->setting.buffer, &main->setting.range, &main->setting.objects, &main->setting.closes, &main->setting.contents, &main->setting.delimits_object, &main->setting.delimits_content, &main->setting.comments, &main->setting.state);
 
index 4d4891d2762bc804562faacdb2f90703596e8ccf..a691f19d58a4afc9d4bcde7fdef0a60c9d385e70 100644 (file)
@@ -72,7 +72,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -81,7 +80,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_extended_list_process_help_
-  extern void fss_read_extended_list_process_help(void * const main);
+  extern void fss_read_extended_list_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_extended_list_process_help_
 
 /**
@@ -93,7 +92,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -111,7 +109,7 @@ extern "C" {
  * @see fss_read_file_identify()
  */
 #ifndef _di_fss_read_extended_list_process_load_
-  extern void fss_read_extended_list_process_load(void * const main);
+  extern void fss_read_extended_list_process_load(fss_read_main_t * const main);
 #endif // _di_fss_read_extended_list_process_load_
 
 #ifdef __cplusplus
index b67c22cf43b1b53969e6d2c26175c0ea28e465e3..96772c5255c84a8ea5911cbd21bfa10152bdf53d 100644 (file)
@@ -24,26 +24,26 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.standard = fss_read_extended_list_standard_s;
   data.setting.open_object = f_fss_extended_list_open_s;
 
-  data.callback.process_help = &fss_read_extended_list_process_help;
-  data.callback.process_last_line = &fss_read_process_last_line;
-  data.callback.process = &fss_read_process;
-
-  data.callback.process_at = &fss_read_process_at;
-  data.callback.process_at_line = &fss_read_process_at_line;
-  data.callback.process_columns = &fss_read_process_columns;
-  data.callback.process_load = &fss_read_extended_list_process_load;
-  data.callback.process_name = &fss_read_process_name;
-  data.callback.process_total = &fss_read_process_total_multiple;
-
-  data.callback.print_at = &fss_read_print_at;
-  data.callback.print_content = &fss_read_print_content;
-  data.callback.print_content_ignore = &fss_read_print_content_ignore;
-  data.callback.print_content_next = 0;
-  data.callback.print_object = &fss_read_print_object;
-  data.callback.print_object_end = &fss_read_extended_list_print_object_end;
-  data.callback.print_object_end_content = &fss_read_print_object_end_content;
-  data.callback.print_object_end_empty = &fss_read_print_object_end_empty;
-  data.callback.print_set_end = &fss_read_extended_list_print_set_end;
+  data.call.process_help = &fss_read_extended_list_process_help;
+  data.call.process_last_line = &fss_read_process_last_line;
+  data.call.process = &fss_read_process;
+
+  data.call.process_at = &fss_read_process_at;
+  data.call.process_at_line = &fss_read_process_at_line;
+  data.call.process_columns = &fss_read_process_columns;
+  data.call.process_load = &fss_read_extended_list_process_load;
+  data.call.process_name = &fss_read_process_name;
+  data.call.process_total = &fss_read_process_total_multiple;
+
+  data.call.print_at = &fss_read_print_at;
+  data.call.print_content = &fss_read_print_content;
+  data.call.print_content_ignore = &fss_read_print_content_ignore;
+  data.call.print_content_next = 0;
+  data.call.print_object = &fss_read_print_object;
+  data.call.print_object_end = &fss_read_extended_list_print_object_end;
+  data.call.print_object_end_content = &fss_read_print_object_end_content;
+  data.call.print_object_end_empty = &fss_read_print_object_end_empty;
+  data.call.print_set_end = &fss_read_extended_list_print_set_end;
 
   f_console_parameter_t parameters[] = fss_read_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index 969c9f7c577d2d090df43121ce5b639dfa4f0dae..14aed69f047216d0485ebe869b16ae323cf6cc04 100644 (file)
@@ -466,8 +466,8 @@ extern "C" {
       if (main->setting.buffer.used) {
         main->setting.files.array[0].range.stop = main->setting.buffer.used - 1;
 
-        if (main->callback.process_last_line) {
-          main->callback.process_last_line((void *) main);
+        if (main->call.process_last_line) {
+          main->call.process_last_line(main);
           if (F_status_is_error(main->setting.state.status)) return;
         }
 
@@ -555,8 +555,8 @@ extern "C" {
           if (main->setting.buffer.used > file_data->range.start) {
             main->setting.files.array[main->setting.files.used++].range.stop = main->setting.buffer.used - 1;
 
-            if (main->callback.process_last_line) {
-              main->callback.process_last_line((void *) main);
+            if (main->call.process_last_line) {
+              main->call.process_last_line(main);
               if (F_status_is_error(main->setting.state.status)) break;
             }
           }
@@ -577,11 +577,9 @@ extern "C" {
 #endif // _di_fss_read_setting_load_
 
 #ifndef _di_fss_read_setting_load_depth_
-  void fss_read_setting_load_depth(const f_console_arguments_t arguments, void * const void_main, f_console_parameters_t * const parameters) {
+  void fss_read_setting_load_depth(const f_console_arguments_t arguments, fss_read_main_t * const main, f_console_parameters_t * const parameters) {
 
-    if (!void_main || !parameters) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main || !parameters) return;
 
     f_number_unsigned_t i = 1;
 
index f4b0cfe02a6de33e8cf790cac71ec333a72c4f46..b32fea96e298cc1dcd321fdc20c79324f77da1f3 100644 (file)
@@ -97,7 +97,6 @@ extern "C" {
  *   The main program data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -124,7 +123,7 @@ extern "C" {
  * @see fss_read_setting_load()
  */
 #ifndef _di_fss_read_setting_load_depth_
-  extern void fss_read_setting_load_depth(const f_console_arguments_t arguments, void * const main, f_console_parameters_t * const parameters);
+  extern void fss_read_setting_load_depth(const f_console_arguments_t arguments, fss_read_main_t * const main, f_console_parameters_t * const parameters);
 #endif // _di_fss_read_setting_load_depth_
 
 #ifdef __cplusplus
index 6c56605d913d22acdfaa38e2205169a7386273ce..24cdad534b9f3b55c08d80a5ca5cb54b40032a70 100644 (file)
@@ -164,33 +164,45 @@ extern "C" {
  * print_set_end:            Print the Content set end, usually called by several callbacks within the process() callback.
  * print_set_end_empty:      Print set end for cases where the Content is empty and only something like a closing new line is required.
  */
-#ifndef _di_fss_read_callback_t_
+#ifndef _di_fss_read_call_t_
+  typedef void (*fss_read_process_main_call_t) (fss_read_main_t * const main);
+  typedef void (*fss_read_process_main_at_call_t) (fss_read_main_t * const main, const bool names[], const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
+  typedef void (*fss_read_process_main_at_line_call_t) (fss_read_main_t * const main, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content, f_number_unsigned_t * const line);
+  typedef void (*fss_read_process_main_names_call_t) (fss_read_main_t * const main, bool names[]);
+  typedef void (*fss_read_process_main_names_const_call_t) (fss_read_main_t * const main, const bool names[]);
+
+  typedef f_status_t (*print_at_call_t)(fl_print_t * const print, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
+  typedef f_status_t (*print_object_call_t)(fl_print_t * const print, const f_number_unsigned_t at, const f_number_unsigneds_t delimits);
+  typedef f_status_t (*print_object_end_content_call_t)(fl_print_t * const print, const f_number_unsigned_t at, const f_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits);
+  typedef f_status_t (*print_content_call_t)(fl_print_t * const print, const f_number_unsigned_t at, const f_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits);
+  typedef f_status_t (*print_set_end_call_t)(fl_print_t * const print, const f_number_unsigned_t close);
+
   typedef struct {
-    void (*process)(void * const main);
-    void (*process_help)(void * const main);
-    void (*process_last_line)(void * const main);
-
-    void (*process_at)(void * const main, const bool names[], const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
-    void (*process_at_line)(void * const void_main, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content, f_number_unsigned_t * const line);
-    void (*process_columns)(void * const main, const bool names[]);
-    void (*process_load)(void * const main);
-    void (*process_name)(void * const main, bool names[]);
-    void (*process_total)(void * const main, const bool names[]);
-
-    f_status_t (*print_at)(fl_print_t * const print, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
-    f_status_t (*print_object)(fl_print_t * const print, const f_number_unsigned_t at, const f_number_unsigneds_t delimits);
-    f_status_t (*print_object_end_content)(fl_print_t * const print, const f_number_unsigned_t at, const f_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits);
-    f_status_t (*print_content)(fl_print_t * const print, const f_number_unsigned_t at, const f_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits);
-    f_status_t (*print_content_empty)(fl_print_t * const print);
-    f_status_t (*print_content_ignore)(fl_print_t * const print);
-    f_status_t (*print_content_next)(fl_print_t * const print);
-    f_status_t (*print_object_end)(fl_print_t * const print);
-    f_status_t (*print_object_end_empty)(fl_print_t * const print);
-    f_status_t (*print_set_end)(fl_print_t * const print, const f_number_unsigned_t close);
-    f_status_t (*print_set_end_empty)(fl_print_t * const print);
-  } fss_read_callback_t;
-
-  #define fss_read_callback_t_initialize \
+    fss_read_process_main_call_t process;
+    fss_read_process_main_call_t process_help;
+    fss_read_process_main_call_t process_last_line;
+
+    fss_read_process_main_at_call_t process_at;
+    fss_read_process_main_at_line_call_t process_at_line;
+    fss_read_process_main_names_const_call_t process_columns;
+    fss_read_process_main_call_t process_load;
+    fss_read_process_main_names_call_t process_name;
+    fss_read_process_main_names_const_call_t process_total;
+
+    print_at_call_t print_at;
+    print_object_call_t print_object;
+    print_object_end_content_call_t print_object_end_content;
+    print_content_call_t print_content;
+    fl_print_call_t print_content_empty;
+    fl_print_call_t print_content_ignore;
+    fl_print_call_t print_content_next;
+    fl_print_call_t print_object_end;
+    fl_print_call_t print_object_end_empty;
+    print_set_end_call_t print_set_end;
+    fl_print_call_t print_set_end_empty;
+  } fss_read_call_t;
+
+  #define fss_read_call_t_initialize \
     { \
       0, \
       0, \
@@ -213,7 +225,7 @@ extern "C" {
       0, \
       0, \
     }
-#endif // _di_fss_read_callback_t_
+#endif // _di_fss_read_call_t_
 
 /**
  * The fss read main program settings.
@@ -315,15 +327,16 @@ extern "C" {
 /**
  * The main program data as a single structure.
  *
- * cache:    The cache data.
- * callback: The callback data.
- * program:  The main program data.
- * setting:  The settings data.
+ * Properties:
+ *   - cache:   The cache data.
+ *   - call:    The callbacks.
+ *   - program: The main program data.
+ *   - setting: The settings data.
  */
 #ifndef _di_fss_read_main_t_
   struct fss_read_main_t_ {
     fss_read_cache_t cache;
-    fss_read_callback_t callback;
+    fss_read_call_t call;
     fll_program_data_t program;
     fss_read_setting_t setting;
   };
@@ -331,13 +344,22 @@ extern "C" {
   #define fss_read_main_t_initialize \
     { \
       fss_read_cache_t_initialize, \
-      fss_read_callback_t_initialize, \
+      fss_read_call_t_initialize, \
       fll_program_data_t_initialize, \
       fss_read_setting_t_initialize, \
     }
 #endif // _di_fss_read_main_t_
 
 /**
+ * Callback type for the fss_read_setting_load() argument.
+ *
+ * Perform the initial processing for fss_read_setting_load().
+ */
+#ifndef _di_fss_read_setting_load_call_t_
+  typedef void (*fss_read_setting_load_call_t) (const f_console_arguments_t arguments, fss_read_main_t * const main);
+#endif // _di_fss_read_setting_load_call_t_
+
+/**
  * Delete the program main cache data.
  *
  * @param cache
@@ -418,7 +440,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
index f91cbafe40b8bd9023c9331824fcea53f4f6e04b..cdb9f0ff03a2b0fe1960d5e47c668630c119bc4a 100644 (file)
@@ -46,20 +46,16 @@ extern "C" {
 #endif // _di_fss_read_delimit_object_is_
 
 #ifndef _di_fss_read_main_
-  void fss_read_main(void * const void_main) {
+  void fss_read_main(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
-
-    if (F_status_is_error(main->setting.state.status)) return;
+    if (!main || F_status_is_error(main->setting.state.status)) return;
 
     main->setting.state.status = F_okay;
 
     if (main->setting.flag & fss_read_main_flag_version_copyright_help_d) {
       if (main->setting.flag & fss_read_main_flag_help_d) {
-        if (main->callback.process_help) {
-          main->callback.process_help(void_main);
+        if (main->call.process_help) {
+          main->call.process_help(main);
         }
         else {
           fss_read_print_message_help(&main->program.message);
@@ -80,8 +76,8 @@ extern "C" {
     }
 
     if (main->setting.flag & fss_read_main_flag_object_content_d) {
-      if (main->callback.process) {
-        main->callback.process(void_main);
+      if (main->call.process) {
+        main->call.process(main);
       }
     }
 
@@ -106,11 +102,9 @@ extern "C" {
 #endif // _di_fss_read_file_identify_
 
 #ifndef _di_fss_read_process_last_line_
-  void fss_read_process_last_line(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_read_process_last_line(fss_read_main_t * const main) {
 
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &main->setting.buffer);
 
index b2fb43ba52aea07454943ac4154eeb1027f4ad6c..28193682aabe0fc6f710e7f7a6624de195ca5ac2 100644 (file)
@@ -120,7 +120,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -130,7 +129,7 @@ extern "C" {
  *     Errors (with error bit) from: main.callback.process().
  */
 #ifndef _di_fss_read_main_
-  extern void fss_read_main(void * const main);
+  extern void fss_read_main(fss_read_main_t * const main);
 #endif // _di_fss_read_main_
 
 /**
@@ -161,7 +160,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -175,7 +173,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_last_line_
-  extern void fss_read_process_last_line(void * const void_main);
+  extern void fss_read_process_last_line(fss_read_main_t * const main);
 #endif // _di_fss_read_process_last_line_
 
 #ifdef __cplusplus
index 2d541389f0cfdd06a34904387c59a6d5e370b9f1..886a16adf8b3a4a040b38daa1ede46b0aa05b08b 100644 (file)
@@ -84,11 +84,11 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 }
 
 #ifndef _di_fss_read_main_process_help_
-  void fss_read_main_process_help(void * const void_main) {
+  void fss_read_main_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_main_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_main_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_main_process_help_
 
@@ -98,27 +98,27 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
     if (!main || F_status_is_error(main->setting.state.status) || (main->setting.flag & fss_read_main_flag_version_d)) return;
 
     // Use the default standard of: FSS-0000 (Basic)
-    main->callback.process_help = &fss_read_main_process_help;
-    main->callback.process_last_line = &fss_read_process_last_line;
-    main->callback.process = &fss_read_process;
-
-    main->callback.process_at = &fss_read_process_at;
-    main->callback.process_at_line = &fss_read_process_at_line;
-    main->callback.process_columns = &fss_read_process_columns;
-    main->callback.process_load = &fss_read_basic_process_load;
-    main->callback.process_name = &fss_read_process_name;
-    main->callback.process_total = &fss_read_process_total;
-
-    main->callback.print_at = &fss_read_print_at;
-    main->callback.print_content = &fss_read_print_content;
-    main->callback.print_content_empty = &fss_read_print_content_empty;
-    main->callback.print_content_ignore = 0;
-    main->callback.print_content_next = 0;
-    main->callback.print_object = &fss_read_print_object;
-    main->callback.print_object_end = &fss_read_basic_print_object_end;
-    main->callback.print_object_end_content = &fss_read_print_object_end_content;
-    main->callback.print_object_end_empty = &fss_read_print_content_empty;
-    main->callback.print_set_end = &fss_read_print_set_end;
+    main->call.process_help = &fss_read_main_process_help;
+    main->call.process_last_line = &fss_read_process_last_line;
+    main->call.process = &fss_read_process;
+
+    main->call.process_at = &fss_read_process_at;
+    main->call.process_at_line = &fss_read_process_at_line;
+    main->call.process_columns = &fss_read_process_columns;
+    main->call.process_load = &fss_read_basic_process_load;
+    main->call.process_name = &fss_read_process_name;
+    main->call.process_total = &fss_read_process_total;
+
+    main->call.print_at = &fss_read_print_at;
+    main->call.print_content = &fss_read_print_content;
+    main->call.print_content_empty = &fss_read_print_content_empty;
+    main->call.print_content_ignore = 0;
+    main->call.print_content_next = 0;
+    main->call.print_object = &fss_read_print_object;
+    main->call.print_object_end = &fss_read_basic_print_object_end;
+    main->call.print_object_end_content = &fss_read_print_object_end_content;
+    main->call.print_object_end_empty = &fss_read_print_content_empty;
+    main->call.print_set_end = &fss_read_print_set_end;
 
     main->setting.standard = fss_read_basic_standard_s;
     main->setting.open_object = f_fss_basic_open_s;
@@ -160,22 +160,22 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
-        main->callback.process_at = &fss_read_process_at;
-        main->callback.process_at_line = &fss_read_process_at_line;
-        main->callback.process_columns = &fss_read_process_columns;
-        main->callback.process_help = &fss_read_basic_process_help;
-        main->callback.process_load = &fss_read_basic_process_load;
-        main->callback.process_name = &fss_read_process_name;
-        main->callback.process = &fss_read_process;
-        main->callback.process_total = &fss_read_process_total;
-
-        main->callback.print_content = &fss_read_print_content;
-        main->callback.print_content_ignore = 0;
-        main->callback.print_content_next = 0;
-        main->callback.print_object_end = &fss_read_basic_print_object_end;
-        main->callback.print_object_end_content = &fss_read_print_object_end_content;
-        main->callback.print_object_end_empty = &fss_read_print_content_empty;
-        main->callback.print_set_end = &fss_read_print_set_end;
+        main->call.process_at = &fss_read_process_at;
+        main->call.process_at_line = &fss_read_process_at_line;
+        main->call.process_columns = &fss_read_process_columns;
+        main->call.process_help = &fss_read_basic_process_help;
+        main->call.process_load = &fss_read_basic_process_load;
+        main->call.process_name = &fss_read_process_name;
+        main->call.process = &fss_read_process;
+        main->call.process_total = &fss_read_process_total;
+
+        main->call.print_content = &fss_read_print_content;
+        main->call.print_content_ignore = 0;
+        main->call.print_content_next = 0;
+        main->call.print_object_end = &fss_read_basic_print_object_end;
+        main->call.print_object_end_content = &fss_read_print_object_end_content;
+        main->call.print_object_end_empty = &fss_read_print_content_empty;
+        main->call.print_set_end = &fss_read_print_set_end;
       }
       else if (f_compare_dynamic(as, fss_read_format_code_short_0001_s) == F_equal_to ||
                f_compare_dynamic(as, fss_read_format_code_long_0001_s) == F_equal_to ||
@@ -198,21 +198,21 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
-        main->callback.process_at = &fss_read_process_at;
-        main->callback.process_at_line = &fss_read_process_at_line;
-        main->callback.process_columns = &fss_read_process_columns;
-        main->callback.process_help = &fss_read_extended_process_help;
-        main->callback.process_load = &fss_read_extended_process_load;
-        main->callback.process_name = &fss_read_process_name;
-        main->callback.process = &fss_read_process;
-        main->callback.process_total = &fss_read_process_total;
-
-        main->callback.print_content = &fss_read_print_content;
-        main->callback.print_content_next = &fss_read_extended_print_content_next;
-        main->callback.print_object_end = &fss_read_extended_print_object_end;
-        main->callback.print_object_end_content = &fss_read_print_object_end_content;
-        main->callback.print_object_end_empty = &fss_read_print_content_empty;
-        main->callback.print_set_end = &fss_read_print_set_end;
+        main->call.process_at = &fss_read_process_at;
+        main->call.process_at_line = &fss_read_process_at_line;
+        main->call.process_columns = &fss_read_process_columns;
+        main->call.process_help = &fss_read_extended_process_help;
+        main->call.process_load = &fss_read_extended_process_load;
+        main->call.process_name = &fss_read_process_name;
+        main->call.process = &fss_read_process;
+        main->call.process_total = &fss_read_process_total;
+
+        main->call.print_content = &fss_read_print_content;
+        main->call.print_content_next = &fss_read_extended_print_content_next;
+        main->call.print_object_end = &fss_read_extended_print_object_end;
+        main->call.print_object_end_content = &fss_read_print_object_end_content;
+        main->call.print_object_end_empty = &fss_read_print_content_empty;
+        main->call.print_set_end = &fss_read_print_set_end;
       }
       else if (f_compare_dynamic(as, fss_read_format_code_short_0002_s) == F_equal_to ||
                f_compare_dynamic(as, fss_read_format_code_long_0002_s) == F_equal_to ||
@@ -235,21 +235,21 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
-        main->callback.process_at = &fss_read_process_at;
-        main->callback.process_at_line = &fss_read_process_at_line;
-        main->callback.process_columns = &fss_read_process_columns;
-        main->callback.process_help = &fss_read_basic_list_process_help;
-        main->callback.process_load = &fss_read_basic_list_process_load;
-        main->callback.process_name = &fss_read_process_name;
-        main->callback.process = &fss_read_process;
-        main->callback.process_total = &fss_read_process_total_multiple;
-
-        main->callback.print_content = &fss_read_print_content;
-        main->callback.print_content_next = 0;
-        main->callback.print_object_end = &fss_read_basic_list_print_object_end;
-        main->callback.print_object_end_content = &fss_read_print_object_end_content;
-        main->callback.print_object_end_empty = &fss_read_print_object_end_empty;
-        main->callback.print_set_end = &fss_read_print_set_end_no_eol;
+        main->call.process_at = &fss_read_process_at;
+        main->call.process_at_line = &fss_read_process_at_line;
+        main->call.process_columns = &fss_read_process_columns;
+        main->call.process_help = &fss_read_basic_list_process_help;
+        main->call.process_load = &fss_read_basic_list_process_load;
+        main->call.process_name = &fss_read_process_name;
+        main->call.process = &fss_read_process;
+        main->call.process_total = &fss_read_process_total_multiple;
+
+        main->call.print_content = &fss_read_print_content;
+        main->call.print_content_next = 0;
+        main->call.print_object_end = &fss_read_basic_list_print_object_end;
+        main->call.print_object_end_content = &fss_read_print_object_end_content;
+        main->call.print_object_end_empty = &fss_read_print_object_end_empty;
+        main->call.print_set_end = &fss_read_print_set_end_no_eol;
       }
       else if (f_compare_dynamic(as, fss_read_format_code_short_0003_s) == F_equal_to ||
                f_compare_dynamic(as, fss_read_format_code_long_0003_s) == F_equal_to ||
@@ -275,21 +275,21 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
-        main->callback.process_at = &fss_read_process_at;
-        main->callback.process_at_line = &fss_read_process_at_line;
-        main->callback.process_columns = &fss_read_process_columns;
-        main->callback.process_help = &fss_read_extended_list_process_help;
-        main->callback.process_load = &fss_read_extended_list_process_load;
-        main->callback.process_name = &fss_read_process_name;
-        main->callback.process = &fss_read_process;
-        main->callback.process_total = &fss_read_process_total_multiple;
-
-        main->callback.print_content = &fss_read_print_content;
-        main->callback.print_content_next = 0;
-        main->callback.print_object_end = &fss_read_extended_list_print_object_end;
-        main->callback.print_object_end_content = &fss_read_print_object_end_content;
-        main->callback.print_object_end_empty = &fss_read_print_object_end_empty;
-        main->callback.print_set_end = &fss_read_extended_list_print_set_end;
+        main->call.process_at = &fss_read_process_at;
+        main->call.process_at_line = &fss_read_process_at_line;
+        main->call.process_columns = &fss_read_process_columns;
+        main->call.process_help = &fss_read_extended_list_process_help;
+        main->call.process_load = &fss_read_extended_list_process_load;
+        main->call.process_name = &fss_read_process_name;
+        main->call.process = &fss_read_process;
+        main->call.process_total = &fss_read_process_total_multiple;
+
+        main->call.print_content = &fss_read_print_content;
+        main->call.print_content_next = 0;
+        main->call.print_object_end = &fss_read_extended_list_print_object_end;
+        main->call.print_object_end_content = &fss_read_print_object_end_content;
+        main->call.print_object_end_empty = &fss_read_print_object_end_empty;
+        main->call.print_set_end = &fss_read_extended_list_print_set_end;
       }
       else if (f_compare_dynamic(as, fss_read_format_code_short_0008_s) == F_equal_to ||
                f_compare_dynamic(as, fss_read_format_code_long_0008_s) == F_equal_to ||
@@ -314,21 +314,21 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
-        main->callback.process_at = &fss_read_process_at;
-        main->callback.process_at_line = &fss_read_process_at_line;
-        main->callback.process_columns = &fss_read_process_columns;
-        main->callback.process_help = &fss_read_embedded_list_process_help;
-        main->callback.process_load = &fss_read_embedded_list_process_load;
-        main->callback.process_name = &fss_read_process_name;
-        main->callback.process = &fss_read_embedded_list_process;
-        main->callback.process_total = &fss_read_process_total_multiple;
-
-        main->callback.print_content = &fss_read_print_content;
-        main->callback.print_content_next = 0;
-        main->callback.print_object_end = &fss_read_embedded_list_print_object_end;
-        main->callback.print_object_end_content = &fss_read_print_object_end_content;
-        main->callback.print_object_end_empty = &fss_read_print_object_end_empty;
-        main->callback.print_set_end = &fss_read_embedded_list_print_set_end;
+        main->call.process_at = &fss_read_process_at;
+        main->call.process_at_line = &fss_read_process_at_line;
+        main->call.process_columns = &fss_read_process_columns;
+        main->call.process_help = &fss_read_embedded_list_process_help;
+        main->call.process_load = &fss_read_embedded_list_process_load;
+        main->call.process_name = &fss_read_process_name;
+        main->call.process = &fss_read_embedded_list_process;
+        main->call.process_total = &fss_read_process_total_multiple;
+
+        main->call.print_content = &fss_read_print_content;
+        main->call.print_content_next = 0;
+        main->call.print_object_end = &fss_read_embedded_list_print_object_end;
+        main->call.print_object_end_content = &fss_read_print_object_end_content;
+        main->call.print_object_end_empty = &fss_read_print_object_end_empty;
+        main->call.print_set_end = &fss_read_embedded_list_print_set_end;
       }
       else if (f_compare_dynamic(as, fss_read_format_code_short_000e_s) == F_equal_to ||
                f_compare_dynamic(as, fss_read_format_code_long_000e_s) == F_equal_to ||
@@ -352,27 +352,27 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->program.parameters.array[fss_read_parameter_payload_e].flag &= ~f_console_flag_disable_e;
 
-        main->callback.process_at = &fss_read_process_at;
-        main->callback.process_at_line = &fss_read_process_at_line;
-        main->callback.process_columns = &fss_read_process_columns;
-        main->callback.process_help = &fss_read_payload_process_help;
-        main->callback.process_load = &fss_read_payload_process_load;
-        main->callback.process_name = &fss_read_process_name;
-        main->callback.process = &fss_read_process;
-        main->callback.process_total = &fss_read_process_total_multiple;
-
-        main->callback.print_content = &fss_read_payload_print_content;
-        main->callback.print_content_next = 0;
-        main->callback.print_object_end = &fss_read_payload_print_object_end;
-        main->callback.print_object_end_content = &fss_read_print_object_end_content;
-        main->callback.print_object_end_empty = &fss_read_print_object_end_empty;
-        main->callback.print_set_end = &fss_read_print_set_end_no_eol;
+        main->call.process_at = &fss_read_process_at;
+        main->call.process_at_line = &fss_read_process_at_line;
+        main->call.process_columns = &fss_read_process_columns;
+        main->call.process_help = &fss_read_payload_process_help;
+        main->call.process_load = &fss_read_payload_process_load;
+        main->call.process_name = &fss_read_process_name;
+        main->call.process = &fss_read_process;
+        main->call.process_total = &fss_read_process_total_multiple;
+
+        main->call.print_content = &fss_read_payload_print_content;
+        main->call.print_content_next = 0;
+        main->call.print_object_end = &fss_read_payload_print_object_end;
+        main->call.print_object_end_content = &fss_read_print_object_end_content;
+        main->call.print_object_end_empty = &fss_read_print_object_end_empty;
+        main->call.print_set_end = &fss_read_print_set_end_no_eol;
       }
       else {
         main->setting.state.status = F_status_set_error(F_parameter);
 
         if (main->setting.flag & fss_read_main_flag_help_d) {
-          fss_read_main_process_help((void *) main);
+          fss_read_main_process_help(main);
         }
         else {
           fss_read_main_print_error_format_unknown(&main->program.error, as);
@@ -387,7 +387,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
       if (F_status_is_error(main->setting.state.status)) {
         if (main->setting.flag & fss_read_main_flag_help_d) {
-          fss_read_main_process_help((void *) main);
+          fss_read_main_process_help(main);
         }
         else {
           fss_read_print_error(&main->program.error, macro_fss_read_f(f_console_parameter_reset));
@@ -400,7 +400,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
       if (F_status_is_error(main->setting.state.status)) {
         if (main->setting.flag & fss_read_main_flag_help_d) {
-          fss_read_main_process_help((void *) main);
+          fss_read_main_process_help(main);
         }
         else {
           fss_read_print_error(&main->program.error, macro_fss_read_f(f_console_parameter_process));
@@ -419,7 +419,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           main->setting.state.status = F_status_set_error(F_parameter);
 
           if (main->setting.flag & fss_read_main_flag_help_d) {
-            fss_read_main_process_help((void *) main);
+            fss_read_main_process_help(main);
           }
           else {
             fss_read_main_print_error_parameter_as_changed(&main->program.error, as, main->program.parameters.arguments.array[index_new]);
@@ -433,7 +433,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       if (main->setting.flag & fss_read_main_flag_help_d) {
-        fss_read_main_process_help((void *) main);
+        fss_read_main_process_help(main);
 
         return;
       }
index f6331eba8035883952c15b1b59c88d209d1582ef..e452f3aec40ffbbf011fa96b3394c2b5000431d9 100644 (file)
@@ -38,7 +38,6 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -47,7 +46,7 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_main_process_help_
-  extern void fss_read_main_process_help(void * const main);
+  extern void fss_read_main_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_main_process_help_
 
 /**
index 824b204f729816414159194b020f94f9f7016385..acfc6dd1f392d5482b3fbc30c4df3ef619c9d10c 100644 (file)
@@ -23,20 +23,20 @@ extern "C" {
     uint8_t print_state = 0x0;
 
     if (main->setting.flag & fss_read_main_flag_object_d) {
-      if (main->callback.print_object) {
+      if (main->call.print_object) {
         print_state = 0x1;
 
-        main->callback.print_object(&main->program.output, at, delimits_object);
+        main->call.print_object(&main->program.output, at, delimits_object);
       }
     }
 
     if (main->setting.flag & fss_read_main_flag_content_d) {
       if (main->setting.flag & fss_read_main_flag_select_d) {
         if (main->setting.select < main->setting.contents.array[at].used && main->setting.contents.array[at].array[main->setting.select].start <= main->setting.contents.array[at].array[main->setting.select].stop) {
-          if (main->callback.print_content && main->callback.print_object_end_content) {
+          if (main->call.print_content && main->call.print_object_end_content) {
             if (print_state & 0x1) {
               if (F_status_set_fine(
-                main->callback.print_object_end_content(
+                main->call.print_object_end_content(
                   &main->program.output,
                   at,
                   main->setting.contents.array[at].array[main->setting.select],
@@ -49,7 +49,7 @@ extern "C" {
             }
             else {
               if (F_status_set_fine(
-                main->callback.print_content(
+                main->call.print_content(
                   &main->program.output,
                   at,
                   main->setting.contents.array[at].array[main->setting.select],
@@ -67,7 +67,7 @@ extern "C" {
         }
       }
       else if (main->setting.contents.array[at].used) {
-        if (main->callback.print_content && main->callback.print_object_end_content) {
+        if (main->call.print_content && main->call.print_object_end_content) {
           f_number_unsigned_t i = 0;
 
           // Loop through with conditionals only when necessary for performance reasons.
@@ -80,7 +80,7 @@ extern "C" {
 
               if (print_state & 0x1) {
                 if (F_status_set_fine(
-                  main->callback.print_object_end_content(
+                  main->call.print_object_end_content(
                     &main->program.output,
                     at,
                     main->setting.contents.array[at].array[i],
@@ -92,7 +92,7 @@ extern "C" {
                 }
               }
               else if (F_status_set_fine(
-                main->callback.print_content(
+                main->call.print_content(
                   &main->program.output,
                   at,
                   main->setting.contents.array[at].array[i],
@@ -114,11 +114,11 @@ extern "C" {
             if (fss_read_signal_check(main)) return F_status_set_error(F_interrupt);
             if (main->setting.contents.array[at].array[i].start > main->setting.contents.array[at].array[i].stop) continue;
 
-            if (main->callback.print_content_next) {
-              main->callback.print_content_next(&main->program.output);
+            if (main->call.print_content_next) {
+              main->call.print_content_next(&main->program.output);
             }
 
-            main->callback.print_content(
+            main->call.print_content(
               &main->program.output,
               at,
               main->setting.contents.array[at].array[i],
@@ -134,36 +134,36 @@ extern "C" {
 
       if (print_state & 0x8) {
         if (print_state & 0x1) {
-          if (!(print_state & 0x4) && main->callback.print_object_end_empty) {
-            main->callback.print_object_end_empty(&main->program.output);
+          if (!(print_state & 0x4) && main->call.print_object_end_empty) {
+            main->call.print_object_end_empty(&main->program.output);
           }
         }
 
         if ((print_state & 0x1) || !(print_state & 0x10)) {
-          if (main->callback.print_set_end) {
-            main->callback.print_set_end(&main->program.output, at);
+          if (main->call.print_set_end) {
+            main->call.print_set_end(&main->program.output, at);
           }
         }
       }
       else {
         if ((print_state & 0x3) != 0x3 && (print_state & 0x1)) {
-          if (!(print_state & 0x4) && main->callback.print_object_end) {
-            main->callback.print_object_end(&main->program.output);
+          if (!(print_state & 0x4) && main->call.print_object_end) {
+            main->call.print_object_end(&main->program.output);
           }
         }
 
-        if (main->callback.print_set_end) {
-          main->callback.print_set_end(&main->program.output, at);
+        if (main->call.print_set_end) {
+          main->call.print_set_end(&main->program.output, at);
         }
       }
     }
     else if (print_state & 0x1) {
-      if (main->callback.print_object_end_empty) {
-        main->callback.print_object_end_empty(&main->program.output);
+      if (main->call.print_object_end_empty) {
+        main->call.print_object_end_empty(&main->program.output);
       }
 
-      if (main->callback.print_set_end) {
-        main->callback.print_set_end(&main->program.output, at);
+      if (main->call.print_set_end) {
+        main->call.print_set_end(&main->program.output, at);
       }
     }
 
@@ -178,8 +178,8 @@ extern "C" {
 
     fss_read_main_t * const main = (fss_read_main_t *) print->custom;
 
-    if (main->callback.print_content_ignore) {
-      main->callback.print_content_ignore(&main->program.output);
+    if (main->call.print_content_ignore) {
+      main->call.print_content_ignore(&main->program.output);
     }
 
     if (main->setting.flag & fss_read_main_flag_original_d) {
@@ -196,8 +196,8 @@ extern "C" {
       }
     }
 
-    if (main->callback.print_content_ignore) {
-      main->callback.print_content_ignore(&main->program.output);
+    if (main->call.print_content_ignore) {
+      main->call.print_content_ignore(&main->program.output);
     }
 
     return F_okay;
@@ -383,16 +383,16 @@ extern "C" {
 
     fss_read_main_t * const main = (fss_read_main_t *) print->custom;
 
-    if (main->callback.print_object_end) {
-      const f_status_t status = main->callback.print_object_end(print);
+    if (main->call.print_object_end) {
+      const f_status_t status = main->call.print_object_end(print);
       if (F_status_is_error(status) || status == F_output_not) return status;
     }
 
-    if (main->callback.print_content) {
-      return main->callback.print_content(print, at, range, quote, delimits);
+    if (main->call.print_content) {
+      return main->call.print_content(print, at, range, quote, delimits);
     }
 
-    return main->callback.print_object_end ? F_okay : F_output_not;
+    return main->call.print_object_end ? F_okay : F_output_not;
   }
 #endif // _di_fss_read_print_object_end_content_
 
@@ -403,8 +403,8 @@ extern "C" {
 
     fss_read_main_t * const main = (fss_read_main_t *) print->custom;
 
-    const f_status_t status_1 = (main->callback.print_object_end) ? main->callback.print_object_end(print) : F_output_not;
-    const f_status_t status_2 = (main->callback.print_content_empty) ? main->callback.print_content_empty(print) : F_output_not;
+    const f_status_t status_1 = (main->call.print_object_end) ? main->call.print_object_end(print) : F_output_not;
+    const f_status_t status_2 = (main->call.print_content_empty) ? main->call.print_content_empty(print) : F_output_not;
 
     if (F_status_is_error(status_1)) return status_1;
     if (F_status_is_error(status_2)) return status_2;
index 330329cb9b1e63f6fe3d1c4d2b42cc1fc1c99bf3..0b1d55c47e062419d165eb81b8013870c42bf180 100644 (file)
@@ -5,11 +5,9 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_process_
-  void fss_read_process(void * const void_main) {
+  void fss_read_process(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     // For depth, most standards do not support nesting, so any depth greater than 0 can be predicted without processing the buffer.
     // For select, most standards do not support multiple select, so any select greater than 0 can be predicted without processing the buffer.
@@ -24,7 +22,7 @@ extern "C" {
     }
 
     // The process_load() callback is required to be non-NULL.
-    if (!main->callback.process_load) return;
+    if (!main->call.process_load) return;
 
     if (main->setting.buffer.used) {
       main->setting.range.start = 0;
@@ -44,7 +42,7 @@ extern "C" {
     main->setting.quotes_object.used = 0;
     main->setting.quotes_content.used = 0;
 
-    main->callback.process_load(main);
+    main->call.process_load(main);
     if (F_status_is_error(main->setting.state.status)) return;
 
     const f_number_unsigneds_t * const delimits_object = !(main->setting.flag & fss_read_main_flag_original_d) && fss_read_delimit_object_is(main, 0) ? &main->setting.delimits_object : &fss_read_except_none_c;
@@ -52,8 +50,8 @@ extern "C" {
 
     bool names[main->setting.objects.used];
 
-    if (main->callback.process_name) {
-      main->callback.process_name(main, names);
+    if (main->call.process_name) {
+      main->call.process_name(main, names);
       if (F_status_is_error(main->setting.state.status)) return;
     }
     else if (main->setting.objects.used) {
@@ -63,26 +61,26 @@ extern "C" {
     }
 
     if (main->setting.flag & fss_read_main_flag_total_d) {
-      if (main->callback.process_total) {
-        main->callback.process_total(main, names);
+      if (main->call.process_total) {
+        main->call.process_total(main, names);
       }
     }
     else if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) {
-      if (main->callback.process_at) {
+      if (main->call.process_at) {
 
-        main->callback.process_at(main, names, *delimits_object, *delimits_content);
+        main->call.process_at(main, names, *delimits_object, *delimits_content);
       }
     }
     else if (main->setting.flag & fss_read_main_flag_columns_d) {
-      if (main->callback.process_columns) {
-        main->callback.process_columns(main, names);
+      if (main->call.process_columns) {
+        main->call.process_columns(main, names);
       }
     }
     else {
       f_number_unsigned_t i = 0;
 
       if (main->setting.flag & fss_read_main_flag_line_d) {
-        if (main->callback.process_at_line) {
+        if (main->call.process_at_line) {
           f_number_unsigned_t line = 0;
 
           for (; i < main->setting.contents.used && main->setting.state.status != F_success; ++i) {
@@ -90,18 +88,18 @@ extern "C" {
             if (!names[i]) continue;
             if (fss_read_signal_check(main)) return;
 
-            main->callback.process_at_line(void_main, i, *delimits_object, *delimits_content, &line);
+            main->call.process_at_line(main, i, *delimits_object, *delimits_content, &line);
             if (F_status_is_error(main->setting.state.status)) return;
           } // for
         }
       }
-      else if (main->callback.print_at) {
+      else if (main->call.print_at) {
         for (; i < main->setting.contents.used; ++i) {
 
           if (!names[i]) continue;
           if (fss_read_signal_check(main)) return;
 
-          main->callback.print_at(&main->program.output, i, *delimits_object, *delimits_content);
+          main->call.print_at(&main->program.output, i, *delimits_object, *delimits_content);
         } // for
       }
     }
@@ -113,11 +111,9 @@ extern "C" {
 #endif // _di_fss_read_process_
 
 #ifndef _di_fss_read_process_at_
-  void fss_read_process_at(void * const void_main, const bool names[], const f_number_unsigneds_t delimits_object, f_number_unsigneds_t delimits_content) {
-
-    if (!void_main) return;
+  void fss_read_process_at(fss_read_main_t * const main, const bool names[], const f_number_unsigneds_t delimits_object, f_number_unsigneds_t delimits_content) {
 
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.depth.value_at >= main->setting.objects.used) {
       if (main->setting.flag & (fss_read_main_flag_columns_d | fss_read_main_flag_total_d)) {
@@ -152,17 +148,17 @@ extern "C" {
           // If using "--at" for standards that only support one line per Object, then the only valid line is line 0.
           if ((main->setting.feature & fss_read_feature_flag_line_single_d) && !at) break;
 
-          if (main->callback.process_at_line) {
+          if (main->call.process_at_line) {
             f_number_unsigned_t line = 0;
 
-            main->callback.process_at_line(void_main, i, delimits_object, delimits_content, &line);
+            main->call.process_at_line(main, i, delimits_object, delimits_content, &line);
           }
         }
         else if (main->setting.flag & fss_read_main_flag_columns_d) {
           fss_read_print_number(&main->program.output, main->setting.contents.array[i].used);
         }
-        else if (main->callback.print_at) {
-          main->callback.print_at(&main->program.output, i, delimits_object, delimits_content);
+        else if (main->call.print_at) {
+          main->call.print_at(&main->program.output, i, delimits_object, delimits_content);
         }
 
         if (F_status_is_error(main->setting.state.status)) return;
@@ -186,31 +182,29 @@ extern "C" {
 #endif // _di_fss_read_process_at_
 
 #ifndef _di_fss_read_process_at_line_
-  void fss_read_process_at_line(void * const void_main, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content, f_number_unsigned_t * const line) {
+  void fss_read_process_at_line(fss_read_main_t * const main, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content, f_number_unsigned_t * const line) {
 
-    if (!void_main || !line) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main || !line) return;
 
     // 0x1 = object printed, 0x2 = content printed, 0x4 = object end printed, 0x8 = content is empty, 0x10 = select is out of range.
     uint8_t print_state = 0x0;
 
     if (main->setting.flag & fss_read_main_flag_object_d) {
       if (*line == main->setting.line) {
-        if (main->callback.print_object) {
-          if (F_status_set_fine(main->callback.print_object(&main->program.output, at, delimits_object)) != F_output_not) {
+        if (main->call.print_object) {
+          if (F_status_set_fine(main->call.print_object(&main->program.output, at, delimits_object)) != F_output_not) {
             print_state = 0x1;
           }
         }
 
         if (!(main->setting.flag & fss_read_main_flag_content_d)) {
-          if (main->callback.print_object_end) {
-            main->callback.print_object_end(&main->program.output);
+          if (main->call.print_object_end) {
+            main->call.print_object_end(&main->program.output);
           }
 
           if (!(main->setting.feature & fss_read_feature_flag_object_as_line_d)) {
-            if (main->callback.print_set_end) {
-              main->callback.print_set_end(&main->program.output, at);
+            if (main->call.print_set_end) {
+              main->call.print_set_end(&main->program.output, at);
             }
           }
 
@@ -219,8 +213,8 @@ extern "C" {
           return;
         }
 
-        if ((main->setting.feature & fss_read_feature_flag_object_as_line_d) && main->callback.print_object_end) {
-          if (F_status_set_fine(main->callback.print_object_end(&main->program.output)) != F_output_not) {
+        if ((main->setting.feature & fss_read_feature_flag_object_as_line_d) && main->call.print_object_end) {
+          if (F_status_set_fine(main->call.print_object_end(&main->program.output)) != F_output_not) {
             print_state = 0x4;
           }
         }
@@ -239,8 +233,8 @@ extern "C" {
           if (main->setting.flag & fss_read_main_flag_object_d) {
             if (!(main->setting.feature & fss_read_feature_flag_object_as_line_d)) {
               if (*line == main->setting.line) {
-                if (main->callback.print_set_end) {
-                  main->callback.print_set_end(&main->program.output, at);
+                if (main->call.print_set_end) {
+                  main->call.print_set_end(&main->program.output, at);
                 }
 
                 main->setting.state.status = F_success;
@@ -253,8 +247,8 @@ extern "C" {
           }
           else if (main->setting.flag & fss_read_main_flag_empty_d) {
             if (*line == main->setting.line) {
-              if (main->callback.print_set_end) {
-                main->callback.print_set_end(&main->program.output, at);
+              if (main->call.print_set_end) {
+                main->call.print_set_end(&main->program.output, at);
               }
 
               main->setting.state.status = F_success;
@@ -268,8 +262,8 @@ extern "C" {
         else {
           if (main->setting.flag & fss_read_main_flag_empty_d) {
             if (*line == main->setting.line) {
-              if (main->callback.print_set_end) {
-                main->callback.print_set_end(&main->program.output, at);
+              if (main->call.print_set_end) {
+                main->call.print_set_end(&main->program.output, at);
               }
 
               main->setting.state.status = F_success;
@@ -290,19 +284,19 @@ extern "C" {
 
       if (main->setting.feature & fss_read_feature_flag_line_single_d) {
         if (*line == main->setting.line) {
-          if (main->setting.contents.array[at].used && main->callback.print_content && main->callback.print_object_end_content) {
+          if (main->setting.contents.array[at].used && main->call.print_content && main->call.print_object_end_content) {
             for (f_status_t printed = F_okay; ; ) {
 
               if (main->setting.contents.array[at].array[i].start <= main->setting.contents.array[at].array[i].stop) {
                 if ((print_state & 0x1) && !(print_state & 0x4)) {
-                  printed = main->callback.print_object_end_content(&main->program.output, at, main->setting.contents.array[at].array[i], (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
+                  printed = main->call.print_object_end_content(&main->program.output, at, main->setting.contents.array[at].array[i], (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
 
                   if (F_status_set_fine(printed) != F_output_not) {
                     print_state |= 0x6;
                   }
                 }
                 else {
-                  printed = main->callback.print_content(&main->program.output, at, main->setting.contents.array[at].array[i], (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
+                  printed = main->call.print_content(&main->program.output, at, main->setting.contents.array[at].array[i], (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
 
                   if (F_status_set_fine(printed) != F_output_not) {
                     print_state |= 0x2;
@@ -315,14 +309,14 @@ extern "C" {
 
               if (++i >= main->setting.contents.array[at].used) break;
 
-              if (F_status_set_fine(printed) != F_output_not && main->callback.print_content_next) {
-                main->callback.print_content_next(&main->program.output);
+              if (F_status_set_fine(printed) != F_output_not && main->call.print_content_next) {
+                main->call.print_content_next(&main->program.output);
               }
             } // for
           }
 
-          if (main->callback.print_set_end) {
-            main->callback.print_set_end(&main->program.output, at);
+          if (main->call.print_set_end) {
+            main->call.print_set_end(&main->program.output, at);
           }
 
           main->setting.state.status = F_success;
@@ -332,7 +326,7 @@ extern "C" {
 
         ++(*line);
       }
-      else if (main->callback.print_content && main->callback.print_object_end_content) {
+      else if (main->call.print_content && main->call.print_object_end_content) {
         f_number_unsigned_t j = 0;
         f_number_unsigned_t k = 0;
 
@@ -364,10 +358,10 @@ extern "C" {
                 main->setting.range.stop = j;
 
                 if ((print_state & 0x1) && !(print_state & 0x4)) {
-                  main->callback.print_object_end_content(&main->program.output, at, main->setting.range, (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
+                  main->call.print_object_end_content(&main->program.output, at, main->setting.range, (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
                 }
                 else {
-                  main->callback.print_content(&main->program.output, at, main->setting.range, (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
+                  main->call.print_content(&main->program.output, at, main->setting.range, (at < main->setting.quotes_content.used && i < main->setting.quotes_content.array[at].used) ? main->setting.quotes_content.array[at].array[i] : 0, delimits_content);
                 }
 
                 main->setting.state.status = F_success;
@@ -388,8 +382,8 @@ extern "C" {
       // Simulate the ending by printing.
       if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.feature & fss_read_feature_flag_content_has_close_d)) {
         if (*line == main->setting.line) {
-          if (main->callback.print_set_end) {
-            main->callback.print_set_end(&main->program.output, at);
+          if (main->call.print_set_end) {
+            main->call.print_set_end(&main->program.output, at);
           }
 
           main->setting.state.status = F_success;
@@ -406,11 +400,9 @@ extern "C" {
 #endif // _di_fss_read_process_at_line_
 
 #ifndef _di_fss_read_process_columns_
-  void fss_read_process_columns(void * const void_main, const bool names[]) {
-
-    if (!void_main) return;
+  void fss_read_process_columns(fss_read_main_t * const main, const bool names[]) {
 
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     if (!(main->setting.flag & fss_read_main_flag_content_d)) {
       fss_read_print_number(&main->program.output, 0);
@@ -483,11 +475,9 @@ extern "C" {
 #endif // _di_fss_read_process_columns_
 
 #ifndef _di_fss_read_process_name_
-  void fss_read_process_name(void * const void_main, bool names[]) {
+  void fss_read_process_name(fss_read_main_t * const main, bool names[]) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.depth.index_name) {
       f_number_unsigned_t i = 0;
@@ -524,11 +514,9 @@ extern "C" {
 #endif // _di_fss_read_process_name_
 
 #ifndef _di_fss_read_process_total_
-  void fss_read_process_total(void * const void_main, const bool names[]) {
-
-    if (!void_main) return;
+  void fss_read_process_total(fss_read_main_t * const main, const bool names[]) {
 
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     f_number_unsigned_t total = 0;
     f_number_unsigned_t i = 0;
@@ -602,11 +590,9 @@ extern "C" {
 #endif // _di_fss_read_process_total_
 
 #ifndef _di_fss_read_process_total_multiple_
-  void fss_read_process_total_multiple(void * const void_main, const bool names[]) {
-
-    if (!void_main) return;
+  void fss_read_process_total_multiple(fss_read_main_t * const main, const bool names[]) {
 
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     f_number_unsigned_t total = 0;
     f_number_unsigned_t at = 0;
index d298ed074b404f73911ce68b708e0f24eb8cc8be..072815e63ab92f8888d16009afc6c8cfd27889e4 100644 (file)
@@ -23,7 +23,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -42,7 +41,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_
-  extern void fss_read_process(void * const main);
+  extern void fss_read_process(fss_read_main_t * const main);
 #endif // _di_fss_read_process_
 
 /**
@@ -54,7 +53,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -73,7 +71,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_at_
-  extern void fss_read_process_at(void * const main, const bool names[], const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
+  extern void fss_read_process_at(fss_read_main_t * const main, const bool names[], const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
 #endif // _di_fss_read_process_at_
 
 /**
@@ -83,7 +81,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.range.
  *
@@ -109,7 +106,7 @@ extern "C" {
  *   Must not be NULL.
  */
 #ifndef _di_fss_read_process_at_line_
-  extern void fss_read_process_at_line(void * const main, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content, f_number_unsigned_t * const line);
+  extern void fss_read_process_at_line(fss_read_main_t * const main, const f_number_unsigned_t at, const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content, f_number_unsigned_t * const line);
 #endif // _di_fss_read_process_at_line_
 
 /**
@@ -119,7 +116,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -132,7 +128,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_columns_
-  extern void fss_read_process_columns(void * const main, const bool names[]);
+  extern void fss_read_process_columns(fss_read_main_t * const main, const bool names[]);
 #endif // _di_fss_read_process_columns_
 
 /**
@@ -142,7 +138,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -155,7 +150,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_name_
-  extern void fss_read_process_name(void * const main, bool names[]);
+  extern void fss_read_process_name(fss_read_main_t * const main, bool names[]);
 #endif // _di_fss_read_process_name_
 
 /**
@@ -167,7 +162,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -180,7 +174,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_total_
-  extern void fss_read_process_total(void * const main, const bool names[]);
+  extern void fss_read_process_total(fss_read_main_t * const main, const bool names[]);
 #endif // _di_fss_read_process_total_
 
 /**
@@ -192,7 +186,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -205,7 +198,7 @@ extern "C" {
  * @see fss_read_signal_check()
  */
 #ifndef _di_fss_read_process_total_multiple_
-  extern void fss_read_process_total_multiple(void * const main, const bool names[]);
+  extern void fss_read_process_total_multiple(fss_read_main_t * const main, const bool names[]);
 #endif // _di_fss_read_process_total_multiple_
 
 #ifdef __cplusplus
index 2b2aec5ea16ea83caba1fdac236726f50f197f47..e6993b69b9a7dcbbadfce644453438041877cc61 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_read_payload_process_help_
-  void fss_read_payload_process_help(void * const void_main) {
+  void fss_read_payload_process_help(fss_read_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_read_payload_print_message_help(&((fss_read_main_t *) void_main)->program.message);
+    fss_read_payload_print_message_help(&main->program.message);
   }
 #endif // _di_fss_read_payload_process_help_
 
 #ifndef _di_fss_read_payload_process_load_
-  void fss_read_payload_process_load(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_read_payload_process_load(fss_read_main_t * const main) {
 
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.buffer.used) {
       main->setting.range.start = 0;
@@ -131,11 +129,9 @@ extern "C" {
 #endif // _di_fss_read_payload_process_load_
 
 #ifndef _di_fss_read_payload_process_set_
-  void fss_read_payload_process_set(void * const void_main) {
+  void fss_read_payload_process_set(fss_read_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_read_main_t * const main = (fss_read_main_t *) void_main;
+    if (!main) return;
 
     main->setting.state.status = F_okay;
   }
index 7f31631aaed65621cb2562ff98047a9e03a2910e..b19f2ea3fbccf3fce7bbb2dc5a3877fd3b9cbcc2 100644 (file)
@@ -73,7 +73,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -82,7 +81,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_read_payload_process_help_
-  extern void fss_read_payload_process_help(void * const main);
+  extern void fss_read_payload_process_help(fss_read_main_t * const main);
 #endif // _di_fss_read_payload_process_help_
 
 /**
@@ -94,7 +93,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -112,7 +110,7 @@ extern "C" {
  * @see fss_read_file_identify()
  */
 #ifndef _di_fss_read_payload_process_load_
-  extern void fss_read_payload_process_load(void * const main);
+  extern void fss_read_payload_process_load(fss_read_main_t * const main);
 #endif // _di_fss_read_payload_process_load_
 
 /**
@@ -122,13 +120,12 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_read_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
  */
 #ifndef _di_fss_read_payload_process_set_
-  extern void fss_read_payload_process_set(void * const main);
+  extern void fss_read_payload_process_set(fss_read_main_t * const main);
 #endif // _di_fss_read_payload_process_set_
 
 /**
index 3ef3bc9f998caff7f879f45fda632027a9179629..14dbee6dd7a655b04957829c04ec7c307f4f21ad 100644 (file)
@@ -24,27 +24,27 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.standard = fss_read_payload_standard_s;
   data.setting.open_object = f_fss_payload_list_open_s;
 
-  data.callback.process_help = &fss_read_payload_process_help;
-  data.callback.process_last_line = &fss_read_process_last_line;
-  data.callback.process = &fss_read_process;
-
-  data.callback.process_at = &fss_read_process_at;
-  data.callback.process_at_line = &fss_read_process_at_line;
-  data.callback.process_columns = &fss_read_process_columns;
-  data.callback.process_load = &fss_read_payload_process_load;
-  data.callback.process_name = &fss_read_process_name;
-  data.callback.process_total = &fss_read_process_total_multiple;
-
-  data.callback.print_at = &fss_read_print_at;
-  data.callback.print_content = &fss_read_payload_print_content;
-  data.callback.print_content_empty = &fss_read_print_content_empty;
-  data.callback.print_content_ignore = &fss_read_print_content_ignore;
-  data.callback.print_content_next = 0;
-  data.callback.print_object = &fss_read_print_object;
-  data.callback.print_object_end = &fss_read_payload_print_object_end;
-  data.callback.print_object_end_content = &fss_read_print_object_end_content;
-  data.callback.print_object_end_empty = &fss_read_print_object_end_empty;
-  data.callback.print_set_end = &fss_read_print_set_end_no_eol;
+  data.call.process_help = &fss_read_payload_process_help;
+  data.call.process_last_line = &fss_read_process_last_line;
+  data.call.process = &fss_read_process;
+
+  data.call.process_at = &fss_read_process_at;
+  data.call.process_at_line = &fss_read_process_at_line;
+  data.call.process_columns = &fss_read_process_columns;
+  data.call.process_load = &fss_read_payload_process_load;
+  data.call.process_name = &fss_read_process_name;
+  data.call.process_total = &fss_read_process_total_multiple;
+
+  data.call.print_at = &fss_read_print_at;
+  data.call.print_content = &fss_read_payload_print_content;
+  data.call.print_content_empty = &fss_read_print_content_empty;
+  data.call.print_content_ignore = &fss_read_print_content_ignore;
+  data.call.print_content_next = 0;
+  data.call.print_object = &fss_read_print_object;
+  data.call.print_object_end = &fss_read_payload_print_object_end;
+  data.call.print_object_end_content = &fss_read_print_object_end_content;
+  data.call.print_object_end_empty = &fss_read_print_object_end_empty;
+  data.call.print_set_end = &fss_read_print_set_end_no_eol;
 
   f_console_parameter_t parameters[] = fss_read_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index 798e7a749a7fb9f32ee9bde421765b8e3d3e998d..7ad881564e7515c8033fad78329553ec837cb67e 100644 (file)
@@ -16,8 +16,8 @@ extern "C" {
       return fll_print_dynamic_partial_raw(main->setting.buffer, range, print->to);
     }
 
-    if (main->callback.print_content_ignore) {
-      main->callback.print_content_ignore(&main->program.output);
+    if (main->call.print_content_ignore) {
+      main->call.print_content_ignore(&main->program.output);
     }
 
     if (main->setting.flag & fss_read_main_flag_original_d) {
@@ -34,8 +34,8 @@ extern "C" {
       }
     }
 
-    if (main->callback.print_content_ignore) {
-      main->callback.print_content_ignore(&main->program.output);
+    if (main->call.print_content_ignore) {
+      main->call.print_content_ignore(&main->program.output);
     }
 
     return F_okay;
index 9876d08533d186813048ad2b6b142d8761e256c5..50cc7e4896c648e279f68183faa55baebd144b1c 100644 (file)
@@ -6,11 +6,9 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_basic_process_content_
-  void fss_write_basic_process_content(void * const void_main, const bool last) {
+  void fss_write_basic_process_content(fss_write_main_t * const main, const bool last) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.content) {
       fl_fss_basic_content_write(
@@ -51,20 +49,18 @@ extern "C" {
 #endif // _di_fss_write_basic_process_content_
 
 #ifndef _di_fss_write_basic_process_help_
-  void fss_write_basic_process_help(void * const void_main) {
+  void fss_write_basic_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_basic_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_basic_print_help(&main->program.message);
   }
 #endif // _di_fss_write_basic_process_help_
 
 #ifndef _di_fss_write_basic_process_object_
-  void fss_write_basic_process_object(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_basic_process_object(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.object) {
       fl_fss_basic_object_write(
index 0314ab1758c23a737f9dbf6f2980cd4412a54edb..f17885a2f0c02f6b8f2d4350ff7f6cfc9ee9ef55 100644 (file)
@@ -66,7 +66,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
@@ -75,7 +74,7 @@ extern "C" {
  *   If FALSE, then this is not the last Content in the Content set.
  */
 #ifndef _di_fss_write_basic_process_content_
-  extern void fss_write_basic_process_content(void * const main, const bool last);
+  extern void fss_write_basic_process_content(fss_write_main_t * const main, const bool last);
 #endif // _di_fss_write_basic_process_content_
 
 /**
@@ -85,7 +84,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -94,7 +92,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_basic_process_help_
-  extern void fss_write_basic_process_help(void * const main);
+  extern void fss_write_basic_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_basic_process_help_
 
 /**
@@ -104,13 +102,12 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
  */
 #ifndef _di_fss_write_basic_process_object_
-  extern void fss_write_basic_process_object(void * const main);
+  extern void fss_write_basic_process_object(fss_write_main_t * const main);
 #endif // _di_fss_write_basic_process_object_
 
 #ifdef __cplusplus
index 2284eafeb1d9d22896a55f4f237edc0cc96c4b92..1e92e7ae868ca25dd0a5ab4470c3660505d6d7ed 100644 (file)
@@ -19,12 +19,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.state.custom = (void *) &data;
   data.setting.standard = fss_write_basic_standard_s;
 
-  data.callback.process_content = &fss_write_basic_process_content;
-  data.callback.process_help = &fss_write_basic_process_help;
-  data.callback.process_normal = &fss_write_process_normal;
-  data.callback.process_object = &fss_write_basic_process_object;
-  data.callback.process_pipe = &fss_write_process_pipe;
-  data.callback.process_set = &fss_write_process_set;
+  data.call.process_content = &fss_write_basic_process_content;
+  data.call.process_help = &fss_write_basic_process_help;
+  data.call.process_normal = &fss_write_process_normal;
+  data.call.process_object = &fss_write_basic_process_object;
+  data.call.process_pipe = &fss_write_process_pipe;
+  data.call.process_set = &fss_write_process_set;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index 076fdd40f3a6c52d0b54156654c6d8065a7d61f1..7256293e12c87f27c4b42e51b4e0f7d16767549a 100644 (file)
@@ -6,11 +6,9 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_basic_list_process_content_
-  void fss_write_basic_list_process_content(void * const void_main, const bool last) {
+  void fss_write_basic_list_process_content(fss_write_main_t * const main, const bool last) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.content) {
       fl_fss_basic_list_content_write(
@@ -54,20 +52,18 @@ extern "C" {
 #endif // _di_fss_write_basic_list_process_content_
 
 #ifndef _di_fss_write_basic_list_process_help_
-  void fss_write_basic_list_process_help(void * const void_main) {
+  void fss_write_basic_list_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_basic_list_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_basic_list_print_help(&main->program.message);
   }
 #endif // _di_fss_write_basic_list_process_help_
 
 #ifndef _di_fss_write_basic_list_process_object_
-  void fss_write_basic_list_process_object(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_basic_list_process_object(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.object) {
       fl_fss_basic_list_object_write(
index ebb9e24fd1334921a008cf3d8162d060e657625b..0f0a6c35bdb64e25129460c366d8b80ebfcce209 100644 (file)
@@ -67,7 +67,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
@@ -76,7 +75,7 @@ extern "C" {
  *   If FALSE, then this is not the last Content in the Content set.
  */
 #ifndef _di_fss_write_basic_list_process_content_
-  extern void fss_write_basic_list_process_content(void * const main, const bool last);
+  extern void fss_write_basic_list_process_content(fss_write_main_t * const main, const bool last);
 #endif // _di_fss_write_basic_list_process_content_
 
 /**
@@ -86,7 +85,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -95,7 +93,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_basic_list_process_help_
-  extern void fss_write_basic_list_process_help(void * const main);
+  extern void fss_write_basic_list_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_basic_list_process_help_
 
 /**
@@ -105,13 +103,12 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
  */
 #ifndef _di_fss_write_basic_list_process_object_
-  extern void fss_write_basic_list_process_object(void * const main);
+  extern void fss_write_basic_list_process_object(fss_write_main_t * const main);
 #endif // _di_fss_write_basic_list_process_object_
 
 #ifdef __cplusplus
index cd197e716e1bd9460ed20b4e0f555584cd25e423..d13bbcb9dfa070f5e02bfc12a17a2bddb49707e8 100644 (file)
@@ -19,12 +19,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.state.custom = (void *) &data;
   data.setting.standard = fss_write_basic_list_standard_s;
 
-  data.callback.process_content = &fss_write_basic_list_process_content;
-  data.callback.process_help = &fss_write_basic_list_process_help;
-  data.callback.process_normal = &fss_write_process_normal;
-  data.callback.process_object = &fss_write_basic_list_process_object;
-  data.callback.process_pipe = &fss_write_process_pipe;
-  data.callback.process_set = &fss_write_process_set;
+  data.call.process_content = &fss_write_basic_list_process_content;
+  data.call.process_help = &fss_write_basic_list_process_help;
+  data.call.process_normal = &fss_write_process_normal;
+  data.call.process_object = &fss_write_basic_list_process_object;
+  data.call.process_pipe = &fss_write_process_pipe;
+  data.call.process_set = &fss_write_process_set;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index db551aaa739718a054d2b951fc5dac78cbce5615..3aca9c08dbc90c3b8eab8f7d4d276e6618c5c6ab 100644 (file)
@@ -6,11 +6,9 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_embedded_list_process_content_
-  void fss_write_embedded_list_process_content(void * const void_main, const bool last) {
+  void fss_write_embedded_list_process_content(fss_write_main_t * const main, const bool last) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.content) {
       fl_fss_embedded_list_content_write(
@@ -59,20 +57,18 @@ extern "C" {
 #endif // _di_fss_write_embedded_list_process_content_
 
 #ifndef _di_fss_write_embedded_list_process_help_
-  void fss_write_embedded_list_process_help(void * const void_main) {
+  void fss_write_embedded_list_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_embedded_list_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_embedded_list_print_help(&main->program.message);
   }
 #endif // _di_fss_write_embedded_list_process_help_
 
 #ifndef _di_fss_write_embedded_list_process_object_
-  void fss_write_embedded_list_process_object(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_embedded_list_process_object(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.object) {
       fl_fss_embedded_list_object_write(
index 9516c12f9c01eeb6eacc68549bca34e36739f15c..b0424556a6791d455986f58c062574ab00eff0ed 100644 (file)
@@ -66,7 +66,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
@@ -75,7 +74,7 @@ extern "C" {
  *   If FALSE, then this is not the last Content in the Content set.
  */
 #ifndef _di_fss_write_embedded_list_process_content_
-  extern void fss_write_embedded_list_process_content(void * const main, const bool last);
+  extern void fss_write_embedded_list_process_content(fss_write_main_t * const main, const bool last);
 #endif // _di_fss_write_embedded_list_process_content_
 
 /**
@@ -85,7 +84,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -94,7 +92,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_embedded_list_process_help_
-  extern void fss_write_embedded_list_process_help(void * const main);
+  extern void fss_write_embedded_list_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_embedded_list_process_help_
 
 /**
@@ -104,13 +102,12 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
  */
 #ifndef _di_fss_write_embedded_list_process_object_
-  extern void fss_write_embedded_list_process_object(void * const main);
+  extern void fss_write_embedded_list_process_object(fss_write_main_t * const main);
 #endif // _di_fss_write_embedded_list_process_object_
 
 #ifdef __cplusplus
index 70a0fd762154039fa2dca39f0bfc6620092a33fb..dce63505b99a7e44428587632303105372b87990 100644 (file)
@@ -22,12 +22,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.state.custom = (void *) &data;
   data.setting.standard = fss_write_embedded_list_standard_s;
 
-  data.callback.process_content = &fss_write_embedded_list_process_content;
-  data.callback.process_help = &fss_write_embedded_list_process_help;
-  data.callback.process_normal = &fss_write_process_normal;
-  data.callback.process_object = &fss_write_embedded_list_process_object;
-  data.callback.process_pipe = &fss_write_process_pipe;
-  data.callback.process_set = &fss_write_process_set;
+  data.call.process_content = &fss_write_embedded_list_process_content;
+  data.call.process_help = &fss_write_embedded_list_process_help;
+  data.call.process_normal = &fss_write_process_normal;
+  data.call.process_object = &fss_write_embedded_list_process_object;
+  data.call.process_pipe = &fss_write_process_pipe;
+  data.call.process_set = &fss_write_process_set;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index b1599f8e1ca64f3ff089566f4873a047d1a1698a..464f12fe60f302ab7c0970e270ccb6cd19df4ef5 100644 (file)
@@ -6,11 +6,9 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_extended_process_content_
-  void fss_write_extended_process_content(void * const void_main, const bool last) {
+  void fss_write_extended_process_content(fss_write_main_t * const main, const bool last) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.content) {
       fl_fss_extended_content_write(
@@ -63,20 +61,18 @@ extern "C" {
 #endif // _di_fss_write_extended_process_content_
 
 #ifndef _di_fss_write_extended_process_help_
-  void fss_write_extended_process_help(void * const void_main) {
+  void fss_write_extended_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_extended_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_extended_print_help(&main->program.message);
   }
 #endif // _di_fss_write_extended_process_help_
 
 #ifndef _di_fss_write_extended_process_object_
-  void fss_write_extended_process_object(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_extended_process_object(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.object) {
       fl_fss_extended_object_write(
index 56e175fc7aab5558179027a4d09d3007a3be3d37..ef75194055a867331931485abc4c430b5cd61199 100644 (file)
@@ -66,7 +66,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
@@ -75,7 +74,7 @@ extern "C" {
  *   If FALSE, then this is not the last Content in the Content set.
  */
 #ifndef _di_fss_write_extended_process_content_
-  extern void fss_write_extended_process_content(void * const main, const bool last);
+  extern void fss_write_extended_process_content(fss_write_main_t * const main, const bool last);
 #endif // _di_fss_write_extended_process_content_
 
 /**
@@ -85,7 +84,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -94,7 +92,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_extended_process_help_
-  extern void fss_write_extended_process_help(void * const main);
+  extern void fss_write_extended_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_extended_process_help_
 
 /**
@@ -104,13 +102,12 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
  */
 #ifndef _di_fss_write_extended_process_object_
-  extern void fss_write_extended_process_object(void * const main);
+  extern void fss_write_extended_process_object(fss_write_main_t * const main);
 #endif // _di_fss_write_extended_process_object_
 
 #ifdef __cplusplus
index d26773d8cc8981a3b41865fcab823ea99cc5a726..384fc5d98634d82769902e740a1dc56bb69c3377 100644 (file)
@@ -21,12 +21,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.state.custom = (void *) &data;
   data.setting.standard = fss_write_extended_standard_s;
 
-  data.callback.process_content = &fss_write_extended_process_content;
-  data.callback.process_help = &fss_write_extended_process_help;
-  data.callback.process_normal = &fss_write_process_normal;
-  data.callback.process_object = &fss_write_extended_process_object;
-  data.callback.process_pipe = &fss_write_process_pipe;
-  data.callback.process_set = &fss_write_process_set;
+  data.call.process_content = &fss_write_extended_process_content;
+  data.call.process_help = &fss_write_extended_process_help;
+  data.call.process_normal = &fss_write_process_normal;
+  data.call.process_object = &fss_write_extended_process_object;
+  data.call.process_pipe = &fss_write_process_pipe;
+  data.call.process_set = &fss_write_process_set;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index 1bbbf3841ad4fb7bf56dbf1fd708e9a205fcd266..97cc1acd5cf97a242807a370f163a3466252563d 100644 (file)
@@ -6,11 +6,9 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_extended_list_process_content_
-  void fss_write_extended_list_process_content(void * const void_main, const bool last) {
+  void fss_write_extended_list_process_content(fss_write_main_t * const main, const bool last) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.content) {
       fl_fss_extended_list_content_write(
@@ -59,20 +57,18 @@ extern "C" {
 #endif // _di_fss_write_extended_list_process_content_
 
 #ifndef _di_fss_write_extended_list_process_help_
-  void fss_write_extended_list_process_help(void * const void_main) {
+  void fss_write_extended_list_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_extended_list_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_extended_list_print_help(&main->program.message);
   }
 #endif // _di_fss_write_extended_list_process_help_
 
 #ifndef _di_fss_write_extended_list_process_object_
-  void fss_write_extended_list_process_object(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_extended_list_process_object(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if (main->setting.object) {
       fl_fss_extended_list_object_write(
index beda6d9ee96fe8048388f09c2afa054a5eb011e6..ea8fbf0fe3186d29cce57af5c41e20a70efdc887 100644 (file)
@@ -66,7 +66,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
@@ -75,7 +74,7 @@ extern "C" {
  *   If FALSE, then this is not the last Content in the Content set.
  */
 #ifndef _di_fss_write_extended_list_process_content_
-  extern void fss_write_extended_list_process_content(void * const main, const bool last);
+  extern void fss_write_extended_list_process_content(fss_write_main_t * const main, const bool last);
 #endif // _di_fss_write_extended_list_process_content_
 
 /**
@@ -85,7 +84,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -94,7 +92,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_extended_list_process_help_
-  extern void fss_write_extended_list_process_help(void * const main);
+  extern void fss_write_extended_list_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_extended_list_process_help_
 
 /**
@@ -104,13 +102,12 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status.
  *   This uses and alters main.setting.buffer.
  */
 #ifndef _di_fss_write_extended_list_process_object_
-  extern void fss_write_extended_list_process_object(void * const main);
+  extern void fss_write_extended_list_process_object(fss_write_main_t * const main);
 #endif // _di_fss_write_extended_list_process_object_
 
 #ifdef __cplusplus
index 4e391327c9790be131b5304e712817695549e29e..7207e0928f218437b1fc885d5a2cc1762d4ab37c 100644 (file)
@@ -21,12 +21,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   data.setting.flag |= fss_write_main_flag_ignore_d;
 
-  data.callback.process_content = &fss_write_extended_list_process_content;
-  data.callback.process_help = &fss_write_extended_list_process_help;
-  data.callback.process_normal = &fss_write_process_normal;
-  data.callback.process_object = &fss_write_extended_list_process_object;
-  data.callback.process_pipe = &fss_write_process_pipe;
-  data.callback.process_set = &fss_write_process_set;
+  data.call.process_content = &fss_write_extended_list_process_content;
+  data.call.process_help = &fss_write_extended_list_process_help;
+  data.call.process_normal = &fss_write_process_normal;
+  data.call.process_object = &fss_write_extended_list_process_object;
+  data.call.process_pipe = &fss_write_process_pipe;
+  data.call.process_set = &fss_write_process_set;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index 605d12eb7864d4153c02e90ee03a3170a4b7f285..11def301425d8ba6064ce996a688450a558da032 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_setting_load_
-  void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main)) {
+  void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, const fss_write_setting_load_call_t load_call) {
 
     if (!main) return;
 
@@ -60,8 +60,8 @@ extern "C" {
       main->setting.flag &= ~fss_write_main_flag_pipe_d;
     }
 
-    if (callback) {
-      callback(arguments, main);
+    if (load_call) {
+      load_call(arguments, main);
       if (F_status_is_error(main->setting.state.status)) return;
 
       if (main->setting.state.status == F_done) {
index a3ed8ce34368741d3eb7b875fa2a3f31d742ac56..48da5fbbc930e111bde77631424ea875d5159b46 100644 (file)
@@ -40,9 +40,10 @@ extern "C" {
  *     Errors (with error bit) from: f_file_stream_open().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
- * @param callback
+ * @param load_call
  *   (optional) Designate a function to call after performing the initial processing, but before printing help.
  *   If the function returns F_done, then this function immediately returns, resetting status to F_okay.
+ *
  *   Set to NULL to disable.
  *
  * @see f_console_parameter_process()
@@ -51,7 +52,7 @@ extern "C" {
  * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_fss_write_setting_load_
-  extern void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main));
+  extern void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, const fss_write_setting_load_call_t load_call);
 #endif // _di_fss_write_setting_load_
 
 #ifdef __cplusplus
index f94dbaa26208692a36dcaa5f1e48a9cbc99ab531..ef5e276e53e95941802f703128613d94abb3ed5b 100644 (file)
@@ -33,17 +33,20 @@ extern "C" {
  * process_pipe:    Process using the data from input pipe.
  * process_set:     Process a set of Object and one or more Content.
  */
-#ifndef _di_fss_write_callback_t_
+#ifndef _di_fss_write_call_t_
+  typedef void (*fss_write_process_main_call_t) (fss_write_main_t * const main);
+  typedef void (*fss_write_process_content_call_t) (fss_write_main_t * const main, const bool last);
+
   typedef struct {
-    void (*process_content)(void * const main, const bool last);
-    void (*process_help)(void * const main);
-    void (*process_normal)(void * const main);
-    void (*process_object)(void * const main);
-    void (*process_pipe)(void * const main);
-    void (*process_set)(void * const main);
-  } fss_write_callback_t;
-
-  #define fss_write_callback_t_initialize \
+    fss_write_process_content_call_t process_content;
+    fss_write_process_main_call_t process_help;
+    fss_write_process_main_call_t process_normal;
+    fss_write_process_main_call_t process_object;
+    fss_write_process_main_call_t process_pipe;
+    fss_write_process_main_call_t process_set;
+  } fss_write_call_t;
+
+  #define fss_write_call_t_initialize \
     { \
       0, \
       0, \
@@ -52,7 +55,7 @@ extern "C" {
       0, \
       0, \
     }
-#endif // _di_fss_write_callback_t_
+#endif // _di_fss_write_call_t_
 
 /**
  * The fss write main program settings.
@@ -131,26 +134,36 @@ extern "C" {
 /**
  * The main program data as a single structure.
  *
- * callback: The callback data.
- * program:  The main program data.
- * setting:  The settings data.
+ * Properties:
+ *   - call:     The callbacks.
+ *   - program:  The main program data.
+ *   - setting:  The settings data.
  */
 #ifndef _di_fss_write_main_t_
   struct fss_write_main_t_ {
-    fss_write_callback_t callback;
+    fss_write_call_t call;
     fll_program_data_t program;
     fss_write_setting_t setting;
   };
 
   #define fss_write_main_t_initialize \
     { \
-      fss_write_callback_t_initialize, \
+      fss_write_call_t_initialize, \
       fll_program_data_t_initialize, \
       fss_write_setting_t_initialize, \
     }
 #endif // _di_fss_write_main_t_
 
 /**
+ * Callback type for the fss_write_setting_load() argument.
+ *
+ * Perform the initial processing for fss_write_setting_load().
+ */
+#ifndef _di_fss_write_setting_load_call_t_
+  typedef void (*fss_write_setting_load_call_t) (const f_console_arguments_t arguments, fss_write_main_t * const main);
+#endif // _di_fss_write_setting_load_call_t_
+
+/**
  * De-allocate main program data.
  *
  * @param main
index 10344f31b4ed87967786921387c2d336d018bd0f..9433cfb025139e3ed238823ab4b6ab57855104ee 100644 (file)
@@ -5,20 +5,16 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_main_
-  void fss_write_main(void * const void_main) {
+  void fss_write_main(fss_write_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
-
-    if (F_status_is_error(main->setting.state.status)) return;
+    if (!main || F_status_is_error(main->setting.state.status)) return;
 
     main->setting.state.status = F_okay;
 
     if (main->setting.flag & fss_write_main_flag_version_copyright_help_d) {
       if (main->setting.flag & fss_write_main_flag_help_d) {
-        if (main->callback.process_help) {
-          main->callback.process_help(void_main);
+        if (main->call.process_help) {
+          main->call.process_help(main);
         }
         else {
           fss_write_print_message_help(&main->program.message);
@@ -39,15 +35,15 @@ extern "C" {
     }
 
     if (main->setting.flag & fss_write_main_flag_pipe_d) {
-      if (main->callback.process_pipe) {
-        main->callback.process_pipe(void_main);
+      if (main->call.process_pipe) {
+        main->call.process_pipe(main);
       }
     }
 
     if (F_status_is_error_not(main->setting.state.status)) {
       if (main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d | fss_write_main_flag_object_open_d | fss_write_main_flag_content_next_d | fss_write_main_flag_content_end_d)) {
-        if (main->callback.process_normal) {
-          main->callback.process_normal(void_main);
+        if (main->call.process_normal) {
+          main->call.process_normal(main);
         }
       }
     }
@@ -59,25 +55,23 @@ extern "C" {
 #endif // _di_fss_write_main_
 
 #ifndef _di_fss_write_process_normal_
-  void fss_write_process_normal(void * const void_main) {
+  void fss_write_process_normal(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
     fss_write_process_normal_data(
-      (fss_write_main_t *) void_main,
-      (((fss_write_main_t *) void_main)->setting.flag & fss_write_main_flag_object_d)
-        ? ((fss_write_main_t *) void_main)->setting.objects.used
-        : ((fss_write_main_t *) void_main)->setting.contentss.used
+      main,
+      ((main)->setting.flag & fss_write_main_flag_object_d)
+        ? (main)->setting.objects.used
+        : (main)->setting.contentss.used
     );
   }
 #endif // _di_fss_write_process_normal_
 
 #ifndef _di_fss_write_process_normal_data_
-  void fss_write_process_normal_data(void * const void_main, const f_number_unsigned_t length) {
+  void fss_write_process_normal_data(fss_write_main_t * const main, const f_number_unsigned_t length) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     main->setting.ignores = 0;
     main->setting.object = 0;
@@ -101,7 +95,7 @@ extern "C" {
           main->setting.ignores = &main->setting.ignoress.array[i];
         }
 
-        main->callback.process_set(void_main);
+        main->call.process_set(main);
         if (F_status_is_error(main->setting.state.status)) break;
       } // for
     }
@@ -111,20 +105,16 @@ extern "C" {
         main->setting.contents = 0;
         main->setting.ignores = 0;
 
-        main->callback.process_set(void_main);
+        main->call.process_set(main);
       }
     }
   }
 #endif // _di_fss_write_process_normal_data_
 
 #ifndef _di_fss_write_process_pipe_
-  void fss_write_process_pipe(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_process_pipe(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
-
-    if (!main->callback.process_set) return;
+    if (!main || !main->call.process_set) return;
 
     if (main->program.message.verbosity > f_console_verbosity_error_e) {
       fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
@@ -382,7 +372,7 @@ extern "C" {
 
       // End Object or Content set.
       if (state == 0x3) {
-        main->callback.process_set(void_main);
+        main->call.process_set(main);
         if (F_status_is_error(main->setting.state.status)) break;
 
         state = 0;
@@ -399,7 +389,7 @@ extern "C" {
 
     // If the pipe ended before finishing, then attempt to wrap up.
     if (F_status_is_error_not(main->setting.state.status) && status_pipe == F_okay_eof && state) {
-      main->callback.process_set(void_main);
+      main->call.process_set(main);
 
       flag |= 0x1;
     }
@@ -420,11 +410,7 @@ extern "C" {
 #endif // _di_fss_write_process_pipe_
 
 #ifndef _di_fss_write_process_set_
-  void fss_write_process_set(void * const void_main) {
-
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+  void fss_write_process_set(fss_write_main_t * const main) {
 
     main->setting.buffer.used = 0;
 
@@ -441,15 +427,15 @@ extern "C" {
         }
       }
 
-      if (main->callback.process_object) {
-        main->callback.process_object(void_main);
+      if (main->call.process_object) {
+        main->call.process_object(main);
         if (F_status_is_error(main->setting.state.status)) return;
       }
     }
 
     if ((!(main->setting.flag & fss_write_main_flag_partial_d) || (main->setting.flag & fss_write_main_flag_partial_d) && (main->setting.flag & fss_write_main_flag_content_d)) && main->setting.contents || (main->setting.flag & (fss_write_main_flag_content_next_d | fss_write_main_flag_content_end_d))) {
 
-      if (main->callback.process_content) {
+      if (main->call.process_content) {
         if (main->setting.contents && main->setting.contents->used) {
           for (f_number_unsigned_t i = 0; i < main->setting.contents->used; ++i) {
 
@@ -464,14 +450,14 @@ extern "C" {
 
             main->setting.content = &main->setting.contents->array[i];
 
-            main->callback.process_content(void_main, i + 1 == main->setting.contents->used);
+            main->call.process_content(main, i + 1 == main->setting.contents->used);
             if (F_status_is_error(main->setting.state.status)) return;
           } // for
         }
         else {
           main->setting.content = 0;
 
-          main->callback.process_content(void_main, F_true);
+          main->call.process_content(main, F_true);
           if (F_status_is_error(main->setting.state.status)) return;
         }
       }
index 4bb96d3868cec1e83d5c70a06883a65ec45f604c..ee8e3f66929176f8d9fe35c6b5cc84160fea3396 100644 (file)
@@ -77,7 +77,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.custom.setting.state.status:
  *     F_okay on success.
@@ -88,7 +87,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_main_
-  extern void fss_write_main(void * const main);
+  extern void fss_write_main(fss_write_main_t * const main);
 #endif // _di_fss_write_main_
 
 /**
@@ -98,7 +97,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.custom.setting.state.status:
  *     status from fss_write_process_normal_data().
@@ -108,7 +106,7 @@ extern "C" {
  * @see fss_write_process_normal_data()
  */
 #ifndef _di_fss_write_process_normal_
-  extern void fss_write_process_normal(void * const main);
+  extern void fss_write_process_normal(fss_write_main_t * const main);
 #endif // _di_fss_write_process_normal_
 
 /**
@@ -118,7 +116,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.custom.setting.state.status:
  *     F_okay on success.
@@ -127,7 +124,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_process_normal_data_
-  void fss_write_process_normal_data(void * const main, const f_number_unsigned_t length);
+  void fss_write_process_normal_data(fss_write_main_t * const main, const f_number_unsigned_t length);
 #endif // _di_fss_write_process_normal_data_
 
 /**
@@ -137,7 +134,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -148,7 +144,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_process_pipe_
-  extern void fss_write_process_pipe(void * const main);
+  extern void fss_write_process_pipe(fss_write_main_t * const main);
 #endif // _di_fss_write_process_pipe_
 
 /**
@@ -158,7 +154,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -167,7 +162,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_process_set_
-  extern void fss_write_process_set(void * const main);
+  extern void fss_write_process_set(fss_write_main_t * const main);
 #endif // _di_fss_write_process_set_
 
 #ifdef __cplusplus
index b59c01890528e2916d81a7edb39d978ba65e9db3..b73759cad326cd0e63f14e8d100cce4d1b4fbfdd 100644 (file)
@@ -83,11 +83,11 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 }
 
 #ifndef _di_fss_write_main_process_help_
-  void fss_write_main_process_help(void * const void_main) {
+  void fss_write_main_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_main_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_main_print_help(&main->program.message);
   }
 #endif // _di_fss_write_main_process_help_
 
@@ -98,12 +98,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
     main->setting.standard = fss_write_basic_standard_s;
 
-    main->callback.process_content = &fss_write_basic_process_content;
-    main->callback.process_help = &fss_write_main_process_help;
-    main->callback.process_normal = &fss_write_process_normal;
-    main->callback.process_object = &fss_write_basic_process_object;
-    main->callback.process_pipe = &fss_write_process_pipe;
-    main->callback.process_set = &fss_write_process_set;
+    main->call.process_content = &fss_write_basic_process_content;
+    main->call.process_help = &fss_write_main_process_help;
+    main->call.process_normal = &fss_write_process_normal;
+    main->call.process_object = &fss_write_basic_process_object;
+    main->call.process_pipe = &fss_write_process_pipe;
+    main->call.process_set = &fss_write_process_set;
 
     if (main->program.parameters.array[fss_write_parameter_as_e].result & f_console_result_value_e && main->program.parameters.array[fss_write_parameter_as_e].values.used) {
 
@@ -124,12 +124,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           // Remove flags not supported for this standard.
           main->setting.flag &= ~(fss_write_main_flag_ignore_d | fss_write_main_flag_content_multiple_d);
 
-          main->callback.process_content = &fss_write_basic_process_content;
-          main->callback.process_help = &fss_write_basic_process_help;
-          main->callback.process_object = &fss_write_basic_process_object;
-          main->callback.process_pipe = &fss_write_process_pipe;
-          main->callback.process_normal = &fss_write_process_normal;
-          main->callback.process_set = &fss_write_process_set;
+          main->call.process_content = &fss_write_basic_process_content;
+          main->call.process_help = &fss_write_basic_process_help;
+          main->call.process_object = &fss_write_basic_process_object;
+          main->call.process_pipe = &fss_write_process_pipe;
+          main->call.process_normal = &fss_write_process_normal;
+          main->call.process_set = &fss_write_process_set;
         }
         else if (f_compare_dynamic(argv[index], fss_write_format_code_short_0001_s) == F_equal_to ||
                  f_compare_dynamic(argv[index], fss_write_format_code_long_0001_s) == F_equal_to ||
@@ -142,12 +142,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           main->setting.flag &= ~fss_write_main_flag_ignore_d;
           main->setting.flag |= fss_write_main_flag_content_multiple_d;
 
-          main->callback.process_content = &fss_write_extended_process_content;
-          main->callback.process_help = &fss_write_extended_process_help;
-          main->callback.process_object = &fss_write_extended_process_object;
-          main->callback.process_pipe = &fss_write_process_pipe;
-          main->callback.process_normal = &fss_write_process_normal;
-          main->callback.process_set = &fss_write_process_set;
+          main->call.process_content = &fss_write_extended_process_content;
+          main->call.process_help = &fss_write_extended_process_help;
+          main->call.process_object = &fss_write_extended_process_object;
+          main->call.process_pipe = &fss_write_process_pipe;
+          main->call.process_normal = &fss_write_process_normal;
+          main->call.process_set = &fss_write_process_set;
         }
         else if (f_compare_dynamic(argv[index], fss_write_format_code_short_0002_s) == F_equal_to ||
                  f_compare_dynamic(argv[index], fss_write_format_code_long_0002_s) == F_equal_to ||
@@ -159,12 +159,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           // Remove flags not supported for this standard.
           main->setting.flag &= ~(fss_write_main_flag_ignore_d | fss_write_main_flag_content_multiple_d);
 
-          main->callback.process_content = &fss_write_basic_list_process_content;
-          main->callback.process_help = &fss_write_basic_list_process_help;
-          main->callback.process_object = &fss_write_basic_list_process_object;
-          main->callback.process_pipe = &fss_write_process_pipe;
-          main->callback.process_normal = &fss_write_process_normal;
-          main->callback.process_set = &fss_write_process_set;
+          main->call.process_content = &fss_write_basic_list_process_content;
+          main->call.process_help = &fss_write_basic_list_process_help;
+          main->call.process_object = &fss_write_basic_list_process_object;
+          main->call.process_pipe = &fss_write_process_pipe;
+          main->call.process_normal = &fss_write_process_normal;
+          main->call.process_set = &fss_write_process_set;
         }
         else if (f_compare_dynamic(argv[index], fss_write_format_code_short_0003_s) == F_equal_to ||
                  f_compare_dynamic(argv[index], fss_write_format_code_long_0003_s) == F_equal_to ||
@@ -177,12 +177,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           main->setting.flag &= ~fss_write_main_flag_content_multiple_d;
           main->setting.flag |= fss_write_main_flag_ignore_d;
 
-          main->callback.process_content = &fss_write_extended_list_process_content;
-          main->callback.process_help = &fss_write_extended_list_process_help;
-          main->callback.process_object = &fss_write_extended_list_process_object;
-          main->callback.process_pipe = &fss_write_process_pipe;
-          main->callback.process_normal = &fss_write_process_normal;
-          main->callback.process_set = &fss_write_process_set;
+          main->call.process_content = &fss_write_extended_list_process_content;
+          main->call.process_help = &fss_write_extended_list_process_help;
+          main->call.process_object = &fss_write_extended_list_process_object;
+          main->call.process_pipe = &fss_write_process_pipe;
+          main->call.process_normal = &fss_write_process_normal;
+          main->call.process_set = &fss_write_process_set;
         }
         else if (f_compare_dynamic(argv[index], fss_write_format_code_short_0008_s) == F_equal_to ||
                  f_compare_dynamic(argv[index], fss_write_format_code_long_0008_s) == F_equal_to ||
@@ -194,12 +194,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           main->setting.flag |= fss_write_main_flag_ignore_d;
           main->setting.flag |= fss_write_main_flag_content_multiple_d;
 
-          main->callback.process_content = &fss_write_embedded_list_process_content;
-          main->callback.process_help = &fss_write_embedded_list_process_help;
-          main->callback.process_object = &fss_write_embedded_list_process_object;
-          main->callback.process_pipe = &fss_write_process_pipe;
-          main->callback.process_normal = &fss_write_process_normal;
-          main->callback.process_set = &fss_write_process_set;
+          main->call.process_content = &fss_write_embedded_list_process_content;
+          main->call.process_help = &fss_write_embedded_list_process_help;
+          main->call.process_object = &fss_write_embedded_list_process_object;
+          main->call.process_pipe = &fss_write_process_pipe;
+          main->call.process_normal = &fss_write_process_normal;
+          main->call.process_set = &fss_write_process_set;
         }
         else if (f_compare_dynamic(argv[index], fss_write_format_code_short_000e_s) == F_equal_to ||
                  f_compare_dynamic(argv[index], fss_write_format_code_long_000e_s) == F_equal_to ||
@@ -211,12 +211,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
           // Remove flags not supported for this standard.
           main->setting.flag &= ~(fss_write_main_flag_ignore_d | fss_write_main_flag_content_multiple_d);
 
-          main->callback.process_content = 0;
-          main->callback.process_help = &fss_write_payload_process_help;
-          main->callback.process_normal = &fss_write_process_normal;
-          main->callback.process_object = 0;
-          main->callback.process_pipe = &fss_write_payload_process_pipe;
-          main->callback.process_set = &fss_write_payload_process_set;
+          main->call.process_content = 0;
+          main->call.process_help = &fss_write_payload_process_help;
+          main->call.process_normal = &fss_write_process_normal;
+          main->call.process_object = 0;
+          main->call.process_pipe = &fss_write_payload_process_pipe;
+          main->call.process_set = &fss_write_payload_process_set;
         }
         else {
           if (main->setting.flag & fss_write_main_flag_help_d) {
@@ -233,7 +233,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
       if (F_status_is_error(main->setting.state.status)) {
         if (main->setting.flag & fss_write_main_flag_help_d) {
-          fss_write_main_process_help((void *) main);
+          fss_write_main_process_help(main);
         }
 
         return;
@@ -243,7 +243,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       if (main->setting.flag & fss_write_main_flag_help_d) {
-        fss_write_main_process_help((void *) main);
+        fss_write_main_process_help(main);
 
         return;
       }
index 687b89dc185857166f2c1810d2cb91a557a3ce99..17b8647259510c5c9076a1ef8631305dc0fd7175 100644 (file)
@@ -38,7 +38,6 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -47,7 +46,7 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_main_process_help_
-  extern void fss_write_main_process_help(void * const main);
+  extern void fss_write_main_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_main_process_help_
 
 /**
index cbb6389c592bafdb909edb044c998681e922e5bd..e32c7daa8c1451fc97b46a0bf1fcae9141028703 100644 (file)
@@ -6,20 +6,18 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_write_payload_process_help_
-  void fss_write_payload_process_help(void * const void_main) {
+  void fss_write_payload_process_help(fss_write_main_t * const main) {
 
-    if (!void_main) return;
+    if (!main) return;
 
-    fss_write_payload_print_help(&((fss_write_main_t *) void_main)->program.message);
+    fss_write_payload_print_help(&main->program.message);
   }
 #endif // _di_fss_write_payload_process_help_
 
 #ifndef _di_fss_write_payload_process_pipe_
-  void fss_write_payload_process_pipe(void * const void_main) {
-
-    if (!void_main) return;
+  void fss_write_payload_process_pipe(fss_write_main_t * const main) {
 
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     f_status_t status_pipe = F_okay;
     f_file_t input = f_file_t_initialize;
@@ -298,7 +296,7 @@ extern "C" {
 
       // End Object or Content set.
       if (state == 0x3) {
-        fss_write_payload_process_set(void_main);
+        fss_write_payload_process_set(main);
         if (F_status_is_error(main->setting.state.status)) break;
 
         state = 0;
@@ -343,7 +341,7 @@ extern "C" {
 
     // If the pipe ended before finishing, then attempt to wrap up.
     if (F_status_is_error_not(main->setting.state.status) && status_pipe == F_okay_eof && state) {
-      fss_write_payload_process_set(void_main);
+      fss_write_payload_process_set(main);
 
       flag |= 0x1;
     }
@@ -379,11 +377,9 @@ extern "C" {
 #endif // _di_fss_write_payload_process_pipe_
 
 #ifndef _di_fss_write_payload_process_set_
-  void fss_write_payload_process_set(void * const void_main) {
+  void fss_write_payload_process_set(fss_write_main_t * const main) {
 
-    if (!void_main) return;
-
-    fss_write_main_t * const main = (fss_write_main_t *) void_main;
+    if (!main) return;
 
     if ((!(main->setting.flag & fss_write_main_flag_partial_d) || (main->setting.flag & fss_write_main_flag_partial_d) && (main->setting.flag & fss_write_main_flag_object_d))) {
       if (main->setting.object && !(main->setting.flag & fss_write_main_flag_partial_d) && main->setting.contents && main->setting.contents->used) {
index 80d5bc4f6e0aa87c65f12e672f56b6e345ccc739..43d774824f173885c7532cbf1b21cd42d7a5a0cf 100644 (file)
@@ -67,7 +67,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This does not alter main.setting.state.status.
  *
@@ -76,7 +75,7 @@ extern "C" {
  *   F_output_not on success, but no printing is performed.
  */
 #ifndef _di_fss_write_payload_process_help_
-  extern void fss_write_payload_process_help(void * const main);
+  extern void fss_write_payload_process_help(fss_write_main_t * const main);
 #endif // _di_fss_write_payload_process_help_
 
 /**
@@ -86,7 +85,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -97,7 +95,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_payload_process_pipe_
-  extern void fss_write_payload_process_pipe(void * const main);
+  extern void fss_write_payload_process_pipe(fss_write_main_t * const main);
 #endif // _di_fss_write_payload_process_pipe_
 
 /**
@@ -107,7 +105,6 @@ extern "C" {
  *   The program and settings data.
  *
  *   Must not be NULL.
- *   Must be of type fss_write_main_t.
  *
  *   This alters main.setting.state.status:
  *     F_okay on success.
@@ -116,7 +113,7 @@ extern "C" {
  *     F_parameter (with error bit) if main is NULL or setting is NULL.
  */
 #ifndef _di_fss_write_payload_process_set_
-  extern void fss_write_payload_process_set(void * const main);
+  extern void fss_write_payload_process_set(fss_write_main_t * const main);
 #endif // _di_fss_write_payload_process_set_
 
 /**
@@ -133,6 +130,8 @@ extern "C" {
  * @param setting
  *   The main program settings.
  *
+ *   Must not be NULL.
+ *
  *   This alters setting.process_help, setting.process_normal, and setting.process_pipe.
  *
  *   This alters setting.state.status:
index f9ae3f5d3d290c36eb228f357940cea1205daf4d..4a8eee800a5729df9cfb71706f876ba8531ffe1f 100644 (file)
@@ -20,12 +20,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.setting.state.custom = (void *) &data;
   data.setting.standard = fss_write_payload_standard_s;
 
-  data.callback.process_content = 0;
-  data.callback.process_help = &fss_write_payload_process_help;
-  data.callback.process_normal = &fss_write_process_normal;
-  data.callback.process_object = 0;
-  data.callback.process_pipe = &fss_write_payload_process_pipe;
-  data.callback.process_set = &fss_write_payload_process_set;
+  data.call.process_content = 0;
+  data.call.process_help = &fss_write_payload_process_help;
+  data.call.process_normal = &fss_write_process_normal;
+  data.call.process_object = 0;
+  data.call.process_pipe = &fss_write_payload_process_pipe;
+  data.call.process_set = &fss_write_payload_process_set;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.program.parameters.array = parameters;
index a2612bfa1a50745ad33f71c12605221ed591dfb9..241441ff87ba1b270cf08e0ebdb1d20805a9395e 100644 (file)
@@ -23,8 +23,8 @@ extern "C" {
     fll_program_data_delete(&main->program);
     iki_read_setting_delete(&main->setting);
 
-    if (main->callback.delete_data) {
-      main->callback.delete_data(main);
+    if (main->call.delete_data) {
+      main->call.delete_data(main);
     }
   }
 #endif // _di_iki_read_main_delete_
index f5c5abc75a8bea1d6be78d8b13be4c2d33b2494a..d9e54aaaed9a83dd77576cf298dd4a04c1bd2c61 100644 (file)
@@ -59,17 +59,21 @@ extern "C" {
  *   - delete_data: Delete the IKI/EKI data.
  */
 #ifndef _di_iki_read_callback_t_
+  typedef void (*iki_read_main_call_t) (iki_read_main_t * const main);
+  typedef void (*iki_read_print_data_call_t) (fl_print_t * const print, const f_number_unsigned_t index);
+  typedef void (*iki_read_process_buffer_ranges_call_t) (iki_read_main_t * const main, f_range_t * const range_buffer);
+
   typedef struct {
-    void (*identify_alteration)(iki_read_main_t * const main);
+    iki_read_main_call_t identify_alteration;
 
-    void (*print_data)(fl_print_t * const print, const f_number_unsigned_t index);
-    void (*print_help)(fl_print_t * const print);
+    iki_read_print_data_call_t print_data;
+    fl_print_call_t print_help;
 
-    void (*process_buffer_ranges)(iki_read_main_t * const main, f_range_t * const range_buffer);
-    void (*process_buffer_ranges_whole)(iki_read_main_t * const main, f_range_t * const range_buffer);
-    void (*process_buffer_total)(iki_read_main_t * const main);
+    iki_read_process_buffer_ranges_call_t process_buffer_ranges;
+    iki_read_process_buffer_ranges_call_t process_buffer_ranges_whole;
+    iki_read_main_call_t process_buffer_total;
 
-    void (*delete_data)(iki_read_main_t * const main);
+    iki_read_main_call_t delete_data;
   } iki_read_callback_t;
 
   #define iki_read_callback_t_initialize \
@@ -152,16 +156,16 @@ extern "C" {
  * The main program data as a single structure.
  *
  * Properties:
- *   - cache:    The cache data.
- *   - callback: The callbacks.
- *   - data:     A pointer for the structure representing IKI data (or EKI data).
- *   - program:  The main program data.
- *   - setting:  The settings data.
+ *   - cache:   The cache data.
+ *   - call:    The callbacks.
+ *   - data:    A pointer for the structure representing IKI data (or EKI data).
+ *   - program: The main program data.
+ *   - setting: The settings data.
  */
 #ifndef _di_iki_read_main_t_
   struct iki_read_main_t_ {
     iki_read_cache_t cache;
-    iki_read_callback_t callback;
+    iki_read_callback_t call;
     void * data;
     fll_program_data_t program;
     iki_read_setting_t setting;
index add8460be69bd24f48a72cb93973fcbac32f7a51..6f2edf8a0bdd65bf768f6744ccef49904a601f14 100644 (file)
@@ -13,8 +13,8 @@ extern "C" {
 
     if (main->setting.flag & iki_read_main_flag_version_copyright_help_d) {
       if (main->setting.flag & iki_read_main_flag_help_d) {
-        if (main->callback.print_help) {
-          main->callback.print_help(&main->program.message);
+        if (main->call.print_help) {
+          main->call.print_help(&main->program.message);
         }
       }
       else if (main->setting.flag & iki_read_main_flag_version_d) {
index d6bac3192489a131fd61765cfac5b333aab35314..8f2dc0af0c58c25fc370b43d759ff5d4929258d3 100644 (file)
@@ -15,8 +15,8 @@ extern "C" {
       iki_read_process_line(main, &buffer_range);
 
       if (main->setting.flag & iki_read_main_flag_total_d) {
-        if (main->callback.process_buffer_total) {
-          main->callback.process_buffer_total(main);
+        if (main->call.process_buffer_total) {
+          main->call.process_buffer_total(main);
 
           if (F_status_is_error_not(main->setting.state.status)) {
             main->setting.state.status = F_okay;
@@ -32,13 +32,13 @@ extern "C" {
         return;
       }
 
-      if (main->callback.process_buffer_ranges_whole) {
-        main->callback.process_buffer_ranges_whole(main, &buffer_range);
+      if (main->call.process_buffer_ranges_whole) {
+        main->call.process_buffer_ranges_whole(main, &buffer_range);
       }
     }
     else {
-      if (main->callback.process_buffer_ranges) {
-        main->callback.process_buffer_ranges(main, &buffer_range);
+      if (main->call.process_buffer_ranges) {
+        main->call.process_buffer_ranges(main, &buffer_range);
       }
     }
 
index 29f8a187382157c141e698264410673849a81d57..3454f7cc2fe49580d7c999c8c0f35ac92a48f73c 100644 (file)
@@ -59,22 +59,25 @@ extern "C" {
  *
  *   - process_objects_content: Process an Objects and Content set.
  */
-#ifndef _di_iki_write_callback_t_
+#ifndef _di_iki_write_call_t_
+  typedef void (*iki_write_load_objects_content_pipe_call_t)(void * const main, const f_range_t range, uint8_t * const pipe_state);
+  typedef void (*iki_write_process_objects_content_call_t)(void * const main, const f_string_statics_t objects, const f_string_static_t content);
+
   typedef struct {
-    void (*load_objects_content_pipe)(void * const main, const f_range_t range, uint8_t * const pipe_state);
+    iki_write_load_objects_content_pipe_call_t load_objects_content_pipe;
 
-    void (*print_help)(fl_print_t * const print);
+    fl_print_call_t print_help;
 
-    void (*process_objects_content)(void * const main, const f_string_statics_t objects, const f_string_static_t content);
-  } iki_write_callback_t;
+    iki_write_process_objects_content_call_t process_objects_content;
+  } iki_write_call_t;
 
-  #define iki_write_callback_t_initialize \
+  #define iki_write_call_t_initialize \
     { \
       0, \
       0, \
       0, \
     }
-#endif // _di_iki_write_callback_t_
+#endif // _di_iki_write_call_t_
 
 /**
  * The IKI write main program settings.
@@ -116,15 +119,15 @@ extern "C" {
  * The main program data as a single structure.
  *
  * Properties:
- *   - cache:    The cache data.
- *   - callback: The callbacks.
- *   - program:  The main program data.
- *   - setting:  The settings data.
+ *   - cache:   The cache data.
+ *   - call:    The callbacks.
+ *   - program: The main program data.
+ *   - setting: The settings data.
  */
 #ifndef _di_iki_write_main_t_
   struct iki_write_main_t_ {
     iki_write_cache_t cache;
-    iki_write_callback_t callback;
+    iki_write_call_t call;
     fll_program_data_t program;
     iki_write_setting_t setting;
   };
@@ -132,7 +135,7 @@ extern "C" {
   #define iki_write_main_t_initialize \
     { \
       iki_write_cache_t_initialize, \
-      iki_write_callback_t_initialize, \
+      iki_write_call_t_initialize, \
       fll_program_data_t_initialize, \
       iki_write_setting_t_initialize, \
     }
index 0d0224d529cd5cb9a29ed5254eda102c9c6936b7..d4a7052096f0914503e1dc74e167dc7c8906c277 100644 (file)
@@ -13,8 +13,8 @@ extern "C" {
 
     if (main->setting.flag & iki_write_main_flag_version_copyright_help_d) {
       if (main->setting.flag & iki_write_main_flag_help_d) {
-        if (main->callback.print_help) {
-          main->callback.print_help(&main->program.output);
+        if (main->call.print_help) {
+          main->call.print_help(&main->program.output);
         }
       }
       else if (main->setting.flag & iki_write_main_flag_version_d) {
@@ -96,8 +96,8 @@ extern "C" {
         range.stop = range.start - 1;
         range.start = previous;
 
-        if (main->callback.load_objects_content_pipe) {
-          main->callback.load_objects_content_pipe((void *) main, range, &pipe_state);
+        if (main->call.load_objects_content_pipe) {
+          main->call.load_objects_content_pipe((void *) main, range, &pipe_state);
           if (F_status_is_error(main->setting.state.status)) break;
         }
 
@@ -125,7 +125,7 @@ extern "C" {
 
         if (iki_write_signal_check(main)) return;
 
-        main->callback.process_objects_content((void *) main, main->setting.objectss.array[i], main->setting.contents.array[i]);
+        main->call.process_objects_content((void *) main, main->setting.objectss.array[i], main->setting.contents.array[i]);
         if (F_status_is_error(main->setting.state.status)) break;
 
         fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);