summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/plucker_base.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/plucker_base.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/plucker_base.cpp148
1 files changed, 78 insertions, 70 deletions
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp
index caa945d..b523a54 100644
--- a/noncore/apps/opie-reader/plucker_base.cpp
+++ b/noncore/apps/opie-reader/plucker_base.cpp
@@ -1,14 +1,16 @@
1
2
1#include "useqpe.h" 3#include "useqpe.h"
2#include <stdio.h> 4#include "plucker_base.h"
3#include <string.h> 5#include "Aportis.h"
6#include "Palm2QImage.h"
7
8/* OPIE */
9#include <opie2/odebug.h>
4#ifdef USEQPE 10#ifdef USEQPE
5#include <qpe/qcopenvelope_qws.h> 11#include <qpe/qcopenvelope_qws.h>
6#endif /* USEQPE */
7#ifdef LOCALPICTURES
8#include <qscrollview.h>
9#endif
10#ifdef USEQPE
11#include <qpe/global.h> 12#include <qpe/global.h>
12#endif /* USEQPE */ 13#endif /* USEQPE */
14
13#ifndef USEQPE 15#ifndef USEQPE
14#include <qapplication.h> 16#include <qapplication.h>
@@ -17,7 +19,13 @@
17#endif /* USEQPE */ 19#endif /* USEQPE */
18 20
19#include "plucker_base.h" 21/* QT */
20#include "Aportis.h" 22#ifdef LOCALPICTURES
21#include "Palm2QImage.h" 23#include <qscrollview.h>
24#endif
25
26/* STD */
27#include <stdio.h>
28#include <string.h>
29
22 30
23CPlucker_base::CPlucker_base() : 31CPlucker_base::CPlucker_base() :
@@ -94,5 +102,5 @@ char* CPlucker_base::geturl(UInt16 tgt)
94 fread(&hdr0, 1, 6, fin); 102 fread(&hdr0, 1, 6, fin);
95 unsigned int nrecs = ntohs(hdr0.nRecords); 103 unsigned int nrecs = ntohs(hdr0.nRecords);
96 //qDebug("Version %u, no. recs %u", ntohs(hdr0.version), nrecs); 104 //odebug << "Version " << ntohs(hdr0.version) << ", no. recs " << nrecs << "" << oendl;
97 UInt16 urlid = 0; 105 UInt16 urlid = 0;
98 bool urlsfound = false; 106 bool urlsfound = false;
@@ -104,12 +112,12 @@ char* CPlucker_base::geturl(UInt16 tgt)
104 fread(&name, 1, sizeof(name), fin); 112 fread(&name, 1, sizeof(name), fin);
105 fread(&id, 1, sizeof(id), fin); 113 fread(&id, 1, sizeof(id), fin);
106 //qDebug("N:%d, I:%d", ntohs(name), ntohs(id)); 114 //odebug << "N:" << ntohs(name) << ", I:" << ntohs(id) << "" << oendl;
107 if (ntohs(name) == 2) 115 if (ntohs(name) == 2)
108 { 116 {
109 urlsfound = true; 117 urlsfound = true;
110 urlid = id; 118 urlid = id;
111 //qDebug("Found url index:%d", ntohs(urlid)); 119 //odebug << "Found url index:" << ntohs(urlid) << "" << oendl;
112 } 120 }
113 ////qDebug("%x", id); 121// //odebug << "" << id << "" << oendl;
114 } 122 }
115 if (urlsfound) 123 if (urlsfound)
@@ -130,5 +138,5 @@ char* CPlucker_base::geturl(UInt16 tgt)
130 fread(&urlid, 1, sizeof(urlid), fin); 138 fread(&urlid, 1, sizeof(urlid), fin);
131 tctr = ntohs(tctr); 139 tctr = ntohs(tctr);
132 //qDebug("tgt:%u urlctr:%u tctr:%u", tgt, urlctr, tctr); 140 //odebug << "tgt:" << tgt << " urlctr:" << urlctr << " tctr:" << tctr << "" << oendl;
133 if (tctr >= tgt) 141 if (tctr >= tgt)
134 { 142 {
@@ -137,5 +145,5 @@ char* CPlucker_base::geturl(UInt16 tgt)
137 urlctr = tctr; 145 urlctr = tctr;
138 } 146 }
139 //qDebug("urls are in %d", ntohs(urlid)); 147 //odebug << "urls are in " << ntohs(urlid) << "" << oendl;
140 recptr = finduid(ntohs(urlid)); 148 recptr = finduid(ntohs(urlid));
141 if (recptr != 0) 149 if (recptr != 0)
@@ -144,5 +152,5 @@ char* CPlucker_base::geturl(UInt16 tgt)
144 gotorecordnumber(recptr); 152 gotorecordnumber(recptr);
145 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 153 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
146 //qDebug("Found urls:%x",thishdr_type); 154 //odebug << "Found urls:" << thishdr_type << "" << oendl;
147 urlsize = thishdr_size; 155 urlsize = thishdr_size;
148 urls = new char[urlsize]; 156 urls = new char[urlsize];
@@ -154,5 +162,5 @@ char* CPlucker_base::geturl(UInt16 tgt)
154 if (rn == tgt) 162 if (rn == tgt)
155 { 163 {
156 //qDebug("URL:%s", ptr); 164 //odebug << "URL:" << ptr << "" << oendl;
157 int len = strlen(ptr)+1; 165 int len = strlen(ptr)+1;
158 pRet = new char[len]; 166 pRet = new char[len];
@@ -251,5 +259,5 @@ void CPlucker_base::locate(unsigned int n)
251 recptr--; 259 recptr--;
252 gotorecordnumber(recptr); 260 gotorecordnumber(recptr);
253 //qDebug("recptr:%u", recptr); 261 //odebug << "recptr:" << recptr << "" << oendl;
254 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 262 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
255 if (thishdr_type < 2) 263 if (thishdr_type < 2)
@@ -276,5 +284,5 @@ void CPlucker_base::locate(unsigned int n)
276 } 284 }
277 } 285 }
278// qDebug("Time(1): %u", clock()-start); 286// odebug << "Time(1): " << clock()-start << "" << oendl;
279/* 287/*
280 expand(recptr); 288 expand(recptr);
@@ -322,8 +330,8 @@ void CPlucker_base::locate(unsigned int n)
322 } while (locpos + bs <= n); 330 } while (locpos + bs <= n);
323 331
324// qDebug("Time(2): %u", clock()-start); 332// odebug << "Time(2): " << clock()-start << "" << oendl;
325 if (recptr != thisrec) 333 if (recptr != thisrec)
326 { 334 {
327 qDebug("Disaster:recptr:%u thisrec:%u", recptr, thisrec); 335 odebug << "Disaster:recptr:" << recptr << " thisrec:" << thisrec << "" << oendl;
328 UInt16 thishdr_uid, thishdr_nParagraphs; 336 UInt16 thishdr_uid, thishdr_nParagraphs;
329 UInt32 thishdr_size = buffercontent; 337 UInt32 thishdr_size = buffercontent;
@@ -333,5 +341,5 @@ void CPlucker_base::locate(unsigned int n)
333 gotorecordnumber(recptr); 341 gotorecordnumber(recptr);
334 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 342 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
335 // qDebug("UID:%u Paras:%u Size:%u Type:%u Reserved:%u", thishdr_uid, thishdr_nParagraphs, thishdr_size, (unsigned int)thishdr_type, (unsigned int)thishdr_reserved); 343// odebug << "UID:" << thishdr_uid << " Paras:" << thishdr_nParagraphs << " Size:" << thishdr_size << " Type:" << (unsigned int)thishdr_type << " Reserved:" << (unsigned int)thishdr_reserved << "" << oendl;
336 } 344 }
337 //QApplication::exit ( 100 ); 345 //QApplication::exit ( 100 );
@@ -372,7 +380,7 @@ bool CPlucker_base::expand(int thisrec)
372 { 380 {
373 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 381 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
374 //qDebug("This (%d) type is %d, uid is %u", thisrec, thishdr_type, thishdr_uid); 382 //odebug << "This (" << thisrec << ") type is " << thishdr_type << ", uid is " << thishdr_uid << "" << oendl;
375 if (thishdr_type < 2) break; 383 if (thishdr_type < 2) break;
376 //qDebug("Skipping paragraph of type %d", thishdr_type); 384 //odebug << "Skipping paragraph of type " << thishdr_type << "" << oendl;
377 if (++thisrec >= ntohs(head.recordList.numRecords) - 1) return false; 385 if (++thisrec >= ntohs(head.recordList.numRecords) - 1) return false;
378 reclen = recordlength(thisrec); 386 reclen = recordlength(thisrec);
@@ -381,5 +389,5 @@ bool CPlucker_base::expand(int thisrec)
381 m_nParas = thishdr_nParagraphs; 389 m_nParas = thishdr_nParagraphs;
382 m_bufferisreserved = (thishdr_reserved != 0); 390 m_bufferisreserved = (thishdr_reserved != 0);
383 //qDebug("It has %u paragraphs and is %u bytes", thishdr_nParagraphs, thishdr_size); 391 //odebug << "It has " << thishdr_nParagraphs << " paragraphs and is " << thishdr_size << " bytes" << oendl;
384 uid = thishdr_uid; 392 uid = thishdr_uid;
385// gotorecordnumber(thisrec); 393// gotorecordnumber(thisrec);
@@ -392,10 +400,10 @@ bool CPlucker_base::expand(int thisrec)
392 m_ParaOffsets[i] = ntohs(ubytes); 400 m_ParaOffsets[i] = ntohs(ubytes);
393 m_ParaAttrs[i] = ntohs(attrs); 401 m_ParaAttrs[i] = ntohs(attrs);
394 ////qDebug("Bytes %u, Attr %x", ntohs(ubytes), ntohs(attrs)); 402// //odebug << "Bytes " << ntohs(ubytes) << ", Attr " << ntohs(attrs) << "" << oendl;
395 } 403 }
396 if (m_nParas > 0) 404 if (m_nParas > 0)
397 { 405 {
398 m_nextPara = m_ParaOffsets[0]; 406 m_nextPara = m_ParaOffsets[0];
399 //qDebug("First offset = %u", m_nextPara); 407 //odebug << "First offset = " << m_nextPara << "" << oendl;
400 m_nextParaIndex = 0; 408 m_nextParaIndex = 0;
401 } 409 }
@@ -419,5 +427,5 @@ bool CPlucker_base::expand(int thisrec)
419 bufferpos = 0; 427 bufferpos = 0;
420 bufferrec = thisrec; 428 bufferrec = thisrec;
421 //qDebug("BC:%u, HS:%u", buffercontent, thishdr_size); 429 //odebug << "BC:" << buffercontent << ", HS:" << thishdr_size << "" << oendl;
422 return true; 430 return true;
423} 431}
@@ -453,5 +461,5 @@ void CPlucker_base::UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuff
453 err = inflate( &zstream, Z_SYNC_FLUSH ); 461 err = inflate( &zstream, Z_SYNC_FLUSH );
454 462
455 ////qDebug("err:%d - %u", err, zstream.avail_in); 463// //odebug << "err:" << err << " - " << zstream.avail_in << "" << oendl;
456 464
457 } while ( err == Z_OK ); 465 } while ( err == Z_OK );
@@ -535,7 +543,7 @@ CList<Bkmk>* CPlucker_base::getbkmklist()
535 fread(&n, 1, sizeof(n), fin); 543 fread(&n, 1, sizeof(n), fin);
536 n = ntohs(n); 544 n = ntohs(n);
537 //qDebug("Found %u bookmarks", n); 545 //odebug << "Found " << n << " bookmarks" << oendl;
538 } 546 }
539 //qDebug("Found:%d, %u", i , thishdr_type); 547 //odebug << "Found:" << i << ", " << thishdr_type << "" << oendl;
540 } 548 }
541*/ 549*/
@@ -593,5 +601,5 @@ QImage* CPlucker_base::getPicture(unsigned long tgt)
593void CPlucker_base::showimg(UInt16 tgt) 601void CPlucker_base::showimg(UInt16 tgt)
594{ 602{
595 //qDebug("Crassssssh!"); 603 //odebug << "Crassssssh!" << oendl;
596 QPixmap* qimage = expandimg(tgt); 604 QPixmap* qimage = expandimg(tgt);
597 m_picture->setFixedSize(qimage->size()); 605 m_picture->setFixedSize(qimage->size());
@@ -604,5 +612,5 @@ void CPlucker_base::showimg(UInt16 tgt)
604 QImage* qimage = getimg(tgt); 612 QImage* qimage = getimg(tgt);
605 QPixmap* image = new QPixmap(0,0); 613 QPixmap* image = new QPixmap(0,0);
606// //qDebug("New image"); 614// //odebug << "New image" << oendl;
607 image->convertFromImage(*qimage); 615 image->convertFromImage(*qimage);
608 delete qimage; 616 delete qimage;
@@ -611,5 +619,5 @@ void CPlucker_base::showimg(UInt16 tgt)
611 int f = mkstemp(tmpfile); 619 int f = mkstemp(tmpfile);
612 close(f); 620 close(f);
613 //qDebug("TMPFILE:%s", tmpfile); 621 //odebug << "TMPFILE:" << tmpfile << "" << oendl;
614 if (image->save(tmpfile,"PNG")) 622 if (image->save(tmpfile,"PNG"))
615 { 623 {
@@ -628,5 +636,5 @@ void CPlucker_base::showimg(UInt16 tgt)
628unsigned short CPlucker_base::finduid(unsigned short urlid) 636unsigned short CPlucker_base::finduid(unsigned short urlid)
629{ 637{
630// //qDebug("Finding %u", urlid); 638// //odebug << "Finding " << urlid << "" << oendl;
631 unsigned short jmin = 1, jmax = ntohs(head.recordList.numRecords); 639 unsigned short jmin = 1, jmax = ntohs(head.recordList.numRecords);
632 unsigned short jmid = (jmin+jmax) >> 1; 640 unsigned short jmid = (jmin+jmax) >> 1;
@@ -639,5 +647,5 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
639 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 647 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
640 unsigned short luid = thishdr_uid; 648 unsigned short luid = thishdr_uid;
641 ////qDebug("%u %u %u : %u", jmin, jmid, jmax, urlid); 649// //odebug << "" << jmin << " " << jmid << " " << jmax << " : " << urlid << "" << oendl;
642 if (luid == urlid) 650 if (luid == urlid)
643 { 651 {
@@ -660,5 +668,5 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
660 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 668 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
661 unsigned short luid = thishdr_uid; 669 unsigned short luid = thishdr_uid;
662 //qDebug("jmin at end:%u,%u", jmin, luid); 670 //odebug << "jmin at end:" << jmin << "," << luid << "" << oendl;
663 if (luid == urlid) 671 if (luid == urlid)
664 { 672 {
@@ -668,10 +676,10 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
668 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved); 676 GetHeader(thishdr_uid, thishdr_nParagraphs, thishdr_size, thishdr_type, thishdr_reserved);
669 luid = thishdr_uid; 677 luid = thishdr_uid;
670 //qDebug("jmax at end:%u,%u", jmax, luid); 678 //odebug << "jmax at end:" << jmax << "," << luid << "" << oendl;
671 if (luid == urlid) 679 if (luid == urlid)
672 { 680 {
673 return jmax; 681 return jmax;
674 } 682 }
675 //qDebug("Couldn't find %u", urlid); 683 //odebug << "Couldn't find " << urlid << "" << oendl;
676 return 0; // Not found! 684 return 0; // Not found!
677} 685}
@@ -699,5 +707,5 @@ void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsig
699 { 707 {
700 unsigned long t = *it; 708 unsigned long t = *it;
701 //qDebug("[%u]", t); 709// odebug << "[" << t << "]" << oendl;
702 memcpy(newdata, &t, sizeof(t)); 710 memcpy(newdata, &t, sizeof(t));
703 newdata += sizeof(t); 711 newdata += sizeof(t);
@@ -722,5 +730,5 @@ void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen)
722 { 730 {
723 memcpy(&t, src, sizeof(t)); 731 memcpy(&t, src, sizeof(t));
724 // qDebug("[%u]", t); 732// odebug << "[" << t << "]" << oendl;
725 visited.push_front(t); 733 visited.push_front(t);
726 src += sizeof(t); 734 src += sizeof(t);
@@ -752,8 +760,8 @@ int CPlucker_base::OpenFile(const char *src)
752 expandedtextbuffer = new UInt8[buffersize]; 760 expandedtextbuffer = new UInt8[buffersize];
753 761
754 //qDebug("Total number of records:%u", ntohs(head.recordList.numRecords)); 762 //odebug << "Total number of records:" << ntohs(head.recordList.numRecords) << "" << oendl;
755 763
756 unsigned int nrecs = ntohs(hdr0.nRecords); 764 unsigned int nrecs = ntohs(hdr0.nRecords);
757 //qDebug("Version %u, no. recs %u", ntohs(hdr0.version), nrecs); 765 //odebug << "Version " << ntohs(hdr0.version) << ", no. recs " << nrecs << "" << oendl;
758 UInt16 homerecid = 1; 766 UInt16 homerecid = 1;
759 for (unsigned int i = 0; i < nrecs; i++) 767 for (unsigned int i = 0; i < nrecs; i++)
@@ -762,5 +770,5 @@ int CPlucker_base::OpenFile(const char *src)
762 fread(&name, 1, sizeof(name), fin); 770 fread(&name, 1, sizeof(name), fin);
763 fread(&id, 1, sizeof(id), fin); 771 fread(&id, 1, sizeof(id), fin);
764 //qDebug("N:%d, I:%d", ntohs(name), ntohs(id)); 772 //odebug << "N:" << ntohs(name) << ", I:" << ntohs(id) << "" << oendl;
765 if (ntohs(name) == 0) homerecid = ntohs(id); 773 if (ntohs(name) == 0) homerecid = ntohs(id);
766 } 774 }
@@ -820,5 +828,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
820 UInt16 tuid = (n >> 16); 828 UInt16 tuid = (n >> 16);
821 n &= 0xffff; 829 n &= 0xffff;
822// //qDebug("Hyper:<%u,%u>", tuid, n); 830// //odebug << "Hyper:<" << tuid << "," << n << ">" << oendl;
823 UInt16 thisrec = 1; 831 UInt16 thisrec = 1;
824 currentpos = 0; 832 currentpos = 0;
@@ -832,5 +840,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
832 if (tuid == thishdr_uid) break; 840 if (tuid == thishdr_uid) break;
833 if (thishdr_type < 2) currentpos += thishdr_size; 841 if (thishdr_type < 2) currentpos += thishdr_size;
834 ////qDebug("hyper-cp:%u", currentpos); 842// //odebug << "hyper-cp:" << currentpos << "" << oendl;
835 thisrec++; 843 thisrec++;
836 if (thisrec >= ntohs(head.recordList.numRecords)) 844 if (thisrec >= ntohs(head.recordList.numRecords))
@@ -858,5 +866,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
858#else 866#else
859#endif /* USEQPE */ 867#endif /* USEQPE */
860 //qDebug("Link:%s", (const char*)wrd); 868 //odebug << "Link:" << wrd << "" << oendl;
861 // setlink(fn, wrd); 869 // setlink(fn, wrd);
862 delete [] turl; 870 delete [] turl;
@@ -927,5 +935,5 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
927 return eNone; 935 return eNone;
928 } 936 }
929 //qDebug("Hyper:<%u,%u>", tuid, n); 937 //odebug << "Hyper:<" << tuid << "," << n << ">" << oendl;
930 while (bufferpos < n && bufferpos < buffercontent) getch_base(true); 938 while (bufferpos < n && bufferpos < buffercontent) getch_base(true);
931/* // This is faster but the alignment doesn't get set 939/* // This is faster but the alignment doesn't get set
@@ -957,9 +965,9 @@ tchar CPlucker_base::getch_base(bool fast)
957 { 965 {
958 ch = bgetch(); 966 ch = bgetch();
959 ////qDebug("Function:%x", ch); 967// //odebug << "Function:" << ch << "" << oendl;
960 switch (ch) 968 switch (ch)
961 { 969 {
962 case 0x38: 970 case 0x38:
963 // //qDebug("Break:%u", locate()); 971// //odebug << "Break:" << locate() << "" << oendl;
964 if (m_lastBreak == locate()) 972 if (m_lastBreak == locate())
965 { 973 {
@@ -981,5 +989,5 @@ tchar CPlucker_base::getch_base(bool fast)
981 int ch = bgetch(); 989 int ch = bgetch();
982 ln = (ln << 8) + ch; 990 ln = (ln << 8) + ch;
983 // //qDebug("ch:%d, ln:%u", ch, ln); 991// //odebug << "ch:" << ch << ", ln:" << ln << "" << oendl;
984 } 992 }
985 if (skip == 2) 993 if (skip == 2)
@@ -993,8 +1001,8 @@ tchar CPlucker_base::getch_base(bool fast)
993 int ch = bgetch(); 1001 int ch = bgetch();
994 ln = (ln << 8) + ch; 1002 ln = (ln << 8) + ch;
995 // //qDebug("ch:%d, ln:%u", ch, ln); 1003// //odebug << "ch:" << ch << ", ln:" << ln << "" << oendl;
996 } 1004 }
997 } 1005 }
998 // //qDebug("ln:%u", ln); 1006// //odebug << "ln:" << ln << "" << oendl;
999 mystyle.setLink(true); 1007 mystyle.setLink(true);
1000 mystyle.setData(ln); 1008 mystyle.setData(ln);
@@ -1039,5 +1047,5 @@ tchar CPlucker_base::getch_base(bool fast)
1039 { 1047 {
1040 ch = bgetch(); 1048 ch = bgetch();
1041 // //qDebug("Font:%d",ch); 1049// //odebug << "Font:" << ch << "" << oendl;
1042 mystyle.setVOffset(0); 1050 mystyle.setVOffset(0);
1043 mystyle.unsetMono(); 1051 mystyle.unsetMono();
@@ -1073,5 +1081,5 @@ tchar CPlucker_base::getch_base(bool fast)
1073 break; 1081 break;
1074 case 8: // should be fixed width 1082 case 8: // should be fixed width
1075 //qDebug("Trying fixed width"); 1083 //odebug << "Trying fixed width" << oendl;
1076 mystyle.setMono(); 1084 mystyle.setMono();
1077 break; 1085 break;
@@ -1088,5 +1096,5 @@ tchar CPlucker_base::getch_base(bool fast)
1088 break; 1096 break;
1089 default: 1097 default:
1090 qDebug("Unrecognised font"); 1098 odebug << "Unrecognised font" << oendl;
1091 break; 1099 break;
1092 } 1100 }
@@ -1100,17 +1108,17 @@ tchar CPlucker_base::getch_base(bool fast)
1100 case 0: 1108 case 0:
1101 mystyle.setLeftJustify(); 1109 mystyle.setLeftJustify();
1102 // //qDebug("left"); 1110// //odebug << "left" << oendl;
1103 break; 1111 break;
1104 case 1: 1112 case 1:
1105 mystyle.setRightJustify(); 1113 mystyle.setRightJustify();
1106 // //qDebug("right"); 1114// //odebug << "right" << oendl;
1107 break; 1115 break;
1108 case 2: 1116 case 2:
1109 mystyle.setCentreJustify(); 1117 mystyle.setCentreJustify();
1110 // //qDebug("centre"); 1118// //odebug << "centre" << oendl;
1111 break; 1119 break;
1112 case 3: 1120 case 3:
1113 mystyle.setFullJustify(); 1121 mystyle.setFullJustify();
1114 // //qDebug("full"); 1122// //odebug << "full" << oendl;
1115 break; 1123 break;
1116 1124
@@ -1135,5 +1143,5 @@ tchar CPlucker_base::getch_base(bool fast)
1135 if (hasalternate) 1143 if (hasalternate)
1136 { 1144 {
1137 //qDebug("Alternate image:%x", ir); 1145 //odebug << "Alternate image:" << ir << "" << oendl;
1138 UInt16 ir2 = bgetch(); 1146 UInt16 ir2 = bgetch();
1139 ir2 = (ir2 << 8) + bgetch(); 1147 ir2 = (ir2 << 8) + bgetch();
@@ -1150,5 +1158,5 @@ tchar CPlucker_base::getch_base(bool fast)
1150 if (!fast) mystyle.setPicture(true, expandimg(ir)); 1158 if (!fast) mystyle.setPicture(true, expandimg(ir));
1151 } 1159 }
1152 // if (mystyle.getLink()) qDebug("Picture link!"); 1160// if (mystyle.getLink()) odebug << "Picture link!" << oendl;
1153 ch = '#'; 1161 ch = '#';
1154 } 1162 }
@@ -1161,5 +1169,5 @@ tchar CPlucker_base::getch_base(bool fast)
1161 UInt8 pc = bgetch(); 1169 UInt8 pc = bgetch();
1162 UInt16 w = wc; 1170 UInt16 w = wc;
1163 // //qDebug("h,w,pc [%u, %u, %u]", h, w, pc); 1171// //odebug << "h,w,pc [" << h << ", " << w << ", " << pc << "]" << oendl;
1164 if (w == 0) 1172 if (w == 0)
1165 { 1173 {
@@ -1168,5 +1176,5 @@ tchar CPlucker_base::getch_base(bool fast)
1168 if (w == 0) w = m_scrWidth; 1176 if (w == 0) w = m_scrWidth;
1169 mystyle.setPicture(false, hRule(w,h,mystyle.Red(),mystyle.Green(),mystyle.Blue())); 1177 mystyle.setPicture(false, hRule(w,h,mystyle.Red(),mystyle.Green(),mystyle.Blue()));
1170 // if (mystyle.getLink()) //qDebug("hRule link!"); 1178// if (mystyle.getLink()) //odebug << "hRule link!" << oendl;
1171 ch = '#'; 1179 ch = '#';
1172 } 1180 }
@@ -1183,8 +1191,8 @@ tchar CPlucker_base::getch_base(bool fast)
1183 ch = bgetch(); 1191 ch = bgetch();
1184 mystyle.setLeftMargin(ch); 1192 mystyle.setLeftMargin(ch);
1185 // //qDebug("Left margin:%d", ch); 1193// //odebug << "Left margin:" << ch << "" << oendl;
1186 ch = bgetch(); 1194 ch = bgetch();
1187 mystyle.setRightMargin(ch); 1195 mystyle.setRightMargin(ch);
1188 // //qDebug("Right margin:%d", ch); 1196// //odebug << "Right margin:" << ch << "" << oendl;
1189 ch = bgetch(); 1197 ch = bgetch();
1190 break; 1198 break;
@@ -1204,10 +1212,10 @@ tchar CPlucker_base::getch_base(bool fast)
1204 ch |= (tchar)bgetch(); 1212 ch |= (tchar)bgetch();
1205 for (int i = 0; i < tlen; i++) bgetch(); 1213 for (int i = 0; i < tlen; i++) bgetch();
1206 //qDebug("Function 83"); 1214 //odebug << "Function 83" << oendl;
1207 } 1215 }
1208 break; 1216 break;
1209 case 0x85: 1217 case 0x85:
1210 default: 1218 default:
1211 qDebug("Function:%x NOT IMPLEMENTED", ch); 1219 odebug << "Function:" << ch << " NOT IMPLEMENTED" << oendl;
1212 { 1220 {
1213 int skip = ch & 7; 1221 int skip = ch & 7;
@@ -1215,5 +1223,5 @@ tchar CPlucker_base::getch_base(bool fast)
1215 { 1223 {
1216 ch = bgetch(); 1224 ch = bgetch();
1217 //qDebug("Arg %d, %d", i, ch); 1225 //odebug << "Arg " << i << ", " << ch << "" << oendl;
1218 } 1226 }
1219 ch = bgetch(); 1227 ch = bgetch();