version 1.48, 2018/08/01 13:35:33 |
version 1.49, 2019/06/27 18:03:36 |
|
|
p += 2; |
p += 2; |
|
|
if (p == NULL && !chardata) { |
if (p == NULL && !chardata) { |
if (asprintf(&format, "%s%%.%df", format, prec) < 0) |
if (asprintf(&format, "%s%%.%df", format, prec) == -1) |
err(1, NULL); |
err(1, NULL); |
} else if (p == NULL && chardata) { |
} else if (p == NULL && chardata) { |
if (asprintf(&format, "%s%%c", format) < 0) |
if (asprintf(&format, "%s%%c", format) == -1) |
err(1, NULL); |
err(1, NULL); |
} else if (p[1] == '\0') { |
} else if (p[1] == '\0') { |
/* cannot end in single '%' */ |
/* cannot end in single '%' */ |
if (asprintf(&format, "%s%%", format) < 0) |
if (asprintf(&format, "%s%%", format) == -1) |
err(1, NULL); |
err(1, NULL); |
} else { |
} else { |
/* |
/* |
|
|
if (p[1] != '\0') |
if (p[1] != '\0') |
errx(1, "too many conversions"); |
errx(1, "too many conversions"); |
/* cannot end in single '%' */ |
/* cannot end in single '%' */ |
if (asprintf(&format, "%s%%", format) < 0) |
if (asprintf(&format, "%s%%", format) == -1) |
err(1, NULL); |
err(1, NULL); |
} |
} |
} |
} |