summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/power.cpp2
-rw-r--r--library/qpeapplication.cpp2
-rw-r--r--library/storage.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/library/power.cpp b/library/power.cpp
index 21c8960..5310b47 100644
--- a/library/power.cpp
+++ b/library/power.cpp
@@ -1,47 +1,47 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "power.h" 21#include "power.h"
22 22
23#ifdef QT_QWS_SHARP 23#ifdef QT_QWS_SL5XXX
24#include "custom.h" 24#include "custom.h"
25#endif 25#endif
26 26
27#include <unistd.h> 27#include <unistd.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <stdio.h> 29#include <stdio.h>
30#include <fcntl.h> 30#include <fcntl.h>
31#include <sys/ioctl.h> 31#include <sys/ioctl.h>
32 32
33#ifdef QT_QWS_IPAQ_NO_APM 33#ifdef QT_QWS_IPAQ_NO_APM
34#include <linux/h3600_ts.h> 34#include <linux/h3600_ts.h>
35#endif 35#endif
36 36
37PowerStatusManager *PowerStatusManager::powerManager = 0; 37PowerStatusManager *PowerStatusManager::powerManager = 0;
38PowerStatus *PowerStatusManager::ps = 0; 38PowerStatus *PowerStatusManager::ps = 0;
39 39
40static bool haveProcApm = false; 40static bool haveProcApm = false;
41 41
42PowerStatusManager::PowerStatusManager() 42PowerStatusManager::PowerStatusManager()
43{ 43{
44 powerManager = this; 44 powerManager = this;
45 ps = new PowerStatus; 45 ps = new PowerStatus;
46 FILE *f = fopen("/proc/apm", "r"); 46 FILE *f = fopen("/proc/apm", "r");
47 if ( f ) { 47 if ( f ) {
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 95c4a1b..7463074 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1720,49 +1720,49 @@ void QPEApplication::tryQuit()
1720 User initiated quit. Makes the window 'Go Away'. If preloaded this means 1720 User initiated quit. Makes the window 'Go Away'. If preloaded this means
1721 hiding the window. If not it means quitting the application. 1721 hiding the window. If not it means quitting the application.
1722 As this is user initiated we don't need to check state. 1722 As this is user initiated we don't need to check state.
1723*/ 1723*/
1724void QPEApplication::hideOrQuit() 1724void QPEApplication::hideOrQuit()
1725{ 1725{
1726 processEvents(); 1726 processEvents();
1727 1727
1728 // If we are a preloaded application we don't actually quit, so emit 1728 // If we are a preloaded application we don't actually quit, so emit
1729 // a System message indicating we're quasi-closing. 1729 // a System message indicating we're quasi-closing.
1730 if ( d->preloaded && d->qpe_main_widget ) 1730 if ( d->preloaded && d->qpe_main_widget )
1731#ifndef QT_NO_COP 1731#ifndef QT_NO_COP
1732 1732
1733 { 1733 {
1734 QCopEnvelope e("QPE/System", "fastAppHiding(QString)" ); 1734 QCopEnvelope e("QPE/System", "fastAppHiding(QString)" );
1735 e << d->appName; 1735 e << d->appName;
1736 d->qpe_main_widget->hide(); 1736 d->qpe_main_widget->hide();
1737 } 1737 }
1738#endif 1738#endif
1739 else 1739 else
1740 quit(); 1740 quit();
1741} 1741}
1742 1742
1743 1743
1744#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SHARP) 1744#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
1745 1745
1746// The libraries with the skiff package (and possibly others) have 1746// The libraries with the skiff package (and possibly others) have
1747// completely useless implementations of builtin new and delete that 1747// completely useless implementations of builtin new and delete that
1748// use about 50% of your CPU. Here we revert to the simple libc 1748// use about 50% of your CPU. Here we revert to the simple libc
1749// functions. 1749// functions.
1750 1750
1751void* operator new[]( size_t size ) 1751void* operator new[]( size_t size )
1752{ 1752{
1753 return malloc( size ); 1753 return malloc( size );
1754} 1754}
1755 1755
1756void* operator new( size_t size ) 1756void* operator new( size_t size )
1757{ 1757{
1758 return malloc( size ); 1758 return malloc( size );
1759} 1759}
1760 1760
1761void operator delete[]( void* p ) 1761void operator delete[]( void* p )
1762{ 1762{
1763 free( p ); 1763 free( p );
1764} 1764}
1765 1765
1766void operator delete[]( void* p, size_t /*size*/ ) 1766void operator delete[]( void* p, size_t /*size*/ )
1767{ 1767{
1768 free( p ); 1768 free( p );
diff --git a/library/storage.cpp b/library/storage.cpp
index 3668d29..a7c466d 100644
--- a/library/storage.cpp
+++ b/library/storage.cpp
@@ -1,47 +1,47 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org> 2** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org>
3** Copyright (C) 2000 Trolltech AS. All rights reserved. 3** Copyright (C) 2000 Trolltech AS. All rights reserved.
4** 4**
5** This file is part of Qtopia Environment. 5** This file is part of Qtopia Environment.
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** 14**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 16**
17** Contact info@trolltech.com if any conditions of this licensing are 17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 18** not clear to you.
19** 19**
20**********************************************************************/ 20**********************************************************************/
21 21
22#include <qpe/storage.h> 22#include <qpe/storage.h>
23#ifdef QT_QWS_SHARP 23#ifdef QT_QWS_SL5XXX
24#include <qpe/custom.h> 24#include <qpe/custom.h>
25#endif 25#endif
26 26
27#include <qfile.h> 27#include <qfile.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qcopchannel_qws.h> 29#include <qcopchannel_qws.h>
30 30
31#include <stdio.h> 31#include <stdio.h>
32 32
33#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 33#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
34#include <sys/vfs.h> 34#include <sys/vfs.h>
35#include <mntent.h> 35#include <mntent.h>
36#endif 36#endif
37 37
38#include <qstringlist.h> 38#include <qstringlist.h>
39 39
40static bool isCF(const QString& m) 40static bool isCF(const QString& m)
41{ 41{
42 FILE* f = fopen("/var/run/stab", "r"); 42 FILE* f = fopen("/var/run/stab", "r");
43 if (!f) f = fopen("/var/state/pcmcia/stab", "r"); 43 if (!f) f = fopen("/var/state/pcmcia/stab", "r");
44 if (!f) f = fopen("/var/lib/pcmcia/stab", "r"); 44 if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
45 if ( f ) { 45 if ( f ) {
46 char line[1024]; 46 char line[1024];
47 char devtype[80]; 47 char devtype[80];