version 1.19, 2013/03/14 15:44:15 |
version 1.20, 2013/08/06 21:56:51 |
|
|
usage(); |
usage(); |
} |
} |
|
|
|
len = strlen(template); |
|
if (len < 6 || strcmp(&template[len - 6], "XXXXXX")) { |
|
fatalx("insufficient number of Xs in template `%s'", |
|
template); |
|
} |
if (tflag) { |
if (tflag) { |
if (strchr(template, '/')) { |
if (strchr(template, '/')) { |
fatalx("template must not contain directory " |
fatalx("template must not contain directory " |
|
|
|
|
if (asprintf(&tempfile, "%.*s/%s", (int)len, prefix, template) < 0) |
if (asprintf(&tempfile, "%.*s/%s", (int)len, prefix, template) < 0) |
tempfile = NULL; |
tempfile = NULL; |
} else { |
} else |
len = strlen(template); |
|
if (len < 6 || strcmp(&template[len - 6], "XXXXXX")) { |
|
fatalx("insufficient number of Xs in template `%s'", |
|
template); |
|
} |
|
tempfile = strdup(template); |
tempfile = strdup(template); |
} |
|
if (tempfile == NULL) |
if (tempfile == NULL) |
fatalx("cannot allocate memory"); |
fatalx("cannot allocate memory"); |
|
|