X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_tparm.c;h=ba2a8404030edda6b0df1d2c60353c561a4a4745;hp=6a19ab9f2c3562f0b8d249812411621accf260d6;hb=feb958a7e85895ec23547b7b1a8daa03e85c7b9c;hpb=7a27c7d49c2e8b4a1ecbe85b4423d647cbc75ea5 diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c index 6a19ab9f..ba2a8404 100644 --- a/ncurses/tinfo/lib_tparm.c +++ b/ncurses/tinfo/lib_tparm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -43,7 +43,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.73 2007/04/21 20:43:19 tom Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.76 2008/08/16 19:22:55 tom Exp $") /* * char * @@ -166,7 +166,7 @@ save_char(int c) if (c == 0) c = 0200; get_space(1); - TPS(out_buff)[TPS(out_used)++] = c; + TPS(out_buff)[TPS(out_used)++] = (char) c; } static NCURSES_INLINE void @@ -504,11 +504,15 @@ tparam_internal(const char *string, va_list ap) TPS(stack_ptr) = 0; if (popcount == 0) { popcount = number; - for (i = number - 1; i >= 0; i--) - npush(param[i]); + for (i = number - 1; i >= 0; i--) { + if (p_is_s[i]) + spush(p_is_s[i]); + else + npush(param[i]); + } } #ifdef TRACE - if (_nc_tracing & TRACE_CALLS) { + if (USE_TRACEF(TRACE_CALLS)) { for (i = 0; i < popcount; i++) { if (p_is_s[i] != 0) save_text(", %s", _nc_visbuf(p_is_s[i]), 0); @@ -517,6 +521,7 @@ tparam_internal(const char *string, va_list ap) } _tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff)); TPS(out_used) = 0; + _nc_unlock_global(tracef); } #endif /* TRACE */