mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 12:51:22 +04:00
Added flipper_format_write_empty_line(...) (#4029)
* Added flipper_format_write_empty_line(...) * Format sources Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -265,6 +265,7 @@ static bool test_write(const char* file_name) {
|
|||||||
if(!flipper_format_file_open_always(file, file_name)) break;
|
if(!flipper_format_file_open_always(file, file_name)) break;
|
||||||
if(!flipper_format_write_header_cstr(file, test_filetype, test_version)) break;
|
if(!flipper_format_write_header_cstr(file, test_filetype, test_version)) break;
|
||||||
if(!flipper_format_write_comment_cstr(file, "This is comment")) break;
|
if(!flipper_format_write_comment_cstr(file, "This is comment")) break;
|
||||||
|
if(!flipper_format_write_empty_line(file)) break;
|
||||||
if(!flipper_format_write_string_cstr(file, test_string_key, test_string_data)) break;
|
if(!flipper_format_write_string_cstr(file, test_string_key, test_string_data)) break;
|
||||||
if(!flipper_format_write_int32(file, test_int_key, test_int_data, COUNT_OF(test_int_data)))
|
if(!flipper_format_write_int32(file, test_int_key, test_int_data, COUNT_OF(test_int_data)))
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -403,6 +403,11 @@ bool flipper_format_write_comment_cstr(FlipperFormat* flipper_format, const char
|
|||||||
return flipper_format_stream_write_comment_cstr(flipper_format->stream, data);
|
return flipper_format_stream_write_comment_cstr(flipper_format->stream, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool flipper_format_write_empty_line(FlipperFormat* flipper_format) {
|
||||||
|
furi_check(flipper_format);
|
||||||
|
return flipper_format_stream_write_eol(flipper_format->stream);
|
||||||
|
}
|
||||||
|
|
||||||
bool flipper_format_delete_key(FlipperFormat* flipper_format, const char* key) {
|
bool flipper_format_delete_key(FlipperFormat* flipper_format, const char* key) {
|
||||||
furi_check(flipper_format);
|
furi_check(flipper_format);
|
||||||
FlipperStreamWriteData write_data = {
|
FlipperStreamWriteData write_data = {
|
||||||
|
|||||||
@@ -518,6 +518,14 @@ bool flipper_format_write_comment(FlipperFormat* flipper_format, FuriString* dat
|
|||||||
*/
|
*/
|
||||||
bool flipper_format_write_comment_cstr(FlipperFormat* flipper_format, const char* data);
|
bool flipper_format_write_comment_cstr(FlipperFormat* flipper_format, const char* data);
|
||||||
|
|
||||||
|
/** Write empty line (Improves readability for human based parsing)
|
||||||
|
*
|
||||||
|
* @param flipper_format Pointer to a FlipperFormat instance
|
||||||
|
*
|
||||||
|
* @return True on success
|
||||||
|
*/
|
||||||
|
bool flipper_format_write_empty_line(FlipperFormat* flipper_format);
|
||||||
|
|
||||||
/** Removes the first matching key and its value. Sets the RW pointer to a
|
/** Removes the first matching key and its value. Sets the RW pointer to a
|
||||||
* position of deleted data.
|
* position of deleted data.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
entry,status,name,type,params
|
entry,status,name,type,params
|
||||||
Version,+,79.0,,
|
Version,+,79.1,,
|
||||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||||
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
||||||
Header,+,applications/services/cli/cli.h,,
|
Header,+,applications/services/cli/cli.h,,
|
||||||
@@ -1054,6 +1054,7 @@ Function,+,flipper_format_update_uint32,_Bool,"FlipperFormat*, const char*, cons
|
|||||||
Function,+,flipper_format_write_bool,_Bool,"FlipperFormat*, const char*, const _Bool*, const uint16_t"
|
Function,+,flipper_format_write_bool,_Bool,"FlipperFormat*, const char*, const _Bool*, const uint16_t"
|
||||||
Function,+,flipper_format_write_comment,_Bool,"FlipperFormat*, FuriString*"
|
Function,+,flipper_format_write_comment,_Bool,"FlipperFormat*, FuriString*"
|
||||||
Function,+,flipper_format_write_comment_cstr,_Bool,"FlipperFormat*, const char*"
|
Function,+,flipper_format_write_comment_cstr,_Bool,"FlipperFormat*, const char*"
|
||||||
|
Function,+,flipper_format_write_empty_line,_Bool,FlipperFormat*
|
||||||
Function,+,flipper_format_write_float,_Bool,"FlipperFormat*, const char*, const float*, const uint16_t"
|
Function,+,flipper_format_write_float,_Bool,"FlipperFormat*, const char*, const float*, const uint16_t"
|
||||||
Function,+,flipper_format_write_header,_Bool,"FlipperFormat*, FuriString*, const uint32_t"
|
Function,+,flipper_format_write_header,_Bool,"FlipperFormat*, FuriString*, const uint32_t"
|
||||||
Function,+,flipper_format_write_header_cstr,_Bool,"FlipperFormat*, const char*, const uint32_t"
|
Function,+,flipper_format_write_header_cstr,_Bool,"FlipperFormat*, const char*, const uint32_t"
|
||||||
|
|||||||
|
@@ -1,5 +1,5 @@
|
|||||||
entry,status,name,type,params
|
entry,status,name,type,params
|
||||||
Version,+,79.0,,
|
Version,+,79.1,,
|
||||||
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
||||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||||
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
||||||
@@ -1164,6 +1164,7 @@ Function,+,flipper_format_update_uint32,_Bool,"FlipperFormat*, const char*, cons
|
|||||||
Function,+,flipper_format_write_bool,_Bool,"FlipperFormat*, const char*, const _Bool*, const uint16_t"
|
Function,+,flipper_format_write_bool,_Bool,"FlipperFormat*, const char*, const _Bool*, const uint16_t"
|
||||||
Function,+,flipper_format_write_comment,_Bool,"FlipperFormat*, FuriString*"
|
Function,+,flipper_format_write_comment,_Bool,"FlipperFormat*, FuriString*"
|
||||||
Function,+,flipper_format_write_comment_cstr,_Bool,"FlipperFormat*, const char*"
|
Function,+,flipper_format_write_comment_cstr,_Bool,"FlipperFormat*, const char*"
|
||||||
|
Function,+,flipper_format_write_empty_line,_Bool,FlipperFormat*
|
||||||
Function,+,flipper_format_write_float,_Bool,"FlipperFormat*, const char*, const float*, const uint16_t"
|
Function,+,flipper_format_write_float,_Bool,"FlipperFormat*, const char*, const float*, const uint16_t"
|
||||||
Function,+,flipper_format_write_header,_Bool,"FlipperFormat*, FuriString*, const uint32_t"
|
Function,+,flipper_format_write_header,_Bool,"FlipperFormat*, FuriString*, const uint32_t"
|
||||||
Function,+,flipper_format_write_header_cstr,_Bool,"FlipperFormat*, const char*, const uint32_t"
|
Function,+,flipper_format_write_header_cstr,_Bool,"FlipperFormat*, const char*, const uint32_t"
|
||||||
|
|||||||
|
Reference in New Issue
Block a user