#endif // _di_level_1_parameter_checking_
if (start_color.used != 0) {
- fprintf(file, "%s", start_color.string);
+ f_status status = f_print_dynamic_string(file, start_color);
+
+ if (f_error_is_error(status)) return status;
}
va_list ap;
va_end(ap);
if (end_color.used != 0) {
- fprintf(file, "%s", end_color.string);
+ f_status status = f_print_dynamic_string(file, end_color);
+
+ if (f_error_is_error(status)) return status;
}
return f_none;
#endif // _di_level_1_parameter_checking_
if (start_color.used != 0) {
- fprintf(file, "%s", start_color.string);
+ f_status status = f_print_dynamic_string(file, start_color);
+
+ if (f_error_is_error(status)) return status;
}
va_list ap;
va_end(ap);
if (end_color.used != 0) {
- fprintf(file, "%s", end_color.string);
+ f_status status = f_print_dynamic_string(file, end_color);
+
+ if (f_error_is_error(status)) return status;
}
// now print the trailing newline, this is done _after_ ending the colors to avoid color wrapping issues that can happen when a color code follows a newline
#ifndef _di_fl_print_color_code_
f_return_status fl_print_color_code(f_file_type file, const f_dynamic_string color) {
if (color.used != 0) {
- fprintf(file, "%s", color.string);
+ f_status status = f_print_dynamic_string(file, color);
+
+ if (f_error_is_error(status)) return status;
}
return f_none;