author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/ztxt.cpp | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/ztxt.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ztxt.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/ztxt.cpp b/noncore/apps/opie-reader/ztxt.cpp index 8091d32..79c5fa4 100644 --- a/noncore/apps/opie-reader/ztxt.cpp +++ b/noncore/apps/opie-reader/ztxt.cpp @@ -3,13 +3,14 @@ #include "ztxt.h" #include "my_list.h" #include "Bkmks.h" +#include "static.h" ztxt::ztxt() : bInit(false), expandedtextbuffer(NULL), compressedtextbuffer(NULL) { /*printf("constructing:%x\n",fin);*/ } int ztxt::OpenFile(const char *src) { - if (!Cpdb::openfile(src)) + if (!Cpdb::openpdbfile(src)) { return -1; } @@ -154,8 +155,20 @@ CList<Bkmk>* ztxt::getbkmklist() zTXTbkmk bkmk; if (fread(&bkmk, sizeof(bkmk), 1, fin) != 1) break; // printf("Bookmark number:%d:%.20s\n", i, bkmk.title); - t->push_back(Bkmk(bkmk.title, NULL, ntohl(bkmk.offset))); + tchar title[MAX_BMRK_LENGTH]; + for (int j = 0; j < MAX_BMRK_LENGTH; j++) + { + title[j] = bkmk.title[j]; + } + t->push_back(Bkmk(title, NULL, ntohl(bkmk.offset))); } fseek(fin, cur, SEEK_SET); return t; } + +#ifndef __STATIC +extern "C" +{ + CExpander* newcodec() { return new ztxt; } +} +#endif |