mirror of
https://github.com/labwc/labwc.git
synced 2026-02-10 04:27:47 -05:00
session: process environment.d and allow empty variables
1. All '*.env' files in an 'environment.d' directory alongside each potential 'environment' file will be parsed and added to the environment. 2. For the purposes of configuration merging, an environment definition exists at one level if either the 'environment' file is defined or its corresponding 'environment.d' contains any valid '*.env' file. 3. Variable declarations of the form "VARIABLE=", with no following value, will be written to the environment as empty strings.
This commit is contained in:
parent
52cb643189
commit
e837445114
4 changed files with 121 additions and 10 deletions
|
|
@ -59,7 +59,18 @@ char *strdup_printf(const char *fmt, ...);
|
|||
* The separator is arbitrary. When the separator is NULL, a single space will
|
||||
* be used.
|
||||
*/
|
||||
char *str_join(const char * const parts[],
|
||||
char *str_join(const char *const parts[],
|
||||
const char *restrict fmt, const char *restrict sep);
|
||||
|
||||
/**
|
||||
* str_endswith - indicate whether a string ends with a given suffix
|
||||
* @string: string to test
|
||||
* @suffix: suffix to expect in string
|
||||
*
|
||||
* If suffix is "" or NULL, this method always returns true; otherwise, this
|
||||
* method returns true if and only if the full suffix exists at the end of the
|
||||
* string.
|
||||
*/
|
||||
bool str_endswith(const char *const string, const char *const suffix);
|
||||
|
||||
#endif /* LABWC_STRING_HELPERS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue