]> Kevux Git Server - kevux-tools/commitdiff
Update: Use explicitly declared parameters and ensure -v/--verbose are both printed.
authorKevin Day <Kevin@kevux.org>
Fri, 6 Jun 2025 01:24:42 +0000 (20:24 -0500)
committerKevin Day <Kevin@kevux.org>
Fri, 6 Jun 2025 01:24:42 +0000 (20:24 -0500)
Printing help for `rmdir` should result in printing both the `-v` and `--verbose` options.

Explicitly declare the `version` and `verbose` strings due to the custom nature of them for the `rm` and `rmdir` programs.

sources/c/program/kevux/tools/remove/rm/enumeration.h
sources/c/program/kevux/tools/remove/rm/print.c
sources/c/program/kevux/tools/remove/rm/string.c
sources/c/program/kevux/tools/remove/rm/string.h
sources/c/program/kevux/tools/remove/rmdir/enumeration.h
sources/c/program/kevux/tools/remove/rmdir/print.c
sources/c/program/kevux/tools/remove/rmdir/string.c
sources/c/program/kevux/tools/remove/rmdir/string.h

index 4afbef63c840555e40aaa1ebbc5a8db1340c90a4..5a41628a3e2843446b4ad18996715b6137f8515c 100644 (file)
@@ -51,7 +51,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_5(                              kt_remove_rm_long_preserve_root_s,     0, f_console_flag_normal_d), \
       macro_f_console_parameter_t_initialize_5(                              kt_remove_rm_long_preserve_root_not_s, 0, f_console_flag_normal_d), \
       macro_f_console_parameter_t_initialize_3(kt_remove_rm_short_verbose_s, kt_remove_rm_long_verbose_s,           0, f_console_flag_normal_d), \
-      macro_f_console_parameter_t_initialize_5(                              f_console_standard_long_version_s,     0, f_console_flag_normal_d), \
+      macro_f_console_parameter_t_initialize_5(                              kt_remove_rm_long_version_s,           0, f_console_flag_normal_d), \
       macro_f_console_parameter_t_initialize_7(                                                                     0, f_console_flag_normal_d | f_console_flag_empty_long_d | f_console_flag_stop_d), \
     }
 
index a916a3fd5a8d4761ae6dec482bea719e47347783..aeaa7bb75fa0ffeaa35579345ff9eec2e1d78497 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
     fll_program_print_help_option(print, kt_remove_short_simulate_s, kt_remove_long_simulate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "        Simulate removal rather than actually removing.");
     fll_program_print_help_option(print, kt_remove_rm_short_verbose_s, kt_remove_rm_long_verbose_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "         Increase verbosity beyond normal, printing more details.");
 
-    fll_program_print_help_option_long(print, f_console_standard_long_version_s, f_console_symbol_long_normal_s, "         Print only the program version number and immediately exit.");
+    fll_program_print_help_option_long(print, kt_remove_rm_long_version_s, f_console_symbol_long_normal_s, "         Print only the program version number and immediately exit.");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
index 7a890f8978c65c647cf49ff9ba7d49e4747e427f..c5f914037ad4b8184803dc9de432505a8e29379c 100644 (file)
@@ -22,6 +22,7 @@ extern "C" {
   const f_string_static_t kt_remove_rm_long_preserve_root_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rm_long_preserve_root_s, 0, KT_REMOVE_rm_long_preserve_root_s_length);
   const f_string_static_t kt_remove_rm_long_preserve_root_not_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rm_long_preserve_root_not_s, 0, KT_REMOVE_rm_long_preserve_root_not_s_length);
   const f_string_static_t kt_remove_rm_long_verbose_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rm_long_verbose_s, 0, KT_REMOVE_rm_long_verbose_s_length);
+  const f_string_static_t kt_remove_rm_long_version_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rm_long_version_s, 0, KT_REMOVE_rm_long_version_s_length);
 
   const f_string_static_t kt_remove_rm_static_end_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rm_static_end_s, 0, KT_REMOVE_rm_static_end_s_length);
   const f_string_static_t kt_remove_rm_static_interactive_always_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rm_static_interactive_always_s, 0, KT_REMOVE_rm_static_interactive_always_s_length);
