1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 17:30:50 +00:00

New functions LIWarning and LIError.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3961 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-03-08 14:54:53 +00:00
parent fa417d0682
commit ffa8e7be82
2 changed files with 31 additions and 0 deletions

View File

@ -96,6 +96,17 @@ void Warning (const char* Format, ...)
void LIWarning (const LineInfo* LI, const char* Format, ...)
/* Print a warning message with the line info given explicitly */
{
va_list ap;
va_start (ap, Format);
IntWarning (GetInputName (LI), GetInputLine (LI), Format, ap);
va_end (ap);
}
void PPWarning (const char* Format, ...)
/* Print warning message. For use within the preprocessor. */
{
@ -136,6 +147,17 @@ void Error (const char* Format, ...)
void LIError (const LineInfo* LI, const char* Format, ...)
/* Print an error message with the line info given explicitly */
{
va_list ap;
va_start (ap, Format);
IntError (GetInputName (LI), GetInputLine (LI), Format, ap);
va_end (ap);
}
void PPError (const char* Format, ...)
/* Print an error message. For use within the preprocessor. */
{

View File

@ -41,6 +41,9 @@
/* common */
#include "attrib.h"
/* cc65 */
#include "lineinfo.h"
/*****************************************************************************/
@ -64,12 +67,18 @@ extern unsigned WarningCount;
void Warning (const char* Format, ...) attribute ((format (printf, 1, 2)));
/* Print warning message. */
void LIWarning (const LineInfo* LI, const char* Format, ...) attribute ((format (printf, 2, 3)));
/* Print a warning message with the line info given explicitly */
void PPWarning (const char* Format, ...) attribute ((format (printf, 1, 2)));
/* Print warning message. For use within the preprocessor. */
void Error (const char* Format, ...) attribute ((format (printf, 1, 2)));
/* Print an error message */
void LIError (const LineInfo* LI, const char* Format, ...) attribute ((format (printf, 2, 3)));
/* Print an error message with the line info given explicitly */
void PPError (const char* Format, ...) attribute ((format (printf, 1, 2)));
/* Print an error message. For use within the preprocessor. */