mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
session: run shutdown script, clean up activation env before exit
This commit is contained in:
parent
4ddeb3cd42
commit
f90b7dca2a
6 changed files with 157 additions and 16 deletions
|
|
@ -43,4 +43,23 @@ void string_truncate_at_pattern(char *buf, const char *pattern);
|
|||
*/
|
||||
char *strdup_printf(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* str_join - format and join an array of strings with a separator
|
||||
* @parts: NULL-terminated array of string parts to be joined
|
||||
* @fmt: printf-style format string applied to each part
|
||||
* @sep: separator inserted between parts when joining
|
||||
*
|
||||
* A new string is allocated to hold the joined result. The user must free the
|
||||
* returned string. Returns NULL on error.
|
||||
*
|
||||
* Each part of the array is converted via the equivalent of sprintf(output,
|
||||
* fmt, part), so fmt should include a single "%s" format specification. If fmt
|
||||
* is NULL, a default "%s" will be used to copy each part verbatim.
|
||||
*
|
||||
* The separator is arbitrary. When the separator is NULL, a single space will
|
||||
* be used.
|
||||
*/
|
||||
char *str_join(const char * const parts[],
|
||||
const char *restrict fmt, const char *restrict sep);
|
||||
|
||||
#endif /* LABWC_STRING_HELPERS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue