util: split out nulstr related stuff to nulstr-util.[ch]

This commit is contained in:
Lennart Poettering
2019-03-14 13:25:52 +01:00
parent 090a9c1eba
commit d8b4d14df4
40 changed files with 70 additions and 40 deletions
-6
View File
@@ -43,12 +43,6 @@ static inline const char* enable_disable(bool b) {
return b ? "enable" : "disable";
}
#define NULSTR_FOREACH(i, l) \
for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)
#define NULSTR_FOREACH_PAIR(i, j, l) \
for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr((j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i))
extern int saved_argc;
extern char **saved_argv;