Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/Error.cc
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-08-06 00:14:27 (GMT)
committer Arturo Espinosa <unammx@src.gnome.org>1999-08-06 00:14:27 (GMT)
commit50e9d31c05e9ca11ad43cc570556094782c1b956 (patch)
treee8d30241d1f97d7a52ad4486089a74e55160ad78 /pdf/xpdf/Error.cc
parentbd7dce23fec36adeb1713c164d594bbc0436b346 (diff)
Painful merge.
Painful merge. I merged the latest release into the CVS. This version supports the regular xpdf or gpdf if the GNOME libraries are found. Miguel.
Diffstat (limited to 'pdf/xpdf/Error.cc')
-rw-r--r--pdf/xpdf/Error.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/pdf/xpdf/Error.cc b/pdf/xpdf/Error.cc
index cbb623b..0dc8150 100644
--- a/pdf/xpdf/Error.cc
+++ b/pdf/xpdf/Error.cc
@@ -20,23 +20,32 @@
// Send error messages to /dev/tty instead of stderr.
GBool errorsToTTY = gFalse;
-// File to send error (and other) messages to.
FILE *errFile;
+GBool errQuiet;
void errorInit() {
- if (!errorsToTTY || !(errFile = fopen("/dev/tty", "w")))
- errFile = stderr;
+ if (errQuiet) {
+ errFile = NULL;
+ } else {
+ if (!errorsToTTY || !(errFile = fopen("/dev/tty", "w")))
+ errFile = stderr;
+ }
}
void CDECL error(int pos, char *msg, ...) {
va_list args;
- if (printCommands)
+ if (errQuiet) {
+ return;
+ }
+ if (printCommands) {
fflush(stdout);
- if (pos >= 0)
+ }
+ if (pos >= 0) {
fprintf(errFile, "Error (%d): ", pos);
- else
+ } else {
fprintf(errFile, "Error: ");
+ }
va_start(args, msg);
vfprintf(errFile, msg, args);
va_end(args);