summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader
authorar <ar>2004-05-03 21:35:18 (UTC)
committer ar <ar>2004-05-03 21:35:18 (UTC)
commit412619441fab46fc79c695a23ccf9e38135bdfad (patch) (unidiff)
tree19d9b8af14cf6c345ef532bb32368b9c7b43c50f /noncore/apps/opie-reader
parentd1095d71394779557f446e2a67ba55bc62eec859 (diff)
downloadopie-412619441fab46fc79c695a23ccf9e38135bdfad.zip
opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.gz
opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'noncore/apps/opie-reader') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Aportis.cpp8
-rw-r--r--noncore/apps/opie-reader/Bkmks.cpp6
-rw-r--r--noncore/apps/opie-reader/BuffDoc.cpp18
-rw-r--r--noncore/apps/opie-reader/CDrawBuffer.cpp22
-rw-r--r--noncore/apps/opie-reader/QTReader.cpp52
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp279
-rw-r--r--noncore/apps/opie-reader/StyleConsts.cpp2
-rw-r--r--noncore/apps/opie-reader/fileBrowser.cpp8
-rw-r--r--noncore/apps/opie-reader/opie-reader.pro2
-rw-r--r--noncore/apps/opie-reader/plucker.cpp10
-rw-r--r--noncore/apps/opie-reader/plucker_base.cpp148
11 files changed, 282 insertions, 273 deletions
diff --git a/noncore/apps/opie-reader/Aportis.cpp b/noncore/apps/opie-reader/Aportis.cpp
index 2f8cdc3..06f44a4 100644
--- a/noncore/apps/opie-reader/Aportis.cpp
+++ b/noncore/apps/opie-reader/Aportis.cpp
@@ -30,3 +30,3 @@ CList<Bkmk>* Aportis::getbkmklist()
30 name[16] = '\0'; 30 name[16] = '\0';
31 // qDebug("Record:%d, Length:%u",i,recordlength(i)); 31 // odebug << "Record:" << i << ", Length:" << recordlength(i) << "" << oendl;
32 gotorecordnumber(i); 32 gotorecordnumber(i);
@@ -37,3 +37,3 @@ CList<Bkmk>* Aportis::getbkmklist()
37 lcn = SwapLong(lcn); 37 lcn = SwapLong(lcn);
38 // qDebug("Bookmark:%s:%u", name,lcn); 38 // odebug << "Bookmark:" << name << ":" << lcn << "" << oendl;
39 tchar tname[17]; 39 tchar tname[17];
@@ -123,3 +123,3 @@ int Aportis::OpenFile(const char *src)
123 fread(&hdr0, sizeof(hdr0), 1, fin); 123 fread(&hdr0, sizeof(hdr0), 1, fin);
124// qDebug("Version:%x", ntohs(hdr0.Version)); 124// odebug << "Version:" << ntohs(hdr0.Version) << "" << oendl;
125 if (hdr0.Version && 0x0200) 125 if (hdr0.Version && 0x0200)
@@ -184,3 +184,3 @@ int Aportis::OpenFile(const char *src)
184 refreshbuffer(); 184 refreshbuffer();
185// qDebug("Number of records:[%u,%u]", nRecs, nRecs2); 185// odebug << "Number of records:[" << nRecs << "," << nRecs2 << "]" << oendl;
186 return ret; 186 return ret;
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp
index 16bc1f1..480c240 100644
--- a/noncore/apps/opie-reader/Bkmks.cpp
+++ b/noncore/apps/opie-reader/Bkmks.cpp
@@ -219,3 +219,3 @@ CList<Bkmk>* BkmkFile::readall()
219 bl = readall00(read06); 219 bl = readall00(read06);
220 // qDebug("Correct version!"); 220 // odebug << "Correct version!" << oendl;
221 break; 221 break;
@@ -224,6 +224,6 @@ CList<Bkmk>* BkmkFile::readall()
224 bl = readall00(read05); 224 bl = readall00(read05);
225 // qDebug("Known version!"); 225 // odebug << "Known version!" << oendl;
226 break; 226 break;
227 default: 227 default:
228 // qDebug("Unknown version!"); 228 // odebug << "Unknown version!" << oendl;
229 isUpgraded = true; 229 isUpgraded = true;
diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp
index 4fbab93..68391b8 100644
--- a/noncore/apps/opie-reader/BuffDoc.cpp
+++ b/noncore/apps/opie-reader/BuffDoc.cpp
@@ -34,3 +34,3 @@ void BuffDoc::locate(unsigned int n)
34{ 34{
35 // //qDebug("BuffDoc:locating:%u",n); 35 // //odebug << "BuffDoc:locating:" << n << "" << oendl;
36 lastword.empty(); 36 lastword.empty();
@@ -44,3 +44,3 @@ void BuffDoc::locate(unsigned int n)
44 if (exp != NULL) exp->locate(n); 44 if (exp != NULL) exp->locate(n);
45 // //qDebug("BuffDoc:Located"); 45 // //odebug << "BuffDoc:Located" << oendl;
46} 46}
@@ -190,3 +190,3 @@ bool BuffDoc::getline(CDrawBuffer* buff, int wth, unsigned char _border)
190 else buff->empty(); 190 else buff->empty();
191// //qDebug("Buff:%s Lastword:%s", (const char*)toQString(buff->data()), (const char*)toQString(lastword.data())); 191// //odebug << "Buff:" << toQString(buff->data()) << " Lastword:" << toQString(lastword.data()) << "" << oendl;
192 lastcheck = len = buff->length(); 192 lastcheck = len = buff->length();
@@ -324,4 +324,4 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
324{ 324{
325 // //qDebug("BuffDoc:Openfile:%s", src); 325 // //odebug << "BuffDoc:Openfile:" << src << "" << oendl;
326 // //qDebug("Trying aportis %x",exp); 326 // //odebug << "Trying aportis " << exp << "" << oendl;
327 if (exp != NULL) delete exp; 327 if (exp != NULL) delete exp;
@@ -380,3 +380,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
380 delete exp; 380 delete exp;
381 //qDebug("Trying ppms"); 381 //odebug << "Trying ppms" << oendl;
382 exp = new ppm_expander; 382 exp = new ppm_expander;
@@ -388,3 +388,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
388 exp = new Text; 388 exp = new Text;
389 // //qDebug("Trying text"); 389 // //odebug << "Trying text" << oendl;
390 ret = exp->openfile(src); 390 ret = exp->openfile(src);
@@ -398,3 +398,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
398 } 398 }
399 // //qDebug("Doing final open:%x:%x",exp,filt); 399 // //odebug << "Doing final open:" << exp << ":" << filt << "" << oendl;
400 400
@@ -409,3 +409,3 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
409 filt->setsource(exp); 409 filt->setsource(exp);
410 // //qDebug("BuffDoc:file opened"); 410 // //odebug << "BuffDoc:file opened" << oendl;
411 return 0; 411 return 0;
diff --git a/noncore/apps/opie-reader/CDrawBuffer.cpp b/noncore/apps/opie-reader/CDrawBuffer.cpp
index ec36fb2..b137ac3 100644
--- a/noncore/apps/opie-reader/CDrawBuffer.cpp
+++ b/noncore/apps/opie-reader/CDrawBuffer.cpp
@@ -42,3 +42,3 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs)
42 int i; 42 int i;
43// //qDebug("Trying 2"); 43// //odebug << "Trying 2" << oendl;
44 len = rhs.len; 44 len = rhs.len;
@@ -60,3 +60,3 @@ CDrawBuffer& CDrawBuffer::operator=(CDrawBuffer& rhs)
60 len = i; 60 len = i;
61// //qDebug("Tried 2"); 61// //odebug << "Tried 2" << oendl;
62 return *this; 62 return *this;
@@ -210,3 +210,3 @@ int CDrawBuffer::width(int numchars, bool onscreen, int scwidth, unsigned char _
210 QString nstr = str.mid(lastspace+1, nsp-lastspace); 210 QString nstr = str.mid(lastspace+1, nsp-lastspace);
211 // qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); 211 // odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl;
212 int lw = fm.width(nstr); 212 int lw = fm.width(nstr);
@@ -319,3 +319,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int
319 //f.setUnderline(currentstyle.isUnderline()); 319 //f.setUnderline(currentstyle.isUnderline());
320 //if (currentstyle.isUnderline()) qDebug("UNDERLINE"); 320 //if (currentstyle.isUnderline()) odebug << "UNDERLINE" << oendl;
321 _p->setFont(f); 321 _p->setFont(f);
@@ -410,3 +410,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int
410 QString nstr = str.mid(lastspace+1, nsp-lastspace); 410 QString nstr = str.mid(lastspace+1, nsp-lastspace);
411 // qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); 411 // odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl;
412 int lw = fm.width(nstr); 412 int lw = fm.width(nstr);
@@ -420,3 +420,3 @@ void CDrawBuffer::render(QPainter* _p, int _y, bool _bMono, int _charWidth, int
420 QString nstr = str.mid(lastspace+1, nsp-lastspace); 420 QString nstr = str.mid(lastspace+1, nsp-lastspace);
421 // qDebug("str:%s: last:%d new:%d nstr:%s:", (const char*)str, lastspace, nsp, (const char*)nstr); 421 // odebug << "str:" << str << ": last:" << lastspace << " new:" << nsp << " nstr:" << nstr << ":" << oendl;
422 int lw = fm.width(nstr); 422 int lw = fm.width(nstr);
@@ -472,5 +472,5 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt)
472/* 472/*
473 if (currentstyle.isPicture()) qDebug("Passed thru picture"); 473 if (currentstyle.isPicture()) odebug << "Passed thru picture" << oendl;
474 if (currentstyle.getLink()) qDebug("Passed thru link"); 474 if (currentstyle.getLink()) odebug << "Passed thru link" << oendl;
475 //qDebug("islink:%d - %d", numchars, end); 475 //odebug << "islink:" << numchars << " - " << end << "" << oendl;
476*/ 476*/
@@ -479,3 +479,3 @@ linkType CDrawBuffer::getLinkType(int numchars, size_t& tgt)
479 while (textend != segs.end() && end <= numchars); 479 while (textend != segs.end() && end <= numchars);
480// if (currentstyle.isPicture()) qDebug("Clicked on picture"); 480// if (currentstyle.isPicture()) odebug << "Clicked on picture" << oendl;
481 if (currentstyle.getPictureLink()) 481 if (currentstyle.getPictureLink())
@@ -541,3 +541,3 @@ void CDrawBuffer::resize()
541 int xt = ((segs.begin()->style.getExtraSpace()+fc->getextraspace())*fc->getsize(segs.begin()->style)+5)/10; 541 int xt = ((segs.begin()->style.getExtraSpace()+fc->getextraspace())*fc->getsize(segs.begin()->style)+5)/10;
542 //qDebug("ExtraSpace:%d", xt); 542 //odebug << "ExtraSpace:" << xt << "" << oendl;
543 m_ascent += xt; 543 m_ascent += xt;
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp
index d64abb4..b356ba5 100644
--- a/noncore/apps/opie-reader/QTReader.cpp
+++ b/noncore/apps/opie-reader/QTReader.cpp
@@ -82,3 +82,3 @@ QTReader::QTReader( const QString& filename, QWidget *parent=0, const tchar *nam
82 init(); 82 init();
83// // qDebug("Load_file(1)"); 83// // odebug << "Load_file(1)" << oendl;
84 load_file((const tchar*)filename); 84 load_file((const tchar*)filename);
@@ -93,3 +93,3 @@ void QTReader::mouseMoveEvent(QMouseEvent* _e)
93 93
94 qDebug("MouseMove:[%d, %d]", _e->pos().x(), _e->pos().y()); 94 odebug << "MouseMove:[" << _e->pos().x() << ", " << _e->pos().y() << "]" << oendl;
95} 95}
@@ -106,3 +106,3 @@ void QTReader::mousePressEvent( QMouseEvent* _e )
106 { 106 {
107 //qDebug("MousePress"); 107 //odebug << "MousePress" << oendl;
108 mouseUpOn = false; 108 mouseUpOn = false;
@@ -319,3 +319,3 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse
319 wrd = toQString(t->data()+first, i - first); 319 wrd = toQString(t->data()+first, i - first);
320 // qDebug("Got %s", (const char *)wrd); 320 // odebug << "Got " << (const char *)wrd << "" << oendl;
321 break; 321 break;
@@ -329,3 +329,3 @@ void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouse
329 { 329 {
330 //qDebug("Selected:%s", (const char*)wrd); 330 //odebug << "Selected:" << wrd << "" << oendl;
331 emit OnWordSelected(wrd, locnarray[lineno], (m_twotouch) ? wrd : toQString(textarray[lineno]->data())); 331 emit OnWordSelected(wrd, locnarray[lineno], (m_twotouch) ? wrd : toQString(textarray[lineno]->data()));
@@ -341,3 +341,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e )
341 { 341 {
342 // qDebug("MouseRelease"); 342 // odebug << "MouseRelease" << oendl;
343 if (_e->x() > width() - m_border) 343 if (_e->x() > width() - m_border)
@@ -396,3 +396,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e )
396 { 396 {
397 // qDebug("Picture:%x", tgt); 397 // odebug << "Picture:" << tgt << "" << oendl;
398 QImage* pm = buffdoc.getPicture(tgt); 398 QImage* pm = buffdoc.getPicture(tgt);
@@ -412,3 +412,3 @@ void QTReader::mouseReleaseEvent( QMouseEvent* _e )
412 default: 412 default:
413 // qDebug("Unknown linktype"); 413 // odebug << "Unknown linktype" << oendl;
414 return; 414 return;
@@ -698,3 +698,3 @@ void QTReader::setautoscroll(bool _sc)
698 { 698 {
699 // qDebug("Opening pipe to %s", (const char*)m_pipetarget); 699 // odebug << "Opening pipe to " << m_pipetarget << "" << oendl;
700 m_pipeout = popen((const char*)m_pipetarget, "w"); 700 m_pipeout = popen((const char*)m_pipetarget, "w");
@@ -825,3 +825,3 @@ void QTReader::drawFonts( QPainter *p )
825 { 825 {
826 //qDebug("How refreshing..."); 826 //odebug << "How refreshing..." << oendl;
827 if (buffdoc.empty()) return; 827 if (buffdoc.empty()) return;
@@ -830,3 +830,3 @@ void QTReader::drawFonts( QPainter *p )
830 { 830 {
831 // qDebug("Not Optimised %d", m_lastwidth); 831 // odebug << "Not Optimised " << m_lastwidth << "" << oendl;
832 m_lastwidth = width(); 832 m_lastwidth = width();
@@ -835,3 +835,3 @@ void QTReader::drawFonts( QPainter *p )
835 locate(pagelocate()); 835 locate(pagelocate());
836 // qDebug("Not Optimised %d", m_lastwidth); 836 // odebug << "Not Optimised " << m_lastwidth << "" << oendl;
837 } 837 }
@@ -842,3 +842,3 @@ void QTReader::drawFonts( QPainter *p )
842 { 842 {
843 // qDebug("Optimised < %d %d %d", numlines, m_lastheight, newht); 843 // odebug << "Optimised < " << numlines << " " << m_lastheight << " " << newht << "" << oendl;
844 int ypos = 0; 844 int ypos = 0;
@@ -853,3 +853,3 @@ void QTReader::drawFonts( QPainter *p )
853 } 853 }
854 // qDebug("Optimised < %d", numlines); 854 // odebug << "Optimised < " << numlines << "" << oendl;
855 m_lastheight = newht; 855 m_lastheight = newht;
@@ -858,3 +858,3 @@ void QTReader::drawFonts( QPainter *p )
858 { 858 {
859 // qDebug("Optimised > %d", numlines); 859 // odebug << "Optimised > " << numlines << "" << oendl;
860 int ypos = 0; 860 int ypos = 0;
@@ -865,3 +865,3 @@ void QTReader::drawFonts( QPainter *p )
865 fillbuffer(numlines+1, ypos, newht); 865 fillbuffer(numlines+1, ypos, newht);
866 // qDebug("Optimised > %d", numlines); 866 // odebug << "Optimised > " << numlines << "" << oendl;
867 } 867 }
@@ -899,3 +899,3 @@ void QTReader::drawFonts( QPainter *p )
899 { 899 {
900 qDebug("Not so refreshing..."); 900 odebug << "Not so refreshing..." << oendl;
901 } 901 }
@@ -1030,3 +1030,3 @@ void QTReader::resizeEvent( QResizeEvent * )
1030{ 1030{
1031// // qDebug("resize:(%u,%u)", width(), height()); 1031// // odebug << "resize:(" << width() << "," << height() << ")" << oendl;
1032 // bgroup->move( width()-bgroup->width(), 0 ); 1032 // bgroup->move( width()-bgroup->width(), 0 );
@@ -1055,7 +1055,7 @@ bool QTReader::locate(unsigned long n) {
1055 buffdoc.locate(n); 1055 buffdoc.locate(n);
1056// // qDebug("&buffdoc.located"); 1056// // odebug << "&buffdoc.located" << oendl;
1057 fillbuffer(); 1057 fillbuffer();
1058// // qDebug("&Buffer filled"); 1058// // odebug << "&Buffer filled" << oendl;
1059 update(); 1059 update();
1060// // qDebug("&Located"); 1060// // odebug << "&Located" << oendl;
1061 return true; 1061 return true;
@@ -1119,3 +1119,3 @@ void QTReader::dopagedn()
1119{ 1119{
1120// qDebug("HEIGHT(2):%d", m_lastheight); 1120// odebug << "HEIGHT(2):" << m_lastheight << "" << oendl;
1121 buffdoc.unsuspend(); 1121 buffdoc.unsuspend();
@@ -1124,3 +1124,3 @@ void QTReader::dopagedn()
1124 { 1124 {
1125 ////qDebug("Jumping to %u", mylastpos); 1125 ////odebug << "Jumping to " << mylastpos << "" << oendl;
1126 jumpto(mylastpos); 1126 jumpto(mylastpos);
@@ -1315,5 +1315,5 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn)
1315 buffdoc.setContinuous(m_continuousDocument); 1315 buffdoc.setContinuous(m_continuousDocument);
1316// // qDebug("buffdoc.openfile done"); 1316// // odebug << "buffdoc.openfile done" << oendl;
1317 locate(lcn); 1317 locate(lcn);
1318// // qDebug("buffdoc.locate done"); 1318// // odebug << "buffdoc.locate done" << oendl;
1319 } 1319 }
@@ -1321,3 +1321,3 @@ bool QTReader::load_file(const char *newfile, unsigned int _lcn)
1321 update(); 1321 update();
1322// // qDebug("Updated"); 1322// // odebug << "Updated" << oendl;
1323 return bRC; 1323 return bRC;
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index b072854..f18cb59 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -19,6 +19,35 @@
19**********************************************************************/ 19**********************************************************************/
20
20#include "useqpe.h" 21#include "useqpe.h"
21#include <qregexp.h> 22#include "QTReader.h"
22#include <qclipboard.h> 23#include "GraphicWin.h"
23#include <qwidgetstack.h> 24#include "Bkmks.h"
25#include "cbkmkselector.h"
26#include "infowin.h"
27#include "ToolbarPrefs.h"
28#include "Prefs.h"
29#include "CAnnoEdit.h"
30#include "QFloatBar.h"
31#include "FixedFont.h"
32#include "URLDialog.h"
33#include "QTReaderApp.h"
34#include "CDrawBuffer.h"
35#include "Filedata.h"
36#include "opie.h"
37#include "names.h"
38#include "CEncoding_tables.h"
39#include "CloseDialog.h"
40
41/* OPIE */
42#include <opie2/odebug.h>
43#ifdef USEQPE
44#include <qpe/menubutton.h>
45#include <qpe/fontdatabase.h>
46#include <qpe/global.h>
47#include <qpe/applnk.h>
48#include <qpe/config.h>
49#include <qpe/qcopenvelope_qws.h>
50#endif
51
52/* QT */
24#ifdef USEQPE 53#ifdef USEQPE
@@ -27,8 +56,7 @@
27#endif 56#endif
57#include <qregexp.h>
58#include <qclipboard.h>
59#include <qwidgetstack.h>
28#include <qmenubar.h> 60#include <qmenubar.h>
29#include <qtoolbar.h> 61#include <qtoolbar.h>
30#ifdef USEQPE
31#include <qpe/menubutton.h>
32#include <qpe/fontdatabase.h>
33#endif
34#include <qcombobox.h> 62#include <qcombobox.h>
@@ -41,29 +69,10 @@
41#include <qobjectlist.h> 69#include <qobjectlist.h>
42#ifdef USEQPE
43#include <qpe/global.h>
44#include <qpe/applnk.h>
45#endif
46#include <qfileinfo.h> 70#include <qfileinfo.h>
47#include <stdlib.h> //getenv
48#include <qprogressbar.h> 71#include <qprogressbar.h>
49#ifdef USEQPE
50#include <qpe/config.h>
51#endif
52#include <qbuttongroup.h> 72#include <qbuttongroup.h>
53#include <qradiobutton.h> 73#include <qradiobutton.h>
54#ifdef USEQPE 74
55#include <qpe/qcopenvelope_qws.h> 75/* STD */
56#endif 76#include <stdlib.h> //getenv
57#include "QTReader.h" 77
58#include "GraphicWin.h"
59#include "Bkmks.h"
60#include "cbkmkselector.h"
61#include "infowin.h"
62#include "ToolbarPrefs.h"
63#include "Prefs.h"
64#include "CAnnoEdit.h"
65#include "QFloatBar.h"
66#include "FixedFont.h"
67#include "URLDialog.h"
68//#include <qpe/fontdatabase.h>
69 78
@@ -77,10 +86,2 @@
77 86
78#include "QTReaderApp.h"
79#include "CDrawBuffer.h"
80#include "Filedata.h"
81#include "opie.h"
82#include "names.h"
83#include "CEncoding_tables.h"
84#include "CloseDialog.h"
85
86bool CheckVersion(int&, int&, char&); 87bool CheckVersion(int&, int&, char&);
@@ -127,3 +128,3 @@ void QTReaderApp::listBkmkFiles()
127 if ( !d.cd(APPDIR) ) { // "/tmp" 128 if ( !d.cd(APPDIR) ) { // "/tmp"
128 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 129 owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl;
129 d = QDir::home(); 130 d = QDir::home();
@@ -148,3 +149,3 @@ void QTReaderApp::listBkmkFiles()
148 149
149 //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); 150 //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl;
150 ++it; // goto next list element 151 ++it; // goto next list element
@@ -216,4 +217,4 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
216 ftime(&m_lastkeytime); 217 ftime(&m_lastkeytime);
217//// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); 218//// odebug << "Application directory = " << (const tchar *)QPEApplication::documentDir() << "" << oendl;
218//// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); 219//// odebug << "Application directory = " << (const tchar *)Global::applicationFileName("uqtreader" << "" << oendl;
219 220
@@ -245,3 +246,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
245 246
246// qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); 247// odebug << "Initial Rotation(" << m_rot << "):" << rot << "" << oendl;
247*/ 248*/
@@ -262,3 +263,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
262 if ( !d.cd(APPDIR) ) { // "/tmp" 263 if ( !d.cd(APPDIR) ) { // "/tmp"
263 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 264 owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl;
264 d = QDir::home(); 265 d = QDir::home();
@@ -268,3 +269,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
268 QFileInfo fi(d, INIFILE); 269 QFileInfo fi(d, INIFILE);
269// qDebug("Path:%s", (const char*)fi.absFilePath()); 270// odebug << "Path:" << fi.absFilePath() << "" << oendl;
270 Config config(fi.absFilePath()); 271 Config config(fi.absFilePath());
@@ -358,3 +359,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
358*/ 359*/
359// qDebug("Reading file list"); 360// odebug << "Reading file list" << oendl;
360 readfilelist(); 361 readfilelist();
@@ -369,3 +370,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
369 370
370// qDebug("Reading config"); 371// odebug << "Reading config" << oendl;
371// Config config( APPDIR ); 372// Config config( APPDIR );
@@ -771,3 +772,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
771 772
772// qDebug("Font selector"); 773// odebug << "Font selector" << oendl;
773 m_fontSelector = new QComboBox(false, m_fontBar); 774 m_fontSelector = new QComboBox(false, m_fontBar);
@@ -803,7 +804,7 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
803#endif 804#endif
804// qDebug("Initing"); 805// odebug << "Initing" << oendl;
805 reader->init(); 806 reader->init();
806// qDebug("Inited"); 807// odebug << "Inited" << oendl;
807// m_buttonAction[m_spaceTarget]->setOn(true); 808// m_buttonAction[m_spaceTarget]->setOn(true);
808// qDebug("fonting"); 809// odebug << "fonting" << oendl;
809 do_setfont(reader->m_fontname); 810 do_setfont(reader->m_fontname);
@@ -811,5 +812,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
811 { 812 {
812 //qDebug("doclnk"); 813// odebug << "doclnk" << oendl;
813 //doc = new DocLnk(reader->m_lastfile); 814 //doc = new DocLnk(reader->m_lastfile);
814 //qDebug("doclnk done"); 815// odebug << "doclnk done" << oendl;
815 if (pOpenlist != NULL) 816 if (pOpenlist != NULL)
@@ -833,3 +834,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
833 } 834 }
834 // qDebug("Item:%s", (const char*)toQString(CFiledata(p->anno()).name())); 835// odebug << "Item:" << toQString(CFiledata(p->anno()).name()) << "" << oendl;
835 p = NULL; 836 p = NULL;
@@ -838,3 +839,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
838 { 839 {
839 //qDebug("openfrombkmk"); 840// odebug << "openfrombkmk" << oendl;
840 if (!openfrombkmk(p)) 841 if (!openfrombkmk(p))
@@ -844,3 +845,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
844 { 845 {
845 //qDebug("openfile"); 846// odebug << "openfile" << oendl;
846 openFile( reader->m_lastfile ); 847 openFile( reader->m_lastfile );
@@ -850,3 +851,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
850 { 851 {
851 // qDebug("Openfile 2"); 852// odebug << "Openfile 2" << oendl;
852 if (!reader->m_lastfile.isEmpty()) 853 if (!reader->m_lastfile.isEmpty())
@@ -872,3 +873,3 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
872 } 873 }
873// qDebug("finished update"); 874// odebug << "finished update" << oendl;
874} 875}
@@ -1030,3 +1031,3 @@ QToolBar* QTReaderApp::filebar()
1030 case cesSingle: 1031 case cesSingle:
1031 // qDebug("Setting filebar to menubar"); 1032// odebug << "Setting filebar to menubar" << oendl;
1032 fileBar = menubar; 1033 fileBar = menubar;
@@ -1034,6 +1035,6 @@ QToolBar* QTReaderApp::filebar()
1034 default: 1035 default:
1035 qDebug("Incorrect toolbar policy set"); 1036 odebug << "Incorrect toolbar policy set" << oendl;
1036 case cesMenuTool: 1037 case cesMenuTool:
1037 case cesMultiple: 1038 case cesMultiple:
1038 // qDebug("Creating new file bar"); 1039// odebug << "Creating new file bar" << oendl;
1039 fileBar = new QToolBar("File", this, m_tbposition); 1040 fileBar = new QToolBar("File", this, m_tbposition);
@@ -1055,3 +1056,3 @@ QToolBar* QTReaderApp::viewbar()
1055 default: 1056 default:
1056 qDebug("Incorrect toolbar policy set"); 1057 odebug << "Incorrect toolbar policy set" << oendl;
1057 case cesSingle: 1058 case cesSingle:
@@ -1071,3 +1072,3 @@ QToolBar* QTReaderApp::navbar()
1071 case cesMultiple: 1072 case cesMultiple:
1072 // qDebug("Creating new nav bar"); 1073// odebug << "Creating new nav bar" << oendl;
1073 navBar = new QToolBar("Navigation", this, m_tbposition); 1074 navBar = new QToolBar("Navigation", this, m_tbposition);
@@ -1075,3 +1076,3 @@ QToolBar* QTReaderApp::navbar()
1075 default: 1076 default:
1076 qDebug("Incorrect toolbar policy set"); 1077 odebug << "Incorrect toolbar policy set" << oendl;
1077 case cesSingle: 1078 case cesSingle:
@@ -1079,3 +1080,3 @@ QToolBar* QTReaderApp::navbar()
1079 navBar = fileBar; 1080 navBar = fileBar;
1080 // qDebug("Setting navbar to filebar"); 1081// odebug << "Setting navbar to filebar" << oendl;
1081 break; 1082 break;
@@ -1095,3 +1096,3 @@ QToolBar* QTReaderApp::markbar()
1095 default: 1096 default:
1096 qDebug("Incorrect toolbar policy set"); 1097 odebug << "Incorrect toolbar policy set" << oendl;
1097 case cesSingle: 1098 case cesSingle:
@@ -1129,3 +1130,3 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data)
1129 1130
1130//// qDebug("Received:%s", (const char*)msg); 1131//// odebug << "Received:" << msg << "" << oendl;
1131 1132
@@ -1483,3 +1484,3 @@ void QTReaderApp::buttonActionSelected(QAction* _a)
1483{ 1484{
1484//// qDebug("es:%x : %s (%u)", _a, (const char *)(_a->text()), ActNameToInt(_a->text())); 1485//// odebug << "es:" << _a << " : " << (const char *)(_a->text()) << " (" << ActNameToInt(_a->text()) << ")" << oendl;
1485 m_spaceTarget = ActNameToInt(_a->text()); 1486 m_spaceTarget = ActNameToInt(_a->text());
@@ -1565,3 +1566,3 @@ void QTReaderApp::updatefileinfo()
1565 tchar* fl = fromQString(reader->m_lastfile); 1566 tchar* fl = fromQString(reader->m_lastfile);
1566// qDebug("Lastfile:%x", fl); 1567// odebug << "Lastfile:" << fl << "" << oendl;
1567 bool notadded = true; 1568 bool notadded = true;
@@ -1579,3 +1580,3 @@ void QTReaderApp::updatefileinfo()
1579 reader->setSaveData(data, dlen, fd.content(), fd.length()); 1580 reader->setSaveData(data, dlen, fd.content(), fd.length());
1580 // qDebug("Filedata(1):%u, %u", fd.length(), dlen); 1581// odebug << "Filedata(1):" << fd.length() << ", " << dlen << "" << oendl;
1581 // getstate(data, dlen); 1582 // getstate(data, dlen);
@@ -1588,3 +1589,3 @@ void QTReaderApp::updatefileinfo()
1588 } 1589 }
1589// qDebug("Added?:%x", notadded); 1590// odebug << "Added?:" << notadded << "" << oendl;
1590 if (notadded) 1591 if (notadded)
@@ -1598,3 +1599,3 @@ void QTReaderApp::updatefileinfo()
1598 pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate())); 1599 pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate()));
1599 //qDebug("Filedata(2):%u, %u", fd.length(), dlen); 1600// odebug << "Filedata(2):" << fd.length() << ", " << dlen << "" << oendl;
1600 delete [] data; 1601 delete [] data;
@@ -1613,3 +1614,3 @@ void QTReaderApp::fileOpen()
1613*/ 1614*/
1614// qDebug("fileOpen"); 1615// odebug << "fileOpen" << oendl;
1615// if (!reader->m_lastfile.isEmpty()) 1616// if (!reader->m_lastfile.isEmpty())
@@ -1654,3 +1655,3 @@ void QTReaderApp::fileOpen2()
1654// reader->refresh(); 1655// reader->refresh();
1655// qDebug("HEIGHT:%d", reader->m_lastheight); 1656// odebug << "HEIGHT:" << reader->m_lastheight << "" << oendl;
1656} 1657}
@@ -1674,3 +1675,3 @@ QString QTReaderApp::usefilebrowser()
1674 } 1675 }
1675// qDebug("Selected %s", (const char*)fn); 1676// odebug << "Selected " << fn << "" << oendl;
1676 delete fb; 1677 delete fb;
@@ -1805,3 +1806,3 @@ void QTReaderApp::showprefs()
1805 default: 1806 default:
1806 qDebug("Format out of range"); 1807 odebug << "Format out of range" << oendl;
1807 } 1808 }
@@ -1865,3 +1866,3 @@ void QTReaderApp::showtoolbarprefs()
1865 { // "/tmp" 1866 { // "/tmp"
1866 qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); 1867 owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl;
1867 d = QDir::home(); 1868 d = QDir::home();
@@ -1902,3 +1903,3 @@ void QTReaderApp::showtoolbarprefs()
1902 { // "/tmp" 1903 { // "/tmp"
1903 qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); 1904 owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl;
1904 d = QDir::home(); 1905 d = QDir::home();
@@ -2177,3 +2178,3 @@ void QTReaderApp::findNext()
2177{ 2178{
2178// // qDebug("findNext called\n"); 2179// // odebug << "findNext called\n" << oendl;
2179#ifdef __ISEARCH 2180#ifdef __ISEARCH
@@ -2273,8 +2274,8 @@ bool QTReaderApp::dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg)
2273 } 2274 }
2274// qDebug("Found it at %u:%u", pos, offset); 2275// odebug << "Found it at " << pos << ":" << offset << "" << oendl;
2275 pbar->hide(); 2276 pbar->hide();
2276// qDebug("Hid"); 2277// odebug << "Hid" << oendl;
2277 reader->locate(pos+offset); 2278 reader->locate(pos+offset);
2278// qDebug("Loacted"); 2279// odebug << "Loacted" << oendl;
2279// qDebug("page up"); 2280// odebug << "page up" << oendl;
2280 ret = true; 2281 ret = true;
@@ -2335,3 +2336,3 @@ void QTReaderApp::openFile( const QString &f )
2335{ 2336{
2336// qDebug("File:%s", (const char*)f); 2337// odebug << "File:" << f << "" << oendl;
2337// openFile(DocLnk(f)); 2338// openFile(DocLnk(f));
@@ -2382,3 +2383,3 @@ void QTReaderApp::handlekey(QKeyEvent* e)
2382{ 2383{
2383// qDebug("Keypress event"); 2384// odebug << "Keypress event" << oendl;
2384 timeb now; 2385 timeb now;
@@ -2394,3 +2395,3 @@ void QTReaderApp::handlekey(QKeyEvent* e)
2394 case Key_Escape: 2395 case Key_Escape:
2395 // qDebug("escape event"); 2396// odebug << "escape event" << oendl;
2396 if (m_disableesckey) 2397 if (m_disableesckey)
@@ -2409,3 +2410,3 @@ void QTReaderApp::handlekey(QKeyEvent* e)
2409 { 2410 {
2410 // qDebug("escape action"); 2411// odebug << "escape action" << oendl;
2411 doAction(m_escapeTarget, e); 2412 doAction(m_escapeTarget, e);
@@ -2508,3 +2509,3 @@ void QTReaderApp::showEditTools()
2508 { 2509 {
2509 //qDebug("him"); 2510// odebug << "him" << oendl;
2510#ifdef USEQPE 2511#ifdef USEQPE
@@ -2512,3 +2513,3 @@ void QTReaderApp::showEditTools()
2512#endif 2513#endif
2513 //qDebug("eb"); 2514// odebug << "eb" << oendl;
2514 menubar->show(); 2515 menubar->show();
@@ -2534,5 +2535,5 @@ void QTReaderApp::showEditTools()
2534 if (m_fontVisible) m_fontBar->show(); 2535 if (m_fontVisible) m_fontBar->show();
2535 //qDebug("sn"); 2536// odebug << "sn" << oendl;
2536 showNormal(); 2537 showNormal();
2537 //qDebug("sm"); 2538// odebug << "sm" << oendl;
2538#ifdef USEQPE 2539#ifdef USEQPE
@@ -2543,7 +2544,7 @@ void QTReaderApp::showEditTools()
2543 2544
2544// qDebug("uc"); 2545// odebug << "uc" << oendl;
2545 updateCaption(); 2546 updateCaption();
2546// qDebug("rw"); 2547// odebug << "rw" << oendl;
2547 editorStack->raiseWidget( reader ); 2548 editorStack->raiseWidget( reader );
2548// qDebug("sf"); 2549// odebug << "sf" << oendl;
2549 reader->setFocus(); 2550 reader->setFocus();
@@ -2616,3 +2617,3 @@ void QTReaderApp::closeEvent( QCloseEvent *e )
2616{ 2617{
2617// qDebug("Close event"); 2618// odebug << "Close event" << oendl;
2618 if (m_fullscreen) 2619 if (m_fullscreen)
@@ -2633,3 +2634,3 @@ void QTReaderApp::closeEvent( QCloseEvent *e )
2633 { 2634 {
2634 //qDebug("Close disabled"); 2635// odebug << "Close disabled" << oendl;
2635 m_bcloseDisabled = false; 2636 m_bcloseDisabled = false;
@@ -2711,3 +2712,3 @@ bool QTReaderApp::listbkmk(CList<Bkmk>* plist, const QString& _lab)
2711#ifdef _UNICODE 2712#ifdef _UNICODE
2712 // qDebug("Item:%s", (const char*)toQString(i->name())); 2713// odebug << "Item:" << toQString(i->name()) << "" << oendl;
2713 bkmkselector->insertItem(toQString(i->name())); 2714 bkmkselector->insertItem(toQString(i->name()));
@@ -2740,5 +2741,5 @@ void QTReaderApp::do_regedit()
2740 reader->bDoUpdates = false; 2741 reader->bDoUpdates = false;
2741// qDebug("Showing regbar"); 2742// odebug << "Showing regbar" << oendl;
2742 regBar->show(); 2743 regBar->show();
2743// qDebug("Showing kbd"); 2744// odebug << "Showing kbd" << oendl;
2744#ifdef USEQPE 2745#ifdef USEQPE
@@ -2758,6 +2759,6 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk)
2758 ); 2759 );
2759 //qDebug("fileinfo"); 2760// odebug << "fileinfo" << oendl;
2760 if (!fn.isEmpty() && QFileInfo(fn).isFile()) 2761 if (!fn.isEmpty() && QFileInfo(fn).isFile())
2761 { 2762 {
2762 //qDebug("Opening"); 2763// odebug << "Opening" << oendl;
2763 openFile(fn); 2764 openFile(fn);
@@ -2783,3 +2784,3 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk)
2783 } 2784 }
2784 // qDebug("updating"); 2785// odebug << "updating" << oendl;
2785 // showEditTools(); 2786 // showEditTools();
@@ -2814,3 +2815,3 @@ void QTReaderApp::gotobkmk(int ind)
2814 case cDelBkmk: 2815 case cDelBkmk:
2815 //// qDebug("Deleting:%s\n",(*pBkmklist)[ind]->name()); 2816//// odebug << "Deleting:" << (*pBkmklist)[ind]->name() << "\n" << oendl;
2816 pBkmklist->erase(ind); 2817 pBkmklist->erase(ind);
@@ -2914,3 +2915,3 @@ void QTReaderApp::gotobkmk(int ind)
2914 int ret = f->exec(); 2915 int ret = f->exec();
2915 qDebug("Return:%d", ret); 2916 odebug << "Return:" << ret << "" << oendl;
2916 DocLnk* doc = f->getDoc(); 2917 DocLnk* doc = f->getDoc();
@@ -2934,3 +2935,3 @@ void QTReaderApp::gotobkmk(int ind)
2934 fm.saveFile( *doc, rt ); 2935 fm.saveFile( *doc, rt );
2935 qDebug("YES"); 2936 odebug << "YES" << oendl;
2936 } 2937 }
@@ -2938,3 +2939,3 @@ void QTReaderApp::gotobkmk(int ind)
2938 { 2939 {
2939 qDebug("NO"); 2940 odebug << "NO" << oendl;
2940 } 2941 }
@@ -3011,3 +3012,3 @@ void QTReaderApp::do_regaction()
3011 case cSetConfigName: 3012 case cSetConfigName:
3012 // qDebug("Saving config"); 3013// odebug << "Saving config" << oendl;
3013 do_saveconfig(regEdit->text(), false); 3014 do_saveconfig(regEdit->text(), false);
@@ -3103,3 +3104,3 @@ void QTReaderApp::do_setencoding(int i)
3103{ 3104{
3104// qDebug("setencoding:%d", i); 3105// odebug << "setencoding:" << i << "" << oendl;
3105 if (m_fontAction == cChooseEncoding) 3106 if (m_fontAction == cChooseEncoding)
@@ -3111,5 +3112,5 @@ void QTReaderApp::do_setencoding(int i)
3111 m_fontVisible = false; 3112 m_fontVisible = false;
3112// qDebug("showedit"); 3113// odebug << "showedit" << oendl;
3113 if (reader->isVisible()) showEditTools(); 3114 if (reader->isVisible()) showEditTools();
3114// qDebug("showeditdone"); 3115// odebug << "showeditdone" << oendl;
3115} 3116}
@@ -3125,6 +3126,6 @@ void QTReaderApp::do_setfont(const QString& lcn)
3125 m_fontVisible = false; 3126 m_fontVisible = false;
3126// qDebug("showedit"); 3127// odebug << "showedit" << oendl;
3127 //if (reader->isVisible()) 3128 //if (reader->isVisible())
3128 showEditTools(); 3129 showEditTools();
3129// qDebug("showeditdone"); 3130// odebug << "showeditdone" << oendl;
3130} 3131}
@@ -3135,3 +3136,3 @@ void QTReaderApp::do_autogen(const QString& regText)
3135 reader->sizes(fs,ts); 3136 reader->sizes(fs,ts);
3136// // qDebug("Reg:%s\n", (const tchar*)(regEdit->text())); 3137// // odebug << "Reg:" << (const tchar*)(regEdit->text()) << "\n" << oendl;
3137 m_autogenstr = regText; 3138 m_autogenstr = regText;
@@ -3182,3 +3183,3 @@ void QTReaderApp::saveprefs()
3182{ 3183{
3183// qDebug("saveprefs"); 3184// odebug << "saveprefs" << oendl;
3184// reader->saveprefs("uqtreader"); 3185// reader->saveprefs("uqtreader");
@@ -3263,7 +3264,7 @@ void QTReaderApp::oldFile()
3263{ 3264{
3264// qDebug("oldFile called"); 3265// odebug << "oldFile called" << oendl;
3265 reader->setText(true); 3266 reader->setText(true);
3266// qDebug("settext called"); 3267// odebug << "settext called" << oendl;
3267 showEditTools(); 3268 showEditTools();
3268// qDebug("showedit called"); 3269// odebug << "showedit called" << oendl;
3269} 3270}
@@ -3343,6 +3344,6 @@ void QTReaderApp::readfilelist()
3343#endif /* USEQPE */ 3344#endif /* USEQPE */
3344// qDebug("Reading open files"); 3345// odebug << "Reading open files" << oendl;
3345 pOpenlist = bf.readall(); 3346 pOpenlist = bf.readall();
3346// if (pOpenlist != NULL) qDebug("...with success"); 3347// if (pOpenlist != NULL) odebug << "...with success" << oendl;
3347// else qDebug("...without success!"); 3348// else odebug << "...without success!" << oendl;
3348} 3349}
@@ -3361,3 +3362,3 @@ void QTReaderApp::savefilelist()
3361#endif /* USEQPE */ 3362#endif /* USEQPE */
3362 //qDebug("Writing open files"); 3363// odebug << "Writing open files" << oendl;
3363 bf.write(*pOpenlist); 3364 bf.write(*pOpenlist);
@@ -3471,3 +3472,3 @@ void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString&
3471{ 3472{
3472//// qDebug("OnWordSelected(%u):%s", posn, (const char*)wrd); 3473//// odebug << "OnWordSelected(" << posn << "):" << wrd << "" << oendl;
3473 3474
@@ -3521,3 +3522,3 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e)
3521 e->accept(); 3522 e->accept();
3522 //qDebug("Accepted"); 3523// odebug << "Accepted" << oendl;
3523 switch (a) 3524 switch (a)
@@ -3584,3 +3585,3 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e)
3584 default: 3585 default:
3585 qDebug("Unknown ActionType:%u", a); 3586 odebug << "Unknown ActionType:" << a << "" << oendl;
3586 break; 3587 break;
@@ -3602,3 +3603,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full)
3602{ 3603{
3603// qDebug("do_saveconfig:%s", (const char*)_txt); 3604// odebug << "do_saveconfig:" << _txt << "" << oendl;
3604#ifdef USEQPE 3605#ifdef USEQPE
@@ -3625,3 +3626,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full)
3625 { 3626 {
3626 // qDebug("full:%s", (const char*)_txt); 3627// odebug << "full:" << _txt << "" << oendl;
3627 QDir d = QDir::home(); // "/" 3628 QDir d = QDir::home(); // "/"
@@ -3629,3 +3630,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full)
3629 { // "/tmp" 3630 { // "/tmp"
3630 qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); 3631 owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl;
3631 d = QDir::home(); 3632 d = QDir::home();
@@ -3641,3 +3642,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full)
3641 { // "/tmp" 3642 { // "/tmp"
3642 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 3643 owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl;
3643 d = QDir::home(); 3644 d = QDir::home();
@@ -3648,3 +3649,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full)
3648 { // "/tmp" 3649 { // "/tmp"
3649 qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); 3650 owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl;
3650 d = QDir::home(); 3651 d = QDir::home();
@@ -3656,3 +3657,3 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full)
3656 } 3657 }
3657 //qDebug("Path:%s", (const char*)fi.absFilePath()); 3658// odebug << "Path:" << fi.absFilePath() << "" << oendl;
3658 Config config(fi.absFilePath()); 3659 Config config(fi.absFilePath());
@@ -3936,3 +3937,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false)
3936 { // "/tmp" 3937 { // "/tmp"
3937 qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); 3938 owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl;
3938 d = QDir::home(); 3939 d = QDir::home();
@@ -3948,3 +3949,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false)
3948 { // "/tmp" 3949 { // "/tmp"
3949 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 3950 owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl;
3950 d = QDir::home(); 3951 d = QDir::home();
@@ -3955,3 +3956,3 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false)
3955 { // "/tmp" 3956 { // "/tmp"
3956 qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); 3957 owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl;
3957 d = QDir::home(); 3958 d = QDir::home();
@@ -4063,3 +4064,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir)
4063 if ( !d.cd(APPDIR) ) { // "/tmp" 4064 if ( !d.cd(APPDIR) ) { // "/tmp"
4064 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 4065 owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl;
4065 d = QDir::home(); 4066 d = QDir::home();
@@ -4069,3 +4070,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir)
4069 if ( !d.cd(tgtdir) ) { // "/tmp" 4070 if ( !d.cd(tgtdir) ) { // "/tmp"
4070 qWarning( "Cannot find the \"~/" APPDIR "/%s\" directory", tgtdir ); 4071 owarn << "Cannot find the \"~/" APPDIR "/" << tgtdir << "\" directory" << oendl;
4071 d = QDir::home(); 4072 d = QDir::home();
@@ -4086,3 +4087,3 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir)
4086 4087
4087 //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); 4088 //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl;
4088 ++it; // goto next list element 4089 ++it; // goto next list element
@@ -4170,3 +4171,3 @@ void QTReaderApp::OnURLSelected(const QString& href)
4170 cb->setText(href); 4171 cb->setText(href);
4171 qDebug("<a href=\"%s\">%s</a>", (const char*)href, (const char*)href); 4172 odebug << "<a href=\"" << href << "\">" << href << "</a>" << oendl;
4172 } 4173 }
@@ -4194,3 +4195,3 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href)
4194 { // "/tmp" 4195 { // "/tmp"
4195 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 4196 owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl;
4196 d = QDir::home(); 4197 d = QDir::home();
@@ -4201,3 +4202,3 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href)
4201 { // "/tmp" 4202 { // "/tmp"
4202 qWarning( "Cannot find the \"~/" APPDIR "/urls\" directory" ); 4203 owarn << "Cannot find the \"~/" APPDIR "/urls\" directory" << oendl;
4203 d = QDir::home(); 4204 d = QDir::home();
diff --git a/noncore/apps/opie-reader/StyleConsts.cpp b/noncore/apps/opie-reader/StyleConsts.cpp
index 9fb56b7..f47acee 100644
--- a/noncore/apps/opie-reader/StyleConsts.cpp
+++ b/noncore/apps/opie-reader/StyleConsts.cpp
@@ -8,3 +8,3 @@ pmstore::~pmstore()
8{ 8{
9//// qDebug("Deleting image"); 9//// odebug << "Deleting image" << oendl;
10 delete graphic; 10 delete graphic;
diff --git a/noncore/apps/opie-reader/fileBrowser.cpp b/noncore/apps/opie-reader/fileBrowser.cpp
index e1cde6c..72a1222 100644
--- a/noncore/apps/opie-reader/fileBrowser.cpp
+++ b/noncore/apps/opie-reader/fileBrowser.cpp
@@ -134,3 +134,3 @@ void fileBrowser::populateList()
134 ListView->clear(); 134 ListView->clear();
135////qDebug(currentDir.canonicalPath()); 135////odebug << currentDir.canonicalPath() << oendl;
136// currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks ); 136// currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks );
@@ -158,3 +158,3 @@ void fileBrowser::populateList()
158 { 158 {
159//// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); 159//// odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl;
160 } 160 }
@@ -171,3 +171,3 @@ void fileBrowser::upDir()
171{ 171{
172//// qDebug(currentDir.canonicalPath()); 172//// odebug << currentDir.canonicalPath() << oendl;
173} 173}
@@ -179,3 +179,3 @@ void fileBrowser::listClicked(QListViewItem *selectedItem)
179 179
180//// qDebug("%s", (const char*)strItem); 180//// odebug << "" << strItem << "" << oendl;
181 181
diff --git a/noncore/apps/opie-reader/opie-reader.pro b/noncore/apps/opie-reader/opie-reader.pro
index e42204a..dbf6964 100644
--- a/noncore/apps/opie-reader/opie-reader.pro
+++ b/noncore/apps/opie-reader/opie-reader.pro
@@ -87,3 +87,3 @@ INCLUDEPATH += $(OPIEDIR)/include
87 DEPENDPATH+= $(OPIEDIR)/include 87 DEPENDPATH+= $(OPIEDIR)/include
88 LIBS += -lqpe 88LIBS += -lqpe -lopiecore2
89 89
diff --git a/noncore/apps/opie-reader/plucker.cpp b/noncore/apps/opie-reader/plucker.cpp
index e52fd6a..a8e688f 100644
--- a/noncore/apps/opie-reader/plucker.cpp
+++ b/noncore/apps/opie-reader/plucker.cpp
@@ -59,3 +59,3 @@ int CPlucker::bgetch()
59 if (bufferrec >= ntohs(head.recordList.numRecords) - 1) return EOF; 59 if (bufferrec >= ntohs(head.recordList.numRecords) - 1) return EOF;
60 ////qDebug("Passing through %u", currentpos); 60 ////odebug << "Passing through " << currentpos << "" << oendl;
61 if (!expand(bufferrec+1)) return EOF; 61 if (!expand(bufferrec+1)) return EOF;
@@ -66,3 +66,3 @@ int CPlucker::bgetch()
66 { 66 {
67 // qDebug("Skipping extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); 67 // odebug << "Skipping extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl;
68 m_nextParaIndex++; 68 m_nextParaIndex++;
@@ -71,3 +71,3 @@ int CPlucker::bgetch()
71 mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); 71 mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2);
72 //qDebug("Using extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); 72 //odebug << "Using extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl;
73 ch = 10; 73 ch = 10;
@@ -81,3 +81,3 @@ int CPlucker::bgetch()
81 m_nextParaIndex++; 81 m_nextParaIndex++;
82 // qDebug("Skipping extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); 82 // odebug << "Skipping extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl;
83 if (m_nextParaIndex == m_nParas) 83 if (m_nextParaIndex == m_nParas)
@@ -93,3 +93,3 @@ int CPlucker::bgetch()
93 mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2); 93 mystyle.setExtraSpace((m_ParaAttrs[m_nextParaIndex]&7)*2);
94 //qDebug("Using extraspace:%d", m_ParaAttrs[m_nextParaIndex]&7); 94 //odebug << "Using extraspace:" << m_ParaAttrs[m_nextParaIndex]&7 << "" << oendl;
95 if (m_lastBreak == locate()) 95 if (m_lastBreak == locate())
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,13 +1,15 @@
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
@@ -18,5 +20,11 @@
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
@@ -95,3 +103,3 @@ char* CPlucker_base::geturl(UInt16 tgt)
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;
@@ -105,3 +113,3 @@ char* CPlucker_base::geturl(UInt16 tgt)
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)
@@ -110,5 +118,5 @@ char* CPlucker_base::geturl(UInt16 tgt)
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 }
@@ -131,3 +139,3 @@ char* CPlucker_base::geturl(UInt16 tgt)
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)
@@ -138,3 +146,3 @@ char* CPlucker_base::geturl(UInt16 tgt)
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));
@@ -145,3 +153,3 @@ char* CPlucker_base::geturl(UInt16 tgt)
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;
@@ -155,3 +163,3 @@ char* CPlucker_base::geturl(UInt16 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;
@@ -252,3 +260,3 @@ void CPlucker_base::locate(unsigned int n)
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);
@@ -277,3 +285,3 @@ void CPlucker_base::locate(unsigned int n)
277 } 285 }
278// qDebug("Time(1): %u", clock()-start); 286// odebug << "Time(1): " << clock()-start << "" << oendl;
279/* 287/*
@@ -323,6 +331,6 @@ void CPlucker_base::locate(unsigned int 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;
@@ -334,3 +342,3 @@ void CPlucker_base::locate(unsigned int n)
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 }
@@ -373,5 +381,5 @@ bool CPlucker_base::expand(int thisrec)
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;
@@ -382,3 +390,3 @@ bool CPlucker_base::expand(int thisrec)
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;
@@ -393,3 +401,3 @@ bool CPlucker_base::expand(int thisrec)
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 }
@@ -398,3 +406,3 @@ bool CPlucker_base::expand(int thisrec)
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;
@@ -420,3 +428,3 @@ bool CPlucker_base::expand(int thisrec)
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;
@@ -454,3 +462,3 @@ void CPlucker_base::UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuff
454 462
455 ////qDebug("err:%d - %u", err, zstream.avail_in); 463// //odebug << "err:" << err << " - " << zstream.avail_in << "" << oendl;
456 464
@@ -536,5 +544,5 @@ CList<Bkmk>* CPlucker_base::getbkmklist()
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 }
@@ -594,3 +602,3 @@ void CPlucker_base::showimg(UInt16 tgt)
594{ 602{
595 //qDebug("Crassssssh!"); 603 //odebug << "Crassssssh!" << oendl;
596 QPixmap* qimage = expandimg(tgt); 604 QPixmap* qimage = expandimg(tgt);
@@ -605,3 +613,3 @@ void CPlucker_base::showimg(UInt16 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);
@@ -612,3 +620,3 @@ void CPlucker_base::showimg(UInt16 tgt)
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"))
@@ -629,3 +637,3 @@ unsigned 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);
@@ -640,3 +648,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
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)
@@ -661,3 +669,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
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)
@@ -669,3 +677,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
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)
@@ -674,3 +682,3 @@ unsigned short CPlucker_base::finduid(unsigned short urlid)
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!
@@ -700,3 +708,3 @@ void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsig
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));
@@ -723,3 +731,3 @@ void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen)
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);
@@ -753,6 +761,6 @@ int CPlucker_base::OpenFile(const char *src)
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;
@@ -763,3 +771,3 @@ int CPlucker_base::OpenFile(const char *src)
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);
@@ -821,3 +829,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
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;
@@ -833,3 +841,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
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++;
@@ -859,3 +867,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
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);
@@ -928,3 +936,3 @@ linkType CPlucker_base::hyperlink(unsigned int n, QString& wrd)
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);
@@ -958,3 +966,3 @@ tchar CPlucker_base::getch_base(bool fast)
958 ch = bgetch(); 966 ch = bgetch();
959 ////qDebug("Function:%x", ch); 967// //odebug << "Function:" << ch << "" << oendl;
960 switch (ch) 968 switch (ch)
@@ -962,3 +970,3 @@ tchar CPlucker_base::getch_base(bool fast)
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())
@@ -982,3 +990,3 @@ tchar CPlucker_base::getch_base(bool fast)
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 }
@@ -994,6 +1002,6 @@ tchar CPlucker_base::getch_base(bool fast)
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);
@@ -1040,3 +1048,3 @@ tchar CPlucker_base::getch_base(bool fast)
1040 ch = bgetch(); 1048 ch = bgetch();
1041 // //qDebug("Font:%d",ch); 1049// //odebug << "Font:" << ch << "" << oendl;
1042 mystyle.setVOffset(0); 1050 mystyle.setVOffset(0);
@@ -1074,3 +1082,3 @@ tchar CPlucker_base::getch_base(bool fast)
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();
@@ -1089,3 +1097,3 @@ tchar CPlucker_base::getch_base(bool fast)
1089 default: 1097 default:
1090 qDebug("Unrecognised font"); 1098 odebug << "Unrecognised font" << oendl;
1091 break; 1099 break;
@@ -1101,3 +1109,3 @@ tchar CPlucker_base::getch_base(bool fast)
1101 mystyle.setLeftJustify(); 1109 mystyle.setLeftJustify();
1102 // //qDebug("left"); 1110// //odebug << "left" << oendl;
1103 break; 1111 break;
@@ -1105,3 +1113,3 @@ tchar CPlucker_base::getch_base(bool fast)
1105 mystyle.setRightJustify(); 1113 mystyle.setRightJustify();
1106 // //qDebug("right"); 1114// //odebug << "right" << oendl;
1107 break; 1115 break;
@@ -1109,3 +1117,3 @@ tchar CPlucker_base::getch_base(bool fast)
1109 mystyle.setCentreJustify(); 1117 mystyle.setCentreJustify();
1110 // //qDebug("centre"); 1118// //odebug << "centre" << oendl;
1111 break; 1119 break;
@@ -1113,3 +1121,3 @@ tchar CPlucker_base::getch_base(bool fast)
1113 mystyle.setFullJustify(); 1121 mystyle.setFullJustify();
1114 // //qDebug("full"); 1122// //odebug << "full" << oendl;
1115 break; 1123 break;
@@ -1136,3 +1144,3 @@ tchar CPlucker_base::getch_base(bool fast)
1136 { 1144 {
1137 //qDebug("Alternate image:%x", ir); 1145 //odebug << "Alternate image:" << ir << "" << oendl;
1138 UInt16 ir2 = bgetch(); 1146 UInt16 ir2 = bgetch();
@@ -1151,3 +1159,3 @@ tchar CPlucker_base::getch_base(bool fast)
1151 } 1159 }
1152 // if (mystyle.getLink()) qDebug("Picture link!"); 1160// if (mystyle.getLink()) odebug << "Picture link!" << oendl;
1153 ch = '#'; 1161 ch = '#';
@@ -1162,3 +1170,3 @@ tchar CPlucker_base::getch_base(bool fast)
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)
@@ -1169,3 +1177,3 @@ tchar CPlucker_base::getch_base(bool fast)
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 = '#';
@@ -1184,6 +1192,6 @@ tchar CPlucker_base::getch_base(bool fast)
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();
@@ -1205,3 +1213,3 @@ tchar CPlucker_base::getch_base(bool fast)
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 }
@@ -1210,3 +1218,3 @@ tchar CPlucker_base::getch_base(bool fast)
1210 default: 1218 default:
1211 qDebug("Function:%x NOT IMPLEMENTED", ch); 1219 odebug << "Function:" << ch << " NOT IMPLEMENTED" << oendl;
1212 { 1220 {
@@ -1216,3 +1224,3 @@ tchar CPlucker_base::getch_base(bool fast)
1216 ch = bgetch(); 1224 ch = bgetch();
1217 //qDebug("Arg %d, %d", i, ch); 1225 //odebug << "Arg " << i << ", " << ch << "" << oendl;
1218 } 1226 }