use varargs
This commit is contained in:
parent
3a075a7c67
commit
282064375d
1 changed files with 21 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#include "varargs.h"
|
||||||
#include "decl.h"
|
#include "decl.h"
|
||||||
|
|
||||||
/* All the functions in this file will be called by the parser.
|
/* All the functions in this file will be called by the parser.
|
||||||
|
@ -207,20 +208,32 @@ operand_clean()
|
||||||
n_ops = 0;
|
n_ops = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
out( fmt, argv)
|
/*VARARGS*/
|
||||||
char *fmt;
|
out(va_alist)
|
||||||
int argv;
|
va_dcl
|
||||||
{
|
{
|
||||||
doprnt( outfile, fmt, &argv);
|
va_list pvar;
|
||||||
|
char *fmt;
|
||||||
|
|
||||||
|
va_start(pvar);
|
||||||
|
fmt = va_arg(pvar, char *);
|
||||||
|
doprnt( outfile, fmt, pvar);
|
||||||
|
va_end(pvar);
|
||||||
}
|
}
|
||||||
|
|
||||||
error( fmt, argv)
|
/*VARARGS*/
|
||||||
char *fmt;
|
error(va_alist)
|
||||||
int argv;
|
va_dcl
|
||||||
{
|
{
|
||||||
|
char *fmt;
|
||||||
|
va_list pvar;
|
||||||
|
|
||||||
|
va_start(pvar);
|
||||||
|
fmt = va_arg(pvar, char *);
|
||||||
fprint( STDERR, "!! ERROR : ");
|
fprint( STDERR, "!! ERROR : ");
|
||||||
doprnt( STDERR, fmt, &argv);
|
doprnt( STDERR, fmt, pvar);
|
||||||
fprint( STDERR, " !!\n");
|
fprint( STDERR, " !!\n");
|
||||||
|
va_end(pvar);
|
||||||
}
|
}
|
||||||
|
|
||||||
inc_ops()
|
inc_ops()
|
||||||
|
|
Loading…
Add table
Reference in a new issue