index 26f3b7605fc88faf30214225fd0f4a2ebdd47033..c058c658b4995da80bd757705d4ce607a58f9549 100644 (file)
@@ -43,6 +43,7 @@ extern "C" {
   #define KT_REMOVE_rm_long_preserve_root_s     "preserve-root"
   #define KT_REMOVE_rm_long_preserve_root_not_s "no-preserve-root"
   #define KT_REMOVE_rm_long_verbose_s           "verbose"
+  #define KT_REMOVE_rm_long_version_s           "version"
 
   #define KT_REMOVE_rm_static_end_s                 "--"
   #define KT_REMOVE_rm_static_interactive_always_s  "--interactive=always"
@@ -63,6 +64,7 @@ extern "C" {
   #define KT_REMOVE_rm_long_preserve_root_s_length     13
   #define KT_REMOVE_rm_long_preserve_root_not_s_length 16
   #define KT_REMOVE_rm_long_verbose_s_length           7
+  #define KT_REMOVE_rm_long_version_s_length           7
 
   #define KT_REMOVE_rm_static_end_s_length                 2
   #define KT_REMOVE_rm_static_interactive_always_s_length  20
@@ -83,6 +85,7 @@ extern "C" {
   extern const f_string_static_t kt_remove_rm_long_preserve_root_s;
   extern const f_string_static_t kt_remove_rm_long_preserve_root_not_s;
   extern const f_string_static_t kt_remove_rm_long_verbose_s;
+  extern const f_string_static_t kt_remove_rm_long_version_s;
 
   extern const f_string_static_t kt_remove_rm_static_end_s;
   extern const f_string_static_t kt_remove_rm_static_interactive_always_s;
index a4aedb55eff9b6b443068d953d58e51e5b89b6c2..0e0cf40de2f878e7c8647948af2b0593fc6edfe1 100644 (file)
@@ -32,11 +32,11 @@ extern "C" {
     { \
       macro_fll_program_console_parameter_standard_initialize, \
       \
-      macro_f_console_parameter_t_initialize_5(                                    kt_remove_rmdir_long_ignore_empty_not_s, 0, f_console_flag_normal_d), \
-      macro_f_console_parameter_t_initialize_3(kt_remove_rmdir_short_parents_s,    kt_remove_rmdir_long_parents_s,          0, f_console_flag_normal_d), \
-      macro_f_console_parameter_t_initialize_3(kt_remove_short_simulate_s,         kt_remove_long_simulate_s,               0, f_console_flag_normal_d), \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s,       0, f_console_flag_normal_d), \
-      macro_f_console_parameter_t_initialize_5(                                    f_console_standard_long_version_s,       0, f_console_flag_normal_d), \
+      macro_f_console_parameter_t_initialize_5(                                 kt_remove_rmdir_long_ignore_empty_not_s, 0, f_console_flag_normal_d), \
+      macro_f_console_parameter_t_initialize_3(kt_remove_rmdir_short_parents_s, kt_remove_rmdir_long_parents_s,          0, f_console_flag_normal_d), \
+      macro_f_console_parameter_t_initialize_3(kt_remove_short_simulate_s,      kt_remove_long_simulate_s,               0, f_console_flag_normal_d), \
+      macro_f_console_parameter_t_initialize_3(kt_remove_rmdir_short_verbose_s, kt_remove_rmdir_long_verbose_s,          0, f_console_flag_normal_d), \
+      macro_f_console_parameter_t_initialize_5(                                 kt_remove_rmdir_long_version_s,          0, f_console_flag_normal_d), \
     }
 
   #define kt_remove_rmdir_total_parameters_d (f_console_parameter_state_type_total_d + 5)
index c73d41256a6b0a964fa171cf3c70e45fead81fc4..dd2d8439b0ddd59b341c17719b586c6425485925 100644 (file)
@@ -29,8 +29,10 @@ extern "C" {
     fll_program_print_help_option(print, kt_remove_short_simulate_s, kt_remove_long_simulate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "                Simulate removal rather than actually removing.");
 
     fll_program_print_help_option_long(print, kt_remove_rmdir_long_ignore_empty_not_s, f_console_symbol_long_normal_s, "Ignore directories that are not empty rather than fail on error.");
-    fll_program_print_help_option_long(print, f_console_standard_long_verbose_s, f_console_symbol_long_normal_s, "                 Increase verbosity beyond normal, printing more details.");
-    fll_program_print_help_option_long(print, f_console_standard_long_version_s, f_console_symbol_long_normal_s, "                 Print only the program version number and immediately exit.");
+
+    fll_program_print_help_option(print, kt_remove_rmdir_short_verbose_s, kt_remove_rmdir_long_verbose_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "                 Increase verbosity beyond normal, printing more details.");
+
+    fll_program_print_help_option_long(print, kt_remove_rmdir_long_version_s, f_console_symbol_long_normal_s, "                 Print only the program version number and immediately exit.");
 
     f_print_dynamic_raw(f_string_eol_s, print->to);
 
index d42bc55304f114a9eca01b6bdc466ac002feb2e5..e55f1dbbbbe87e214e5189638354384fde72a336 100644 (file)
@@ -11,9 +11,12 @@ extern "C" {
 
 #ifndef _di_kt_remove_rmdir_parameter_s_
   const f_string_static_t kt_remove_rmdir_short_parents_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rmdir_short_parents_s, 0, KT_REMOVE_rmdir_short_parents_s_length);
+  const f_string_static_t kt_remove_rmdir_short_verbose_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rmdir_short_verbose_s, 0, KT_REMOVE_rmdir_short_verbose_s_length);
 
   const f_string_static_t kt_remove_rmdir_long_ignore_empty_not_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rmdir_long_ignore_empty_not_s, 0, KT_REMOVE_rmdir_long_ignore_empty_not_s_length);
   const f_string_static_t kt_remove_rmdir_long_parents_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rmdir_long_parents_s, 0, KT_REMOVE_rmdir_long_parents_s_length);
+  const f_string_static_t kt_remove_rmdir_long_verbose_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rmdir_long_verbose_s, 0, KT_REMOVE_rmdir_long_verbose_s_length);
+  const f_string_static_t kt_remove_rmdir_long_version_s = macro_f_string_static_t_initialize_1(KT_REMOVE_rmdir_long_version_s, 0, KT_REMOVE_rmdir_long_version_s_length);
 #endif // _di_kt_remove_rmdir_parameter_s_
 
 #ifdef __cplusplus
