| 249 | } |
| 250 | |
| 251 | struct tempfile *xmks_tempfile_m(const char *filename_template, int mode) |
| 252 | { |
| 253 | struct tempfile *tempfile; |
| 254 | struct strbuf full_template = STRBUF_INIT; |
| 255 | |
| 256 | strbuf_add_absolute_path(&full_template, filename_template); |
| 257 | tempfile = mks_tempfile_m(full_template.buf, mode); |
| 258 | if (!tempfile) |
| 259 | die_errno("Unable to create temporary file '%s'", |
| 260 | full_template.buf); |
| 261 | |
| 262 | strbuf_release(&full_template); |
| 263 | return tempfile; |
| 264 | } |
| 265 | |
| 266 | FILE *fdopen_tempfile(struct tempfile *tempfile, const char *mode) |
| 267 | { |
no test coverage detected