Mercurial > hg > th-libs
diff th_args.c @ 588:ef71ef9b5862
Change th_print_wrap() API and move the string argument last.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 12 Jan 2020 19:30:05 +0200 |
parents | 98812eb78d8e |
children | 041c8d3030e0 |
line wrap: on
line diff
--- a/th_args.c Sun Jan 12 18:03:47 2020 +0200 +++ b/th_args.c Sun Jan 12 19:30:05 2020 +0200 @@ -188,13 +188,13 @@ * Print given string indented in such a way that it is automatically * line-wrapped as necessary, taking hard linefeeds into account as well. * @param fh stdio file handle to output to - * @param str string to output * @param spad starting pad/indent of the first line * @param rpad how much to pad the other lines * @param width total line width to wrap at + * @param str string to output */ -void th_print_wrap(FILE *fh, const char *str, - const int spad, int const rpad, const int width) +void th_print_wrap(FILE *fh, const int spad, int const rpad, + const int width, const char *str) { size_t pos = 0; BOOL first = TRUE; @@ -321,7 +321,7 @@ fputs(fmtBuf, fh); th_print_pad(fh, padWidth, ' '); - th_print_wrap(fh, opt->desc, *lineWidth, *lineWidth, th_term_width() - 2); + th_print_wrap(fh, *lineWidth, *lineWidth, th_term_width() - 2, opt->desc); } }