From 2fc170a80e0b17e4698657ee884d5a5f1aa44f79 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 25 Mar 2025 22:26:48 -0500 Subject: [PATCH] Feature: Add 'input' as file type error string. The error type string `input` is needed to for cases like standard input processing. Also fix the ordering of the file type error parameter for directory. --- build/stand_alone/byte_dump.config.h | 1 + build/stand_alone/example.config.h | 1 + build/stand_alone/fake.config.h | 1 + build/stand_alone/firewall.config.h | 1 + build/stand_alone/utf8.config.h | 1 + level_2/fll_error/c/error/common.c | 4 ++++ level_2/fll_error/c/error/common.h | 21 +++++++++++++++------ 7 files changed, 24 insertions(+), 6 deletions(-) diff --git a/build/stand_alone/byte_dump.config.h b/build/stand_alone/byte_dump.config.h index 09ed22b..3dc0577 100644 --- a/build/stand_alone/byte_dump.config.h +++ b/build/stand_alone/byte_dump.config.h @@ -1553,6 +1553,7 @@ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ +#define _di_fll_error_file_type_input_s_ //#define _di_fll_error_file_type_link_s_ //#define _di_fll_error_file_type_path_s_ //#define _di_fll_error_file_type_pipe_s_ diff --git a/build/stand_alone/example.config.h b/build/stand_alone/example.config.h index d8f888b..39b338e 100644 --- a/build/stand_alone/example.config.h +++ b/build/stand_alone/example.config.h @@ -1492,6 +1492,7 @@ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ +#define _di_fll_error_file_type_input_s_ //#define _di_fll_error_file_type_link_s_ //#define _di_fll_error_file_type_path_s_ //#define _di_fll_error_file_type_pipe_s_ diff --git a/build/stand_alone/fake.config.h b/build/stand_alone/fake.config.h index 0e49a5b..164c12f 100644 --- a/build/stand_alone/fake.config.h +++ b/build/stand_alone/fake.config.h @@ -2029,6 +2029,7 @@ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ +#define _di_fll_error_file_type_input_s_ //#define _di_fll_error_file_type_link_s_ //#define _di_fll_error_file_type_path_s_ //#define _di_fll_error_file_type_pipe_s_ diff --git a/build/stand_alone/firewall.config.h b/build/stand_alone/firewall.config.h index 864994d..486d19d 100644 --- a/build/stand_alone/firewall.config.h +++ b/build/stand_alone/firewall.config.h @@ -2102,6 +2102,7 @@ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ +#define _di_fll_error_file_type_input_s_ //#define _di_fll_error_file_type_link_s_ //#define _di_fll_error_file_type_path_s_ //#define _di_fll_error_file_type_pipe_s_ diff --git a/build/stand_alone/utf8.config.h b/build/stand_alone/utf8.config.h index 05589b6..2516e04 100644 --- a/build/stand_alone/utf8.config.h +++ b/build/stand_alone/utf8.config.h @@ -1571,6 +1571,7 @@ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ +#define _di_fll_error_file_type_input_s_ //#define _di_fll_error_file_type_link_s_ //#define _di_fll_error_file_type_path_s_ //#define _di_fll_error_file_type_pipe_s_ diff --git a/level_2/fll_error/c/error/common.c b/level_2/fll_error/c/error/common.c index a9d0165..208fc2e 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_input_s_ + const f_string_static_t fll_error_file_type_input_s = macro_f_string_static_t_initialize_1(FLL_error_file_type_input_s, 0, FLL_error_file_type_input_s_length); + #endif // _di_fll_error_file_type_input_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_ diff --git a/level_2/fll_error/c/error/common.h b/level_2/fll_error/c/error/common.h index add8695..a1bdf41 100644 --- a/level_2/fll_error/c/error/common.h +++ b/level_2/fll_error/c/error/common.h @@ -19,11 +19,12 @@ extern "C" { /** * Error file types. * - * fll_error_file_type_*: + * fll_error_file_type_*_e: * - none: No error. + * - directory: Directory error. * - file: File error. + * - input: Input error. * - link: Link error. - * - directory: Directory error. * - path: Path error. * - pipe: Pipe error. * - socket: Socket error. @@ -31,9 +32,10 @@ extern "C" { #ifndef _di_fll_error_file_type_e_ enum { fll_error_file_type_none_e = 0, + fll_error_file_type_directory_e, fll_error_file_type_file_e, + fll_error_file_type_input_e, fll_error_file_type_link_e, - fll_error_file_type_directory_e, fll_error_file_type_path_e, fll_error_file_type_pipe_e, fll_error_file_type_socket_e, @@ -43,7 +45,7 @@ extern "C" { /** * File error printing flags. * - * fll_error_file_flag_*: + * fll_error_file_flag_*_e: * - none: No flag set. * - fallback: Fallback error message for unknown errors. * - simple: Do not print the extra message, if applicable. @@ -59,9 +61,10 @@ extern "C" { /** * Error file types. * - * fll_error_file_type_*: - * - file: File error. + * fll_error_file_type_*_s: * - directory: Directory error. + * - file: File error. + * - input: Input error. * - path: Path error. * - pipe: Pipe error. * - socket: Socket error. @@ -69,6 +72,7 @@ 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_input_s "input" #define FLL_error_file_type_link_s "link" #define FLL_error_file_type_path_s "path" #define FLL_error_file_type_pipe_s "pipe" @@ -76,6 +80,7 @@ extern "C" { #define FLL_error_file_type_directory_s_length 9 #define FLL_error_file_type_file_s_length 4 + #define FLL_error_file_type_input_s_length 5 #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 @@ -89,6 +94,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_input_s_ + extern const f_string_static_t fll_error_file_type_input_s; + #endif // _di_fll_error_file_type_input_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_ -- 1.8.3.1