summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ZText.h4
-rw-r--r--noncore/apps/opie-reader/plucker.h24
-rw-r--r--noncore/apps/opie-reader/ztxt.h32
3 files changed, 30 insertions, 30 deletions
diff --git a/noncore/apps/opie-reader/ZText.h b/noncore/apps/opie-reader/ZText.h
index 9e72161..debfe8c 100644
--- a/noncore/apps/opie-reader/ZText.h
+++ b/noncore/apps/opie-reader/ZText.h
@@ -1,39 +1,39 @@
#ifndef __Text_h
#define __Text_h
#include <stdio.h>
-#include <zlib.h>
+#include "zlib/zlib.h"
#include <sys/stat.h>
#include "CExpander.h"
class Text: public CExpander {
gzFile file;
unsigned long fsize;
public:
Text() : file(NULL) {};
virtual ~Text()
{
if (file != NULL) gzclose(file);
}
virtual int openfile(const char *src)
{
if (file != NULL) gzclose(file);
struct stat _stat;
stat(src,&_stat);
fsize = _stat.st_size;
return ((file = gzopen(src,"rb")) == NULL);
}
virtual int getch() { return gzgetc(file); }
virtual unsigned int locate() { return gztell(file); }
virtual void locate(unsigned int n) { gzseek(file,n,SEEK_SET); }
virtual bool hasrandomaccess() { return true; }
virtual void sizes(unsigned long& _file, unsigned long& _text)
{
_text = _file = fsize;
}
virtual MarkupType PreferredMarkup()
{
- return cTEXT;
+ return cTEXT;
}
};
#endif
diff --git a/noncore/apps/opie-reader/plucker.h b/noncore/apps/opie-reader/plucker.h
index 84e855c..d3ca732 100644
--- a/noncore/apps/opie-reader/plucker.h
+++ b/noncore/apps/opie-reader/plucker.h
@@ -1,29 +1,29 @@
#ifndef __plucker_h
#define __plucker_h
#include "CExpander.h"
-#include <zlib.h>
+#include "zlib/zlib.h"
#include "ztxt.h"
#include "pdb.h"
#include "CBuffer.h"
struct CPlucker_dataRecord
{
UInt16 uid;
UInt16 nParagraphs;
UInt16 size;
UInt8 type;
UInt8 reserved;
};
struct CPlucker_record0
{
UInt16 uid;
UInt16 version;
UInt16 nRecords;
};
struct CPluckerbkmk
{
UInt32 offset;
tchar title[MAX_BMRK_LENGTH];
@@ -37,50 +37,50 @@ class CPlucker : public CExpander, Cpdb
size_t textlength;
UInt16 uid;
int m_nextPara, m_nextParaIndex;
CBufferFace<UInt16> m_ParaOffsets;
CBufferFace<UInt16> m_ParaAttrs;
UInt16 m_nParas;
CStyle mystyle;
// bool bInit;
UInt32 buffersize;
UInt32 buffercontent;
UInt8* expandedtextbuffer;
UInt8* compressedtextbuffer;
size_t bufferpos;
UInt16 bufferrec;
CPlucker_record0 hdr0;
size_t currentpos;
bool expand(int);
void UnZip(size_t, UInt8*, UInt16);
void UnDoc(size_t, UInt8*, UInt16);
void expandimg(UInt16 tgt);
void home();
int bgetch();
public:
virtual void sizes(unsigned long& _file, unsigned long& _text)
- {
- _file = file_length;
- _text = textlength;
+ {
+ _file = file_length;
+ _text = textlength;
//ntohl(hdr0.size);
- }
+ }
virtual bool hasrandomaccess() { return true; }
virtual ~CPlucker()
- {
- if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
- if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
- }
+ {
+ if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
+ if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
+ }
CPlucker();
virtual int openfile(const char *src);
virtual int getch();
virtual void getch(int&, CStyle&);
virtual unsigned int locate();
virtual void locate(unsigned int n);
virtual CList<Bkmk>* getbkmklist();
virtual bool hyperlink(unsigned int n);
virtual MarkupType PreferredMarkup()
- {
- return cNONE;
- }
+ {
+ return cNONE;
+ }
};
#endif
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h
index 7be45c0..20558a6 100644
--- a/noncore/apps/opie-reader/ztxt.h
+++ b/noncore/apps/opie-reader/ztxt.h
@@ -1,29 +1,29 @@
#ifndef __ztxt_h
#define __ztxt_h
#include "CExpander.h"
-#include <zlib.h>
+#include "zlib/zlib.h"
#include "pdb.h"
/*
* Stuff common to both Weasel Reader and makeztxt
*
* $Id$
*
*/
#ifndef _WEASEL_COMMON_H_
#define _WEASEL_COMMON_H_ 1
/* Padding is no good */
#if defined(__GNUC__) && defined(__UNIX__)
# pragma pack(2)
#endif
/* The default creator is Weasel Reader 'GPlm' */
#define GPLM_CREATOR_ID "GPlm"
/* Databases of type 'zTXT' */
#define ZTXT_TYPE_ID "zTXT"
/* Size of one database record */
#define RECORD_SIZE 8192
/* Allow largest WBIT size for data. Lower with command line options
@@ -55,51 +55,51 @@ struct zTXTbkmk
UInt32 offset;
tchar title[MAX_BMRK_LENGTH];
};
#endif
const UInt32 ZTXT_ID = 0x5458547a;
class ztxt : public CExpander, Cpdb
{
bool bInit;
UInt32 buffersize;
UInt32 buffercontent;
UInt8* expandedtextbuffer;
UInt8* compressedtextbuffer;
z_stream zstream;
size_t bufferpos;
UInt16 bufferrec;
zTXT_record0 hdr0;
size_t currentpos;
void home();
public:
virtual void sizes(unsigned long& _file, unsigned long& _text)
- {
- _file = file_length;
- _text = ntohl(hdr0.size);
- }
+ {
+ _file = file_length;
+ _text = ntohl(hdr0.size);
+ }
virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); }
virtual ~ztxt()
- {
- if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
- if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
- if (bInit)
- {
- inflateEnd(&zstream);
- }
- }
+ {
+ if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
+ if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
+ if (bInit)
+ {
+ inflateEnd(&zstream);
+ }
+ }
ztxt();
virtual int openfile(const char *src);
virtual int getch();
virtual unsigned int locate();
virtual void locate(unsigned int n);
virtual CList<Bkmk>* getbkmklist();
virtual MarkupType PreferredMarkup()
- {
- return cTEXT;
- }
+ {
+ return cTEXT;
+ }
};
#endif