filters
Error.cc00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <aconf.h>
00010
00011 #ifdef USE_GCC_PRAGMAS
00012 #pragma implementation
00013 #endif
00014
00015 #include <stdio.h>
00016 #include <stddef.h>
00017 #include <stdarg.h>
00018 #include "GlobalParams.h"
00019 #include "Error.h"
00020
00021 void CDECL error(int pos, const char *msg, ...) {
00022 va_list args;
00023
00024
00025 if (globalParams && globalParams->getErrQuiet()) {
00026 return;
00027 }
00028 if (pos >= 0) {
00029 fprintf(stderr, "Error (%d): ", pos);
00030 } else {
00031 fprintf(stderr, "Error: ");
00032 }
00033 va_start(args, msg);
00034 vfprintf(stderr, msg, args);
00035 va_end(args);
00036 fprintf(stderr, "\n");
00037 fflush(stderr);
00038 }
|