From: Erik Faye-Lund Date: Tue, 17 Apr 2012 08:12:20 GMT Subject: Re: [PATCH i18n 01/11] Add three convenient format printing functions with \n automatically appended Message-ID: In-Reply-To: <1334580603-11577-2-git-send-email-pclouds@gmail.com> 2012/4/16 Nguyễn Thái Ngọc Duy : > +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"); > +               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)?