summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2011-08-31 19:04:14 +0200
committerAlbert Astals Cid <aacid@kde.org>2011-08-31 19:06:51 +0200
commit00549400f155d8e36b4ac718603fc945858fe50d (patch)
treee7a7530b24ff7f7c83dee07a6e5660aa730a3f3b /fofi
parentcd0764921064bfd455e9df52dc9bda6fbd2c2db2 (diff)
xpdf303: error() changes, new param and formatting
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiBase.cc8
-rw-r--r--fofi/FoFiTrueType.cc2
-rw-r--r--fofi/FoFiType1.cc4
3 files changed, 7 insertions, 7 deletions
diff --git a/fofi/FoFiBase.cc b/fofi/FoFiBase.cc
index 06d12e86..86bafd80 100644
--- a/fofi/FoFiBase.cc
+++ b/fofi/FoFiBase.cc
@@ -55,22 +55,22 @@ char *FoFiBase::readFile(char *fileName, int *fileLen) {
int n;
if (!(f = fopen(fileName, "rb"))) {
- error(-1, "Cannot open '%s'", fileName);
+ error(errIO, -1, "Cannot open '{0:s}'", fileName);
return NULL;
}
if (fseek(f, 0, SEEK_END) != 0) {
- error(-1, "Cannot seek to end of '%s'", fileName);
+ error(errIO, -1, "Cannot seek to end of '{0:s}'", fileName);
fclose(f);
return NULL;
}
n = (int)ftell(f);
if (n < 0) {
- error(-1, "Cannot determine length of '%s'", fileName);
+ error(errIO, -1, "Cannot determine length of '{0:s}'", fileName);
fclose(f);
return NULL;
}
if (fseek(f, 0, SEEK_SET) != 0) {
- error(-1, "Cannot seek to start of '%s'", fileName);
+ error(errIO, -1, "Cannot seek to start of '{0:s}'", fileName);
fclose(f);
return NULL;
}
diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index a2c1195c..7db63e1d 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -1976,7 +1976,7 @@ void FoFiTrueType::parse() {
tables[i].offset + tables[i].len > len) {
i--;
wrongTables++;
- error(-1, "Found a bad table definition on true type definition, trying to continue...");
+ error(errSyntaxWarning, -1, "Found a bad table definition on true type definition, trying to continue...");
}
pos += 16;
}
diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc
index b6c34089..00f2cf9c 100644
--- a/fofi/FoFiType1.cc
+++ b/fofi/FoFiType1.cc
@@ -224,7 +224,7 @@ void FoFiType1::parse() {
j < 300 && line && (line1 = getNextLine(line));
++j, line = line1) {
if ((n = line1 - line) > 255) {
- error(-1, "FoFiType1::parse a line has more than 255 characters, we don't support this");
+ error(errSyntaxWarning, -1, "FoFiType1::parse a line has more than 255 characters, we don't support this");
n = 255;
}
strncpy(buf, line, n);
@@ -267,7 +267,7 @@ void FoFiType1::parse() {
line1 = &line[p - buf];
}
} else {
- error(-1, "FoFiType1::parse no put after dup");
+ error(errSyntaxWarning, -1, "FoFiType1::parse no put after dup");
}
}
}