From 816e51afebba9a1d3ee8af59a623360eed8c8e60 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 18 Jun 2023 12:00:16 -0500 Subject: [PATCH] Feature: Support error file type "link". I may add all the others in the future but for now all I need is is to add "link". --- level_2/fll_error/c/error.c | 3 +++ level_2/fll_error/c/error/common.c | 4 ++++ level_2/fll_error/c/error/common.h | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index aefe468..e28883f 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -26,6 +26,9 @@ extern "C" { if (type == fll_error_file_type_directory_e) { type_name = fll_error_file_type_directory_s; } + else if (type == fll_error_file_type_link_e) { + type_name = fll_error_file_type_link_s; + } else if (type == fll_error_file_type_path_e) { type_name = fll_error_file_type_path_s; } diff --git a/level_2/fll_error/c/error/common.c b/level_2/fll_error/c/error/common.c index 047b73b..a9d0165 100644 --- a/level_2/fll_error/c/error/common.c +++ b/level_2/fll_error/c/error/common.c @@ -13,6 +13,10 @@ extern "C" { const f_string_static_t fll_error_file_type_file_s = macro_f_string_static_t_initialize_1(FLL_error_file_type_file_s, 0, FLL_error_file_type_file_s_length); #endif // _di_fll_error_file_type_file_s_ + #ifndef _di_fll_error_file_type_link_s_ + const f_string_static_t fll_error_file_type_link_s = macro_f_string_static_t_initialize_1(FLL_error_file_type_link_s, 0, FLL_error_file_type_link_s_length); + #endif // _di_fll_error_file_type_link_s_ + #ifndef _di_fll_error_file_type_path_s_ const f_string_static_t fll_error_file_type_path_s = macro_f_string_static_t_initialize_1(FLL_error_file_type_path_s, 0, FLL_error_file_type_path_s_length); #endif // _di_fll_error_file_type_path_s_ diff --git a/level_2/fll_error/c/error/common.h b/level_2/fll_error/c/error/common.h index 015fd88..9471c12 100644 --- a/level_2/fll_error/c/error/common.h +++ b/level_2/fll_error/c/error/common.h @@ -21,6 +21,7 @@ extern "C" { * * fll_error_file_type_*: * - file: File error. + * - link: Link error. * - directory: Directory error. * - path: Path error. * - pipe: Pipe error. @@ -29,6 +30,7 @@ extern "C" { #ifndef _di_fll_error_file_type_e_ enum { fll_error_file_type_file_e = 1, + fll_error_file_type_link_e, fll_error_file_type_directory_e, fll_error_file_type_path_e, fll_error_file_type_pipe_e, @@ -65,12 +67,14 @@ extern "C" { #ifndef _di_fll_error_file_type_s_ #define FLL_error_file_type_directory_s "directory" #define FLL_error_file_type_file_s "file" + #define FLL_error_file_type_link_s "link" #define FLL_error_file_type_path_s "path" #define FLL_error_file_type_pipe_s "pipe" #define FLL_error_file_type_socket_s "socket" #define FLL_error_file_type_directory_s_length 9 #define FLL_error_file_type_file_s_length 4 + #define FLL_error_file_type_link_s_length 4 #define FLL_error_file_type_path_s_length 4 #define FLL_error_file_type_pipe_s_length 4 #define FLL_error_file_type_socket_s_length 6 @@ -83,6 +87,10 @@ extern "C" { extern const f_string_static_t fll_error_file_type_file_s; #endif // _di_fll_error_file_type_file_s_ + #ifndef _di_fll_error_file_type_link_s_ + extern const f_string_static_t fll_error_file_type_link_s; + #endif // _di_fll_error_file_type_link_s_ + #ifndef _di_fll_error_file_type_path_s_ extern const f_string_static_t fll_error_file_type_path_s; #endif // _di_fll_error_file_type_path_s_ -- 1.8.3.1