The iki_read must still print the unmatched variables.
The `iki_read_process_line()` is indeed still valid to have.
The total should still be printed even when there is no data or the start range is out of range.
This ensures that a 0 is printed in these situations.
There may or may not be eki_read fixes needed but runtime tests do not exist for that yet.
A follow up commit shall address this.
main->callback.print_data(&main->program.output, j);
}
}
+ else {
+
+ // Unmatched names are printed as-is (the entire variable).
+ f_print_dynamic_partial(main->cache.buffer, data->variable.array[j], main->program.output.to);
+ }
}
else if (main->setting.flag & iki_read_main_flag_at_d) {
if (at++ == main->setting.at) {
f_range_t range = macro_f_range_t_initialize_2(main->cache.buffer.used);
- iki_read_process_line(main, &range); // @fixme is this valid here anymore?
+ iki_read_process_line(main, &range);
if (main->setting.state.status == F_true || main->setting.state.status == F_data_not) {
if (main->setting.state.status == F_data_not || range.start > main->cache.buffer.used) {
main->callback.print_data(&main->program.output, j);
}
}
+ else {
+
+ // Unmatched names are printed as-is (the entire variable).
+ f_print_dynamic_partial(main->cache.buffer, data->variable.array[j], main->program.output.to);
+ }
}
else if (main->setting.flag & iki_read_main_flag_at_d) {
if (at++ == main->setting.at) {
f_range_t range = macro_f_range_t_initialize_2(main->cache.buffer.used);
- iki_read_process_line(main, &range); // @fixme is this valid here anymore?
+ iki_read_process_line(main, &range);
if (main->setting.state.status == F_true || main->setting.state.status == F_data_not) {
if (main->setting.state.status == F_data_not || range.start > main->cache.buffer.used) {
if (main->setting.flag & iki_read_main_flag_whole_d) {
iki_read_process_line(main, &buffer_range);
- if (main->setting.state.status == F_data_not || main->setting.state.status == F_true && buffer_range.start > main->cache.buffer.used) {
- main->setting.state.status = F_data_not;
-
- return;
- }
-
if (main->setting.flag & iki_read_main_flag_total_d) {
if (main->callback.process_buffer_total) {
main->callback.process_buffer_total(main);
return;
}
+ if (main->setting.state.status == F_data_not || main->setting.state.status == F_true && buffer_range.start > main->cache.buffer.used) {
+ main->setting.state.status = F_data_not;
+
+ return;
+ }
+
if (main->callback.process_buffer_ranges_whole) {
main->callback.process_buffer_ranges_whole(main, &buffer_range);
}