I decided that I needed to expand the `f_fss_skip_past_space()` into `f_fss_skip_past_space_previous()` to expose the `previous` position variable to the caller.
I must avoid breaking the **API**/**ABI**, so `f_fss_skip_past_space()` is not changed.
This should simplify the embedded read functions.
Fix documentation, adding "Must not be NULL." where it is missing.
The man pages will need to be re-generated more than likely.
Just copy the `f_fss_skip_past_space()` man page and update it manually for now.
Add missing `_di_f_utf_is_zero_width_` check on `private_f_utf_character_is_joiner()`.
#define _di_f_fss_skip_past_combining_
#define _di_f_fss_skip_past_delimit_
#define _di_f_fss_skip_past_space_
+#define _di_f_fss_skip_past_space_previous_
#define _di_f_fss_state_flag_e_
#define _di_f_fss_status_code_e_
#define _di_f_fss_type_s_
build_sources_library execute.c
build_sources_library file.c private-file.c file/common.c file/stream.c
build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/payload.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
+build_sources_library private-fss.c
build_sources_library iki.c iki/common.c iki/data.c iki/eki.c private-iki.c iki/private-data.c iki/private-eki.c
build_sources_library limit.c limit/set.c limit/value.c
build_sources_library memory.c memory/array.c memory/arrays.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/fss/common.c level_0/fss/item.c level_0/fss/named.c level_0/fss/nest.c level_0/fss/payload.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/private-fss.c
build_sources_library level_0/iki.c level_0/iki/common.c level_0/iki/data.c level_0/iki/eki.c level_0/private-iki.c level_0/iki/private-data.c level_0/iki/private-eki.c
build_sources_library level_0/limit.c level_0/limit/set.c level_0/limit/value.c
build_sources_library level_0/memory.c level_0/memory/array.c level_0/memory/arrays.c
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
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/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/payload.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/private-fss.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/private-eki.c fll/level_0/iki/data.c fll/level_0/iki/eki.c
build_sources_program fll/level_0/limit.c fll/level_0/limit/set.c fll/level_0/limit/value.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
#define _di_f_fss_skip_past_combining_
#define _di_f_fss_skip_past_delimit_
#define _di_f_fss_skip_past_space_
+#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/private-directory.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
//#define _di_f_fss_skip_past_combining_
//#define _di_f_fss_skip_past_delimit_
//#define _di_f_fss_skip_past_space_
+//#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
#define _di_f_fss_skip_past_combining_
#define _di_f_fss_skip_past_delimit_
#define _di_f_fss_skip_past_space_
+#define _di_f_fss_skip_past_space_previous_
//#define _di_f_fss_state_flag_e_
//#define _di_f_fss_status_code_e_
//#define _di_f_fss_type_s_
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.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/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/payload.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/private-fss.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
build_sources_program fll/level_0/pipe.c
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not if argc is 0, argv is a NULL pointer, or if argv[0] is NULL.
#include "fss.h"
+#include "private-fss.h"
#ifdef __cplusplus
extern "C" {
return;
}
- // Skip past initial place holders.
- for (;; ++range->start) {
-
- if (state->interrupt) {
- state->interrupt((void *) state, 0);
- if (F_status_set_fine(state->status) == F_interrupt) return;
- }
-
- if (range->start >= buffer.used) {
- state->status = F_okay_eos;
-
- return;
- }
-
- if (range->start > range->stop) {
- state->status = F_okay_stop;
-
- return;
- }
-
- if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) break;
- } // for
-
f_number_unsigned_t previous = range->start;
- if (macro_f_utf_byte_width_is(buffer.string[range->start])) {
- if (range->start + macro_f_utf_byte_width(buffer.string[range->start]) > buffer.used) {
- state->status = F_status_set_error(F_complete_not_utf_eos);
-
- f_fss_fail_utf(state);
-
- return;
- }
+ private_f_fss_skip_past_space_previous(buffer, range, state, &previous);
+ }
+#endif // _di_f_fss_skip_past_space_
- if (range->start + (macro_f_utf_byte_width(buffer.string[range->start]) - 1) > range->stop) {
- state->status = F_status_set_error(F_complete_not_utf_stop);
+#ifndef _di_f_fss_skip_past_space_previous_
+ void f_fss_skip_past_space_previous(const f_string_static_t buffer, f_range_t * const range, f_state_t * const state, f_number_unsigned_t * const previous) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!state) return;
- f_fss_fail_utf(state);
+ if (!range || !previous) {
+ state->status = F_status_set_error(F_parameter);
return;
}
- }
-
- // Check that the first character is not a combining character or a joiner character.
- state->status = f_utf_is_combining_joiner(
- buffer.string + previous,
- (range->stop - previous) + 1 > buffer.used - previous
- ? buffer.used - previous
- : (range->stop - previous) + 1
- );
-
- f_fss_fail_utf_to_false(state);
-
- if (F_status_is_error(state->status)) return;
+ #endif // _di_level_0_parameter_checking_
- if (state->status == F_true) {
- state->status = F_status_set_error(F_complete_not_utf_start);
+ if (!buffer.used || range->start > range->stop || range->start >= buffer.used) {
+ state->status = F_data_not;
return;
}
- for (;;) {
-
- if (state->interrupt) {
- state->interrupt((void *) state, 0);
- if (F_status_set_fine(state->status) == F_interrupt) return;
- }
-
- if (range->start >= buffer.used) {
- state->status = F_okay_eos;
-
- return;
- }
-
- if (range->start > range->stop) {
- state->status = F_okay_stop;
-
- return;
- }
-
- if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
- state->status = F_okay_eol;
-
- return;
- }
-
- if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
- ++range->start;
-
- continue;
- }
-
- state->status = f_utf_is_whitespace(
- buffer.string + range->start,
- (range->stop - range->start) + 1 > buffer.used - range->start
- ? buffer.used - range->start
- : (range->stop - range->start) + 1,
- F_false
- );
-
- f_fss_fail_utf_to_false(state);
-
- if (state->status == F_false) {
- state->status = f_utf_is_combining_joiner(
- buffer.string + range->start,
- (range->stop - range->start) + 1 > buffer.used - range->start
- ? buffer.used - range->start
- : (range->stop - range->start) + 1
- );
-
- f_fss_fail_utf_to_false(state);
-
- // This is combining, so any previous white space is no longer considered white space as such.
- if (state->status == F_true) {
- range->start = previous;
-
- break;
- }
-
- if (state->status == F_false) {
- state->status = f_utf_is_control(
- buffer.string + range->start,
- (range->stop - range->start) + 1 > buffer.used - range->start
- ? buffer.used - range->start
- : (range->stop - range->start) + 1
- );
-
- f_fss_fail_utf_to_false(state);
-
- if (state->status == F_false) {
- state->status = f_utf_is_zero_width(
- buffer.string + range->start,
- (range->stop - range->start) + 1 > buffer.used - range->start
- ? buffer.used - range->start
- : (range->stop - range->start) + 1
- );
-
- f_fss_fail_utf_to_false(state);
- if (state->status == F_false) break;
- }
- }
- }
-
- if (F_status_is_error(state->status)) return;
-
- previous = range->start;
-
- if (macro_f_utf_byte_width_is(buffer.string[previous])) {
- if (previous + macro_f_utf_byte_width(buffer.string[previous]) >= buffer.used) {
- state->status = F_status_set_error(F_complete_not_utf_eos);
-
- f_fss_fail_utf(state);
-
- return;
- }
-
- if (previous + macro_f_utf_byte_width(buffer.string[previous]) > range->stop) {
- state->status = F_status_set_error(F_complete_not_utf_stop);
-
- f_fss_fail_utf(state);
-
- return;
- }
- }
-
- range->start += macro_f_utf_byte_width(buffer.string[previous]);
- } // for
-
- state->status = F_okay;
+ private_f_fss_skip_past_space_previous(buffer, range, state, previous);
}
-#endif // _di_f_fss_skip_past_space_
+#endif // _di_f_fss_skip_past_space_previous_
#ifdef __cplusplus
} // extern "C"
* An array of locations containing the delimits to apply within the buffer.
* @param buffer
* The string to process.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but buffer.used is 0.
* The range in which to restrict which delimits to apply.
* @param buffer
* The string to process.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but buffer.used is 0.
* The total lines found leading up to but not including before.
* This value is not reset and only additions are performed.
* When F_data_not is returned, this value is not altered.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but buffer.used is 0 (line is set to 0).
* The total lines found leading up to but not including before.
* This value is not reset and only additions are performed.
* When F_data_not is returned, this value is not altered.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but the range.start is greater than buffer.used or buffer.used is 0 (line is set to 0).
* - F_utf_fragment
* - F_utf_not
*
+ * Must not be NULL.
+ *
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
* - F_utf_fragment
* - F_utf_not
*
+ * Must not be NULL.
+ *
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_combarudoo character in the buffer is a combining character (future versions will provide a more accurate status, like F_combine).
* F_data_not on success but nothing is processed.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_bound character in the buffer is a joiner character (future versions will provide a more accurate status, like F_join).
* F_combarudoo character in the buffer is a combining character (future versions will provide a more accurate status, like F_combine).
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_data_not on success but nothing is processed.
* F_false if the character in the buffer is not a graph character.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_bound character in the buffer is a joiner character (future versions will provide a more accurate status, like F_join).
* F_data_not on success but nothing is processed.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_data_not on success but nothing is processed.
* F_false if the character in the buffer is not a space character.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_data_not on success but nothing is processed.
* F_false if the character in the buffer is not a zero-width character.
* @param range
* The start and stop positions in the buffer being processed.
* This increments range->start.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used.
* @param range
* The start and stop positions in the buffer being processed.
* This increments range->start.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success and last skipped (if any) character is neither a combining character nor a joiner character.
* F_bound on success and last skipped character is a joiner character (future versions will provide a more accurate status, like F_join).
* @param range
* The start and stop positions in the buffer being processed.
* This increments range->start.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used.
* @param range
* The start and stop positions in the buffer being processed.
* This increments range->start.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used.
extern void f_fss_skip_past_space(const f_string_static_t buffer, f_range_t * const range, f_state_t * const state);
#endif // _di_f_fss_skip_past_space_
+/**
+ * Skip past all white space, control characters, and zero-width characters, except newline '\n' (U+000A), exposing the previous position to the caller.
+ *
+ * If the first character in the given range is a combining character, then this will not skip past anything.
+ * This is because combining characters apply from right to left.
+ * The caller should check the return status and handle accordingly in this situation.
+ *
+ * White space is checked for combining characters after the white space.
+ * If there is a combining character after, then the white space is not consider as such.
+ *
+ * This skips past place holders.
+ *
+ * This stops on end of line.
+ *
+ * This does not initializes previous.
+ * This is left to the caller.
+ *
+ * @param buffer
+ * The string to process.
+ * @param range
+ * The start and stop positions in the buffer being processed.
+ * This increments range->start.
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
+ *
+ * Must not be NULL.
+ *
+ * This alters state.status:
+ * F_okay on success.
+ * F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used.
+ * F_okay_eol on success and EOL was reached.
+ * F_okay_eos on success and EOS was reached.
+ * F_okay_stop on success and stop point was reached.
+ *
+ * F_complete_not_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS.
+ * F_complete_not_utf_start (with error bit) if the first character is a combining or a joiner character.
+ * F_complete_not_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached.
+ * F_interrupt (with error bit) if stopping due to an interrupt.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_utf_is_combining_joiner().
+ * Errors (with error bit) from: f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_zero_width().
+ *
+ * @param previous
+ * The previous position before
+ *
+ * Must not be NULL.
+ *
+ * @see f_utf_is_combining_joiner()
+ * @see f_utf_is_control()
+ * @see f_utf_is_whitespace()
+ * @see f_utf_is_zero_width()
+ */
+#ifndef _di_f_fss_skip_past_space_previous_
+ extern void f_fss_skip_past_space_previous(const f_string_static_t buffer, f_range_t * const range, f_state_t * const state, f_number_unsigned_t * const previous);
+#endif // _di_f_fss_skip_past_space_previous_
+
#ifdef __cplusplus
} // extern "C"
#endif
--- /dev/null
+#include "fss.h"
+#include "private-fss.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_fss_skip_past_space_) || !defined(_di_f_fss_skip_past_space_previous_)
+ void private_f_fss_skip_past_space_previous(const f_string_static_t buffer, f_range_t * const range, f_state_t * const state, f_number_unsigned_t * const previous) {
+
+ // Skip past initial place holders.
+ for (;; ++range->start) {
+
+ if (state->interrupt) {
+ state->interrupt((void *) state, 0);
+ if (F_status_set_fine(state->status) == F_interrupt) return;
+ }
+
+ if (range->start >= buffer.used) {
+ state->status = F_okay_eos;
+
+ return;
+ }
+
+ if (range->start > range->stop) {
+ state->status = F_okay_stop;
+
+ return;
+ }
+
+ if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) break;
+ } // for
+
+ if (macro_f_utf_byte_width_is(buffer.string[range->start])) {
+ if (range->start + macro_f_utf_byte_width(buffer.string[range->start]) > buffer.used) {
+ state->status = F_status_set_error(F_complete_not_utf_eos);
+
+ f_fss_fail_utf(state);
+
+ return;
+ }
+
+ if (range->start + (macro_f_utf_byte_width(buffer.string[range->start]) - 1) > range->stop) {
+ state->status = F_status_set_error(F_complete_not_utf_stop);
+
+ f_fss_fail_utf(state);
+
+ return;
+ }
+ }
+
+ // Check that the first character is not a combining character or a joiner character.
+ state->status = f_utf_is_combining_joiner(
+ buffer.string + *previous,
+ (range->stop - *previous) + 1 > buffer.used - *previous
+ ? buffer.used - *previous
+ : (range->stop - *previous) + 1
+ );
+
+ f_fss_fail_utf_to_false(state);
+
+ if (F_status_is_error(state->status)) return;
+
+ if (state->status == F_true) {
+ state->status = F_status_set_error(F_complete_not_utf_start);
+
+ return;
+ }
+
+ for (;;) {
+
+ if (state->interrupt) {
+ state->interrupt((void *) state, 0);
+ if (F_status_set_fine(state->status) == F_interrupt) return;
+ }
+
+ if (range->start >= buffer.used) {
+ state->status = F_okay_eos;
+
+ return;
+ }
+
+ if (range->start > range->stop) {
+ state->status = F_okay_stop;
+
+ return;
+ }
+
+ if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
+ state->status = F_okay_eol;
+
+ return;
+ }
+
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
+ ++range->start;
+
+ continue;
+ }
+
+ state->status = f_utf_is_whitespace(
+ buffer.string + range->start,
+ (range->stop - range->start) + 1 > buffer.used - range->start
+ ? buffer.used - range->start
+ : (range->stop - range->start) + 1,
+ F_false
+ );
+
+ f_fss_fail_utf_to_false(state);
+
+ if (state->status == F_false) {
+ state->status = f_utf_is_combining_joiner(
+ buffer.string + range->start,
+ (range->stop - range->start) + 1 > buffer.used - range->start
+ ? buffer.used - range->start
+ : (range->stop - range->start) + 1
+ );
+
+ f_fss_fail_utf_to_false(state);
+
+ // This is combining, so any previous white space is no longer considered white space as such.
+ if (state->status == F_true) {
+ range->start = *previous;
+
+ break;
+ }
+
+ if (state->status == F_false) {
+ state->status = f_utf_is_control(
+ buffer.string + range->start,
+ (range->stop - range->start) + 1 > buffer.used - range->start
+ ? buffer.used - range->start
+ : (range->stop - range->start) + 1
+ );
+
+ f_fss_fail_utf_to_false(state);
+
+ if (state->status == F_false) {
+ state->status = f_utf_is_zero_width(
+ buffer.string + range->start,
+ (range->stop - range->start) + 1 > buffer.used - range->start
+ ? buffer.used - range->start
+ : (range->stop - range->start) + 1
+ );
+
+ f_fss_fail_utf_to_false(state);
+ if (state->status == F_false) break;
+ }
+ }
+ }
+
+ if (F_status_is_error(state->status)) return;
+
+ *previous = range->start;
+
+ if (macro_f_utf_byte_width_is(buffer.string[*previous])) {
+ if (*previous + macro_f_utf_byte_width(buffer.string[*previous]) >= buffer.used) {
+ state->status = F_status_set_error(F_complete_not_utf_eos);
+
+ f_fss_fail_utf(state);
+
+ return;
+ }
+
+ if (*previous + macro_f_utf_byte_width(buffer.string[*previous]) > range->stop) {
+ state->status = F_status_set_error(F_complete_not_utf_stop);
+
+ f_fss_fail_utf(state);
+
+ return;
+ }
+ }
+
+ range->start += macro_f_utf_byte_width(buffer.string[*previous]);
+ } // for
+
+ state->status = F_okay;
+ }
+#endif // !defined(_di_f_fss_skip_past_space_) || !defined(_di_f_fss_skip_past_space_previous_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: File
+ * API Version: 0.8
+ * Licenses: clarified_1_0_or_later-lgpl_2_1_or_later
+ *
+ * Provides structures and data types for a file I/O.
+ * Provides operations for opening/closing files.
+ */
+#ifndef _PRIVATE_F_fss_h
+#define _PRIVATE_F_fss_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation of f_fss_skip_past_space_previous().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param buffer
+ * The string to process.
+ * @param range
+ * The start and stop positions in the buffer being processed.
+ * This increments range->start.
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
+ *
+ * This alters state.status:
+ * F_okay on success.
+ * F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used.
+ * F_okay_eol on success and EOL was reached.
+ * F_okay_eos on success and EOS was reached.
+ * F_okay_stop on success and stop point was reached.
+ *
+ * F_complete_not_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS.
+ * F_complete_not_utf_start (with error bit) if the first character is a combining or a joiner character.
+ * F_complete_not_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached.
+ * F_interrupt (with error bit) if stopping due to an interrupt.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_utf_is_combining_joiner().
+ * Errors (with error bit) from: f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_zero_width().
+ *
+ * @see f_utf_is_combining_joiner()
+ * @see f_utf_is_control()
+ * @see f_utf_is_whitespace()
+ * @see f_utf_is_zero_width()
+ *
+ * @see f_fss_skip_past_space()
+ * @see f_fss_skip_past_space_previous()
+ */
+#if !defined(_di_f_fss_skip_past_space_) || !defined(_di_f_fss_skip_past_space_previous_)
+ extern void private_f_fss_skip_past_space_previous(const f_string_static_t buffer, f_range_t * const range, f_state_t * const state, f_number_unsigned_t * const previous) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fss_skip_past_space_) || !defined(_di_f_fss_skip_past_space_previous_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_fss_h
build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/payload.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/payload.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
+build_sources_library private-fss.c
build_sources_library config.c
build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/payload.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/payload.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
+build_sources_library private-fss.c
build_sources_library ../../tests/unit/c/mock-fss.c
build_static no
build_libraries -lc -lcmocka
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_fss
-build_sources_program test-fss-apply_delimit.c test-fss-apply_delimit_range.c test-fss-count_lines.c test-fss-count_lines_range.c test-fss-fail_utf.c test-fss-fail_utf_to_false.c test-fss-is_combining.c test-fss-is_graph.c test-fss-is_space.c test-fss-is_zero_width.c test-fss-seek_to_eol.c test-fss-skip_past_combining_joiner.c test-fss-skip_past_delimit.c test-fss-skip_past_space.c
+build_sources_program test-fss-apply_delimit.c test-fss-apply_delimit_range.c test-fss-count_lines.c test-fss-count_lines_range.c test-fss-fail_utf.c test-fss-fail_utf_to_false.c test-fss-is_combining.c test-fss-is_graph.c test-fss-is_space.c test-fss-is_zero_width.c test-fss-seek_to_eol.c test-fss-skip_past_combining_joiner.c test-fss-skip_past_delimit.c test-fss-skip_past_space.c test-fss-skip_past_space_previous.c
build_sources_program test-fss-item_delete.c test-fss-item_destroy.c
build_sources_program test-fss-items_delete_callback.c test-fss-items_destroy_callback.c test-fss-itemss_delete_callback.c test-fss-itemss_destroy_callback.c
build_sources_program test-fss-named_delete.c test-fss-named_destroy.c
--- /dev/null
+.TH f_fss_skip_past_space_previous "3" "January 2026" "FLL - Featureless Linux Library 0.8.2 - Level 0" "Library Functions"
+.SH "NAME"
+f_fss_skip_past_space_previous \-
+.SH SYNOPSIS
+.nf
+.B #include <fss.h>
+.sp
+\fBvoid f_fss_skip_past_space_previous\fP(
+ \fBconst f_string_static_t \fP\fIbuffer\fP,
+ \fBf_range_t *const \fP\fIrange\fP,
+ \fBf_state_t *const \fP\fIstate\fP
+);
+.fi
+.SH DESCRIPTION
+.PP
+Skip past all white space, control characters, and zero-width characters, except newline '
+.PP
+' (U+000A), exposing the previous position to the caller.
+.PP
+If the first character in the given range is a combining character, then this will not skip past anything. This is because combining characters apply from right to left.
+.PP
+This alters state.status: F_okay on success. F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used. F_okay_eol on success and EOL was reached. F_okay_eos on success and EOS was reached. F_okay_stop on success and stop point was reached.
+.PP
+F_complete_not_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS. F_complete_not_utf_start (with error bit) if the first character is a combining character. F_complete_not_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached. F_parameter (with error bit) if a parameter is invalid.
+.PP
+Errors (with error bit) from: f_utf_is_combining(). Errors (with error bit) from: f_utf_is_control(). Errors (with error bit) from: f_utf_is_whitespace(). Errors (with error bit) from: f_utf_is_zero_width().
+.SH PARAMETERS
+.TP
+.B buffer
+The string to process.
+
+.TP
+.B range
+The start and stop positions in the buffer being processed. This increments range->start.
+
+.TP
+.B state
+A state for providing flags and handling interrupts during long running operations.
+
+.SH STRUCTURES
+.SS ""
+.PP
+.sp
+.PP
+A string that is analogous to f_string_dynamic_t but intended for static-only uses.
+.PP
+The f_string_static_t type should always have size set to 0 to represent that it is a static string. This allows for easier integration with f_string_dynamic_t.
+.PP
+If size is set to some value other than 0 for a static string, then take special care not to intermix it with f_string_dynamic_t.
+.PP
+A special macro_f_string_static_t_initialize_1() is provided to easily initialize a static string. A special macro_f_string_static_t_initialize_2() is provided to easily initialize a static string with an identical used and size.
+.PP
+size: Total amount of space available.
+.sp
+.RS
+.nf
+\fB
+struct f_string_static_t {
+ f_string_t \fIstring\fP;
+ f_number_unsigned_t \fIused\fP;
+ f_number_unsigned_t \fIsize\fP;
+};
+\fP
+.fi
+.RE
+.SS ""
+.PP
+.sp
+.PP
+A structure designating a start and stop range for some string.
+.PP
+In general, this project uses the start and stop position inclusively, meaning that a range of 0 to 1 would include positions 0 and position 1. Therefore, a range from 0 to 0 would be include position 0. Set start to some value larger than stop to designate that there is no range (such as start = 1, stop = 0).
+.PP
+stop: The inclusive stop position.
+.sp
+.RS
+.nf
+\fB
+struct f_range_t {
+ f_number_unsigned_t \fIstart\fP;
+ f_number_unsigned_t \fIstop\fP;
+};
+\fP
+.fi
+.RE
+.SH SEE ALSO
+.PP
+.nh
+.ad l
+\fIfss.h\fP(3), \fIf_fss_apply_delimit\fP(3), \fIf_fss_apply_delimit_range\fP(3), \fIf_fss_count_lines\fP(3), \fIf_fss_count_lines_range\fP(3), \fIf_fss_fail_utf\fP(3), \fIf_fss_fail_utf_to_false\fP(3), \fIf_fss_is_combining\fP(3), \fIf_fss_is_graph\fP(3), \fIf_fss_is_space\fP(3), \fIf_fss_is_zero_width\fP(3), \fIf_fss_seek_to_eol\fP(3), \fIf_fss_skip_past_delimit\fP(3), \fIf_fss_skip_past_space_previous\fP(3), \fIf_utf_is_combining()\fP, \fIf_utf_is_control()\fP, \fIf_utf_is_whitespace()\fP, \fIf_utf_is_zero_width()\fP, \fIf_utf_is_combining()\fP, \fIf_utf_is_control()\fP, \fIf_utf_is_whitespace()\fP, \fIf_utf_is_zero_width()\fP
+.ad
+.hy
+.SH AUTHOR
+Written by Kevin Day.
+.SH COPYRIGHT
+.PP
+Copyright \(co 2007-2026 Kevin Day, GNU LGPL Version 2.1 or later.
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-skip_past_space_previous.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_skip_past_space_previous__parameter_checking(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize_1("test", 4, 0);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_fss_skip_past_space_previous(test, 0, &state_data, 0);
+
+ assert_int_equal(state_data.status, F_status_set_error(F_parameter));
+ }
+
+ {
+ f_number_unsigned_t previous = 0;
+
+ f_fss_skip_past_space_previous(test, 0, &state_data, &previous);
+
+ assert_int_equal(state_data.status, F_status_set_error(F_parameter));
+ }
+
+ {
+ f_range_t range = f_range_t_initialize;
+
+ f_fss_skip_past_space_previous(test, &range, &state_data, 0);
+
+ assert_int_equal(state_data.status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_skip_past_space_previous__returns_data_not(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize_1("test", 4, 0);
+ f_state_t state_data = f_state_t_initialize;
+ f_number_unsigned_t previous = 0;
+
+ {
+ f_range_t range = f_range_t_initialize;
+
+ f_fss_skip_past_space_previous(f_string_empty_s, &range, &state_data, &previous);
+
+ assert_int_equal(state_data.status, F_data_not);
+ }
+
+ {
+ f_range_t range = f_range_t_initialize;
+
+ f_fss_skip_past_space_previous(test, &range, &state_data, &previous);
+
+ assert_int_equal(state_data.status, F_data_not);
+ }
+
+ {
+ f_range_t range = macro_f_range_t_initialize_1(0, test.used - 1);
+
+ f_fss_skip_past_space_previous(f_string_empty_s, &range, &state_data, &previous);
+
+ assert_int_equal(state_data.status, F_data_not);
+ }
+
+ {
+ f_range_t range = macro_f_range_t_initialize_1(test.used, test.used + 2);
+
+ f_fss_skip_past_space_previous(test, &range, &state_data, &previous);
+
+ assert_int_equal(state_data.status, F_data_not);
+ }
+}
+
+void test__f_fss_skip_past_space_previous__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ // Space followed by a zero-width joiner and a joined character with NULLs before joiner (U+0020 \0 \0 U+200D U+1F9D4).
+ char space_null_join[] = { 0x20, 0x0, 0x0, 0xe2, 0x80, 0x8d, 0xf0, 0x9f, 0xa7, 0x94 };
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize_1("test", 4, 0),
+ macro_f_string_static_t_initialize_1(" test", 5, 0),
+ macro_f_string_static_t_initialize_1(" test", 7, 0),
+ macro_f_string_static_t_initialize_1(" \0test ", 9, 0),
+ macro_f_string_static_t_initialize_1(" \t\atest ", 9, 0),
+ macro_f_string_static_t_initialize_1("\a\t $test ", 10, 0),
+ macro_f_string_static_t_initialize_1(" ́test", 7, 0), // Space followed by a combining character (U+0020 U+0301).
+ macro_f_string_static_t_initialize_1("test", 7, 0), // Starts with zero-width space (U+200B).
+ macro_f_string_static_t_initialize_1(" 🧔test", 12, 0), // Space followed by a zero-width joiner and a joined character (U+0020 U+200D U+1F9D4).
+ macro_f_string_static_t_initialize_1(" test", 8, 0), // Space followed by a word joiner and a joined character (U+0020 U+2060 U+0062).
+ macro_f_string_static_t_initialize_1("́test", 6, 0), // Starts with combining character (U+0301).
+ macro_f_string_static_t_initialize_1("́test", 6, 0), // Starts with joiner character (U+2060).
+ macro_f_string_static_t_initialize_1(" \0\0🧔test", 14, 0), // Space followed by a zero-width joiner and a joined character with NULLs after joiner (U+0020 U+200D \0 \0 U+1F9D4).
+ macro_f_string_static_t_initialize_1(space_null_join, 14, 0),
+ };
+
+ uint16_t statuss[] = {
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_okay,
+ F_status_set_error(F_complete_not_utf_start),
+ F_status_set_error(F_complete_not_utf_start),
+ F_okay,
+ F_okay,
+ };
+
+ f_number_unsigned_t ranges[] = {
+ 0,
+ 1,
+ 3,
+ 3,
+ 3,
+ 3,
+ 0,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ };
+
+ for (uint8_t i = 0; i < 14; ++i) {
+
+ f_range_t range = macro_f_range_t_initialize_1(0, tests[i].used - 1);
+ f_number_unsigned_t previous = 0;
+
+ f_fss_skip_past_space_previous(tests[i], &range, &state_data, &previous);
+
+ if (state_data.status != statuss[i]) {
+ printf("[ -------> ] --- [00] Expected %u in state.status but got %u at index %d for string '%s'.\n", statuss[i], state_data.status, i, tests[i].used ? tests[i].string : "");
+ }
+
+ assert_int_equal(state_data.status, statuss[i]);
+
+ if (range.start != ranges[i]) {
+ printf("[ -------> ] --- [01] Expected %lu in range.start but got %lu at index %d for string '%s'.\n", ranges[i], range.start, i, tests[i].used ? tests[i].string : "");
+ }
+
+ assert_int_equal(range.start, ranges[i]);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.8
+ * Licenses: clarified_1_0_or_later-lgpl_2_1_or_later
+ *
+ * Test skip past space previous in the fss project.
+ */
+#ifndef _TEST__F_fss__skip_past_space_previous
+#define _TEST__F_fss__skip_past_space_previous
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_skip_past_space_previous()
+ */
+extern void test__f_fss_skip_past_space_previous__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_skip_past_space_previous()
+ */
+extern void test__f_fss_skip_past_space_previous__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_skip_past_space_previous()
+ */
+extern void test__f_fss_skip_past_space_previous__works(void **state);
+
+#endif // _TEST__F_fss__skip_past_space_previous
cmocka_unit_test(test__f_fss_skip_past_combining_joiner__returns_data_not),
cmocka_unit_test(test__f_fss_skip_past_delimit__returns_data_not),
cmocka_unit_test(test__f_fss_skip_past_space__returns_data_not),
+ cmocka_unit_test(test__f_fss_skip_past_space_previous__returns_data_not),
cmocka_unit_test(test__f_fss_apply_delimit__works),
cmocka_unit_test(test__f_fss_apply_delimit_range__works),
cmocka_unit_test(test__f_fss_skip_past_combining_joiner__works),
cmocka_unit_test(test__f_fss_skip_past_delimit__works),
cmocka_unit_test(test__f_fss_skip_past_space__works),
+ cmocka_unit_test(test__f_fss_skip_past_space_previous__works),
cmocka_unit_test(test__f_fss_fail_utf__works_for_error),
cmocka_unit_test(test__f_fss_fail_utf_to_false__works_for_error),
cmocka_unit_test(test__f_fss_skip_past_combining_joiner__parameter_checking),
cmocka_unit_test(test__f_fss_skip_past_delimit__parameter_checking),
cmocka_unit_test(test__f_fss_skip_past_space__parameter_checking),
+ cmocka_unit_test(test__f_fss_skip_past_space_previous__parameter_checking),
cmocka_unit_test(test__f_fss_item_delete__parameter_checking),
cmocka_unit_test(test__f_fss_item_destroy__parameter_checking),
#include "test-fss-skip_past_combining_joiner.h"
#include "test-fss-skip_past_delimit.h"
#include "test-fss-skip_past_space.h"
+#include "test-fss-skip_past_space_previous.h"
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
-#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_combining_joiner_) || !defined(_di_f_utf_is_joiner_)
+#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_combining_joiner_) || !defined(_di_f_utf_is_joiner_) || !defined( _di_f_utf_is_zero_width_)
f_status_t private_f_utf_character_is_joiner(const f_utf_char_t sequence) {
if (macro_f_utf_char_t_width_is(sequence) == 3) {
return F_false;
}
-#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_combining_joiner_) || !defined(_di_f_utf_is_joiner_)
+#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_combining_joiner_) || !defined(_di_f_utf_is_joiner_) || !defined( _di_f_utf_is_zero_width_)
#ifdef __cplusplus
} // extern "C"
* @see f_utf_is_alphabetic_numeric()
* @see f_utf_is_combining_joiner()
* @see f_utf_is_joiner()
+ * @see f_utf_is_zero_width()
*/
-#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_joiner_)
+#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_joiner_) || !defined( _di_f_utf_is_zero_width_)
extern f_status_t private_f_utf_character_is_joiner(const f_utf_char_t sequence) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_joiner_)
+#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_character_is_combining_joiner_) || !defined(_di_f_utf_character_is_joiner_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_joiner_) || !defined( _di_f_utf_is_zero_width_)
#ifdef __cplusplus
} // extern "C"
}
} // for
- if (F_status_is_error(state->status) || state->status == F_interrupt || range->start >= buffer.used || range->start > range->stop) break;
+ if (F_status_is_error(state->status) || range->start >= buffer.used || range->start > range->stop) break;
// All slashes for an open are delimited (because it could represent a slash in the object name).
// For example 'object {' = valid open, name 'object', 'object \{' represents 'object {', 'object \\{' = valid open, name 'object \', 'object \\\{' represents 'object \{', etc..
position_previous = range->start++;
- while (range->start <= range->stop && range->start < buffer.used) {
-
- if (state->interrupt) {
- state->interrupt((void *) state, 0);
- if (F_status_set_fine(state->status) == F_interrupt) break;
- }
+ f_fss_skip_past_space_previous(buffer, range, state, &position_previous);
- if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
-
- if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
- if (f_fss_is_space(buffer, *range, state) == F_false) break;
- }
-
- position_previous = range->start;
-
- f_utf_buffer_increment(buffer, range, 1);
- if (F_status_is_error(state->status)) break;
- } // while
-
- if (F_status_is_error(state->status) || state->status == F_interrupt || range->start >= buffer.used || range->start > range->stop) break;
+ if (F_status_is_error(state->status)) break;
+ if (range->start > range->stop || range->start >= buffer.used) break;
// This is a valid object open/close that has been delimited, save the slash delimit positions.
- if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
+ if (state->status == F_okay_eol) {
newline_last = range->start;
line_start = newline_last + 1;
else if (buffer.string[range->start] == f_fss_embedded_list_open_s.string[0]) {
flag_fl &= ~___fl_flag_has_graph_first___;
before_list_open = position_previous;
- position_previous = range->start;
+ position_previous = range->start++;
// TODO: needs combining/joiner check.
- state->status = f_utf_buffer_increment(buffer, range, 1);
- if (F_status_is_error(state->status)) break;
-
- while (range->start <= range->stop && range->start < buffer.used) {
-
- if (state->interrupt) {
- state->interrupt((void *) state, 0);
- if (F_status_set_fine(state->status) == F_interrupt) break;
- }
-
- if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
-
- if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
- if (f_fss_is_space(buffer, *range, state) == F_false) break;
- }
-
- position_previous = range->start;
-
- f_utf_buffer_increment(buffer, range, 1);
- if (F_status_is_error(state->status)) break;
- } // while
+ f_fss_skip_past_space_previous(buffer, range, state, &position_previous);
- if (F_status_is_error(state->status) || state->status == F_interrupt || range->start >= buffer.used || range->start > range->stop) break;
+ if (F_status_is_error(state->status)) break;
+ if (range->start > range->stop || range->start >= buffer.used) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (++depth >= cache->objects->size) {
// TODO: needs combining/joiner check.
- while (range->start <= range->stop && range->start < buffer.used) {
+ f_fss_skip_past_space_previous(buffer, range, state, &position_previous);
- if (state->interrupt) {
- state->interrupt((void *) state, 0);
- if (F_status_set_fine(state->status) == F_interrupt) break;
- }
-
- position_previous = range->start;
-
- state->status = f_utf_buffer_increment(buffer, range, 1);
- if (F_status_is_error(state->status) || buffer.string[range->start] == f_fss_eol_s.string[0]) break;
-
- if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
- if (f_fss_is_space(buffer, *range, state) == F_false || F_status_is_error(state->status)) break;
- }
- } // while
-
- if (F_status_is_error(state->status) || state->status == F_interrupt || range->start >= buffer.used || range->start > range->stop) break;
+ if (F_status_is_error(state->status)) break;
+ if (range->start > range->stop || range->start >= buffer.used) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (depth >= found->used) {
if (F_status_is_error(state->status)) break;
} // while
- if (F_status_is_error(state->status) || state->status == F_interrupt) break;
+ if (F_status_is_error(state->status)) break;
}
}
else if (buffer.string[range->start] == f_fss_comment_s.string[0] && (flag_fl & ___fl_flag_has_graph_first___)) {
if (F_status_is_error(state->status)) break;
if (range->start > range->stop || range->start >= buffer.used) break;
- if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
+ if (state->status == F_okay_eol) {
newline_last = range->start;
line_start = range->start + 1;
if (range->start > range->stop || range->start >= buffer.used) break;
// Found a valid content close, set stop point to last newline.
- if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
+ if (state->status == F_okay_eol) {
close->start = line_start;
close->stop = range->start - 1;
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: f_string_dynamic_strip_null().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: f_string_dynamic_append().
* Errors (with error bit) from: f_string_dynamic_strip_null().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: f_string_dynamic_append().
* Errors (with error bit) from: f_string_dynamic_append_assure().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: f_string_dynamic_append().
* Errors (with error bit) from: f_string_dynamic_append_assure().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_string_dynamic_strip_null().
*
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_conversion_number_signed_to_string().
* Errors (with error bit) from: f_string_dynamic_append_assure().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_conversion_number_unsigned_to_string().
* Errors (with error bit) from: f_string_dynamic_append_assure().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_string_dynamic_append_assure().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: private_fl_payload_header_map_number_unsigned().
* Errors (with error bit) from: private_fl_payload_helper_header_map_destination_write_buffer().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_string_dynamic_append_assure().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: private_fl_payload_header_map_number_unsigned().
* Errors (with error bit) from: private_fl_payload_helper_header_map_destination_write_buffer().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_string_dynamic_append_assure().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: f_string_dynamic_append_assure().
* Errors (with error bit) from: f_string_dynamic_strip_null().
* Errors (with error bit) from: private_fl_fss_basic_write().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* Errors (with error bit) from: private_fl_fss_basic_write().
* Errors (with error bit) from: private_fl_payload_header_map_number_unsigned().
* Errors (with error bit) from: private_fl_payload_helper_header_map_destination_write_buffer().
- *
- * Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
*
* The buffer to seek through.
* @param range
* The start/stop location within the buffer string to process.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the bytes are written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Error bit designates an error but must be passed along with F_interrupt.
* All other statuses are ignored.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* The destination.used value before any operations were performed.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Error bit designates an error but must be passed along with F_interrupt.
* All other statuses are ignored.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A set of all locations where a valid object was found.
+ *
+ * Must not be NULL.
* @param quote
* (optional) This will store the quote type representing the character to use (from the f_fss_quote_type_*_e).
*
* @param delimits
* An array of delimits detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Errors (with error bit) from: f_utf_buffer_increment().
* Errors (with error bit) from: f_utf_is_combining_joiner().
*
+ * Must not be NULL.
+ *
* @see f_memory_array_increase()
* @see f_memory_array_increase_by()
* @see f_fss_is_combining_joiner()
* As Content, this does nothing special in regards to a leading '#'.
* @param object
* The string to write as (does not stop at NULLS, they are ignored and not written).
+ *
+ * Must not be NULL.
* @param quote
- * If 0, then double quotes are auto-inserted, when required.
+ * If NULL, then double quotes are auto-inserted, when required.
* Otherwise, this is quote character to wrap the object in when writing.
* @param range
* The start/stop location within the object string to write as an object.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Error bit designates an error but must be passed along with F_interrupt.
* All other statuses are ignored.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
* F_okay_eos on success after reaching the end of the buffer.
* The destination.used value before any operations were perfomed.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Error bit designates an error but must be passed along with F_interrupt.
* All other statuses are ignored.
*
+ * Must not be NULL.
+ *
* This alters state.status:
* F_okay on success.
*