| 172 | } |
| 173 | |
| 174 | int sq_dequote_to_strvec(char *arg, struct strvec *array) |
| 175 | { |
| 176 | char *next = arg; |
| 177 | |
| 178 | if (!*arg) |
| 179 | return 0; |
| 180 | do { |
| 181 | char *dequoted = sq_dequote_step(next, &next); |
| 182 | if (!dequoted) |
| 183 | return -1; |
| 184 | if (next) { |
| 185 | char c; |
| 186 | if (!isspace(*next)) |
| 187 | return -1; |
| 188 | do { |
| 189 | c = *++next; |
| 190 | } while (isspace(c)); |
| 191 | } |
| 192 | strvec_push(array, dequoted); |
| 193 | } while (next); |
| 194 | |
| 195 | return 0; |
| 196 | } |
| 197 | |
| 198 | /* 1 means: quote as octal |
| 199 | * 0 means: quote as octal if (quote_path_fully) |
no test coverage detected