return sq_dequote_step(arg, NULL);
}
-static int sq_dequote_to_argv_internal(char *arg,
- const char ***argv, int *nr, int *alloc,
- struct strvec *array)
+int sq_dequote_to_strvec(char *arg, struct strvec *array)
{
char *next = arg;
c = *++next;
} while (isspace(c));
}
- if (argv) {
- ALLOC_GROW(*argv, *nr + 1, *alloc);
- (*argv)[(*nr)++] = dequoted;
- }
- if (array)
- strvec_push(array, dequoted);
+ strvec_push(array, dequoted);
} while (next);
return 0;
}
-int sq_dequote_to_strvec(char *arg, struct strvec *array)
-{
- return sq_dequote_to_argv_internal(arg, NULL, NULL, NULL, array);
-}
-
/* 1 means: quote as octal
* 0 means: quote as octal if (quote_path_fully)
* -1 means: never quote