There is now a "none" equivalent that performs a "trim".
* - next: Complete as if this is a piece of a set (such as FSS-0001, adding a separating space).
* - partial: Complete, but do not add terminating EOL, where applicable.
* - partial_trim: Complete, but do not add terminating EOL and remove any leading or trailing whitespace, where applicable.
+ * - trim: Only print the Object or Content, trimmed where applicable, without any closing or terminating characters.
*/
#ifndef _di_f_fss_complete_e_
enum {
f_fss_complete_next_e,
f_fss_complete_partial_e,
f_fss_complete_partial_trim_e,
+ f_fss_complete_trim_e,
}; // enum
#endif // _di_f_fss_complete_e_
destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
}
- if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
if (status == F_none_stop || status == F_none_eos || status == F_data_not_stop || status == F_data_not_eos) {
f_status_t status2 = F_none;
- if (complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_quote_double_s.string[0], destination_used, state, destination);
if (F_status_is_error(status2)) {
}
}
- status2 = f_string_dynamic_increase(state.step_large, destination);
+ if (complete != f_fss_complete_trim_e) {
+ status2 = f_string_dynamic_increase(state.step_large, destination);
- if (F_status_is_error(status2)) {
- destination->used = destination_used;
+ if (F_status_is_error(status2)) {
+ destination->used = destination_used;
- return status2;
- }
+ return status2;
+ }
- destination->string[destination->used++] = f_fss_basic_open_s.string[0];
+ destination->string[destination->used++] = f_fss_basic_open_s.string[0];
+ }
}
}
return status;
}
- if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
- if (complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
+ if (complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
status = private_fl_fss_basic_list_write_object_trim(destination_used, state, destination);
if (F_status_is_error(status)) {
}
}
- status = f_string_dynamic_increase(state.step_small + 2, destination);
+ if (complete != f_fss_complete_trim_e) {
+ status = f_string_dynamic_increase(state.step_small + 2, destination);
- if (F_status_is_error(status)) {
- destination->used = destination_used;
+ if (F_status_is_error(status)) {
+ destination->used = destination_used;
- return status;
- }
+ return status;
+ }
- destination->string[destination->used++] = f_fss_basic_list_open_s.string[0];
+ destination->string[destination->used++] = f_fss_basic_list_open_s.string[0];
- if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
- destination->string[destination->used++] = f_fss_basic_list_open_end_s.string[0];
+ if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
+ destination->string[destination->used++] = f_fss_basic_list_open_end_s.string[0];
+ }
}
}
return status;
}
- if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
- if (complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
+ if (complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
status = private_fl_fss_basic_list_write_object_trim(destination_used, state, destination);
if (F_status_is_error(status)) {
ends_on_space = F_true;
}
- status = f_string_dynamic_increase_by(state.step_small + 3, destination);
+ if (complete != f_fss_complete_trim_e) {
+ status = f_string_dynamic_increase_by(state.step_small + 3, destination);
- if (F_status_is_error(status)) {
- destination->used = destination_used;
+ if (F_status_is_error(status)) {
+ destination->used = destination_used;
- return status;
- }
+ return status;
+ }
- if (!ends_on_space) {
- destination->string[destination->used++] = f_fss_space_s.string[0];
- }
+ if (!ends_on_space) {
+ destination->string[destination->used++] = f_fss_space_s.string[0];
+ }
- destination->string[destination->used++] = f_fss_embedded_list_open_s.string[0];
+ destination->string[destination->used++] = f_fss_embedded_list_open_s.string[0];
- if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
- destination->string[destination->used++] = f_fss_embedded_list_open_end_s.string[0];
+ if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
+ destination->string[destination->used++] = f_fss_embedded_list_open_end_s.string[0];
+ }
}
}
destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
}
- if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
if (status == F_none_stop || status == F_none_eos || status == F_data_not_stop || status == F_data_not_eos) {
f_status_t status2 = F_none;
- if (complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_quote_double_s.string[0], destination_used, state, destination);
if (F_status_is_error(status2)) {
}
}
- status2 = f_string_dynamic_increase(state.step_large, destination);
+ if (complete != f_fss_complete_trim_e) {
+ status2 = f_string_dynamic_increase(state.step_large, destination);
- if (F_status_is_error(status2)) {
- destination->used = destination_used;
+ if (F_status_is_error(status2)) {
+ destination->used = destination_used;
- return status2;
- }
+ return status2;
+ }
- destination->string[destination->used++] = f_fss_extended_open_s.string[0];
+ destination->string[destination->used++] = f_fss_extended_open_s.string[0];
+ }
}
}
return status;
}
- if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
- if (complete == f_fss_complete_full_trim_e) {
+ if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
+ if (complete == f_fss_complete_full_trim_e || complete == f_fss_complete_trim_e) {
status = private_fl_fss_basic_list_write_object_trim(destination_used, state, destination);
if (F_status_is_error(status)) {
ends_on_space = F_true;
}
- status = f_string_dynamic_increase_by(state.step_small + 3, destination);
+ if (complete != f_fss_complete_trim_e) {
+ status = f_string_dynamic_increase_by(state.step_small + 3, destination);
- if (F_status_is_error(status)) {
- destination->used = destination_used;
+ if (F_status_is_error(status)) {
+ destination->used = destination_used;
- return status;
- }
+ return status;
+ }
- if (!ends_on_space) {
- destination->string[destination->used++] = f_fss_space_s.string[0];
- }
+ if (!ends_on_space) {
+ destination->string[destination->used++] = f_fss_space_s.string[0];
+ }
- destination->string[destination->used++] = f_fss_extended_list_open_s.string[0];
+ destination->string[destination->used++] = f_fss_extended_list_open_s.string[0];
- if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
- destination->string[destination->used++] = f_fss_extended_list_open_end_s.string[0];
+ if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
+ destination->string[destination->used++] = f_fss_extended_list_open_end_s.string[0];
+ }
}
}