From: Kevin Day Date: Mon, 26 Mar 2012 00:20:48 +0000 (-0500) Subject: Update: return stop points even when no object/content is found X-Git-Tag: 0.3.0~47 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=0ddca96deeff1d709ec5313aba9b263d42af9466;p=fll Update: return stop points even when no object/content is found 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. --- diff --git a/level_1/fl_fss/c/fss_basic.c b/level_1/fl_fss/c/fss_basic.c index 7e809bd..8359e15 100644 --- a/level_1/fl_fss/c/fss_basic.c +++ b/level_1/fl_fss/c/fss_basic.c @@ -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; diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index aef7463..ea05a8f 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -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++;