summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/BuffDoc.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/BuffDoc.h116
1 files changed, 58 insertions, 58 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h
index 29d0329..61531c0 100644
--- a/noncore/apps/opie-reader/BuffDoc.h
+++ b/noncore/apps/opie-reader/BuffDoc.h
@@ -23,20 +23,20 @@ class BuffDoc
23 void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) 23 void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen)
24 { 24 {
25 if (exp == NULL) 25 if (exp == NULL)
26 { 26 {
27 data = NULL; 27 data = NULL;
28 len = 0; 28 len = 0;
29 } 29 }
30 else 30 else
31 { 31 {
32 exp->setSaveData(data, len, src, srclen); 32 exp->setSaveData(data, len, src, srclen);
33 } 33 }
34 } 34 }
35 void putSaveData(unsigned char*& src, unsigned short& srclen) 35 void putSaveData(unsigned char*& src, unsigned short& srclen)
36 { 36 {
37 if (exp != NULL) 37 if (exp != NULL)
38 { 38 {
39 exp->putSaveData(src, srclen); 39 exp->putSaveData(src, srclen);
40 } 40 }
41 } 41 }
42#ifdef USEQPE 42#ifdef USEQPE
@@ -49,20 +49,20 @@ class BuffDoc
49 ~BuffDoc() 49 ~BuffDoc()
50 { 50 {
51 delete filt; 51 delete filt;
52 delete exp; 52 delete exp;
53 } 53 }
54 BuffDoc() 54 BuffDoc()
55 { 55 {
56 exp = NULL; 56 exp = NULL;
57 filt = NULL; 57 filt = NULL;
58 lastword.empty(); 58 lastword.empty();
59 // // qDebug("Buffdoc created"); 59 // odebug << "Buffdoc created" << oendl;
60 } 60 }
61 bool empty() { return (exp == NULL); } 61 bool empty() { return (exp == NULL); }
62 void setfilter(CFilterChain* _f) 62 void setfilter(CFilterChain* _f)
63 { 63 {
64 if (filt != NULL) delete filt; 64 if (filt != NULL) delete filt;
65 filt = _f; 65 filt = _f;
66 filt->setsource(exp); 66 filt->setsource(exp);
67 } 67 }
68 CList<Bkmk>* getbkmklist() { return exp->getbkmklist(); } 68 CList<Bkmk>* getbkmklist() { return exp->getbkmklist(); }
@@ -72,20 +72,20 @@ class BuffDoc
72 tchar getch() 72 tchar getch()
73 { 73 {
74 tchar ch = UEOF; 74 tchar ch = UEOF;
75 CStyle sty; 75 CStyle sty;
76 if (exp != NULL) 76 if (exp != NULL)
77 { 77 {
78 filt->getch(ch, sty); 78 filt->getch(ch, sty);
79 } 79 }
80 return ch; 80 return ch;
81 } 81 }
82 void getch(tchar& ch, CStyle& sty) 82 void getch(tchar& ch, CStyle& sty)
83 { 83 {
84 if (exp != NULL) 84 if (exp != NULL)
85 { 85 {
86 filt->getch(ch, sty); 86 filt->getch(ch, sty);
87 } 87 }
88 else 88 else
89 ch = UEOF; 89 ch = UEOF;
90 } 90 }
91 void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } 91 void setwidth(int w) { if (exp != NULL) exp->setwidth(w); }
@@ -105,11 +105,11 @@ class BuffDoc
105 int getpara(CBuffer& buff) 105 int getpara(CBuffer& buff)
106 { 106 {
107 tchar ch; 107 tchar ch;
108 int i = 0; 108 int i = 0;
109 while ((ch = getch()) != 10 && ch != UEOF) buff[i++] = ch; 109 while ((ch = getch()) != 10 && ch != UEOF) buff[i++] = ch;
110 buff[i] = '\0'; 110 buff[i] = '\0';
111 if (i == 0 && ch == UEOF) i = -1; 111 if (i == 0 && ch == UEOF) i = -1;
112 laststartline = exp->locate(); 112 laststartline = exp->locate();
113 return i; 113 return i;
114 } 114 }
115 void saveposn(size_t posn) { exp->saveposn(posn); } 115 void saveposn(size_t posn) { exp->saveposn(posn); }