* genattrtab.c (attr_printf): Use VA_OPEN/VA_FIXEDARG/VA_CLOSE.

From-SVN: r45274
This commit is contained in:
Kaveh R. Ghazi 2001-08-29 18:26:31 +00:00 committed by Kaveh Ghazi
parent 5965bbf846
commit ec83eb53a7
2 changed files with 10 additions and 14 deletions

View File

@ -1,3 +1,7 @@
2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* genattrtab.c (attr_printf): Use VA_OPEN/VA_FIXEDARG/VA_CLOSE.
2001-08-29 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md (movsi_h8300hs): Make it 64-bit safe.

View File

@ -744,25 +744,17 @@ attr_rtx VPARAMS ((enum rtx_code code, ...))
char *
attr_printf VPARAMS ((register int len, const char *fmt, ...))
{
#ifndef ANSI_PROTOTYPES
register int len;
const char *fmt;
#endif
va_list p;
char str[256];
VA_START (p, fmt);
#ifndef ANSI_PROTOTYPES
len = va_arg (p, int);
fmt = va_arg (p, const char *);
#endif
if (len > 255) /* leave room for \0 */
VA_OPEN (p, fmt);
VA_FIXEDARG (p, int, len);
VA_FIXEDARG (p, const char *, fmt);
if (len > (sizeof(str) - 1)) /* leave room for \0 */
abort ();
vsprintf (str, fmt, p);
va_end (p);
VA_CLOSE (p);
return attr_string (str, strlen (str));
}