]> Kevux Git Server - kevux-tools/commitdiff
Update: Syncrhonize with latest FLL API changes to f_string_dynamic_t and related.
authorKevin Day <thekevinday@gmail.com>
Tue, 22 Aug 2023 04:27:32 +0000 (23:27 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 22 Aug 2023 04:27:32 +0000 (23:27 -0500)
sources/c/tacocat/main/common.c
sources/c/tacocat/main/common.h
sources/c/tacocat/main/common/print.c
sources/c/tacocat/main/common/print.h
sources/c/tacocat/main/common/type.c
sources/c/tacocat/main/print/error.c
sources/c/tacocat/main/print/warning.c
sources/c/tacocat/main/receive.c

index fdd47eb5b4dc09f3125ff7f022da35ab911f79e7..30d35cb3482ef5900b640a54f576ce14cbd37053 100644 (file)
@@ -263,13 +263,13 @@ extern "C" {
 
         macro_setting_load_handle_send_receive_error_continue_1(f_memory_array_increase_by);
 
-        main->setting.state.status = f_string_dynamics_increase_by(total, &sets[i]->names);
+        main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_string_dynamic_t), (void **) &sets[i]->names.array, &sets[i]->names.used, &sets[i]->names.size);
 
-        macro_setting_load_handle_send_receive_error_continue_1(f_string_dynamics_increase_by);
+        macro_setting_load_handle_send_receive_error_continue_1(f_memory_array_increase_by);
 
-        main->setting.state.status = f_string_dynamics_increase_by(total, &sets[i]->buffers);
+        main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_string_dynamic_t), (void **) &sets[i]->buffers.array, &sets[i]->buffers.used, &sets[i]->buffers.size);
 
-        macro_setting_load_handle_send_receive_error_continue_1(f_string_dynamics_increase_by);
+        macro_setting_load_handle_send_receive_error_continue_1(f_memory_array_increase_by);
 
         main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_fss_simple_packet_t), (void **) &sets[i]->packets.array, &sets[i]->packets.used, &sets[i]->packets.size);
 
