Re: [PATCH i18n 01/11] Add three convenient format printing functions with \n automatically appended From: Erik Faye-Lund <hidden> Date: 2016-06-15 22:53:37 2012/4/16 Nguyễn Thái Ngọc Duy [off-list ref]:+int printf_ln(const char *fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + ret = vprintf(fmt, ap); + va_end(ap); + if (ret >= 0) + ret += printf("\n");<snip>+ ret += fprintf(fp, "\n"); Apart from Jonathan's comment, isn't [f]printf a big hammer for this? Wouldn't putchar / fputc be a tad more light-weight (and perhaps clearer)?
Keyboard shortcuts hback out one level jnext message in thread kprevious message in thread ldrill in Escclose help / fold thread tree ?toggle this help