X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=pdf%2Fxpdf%2FBonoboFile.cc;h=ea8f2f712cf76861abbc809fd996aabc49f91dc2;hb=1a49446c08faaab930d3a36bc002b566eadb1ebc;hp=a97ad08b388af5bc96257481eb5352f39856582d;hpb=68a5fcc577162e9c96d18a443c98118a600218df;p=evince.git diff --git a/pdf/xpdf/BonoboFile.cc b/pdf/xpdf/BonoboFile.cc index a97ad08b..ea8f2f71 100644 --- a/pdf/xpdf/BonoboFile.cc +++ b/pdf/xpdf/BonoboFile.cc @@ -57,10 +57,18 @@ int bfseek (BaseFile file, long offset, int whence) { CORBA_Environment ev; + GNOME_Stream_SeekType t; #ifdef HARD_DEBUG printf ("Seek %p %d %d\n", file, offset, whence); #endif - return GNOME_Stream_seek (file, offset, whence, &ev); + if (whence == SEEK_SET) + t = GNOME_Stream_SEEK_SET; + else if (whence == SEEK_CUR) + t = GNOME_Stream_SEEK_CUR; + else + t = GNOME_Stream_SEEK_END; + + return GNOME_Stream_seek (file, offset, t, &ev); } void @@ -70,7 +78,7 @@ brewind (BaseFile file) #ifdef HARD_DEBUG printf ("rewind %p\n", file); #endif - GNOME_Stream_seek (file, 0, SEEK_SET, &ev); + GNOME_Stream_seek (file, 0, GNOME_Stream_SEEK_SET, &ev); } long @@ -81,7 +89,7 @@ bftell (BaseFile file) #ifdef HARD_DEBUG printf ("tell %p\n", file); #endif - pos = GNOME_Stream_seek (file, 0, SEEK_CUR, &ev); + pos = GNOME_Stream_seek (file, 0, GNOME_Stream_SEEK_CUR, &ev); #ifdef HARD_DEBUG printf ("tell returns %d\n", pos); #endif