Relax parameter checks on most of the print functions.
Add check to see if file.stream is set and if not return F_stream_not but not an error.
Make sue similar string checks are consistently used.
This should better allow for more flexible designs around stream and string data.
This eliminates a good amount of parameter checking.
Further simplify printing that has a common structure into more common print function.
This print function may end up being moved to a more common path as I can see printing from other directory trees in Featureless Make utilizing this.
#ifndef _di_f_print_
f_status_t f_print(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!length || !string) return F_data_not;
return private_f_print(string, length, file);
#ifndef _di_f_print_character_
f_status_t f_print_character(const f_char_t character, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+
+ if (!file.stream) return F_stream_not;
clearerr_unlocked(file.stream);
#ifndef _di_f_print_character_safely_
f_status_t f_print_character_safely(const f_char_t character, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+
+ if (!file.stream) return F_stream_not;
clearerr_unlocked(file.stream);
#ifndef _di_f_print_dynamic_
f_status_t f_print_dynamic(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print(buffer.string, buffer.used, file);
}
#ifndef _di_f_print_dynamic_partial_
f_status_t f_print_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_dynamic_partial_raw_
f_status_t f_print_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_dynamic_partial_raw_safely_
f_status_t f_print_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_dynamic_partial_safely_
f_status_t f_print_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_dynamic_raw_
f_status_t f_print_dynamic_raw(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_raw(buffer.string, buffer.used, file);
#ifndef _di_f_print_dynamic_raw_safely_
f_status_t f_print_dynamic_raw_safely(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_raw_safely(buffer.string, buffer.used, file);
#ifndef _di_f_print_dynamic_safely_
f_status_t f_print_dynamic_safely(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_safely(buffer.string, buffer.used, file);
#ifndef _di_f_print_except_
f_status_t f_print_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!length || !string) return F_data_not;
return private_f_print_except(string, offset, length, except, file);
#ifndef _di_f_print_except_dynamic_
f_status_t f_print_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except(buffer.string, 0, buffer.used, except, file);
#ifndef _di_f_print_except_dynamic_partial_
f_status_t f_print_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_dynamic_partial_raw_
f_status_t f_print_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_dynamic_partial_raw_safely_
f_status_t f_print_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_dynamic_partial_safely_
f_status_t f_print_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_dynamic_raw_
f_status_t f_print_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_raw(buffer.string, 0, buffer.used, except, file);
#ifndef _di_f_print_except_dynamic_raw_safely_
f_status_t f_print_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_raw_safely(buffer.string, 0, buffer.used, except, file);
#ifndef _di_f_print_except_dynamic_safely_
f_status_t f_print_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_safely(buffer.string, 0, buffer.used, except, file);
#ifndef _di_f_print_except_in_
f_status_t f_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_in(string, offset, length, except_at, except_in, file);
}
#ifndef _di_f_print_except_in_dynamic_
f_status_t f_print_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_in(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_f_print_except_in_dynamic_partial_
f_status_t f_print_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_in_dynamic_partial_raw_
f_status_t f_print_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_in_dynamic_partial_raw_safely_
f_status_t f_print_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_in_dynamic_partial_safely_
f_status_t f_print_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used || !buffer.string) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_f_print_except_in_dynamic_raw_
f_status_t f_print_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_in_raw(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_f_print_except_in_dynamic_raw_safely_
f_status_t f_print_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_in_raw_safely(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_f_print_except_in_dynamic_safely_
f_status_t f_print_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used || !buffer.string) return F_data_not;
return private_f_print_except_in_safely(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_f_print_except_in_raw_
f_status_t f_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_in_raw(string, offset, length, except_at, except_in, file);
}
#ifndef _di_f_print_except_in_raw_safely_
f_status_t f_print_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_in_raw_safely(string, offset, length, except_at, except_in, file);
}
#ifndef _di_f_print_except_in_safely_
f_status_t f_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_in_safely(string, offset, length, except_at, except_in, file);
}
#ifndef _di_f_print_except_raw_
f_status_t f_print_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_raw(string, offset, length, except, file);
}
#ifndef _di_f_print_except_raw_safely_
f_status_t f_print_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_raw_safely(string, offset, length, except, file);
}
#ifndef _di_f_print_except_safely_
f_status_t f_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_except_safely(string, offset, length, except, file);
}
#ifndef _di_f_print_raw_
f_status_t f_print_raw(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_raw(string, length, file);
}
#ifndef _di_f_print_raw_safely_
f_status_t f_print_raw_safely(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_raw_safely(string, length, file);
}
#ifndef _di_f_print_raw_terminated_
f_status_t f_print_raw_terminated(const f_string_t string, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!string) return F_data_not;
// The f_print_raw_terminated() and f_print_terminated() are functionality identical due to being NULL terminated.
return private_f_print_terminated(string, file);
#ifndef _di_f_print_safely_
f_status_t f_print_safely(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!length || !string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!length || !string) return F_data_not;
return private_f_print_safely(string, length, file);
}
#ifndef _di_f_print_safely_terminated_
f_status_t f_print_safely_terminated(const f_string_t string, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!string) return F_data_not;
f_array_length_t start = 0;
f_array_length_t total = 0;
#ifndef _di_f_print_terminated_
f_status_t f_print_terminated(const f_string_t string, const f_file_t file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
- if (!string) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!string) return F_data_not;
return private_f_print_terminated(string, file);
}
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure (fwrite_unlocked() returns 0).
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
* F_utf on success, but character is a UTF-8 character.
*
* F_output (with error bit) on failure (fwrite_unlocked() returns 0).
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not if there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure.
* F_parameter (with error bit) if a parameter is invalid.
#ifndef _di_fl_print_format_
f_status_t fl_print_format(const f_string_t string, const f_file_t file, ...) {
- #ifndef _di_level_1_parameter_checking_
- if (!string) return F_status_set_error(F_parameter);
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+
+ if (!file.stream) return F_stream_not;
+ if (!string) return F_data_not;
f_status_t status = F_none;
#ifndef _di_fl_print_format_convert_
f_string_t fl_print_format_convert(const f_string_t string, const f_file_t file, va_list ap, f_status_t * const status) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return 0;
- #endif // _di_level_1_parameter_checking_
- return private_fl_print_format_convert(string, file, ap, status);
+ if (!file.stream) {
+ if (status) *status = F_stream_not;
+
+ return 0;
+ }
+
+ if (!string) {
+ if (status) *status = F_data_not;
+
+ return 0;
+ }
+
+ if (status) {
+ return private_fl_print_format_convert(string, file, ap, status);
+ }
+
+ f_status_t status_local = F_none;
+
+ return private_fl_print_format_convert(string, file, ap, &status_local);
}
#endif // _di_fl_print_format_convert_
#ifndef _di_fl_print_string_va_
f_status_t fl_print_string_va(const f_string_t string, const f_file_t file, va_list ap) {
- #ifndef _di_level_1_parameter_checking_
- if (!string) return F_status_set_error(F_parameter);
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+
+ if (!file.stream) return F_stream_not;
+ if (!string) return F_data_not;
f_status_t status = F_none;
#ifndef _di_fl_print_trim_
f_status_t fl_print_trim(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim(string, length, file);
#ifndef _di_fl_print_trim_raw_
f_status_t fl_print_trim_raw(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_raw(string, length, file);
#ifndef _di_fl_print_trim_raw_safely_
f_status_t fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_raw_safely(string, length, file);
#ifndef _di_fl_print_trim_safely_
f_status_t fl_print_trim_safely(const f_string_t string, const f_array_length_t length, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_safely(string, length, file);
#ifndef _di_fl_print_trim_dynamic_
f_status_t fl_print_trim_dynamic(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim(buffer.string, buffer.used, file);
#ifndef _di_fl_print_trim_dynamic_raw_
f_status_t fl_print_trim_dynamic_raw(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_raw(buffer.string, buffer.used, file);
#ifndef _di_fl_print_trim_dynamic_raw_safely_
f_status_t fl_print_trim_dynamic_raw_safely(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_raw_safely(buffer.string, buffer.used, file);
#ifndef _di_fl_print_trim_dynamic_safely_
f_status_t fl_print_trim_dynamic_safely(const f_string_static_t buffer, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_safely(buffer.string, buffer.used, file);
#ifndef _di_fl_print_trim_dynamic_partial_
f_status_t fl_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_dynamic_partial_raw_
f_status_t fl_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_dynamic_partial_raw_safely_
f_status_t fl_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_dynamic_partial_safely_
f_status_t fl_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_
f_status_t fl_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_raw_
f_status_t fl_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_raw_safely_
f_status_t fl_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_safely_
f_status_t fl_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_dynamic_
f_status_t fl_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_dynamic_raw_
f_status_t fl_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_dynamic_raw_safely_
f_status_t fl_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_dynamic_safely_
f_status_t fl_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
const f_string_ranges_t except_in = f_string_ranges_t_initialize;
#ifndef _di_fl_print_trim_except_in_
f_status_t fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_except_in(string, offset, offset + length, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_raw_
f_status_t fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_except_in_raw(string, offset, offset + length, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_raw_safely_
f_status_t fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_except_in_raw_safely(string, offset, offset + length, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_safely_
f_status_t fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!string || !length) return F_data_not;
return private_fl_print_trim_except_in_safely(string, offset, offset + length, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_dynamic_
f_status_t fl_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_except_in(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_dynamic_raw_
f_status_t fl_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_except_in_raw(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_dynamic_raw_safely_
f_status_t fl_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_except_in_raw_safely(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_dynamic_safely_
f_status_t fl_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
+ if (!file.stream) return F_stream_not;
if (!buffer.used) return F_data_not;
return private_fl_print_trim_except_in_safely(buffer.string, 0, buffer.used, except_at, except_in, file);
#ifndef _di_fl_print_trim_except_in_dynamic_partial_
f_status_t fl_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_in_dynamic_partial_raw_
f_status_t fl_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_in_dynamic_partial_raw_safely_
f_status_t fl_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_in_dynamic_partial_safely_
f_status_t fl_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_dynamic_partial_
f_status_t fl_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_dynamic_partial_raw_
f_status_t fl_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_dynamic_partial_raw_safely_
f_status_t fl_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
#ifndef _di_fl_print_trim_except_dynamic_partial_safely_
f_status_t fl_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, const f_file_t file) {
- #ifndef _di_level_1_parameter_checking_
- if (!file.stream) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
- if (!buffer.used || range.start > range.stop || range.start >= buffer.used) {
- return F_data_not;
- }
+ if (!file.stream) return F_stream_not;
+ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
f_array_length_t length = (range.stop - range.start) + 1;
*
* @return
* F_none on success.
+ * F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_eos (with error bit) on EOS reached.
* F_output (with error bit) on failure to print to the output file.
* The variable arguments list.
* @param status
* The status is stored here rather then via the return.
+ * Set to NULL to not use.
*
* @return
* This returns a string at either the start position (if nothing done or an error occurred) or at the character last processed.
* The status parameter will be set as follows:
*
* F_none on success.
+ * F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on failure to print to the output file.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_eos (with error bit) on EOS reached.
* F_output (with error bit) on failure to print to the output file.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_complete_not_utf_stop (with error bit) if character is an incomplete UTF-8 fragment at end of the string.
* F_output (with error bit) on error when printing to output.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
* @return
* F_none on success.
* F_data_not on success but there is nothing to print.
+ * F_stream_not if file.stream is NULL.
*
* F_output (with error bit) on error when printing to output.
* F_parameter (with error bit) if a parameter is invalid.
#ifndef _di_fll_print_
f_status_t fll_print(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print(string, length, file);
#ifndef _di_fll_print_character_
f_status_t fll_print_character(const f_char_t character, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_character(character, file);
#ifndef _di_fll_print_character_safely_
f_status_t fll_print_character_safely(const f_char_t character, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_character_safely(character, file);
#ifndef _di_fll_print_dynamic_
f_status_t fll_print_dynamic(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic(buffer, file);
#ifndef _di_fll_print_dynamic_partial_
f_status_t fll_print_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_partial(buffer, range, file);
#ifndef _di_fll_print_dynamic_partial_raw_
f_status_t fll_print_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_partial_raw(buffer, range, file);
#ifndef _di_fll_print_dynamic_partial_raw_safely_
f_status_t fll_print_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_partial_raw_safely(buffer, range, file);
#ifndef _di_fll_print_dynamic_partial_safely_
f_status_t fll_print_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_partial_safely(buffer, range, file);
#ifndef _di_fll_print_dynamic_raw_
f_status_t fll_print_dynamic_raw(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_raw(buffer, file);
#ifndef _di_fll_print_dynamic_raw_safely_
f_status_t fll_print_dynamic_raw_safely(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_raw_safely(buffer, file);
#ifndef _di_fll_print_dynamic_safely_
f_status_t fll_print_dynamic_safely(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_dynamic_safely(buffer, file);
#ifndef _di_fll_print_except_
f_status_t fll_print_except(const f_string_t buffer, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except(buffer, offset, length, except, file);
#ifndef _di_fll_print_except_dynamic_
f_status_t fll_print_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic(buffer, except, file);
#ifndef _di_fll_print_except_dynamic_partial_
f_status_t fll_print_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_partial(buffer, range, except, file);
#ifndef _di_fll_print_except_dynamic_partial_raw_
f_status_t fll_print_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_partial_raw(buffer, range, except, file);
#ifndef _di_fll_print_except_dynamic_partial_raw_safely_
f_status_t fll_print_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_partial_raw_safely(buffer, range, except, file);
#ifndef _di_fll_print_except_dynamic_partial_safely_
f_status_t fll_print_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_partial_safely(buffer, range, except, file);
#ifndef _di_fll_print_except_dynamic_raw_
f_status_t fll_print_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_raw(buffer, except, file);
#ifndef _di_fll_print_except_dynamic_raw_safely_
f_status_t fll_print_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_raw_safely(buffer, except, file);
#ifndef _di_fll_print_except_dynamic_safely_
f_status_t fll_print_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_dynamic_safely(buffer, except, file);
#ifndef _di_fll_print_except_raw_
f_status_t fll_print_except_raw(const f_string_t buffer, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_raw(buffer, offset, length, except, file);
#ifndef _di_fll_print_except_raw_safely_
f_status_t fll_print_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_raw_safely(string, offset, length, except, file);
#ifndef _di_fll_print_except_safely_
f_status_t fll_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_safely(string, offset, length, except, file);
#ifndef _di_fll_print_except_in_
f_status_t fll_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_
f_status_t fll_print_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic(buffer, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_partial_
f_status_t fll_print_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_partial(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_partial_raw_
f_status_t fll_print_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_partial_raw(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_partial_raw_safely_
f_status_t fll_print_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_partial_raw_safely(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_partial_safely_
f_status_t fll_print_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_partial_safely(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_raw_
f_status_t fll_print_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_raw(buffer, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_raw_safely_
f_status_t fll_print_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_raw_safely(buffer, except_at, except_in, file);
#ifndef _di_fll_print_except_in_dynamic_safely_
f_status_t fll_print_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_dynamic_safely(buffer, except_at, except_in, file);
#ifndef _di_fll_print_except_in_raw_
f_status_t fll_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_raw(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_except_in_raw_safely_
f_status_t fll_print_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_raw_safely(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_except_in_safely_
f_status_t fll_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_except_in_safely(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_format_
f_status_t fll_print_format(const f_string_t string, f_file_t file, ...) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
va_list ap;
#ifndef _di_fll_print_format_convert_
f_string_t fll_print_format_convert(const f_string_t string, f_file_t file, va_list ap, f_status_t * const status) {
+ if (!file.stream) {
+ if (status) *status = F_stream_not;
+
+ return 0;
+ }
+
flockfile(file.stream);
f_string_t str = fl_print_format_convert(string, file, ap, status);
#ifndef _di_fll_print_raw_
f_status_t fll_print_raw(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_raw(string, length, file);
#ifndef _di_fll_print_raw_safely_
f_status_t fll_print_raw_safely(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_raw_safely(string, length, file);
#ifndef _di_fll_print_raw_terminated_
f_status_t fll_print_raw_terminated(const f_string_t string, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_raw_terminated(string, file);
#ifndef _di_fll_print_safely_
f_status_t fll_print_safely(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_safely(string, length, file);
#ifndef _di_fll_print_safely_terminated_
f_status_t fll_print_safely_terminated(const f_string_t string, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_safely_terminated(string, file);
#ifndef _di_fll_print_string_va_
f_status_t fll_print_string_va(const f_string_t string, f_file_t file, va_list ap) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_string_va(string, file, ap);
#ifndef _di_fll_print_terminated_
f_status_t fll_print_terminated(const f_string_t string, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = f_print_terminated(string, file);
#ifndef _di_fll_print_trim_raw_
f_status_t fll_print_trim_raw(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_raw(string, length, file);
#ifndef _di_fll_print_trim_raw_safely_
f_status_t fll_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_raw_safely(string, length, file);
#ifndef _di_fll_print_trim_safely_
f_status_t fll_print_trim_safely(const f_string_t string, const f_array_length_t length, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_safely(string, length, file);
#ifndef _di_fll_print_trim_dynamic_
f_status_t fll_print_trim_dynamic(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic(buffer, file);
#ifndef _di_fll_print_trim_dynamic_raw_
f_status_t fll_print_trim_dynamic_raw(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_raw(buffer, file);
#ifndef _di_fll_print_trim_dynamic_raw_safely_
f_status_t fll_print_trim_dynamic_raw_safely(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_raw_safely(buffer, file);
#ifndef _di_fll_print_trim_dynamic_safely_
f_status_t fll_print_trim_dynamic_safely(const f_string_static_t buffer, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_safely(buffer, file);
#ifndef _di_fll_print_trim_dynamic_partial_
f_status_t fll_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_partial(buffer, range, file);
#ifndef _di_fll_print_trim_dynamic_partial_raw_
f_status_t fll_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_partial_raw(buffer, range, file);
#ifndef _di_fll_print_trim_dynamic_partial_raw_safely_
f_status_t fll_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_partial_raw_safely(buffer, range, file);
#ifndef _di_fll_print_trim_dynamic_partial_safely_
f_status_t fll_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_dynamic_partial_safely(buffer, range, file);
#ifndef _di_fll_print_trim_except_
f_status_t fll_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except(string, offset, length, except, file);
#ifndef _di_fll_print_trim_except_raw_
f_status_t fll_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_raw(string, offset, length, except, file);
#ifndef _di_fll_print_trim_except_raw_safely_
f_status_t fll_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_raw_safely(string, offset, length, except, file);
#ifndef _di_fll_print_trim_except_safely_
f_status_t fll_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_safely(string, offset, length, except, file);
#ifndef _di_fll_print_trim_except_dynamic_
f_status_t fll_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic(buffer, except, file);
#ifndef _di_fll_print_trim_except_dynamic_raw_
f_status_t fll_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_raw(buffer, except, file);
#ifndef _di_fll_print_trim_except_dynamic_raw_safely_
f_status_t fll_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_raw_safely(buffer, except, file);
#ifndef _di_fll_print_trim_except_dynamic_safely_
f_status_t fll_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_safely(buffer, except, file);
#ifndef _di_fll_print_trim_except_in_
f_status_t fll_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_raw_
f_status_t fll_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_raw(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_raw_safely_
f_status_t fll_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_raw_safely(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_safely_
f_status_t fll_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_safely(string, offset, length, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_
f_status_t fll_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic(buffer, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_raw_
f_status_t fll_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_raw(buffer, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_raw_safely_
f_status_t fll_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_raw_safely(buffer, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_safely_
f_status_t fll_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_safely(buffer, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_partial_
f_status_t fll_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_partial(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_partial_raw_
f_status_t fll_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_partial_raw(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_partial_raw_safely_
f_status_t fll_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_partial_raw_safely(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_in_dynamic_partial_safely_
f_status_t fll_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_in_dynamic_partial_safely(buffer, range, except_at, except_in, file);
#ifndef _di_fll_print_trim_except_dynamic_partial_
f_status_t fll_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_partial(buffer, range, except, file);
#ifndef _di_fll_print_trim_except_dynamic_partial_raw_
f_status_t fll_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_partial_raw(buffer, range, except, file);
#ifndef _di_fll_print_trim_except_dynamic_partial_raw_safely_
f_status_t fll_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_partial_raw_safely(buffer, range, except, file);
#ifndef _di_fll_print_trim_except_dynamic_partial_safely_
f_status_t fll_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, f_file_t file) {
+ if (!file.stream) return F_stream_not;
+
flockfile(file.stream);
const f_status_t status = fl_print_trim_except_dynamic_partial_safely(buffer, range, except, file);
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print().
*
* Errors (with error bit) from: f_print().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_character().
*
* Errors (with error bit) from: f_print_character().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_character_safely().
*
* Errors (with error bit) from: f_print_character_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic().
*
* Errors (with error bit) from: f_print_dynamic().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_partial().
*
* Errors (with error bit) from: f_print_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_partial_raw().
*
* Errors (with error bit) from: f_print_dynamic_partial_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_partial_raw_safely().
*
* Errors (with error bit) from: f_print_dynamic_partial_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_partial_safely().
*
* Errors (with error bit) from: f_print_dynamic_partial_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_raw().
*
* Errors (with error bit) from: f_print_dynamic_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_raw_safely().
*
* Errors (with error bit) from: f_print_dynamic_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_dynamic_safely().
*
* Errors (with error bit) from: f_print_dynamic_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except().
*
* Errors (with error bit) from: f_print_except().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic().
*
* Errors (with error bit) from: f_print_except_dynamic().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_partial().
*
* Errors (with error bit) from: f_print_except_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_partial_raw().
*
* Errors (with error bit) from: f_print_except_dynamic_partial_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_partial_raw_safely().
*
* Errors (with error bit) from: f_print_except_dynamic_partial_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_partial_safely().
*
* Errors (with error bit) from: f_print_except_dynamic_partial_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_raw().
*
* Errors (with error bit) from: f_print_except_dynamic_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_raw_safely().
*
* Errors (with error bit) from: f_print_except_dynamic_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_safely().
*
* Errors (with error bit) from: f_print_except_dynamic_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in().
*
* Errors (with error bit) from: f_print_except_in().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_raw().
*
* Errors (with error bit) from: f_print_except_in_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_raw_safely().
*
* Errors (with error bit) from: f_print_except_in_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_safely().
*
* Errors (with error bit) from: f_print_except_in_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic().
*
* Errors (with error bit) from: f_print_except_in_dynamic().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_partial().
*
* Errors (with error bit) from: f_print_except_in_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_partial_raw().
*
* Errors (with error bit) from: f_print_except_in_dynamic_partial_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_partial_raw_safely().
*
* Errors (with error bit) from: f_print_except_in_dynamic_partial_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_partial_safely().
*
* Errors (with error bit) from: f_print_except_in_dynamic_partial_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_raw().
*
* Errors (with error bit) from: f_print_except_in_dynamic_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_raw_safely().
*
* Errors (with error bit) from: f_print_except_in_dynamic_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_in_dynamic_safely().
*
* Errors (with error bit) from: f_print_except_in_dynamic_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_raw().
*
* Errors (with error bit) from: f_print_except_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_raw_safely().
*
* Errors (with error bit) from: f_print_except_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_safely().
*
* Errors (with error bit) from: f_print_except_safely().
* Additional arguments relating to the string.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_format().
*
* Errors (with error bit) from: fl_print_format().
* The variable arguments list.
* @param status
* The status is stored here rather then via the return.
+ * Set to NULL to not use.
*
* @return
- * Result from: fl_print_format_convert().
+ * This returns a string at either the start position (if nothing done or an error occurred) or at the character last processed.
+ * The caller is expected to increment past this if they wish to continue processing the string.
+ *
+ * The status parameter will be set as follows:
+ *
+ * F_stream_not if file.stream is NULL.
+ *
+ * Success from: fl_print_format_convert().
+ *
+ * Errors (with error bit) from: fl_print_format_convert().
*
* @see flockfile()
* @see funlockfile()
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_raw().
*
* Errors (with error bit) from: f_print_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_raw_safely().
*
* Errors (with error bit) from: f_print_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_raw_terminated().
*
* Errors (with error bit) from: f_print_raw_terminated().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_safely().
*
* Errors (with error bit) from: f_print_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_safely_terminated().
*
* Errors (with error bit) from: f_print_safely_terminated().
* The va_start(ap, string) and va_end(ap) is required to be called outside this function.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_string_va().
*
* Errors (with error bit) from: fl_print_string_va().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_terminated().
*
* Errors (with error bit) from: f_print_terminated().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim().
*
* Errors (with error bit) from: fl_print_trim().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_raw().
*
* Errors (with error bit) from: fl_print_trim_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_safely().
*
* Errors (with error bit) from: fl_print_trim_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_dynamic().
*
* Errors (with error bit) from: fl_print_trim_dynamic().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_dynamic_raw().
*
* Errors (with error bit) from: fl_print_trim_dynamic_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_dynamic_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_dynamic_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_dynamic_safely().
*
* Errors (with error bit) from: fl_print_trim_dynamic_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_dynamic_partial().
*
* Errors (with error bit) from: fl_print_trim_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_dynamic_partial_raw().
*
* Errors (with error bit) from: fl_print_trim_dynamic_partial_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_partial().
*
* Errors (with error bit) from: f_print_except_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: f_print_except_dynamic_partial().
*
* Errors (with error bit) from: f_print_except_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except().
*
* Errors (with error bit) from: fl_print_trim_except().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_raw().
*
* Errors (with error bit) from: fl_print_trim_except_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_except_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_safely().
*
* Errors (with error bit) from: fl_print_trim_except_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_raw().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_safely().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in().
*
* Errors (with error bit) from: fl_print_trim_except_in().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_raw().
*
* Errors (with error bit) from: fl_print_trim_except_in_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_except_in_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_safely().
*
* Errors (with error bit) from: fl_print_trim_except_in_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_raw().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_safely().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_partial().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_partial_raw().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_partial_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_partial_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_partial_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_in_dynamic_partial_safely().
*
* Errors (with error bit) from: fl_print_trim_except_in_dynamic_partial_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_partial().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_partial().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_partial_raw().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_partial_raw().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_partial_raw_safely().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_partial_raw_safely().
* The file structure containing a valid stream to output to, including standard streams such as stdout and stderr.
*
* @return
+ * F_stream_not if file.stream is NULL.
+ *
* Success from: fl_print_trim_except_dynamic_partial_safely().
*
* Errors (with error bit) from: fl_print_trim_except_dynamic_partial_safely().
} // for
if (F_status_is_error(status)) {
- fake_make_print_error_argument_invalid_section(data->setting, data->main->error, data->main->parameters, data->main->parameters.remaining.array[i]);
+ fake_make_print_error_argument_invalid_section(data->setting, data->main->error, data->main->parameters.arguments.array[data->main->parameters.remaining.array[i]]);
}
else {
int result = 0;
status_file = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
if (status_file == F_false || status_file == F_file_found_not) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- f_file_stream_lock(data_make->main->error.to);
-
- fl_print_format("%r%[%QThe last file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
- fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->error.notable);
- fl_print_format("%[' must be a valid directory.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s);
-
- f_file_stream_unlock(data_make->main->error.to);
- }
+ fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
status_file = f_directory_is(data_make->cache_arguments.array[1]);
if (status_file == F_false) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- f_file_stream_lock(data_make->main->error.to);
-
- fl_print_format("%r%[%QThe second file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
- fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[1], data_make->error.notable);
- fl_print_format("%[' must be a valid directory.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s);
-
- f_file_stream_unlock(data_make->main->error.to);
- }
+ fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "second", data_make->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
if (data_make->cache_arguments.used) {
const f_status_t status = fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]);
+ if (status == F_true) return F_none;
if (status == F_none) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- fll_print_format("%r%[%QDefine name must not be an empty string.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s);
- }
-
- return F_status_set_error(F_failure);
+ fake_make_print_error_define_name_empty(data_make->setting, data_make->main->error);
}
-
- if (status == F_false) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- f_file_stream_lock(data_make->main->error.to);
-
- fl_print_format("%r%[%QInvalid characters in the define setting name '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
- fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable);
- fl_print_format("%[', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s);
-
- f_file_stream_unlock(data_make->main->error.to);
- }
-
- return F_status_set_error(F_failure);
+ else {
+ fake_make_print_error_define_invalid_character(data_make->setting, data_make->main->error, data_make->cache_arguments.array[0]);
}
- return F_none;
+ return F_status_set_error(F_failure);
}
fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error);
} // for
if (id_section == data_make->fakefile.used) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- f_file_stream_lock(data_make->main->error.to);
-
- fl_print_format("%r%[%QNo operation section named '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
- fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable);
- fl_print_format("%[' is found.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s);
-
- f_file_stream_unlock(data_make->main->error.to);
+ fake_make_print_error_operation_section_not_found(data_make->setting, data_make->main->error, data_make->cache_arguments.array[0]);
return F_status_set_error(F_failure);
}
for (f_array_length_t i = 0; i < section_stack->used; ++i) {
if (section_stack->array[i] == id_section) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- f_file_stream_lock(data_make->main->error.to);
-
- fl_print_format("%r%[%QThe section operation '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
- fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->fakefile.array[id_section].name, data_make->error.notable);
- fl_print_format("%[' is already in the operation stack, recursion is not allowed.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s);
-
- f_file_stream_unlock(data_make->main->error.to);
- }
+ fake_make_print_error_operation_recursion(data_make->setting, data_make->main->error, data_make->buffer, data_make->fakefile.array[id_section].name);
return F_status_set_error(F_failure);
}
for (f_array_length_t i = 0; i < 33; ++i) {
if (fl_string_dynamic_compare(reserved_name[i], data_make->cache_arguments.array[0]) == F_equal_to) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- fll_print_format("%r%[%QCannot assign a value to the parameter name '%r' because it is a reserved parameter name.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, reserved_name[i], data_make->error.context, f_string_eol_s);
+ fake_make_print_error_reserved_parameter_name(data_make->setting, data_make->main->error, reserved_name[i]);
status = F_status_set_error(F_failure);
}
}
if (data_make->path.stack.used == 1) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- fll_print_format("%r%[%QMust not attempt to pop project root off of path stack.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s);
- }
+ fake_make_print_error_pop_last_path(data_make->setting, data_make->main->error);
return F_status_set_error(F_failure);
}
}
if (!status) {
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- f_file_stream_lock(data_make->main->error.to);
-
- fl_print_format("%r%[%QThe file '%]", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context);
- fl_print_format("%[%Q%]", data_make->main->error.to, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable);
- fl_print_format("%[' must be a directory file.%]%r", data_make->main->error.to, data_make->error.context, data_make->error.context, f_string_eol_s);
-
- f_file_stream_unlock(data_make->main->error.to);
- }
+ fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, 0, data_make->cache_arguments.array[0]);
return F_status_set_error(F_failure);
}
return F_none;
}
- //fake_make_print_operate_set_path_verbose(data_make->setting, data_make->main->error, f_string_empty_s);
-
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- fll_print_format("%r%[%QFilename argument must not be an empty string.%]%r", data_make->main->error.to, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s);
- }
+ fake_make_print_error_file_name_empty(data_make->setting, data_make->main->error);
return F_status_set_error(F_failure);
}
#endif
#ifndef _di_fake_make_print_error_argument_invalid_section_
- f_status_t fake_make_print_error_argument_invalid_section(fake_setting_t * const setting, const fl_print_t print, const f_console_parameters_t parameters, const f_array_length_t index) {
+ f_status_t fake_make_print_error_argument_invalid_section(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) {
- if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
- f_file_stream_lock(print.to);
-
- fake_print_line_first_unlocked(setting, print);
-
- fl_print_format("%[%QThe argument '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%]", print.to, print.notable, parameters.arguments.array[index], print.notable);
- fl_print_format("%[' is not a valid section name.%]%r", print.to, print.context, print.context, f_string_eol_s);
-
- f_file_stream_unlock(print.to);
-
- return F_none;
+ return fake_make_print_error_simple_variable(setting, print, "The argument", name, " is not a valid section name");
}
#endif // _di_fake_make_print_error_argument_invalid_section_
#ifndef _di_fake_make_print_error_compiler_not_specified_
f_status_t fake_make_print_error_compiler_not_specified(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t action) {
- if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
- f_file_stream_lock(print.to);
-
- fake_print_line_first_unlocked(setting, print);
-
- fl_print_format("%[%QNo compiler has been specified, cannot perform '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%]", print.to, print.notable, action, print.notable);
- fl_print_format("%[' section operation.%]%r", print.to, print.context, print.context, f_string_eol_s);
-
- f_file_stream_unlock(print.to);
-
- return F_none;
+ return fake_make_print_error_simple_variable(setting, print, "No compiler has been specified, cannot perform", action, " section operation");
}
#endif // _di_fake_make_print_error_compiler_not_specified_
fake_print_line_first_unlocked(setting, print);
- fl_print_format("%[%QThe %S content '%]", print.to, print.context, print.prefix, content, print.context);
+ fl_print_format("%[%QThe %S%rcontent '%]", print.to, print.context, print.prefix, content, content ? f_string_space_s : f_string_empty_s, print.context);
fl_print_format("%[%Q%]", print.to, print.notable, file, print.notable);
fl_print_format("%[' must be a valid directory.%]%r", print.to, print.context, print.context, f_string_eol_s);
}
#endif // _di_fake_make_print_error_content_not_directory_
-#ifndef _di_fake_make_print_error_define_invalid_character_
- f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) {
-
- if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
- f_file_stream_lock(print.to);
+#ifndef _di_fake_make_print_error_define_name_empty_
+ f_status_t fake_make_print_error_define_name_empty(fake_setting_t * const setting, const fl_print_t print) {
- fake_print_line_first_unlocked(setting, print);
-
- fl_print_format("%[%QInvalid characters in the define setting name '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable);
- fl_print_format("%[', only alpha-numeric ASCII characters and underscore (without a leading digit) are allowed.%]%r", print.to, print.context, print.context, f_string_eol_s);
+ return fake_make_print_error_simple(setting, print, "Define name must not be an empty string");
+ }
+#endif // _di_fake_make_print_error_define_name_empty_
- f_file_stream_unlock(print.to);
+#ifndef _di_fake_make_print_error_define_invalid_character_
+ f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) {
- return F_none;
+ return fake_make_print_error_simple_variable(setting, print, "Invalid characters in the define name", name, ", only alpha-numeric ASCII characters and underscore (without a leading digit) are allowed");
}
#endif // _di_fake_make_print_error_define_invalid_character_
#ifndef _di_fake_make_print_error_file_name_empty_
f_status_t fake_make_print_error_file_name_empty(fake_setting_t * const setting, const fl_print_t print) {
- if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
- f_file_stream_lock(print.to);
-
- fake_print_line_first_unlocked(setting, print);
-
- fll_print_format("%[%QFilename argument must not be an empty string.%]%r", print.to, print.context, print.prefix, print.context, f_string_eol_s);
-
- f_file_stream_unlock(print.to);
-
- return F_none;
+ return fake_make_print_error_simple(setting, print, "File name argument must not be an empty string");
}
#endif // _di_fake_make_print_error_file_name_empty_
}
#endif // _di_fake_make_print_error_operation_incomplete_
+#ifndef _di_fake_make_print_error_operation_recursion_
+ f_status_t fake_make_print_error_operation_recursion(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t range) {
+
+ if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+
+ f_file_stream_lock(print.to);
+
+ fake_print_line_first_unlocked(setting, print);
+
+ fl_print_format("%[%QThe section operation '%]", print.to, print.context, print.prefix, print.context);
+ fl_print_format("%[%/Q%]", print.to, print.notable, buffer, range, print.notable);
+ fl_print_format("%[' is already in the operation stack, recursion is not allowed.%]%r", print.to, print.context, print.context, f_string_eol_s);
+
+ f_file_stream_unlock(print.to);
+
+ return F_none;
+ }
+#endif // _di_fake_make_print_error_operation_recursion_
+
+#ifndef _di_fake_make_print_error_operation_section_not_found_
+ f_status_t fake_make_print_error_operation_section_not_found(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) {
+
+ return fake_make_print_error_simple_variable(setting, print, "No operation section named", name, " is found");
+ }
+#endif // _di_fake_make_print_error_operation_section_not_found_
+
#ifndef _di_fake_make_print_error_out_of_range_number_
f_status_t fake_make_print_error_out_of_range_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number, const f_number_unsigned_t minimum, const f_number_unsigned_t maximum) {
}
#endif // _di_fake_make_print_error_out_of_range_number_
+#ifndef _di_fake_make_print_error_pop_last_path_
+ f_status_t fake_make_print_error_pop_last_path(fake_setting_t * const setting, const fl_print_t print) {
+
+ return fake_make_print_error_simple(setting, print, "Must not attempt to pop project root off of path stack");
+ }
+#endif // _di_fake_make_print_error_pop_last_path_
+
#ifndef _di_fake_make_print_error_program_failed_
f_status_t fake_make_print_error_program_failed(fake_setting_t * const setting, const fl_print_t print, const int return_code) {
#ifndef _di_fake_make_print_error_program_not_found_
f_status_t fake_make_print_error_program_not_found(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t program) {
+ return fake_make_print_error_simple_variable(setting, print, "Failed to find program", program, " for executing");
+ }
+#endif // _di_fake_make_print_error_program_not_found_
+
+#ifndef _di_fake_make_print_error_reserved_parameter_name_
+ f_status_t fake_make_print_error_reserved_parameter_name(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) {
+
+ return fake_make_print_error_simple_variable(setting, print, "Cannot assign a value to the parameter name", name, " because it is a reserved parameter name");
+ }
+#endif // _di_fake_make_print_error_reserved_parameter_name_
+
+#ifndef _di_fake_make_print_error_simple_
+ f_status_t fake_make_print_error_simple(fake_setting_t * const setting, const fl_print_t print, const f_string_t message) {
+
if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
f_file_stream_lock(print.to);
fake_print_line_first_unlocked(setting, print);
- fl_print_format("%[%QFailed to find program '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%]", print.to, print.notable, program, print.notable);
- fl_print_format("%[' for executing.%]%r", print.to, print.context, print.context, f_string_eol_s);
+ fl_print_format("%[%Q%S.%]%r", print.to, print.context, print.prefix, message, print.context, f_string_eol_s);
f_file_stream_unlock(print.to);
return F_none;
}
-#endif // _di_fake_make_print_error_program_not_found_
+#endif // _di_fake_make_print_error_simple_
-#ifndef _di_fake_make_print_error_unsupported_number_
- f_status_t fake_make_print_error_unsupported_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number) {
+#ifndef _di_fake_make_print_error_simple_variable_
+ f_status_t fake_make_print_error_simple_variable(fake_setting_t * const setting, const fl_print_t print, const f_string_t before, const f_string_static_t variable, const f_string_t after) {
if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
fake_print_line_first_unlocked(setting, print);
- fl_print_format("%[%QInvalid or unsupported number provided '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%]", print.to, print.notable, number, print.notable);
- fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
+ fl_print_format("%[%Q%S '%]", print.to, print.context, print.prefix, before, print.context);
+ fl_print_format("%[%Q%]", print.to, print.notable, variable, print.notable);
+ fl_print_format("%['%S.%]%r", print.to, print.context, after, print.context, f_string_eol_s);
f_file_stream_unlock(print.to);
return F_none;
}
+#endif // _di_fake_make_print_error_simple_variable_
+
+#ifndef _di_fake_make_print_error_unsupported_number_
+ f_status_t fake_make_print_error_unsupported_number(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t number) {
+
+ return fake_make_print_error_simple_variable(setting, print, "setting, print, Invalid or unsupported number provided", number, 0);
+ }
#endif // _di_fake_make_print_error_unsupported_number_
#ifndef _di_fake_make_print_error_unsupported_type_
* This does not alter setting.status.
* @param print
* The output structure to print to.
- * @param parameters
- * The console parameters.
- * @param index
- * An index within the console parameters arguments that represents the invalid argument.
+ * @param name
+ * The invalid section name.
*
* @return
* F_none on success.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fake_make_print_error_argument_invalid_section_
- extern f_status_t fake_make_print_error_argument_invalid_section(fake_setting_t * const setting, const fl_print_t print, const f_console_parameters_t parameters, const f_array_length_t index);
+ extern f_status_t fake_make_print_error_argument_invalid_section(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name);
#endif // _di_fake_make_print_error_argument_invalid_section_
/**
#endif // _di_fake_make_print_error_content_not_directory_
/**
+ * Print error about a define name being an empty string.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_define_name_empty_
+ extern f_status_t fake_make_print_error_define_name_empty(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_make_print_error_define_name_empty_
+
+/**
* Print error about a file not being of a specific type.
*
* @param setting
#endif // _di_fake_make_print_error_operation_incomplete_
/**
+ * Print error about an operation recursion not being allowed.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param buffer
+ * The buffer containing the range to use.
+ * @param range
+ * The range within the buffer representing the operation name.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_operation_recursion_
+ extern f_status_t fake_make_print_error_operation_recursion(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t range);
+#endif // _di_fake_make_print_error_operation_recursion_
+
+/**
+ * Print error about an operation section not being found.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
+ * @param name
+ * The name of the operation.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_operation_section_not_found_
+ extern f_status_t fake_make_print_error_operation_section_not_found(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name);
+#endif // _di_fake_make_print_error_operation_section_not_found_
+
+/**
* Print error about number being out of range.
*
* @param setting
#endif // _di_fake_make_print_error_out_of_range_number_
/**
+ * Print error about attempting to pop last path off the project path stack.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_pop_last_path_
+ extern f_status_t fake_make_print_error_pop_last_path(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_make_print_error_pop_last_path_
+
+/**
* Print error about program failed.
*
* @param setting
#endif // _di_fake_make_print_error_program_not_found_
/**
+ * Print error about attempting to assign to a reserved parameter name.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
+ * @param name
+ * The reserved parameter name.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_reserved_parameter_name_
+ extern f_status_t fake_make_print_error_reserved_parameter_name(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name);
+#endif // _di_fake_make_print_error_reserved_parameter_name_
+
+/**
+ * Print a simple error message with a single string message.
+ *
+ * This is primarily used by numerous error print functions to reduce code.
+ * This is not used for any error print functions that has more complex format structures.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
+ * @param message
+ * The string to print.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_simple_
+ extern f_status_t fake_make_print_error_simple(fake_setting_t * const setting, const fl_print_t print, const f_string_t message);
+#endif // _di_fake_make_print_error_simple_
+
+/**
+ * Print a simple error message with a before string, an after string, and a string variable.
+ *
+ * This is primarily used by numerous error print functions to reduce code.
+ * This is not used for any error print functions that has more complex format structures.
+ *
+ * @param setting
+ * The main program settings.
+ * (Must be of type fake_setting_t.)
+ *
+ * This does not alter setting.status.
+ * @param print
+ * The output structure to print to.
+ * @param before
+ * The string being printed before the variable.
+ * @param variable
+ * The string representing the variable.
+ * @param before
+ * The string being printed after the variable.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_make_print_error_simple_variable_
+ extern f_status_t fake_make_print_error_simple_variable(fake_setting_t * const setting, const fl_print_t print, const f_string_t before, const f_string_static_t variable, const f_string_t after);
+#endif // _di_fake_make_print_error_simple_variable_
+
+/**
* Print error about number not being supported.
*
* @param setting