git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added avifile_initialized flag.
[swftools.git]
/
pdf2swf
/
xpdf
/
Error.cc
diff --git
a/pdf2swf/xpdf/Error.cc
b/pdf2swf/xpdf/Error.cc
index
485a7cb
..
c03f75f
100644
(file)
--- a/
pdf2swf/xpdf/Error.cc
+++ b/
pdf2swf/xpdf/Error.cc
@@
-2,49
+2,37
@@
//
// Error.cc
//
//
// Error.cc
//
-// Copyright 1996 Derek B. Noonburg
+// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
//
//========================================================================
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
#pragma implementation
#endif
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
#pragma implementation
#endif
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
-#include "gtypes.h"
-#include "Params.h"
+#include "GlobalParams.h"
#include "Error.h"
#include "Error.h"
-FILE *errFile;
-GBool errQuiet;
-
-void errorInit() {
- if (errQuiet) {
- errFile = NULL;
- } else {
- errFile = stderr;
- }
-}
-
void CDECL error(int pos, char *msg, ...) {
va_list args;
void CDECL error(int pos, char *msg, ...) {
va_list args;
- if (errQuiet) {
+ // NB: this can be called before the globalParams object is created
+ if (globalParams && globalParams->getErrQuiet()) {
return;
}
return;
}
- if (printCommands) {
- fflush(stdout);
- }
if (pos >= 0) {
if (pos >= 0) {
- fprintf(errFile, "Error (%d): ", pos);
+ fprintf(stderr, "Error (%d): ", pos);
} else {
} else {
- fprintf(errFile, "Error: ");
+ fprintf(stderr, "Error: ");
}
va_start(args, msg);
}
va_start(args, msg);
- vfprintf(errFile, msg, args);
+ vfprintf(stderr, msg, args);
va_end(args);
va_end(args);
- fprintf(errFile, "\n");
- fflush(errFile);
+ fprintf(stderr, "\n");
+ fflush(stderr);
}
}