index c8fe70722d224692dee7d649ae03318985a40911..540fc6f3008e902476fcd24ae4a74e007a8949e0 100644 (file)
@@ -32,19 +32,28 @@ extern "C" {
  */
 #ifndef _di_kt_remove_rmdir_parameter_s_
   #define KT_REMOVE_rmdir_short_parents_s "p"
+  #define KT_REMOVE_rmdir_short_verbose_s "v"
 
   #define KT_REMOVE_rmdir_long_ignore_empty_not_s "ignore-fail-on-non-empty"
   #define KT_REMOVE_rmdir_long_parents_s          "parents"
+  #define KT_REMOVE_rmdir_long_verbose_s          "verbose"
+  #define KT_REMOVE_rmdir_long_version_s          "version"
 
   #define KT_REMOVE_rmdir_short_parents_s_length 1
+  #define KT_REMOVE_rmdir_short_verbose_s_length 1
 
   #define KT_REMOVE_rmdir_long_ignore_empty_not_s_length 24
   #define KT_REMOVE_rmdir_long_parents_s_length          7
+  #define KT_REMOVE_rmdir_long_verbose_s_length          7
+  #define KT_REMOVE_rmdir_long_version_s_length          7
 
   extern const f_string_static_t kt_remove_rmdir_short_parents_s;
+  extern const f_string_static_t kt_remove_rmdir_short_verbose_s;
 
   extern const f_string_static_t kt_remove_rmdir_long_ignore_empty_not_s;
   extern const f_string_static_t kt_remove_rmdir_long_parents_s;
+  extern const f_string_static_t kt_remove_rmdir_long_verbose_s;
+  extern const f_string_static_t kt_remove_rmdir_long_version_s;
 #endif // _di_kt_remove_rmdir_parameter_s_
 
 #ifdef __cplusplus