In particular, the fl_socket (which needs to be reviewed for being moved into f_socket) needed to be documented and had some issues to resolve.
* F_prohibited (with error bit) if filesystem does not allow for removing.
* F_read_only (with error bit) if file is read-only.
* F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
- * F_failure (with error bit) for any other (mkdir()) error.
+ * F_failure (with error bit) for any other error.
*
* @see mkdir()
*/
* F_prohibited (with error bit) if filesystem does not allow for removing.
* F_read_only (with error bit) if file is read-only.
* F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
- * F_failure (with error bit) for any other (mkdirat()) error.
+ * F_failure (with error bit) for any other error.
*
* @see mkdirat()
*/
* F_file_found_not if the path was not found.
* F_true if path was found and path is a directory (or a symlink to a directory).
* F_access_denied (with error bit) if access to the file was denied.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_true if path was found and path is a directory (or a symlink to a directory).
* F_access_denied (with error bit) if access to the file was denied.
* F_directory_descriptor (with error bit) for bad directory descriptor for at_id.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_file_found_not if the path was not found.
* F_true if path was found and path is a directory.
* F_access_denied (with error bit) if access to the file was denied.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_true if path was found and path is a directory.
* F_access_denied (with error bit) if access to the file was denied.
* F_directory_descriptor (with error bit) for bad directory descriptor for at_id.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_prohibited (with error bit) if filesystem does not allow for removing.
* F_read_only (with error bit) if file is read-only.
* F_number_overflow (with error bit) on integer overflow.
- * F_failure (with error bit) for any other (remove()) error.
+ * F_failure (with error bit) for any other error.
*
* @see nftw()
* @see remove()
* F_parameter (with error bit) if a parameter is invalid.
* F_prohibited (with error bit) if filesystem does not allow for removing.
* F_read_only (with error bit) if file is read-only.
- * F_failure (with error bit) for any other (remove()) error.
+ * F_failure (with error bit) for any other error.
*
* @see nftw()
* @see remove()
* F_false (with error bit) on unknown/unhandled errors.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_true if path was found.
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_false (with error bit) on unknown/unhandled errors.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_true if path was found and path is type.
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_true if path was found and path is type.
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_input_output (with error bit) on I/O error.
* F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the filename is too long.
+ * F_name (with error bit) on path name error.
* F_parameter (with error bit) if a parameter is invalid.
* F_read_only (with error bit) if file is read-only.
* F_failure (with error bit) for any other error.
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* F_file_found_not (with error bit) if the file was not found.
- * F_loop (with error bit) if a loop occurred.
+ * F_loop (with error bit) on loop error.
* F_memory_out (with error bit) if out of memory.
- * F_name (with error bit) if the name is somehow invalid.
+ * F_name (with error bit) on path name error.
* F_number_overflow (with error bit) on overflow error.
* F_parameter (with error bit) if a parameter is invalid.
*
* Socket Types.
*/
#ifndef _di_f_socket_types_
- #define f_socket_id int
- #define f_socket_close_id unsigned short
-
enum {
f_socket_close_fast = 1, // As in close();
f_socket_close_read, // As in shutdown(, SHUT_RD);
range.stop = i;
// 1: A possibly valid header type was found, now convert it into its proper format and save the header type.
- f_status status = f_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
+ const f_status status = f_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
if (F_status_is_error(status)) return status;
if (status == F_none) {
range.start = i - 4;
range.stop = i;
- f_status status = f_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
+ const f_status status = f_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
if (F_status_is_error(status)) return status;
header->length = i + 1;
width_max = buffer.used - range.start;
}
- // @todo update to check against control characters and zero-width space.
return f_utf_is_whitespace(buffer.string + range.start, width_max);
}
#endif // _di_fl_fss_is_space_
+#ifndef _di_fl_fss_shift_delimiters_
+ f_return_status fl_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_range range) {
+ #ifndef _di_level_1_parameter_checking_
+ if (buffer->used <= 0) return F_status_set_error(F_parameter);
+ if (range.start < 0) return F_status_set_error(F_parameter);
+ if (range.stop < range.start) return F_status_set_error(F_parameter);
+ if (range.start >= buffer->used) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_string_length position = 0;
+ f_string_length distance = 0;
+ unsigned short utf_width = 0;
+ unsigned short i = 0;
+
+ position = range.start;
+
+ while (position < buffer->used && position <= range.stop) {
+ if (buffer->string[position] == f_fss_delimit_placeholder) {
+ distance++;
+ }
+
+ // do not waste time trying to process what is only going to be replaced with a delimit placeholder
+ if (position + distance >= buffer->used || position + distance > range.stop) {
+ break;
+ }
+
+ utf_width = f_macro_utf_byte_width_is(buffer->string[position]);
+ if (utf_width > 1) {
+ // not enough space in buffer or in range range to process UTF-8 character.
+ if (position + utf_width >= buffer->used || position + utf_width > range.stop) {
+ return F_status_set_error(F_utf);
+ }
+
+ if (distance > 0) {
+ while (utf_width > 0) {
+ buffer->string[position] = buffer->string[position + distance];
+ utf_width--;
+ position++;
+ }
+ }
+ }
+ else {
+ // shift everything down one for each placeholder found
+ if (distance > 0) {
+ buffer->string[position] = buffer->string[position + distance];
+ }
+
+ position++;
+ }
+ }
+
+ if (distance > 0) {
+ while (position < buffer->used + distance && position <= range.stop) {
+ buffer->string[position] = f_fss_delimit_placeholder;
+ position++;
+ }
+ }
+
+ return F_none;
+ }
+#endif // _di_fl_fss_shift_delimiters_
+
#ifndef _di_fl_fss_skip_past_space_
f_return_status fl_fss_skip_past_space(const f_string_static buffer, f_string_range *range) {
#ifndef _di_level_1_parameter_checking_
}
} // for
- if (F_status_is_error(status)) {
- return status;
- }
+ if (F_status_is_error(status)) return status;
return F_none;
}
}
#endif // _di_fl_fss_skip_past_non_graph_
-#ifndef _di_fl_fss_shift_delimiters_
- f_return_status fl_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_range range) {
- #ifndef _di_level_1_parameter_checking_
- if (buffer->used <= 0) return F_status_set_error(F_parameter);
- if (range.start < 0) return F_status_set_error(F_parameter);
- if (range.stop < range.start) return F_status_set_error(F_parameter);
- if (range.start >= buffer->used) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
-
- f_string_length position = 0;
- f_string_length distance = 0;
- unsigned short utf_width = 0;
- unsigned short i = 0;
-
- position = range.start;
-
- while (position < buffer->used && position <= range.stop) {
- if (buffer->string[position] == f_fss_delimit_placeholder) {
- distance++;
- }
-
- // do not waste time trying to process what is only going to be replaced with a delimit placeholder
- if (position + distance >= buffer->used || position + distance > range.stop) {
- break;
- }
-
- utf_width = f_macro_utf_byte_width_is(buffer->string[position]);
- if (utf_width > 1) {
- // not enough space in buffer or in range range to process UTF-8 character.
- if (position + utf_width >= buffer->used || position + utf_width > range.stop) {
- return F_status_set_error(F_utf);
- }
-
- if (distance > 0) {
- while (utf_width > 0) {
- buffer->string[position] = buffer->string[position + distance];
- utf_width--;
- position++;
- }
- }
- }
- else {
- // shift everything down one for each placeholder found
- if (distance > 0) {
- buffer->string[position] = buffer->string[position + distance];
- }
-
- position++;
- }
- }
-
- if (distance > 0) {
- while (position < buffer->used + distance && position <= range.stop) {
- buffer->string[position] = f_fss_delimit_placeholder;
- position++;
- }
- }
-
- return F_none;
- }
-#endif // _di_fl_fss_shift_delimiters_
-
#ifdef __cplusplus
} // extern "C"
#endif
* F_none on success.
* F_none_stop if the stop range is reached before all steps are completed.
* F_none_eos if the end of buffer is reached before all steps are completed.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_incomplete_utf_stop (with error bit) if the stop range is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_fss_decrement_buffer_
extern f_return_status fl_fss_decrement_buffer(const f_string_static buffer, f_string_range *range, const f_string_length step);
* @return
* F_none on success
* FL_fss_header_not if no header is found.
+ * FL_fss_accepted_invalid (with warning bit) if header is technically invalid but can be identified.
* FL_fss_header_not (with error bit) if the an error occurred prior to identifying a valid header.
*
* Errors from (with error bit): f_conversion_string_to_hexidecimal_unsigned().
*
* @return
* F_none on success.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_conversion_string_to_hexidecimal_unsigned().
* Errors from (with error bit): f_file_read_until().
- * Errors from (with error bit): fl_fss_identify()
* Errors from (with error bit): f_file_seek().
+ * Errors from (with error bit): fl_fss_identify()
*
* @see f_file_read_until()
* @see fl_fss_identify()
* F_none on success.
* F_none_stop if the stop range is reached before all steps are completed.
* F_none_eos if the end of buffer is reached before all steps are completed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_incomplete_utf_stop (with error bit) if the stop range is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_fss_increment_buffer_
extern f_return_status fl_fss_increment_buffer(const f_string_static buffer, f_string_range *range, const f_string_length step);
* @return
* F_true if the character in the buffer is a graph character.
* F_false if the character in the buffer is not a graph character.
- * F_maybe (with error bit) if the character width is outside the stop position.
- * F_failure (with error bit) if the buffer is not wide enough or the width is outside the stop position.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors from (with error bit): f_utf_is_graph().
*/
#ifndef _di_fl_fss_is_graph_
extern f_return_status fl_fss_is_graph(const f_string_static buffer, const f_string_range range);
* @return
* F_true if the character in the buffer is a space character.
* F_false if the character in the buffer is not a space character.
- * F_maybe (with error bit) if the character width is outside the stop position.
- * F_failure (with error bit) if the buffer is not wide enough or the width is outside the stop position.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors from (with error bit): f_utf_is_space().
*/
#ifndef _di_fl_fss_is_space_
extern f_return_status fl_fss_is_space(const f_string_static buffer, const f_string_range range);
*
* @return
* F_none on success.
+ * F_none_eol on success and EOL was reached.
+ * F_none_eos on success and EOS was reached.
+ * F_none_stop on success and stop point was reached.
+ * F_incomplete_utf (with error bit) if an incomplete UTF-8 fragment was found.
+ * F_incomplete_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS.
+ * F_incomplete_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors from (with error bit): f_utf_is_control().
+ * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors from (with error bit): f_utf_is_zero_width().
*/
#ifndef _di_fl_fss_skip_past_space_
extern f_return_status fl_fss_skip_past_space(const f_string_static buffer, f_string_range *range);
*
* @return
* F_none on success.
+ * F_none_eol on success and EOL was reached.
+ * F_none_eos on success and EOS was reached.
+ * F_none_stop on success and stop point was reached.
+ * F_incomplete_utf (with error bit) if an incomplete UTF-8 fragment was found.
+ * F_incomplete_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS.
+ * F_incomplete_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors from (with error bit): f_utf_is_graph().
+ * Errors from (with error bit): f_utf_is_zero_width().
*/
#ifndef _di_fl_fss_skip_past_non_graph_
extern f_return_status fl_fss_skip_past_non_graph(const f_string_static buffer, f_string_range *range);
// delimits must only be applied once a valid object is found
f_string_lengths delimits = f_string_lengths_initialize;
- fl_fss_skip_past_space(*buffer, location);
+ status = fl_fss_skip_past_space(*buffer, location);
+ if (F_status_is_error(status)) return status;
+
fl_macro_fss_object_return_on_overflow((*buffer), (*location), (*found), delimits, F_data_not_eos, F_data_not_stop)
// return found nothing if this line only contains whitespace and delimit placeholders
slash_count--;
}
-
status = fl_fss_increment_buffer(*buffer, location, 1);
if (F_status_is_error(status)) return status;
} // while
return FL_fss_found_object_not;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
else if (buffer->string[location->start] == f_string_eol[0]) {
f_string_lengths delimits = f_string_lengths_initialize;
fl_fss_skip_past_space(*buffer, location);
+ if (F_status_is_error(status)) return status;
+
fl_macro_fss_content_return_on_overflow((*buffer), (*location), (*found), delimits, F_none_eos, F_none_stop)
// return found nothing if this line only contains whitespace and delimit placeholders
found->array[found->used].start = location->start;
// search for valid content
- do {
+ for (;;) {
fl_macro_fss_skip_past_delimit_placeholders((*buffer), (*location))
fl_macro_fss_content_delimited_return_on_overflow((*buffer), (*location), (*found), delimits, F_none_eos, F_none_stop)
if (buffer->string[location->start] == f_fss_basic_close) break;
location->start++;
- } while (F_true);
+ } // for
// Save the stop length
found->array[found->used].stop = location->start - 1;
fl_macro_fss_skip_past_delimit_placeholders(object, (*location))
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= object.used) {
- return F_data_not_eos;
- }
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= object.used) return F_data_not_eos;
start_position = location->start;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
else if (object.string[location->start] == f_fss_delimit_slash) {
f_string_length slash_count = 0;
- do {
+ for (;;) {
buffer->string[buffer_position.stop] = object.string[location->start];
buffer_position.stop++;
slash_count++;
status = fl_fss_increment_buffer(*buffer, location, 1);
if (F_status_is_error(status)) return status;
-
fl_macro_fss_skip_past_delimit_placeholders(object, (*location));
if (location->start > location->stop || location->start >= object.used) {
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
slash_count = 0;
break;
}
- } while (F_true);
+ } // for
while (slash_count > 0) {
buffer->string[buffer_position.stop] = f_fss_delimit_slash;
buffer->used = buffer_position.stop + 1;
}
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= object.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= object.used) return F_none_eos;
return F_none;
}
f_string_range buffer_position = f_string_range_initialize;
f_string_length pre_allocate_size = 0;
+ fl_macro_fss_skip_past_delimit_placeholders(content, (*location))
+
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= content.used) return F_data_not_eos;
+
// add an additional 1 to ensure that there is room for the terminating newline.
pre_allocate_size = buffer->used + (content.used) + 1 + f_fss_default_allocation_step_string;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size);
-
if (F_status_is_error(status)) return status;
}
buffer->string[buffer_position.stop] = f_string_eol[0];
buffer->used = buffer_position.stop + 1;
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= content.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= content.used) return F_none_eos;
return F_none;
}
* @return
* FL_fss_found_object on success and object was found (start location is at end of object).
* FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object).
- * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
- * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_object_read_
extern f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found);
* @return
* FL_fss_found_content on success and content was found (start location is at end of content).
* FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content).
- * F_none_stop on success after reaching stopping point (a valid content is not yet confirmed).
- * F_none_eos on success after reaching the end of the buffer (a valid content is not yet confirmed).
+ * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
+ * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
* F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
- * F_data_not_eos no content found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_content_read_
extern f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_basic_object_write_
extern f_return_status fl_fss_basic_object_write(f_string_dynamic *buffer, const f_string_static object, f_string_range *location);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_basic_content_write_
extern f_return_status fl_fss_basic_content_write(f_string_dynamic *buffer, const f_string_static content, f_string_range *location);
fl_macro_fss_skip_past_delimit_placeholders(object, (*location))
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= object.used) {
- return F_data_not_eos;
- }
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= object.used) return F_data_not_eos;
start_position = location->start;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
buffer->string[buffer_position.stop + 1] = f_string_eol[0];
buffer->used = buffer_position.stop + 2;
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= object.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= object.used) return F_none_eos;
return F_none;
}
fl_macro_fss_skip_past_delimit_placeholders(content, (*location))
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= content.used) {
- return F_data_not_eos;
- }
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= content.used) return F_data_not_eos;
start_position = location->start;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
has_graph = F_true;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
buffer->string[buffer_position.stop] = f_string_eol[0];
buffer->used = buffer_position.stop + 1;
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= content.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= content.used) return F_none_eos;
return F_none;
}
* @return
* FL_fss_found_object on success and object was found (start location is at end of object).
* FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object).
- * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
- * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_list_object_read_
extern f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found);
* @return
* FL_fss_found_content on success and content was found (start location is at end of content).
* FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content).
- * F_none_stop on success after reaching stopping point (a valid content is not yet confirmed).
- * F_none_eos on success after reaching the end of the buffer (a valid content is not yet confirmed).
+ * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
+ * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
* F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
- * F_data_not_eos no content found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_list_content_read_
extern f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
- * F_data_not_eol if there is no data to write and EOL was reached (@todo: review related code and detemine what this is doing).
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_basic_list_object_write_
extern f_return_status fl_fss_basic_list_object_write(const f_string_static object, f_string_range *location, f_string_dynamic *buffer);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_basic_list_content_write_
extern f_return_status fl_fss_basic_list_content_write(const f_string_static content, f_string_range *location, f_string_dynamic *buffer);
return FL_fss_found_object;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
else if (buffer->string[location->start] != f_fss_delimit_slash) {
return FL_fss_found_object_not;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
else if (buffer->string[location->start] == f_string_eol[0]) {
if (F_status_is_error(status)) {
f_macro_string_lengths_delete_simple(delimits);
-
return status;
}
}
if (buffer->string[location->start] == f_string_eol[0]) {
fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
-
return FL_fss_found_content;
}
break;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
else if (buffer->string[location->start] != f_fss_delimit_slash) {
return F_status_is_warning(F_unterminated_group);
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
else if (buffer->string[location->start] == f_string_eol[0]) {
status = fl_fss_increment_buffer(*buffer, location, 1);
if (F_status_is_error(status)) return status;
-
while (location->start <= location->stop && location->start < buffer->used) {
if (buffer->string[location->start] == f_string_eol[0]) {
fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
if (F_status_is_error(status)) return status;
} // while
- if (continue_main_loop) {
- break;
- }
+ if (continue_main_loop) break;
fl_macro_fss_content_delimited_return_on_overflow((*buffer), (*location), (*found), delimits, F_none_eos, F_none_stop)
}
fl_macro_fss_skip_past_delimit_placeholders(object, (*location))
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= object.used) {
- return F_data_not_eos;
- }
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= object.used) return F_data_not_eos;
start_position = location->start;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
else if (object.string[location->start] == f_fss_delimit_slash) {
f_string_length slash_count = 0;
- do {
+ for (;;) {
buffer->string[buffer_position.stop] = object.string[location->start];
buffer_position.stop++;
slash_count++;
status = fl_fss_increment_buffer(*buffer, location, 1);
if (F_status_is_error(status)) return status;
-
fl_macro_fss_skip_past_delimit_placeholders(object, (*location));
if (location->start > location->stop || location->start >= object.used) {
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
slash_count = 0;
break;
}
- } while (F_true);
+ } // for
while (slash_count > 0) {
buffer->string[buffer_position.stop] = f_fss_delimit_slash;
buffer->used = buffer_position.stop + 1;
}
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= object.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= object.used) return F_none_eos;
return F_none;
}
f_string_length start_position = 0;
f_string_length pre_allocate_size = 0;
+ fl_macro_fss_skip_past_delimit_placeholders(content, (*location))
+
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= content.used) return F_data_not_eos;
+
// add an additional 1 to ensure that there is room for the terminating newline.
pre_allocate_size = buffer->used + (content.used) + 1 + f_fss_default_allocation_step_string;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size);
-
if (F_status_is_error(status)) return status;
}
- fl_macro_fss_skip_past_delimit_placeholders(content, (*location))
-
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= content.used) {
- return F_data_not_eos;
- }
-
start_position = location->start;
// if this first slash is followed by a quote, then that quote must be delimited.
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
buffer->string[buffer_position.stop] = ' ';
buffer->used = buffer_position.stop + 1;
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= content.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= content.used) return F_none_eos;
return F_none;
}
* @return
* FL_fss_found_object on success and object was found (start location is at end of object).
* FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object).
- * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
- * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_object_read_
extern f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found);
* @return
* FL_fss_found_content on success and content was found (start location is at end of content).
* FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content).
- * F_none_stop on success after reaching stopping point (a valid content is not yet confirmed).
- * F_none_eos on success after reaching the end of the buffer (a valid content is not yet confirmed).
+ * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
+ * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
* F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
- * F_data_not_eos no content found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_content_read_
extern f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_extended_object_write_
extern f_return_status fl_fss_extended_object_write(const f_string_static object, f_string_range *location, f_string_dynamic *buffer);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_extended_content_write_
extern f_return_status fl_fss_extended_content_write(const f_string_static content, f_string_range *location, f_string_dynamic *buffer);
f_macro_fss_objects_delete_simple(objects);
if (location->start > location->stop) {
- if (depth == 0) {
- return F_status_set_error(F_unterminated_stop);
- }
+ if (depth == 0) return F_status_set_error(F_unterminated_stop);
return F_status_set_error(F_unterminated_nest_stop);
}
- if (depth == 0) {
- return F_status_set_error(F_unterminated_eos);
- }
+ if (depth == 0) return F_status_set_error(F_unterminated_eos);
return F_status_set_error(F_unterminated_nest_eos);
}
fl_macro_fss_skip_past_delimit_placeholders(object, (*location))
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= object.used) {
- return F_data_not_eos;
- }
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= object.used) return F_data_not_eos;
start_position = location->start;
break;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
}
}
else if (object.string[location->start] == f_string_eol[0]) {
- if (buffer_position.stop == buffer_position.start) {
- return F_data_not_eol;
- }
+ if (buffer_position.stop == buffer_position.start) return F_data_not_eol;
break;
}
buffer->string[buffer_position.stop + 1] = f_string_eol[0];
buffer->used = buffer_position.stop + 2;
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= object.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= object.used) return F_none_eos;
return F_none;
}
fl_macro_fss_skip_past_delimit_placeholders(content, (*location))
- if (location->start > location->stop) {
- return F_data_not_stop;
- }
- else if (location->start >= content.used) {
- return F_data_not_eos;
- }
+ if (location->start > location->stop) return F_data_not_stop;
+ else if (location->start >= content.used) return F_data_not_eos;
start_position = location->start;
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size);
-
if (F_status_is_error(status)) return status;
}
if (pre_allocate_size > buffer->size) {
f_macro_string_dynamic_resize(status, (*buffer), pre_allocate_size + f_fss_default_allocation_step_string);
-
if (F_status_is_error(status)) return status;
}
has_graph = F_true;
}
else if (F_status_is_error(status)) {
- f_status status2 = F_status_set_fine(status);
-
- if (status2 == F_failure) {
- return F_status_set_error(F_utf);
- }
-
- if (status2 == F_failure) {
- return F_status_set_error(F_incomplete_utf);
- }
-
return status;
}
buffer->string[buffer_position.stop] = f_string_eol[0];
buffer->used = buffer_position.stop + 1;
- if (location->start > location->stop) {
- return F_none_stop;
- }
- else if (location->start >= content.used) {
- return F_none_eos;
- }
+ if (location->start > location->stop) return F_none_stop;
+ else if (location->start >= content.used) return F_none_eos;
*/
return F_none;
* @return
* FL_fss_found_object on success and object was found (start location is at end of object).
* FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object).
- * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
- * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
* F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_list_object_read_
extern f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found);
* @return
* FL_fss_found_content on success and content was found (start location is at end of content).
* FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content).
- * F_unterminated_eos (with error bit) if end of buffer is reached before a closing bracket is found.
- * F_unterminated_stop (with error bit) if stop location is reached before a closing bracket is found.
- * F_unterminated_nest_eos (with error bit) if end of buffer is reached while inside a nested list before a closing bracket is found.
- * F_unterminated_nest_stop (with error bit) if stop location is reached while inside a nested list before a closing bracket is found.
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed).
+ * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed).
+ * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found).
+ * F_data_not_stop no data found after reaching stopping point (essentially only comments are found).
+ * F_unterminated_group_eos (with warning bit) if EOS was reached before the a group termination was reached.
+ * F_unterminated_group_stop (with warning bit) if stop point was reached before the a group termination was reached.
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ * F_incomplete_utf_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
+ * Errors from (with error bit): fl_fss_is_graph().
+ * Errors from (with error bit): fl_fss_is_space().
+ * Errors from (with error bit): fl_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_list_content_read_
extern f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_nest *found);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
- * F_data_not_eol if there is no data to write and EOL was reached (@todo: review related code and detemine what this is doing).
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_extended_list_object_write_
extern f_return_status fl_fss_extended_list_object_write(const f_string_static object, f_string_range *location, f_string_dynamic *buffer);
*
* @return
* F_none on success.
- * F_none_stop on success after reaching stopping point .
* F_none_eos on success after reaching the end of the buffer.
* F_data_not_stop no data to write due start location being greater than stop location.
* F_data_not_eos no data to write due start location being greater than or equal to buffer size.
+ * F_none_stop on success after reaching stopping point .
* F_incomplete_utf (with error bit) is returned on failure to read/process a UTF-8 character due to the character being potentially incomplete.
- * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
* F_memory_reallocation (with error bit) on reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
+ *
+ * Errors from (with error bit): fl_fss_increment_buffer().
*/
#ifndef _di_fl_fss_extended_list_content_write_
extern f_return_status fl_fss_extended_list_content_write(const f_string_static content, f_string_range *location, f_string_dynamic *buffer);
status = f_utf_is_whitespace(string + i, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
status = f_utf_is_whitespace(string + i, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
if (status == F_true) {
f_string_length j = i + f_macro_utf_byte_width(string[i]);
- if (j == length) {
- return F_none;
- }
+ if (j == length) return F_none;
for (; j < length; j += f_macro_utf_byte_width(string[j])) {
width_max = (length - j) + 1;
status = f_utf_is_whitespace(string + j, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
for (; i < j; i++) {
if (string[i] == 0) continue;
- if (fputc(string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
} // for
break;
}
} // for
- if (status == F_true) {
- break;
- }
+ if (status == F_true) break;
}
- if (fputc(string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
} // for
return F_none;
status = f_utf_is_whitespace(buffer.string + i, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
status = f_utf_is_whitespace(buffer.string + i, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
if (status == F_true) {
f_string_length j = i + f_macro_utf_byte_width(buffer.string[i]);
- if (j == buffer.used) {
- return F_none;
- }
+ if (j == buffer.used) return F_none;
for (; j < buffer.used; j += f_macro_utf_byte_width(buffer.string[j])) {
width_max = (buffer.used - j) + 1;
status = f_utf_is_whitespace(buffer.string + j, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
for (; i < j; i++) {
if (buffer.string[i] == 0) continue;
- if (fputc(buffer.string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
} // for
break;
}
}
- if (fputc(buffer.string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
} // for
return F_none;
status = f_utf_is_whitespace(buffer.string + i, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
if (status == F_true) {
f_string_length j = i + width_i;
- if (j == range.stop) {
- return F_none;
- }
+ if (j == range.stop) return F_none;
for (uint8_t width_j = f_macro_utf_byte_width(buffer.string[j]); j <= range.stop; j += width_j) {
width_j = f_macro_utf_byte_width(buffer.string[j]);
status = f_utf_is_whitespace(buffer.string + j, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
width_i = f_macro_utf_byte_width(buffer.string[i]);
for (uint8_t k = 0; k < width_i; k++) {
- if (fputc(buffer.string[i + k], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i + k], output) == 0) return F_status_set_error(F_output);
} // for
} // for
}
for (uint8_t k = 0; k < width_i; k++) {
- if (fputc(buffer.string[i + k], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i + k], output) == 0) return F_status_set_error(F_output);
} // for
} // for
status = f_utf_character_is_whitespace(string[i]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
status = f_utf_character_is_whitespace(string[i]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
if (status == F_true) {
f_string_length j = i + 1;
- if (j == length) {
- return F_none;
- }
+ if (j == length) return F_none;
for (; j < length; j++) {
status = f_utf_character_is_whitespace(string[j]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
for (; i < j; i++) {
if (string[i] == 0) continue;
- if (fputc(string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
} // for
break;
}
} // for
- if (status == F_true) {
- break;
- }
+ if (status == F_true) break;
}
- if (fputc(string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
} // for
return F_none;
status = f_utf_character_is_whitespace(buffer.string[i]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
status = f_utf_character_is_whitespace(buffer.string[i]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
if (status == F_true) {
f_string_length j = i + 1;
- if (j == buffer.used) {
- return F_none;
- }
+ if (j == buffer.used) return F_none;
for (; j < buffer.used; j++) {
status = f_utf_character_is_whitespace(buffer.string[j]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
for (; i < j; i++) {
if (buffer.string[i] == 0) continue;
- if (fputc(buffer.string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
} // for
break;
}
}
- if (fputc(buffer.string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
} // for
return F_none;
status = f_utf_character_is_whitespace(buffer.string[i]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
status = f_utf_character_is_whitespace(buffer.string[i]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
if (status == F_true) {
f_string_length j = i + 1;
- if (j == range.stop) {
- return F_none;
- }
+ if (j == range.stop) return F_none;
for (; j <= range.stop; j++) {
status = f_utf_character_is_whitespace(buffer.string[j]);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
for (; i <= j; i++) {
if (buffer.string[i] == 0) continue;
- if (fputc(buffer.string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
} // for
break;
}
} // for
- if (status == F_true) {
- break;
- }
+ if (status == F_true) break;
}
- if (fputc(buffer.string[i], output) == 0) {
- return F_status_set_error(F_output);
- }
+ if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
} // for
return F_none;
*
* @return
* F_none on success.
- * F_output (with error bit) on failure.
+ * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
- * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ *
+ * Errors from (with error bit): f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_
extern f_return_status fl_print_trim_string(FILE *output, const f_string string, const f_string_length length);
*
* @return
* F_none on success.
- * F_output (with error bit) on failure.
+ * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
- * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ *
+ * Errors from (with error bit): f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_dynamic_
extern f_return_status fl_print_trim_string_dynamic(FILE *output, const f_string_static buffer);
*
* @return
* F_none on success.
- * F_output (with error bit) on failure.
+ * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
- * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ *
+ * Errors from (with error bit): f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_dynamic_partial_
extern f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_static buffer, const f_string_range range);
*
* @return
* F_none on success.
- * F_output (with error bit) on failure.
+ * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
- * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ *
+ * Errors from (with error bit): f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_string_
extern f_return_status fl_print_trim_utf_string(FILE *output, const f_utf_string string, const f_utf_string_length length);
*
* @return
* F_none on success.
- * F_output (with error bit) on failure.
+ * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
- * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ *
+ * Errors from (with error bit): f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_string_dynamic_
extern f_return_status fl_print_trim_utf_string_dynamic(FILE *output, const f_utf_string_static buffer);
*
* @return
* F_none on success.
- * F_output (with error bit) on failure.
+ * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
- * F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ *
+ * Errors from (with error bit): f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_string_dynamic_partial_
extern f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_static buffer, const f_utf_string_range range);
return F_none_eos;
}
- if (i + width > serialized.used) {
- return F_status_set_error(F_incomplete_utf_eos);
- }
+ if (i + width > serialized.used) return F_status_set_error(F_incomplete_utf_eos);
i += width;
} // while
if (serialized->used + value.used + 1 >= serialized->size) {
f_macro_string_dynamic_resize(status, (*serialized), serialized->size + value.used + 1);
-
if (F_status_is_error(status)) return status;
}
if (serialized.string[i] == f_serialized_simple_splitter || i + 1 >= serialized.used) {
if (strings->used >= strings->size) {
f_macro_string_dynamics_resize(status, (*strings), strings->size + f_serialized_default_allocation_step);
-
if (F_status_is_error(status)) return status;
}
if (total > strings->array[strings->used].size) {
f_macro_string_dynamic_new(status, strings->array[strings->used], total);
-
if (F_status_is_error(status)) return status;
strings->array[strings->used].size = total;
if (serialized.string[i] == f_serialized_simple_splitter || i + 1 >= serialized.used) {
if (locations->used >= locations->size) {
f_macro_string_ranges_resize(status, (*locations), locations->size + f_serialized_default_allocation_step);
-
if (F_status_is_error(status)) return status;
}
locations->used++;
- if (i + width > serialized.used) {
- return F_status_set_error(F_incomplete_utf_eos);
- }
+ if (i + width > serialized.used) return F_status_set_error(F_incomplete_utf_eos);
start = i + width;
}
f_string_range range = f_string_range_initialize;
f_status status = private_fl_unserialize_simple_find(serialized, index, &range);
-
if (F_status_is_error(status)) return status;
if (status == F_data_not_eos) {
f_status status_allocation = F_none;
f_macro_string_dynamic_resize(status_allocation, (*dynamic), total);
-
if (F_status_is_error(status_allocation)) return status_allocation;
}
*
* @return
* F_none on success.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_serialize_simple_
extern f_return_status fl_serialize_simple(const f_string_static value, f_string_dynamic *serialized);
* @return
* F_none on success.
* F_incomplete_utf_eos if end of sting is reached before a complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_unserialize_simple_
extern f_return_status fl_unserialize_simple(const f_string_static serialized, f_string_dynamics *strings);
* @return
* F_none on success.
* F_incomplete_utf_eos if end of sting is reached before a complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_unserialize_simple_map_
extern f_return_status fl_unserialize_simple_map(const f_string_static serialized, f_string_ranges *locations);
* F_none_eos on success at end of string.
* F_data_not_eos if end of string reached before index was reached (dynamic->used is set to 0).
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_unserialize_simple_get_
extern f_return_status fl_unserialize_simple_get(const f_string_static serialized, const f_array_length index, f_string_dynamic *dynamic);
#endif
#ifndef _di_fl_socket_file_bind_
- f_return_status fl_socket_file_bind(const f_string socket_path, f_socket_id *socket_id, struct sockaddr_un *socket_address) {
- memset(&socket_address, 0, sizeof(struct sockaddr_un));
- socket_address->sun_family = AF_UNIX;
- strncpy(socket_address->sun_path, socket_path, sizeof(socket_address->sun_path) - 1);
+ f_return_status fl_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address) {
+ memset(&address, 0, sizeof(struct sockaddr_un));
+ address->sun_family = AF_UNIX;
+ strncpy(address->sun_path, path, sizeof(address->sun_path) - 1);
- if (bind(*socket_id, (struct sockaddr *) socket_address, sizeof(struct sockaddr_un)) < 0) {
- if (errno == EACCES) {
- return F_access_denied;
- }
- else if (errno == EADDRINUSE) {
- return F_busy_address;
- }
- else if (errno == EADDRNOTAVAIL) {
- return F_unavailable_address;
- }
- else if (errno == EINVAL) {
- return F_busy_socket;
- }
- else if (errno == ENOTSOCK) {
- return F_socket;
- }
- else if (errno == ENAMETOOLONG) {
- return F_string_too_large;
- }
- else if (errno == ENOENT) {
- return F_file_found_not;
- }
- else if (errno == EFAULT) {
- return F_address;
- }
- else if (errno == ENOTDIR) {
- return F_directory_found_not;
- }
- else if (errno == ENOMEM) {
- return F_memory_out;
- }
- else if (errno == ELOOP) {
- return F_loop;
- }
+ if (bind(id, (struct sockaddr *) address, sizeof(struct sockaddr_un)) < 0) {
+ if (errno == EACCES) return F_status_set_error(F_access_denied);
+ else if (errno == EADDRINUSE) return F_status_set_error(F_busy_address);
+ else if (errno == EADDRNOTAVAIL) return F_status_set_error(F_unavailable_address);
+ else if (errno == EFAULT) return F_status_set_error(F_buffer);
+ else if (errno == EINVAL) return F_status_set_error(F_busy_socket);
+ else if (errno == ELOOP) return F_status_set_error(F_loop);
+ else if (errno == ENAMETOOLONG) return F_status_set_error(F_string_too_large);
+ else if (errno == ENOENT) return F_status_set_error(F_file_found_not);
+ else if (errno == ENOMEM) return F_status_set_error(F_memory_out);
+ else if (errno == ENOTDIR) return F_status_set_error(F_directory_found_not);
+ else if (errno == ENOTSOCK) return F_status_set_error(F_descriptor);
- return F_failure;
+ return F_status_set_error(F_failure);
}
return F_none;
#endif // _di_fl_socket_file_bind_
#ifndef _di_fl_socket_listen_
- f_return_status fl_socket_listen(const f_socket_id socket_id, const unsigned int socket_backlog) {
- if (listen(socket_id, socket_backlog) < 0) {
- if (errno == EADDRINUSE) {
- return F_busy;
- }
- else if (errno == EBADF) {
- return F_file_descriptor;
- }
- else if (errno == ENOTSOCK) {
- return F_socket;
- }
- else if (errno == EOPNOTSUPP) {
- return F_unsupported;
- }
+ f_return_status fl_socket_listen(const int id, const unsigned int max_backlog) {
+
+ if (listen(id, max_backlog) < 0) {
+ if (errno == EADDRINUSE) return F_status_set_error(F_busy_address);
+ else if (errno == EBADF) return F_status_set_error(F_file_descriptor);
+ else if (errno == ENOTSOCK) return F_status_set_error(F_descriptor);
+ else if (errno == EOPNOTSUPP) return F_status_set_error(F_unsupported);
- return F_failure;
+ return F_status_set_error(F_failure);
}
return F_none;
#endif // _di_fl_socket_listen_
#ifndef _di_fl_socket_close_client_
- // terminate a socket connection.
- f_return_status fl_socket_close_client(const f_socket_id socket_id_client, const f_socket_close_id close_action) {
+ f_return_status fl_socket_close_client(const int id, const unsigned short action) {
unsigned int error_code = 0;
- if (close_action == f_socket_close_fast) {
- if (close(socket_id_client) < 0) {
+ if (action == f_socket_close_fast) {
+ if (close(id) < 0) {
error_code = errno;
}
}
else {
- if (close_action == f_socket_close_read || close_action == f_socket_close_write || close_action == f_socket_close_read_write) {
- if (shutdown(socket_id_client, close_action) < 0) {
+ if (action == f_socket_close_read || action == f_socket_close_write || action == f_socket_close_read_write) {
+ if (shutdown(id, action) < 0) {
error_code = errno;
}
}
else {
- // socket close id is unsupported.
- return F_unsupported;
+ return F_status_set_error(F_unsupported);
}
}
if (error_code > 0) {
- if (error_code == EBADF) {
- return F_file_descriptor;
- }
- else if (error_code == EINVAL) {
- return F_value;
- }
- else if (error_code == ENOTCONN) {
- return F_connected_not;
- }
- else if (error_code == ENOTSOCK) {
- return F_socket;
- }
- else if (error_code == EINTR) {
- return F_interrupted;
- }
- else if (error_code == EBADF) {
- return F_input_output;
- }
+ if (error_code == EBADF) return F_status_set_error(F_file_descriptor);
+ else if (error_code == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
+ else if (error_code == EINTR) return F_status_set_error(F_interrupted);
+ else if (error_code == EINVAL) return F_status_set_error(F_value);
+ else if (error_code == EIO) return F_status_set_error(F_input_output);
+ else if (error_code == ENOTCONN) return F_connected_not;
+ else if (error_code == ENOTSOCK) return F_status_set_error(F_descriptor);
+ else if (error_code == ENOSPC) return F_status_set_error(F_parameter);
- return F_failure;
+ return F_status_set_error(F_failure);
}
return F_none;
extern "C"{
#endif
+/**
+ * Bind a UNIX socket.
+ *
+ * @param path
+ * The path to a socket file to bind to.
+ * @param id
+ * The ID of a socket.
+ * @param address
+ * The socket address information.
+ *
+ * @return
+ * F_none on success.
+ * F_address (with error bit) if address is already in use (therefore unavailable).
+ * F_buffer (with error bit) if the buffer is invalid.
+ * F_busy_address (with error bit) if address is already in use (therefore unavailable).
+ * F_busy_socket (with error bit) if socket defined by id is already bound (therefore unavailable).
+ * F_descriptor (with error bit) if the id is not a socket descriptor.
+ * F_directory_found_not (with error bit) if directory was not found.
+ * F_file_found_not (with error bit) if file not found.
+ * F_memory_out (with error bit) if out of memory.
+ * F_name (with error bit) on path name error.
+ * F_string_too_large (with error bit) if string is too large to store in the buffer.
+ * F_unavailable_address (with error bit) if address is unavailable (is non-existent or not local).
+ *
+ * @see bind()
+ */
#ifndef _di_fl_socket_file_bind_
- /**
- * bind a socket.
- */
- extern f_return_status fl_socket_file_bind(const f_string socket_path, f_socket_id *socket_id, struct sockaddr_un *socket_address);
+ extern f_return_status fl_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address);
#endif // _di_fl_socket_file_bind_
+/**
+ * Terminate a socket connection.
+ *
+ * @param id
+ * The ID of a socket.
+ * @param max_backlog
+ * The max length of the pending connections queue.
+ * Suggested default setting: 8.
+ *
+ * @return
+ * F_none on success.
+ * F_busy_address (with error bit) if address is already in use (therefore unavailable).
+ * F_descriptor (with error bit) if the id is not a socket descriptor.
+ * F_file_descriptor (with error bit) if id is an invalid descriptor.
+ * F_unsupported (with error bit) if this socket does not support the listen() operation.
+ *
+ * @see listen()
+ */
#ifndef _di_fl_socket_listen_
- /**
- * terminate a socket connection.
- * suggested socket_backlog default setting = 8.
- */
- extern f_return_status fl_socket_listen(const f_socket_id socket_id, const unsigned int socket_backlog);
+ extern f_return_status fl_socket_listen(const int id, const unsigned int max_backlog);
#endif // _di_fl_socket_listen_
+/**
+ * Terminate a client socket connection.
+ *
+ * @param id
+ * The ID of a socket.
+ * @param action
+ * The action to perform on close.
+ * f_socket_close_fast calls close().
+ *
+ * @return
+ * F_none on success.
+ * F_connected_not if the socket is not connected.
+ * F_busy_address (with error bit) if address is already in use (therefore unavailable).
+ * F_descriptor (with error bit) if the id is not a socket descriptor.
+ * F_file_descriptor (with error bit) if id is an invalid descriptor.
+ * F_filesystem_quota_block (with error bit) if filesystem's disk blocks or inodes are exhausted.
+ * F_input_output (with error bit) if an I/O error occurred.
+ * F_interrupted (with error bit) when program received an interrupt signal, halting operation.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
+ * F_unsupported (with error bit) if this socket does not support the listen() operation.
+ *
+ * @see close()
+ * @see shutdown()
+ */
#ifndef _di_fl_socket_close_client_
- /**
- * terminate a socket connection.
- * suggested default close_action = f_socket_close_fast.
- */
- extern f_return_status fl_socket_close_client(const f_socket_id socket_id_client, const f_socket_close_id close_action);
+ extern f_return_status fl_socket_close_client(const int id, const unsigned short action);
#endif // _di_fl_socket_close_client_
#ifdef __cplusplus
width_max = (stop2 - i2) + 1;
status = f_utf_is_whitespace(string2 + i2, width_max);
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_maybe) {
- return F_status_set_error(F_utf);
- }
+ if (F_status_set_fine(status) == F_maybe) return F_status_set_error(F_utf);
return status;
}
*
* @return
* F_none on success.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0 (start > stop).
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*
* @see fl_string_append()
* @see fl_string_mash()
*
* @return
* F_none on success.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0 (start > stop).
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*
* @see fl_string_append_nulless()
* @see fl_string_mash_nulless()
*
* @return
* F_none on success.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*
* @see fl_string_prepend()
* @see fl_string_dynamic_prepend()
*
* @return
* F_none on success.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*
* @see fl_string_prepend_nulless()
* @see fl_string_dynamic_prepend_nulless()
* @return
* F_none on success.
* F_data_not on success but only whitespace found.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* @see fl_string_dynamic_rip()
* @see fl_string_rip()
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not;
-
- if (destination->used < length) {
- return private_fl_string_append(source, length, destination);
- }
+ if (destination->used < length) return private_fl_string_append(source, length, destination);
f_string_length i = 1;
f_string_length j = 1;
if (source.used == 0) return F_data_not;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append(glue, glue_length, destination);
+ const f_status status = private_fl_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
if (source.used == 0) return F_data_not;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
+ const f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
if (source.used == 0) return F_data_not;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend(glue, glue_length, destination);
+ const f_status status = private_fl_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
if (source.used == 0) return F_data_not;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
+ const f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_append_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_
extern f_return_status fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_append_assure_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_assure_
extern f_return_status fl_string_append_assure(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_append_assure()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_assure_nulless_
extern f_return_status fl_string_append_assure_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_append()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_nulless_
extern f_return_status fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
* F_equal_to when both strings equal.
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_dynamic_compare()
- * @see fl_string_dynamic_compare_trim()
- * @see fl_string_dynamic_partial_compare()
- * @see fl_string_dynamic_partial_compare_trim()
*/
#ifndef _di_fl_string_compare_
extern f_return_status fl_string_compare(const f_string string1, const f_string string2, const f_string_length length1, const f_string_length length2);
* F_equal_to when both strings equal.
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_dynamic_compare()
- * @see fl_string_dynamic_compare_trim()
- * @see fl_string_dynamic_partial_compare()
- * @see fl_string_dynamic_partial_compare_trim()
*/
#ifndef _di_fl_string_compare_trim_
extern f_return_status fl_string_compare_trim(const f_string string1, const f_string string2, const f_string_length length1, const f_string_length length2);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_append_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_
extern f_return_status fl_string_dynamic_append(const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_append_assure_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_assure_
extern f_return_status fl_string_dynamic_append_assure(const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_append_assure()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_assure_nulless_
extern f_return_status fl_string_dynamic_append_assure_nulless(const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_append()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_nulless_
extern f_return_status fl_string_dynamic_append_nulless(const f_string_static source, f_string_dynamic *destination);
* F_equal_to when both strings equal.
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_compare()
- * @see fl_string_compare_trim()
- * @see fl_string_dynamic_partial_compare()
- * @see fl_string_dynamic_partial_compare_trim()
*/
#ifndef _di_fl_string_dynamic_compare_
extern f_return_status fl_string_dynamic_compare(const f_string_static string1, const f_string_static string2);
* F_equal_to when both strings equal.
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_compare()
- * @see fl_string_compare_trim()
- * @see fl_string_dynamic_partial_compare()
- * @see fl_string_dynamic_partial_compare_trim()
*/
#ifndef _di_fl_string_dynamic_compare_trim_
extern f_return_status fl_string_dynamic_compare_trim(const f_string_static string1, const f_string_static string2);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*
- * @see fl_string_dynamic_mash_nulless()
+ * Errors from (with error bit): f_utf_is_graph().
+ *
+ * @see f_utf_is_graph()
*/
#ifndef _di_fl_string_dynamic_mash_
extern f_return_status fl_string_dynamic_mash(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_mash()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mash_nulless_
extern f_return_status fl_string_dynamic_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_mish_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mish_
extern f_return_status fl_string_dynamic_mish(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_mish()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mish_nulless_
extern f_return_status fl_string_dynamic_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_append_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_
extern f_return_status fl_string_dynamic_partial_append(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_append_assure_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_assure_
extern f_return_status fl_string_dynamic_partial_append_assure(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_append_assure()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_assure_nulless_
extern f_return_status fl_string_dynamic_partial_append_assure_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_append()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_nulless_
extern f_return_status fl_string_dynamic_partial_append_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
* F_equal_to when both strings equal.
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_compare()
- * @see fl_string_compare_trim()
- * @see fl_string_dynamic_compare()
- * @see fl_string_dynamic_compare_trim()
*/
#ifndef _di_fl_string_dynamic_partial_compare_
extern f_return_status fl_string_dynamic_partial_compare(const f_string_static string1, const f_string_static string2, const f_string_range range1, const f_string_range range2);
* F_equal_to when both strings equal.
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_compare()
- * @see fl_string_compare_trim()
- * @see fl_string_dynamic_compare()
- * @see fl_string_dynamic_compare_trim()
*/
#ifndef _di_fl_string_dynamic_partial_compare_trim_
extern f_return_status fl_string_dynamic_partial_compare_trim(const f_string_static string1, const f_string_static string2, const f_string_range range1, const f_string_range range2);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_mash_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mash_
extern f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_mash()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mash_nulless_
extern f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_mish_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mish_
extern f_return_status fl_string_dynamic_partial_mish(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_mish()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mish_nulless_
extern f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_prepend_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_
extern f_return_status fl_string_dynamic_partial_prepend(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_prepend_assure_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_assure_
extern f_return_status fl_string_dynamic_partial_prepend_assure(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_prepend_assure()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_assure_nulless_
extern f_return_status fl_string_dynamic_partial_prepend_assure_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if source length is 0 or range is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_partial_prepend()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_nulless_
extern f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_prepend_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_
extern f_return_status fl_string_dynamic_prepend(const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_prepend_assure_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_assure_
extern f_return_status fl_string_dynamic_prepend_assure(const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_prepend_assure()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_assure_nulless_
extern f_return_status fl_string_dynamic_prepend_assure_nulless(const f_string_static source, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0.
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_prepend()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_nulless_
extern f_return_status fl_string_dynamic_prepend_nulless(const f_string_static source, f_string_dynamic *destination);
*
* @return
* F_none on success.
- * F_data_not if nothing to rip, no allocations or reallocations are performed.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_data_not if source length is 0.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_rip_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_rip_
extern f_return_status fl_string_dynamic_rip(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if nothing to rip, no allocations or reallocations are performed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_rip()
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_rip_nulless_
extern f_return_status fl_string_dynamic_rip_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
* F_none_eos on success, but stopped at end of buffer.
* F_none_stop on success, but stopped stop location.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_dynamic_seek_line_to_utf_character()
- * @see fl_string_seek_line_to_utf_character()
*/
#ifndef _di_fl_string_dynamic_seek_line_to_
extern f_return_status fl_string_dynamic_seek_line_to(const f_string_static buffer, f_string_range *range, const int8_t seek_to_this);
* F_none on success.
* F_none_eol on success, but stopped at EOL.
* F_none_eos on success, but stopped at end of buffer.
- * F_utf (with error bit) if character is an invalid UTF-8 character.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * @see fl_string_dynamic_seek_line_to()
- * @see fl_string_seek_line_to()
+ * Errors from (with error bit): f_utf_char_to_character().
+ *
+ * @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_dynamic_seek_line_to_utf_character_
extern f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_static buffer, f_string_range *range, const f_utf_character seek_to_this);
* F_none_eol on success, but stopped at EOL.
* F_none_eos on success, but stopped at end of buffer.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors from (with error bit): f_utf_is_graph().
*
- * @see fl_string_seek_line_until_graph()
+ * @see f_utf_is_graph()
*/
#ifndef _di_fl_string_dynamic_seek_line_until_graph_
extern f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_static buffer, f_string_range *range, const int8_t placeholder);
* F_none_eos on success, but stopped at end of buffer.
* F_none_stop on success, but stopped stop location.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*
- * @see fl_string_seek_line_until_non_graph()
+ * Errors from (with error bit): f_utf_is_whitespace().
+ *
+ * @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_seek_line_until_non_graph_
extern f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_static buffer, f_string_range *range, const int8_t placeholder);
* F_none_eos on success, but stopped at end of buffer.
* F_none_stop on success, but stopped stop location.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_dynamic_seek_to_utf_character()
- * @see fl_string_seek_to()
- * @see fl_string_seek_to_utf_character()
*/
#ifndef _di_fl_string_dynamic_seek_to_
extern f_return_status fl_string_dynamic_seek_to(const f_string_static buffer, f_string_range *range, const int8_t seek_to_this);
* F_none on success.
* F_none_eos on success, but stopped at end of buffer.
* F_none_stop on success, but stopped stop location.
- * F_utf (with error bit) if character is an invalid UTF-8 character.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
+ * F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * @see fl_string_dynamic_seek_to()
- * @see fl_string_seek_to()
- * @see fl_string_seek_to_character()
+ * Errors from (with error bit): f_utf_char_to_character().
+ *
+ * @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_dynamic_seek_to_utf_character_
extern f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_static buffer, f_string_range *range, const f_utf_character seek_to_this);
*
* @return
* F_none on success.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if string is too large to fit into the buffer.
*/
#ifndef _di_fl_string_dynamic_terminate_
*
* @return
* F_none on success.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if string is too large to fit into the buffer.
*/
#ifndef _di_fl_string_dynamic_terminate_after_
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_mash_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mash_
extern f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_mash()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mash_nulless_
extern f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_mish_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mish_
extern f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_mish()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mish_nulless_
extern f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_prepend_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_
extern f_return_status fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_prepend_assure_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_assure_
extern f_return_status fl_string_prepend_assure(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_prepend_assure()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_assure_nulless_
extern f_return_status fl_string_prepend_assure_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if source length is 0 (start > stop).
- * f_string_length_size (with error bit) if the combined string is too large.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_dynamic_prepend()
+ * F_parameter (with error bit) if a parameter is invalid.
+ * f_string_length_size (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_nulless_
extern f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if nothing to rip, no allocations or reallocations are performed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_rip_nulless()
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_rip_
extern f_return_status fl_string_rip(const f_string source, const f_string_length length, f_string_dynamic *destination);
* @return
* F_none on success.
* F_data_not if nothing to rip, no allocations or reallocations are performed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
- *
- * @see fl_string_rip()
+ * F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_rip_nulless_
extern f_return_status fl_string_rip_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
* F_none_eol on success, but stopped at EOL.
* F_none_stop on success, but stopped stop location.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_dynamic_seek_line_to()
- * @see fl_string_dynamic_seek_line_to_utf_character()
- * @see fl_string_seek_line_to_utf_character()
*/
#ifndef _di_fl_string_seek_line_to_
extern f_return_status fl_string_seek_line_to(const f_string string, f_string_range *range, const int8_t seek_to_this);
* @return
* F_none on success.
* F_none_eol on success, but stopped at EOL.
- * F_utf (with error bit) if character is an invalid UTF-8 character.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
* F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * @see fl_string_dynamic_seek_line_to()
- * @see fl_string_seek_line_to()
+ * Errors from (with error bit): f_utf_char_to_character().
+ *
+ * @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_seek_line_to_utf_character_
extern f_return_status fl_string_seek_line_to_utf_character(const f_string string, f_string_range *range, const f_utf_character seek_to_this);
* F_none_eol on success, but stopped at EOL.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
* F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors from (with error bit): f_utf_is_graph().
*
- * @see fl_string_dynamic_seek_line_until_graph()
+ * @see f_utf_is_graph()
*/
#ifndef _di_fl_string_seek_line_until_graph_
extern f_return_status fl_string_seek_line_until_graph(const f_string string, f_string_range *range, const int8_t placeholder);
* F_none_stop on success, but stopped stop location.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
* F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
*
- * @see fl_string_dynamic_seek_line_until_non_graph()
+ * Errors from (with error bit): f_utf_is_whitespace().
+ *
+ * @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_seek_line_until_non_graph_
extern f_return_status fl_string_seek_line_until_non_graph(const f_string string, f_string_range *range, const int8_t placeholder);
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
* F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
- *
- * @see fl_string_dynamic_seek_to()
- * @see fl_string_dynamic_seek_to_utf_character()
- * @see fl_string_seek_to_utf_character()
*/
#ifndef _di_fl_string_seek_to_
extern f_return_status fl_string_seek_to(const f_string string, f_string_range *range, const int8_t seek_to_this);
* @return
* F_none on success.
* F_none_stop on success, but stopped stop location.
- * F_utf (with error bit) if character is an invalid UTF-8 character.
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
* F_incomplete_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_utf (with error bit) if character is an invalid UTF-8 character.
+ *
+ * Errors from (with error bit): f_utf_char_to_character().
*
- * @see fl_string_dynamic_seek_to()
- * @see fl_string_dynamic_seek_to_utf_character()
- * @see fl_string_seek_to()
+ * @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_seek_to_utf_character_
extern f_return_status fl_string_seek_to_utf_character(const f_string string, f_string_range *range, const f_utf_character seek_to_this);
* F_memory_allocation (with error bit) on allocation error.
* F_memory_reallocation (with error bit) on reallocation error.
* F_file_found_not (with error bit) if file does not exist at the program_path.
- * F_name (with error bit) if the program_path is too long.
+ * F_name (with error bit) on path name error.
* F_memory_out (with error bit) if out of memory.
* F_number_overflow (with error bit) on overflow error.
* F_directory (with error bit) on invalid directory in program_path.
* F_memory_allocation (with error bit) on allocation error.
* F_memory_reallocation (with error bit) on reallocation error.
* F_file_found_not (with error bit) if file does not exist at the program_path.
- * F_name (with error bit) if the program_path is too long.
+ * F_name (with error bit) on path name error.
* F_memory_out (with error bit) if out of memory.
* F_number_overflow (with error bit) on overflow error.
* F_directory (with error bit) on invalid directory in program_path.
* F_memory_allocation (with error bit) on allocation error.
* F_memory_reallocation (with error bit) on reallocation error.
* F_file_found_not (with error bit) if file does not exist at the program_path.
- * F_name (with error bit) if the program_path is too long.
+ * F_name (with error bit) on path name error.
* F_memory_out (with error bit) if out of memory.
* F_number_overflow (with error bit) on overflow error.
* F_directory (with error bit) on invalid directory in program_path.
for (k = 0; k < contents.array[i].used; k++) {
status = fl_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[k], &values[j]->array[values[j]->used]);
-
if (F_status_is_error(status)) return status;
values[j]->used++;
for (k = 0; k < contents.array[i].used; k++) {
status = fl_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[k], values[j]);
-
if (F_status_is_error(status)) return status;
} // for
} // for
if (values[j]->used == 0) {
for (k = 0; k < contents.array[i].used; k++) {
status = fl_string_dynamic_partial_mash_nulless(glue, glue_length, buffer, contents.array[i].array[k], values[j]);
-
if (F_status_is_error(status)) return status;
} // for
}
for (k = 0; k < contents.array[i].used; k++) {
status = fl_string_dynamic_partial_mash_nulless(glue, glue_length, buffer, contents.array[i].array[k], &values[j]->array[values[j]->used]);
-
if (F_status_is_error(status)) return status;
} // for
for (k = 0; k < contents.array[i].used; k++) {
status = fl_string_dynamic_partial_mash_nulless(glue, glue_length, buffer, contents.array[i].array[k], values[j]);
-
if (F_status_is_error(status)) return status;
} // for
} // for