* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
- TPS(out_buff) = typeRealloc(char, TPS(out_size), TPS(out_buff));
- if (TPS(out_buff) == 0)
- _nc_err_abort(MSG_NO_MEMORY);
+ TYPE_REALLOC(char, TPS(out_size), TPS(out_buff));
- (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, s);
+ _nc_SPRINTF(TPS(out_buff) + TPS(out_used),
+ _nc_SLIMIT(TPS(out_size) - TPS(out_used))
+ fmt, s);
- (void) sprintf(TPS(out_buff) + TPS(out_used), fmt, number);
+ _nc_SPRINTF(TPS(out_buff) + TPS(out_used),
+ _nc_SLIMIT(TPS(out_size) - TPS(out_used))
+ fmt, number);
- for (i = 0; i < max(popcount, number); i++) {
+ if (number > NUM_PARM)
+ number = NUM_PARM;
+ if (popcount > NUM_PARM)
+ popcount = NUM_PARM;
+ num_args = max(popcount, number);
+
+ for (i = 0; i < num_args; i++) {
/*
* A few caps (such as plab_norm) have string-valued parms.
* We'll have to assume that the caller knows the difference, since
/*
* A few caps (such as plab_norm) have string-valued parms.
* We'll have to assume that the caller knows the difference, since
if (p_is_s[i] != 0)
save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
else
if (p_is_s[i] != 0)
save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
else
- save_number(", %d", param[i], 0);
+ save_number(", %d", (int) param[i], 0);
}
_tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff));
TPS(out_used) = 0;
}
_tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff));
TPS(out_used) = 0;
TPS(out_buff)[TPS(out_used)] = '\0';
T((T_RETURN("%s"), _nc_visbuf(TPS(out_buff))));
TPS(out_buff)[TPS(out_used)] = '\0';
T((T_RETURN("%s"), _nc_visbuf(TPS(out_buff))));
return tparm_varargs(string, a1, a2, a3, a4, a5, a6, a7, a8, a9);
}
#endif /* NCURSES_TPARM_VARARGS */
return tparm_varargs(string, a1, a2, a3, a4, a5, a6, a7, a8, a9);
}
#endif /* NCURSES_TPARM_VARARGS */