use stdarg when compiling with ANSI C compiler

This commit is contained in:
ceriel
1995-08-18 07:26:18 +00:00
parent 5bfeacc519
commit efa0bfa27d
5 changed files with 131 additions and 2 deletions

View File

@@ -1,6 +1,11 @@
#include <ctype.h>
#include <system.h>
#if __STDC__
#include <stdarg.h>
extern out(char *, ...);
#else
#include <varargs.h>
#endif
#define CODE_EXPANDER
#include "em.h"
@@ -99,6 +104,17 @@ int seg;
}
}
#if __STDC__
/*VARARGS*/
out(char *fmt, ...)
{
va_list pvar;
va_start(pvar, fmt);
doprnt( outfile, fmt, pvar);
va_end(pvar);
}
#else
/*VARARGS*/
out(va_alist)
va_dcl
@@ -111,6 +127,7 @@ va_dcl
doprnt( outfile, fmt, pvar);
va_end(pvar);
}
#endif
char *suffix( str, suf)
char *str, *suf;