From 453a803131affaed3c36fdd35a47a8f661f7c383 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 8 Nov 2022 18:06:22 -0600 Subject: [PATCH] Update: Provide the program name in the main library of status_code. Looks like I can still include the standard program name in common.c without causing any problems by having an override in main-status_code.c. --- level_3/status_code/c/common.c | 5 +++++ level_3/status_code/c/main-status_code.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/level_3/status_code/c/common.c b/level_3/status_code/c/common.c index 8a6601c..b21cf92 100644 --- a/level_3/status_code/c/common.c +++ b/level_3/status_code/c/common.c @@ -8,6 +8,11 @@ extern "C" { const f_string_static_t status_code_program_version_s = macro_f_string_static_t_initialize(STATUS_CODE_program_version_s, 0, STATUS_CODE_program_version_s_length); #endif // _di_status_code_program_version_ +#ifndef _di_status_code_program_name_ + const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length); + const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length); +#endif // _di_status_code_program_name_ + #ifndef _di_status_code_program_help_parameters_ const f_string_static_t status_code_program_help_parameters_s = macro_f_string_static_t_initialize(STATUS_CODE_program_help_parameters_s, 0, STATUS_CODE_program_help_parameters_s_length); #endif // _di_status_code_program_help_parameters_ diff --git a/level_3/status_code/c/main-status_code.c b/level_3/status_code/c/main-status_code.c index e5dde74..5c7ac19 100644 --- a/level_3/status_code/c/main-status_code.c +++ b/level_3/status_code/c/main-status_code.c @@ -1,10 +1,5 @@ #include "status_code.h" -#ifndef _di_status_code_program_name_ - const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length); - const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length); -#endif // _di_status_code_program_name_ - int main(const int argc, const f_string_t *argv, const f_string_t *envp) { fll_program_data_t data = fll_program_data_t_initialize; -- 1.8.3.1