version 1.5, 2008/12/02 09:00:13
|
version 1.6, 2013/10/17 06:17:40
|
|
|
void Fatal(const char* file, size_t line, const char* format, ...) | void Fatal(const char* file, size_t line, const char* format, ...) |
{ | { |
char prefixedFormat[EXECUTOR_BUFFER_SIZE]; | char prefixedFormat[EXECUTOR_BUFFER_SIZE]; |
char lineStr[32]; |
|
| |
#ifdef PEGASUS_DEBUG | #ifdef PEGASUS_DEBUG |
/* Prepend "__FILE__(__LINE__): FATAL: " to format. */ | /* Prepend "__FILE__(__LINE__): FATAL: " to format. */ |
| |
|
char lineStr[32]; |
Strlcpy(prefixedFormat, file, sizeof(prefixedFormat)); | Strlcpy(prefixedFormat, file, sizeof(prefixedFormat)); |
Strlcat(prefixedFormat, "(", sizeof(prefixedFormat)); | Strlcat(prefixedFormat, "(", sizeof(prefixedFormat)); |
sprintf(lineStr, "%u", (unsigned int)line); | sprintf(lineStr, "%u", (unsigned int)line); |