From: Kevin Day Date: Thu, 16 Mar 2023 23:38:39 +0000 (-0500) Subject: Update: Add "HOME" environment variable support to f_path. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=30e4d8038bfd0eecc25c1f73a6dbc4f4d7d79aeb;p=fll Update: Add "HOME" environment variable support to f_path. --- diff --git a/level_0/f_path/c/path/common.c b/level_0/f_path/c/path/common.c index 374b0e8..965787e 100644 --- a/level_0/f_path/c/path/common.c +++ b/level_0/f_path/c/path/common.c @@ -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_ diff --git a/level_0/f_path/c/path/common.h b/level_0/f_path/c/path/common.h index be969da..153bbbe 100644 --- a/level_0/f_path/c/path/common.h +++ b/level_0/f_path/c/path/common.h @@ -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_