2011-09-13 23:57:57 +02:00
|
|
|
#ifndef ARGV_ARRAY_H
|
|
|
|
#define ARGV_ARRAY_H
|
|
|
|
|
2012-04-18 23:08:49 +02:00
|
|
|
extern const char *empty_argv[];
|
2011-09-13 23:57:57 +02:00
|
|
|
|
|
|
|
struct argv_array {
|
|
|
|
const char **argv;
|
|
|
|
int argc;
|
|
|
|
int alloc;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ARGV_ARRAY_INIT { empty_argv, 0, 0 }
|
|
|
|
|
|
|
|
void argv_array_init(struct argv_array *);
|
|
|
|
void argv_array_push(struct argv_array *, const char *);
|
|
|
|
__attribute__((format (printf,2,3)))
|
|
|
|
void argv_array_pushf(struct argv_array *, const char *fmt, ...);
|
2013-07-18 22:02:12 +02:00
|
|
|
LAST_ARG_MUST_BE_NULL
|
2012-04-18 23:10:05 +02:00
|
|
|
void argv_array_pushl(struct argv_array *, ...);
|
2012-09-01 13:25:27 +02:00
|
|
|
void argv_array_pop(struct argv_array *);
|
2011-09-13 23:57:57 +02:00
|
|
|
void argv_array_clear(struct argv_array *);
|
|
|
|
|
|
|
|
#endif /* ARGV_ARRAY_H */
|