Example #1
0
/* printf for compiler error reporting */
void PlatformPrintf(const char *Format, ...)
{
    va_list Args;
    
    va_start(Args, Format);
    PlatformVPrintf(Format, Args);
    va_end(Args);
}
Example #2
0
/* printf for compiler error reporting */
void PlatformPrintf(IOFILE *Stream, const char *Format, ...)
{
    va_list Args;
    
    va_start(Args, Format);
    PlatformVPrintf(Stream, Format, Args);
    va_end(Args);
}
Example #3
0
/* exit with a message, when we're not parsing a program */
void ProgramFailNoParser(Picoc *pc, const char *Message, ...)
{
	va_list Args;

	va_start(Args, Message);
	PlatformVPrintf(pc->CStdOut, Message, Args);
	va_end(Args);
	PlatformPrintf(pc->CStdOut, "\n");
	PlatformExit(pc, 1);
}
Example #4
0
/* exit lexing with a message */
void LexFail(struct LexState *Lexer, const char *Message, ...)
{
    va_list Args;

    PrintSourceTextErrorLine(Lexer->FileName, Lexer->SourceText, Lexer->Line, Lexer->CharacterPos);
    va_start(Args, Message);
    PlatformVPrintf(Message, Args);
    va_end(Args);
    PlatformPrintf("\n");
    PlatformExit(1);
}
Example #5
0
/* exit with a message */
void ProgramFail(struct ParseState *Parser, const char *Message, ...)
{
    va_list Args;

    PlatformErrorPrefix(Parser);
    va_start(Args, Message);
    PlatformVPrintf(Message, Args);
    va_end(Args);
    PlatformPrintf("\n");
    PlatformExit(1);
}
Example #6
0
/* exit with a message */
void ProgramFail(struct ParseState *Parser, const char *Message, ...)
{
	va_list Args;

	PrintSourceTextErrorLine(Parser->pc->CStdOut, Parser->FileName, Parser->SourceText, Parser->Line, Parser->CharacterPos);
	va_start(Args, Message);
	PlatformVPrintf(Parser->pc->CStdOut, Message, Args);
	va_end(Args);
	PlatformPrintf(Parser->pc->CStdOut, "\n");
	PlatformExit(Parser->pc, 1);
}