From dca7576a295652004d985cd1197a3e2bfc121038 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 24 Jun 2020 00:15:28 -0500 Subject: [PATCH] Update: add f_macro_file_clear() and f_macro_file_reset() --- level_0/f_file/c/file.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/level_0/f_file/c/file.h b/level_0/f_file/c/file.h index 07c9d45..ecb8cb6 100644 --- a/level_0/f_file/c/file.h +++ b/level_0/f_file/c/file.h @@ -107,6 +107,18 @@ extern "C" { } f_file; #define f_file_initialize { 0, f_file_flag_read_only, f_file_default_read_size, f_file_default_write_size } + + #define f_macro_file_clear(file) \ + file.id = 0; \ + file.flag = 0; \ + file.size_read = 0; \ + file.size_write = 0; + + #define f_macro_file_reset(file) \ + file.id = 0; \ + file.flag = f_file_flag_read_only; \ + file.size_read = f_file_default_read_size; \ + file.size_write = f_file_default_write_size; #endif // _di_f_file_ /** -- 1.8.3.1