summaryrefslogtreecommitdiff
path: root/str.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-12-15 23:09:13 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-12-17 10:36:49 +0100
commit6a310b07a1c5f73998fd0ff265d5701de04ab4f1 (patch)
treee1f7a65a485f0c948fb315dd6970b9e3cd3f9f58 /str.h
parent31cab05faab92a2f0062b4833547083621d85678 (diff)
str: Add helper to extend dynamically argv list
Add argv_insert function to dynamically insert string into argv list. Also added argv_free func to easy free dynamically allocated argv list. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'str.h')
-rw-r--r--str.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/str.h b/str.h
index 7d078da..3ffb2b9 100644
--- a/str.h
+++ b/str.h
@@ -9,5 +9,7 @@ extern int slprintf_nocheck(char *dst, size_t size, const char *fmt, ...);
extern char *strtrim_right(char *p, char c);
extern noinline void *xmemset(void *s, int c, size_t n);
extern char *argv2str(int startind, int argc, char **argv);
+extern char **argv_insert(char **argv, size_t *count, const char *str);
+extern void argv_free(char **argv);
#endif /* STR_H */