From: Kevin Day Date: Wed, 9 Nov 2022 00:06:22 +0000 (-0600) Subject: Update: Provide the program name in the main library of status_code. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=453a803131affaed3c36fdd35a47a8f661f7c383;p=fll 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. --- 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;