From b3b044df997b456b3a8af19378f06e6babf8e9e7 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 3 Feb 2024 14:12:58 -0600 Subject: [PATCH] Progress: Continue working on fl_fss_payload_header_map(). The current state is being saved so that I can refactor the f_string_quantity_t and related into f_quantity_t. --- level_0/f_fss/c/fss/payload.h | 22 +-- level_1/fl_fss/c/fss/payload.c | 44 ++++-- level_1/fl_fss/c/fss/payload.h | 12 ++ level_1/fl_fss/c/fss/payload/define.h | 2 +- level_1/fl_fss/c/fss/private-payload.c | 235 ++++++++++++++++++++++++++++++++- level_1/fl_fss/c/fss/private-payload.h | 106 ++++++++++++++- 6 files changed, 397 insertions(+), 24 deletions(-) diff --git a/level_0/f_fss/c/fss/payload.h b/level_0/f_fss/c/fss/payload.h index c52a8be..2ecd034 100644 --- a/level_0/f_fss/c/fss/payload.h +++ b/level_0/f_fss/c/fss/payload.h @@ -38,10 +38,13 @@ extern "C" { * - null_map_value: Types of map and maps has empty strings (such as "") added for NULL values (used is 0) for the map value. * - null_map_name_value: An enumeration value representing both null_map_name and null_map_value keys being set. * - null_maps: Types of dynamic and dynamics have empty strings (such as "") added for when null_map_key and null_map_value are not set and both map key and map value have NULL values (used is 0). + * - null_range: Types of range and ranges have empty strings (such as "") for when start > stop, aka NULL ranges. + * - null_ranges: Types of ranges have empty strings (such as "") added for when the array is empty. * - null_string: Types of string and strings have empty strings (such as "") for NULL values. * - null_triple_a: Types of triple and triples has empty strings (such as "") added for NULL values (used is 0) for the "a" property. * - null_triple_b: Types of triple and triples has empty strings (such as "") added for NULL values (used is 0) for the "b" property. * - null_triple_c: Types of triple and triples has empty strings (such as "") added for NULL values (used is 0) for the "c" property. + * - null_triples: Types of triples have empty strings (such as "") added for when the array is empty. * - quote_double: Use double quotes (U+0022) when quoting strings. * - quote_grave: Use grave (U+0060) when quoting strings. * - quote_single: Use single quotes (U+0027) when quoting strings. @@ -65,14 +68,17 @@ extern "C" { f_fss_payload_header_map_flag_null_map_value_e = 0x1000, f_fss_payload_header_map_flag_null_map_name_value_e = 0x2000, f_fss_payload_header_map_flag_null_maps_e = 0x4000, - f_fss_payload_header_map_flag_null_triple_a_e = 0x8000, - f_fss_payload_header_map_flag_null_triple_b_e = 0x10000, - f_fss_payload_header_map_flag_null_triple_c_e = 0x20000, - f_fss_payload_header_map_flag_null_string_e = 0x40000, - f_fss_payload_header_map_flag_quote_double_e = 0x80000, - f_fss_payload_header_map_flag_quote_grave_e = 0x100000, - f_fss_payload_header_map_flag_quote_single_e = 0x200000, - f_fss_payload_header_map_flag_last_e = 0x400000, + f_fss_payload_header_map_flag_null_range_e = 0x8000, + f_fss_payload_header_map_flag_null_ranges_e = 0x10000, + f_fss_payload_header_map_flag_null_string_e = 0x20000, + f_fss_payload_header_map_flag_null_triple_a_e = 0x40000, + f_fss_payload_header_map_flag_null_triple_b_e = 0x80000, + f_fss_payload_header_map_flag_null_triple_c_e = 0x100000, + f_fss_payload_header_map_flag_null_triples_e = 0x200000, + f_fss_payload_header_map_flag_quote_double_e = 0x400000, + f_fss_payload_header_map_flag_quote_grave_e = 0x800000, + f_fss_payload_header_map_flag_quote_single_e = 0x1000000, + f_fss_payload_header_map_flag_last_e = 0x2000000, }; // enum #endif // _di_f_fss_payload_header_map_flag_e_ diff --git a/level_1/fl_fss/c/fss/payload.c b/level_1/fl_fss/c/fss/payload.c index 7a9a5d0..9d0d7c5 100644 --- a/level_1/fl_fss/c/fss/payload.c +++ b/level_1/fl_fss/c/fss/payload.c @@ -103,11 +103,9 @@ extern "C" { data->cache->used = 0; if (private_fl_payload_header_map_number_signed(data, state, &internal, headers.array[internal.i].value.is.a_signed) == F_false) { - private_fl_payload_header_map_cache(data, state, &internal); - } - - if (F_status_is_error_not(state->status)) { - ++destinations->used; + if (private_fl_payload_header_map_cache_write(data, state, &internal) == F_false) { + ++destinations->used; + } } break; @@ -116,11 +114,9 @@ extern "C" { data->cache->used = 0; if (private_fl_payload_header_map_number_unsigned(data, state, &internal, headers.array[internal.i].value.is.a_unsigned) == F_false) { - private_fl_payload_header_map_cache(data, state, &internal); - } - - if (F_status_is_error_not(state->status)) { - ++destinations->used; + if (private_fl_payload_header_map_cache_write(data, state, &internal) == F_false) { + ++destinations->used; + } } break; @@ -193,6 +189,7 @@ extern "C" { private_fl_payload_header_map_strings(data, state, &internal, headers.array[internal.i].value.is.a_strings, destinations); } else if (data->flag & f_fss_payload_header_map_flag_null_string_e) { + // @todo handle join flags. state->status = f_string_dynamic_append(internal.quote_null, &destinations->array[destinations->used].value); if (F_status_is_error(state->status)) break; @@ -219,6 +216,7 @@ extern "C" { private_fl_payload_header_map_dynamics(data, state, &internal, &headers.array[internal.i].value.is.a_dynamics, destinations); } else if (data->flag & f_fss_payload_header_map_flag_null_dynamic_e) { + // @todo handle join flags. state->status = f_string_dynamic_append(internal.quote_null, &destinations->array[destinations->used].value); if (F_status_is_error(state->status)) break; @@ -255,7 +253,8 @@ extern "C" { if (headers.array[internal.i].value.is.a_maps.used) { private_fl_payload_header_map_maps(data, state, &internal, &headers.array[internal.i].value.is.a_maps, destinations); } - else if (data->flag & f_fss_payload_header_map_flag_join_maps_e) { + else if (data->flag & f_fss_payload_header_map_flag_null_maps_e) { + // @todo handle join flags. state->status = f_string_dynamic_append(internal.quote_null, &destinations->array[destinations->used].value); if (F_status_is_error(state->status)) break; @@ -267,7 +266,6 @@ extern "C" { break; -// @todo resume after here. case f_abstruse_map_multi_e: // @todo break; @@ -282,10 +280,30 @@ extern "C" { break; case f_abstruse_range_e: + if (headers.array[internal.i].value.is.a_range.start <= headers.array[internal.i].value.is.a_range.stop || (data->flag & f_fss_payload_header_map_flag_null_range_e)) { + if (private_fl_payload_header_map_range(data, state, &internal, headers.array[internal.i].value.is.a_range, destinations) == F_false) { + ++destinations->used; + } + } + else if (data->flag & f_fss_payload_header_map_flag_null_e) { + ++destinations->used; + } + + break; + case f_abstruse_ranges_e: - // @todo + if (headers.array[internal.i].value.is.a_ranges.used || (data->flag & f_fss_payload_header_map_flag_null_ranges_e)) { + if (private_fl_payload_header_map_ranges(data, state, &internal, headers.array[internal.i].value.is.a_ranges, destinations) == F_false) { + ++destinations->used; + } + } + else if (data->flag & f_fss_payload_header_map_flag_null_e) { + ++destinations->used; + } + break; +// @todo resume after here. case f_abstruse_triple_e: // @todo update this. data->cache->used = 0; diff --git a/level_1/fl_fss/c/fss/payload.h b/level_1/fl_fss/c/fss/payload.h index 6f18ec8..1ece8a3 100644 --- a/level_1/fl_fss/c/fss/payload.h +++ b/level_1/fl_fss/c/fss/payload.h @@ -36,6 +36,18 @@ extern "C" { #endif /** + * Special print strings. + * + * FL_fss_payload_*_d: + * - digit_size_1: A default buffer size to use when allocating space for digit conversions of one digit. + * - digit_size_2: A default buffer size to use when allocating space for digit conversions of two digits. + */ +#ifndef _di_fl_fss_payload_d_ + #define FL_payload_digit_size_1_d 32 + #define FL_payload_digit_size_2_d 64 +#endif // _di_fl_fss_payload_d_ + +/** * Write standard header of the FSS-000E (Payload). * * This implementation does not handle the following f_abstruse_*_e: diff --git a/level_1/fl_fss/c/fss/payload/define.h b/level_1/fl_fss/c/fss/payload/define.h index 5595469..6dab431 100644 --- a/level_1/fl_fss/c/fss/payload/define.h +++ b/level_1/fl_fss/c/fss/payload/define.h @@ -100,7 +100,7 @@ extern "C" { } /* for */ \ \ if (data->cache->used && (data->flag & f_fss_payload_header_map_flag_join_digits_e)) { \ - private_fl_payload_header_map_cache(data, state, &internal); \ + private_fl_payload_header_map_cache_write(data, state, &internal); \ \ if (F_status_is_error_not(state->status)) { \ ++destinations->used; \ diff --git a/level_1/fl_fss/c/fss/private-payload.c b/level_1/fl_fss/c/fss/private-payload.c index 47b4a27..ae09146 100644 --- a/level_1/fl_fss/c/fss/private-payload.c +++ b/level_1/fl_fss/c/fss/private-payload.c @@ -7,7 +7,7 @@ extern "C" { #endif #if !defined(_di_fl_fss_payload_header_map_) - uint8_t private_fl_payload_header_map_cache(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal) { + uint8_t private_fl_payload_header_map_cache_write(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal) { if (!data->cache->used) return F_false; @@ -407,6 +407,239 @@ extern "C" { #endif // !defined(_di_fl_fss_payload_header_map_) #if !defined(_di_fl_fss_payload_header_map_) + uint8_t private_fl_payload_header_map_range(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal, const f_range_t range, f_string_maps_t * const destinations) { + + if (range.start > range.stop) { + if (data->flag & f_fss_payload_header_map_flag_null_range_e) { + if (data->flag & f_fss_payload_header_map_flag_join_range_e) { + data->cache->used = 0; + + state->status = f_memory_array_increase_by(internal->quote_null.used + internal->quote_null.used + f_fss_extended_next_s.used, sizeof(f_char_t), (void **) &data->cache->string, &data->cache->used, &data->cache->size); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append_assure(f_fss_space_s, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } + else { + state->status = f_memory_array_increase_by(internal->quote_null.used + internal->quote_null.used + f_fss_extended_next_s.used, sizeof(f_char_t), (void **) &destinations->array[destinations->used].value.string, &destinations->array[destinations->used].value.used, &destinations->array[destinations->used].value.size); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append_assure(f_fss_extended_next_s, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + } + } + } + else { + data->cache->used = 0; + + if (private_fl_payload_header_map_number_unsigned(data, state, internal, range.start) == F_true) return F_true; + + if (data->flag & f_fss_payload_header_map_flag_join_range_e) { + if (private_fl_payload_header_map_number_unsigned(data, state, internal, range.stop) == F_true) return F_true; + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } + else { + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + + state->status = f_string_dynamic_append_assure(f_fss_extended_next_s, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + data->cache->used = 0; + + if (private_fl_payload_header_map_number_unsigned(data, state, internal, range.stop) == F_true) return F_true; + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } + } + + state->status = F_okay; + + return F_false; + } +#endif // !defined(_di_fl_fss_payload_header_map_) + +#if !defined(_di_fl_fss_payload_header_map_) + uint8_t private_fl_payload_header_map_ranges(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal, const f_ranges_t ranges, f_string_maps_t * const destinations) { + + if (ranges.used) { + internal->k = 0; + + for (internal->l = 0; internal->l < ranges.used; ++internal->l) { + + if (ranges.array[internal->l].start > ranges.array[internal->l].stop) { + internal->k += FL_payload_digit_size_2_d + f_fss_extended_next_s.used + internal->quote_null.used + internal->quote_null.used; + } + else if (data->flag & f_fss_payload_header_map_flag_null_range_e) { + internal->k += f_fss_extended_next_s.used + internal->quote_null.used + internal->quote_null.used; + } + } // for + + state->status = f_memory_array_increase_by(internal->k, sizeof(f_char_t), (void **) &destinations->array[destinations->used].value.string, &destinations->array[destinations->used].value.used, &destinations->array[destinations->used].value.size); + if (F_status_is_error(state->status)) return F_true; + + if (data->flag & f_fss_payload_header_map_flag_join_ranges_e) { + data->cache->used = 0; + + state->status = f_memory_array_increase_by(internal->k, sizeof(f_char_t), (void **) &data->cache->string, &data->cache->used, &data->cache->size); + if (F_status_is_error(state->status)) return F_true; + + for (internal->l = 0; internal->l < ranges.used; ++internal->l) { + + if (ranges.array[internal->l].start > ranges.array[internal->l].stop) { + if (data->flag & f_fss_payload_header_map_flag_null_range_e) { + if (data->cache->used) { + state->status = f_string_dynamic_append_assure(f_fss_space_s, data->cache); + if (F_status_is_error(state->status)) return F_true; + } + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append_assure(f_fss_space_s, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + } + + continue; + } + + if (private_fl_payload_header_map_number_unsigned(data, state, internal, ranges.array[internal->l].start) == F_true) return F_true; + if (private_fl_payload_header_map_number_unsigned(data, state, internal, ranges.array[internal->l].stop) == F_true) return F_true; + } // for + + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } + else { + data->cache->used = 0; + + if (data->flag & f_fss_payload_header_map_flag_join_range_e) { + state->status = f_memory_array_increase_by(FL_payload_digit_size_2_d, sizeof(f_char_t), (void **) &data->cache->string, &data->cache->used, &data->cache->size); + if (F_status_is_error(state->status)) return F_true; + + for (internal->l = 0; internal->l < ranges.used; ++internal->l) { + + if (ranges.array[internal->l].start > ranges.array[internal->l].stop) { + if (data->flag & f_fss_payload_header_map_flag_null_range_e) { + data->cache->used = 0; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append_assure(f_fss_space_s, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } + + continue; + } + + data->cache->used = 0; + + if (private_fl_payload_header_map_number_unsigned(data, state, internal, ranges.array[internal->l].start) == F_true) return F_true; + if (private_fl_payload_header_map_number_unsigned(data, state, internal, ranges.array[internal->l].stop) == F_true) return F_true; + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } // for + } + else { + state->status = f_memory_array_increase_by(FL_payload_digit_size_1_d, sizeof(f_char_t), (void **) &data->cache->string, &data->cache->used, &data->cache->size); + if (F_status_is_error(state->status)) return F_true; + + for (internal->l = 0; internal->l < ranges.used; ++internal->l) { + + if (ranges.array[internal->l].start > ranges.array[internal->l].stop) { + if (data->flag & f_fss_payload_header_map_flag_null_range_e) { + state->status = f_string_dynamic_append(internal->quote_null, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + } + + state->status = f_string_dynamic_append_assure(f_fss_extended_next_s, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + continue; + } + + data->cache->used = 0; + + if (private_fl_payload_header_map_number_unsigned(data, state, internal, ranges.array[internal->l].start) == F_true) return F_true; + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + + data->cache->used = 0; + + state->status = f_string_dynamic_append_assure(f_fss_extended_next_s, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + if (private_fl_payload_header_map_number_unsigned(data, state, internal, ranges.array[internal->l].stop) == F_true) return F_true; + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + + state->status = f_string_dynamic_append_assure(f_fss_extended_next_s, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + } // for + + // Remove the always added trailing space (except when all ranges are NULL and f_fss_payload_header_map_flag_null_range_e is not set). + if (destinations->array[destinations->used].value.used) { + destinations->array[destinations->used].value.used -= f_fss_extended_next_s.used; + } + } + } + } + else { + if (data->flag & f_fss_payload_header_map_flag_null_ranges_e) { + if (data->flag & (f_fss_payload_header_map_flag_join_ranges_e | f_fss_payload_header_map_flag_join_ranges_e)) { + data->cache->used = 0; + + state->status = f_memory_array_increase_by(internal->quote_null.used + internal->quote_null.used + f_fss_space_s.used, sizeof(f_char_t), (void **) &data->cache->string, &data->cache->used, &data->cache->size); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(f_fss_space_s, data->cache); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, data->cache); + if (F_status_is_error(state->status)) return F_true; + + if (private_fl_payload_header_map_cache_write(data, state, internal) == F_true) return F_true; + } + else { + state->status = f_string_dynamic_append(internal->quote_null, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(f_fss_extended_next_s, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + + state->status = f_string_dynamic_append(internal->quote_null, &destinations->array[destinations->used].value); + if (F_status_is_error(state->status)) return F_true; + } + } + } + + state->status = F_okay; + + return F_false; + } +#endif // !defined(_di_fl_fss_payload_header_map_) + +#if !defined(_di_fl_fss_payload_header_map_) uint8_t private_fl_payload_header_map_strings(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal, f_string_t * const buffers, f_string_maps_t * const destinations) { f_string_static_t string_static = f_string_static_t_initialize; diff --git a/level_1/fl_fss/c/fss/private-payload.h b/level_1/fl_fss/c/fss/private-payload.h index c816e5d..b0bfbb3 100644 --- a/level_1/fl_fss/c/fss/private-payload.h +++ b/level_1/fl_fss/c/fss/private-payload.h @@ -48,7 +48,7 @@ extern "C" { * @see fl_fss_payload_header_map() */ #if !defined(_di_fl_fss_payload_header_map_) - extern uint8_t private_fl_payload_header_map_cache(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal) F_attribute_visibility_internal_d; + extern uint8_t private_fl_payload_header_map_cache_write(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_payload_header_map_) /** @@ -372,6 +372,110 @@ extern "C" { #endif // !defined(_di_fl_fss_payload_header_map_) /** + * Process the range, writing it into the packet with the appropriate escaping as necessary. + * + * This expects that the appropriate used and flag checks are performed prior to calling this. + * + * @param headers + * An abstruse map representing individual headers. + * @param data + * The f_fss_payload_header_state_t pointer. + * This modifies data.cache. + * Must not be NULL. + * @param state + * The state passed directly from the fl_fss_payload_header_map() parameters. + * + * 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_append(). + * 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, f_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map(). + * Must not be NULL. + * @param range + * The range to process. + * @param destinations + * A map of strings representing the header names and values after being safely converted into the valid payload header format. + * This built header names and values are appended onto this. + * This is updated as appropriate. + * Must not be NULL. + * + * @return + * F_true if the caller should break or exit due to an error or something similar. + * F_false, otherwise. + * + * @see f_memory_array_increase_by() + * @see f_string_dynamic_append() + * @see f_string_dynamic_append_assure() + * @see f_string_dynamic_strip_null() + * + * @see private_fl_fss_basic_write() + * + * @see fl_fss_payload_header_map() + */ +#if !defined(_di_fl_fss_payload_header_map_) + extern uint8_t private_fl_payload_header_map_range(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal, const f_range_t range, f_string_maps_t * const destinations) F_attribute_visibility_internal_d; +#endif // !defined(_di_fl_fss_payload_header_map_) + +/** + * Process the range, writing it into the packet with the appropriate escaping as necessary. + * + * This expects that the appropriate used and flag checks are performed prior to calling this. + * + * @param headers + * An abstruse map representing individual headers. + * @param data + * The f_fss_payload_header_state_t pointer. + * This modifies data.cache. + * Must not be NULL. + * @param state + * The state passed directly from the fl_fss_payload_header_map() parameters. + * + * This alters state.status: + * F_okay on success. + * + * Errors (with error bit) from: f_string_dynamic_append(). + * Errors (with error bit) from: f_string_dynamic_append_assure(). + * Errors (with error bit) from: private_fl_fss_basic_write(). + * Errors (with error bit) from: private_fl_payload_header_map_cache_write(). + * Errors (with error bit) from: private_fl_payload_header_map_number_unsigned(). + * + * Must not be NULL. + * @param internal + * The internal state, f_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map(). + * Must not be NULL. + * @param range + * The range to process. + * @param destinations + * A map of strings representing the header names and values after being safely converted into the valid payload header format. + * This built header names and values are appended onto this. + * This is updated as appropriate. + * Must not be NULL. + * + * @return + * F_true if the caller should break or exit due to an error or something similar. + * F_false, otherwise. + * + * @see f_memory_array_increase_by() + * @see f_string_dynamic_append() + * @see f_string_dynamic_append_assure() + * @see f_string_dynamic_strip_null() + * + * @see private_fl_fss_basic_write() + * + * @see fl_fss_payload_header_map() + */ +#if !defined(_di_fl_fss_payload_header_map_) + extern uint8_t private_fl_payload_header_map_ranges(f_fss_payload_header_state_t * const data, f_state_t * const state, f_fss_payload_header_internal_t * const internal, const f_ranges_t ranges, f_string_maps_t * const destinations) F_attribute_visibility_internal_d; +#endif // !defined(_di_fl_fss_payload_header_map_) + +/** * Process the array of NULL terminated strings, writing it into the packet with the appropriate escaping as necessary. * * This expects that the appropriate used and flag checks are performed prior to calling this. -- 1.8.3.1