}
// This standard does not support multiple content groups.
- if (select) return F_none;
+ if (select) {
+ if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ fll_print_format("%r%r", data->main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
+ }
+
+ return F_none;
+ }
}
}
f_array_length_t total = 0;
for (i = 0; i < items->used; ++i) {
+
if (skip[i]) continue;
++total;
+
+ if (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
+ for (j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; ++j) {
+
+ if (!data->buffer.string[j]) continue;
+
+ if (data->buffer.string[j] == f_string_eol_s.string[0]) {
+ ++total;
+ }
+ } // for
+
+ // When printing both Objects and Content, the closing brace must also be counted.
+ ++total;
+ }
} // for
fll_print_format("%ul%r", data->main->output.to.stream, total, f_string_eol_s);
return F_none;
}
+ if (data->main->parameters.array[fss_embedded_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ for (i = 0; i < items->used; ++i) {
+
+ if (skip[i]) continue;
+
+ fll_print_format("%r%r", data->main->output.to.stream, f_string_ascii_1_s, f_string_eol_s);
+
+ return F_none;
+ } // for
+
+ fll_print_format("%r%r", data->main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
+
+ return F_none;
+ }
+
f_status_t (*print_object)(const f_string_static_t, const f_string_range_t, const f_array_lengths_t, FILE *) = &f_print_except_dynamic_partial;
if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
}
// Process contents.
- bool include_empty = 0;
-
- if (data->main->parameters.array[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) {
- include_empty = 1;
- }
+ const bool include_empty = (data->main->parameters.array[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) ? 1 : 0;
if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
f_array_length_t total = 0;
return F_none;
}
+ if (data->main->parameters.array[fss_embedded_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ for (i = 0; i < items->used; ++i) {
+
+ if (skip[i]) continue;
+
+ if (items->array[i].content.used || data->main->parameters.array[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) {
+ fll_print_format("%r%r", data->main->output.to.stream, f_string_ascii_1_s, f_string_eol_s);
+
+ return F_none;
+ }
+ } // for
+
+ fll_print_format("%r%r", data->main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
+
+ return F_none;
+ }
+
if (data->main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
f_array_length_t line_current = 0;