SHA256
1
0
forked from pool/ncurses
ncurses/ncurses-5.7-printw.dif

67 lines
1.8 KiB
Plaintext
Raw Normal View History

--- ncurses/base/lib_printw.c
+++ ncurses/base/lib_printw.c 2010-01-12 10:51:29.975429869 +0100
@@ -48,10 +48,12 @@ printw(const char *fmt,...)
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_copy(argq, argp);
+ va_start(argq, fmt);
T((T_CALLED("printw(%s%s)"),
- _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
va_start(argp, fmt);
@@ -68,10 +70,12 @@ wprintw(WINDOW *win, const char *fmt,...
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_copy(argq, argp);
+ va_start(argq, fmt);
T((T_CALLED("wprintw(%p,%s%s)"),
- (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
va_start(argp, fmt);
@@ -88,10 +92,12 @@ mvprintw(int y, int x, const char *fmt,.
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_copy(argq, argp);
+ va_start(argq, fmt);
T((T_CALLED("mvprintw(%d,%d,%s%s)"),
- y, x, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ y, x, _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
if ((code = move(y, x)) != ERR) {
@@ -109,10 +115,12 @@ mvwprintw(WINDOW *win, int y, int x, con
int code;
#ifdef TRACE
- va_start(argp, fmt);
+ va_list argq;
+ va_copy(argq, argp);
+ va_start(argq, fmt);
T((T_CALLED("mvwprintw(%d,%d,%p,%s%s)"),
- y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
- va_end(argp);
+ y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argq)));
+ va_end(argq);
#endif
if ((code = wmove(win, y, x)) != ERR) {