summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ztxt.cpp
authorpohly <pohly>2005-05-05 14:39:33 (UTC)
committer pohly <pohly>2005-05-05 14:39:33 (UTC)
commit39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (side-by-side diff)
tree96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/ztxt.cpp
parent279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff)
downloadopie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip
opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz
opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/ztxt.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ztxt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/ztxt.cpp b/noncore/apps/opie-reader/ztxt.cpp
index 35db05e..e04eaa0 100644
--- a/noncore/apps/opie-reader/ztxt.cpp
+++ b/noncore/apps/opie-reader/ztxt.cpp
@@ -64,12 +64,13 @@ unsigned int ztxt::locate()
void ztxt::locate(unsigned int n)
{
if (hasrandomaccess())
{
+ unsuspend();
bufferrec = n / ntohs(hdr0.recordSize) + 1;
if (bufferrec == 1)
{
inflateEnd(&zstream);
}
size_t reclen = recordlength(bufferrec);
@@ -104,12 +105,13 @@ void ztxt::locate(unsigned int n)
while (currentpos < n && getch() != EOF);
}
}
void ztxt::home()
{
+unsuspend();
if (bInit)
{
inflateEnd(&zstream);
}
bInit = true;
size_t reclen = recordlength(1);
@@ -144,12 +146,13 @@ CList<Bkmk>* ztxt::getbkmklist()
// printf("Bookmarks - record %d contains %d\n", recno, ntohs(hdr0.numBookmarks));
if (recno == 0) return NULL;
CList<Bkmk>* t = new CList<Bkmk>;
+ unsuspend();
size_t cur = ftell(fin);
gotorecordnumber(recno);
for (int i = 0; i < ntohs(hdr0.numBookmarks); i++)
{
zTXTbkmk bkmk;
if (fread(&bkmk, sizeof(bkmk), 1, fin) != 1) break;