summaryrefslogtreecommitdiff
path: root/generic/Output.cpp
diff options
context:
space:
mode:
authorPixel <Pixel>2002-08-15 22:15:20 +0000
committerPixel <Pixel>2002-08-15 22:15:20 +0000
commit020a28c534544c0f1710f8af1e4b295fddcad66a (patch)
tree9f9d25920c9ad6e023f5cb6d87f00cd78db86d60 /generic/Output.cpp
parentd962e8d2d650c7b297dcd041b55060bc29996a93 (diff)
Working...
Diffstat (limited to 'generic/Output.cpp')
-rw-r--r--generic/Output.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/Output.cpp b/generic/Output.cpp
index aace79c..72d00cf 100644
--- a/generic/Output.cpp
+++ b/generic/Output.cpp
@@ -49,6 +49,18 @@ bool Output::CanSeek() {
return S_ISREG(s.st_mode);
}
+off_t Output::seek(off_t offset, int whence) throw (GeneralException) {
+ if ((itell = lseek(GetHandle(), offset, whence)) < 0) {
+ throw IOGeneral(String(_("Error seeking file ")) + n + _(": ") + strerror(errno));
+ }
+#ifdef PARANOID_SEEK
+ if (itell != lseek(GetHandle(), 0, SEEK_CUR)) {
+ throw IOGeneral(String(_("Error seeking file ")) + n + _(": the position does not match"));
+ }
+#endif
+ return itell;
+}
+
String Output::GetName() {
return n;
}