]> Kevux Git Server - fll/commitdiff
Progress: Continue fixing iki_read (and eki_read).
authorKevin Day <Kevin@kevux.org>
Tue, 17 Dec 2024 03:37:55 +0000 (21:37 -0600)
committerKevin Day <Kevin@kevux.org>
Tue, 17 Dec 2024 03:37:55 +0000 (21:37 -0600)
This addresses some of the `--total` processing.
It looks like I had not completed a lot of that code.
Much of that is added back.

I also noticed that I need to keep tabs on the `--select` parameter.
I will need tests for this and I may have missed some logic cases.
My first objective is to just get the 0.6.x runtime tests to work in 0.7.x.
(Or, I need to fix the 0.6.x tests to be correct.)

The expected next steps:
- Review and address what is left for IKI Read that is incorrect.
- For anything identified in the 0.6.x runtime tests that is invalid shall be fixed in 0.6.x.
- Update the EKI Read with all of the changes from IKI Read.
- Make a copy of the IKI Read runtime tests and see how EKI Read passes or fails.
- Address unexpected failures.
- Fix the tests for expected failures, which would be relating to having multiple Vocabularies/Objects.
- Write all of the new runtime tests for EKI Read.
- Make sure everything all passes.
- I probably need to update the help and describe the order of operations for some parameters.

level_3/iki_read/c/eki/process.c
level_3/iki_read/c/eki/process.h
level_3/iki_read/c/iki/process.c
level_3/iki_read/c/iki/process.h
level_3/iki_read/c/main/print/data.c
level_3/iki_read/c/main/print/data.h
level_3/iki_read/c/main/process.c
level_3/iki_read/c/main/process.h

