| 308 | } |
| 309 | |
| 310 | void quote_two_c_style(struct strbuf *sb, const char *prefix, const char *path, |
| 311 | unsigned flags) |
| 312 | { |
| 313 | int nodq = !!(flags & CQUOTE_NODQ); |
| 314 | if (quote_c_style(prefix, NULL, NULL, 0) || |
| 315 | quote_c_style(path, NULL, NULL, 0)) { |
| 316 | if (!nodq) |
| 317 | strbuf_addch(sb, '"'); |
| 318 | quote_c_style(prefix, sb, NULL, CQUOTE_NODQ); |
| 319 | quote_c_style(path, sb, NULL, CQUOTE_NODQ); |
| 320 | if (!nodq) |
| 321 | strbuf_addch(sb, '"'); |
| 322 | } else { |
| 323 | strbuf_addstr(sb, prefix); |
| 324 | strbuf_addstr(sb, path); |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | void write_name_quoted(const char *name, FILE *fp, int terminator) |
| 329 | { |
no test coverage detected