summaryrefslogtreecommitdiff
authorpohly <pohly>2004-08-26 05:57:55 (UTC)
committer pohly <pohly>2004-08-26 05:57:55 (UTC)
commit3f36482d9a6c096fdf5d8ab8831eb736746c0565 (patch) (unidiff)
treefb213ba05e20c9a02bca3d805f8f5c96c1c45da0
parente00962edd9d4be58c6184e5b6c5f6ef07f449689 (diff)
downloadopie-3f36482d9a6c096fdf5d8ab8831eb736746c0565.zip
opie-3f36482d9a6c096fdf5d8ab8831eb736746c0565.tar.gz
opie-3f36482d9a6c096fdf5d8ab8831eb736746c0565.tar.bz2
removed obsolete static.h and useqpe.h
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Aportis.cpp1
-rw-r--r--noncore/apps/opie-reader/AportisCodec/AportisCodec.pro7
-rw-r--r--noncore/apps/opie-reader/BuffDoc.cpp2
-rw-r--r--noncore/apps/opie-reader/BuffDoc.h1
-rw-r--r--noncore/apps/opie-reader/CDrawBuffer.cpp1
-rw-r--r--noncore/apps/opie-reader/CExpander.h1
-rw-r--r--noncore/apps/opie-reader/CFilter.cpp1
-rw-r--r--noncore/apps/opie-reader/CFilter.h1
-rw-r--r--noncore/apps/opie-reader/CHM.cpp1
-rw-r--r--noncore/apps/opie-reader/CHM.h1
-rw-r--r--noncore/apps/opie-reader/CHM/CHM.pro4
-rw-r--r--noncore/apps/opie-reader/CloseDialog.h1
-rw-r--r--noncore/apps/opie-reader/FontControl.cpp1
-rw-r--r--noncore/apps/opie-reader/HTMLFilter/HTMLFilter.pro4
-rw-r--r--noncore/apps/opie-reader/Palm2QImage.cpp1
-rw-r--r--noncore/apps/opie-reader/PluckerCodec/PluckerCodec.pro4
-rw-r--r--noncore/apps/opie-reader/QTReader.cpp1
-rw-r--r--noncore/apps/opie-reader/QTReader.h1
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp2
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.h1
-rw-r--r--noncore/apps/opie-reader/ToolbarPrefs.cpp1
-rw-r--r--noncore/apps/opie-reader/ToolbarPrefs.h2
-rw-r--r--noncore/apps/opie-reader/URLDialog.h1
-rw-r--r--noncore/apps/opie-reader/WeaselCodec/WeaselCodec.pro4
-rw-r--r--noncore/apps/opie-reader/ZText.h1
-rw-r--r--noncore/apps/opie-reader/codeclib/codeclib.pro4
-rw-r--r--noncore/apps/opie-reader/ebookcodec.h2
-rw-r--r--noncore/apps/opie-reader/iSiloCodec/iSiloCodec.pro4
-rw-r--r--noncore/apps/opie-reader/main.cpp1
-rw-r--r--noncore/apps/opie-reader/pdb.cpp1
-rw-r--r--noncore/apps/opie-reader/pdb.h1
-rw-r--r--noncore/apps/opie-reader/pdblib/pdblib.pro4
-rw-r--r--noncore/apps/opie-reader/plucker.cpp2
-rw-r--r--noncore/apps/opie-reader/plucker_base.cpp3
-rw-r--r--noncore/apps/opie-reader/pluckerbaselib/pluckerbaselib.pro4
-rw-r--r--noncore/apps/opie-reader/ppm_expander.cpp1
-rw-r--r--noncore/apps/opie-reader/ppm_expander.h1
-rw-r--r--noncore/apps/opie-reader/ppmsCodec/ppmsCodec.pro4
-rwxr-xr-xnoncore/apps/opie-reader/preferences.cpp1
-rw-r--r--noncore/apps/opie-reader/preferences.h1
-rw-r--r--noncore/apps/opie-reader/static.h0
-rw-r--r--noncore/apps/opie-reader/striphtml.cpp1
-rw-r--r--noncore/apps/opie-reader/useqpe.h0
-rw-r--r--noncore/apps/opie-reader/ztxt.cpp1
44 files changed, 21 insertions, 61 deletions
diff --git a/noncore/apps/opie-reader/Aportis.cpp b/noncore/apps/opie-reader/Aportis.cpp
index 7528e78..353996c 100644
--- a/noncore/apps/opie-reader/Aportis.cpp
+++ b/noncore/apps/opie-reader/Aportis.cpp
@@ -1,30 +1,29 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <string.h> 2#include <string.h>
3#include "Aportis.h" 3#include "Aportis.h"
4#include "my_list.h" 4#include "my_list.h"
5#include "Bkmks.h" 5#include "Bkmks.h"
6#include "static.h"
7 6
8Aportis::Aportis() : peanutfile(false) { /*printf("constructing:%x\n",fin);*/ } 7Aportis::Aportis() : peanutfile(false) { /*printf("constructing:%x\n",fin);*/ }
9 8
10void Aportis::dePeanut(int& ch) 9void Aportis::dePeanut(int& ch)
11{ 10{
12 if (peanutfile && ch != EOF) 11 if (peanutfile && ch != EOF)
13 { 12 {
14 unsigned char c = ch; 13 unsigned char c = ch;
15 if (peanutfile) c ^= 0xa5; 14 if (peanutfile) c ^= 0xa5;
16 ch = c; 15 ch = c;
17 } 16 }
18} 17}
19 18
20CList<Bkmk>* Aportis::getbkmklist() 19CList<Bkmk>* Aportis::getbkmklist()
21{ 20{
22/* 21/*
23 if (peanutfile) 22 if (peanutfile)
24 { 23 {
25 if (nRecs2 > nRecs) 24 if (nRecs2 > nRecs)
26 { 25 {
27 CList<Bkmk>* t = new CList<Bkmk>; 26 CList<Bkmk>* t = new CList<Bkmk>;
28 for (int i = nRecs; i < nRecs2; i++) 27 for (int i = nRecs; i < nRecs2; i++)
29 { 28 {
30 char name[17]; 29 char name[17];
diff --git a/noncore/apps/opie-reader/AportisCodec/AportisCodec.pro b/noncore/apps/opie-reader/AportisCodec/AportisCodec.pro
index 4b61a7a..fcab192 100644
--- a/noncore/apps/opie-reader/AportisCodec/AportisCodec.pro
+++ b/noncore/apps/opie-reader/AportisCodec/AportisCodec.pro
@@ -1,30 +1,29 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = Aportis.h \ 5 HEADERS = Aportis.h \
6 CExpander.h \ 6 CExpander.h \
7 ../OREADERINC/useqpe.h \
8 config.h \ 7 config.h \
9 ustring.h \ 8 ustring.h \
10 StyleConsts.h \ 9 StyleConsts.h \
11 Markups.h \ 10 Markups.h \
12 names.h \ 11 names.h \
13 linktype.h \ 12 linktype.h \
14 pdb.h \ 13 pdb.h \
15 my_list.h \ 14 my_list.h \
16 Bkmks.h \ 15 Bkmks.h \
17 Filedata.h 16 Filedata.h
18 17
19 SOURCES = Aportis.cpp 18 SOURCES = Aportis.cpp
20 19
21 20
22 INTERFACES= 21 INTERFACES=
23 DESTDIR = $(OPIEDIR)/plugins/reader/codecs 22 DESTDIR = $(OPIEDIR)/plugins/reader/codecs
24 TARGET = Aportis 23 TARGET = Aportis
25LIBS += -lreader_pdb -lreader_codec 24LIBS += -lreader_pdb -lreader_codec
26 25
27 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 26 INCLUDEPATH+= $(OPIEDIR)/include
28 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 27 DEPENDPATH+= $(OPIEDIR)/include
29 28
30include ( $(OPIEDIR)/include.pro ) \ No newline at end of file 29include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp
index 22934f9..1f0a524 100644
--- a/noncore/apps/opie-reader/BuffDoc.cpp
+++ b/noncore/apps/opie-reader/BuffDoc.cpp
@@ -1,31 +1,29 @@
1#include "static.h"
2#include "names.h" 1#include "names.h"
3 2
4#define NEWLINEBREAK 3#define NEWLINEBREAK
5#define INCREMENTALWIDTH 4#define INCREMENTALWIDTH
6 5
7#include "useqpe.h"
8#include "usenef.h" 6#include "usenef.h"
9#include "BuffDoc.h" 7#include "BuffDoc.h"
10#include "config.h" 8#include "config.h"
11#include "CDrawBuffer.h" 9#include "CDrawBuffer.h"
12#include "ZText.h" 10#include "ZText.h"
13#include "ebookcodec.h" 11#include "ebookcodec.h"
14 12
15#ifdef __STATIC 13#ifdef __STATIC
16#include "Aportis.h" 14#include "Aportis.h"
17#include "CHM.h" 15#include "CHM.h"
18#include "ppm_expander.h" 16#include "ppm_expander.h"
19#include "ztxt.h" 17#include "ztxt.h"
20#include "plucker.h" 18#include "plucker.h"
21#ifdef USENEF 19#ifdef USENEF
22#include "nef.h" 20#include "nef.h"
23#include "arrierego.h" 21#include "arrierego.h"
24#endif 22#endif
25#include "iSilo.h" 23#include "iSilo.h"
26#endif 24#endif
27 25
28 26
29linkType BuffDoc::hyperlink(unsigned int n, unsigned int noff, QString& wrd, QString& nm) 27linkType BuffDoc::hyperlink(unsigned int n, unsigned int noff, QString& wrd, QString& nm)
30{ 28{
31 linkType bRet = eNone; 29 linkType bRet = eNone;
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h
index a7dd7bf..2b4fb57 100644
--- a/noncore/apps/opie-reader/BuffDoc.h
+++ b/noncore/apps/opie-reader/BuffDoc.h
@@ -1,28 +1,27 @@
1#ifndef __BuffDoc_h 1#ifndef __BuffDoc_h
2#define __BuffDoc_h 2#define __BuffDoc_h
3 3
4#include "useqpe.h"
5#include "CDrawBuffer.h" 4#include "CDrawBuffer.h"
6#include "CFilter.h" 5#include "CFilter.h"
7#include "CExpander.h" 6#include "CExpander.h"
8#include <qfontmetrics.h> 7#include <qfontmetrics.h>
9#include <qmessagebox.h> 8#include <qmessagebox.h>
10 9
11class BuffDoc 10class BuffDoc
12{ 11{
13 CDrawBuffer lastword; 12 CDrawBuffer lastword;
14 CSizeBuffer lastsizes, allsizes; 13 CSizeBuffer lastsizes, allsizes;
15 size_t laststartline; 14 size_t laststartline;
16 bool lastispara; 15 bool lastispara;
17 CExpander_Interface* exp; 16 CExpander_Interface* exp;
18 CFilterChain* filt; 17 CFilterChain* filt;
19 int m_hyphenthreshold; 18 int m_hyphenthreshold;
20 // bool m_customhyphen; 19 // bool m_customhyphen;
21 public: 20 public:
22 QString about(); 21 QString about();
23 bool findanchor(const QString& nm) 22 bool findanchor(const QString& nm)
24 { 23 {
25 return filt->findanchor(nm); 24 return filt->findanchor(nm);
26 } 25 }
27 // void setCustomHyphen(bool _v) { m_customhyphen = _v; } 26 // void setCustomHyphen(bool _v) { m_customhyphen = _v; }
28 // bool getCustomHyphen() { return m_customhyphen; } 27 // bool getCustomHyphen() { return m_customhyphen; }
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp
index caccf1b..bfb3027 100644
--- a/noncore/apps/opie-reader/CDrawBuffer.cpp
+++ b/noncore/apps/opie-reader/CDrawBuffer.cpp
@@ -1,31 +1,30 @@
1#include "CDrawBuffer.h" 1#include "CDrawBuffer.h"
2#include "FontControl.h" 2#include "FontControl.h"
3#include <qfontmetrics.h> 3#include <qfontmetrics.h>
4#include <qpainter.h> 4#include <qpainter.h>
5#include <qpixmap.h> 5#include <qpixmap.h>
6#include <qimage.h> 6#include <qimage.h>
7#include "useqpe.h"
8 7
9CDrawBuffer::~CDrawBuffer() 8CDrawBuffer::~CDrawBuffer()
10{ 9{
11 while (!segs.isEmpty()) segs.erase(0); 10 while (!segs.isEmpty()) segs.erase(0);
12} 11}
13 12
14void CDrawBuffer::setright(CDrawBuffer& rhs, int f) 13void CDrawBuffer::setright(CDrawBuffer& rhs, int f)
15{ 14{
16 int i; 15 int i;
17 len = rhs.len; 16 len = rhs.len;
18 fc = rhs.fc; 17 fc = rhs.fc;
19 m_ascent = m_descent = m_lineSpacing = m_lineExtraSpacing = 0; 18 m_ascent = m_descent = m_lineSpacing = m_lineExtraSpacing = 0;
20 while (!segs.isEmpty()) 19 while (!segs.isEmpty())
21 { 20 {
22 segs.erase(0); 21 segs.erase(0);
23 } 22 }
24 for (CList<textsegment>::iterator iter = rhs.segs.begin(); iter != rhs.segs.end(); ) 23 for (CList<textsegment>::iterator iter = rhs.segs.begin(); iter != rhs.segs.end(); )
25 { 24 {
26 CList<textsegment>::iterator next = iter; 25 CList<textsegment>::iterator next = iter;
27 iter++; 26 iter++;
28 if (iter == rhs.segs.end() || iter->start > f) 27 if (iter == rhs.segs.end() || iter->start > f)
29 { 28 {
30 int st = next->start-f; 29 int st = next->start-f;
31 if (st < 0) st = 0; 30 if (st < 0) st = 0;
diff --git a/noncore/apps/opie-reader/CExpander.h b/noncore/apps/opie-reader/CExpander.h
index e9aaf79..7fa84f9 100644
--- a/noncore/apps/opie-reader/CExpander.h
+++ b/noncore/apps/opie-reader/CExpander.h
@@ -1,35 +1,34 @@
1#ifndef __CExpander_h 1#ifndef __CExpander_h
2#define __CExpander_h 2#define __CExpander_h
3 3
4#ifndef _WINDOWS 4#ifndef _WINDOWS
5#include <unistd.h> 5#include <unistd.h>
6#endif 6#endif
7#include <stdio.h> 7#include <stdio.h>
8#include <time.h> 8#include <time.h>
9#include <sys/stat.h> 9#include <sys/stat.h>
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11#include "useqpe.h"
12#include "config.h" 11#include "config.h"
13#include "StyleConsts.h" 12#include "StyleConsts.h"
14#include "Markups.h" 13#include "Markups.h"
15#include "names.h" 14#include "names.h"
16#include "linktype.h" 15#include "linktype.h"
17 16
18class QImage; 17class QImage;
19class Bkmk; 18class Bkmk;
20class QString; 19class QString;
21 20
22template<class T> 21template<class T>
23class CList; 22class CList;
24 23
25class CCharacterSource 24class CCharacterSource
26{ 25{
27 public: 26 public:
28 virtual void getch(tchar&, CStyle&, unsigned long&) = 0; 27 virtual void getch(tchar&, CStyle&, unsigned long&) = 0;
29 virtual linkType hyperlink(unsigned int n, unsigned int noff, QString&, QString& nm) = 0; 28 virtual linkType hyperlink(unsigned int n, unsigned int noff, QString&, QString& nm) = 0;
30 virtual void locate(unsigned int n) = 0; 29 virtual void locate(unsigned int n) = 0;
31 virtual bool findanchor(const QString& nm) = 0; 30 virtual bool findanchor(const QString& nm) = 0;
32 virtual void saveposn(const QString& f, size_t posn) = 0; 31 virtual void saveposn(const QString& f, size_t posn) = 0;
33 virtual void writeposn(const QString& f, size_t posn) = 0; 32 virtual void writeposn(const QString& f, size_t posn) = 0;
34 virtual linkType forward(QString& f, size_t& loc) = 0; 33 virtual linkType forward(QString& f, size_t& loc) = 0;
35 virtual linkType back(QString& f, size_t& loc) = 0; 34 virtual linkType back(QString& f, size_t& loc) = 0;
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp
index 6f76e9a..6d94d70 100644
--- a/noncore/apps/opie-reader/CFilter.cpp
+++ b/noncore/apps/opie-reader/CFilter.cpp
@@ -1,29 +1,28 @@
1#include <qmap.h> 1#include <qmap.h>
2#include <qfileinfo.h> 2#include <qfileinfo.h>
3#include <qtextstream.h> 3#include <qtextstream.h>
4#include <qdir.h> 4#include <qdir.h>
5#include "useqpe.h"
6#ifdef USEQPE 5#ifdef USEQPE
7#include <qpe/global.h> 6#include <qpe/global.h>
8#endif 7#endif
9#include "CDrawBuffer.h" 8#include "CDrawBuffer.h"
10#include "CFilter.h" 9#include "CFilter.h"
11#include "hrule.h" 10#include "hrule.h"
12#include "util.h" 11#include "util.h"
13 12
14#include <qregexp.h> 13#include <qregexp.h>
15#include <qimage.h> 14#include <qimage.h>
16#include <qpixmap.h> 15#include <qpixmap.h>
17//#include <qprogressdialog.h> 16//#include <qprogressdialog.h>
18//#include <qapplication.h> 17//#include <qapplication.h>
19 18
20void textfmt::mygetch(tchar& ch, CStyle& sty, unsigned long& pos) 19void textfmt::mygetch(tchar& ch, CStyle& sty, unsigned long& pos)
21{ 20{
22 if (uselast) 21 if (uselast)
23 { 22 {
24 ch = lastchar; 23 ch = lastchar;
25 uselast = false; 24 uselast = false;
26 } 25 }
27 else 26 else
28 { 27 {
29 parent->getch(ch, sty, pos); 28 parent->getch(ch, sty, pos);
diff --git a/noncore/apps/opie-reader/CFilter.h b/noncore/apps/opie-reader/CFilter.h
index cec9618..174e6b4 100644
--- a/noncore/apps/opie-reader/CFilter.h
+++ b/noncore/apps/opie-reader/CFilter.h
@@ -370,49 +370,48 @@ class AddSpace : public CFilter
370 AddSpace(unsigned char s) : m_espc(s) {} 370 AddSpace(unsigned char s) : m_espc(s) {}
371 void getch(tchar& ch, CStyle& sty, unsigned long& pos) 371 void getch(tchar& ch, CStyle& sty, unsigned long& pos)
372 { 372 {
373 parent->getch(ch, sty, pos); 373 parent->getch(ch, sty, pos);
374 sty.setExtraSpace(m_espc); 374 sty.setExtraSpace(m_espc);
375 } 375 }
376}; 376};
377*/ 377*/
378 378
379class QTReader; 379class QTReader;
380 380
381class HighlightFilter : public CFilter 381class HighlightFilter : public CFilter
382{ 382{
383 QTReader* pReader; 383 QTReader* pReader;
384 unsigned long lastpos, nextpos; 384 unsigned long lastpos, nextpos;
385 unsigned char red, green, blue; 385 unsigned char red, green, blue;
386 CList<Bkmk>* bkmks; 386 CList<Bkmk>* bkmks;
387 public: 387 public:
388 HighlightFilter(QTReader*); 388 HighlightFilter(QTReader*);
389 void getch(tchar& ch, CStyle& sty, unsigned long& pos); 389 void getch(tchar& ch, CStyle& sty, unsigned long& pos);
390 void refresh(unsigned long); 390 void refresh(unsigned long);
391 QString about() { return QString("High-lighting filter (c) Tim Wentford\n")+parent->about(); } 391 QString about() { return QString("High-lighting filter (c) Tim Wentford\n")+parent->about(); }
392}; 392};
393 393
394#include "static.h"
395#ifndef __STATIC 394#ifndef __STATIC
396#include <dlfcn.h> 395#include <dlfcn.h>
397 396
398class ExternFilter : public CFilter_IFace 397class ExternFilter : public CFilter_IFace
399{ 398{
400 CFilter* filt; 399 CFilter* filt;
401 void *handle; 400 void *handle;
402 public: 401 public:
403 linkType hyperlink(unsigned int n, unsigned int noff, QString& w, QString& nm) 402 linkType hyperlink(unsigned int n, unsigned int noff, QString& w, QString& nm)
404 { 403 {
405 return filt->hyperlink(n, noff, w, nm); 404 return filt->hyperlink(n, noff, w, nm);
406 } 405 }
407 void setparent(CCharacterSource* p) { filt->setparent(p); } 406 void setparent(CCharacterSource* p) { filt->setparent(p); }
408 ExternFilter(const QString& nm, const QString& optional); 407 ExternFilter(const QString& nm, const QString& optional);
409 ~ExternFilter() 408 ~ExternFilter()
410 { 409 {
411 if (filt != NULL) delete filt; 410 if (filt != NULL) delete filt;
412 if (handle != NULL) dlclose(handle); 411 if (handle != NULL) dlclose(handle);
413 } 412 }
414 void locate(unsigned int n) { filt->locate(n); } 413 void locate(unsigned int n) { filt->locate(n); }
415 bool findanchor(const QString& nm) { return filt->findanchor(nm); } 414 bool findanchor(const QString& nm) { return filt->findanchor(nm); }
416 void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); } 415 void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); }
417 void writeposn(const QString& f, size_t posn) { filt->writeposn(f, posn); } 416 void writeposn(const QString& f, size_t posn) { filt->writeposn(f, posn); }
418 linkType forward(QString& f, size_t& loc) { return filt->forward(f, loc); } 417 linkType forward(QString& f, size_t& loc) { return filt->forward(f, loc); }
diff --git a/noncore/apps/opie-reader/CHM.cpp b/noncore/apps/opie-reader/CHM.cpp
index 9d1eb87..88d53bf 100644
--- a/noncore/apps/opie-reader/CHM.cpp
+++ b/noncore/apps/opie-reader/CHM.cpp
@@ -1,27 +1,26 @@
1#include "CHM.h" 1#include "CHM.h"
2#include "chm_lib.h" 2#include "chm_lib.h"
3#include "static.h"
4#include <qstring.h> 3#include <qstring.h>
5#include <qstringlist.h> 4#include <qstringlist.h>
6#include <stdio.h> 5#include <stdio.h>
7#include <qimage.h> 6#include <qimage.h>
8#include <qpixmap.h> 7#include <qpixmap.h>
9 8
10#ifndef __STATIC 9#ifndef __STATIC
11extern "C" 10extern "C"
12{ 11{
13 CExpander* newcodec() { return new CHM; } 12 CExpander* newcodec() { return new CHM; }
14} 13}
15#endif 14#endif
16 15
17static int _print_ui_index(struct chmFile *h, struct chmUnitInfo *ui, 16static int _print_ui_index(struct chmFile *h, struct chmUnitInfo *ui,
18 void *context) 17 void *context)
19{ 18{
20 CHM *chm = (CHM *)context; 19 CHM *chm = (CHM *)context;
21 QString temp = "<tr>"; 20 QString temp = "<tr>";
22 char buff[1024]; 21 char buff[1024];
23 sprintf( buff,"<td align=right>%8d\n</td><td><a href=\"%s\">%s</a></td></tr>",(int)ui->length, ui->path, ui->path); 22 sprintf( buff,"<td align=right>%8d\n</td><td><a href=\"%s\">%s</a></td></tr>",(int)ui->length, ui->path, ui->path);
24 temp += buff; 23 temp += buff;
25 chm->addContent(temp); 24 chm->addContent(temp);
26 return CHM_ENUMERATOR_CONTINUE; 25 return CHM_ENUMERATOR_CONTINUE;
27} 26}
diff --git a/noncore/apps/opie-reader/CHM.h b/noncore/apps/opie-reader/CHM.h
index 7dac46f..001f7fc 100644
--- a/noncore/apps/opie-reader/CHM.h
+++ b/noncore/apps/opie-reader/CHM.h
@@ -1,29 +1,28 @@
1#ifndef __CHM_h 1#ifndef __CHM_h
2#define __CHM_h 2#define __CHM_h
3#include <stdio.h> 3#include <stdio.h>
4#include <sys/stat.h> 4#include <sys/stat.h>
5#include "useqpe.h"
6#include "CExpander.h" 5#include "CExpander.h"
7#include "chm_lib.h" 6#include "chm_lib.h"
8#include "my_list.h" 7#include "my_list.h"
9#include "CExpander.h" 8#include "CExpander.h"
10 9
11struct Ref { 10struct Ref {
12 QString RefName; 11 QString RefName;
13 QString RefLoc; 12 QString RefLoc;
14 int beginpos; 13 int beginpos;
15 int endpos; 14 int endpos;
16}; 15};
17 16
18struct Pic { 17struct Pic {
19 QString RefName; 18 QString RefName;
20 QString RefLoc; 19 QString RefLoc;
21 int beginpos; 20 int beginpos;
22 int endpos; 21 int endpos;
23}; 22};
24 23
25class CHM : public CExpander 24class CHM : public CExpander
26{ 25{
27 void start2endSection(); 26 void start2endSection();
28 struct chmUnitInfo m_ui; 27 struct chmUnitInfo m_ui;
29 struct chmFile *chmFile; 28 struct chmFile *chmFile;
diff --git a/noncore/apps/opie-reader/CHM/CHM.pro b/noncore/apps/opie-reader/CHM/CHM.pro
index 6ed86f6..d3a2a28 100644
--- a/noncore/apps/opie-reader/CHM/CHM.pro
+++ b/noncore/apps/opie-reader/CHM/CHM.pro
@@ -1,18 +1,18 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = CHM.h chm_lib.h lzx.h 5 HEADERS = CHM.h chm_lib.h lzx.h
6 6
7 SOURCES = CHM.cpp chm_lib.c lzx.c 7 SOURCES = CHM.cpp chm_lib.c lzx.c
8 8
9 9
10 INTERFACES= 10 INTERFACES=
11 DESTDIR = $(OPIEDIR)/plugins/reader/codecs 11 DESTDIR = $(OPIEDIR)/plugins/reader/codecs
12 TARGET = CHM 12 TARGET = CHM
13LIBS += -lreader_codec 13LIBS += -lreader_codec
14 14
15 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 15 INCLUDEPATH+= $(OPIEDIR)/include
16 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 16 DEPENDPATH+= $(OPIEDIR)/include
17 17
18include ( $(OPIEDIR)/include.pro ) \ No newline at end of file 18include ( $(OPIEDIR)/include.pro ) \ No newline at end of file
diff --git a/noncore/apps/opie-reader/CloseDialog.h b/noncore/apps/opie-reader/CloseDialog.h
index 62e6423..54aaf1c 100644
--- a/noncore/apps/opie-reader/CloseDialog.h
+++ b/noncore/apps/opie-reader/CloseDialog.h
@@ -1,36 +1,35 @@
1/**************************************************************************** 1/****************************************************************************
2** Form interface generated from reading ui file 'Prefs.ui' 2** Form interface generated from reading ui file 'Prefs.ui'
3** 3**
4** Created: Tue Feb 11 23:53:32 2003 4** Created: Tue Feb 11 23:53:32 2003
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#ifndef __CLOSEDIALOG_H 9#ifndef __CLOSEDIALOG_H
10#define __CLOSEDIALOG_H 10#define __CLOSEDIALOG_H
11 11
12#include "useqpe.h"
13#include <qvariant.h> 12#include <qvariant.h>
14#include <qwidget.h> 13#include <qwidget.h>
15#include <qtabdialog.h> 14#include <qtabdialog.h>
16#include <qtabwidget.h> 15#include <qtabwidget.h>
17#include <qspinbox.h> 16#include <qspinbox.h>
18#include <qcheckbox.h> 17#include <qcheckbox.h>
19#include <qcombobox.h> 18#include <qcombobox.h>
20#include <qlineedit.h> 19#include <qlineedit.h>
21//#include <qpe/menubutton.h> 20//#include <qpe/menubutton.h>
22#include <qvbuttongroup.h> 21#include <qvbuttongroup.h>
23 22
24class QVBoxLayout; 23class QVBoxLayout;
25class QHBoxLayout; 24class QHBoxLayout;
26class QGridLayout; 25class QGridLayout;
27//class QCheckBox; 26//class QCheckBox;
28class QLabel; 27class QLabel;
29//class QSpinBox; 28//class QSpinBox;
30 29
31class CCloseDialog : public QDialog 30class CCloseDialog : public QDialog
32{ 31{
33Q_OBJECT 32Q_OBJECT
34 QCheckBox *file, *marks, *config; 33 QCheckBox *file, *marks, *config;
35#ifndef USEQPE 34#ifndef USEQPE
36 void keyPressEvent(QKeyEvent* e) 35 void keyPressEvent(QKeyEvent* e)
diff --git a/noncore/apps/opie-reader/FontControl.cpp b/noncore/apps/opie-reader/FontControl.cpp
index bbd9fe0..9bb3bc0 100644
--- a/noncore/apps/opie-reader/FontControl.cpp
+++ b/noncore/apps/opie-reader/FontControl.cpp
@@ -1,26 +1,25 @@
1#include <qfontdatabase.h> 1#include <qfontdatabase.h>
2#include "useqpe.h"
3#include "FontControl.h" 2#include "FontControl.h"
4 3
5int FontControl::gzoom() 4int FontControl::gzoom()
6{ 5{
7 if (m_fixgraphics) 6 if (m_fixgraphics)
8 { 7 {
9 return 100; 8 return 100;
10 } 9 }
11 else 10 else
12 { 11 {
13 int ret; 12 int ret;
14 if (m_size == g_size) 13 if (m_size == g_size)
15 { 14 {
16 ret = m_fontsizes[m_size]*m_basesize; 15 ret = m_fontsizes[m_size]*m_basesize;
17 } 16 }
18 else if (g_size < 0) 17 else if (g_size < 0)
19 { 18 {
20 int f = -g_size; 19 int f = -g_size;
21 ret = (m_fontsizes[0]*m_basesize) >> (f/2); 20 ret = (m_fontsizes[0]*m_basesize) >> (f/2);
22 if (f%2) ret = (2*ret/3); 21 if (f%2) ret = (2*ret/3);
23 } 22 }
24 else 23 else
25 { 24 {
26 int f = g_size - m_maxsize + 1; 25 int f = g_size - m_maxsize + 1;
diff --git a/noncore/apps/opie-reader/HTMLFilter/HTMLFilter.pro b/noncore/apps/opie-reader/HTMLFilter/HTMLFilter.pro
index cc049a9..8eb6f17 100644
--- a/noncore/apps/opie-reader/HTMLFilter/HTMLFilter.pro
+++ b/noncore/apps/opie-reader/HTMLFilter/HTMLFilter.pro
@@ -1,20 +1,20 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = CFilter.h \ 5 HEADERS = CFilter.h \
6 util.h 6 util.h
7 7
8 SOURCES = striphtml.cpp 8 SOURCES = striphtml.cpp
9 9
10# copy data file to install directory 10# copy data file to install directory
11QMAKE_PRE_LINK = mkdir -p $(OPIEDIR)/plugins/reader/data && cp ../HTMLentities $(OPIEDIR)/plugins/reader/data/HTMLentities 11QMAKE_PRE_LINK = mkdir -p $(OPIEDIR)/plugins/reader/data && cp ../HTMLentities $(OPIEDIR)/plugins/reader/data/HTMLentities
12 12
13 INTERFACES= 13 INTERFACES=
14 DESTDIR = $(OPIEDIR)/plugins/reader/filters 14 DESTDIR = $(OPIEDIR)/plugins/reader/filters
15 TARGET = HTMLfilter 15 TARGET = HTMLfilter
16 16
17 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 17 INCLUDEPATH+= $(OPIEDIR)/include
18 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 18 DEPENDPATH+= $(OPIEDIR)/include
19 19
20include ( $(OPIEDIR)/include.pro ) 20include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp
index c1b7b7a..c6907eb 100644
--- a/noncore/apps/opie-reader/Palm2QImage.cpp
+++ b/noncore/apps/opie-reader/Palm2QImage.cpp
@@ -1,26 +1,25 @@
1/* -*- mode: c; indent-tabs-mode: nil; -*- */ 1/* -*- mode: c; indent-tabs-mode: nil; -*- */
2#include "useqpe.h"
3#include <stdio.h> 2#include <stdio.h>
4#include <stdlib.h> 3#include <stdlib.h>
5#include <string.h> 4#include <string.h>
6#ifndef _WINDOWS 5#ifndef _WINDOWS
7#include <unistd.h> /* for link */ 6#include <unistd.h> /* for link */
8#endif 7#endif
9#include <sys/types.h> 8#include <sys/types.h>
10#include <sys/stat.h> 9#include <sys/stat.h>
11#include <stdarg.h> 10#include <stdarg.h>
12 11
13#include <qimage.h> 12#include <qimage.h>
14 13
15/***********************************************************************/ 14/***********************************************************************/
16/***********************************************************************/ 15/***********************************************************************/
17/***** *****/ 16/***** *****/
18/***** Code to decode the Palm image format to JPEG *****/ 17/***** Code to decode the Palm image format to JPEG *****/
19/***** *****/ 18/***** *****/
20/***********************************************************************/ 19/***********************************************************************/
21/***********************************************************************/ 20/***********************************************************************/
22 21
23#define READ_BIGENDIAN_SHORT(p) (((p)[0] << 8)|((p)[1])) 22#define READ_BIGENDIAN_SHORT(p) (((p)[0] << 8)|((p)[1]))
24#define READ_BIGENDIAN_LONG(p) (((p)[0] << 24)|((p)[1] << 16)|((p)[2] << 8)|((p)[3])) 23#define READ_BIGENDIAN_LONG(p) (((p)[0] << 24)|((p)[1] << 16)|((p)[2] << 8)|((p)[3]))
25 24
26#define PALM_IS_COMPRESSED_FLAG 0x8000 25#define PALM_IS_COMPRESSED_FLAG 0x8000
diff --git a/noncore/apps/opie-reader/PluckerCodec/PluckerCodec.pro b/noncore/apps/opie-reader/PluckerCodec/PluckerCodec.pro
index 6ed4032..7042542 100644
--- a/noncore/apps/opie-reader/PluckerCodec/PluckerCodec.pro
+++ b/noncore/apps/opie-reader/PluckerCodec/PluckerCodec.pro
@@ -1,18 +1,18 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = plucker.h 5 HEADERS = plucker.h
6 6
7 SOURCES = plucker.cpp \ 7 SOURCES = plucker.cpp \
8 Palm2QImage.cpp 8 Palm2QImage.cpp
9 9
10 INTERFACES= 10 INTERFACES=
11 DESTDIR = $(OPIEDIR)/plugins/reader/codecs 11 DESTDIR = $(OPIEDIR)/plugins/reader/codecs
12 TARGET = Plucker 12 TARGET = Plucker
13LIBS += -lreader_pdb -lreader_pluckerbase -lreader_codec 13LIBS += -lreader_pdb -lreader_pluckerbase -lreader_codec
14 14
15 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 15 INCLUDEPATH+= $(OPIEDIR)/include
16 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 16 DEPENDPATH+= $(OPIEDIR)/include
17 17
18include ( $(OPIEDIR)/include.pro ) 18include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp
index dfdba28..33884a0 100644
--- a/noncore/apps/opie-reader/QTReader.cpp
+++ b/noncore/apps/opie-reader/QTReader.cpp
@@ -1,37 +1,36 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2** $Id$
3** 3**
4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
5** 5**
6** This file is part of an example program for Qt. This example 6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation. 7** program may be used, distributed and modified without limitation.
8** 8**
9*****************************************************************************/ 9*****************************************************************************/
10 10
11const int _SBARHEIGHT = 3; 11const int _SBARHEIGHT = 3;
12 12
13#include "useqpe.h"
14#include <qpainter.h> 13#include <qpainter.h>
15//#include <qdirectpainter_qws.h> 14//#include <qdirectpainter_qws.h>
16#include <qimage.h> 15#include <qimage.h>
17#include <qtimer.h> 16#include <qtimer.h>
18#include "config.h" 17#include "config.h"
19#include "QTReader.h" 18#include "QTReader.h"
20//#include "QTReaderApp.h" 19//#include "QTReaderApp.h"
21#include "CDrawBuffer.h" 20#include "CDrawBuffer.h"
22#ifdef USEQPE 21#ifdef USEQPE
23#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
24#endif 23#endif
25#include <math.h> 24#include <math.h>
26#include <ctype.h> 25#include <ctype.h>
27#include <stdio.h> //for sprintf 26#include <stdio.h> //for sprintf
28#ifdef USEQPE 27#ifdef USEQPE
29#include <qpe/config.h> 28#include <qpe/config.h>
30#include <qpe/applnk.h> 29#include <qpe/applnk.h>
31#include <qpe/global.h> 30#include <qpe/global.h>
32#include <qpe/qcopenvelope_qws.h> 31#include <qpe/qcopenvelope_qws.h>
33#endif 32#endif
34#include <qfileinfo.h> 33#include <qfileinfo.h>
35#include <qdir.h> 34#include <qdir.h>
36 35
37#ifdef _UNICODE 36#ifdef _UNICODE
diff --git a/noncore/apps/opie-reader/QTReader.h b/noncore/apps/opie-reader/QTReader.h
index 7b0ebc8..3bcdde4 100644
--- a/noncore/apps/opie-reader/QTReader.h
+++ b/noncore/apps/opie-reader/QTReader.h
@@ -1,29 +1,28 @@
1#ifndef __QTREADER_H 1#ifndef __QTREADER_H
2#define __QTREADER_H 2#define __QTREADER_H
3 3
4//#define _SCROLLPIPE 4//#define _SCROLLPIPE
5#include "static.h"
6#include <qwidget.h> 5#include <qwidget.h>
7//#include <qpainter.h> 6//#include <qpainter.h>
8#include "my_list.h" 7#include "my_list.h"
9#include "BuffDoc.h" 8#include "BuffDoc.h"
10#include "FontControl.h" 9#include "FontControl.h"
11 10
12//#include <qtimer.h> 11//#include <qtimer.h>
13 12
14class CDrawBuffer; 13class CDrawBuffer;
15//class CBuffer; 14//class CBuffer;
16#include <qpixmap.h> 15#include <qpixmap.h>
17class QPainter; 16class QPainter;
18class QTimer; 17class QTimer;
19class QImage; 18class QImage;
20 19
21#include "BGType.h" 20#include "BGType.h"
22#include "striphtml.h" 21#include "striphtml.h"
23 22
24#define ROTATION_ENABLED 23#define ROTATION_ENABLED
25#define SPECIALSCROLL 24#define SPECIALSCROLL
26#define DOUBLEBUFFER 25#define DOUBLEBUFFER
27#ifdef DOUBLEBUFFER 26#ifdef DOUBLEBUFFER
28class QPainter; 27class QPainter;
29#endif 28#endif
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index ec7a29c..876b65a 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -1,44 +1,43 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. Allrights reserved. 2** Copyright (C) 2000 Trolltech AS. Allrights reserved.
3** 3**
4** This file is part of Qt Palmtop Environment. 4** This file is part of Qt Palmtop Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "useqpe.h"
21#include <qregexp.h> 20#include <qregexp.h>
22#include <qclipboard.h> 21#include <qclipboard.h>
23#include <qwidgetstack.h> 22#include <qwidgetstack.h>
24#ifdef USEQPE 23#ifdef USEQPE
25#include <qpe/qpemenubar.h> 24#include <qpe/qpemenubar.h>
26#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
27#endif 26#endif
28#include <qmenubar.h> 27#include <qmenubar.h>
29#include <qtoolbar.h> 28#include <qtoolbar.h>
30#ifdef USEQPE 29#ifdef USEQPE
31#include <qpe/menubutton.h> 30#include <qpe/menubutton.h>
32#endif 31#endif
33#include <qcombobox.h> 32#include <qcombobox.h>
34#include <qpopupmenu.h> 33#include <qpopupmenu.h>
35#include <qaction.h> 34#include <qaction.h>
36#include <qapplication.h> 35#include <qapplication.h>
37#include <qlineedit.h> 36#include <qlineedit.h>
38#include <qtoolbutton.h> 37#include <qtoolbutton.h>
39#include <qspinbox.h> 38#include <qspinbox.h>
40#include <qobjectlist.h> 39#include <qobjectlist.h>
41#include <qstatusbar.h> 40#include <qstatusbar.h>
42#ifdef USEQPE 41#ifdef USEQPE
43#include <qpe/global.h> 42#include <qpe/global.h>
44#include <qpe/applnk.h> 43#include <qpe/applnk.h>
@@ -62,49 +61,48 @@
62#include "ToolbarPrefs.h" 61#include "ToolbarPrefs.h"
63#include "Prefs.h" 62#include "Prefs.h"
64#include "CAnnoEdit.h" 63#include "CAnnoEdit.h"
65#include "QFloatBar.h" 64#include "QFloatBar.h"
66#include "FixedFont.h" 65#include "FixedFont.h"
67#include "URLDialog.h" 66#include "URLDialog.h"
68#include "util.h" 67#include "util.h"
69#include <qfontdatabase.h> 68#include <qfontdatabase.h>
70#ifdef USEQPE 69#ifdef USEQPE
71#include <qpe/resource.h> 70#include <qpe/resource.h>
72#ifdef OPIE 71#ifdef OPIE
73//#include <qpe/applnk.h> 72//#include <qpe/applnk.h>
74#include <opie2/ofiledialog.h> 73#include <opie2/ofiledialog.h>
75using namespace Opie::Ui; 74using namespace Opie::Ui;
76#else 75#else
77#include "fileBrowser.h" 76#include "fileBrowser.h"
78#endif 77#endif
79#else 78#else
80#include "qfiledialog.h" 79#include "qfiledialog.h"
81#endif 80#endif
82 81
83#include "QTReaderApp.h" 82#include "QTReaderApp.h"
84#include "CDrawBuffer.h" 83#include "CDrawBuffer.h"
85#include "Filedata.h" 84#include "Filedata.h"
86#include "useqpe.h"
87#include "names.h" 85#include "names.h"
88#include "CEncoding_tables.h" 86#include "CEncoding_tables.h"
89#include "CloseDialog.h" 87#include "CloseDialog.h"
90 88
91#include "ButtonPrefs.h" 89#include "ButtonPrefs.h"
92 90
93bool CheckVersion(int&, int&, char&); 91bool CheckVersion(int&, int&, char&);
94 92
95#ifdef _WINDOWS 93#ifdef _WINDOWS
96#define PICDIR "c:\\uqtreader\\pics\\" 94#define PICDIR "c:\\uqtreader\\pics\\"
97#else 95#else
98#ifdef USEQPE 96#ifdef USEQPE
99#define USEMSGS 97#define USEMSGS
100#define PICDIR "opie-reader/" 98#define PICDIR "opie-reader/"
101#else 99#else
102//#define PICDIR "/home/tim/uqtreader/pics/" 100//#define PICDIR "/home/tim/uqtreader/pics/"
103QString picdir() 101QString picdir()
104{ 102{
105 QString hd(getenv("READERDIR")); 103 QString hd(getenv("READERDIR"));
106 return hd + "/pics"; 104 return hd + "/pics";
107} 105}
108#define PICDIR picdir() 106#define PICDIR picdir()
109#endif 107#endif
110#endif 108#endif
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h
index 5ecc42d..ad47fc9 100644
--- a/noncore/apps/opie-reader/QTReaderApp.h
+++ b/noncore/apps/opie-reader/QTReaderApp.h
@@ -5,49 +5,48 @@
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef __QTREADERAPP_H 20#ifndef __QTREADERAPP_H
21#define __QTREADERAPP_H 21#define __QTREADERAPP_H
22 22
23//#define _SCROLLPIPE 23//#define _SCROLLPIPE
24//#define __ISEARCH 24//#define __ISEARCH
25 25
26//#define MAX_ENCODING 6 26//#define MAX_ENCODING 6
27#define MAX_ACTIONS 5 27#define MAX_ACTIONS 5
28 28
29#include "useqpe.h"
30#include <sys/timeb.h> 29#include <sys/timeb.h>
31#include <qmainwindow.h> 30#include <qmainwindow.h>
32#include "CExpander.h" 31#include "CExpander.h"
33#include "CEncoding.h" 32#include "CEncoding.h"
34#include <qlist.h> 33#include <qlist.h>
35//#include <qpe/filemanager.h> 34//#include <qpe/filemanager.h>
36#include <qmap.h> 35#include <qmap.h>
37#include <qlineedit.h> 36#include <qlineedit.h>
38#include <qstack.h> 37#include <qstack.h>
39#include <qlistbox.h> 38#include <qlistbox.h>
40#ifdef USEQPE 39#ifdef USEQPE
41#include <qpe/qpeapplication.h> 40#include <qpe/qpeapplication.h>
42#endif 41#endif
43#include "orkey.h" 42#include "orkey.h"
44//#include "Queue.h" 43//#include "Queue.h"
45#include "BGType.h" 44#include "BGType.h"
46 45
47class QBoxLayout; 46class QBoxLayout;
48class QWidgetStack; 47class QWidgetStack;
49class QToolButton; 48class QToolButton;
50class QPopupMenu; 49class QPopupMenu;
51class QToolBar; 50class QToolBar;
52#ifdef USEQPE 51#ifdef USEQPE
53class QPEToolBar; 52class QPEToolBar;
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.cpp b/noncore/apps/opie-reader/ToolbarPrefs.cpp
index 5cf220a..56c4e9b 100644
--- a/noncore/apps/opie-reader/ToolbarPrefs.cpp
+++ b/noncore/apps/opie-reader/ToolbarPrefs.cpp
@@ -1,33 +1,32 @@
1/**************************************************************************** 1/****************************************************************************
2** Form implementation generated from reading ui file 'Prefs.ui' 2** Form implementation generated from reading ui file 'Prefs.ui'
3** 3**
4** Created: Tue Feb 11 23:53:35 2003 4** Created: Tue Feb 11 23:53:35 2003
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#include "useqpe.h"
10#include "ToolbarPrefs.h" 9#include "ToolbarPrefs.h"
11 10
12#include <qcheckbox.h> 11#include <qcheckbox.h>
13#include <qlabel.h> 12#include <qlabel.h>
14#include <qpushbutton.h> 13#include <qpushbutton.h>
15#include <qspinbox.h> 14#include <qspinbox.h>
16#include <qlayout.h> 15#include <qlayout.h>
17#include <qvariant.h> 16#include <qvariant.h>
18#include <qtooltip.h> 17#include <qtooltip.h>
19#include <qwhatsthis.h> 18#include <qwhatsthis.h>
20#include <qcombobox.h> 19#include <qcombobox.h>
21#include <qbuttongroup.h> 20#include <qbuttongroup.h>
22#include <qlineedit.h> 21#include <qlineedit.h>
23#ifdef USEQPE 22#ifdef USEQPE
24#include <qpe/menubutton.h> 23#include <qpe/menubutton.h>
25#endif 24#endif
26 25
27CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) 26CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir )
28{ 27{
29 setCaption(tr( "Toolbar Settings" ) ); 28 setCaption(tr( "Toolbar Settings" ) );
30 QTabWidget* td = new QTabWidget(this); 29 QTabWidget* td = new QTabWidget(this);
31 misc = new CMiscBarPrefs(this); 30 misc = new CMiscBarPrefs(this);
32 filebar = new CFileBarPrefs(config, this); 31 filebar = new CFileBarPrefs(config, this);
33 navbar = new CNavBarPrefs(config, this); 32 navbar = new CNavBarPrefs(config, this);
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.h b/noncore/apps/opie-reader/ToolbarPrefs.h
index a2686e5..0bdae6b 100644
--- a/noncore/apps/opie-reader/ToolbarPrefs.h
+++ b/noncore/apps/opie-reader/ToolbarPrefs.h
@@ -1,50 +1,48 @@
1/**************************************************************************** 1/****************************************************************************
2 ** Form interface generated from reading ui file 'Prefs.ui' 2 ** Form interface generated from reading ui file 'Prefs.ui'
3 ** 3 **
4 ** Created: Tue Feb 11 23:53:32 2003 4 ** Created: Tue Feb 11 23:53:32 2003
5 ** by: The User Interface Compiler (uic) 5 ** by: The User Interface Compiler (uic)
6 ** 6 **
7 ** WARNING! All changes made in this file will be lost! 7 ** WARNING! All changes made in this file will be lost!
8 ****************************************************************************/ 8 ****************************************************************************/
9#ifndef CTOOLBARPREFS_H 9#ifndef CTOOLBARPREFS_H
10#define CTOOLBARPREFS_H 10#define CTOOLBARPREFS_H
11#include "useqpe.h"
12#include <qvariant.h> 11#include <qvariant.h>
13#include <qwidget.h> 12#include <qwidget.h>
14#include <qtabdialog.h> 13#include <qtabdialog.h>
15#include <qtabwidget.h> 14#include <qtabwidget.h>
16#include <qspinbox.h> 15#include <qspinbox.h>
17#include <qcheckbox.h> 16#include <qcheckbox.h>
18#include <qcombobox.h> 17#include <qcombobox.h>
19#include <qlineedit.h> 18#include <qlineedit.h>
20#ifdef USEQPE 19#ifdef USEQPE
21#include <qpe/menubutton.h> 20#include <qpe/menubutton.h>
22#include <qpe/config.h> 21#include <qpe/config.h>
23#else 22#else
24#include "preferences.h" 23#include "preferences.h"
25#endif 24#endif
26//#include "opie.h"
27//#ifdef OPIE 25//#ifdef OPIE
28#define USECOMBO 26#define USECOMBO
29//#endif 27//#endif
30 28
31class QVBoxLayout; 29class QVBoxLayout;
32class QHBoxLayout; 30class QHBoxLayout;
33class QGridLayout; 31class QGridLayout;
34//class QCheckBox; 32//class QCheckBox;
35class QLabel; 33class QLabel;
36//class QSpinBox; 34//class QSpinBox;
37/* 35/*
38class CBarPrefs1 : public QWidget 36class CBarPrefs1 : public QWidget
39{ 37{
40 Q_OBJECT 38 Q_OBJECT
41 39
42 Config& config; 40 Config& config;
43 QCheckBox *open, *close, *info, *twotouch,*find,*scroll,*navigation,*page,*startend,*jump,*pageline; 41 QCheckBox *open, *close, *info, *twotouch,*find,*scroll,*navigation,*page,*startend,*jump,*pageline;
44 42
45 bool m_isChanged; 43 bool m_isChanged;
46 44
47 private slots: 45 private slots:
48 void isChanged(int _v) { m_isChanged = true; } 46 void isChanged(int _v) { m_isChanged = true; }
49 47
50 public: 48 public:
diff --git a/noncore/apps/opie-reader/URLDialog.h b/noncore/apps/opie-reader/URLDialog.h
index 1bcc4bd..792d13a 100644
--- a/noncore/apps/opie-reader/URLDialog.h
+++ b/noncore/apps/opie-reader/URLDialog.h
@@ -1,36 +1,35 @@
1/**************************************************************************** 1/****************************************************************************
2** Form interface generated from reading ui file 'Prefs.ui' 2** Form interface generated from reading ui file 'Prefs.ui'
3** 3**
4** Created: Tue Feb 11 23:53:32 2003 4** Created: Tue Feb 11 23:53:32 2003
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#ifndef __URLDIALOG_H 9#ifndef __URLDIALOG_H
10#define __URLDIALOG_H 10#define __URLDIALOG_H
11 11
12#include "useqpe.h"
13#include <qvariant.h> 12#include <qvariant.h>
14#include <qwidget.h> 13#include <qwidget.h>
15#include <qtabdialog.h> 14#include <qtabdialog.h>
16#include <qtabwidget.h> 15#include <qtabwidget.h>
17#include <qspinbox.h> 16#include <qspinbox.h>
18#include <qcheckbox.h> 17#include <qcheckbox.h>
19#include <qcombobox.h> 18#include <qcombobox.h>
20#include <qlineedit.h> 19#include <qlineedit.h>
21//#include <qpe/menubutton.h> 20//#include <qpe/menubutton.h>
22#include <qvbuttongroup.h> 21#include <qvbuttongroup.h>
23 22
24class QVBoxLayout; 23class QVBoxLayout;
25class QHBoxLayout; 24class QHBoxLayout;
26class QGridLayout; 25class QGridLayout;
27//class QCheckBox; 26//class QCheckBox;
28class QLabel; 27class QLabel;
29//class QSpinBox; 28//class QSpinBox;
30 29
31class CURLDialog : public QDialog 30class CURLDialog : public QDialog
32{ 31{
33Q_OBJECT 32Q_OBJECT
34 QCheckBox *m_localfile, *m_globalfile, *m_clipboard; 33 QCheckBox *m_localfile, *m_globalfile, *m_clipboard;
35#ifndef USEQPE 34#ifndef USEQPE
36 void keyPressEvent(QKeyEvent* e) 35 void keyPressEvent(QKeyEvent* e)
diff --git a/noncore/apps/opie-reader/WeaselCodec/WeaselCodec.pro b/noncore/apps/opie-reader/WeaselCodec/WeaselCodec.pro
index 61e7dc9..f20bdc6 100644
--- a/noncore/apps/opie-reader/WeaselCodec/WeaselCodec.pro
+++ b/noncore/apps/opie-reader/WeaselCodec/WeaselCodec.pro
@@ -1,17 +1,17 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = ztxt.h 5 HEADERS = ztxt.h
6 6
7 SOURCES = ztxt.cpp 7 SOURCES = ztxt.cpp
8 8
9 INTERFACES= 9 INTERFACES=
10 DESTDIR = $(OPIEDIR)/plugins/reader/codecs 10 DESTDIR = $(OPIEDIR)/plugins/reader/codecs
11 TARGET = Weasel 11 TARGET = Weasel
12LIBS += -lreader_pdb -lreader_codec 12LIBS += -lreader_pdb -lreader_codec
13 13
14 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 14 INCLUDEPATH+= $(OPIEDIR)/include
15 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 15 DEPENDPATH+= $(OPIEDIR)/include
16 16
17include ( $(OPIEDIR)/include.pro ) 17include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/ZText.h b/noncore/apps/opie-reader/ZText.h
index 06e3bf8..199c7da 100644
--- a/noncore/apps/opie-reader/ZText.h
+++ b/noncore/apps/opie-reader/ZText.h
@@ -1,30 +1,29 @@
1#ifndef __Text_h 1#ifndef __Text_h
2#define __Text_h 2#define __Text_h
3#include <stdio.h> 3#include <stdio.h>
4#include <zlib.h> 4#include <zlib.h>
5#include <sys/stat.h> 5#include <sys/stat.h>
6#include "useqpe.h"
7#include "CExpander.h" 6#include "CExpander.h"
8 7
9class Text: public CExpander { 8class Text: public CExpander {
10 gzFile file; 9 gzFile file;
11 unsigned long fsize; 10 unsigned long fsize;
12public: 11public:
13 void suspend() 12 void suspend()
14 { 13 {
15#ifdef USEQPE 14#ifdef USEQPE
16 if (!bSuspended) 15 if (!bSuspended)
17 { 16 {
18 bSuspended = true; 17 bSuspended = true;
19 suspos = gztell(file); 18 suspos = gztell(file);
20 gzclose(file); 19 gzclose(file);
21 file = NULL; 20 file = NULL;
22 sustime = time(NULL); 21 sustime = time(NULL);
23 } 22 }
24#endif 23#endif
25 } 24 }
26 void unsuspend() 25 void unsuspend()
27 { 26 {
28#ifdef USEQPE 27#ifdef USEQPE
29 if (bSuspended) 28 if (bSuspended)
30 { 29 {
diff --git a/noncore/apps/opie-reader/codeclib/codeclib.pro b/noncore/apps/opie-reader/codeclib/codeclib.pro
index 6adcda8..c24767b 100644
--- a/noncore/apps/opie-reader/codeclib/codeclib.pro
+++ b/noncore/apps/opie-reader/codeclib/codeclib.pro
@@ -1,17 +1,17 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = pdb.h 5 HEADERS = pdb.h
6 6
7 SOURCES = CExpander.cpp CBuffer.cpp StyleConsts.cpp \ 7 SOURCES = CExpander.cpp CBuffer.cpp StyleConsts.cpp \
8 hrule.cpp Navigation.cpp Bkmks.cpp 8 hrule.cpp Navigation.cpp Bkmks.cpp
9 9
10 INTERFACES= 10 INTERFACES=
11 DESTDIR = $(OPIEDIR)/lib 11 DESTDIR = $(OPIEDIR)/lib
12 TARGET = reader_codec 12 TARGET = reader_codec
13 13
14 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 14 INCLUDEPATH+= $(OPIEDIR)/include
15 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 15 DEPENDPATH+= $(OPIEDIR)/include
16 16
17include ( $(OPIEDIR)/include.pro ) 17include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/ebookcodec.h b/noncore/apps/opie-reader/ebookcodec.h
index b341e55..f6e2daf 100644
--- a/noncore/apps/opie-reader/ebookcodec.h
+++ b/noncore/apps/opie-reader/ebookcodec.h
@@ -1,37 +1,35 @@
1#include "CExpander.h" 1#include "CExpander.h"
2 2
3#include <qfileinfo.h> 3#include <qfileinfo.h>
4#include <qdir.h> 4#include <qdir.h>
5 5
6#include "useqpe.h"
7#ifdef USEQPE 6#ifdef USEQPE
8#include <qpe/global.h> 7#include <qpe/global.h>
9#endif 8#endif
10 9
11#include "util.h" 10#include "util.h"
12 11
13#include "static.h"
14#ifndef __STATIC 12#ifndef __STATIC
15#include <dlfcn.h> 13#include <dlfcn.h>
16class ebookcodec : public CExpander_Interface 14class ebookcodec : public CExpander_Interface
17{ 15{
18 CExpander *codec; 16 CExpander *codec;
19 void *handle; 17 void *handle;
20 int status; 18 int status;
21 public: 19 public:
22 QString about() 20 QString about()
23 { 21 {
24 return QString("Plug-in ebook codec interface (c) Tim Wentford\n")+codec->about(); 22 return QString("Plug-in ebook codec interface (c) Tim Wentford\n")+codec->about();
25 } 23 }
26 ebookcodec(const QString& _s) : codec(NULL), handle(NULL), status(0) 24 ebookcodec(const QString& _s) : codec(NULL), handle(NULL), status(0)
27 { 25 {
28 QString codecpath(QTReaderUtil::getPluginPath()); 26 QString codecpath(QTReaderUtil::getPluginPath());
29 codecpath += _s; 27 codecpath += _s;
30 if (QFile::exists(codecpath)) 28 if (QFile::exists(codecpath))
31 { 29 {
32 qDebug("Codec:%s", (const char*)codecpath); 30 qDebug("Codec:%s", (const char*)codecpath);
33 handle = dlopen(codecpath, RTLD_LAZY); 31 handle = dlopen(codecpath, RTLD_LAZY);
34 if (handle == 0) 32 if (handle == 0)
35 { 33 {
36 /* 34 /*
37 QString wrn(dlerror()); 35 QString wrn(dlerror());
diff --git a/noncore/apps/opie-reader/iSiloCodec/iSiloCodec.pro b/noncore/apps/opie-reader/iSiloCodec/iSiloCodec.pro
index 78d5a49..5cf075e 100644
--- a/noncore/apps/opie-reader/iSiloCodec/iSiloCodec.pro
+++ b/noncore/apps/opie-reader/iSiloCodec/iSiloCodec.pro
@@ -1,19 +1,19 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 #HEADERS = Aportis.h 5 #HEADERS = Aportis.h
6 6
7 SOURCES = iSilo.cpp 7 SOURCES = iSilo.cpp
8 8
9 9
10 INTERFACES= 10 INTERFACES=
11 DESTDIR = $(OPIEDIR)/plugins/reader/codecs 11 DESTDIR = $(OPIEDIR)/plugins/reader/codecs
12 TARGET = iSilo 12 TARGET = iSilo
13LIBS += -lreader_pdb -lreader_codec 13LIBS += -lreader_pdb -lreader_codec
14 14
15 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 15 INCLUDEPATH+= $(OPIEDIR)/include
16 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 16 DEPENDPATH+= $(OPIEDIR)/include
17 17
18include ( $(OPIEDIR)/include.pro ) 18include ( $(OPIEDIR)/include.pro )
19 19
diff --git a/noncore/apps/opie-reader/main.cpp b/noncore/apps/opie-reader/main.cpp
index 3e1f5e7..af276da 100644
--- a/noncore/apps/opie-reader/main.cpp
+++ b/noncore/apps/opie-reader/main.cpp
@@ -1,25 +1,24 @@
1#include "useqpe.h"
2#ifdef USEQPE 1#ifdef USEQPE
3#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
4#else 3#else
5#include <qapplication.h> 4#include <qapplication.h>
6#endif 5#endif
7#include "QTReaderApp.h" 6#include "QTReaderApp.h"
8 7
9#include "signal.h" 8#include "signal.h"
10#include "stdio.h" 9#include "stdio.h"
11#include "time.h" 10#include "time.h"
12 11
13 12
14#ifdef USEQPE 13#ifdef USEQPE
15QTReaderApp* app = NULL; 14QTReaderApp* app = NULL;
16 15
17void handler(int signum) 16void handler(int signum)
18{ 17{
19 if (app != NULL) 18 if (app != NULL)
20 { 19 {
21 app->suspend(); 20 app->suspend();
22 app->saveprefs(); 21 app->saveprefs();
23 } 22 }
24 signal(signum, handler); 23 signal(signum, handler);
25} 24}
diff --git a/noncore/apps/opie-reader/pdb.cpp b/noncore/apps/opie-reader/pdb.cpp
index 39551cc..6719af4 100644
--- a/noncore/apps/opie-reader/pdb.cpp
+++ b/noncore/apps/opie-reader/pdb.cpp
@@ -1,30 +1,29 @@
1#include "pdb.h" 1#include "pdb.h"
2#ifdef _WINDOWS 2#ifdef _WINDOWS
3#include <winsock2.h> 3#include <winsock2.h>
4#endif 4#endif
5 5
6#include "useqpe.h"
7 6
8#ifdef USEQPE 7#ifdef USEQPE
9void Cpdb::suspend() 8void Cpdb::suspend()
10{ 9{
11 CExpander::suspend(fin); 10 CExpander::suspend(fin);
12} 11}
13void Cpdb::unsuspend() 12void Cpdb::unsuspend()
14{ 13{
15 CExpander::unsuspend(fin); 14 CExpander::unsuspend(fin);
16} 15}
17#endif 16#endif
18 17
19Cpdb::~Cpdb() 18Cpdb::~Cpdb()
20{ 19{
21 if (fin != NULL) 20 if (fin != NULL)
22 { 21 {
23#ifdef USEQPE 22#ifdef USEQPE
24 unsuspend(); 23 unsuspend();
25#endif 24#endif
26 fclose(fin); 25 fclose(fin);
27 } 26 }
28} 27}
29 28
30size_t Cpdb::recordpos(int n) 29size_t Cpdb::recordpos(int n)
diff --git a/noncore/apps/opie-reader/pdb.h b/noncore/apps/opie-reader/pdb.h
index 7a6580d..7458919 100644
--- a/noncore/apps/opie-reader/pdb.h
+++ b/noncore/apps/opie-reader/pdb.h
@@ -1,42 +1,41 @@
1 1
2/* 2/*
3 * This header file defines some structures and types normally found in the 3 * This header file defines some structures and types normally found in the
4 * Palm SDK. However, I don't want to require the presense of the SDK for a 4 * Palm SDK. However, I don't want to require the presense of the SDK for a
5 * small utility since most Palm owners won't have it. 5 * small utility since most Palm owners won't have it.
6 * 6 *
7 * $Id$ 7 * $Id$
8 * 8 *
9 */ 9 */
10 10
11#ifndef __PDB_H__ 11#ifndef __PDB_H__
12#define __PDB_H__ 12#define __PDB_H__
13 13
14#ifndef _WINDOWS 14#ifndef _WINDOWS
15#include <netinet/in.h> 15#include <netinet/in.h>
16#endif 16#endif
17#include <stdio.h> 17#include <stdio.h>
18#include "useqpe.h"
19#include "CExpander.h" 18#include "CExpander.h"
20 19
21/* Normal Palm typedefs */ 20/* Normal Palm typedefs */
22typedef unsigned char UInt8; 21typedef unsigned char UInt8;
23typedef unsigned short UInt16; 22typedef unsigned short UInt16;
24typedef signed short Int16; 23typedef signed short Int16;
25typedef unsigned long UInt32; 24typedef unsigned long UInt32;
26typedef UInt32 LocalID; 25typedef UInt32 LocalID;
27 26
28/* Max length of DB name */ 27/* Max length of DB name */
29#define dmDBNameLength 0x20 28#define dmDBNameLength 0x20
30 29
31 30
32/************************************************************ 31/************************************************************
33 * Structure of a Record entry 32 * Structure of a Record entry
34 *************************************************************/ 33 *************************************************************/
35typedef struct { 34typedef struct {
36 LocalID localChunkID; // local chunkID of a record 35 LocalID localChunkID; // local chunkID of a record
37 UInt8 attributes; // record attributes; 36 UInt8 attributes; // record attributes;
38 UInt8 uniqueID[3]; // unique ID of record; should 37 UInt8 uniqueID[3]; // unique ID of record; should
39 // not be 0 for a legal record. 38 // not be 0 for a legal record.
40} RecordEntryType; 39} RecordEntryType;
41 40
42 41
diff --git a/noncore/apps/opie-reader/pdblib/pdblib.pro b/noncore/apps/opie-reader/pdblib/pdblib.pro
index cb861a8..830d988 100644
--- a/noncore/apps/opie-reader/pdblib/pdblib.pro
+++ b/noncore/apps/opie-reader/pdblib/pdblib.pro
@@ -1,16 +1,16 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = pdb.h 5 HEADERS = pdb.h
6 6
7 SOURCES = pdb.cpp 7 SOURCES = pdb.cpp
8 8
9 INTERFACES= 9 INTERFACES=
10 DESTDIR = $(OPIEDIR)/lib 10 DESTDIR = $(OPIEDIR)/lib
11 TARGET = reader_pdb 11 TARGET = reader_pdb
12 12
13 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 13 INCLUDEPATH+= $(OPIEDIR)/include
14 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 14 DEPENDPATH+= $(OPIEDIR)/include
15 15
16include ( $(OPIEDIR)/include.pro ) 16include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/plucker.cpp b/noncore/apps/opie-reader/plucker.cpp
index d1ccd6f..4ea807a 100644
--- a/noncore/apps/opie-reader/plucker.cpp
+++ b/noncore/apps/opie-reader/plucker.cpp
@@ -1,47 +1,45 @@
1#include "useqpe.h"
2#include <stdio.h> 1#include <stdio.h>
3#include <string.h> 2#include <string.h>
4#include <qmessagebox.h> 3#include <qmessagebox.h>
5#include <qpixmap.h> 4#include <qpixmap.h>
6#ifdef USEQPE 5#ifdef USEQPE
7#include <qpe/qcopenvelope_qws.h> 6#include <qpe/qcopenvelope_qws.h>
8#endif 7#endif
9#ifdef LOCALPICTURES 8#ifdef LOCALPICTURES
10#include <qscrollview.h> 9#include <qscrollview.h>
11#endif 10#endif
12#ifdef USEQPE 11#ifdef USEQPE
13#include <qpe/global.h> 12#include <qpe/global.h>
14#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
15#else 14#else
16#include <qapplication.h> 15#include <qapplication.h>
17#endif 16#endif
18#include <qclipboard.h> 17#include <qclipboard.h>
19 18
20#include "plucker.h" 19#include "plucker.h"
21#include "Aportis.h" 20#include "Aportis.h"
22#include "Palm2QImage.h" 21#include "Palm2QImage.h"
23#include "static.h"
24 22
25 23
26struct CPlucker_dataRecord 24struct CPlucker_dataRecord
27{ 25{
28 UInt16 uid; 26 UInt16 uid;
29 UInt16 nParagraphs; 27 UInt16 nParagraphs;
30 UInt16 size; 28 UInt16 size;
31 UInt8 type; 29 UInt8 type;
32 UInt8 reserved; 30 UInt8 reserved;
33}; 31};
34 32
35int CPlucker::HeaderSize() 33int CPlucker::HeaderSize()
36{ 34{
37 return sizeof(CPlucker_dataRecord); 35 return sizeof(CPlucker_dataRecord);
38} 36}
39 37
40void CPlucker::GetHeader(UInt16& uid, UInt16& nParagraphs, UInt32& size, UInt8& type, UInt8& reserved) 38void CPlucker::GetHeader(UInt16& uid, UInt16& nParagraphs, UInt32& size, UInt8& type, UInt8& reserved)
41{ 39{
42 CPlucker_dataRecord thishdr; 40 CPlucker_dataRecord thishdr;
43 fread(&thishdr, 1, HeaderSize(), fin); 41 fread(&thishdr, 1, HeaderSize(), fin);
44 uid = ntohs(thishdr.uid); 42 uid = ntohs(thishdr.uid);
45 nParagraphs = ntohs(thishdr.nParagraphs); 43 nParagraphs = ntohs(thishdr.nParagraphs);
46 size = ntohs(thishdr.size); 44 size = ntohs(thishdr.size);
47 type = thishdr.type; 45 type = thishdr.type;
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp
index 0b7fae8..d7d538f 100644
--- a/noncore/apps/opie-reader/plucker_base.cpp
+++ b/noncore/apps/opie-reader/plucker_base.cpp
@@ -1,48 +1,46 @@
1#include "useqpe.h"
2#include "usenef.h" 1#include "usenef.h"
3#include <stdio.h> 2#include <stdio.h>
4#include <string.h> 3#include <string.h>
5#include <qmessagebox.h> 4#include <qmessagebox.h>
6#include <qpixmap.h> 5#include <qpixmap.h>
7#ifdef USEQPE 6#ifdef USEQPE
8#include <qpe/qcopenvelope_qws.h> 7#include <qpe/qcopenvelope_qws.h>
9#endif /* USEQPE */ 8#endif /* USEQPE */
10#ifdef LOCALPICTURES 9#ifdef LOCALPICTURES
11#include <qscrollview.h> 10#include <qscrollview.h>
12#endif 11#endif
13#ifdef USEQPE 12#ifdef USEQPE
14#include <qpe/global.h> 13#include <qpe/global.h>
15#endif /* USEQPE */ 14#endif /* USEQPE */
16#include <qclipboard.h> 15#include <qclipboard.h>
17#ifndef USEQPE 16#ifndef USEQPE
18#include <qapplication.h> 17#include <qapplication.h>
19#else /* USEQPE */ 18#else /* USEQPE */
20#include <qpe/qpeapplication.h> 19#include <qpe/qpeapplication.h>
21#endif /* USEQPE */ 20#endif /* USEQPE */
22#include <qimage.h> 21#include <qimage.h>
23 22
24#include "static.h"
25#include "plucker_base.h" 23#include "plucker_base.h"
26#include "Aportis.h" 24#include "Aportis.h"
27#include "hrule.h" 25#include "hrule.h"
28#include "util.h" 26#include "util.h"
29 27
30const UInt8 CPlucker_base::continuation_bit = 1; 28const UInt8 CPlucker_base::continuation_bit = 1;
31 29
32CPlucker_base::CPlucker_base() : 30CPlucker_base::CPlucker_base() :
33#ifdef LOCALPICTURES 31#ifdef LOCALPICTURES
34 m_viewer(NULL), 32 m_viewer(NULL),
35 m_picture(NULL), 33 m_picture(NULL),
36#endif 34#endif
37 expandedtextbuffer(NULL), 35 expandedtextbuffer(NULL),
38 compressedtextbuffer(NULL), 36 compressedtextbuffer(NULL),
39 bufferrec(-1), 37 bufferrec(-1),
40 m_offset(0) 38 m_offset(0)
41 //, urls(NULL) 39 //, urls(NULL)
42{ /*printf("constructing:%x\n",fin);*/ } 40{ /*printf("constructing:%x\n",fin);*/ }
43 41
44 42
45void CPlucker_base::Expand(UInt32 reclen, UInt8 type, UInt8* buffer, UInt32 buffersize) 43void CPlucker_base::Expand(UInt32 reclen, UInt8 type, UInt8* buffer, UInt32 buffersize)
46{ 44{
47 if (type%2 == 0) 45 if (type%2 == 0)
48 { 46 {
@@ -1338,49 +1336,48 @@ tchar CPlucker_base::getch_base(bool fast)
1338 int skip = ch & 7; 1336 int skip = ch & 7;
1339 for (int i = 0; i < skip; i++) 1337 for (int i = 0; i < skip; i++)
1340 { 1338 {
1341 ch = bgetch(); 1339 ch = bgetch();
1342 //qDebug("Arg %d, %d", i, ch); 1340 //qDebug("Arg %d, %d", i, ch);
1343 } 1341 }
1344 ch = bgetch(); 1342 ch = bgetch();
1345 } 1343 }
1346 } 1344 }
1347 } 1345 }
1348 1346
1349 if (m_lastIsBreak && !mystyle.isMono()) 1347 if (m_lastIsBreak && !mystyle.isMono())
1350 { 1348 {
1351 while (ch == ' ') 1349 while (ch == ' ')
1352 { 1350 {
1353 ch = getch(false); 1351 ch = getch(false);
1354 } 1352 }
1355 } 1353 }
1356 1354
1357 m_lastIsBreak = (ch == 10); 1355 m_lastIsBreak = (ch == 10);
1358 1356
1359 return (ch == EOF) ? UEOF : ch; 1357 return (ch == EOF) ? UEOF : ch;
1360} 1358}
1361 1359
1362#include "static.h"
1363#if defined(__STATIC) && defined(USENEF) 1360#if defined(__STATIC) && defined(USENEF)
1364#include "Model.h" 1361#include "Model.h"
1365void (*CPlucker_base::getdecompressor(const QString& _s))(UInt8*, size_t, UInt8*, size_t) 1362void (*CPlucker_base::getdecompressor(const QString& _s))(UInt8*, size_t, UInt8*, size_t)
1366{ 1363{
1367 if (_s == "PluckerDecompress3") 1364 if (_s == "PluckerDecompress3")
1368 { 1365 {
1369 return PluckerDecompress3; 1366 return PluckerDecompress3;
1370 } 1367 }
1371 if (_s == "PluckerDecompress4") 1368 if (_s == "PluckerDecompress4")
1372 { 1369 {
1373 return PluckerDecompress4; 1370 return PluckerDecompress4;
1374 } 1371 }
1375 return NULL; 1372 return NULL;
1376} 1373}
1377#else 1374#else
1378 1375
1379#include "qfileinfo.h" 1376#include "qfileinfo.h"
1380 1377
1381#include <dlfcn.h> 1378#include <dlfcn.h>
1382 1379
1383void (*CPlucker_base::getdecompressor(const QString& _s))(UInt8*, size_t, UInt8*, size_t) 1380void (*CPlucker_base::getdecompressor(const QString& _s))(UInt8*, size_t, UInt8*, size_t)
1384{ 1381{
1385 QString codecpath(QTReaderUtil::getPluginPath("support")); 1382 QString codecpath(QTReaderUtil::getPluginPath("support"));
1386 codecpath += "/libpluckerdecompress.so"; 1383 codecpath += "/libpluckerdecompress.so";
diff --git a/noncore/apps/opie-reader/pluckerbaselib/pluckerbaselib.pro b/noncore/apps/opie-reader/pluckerbaselib/pluckerbaselib.pro
index bee1a2d..7c2f31e 100644
--- a/noncore/apps/opie-reader/pluckerbaselib/pluckerbaselib.pro
+++ b/noncore/apps/opie-reader/pluckerbaselib/pluckerbaselib.pro
@@ -1,18 +1,18 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = pdb.h \ 5 HEADERS = pdb.h \
6 util.h 6 util.h
7 7
8 SOURCES = plucker_base.cpp 8 SOURCES = plucker_base.cpp
9 9
10 INTERFACES= 10 INTERFACES=
11 DESTDIR = $(OPIEDIR)/lib 11 DESTDIR = $(OPIEDIR)/lib
12 TARGET = reader_pluckerbase 12 TARGET = reader_pluckerbase
13 LIBS += -ldl 13 LIBS += -ldl
14 14
15 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 15 INCLUDEPATH+= $(OPIEDIR)/include
16 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 16 DEPENDPATH+= $(OPIEDIR)/include
17 17
18include ( $(OPIEDIR)/include.pro ) 18include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/ppm_expander.cpp b/noncore/apps/opie-reader/ppm_expander.cpp
index ea5b955..2a4318b 100644
--- a/noncore/apps/opie-reader/ppm_expander.cpp
+++ b/noncore/apps/opie-reader/ppm_expander.cpp
@@ -1,35 +1,34 @@
1/* 1/*
2 * Interface pour le programme de compression 2 * Interface pour le programme de compression
3 * (c) 1995 Fabrice Bellard 3 * (c) 1995 Fabrice Bellard
4 */ 4 */
5 5
6#include <stdlib.h> 6#include <stdlib.h>
7//#include <unistd.h> 7//#include <unistd.h>
8#include <stdio.h> 8#include <stdio.h>
9#include <string.h> 9#include <string.h>
10#include <time.h> 10#include <time.h>
11#include "static.h"
12 11
13/*************************************************************************** 12/***************************************************************************
14 * Interface avec les routines de compression 13 * Interface avec les routines de compression
15 */ 14 */
16 15
17#define METHOD_NB 2 /* nombre total de méthodes de compression */ 16#define METHOD_NB 2 /* nombre total de méthodes de compression */
18 17
19#define METHOD_STORE 0 18#define METHOD_STORE 0
20#define METHOD_PPM 1 19#define METHOD_PPM 1
21 20
22 21
23#define DEFAULT_SUFFIX ".st" /* extension par défault */ 22#define DEFAULT_SUFFIX ".st" /* extension par défault */
24/* signature en début de fichier */ 23/* signature en début de fichier */
25#define STAT_MAGIC_SIZE 4 24#define STAT_MAGIC_SIZE 4
26char stat_magic[STAT_MAGIC_SIZE]={'P','P','M','S'}; 25char stat_magic[STAT_MAGIC_SIZE]={'P','P','M','S'};
27 26
28#include "ppm_expander.h" 27#include "ppm_expander.h"
29 28
30ppm_expander::~ppm_expander() { 29ppm_expander::~ppm_expander() {
31 if (needppmend) ppm.PPM_End(); 30 if (needppmend) ppm.PPM_End();
32 ppm.arith.Arith_DecodeEnd(); 31 ppm.arith.Arith_DecodeEnd();
33 if (buf_in!=NULL) delete [] buf_in; 32 if (buf_in!=NULL) delete [] buf_in;
34 if (buf_out!=NULL) delete [] buf_out; 33 if (buf_out!=NULL) delete [] buf_out;
35 if (my_read_buf != NULL) delete my_read_buf; 34 if (my_read_buf != NULL) delete my_read_buf;
diff --git a/noncore/apps/opie-reader/ppm_expander.h b/noncore/apps/opie-reader/ppm_expander.h
index a1a3b60..ccc89c2 100644
--- a/noncore/apps/opie-reader/ppm_expander.h
+++ b/noncore/apps/opie-reader/ppm_expander.h
@@ -1,28 +1,27 @@
1#ifndef __ppm_expander_h 1#ifndef __ppm_expander_h
2#define __ppm_expander_h 2#define __ppm_expander_h
3 3
4#include "useqpe.h"
5#include "CExpander.h" 4#include "CExpander.h"
6#include <sys/stat.h> 5#include <sys/stat.h>
7 6
8 7
9#include "utypes.h" 8#include "utypes.h"
10#include "ppm.h" 9#include "ppm.h"
11#include "arith.h" 10#include "arith.h"
12 11
13 12
14#define SYM_EOF 256 13#define SYM_EOF 256
15 14
16class ppm_expander : public CExpander { 15class ppm_expander : public CExpander {
17 UCHAR *buf_in,*buf_out; 16 UCHAR *buf_in,*buf_out;
18 unsigned int bufsize; 17 unsigned int bufsize;
19 unsigned int outbytes; 18 unsigned int outbytes;
20 unsigned long blocksize; 19 unsigned long blocksize;
21 unsigned short numblocks; 20 unsigned short numblocks;
22 unsigned short curblock; 21 unsigned short curblock;
23 unsigned short maxnode; 22 unsigned short maxnode;
24 bool needppmend; 23 bool needppmend;
25 int home(); 24 int home();
26 FILE* my_file_in; 25 FILE* my_file_in;
27 PPM_ReadBuf* my_read_buf; 26 PPM_ReadBuf* my_read_buf;
28 ppm_worker ppm; 27 ppm_worker ppm;
diff --git a/noncore/apps/opie-reader/ppmsCodec/ppmsCodec.pro b/noncore/apps/opie-reader/ppmsCodec/ppmsCodec.pro
index 8699d3b..d6ec97b 100644
--- a/noncore/apps/opie-reader/ppmsCodec/ppmsCodec.pro
+++ b/noncore/apps/opie-reader/ppmsCodec/ppmsCodec.pro
@@ -1,19 +1,19 @@
1DEFINES += OPIE USEQPE 1DEFINES += OPIE USEQPE
2VPATH = .. 2VPATH = ..
3 TEMPLATE= lib 3 TEMPLATE= lib
4 CONFIG = qt warn_on release dll 4 CONFIG = qt warn_on release dll
5 HEADERS = Aportis.h 5 HEADERS = Aportis.h
6 6
7 SOURCES = ppm_expander.cpp \ 7 SOURCES = ppm_expander.cpp \
8 ppm.cpp \ 8 ppm.cpp \
9 arith_d.cpp 9 arith_d.cpp
10 10
11 INTERFACES= 11 INTERFACES=
12 DESTDIR = $(OPIEDIR)/plugins/reader/codecs 12 DESTDIR = $(OPIEDIR)/plugins/reader/codecs
13 TARGET = ppms 13 TARGET = ppms
14LIBS += -lreader_codec 14LIBS += -lreader_codec
15 15
16 INCLUDEPATH+= ../OREADERINC $(OPIEDIR)/include 16 INCLUDEPATH+= $(OPIEDIR)/include
17 DEPENDPATH+= ../OREADERINC $(OPIEDIR)/include 17 DEPENDPATH+= $(OPIEDIR)/include
18 18
19include ( $(OPIEDIR)/include.pro ) 19include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-reader/preferences.cpp b/noncore/apps/opie-reader/preferences.cpp
index b9397cf..0f59a22 100755
--- a/noncore/apps/opie-reader/preferences.cpp
+++ b/noncore/apps/opie-reader/preferences.cpp
@@ -1,25 +1,24 @@
1#include "useqpe.h"
2#ifndef USEQPE 1#ifndef USEQPE
3 2
4#include "preferences.h" 3#include "preferences.h"
5 4
6#include <qfile.h> 5#include <qfile.h>
7#include <qtextstream.h> 6#include <qtextstream.h>
8 7
9Config::Config(const QString& _fn) : fname(_fn) 8Config::Config(const QString& _fn) : fname(_fn)
10{ 9{
11// qDebug("Config::Config:%s", (const char*)fname); 10// qDebug("Config::Config:%s", (const char*)fname);
12 QFile fl(fname); 11 QFile fl(fname);
13 if (fl.open(IO_ReadOnly)) 12 if (fl.open(IO_ReadOnly))
14 { 13 {
15 QTextStream t(&fl); 14 QTextStream t(&fl);
16 QString key, value; 15 QString key, value;
17 while (!t.eof()) 16 while (!t.eof())
18 { 17 {
19 QString data = t.readLine(); 18 QString data = t.readLine();
20 int colon = data.find(':'); 19 int colon = data.find(':');
21 if (colon > 0) 20 if (colon > 0)
22 { 21 {
23 QString key = data.left(colon); 22 QString key = data.left(colon);
24 QString value = data.right(data.length()-colon-1); 23 QString value = data.right(data.length()-colon-1);
25 values[key] = value; 24 values[key] = value;
diff --git a/noncore/apps/opie-reader/preferences.h b/noncore/apps/opie-reader/preferences.h
index 69d1774..aeb2a84 100644
--- a/noncore/apps/opie-reader/preferences.h
+++ b/noncore/apps/opie-reader/preferences.h
@@ -1,25 +1,24 @@
1#include "useqpe.h"
2#ifndef USEQPE 1#ifndef USEQPE
3#ifndef __PREFERENCES_H 2#ifndef __PREFERENCES_H
4#define __PREFERENCES_H 3#define __PREFERENCES_H
5 4
6#include <qstring.h> 5#include <qstring.h>
7#include <qmap.h> 6#include <qmap.h>
8 7
9class Config 8class Config
10{ 9{
11 QMap<QString, QString> values; 10 QMap<QString, QString> values;
12 QString fname; 11 QString fname;
13 public: 12 public:
14 Config(const QString& fname); 13 Config(const QString& fname);
15 ~Config(); 14 ~Config();
16 void setGroup(const QString& s) { } 15 void setGroup(const QString& s) { }
17 QString readEntry(const QString&, const QString&); 16 QString readEntry(const QString&, const QString&);
18 bool readBoolEntry(const QString&, const bool); 17 bool readBoolEntry(const QString&, const bool);
19 int readNumEntry(const QString&, const int); 18 int readNumEntry(const QString&, const int);
20 19
21 void writeEntry(const QString&, const QString&); 20 void writeEntry(const QString&, const QString&);
22 void writeEntry(const QString&, const bool); 21 void writeEntry(const QString&, const bool);
23 void writeEntry(const QString&, const int); 22 void writeEntry(const QString&, const int);
24}; 23};
25 24
diff --git a/noncore/apps/opie-reader/static.h b/noncore/apps/opie-reader/static.h
deleted file mode 100644
index e69de29..0000000
--- a/noncore/apps/opie-reader/static.h
+++ b/dev/null
diff --git a/noncore/apps/opie-reader/striphtml.cpp b/noncore/apps/opie-reader/striphtml.cpp
index 9cd6a0d..e86402b 100644
--- a/noncore/apps/opie-reader/striphtml.cpp
+++ b/noncore/apps/opie-reader/striphtml.cpp
@@ -1,29 +1,28 @@
1#include <qmap.h> 1#include <qmap.h>
2#include <qfileinfo.h> 2#include <qfileinfo.h>
3#include <qtextstream.h> 3#include <qtextstream.h>
4#include <qdir.h> 4#include <qdir.h>
5#include "useqpe.h"
6#ifdef USEQPE 5#ifdef USEQPE
7#include <qpe/global.h> 6#include <qpe/global.h>
8#endif 7#endif
9#include "CDrawBuffer.h" 8#include "CDrawBuffer.h"
10#include "striphtml.h" 9#include "striphtml.h"
11#include "hrule.h" 10#include "hrule.h"
12#include "util.h" 11#include "util.h"
13 12
14#include <qregexp.h> 13#include <qregexp.h>
15#include <qimage.h> 14#include <qimage.h>
16#include <qpixmap.h> 15#include <qpixmap.h>
17//#include <qprogressdialog.h> 16//#include <qprogressdialog.h>
18//#include <qapplication.h> 17//#include <qapplication.h>
19 18
20static unsigned char h2i(unsigned char c) 19static unsigned char h2i(unsigned char c)
21{ 20{
22 unsigned char ret = 0; 21 unsigned char ret = 0;
23 if ('0' <= c && c <= '9') 22 if ('0' <= c && c <= '9')
24 { 23 {
25 ret = c - '0'; 24 ret = c - '0';
26 } 25 }
27 else if ('a' <= c && c <= 'f') 26 else if ('a' <= c && c <= 'f')
28 { 27 {
29 ret = c - 'a' + 10; 28 ret = c - 'a' + 10;
diff --git a/noncore/apps/opie-reader/useqpe.h b/noncore/apps/opie-reader/useqpe.h
deleted file mode 100644
index e69de29..0000000
--- a/noncore/apps/opie-reader/useqpe.h
+++ b/dev/null
diff --git a/noncore/apps/opie-reader/ztxt.cpp b/noncore/apps/opie-reader/ztxt.cpp
index 79c5fa4..35db05e 100644
--- a/noncore/apps/opie-reader/ztxt.cpp
+++ b/noncore/apps/opie-reader/ztxt.cpp
@@ -1,30 +1,29 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <string.h> 2#include <string.h>
3#include "ztxt.h" 3#include "ztxt.h"
4#include "my_list.h" 4#include "my_list.h"
5#include "Bkmks.h" 5#include "Bkmks.h"
6#include "static.h"
7 6
8ztxt::ztxt() : bInit(false), expandedtextbuffer(NULL), compressedtextbuffer(NULL) { /*printf("constructing:%x\n",fin);*/ } 7ztxt::ztxt() : bInit(false), expandedtextbuffer(NULL), compressedtextbuffer(NULL) { /*printf("constructing:%x\n",fin);*/ }
9 8
10 9
11int ztxt::OpenFile(const char *src) 10int ztxt::OpenFile(const char *src)
12{ 11{
13 if (!Cpdb::openpdbfile(src)) 12 if (!Cpdb::openpdbfile(src))
14 { 13 {
15 return -1; 14 return -1;
16 } 15 }
17 16
18//printf("Okay %u\n", 4); 17//printf("Okay %u\n", 4);
19 18
20 if (head.type != ZTXT_ID) return -1; 19 if (head.type != ZTXT_ID) return -1;
21 20
22 gotorecordnumber(0); 21 gotorecordnumber(0);
23 fread(&hdr0, 1, sizeof(hdr0), fin); 22 fread(&hdr0, 1, sizeof(hdr0), fin);
24//printf("Okay %u\n", 5); 23//printf("Okay %u\n", 5);
25 buffersize = ntohl(hdr0.size); 24 buffersize = ntohl(hdr0.size);
26 compressedtextbuffer = new UInt8[buffersize]; 25 compressedtextbuffer = new UInt8[buffersize];
27 expandedtextbuffer = new UInt8[buffersize]; 26 expandedtextbuffer = new UInt8[buffersize];
28//printf("Okay %u\n", 6); 27//printf("Okay %u\n", 6);
29 28
30 home(); 29 home();