]> Kevux Git Server - fll/commitdiff
Update: return stop points even when no object/content is found
authorKevin Day <kevin@kevux.org>
Mon, 26 Mar 2012 00:20:48 +0000 (19:20 -0500)
committerKevin Day <kevin@kevux.org>
Mon, 26 Mar 2012 00:20:48 +0000 (19:20 -0500)
This makes a things a little more consistent.
If an object was not found, then the code would seek to the end of line or a stop point.
Prior to this patch, after doing the sleep, the appropriate object/content not found is returned when a stop point was reached.
Now, the appropriate no_data or none stop point return value is used in such a case.

level_1/fl_fss/c/fss_basic.c
level_1/fl_fss/c/fss_extended.c

index 7e809bd17f724570aa93ee2d9f1f35a8ddd72f47..8359e1550b003495b75242aa25f16abfa9320799 100644 (file)
@@ -149,6 +149,8 @@ extern "C"{
                   input->start++;
                 } // while
 
+                fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_no_data_on_eos, f_no_data_on_stop)
+
                 input->start++;
                 return fl_fss_found_no_object;
               } else if (buffer->string[input->start] == f_eol) {
@@ -193,6 +195,8 @@ extern "C"{
                 input->start++;
               } // while
 
+              fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_no_data_on_eos, f_no_data_on_stop)
+
               input->start++;
               return fl_fss_found_no_object;
             }
@@ -215,7 +219,9 @@ extern "C"{
     // seek to the end of the line when no valid object is found
     while (input->start < buffer->used && input->start <= input->stop && buffer->string[input->start] != f_eol) {
       input->start++;
-    }
+    } // while
+
+    fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_no_data_on_eos, f_no_data_on_stop)
 
     input->start++;
     return fl_fss_found_no_object;
index aef7463acfb7443880e1dad8e6cbabc2cfb5a7eb..ea05a8fa2b2cb295597f9e124f22bd3348be9970 100644 (file)
@@ -149,6 +149,8 @@ extern "C"{
                   input->start++;
                 } // while
 
+                fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_no_data_on_eos, f_no_data_on_stop)
+
                 input->start++;
                 return fl_fss_found_no_object;
               } else if (buffer->string[input->start] == f_eol) {
@@ -193,12 +195,14 @@ extern "C"{
                 input->start++;
               } // while
 
+              fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_no_data_on_eos, f_no_data_on_stop)
+
               input->start++;
               return fl_fss_found_no_object;
             }
 
             input->start++;
-          }
+          } // while
 
           fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_none_on_eos, f_none_on_stop)
         } else if (buffer->string[input->start] == f_eol) {
@@ -215,7 +219,9 @@ extern "C"{
     // seek to the end of the line when no valid object is found
     while (input->start < buffer->used && input->start <= input->stop && buffer->string[input->start] != f_eol) {
       input->start++;
-    }
+    } // while
+
+    fl_macro_fss_object_return_on_overflow((*buffer), (*input), (*found), f_no_data_on_eos, f_no_data_on_stop)
 
     input->start++;
     return fl_fss_found_no_object;
@@ -378,6 +384,8 @@ extern "C"{
                     input->start++;
                   } // while
 
+                  fl_macro_fss_content_return_on_overflow((*buffer), (*input), (*found), f_unterminated_group_on_eos, f_unterminated_group_on_stop)
+
                   input->start++;
                   return f_unterminated_group;
                 } else if (buffer->string[input->start] == f_eol) {
@@ -428,6 +436,8 @@ extern "C"{
                   input->start++;
                 } // while
 
+                fl_macro_fss_content_return_on_overflow((*buffer), (*input), (*found), f_unterminated_group_on_eos, f_unterminated_group_on_stop)
+
                 input->start++;
                 return f_unterminated_group;
               }
@@ -473,7 +483,9 @@ extern "C"{
     // seek to the end of the line when no valid content is found
     while (input->start < buffer->used && input->start <= input->stop && buffer->string[input->start] != f_eol) {
       input->start++;
-    }
+    } // while
+
+    fl_macro_fss_content_return_on_overflow((*buffer), (*input), (*found), f_none_on_eos, f_none_on_stop)
 
     if (found->used == already_used) {
       input->start++;