fl_macro_fss_skip_past_delimit_placeholders((*buffer), (*location))
fl_macro_fss_content_nest_return_on_overflow((*buffer), (*location), (*found), positions_start, delimits, f_none_on_eos, f_none_on_stop)
- fl_macro_fss_allocate_content_if_necessary((*found), delimits);
+ fl_macro_fss_allocate_content_nest_if_necessary((*found), delimits);
f_array_length depth = 0;
f_string_length position_previous = location->start;
}
#endif // _di_fl_macro_fss_content_delimited_return_on_overflow_
+#ifndef _di_fl_macro_fss_allocate_content_if_necessary_
+ #define fl_macro_fss_allocate_content_if_necessary(content, delimits) \
+ if (content.used >= content.size) { \
+ f_status status = f_none; \
+ \
+ f_macro_fss_content_resize(status, content, content.size + f_fss_default_allocation_step); \
+ if (f_status_is_error(status)) { \
+ f_status macro_allocation_status = f_none; \
+ f_macro_string_lengths_delete(macro_allocation_status, delimits); \
+ \
+ return status; \
+ } \
+ }
+#endif // _di_fl_macro_fss_allocate_content_if_necessary_
+
#ifndef _di_fl_macro_fss_content_nest_return_on_overflow_
#define fl_macro_fss_content_nest_return_on_overflow(buffer, location, found, delimits, positions, eos_status, stop_status) \
if (location.start >= buffer.used) { \
// @todo: found.array[found.used].stop = location.stop;
#endif // _di_fl_macro_fss_content_nest_delimited_return_on_overflow_
-#ifndef _di_fl_macro_fss_allocate_content_if_necessary_
- #define fl_macro_fss_allocate_content_if_necessary(content, delimits) \
+#ifndef _di_fl_macro_fss_allocate_content_nest_if_necessary_
+ #define fl_macro_fss_allocate_content_nest_if_necessary(content, delimits) \
if (content.used >= content.size) { \
f_status status = f_none; \
\
- f_macro_fss_content_resize(status, content, content.size + f_fss_default_allocation_step); \
+ f_macro_fss_content_nest_resize(status, content, content.size + f_fss_default_allocation_step); \
if (f_status_is_error(status)) { \
f_status macro_allocation_status = f_none; \
f_macro_string_lengths_delete(macro_allocation_status, delimits); \
return status; \
} \
}
-#endif // _di_fl_macro_fss_allocate_content_if_necessary_
+#endif // _di_fl_macro_fss_allocate_content_nest_if_necessary_
#ifndef _di_fl_macro_fss_object_seek_till_newline_
#define fl_macro_fss_object_seek_till_newline(buffer, location, delimits, eos_status, stop_status) \
}
// clear buffers before repeating the loop
- f_macro_fss_contents_delete(status2, data->contents);
+ f_macro_fss_content_nests_delete(status2, data->contents);
f_macro_fss_objects_delete(status2, data->objects);
f_macro_string_dynamic_delete(status2, data->buffer);
} // for
i++;
} // while
- f_macro_fss_contents_delete(status, data->contents);
+ f_macro_fss_content_nests_delete(status, data->contents);
f_macro_fss_objects_delete(status, data->objects);
f_macro_string_dynamic_delete(status, data->buffer);
f_macro_string_lengths_delete(status, data->remaining);