summaryrefslogtreecommitdiff
path: root/library/custom-ramses.h
authorzecke <zecke>2004-02-20 00:47:08 (UTC)
committer zecke <zecke>2004-02-20 00:47:08 (UTC)
commite54e1cb01c3da0655fc6e86bd9d169b002a63e66 (patch) (unidiff)
tree393cca9eb79bfbb8610f903383fdd21c0d7f36a8 /library/custom-ramses.h
parent2fa9c89fc93d8bf58e3c2239691d6b6d92dc0f93 (diff)
downloadopie-e54e1cb01c3da0655fc6e86bd9d169b002a63e66.zip
opie-e54e1cb01c3da0655fc6e86bd9d169b002a63e66.tar.gz
opie-e54e1cb01c3da0655fc6e86bd9d169b002a63e66.tar.bz2
These values should be set by the buildsystem.
So If Calibration,malloc instead of new,OpiePlayer,Shutdown isn't working anymore this is because the buildsystem lacks sane defaults for your system
Diffstat (limited to 'library/custom-ramses.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/custom-ramses.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/library/custom-ramses.h b/library/custom-ramses.h
index 5a1abe4..6e94b2d 100644
--- a/library/custom-ramses.h
+++ b/library/custom-ramses.h
@@ -1,72 +1,65 @@
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#define QPE_NEED_CALIBRATION
22#define QPE_HAVE_TOGGLELIGHT
23#define QPE_STARTMENU
24#define USE_REALTIME_AUDIO_THREAD
25#define OPIE_NEW_MALLOC
26
27
28#include <unistd.h> 21#include <unistd.h>
29#include <stdio.h> 22#include <stdio.h>
30#include <signal.h> 23#include <signal.h>
31#include <fcntl.h> 24#include <fcntl.h>
32#include <sys/ioctl.h> 25#include <sys/ioctl.h>
33 26
34#define QPE_HAVE_MEMALERTER 27#define QPE_HAVE_MEMALERTER
35 28
36#define QPE_MEMALERTER_IMPL \ 29#define QPE_MEMALERTER_IMPL \
37static void sig_handler(int sig) \ 30static void sig_handler(int sig) \
38{ \ 31{ \
39 switch (sig) { \ 32 switch (sig) { \
40 case SIGHUP: \ 33 case SIGHUP: \
41 memstate = VeryLow; \ 34 memstate = VeryLow; \
42 break; \ 35 break; \
43 case SIGUSR1: \ 36 case SIGUSR1: \
44 memstate = Normal; \ 37 memstate = Normal; \
45 break; \ 38 break; \
46 case SIGUSR2: \ 39 case SIGUSR2: \
47 memstate = Low; \ 40 memstate = Low; \
48 break; \ 41 break; \
49 } \ 42 } \
50} \ 43} \
51static void initMemalerter() \ 44static void initMemalerter() \
52{ \ 45{ \
53 struct sigaction sa; \ 46 struct sigaction sa; \
54 memset(&sa, '\0', sizeof sa); \ 47 memset(&sa, '\0', sizeof sa); \
55 sa.sa_handler = sig_handler; \ 48 sa.sa_handler = sig_handler; \
56 sa.sa_flags = SA_RESTART; \ 49 sa.sa_flags = SA_RESTART; \
57 if (sigaction(SIGHUP, &sa, NULL) < 0) { \ 50 if (sigaction(SIGHUP, &sa, NULL) < 0) { \
58 return; \ 51 return; \
59 } \ 52 } \
60 if (sigaction(SIGUSR1, &sa, NULL) < 0) { \ 53 if (sigaction(SIGUSR1, &sa, NULL) < 0) { \
61 return; \ 54 return; \
62 } \ 55 } \
63 if (sigaction(SIGUSR2, &sa, NULL) < 0) { \ 56 if (sigaction(SIGUSR2, &sa, NULL) < 0) { \
64 return; \ 57 return; \
65 } \ 58 } \
66 FILE *fo = fopen("/proc/sys/vm/freepg_signal_proc", "w"); \ 59 FILE *fo = fopen("/proc/sys/vm/freepg_signal_proc", "w"); \
67 \ 60 \
68 if (!fo) \ 61 if (!fo) \
69 return; \ 62 return; \
70 fprintf(fo, "qpe\n"); \ 63 fprintf(fo, "qpe\n"); \
71 fclose(fo); \ 64 fclose(fo); \
72} 65}