The used may equal size, do not trigger an error.
Change un-reallocated dynamic strings to static strings.
#endif // _di_f_file_touch_at_
#ifndef _di_f_file_write_
- f_return_status f_file_write(const f_file file, const f_string_dynamic buffer, f_string_length *written) {
+ f_return_status f_file_write(const f_file file, const f_string_static buffer, f_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
#endif // _di_f_file_write_
#ifndef _di_f_file_write_block_
- f_return_status f_file_write_block(const f_file file, const f_string_dynamic buffer, f_string_length *written) {
+ f_return_status f_file_write_block(const f_file file, const f_string_static buffer, f_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
#endif // _di_f_file_write_block_
#ifndef _di_f_file_write_until_
- f_return_status f_file_write_until(const f_file file, const f_string_dynamic buffer, const f_string_length total, f_string_length *written) {
+ f_return_status f_file_write_until(const f_file file, const f_string_static buffer, const f_string_length total, f_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
#endif // _di_f_file_write_until_
#ifndef _di_f_file_write_range_
- f_return_status f_file_write_range(const f_file file, const f_string_dynamic buffer, const f_string_range range, f_string_length *written) {
+ f_return_status f_file_write_range(const f_file file, const f_string_static buffer, const f_string_range range, f_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* @see write()
*/
#ifndef _di_f_file_write_
- extern f_return_status f_file_write(const f_file file, const f_string_dynamic buffer, f_string_length *written);
+ extern f_return_status f_file_write(const f_file file, const f_string_static buffer, f_string_length *written);
#endif // _di_f_file_write_
/**
* @see write()
*/
#ifndef _di_f_file_write_block_
- extern f_return_status f_file_write_block(const f_file file, const f_string_dynamic buffer, f_string_length *written);
+ extern f_return_status f_file_write_block(const f_file file, const f_string_static buffer, f_string_length *written);
#endif // _di_f_file_write_block_
/**
* @see write()
*/
#ifndef _di_f_file_write_until_
- extern f_return_status f_file_write_until(const f_file file, const f_string_dynamic buffer, const f_string_length total, f_string_length *written);
+ extern f_return_status f_file_write_until(const f_file file, const f_string_static buffer, const f_string_length total, f_string_length *written);
#endif // _di_f_file_write_until_
/**
* @see write()
*/
#ifndef _di_f_file_write_range_
- extern f_return_status f_file_write_range(const f_file file, const f_string_dynamic buffer, const f_string_range range, f_string_length *written);
+ extern f_return_status f_file_write_range(const f_file file, const f_string_static buffer, const f_string_range range, f_string_length *written);
#endif // _di_f_file_write_range_
#ifdef __cplusplus
#endif // _di_fl_utf_file_read_until_
#ifndef _di_fl_utf_file_write_
- f_return_status fl_utf_file_write(const f_file file, const f_utf_string_dynamic buffer, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
#endif // _di_fl_utf_file_write_
#ifndef _di_fl_utf_file_write_block_
- f_return_status fl_utf_file_write_block(const f_file file, const f_utf_string_dynamic buffer, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write_block(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
#endif // _di_fl_utf_file_write_block_
#ifndef _di_fl_utf_file_write_until_
- f_return_status fl_utf_file_write_until(const f_file file, const f_utf_string_dynamic buffer, const f_utf_string_length total, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write_until(const f_file file, const f_utf_string_static buffer, const f_utf_string_length total, f_utf_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
#endif // _di_fl_utf_file_write_until_
#ifndef _di_fl_utf_file_write_range_
- f_return_status fl_utf_file_write_range(const f_file file, const f_utf_string_dynamic buffer, const f_utf_string_range range, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write_range(const f_file file, const f_utf_string_static buffer, const f_utf_string_range range, f_utf_string_length *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
- if (buffer.used >= buffer.size) return F_status_set_error(F_parameter);
+ if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* @see write()
*/
#ifndef _di_fl_utf_file_write_
- extern f_return_status fl_utf_file_write(const f_file file, const f_utf_string_dynamic buffer, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written);
#endif // _di_fl_utf_file_write_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_block_
- extern f_return_status fl_utf_file_write_block(const f_file file, const f_utf_string_dynamic buffer, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write_block(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written);
#endif // _di_fl_utf_file_write_block_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_until_
- extern f_return_status fl_utf_file_write_until(const f_file file, const f_utf_string_dynamic buffer, const f_utf_string_length total, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write_until(const f_file file, const f_utf_string_static buffer, const f_utf_string_length total, f_utf_string_length *written);
#endif // _di_fl_utf_file_write_until_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_range_
- extern f_return_status fl_utf_file_write_range(const f_file file, const f_utf_string_dynamic buffer, const f_utf_string_range range, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write_range(const f_file file, const f_utf_string_static buffer, const f_utf_string_range range, f_utf_string_length *written);
#endif // _di_fl_utf_file_write_range_
#ifdef __cplusplus