index 006a7c2968ba93e5ff336f548bd8197e921bec47..3d66ae3987dae9a23781fef891c3784c9c0476b1 100644 (file)
@@ -4,8 +4,8 @@
 extern "C" {
 #endif
 
-#ifndef _di_iki_read_eki_process_buffer_line_
-  void iki_read_eki_process_buffer_line(iki_read_main_t * const main, const f_number_unsigned_t index) {
+#ifndef _di_iki_read_iki_process_buffer_at_
+  void iki_read_eki_process_buffer_at(iki_read_main_t * const main, const f_number_unsigned_t index) {
 
     if (!main || F_status_is_error(main->setting.state.status)) return;
 
@@ -207,7 +207,7 @@ extern "C" {
 
     main->setting.state.status = main->cache.expand.used ? F_okay : F_data_not;
   }
-#endif // _di_iki_read_eki_process_buffer_line_
+#endif // _di_iki_read_iki_process_buffer_at_
 
 #ifndef _di_iki_read_eki_process_buffer_ranges_
   void iki_read_eki_process_buffer_ranges(iki_read_main_t * const main, f_range_t * const range_buffer) {
@@ -223,7 +223,7 @@ extern "C" {
     if ((main->setting.flag & iki_read_main_flag_at_d) && (main->setting.flag & iki_read_main_flag_line_d)) {
       if ((main->setting.flag & iki_read_main_flag_object_d) && main->setting.line) {
         if (main->setting.flag & iki_read_main_flag_total_d) {
-          fll_print_format("0%r", main->program.output.to, f_string_eol_s);
+          iki_read_print_data_total(&main->program.output, 0);
         }
 
         main->setting.state.status = F_data_not;
@@ -272,22 +272,14 @@ extern "C" {
                   ++matches;
                 }
 
-                if (main->setting.flag & iki_read_main_flag_line_d) { // @todo handle --at.
-                  iki_read_eki_process_buffer_line(main, i);
-
-                  // Ensure that a newline is always at the end.
-                  if (main->setting.state.status == F_okay) {
-                    main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-                  }
+                if (main->setting.flag & (iki_read_main_flag_at_d | iki_read_main_flag_line_d)) {
+                  iki_read_eki_process_buffer_at(main, i);
+                  iki_read_process_buffer_at_newline(main);
                 }
               }
               else if (main->setting.flag & iki_read_main_flag_line_d) {
-                iki_read_eki_process_buffer_line(main, i);
-
-                // Ensure that a newline is always at the end.
-                if (main->setting.state.status == F_okay) {
-                  main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-                }
+                iki_read_eki_process_buffer_at(main, i);
+                iki_read_process_buffer_at_newline(main);
               }
               else {
                 f_file_stream_lock(main->program.output.to);
@@ -307,21 +299,21 @@ extern "C" {
 
       if (main->setting.flag & iki_read_main_flag_line_d) {
         if (main->setting.flag & iki_read_main_flag_total_d) {
-          iki_read_print_data_line_total(&main->program.output);
+          iki_read_print_data_total_expand(&main->program.output);
         }
         else {
           iki_read_print_data_line(&main->program.output);
         }
       }
-      else if ((main->setting.flag & iki_read_main_flag_total_d)) {
-        iki_read_print_data_total(
-          &main->program.output,
-          (main->setting.flag & iki_read_main_flag_line_d)
-            ? main->setting.at < matches ? 1 : 0
-            : matches
-        );
+      else if (main->setting.flag & iki_read_main_flag_total_d) {
+        if (main->setting.flag & iki_read_main_flag_at_d) {
+          iki_read_print_data_total_expand(&main->program.output);
+        }
+        else {
+          iki_read_print_data_total(&main->program.output, matches);
+        }
 
-        main->setting.state.status = F_okay;
+        main->setting.state.status = matched ? F_okay : F_data_not;
 
         return;
       }
@@ -336,20 +328,27 @@ extern "C" {
         if (main->setting.flag & iki_read_main_flag_at_d) {
           if (main->setting.at < data->variable.used) {
             if (main->setting.flag & iki_read_main_flag_line_d) {
-              iki_read_eki_process_buffer_line(main, main->setting.at);
-
-              // Ensure that a newline is always at the end.
-              if (main->setting.state.status == F_okay) {
-                main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-              }
+              iki_read_eki_process_buffer_at(main, main->setting.at);
+              iki_read_process_buffer_at_newline(main);
 
               if (main->setting.flag & iki_read_main_flag_total_d) {
-                iki_read_print_data_line_total(&main->program.output);
+                iki_read_print_data_total_expand(&main->program.output);
               }
               else {
                 iki_read_print_data_line(&main->program.output);
               }
             }
+            else if (main->setting.flag & iki_read_main_flag_total_d) {
+              if (main->setting.flag & iki_read_main_flag_object_d) {
+                iki_read_print_data_total(&main->program.output, ((main->setting.flag & iki_read_main_flag_select_d) && main->setting.select) ? 0 : 1);
+              }
+              else {
+                iki_read_eki_process_buffer_at(main, main->setting.at);
+                iki_read_process_buffer_at_newline(main);
+
+                iki_read_print_data_total_expand(&main->program.output);
+              }
+            }
             else {
               f_file_stream_lock(main->program.output.to);
 
@@ -369,6 +368,10 @@ extern "C" {
             }
           }
           else {
+            if (main->setting.flag & iki_read_main_flag_total_d) {
+              iki_read_print_data_total(&main->program.output, 0);
+            }
+
             main->setting.state.status = F_data_not;
           }
         }
@@ -377,21 +380,33 @@ extern "C" {
 
             if (iki_read_signal_check(main)) return;
 
-            iki_read_eki_process_buffer_line(main, i);
-
-            // Ensure that a newline is always at the end.
-            if (main->setting.state.status == F_okay) {
-              main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-            }
+            iki_read_eki_process_buffer_at(main, i);
+            iki_read_process_buffer_at_newline(main);
           } // for
 
           if (main->setting.flag & iki_read_main_flag_total_d) {
-            iki_read_print_data_line_total(&main->program.output);
+            iki_read_print_data_total_expand(&main->program.output);
           }
           else {
             iki_read_print_data_line(&main->program.output);
           }
         }
+        else if (main->setting.flag & iki_read_main_flag_total_d) {
+          if (main->setting.flag & iki_read_main_flag_object_d) {
+            iki_read_print_data_total(&main->program.output, ((main->setting.flag & iki_read_main_flag_select_d) && main->setting.select) ? 0 : data->variable.used);
+          }
+          else {
+            for (i = 0; F_status_is_error_not(main->setting.state.status) && i < data->variable.used; ++i) {
+
+              if (iki_read_signal_check(main)) return;
+
+              iki_read_eki_process_buffer_at(main, i);
+              iki_read_process_buffer_at_newline(main);
+            } // for
+
+            iki_read_print_data_total_expand(&main->program.output);
+          }
+        }
         else {
           f_file_stream_lock(main->program.output.to);
 
index 492c83752a29b7ce9038f3e0310505a7f7aeeccb..56d8e1574402370f4f3c04e7be75601b4b0ef45b 100644 (file)
@@ -17,33 +17,43 @@ extern "C" {
 #endif
 
 /**
- * Print the given range at the given index for EKI read, for when printing a single Line in Content and Literal modes.
+ * Process the given range at the given index for EKI read.
  *
- * This expects the caller to have the output locked appropriately.
+ * This expands all of the appropriate Variables so that post-expansion calculations may be performed.
+ * This is particularly useful for preparing to print a single Line in Content and Literal modes.
  *
- * This detects and prints any applicable substitution matching the vocabulary at the given index.
- * If there is no substitution, then this prints the given range at the given index.
+ * @param main
+ *   The main program data.
  *
- * @param print
- *   The output structure to print to.
+ *   Must not be NULL.
  *
  *   The setting.map_wrapss is expected to be defined as a valid pointer to an array.
  *   The setting.map_replacess is expected to be defined as a valid pointer to an array.
  *
- *   This does not alter print.custom.setting.state.status.
+ *   This alters setting.state.status:
+ *     F_okay on success.
+ *     F_data_not on success, but nothing done.
+ *
+ *     F_interrupt (with error bit) on (exit) signal received.
+ *
+ *     Errors (with error bit) from: f_string_dynamic_append_nulless().
+ *     Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
+ *
+ *     Errors (with error bit) from: iki_read_process_wrap_append().
+ *     Errors (with error bit) from: iki_read_process_wrap_prepend().
  * @param index
  *   The index used to identify the desired range in variable, content, and ranges.
  *
- * @see f_print_dynamic()
- * @see f_print_dynamic_partial()
+ * @see f_string_dynamic_append_nulless()
+ * @see f_string_dynamic_partial_append_nulless()
  *
  * @see iki_read_identify_substitution()
- * @see iki_read_print_data_wrap_append()
- * @see iki_read_print_data_wrap_prepend()
+ * @see iki_read_process_wrap_append()
+ * @see iki_read_process_wrap_prepend()
  */
-#ifndef _di_iki_read_eki_process_buffer_line_
-  extern void iki_read_eki_process_buffer_line(iki_read_main_t * const main, const f_number_unsigned_t index);
-#endif // _di_iki_read_eki_process_buffer_line_
+#ifndef _di_iki_read_eki_process_buffer_at_
+  extern void iki_read_eki_process_buffer_at(iki_read_main_t * const main, const f_number_unsigned_t index);
+#endif // _di_iki_read_eki_process_buffer_at_
 
 /**
  * Process a given buffer, printing the given range for EKI read.
index 6d0b0a740482f91cff6cf337bc5a91743c6f36b5..27e2adf270037d228d260a0ab8e8051f118f18a6 100644 (file)
@@ -4,8 +4,8 @@
 extern "C" {
 #endif
 
-#ifndef _di_iki_read_iki_process_buffer_line_
-  void iki_read_iki_process_buffer_line(iki_read_main_t * const main, const f_number_unsigned_t index) {
+#ifndef _di_iki_read_iki_process_buffer_at_
+  void iki_read_iki_process_buffer_at(iki_read_main_t * const main, const f_number_unsigned_t index) {
 
     if (!main || F_status_is_error(main->setting.state.status)) return;
 
@@ -179,7 +179,7 @@ extern "C" {
 
     main->setting.state.status = main->cache.expand.used == original ? F_data_not : F_okay;
   }
-#endif // _di_iki_read_iki_process_buffer_line_
+#endif // _di_iki_read_iki_process_buffer_at_
 
 #ifndef _di_iki_read_iki_process_buffer_ranges_
   void iki_read_iki_process_buffer_ranges(iki_read_main_t * const main, f_range_t * const range_buffer) {
@@ -195,7 +195,7 @@ extern "C" {
     if ((main->setting.flag & iki_read_main_flag_at_d) && (main->setting.flag & iki_read_main_flag_line_d)) {
       if ((main->setting.flag & iki_read_main_flag_object_d) && main->setting.line) {
         if (main->setting.flag & iki_read_main_flag_total_d) {
-          fll_print_format("0%r", main->program.output.to, f_string_eol_s);
+          iki_read_print_data_total(&main->program.output, 0);
         }
 
         main->setting.state.status = F_data_not;
@@ -239,22 +239,14 @@ extern "C" {
                 ++matches;
               }
 
-              if (main->setting.flag & iki_read_main_flag_line_d) { // @todo handle --at.
-                iki_read_iki_process_buffer_line(main, i);
-
-                // Ensure that a newline is always at the end.
-                if (main->setting.state.status == F_okay) {
-                  main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-                }
+              if (main->setting.flag & (iki_read_main_flag_at_d | iki_read_main_flag_line_d)) {
+                iki_read_iki_process_buffer_at(main, i);
+                iki_read_process_buffer_at_newline(main);
               }
             }
             else if (main->setting.flag & iki_read_main_flag_line_d) {
-              iki_read_iki_process_buffer_line(main, i);
-
-              // Ensure that a newline is always at the end.
-              if (main->setting.state.status == F_okay) {
-                main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-              }
+              iki_read_iki_process_buffer_at(main, i);
+              iki_read_process_buffer_at_newline(main);
             }
             else {
               f_file_stream_lock(main->program.output.to);
@@ -273,25 +265,15 @@ extern "C" {
 
       if (main->setting.flag & iki_read_main_flag_line_d) {
         if (main->setting.flag & iki_read_main_flag_total_d) {
-          iki_read_print_data_line_total(&main->program.output);
+          iki_read_print_data_total_expand(&main->program.output);
         }
         else {
           iki_read_print_data_line(&main->program.output);
         }
       }
       else if (main->setting.flag & iki_read_main_flag_total_d) {
-        if (main->setting.flag & iki_read_main_flag_line_d) {
-          for (i = 0; F_status_is_error_not(main->setting.state.status) && i < data->variable.used; ++i) {
-
-            if (iki_read_signal_check(main)) return;
-
-            iki_read_iki_process_buffer_line(main, i);
-
-            // Ensure that a newline is always at the end.
-            if (main->setting.state.status == F_okay) {
-              main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-            }
-          } // for
+        if (main->setting.flag & iki_read_main_flag_at_d) {
+          iki_read_print_data_total_expand(&main->program.output);
         }
         else {
           iki_read_print_data_total(&main->program.output, matches);
@@ -309,20 +291,27 @@ extern "C" {
         if (main->setting.flag & iki_read_main_flag_at_d) {
           if (main->setting.at < data->variable.used) {
             if (main->setting.flag & iki_read_main_flag_line_d) {
-              iki_read_iki_process_buffer_line(main, main->setting.at);
-
-              // Ensure that a newline is always at the end.
-              if (main->setting.state.status == F_okay) {
-                main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-              }
+              iki_read_iki_process_buffer_at(main, main->setting.at);
+              iki_read_process_buffer_at_newline(main);
 
               if (main->setting.flag & iki_read_main_flag_total_d) {
-                iki_read_print_data_line_total(&main->program.output);
+                iki_read_print_data_total_expand(&main->program.output);
               }
               else {
                 iki_read_print_data_line(&main->program.output);
               }
             }
+            else if (main->setting.flag & iki_read_main_flag_total_d) {
+              if (main->setting.flag & iki_read_main_flag_object_d) {
+                iki_read_print_data_total(&main->program.output, ((main->setting.flag & iki_read_main_flag_select_d) && main->setting.select) ? 0 : 1);
+              }
+              else {
+                iki_read_iki_process_buffer_at(main, main->setting.at);
+                iki_read_process_buffer_at_newline(main);
+
+                iki_read_print_data_total_expand(&main->program.output);
+              }
+            }
             else {
               f_file_stream_lock(main->program.output.to);
 
@@ -340,6 +329,10 @@ extern "C" {
             }
           }
           else {
+            if (main->setting.flag & iki_read_main_flag_total_d) {
+              iki_read_print_data_total(&main->program.output, 0);
+            }
+
             main->setting.state.status = F_data_not;
           }
         }
@@ -348,21 +341,33 @@ extern "C" {
 
             if (iki_read_signal_check(main)) return;
 
-            iki_read_iki_process_buffer_line(main, i);
-
-            // Ensure that a newline is always at the end.
-            if (main->setting.state.status == F_okay) {
-              main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
-            }
+            iki_read_iki_process_buffer_at(main, i);
+            iki_read_process_buffer_at_newline(main);
           } // for
 
           if (main->setting.flag & iki_read_main_flag_total_d) {
-            iki_read_print_data_line_total(&main->program.output);
+            iki_read_print_data_total_expand(&main->program.output);
           }
           else {
             iki_read_print_data_line(&main->program.output);
           }
         }
+        else if (main->setting.flag & iki_read_main_flag_total_d) {
+          if (main->setting.flag & iki_read_main_flag_object_d) {
+            iki_read_print_data_total(&main->program.output, ((main->setting.flag & iki_read_main_flag_select_d) && main->setting.select) ? 0 : data->variable.used);
+          }
+          else {
+            for (i = 0; F_status_is_error_not(main->setting.state.status) && i < data->variable.used; ++i) {
+
+              if (iki_read_signal_check(main)) return;
+
+              iki_read_iki_process_buffer_at(main, i);
+              iki_read_process_buffer_at_newline(main);
+            } // for
+
+            iki_read_print_data_total_expand(&main->program.output);
+          }
+        }
         else {
           f_file_stream_lock(main->program.output.to);
 
index d84896b059751e8d654830d96995c734d48964ed..47b7e58a5f581a01f77a485a74f20176614566d9 100644 (file)
@@ -17,12 +17,10 @@ extern "C" {
 #endif
 
 /**
- * Process and print the given range at the given index for IKI read, for when printing a single Line in Content and Literal modes.
+ * Process the given range at the given index for IKI read.
  *
- * This expects the caller to have the output locked appropriately.????
- *
- * This detects and prints any applicable substitution matching the vocabulary at the given index.
- * If there is no substitution, then this prints the given range at the given index.
+ * This expands all of the appropriate Variables so that post-expansion calculations may be performed.
+ * This is particularly useful for preparing to print a single Line in Content and Literal modes.
  *
  * @param main
  *   The main program data.
@@ -53,9 +51,9 @@ extern "C" {
  * @see iki_read_process_wrap_append()
  * @see iki_read_process_wrap_prepend()
  */
-#ifndef _di_iki_read_iki_process_buffer_line_
-  extern void iki_read_iki_process_buffer_line(iki_read_main_t * const main, const f_number_unsigned_t index);
-#endif // _di_iki_read_iki_process_buffer_line_
+#ifndef _di_iki_read_iki_process_buffer_at_
+  extern void iki_read_iki_process_buffer_at(iki_read_main_t * const main, const f_number_unsigned_t index);
+#endif // _di_iki_read_iki_process_buffer_at_
 
 /**
  * Process a given buffer, printing the given range for IKI read.
index 08e68b4352d74400827fda02b86c96a6b04bcc63..4d9c99a24d5923f4094162435632b908a4416911 100644 (file)
@@ -51,8 +51,8 @@ extern "C" {
   }
 #endif // _di_iki_read_print_data_line_
 
-#ifndef _di_iki_read_print_data_line_total_
-  void iki_read_print_data_line_total(fl_print_t * const print) {
+#ifndef _di_iki_read_print_data_line_total_expand_
+  void iki_read_print_data_total_expand(fl_print_t * const print) {
 
     if (!print || !print->custom) return;
 
@@ -74,11 +74,18 @@ extern "C" {
       } // for
     }
 
-    iki_read_print_data_total(print, main->setting.line < total ? 1 : 0);
+    iki_read_print_data_total(
+      print,
+      (main->setting.flag & iki_read_main_flag_line_d)
+        ? main->setting.line < total ? 1 : 0
+        : total
+    );
 
-    main->setting.state.status = main->setting.line < total ? F_okay : F_data_not;
+    main->setting.state.status = (main->setting.flag & iki_read_main_flag_line_d)
+      ? main->setting.line < total ? F_okay : F_data_not
+      : total ? F_okay : F_data_not;
   }
-#endif // _di_iki_read_print_data_line_total_
+#endif // _di_iki_read_print_data_line_total_expand_
 
 #ifndef _di_iki_read_print_data_total_
   void iki_read_print_data_total(fl_print_t * const print, const f_number_unsigned_t total) {
index d2fd0b9dfbae0fce463a1836a9f75905b1df8c93..106b5d4f4b1950cd845a540a8d1743a15f1e82d0 100644 (file)
@@ -32,21 +32,6 @@ extern "C" {
 #endif // _di_iki_read_print_data_line_
 
 /**
- * Print the total from the data in the expand cache at the line.
- *
- * This requires that the expand cache is properly populated.
- * The expand cache may be empty.
- *
- * @param print
- *   The output structure to print to.
- *
- *   This does not alter print.custom.setting.state.status.
- */
-#ifndef _di_iki_read_print_data_line_total_
-  extern void iki_read_print_data_line_total(fl_print_t * const print);
-#endif // _di_iki_read_print_data_line_total_
-
-/**
  * Print the number that represents the total.
  *
  * @param print
@@ -69,6 +54,24 @@ extern "C" {
 #endif // _di_iki_read_print_data_total_
 
 /**
+ * Count and print the total from the data in the expand cache at the line.
+ *
+ * This requires that the expand cache is properly populated.
+ * The expand cache may be empty.
+ *
+ * This only checks if the flag iki_read_main_flag_line_d is set.
+ * Otherwise, the total lines from the expand cache is counted as-is.
+ *
+ * @param print
+ *   The output structure to print to.
+ *
+ *   This does not alter print.custom.setting.state.status.
+ */
+#ifndef _di_iki_read_print_data_line_total_expand_
+  extern void iki_read_print_data_total_expand(fl_print_t * const print);
+#endif // _di_iki_read_print_data_line_total_expand_
+
+/**
  * Print the append part of the wrap at the given index, if valid.
  *
  * This expects the caller to have the output locked appropriately.
index f793cb0c8e2a97876a0680cd7c3d05857eb02c52..c9f87a602d48c979ce6865e0e9687bfc893444f9 100644 (file)
@@ -48,6 +48,15 @@ extern "C" {
   }
 #endif // _di_iki_read_process_buffer_
 
+#ifndef _di_iki_read_process_buffer_at_newline_
+  void iki_read_process_buffer_at_newline(iki_read_main_t * const main) {
+
+    if (!main || main->setting.state.status != F_okay) return;
+
+    main->setting.state.status = f_string_dynamic_append(f_string_eol_s, &main->cache.expand);
+  }
+#endif // _di_iki_read_process_buffer_at_newline_
+
 #ifndef _di_iki_read_process_line_
   void iki_read_process_line(iki_read_main_t * const main, f_range_t * const range) {
 
index 0306446ab8057f158768292d865431c9f080e98a..5080dcaa554a7f5b9f53bc8a0c008b39155a74ee 100644 (file)
@@ -46,6 +46,27 @@ extern "C" {
 #endif // _di_iki_read_process_buffer_
 
 /**
+ * Append a new line at the end of the expand cache if the state status is F_okay.
+ *
+ * This is intended to be called immediately after iki_read_iki_process_buffer_at() and iki_read_eki_process_buffer_at() to handle the state status.
+ *
+ * @param main
+ *   The main program data.
+ *
+ *   Must not be NULL.
+ *
+ *   This alters setting.state.status:
+ *     Success from: f_string_dynamic_append()
+ *
+ *     Errors (with error bit) from: f_string_dynamic_append().
+ *
+ * @see f_string_dynamic_append()
+ */
+#ifndef _di_iki_read_process_buffer_at_newline_
+  extern void iki_read_process_buffer_at_newline(iki_read_main_t * const main);
+#endif // _di_iki_read_process_buffer_at_newline_
+
+/**
  * Determine the range based on the --line parameter.
  *
  * If the --line parameter is not specified in the console arguments, then range is untouched.