#include <errno.h>
#include <ctype.h>
+#include "../common/xsprintf.h"
+
#include "global.h"
#include "error.h"
#include "scanner.h"
static const char* CfgBuf = 0;
/* Other input stuff */
-static int C = ' ';
+static int C = ' ';
static unsigned InputLine = 1;
static unsigned InputCol = 0;
static FILE* InputFile = 0;
/*****************************************************************************/
-/* Error handling */
+/* Error handling */
/*****************************************************************************/
/* Print a warning message adding file name and line number of the config file */
{
char Buf [512];
- va_list ap;
+ va_list ap;
+
va_start (ap, Format);
-#ifdef __WATCOMC__
- _vbprintf (Buf, sizeof (Buf), Format, ap);
-#else
- vsnprintf (Buf, sizeof (Buf), Format, ap);
-#endif
+ xvsprintf (Buf, sizeof (Buf), Format, ap);
+ va_end (ap);
+
Warning ("%s(%u): %s", CfgName, CfgErrorLine, Buf);
}
{
char Buf [512];
va_list ap;
+
va_start (ap, Format);
-#ifdef __WATCOMC__
- _vbprintf (Buf, sizeof (Buf), Format, ap);
-#else
- vsnprintf (Buf, sizeof (Buf), Format, ap);
-#endif
+ xvsprintf (Buf, sizeof (Buf), Format, ap);
+ va_end (ap);
+
Error ("%s(%u): %s", CfgName, CfgErrorLine, Buf);
}