]> Kevux Git Server - fll/commitdiff
Update: Add "HOME" environment variable support to f_path.
authorKevin Day <kevin@kevux.org>
Thu, 16 Mar 2023 23:38:39 +0000 (18:38 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 16 Mar 2023 23:38:39 +0000 (18:38 -0500)
level_0/f_path/c/path/common.c
level_0/f_path/c/path/common.h

index 374b0e8d7f4c8b2df46892849aa085037506cd8e..965787e5fa45e468368bc212bc12ef9b1f70bf20 100644 (file)
@@ -25,6 +25,10 @@ extern "C" {
     const f_string_static_t f_path_environment_s = macro_f_string_static_t_initialize(F_path_environment_s, 0, F_path_environment_s_length);
   #endif // _di_f_path_environment_s_
 
+  #ifndef _di_f_path_home_s_
+    const f_string_static_t f_path_home_s = macro_f_string_static_t_initialize(F_path_home_s, 0, F_path_home_s_length);
+  #endif // _di_f_path_home_s_
+
   #ifndef _di_f_path_home_wildcard_s_
     const f_string_static_t f_path_home_wildcard_s = macro_f_string_static_t_initialize(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length);
   #endif // _di_f_path_home_wildcard_s_
index be969da1bff20419752936c95e6296f6dfcb67a2..153bbbeb9a1f33c374b78663d77268998c50d379 100644 (file)
@@ -52,11 +52,13 @@ extern "C" {
   #define F_path_extension_separator_s_length 1
 
   #define F_path_environment_s         "PATH"
+  #define F_path_home_s                "HOME"
   #define F_path_home_wildcard_s       F_string_ascii_tilde_s
   #define F_path_present_working_s     "PWD"
   #define F_path_present_working_old_s "OLDPWD"
 
   #define F_path_environment_s_length         4
+  #define F_path_home_s_length                4
   #define F_path_home_wildcard_s_length       F_string_ascii_tilde_s_length
   #define F_path_present_working_s_length     3
   #define F_path_present_working_old_s_length 6
@@ -81,6 +83,10 @@ extern "C" {
     extern const f_string_static_t f_path_environment_s;
   #endif // _di_f_path_environment_s_
 
+  #ifndef _di_f_path_home_s_
+    extern const f_string_static_t f_path_home_s;
+  #endif // _di_f_path_home_s_
+
   #ifndef _di_f_path_home_wildcard_s_
     extern const f_string_static_t f_path_home_wildcard_s;
   #endif // _di_f_path_home_wildcard_s_