summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_htc.cpp3
-rw-r--r--libopie2/opiepim/private/opimeventsortvector.cpp9
-rw-r--r--noncore/apps/confedit/listviewitemconffile.cpp19
-rw-r--r--noncore/apps/opie-console/io_irda.cpp1
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp8
-rw-r--r--noncore/apps/opie-reader/CFilter.cpp2
-rw-r--r--noncore/apps/opie-reader/CRegExp.cpp4
-rw-r--r--noncore/apps/opie-reader/Palm2QImage.cpp4
-rw-r--r--noncore/apps/opie-reader/QTReader.cpp2
-rw-r--r--noncore/apps/opie-reader/plucker_base.cpp2
-rw-r--r--noncore/apps/opie-reader/striphtml.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/document/katehighlight.cpp6
-rw-r--r--noncore/net/ftplib/ftplib.c2
-rw-r--r--noncore/settings/sysinfo/contrib/dhry.c2
14 files changed, 33 insertions, 33 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp
index c21e10d..4e5200b 100644
--- a/libopie2/opiecore/device/odevice_htc.cpp
+++ b/libopie2/opiecore/device/odevice_htc.cpp
@@ -411,34 +411,33 @@ bool HTC::setDisplayStatus( bool on )
411 char buf[10]; 411 char buf[10];
412 buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; 412 buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
413 buf[1] = '\0'; 413 buf[1] = '\0';
414 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 414 res = ( ::write( fd, &buf[0], 2 ) == 0 );
415 ::close( fd ); 415 ::close( fd );
416 } 416 }
417 return res; 417 return res;
418} 418}
419 419
420Transformation HTC::rotation() const 420Transformation HTC::rotation() const
421{ 421{
422 qDebug( "HTC::rotation()" ); 422 qDebug( "HTC::rotation()" );
423 Transformation rot; 423 Transformation rot = Rot270;
424 424
425 switch ( d->m_model ) { 425 switch ( d->m_model ) {
426 case Model_HTC_Universal: 426 case Model_HTC_Universal:
427 { 427 {
428 OHingeStatus hs = readHingeSensor(); 428 OHingeStatus hs = readHingeSensor();
429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs ); 429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs );
430 if ( hs == CASE_PORTRAIT ) rot = Rot0; 430 if ( hs == CASE_PORTRAIT ) rot = Rot0;
431 else if ( hs == CASE_UNKNOWN ) rot = Rot270; 431 else if ( hs == CASE_UNKNOWN ) rot = Rot270;
432 else rot = Rot270;
433 } 432 }
434 break; 433 break;
435 } 434 }
436 435
437 qDebug( "HTC::rotation() - returning '%d'", rot ); 436 qDebug( "HTC::rotation() - returning '%d'", rot );
438 return rot; 437 return rot;
439} 438}
440ODirection HTC::direction() const 439ODirection HTC::direction() const
441{ 440{
442 ODirection dir; 441 ODirection dir;
443 442
444 switch ( d->m_model ) { 443 switch ( d->m_model ) {
diff --git a/libopie2/opiepim/private/opimeventsortvector.cpp b/libopie2/opiepim/private/opimeventsortvector.cpp
index 4220c63..b85f848 100644
--- a/libopie2/opiepim/private/opimeventsortvector.cpp
+++ b/libopie2/opiepim/private/opimeventsortvector.cpp
@@ -28,61 +28,58 @@
28*/ 28*/
29 29
30#include "opimeventsortvector.h" 30#include "opimeventsortvector.h"
31#include <opie2/ocontactaccess.h> 31#include <opie2/ocontactaccess.h>
32#include <opie2/opimnotifymanager.h> 32#include <opie2/opimnotifymanager.h>
33#include <opie2/odatebookaccess.h> 33#include <opie2/odatebookaccess.h>
34 34
35#include <qvaluelist.h> 35#include <qvaluelist.h>
36 36
37namespace Opie { 37namespace Opie {
38namespace Internal { 38namespace Internal {
39 39
40namespace{ 40int testAlarmNotifiers( const OPimNotifyManager& leftnotifiers, const OPimNotifyManager& rightnotifiers ){
41
42inline int testAlarmNotifiers( const OPimNotifyManager& leftnotifiers, const OPimNotifyManager& rightnotifiers ){
43 OPimNotifyManager::Alarms left_alarms = leftnotifiers.alarms(); 41 OPimNotifyManager::Alarms left_alarms = leftnotifiers.alarms();
44 OPimNotifyManager::Alarms right_alarms = rightnotifiers.alarms(); 42 OPimNotifyManager::Alarms right_alarms = rightnotifiers.alarms();
45 43
46 // Well.. How could we compare two lists of alarms? I think we should find the most early datetimes 44 // Well.. How could we compare two lists of alarms? I think we should find the most early datetimes
47 // and compare them.. (se) 45 // and compare them.. (se)
48 // Find the first alarm of the left list 46 // Find the first alarm of the left list
49 OPimNotifyManager::Alarms::Iterator it; 47 OPimNotifyManager::Alarms::Iterator it;
50 QDateTime left_earliest; // This datetime is initialized as invalid!! 48 QDateTime left_earliest; // This datetime is initialized as invalid!!
51 for ( it = left_alarms.begin(); it != left_alarms.end(); ++it ){ 49 for ( it = left_alarms.begin(); it != left_alarms.end(); ++it ){
52 if ( !left_earliest.isValid() || left_earliest > (*it).dateTime() ){ 50 if ( !left_earliest.isValid() || left_earliest > (*it).dateTime() ){
53 left_earliest = (*it).dateTime(); 51 left_earliest = (*it).dateTime();
54 } 52 }
55 } 53 }
56 QDateTime right_earliest; // This datetime is initialized as invalid!! 54 QDateTime right_earliest; // This datetime is initialized as invalid!!
57 for ( it = right_alarms.begin(); it != right_alarms.end(); ++it ){ 55 for ( it = right_alarms.begin(); it != right_alarms.end(); ++it ){
58 if ( !right_earliest.isValid() || right_earliest > (*it).dateTime() ){ 56 if ( !right_earliest.isValid() || right_earliest > (*it).dateTime() ){
59 right_earliest = (*it).dateTime(); 57 right_earliest = (*it).dateTime();
60 } 58 }
61 } 59 }
62 60
63 int ret; 61 int ret = 0;
64 62
65 // Now compare this found alarms 63 // Now compare this found alarms
66 if ( !left_earliest .isValid() ) ret++; 64 if ( !left_earliest .isValid() ) ret++;
67 if ( !right_earliest.isValid() ) ret--; 65 if ( !right_earliest.isValid() ) ret--;
68 66
69 if ( left_earliest.isValid() && right_earliest.isValid() ){ 67 if ( left_earliest.isValid() && right_earliest.isValid() ){
70 ret += left_earliest < right_earliest ? -1 : 1; 68 left_earliest < right_earliest ? ret-- : ret++;
71 } 69 }
72 70
73 return ret; 71 return ret;
74 72
75} 73}
76}
77 74
78OPimEventSortVector::OPimEventSortVector( uint size, bool asc, int sort ) 75OPimEventSortVector::OPimEventSortVector( uint size, bool asc, int sort )
79 : OPimSortVector<OPimEvent>( size, asc, sort ) {} 76 : OPimSortVector<OPimEvent>( size, asc, sort ) {}
80 77
81int OPimEventSortVector::compareItems( const OPimEvent& left, 78int OPimEventSortVector::compareItems( const OPimEvent& left,
82 const OPimEvent& right ) { 79 const OPimEvent& right ) {
83 if ( left.uid() == right.uid() ) 80 if ( left.uid() == right.uid() )
84 return 0; 81 return 0;
85 82
86 int ret = 0; 83 int ret = 0;
87 bool asc = sortAscending(); 84 bool asc = sortAscending();
88 85
diff --git a/noncore/apps/confedit/listviewitemconffile.cpp b/noncore/apps/confedit/listviewitemconffile.cpp
index 2958cf5..a7d6b00 100644
--- a/noncore/apps/confedit/listviewitemconffile.cpp
+++ b/noncore/apps/confedit/listviewitemconffile.cpp
@@ -41,50 +41,55 @@ void ListViewItemConfFile::displayText()
41 41
42QString ListViewItemConfFile::fileName() 42QString ListViewItemConfFile::fileName()
43{ 43{
44 return confFileInfo->fileName(); 44 return confFileInfo->fileName();
45} 45}
46 46
47void ListViewItemConfFile::parseFile() 47void ListViewItemConfFile::parseFile()
48{ 48{
49 //odebug << "ListViewItemConfFile::parseFile BEGIN" << oendl; 49 //odebug << "ListViewItemConfFile::parseFile BEGIN" << oendl;
50 QFile confFile(confFileInfo->absFilePath()); 50 QFile confFile(confFileInfo->absFilePath());
51 if(! confFile.open(IO_ReadOnly)) 51 if(! confFile.open(IO_ReadOnly))
52 QMessageBox::critical(0,tr("Could not open"),tr("The file ")+confFileInfo->fileName()+tr(" could not be opened."),1,0); 52 QMessageBox::critical(0,tr("Could not open"),tr("The file ")+confFileInfo->fileName()+tr(" could not be opened."),1,0);
53
53 QTextStream t( &confFile ); 54 QTextStream t( &confFile );
54 QString s; 55 QString s;
55 QString group; 56 QString group;
56 ListViewItemConfigEntry *groupItem; 57 ListViewItemConfigEntry *groupItem = 0;
57 ListViewItemConfigEntry *item; 58 ListViewItemConfigEntry *item;
58 while ( !t.atEnd() ) 59 while ( !t.atEnd() )
59 { 60 {
60 s = t.readLine().stripWhiteSpace(); 61 s = t.readLine().stripWhiteSpace();
61 //odebug << "line: >" << s.latin1() << "<\n" << oendl; 62 //odebug << "line: >" << s.latin1() << "<\n" << oendl;
62 if (s.contains("<?xml")) 63 if (s.contains("<?xml"))
63 { 64 {
64 _valid = false; 65 _valid = false;
65 break; 66 break;
66 }else 67 }
67 if ( s[0] == '[' && s[s.length()-1] == ']' ) 68 else if ( s[0] == '[' && s[s.length()-1] == ']' )
68 { 69 {
69 // odebug << "got group"+s << oendl; 70 // odebug << "got group"+s << oendl;
70 group = s.mid(1,s.length()-2); 71 group = s.mid(1,s.length()-2);
71 if (!groupItem) groupItem = new ListViewItemConfigEntry(this, tr("no group") ); 72 if (!groupItem)
73 groupItem = new ListViewItemConfigEntry(this, tr("no group") );
74
72 groupItem = new ListViewItemConfigEntry(this, group ); 75 groupItem = new ListViewItemConfigEntry(this, group );
73 insertItem( groupItem ); 76 insertItem( groupItem );
74 } else 77 }
75 if ( int pos = s.find('=') ) 78 else if ( int pos = s.find('=') )
76 { 79 {
77// odebug << "got key"+s << oendl; 80// odebug << "got key"+s << oendl;
78 if (!groupItem) odebug << "PANIK NO GROUP! >" << group.latin1() << "<" << oendl; 81 if (!groupItem)
82 odebug << "PANIC! no group >" << group.latin1() << "<" << oendl;
83
79 item = new ListViewItemConfigEntry(this, group, s ); 84 item = new ListViewItemConfigEntry(this, group, s );
80 groupItem->insertItem( item ); 85 groupItem->insertItem( item );
81 } 86 }
82 } 87 }
83 confFile.close(); 88 confFile.close();
84 setExpandable( _valid ); 89 setExpandable( _valid );
85 //odebug << "ListViewItemConfFile::parseFile END" << oendl; 90 //odebug << "ListViewItemConfFile::parseFile END" << oendl;
86} 91}
87 92
88 93
89void ListViewItemConfFile::remove() 94void ListViewItemConfFile::remove()
90{ 95{
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index 9d27c85..a0f72ae 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -26,24 +26,25 @@ bool IOIrda::open() {
26 m_attach = new Opie::Core::OProcess(); 26 m_attach = new Opie::Core::OProcess();
27 *m_attach << "irattach /dev/ttyS2 -s"; 27 *m_attach << "irattach /dev/ttyS2 -s";
28 28
29 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), 29 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
30 this, SLOT( slotExited(Opie::Core::OProcess*) ) ); 30 this, SLOT( slotExited(Opie::Core::OProcess*) ) );
31 31
32 if ( m_attach->start() ) { 32 if ( m_attach->start() ) {
33 ret= IOSerial::open(); 33 ret= IOSerial::open();
34 } else { 34 } else {
35 // emit error!!! 35 // emit error!!!
36 delete m_attach; 36 delete m_attach;
37 m_attach = 0l; 37 m_attach = 0l;
38 ret = false;
38 } 39 }
39 return ret; 40 return ret;
40} 41}
41 42
42void IOIrda::reload( const Profile &config ) { 43void IOIrda::reload( const Profile &config ) {
43 m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); 44 m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE);
44 m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); 45 m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD);
45 m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); 46 m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY);
46 m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); 47 m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS);
47 m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); 48 m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS);
48 m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); 49 m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW);
49} 50}
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index aba7244..a884179 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -698,33 +698,29 @@ void MainWindow::slotFullscreen() {
698 ( m_curSession->widgetStack() )->show(); 698 ( m_curSession->widgetStack() )->show();
699 699
700 ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); 700 ( ( m_curSession->emulationHandler() )->cornerButton() )->show();
701 701
702 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 702 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
703 } 703 }
704 704
705 m_isFullscreen = !m_isFullscreen; 705 m_isFullscreen = !m_isFullscreen;
706} 706}
707 707
708void MainWindow::slotScrollbarSelected(int index) 708void MainWindow::slotScrollbarSelected(int index)
709{ 709{
710 int loc; 710 int loc = 0;
711 711
712 Config cfg( "Konsole" ); 712 Config cfg( "Konsole" );
713 cfg.setGroup("ScrollBar"); 713 cfg.setGroup("ScrollBar");
714 if(index == sm_none) 714 if(index == sm_left)
715 {
716 loc = 0;
717 }
718 else if(index == sm_left)
719 { 715 {
720 loc = 1; 716 loc = 1;
721 } 717 }
722 else if(index == sm_right) 718 else if(index == sm_right)
723 { 719 {
724 loc = 2; 720 loc = 2;
725 } 721 }
726 722
727 cfg.writeEntry("Position", loc); 723 cfg.writeEntry("Position", loc);
728 724
729 if (currentSession()) { 725 if (currentSession()) {
730 currentSession()->emulationHandler()->setScrollbarLocation(loc); 726 currentSession()->emulationHandler()->setScrollbarLocation(loc);
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp
index 25cdfae..a4ea60a 100644
--- a/noncore/apps/opie-reader/CFilter.cpp
+++ b/noncore/apps/opie-reader/CFilter.cpp
@@ -492,25 +492,25 @@ void DePluck::getch(tchar& ch, CStyle& sty, unsigned long& pos)
492 { 492 {
493 m_current = m_buffed = 0; 493 m_current = m_buffed = 0;
494 } 494 }
495 } 495 }
496 else 496 else
497 { 497 {
498 if (m_buffer != 0) 498 if (m_buffer != 0)
499 { 499 {
500 ch = m_buffer; 500 ch = m_buffer;
501 m_buffer = 0; 501 m_buffer = 0;
502 return; 502 return;
503 } 503 }
504 unsigned long lnk, lnkoff; 504 unsigned long lnk = 0, lnkoff = 0;
505 do 505 do
506 { 506 {
507 if (nextpart[m_buffed] == 0) break; 507 if (nextpart[m_buffed] == 0) break;
508 parent->getch(ch, sty, pos); 508 parent->getch(ch, sty, pos);
509 m_laststyle = sty; 509 m_laststyle = sty;
510 if (sty.getLink()) 510 if (sty.getLink())
511 { 511 {
512 lnk = sty.getData(); 512 lnk = sty.getData();
513 lnkoff = sty.getOffset(); 513 lnkoff = sty.getOffset();
514 } 514 }
515 } while (ch == nextpart[m_buffed] && sty.getLink() && ++m_buffed); 515 } while (ch == nextpart[m_buffed] && sty.getLink() && ++m_buffed);
516 m_current = 0; 516 m_current = 0;
diff --git a/noncore/apps/opie-reader/CRegExp.cpp b/noncore/apps/opie-reader/CRegExp.cpp
index 6318d28..e3194df 100644
--- a/noncore/apps/opie-reader/CRegExp.cpp
+++ b/noncore/apps/opie-reader/CRegExp.cpp
@@ -100,25 +100,25 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens)
100 { 100 {
101#ifdef _WINDOWS 101#ifdef _WINDOWS
102 tchar c = escapedchar(pat.at(++p).unicode()); 102 tchar c = escapedchar(pat.at(++p).unicode());
103#else 103#else
104 tchar c = escapedchar(pat[++p].unicode()); 104 tchar c = escapedchar(pat[++p].unicode());
105#endif 105#endif
106 regchar(c, insens); 106 regchar(c, insens);
107 break; 107 break;
108 } 108 }
109 109
110 case '[' : 110 case '[' :
111 { 111 {
112 tchar clast; 112 tchar clast = 0;
113 bool invert = false; 113 bool invert = false;
114 tchar c; 114 tchar c;
115#ifdef _WINDOWS 115#ifdef _WINDOWS
116 if (pat.at(p+1).unicode() == '^') 116 if (pat.at(p+1).unicode() == '^')
117#else 117#else
118 if (pat[p+1].unicode() == '^') 118 if (pat[p+1].unicode() == '^')
119#endif 119#endif
120 { 120 {
121 p++; 121 p++;
122 invert = true; 122 invert = true;
123 } 123 }
124#ifdef _WINDOWS 124#ifdef _WINDOWS
@@ -278,25 +278,25 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens)
278 CV[lower(c)] |= bit[m]; 278 CV[lower(c)] |= bit[m];
279 } 279 }
280 else 280 else
281 { 281 {
282 CV[c] |= bit[m]; 282 CV[c] |= bit[m];
283 } 283 }
284 m++; 284 m++;
285 break; 285 break;
286 } 286 }
287 287
288 case '[' : 288 case '[' :
289 { 289 {
290 tchar c, clast; 290 tchar c, clast = 0;
291 bool invert = false; 291 bool invert = false;
292#ifdef _WINDOWS 292#ifdef _WINDOWS
293 if (pat.at(p+1).unicode() == '^') 293 if (pat.at(p+1).unicode() == '^')
294#else 294#else
295 if (pat[p+1].unicode() == '^') 295 if (pat[p+1].unicode() == '^')
296#endif 296#endif
297 { 297 {
298 p++; 298 p++;
299 invert = true; 299 invert = true;
300 } 300 }
301#ifdef _WINDOWS 301#ifdef _WINDOWS
302 while ((c = pat.at(++p).unicode()) != ']') 302 while ((c = pat.at(++p).unicode()) != ']')
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp
index 361755f..09cad1c 100644
--- a/noncore/apps/opie-reader/Palm2QImage.cpp
+++ b/noncore/apps/opie-reader/Palm2QImage.cpp
@@ -116,25 +116,25 @@ static ColorMapEntry Palm2BitColormap[] = {
116static ColorMapEntry Palm4BitColormap[] = { 116static ColorMapEntry Palm4BitColormap[] = {
117 { 255, 255, 255 }, { 238, 238, 238 }, { 221, 221, 221 }, { 204, 204, 204 }, 117 { 255, 255, 255 }, { 238, 238, 238 }, { 221, 221, 221 }, { 204, 204, 204 },
118 { 187, 187, 187 }, { 170, 170, 170 }, { 153, 153, 153 }, { 136, 136, 136 }, 118 { 187, 187, 187 }, { 170, 170, 170 }, { 153, 153, 153 }, { 136, 136, 136 },
119 { 119, 119, 119 }, { 102, 102, 102 }, { 85, 85, 85 }, { 68, 68, 68 }, 119 { 119, 119, 119 }, { 102, 102, 102 }, { 85, 85, 85 }, { 68, 68, 68 },
120 { 51, 51, 51 }, { 34, 34, 34 }, { 17, 17, 17 }, { 0, 0, 0 }}; 120 { 51, 51, 51 }, { 34, 34, 34 }, { 17, 17, 17 }, { 0, 0, 0 }};
121 121
122QImage* Palm2QImage 122QImage* Palm2QImage
123 (unsigned char *image_bytes_in, int byte_count_in) 123 (unsigned char *image_bytes_in, int byte_count_in)
124{ 124{
125 unsigned int width, height, bytes_per_row, flags, next_depth_offset; 125 unsigned int width, height, bytes_per_row, flags, next_depth_offset;
126 unsigned int bits_per_pixel, version, transparent_index, compression_type, i, j, inval, inbit, mask, incount; 126 unsigned int bits_per_pixel, version, transparent_index, compression_type, i, j, inval, inbit, mask, incount;
127 unsigned int palm_red_bits, palm_green_bits, palm_blue_bits; 127 unsigned int palm_red_bits, palm_green_bits, palm_blue_bits;
128 unsigned char *palm_ptr, *x_ptr, *imagedata, *inbyte, *rowbuf, *lastrow, 128 unsigned char *palm_ptr, *x_ptr, *inbyte, *rowbuf, *lastrow,
129 *imagedatastart, *palmimage; 129 *imagedatastart, *palmimage;
130 ColorMapEntry *colormap; 130 ColorMapEntry *colormap;
131 131
132 palmimage = image_bytes_in; 132 palmimage = image_bytes_in;
133 width = READ_BIGENDIAN_SHORT(palmimage + 0); 133 width = READ_BIGENDIAN_SHORT(palmimage + 0);
134 height = READ_BIGENDIAN_SHORT(palmimage + 2); 134 height = READ_BIGENDIAN_SHORT(palmimage + 2);
135 bytes_per_row = READ_BIGENDIAN_SHORT(palmimage + 4); 135 bytes_per_row = READ_BIGENDIAN_SHORT(palmimage + 4);
136 flags = READ_BIGENDIAN_SHORT(palmimage + 6); 136 flags = READ_BIGENDIAN_SHORT(palmimage + 6);
137 bits_per_pixel = palmimage[8]; 137 bits_per_pixel = palmimage[8];
138 version = palmimage[9]; 138 version = palmimage[9];
139 next_depth_offset = READ_BIGENDIAN_SHORT(palmimage + 10); 139 next_depth_offset = READ_BIGENDIAN_SHORT(palmimage + 10);
140 transparent_index = palmimage[12]; 140 transparent_index = palmimage[12];
@@ -204,25 +204,25 @@ QImage* Palm2QImage
204 } 204 }
205 205
206#ifndef USEQPE 206#ifndef USEQPE
207 QImage* qimage = new QImage(width, height, 32); 207 QImage* qimage = new QImage(width, height, 32);
208#else 208#else
209 QImage* qimage = new QImage(width, height, 16); 209 QImage* qimage = new QImage(width, height, 16);
210#endif 210#endif
211 211
212 /* row by row, uncompress the Palm image and copy it to the JPEG buffer */ 212 /* row by row, uncompress the Palm image and copy it to the JPEG buffer */
213 rowbuf = new unsigned char[bytes_per_row * width]; 213 rowbuf = new unsigned char[bytes_per_row * width];
214 lastrow = new unsigned char[bytes_per_row * width]; 214 lastrow = new unsigned char[bytes_per_row * width];
215 215
216 for (i=0, palm_ptr = imagedatastart , x_ptr = imagedata; i < height; ++i) { 216 for (i=0, palm_ptr = imagedatastart , x_ptr = 0; i < height; ++i) {
217// qDebug("inval:%x palm_ptr:%x x_ptr:%x bpr:%x", inval, palm_ptr, x_ptr, bytes_per_row); 217// qDebug("inval:%x palm_ptr:%x x_ptr:%x bpr:%x", inval, palm_ptr, x_ptr, bytes_per_row);
218 218
219 /* first, uncompress the Palm image */ 219 /* first, uncompress the Palm image */
220 if ((flags & PALM_IS_COMPRESSED_FLAG) && (compression_type == PALM_COMPRESSION_RLE)) { 220 if ((flags & PALM_IS_COMPRESSED_FLAG) && (compression_type == PALM_COMPRESSION_RLE)) {
221 for (j = 0; j < bytes_per_row; ) { 221 for (j = 0; j < bytes_per_row; ) {
222 incount = *palm_ptr++; 222 incount = *palm_ptr++;
223 inval = *palm_ptr++; 223 inval = *palm_ptr++;
224 memset(rowbuf + j, inval, incount); 224 memset(rowbuf + j, inval, incount);
225 j += incount; 225 j += incount;
226 } 226 }
227 } else if ((flags & PALM_IS_COMPRESSED_FLAG) && (compression_type == PALM_COMPRESSION_SCANLINE)) { 227 } else if ((flags & PALM_IS_COMPRESSED_FLAG) && (compression_type == PALM_COMPRESSION_SCANLINE)) {
228 for (j = 0; j < bytes_per_row; j += 8) { 228 for (j = 0; j < bytes_per_row; j += 8) {
diff --git a/noncore/apps/opie-reader/QTReader.cpp b/noncore/apps/opie-reader/QTReader.cpp
index 0c56dd4..75da8ac 100644
--- a/noncore/apps/opie-reader/QTReader.cpp
+++ b/noncore/apps/opie-reader/QTReader.cpp
@@ -535,25 +535,25 @@ void QTReader::setTwoTouch(bool _b)
535{ 535{
536 setBackgroundColor( m_bg ); 536 setBackgroundColor( m_bg );
537 m_twotouch = m_touchone = _b; 537 m_twotouch = m_touchone = _b;
538} 538}
539 539
540void QTReader::setContinuous(bool _b) 540void QTReader::setContinuous(bool _b)
541{ 541{
542 buffdoc.setContinuous(m_continuousDocument = _b); 542 buffdoc.setContinuous(m_continuousDocument = _b);
543} 543}
544 544
545void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouseEvent* _e, int lineno) 545void QTReader::processmousewordevent(size_t startpos, size_t startoffset, QMouseEvent* _e, int lineno)
546{ 546{
547 unsigned long wrdstart, wrdend; 547 unsigned long wrdstart = 0, wrdend = 0;
548 QString wrd; 548 QString wrd;
549 int availht = ((m_rotated) ? width() : height()) - m_topmargin - m_bottommargin; 549 int availht = ((m_rotated) ? width() : height()) - m_topmargin - m_bottommargin;
550 if (m_twotouch) 550 if (m_twotouch)
551 { 551 {
552 if (m_touchone) 552 if (m_touchone)
553 { 553 {
554 m_touchone = false; 554 m_touchone = false;
555 m_startpos = startpos; 555 m_startpos = startpos;
556 m_startoffset = startoffset; 556 m_startoffset = startoffset;
557 setBackgroundColor( lightGray ); 557 setBackgroundColor( lightGray );
558 } 558 }
559 else 559 else
diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp
index 849edfc..302ac73 100644
--- a/noncore/apps/opie-reader/plucker_base.cpp
+++ b/noncore/apps/opie-reader/plucker_base.cpp
@@ -696,25 +696,25 @@ void CPlucker_base::setSaveData(unsigned char*& data, unsigned short& len, unsig
696 { 696 {
697 unsigned long t = *it; 697 unsigned long t = *it;
698 //qDebug("[%u]", t); 698 //qDebug("[%u]", t);
699 memcpy(newdata, &t, sizeof(t)); 699 memcpy(newdata, &t, sizeof(t));
700 newdata += sizeof(t); 700 newdata += sizeof(t);
701 } 701 }
702 m_nav.setSaveData(data, len, pdata, newlen); 702 m_nav.setSaveData(data, len, pdata, newlen);
703 delete [] pdata; 703 delete [] pdata;
704} 704}
705 705
706void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen) 706void CPlucker_base::putSaveData(unsigned char*& src, unsigned short& srclen)
707{ 707{
708 unsigned short sz; 708 unsigned short sz = 0;
709 if (srclen >= sizeof(sz)) 709 if (srclen >= sizeof(sz))
710 { 710 {
711 memcpy(&sz, src, sizeof(sz)); 711 memcpy(&sz, src, sizeof(sz));
712 src += sizeof(sz); 712 src += sizeof(sz);
713 srclen -= sizeof(sz); 713 srclen -= sizeof(sz);
714 } 714 }
715 for (int i = 0; i < sz; i++) 715 for (int i = 0; i < sz; i++)
716 { 716 {
717 unsigned long t; 717 unsigned long t;
718 if (srclen >= sizeof(t)) 718 if (srclen >= sizeof(t))
719 { 719 {
720 memcpy(&t, src, sizeof(t)); 720 memcpy(&t, src, sizeof(t));
diff --git a/noncore/apps/opie-reader/striphtml.cpp b/noncore/apps/opie-reader/striphtml.cpp
index c434dbb..a2ad56b 100644
--- a/noncore/apps/opie-reader/striphtml.cpp
+++ b/noncore/apps/opie-reader/striphtml.cpp
@@ -464,25 +464,25 @@ linkType striphtml::hyperlink(unsigned int n, unsigned int, QString& w, QString&
464 } 464 }
465 QString href = *hrefit; 465 QString href = *hrefit;
466#if defined(USEQPE) || defined(_WINDOWS) 466#if defined(USEQPE) || defined(_WINDOWS)
467 QMap<QString, unsigned long>::Iterator fpit = href2filepos->find(href); 467 QMap<QString, unsigned long>::Iterator fpit = href2filepos->find(href);
468#else 468#else
469 QMap<QString, unsigned long>::iterator fpit = href2filepos->find(href); 469 QMap<QString, unsigned long>::iterator fpit = href2filepos->find(href);
470#endif 470#endif
471 if (fpit == href2filepos->end()) 471 if (fpit == href2filepos->end())
472 { 472 {
473 if (href == "history.back()") 473 if (href == "history.back()")
474 { 474 {
475 QString fc = currentfile; 475 QString fc = currentfile;
476 unsigned long loc; 476 unsigned long loc = 0;
477 htmlmark m(fc, loc); 477 htmlmark m(fc, loc);
478 linkType ret = (m_nav.back(m)) ? eFile : eNone; 478 linkType ret = (m_nav.back(m)) ? eFile : eNone;
479 if (fc == m.filename()) 479 if (fc == m.filename())
480 { 480 {
481 if ((ret & eFile) != 0) 481 if ((ret & eFile) != 0)
482 { 482 {
483 locate(m.posn()); 483 locate(m.posn());
484 return eLink; 484 return eLink;
485 } 485 }
486 } 486 }
487 return eNone; 487 return eNone;
488 } 488 }
diff --git a/noncore/apps/tinykate/libkate/document/katehighlight.cpp b/noncore/apps/tinykate/libkate/document/katehighlight.cpp
index 89024f7..ee6030f 100644
--- a/noncore/apps/tinykate/libkate/document/katehighlight.cpp
+++ b/noncore/apps/tinykate/libkate/document/katehighlight.cpp
@@ -1307,62 +1307,64 @@ int HlManager::wildcardFind(const QString &fileName) {
1307 QRegExp regExp(w.mid(p1,p2 - p1),true,true); 1307 QRegExp regExp(w.mid(p1,p2 - p1),true,true);
1308 if (regExp.match(fileName) == 0) return hlList.at(); 1308 if (regExp.match(fileName) == 0) return hlList.at();
1309 } 1309 }
1310 p1 = p2 + 1; 1310 p1 = p2 + 1;
1311 } 1311 }
1312 } 1312 }
1313 return -1; 1313 return -1;
1314} 1314}
1315 1315
1316 1316
1317int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) { 1317int HlManager::makeAttribs(Highlight *highlight, Attribute *a, int maxAttribs) {
1318 ItemStyleList defaultStyleList; 1318 ItemStyleList defaultStyleList;
1319 ItemStyle *defaultStyle; 1319 ItemStyle *defaultStyle = 0;
1320 ItemDataList itemDataList; 1320 ItemDataList itemDataList;
1321 ItemData *itemData; 1321 ItemData *itemData;
1322 int nAttribs, z; 1322 int nAttribs, z;
1323 1323
1324 odebug << "HlManager::makeAttribs" << oendl; 1324 odebug << "HlManager::makeAttribs" << oendl;
1325 1325
1326 defaultStyleList.setAutoDelete(true); 1326 defaultStyleList.setAutoDelete(true);
1327 getDefaults(defaultStyleList); 1327 getDefaults(defaultStyleList);
1328 1328
1329// itemDataList.setAutoDelete(true); 1329// itemDataList.setAutoDelete(true);
1330 highlight->getItemDataList(itemDataList); 1330 highlight->getItemDataList(itemDataList);
1331 nAttribs = itemDataList.count(); 1331 nAttribs = itemDataList.count();
1332 for (z = 0; z < nAttribs; z++) { 1332 for (z = 0; z < nAttribs; z++) {
1333 odebug << "HlManager::makeAttribs: createing one attribute definition" << oendl; 1333 odebug << "HlManager::makeAttribs: creating an attribute definition" << oendl;
1334 itemData = itemDataList.at(z); 1334 itemData = itemDataList.at(z);
1335 if (itemData->defStyle) { 1335 if (itemData->defStyle) {
1336 // default style 1336 // default style
1337 defaultStyle = defaultStyleList.at(itemData->defStyleNum); 1337 defaultStyle = defaultStyleList.at(itemData->defStyleNum);
1338 a[z].col = defaultStyle->col; 1338 a[z].col = defaultStyle->col;
1339 a[z].selCol = defaultStyle->selCol; 1339 a[z].selCol = defaultStyle->selCol;
1340 a[z].bold = defaultStyle->bold; 1340 a[z].bold = defaultStyle->bold;
1341 a[z].italic = defaultStyle->italic; 1341 a[z].italic = defaultStyle->italic;
1342 } else { 1342 } else {
1343 // custom style 1343 // custom style
1344 a[z].col = itemData->col; 1344 a[z].col = itemData->col;
1345 a[z].selCol = itemData->selCol; 1345 a[z].selCol = itemData->selCol;
1346 a[z].bold = itemData->bold; 1346 a[z].bold = itemData->bold;
1347 a[z].italic = itemData->italic; 1347 a[z].italic = itemData->italic;
1348 } 1348 }
1349 } 1349 }
1350 1350
1351 for (; z < maxAttribs; z++) { 1351 for (; z < maxAttribs; z++) {
1352 a[z].col = black; 1352 a[z].col = black;
1353 a[z].selCol = black; 1353 a[z].selCol = black;
1354 if (defaultStyle) {
1354 a[z].bold = defaultStyle->bold; 1355 a[z].bold = defaultStyle->bold;
1355 a[z].italic = defaultStyle->italic; 1356 a[z].italic = defaultStyle->italic;
1356 } 1357 }
1358 }
1357 return nAttribs; 1359 return nAttribs;
1358} 1360}
1359 1361
1360int HlManager::defaultStyles() { 1362int HlManager::defaultStyles() {
1361 return 10; 1363 return 10;
1362} 1364}
1363 1365
1364QString HlManager::defaultStyleName(int n) 1366QString HlManager::defaultStyleName(int n)
1365{ 1367{
1366 static QStringList names; 1368 static QStringList names;
1367 1369
1368 if (names.isEmpty()) 1370 if (names.isEmpty())
diff --git a/noncore/net/ftplib/ftplib.c b/noncore/net/ftplib/ftplib.c
index addf9d2..ce4c05f 100644
--- a/noncore/net/ftplib/ftplib.c
+++ b/noncore/net/ftplib/ftplib.c
@@ -772,25 +772,25 @@ static int FtpOpenPort(netbuf *nControl, netbuf **nData, int mode, int dir)
772 * FtpAcceptConnection - accept connection from server 772 * FtpAcceptConnection - accept connection from server
773 * 773 *
774 * return 1 if successful, 0 otherwise 774 * return 1 if successful, 0 otherwise
775 */ 775 */
776static int FtpAcceptConnection(netbuf *nData, netbuf *nControl) 776static int FtpAcceptConnection(netbuf *nData, netbuf *nControl)
777{ 777{
778 int sData; 778 int sData;
779 struct sockaddr addr; 779 struct sockaddr addr;
780 unsigned int l; 780 unsigned int l;
781 int i; 781 int i;
782 struct timeval tv; 782 struct timeval tv;
783 fd_set mask; 783 fd_set mask;
784 int rv; 784 int rv = 1;
785 785
786 FD_ZERO(&mask); 786 FD_ZERO(&mask);
787 FD_SET(nControl->handle, &mask); 787 FD_SET(nControl->handle, &mask);
788 FD_SET(nData->handle, &mask); 788 FD_SET(nData->handle, &mask);
789 tv.tv_usec = 0; 789 tv.tv_usec = 0;
790 tv.tv_sec = ACCEPT_TIMEOUT; 790 tv.tv_sec = ACCEPT_TIMEOUT;
791 printf("<<<<<<<<<<<<<<<<%d\n",ACCEPT_TIMEOUT); 791 printf("<<<<<<<<<<<<<<<<%d\n",ACCEPT_TIMEOUT);
792 i = nControl->handle; 792 i = nControl->handle;
793 if (i < nData->handle) 793 if (i < nData->handle)
794 i = nData->handle; 794 i = nData->handle;
795 i = select(i+1, &mask, NULL, NULL, &tv); 795 i = select(i+1, &mask, NULL, NULL, &tv);
796 if (i == -1) 796 if (i == -1)
diff --git a/noncore/settings/sysinfo/contrib/dhry.c b/noncore/settings/sysinfo/contrib/dhry.c
index 07fd1c0..5426157 100644
--- a/noncore/settings/sysinfo/contrib/dhry.c
+++ b/noncore/settings/sysinfo/contrib/dhry.c
@@ -563,25 +563,25 @@ REG Rec_Pointer Ptr_Val_Par;
563 structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp); 563 structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
564} /* Proc_1 */ 564} /* Proc_1 */
565 565
566 566
567Proc_2 (Int_Par_Ref) 567Proc_2 (Int_Par_Ref)
568/******************/ 568/******************/
569 /* executed once */ 569 /* executed once */
570 /* *Int_Par_Ref == 1, becomes 4 */ 570 /* *Int_Par_Ref == 1, becomes 4 */
571 571
572One_Fifty *Int_Par_Ref; 572One_Fifty *Int_Par_Ref;
573{ 573{
574 One_Fifty Int_Loc; 574 One_Fifty Int_Loc;
575 Enumeration Enum_Loc; 575 Enumeration Enum_Loc = Ident_2;
576 576
577 Int_Loc = *Int_Par_Ref + 10; 577 Int_Loc = *Int_Par_Ref + 10;
578 do /* executed once */ 578 do /* executed once */
579 if (Ch_1_Glob == 'A') 579 if (Ch_1_Glob == 'A')
580 /* then, executed */ 580 /* then, executed */
581 { 581 {
582 Int_Loc -= 1; 582 Int_Loc -= 1;
583 *Int_Par_Ref = Int_Loc - Int_Glob; 583 *Int_Par_Ref = Int_Loc - Int_Glob;
584 Enum_Loc = Ident_1; 584 Enum_Loc = Ident_1;
585 } /* if */ 585 } /* if */
586 while (Enum_Loc != Ident_1); /* true */ 586 while (Enum_Loc != Ident_1); /* true */
587} /* Proc_2 */ 587} /* Proc_2 */