The FSS Simple Packet functionality is added, to provide for processing of the FSS Simple Packet.
The f_fss_simple_packet_ranges_t represents a set of ranges for designating where/how the packet is defined within some string.
The delimit and comment types are just helper type definitions for existing number types.
Simplify the design by getting rid of those, replacing them with the type that they effectively represent.
A lot of code is updated to reflect this change.
# echo $(cat level_3/fake/data/build/dependencies)
Which prints:
- # fss-0000 f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_network f_path f_pipe f_print f_signal fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_print fl_string fll_error fll_execute fll_file fll_fss fll_path fll_print fll_program
+ # fss-0000 f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_signal f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fll_error fll_execute fll_file fll_fss fll_print fll_program
From this list, build the level_0:
-# for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_network f_path f_pipe f_print f_signal ; do if [[ -f build/disable/level_0/$i.h ]] ; then echo >> build/stand_alone/fake.config.h && cat build/disable/level_0/$i.h >> build/stand_alone/fake.config.h ; fi ; done
+# for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_signal f_thread ; do if [[ -f build/disable/level_0/$i.h ]] ; then echo >> build/stand_alone/fake.config.h && cat build/disable/level_0/$i.h >> build/stand_alone/fake.config.h ; fi ; done
From the list, build the level_1:
-# for i in fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_print fl_string ; do if [[ -f build/disable/level_1/$i.h ]] ; then echo >> build/stand_alone/fake.config.h && cat build/disable/level_1/$i.h >> build/stand_alone/fake.config.h ; fi ; done
+# for i in fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print ; do if [[ -f build/disable/level_1/$i.h ]] ; then echo >> build/stand_alone/fake.config.h && cat build/disable/level_1/$i.h >> build/stand_alone/fake.config.h ; fi ; done
From the list, build the level_2:
-# for i in fll_error fll_execute fll_file fll_fss fll_path fll_print fll_program ; do if [[ -f build/disable/level_2/$i.h ]] ; then echo >> build/stand_alone/fake.config.h && cat build/disable/level_2/$i.h >> build/stand_alone/fake.config.h ; fi ; done
+# for i in fll_error fll_execute fll_file fll_fss fll_print fll_program ; do if [[ -f build/disable/level_2/$i.h ]] ; then echo >> build/stand_alone/fake.config.h && cat build/disable/level_2/$i.h >> build/stand_alone/fake.config.h ; fi ; done
Then compile the stand alone build and comment out each disable causing a compile failure until compilation succeeds.
#define _di_f_fss_apply_delimit_
#define _di_f_fss_apply_delimit_range_
-#define _di_f_fss_commentss_t_
-#define _di_f_fss_comments_t_
-#define _di_f_fss_comment_t_
#define _di_f_fss_complete_e_
-#define _di_f_fss_contents_t_
-#define _di_f_fss_content_t_
#define _di_f_fss_count_lines_
#define _di_f_fss_count_lines_range_
#define _di_f_fss_default_d_
-#define _di_f_fss_delimitss_t_
-#define _di_f_fss_delimits_t_
-#define _di_f_fss_delimit_t_
#define _di_f_fss_e_
#define _di_f_fss_fail_utf_
#define _di_f_fss_fail_utf_to_false_
#define _di_f_fss_nests_resize_
#define _di_f_fss_nests_t_
#define _di_f_fss_nest_t_
-#define _di_f_fss_objects_t_
-#define _di_f_fss_object_t_
#define _di_f_fss_payload_s_
#define _di_f_fss_placeholder_s_
#define _di_f_fss_quote_type_e_
#define _di_f_fss_sets_resize_
#define _di_f_fss_sets_t_
#define _di_f_fss_set_t_
+#define _di_f_fss_simple_packet_d_
+#define _di_f_fss_simple_packet_identify_
+#define _di_f_fss_simple_packet_ranges_adjust_
+#define _di_f_fss_simple_packet_ranges_decimate_by_
+#define _di_f_fss_simple_packet_ranges_decrease_by_
+#define _di_f_fss_simple_packet_ranges_increase_
+#define _di_f_fss_simple_packet_ranges_increase_by_
+#define _di_f_fss_simple_packet_ranges_resize_
+#define _di_f_fss_simple_packet_ranges_t_
+#define _di_f_fss_simple_packet_range_t_
#define _di_f_fss_skip_past_delimit_
#define _di_f_fss_skip_past_space_
#define _di_f_fss_state_flag_e_
build_sources_library environment.c
build_sources_library execute.c
build_sources_library file.c private-file.c file/common.c file/stream.c
-build_sources_library fss.c private-fss.c fss/common.c fss/named.c fss/nest.c fss/set.c
+build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
+build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
build_sources_library iki.c iki/common.c iki/data.c private-iki.c iki/private-data.c
build_sources_library limit.c limit/set.c limit/value.c limit/private-set.c limit/private-value.c
build_sources_library memory.c private-memory.c memory/structure.c
build_sources_headers environment.h environment/common.h
build_sources_headers execute.h execute/common.h
build_sources_headers file.h file/common.h file/stream.h
-build_sources_headers fss.h fss/comment.h fss/common.h fss/delimit.h fss/named.h fss/nest.h fss/quote.h fss/set.h
+build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_sources_headers iki.h iki/common.h iki/data.h
build_sources_headers limit.h limit/set.h limit/value.h
build_sources_headers memory.h memory/structure.h memory/common.h
build_sources_library level_0/environment.c
build_sources_library level_0/execute.c
build_sources_library level_0/file.c level_0/private-file.c level_0/file/common.c level_0/file/stream.c
-build_sources_library level_0/fss.c level_0/private-fss.c level_0/fss/common.c level_0/fss/named.c level_0/fss/nest.c level_0/fss/set.c
+build_sources_library level_0/fss.c level_0/fss/common.c level_0/fss/item.c level_0/fss/named.c level_0/fss/nest.c level_0/fss/quote.c level_0/fss/set.c level_0/fss/set_quote.c level_0/fss/simple_packet.c
+build_sources_library level_0/fss/private-item.c level_0/fss/private-named.c level_0/fss/private-nest.c level_0/fss/private-set.c level_0/fss/private-set_quote.c level_0/fss/private-simple_packet.c
build_sources_library level_0/iki.c level_0/iki/common.c level_0/iki/data.c level_0/private-iki.c level_0/iki/private-data.c
build_sources_library level_0/limit.c level_0/limit/set.c level_0/limit/value.c level_0/limit/private-set.c level_0/limit/private-value.c
build_sources_library level_0/memory.c level_0/private-memory.c level_0/memory/structure.c
build_sources_headers level_0/environment.h level_0/environment/common.h
build_sources_headers level_0/execute.h level_0/execute/common.h
build_sources_headers level_0/file.h level_0/file/common.h level_0/file/stream.h
-build_sources_headers level_0/fss.h level_0/fss/comment.h level_0/fss/common.h level_0/fss/delimit.h level_0/fss/named.h level_0/fss/nest.h level_0/fss/quote.h level_0/fss/set.h
+build_sources_headers level_0/fss.h level_0/fss/common.h level_0/fss/item.h level_0/fss/named.h level_0/fss/nest.h level_0/fss/quote.h level_0/fss/set.h level_0/fss/set_quote.h level_0/fss/simple_packet.h
build_sources_headers level_0/iki.h level_0/iki/common.h level_0/iki/data.h
build_sources_headers level_0/limit.h level_0/limit/set.h level_0/limit/value.h
build_sources_headers level_0/memory.h level_0/memory/structure.h level_0/memory/common.h
//#define _di_f_fss_apply_delimit_
#define _di_f_fss_apply_delimit_range_
-#define _di_f_fss_commentss_t_
-//#define _di_f_fss_comments_t_
-//#define _di_f_fss_comment_t_
#define _di_f_fss_complete_e_
-//#define _di_f_fss_contents_t_
-//#define _di_f_fss_content_t_
//#define _di_f_fss_count_lines_
#define _di_f_fss_count_lines_range_
//#define _di_f_fss_default_d_
-#define _di_f_fss_delimitss_t_
-//#define _di_f_fss_delimits_t_
-//#define _di_f_fss_delimit_t_
#define _di_f_fss_e_
//#define _di_f_fss_fail_utf_
//#define _di_f_fss_fail_utf_to_false_
#define _di_f_fss_nests_resize_
#define _di_f_fss_nests_t_
#define _di_f_fss_nest_t_
-//#define _di_f_fss_objects_t_
-//#define _di_f_fss_object_t_
#define _di_f_fss_payload_s_
//#define _di_f_fss_placeholder_s_
//#define _di_f_fss_quote_type_e_
#define _di_f_fss_sets_resize_
#define _di_f_fss_sets_t_
//#define _di_f_fss_set_t_
+#define _di_f_fss_simple_packet_d_
+#define _di_f_fss_simple_packet_identify_
+#define _di_f_fss_simple_packet_ranges_adjust_
+#define _di_f_fss_simple_packet_ranges_decimate_by_
+#define _di_f_fss_simple_packet_ranges_decrease_by_
+#define _di_f_fss_simple_packet_ranges_increase_
+#define _di_f_fss_simple_packet_ranges_increase_by_
+#define _di_f_fss_simple_packet_ranges_resize_
+#define _di_f_fss_simple_packet_ranges_t_
+#define _di_f_fss_simple_packet_range_t_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
//#define _di_f_fss_state_flag_e_
//#define _di_f_pipe_input_exists_
#define _di_f_pipe_output_exists_
+//#define _di_f_poll_e_
#define _di_f_polls_adjust_
#define _di_f_polls_append_
#define _di_f_polls_append_all_
#define _di_f_pollss_resize_
#define _di_f_pollss_t_
#define _di_f_polls_t_
-//#define _di_f_poll_e_
//#define _di_f_poll_t_
//#define _di_f_print_
#define _di_f_print_character_
#define _di_f_print_dynamic_to_raw_
#define _di_f_print_except_
#define _di_f_print_except_dynamic_
-#define _di_f_print_except_dynamic_in_safely_
#define _di_f_print_except_dynamic_partial_
#define _di_f_print_except_dynamic_partial_raw_
#define _di_f_print_except_dynamic_partial_raw_safely_
build_sources_program fll/level_0/environment.c
build_sources_program fll/level_0/execute.c
build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c
-build_sources_program fll/level_0/fss.c fll/level_0/private-fss.c fll/level_0/fss/common.c fll/level_0/fss/named.c fll/level_0/fss/nest.c fll/level_0/fss/set.c
+build_sources_program fll/level_0/fss.c fll/level_0/fss/common.c fll/level_0/fss/item.c fll/level_0/fss/named.c fll/level_0/fss/nest.c fll/level_0/fss/quote.c fll/level_0/fss/set.c fll/level_0/fss/set_quote.c fll/level_0/fss/simple_packet.c
+build_sources_program fll/level_0/fss/private-item.c fll/level_0/fss/private-named.c fll/level_0/fss/private-nest.c fll/level_0/fss/private-set.c fll/level_0/fss/private-set_quote.c fll/level_0/fss/private-simple_packet.c
build_sources_program fll/level_0/iki.c fll/level_0/private-iki.c fll/level_0/iki/common.c fll/level_0/iki/private-data.c fll/level_0/iki/data.c
build_sources_program fll/level_0/limit.c fll/level_0/limit/set.c fll/level_0/limit/value.c fll/level_0/limit/private-set.c fll/level_0/limit/private-value.c
build_sources_program fll/level_0/memory.c fll/level_0/private-memory.c fll/level_0/memory/structure.c
#include "fss.h"
-#include "private-fss.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _di_f_fss_apply_delimit_
- void f_fss_apply_delimit(const f_fss_delimits_t delimits, f_string_static_t * const buffer, f_state_t * const state) {
+ void f_fss_apply_delimit(const f_number_unsigneds_t delimits, f_string_static_t * const buffer, f_state_t * const state) {
#ifndef _di_level_0_parameter_checking_
if (!state) return;
#endif // _di_f_fss_apply_delimit_
#ifndef _di_f_fss_apply_delimit_range_
- void f_fss_apply_delimit_range(const f_fss_delimits_t delimits, const f_string_range_t range, f_string_static_t * const buffer, f_state_t * const state) {
+ void f_fss_apply_delimit_range(const f_number_unsigneds_t delimits, const f_string_range_t range, f_string_static_t * const buffer, f_state_t * const state) {
#ifndef _di_level_0_parameter_checking_
if (!state) return;
#include <fll/level_0/utf.h>
// FLL-0 fss includes.
-#include <fll/level_0/fss/comment.h>
#include <fll/level_0/fss/common.h>
-#include <fll/level_0/fss/delimit.h>
-#include <fll/level_0/fss/quote.h>
+#include <fll/level_0/fss/item.h>
#include <fll/level_0/fss/named.h>
#include <fll/level_0/fss/nest.h>
+#include <fll/level_0/fss/quote.h>
#include <fll/level_0/fss/set.h>
+#include <fll/level_0/fss/set_quote.h>
+#include <fll/level_0/fss/simple_packet.h>
#ifdef __cplusplus
extern "C" {
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_apply_delimit_
- extern void f_fss_apply_delimit(const f_fss_delimits_t delimits, f_string_static_t * const buffer, f_state_t * const state);
+ extern void f_fss_apply_delimit(const f_number_unsigneds_t delimits, f_string_static_t * const buffer, f_state_t * const state);
#endif // _di_f_fss_apply_delimit_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_apply_delimit_range_
- extern void f_fss_apply_delimit_range(const f_fss_delimits_t delimits, const f_string_range_t range, f_string_static_t * const buffer, f_state_t * const state);
+ extern void f_fss_apply_delimit_range(const f_number_unsigneds_t delimits, const f_string_range_t range, f_string_static_t * const buffer, f_state_t * const state);
#endif // _di_f_fss_apply_delimit_range_
/**
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines set data to be used for/by project fss.
- *
- * This is auto-included by fss.h and should not need to be explicitly included.
- */
-#ifndef _F_fss_comment_h
-#define _F_fss_comment_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Designate an fss comment location.
- */
-#ifndef _di_f_fss_comment_t_
- typedef f_string_range_t f_fss_comment_t;
-
- #define f_fss_comment_t_initialize f_string_range_t_initialize
-
- #define macro_f_fss_comment_t_initialize_1(length) macro_f_string_range_t_initialize_2(length)
-
- #define macro_f_fss_comment_t_clear(comment) macro_f_string_range_t_clear(comment)
-#endif // _di_f_fss_comment_t_
-
-/**
- * An array of f_fss_comment_t.
- *
- * array: The array of fss quote.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_comments_t_
- typedef f_string_ranges_t f_fss_comments_t;
-
- #define f_fss_comments_t_initialize f_string_ranges_t_initialize
-
- #define macro_f_fss_comments_t_initialize_1(array, size, used) macro_f_string_ranges_t_initialize_1(array, size, used)
- #define macro_f_fss_comments_t_initialize_2(array, length) macro_f_string_ranges_t_initialize_2(array, length)
-
- #define f_fss_comments_t_clear(comments) macro_f_string_ranges_t_clear(comments)
-
- #define macro_f_fss_comments_t_resize(status, comments, length) macro_f_string_ranges_t_resize(status, comments, length)
- #define macro_f_fss_comments_t_adjust(status, comments, length) macro_f_string_ranges_t_adjust(status, comments, length)
-
- #define macro_f_fss_comments_t_delete_simple(comments) macro_f_string_ranges_t_delete_simple(comments)
- #define macro_f_fss_comments_t_destroy_simple(comments) macro_f_string_ranges_t_destroy_simple(comments)
-
- #define macro_f_fss_comments_t_increase(status, step, comments) macro_f_string_ranges_t_increase(status, step, comments)
- #define macro_f_fss_comments_t_increase_by(status, comments, amount) macro_f_string_ranges_t_increase_by(status, comments, amount)
- #define macro_f_fss_comments_t_decrease_by(status, comments, amount) macro_f_string_ranges_t_decrease_by(status, comments, amount)
- #define macro_f_fss_comments_t_decimate_by(status, comments, amount) macro_f_string_ranges_t_decimate_by(status, comments, amount)
-#endif // _di_f_fss_comments_t_
-
-/**
- * An array of f_fss_comments_t.
- *
- * array: The array of fss quotes.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_commentss_t_
- typedef f_string_rangess_t f_fss_commentss_t;
-
- #define f_fss_commentss_t_initialize f_string_rangess_t_initialize
-
- #define macro_f_fss_commentss_t_initialize_1(array, size, used) macro_f_string_rangess_t_initialize_1(array, size, used)
- #define macro_f_fss_commentss_t_initialize_2(array, length) macro_f_string_rangess_t_initialize_2(array, length)
-
- #define macro_f_fss_commentss_t_clear(commentss) macro_f_string_rangess_t_clear(commentss)
-
- #define macro_f_fss_commentss_t_resize(status, commentss, length) macro_f_string_rangess_t_resize(status, commentss, length)
- #define macro_f_fss_commentss_t_adjust(status, commentss, length) macro_f_string_rangess_t_adjust(status, commentss, length)
-
- #define macro_f_fss_commentss_t_delete_simple(commentss) macro_f_string_rangess_t_delete_simple(commentss)
- #define macro_f_fss_commentss_t_destroy_simple(commentss) macro_f_string_rangess_t_destroy_simple(commentss)
-
- #define macro_f_fss_commentss_t_increase(status, step, commentss) macro_f_string_rangess_t_increase(status, step, commentss)
- #define macro_f_fss_commentss_t_increase_by(status, commentss, amount) macro_f_string_rangess_t_increase_by(status, commentss, amount)
- #define macro_f_fss_commentss_t_decrease_by(status, commentss, amount) macro_f_string_rangess_t_decrease_by(status, commentss, amount)
- #define macro_f_fss_commentss_t_decimate_by(status, commentss, amount) macro_f_string_rangess_t_decimate_by(status, commentss, amount)
-#endif // _di_f_fss_commentss_t_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_fss_comment_h
#endif // _di_f_fss_default_d_
/**
- * This is a range that represents an object.
- */
-#ifndef _di_f_fss_object_t_
- typedef f_string_range_t f_fss_object_t;
-
- #define f_fss_object_t_initialize f_string_range_t_initialize
-
- #define macro_f_fss_object_t_initialize_1(length) macro_f_string_range_t_initialize_2(length)
-
- #define macro_f_fss_object_t_clear(object) macro_f_string_range_t_clear(object)
-#endif // _di_f_fss_object_t_
-
-/**
- * This holds an array of fss_object.
- *
- * array: The array of objects.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_objects_t_
- typedef f_string_ranges_t f_fss_objects_t;
-
- #define f_fss_objects_t_initialize f_string_ranges_t_initialize
-
- #define macro_f_fss_objects_t_initialize_1(array, size, used) macro_f_string_ranges_t_initialize_1(array, size, used)
- #define macro_f_fss_objects_t_initialize_2(array, length) macro_f_string_ranges_t_initialize_2(array, length)
-
- #define macro_f_fss_objects_t_clear(objects) macro_f_string_ranges_t_clear(objects)
-
- #define macro_f_fss_objects_t_resize(status, objects, length) macro_f_string_ranges_t_resize(status, objects, length)
- #define macro_f_fss_objects_t_adjust(status, objects, length) macro_f_string_ranges_t_adjust(status, objects, length)
-
- #define macro_f_fss_objects_t_delete_simple(objects) macro_f_string_ranges_t_delete_simple(objects)
- #define macro_f_fss_objects_t_destroy_simple(objects) macro_f_string_ranges_t_destroy_simple(objects)
-
- #define macro_f_fss_objects_t_increase(status, step, objects) macro_f_string_ranges_t_increase(status, step, objects)
- #define macro_f_fss_objects_t_increase_by(status, objects, amount) macro_f_string_ranges_t_increase_by(status, objects, amount)
- #define macro_f_fss_objects_t_decrease_by(status, objects, amount) macro_f_string_ranges_t_decrease_by(status, objects, amount)
- #define macro_f_fss_objects_t_decimate_by(status, objects, amount) macro_f_string_ranges_t_decimate_by(status, objects, amount)
-#endif // _di_f_fss_objects_t_
-
-/**
- * This holds an array of string ranges that represent the content.
- *
- * The very first string range will represent the first content found.
- *
- * array: The array of content.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_content_t_
- typedef f_string_ranges_t f_fss_content_t;
-
- #define f_fss_content_t_initialize f_string_ranges_t_initialize
-
- #define macro_f_fss_content_t_initialize_1(array, size, used) macro_f_string_ranges_t_initialize_1(array, size, used)
- #define macro_f_fss_content_t_initialize_2(array, length) macro_f_string_ranges_t_initialize_2(array, length)
-
- #define macro_f_fss_content_t_clear(content) macro_f_string_ranges_t_clear(content)
-
- #define macro_f_fss_content_t_resize(status, content, length) macro_f_string_ranges_t_resize(status, content, length)
- #define macro_f_fss_content_t_adjust(status, content, length) macro_f_string_ranges_t_adjust(status, content, length)
-
- #define macro_f_fss_content_t_delete_simple(content) macro_f_string_ranges_t_delete_simple(content)
- #define macro_f_fss_content_t_destroy_simple(content) macro_f_string_ranges_t_destroy_simple(content)
-
- #define macro_f_fss_content_t_increase(status, step, content) macro_f_string_ranges_t_increase(status, step, content)
- #define macro_f_fss_content_t_increase_by(status, content, amount) macro_f_string_ranges_t_increase_by(status, content, amount)
- #define macro_f_fss_content_t_decrease_by(status, content, amount) macro_f_string_ranges_t_decrease_by(status, content, amount)
- #define macro_f_fss_content_t_decimate_by(status, content, amount) macro_f_string_ranges_t_decimate_by(status, content, amount)
-#endif // _di_f_fss_content_t_
-
-/**
- * This holds an array of fss_content.
- *
- * array: The array of content arrays.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_contents_t_
- typedef f_string_rangess_t f_fss_contents_t;
-
- #define f_fss_contents_t_initialize f_string_rangess_t_initialize
-
- #define macro_f_fss_contents_t_initialize_1(array, size, used) macro_f_string_rangess_t_initialize_1(array, size, used)
- #define macro_f_fss_contents_t_initialize_2(array, length) macro_f_string_rangess_t_initialize_2(array, length)
-
- #define macro_f_fss_contents_t_clear(contents) macro_f_string_rangess_t_clear(contents)
-
- #define macro_f_fss_contents_t_resize(status, contents, length) macro_f_string_rangess_t_resize(status, contents, length)
- #define macro_f_fss_contents_t_adjust(status, contents, length) macro_f_string_rangess_t_adjust(status, contents, length)
-
- #define macro_f_fss_contents_t_delete_simple(contents) macro_f_string_rangess_t_delete_simple(contents)
- #define macro_f_fss_contents_t_destroy_simple(contents) macro_f_string_rangess_t_destroy_simple(contents)
-
- #define macro_f_fss_contents_t_increase(status, step, contents) macro_f_string_rangess_t_increase(status, step, contents)
- #define macro_f_fss_contents_t_increase_by(status, contents, amount) macro_f_string_rangess_t_increase_by(status, contents, amount)
- #define macro_f_fss_contents_t_decrease_by(status, contents, amount) macro_f_string_rangess_t_decrease_by(status, contents, amount)
- #define macro_f_fss_contents_t_decimate_by(status, contents, amount) macro_f_string_rangess_t_decimate_by(status, contents, amount)
-#endif // _di_f_fss_contents_t_
-
-/**
* State flags associated with FSS functions.
*
* These flags are meant to be bitwise for the 32-bit f_state_t flag property.
+++ /dev/null
-#include "../fss.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines set data to be used for/by project fss.
- *
- * This is auto-included by fss.h and should not need to be explicitly included.
- */
-#ifndef _F_fss_delimit_h
-#define _F_fss_delimit_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Designate an fss delimit location.
- */
-#ifndef _di_f_fss_delimit_t_
- typedef f_number_unsigned_t f_fss_delimit_t;
-
- #define f_fss_delimit_t_initialize f_number_unsigned_t_initialize
-
- #define macro_f_fss_delimit_t_initialize_1(delimit) delimit
-#endif // _di_f_fss_delimit_t_
-
-/**
- * An array of f_fss_delimit_t.
- *
- * array: The array of fss quote.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_delimits_t_
- typedef f_number_unsigneds_t f_fss_delimits_t;
-
- #define f_fss_delimits_t_initialize f_number_unsigneds_t_initialize
-
- #define macro_f_fss_delimits_t_initialize_1(array, size, used) macro_f_number_unsigneds_t_initialize_1(array, size, used)
- #define macro_f_fss_delimits_t_initialize_2(array, length) macro_f_number_unsigneds_t_initialize_2(array, length)
-
- #define macro_f_fss_delimits_t_clear(delimits) macro_f_number_unsigneds_t_clear(delimits)
-
- #define macro_f_fss_delimits_t_resize(status, delimits, length) macro_f_number_unsigneds_t_resize(status, delimits, length)
- #define macro_f_fss_delimits_t_adjust(status, delimits, length) macro_f_number_unsigneds_t_adjust(status, delimits, length)
-
- #define macro_f_fss_delimits_t_delete_simple(delimits) macro_f_number_unsigneds_t_delete_simple(delimits)
- #define macro_f_fss_delimits_t_destroy_simple(delimits) macro_f_number_unsigneds_t_destroy_simple(delimits)
-
- #define macro_f_fss_delimits_t_increase(status, step, delimits) macro_f_number_unsigneds_t_increase(status, step, delimits)
- #define macro_f_fss_delimits_t_increase_by(status, delimits, amount) macro_f_number_unsigneds_t_increase_by(status, delimits, amount)
- #define macro_f_fss_delimits_t_decrease_by(status, delimits, amount) macro_f_number_unsigneds_t_decrease_by(status, delimits, amount)
- #define macro_f_fss_delimits_t_decimate_by(status, delimits, amount) macro_f_number_unsigneds_t_decimate_by(status, delimits, amount)
-#endif // _di_f_fss_delimits_t_
-
-/**
- * An array of f_fss_delimits_t.
- *
- * array: The array of fss quotes.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_delimitss_t_
- typedef f_number_unsignedss_t f_fss_delimitss_t;
-
- #define f_fss_delimitss_t_initialize f_number_unsignedss_t_initialize
-
- #define macro_f_fss_delimitss_t_initialize_1(array, size, used) macro_f_number_unsignedss_t_initialize_1(array, size, used)
- #define macro_f_fss_delimitss_t_initialize_2(array, length) macro_f_number_unsignedss_t_initialize_2(array, length)
-
- #define macro_f_fss_delimitss_t_clear(delimitss) macro_f_number_unsignedss_t_clear(delimitss)
-
- #define macro_f_fss_delimitss_t_resize(status, delimitss, length) macro_f_number_unsignedss_t_resize(status, delimitss, length)
- #define macro_f_fss_delimitss_t_adjust(status, delimitss, length) macro_f_number_unsignedss_t_adjust(status, delimitss, length)
-
- #define macro_f_fss_delimitss_t_delete_simple(delimitss) macro_f_number_unsignedss_t_delete_simple(delimitss)
- #define macro_f_fss_delimitss_t_destroy_simple(delimitss) macro_f_number_unsignedss_t_destroy_simple(delimitss)
-
- #define macro_f_fss_delimitss_t_increase(status, step, delimitss) macro_f_number_unsignedss_t_increase(status, step, delimitss)
- #define macro_f_fss_delimitss_t_increase_by(status, delimitss, amount) macro_f_number_unsignedss_t_increase_by(status, delimitss, amount)
- #define macro_f_fss_delimitss_t_decrease_by(status, delimitss, amount) macro_f_number_unsignedss_t_decrease_by(status, delimitss, amount)
- #define macro_f_fss_delimitss_t_decimate_by(status, delimitss, amount) macro_f_number_unsignedss_t_decimate_by(status, delimitss, amount)
-#endif // _di_f_fss_delimitss_t_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_fss_delimit_h
--- /dev/null
+#include "../fss.h"
+#include "private-item.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_fss_items_adjust_
+ f_status_t f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!items) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_items_adjust(length, items);
+ }
+#endif // _di_f_fss_items_adjust_
+
+#ifndef _di_f_fss_items_decimate_by_
+ f_status_t f_fss_items_decimate_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!items) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (items->size > amount) return private_f_fss_items_adjust(items->size - amount, items);
+
+ return private_f_fss_items_adjust(0, items);
+ }
+#endif // _di_f_fss_items_decimate_by_
+
+#ifndef _di_f_fss_items_decrease_by_
+ f_status_t f_fss_items_decrease_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!items) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (items->size > amount) return private_f_fss_items_resize(items->size - amount, items);
+
+ return private_f_fss_items_resize(0, items);
+ }
+#endif // _di_f_fss_items_decrease_by_
+
+#ifndef _di_f_fss_items_increase_
+ f_status_t f_fss_items_increase(const f_number_unsigned_t step, f_fss_items_t * const items) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!items) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (step && items->used + 1 > items->size) {
+ f_number_unsigned_t size = items->used + step;
+
+ if (size > F_number_t_size_unsigned_d) {
+ if (items->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ size = F_number_t_size_unsigned_d;
+ }
+
+ return private_f_fss_items_resize(size, items);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_items_increase_
+
+#ifndef _di_f_fss_items_increase_by_
+ f_status_t f_fss_items_increase_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!items) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+
+ if (items->used + amount > items->size) {
+ if (items->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ return private_f_fss_items_resize(items->used + amount, items);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_items_increase_by_
+
+#ifndef _di_f_fss_items_resize_
+ f_status_t f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!items) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_items_resize(length, items);
+ }
+#endif // _di_f_fss_items_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines nest data to be used for/by project fss.
+ *
+ * This is auto-included by fss.h and should not need to be explicitly included.
+ */
+#ifndef _F_fss_item_h
+#define _F_fss_item_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This holds a item object and its associated content.
+ *
+ * Child content represents content nested within some other content and never represents the top-most content.
+ *
+ * To designate that either object or content is non-existent, set start position greater than stop position.
+ * In particular, set start to 1 and stop to 0.
+ *
+ * This does not have resize/adjust macros due to multiple things to potentially resize.
+ * Any resizing must be manually performed on each applicable property.
+ *
+ * Properties:
+ * - object: The object.
+ * - content: The content associated with the object.
+ * - parent: A location referencing a parrent object or content that this object content is nested under.
+ */
+#ifndef _di_f_fss_item_t_
+ typedef struct {
+ f_string_range_t object;
+ f_string_ranges_t content;
+
+ f_number_unsigned_t parent;
+ } f_fss_item_t;
+
+ #define f_fss_item_t_initialize { f_string_range_t_initialize, f_string_ranges_t_initialize, 0 }
+
+ #define macro_f_fss_item_t_initialize_1(object, content, parent) macro_f_number_unsigneds_t_initialize_1(object, content, parent)
+
+ #define macro_f_fss_item_t_clear(item) \
+ macro_f_string_range_t_clear(item.object); \
+ macro_f_string_ranges_t_clear(item.content); \
+ item.parent = 0;
+
+ #define macro_f_fss_item_t_resize(status, item, length) macro_f_string_ranges_t_resize(status, item.content, length)
+ #define macro_f_fss_item_t_adjust(status, item, length) macro_f_string_ranges_t_adjust(status, item.content, length)
+
+ #define macro_f_fss_item_t_delete_simple(item) macro_f_string_ranges_t_delete_simple(item.content)
+ #define macro_f_fss_item_t_destroy_simple(item) macro_f_string_ranges_t_destroy_simple(item.content)
+
+ #define macro_f_fss_item_t_increase(status, step, item) macro_f_string_ranges_t_increase(status, step, item.content)
+ #define macro_f_fss_item_t_increase_by(status, item, amount) macro_f_string_ranges_t_increase_by(status, item.content, amount)
+ #define macro_f_fss_item_t_decrease_by(status, item, amount) macro_f_string_ranges_t_decrease_by(status, item.content, amount)
+ #define macro_f_fss_item_t_decimate_by(status, item, amount) macro_f_string_ranges_t_decimate_by(status, item.content, amount)
+#endif // _di_f_fss_item_t_
+
+/**
+ * This holds an array of fss_item.
+ *
+ * This is designed to be used as a part of f_fss_nest_t.
+ *
+ * For example:
+ * object {
+ * fss_basic_content before nested content.
+ * nested_1 {
+ * Nested content one.
+ * }
+ *
+ * More content in between.
+ *
+ * nested_2 {
+ * Nested content two.
+ * nested_3 {
+ * Nested content three.
+ * }
+ * }
+ *
+ * More content after.
+ * }
+ *
+ * Properties:
+ * - array: The array of object, their associated content, and their associated parent.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_items_t_
+ typedef struct {
+ f_fss_item_t *array;
+
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_fss_items_t;
+
+ #define f_fss_items_t_initialize { 0, 0, 0 }
+
+ #define macro_f_fss_items_t_initialize_1(array, size, used) { array, size, used }
+ #define macro_f_fss_items_t_initialize_2(array, length) { array, length, length }
+
+ #define macro_f_fss_items_t_clear(items) macro_f_memory_structure_clear(items)
+
+ #define macro_f_fss_items_t_resize(status, items, length) status = f_fss_items_resize(length, &items);
+ #define macro_f_fss_items_t_adjust(status, items, length) status = f_fss_items_adjust(length, &items);
+
+ #define macro_f_fss_items_t_delete_simple(items) f_fss_items_resize(0, &items);
+ #define macro_f_fss_items_t_destroy_simple(items) f_fss_items_adjust(0, &items);
+
+ #define macro_f_fss_items_t_increase(status, step, items) status = f_fss_items_increase(step, &items);
+ #define macro_f_fss_items_t_increase_by(status, items, amount) status = f_fss_items_increase_by(amount, &items);
+ #define macro_f_fss_items_t_decrease_by(status, items, amount) status = f_fss_items_decrease_by(amount, &items);
+ #define macro_f_fss_items_t_decimate_by(status, items, amount) status = f_fss_items_decimate_by(amount, &items);
+#endif // _di_f_fss_items_t_
+
+/**
+ * Resize the nest array.
+ *
+ * @param length
+ * The new size to use.
+ * @param items
+ * The items array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_items_adjust_
+ extern f_status_t f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items);
+#endif // _di_f_fss_items_adjust_
+
+/**
+ * Resize the nest array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decimate the size by.
+ * @param items
+ * The items array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if amount is 0.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_items_decimate_by_
+ extern f_status_t f_fss_items_decimate_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
+#endif // _di_f_fss_items_decimate_by_
+
+/**
+ * Resize the nest array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decrease the size by.
+ * @param items
+ * The items array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_items_decrease_by_
+ extern f_status_t f_fss_items_decrease_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
+#endif // _di_f_fss_items_decrease_by_
+
+/**
+ * Increase the size of the items array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param step
+ * The allocation step to use.
+ * Must be greater than 0.
+ * @param items
+ * The items array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_items_increase_
+ extern f_status_t f_fss_items_increase(const f_number_unsigned_t step, f_fss_items_t * const items);
+#endif // _di_f_fss_items_increase_
+
+/**
+ * Resize the items array to a larger size.
+ *
+ * This will resize making the array larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param amount
+ * A positive number representing how much to increase the size by.
+ * @param items
+ * The items array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_array_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_f_fss_items_increase_by_
+ extern f_status_t f_fss_items_increase_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
+#endif // _di_f_fss_items_increase_by_
+
+/**
+ * Resize the items array.
+ *
+ * @param length
+ * The new size to use.
+ * @param items
+ * The items array to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_items_resize_
+ extern f_status_t f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items);
+#endif // _di_f_fss_items_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_fss_item_h
#include "../fss.h"
-#include "../private-fss.h"
+#include "private-named.h"
#ifdef __cplusplus
extern "C" {
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (named->objects.size - amount > 0) {
- return private_f_fss_named_adjust(named->objects.size - amount, named);
- }
+ if (named->objects.size - amount > 0) return private_f_fss_named_adjust(named->objects.size - amount, named);
return private_f_fss_named_adjust(0, named);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (named->objects.size - amount > 0) {
- return private_f_fss_named_resize(named->objects.size - amount, named);
- }
+ if (named->objects.size - amount > 0) return private_f_fss_named_resize(named->objects.size - amount, named);
return private_f_fss_named_resize(0, named);
}
f_number_unsigned_t size = named->objects.used + step;
if (size > F_number_t_size_unsigned_d) {
- if (named->objects.used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (named->objects.used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
size = F_number_t_size_unsigned_d;
}
if (!amount) return F_data_not;
if (named->objects.used + amount > named->objects.size) {
- if (named->objects.used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (named->objects.used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
return private_f_fss_named_resize(named->objects.used + amount, named);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (nameds->size > amount) {
- return private_f_fss_nameds_adjust(nameds->size - amount, nameds);
- }
+ if (nameds->size > amount) return private_f_fss_nameds_adjust(nameds->size - amount, nameds);
return private_f_fss_nameds_adjust(0, nameds);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (nameds->size > amount) {
- return private_f_fss_nameds_resize(nameds->size - amount, nameds);
- }
+ if (nameds->size > amount) return private_f_fss_nameds_resize(nameds->size - amount, nameds);
return private_f_fss_nameds_resize(0, nameds);
}
f_number_unsigned_t size = nameds->used + step;
if (size > F_number_t_size_unsigned_d) {
- if (nameds->used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (nameds->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
size = F_number_t_size_unsigned_d;
}
if (!amount) return F_data_not;
if (nameds->used + amount > nameds->size) {
- if (nameds->used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (nameds->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
return private_f_fss_nameds_resize(nameds->used + amount, nameds);
}
*/
#ifndef _di_f_fss_named_t_
typedef struct {
- f_fss_object_t name;
+ f_string_range_t name;
- f_fss_objects_t objects;
- f_fss_contents_t contents;
+ f_string_ranges_t objects;
+ f_string_rangess_t contents;
f_uint8ss_t quotess;
} f_fss_named_t;
- #define f_fss_named_t_initialize { f_fss_object_t_initialize, f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_uint8ss_t_initialize }
+ #define f_fss_named_t_initialize { f_string_range_t_initialize, f_string_ranges_t_initialize, f_string_rangess_t_initialize, f_uint8ss_t_initialize }
#define macro_f_fss_named_t_initialize_1(name, objects, contents, quotess) macro_f_number_unsigneds_t_initialize_1(name, objects, contents, quotess)
#define macro_f_fss_named_t_clear(named) \
- macro_f_fss_object_t_clear(named.name) \
- macro_f_fss_objects_t_clear(named.objects) \
- macro_f_fss_contents_t_clear(named.contents) \
+ macro_f_string_range_t_clear(named.name) \
+ macro_f_string_ranges_t_clear(named.objects) \
+ macro_f_string_rangess_t_clear(named.contents) \
macro_f_uint8ss_t_clear(named.quotess)
#define macro_f_fss_named_t_resize(status, named, length) status = f_fss_named_resize(length, &named);
#include "../fss.h"
-#include "../private-fss.h"
+#include "private-item.h"
+#include "private-nest.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fss_items_adjust_
- f_status_t f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_items_adjust(length, items);
- }
-#endif // _di_f_fss_items_adjust_
-
-#ifndef _di_f_fss_items_decimate_by_
- f_status_t f_fss_items_decimate_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (items->size > amount) {
- return private_f_fss_items_adjust(items->size - amount, items);
- }
-
- return private_f_fss_items_adjust(0, items);
- }
-#endif // _di_f_fss_items_decimate_by_
-
-#ifndef _di_f_fss_items_decrease_by_
- f_status_t f_fss_items_decrease_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (items->size > amount) {
- return private_f_fss_items_resize(items->size - amount, items);
- }
-
- return private_f_fss_items_resize(0, items);
- }
-#endif // _di_f_fss_items_decrease_by_
-
-#ifndef _di_f_fss_items_increase_
- f_status_t f_fss_items_increase(const f_number_unsigned_t step, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && items->used + 1 > items->size) {
- f_number_unsigned_t size = items->used + step;
-
- if (size > F_number_t_size_unsigned_d) {
- if (items->used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
-
- size = F_number_t_size_unsigned_d;
- }
-
- return private_f_fss_items_resize(size, items);
- }
-
- return F_data_not;
- }
-#endif // _di_f_fss_items_increase_
-
-#ifndef _di_f_fss_items_increase_by_
- f_status_t f_fss_items_increase_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (items->used + amount > items->size) {
- if (items->used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
-
- return private_f_fss_items_resize(items->used + amount, items);
- }
-
- return F_data_not;
- }
-#endif // _di_f_fss_items_increase_by_
-
-#ifndef _di_f_fss_items_resize_
- f_status_t f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_items_resize(length, items);
- }
-#endif // _di_f_fss_items_resize_
-
#ifndef _di_f_fss_nest_adjust_
f_status_t f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (nest->size > amount) {
- return private_f_fss_nest_adjust(nest->size - amount, nest);
- }
+ if (nest->size > amount) return private_f_fss_nest_adjust(nest->size - amount, nest);
return private_f_fss_nest_adjust(0, nest);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (nest->size > amount) {
- return private_f_fss_nest_resize(nest->size - amount, nest);
- }
+ if (nest->size > amount) return private_f_fss_nest_resize(nest->size - amount, nest);
return private_f_fss_nest_resize(0, nest);
}
f_number_unsigned_t size = nest->used + step;
if (size > F_number_t_size_unsigned_d) {
- if (nest->used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (nest->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
size = F_number_t_size_unsigned_d;
}
if (!amount) return F_data_not;
if (nest->used + amount > nest->size) {
- if (nest->used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (nest->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
return private_f_fss_nest_resize(nest->used + amount, nest);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (nests->size > amount) {
- return private_f_fss_nests_adjust(nests->size - amount, nests);
- }
+ if (nests->size > amount) return private_f_fss_nests_adjust(nests->size - amount, nests);
return private_f_fss_nests_adjust(0, nests);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (nests->size > amount) {
- return private_f_fss_nests_resize(nests->size - amount, nests);
- }
+ if (nests->size > amount) return private_f_fss_nests_resize(nests->size - amount, nests);
return private_f_fss_nests_resize(0, nests);
}
f_number_unsigned_t size = nests->used + step;
if (size > F_number_t_size_unsigned_d) {
- if (nests->used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (nests->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
size = F_number_t_size_unsigned_d;
}
if (!amount) return F_data_not;
if (nests->used + amount > nests->size) {
- if (nests->used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (nests->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
return private_f_fss_nests_resize(nests->used + amount, nests);
}
#endif
/**
- * This holds a item object and its associated content.
- *
- * Child content represents content nested within some other content and never represents the top-most content.
- *
- * To designate that either object or content is non-existent, set start position greater than stop position.
- * In particular, set start to 1 and stop to 0.
- *
- * This does not have resize/adjust macros due to multiple things to potentially resize.
- * Any resizing must be manually performed on each applicable property.
- *
- * Properties:
- * - object: The object.
- * - content: The content associated with the object.
- * - parent: A location referencing a parrent object or content that this object content is nested under.
- */
-#ifndef _di_f_fss_item_t_
- typedef struct {
- f_fss_object_t object;
- f_fss_content_t content;
-
- f_number_unsigned_t parent;
- } f_fss_item_t;
-
- #define f_fss_item_t_initialize { f_fss_object_t_initialize, f_fss_content_t_initialize, 0 }
-
- #define macro_f_fss_item_t_initialize_1(object, content, parent) macro_f_number_unsigneds_t_initialize_1(object, content, parent)
-
- #define macro_f_fss_item_t_clear(item) \
- macro_f_fss_object_t_clear(item.object); \
- macro_f_fss_content_t_clear(item.content); \
- item.parent = 0;
-
- #define macro_f_fss_item_t_resize(status, item, length) macro_f_fss_content_t_resize(status, item.content, length)
- #define macro_f_fss_item_t_adjust(status, item, length) macro_f_fss_content_t_adjust(status, item.content, length)
-
- #define macro_f_fss_item_t_delete_simple(item) macro_f_fss_content_t_delete_simple(item.content)
- #define macro_f_fss_item_t_destroy_simple(item) macro_f_fss_content_t_destroy_simple(item.content)
-
- #define macro_f_fss_item_t_increase(status, step, item) macro_f_fss_content_t_increase(status, step, item.content)
- #define macro_f_fss_item_t_increase_by(status, item, amount) macro_f_fss_content_t_increase_by(status, item.content, amount)
- #define macro_f_fss_item_t_decrease_by(status, item, amount) macro_f_fss_content_t_decrease_by(status, item.content, amount)
- #define macro_f_fss_item_t_decimate_by(status, item, amount) macro_f_fss_content_t_decimate_by(status, item.content, amount)
-#endif // _di_f_fss_item_t_
-
-/**
- * This holds an array of fss_item.
- *
- * This is designed to be used as a part of f_fss_nest_t.
- *
- * For example:
- * object {
- * fss_basic_content before nested content.
- * nested_1 {
- * Nested content one.
- * }
- *
- * More content in between.
- *
- * nested_2 {
- * Nested content two.
- * nested_3 {
- * Nested content three.
- * }
- * }
- *
- * More content after.
- * }
- *
- * Properties:
- * - array: The array of object, their associated content, and their associated parent.
- * - size: Total amount of allocated space.
- * - used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_items_t_
- typedef struct {
- f_fss_item_t *array;
-
- f_number_unsigned_t size;
- f_number_unsigned_t used;
- } f_fss_items_t;
-
- #define f_fss_items_t_initialize { 0, 0, 0 }
-
- #define macro_f_fss_items_t_initialize_1(array, size, used) { array, size, used }
- #define macro_f_fss_items_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_fss_items_t_clear(items) macro_f_memory_structure_clear(items)
-
- #define macro_f_fss_items_t_resize(status, items, length) status = f_fss_items_resize(length, &items);
- #define macro_f_fss_items_t_adjust(status, items, length) status = f_fss_items_adjust(length, &items);
-
- #define macro_f_fss_items_t_delete_simple(items) f_fss_items_resize(0, &items);
- #define macro_f_fss_items_t_destroy_simple(items) f_fss_items_adjust(0, &items);
-
- #define macro_f_fss_items_t_increase(status, step, items) status = f_fss_items_increase(step, &items);
- #define macro_f_fss_items_t_increase_by(status, items, amount) status = f_fss_items_increase_by(amount, &items);
- #define macro_f_fss_items_t_decrease_by(status, items, amount) status = f_fss_items_decrease_by(amount, &items);
- #define macro_f_fss_items_t_decimate_by(status, items, amount) status = f_fss_items_decimate_by(amount, &items);
-#endif // _di_f_fss_items_t_
-
-/**
* This holds an array of f_fss_items_t.
*
* Each array row represents the nesting depth.
*
* @param length
* The new size to use.
- * @param items
- * The items array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_items_adjust_
- extern f_status_t f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items);
-#endif // _di_f_fss_items_adjust_
-
-/**
- * Resize the nest array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param items
- * The items array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_items_decimate_by_
- extern f_status_t f_fss_items_decimate_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
-#endif // _di_f_fss_items_decimate_by_
-
-/**
- * Resize the nest array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param items
- * The items array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_items_decrease_by_
- extern f_status_t f_fss_items_decrease_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
-#endif // _di_f_fss_items_decrease_by_
-
-/**
- * Increase the size of the items array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param items
- * The items array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_items_increase_
- extern f_status_t f_fss_items_increase(const f_number_unsigned_t step, f_fss_items_t * const items);
-#endif // _di_f_fss_items_increase_
-
-/**
- * Resize the items array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param items
- * The items array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- */
-#ifndef _di_f_fss_items_increase_by_
- extern f_status_t f_fss_items_increase_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
-#endif // _di_f_fss_items_increase_by_
-
-/**
- * Resize the items array.
- *
- * @param length
- * The new size to use.
- * @param items
- * The items array to adjust.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_items_resize_
- extern f_status_t f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items);
-#endif // _di_f_fss_items_resize_
-
-/**
- * Resize the nest array.
- *
- * @param length
- * The new size to use.
* @param nest
* The nest array to resize.
*
--- /dev/null
+#include "../fss.h"
+#include "private-item.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
+ f_status_t private_f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < items->size; ++i) {
+
+ status = f_string_ranges_adjust(0, &items->array[i].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(items->size, length, sizeof(f_fss_item_t), (void **) & items->array);
+ if (F_status_is_error(status)) return status;
+
+ items->size = length;
+
+ if (items->used > items->size) {
+ items->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
+
+#if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
+ f_status_t private_f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < items->size; ++i) {
+
+ status = f_string_ranges_resize(0, &items->array[i].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(items->size, length, sizeof(f_fss_item_t), (void **) & items->array);
+ if (F_status_is_error(status)) return status;
+
+ items->size = length;
+
+ if (items->used > items->size) {
+ items->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_fss_item_h
+#define _PRIVATE_F_fss_item_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param items
+ * The items to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_fss_item_t_adjust().
+ * Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see macro_f_fss_item_t_adjust()
+ *
+ * @see f_fss_items_adjust()
+ * @see f_fss_items_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
+ extern f_status_t private_f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param items
+ * The items to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_fss_item_t_resize().
+ * Errors (with error bit) from: f_memory_resize().
+ *
+ * @see macro_f_fss_item_t_resize()
+ *
+ * @see f_fss_items_decrease_by()
+ * @see f_fss_items_increase()
+ * @see f_fss_items_increase_by()
+ * @see f_fss_items_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
+ extern f_status_t private_f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_item_h
--- /dev/null
+#include "../fss.h"
+#include "private-named.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+ f_status_t private_f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) {
+
+ f_status_t status = f_string_ranges_adjust(length, &named->objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_adjust(length, &named->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8ss_adjust(length, &named->quotess);
+ if (F_status_is_error(status)) return status;
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+
+#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+ f_status_t private_f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) {
+
+ f_status_t status = f_string_ranges_resize(length, &named->objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(length, &named->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8ss_resize(length, &named->quotess);
+ if (F_status_is_error(status)) return status;
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+
+#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+ f_status_t private_f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < nameds->size; ++i) {
+
+ status = private_f_fss_named_adjust(0, &nameds->array[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(nameds->size, length, sizeof(f_fss_named_t), (void **) & nameds->array);
+ if (F_status_is_error(status)) return status;
+
+ nameds->size = length;
+
+ if (nameds->used > nameds->size) {
+ nameds->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+
+#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+ f_status_t private_f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < nameds->size; ++i) {
+
+ status = private_f_fss_named_resize(0, &nameds->array[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(nameds->size, length, sizeof(f_fss_named_t), (void **) & nameds->array);
+ if (F_status_is_error(status)) return status;
+
+ nameds->size = length;
+
+ if (nameds->used > nameds->size) {
+ nameds->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_fss_named_h
+#define _PRIVATE_F_fss_named_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param named
+ * The named to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
+ * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
+ *
+ * @see macro_f_string_ranges_t_adjust()
+ * @see macro_f_string_rangess_t_adjust()
+ * @see macro_f_uint8ss_t_adjust()
+ *
+ * @see f_fss_nameds_adjust()
+ * @see f_fss_nameds_decimate_by()
+ */
+#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+ extern f_status_t private_f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param named
+ * The named to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_ranges_t_resize().
+ * Errors (with error bit) from: macro_f_string_rangess_t_resize().
+ * Errors (with error bit) from: macro_f_uint8ss_t_resize().
+ *
+ * @see macro_f_string_ranges_t_resize()
+ * @see macro_f_string_rangess_t_resize()
+ * @see macro_f_uint8ss_t_resize()
+ *
+ * @see f_fss_nameds_decrease_by()
+ * @see f_fss_nameds_incease()
+ * @see f_fss_nameds_incease_by()
+ * @see f_fss_nameds_resize()
+ */
+#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+ extern f_status_t private_f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param nameds
+ * The nameds to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
+ * Errors (with error bit) from: private_f_fss_named_adjust().
+ *
+ * @see private_f_fss_named_adjust()
+ *
+ * @see f_fss_nameds_adjust()
+ * @see f_fss_nameds_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+ extern f_status_t private_f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param nameds
+ * The nameds to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ * Errors (with error bit) from: private_f_fss_named_resize().
+ *
+ * @see private_f_fss_named_resize()
+ *
+ * @see f_fss_nameds_decrease_by()
+ * @see f_fss_nameds_increase()
+ * @see f_fss_nameds_increase_by()
+ * @see f_fss_nameds_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+ extern f_status_t private_f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_named_h
--- /dev/null
+#include "../fss.h"
+#include "private-item.h"
+#include "private-nest.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
+ f_status_t private_f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < nest->size; ++i) {
+
+ status = private_f_fss_items_adjust(0, &nest->depth[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(nest->size, length, sizeof(f_fss_items_t), (void **) & nest->depth);
+ if (F_status_is_error(status)) return status;
+
+ nest->size = length;
+
+ if (nest->used > nest->size) {
+ nest->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
+
+#if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
+ f_status_t private_f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < nest->size; ++i) {
+
+ status = private_f_fss_items_resize(0, &nest->depth[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(nest->size, length, sizeof(f_fss_items_t), (void **) & nest->depth);
+ if (F_status_is_error(status)) return status;
+
+ nest->size = length;
+
+ if (nest->used > nest->size) {
+ nest->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
+
+#if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
+ f_status_t private_f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t *nests) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < nests->size; ++i) {
+
+ status = private_f_fss_nest_adjust(0, &nests->array[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(nests->size, length, sizeof(f_fss_nest_t), (void **) & nests->array);
+ if (F_status_is_error(status)) return status;
+
+ nests->size = length;
+
+ if (nests->used > nests->size) {
+ nests->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
+
+#if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
+ f_status_t private_f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < nests->size; ++i) {
+
+ status = private_f_fss_nest_resize(0, &nests->array[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(nests->size, length, sizeof(f_fss_nest_t), (void **) & nests->array);
+ if (F_status_is_error(status)) return status;
+
+ nests->size = length;
+
+ if (nests->used > nests->size) {
+ nests->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_fss_nest_h
+#define _PRIVATE_F_fss_nest_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param nest
+ * The nest to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
+ * Errors (with error bit) from: macro_f_fss_nest_t_adjust().
+ *
+ * @see macro_f_fss_nest_t_adjust()
+ *
+ * @see f_fss_nest_adjust()
+ * @see f_fss_nest_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
+ extern f_status_t private_f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param nest
+ * The nest to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ * Errors (with error bit) from: macro_f_fss_nest_t_resize().
+ *
+ * @see macro_f_fss_nest_t_resize()
+ *
+ * @see f_fss_nest_decrease_by()
+ * @see f_fss_nest_increase()
+ * @see f_fss_nest_increase_by()
+ * @see f_fss_nest_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
+ extern f_status_t private_f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param nests
+ * The nests to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
+ * Errors (with error bit) from: macro_f_fss_nest_t_adjust().
+ *
+ * @see macro_f_fss_nest_t_adjust()
+ *
+ * @see f_fss_nests_adjust()
+ * @see f_fss_nests_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
+ extern f_status_t private_f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t * const nests) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param nests
+ * The nests to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ * Errors (with error bit) from: macro_f_fss_nest_t_resize().
+ *
+ * @see macro_f_fss_nest_t_resize()
+ *
+ * @see f_fss_nests_decrease_by()
+ * @see f_fss_nests_increase()
+ * @see f_fss_nests_increase_by()
+ * @see f_fss_nests_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
+ extern f_status_t private_f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_nest_h
--- /dev/null
+#include "../fss.h"
+#include "private-set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
+ f_status_t private_f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) {
+
+ f_status_t status = f_string_ranges_adjust(length, &set->objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_adjust(length, &set->contents);
+ if (F_status_is_error(status)) return status;
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
+
+#if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
+ f_status_t private_f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t *set) {
+
+ f_status_t status = f_string_ranges_resize(length, &set->objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(length, &set->contents);
+ if (F_status_is_error(status)) return status;
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
+
+#if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
+ f_status_t private_f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < sets->size; ++i) {
+
+ status = f_string_ranges_adjust(0, &sets->array[i].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_adjust(0, &sets->array[i].contents);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(sets->size, length, sizeof(f_fss_set_t), (void **) & sets->array);
+ if (F_status_is_error(status)) return status;
+
+ sets->size = length;
+
+ if (sets->used > sets->size) {
+ sets->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
+
+#if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
+ f_status_t private_f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < sets->size; ++i) {
+
+ status = f_string_ranges_resize(0, &sets->array[i].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(0, &sets->array[i].contents);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(sets->size, length, sizeof(f_fss_set_t), (void **) & sets->array);
+ if (F_status_is_error(status)) return status;
+
+ sets->size = length;
+
+ if (sets->used > sets->size) {
+ sets->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_fss_set_h
+#define _PRIVATE_F_fss_set_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param set
+ * The set to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
+ * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
+ *
+ * @see macro_f_string_rangess_t_adjust()
+ * @see macro_f_string_ranges_t_adjust()
+ *
+ * @see f_fss_set_adjust()
+ * @see f_fss_set_decimate_by()
+ */
+#if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
+ extern f_status_t private_f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param set
+ * The set to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_resize().
+ * Errors (with error bit) from: macro_f_string_ranges_t_resize().
+ *
+ * @see macro_f_string_rangess_t_resize()
+ * @see macro_f_string_ranges_t_resize()
+ *
+ * @see f_fss_set_decrease_by()
+ * @see f_fss_set_increase()
+ * @see f_fss_set_increase_by()
+ * @see f_fss_set_resize()
+ */
+#if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
+ extern f_status_t private_f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t * const set) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param sets
+ * The sets to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
+ * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
+ * Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see macro_f_string_rangess_t_adjust()
+ * @see macro_f_string_ranges_t_adjust()
+ *
+ * @see f_fss_sets_adjust()
+ * @see f_fss_sets_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
+ extern f_status_t private_f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param sets
+ * The sets to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_resize().
+ * Errors (with error bit) from: macro_f_string_ranges_t_resize().
+ * Errors (with error bit) from: f_memory_resize().
+ *
+ * @see macro_f_string_rangess_t_resize()
+ * @see macro_f_string_ranges_t_resize()
+ *
+ * @see f_fss_sets_decrease_by()
+ * @see f_fss_sets_increase()
+ * @see f_fss_sets_increase_by()
+ * @see f_fss_sets_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
+ extern f_status_t private_f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_set_h
--- /dev/null
+#include "../fss.h"
+#include "private-set_quote.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
+ f_status_t private_f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
+
+ f_status_t status = f_string_ranges_adjust(length, &set_quote->objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_adjust(length, &set_quote->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8s_adjust(length, &set_quote->objects_quote);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8ss_adjust(length, &set_quote->contents_quote);
+ if (F_status_is_error(status)) return status;
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
+
+#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
+ f_status_t private_f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
+
+ f_status_t status = f_string_ranges_resize(length, &set_quote->objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(length, &set_quote->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8s_resize(length, &set_quote->objects_quote);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8ss_resize(length, &set_quote->contents_quote);
+ if (F_status_is_error(status)) return status;
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
+
+#if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
+ f_status_t private_f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < set_quotes->size; ++i) {
+
+ status = f_string_ranges_adjust(0, &set_quotes->array[i].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_adjust(0, &set_quotes->array[i].contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8s_adjust(0, &set_quotes->array[i].objects_quote);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8ss_adjust(0, &set_quotes->array[i].contents_quote);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(set_quotes->size, length, sizeof(f_fss_set_quote_t), (void **) & set_quotes->array);
+ if (F_status_is_error(status)) return status;
+
+ set_quotes->size = length;
+
+ if (set_quotes->used > set_quotes->size) {
+ set_quotes->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
+
+#if !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
+ f_status_t private_f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
+
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = length; i < set_quotes->size; ++i) {
+
+ status = f_string_ranges_resize(0, &set_quotes->array[i].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(0, &set_quotes->array[i].contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8s_resize(0, &set_quotes->array[i].objects_quote);
+ if (F_status_is_error(status)) return status;
+
+ status = f_uint8ss_resize(0, &set_quotes->array[i].contents_quote);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(set_quotes->size, length, sizeof(f_fss_set_quote_t), (void **) & set_quotes->array);
+ if (F_status_is_error(status)) return status;
+
+ set_quotes->size = length;
+
+ if (set_quotes->used > set_quotes->size) {
+ set_quotes->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_fss_set_quote_h
+#define _PRIVATE_F_fss_set_quote_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quote
+ * The set_quote to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
+ * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8s_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
+ *
+ * @see macro_f_string_rangess_t_adjust()
+ * @see macro_f_string_ranges_t_adjust()
+ * @see macro_f_uint8s_t_adjust()
+ * @see macro_f_uint8ss_t_adjust()
+ *
+ * @see f_fss_set_quote_adjust()
+ * @see f_fss_set_quote_decimate_by()
+ */
+#if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
+ extern f_status_t private_f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quote
+ * The set_quote to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_resize().
+ * Errors (with error bit) from: macro_f_string_ranges_t_resize().
+ * Errors (with error bit) from: macro_f_uint8s_t_resize().
+ * Errors (with error bit) from: macro_f_uint8ss_t_resize().
+ *
+ * @see macro_f_string_rangess_t_resize()
+ * @see macro_f_string_ranges_t_resize()
+ * @see macro_f_uint8s_t_resize()
+ * @see macro_f_uint8ss_t_resize()
+ *
+ * @see f_fss_set_quote_decrease_by()
+ * @see f_fss_set_quote_increase()
+ * @see f_fss_set_quote_increase_by()
+ * @see f_fss_set_quote_resize()
+ */
+#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
+ extern f_status_t private_f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quotes
+ * The set_quotes to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
+ * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8s_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
+ * Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see macro_f_string_rangess_t_adjust()
+ * @see macro_f_string_ranges_t_adjust()
+ * @see macro_f_uint8s_t_adjust()
+ * @see macro_f_uint8ss_t_adjust()
+ *
+ * @see f_fss_set_quotes_adjust()
+ * @see f_fss_set_quotes_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
+ extern f_status_t private_f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quotes
+ * The set_quotes to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_resize().
+ * Errors (with error bit) from: macro_f_string_ranges_t_resize().
+ * Errors (with error bit) from: macro_f_uint8s_t_resize().
+ * Errors (with error bit) from: macro_f_uint8ss_t_resize().
+ * Errors (with error bit) from: f_memory_resize().
+ *
+ * @see macro_f_string_rangess_t_resize()
+ * @see macro_f_string_ranges_t_resize()
+ * @see macro_f_uint8s_t_resize()
+ * @see macro_f_uint8ss_t_resize()
+ *
+ * @see f_fss_set_quotes_decrease_by()
+ * @see f_fss_set_quotes_increase()
+ * @see f_fss_set_quotes_increase_by()
+ * @see f_fss_set_quotes_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
+ extern f_status_t private_f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_set_quote_h
--- /dev/null
+#include "../fss.h"
+#include "private-simple_packet.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_simple_packet_ranges_adjust_) || !defined(_di_f_fss_simple_packet_ranges_decimate_by_)
+ f_status_t private_f_fss_simple_packet_ranges_adjust(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+
+ const f_status_t status = f_memory_adjust(simple_packet_ranges->size, length, sizeof(f_fss_simple_packet_range_t), (void **) & simple_packet_ranges->array);
+ if (F_status_is_error(status)) return status;
+
+ simple_packet_ranges->size = length;
+
+ if (simple_packet_ranges->used > simple_packet_ranges->size) {
+ simple_packet_ranges->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_simple_packet_ranges_adjust_) || !defined(_di_f_fss_simple_packet_ranges_decimate_by_)
+
+#if !defined(_di_f_fss_simple_packet_ranges_decrease_by_) || !defined(_di_f_fss_simple_packet_ranges_increase_) || !defined(_di_f_fss_simple_packet_ranges_increase_by_) || !defined(_di_f_fss_simple_packet_ranges_resize_)
+ f_status_t private_f_fss_simple_packet_ranges_resize(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+
+ const f_status_t status = f_memory_resize(simple_packet_ranges->size, length, sizeof(f_fss_simple_packet_range_t), (void **) & simple_packet_ranges->array);
+ if (F_status_is_error(status)) return status;
+
+ simple_packet_ranges->size = length;
+
+ if (simple_packet_ranges->used > simple_packet_ranges->size) {
+ simple_packet_ranges->used = length;
+ }
+
+ return F_none;
+ }
+#endif // !defined(_di_f_fss_simple_packet_ranges_decrease_by_) || !defined(_di_f_fss_simple_packet_ranges_increase_) || !defined(_di_f_fss_simple_packet_ranges_increase_by_) || !defined(_di_f_fss_simple_packet_ranges_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_fss_simple_packet_h
+#define _PRIVATE_F_fss_simple_packet_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
+ * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8s_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
+ * Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see macro_f_string_rangess_t_adjust()
+ * @see macro_f_string_ranges_t_adjust()
+ * @see macro_f_uint8s_t_adjust()
+ * @see macro_f_uint8ss_t_adjust()
+ *
+ * @see f_fss_simple_packet_ranges_adjust()
+ * @see f_fss_simple_packet_ranges_decimate_by()
+ * @see f_memory_adjust()
+ */
+#if !defined(_di_f_fss_simple_packet_ranges_adjust_) || !defined(_di_f_fss_simple_packet_ranges_decimate_by_)
+ extern f_status_t private_f_fss_simple_packet_ranges_adjust(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_simple_packet_ranges_adjust_) || !defined(_di_f_fss_simple_packet_ranges_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: macro_f_string_rangess_t_resize().
+ * Errors (with error bit) from: macro_f_string_ranges_t_resize().
+ * Errors (with error bit) from: macro_f_uint8s_t_resize().
+ * Errors (with error bit) from: macro_f_uint8ss_t_resize().
+ * Errors (with error bit) from: f_memory_resize().
+ *
+ * @see macro_f_string_rangess_t_resize()
+ * @see macro_f_string_ranges_t_resize()
+ * @see macro_f_uint8s_t_resize()
+ * @see macro_f_uint8ss_t_resize()
+ *
+ * @see f_fss_simple_packet_ranges_decrease_by()
+ * @see f_fss_simple_packet_ranges_increase()
+ * @see f_fss_simple_packet_ranges_increase_by()
+ * @see f_fss_simple_packet_ranges_resize()
+ * @see f_memory_resize()
+ */
+#if !defined(_di_f_fss_simple_packet_ranges_decrease_by_) || !defined(_di_f_fss_simple_packet_ranges_increase_) || !defined(_di_f_fss_simple_packet_ranges_increase_by_) || !defined(_di_f_fss_simple_packet_ranges_resize_)
+ extern f_status_t private_f_fss_simple_packet_ranges_resize(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_simple_packet_ranges_decrease_by_) || !defined(_di_f_fss_simple_packet_ranges_increase_) || !defined(_di_f_fss_simple_packet_ranges_increase_by_) || !defined(_di_f_fss_simple_packet_ranges_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_simple_packet_h
#include "../fss.h"
-#include "../private-fss.h"
+#include "private-set.h"
#ifdef __cplusplus
extern "C" {
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (set->objects.size - amount > 0) {
- return private_f_fss_set_adjust(set->objects.size - amount, set);
- }
+ if (set->objects.size - amount > 0) return private_f_fss_set_adjust(set->objects.size - amount, set);
return private_f_fss_set_adjust(0, set);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (set->objects.size - amount > 0) {
- return private_f_fss_set_resize(set->objects.size - amount, set);
- }
+ if (set->objects.size - amount > 0) return private_f_fss_set_resize(set->objects.size - amount, set);
return private_f_fss_set_resize(0, set);
}
f_number_unsigned_t size = set->objects.used + step;
if (size > F_number_t_size_unsigned_d) {
- if (set->objects.used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (set->objects.used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
size = F_number_t_size_unsigned_d;
}
if (!amount) return F_data_not;
if (set->objects.used + amount > set->objects.size) {
- if (set->objects.used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (set->objects.used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
return private_f_fss_set_resize(set->objects.used + amount, set);
}
}
#endif // _di_f_fss_set_resize_
-#ifndef _di_f_fss_set_quote_adjust_
- f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_set_quote_adjust(length, set_quote);
- }
-#endif // _di_f_fss_set_quote_adjust_
-
-#ifndef _di_f_fss_set_quote_decimate_by_
- f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (set_quote->objects.size - amount > 0) {
- return private_f_fss_set_quote_adjust(set_quote->objects.size - amount, set_quote);
- }
-
- return private_f_fss_set_quote_adjust(0, set_quote);
- }
-#endif // _di_f_fss_set_quote_decimate_by_
-
-#ifndef _di_f_fss_set_quote_decrease_by_
- f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (set_quote->objects.size - amount > 0) {
- return private_f_fss_set_quote_resize(set_quote->objects.size - amount, set_quote);
- }
-
- return private_f_fss_set_quote_resize(0, set_quote);
- }
-#endif // _di_f_fss_set_quote_decrease_by_
-
-#ifndef _di_f_fss_set_quote_increase_
- f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && set_quote->objects.used + 1 > set_quote->objects.size) {
- f_number_unsigned_t size = set_quote->objects.used + step;
-
- if (size > F_number_t_size_unsigned_d) {
- if (set_quote->objects.used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
-
- size = F_number_t_size_unsigned_d;
- }
-
- return private_f_fss_set_quote_resize(size, set_quote);
- }
-
- return F_data_not;
- }
-#endif // _di_f_fss_set_quote_increase_
-
-#ifndef _di_f_fss_set_quote_increase_by_
- f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (set_quote->objects.used + amount > set_quote->objects.size) {
- if (set_quote->objects.used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
-
- return private_f_fss_set_quote_resize(set_quote->objects.used + amount, set_quote);
- }
-
- return F_data_not;
- }
-#endif // _di_f_fss_set_quote_increase_by_
-
-#ifndef _di_f_fss_set_quote_resize_
- f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_set_quote_resize(length, set_quote);
- }
-#endif // _di_f_fss_set_quote_resize_
-
-#ifndef _di_f_fss_set_quotes_adjust_
- f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_set_quotes_adjust(length, set_quotes);
- }
-#endif // _di_f_fss_set_quotes_adjust_
-
-#ifndef _di_f_fss_set_quotes_decimate_by_
- f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (set_quotes->size - amount > 0) {
- return private_f_fss_set_quotes_adjust(set_quotes->size - amount, set_quotes);
- }
-
- return private_f_fss_set_quotes_adjust(0, set_quotes);
- }
-#endif // _di_f_fss_set_quotes_decimate_by_
-
-#ifndef _di_f_fss_set_quotes_decrease_by_
- f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (set_quotes->size - amount > 0) {
- return private_f_fss_set_quotes_resize(set_quotes->size - amount, set_quotes);
- }
-
- return private_f_fss_set_quotes_resize(0, set_quotes);
- }
-#endif // _di_f_fss_set_quotes_decrease_by_
-
-#ifndef _di_f_fss_set_quotes_increase_
- f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && set_quotes->used + 1 > set_quotes->size) {
- f_number_unsigned_t size = set_quotes->used + step;
-
- if (size > F_number_t_size_unsigned_d) {
- if (set_quotes->used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
-
- size = F_number_t_size_unsigned_d;
- }
-
- return private_f_fss_set_quotes_resize(size, set_quotes);
- }
-
- return F_data_not;
- }
-#endif // _di_f_fss_set_quotes_increase_
-
-#ifndef _di_f_fss_set_quotes_increase_by_
- f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- if (set_quotes->used + amount > set_quotes->size) {
- if (set_quotes->used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
-
- return private_f_fss_set_quotes_resize(set_quotes->used + amount, set_quotes);
- }
-
- return F_data_not;
- }
-#endif // _di_f_fss_set_quotes_increase_by_
-
-#ifndef _di_f_fss_set_quotes_resize_
- f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_set_quotes_resize(length, set_quotes);
- }
-#endif // _di_f_fss_set_quotes_resize_
-
#ifndef _di_f_fss_sets_adjust_
f_status_t f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t *sets) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (sets->size - amount > 0) {
- return private_f_fss_sets_adjust(sets->size - amount, sets);
- }
+ if (sets->size - amount > 0) return private_f_fss_sets_adjust(sets->size - amount, sets);
return private_f_fss_sets_adjust(0, sets);
}
#endif // _di_level_0_parameter_checking_
if (!amount) return F_data_not;
-
- if (sets->size - amount > 0) {
- return private_f_fss_sets_resize(sets->size - amount, sets);
- }
+ if (sets->size - amount > 0) return private_f_fss_sets_resize(sets->size - amount, sets);
return private_f_fss_sets_resize(0, sets);
}
f_number_unsigned_t size = sets->used + step;
if (size > F_number_t_size_unsigned_d) {
- if (sets->used + 1 > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (sets->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
size = F_number_t_size_unsigned_d;
}
if (!amount) return F_data_not;
if (sets->used + amount > sets->size) {
- if (sets->used + amount > F_number_t_size_unsigned_d) {
- return F_status_set_error(F_array_too_large);
- }
+ if (sets->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
return private_f_fss_sets_resize(sets->used + amount, sets);
}
*/
#ifndef _di_f_fss_set_t_
typedef struct {
- f_fss_objects_t objects;
- f_fss_contents_t contents;
+ f_string_ranges_t objects;
+ f_string_rangess_t contents;
} f_fss_set_t;
- #define f_fss_set_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize }
+ #define f_fss_set_t_initialize { f_string_ranges_t_initialize, f_string_rangess_t_initialize }
#define macro_f_fss_set_t_initialize_1(objects, contents) { objects, contents }
#define macro_f_fss_set_t_clear(set) \
- macro_f_fss_objects_t_clear(set.objects) \
- macro_f_fss_contents_t_clear(set.contents)
+ macro_f_string_ranges_t_clear(set.objects) \
+ macro_f_string_rangess_t_clear(set.contents)
#define macro_f_fss_set_t_resize(status, set, length) status = f_fss_set_resize(length, &set);
#define macro_f_fss_set_t_adjust(status, set, length) status = f_fss_set_adjust(length, &set);
#endif // _di_f_fss_sets_t_
/**
- * This holds an fss object with a set of fss content, along with their quote types.
- *
- * The objects, contents, and quotes should each be of the same used and size.
- * Any deviation to this would require implementing custom equivelents to the standard management macros.
- *
- * Properties:
- * - objects: The array of objects.
- * - contents: The array of contents.
- * - objects_quote: The array of objects quote types.
- * - contents_quote: The array of contents quote types.
- */
-#ifndef _di_f_fss_set_quote_t_
- typedef struct {
- f_fss_objects_t objects;
- f_fss_contents_t contents;
-
- f_uint8s_t objects_quote;
- f_uint8ss_t contents_quote;
- } f_fss_set_quote_t;
-
- #define f_fss_set_quote_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_uint8s_t_initialize, f_uint8ss_t_initialize }
-
- #define macro_f_fss_set_quote_t_initialize_1(objects, contents, objects_quote, contents_quote) { objects, contents, objects_quote, contents_quote }
-
- #define macro_f_fss_set_quote_t_clear(set) \
- macro_f_fss_objects_t_clear(set.objects) \
- macro_f_fss_contents_t_clear(set.contents) \
- macro_f_uint8s_t_clear(set.objects_quote) \
- macro_f_uint8ss_t_clear(set.contents_quote)
-
- #define macro_f_fss_set_quote_t_resize(status, set_quote, length) status = f_fss_set_quote_resize(length, &set_quote);
- #define macro_f_fss_set_quote_t_adjust(status, set_quote, length) status = f_fss_set_quote_adjust(length, &set_quote);
-
- #define macro_f_fss_set_quote_t_delete_simple(set_quote) f_fss_set_quote_resize(0, &set_quote);
- #define macro_f_fss_set_quote_t_destroy_simple(set_quote) f_fss_set_quote_adjust(0, &set_quote);
-
- #define macro_f_fss_set_quote_t_increase(status, step, set_quote) status = f_fss_set_quote_increase(step, &set_quote);
- #define macro_f_fss_set_quote_t_increase_by(status, set_quote, amount) status = f_fss_set_quote_increase_by(amount, &set_quote);
- #define macro_f_fss_set_quote_t_decrease_by(status, set_quote, amount) status = f_fss_set_quote_decrease_by(amount, &set_quote);
- #define macro_f_fss_set_quote_t_decimate_by(status, set_quote, amount) status = f_fss_set_quote_decimate_by(amount, &set_quote);
-#endif // _di_f_fss_set_quote_t_
-
-/**
- * This holds an array of f_fss_set_quote_t.
- *
- * Properties:
- * - array: An array of f_fss_set_quote_t.
- * - size: Total amount of allocated space.
- * - used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_set_quotes_t_
- typedef struct {
- f_fss_set_quote_t *array;
-
- f_number_unsigned_t size;
- f_number_unsigned_t used;
- } f_fss_set_quotes_t;
-
- #define f_fss_set_quotes_t_initialize { 0, 0, 0 }
-
- #define macro_f_fss_set_quotes_t_initialize_1(array, size, used) { array, size, used }
- #define macro_f_fss_set_quotes_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_fss_set_quotes_t_clear(nameds) macro_f_memory_structure_clear(nameds)
-
- #define macro_f_fss_set_quotes_t_resize(status, set_quotes, length) status = f_fss_set_quotes_resize(length, &set_quotes);
- #define macro_f_fss_set_quotes_t_adjust(status, set_quotes, length) status = f_fss_set_quotes_adjust(length, &set_quotes);
-
- #define macro_f_fss_set_quotes_t_delete_simple(set_quotes) f_fss_set_quotes_resize(0, &set_quotes);
- #define macro_f_fss_set_quotes_t_destroy_simple(set_quotes) f_fss_set_quotes_adjust(0, &set_quotes);
-
- #define macro_f_fss_set_quotes_t_increase(status, step, set_quotes) status = f_fss_set_quotes_increase(step, &set_quotes);
- #define macro_f_fss_set_quotes_t_increase_by(status, set_quotes, amount) status = f_fss_set_quotes_increase_by(amount, &set_quotes);
- #define macro_f_fss_set_quotes_t_decrease_by(status, set_quotes, amount) status = f_fss_set_quotes_decrease_by(amount, &set_quotes);
- #define macro_f_fss_set_quotes_t_decimate_by(status, set_quotes, amount) status = f_fss_set_quotes_decimate_by(amount, &set_quotes);
-#endif // _di_f_fss_set_quotes_t_
-
-/**
* Resize the set array.
*
* @param length
#endif // _di_f_fss_set_resize_
/**
- * Resize the set_quote array.
- *
- * @param length
- * The new size to use.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quote_adjust_
- extern f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_adjust_
-
-/**
- * Resize the set_quote array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quote_decimate_by_
- extern f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_decimate_by_
-
-/**
- * Resize the set_quote array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quote_decrease_by_
- extern f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_decrease_by_
-
-/**
- * Increase the size of the set_quote array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_number_t_size_unsigned_d).
- * If already set_quote to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quote_increase_
- extern f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_increase_
-
-/**
- * Resize the set_quote array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_number_t_size_unsigned_d).
- * If already set_quote to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- */
-#ifndef _di_f_fss_set_quote_increase_by_
- extern f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_increase_by_
-
-/**
- * Resize the set_quote array.
- *
- * @param length
- * The new size to use.
- * @param set_quote
- * The set_quote array to adjust.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quote_resize_
- extern f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_resize_
-
-/**
- * Resize the set_quote array.
- *
- * @param length
- * The new size to use.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quotes_adjust_
- extern f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_adjust_
-
-/**
- * Resize the set_quote array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quotes_decimate_by_
- extern f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_decimate_by_
-
-/**
- * Resize the set_quote array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quotes_decrease_by_
- extern f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_decrease_by_
-
-/**
- * Increase the size of the set_quotes array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quotes_increase_
- extern f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_increase_
-
-/**
- * Resize the set_quotes array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- */
-#ifndef _di_f_fss_set_quotes_increase_by_
- extern f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_increase_by_
-
-/**
- * Resize the set_quotes array.
- *
- * @param length
- * The new size to use.
- * @param set_quotes
- * The set_quotes array to adjust.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_set_quotes_resize_
- extern f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_resize_
-
-/**
* Resize the set array.
*
* @param length
--- /dev/null
+#include "../fss.h"
+#include "private-set_quote.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_fss_set_quote_adjust_
+ f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quote) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_set_quote_adjust(length, set_quote);
+ }
+#endif // _di_f_fss_set_quote_adjust_
+
+#ifndef _di_f_fss_set_quote_decimate_by_
+ f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quote) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (set_quote->objects.size - amount > 0) return private_f_fss_set_quote_adjust(set_quote->objects.size - amount, set_quote);
+
+ return private_f_fss_set_quote_adjust(0, set_quote);
+ }
+#endif // _di_f_fss_set_quote_decimate_by_
+
+#ifndef _di_f_fss_set_quote_decrease_by_
+ f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quote) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (set_quote->objects.size - amount > 0) return private_f_fss_set_quote_resize(set_quote->objects.size - amount, set_quote);
+
+ return private_f_fss_set_quote_resize(0, set_quote);
+ }
+#endif // _di_f_fss_set_quote_decrease_by_
+
+#ifndef _di_f_fss_set_quote_increase_
+ f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quote) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (step && set_quote->objects.used + 1 > set_quote->objects.size) {
+ f_number_unsigned_t size = set_quote->objects.used + step;
+
+ if (size > F_number_t_size_unsigned_d) {
+ if (set_quote->objects.used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ size = F_number_t_size_unsigned_d;
+ }
+
+ return private_f_fss_set_quote_resize(size, set_quote);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_set_quote_increase_
+
+#ifndef _di_f_fss_set_quote_increase_by_
+ f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quote) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+
+ if (set_quote->objects.used + amount > set_quote->objects.size) {
+ if (set_quote->objects.used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ return private_f_fss_set_quote_resize(set_quote->objects.used + amount, set_quote);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_set_quote_increase_by_
+
+#ifndef _di_f_fss_set_quote_resize_
+ f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quote) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_set_quote_resize(length, set_quote);
+ }
+#endif // _di_f_fss_set_quote_resize_
+
+#ifndef _di_f_fss_set_quotes_adjust_
+ f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quotes) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_set_quotes_adjust(length, set_quotes);
+ }
+#endif // _di_f_fss_set_quotes_adjust_
+
+#ifndef _di_f_fss_set_quotes_decimate_by_
+ f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quotes) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (set_quotes->size - amount > 0) return private_f_fss_set_quotes_adjust(set_quotes->size - amount, set_quotes);
+
+ return private_f_fss_set_quotes_adjust(0, set_quotes);
+ }
+#endif // _di_f_fss_set_quotes_decimate_by_
+
+#ifndef _di_f_fss_set_quotes_decrease_by_
+ f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quotes) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (set_quotes->size - amount > 0) return private_f_fss_set_quotes_resize(set_quotes->size - amount, set_quotes);
+
+ return private_f_fss_set_quotes_resize(0, set_quotes);
+ }
+#endif // _di_f_fss_set_quotes_decrease_by_
+
+#ifndef _di_f_fss_set_quotes_increase_
+ f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quotes) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (step && set_quotes->used + 1 > set_quotes->size) {
+ f_number_unsigned_t size = set_quotes->used + step;
+
+ if (size > F_number_t_size_unsigned_d) {
+ if (set_quotes->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ size = F_number_t_size_unsigned_d;
+ }
+
+ return private_f_fss_set_quotes_resize(size, set_quotes);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_set_quotes_increase_
+
+#ifndef _di_f_fss_set_quotes_increase_by_
+ f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quotes) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+
+ if (set_quotes->used + amount > set_quotes->size) {
+ if (set_quotes->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ return private_f_fss_set_quotes_resize(set_quotes->used + amount, set_quotes);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_set_quotes_increase_by_
+
+#ifndef _di_f_fss_set_quotes_resize_
+ f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!set_quotes) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_set_quotes_resize(length, set_quotes);
+ }
+#endif // _di_f_fss_set_quotes_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines set data to be used for/by project fss.
+ *
+ * This is auto-included by fss.h and should not need to be explicitly included.
+ */
+#ifndef _F_fss_set_quote_h
+#define _F_fss_set_quote_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This holds an fss object with a set of fss content, along with their quote types.
+ *
+ * The objects, contents, and quotes should each be of the same used and size.
+ * Any deviation to this would require implementing custom equivelents to the standard management macros.
+ *
+ * Properties:
+ * - objects: The array of objects.
+ * - contents: The array of contents.
+ * - objects_quote: The array of objects quote types.
+ * - contents_quote: The array of contents quote types.
+ */
+#ifndef _di_f_fss_set_quote_t_
+ typedef struct {
+ f_string_ranges_t objects;
+ f_string_rangess_t contents;
+
+ f_uint8s_t objects_quote;
+ f_uint8ss_t contents_quote;
+ } f_fss_set_quote_t;
+
+ #define f_fss_set_quote_t_initialize { f_string_ranges_t_initialize, f_string_rangess_t_initialize, f_uint8s_t_initialize, f_uint8ss_t_initialize }
+
+ #define macro_f_fss_set_quote_t_initialize_1(objects, contents, objects_quote, contents_quote) { objects, contents, objects_quote, contents_quote }
+
+ #define macro_f_fss_set_quote_t_clear(set) \
+ macro_f_string_ranges_t_clear(set.objects) \
+ macro_f_string_rangess_t_clear(set.contents) \
+ macro_f_uint8s_t_clear(set.objects_quote) \
+ macro_f_uint8ss_t_clear(set.contents_quote)
+
+ #define macro_f_fss_set_quote_t_resize(status, set_quote, length) status = f_fss_set_quote_resize(length, &set_quote);
+ #define macro_f_fss_set_quote_t_adjust(status, set_quote, length) status = f_fss_set_quote_adjust(length, &set_quote);
+
+ #define macro_f_fss_set_quote_t_delete_simple(set_quote) f_fss_set_quote_resize(0, &set_quote);
+ #define macro_f_fss_set_quote_t_destroy_simple(set_quote) f_fss_set_quote_adjust(0, &set_quote);
+
+ #define macro_f_fss_set_quote_t_increase(status, step, set_quote) status = f_fss_set_quote_increase(step, &set_quote);
+ #define macro_f_fss_set_quote_t_increase_by(status, set_quote, amount) status = f_fss_set_quote_increase_by(amount, &set_quote);
+ #define macro_f_fss_set_quote_t_decrease_by(status, set_quote, amount) status = f_fss_set_quote_decrease_by(amount, &set_quote);
+ #define macro_f_fss_set_quote_t_decimate_by(status, set_quote, amount) status = f_fss_set_quote_decimate_by(amount, &set_quote);
+#endif // _di_f_fss_set_quote_t_
+
+/**
+ * This holds an array of f_fss_set_quote_t.
+ *
+ * Properties:
+ * - array: An array of f_fss_set_quote_t.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_set_quotes_t_
+ typedef struct {
+ f_fss_set_quote_t *array;
+
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_fss_set_quotes_t;
+
+ #define f_fss_set_quotes_t_initialize { 0, 0, 0 }
+
+ #define macro_f_fss_set_quotes_t_initialize_1(array, size, used) { array, size, used }
+ #define macro_f_fss_set_quotes_t_initialize_2(array, length) { array, length, length }
+
+ #define macro_f_fss_set_quotes_t_clear(nameds) macro_f_memory_structure_clear(nameds)
+
+ #define macro_f_fss_set_quotes_t_resize(status, set_quotes, length) status = f_fss_set_quotes_resize(length, &set_quotes);
+ #define macro_f_fss_set_quotes_t_adjust(status, set_quotes, length) status = f_fss_set_quotes_adjust(length, &set_quotes);
+
+ #define macro_f_fss_set_quotes_t_delete_simple(set_quotes) f_fss_set_quotes_resize(0, &set_quotes);
+ #define macro_f_fss_set_quotes_t_destroy_simple(set_quotes) f_fss_set_quotes_adjust(0, &set_quotes);
+
+ #define macro_f_fss_set_quotes_t_increase(status, step, set_quotes) status = f_fss_set_quotes_increase(step, &set_quotes);
+ #define macro_f_fss_set_quotes_t_increase_by(status, set_quotes, amount) status = f_fss_set_quotes_increase_by(amount, &set_quotes);
+ #define macro_f_fss_set_quotes_t_decrease_by(status, set_quotes, amount) status = f_fss_set_quotes_decrease_by(amount, &set_quotes);
+ #define macro_f_fss_set_quotes_t_decimate_by(status, set_quotes, amount) status = f_fss_set_quotes_decimate_by(amount, &set_quotes);
+#endif // _di_f_fss_set_quotes_t_
+
+/**
+ * Resize the set_quote array.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quote
+ * The set_quote array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quote_adjust_
+ extern f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_adjust_
+
+/**
+ * Resize the set_quote array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decimate the size by.
+ * @param set_quote
+ * The set_quote array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if amount is 0.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quote_decimate_by_
+ extern f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_decimate_by_
+
+/**
+ * Resize the set_quote array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decrease the size by.
+ * @param set_quote
+ * The set_quote array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quote_decrease_by_
+ extern f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_decrease_by_
+
+/**
+ * Increase the size of the set_quote array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_number_t_size_unsigned_d).
+ * If already set_quote to the maximum buffer size, then the resize will fail.
+ *
+ * @param step
+ * The allocation step to use.
+ * Must be greater than 0.
+ * @param set_quote
+ * The set_quote array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quote_increase_
+ extern f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_increase_
+
+/**
+ * Resize the set_quote array to a larger size.
+ *
+ * This will resize making the array larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_number_t_size_unsigned_d).
+ * If already set_quote to the maximum buffer size, then the resize will fail.
+ *
+ * @param amount
+ * A positive number representing how much to increase the size by.
+ * @param set_quote
+ * The set_quote array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_array_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_f_fss_set_quote_increase_by_
+ extern f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_increase_by_
+
+/**
+ * Resize the set_quote array.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quote
+ * The set_quote array to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quote_resize_
+ extern f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_resize_
+
+/**
+ * Resize the set_quote array.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quotes
+ * The set_quotes array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quotes_adjust_
+ extern f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
+#endif // _di_f_fss_set_quotes_adjust_
+
+/**
+ * Resize the set_quote array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decimate the size by.
+ * @param set_quotes
+ * The set_quotes array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if amount is 0.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quotes_decimate_by_
+ extern f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
+#endif // _di_f_fss_set_quotes_decimate_by_
+
+/**
+ * Resize the set_quote array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decrease the size by.
+ * @param set_quotes
+ * The set_quotes array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quotes_decrease_by_
+ extern f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
+#endif // _di_f_fss_set_quotes_decrease_by_
+
+/**
+ * Increase the size of the set_quotes array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param step
+ * The allocation step to use.
+ * Must be greater than 0.
+ * @param set_quotes
+ * The set_quotes array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quotes_increase_
+ extern f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes);
+#endif // _di_f_fss_set_quotes_increase_
+
+/**
+ * Resize the set_quotes array to a larger size.
+ *
+ * This will resize making the array larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param amount
+ * A positive number representing how much to increase the size by.
+ * @param set_quotes
+ * The set_quotes array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_array_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_f_fss_set_quotes_increase_by_
+ extern f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
+#endif // _di_f_fss_set_quotes_increase_by_
+
+/**
+ * Resize the set_quotes array.
+ *
+ * @param length
+ * The new size to use.
+ * @param set_quotes
+ * The set_quotes array to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_set_quotes_resize_
+ extern f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
+#endif // _di_f_fss_set_quotes_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_fss_set_quote_h
--- /dev/null
+#include "../fss.h"
+#include "private-simple_packet.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_fss_simple_packet_identify_
+ f_status_t f_fss_simple_packet_identify(const f_string_static_t buffer, f_fss_simple_packet_range_t * const range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!buffer.used) return F_data_not;
+
+ range->control.start = 1;
+ range->control.stop = 0;
+
+ range->size.start = 1;
+ range->size.stop = 0;
+
+ range->payload.start = 1;
+ range->payload.stop = 0;
+
+ if (buffer.used < F_fss_simple_packet_block_control_size_d) return F_partial;
+
+ range->control.start = 0;
+ range->control.stop = 0;
+
+ if (buffer.used < F_fss_simple_packet_block_header_size_d) return F_partial;
+
+ range->size.start = 1;
+ range->size.stop = F_fss_simple_packet_block_size_size_d;
+
+ // The Payload Block can be NULL and if it is, then all values of the Size Block must be of size F_fss_simple_packet_block_header_size_d.
+ if (buffer.used == F_fss_simple_packet_block_size_size_d) {
+
+ // Big endian.
+ if (buffer.string[0] & F_fss_simple_packet_endian_d) {
+ if (buffer.string[2] || buffer.string[3] || !buffer.string[4]) return F_partial;
+ if (buffer.string[1] < F_fss_simple_packet_block_header_size_d) return F_status_set_error(F_valid_not);
+
+ return (buffer.string[1] == F_fss_simple_packet_block_header_size_d) ? F_none : F_partial;
+ }
+
+ // Little endian.
+ if (!buffer.string[1] || buffer.string[2] || buffer.string[3]) return F_partial;
+ if (buffer.string[4] < F_fss_simple_packet_block_header_size_d) return F_status_set_error(F_valid_not);
+
+ return (buffer.string[4] == F_fss_simple_packet_block_header_size_d) ? F_none : F_partial;
+ }
+
+ range->payload.start = F_fss_simple_packet_block_header_size_d;
+ range->payload.stop = (buffer.used - F_fss_simple_packet_block_header_size_d < F_fss_simple_packet_block_payload_size_d) ? buffer.used - 1 : F_fss_simple_packet_block_payload_size_d - 1;
+
+ return F_none;
+ }
+#endif // _di_f_fss_simple_packet_identify_
+
+#ifndef _di_f_fss_simple_packet_ranges_adjust_
+ f_status_t f_fss_simple_packet_ranges_adjust(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!simple_packet_ranges) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_simple_packet_ranges_adjust(length, simple_packet_ranges);
+ }
+#endif // _di_f_fss_simple_packet_ranges_adjust_
+
+#ifndef _di_f_fss_simple_packet_ranges_decimate_by_
+ f_status_t f_fss_simple_packet_ranges_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!simple_packet_ranges) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (simple_packet_ranges->size > amount) return private_f_fss_simple_packet_ranges_adjust(simple_packet_ranges->size - amount, simple_packet_ranges);
+
+ return private_f_fss_simple_packet_ranges_adjust(0, simple_packet_ranges);
+ }
+#endif // _di_f_fss_simple_packet_ranges_decimate_by_
+
+#ifndef _di_f_fss_simple_packet_ranges_decrease_by_
+ f_status_t f_fss_simple_packet_ranges_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!simple_packet_ranges) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+ if (simple_packet_ranges->size > amount) return private_f_fss_simple_packet_ranges_resize(simple_packet_ranges->size - amount, simple_packet_ranges);
+
+ return private_f_fss_simple_packet_ranges_resize(0, simple_packet_ranges);
+ }
+#endif // _di_f_fss_simple_packet_ranges_decrease_by_
+
+#ifndef _di_f_fss_simple_packet_ranges_increase_
+ f_status_t f_fss_simple_packet_ranges_increase(const f_number_unsigned_t step, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!simple_packet_ranges) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (step && simple_packet_ranges->used + 1 > simple_packet_ranges->size) {
+ f_number_unsigned_t size = simple_packet_ranges->used + step;
+
+ if (size > F_number_t_size_unsigned_d) {
+ if (simple_packet_ranges->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ size = F_number_t_size_unsigned_d;
+ }
+
+ return private_f_fss_simple_packet_ranges_resize(size, simple_packet_ranges);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_simple_packet_ranges_increase_
+
+#ifndef _di_f_fss_simple_packet_ranges_increase_by_
+ f_status_t f_fss_simple_packet_ranges_increase_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!simple_packet_ranges) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) return F_data_not;
+
+ if (simple_packet_ranges->used + amount > simple_packet_ranges->size) {
+ if (simple_packet_ranges->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ return private_f_fss_simple_packet_ranges_resize(simple_packet_ranges->used + amount, simple_packet_ranges);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_fss_simple_packet_ranges_increase_by_
+
+#ifndef _di_f_fss_simple_packet_ranges_resize_
+ f_status_t f_fss_simple_packet_ranges_resize(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!simple_packet_ranges) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_fss_simple_packet_ranges_resize(length, simple_packet_ranges);
+ }
+#endif // _di_f_fss_simple_packet_ranges_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines set data to be used for/by project fss.
+ *
+ * This is auto-included by fss.h and should not need to be explicitly included.
+ */
+#ifndef _F_fss_simple_packet_h
+#define _F_fss_simple_packet_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * FSS-000F (Simple Packet) specific defines.
+ *
+ * F_fss_simple_packet_*_d:
+ * - endian: The endian bit for a 8-bit type, generally a character, that when set to 1 is big endian and when set to 0 is little endian.
+ * - block_control_size: The size of the Control Block in bytes.
+ * - block_size_size: The size of the Size Block in bytes.
+ * - block_header_size: The size of both the Control Block and the Size Block in bytes.
+ * - block_payload_size: The maximum block size of the Payload Block in bytes, which is (2^32)-6.
+ */
+#ifndef _di_f_fss_simple_packet_d_
+ #define F_fss_simple_packet_endian_d 0x80
+
+ #define F_fss_simple_packet_block_control_size_d 1
+ #define F_fss_simple_packet_block_size_size_d 4
+ #define F_fss_simple_packet_block_header_size_d 5
+ #define F_fss_simple_packet_block_payload_size_d 4294967290
+#endif // _di_f_fss_simple_packet_d_
+
+/**
+ * A set of string ranges intending to designate the different ranges for a Simple Packet representing each Block.
+ *
+ * Properties:
+ * - control: The Control Block, which is 1 byte long.
+ * - size: The Size Block, which is 4 bytes long.
+ * - payload: The Payload Block, which is inclusively between 0 and (2^32)-6 bytes long.
+ */
+#ifndef _di_f_fss_simple_packet_range_t_
+ typedef struct {
+ f_string_range_t control;
+ f_string_range_t size;
+ f_string_range_t payload;
+ } f_fss_simple_packet_range_t;
+
+ #define f_fss_simple_packet_range_t_initialize { \
+ f_string_range_t_initialize, \
+ f_string_range_t_initialize, \
+ f_string_range_t_initialize, \
+ }
+
+ #define macro_f_fss_simple_packet_range_t_initialize_1(control, size, payload) { \
+ control, \
+ size, \
+ payload, \
+ }
+#endif // _di_f_fss_simple_packet_range_t_
+
+/**
+ * This holds an array of f_fss_simple_packet_range_t.
+ *
+ * Properties:
+ * - array: An array of f_fss_simple_packet_range_t.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_t_
+ typedef struct {
+ f_fss_simple_packet_range_t *array;
+
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_fss_simple_packet_ranges_t;
+
+ #define f_fss_simple_packet_ranges_t_initialize { 0, 0, 0 }
+
+ #define macro_f_fss_simple_packet_ranges_t_initialize_1(array, size, used) { array, size, used }
+ #define macro_f_fss_simple_packet_ranges_t_initialize_2(array, length) { array, length, length }
+
+ #define macro_f_fss_simple_packet_ranges_t_clear(simple_packet_ranges) macro_f_memory_structure_t_clear(simple_packet_range.objects)
+
+ #define macro_f_fss_simple_packet_ranges_t_resize(status, simple_packet_ranges, length) status = f_fss_simple_packet_ranges_resize(length, &simple_packet_ranges);
+ #define macro_f_fss_simple_packet_ranges_t_adjust(status, simple_packet_ranges, length) status = f_fss_simple_packet_ranges_adjust(length, &simple_packet_ranges);
+
+ #define macro_f_fss_simple_packet_ranges_t_delete_simple(simple_packet_ranges) f_fss_simple_packet_ranges_resize(0, &simple_packet_ranges);
+ #define macro_f_fss_simple_packet_ranges_t_destroy_simple(simple_packet_ranges) f_fss_simple_packet_ranges_adjust(0, &simple_packet_ranges);
+
+ #define macro_f_fss_simple_packet_ranges_t_increase(status, step, simple_packet_ranges) status = f_fss_simple_packet_ranges_increase(step, &simple_packet_ranges);
+ #define macro_f_fss_simple_packet_ranges_t_increase_by(status, simple_packet_ranges, amount) status = f_fss_simple_packet_ranges_increase_by(amount, &simple_packet_ranges);
+ #define macro_f_fss_simple_packet_ranges_t_decrease_by(status, simple_packet_ranges, amount) status = f_fss_simple_packet_ranges_decrease_by(amount, &simple_packet_ranges);
+ #define macro_f_fss_simple_packet_ranges_t_decimate_by(status, simple_packet_ranges, amount) status = f_fss_simple_packet_ranges_decimate_by(amount, &simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_t_
+
+/**
+ * Identify the ranges representing the different parts of the FSS-000F (Simple Packet).
+ *
+ * @param buffer
+ * The string buffer to identify the packet ranges of.
+ * This buffer is considered binary data and so any NULL found within is treated as a valid part of the buffer.
+ * @param range
+ * The set of blocks, each representing a range within the buffer.
+ * If the buffer is too small (including when F_data_not is returned), then the ranges are all set to the out of range values as appropriate.
+ *
+ * @return
+ * F_none on success (The end of the Payload Block is assumed to be the remainder of the buffer or F_fss_simple_packet_block_payload_size_d, whichever is smaller).
+ * F_partial on success but not all blocks are identified.
+ * F_data_not if buffer.used is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_valid_not (with error bit) if the data is invalid, which generally only happens when the value of the Size block is less than 5 (and when not returning F_partial).
+ */
+#ifndef _di_f_fss_simple_packet_identify_
+ extern f_status_t f_fss_simple_packet_identify(const f_string_static_t buffer, f_fss_simple_packet_range_t * const range);
+#endif // _di_f_fss_simple_packet_identify_
+
+/**
+ * Resize the simple_packet_range array.
+ *
+ * @param length
+ * The new size to use.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_adjust_
+ extern f_status_t f_fss_simple_packet_ranges_adjust(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_adjust_
+
+/**
+ * Resize the simple_packet_range array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decimate the size by.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_decimate_by_
+ extern f_status_t f_fss_simple_packet_ranges_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t * const simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_decimate_by_
+
+/**
+ * Resize the simple_packet_range array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decrease the size by.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges array to resize.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_decrease_by_
+ extern f_status_t f_fss_simple_packet_ranges_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t * const simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_decrease_by_
+
+/**
+ * Increase the size of the simple_packet_ranges array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param step
+ * The allocation step to use.
+ * Must be greater than 0.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_increase_
+ extern f_status_t f_fss_simple_packet_ranges_increase(const f_number_unsigned_t step, f_fss_simple_packet_ranges_t * const simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_increase_
+
+/**
+ * Resize the simple_packet_ranges array to a larger size.
+ *
+ * This will resize making the array larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param amount
+ * A positive number representing how much to increase the size by.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_array_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_increase_by_
+ extern f_status_t f_fss_simple_packet_ranges_increase_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t * const simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_increase_by_
+
+/**
+ * Resize the simple_packet_ranges array.
+ *
+ * @param length
+ * The new size to use.
+ * @param simple_packet_ranges
+ * The simple_packet_ranges array to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_fss_simple_packet_ranges_resize_
+ extern f_status_t f_fss_simple_packet_ranges_resize(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t * const simple_packet_ranges);
+#endif // _di_f_fss_simple_packet_ranges_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_fss_simple_packet_h
extern "C" {
#endif
-#if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
- f_status_t private_f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < items->size; ++i) {
-
- status = f_string_ranges_adjust(0, &items->array[i].content);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_adjust(items->size, length, sizeof(f_fss_item_t), (void **) & items->array);
-
- if (F_status_is_error_not(status)) {
- items->size = length;
-
- if (items->used > items->size) {
- items->used = length;
- }
- }
-
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
-
-#if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
- f_status_t private_f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < items->size; ++i) {
-
- status = f_string_ranges_resize(0, &items->array[i].content);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_resize(items->size, length, sizeof(f_fss_item_t), (void **) & items->array);
- if (F_status_is_error(status)) return status;
-
- items->size = length;
-
- if (items->used > items->size) {
- items->used = length;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
-
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
- f_status_t private_f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) {
-
- f_status_t status = F_none;
-
- status = f_string_ranges_adjust(length, &named->objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_adjust(length, &named->contents);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8ss_adjust(length, &named->quotess);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
- f_status_t private_f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) {
-
- f_status_t status = F_none;
-
- status = f_string_ranges_resize(length, &named->objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_resize(length, &named->contents);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8ss_resize(length, &named->quotess);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
- f_status_t private_f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < nameds->size; ++i) {
-
- status = private_f_fss_named_adjust(0, &nameds->array[i]);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_adjust(nameds->size, length, sizeof(f_fss_named_t), (void **) & nameds->array);
-
- if (F_status_is_error_not(status)) {
- nameds->size = length;
-
- if (nameds->used > nameds->size) {
- nameds->used = length;
- }
- }
-
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
- f_status_t private_f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < nameds->size; ++i) {
-
- status = private_f_fss_named_resize(0, &nameds->array[i]);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_resize(nameds->size, length, sizeof(f_fss_named_t), (void **) & nameds->array);
- if (F_status_is_error(status)) return status;
-
- nameds->size = length;
-
- if (nameds->used > nameds->size) {
- nameds->used = length;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-
-#if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
- f_status_t private_f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < nest->size; ++i) {
-
- status = private_f_fss_items_adjust(0, &nest->depth[i]);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_adjust(nest->size, length, sizeof(f_fss_items_t), (void **) & nest->depth);
-
- if (F_status_is_error_not(status)) {
- nest->size = length;
-
- if (nest->used > nest->size) {
- nest->used = length;
- }
- }
-
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-
-#if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
- f_status_t private_f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < nest->size; ++i) {
-
- status = private_f_fss_items_resize(0, &nest->depth[i]);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_resize(nest->size, length, sizeof(f_fss_items_t), (void **) & nest->depth);
- if (F_status_is_error(status)) return status;
-
- nest->size = length;
-
- if (nest->used > nest->size) {
- nest->used = length;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
-
-#if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
- f_status_t private_f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t *nests) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < nests->size; ++i) {
-
- status = private_f_fss_nest_adjust(0, &nests->array[i]);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_adjust(nests->size, length, sizeof(f_fss_nest_t), (void **) & nests->array);
-
- if (F_status_is_error_not(status)) {
- nests->size = length;
-
- if (nests->used > nests->size) {
- nests->used = length;
- }
- }
-
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
-
-#if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
- f_status_t private_f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < nests->size; ++i) {
-
- status = private_f_fss_nest_resize(0, &nests->array[i]);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_resize(nests->size, length, sizeof(f_fss_nest_t), (void **) & nests->array);
- if (F_status_is_error(status)) return status;
-
- nests->size = length;
-
- if (nests->used > nests->size) {
- nests->used = length;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
-
-#if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
- f_status_t private_f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) {
-
- f_status_t status = F_none;
-
- status = f_string_ranges_adjust(length, &set->objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_adjust(length, &set->contents);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
-
-#if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
- f_status_t private_f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t *set) {
-
- f_status_t status = F_none;
-
- status = f_string_ranges_resize(length, &set->objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_resize(length, &set->contents);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
-
-#if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
- f_status_t private_f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
-
- f_status_t status = F_none;
-
- status = f_string_ranges_adjust(length, &set_quote->objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_adjust(length, &set_quote->contents);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8s_adjust(length, &set_quote->objects_quote);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8ss_adjust(length, &set_quote->contents_quote);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
-
-#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
- f_status_t private_f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
-
- f_status_t status = F_none;
-
- status = f_string_ranges_resize(length, &set_quote->objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_resize(length, &set_quote->contents);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8s_resize(length, &set_quote->objects_quote);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8ss_resize(length, &set_quote->contents_quote);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
-
-#if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
- f_status_t private_f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < set_quotes->size; ++i) {
-
- status = f_string_ranges_adjust(0, &set_quotes->array[i].objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_adjust(0, &set_quotes->array[i].contents);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8s_adjust(0, &set_quotes->array[i].objects_quote);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8ss_adjust(0, &set_quotes->array[i].contents_quote);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_adjust(set_quotes->size, length, sizeof(f_fss_set_quote_t), (void **) & set_quotes->array);
-
- if (F_status_is_error_not(status)) {
- set_quotes->size = length;
-
- if (set_quotes->used > set_quotes->size) {
- set_quotes->used = length;
- }
- }
-
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
-
-#if !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
- f_status_t private_f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < set_quotes->size; ++i) {
-
- status = f_string_ranges_resize(0, &set_quotes->array[i].objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_resize(0, &set_quotes->array[i].contents);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8s_resize(0, &set_quotes->array[i].objects_quote);
- if (F_status_is_error(status)) return status;
-
- status = f_uint8ss_resize(0, &set_quotes->array[i].contents_quote);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_resize(set_quotes->size, length, sizeof(f_fss_set_quote_t), (void **) & set_quotes->array);
- if (F_status_is_error(status)) return status;
-
- set_quotes->size = length;
-
- if (set_quotes->used > set_quotes->size) {
- set_quotes->used = length;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
-
-#if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
- f_status_t private_f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < sets->size; ++i) {
-
- status = f_string_ranges_adjust(0, &sets->array[i].objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_adjust(0, &sets->array[i].contents);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_adjust(sets->size, length, sizeof(f_fss_set_t), (void **) & sets->array);
-
- if (F_status_is_error_not(status)) {
- sets->size = length;
-
- if (sets->used > sets->size) {
- sets->used = length;
- }
- }
-
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
-
-#if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
- f_status_t private_f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < sets->size; ++i) {
-
- status = f_string_ranges_resize(0, &sets->array[i].objects);
- if (F_status_is_error(status)) return status;
-
- status = f_string_rangess_resize(0, &sets->array[i].contents);
- if (F_status_is_error(status)) return status;
- } // for
-
- status = f_memory_resize(sets->size, length, sizeof(f_fss_set_t), (void **) & sets->array);
- if (F_status_is_error(status)) return status;
-
- sets->size = length;
-
- if (sets->used > sets->size) {
- sets->used = length;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
-
#ifdef __cplusplus
} // extern "C"
#endif
extern "C" {
#endif
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param items
- * The items to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_item_t_adjust().
- * Errors (with error bit) from: f_memory_adjust().
- *
- * @see macro_f_fss_item_t_adjust()
- *
- * @see f_fss_items_adjust()
- * @see f_fss_items_decimate_by()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
- extern f_status_t private_f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param items
- * The items to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_item_t_resize().
- * Errors (with error bit) from: f_memory_resize().
- *
- * @see macro_f_fss_item_t_resize()
- *
- * @see f_fss_items_decrease_by()
- * @see f_fss_items_increase()
- * @see f_fss_items_increase_by()
- * @see f_fss_items_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
- extern f_status_t private_f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param named
- * The named to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_string_ranges_t_adjust().
- * Errors (with error bit) from: macro_f_string_rangess_t_adjust().
- * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
- *
- * @see macro_f_string_ranges_t_adjust()
- * @see macro_f_string_rangess_t_adjust()
- * @see macro_f_uint8ss_t_adjust()
- *
- * @see f_fss_nameds_adjust()
- * @see f_fss_nameds_decimate_by()
- */
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
- extern f_status_t private_f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param named
- * The named to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_string_ranges_t_resize().
- * Errors (with error bit) from: macro_f_string_rangess_t_resize().
- * Errors (with error bit) from: macro_f_uint8ss_t_resize().
- *
- * @see macro_f_string_ranges_t_resize()
- * @see macro_f_string_rangess_t_resize()
- * @see macro_f_uint8ss_t_resize()
- *
- * @see f_fss_nameds_decrease_by()
- * @see f_fss_nameds_incease()
- * @see f_fss_nameds_incease_by()
- * @see f_fss_nameds_resize()
- */
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
- extern f_status_t private_f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param nameds
- * The nameds to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_fss_named_adjust().
- *
- * @see private_f_fss_named_adjust()
- *
- * @see f_fss_nameds_adjust()
- * @see f_fss_nameds_decimate_by()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
- extern f_status_t private_f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param nameds
- * The nameds to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_fss_named_resize().
- *
- * @see private_f_fss_named_resize()
- *
- * @see f_fss_nameds_decrease_by()
- * @see f_fss_nameds_increase()
- * @see f_fss_nameds_increase_by()
- * @see f_fss_nameds_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
- extern f_status_t private_f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param nest
- * The nest to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: macro_f_fss_nest_t_adjust().
- *
- * @see macro_f_fss_nest_t_adjust()
- *
- * @see f_fss_nest_adjust()
- * @see f_fss_nest_decimate_by()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
- extern f_status_t private_f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param nest
- * The nest to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: macro_f_fss_nest_t_resize().
- *
- * @see macro_f_fss_nest_t_resize()
- *
- * @see f_fss_nest_decrease_by()
- * @see f_fss_nest_increase()
- * @see f_fss_nest_increase_by()
- * @see f_fss_nest_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
- extern f_status_t private_f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param nests
- * The nests to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: macro_f_fss_nest_t_adjust().
- *
- * @see macro_f_fss_nest_t_adjust()
- *
- * @see f_fss_nests_adjust()
- * @see f_fss_nests_decimate_by()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
- extern f_status_t private_f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t * const nests) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param nests
- * The nests to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: macro_f_fss_nest_t_resize().
- *
- * @see macro_f_fss_nest_t_resize()
- *
- * @see f_fss_nests_decrease_by()
- * @see f_fss_nests_increase()
- * @see f_fss_nests_increase_by()
- * @see f_fss_nests_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
- extern f_status_t private_f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param set
- * The set to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_adjust().
- * Errors (with error bit) from: macro_f_fss_objects_t_adjust().
- *
- * @see macro_f_fss_contents_t_adjust()
- * @see macro_f_fss_objects_t_adjust()
- *
- * @see f_fss_set_adjust()
- * @see f_fss_set_decimate_by()
- */
-#if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
- extern f_status_t private_f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param set
- * The set to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_resize().
- * Errors (with error bit) from: macro_f_fss_objects_t_resize().
- *
- * @see macro_f_fss_contents_t_resize()
- * @see macro_f_fss_objects_t_resize()
- *
- * @see f_fss_set_decrease_by()
- * @see f_fss_set_increase()
- * @see f_fss_set_increase_by()
- * @see f_fss_set_resize()
- */
-#if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
- extern f_status_t private_f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t * const set) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param set_quote
- * The set_quote to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_adjust().
- * Errors (with error bit) from: macro_f_fss_objects_t_adjust().
- * Errors (with error bit) from: macro_f_uint8s_t_adjust().
- * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
- *
- * @see macro_f_fss_contents_t_adjust()
- * @see macro_f_fss_objects_t_adjust()
- * @see macro_f_uint8s_t_adjust()
- * @see macro_f_uint8ss_t_adjust()
- *
- * @see f_fss_set_quote_adjust()
- * @see f_fss_set_quote_decimate_by()
- */
-#if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
- extern f_status_t private_f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param set_quote
- * The set_quote to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_resize().
- * Errors (with error bit) from: macro_f_fss_objects_t_resize().
- * Errors (with error bit) from: macro_f_uint8s_t_resize().
- * Errors (with error bit) from: macro_f_uint8ss_t_resize().
- *
- * @see macro_f_fss_contents_t_resize()
- * @see macro_f_fss_objects_t_resize()
- * @see macro_f_uint8s_t_resize()
- * @see macro_f_uint8ss_t_resize()
- *
- * @see f_fss_set_quote_decrease_by()
- * @see f_fss_set_quote_increase()
- * @see f_fss_set_quote_increase_by()
- * @see f_fss_set_quote_resize()
- */
-#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
- extern f_status_t private_f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param set_quotes
- * The set_quotes to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_adjust().
- * Errors (with error bit) from: macro_f_fss_objects_t_adjust().
- * Errors (with error bit) from: macro_f_uint8s_t_adjust().
- * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
- * Errors (with error bit) from: f_memory_adjust().
- *
- * @see macro_f_fss_contents_t_adjust()
- * @see macro_f_fss_objects_t_adjust()
- * @see macro_f_uint8s_t_adjust()
- * @see macro_f_uint8ss_t_adjust()
- *
- * @see f_fss_set_quotes_adjust()
- * @see f_fss_set_quotes_decimate_by()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
- extern f_status_t private_f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param set_quotes
- * The set_quotes to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_resize().
- * Errors (with error bit) from: macro_f_fss_objects_t_resize().
- * Errors (with error bit) from: macro_f_uint8s_t_resize().
- * Errors (with error bit) from: macro_f_uint8ss_t_resize().
- * Errors (with error bit) from: f_memory_resize().
- *
- * @see macro_f_fss_contents_t_resize()
- * @see macro_f_fss_objects_t_resize()
- * @see macro_f_uint8s_t_resize()
- * @see macro_f_uint8ss_t_resize()
- *
- * @see f_fss_set_quotes_decrease_by()
- * @see f_fss_set_quotes_increase()
- * @see f_fss_set_quotes_increase_by()
- * @see f_fss_set_quotes_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
- extern f_status_t private_f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param sets
- * The sets to adjust.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_adjust().
- * Errors (with error bit) from: macro_f_fss_objects_t_adjust().
- * Errors (with error bit) from: f_memory_adjust().
- *
- * @see macro_f_fss_contents_t_adjust()
- * @see macro_f_fss_objects_t_adjust()
- *
- * @see f_fss_sets_adjust()
- * @see f_fss_sets_decimate_by()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
- extern f_status_t private_f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param sets
- * The sets to resize.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: macro_f_fss_contents_t_resize().
- * Errors (with error bit) from: macro_f_fss_objects_t_resize().
- * Errors (with error bit) from: f_memory_resize().
- *
- * @see macro_f_fss_contents_t_resize()
- * @see macro_f_fss_objects_t_resize()
- *
- * @see f_fss_sets_decrease_by()
- * @see f_fss_sets_increase()
- * @see f_fss_sets_increase_by()
- * @see f_fss_sets_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
- extern f_status_t private_f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
-
#ifdef __cplusplus
} // extern "C"
#endif
build_libraries -lc
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf
-build_sources_library fss.c private-fss.c fss/common.c fss/named.c fss/nest.c fss/set.c
+build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
+build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
-build_sources_headers fss.h fss/comment.h fss/common.h fss/delimit.h fss/named.h fss/nest.h fss/quote.h fss/set.h
+build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_script yes
build_shared yes
build_libraries -lc
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf
-build_sources_library fss.c private-fss.c fss/common.c fss/named.c fss/nest.c fss/set.c ../../tests/unit/c/mock-fss.c
+build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c ../../tests/unit/c/mock-fss.c
+build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
-build_sources_headers fss.h fss/comment.h fss/common.h fss/delimit.h fss/named.h fss/nest.h fss/quote.h fss/set.h
+build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_script yes
build_shared yes
build_sources_program test-fss-set_quote_adjust.c test-fss-set_quote_decimate_by.c test-fss-set_quote_decrease_by.c test-fss-set_quote_increase.c test-fss-set_quote_increase_by.c test-fss-set_quote_resize.c
build_sources_program test-fss-set_quotes_adjust.c test-fss-set_quotes_decimate_by.c test-fss-set_quotes_decrease_by.c test-fss-set_quotes_increase.c test-fss-set_quotes_increase_by.c test-fss-set_quotes_resize.c
build_sources_program test-fss-sets_adjust.c test-fss-sets_decimate_by.c test-fss-sets_decrease_by.c test-fss-sets_increase.c test-fss-sets_increase_by.c test-fss-sets_resize.c
+build_sources_program test-fss-simple_packet_ranges_adjust.c test-fss-simple_packet_ranges_decimate_by.c test-fss-simple_packet_ranges_decrease_by.c test-fss-simple_packet_ranges_increase.c test-fss-simple_packet_ranges_increase_by.c test-fss-simple_packet_ranges_resize.c
build_sources_program test-fss.c
void test__f_fss_apply_delimit__parameter_checking(void **state) {
- const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ const f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
f_state_t state_data = f_state_t_initialize;
{
void test__f_fss_apply_delimit__returns_data_not(void **state) {
- const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ const f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
f_state_t state_data = f_state_t_initialize;
{
macro_f_string_static_t_initialize_1("\0\0\0testå…¨\0est", 0, 14),
};
- f_fss_delimit_t delimits_0[] = {
- macro_f_fss_delimit_t_initialize_1(tests[0].used + 2),
+ f_number_unsigned_t delimits_0[] = {
+ tests[0].used + 2,
};
- f_fss_delimit_t delimits_1[] = {
- macro_f_fss_delimit_t_initialize_1(1),
+ f_number_unsigned_t delimits_1[] = {
+ 1,
};
- f_fss_delimit_t delimits_2[] = {
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(2),
+ f_number_unsigned_t delimits_2[] = {
+ 1,
+ 2,
};
- f_fss_delimit_t delimits_3[] = {
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(3),
+ f_number_unsigned_t delimits_3[] = {
+ 1,
+ 3,
};
- f_fss_delimit_t delimits_4[] = {
- macro_f_fss_delimit_t_initialize_1(0),
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(3),
+ f_number_unsigned_t delimits_4[] = {
+ 0,
+ 1,
+ 3,
};
- f_fss_delimit_t delimits_5[] = {
- macro_f_fss_delimit_t_initialize_1(0),
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(2),
- macro_f_fss_delimit_t_initialize_1(3),
+ f_number_unsigned_t delimits_5[] = {
+ 0,
+ 1,
+ 2,
+ 3,
};
- f_fss_delimit_t delimits_6[] = {
- macro_f_fss_delimit_t_initialize_1(0),
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(2),
- macro_f_fss_delimit_t_initialize_1(10),
+ f_number_unsigned_t delimits_6[] = {
+ 0,
+ 1,
+ 2,
+ 10,
};
- const f_fss_delimits_t delimitss[] = {
- macro_f_fss_delimits_t_initialize_1(delimits_0, 0, 1),
- macro_f_fss_delimits_t_initialize_1(delimits_1, 0, 1),
- macro_f_fss_delimits_t_initialize_1(delimits_2, 0, 2),
- macro_f_fss_delimits_t_initialize_1(delimits_3, 0, 2),
- macro_f_fss_delimits_t_initialize_1(delimits_4, 0, 3),
- macro_f_fss_delimits_t_initialize_1(delimits_5, 0, 4),
- macro_f_fss_delimits_t_initialize_1(delimits_6, 0, 4),
+ const f_number_unsigneds_t delimitss[] = {
+ macro_f_number_unsigneds_t_initialize_1(delimits_0, 0, 1),
+ macro_f_number_unsigneds_t_initialize_1(delimits_1, 0, 1),
+ macro_f_number_unsigneds_t_initialize_1(delimits_2, 0, 2),
+ macro_f_number_unsigneds_t_initialize_1(delimits_3, 0, 2),
+ macro_f_number_unsigneds_t_initialize_1(delimits_4, 0, 3),
+ macro_f_number_unsigneds_t_initialize_1(delimits_5, 0, 4),
+ macro_f_number_unsigneds_t_initialize_1(delimits_6, 0, 4),
};
for (uint8_t i = 0; i < 7; ++i) {
void test__f_fss_apply_delimit_range__parameter_checking(void **state) {
- const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ const f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
f_state_t state_data = f_state_t_initialize;
const f_string_range_t range = f_string_range_t_initialize;
void test__f_fss_apply_delimit_range__returns_data_not(void **state) {
f_string_static_t test = macro_f_string_static_t_initialize_1("test", 0, 4);
- const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ const f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
f_state_t state_data = f_state_t_initialize;
{
macro_f_string_static_t_initialize_1("\0\0\0testå…¨\0est", 0, 14),
};
- f_fss_delimit_t delimits_0[] = {
- macro_f_fss_delimit_t_initialize_1(tests[0].used + 2),
+ f_number_unsigned_t delimits_0[] = {
+ tests[0].used + 2,
};
- f_fss_delimit_t delimits_1[] = {
- macro_f_fss_delimit_t_initialize_1(1),
+ f_number_unsigned_t delimits_1[] = {
+ 1,
};
- f_fss_delimit_t delimits_2[] = {
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(2),
+ f_number_unsigned_t delimits_2[] = {
+ 1,
+ 2,
};
- f_fss_delimit_t delimits_3[] = {
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(3),
+ f_number_unsigned_t delimits_3[] = {
+ 1,
+ 3,
};
- f_fss_delimit_t delimits_4[] = {
- macro_f_fss_delimit_t_initialize_1(0),
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(3),
+ f_number_unsigned_t delimits_4[] = {
+ 0,
+ 1,
+ 3,
};
- f_fss_delimit_t delimits_5[] = {
- macro_f_fss_delimit_t_initialize_1(0),
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(2),
- macro_f_fss_delimit_t_initialize_1(3),
+ f_number_unsigned_t delimits_5[] = {
+ 0,
+ 1,
+ 2,
+ 3,
};
- f_fss_delimit_t delimits_6[] = {
- macro_f_fss_delimit_t_initialize_1(0),
- macro_f_fss_delimit_t_initialize_1(1),
- macro_f_fss_delimit_t_initialize_1(2),
- macro_f_fss_delimit_t_initialize_1(10),
+ f_number_unsigned_t delimits_6[] = {
+ 0,
+ 1,
+ 2,
+ 10,
};
- const f_fss_delimits_t delimitss[] = {
- macro_f_fss_delimits_t_initialize_1(delimits_0, 0, 1),
- macro_f_fss_delimits_t_initialize_1(delimits_1, 0, 1),
- macro_f_fss_delimits_t_initialize_1(delimits_2, 0, 2),
- macro_f_fss_delimits_t_initialize_1(delimits_3, 0, 2),
- macro_f_fss_delimits_t_initialize_1(delimits_4, 0, 3),
- macro_f_fss_delimits_t_initialize_1(delimits_5, 0, 4),
- macro_f_fss_delimits_t_initialize_1(delimits_6, 0, 4),
+ const f_number_unsigneds_t delimitss[] = {
+ macro_f_number_unsigneds_t_initialize_1(delimits_0, 0, 1),
+ macro_f_number_unsigneds_t_initialize_1(delimits_1, 0, 1),
+ macro_f_number_unsigneds_t_initialize_1(delimits_2, 0, 2),
+ macro_f_number_unsigneds_t_initialize_1(delimits_3, 0, 2),
+ macro_f_number_unsigneds_t_initialize_1(delimits_4, 0, 3),
+ macro_f_number_unsigneds_t_initialize_1(delimits_5, 0, 4),
+ macro_f_number_unsigneds_t_initialize_1(delimits_6, 0, 4),
};
for (uint8_t i = 0; i < 7; ++i) {
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-simple_packet_ranges_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_ranges_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_simple_packet_ranges_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__simple_packet_range_adjust
+#define _TEST__F_fss__simple_packet_range_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_ranges_adjust()
+ */
+extern void test__f_fss_simple_packet_ranges_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_ranges_adjust()
+ */
+extern void test__f_fss_simple_packet_ranges_adjust__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_range_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-simple_packet_ranges_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_ranges_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_simple_packet_ranges_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_simple_packet_ranges_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__simple_packet_range_decimate_by
+#define _TEST__F_fss__simple_packet_range_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_ranges_decimate_by()
+ */
+extern void test__f_fss_simple_packet_ranges_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_simple_packet_ranges_decimate_by()
+ */
+extern void test__f_fss_simple_packet_ranges_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_ranges_decimate_by()
+ */
+extern void test__f_fss_simple_packet_ranges_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_range_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-simple_packet_ranges_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_ranges_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_simple_packet_ranges_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_simple_packet_ranges_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__simple_packet_range_decrease_by
+#define _TEST__F_fss__simple_packet_range_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_ranges_decrease_by()
+ */
+extern void test__f_fss_simple_packet_ranges_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_simple_packet_ranges_decrease_by()
+ */
+extern void test__f_fss_simple_packet_ranges_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_ranges_decrease_by()
+ */
+extern void test__f_fss_simple_packet_ranges_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_range_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-simple_packet_ranges_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_ranges_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_simple_packet_ranges_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_increase(length, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_simple_packet_ranges_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_simple_packet_ranges_increase(1, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length + 1);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote increase in the fss project.
+ */
+#ifndef _TEST__F_fss__simple_packet_range_increase
+#define _TEST__F_fss__simple_packet_range_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_ranges_increase()
+ */
+extern void test__f_fss_simple_packet_ranges_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_simple_packet_ranges_increase()
+ */
+extern void test__f_fss_simple_packet_ranges_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_ranges_increase()
+ */
+extern void test__f_fss_simple_packet_ranges_increase__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_range_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-simple_packet_ranges_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_ranges_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_simple_packet_ranges_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_simple_packet_ranges_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_simple_packet_ranges_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__simple_packet_range_increase_by
+#define _TEST__F_fss__simple_packet_range_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_ranges_increase_by()
+ */
+extern void test__f_fss_simple_packet_ranges_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_simple_packet_ranges_increase_by()
+ */
+extern void test__f_fss_simple_packet_ranges_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_ranges_increase_by()
+ */
+extern void test__f_fss_simple_packet_ranges_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_range_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-simple_packet_ranges_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_ranges_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_simple_packet_ranges_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
+
+ {
+ const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote resize in the fss project.
+ */
+#ifndef _TEST__F_fss__simple_packet_range_resize
+#define _TEST__F_fss__simple_packet_range_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_ranges_resize()
+ */
+extern void test__f_fss_simple_packet_ranges_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_ranges_resize()
+ */
+extern void test__f_fss_simple_packet_ranges_resize__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_range_resize
cmocka_unit_test(test__f_fss_sets_increase__returns_data_not),
cmocka_unit_test(test__f_fss_sets_increase_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_increase_by__returns_data_not),
+
#ifndef _di_level_0_parameter_checking_
cmocka_unit_test(test__f_fss_apply_delimit__parameter_checking),
cmocka_unit_test(test__f_fss_apply_delimit_range__parameter_checking),
cmocka_unit_test(test__f_fss_sets_increase__parameter_checking),
cmocka_unit_test(test__f_fss_sets_increase_by__parameter_checking),
cmocka_unit_test(test__f_fss_sets_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_simple_packet_ranges_resize__parameter_checking),
#endif // _di_level_0_parameter_checking_
};
#include "test-fss-sets_increase.h"
#include "test-fss-sets_increase_by.h"
#include "test-fss-sets_resize.h"
+#include "test-fss-simple_packet_ranges_adjust.h"
+#include "test-fss-simple_packet_ranges_decimate_by.h"
+#include "test-fss-simple_packet_ranges_decrease_by.h"
+#include "test-fss-simple_packet_ranges_increase.h"
+#include "test-fss-simple_packet_ranges_increase_by.h"
+#include "test-fss-simple_packet_ranges_resize.h"
#include "test-fss-skip_past_delimit.h"
#include "test-fss-skip_past_space.h"
F_parameter_not,
F_parent,
F_parent_not,
+ F_partial,
+ F_partial_not,
F_payload,
F_payload_not,
F_pipe,
const f_string_static_t f_status_parameter_not_s = macro_f_string_static_t_initialize_1(F_status_parameter_not_s, 0, F_status_parameter_not_s_length);
const f_string_static_t f_status_parent_s = macro_f_string_static_t_initialize_1(F_status_parent_s, 0, F_status_parent_s_length);
const f_string_static_t f_status_parent_not_s = macro_f_string_static_t_initialize_1(F_status_parent_not_s, 0, F_status_parent_not_s_length);
+ const f_string_static_t f_status_partial_s = macro_f_string_static_t_initialize_1(F_status_partial_s, 0, F_status_partial_s_length);
+ const f_string_static_t f_status_partial_not_s = macro_f_string_static_t_initialize_1(F_status_partial_not_s, 0, F_status_partial_not_s_length);
const f_string_static_t f_status_payload_s = macro_f_string_static_t_initialize_1(F_status_payload_s, 0, F_status_payload_s_length);
const f_string_static_t f_status_payload_not_s = macro_f_string_static_t_initialize_1(F_status_payload_not_s, 0, F_status_payload_not_s_length);
const f_string_static_t f_status_pipe_s = macro_f_string_static_t_initialize_1(F_status_pipe_s, 0, F_status_pipe_s_length);
break;
+ case F_partial:
+ *name = f_status_partial_s;
+
+ break;
+
+ case F_partial_not:
+ *name = f_status_partial_not_s;
+
+ break;
+
case F_payload:
*name = f_status_payload_s;
#define F_status_parameter_not_s "F_parameter_not"
#define F_status_parent_s "F_parent"
#define F_status_parent_not_s "F_parent_not"
+ #define F_status_partial_s "F_partial"
+ #define F_status_partial_not_s "F_partial_not"
#define F_status_payload_s "F_payload"
#define F_status_payload_not_s "F_payload_not"
#define F_status_pipe_s "F_pipe"
#define F_status_parameter_not_s_length 15
#define F_status_parent_s_length 8
#define F_status_parent_not_s_length 12
+ #define F_status_partial_s_length 9
+ #define F_status_partial_not_s_length 13
#define F_status_payload_s_length 9
#define F_status_payload_not_s_length 13
#define F_status_pipe_s_length 6
extern const f_string_static_t f_status_parameter_not_s;
extern const f_string_static_t f_status_parent_s;
extern const f_string_static_t f_status_parent_not_s;
+ extern const f_string_static_t f_status_partial_s;
+ extern const f_string_static_t f_status_partial_not_s;
extern const f_string_static_t f_status_payload_s;
extern const f_string_static_t f_status_payload_not_s;
extern const f_string_static_t f_status_previous_s;
F_parameter_not,
F_parent,
F_parent_not,
+ F_partial,
+ F_partial_not,
F_payload,
F_payload_not,
F_pipe,
f_status_parameter_not_s,
f_status_parent_s,
f_status_parent_not_s,
+ f_status_partial_s,
+ f_status_partial_not_s,
f_status_payload_s,
f_status_payload_not_s,
f_status_pipe_s,
f_status_status_code_last_s,
};
- for (uint16_t i = 0; i < 617; ++i) {
+ for (uint16_t i = 0; i < 619; ++i) {
f_string_static_t result = f_string_static_t_initialize;
#endif
#ifndef _di_fl_fss_basic_content_read_
- void fl_fss_basic_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_basic_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
#endif // _di_fl_fss_basic_content_write_
#ifndef _di_fl_fss_basic_object_read_
- void fl_fss_basic_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_basic_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, uint8_t * const quote, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_content_read_
- extern void fl_fss_basic_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_basic_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_basic_content_read_
/**
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_object_read_
- extern void fl_fss_basic_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_basic_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, uint8_t * const quote, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_basic_object_read_
/**
#endif
#ifndef _di_fl_fss_basic_list_content_read_
- void fl_fss_basic_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fl_fss_basic_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_number_unsigneds_t * const delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
#endif // _di_fl_fss_basic_list_content_write_
#ifndef _di_fl_fss_basic_list_object_read_
- void fl_fss_basic_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_basic_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_list_content_read_
- extern void fl_fss_basic_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fl_fss_basic_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_number_unsigneds_t * const delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fl_fss_basic_list_content_read_
/**
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_list_object_read_
- extern void fl_fss_basic_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_basic_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_basic_list_object_read_
/**
#endif
#ifndef _di_fl_fss_embedded_list_content_read_
- void fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const found, f_number_unsigneds_t * const delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
state->status = f_number_unsigneds_increase(state->step_small, &positions_start);
if (F_status_is_error(state->status)) return;
- f_fss_objects_t objects = f_fss_objects_t_initialize;
+ f_string_ranges_t objects = f_string_ranges_t_initialize;
state->status = f_string_ranges_increase(state->step_small, &objects);
#endif // _di_fl_fss_embedded_list_content_write_
#ifndef _di_fl_fss_embedded_list_object_read_
- void fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_embedded_list_content_read_
- extern void fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const found, f_number_unsigneds_t * const delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fl_fss_embedded_list_content_read_
/**
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_embedded_list_object_read_
- extern void fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_embedded_list_object_read_
/**
#endif
#ifndef _di_fl_fss_extended_content_read_
- void fl_fss_extended_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_uint8s_t * const quotes, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_extended_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_uint8s_t * const quotes, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
#endif // _di_fl_fss_extended_content_write_
#ifndef _di_fl_fss_extended_object_read_
- void fl_fss_extended_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_extended_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, uint8_t * const quote, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
* @see fl_fss_extended_content_read()
*/
#ifndef _di_fl_fss_extended_content_read_
- extern void fl_fss_extended_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_uint8s_t * const quotes, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_extended_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_uint8s_t * const quotes, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_extended_content_read_
/**
* @see fl_fss_extended_content_read()
*/
#ifndef _di_fl_fss_extended_object_read_
- extern void fl_fss_extended_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_extended_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, uint8_t * const quote, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_extended_object_read_
/**
#endif
#ifndef _di_fl_fss_extended_list_content_read_
- void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_number_unsigneds_t * const delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
#endif // _di_fl_fss_extended_list_content_write_
#ifndef _di_fl_fss_extended_list_object_read_
- void fl_fss_extended_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void fl_fss_extended_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_extended_list_content_read_
- extern void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const found, f_number_unsigneds_t * const delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fl_fss_extended_list_content_read_
/**
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_extended_list_object_read_
- extern void fl_fss_extended_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits, f_state_t * const state);
+ extern void fl_fss_extended_list_object_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_range_t * const found, f_number_unsigneds_t * const delimits, f_state_t * const state);
#endif // _di_fl_fss_extended_list_object_read_
/**
#endif // !defined(_di_fl_fss_basic_list_object_write_) || !defined(_di_fl_fss_extended_list_object_write_)
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
- void private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits, f_state_t * const state) {
+ void private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_string_range_t * const range, f_string_range_t * const found, uint8_t * const quote, f_number_unsigneds_t * const delimits, f_state_t * const state) {
f_fss_skip_past_space(buffer, range, state);
if (F_status_is_error(state->status)) return;
* @see fl_fss_extended_content_read()
*/
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
- extern void private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits, f_state_t * const state) F_attribute_visibility_internal_d;
+ extern void private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_string_range_t * const range, f_string_range_t * const found, uint8_t * const quote, f_number_unsigneds_t * const delimits, f_state_t * const state) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
/**
return F_none;
}
+ if (f_compare_dynamic(name, f_status_partial_s) == F_equal_to) {
+ *code = F_partial;
+
+ return F_none;
+ }
+
+ if (f_compare_dynamic(name, f_status_partial_not_s) == F_equal_to) {
+ *code = F_partial_not;
+
+ return F_none;
+ }
+
if (f_compare_dynamic(name, f_status_payload_s) == F_equal_to) {
*code = F_payload;
F_parameter_not,
F_parent,
F_parent_not,
+ F_partial,
+ F_partial_not,
F_payload,
F_payload_not,
F_pipe,
f_status_parameter_not_s,
f_status_parent_s,
f_status_parent_not_s,
+ f_status_partial_s,
+ f_status_partial_not_s,
f_status_payload_s,
f_status_payload_not_s,
f_status_pipe_s,
f_status_status_code_last_s,
};
- for (uint16_t i = 0; i < 617; ++i) {
+ for (uint16_t i = 0; i < 619; ++i) {
f_status_t result = F_none;
#endif // _di_fll_fss_identify_
#ifndef _di_fll_fss_snatch_
- f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]) {
+ f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_
#ifndef _di_fll_fss_snatch_apart_
- f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_fss_content_t *content = 0;
+ f_string_ranges_t *content = 0;
f_number_unsigned_t i = 0;
f_number_unsigned_t j = 0;
#endif // _di_fll_fss_snatch_apart_
#ifndef _di_fll_fss_snatch_map_
- f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_map_
#ifndef _di_fll_fss_snatch_map_apart_
- f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_map_apart_
#ifndef _di_fll_fss_snatch_map_mash_
- f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_map_mash_
#ifndef _di_fll_fss_snatch_map_mash_apart_
- f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_map_mash_apart_
#ifndef _di_fll_fss_snatch_map_together_
- f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_map_together_
#ifndef _di_fll_fss_snatch_mash_
- f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]) {
+ f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_mash_
#ifndef _di_fll_fss_snatch_mash_apart_
- f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
+ f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_snatch_mash_apart_
#ifndef _di_fll_fss_snatch_together_
- f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]) {
+ f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_
- extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]);
+ extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]);
#endif // _di_fll_fss_snatch_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_apart_
- extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_apart_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_
- extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_map_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_apart_
- extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_map_apart_
/**
* Errors (with error bit) from: f_compare_dynamic_partial_trim_string().
*/
#ifndef _di_fll_fss_snatch_map_mash_
- extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_map_mash_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_mash_apart_
- extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_map_multis_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_map_mash_apart_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_together_
- extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_map_together_
/**
* Errors (with error bit) from: f_compare_dynamic_partial_trim_string().
*/
#ifndef _di_fll_fss_snatch_mash_
- extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]);
#endif // _di_fll_fss_snatch_mash_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_mash_apart_
- extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
#endif // _di_fll_fss_snatch_mash_apart_
/**
* @see f_compare_trim()
*/
#ifndef _di_fll_fss_snatch_together_
- extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]);
+ extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_number_unsigned_t * const indexs[]);
#endif // _di_fll_fss_snatch_together_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_basic_read_
- void fll_fss_basic_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_state_t * const state) {
+ void fll_fss_basic_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_uint8s_t * const objects_quoted, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
* @see fl_fss_basic_object_read()
*/
#ifndef _di_fll_fss_basic_read_
- extern void fll_fss_basic_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_state_t * const state);
+ extern void fll_fss_basic_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_uint8s_t * const objects_quoted, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_state_t * const state);
#endif // _di_fll_fss_basic_read_
/**
#endif
#ifndef _di_fll_fss_basic_list_read_
- void fll_fss_basic_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fll_fss_basic_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
* @see fl_fss_basic_list_object_read()
*/
#ifndef _di_fll_fss_basic_list_read_
- extern void fll_fss_basic_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fll_fss_basic_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fll_fss_basic_list_read_
/**
#endif
#ifndef _di_fll_fss_embedded_list_read_
- void fll_fss_embedded_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const nest, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fll_fss_embedded_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const nest, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
* @see fl_fss_embedded_list_object_read()
*/
#ifndef _di_fll_fss_embedded_list_read_
- extern void fll_fss_embedded_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const nest, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fll_fss_embedded_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_nest_t * const nest, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fll_fss_embedded_list_read_
/**
#endif
#ifndef _di_fll_fss_extended_read_
- void fll_fss_extended_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_uint8ss_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_state_t * const state) {
+ void fll_fss_extended_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_uint8s_t * const objects_quoted, f_uint8ss_t * const contents_quoted, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
* @see fl_fss_extended_object_read()
*/
#ifndef _di_fll_fss_extended_read_
- extern void fll_fss_extended_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_uint8ss_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_state_t * const state);
+ extern void fll_fss_extended_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_uint8s_t * const objects_quoted, f_uint8ss_t * const contents_quoted, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_state_t * const state);
#endif // _di_fll_fss_extended_read_
/**
#endif
#ifndef _di_fll_fss_extended_list_read_
- void fll_fss_extended_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fll_fss_extended_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
* @see fl_fss_extended_list_object_read()
*/
#ifndef _di_fll_fss_extended_list_read_
- extern void fll_fss_extended_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fll_fss_extended_list_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fll_fss_extended_list_read_
/**
#endif
#ifndef _di_fll_fss_payload_read_
- void fll_fss_payload_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state) {
+ void fll_fss_payload_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
* @see fl_fss_basic_list_object_read()
*/
#ifndef _di_fll_fss_payload_read_
- extern void fll_fss_payload_read(const f_string_static_t buffer, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments, f_state_t * const state);
+ extern void fll_fss_payload_read(const f_string_static_t buffer, f_string_range_t * const range, f_string_ranges_t * const objects, f_string_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_string_ranges_t * const comments, f_state_t * const state);
#endif // _di_fll_fss_payload_read_
/**
f_string_dynamic_t small;
f_string_dynamic_t packet;
- f_fss_objects_t packet_objects;
- f_fss_contents_t packet_contents;
+ f_string_ranges_t packet_objects;
+ f_string_rangess_t packet_contents;
- f_fss_objects_t header_objects;
- f_fss_contents_t header_contents;
+ f_string_ranges_t header_objects;
+ f_string_rangess_t header_contents;
- f_fss_delimits_t delimits;
+ f_number_unsigneds_t delimits;
} control_cache_t;
#define control_cache_initialize \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
- f_fss_objects_t_initialize, \
- f_fss_contents_t_initialize, \
- f_fss_objects_t_initialize, \
- f_fss_contents_t_initialize, \
- f_fss_delimits_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_number_unsigneds_t_initialize, \
}
#endif // _di_control_cache_t_
f_state_t state = f_state_t_initialize;
f_string_range_t range = f_string_range_t_initialize;
- f_fss_objects_t objects = f_fss_objects_t_initialize;
- f_fss_contents_t contents = f_fss_contents_t_initialize;
- f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_string_ranges_t objects = f_string_ranges_t_initialize;
+ f_string_rangess_t contents = f_string_rangess_t_initialize;
+ f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
status = fll_fss_extended_read(data->cache.large, state, &range, &objects, &contents, 0, 0, &delimits, 0);
f_number_unsigneds_t ats;
f_number_unsigneds_t stack;
- f_fss_comments_t comments;
- f_fss_delimits_t delimits;
+ f_string_ranges_t comments;
+ f_number_unsigneds_t delimits;
- f_fss_content_t content_action;
- f_fss_contents_t content_actions;
- f_fss_contents_t content_items;
- f_fss_objects_t object_actions;
- f_fss_objects_t object_items;
+ f_string_ranges_t content_action;
+ f_string_rangess_t content_actions;
+ f_string_rangess_t content_items;
+ f_string_ranges_t object_actions;
+ f_string_ranges_t object_items;
f_string_dynamic_t buffer_file;
f_string_dynamic_t buffer_item;
f_string_range_t_initialize, \
f_number_unsigneds_t_initialize, \
f_number_unsigneds_t_initialize, \
- f_fss_comments_t_initialize, \
- f_fss_delimits_t_initialize, \
- f_fss_content_t_initialize, \
- f_fss_contents_t_initialize, \
- f_fss_contents_t_initialize, \
- f_fss_objects_t_initialize, \
- f_fss_objects_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_number_unsigneds_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_ranges_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
* The cache to deallocate.
*
* @see macro_f_number_unsigneds_t_delete_simple()
- * @see macro_f_fss_delimits_t_delete_simple()
+ * @see macro_f_number_unsigneds_t_delete_simple()
*
* @see controller_cache_action_delete_simple()
* @see f_string_dynamic_resize()
#endif // _di_controller_rule_find_
#ifndef _di_controller_rule_parameters_read_
- f_status_t controller_rule_parameters_read(const controller_global_t global, const f_string_static_t buffer, f_fss_object_t * const object, f_fss_content_t * const content, controller_rule_action_t * const action, f_state_t * const state) {
+ f_status_t controller_rule_parameters_read(const controller_global_t global, const f_string_static_t buffer, f_string_range_t * const object, f_string_ranges_t * const content, controller_rule_action_t * const action, f_state_t * const state) {
f_status_t status = F_none;
* @see fl_iki_read()
*/
#ifndef _di_controller_rule_parameters_read_
- extern f_status_t controller_rule_parameters_read(const controller_global_t global, const f_string_static_t buffer, f_fss_object_t * const object, f_fss_content_t * const content, controller_rule_action_t * const action, f_state_t * const state) F_attribute_visibility_internal_d;
+ extern f_status_t controller_rule_parameters_read(const controller_global_t global, const f_string_static_t buffer, f_string_range_t * const object, f_string_ranges_t * const content, controller_rule_action_t * const action, f_state_t * const state) F_attribute_visibility_internal_d;
#endif // _di_controller_rule_parameters_read_
/**
{
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
- f_fss_objects_t objects = f_fss_objects_t_initialize;
- f_fss_contents_t contents = f_fss_contents_t_initialize;
+ f_string_ranges_t objects = f_string_ranges_t_initialize;
+ f_string_rangess_t contents = f_string_rangess_t_initialize;
if (process_pipe) {
fake_pipe_buffer(data, &buffer);
if (F_status_is_error_not(main->setting.state.status)) {
f_string_range_t range = macro_f_string_range_t_initialize_2(buffer.used);
- f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &main->setting.state);
}
}
- macro_f_fss_delimits_t_delete_simple(delimits);
+ macro_f_number_unsigneds_t_delete_simple(delimits);
}
f_string_dynamic_resize(0, &buffer);
- macro_f_fss_objects_t_delete_simple(objects);
- macro_f_fss_contents_t_delete_simple(contents);
+ macro_f_string_ranges_t_delete_simple(objects);
+ macro_f_string_rangess_t_delete_simple(contents);
}
// Error when required settings are not specified.
#endif // _di_fake_build_load_setting_
#ifndef _di_fake_build_load_setting_process_
- void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting) {
+ void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, fake_build_setting_t * const setting) {
if (!data || !data->main || !setting) return;
if (F_status_is_error(data->main->setting.state.status) && buffer.used) return;
* @see fll_fss_snatch_apart()
*/
#ifndef _di_fake_build_load_setting_process_
- extern void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting);
+ extern void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, fake_build_setting_t * const setting);
#endif // _di_fake_build_load_setting_process_
/**
return;
}
- f_fss_objects_t list_objects = f_fss_objects_t_initialize;
- f_fss_contents_t list_contents = f_fss_contents_t_initialize;
- f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_string_ranges_t list_objects = f_string_ranges_t_initialize;
+ f_string_rangess_t list_contents = f_string_rangess_t_initialize;
+ f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
{
f_string_range_t range = macro_f_string_range_t_initialize_2(data_make->main->buffer.used);
- f_fss_comments_t comments = f_fss_comments_t_initialize;
+ f_string_ranges_t comments = f_string_ranges_t_initialize;
fll_fss_basic_list_read(data_make->main->buffer, &range, &list_objects, &list_contents, &delimits, 0, &comments, &data_make->main->setting.state);
#endif // _di_fake_make_load_fakefile_
#ifndef _di_fake_make_load_fakefile_setting_build_
- void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content) {
if (!data_make || !data_make->data || !data_make->main || !object || !content) return;
#endif // _di_fake_make_load_fakefile_setting_build_
#ifndef _di_fake_make_load_fakefile_setting_compiler_
- void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) {
+ void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content, f_string_range_t **range_compiler) {
if (!data_make || !data_make->data || !data_make->main || !object || !content || !range_compiler) return;
#endif // _di_fake_make_load_fakefile_setting_define_and_parameter_
#ifndef _di_fake_make_load_fakefile_setting_environment_
- void fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content) {
+ void fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_string_ranges_t * const content) {
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !content) return;
#endif // _di_fake_make_load_fakefile_setting_environment_
#ifndef _di_fake_make_load_fakefile_setting_fail_
- void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content) {
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !object || !content) return;
#endif // _di_fake_make_load_fakefile_setting_fail_
#ifndef _di_fake_make_load_fakefile_setting_indexer_
- void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) {
+ void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content, f_string_range_t **range_indexer) {
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !object || !content || !range_indexer) return;
#endif // _di_fake_make_load_fakefile_setting_indexer_
#ifndef _di_fake_make_load_fakefile_setting_parameter_
- void fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ void fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content) {
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !object || !content) return;
* The setting content.
*/
#ifndef _di_fake_make_load_fakefile_setting_build_
- extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content);
+ extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content);
#endif // _di_fake_make_load_fakefile_setting_build_
/**
* A pointer to the range that representing the compiler setting within the buffer.
*/
#ifndef _di_fake_make_load_fakefile_setting_compiler_
- extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler);
+ extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content, f_string_range_t **range_compiler);
#endif // _di_fake_make_load_fakefile_setting_compiler_
/**
* @see f_string_dynamics_increase()
*/
#ifndef _di_fake_make_load_fakefile_setting_environment_
- extern void fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content);
+ extern void fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_string_ranges_t * const content);
#endif // _di_fake_make_load_fakefile_setting_environment_
/**
* The setting content.
*/
#ifndef _di_fake_make_load_fakefile_setting_fail_
- extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content);
+ extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content);
#endif // _di_fake_make_load_fakefile_setting_fail_
/**
* A pointer to the range that representing the indexer setting within the buffer.
*/
#ifndef _di_fake_make_load_fakefile_setting_indexer_
- extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer);
+ extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content, f_string_range_t **range_indexer);
#endif // _di_fake_make_load_fakefile_setting_indexer_
/**
* @see fake_make_load_fakefile_setting_define_and_parameter()
*/
#ifndef _di_fake_make_load_fakefile_setting_parameter_
- extern void fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content);
+ extern void fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_string_range_t * const object, f_string_ranges_t * const content);
#endif // _di_fake_make_load_fakefile_setting_parameter_
#ifdef __cplusplus
#endif // _di_fake_make_operate_
#ifndef _di_fake_make_operate_expand_
- void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes) {
+ void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_ranges_t content, const f_uint8s_t quotes) {
if (!data_make || !data_make->main) return;
if (F_status_is_error(data_make->main->setting.state.status)) return;
* @see fake_make_operate_expand_environment()
*/
#ifndef _di_fake_make_operate_expand_
- extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes);
+ extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_ranges_t content, const f_uint8s_t quotes);
#endif // _di_fake_make_operate_expand_
/**
f_string_dynamic_t buffer;
f_number_unsigned_t chain;
f_number_unsigneds_t chain_ids;
- f_fss_objects_t chain_objects;
- f_fss_contents_t chain_contents;
- f_fss_objects_t rule_objects;
- f_fss_contents_t rule_contents;
+ f_string_ranges_t chain_objects;
+ f_string_rangess_t chain_contents;
+ f_string_ranges_t rule_objects;
+ f_string_rangess_t rule_contents;
} firewall_local_data_t;
#define firewall_local_data_t_initialize \
f_string_dynamic_t_initialize, \
0, \
f_number_unsigneds_t_initialize, \
- f_fss_objects_t_initialize, \
- f_fss_contents_t_initialize, \
- f_fss_objects_t_initialize, \
- f_fss_contents_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_rangess_t_initialize, \
}
typedef struct {
f_string_dynamic_t path_file = f_string_dynamic_t_initialize;
f_string_dynamic_t local_buffer = f_string_dynamic_t_initialize;
- f_fss_objects_t basic_objects = f_fss_objects_t_initialize;
- f_fss_contents_t basic_contents = f_fss_objects_t_initialize;
+ f_string_ranges_t basic_objects = f_string_ranges_t_initialize;
+ f_string_rangess_t basic_contents = f_string_ranges_t_initialize;
status = f_string_dynamic_append(firewall_network_path_s, &path_file);
}
}
else {
- f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
{
f_state_t state = f_state_t_initialize;
return status;
}
- f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
- f_fss_comments_t comments = f_fss_comments_t_initialize;
+ f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+ f_string_range_t comments = f_string_range_t_initialize;
f_state_t state = f_state_t_initialize;
{
}
}
- macro_f_fss_delimits_t_delete_simple(delimits);
- macro_f_fss_comments_t_delete_simple(comments);
+ macro_f_number_unsigneds_t_delete_simple(delimits);
+ macro_f_string_range_t_delete_simple(comments);
return status;
}
if (!data || !range || !local) return F_status_set_error(F_parameter);
f_status_t status = F_none;
- f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
f_state_t state = f_state_t_initialize;
status = fll_fss_extended_read(local->buffer, state, range, &local->rule_objects, &local->rule_contents, 0, 0, &delimits, 0);
}
}
- macro_f_fss_delimits_t_delete_simple(delimits);
+ macro_f_number_unsigneds_t_delete_simple(delimits);
if (F_status_is_error_not(status)) {
status = firewall_perform_commands(data, local);
fss_embedded_list_read_depths_t depths = fss_embedded_list_read_depths_t_initialize;
- f_fss_delimits_t objects_delimits = f_fss_delimits_t_initialize;
- f_fss_delimits_t contents_delimits = f_fss_delimits_t_initialize;
- f_fss_comments_t comments = f_fss_comments_t_initialize;
+ f_number_unsigneds_t objects_delimits = f_number_unsigneds_t_initialize;
+ f_number_unsigneds_t contents_delimits = f_number_unsigneds_t_initialize;
+ f_string_range_t comments = f_string_range_t_initialize;
if (F_status_is_error_not(status)) {
status = fss_embedded_list_read_main_preprocess_depth(&data, &depths);
#endif // _di_fss_embedded_list_read_main_preprocess_depth_
#ifndef _di_fss_embedded_list_read_main_process_file_
- f_status_t fss_embedded_list_read_main_process_file(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) {
+ f_status_t fss_embedded_list_read_main_process_file(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, f_number_unsigneds_t *objects_delimits, f_number_unsigneds_t *contents_delimits, f_string_range_t *comments) {
f_status_t status = F_none;
if (data->main->parameters.array[fss_embedded_list_read_parameter_original_e].result & f_console_result_found_e) {
- f_fss_delimits_t except_none = f_fss_delimits_t_initialize;
+ f_number_unsigneds_t except_none = f_number_unsigneds_t_initialize;
return fss_embedded_list_read_main_process_for_depth(data, filename, depths, 0, line, parents, &except_none, &except_none);
}
#endif // _di_fss_embedded_list_read_main_process_file_
#ifndef _di_fss_embedded_list_read_main_process_for_depth_
- f_status_t fss_embedded_list_read_main_process_for_depth(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, const f_number_unsigned_t depths_index, const f_number_unsigned_t line, const fss_embedded_list_read_skip_t parents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) {
+ f_status_t fss_embedded_list_read_main_process_for_depth(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, const f_number_unsigned_t depths_index, const f_number_unsigned_t line, const fss_embedded_list_read_skip_t parents, f_number_unsigneds_t *objects_delimits, f_number_unsigneds_t *contents_delimits) {
f_fss_items_t *items = &data->nest.depth[depths.array[depths_index].depth];
#endif // _di_fss_embedded_list_read_main_process_for_depth_
#ifndef _di_fss_embedded_list_read_process_delimits_
- void fss_embedded_list_read_process_delimits(fss_embedded_list_read_data_t * const data, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) {
+ void fss_embedded_list_read_process_delimits(fss_embedded_list_read_data_t * const data, f_number_unsigneds_t *objects_delimits, f_number_unsigneds_t *contents_delimits) {
if (!data->nest.used) return;
#endif // _di_fss_embedded_list_read_process_delimits_
#ifndef _di_fss_embedded_list_read_process_delimits_contents_
- void fss_embedded_list_read_process_delimits_contents(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_fss_delimits_t *delimits) {
+ void fss_embedded_list_read_process_delimits_contents(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_number_unsigneds_t *delimits) {
if (!original_used) return;
#endif // _di_fss_embedded_list_read_process_delimits_contents_
#ifndef _di_fss_embedded_list_read_process_delimits_objects_
- void fss_embedded_list_read_process_delimits_objects(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_fss_delimits_t *delimits) {
+ void fss_embedded_list_read_process_delimits_objects(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_number_unsigneds_t *delimits) {
if (!original_used) return;
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fss_embedded_list_read_main_process_file_
- extern f_status_t fss_embedded_list_read_main_process_file(fss_embedded_list_read_data_t * const data, const f_string_static_t file_name, const fss_embedded_list_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) F_attribute_visibility_internal_d;
+ extern f_status_t fss_embedded_list_read_main_process_file(fss_embedded_list_read_data_t * const data, const f_string_static_t file_name, const fss_embedded_list_read_depths_t depths, f_number_unsigneds_t *objects_delimits, f_number_unsigneds_t *contents_delimits, f_string_range_t *comments) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_read_main_process_file_
/**
* @see fss_embedded_list_read_main_process_file()
*/
#ifndef _di_fss_embedded_list_read_main_process_for_depth_
- extern f_status_t fss_embedded_list_read_main_process_for_depth(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, const f_number_unsigned_t depths_index, const f_number_unsigned_t line, const fss_embedded_list_read_skip_t parents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d;
+ extern f_status_t fss_embedded_list_read_main_process_for_depth(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, const f_number_unsigned_t depths_index, const f_number_unsigned_t line, const fss_embedded_list_read_skip_t parents, f_number_unsigneds_t *objects_delimits, f_number_unsigneds_t *contents_delimits) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_read_main_process_for_depth_
/**
* @see fss_embedded_list_read_main_process_file()
*/
#ifndef _di_fss_embedded_list_read_process_delimits_
- extern void fss_embedded_list_read_process_delimits(fss_embedded_list_read_data_t * const data, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d;
+ extern void fss_embedded_list_read_process_delimits(fss_embedded_list_read_data_t * const data, f_number_unsigneds_t *objects_delimits, f_number_unsigneds_t *contents_delimits) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_read_process_delimits_
/**
* @see fss_embedded_list_read_process_delimits()
*/
#ifndef _di_fss_embedded_list_read_process_delimits_contents_
- extern void fss_embedded_list_read_process_delimits_contents(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_fss_delimits_t *delimits) F_attribute_visibility_internal_d;
+ extern void fss_embedded_list_read_process_delimits_contents(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_number_unsigneds_t *delimits) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_read_process_delimits_contents_
/**
* @see fss_embedded_list_read_process_delimits()
*/
#ifndef _di_fss_embedded_list_read_process_delimits_objects_
- extern void fss_embedded_list_read_process_delimits_objects(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_fss_delimits_t *delimits) F_attribute_visibility_internal_d;
+ extern void fss_embedded_list_read_process_delimits_objects(fss_embedded_list_read_data_t * const data, const f_number_unsigned_t depth, const f_number_unsigned_t original_delimits[], const f_number_unsigned_t original_used, f_number_unsigneds_t *delimits) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_read_process_delimits_objects_
/**
void (*process_last_line)(void * const main);
void (*process_normal)(void * const main);
- void (*process_at)(void * const main, const bool names[], const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content);
+ 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_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content);
- f_status_t (*print_object)(fl_print_t * const print, const f_number_unsigned_t at, const f_fss_delimits_t delimits);
- f_status_t (*print_content)(fl_print_t * const print, const f_string_range_t range, const uint8_t quote, const f_fss_delimits_t delimits);
+ 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_content)(fl_print_t * const print, const f_string_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits);
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_string_static_t standard;
f_string_dynamic_t buffer;
- f_fss_comments_t comments;
- f_fss_contents_t contents;
- f_fss_delimits_t delimits_object;
- f_fss_delimits_t delimits_content;
+ f_string_ranges_t comments;
+ f_string_rangess_t contents;
+ f_number_unsigneds_t delimits_object;
+ f_number_unsigneds_t delimits_content;
f_fss_nest_t nest;
- f_fss_objects_t objects;
+ f_string_ranges_t objects;
f_uint8s_t quotes_object;
f_uint8ss_t quotes_content;
fss_read_depths_t_initialize, \
f_string_static_t_initialize, \
f_string_dynamic_t_initialize, \
- f_fss_comments_t_initialize, \
- f_fss_contents_t_initialize, \
- f_fss_delimits_t_initialize, \
- f_fss_delimits_t_initialize, \
+ f_string_ranges_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_number_unsigneds_t_initialize, \
+ f_number_unsigneds_t_initialize, \
f_fss_nest_t_initialize, \
- f_fss_objects_t_initialize, \
+ f_string_ranges_t_initialize, \
f_uint8s_t_initialize, \
f_uint8ss_t_initialize, \
}
#endif
#ifndef _di_fss_read_print_at_
- f_status_t fss_read_print_at(fl_print_t * const print, const f_number_unsigned_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content) {
+ f_status_t fss_read_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) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
#endif // _di_fss_read_print_at_
#ifndef _di_fss_read_print_content_
- f_status_t fss_read_print_content(fl_print_t * const print, const f_string_range_t range, const uint8_t quote, const f_fss_delimits_t delimits) {
+ f_status_t fss_read_print_content(fl_print_t * const print, const f_string_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
#endif // _di_fss_read_print_number_
#ifndef _di_fss_read_print_object_
- f_status_t fss_read_print_object(fl_print_t * const print, const f_number_unsigned_t at, const f_fss_delimits_t delimits) {
+ f_status_t fss_read_print_object(fl_print_t * const print, const f_number_unsigned_t at, const f_number_unsigneds_t delimits) {
if (!print || !print->custom) return F_status_set_error(F_output_not);
* @see main.callback.print_set_end()
*/
#ifndef _di_fss_read_print_at_
- extern f_status_t fss_read_print_at(fl_print_t * const print, const f_number_unsigned_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content);
+ extern f_status_t fss_read_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);
#endif // _di_fss_read_print_at_
/**
* @see main.callback.print_set_end()
*/
#ifndef _di_fss_read_print_content_
- extern f_status_t fss_read_print_content(fl_print_t * const print, const f_string_range_t range, const uint8_t quote, const f_fss_delimits_t delimits);
+ extern f_status_t fss_read_print_content(fl_print_t * const print, const f_string_range_t range, const uint8_t quote, const f_number_unsigneds_t delimits);
#endif // _di_fss_read_print_content_
/**
* @see fss_read_print_quote()
*/
#ifndef _di_fss_read_print_object_
- extern f_status_t fss_read_print_object(fl_print_t * const print, const f_number_unsigned_t at, const f_fss_delimits_t delimits);
+ extern f_status_t fss_read_print_object(fl_print_t * const print, const f_number_unsigned_t at, const f_number_unsigneds_t delimits);
#endif // _di_fss_read_print_object_
/**
* @see fss_read_signal_check()
*/
#ifndef _di_fss_read_process_normal_at_
- extern void fss_read_process_normal_at(void * const main, const bool names[], const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content);
+ extern void fss_read_process_normal_at(void * const main, const bool names[], const f_number_unsigneds_t delimits_object, const f_number_unsigneds_t delimits_content);
#endif // _di_fss_read_process_normal_at_
/**