@@ -309,9 +309,9 @@ extern "C" {
           if (main->program.parameters.arguments.array[index].used) {
             if (f_path_is_absolute(main->program.parameters.arguments.array[index]) == F_true || f_path_is_relative_current(main->program.parameters.arguments.array[index]) == F_true) {
 
-              main->setting.state.status = f_string_dynamic_increase_by(main->program.parameters.arguments.array[index].used + 2, &sets[i]->names.array[j]);
+              main->setting.state.status = f_memory_array_increase_by(main->program.parameters.arguments.array[index].used + 2, sizeof(f_char_t), (void **) &sets[i]->names.array[j].string, &sets[i]->names.array[j].used, &sets[i]->names.array[j].size);
 
-              macro_setting_load_handle_send_receive_error_continue_2(f_string_dynamic_increase_by);
+              macro_setting_load_handle_send_receive_error_continue_2(f_memory_array_increase_by);
 
               main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &sets[i]->names.array[j]);
 
@@ -403,9 +403,9 @@ extern "C" {
                   continue;
                 }
 
-                main->setting.state.status = f_string_dynamic_increase_by(INET6_ADDRSTRLEN + 1, &sets[i]->names.array[j]);
+                main->setting.state.status = f_memory_array_increase_by(INET6_ADDRSTRLEN + 1, sizeof(f_char_t), (void **) &sets[i]->names.array[j].string, &sets[i]->names.array[j].used, &sets[i]->names.array[j].size);
 
-                macro_setting_load_handle_send_receive_error_continue_2(f_string_dynamic_increase_by);
+                macro_setting_load_handle_send_receive_error_continue_2(f_memory_array_increase_by);
 
                 // Randomly select one of the addresses when there are more than one.
                 if (host.h_addr_list[1]) {
@@ -421,9 +421,9 @@ extern "C" {
                   k = 0;
                 }
 
-                main->setting.state.status = f_string_dynamic_increase_by(INET6_ADDRSTRLEN + 1, &sets[i]->names.array[j]);
+                main->setting.state.status = f_memory_array_increase_by(INET6_ADDRSTRLEN + 1, sizeof(f_char_t), (void **) &sets[i]->names.array[j].string, &sets[i]->names.array[j].used, &sets[i]->names.array[j].size);
 
-                macro_setting_load_handle_send_receive_error_continue_2(f_string_dynamic_increase_by);
+                macro_setting_load_handle_send_receive_error_continue_2(f_memory_array_increase_by);
 
                 if (host.h_addrtype == f_socket_address_family_inet4_e) {
                   family.type = f_network_family_ip_4_e;
index ed1cbc0fecad78fcd0527bd679723c54ff144dc3..dc4011a1a13cd6f88f3a6c762394e71b4975c233 100644 (file)
@@ -77,8 +77,6 @@ extern "C" {
  *     Errors (with error bit) from: f_memory_array_increase_by().
  *     Errors (with error bit) from: f_network_from_ip_name().
  *     Errors (with error bit) from: f_string_dynamic_append_nulless().
- *     Errors (with error bit) from: f_string_dynamic_increase_by().
- *     Errors (with error bit) from: f_string_dynamics_increase_by().
  *
  *     Errors (with error bit) from: main.callback.setting_load_send_receive().
  *
@@ -87,8 +85,6 @@ extern "C" {
  * @see f_memory_array_increase_by()
  * @see f_network_from_ip_name()
  * @see f_string_dynamic_append_nulless()
- * @see f_string_dynamic_increase_by()
- * @see f_string_dynamics_increase_by()
  */
 #ifndef _di_kt_tacocat_setting_load_send_receive_
   extern void kt_tacocat_setting_load_send_receive(const f_console_arguments_t arguments, void * const main);
index 6704dac7d33b48bd69665b98b7c261515019e25a..4b06e3976236b779ba3000fdcc3cc1204100d49e 100644 (file)
@@ -25,8 +25,6 @@ extern "C" {
     "f_string_append_nulless",
     "f_string_dynamic_append",
     "f_string_dynamic_append_nulless",
-    "f_string_dynamic_increase_by",
-    "f_string_dynamics_increase_by",
     "f_thread_create",
     "fl_conversion_dynamic_to_unsigned_detect",
     "fll_program_parameter_process_context",
index 338a0ba02573ba22e903f3989eb49be3cc9d5f3b..b450f903ba1942d5a856d5b0bef07f7cbaa16e8e 100644 (file)
@@ -58,8 +58,6 @@ extern "C" {
     kt_tacocat_f_f_string_append_nulless_e,
     kt_tacocat_f_f_string_dynamic_append_e,
     kt_tacocat_f_f_string_dynamic_append_nulless_e,
-    kt_tacocat_f_f_string_dynamic_increase_by_e,
-    kt_tacocat_f_f_string_dynamics_increase_by_e,
     kt_tacocat_f_f_thread_create_e,
     kt_tacocat_f_fl_conversion_dynamic_to_unsigned_detect_e,
     kt_tacocat_f_fll_program_parameter_process_context_e,
index 30adbcb36e69c72a6322bd875d07796441f0a069..1a8a3dca07f1e4f5d4954a95ced58fa7363daf45 100644 (file)
@@ -44,13 +44,13 @@ extern "C" {
         f_memory_array_resize(0, sizeof(f_socket_t), (void **) &sets[i]->sockets.array, &sets[i]->sockets.used, &sets[i]->sockets.size);
         f_memory_array_resize(0, sizeof(f_status_t), (void **) &sets[i]->statuss.array, &sets[i]->statuss.used, &sets[i]->statuss.size);
 
-        f_string_dynamics_resize(0, &sets[i]->names);
-        f_string_dynamics_resize(0, &sets[i]->buffers);
+        f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &sets[i]->names.array, &sets[i]->names.used, &sets[i]->names.size, &f_string_dynamics_delete_callback);
+        f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &sets[i]->buffers.array, &sets[i]->buffers.used, &sets[i]->buffers.size, &f_string_dynamics_delete_callback);
         f_memory_array_resize(0, sizeof(f_fss_simple_packet_range_t), (void **) &sets[i]->packets.array, &sets[i]->packets.used, &sets[i]->packets.size);
       } // for
     }
 
-    f_string_dynamic_resize(0, &setting->buffer);
+    f_memory_array_resize(0, sizeof(f_char_t), (void **) &setting->buffer.string, &setting->buffer.used, &setting->buffer.size);
 
     return F_okay;
   }
index 414f54226162e8cd8fccf2a0c0f51602a3724a99..6ccd7a5fc23521f9d908df0b91eaa7db28f85c03 100644 (file)
@@ -37,9 +37,9 @@ extern "C" {
     f_file_stream_lock(print->to);
 
     fl_print_format("%[%QNetwork error on%] ", print->to, print->set->error, print->prefix, print->set->error);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, on, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, on, print->set->notable);
     fl_print_format(" %[for '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, network, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, network, print->set->notable);
     fl_print_format(" %['.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
     f_file_stream_unlock(print->to);
@@ -61,11 +61,11 @@ extern "C" {
     fl_print_format("%[%QThe parameter%] ", print->to, print->set->error, print->prefix, print->set->error);
     fl_print_format("%[%Q%Q%]", print->to, print->set->notable, f_console_symbol_long_normal_s, kt_tacocat_long_resolve_s, print->set->notable);
     fl_print_format(" %[may only be either '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, kt_tacocat_classic_s, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, kt_tacocat_classic_s, print->set->notable);
     fl_print_format("%' or '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, kt_tacocat_kevux_s, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, kt_tacocat_kevux_s, print->set->notable);
     fl_print_format(" %[' but '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, unknown, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, unknown, print->set->notable);
     fl_print_format(" %[' is given.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
     f_file_stream_unlock(print->to);
@@ -83,7 +83,7 @@ extern "C" {
     f_file_stream_lock(print->to);
 
     fl_print_format("%[%QThe lengths of all%] ", print->to, print->set->error, print->prefix, print->set->error);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, name, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, name, print->set->notable);
     fl_print_format(" %[arrays do not have the same length, name array length is '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
     fl_print_format("%[%ul%]", print->to, print->set->notable, set.names.used, print->set->notable);
     fl_print_format("%', the buffer array length is '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
@@ -113,7 +113,7 @@ extern "C" {
     fl_print_format("%[%QUnsupported protocol%] ", print->to, print->set->error, print->prefix, print->set->error);
     fl_print_format("%[%lu%]", print->to, print->set->notable, protocol, print->set->notable);
     fl_print_format(" %[while processing '%]", print->to, print->set->error, print->set->error, f_string_eol_s);
-    fl_print_format("%[%Q%]", print->to, print->set->notable, name, print->set->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->set->notable, name, print->set->notable);
     fl_print_format(" %['.%]%r", print->to, print->set->error, print->set->error, f_string_eol_s);
 
     f_file_stream_unlock(print->to);
index cdcf3cba25271bfbaf7be265b54389d8a852af32..fb76bdfaf7bd214ed1e4379bf7c737014313fc5a 100644 (file)
@@ -14,7 +14,7 @@ extern "C" {
     fl_print_format("%[%QThe port number '%]", print->to, print->context, print->prefix, print->context);
     fl_print_format("%[%ul%]", print->to, print->notable, port, print->notable);
     fl_print_format("%[' from the address '%]", print->to, print->context, print->context);
-    fl_print_format("%[%Q%]", print->to, print->notable, address, print->notable);
+    fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, address, print->notable);
     fl_print_format("%['is too large for this system and so the port is being autodetermined.%]%r", print->to, print->context, print->context, f_string_eol_s);
 
     f_file_stream_unlock(print->to);
index 34e50b70262e812b86b49bb22ad9cd6d6d3825b5..605d00d5de5c6479368c259ccd5933fa4d40b5c3 100644 (file)
@@ -78,10 +78,10 @@ extern "C" {
 
     //if (poll->revents & f_poll_urgent_e) { // handle out of band, via f_socket_flag_out_of_band_e?
 
-    *status = f_string_dynamic_increase_by(socket->size_read, buffer);
+    *status = f_memory_array_increase_by(socket->size_read, sizeof(f_char_t), (void **) &buffer->string, &buffer->used, &buffer->size);
 
     if (F_status_is_error(*status)) {
-      kt_tacocat_print_error_on(&main->program.error, macro_kt_tacocat_f(f_string_dynamic_increase_by), kt_tacocat_receive_s, *name, *status);
+      kt_tacocat_print_error_on(&main->program.error, macro_kt_tacocat_f(f_memory_array_increase_by), kt_tacocat_receive_s, *name, *status);
 
       return;
     }
@@ -93,10 +93,10 @@ extern "C" {
       buffer->used = 0;
     }
 
-    *status = f_string_dynamic_increase_by(socket->size_read, buffer);
+    *status = f_memory_array_increase_by(socket->size_read, sizeof(f_char_t), (void **) &buffer->string, &buffer->used, &buffer->size);
 
     if (F_status_is_error(*status)) {
-      kt_tacocat_print_error_on(&main->program.error, macro_kt_tacocat_f(f_string_dynamic_increase_by), kt_tacocat_receive_s, *name, *status);
+      kt_tacocat_print_error_on(&main->program.error, macro_kt_tacocat_f(f_memory_array_increase_by), kt_tacocat_receive_s, *name, *status);
 
       return;
     }