diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2013-05-08 12:55:36 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2013-05-08 12:55:36 -0700 |
commit | b83020ef7db242f9494e6e463ef29f82385f4a7d (patch) | |
tree | e55ba71302fac7170e6c591489cd5e2315707130 | |
parent | 081fa72684c12f5e4edb25d65a90d3c49354ec69 (diff) |
-rw-r--r-- | common-utils/common-utils.c | 13 | ||||
-rw-r--r-- | common-utils/common-utils.h | 1 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/common-utils/common-utils.c b/common-utils/common-utils.c index a8ee75a..1149a8e 100644 --- a/common-utils/common-utils.c +++ b/common-utils/common-utils.c @@ -281,6 +281,19 @@ char *tilde_expansion(const char *str) } /* tilde_expansion() */ +/* + * nv_prepend_to_string_list() - add a new string to a string list, delimited + * by the given string delimiter. The original list is freed. + */ + +char *nv_prepend_to_string_list(char *list, const char *item, const char *delim) +{ + char *new_list = nvstrcat(item, list ? delim : NULL, list, NULL); + nvfree(list); + return new_list; +} + + /****************************************************************************/ /* TextRows helper functions */ /****************************************************************************/ diff --git a/common-utils/common-utils.h b/common-utils/common-utils.h index 626fd1b..f95bfd3 100644 --- a/common-utils/common-utils.h +++ b/common-utils/common-utils.h @@ -55,6 +55,7 @@ char *nvstrtolower(char *s); void nvfree(void *s); char *tilde_expansion(const char *str); +char *nv_prepend_to_string_list(char *list, const char *item, const char *delim); TextRows *nv_format_text_rows(const char *prefix, const char *str, @@ -1 +1 @@ -NVIDIA_VERSION = 310.44 +NVIDIA_VERSION = 310.51 |