Diffstat (limited to 'noncore/apps/opie-reader/Bkmks.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp index a8bee13..889c6d8 100644 --- a/noncore/apps/opie-reader/Bkmks.cpp +++ b/noncore/apps/opie-reader/Bkmks.cpp | |||
@@ -1,21 +1,21 @@ | |||
1 | #include "name.h" | ||
2 | #include <qmessagebox.h> | 1 | #include <qmessagebox.h> |
3 | 2 | ||
4 | #include "Bkmks.h" | 3 | #include "Bkmks.h" |
5 | 4 | ||
6 | #include "StyleConsts.h" | 5 | #include "StyleConsts.h" |
7 | #include "Markups.h" | 6 | #include "Markups.h" |
8 | #include "my_list.h" | 7 | #include "my_list.h" |
9 | #include "version.h" | 8 | #include "version.h" |
9 | #include "names.h" | ||
10 | 10 | ||
11 | const unsigned long BkmkFile::magic = ((unsigned long)'q' << 24) | ((unsigned long)'t' << 16) | ((unsigned long)'r' << 8) | ((unsigned long)BKMKTYPE); | 11 | const unsigned long BkmkFile::magic = ((unsigned long)'q' << 24) | ((unsigned long)'t' << 16) | ((unsigned long)'r' << 8) | ((unsigned long)BKMKTYPE); |
12 | 12 | ||
13 | Bkmk::Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p) : m_position(_p) | 13 | Bkmk::Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p) : m_position(_p) |
14 | { | 14 | { |
15 | init(_nm, _nmlen, _anno, _annolen, _p); | 15 | init(_nm, _nmlen, _anno, _annolen, _p); |
16 | } | 16 | } |
17 | 17 | ||
18 | Bkmk::Bkmk(const tchar* _nm, const unsigned char* _anno, unsigned short annolen, unsigned int _p) : m_position(_p) | 18 | Bkmk::Bkmk(const tchar* _nm, const unsigned char* _anno, unsigned short annolen, unsigned int _p) : m_position(_p) |
19 | { | 19 | { |
20 | init(_nm, sizeof(tchar)*(ustrlen(_nm)+1), _anno, annolen, _p); | 20 | init(_nm, sizeof(tchar)*(ustrlen(_nm)+1), _anno, annolen, _p); |
21 | } | 21 | } |
@@ -210,33 +210,33 @@ CList<Bkmk>* BkmkFile::readall() | |||
210 | fseek(f,0,SEEK_SET); | 210 | fseek(f,0,SEEK_SET); |
211 | bl = readall00(&read03); | 211 | bl = readall00(&read03); |
212 | } | 212 | } |
213 | isUpgraded = true; | 213 | isUpgraded = true; |
214 | } | 214 | } |
215 | else | 215 | else |
216 | { | 216 | { |
217 | switch(newmagic & 0xff) | 217 | switch(newmagic & 0xff) |
218 | { | 218 | { |
219 | case 6: | 219 | case 6: |
220 | isUpgraded = false; | 220 | isUpgraded = false; |
221 | bl = readall00(read06); | 221 | bl = readall00(read06); |
222 | qDebug("Correct version!"); | 222 | // qDebug("Correct version!"); |
223 | break; | 223 | break; |
224 | case 5: | 224 | case 5: |
225 | isUpgraded = true; | 225 | isUpgraded = true; |
226 | bl = readall00(read05); | 226 | bl = readall00(read05); |
227 | qDebug("Known version!"); | 227 | // qDebug("Known version!"); |
228 | break; | 228 | break; |
229 | default: | 229 | default: |
230 | qDebug("Unknown version!"); | 230 | // qDebug("Unknown version!"); |
231 | isUpgraded = true; | 231 | isUpgraded = true; |
232 | bl = readall00(read05); | 232 | bl = readall00(read05); |
233 | } | 233 | } |
234 | } | 234 | } |
235 | } | 235 | } |
236 | return bl; | 236 | return bl; |
237 | } | 237 | } |
238 | 238 | ||
239 | CList<Bkmk>* BkmkFile::readall00(Bkmk* (*readfn)(FILE*)) | 239 | CList<Bkmk>* BkmkFile::readall00(Bkmk* (*readfn)(FILE*)) |
240 | { | 240 | { |
241 | CList<Bkmk>* bl = new CList<Bkmk>; | 241 | CList<Bkmk>* bl = new CList<Bkmk>; |
242 | while (1) | 242 | while (1) |