mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: New function map_static_strings
* common/mapstrings.c (struct intmapping_s): New. (map_static_strings): New. * common/stringhelp.c (do_strconcat): Rename to ... (vstrconcat): this and make global. * common/t-mapstrings.c (test_map_static_strings): New test.
This commit is contained in:
parent
e081a601f7
commit
c145366549
4 changed files with 86 additions and 5 deletions
|
@ -141,9 +141,12 @@ char *try_percent_escape (const char *str, const char *extra);
|
|||
NULL. Returns a malloced buffer with the new string or NULL on a
|
||||
malloc error or if too many arguments are given. */
|
||||
char *strconcat (const char *s1, ...) GPGRT_ATTR_SENTINEL(0);
|
||||
/* Same but taking a va_list. */
|
||||
char *vstrconcat (const char *s1, va_list arg_ptr);
|
||||
/* Ditto, but die on error. */
|
||||
char *xstrconcat (const char *s1, ...) GPGRT_ATTR_SENTINEL(0);
|
||||
|
||||
|
||||
char **strsplit (char *string, char delim, char replacement, int *count);
|
||||
|
||||
/* Tokenize STRING using the set of delimiters in DELIM. */
|
||||
|
@ -172,5 +175,7 @@ char *substitute_envvars (const char *string);
|
|||
|
||||
/*-- mapstrings.c --*/
|
||||
const char *map_static_macro_string (const char *string);
|
||||
const char *map_static_strings (const char *domain, int key1, int key2,
|
||||
const char *string1, ...);
|
||||
|
||||
#endif /*GNUPG_COMMON_STRINGHELP_H*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue