mirror of
https://github.com/cc65/cc65.git
synced 2024-09-27 04:54:54 +00:00
Use xsprintf in common library
git-svn-id: svn://svn.cc65.org/cc65/trunk@32 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
12b2ee8f60
commit
b05c1e1111
@ -39,6 +39,8 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#include "../common/xsprintf.h"
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "scanner.h"
|
#include "scanner.h"
|
||||||
@ -83,12 +85,11 @@ void CfgWarning (const char* Format, ...)
|
|||||||
{
|
{
|
||||||
char Buf [512];
|
char Buf [512];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start (ap, Format);
|
va_start (ap, Format);
|
||||||
#ifdef __WATCOMC__
|
xvsprintf (Buf, sizeof (Buf), Format, ap);
|
||||||
_vbprintf (Buf, sizeof (Buf), Format, ap);
|
va_end (ap);
|
||||||
#else
|
|
||||||
vsnprintf (Buf, sizeof (Buf), Format, ap);
|
|
||||||
#endif
|
|
||||||
Warning ("%s(%u): %s", CfgName, CfgErrorLine, Buf);
|
Warning ("%s(%u): %s", CfgName, CfgErrorLine, Buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,12 +100,11 @@ void CfgError (const char* Format, ...)
|
|||||||
{
|
{
|
||||||
char Buf [512];
|
char Buf [512];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start (ap, Format);
|
va_start (ap, Format);
|
||||||
#ifdef __WATCOMC__
|
xvsprintf (Buf, sizeof (Buf), Format, ap);
|
||||||
_vbprintf (Buf, sizeof (Buf), Format, ap);
|
va_end (ap);
|
||||||
#else
|
|
||||||
vsnprintf (Buf, sizeof (Buf), Format, ap);
|
|
||||||
#endif
|
|
||||||
Error ("%s(%u): %s", CfgName, CfgErrorLine, Buf);
|
Error ("%s(%u): %s", CfgName, CfgErrorLine, Buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user