author | llornkcor <llornkcor> | 2004-07-10 02:46:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-07-10 02:46:51 (UTC) |
commit | aa85f7f987521c9f01acf3d8b737c5a60175de46 (patch) (unidiff) | |
tree | 1d2fe1f44d31f599947ed657d867b696790fe523 | |
parent | 9a51654b784192af0b02536e308f62bf5a5ae57c (diff) | |
download | opie-aa85f7f987521c9f01acf3d8b737c5a60175de46.zip opie-aa85f7f987521c9f01acf3d8b737c5a60175de46.tar.gz opie-aa85f7f987521c9f01acf3d8b737c5a60175de46.tar.bz2 |
NO_OPIE define added
-rw-r--r-- | noncore/apps/zsafe/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 5f48f77..c187520 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp | |||
@@ -1,78 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> | 2 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> |
3 | ** | 3 | ** |
4 | ** $Id$ | 4 | ** $Id$ |
5 | ** | 5 | ** |
6 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html | 6 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
10 | #include "zsafe.h" | 10 | #include "zsafe.h" |
11 | 11 | ||
12 | #ifndef NO_OPIE | ||
12 | /* OPIE */ | 13 | /* OPIE */ |
13 | #include <opie2/odebug.h> | 14 | #include <opie2/odebug.h> |
14 | using namespace Opie::Core; | 15 | using namespace Opie::Core; |
16 | #endif | ||
15 | 17 | ||
16 | /* QT */ | 18 | /* QT */ |
17 | #ifdef DESKTOP | 19 | #ifdef DESKTOP |
18 | #include <qapplication.h> | 20 | #include <qapplication.h> |
19 | #else | 21 | #else |
20 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
21 | #endif | 23 | #endif |
22 | 24 | ||
23 | /* STD */ | 25 | /* STD */ |
24 | #include <stdio.h> | 26 | #include <stdio.h> |
25 | #include <signal.h> | 27 | #include <signal.h> |
26 | 28 | ||
27 | ZSafe *zs; | 29 | ZSafe *zs; |
28 | #ifdef DESKTOP | 30 | #ifdef DESKTOP |
29 | QApplication *appl; | 31 | QApplication *appl; |
30 | #else | 32 | #else |
31 | QPEApplication *appl; | 33 | QPEApplication *appl; |
32 | #endif | 34 | #endif |
33 | 35 | ||
34 | int DeskW; | 36 | int DeskW; |
35 | int DeskH; | 37 | int DeskH; |
36 | 38 | ||
37 | void suspend (int signum) | 39 | void suspend (int signum) |
38 | { | 40 | { |
39 | printf ("Suspend signal %d received\n", signum); | 41 | printf ("Suspend signal %d received\n", signum); |
40 | } | 42 | } |
41 | 43 | ||
42 | void resume (int signum) | 44 | void resume (int signum) |
43 | { | 45 | { |
44 | printf ("Resume signal %d received\n", signum); | 46 | printf ("Resume signal %d received\n", signum); |
45 | zs->resume(signum); | 47 | zs->resume(signum); |
46 | } | 48 | } |
47 | 49 | ||
48 | int main( int argc, char ** argv ) | 50 | int main( int argc, char ** argv ) |
49 | { | 51 | { |
50 | #ifndef WIN32 | 52 | #ifndef WIN32 |
51 | // install signal handler | 53 | // install signal handler |
52 | signal (SIGSTOP, suspend); | 54 | signal (SIGSTOP, suspend); |
53 | #endif | 55 | #endif |
54 | 56 | ||
55 | #ifdef DESKTOP | 57 | #ifdef DESKTOP |
56 | QApplication a( argc, argv ); | 58 | QApplication a( argc, argv ); |
57 | #else | 59 | #else |
58 | QPEApplication a( argc, argv ); | 60 | QPEApplication a( argc, argv ); |
59 | #endif | 61 | #endif |
60 | appl = &a; | 62 | appl = &a; |
61 | 63 | ||
62 | #ifdef DESKTOP | 64 | #ifdef DESKTOP |
63 | if (argc >= 3) | 65 | if (argc >= 3) |
64 | { | 66 | { |
65 | #ifndef WIN32 | 67 | #ifndef WIN32 |
66 | DeskW = atoi(argv[1]); | 68 | DeskW = atoi(argv[1]); |
67 | DeskH = atoi(argv[2]); | 69 | DeskH = atoi(argv[2]); |
68 | #else | 70 | #else |
69 | int w, h; | 71 | int w, h; |
70 | sscanf (argv[1], "%d", &w); | 72 | sscanf (argv[1], "%d", &w); |
71 | sscanf (argv[2], "%d", &h); | 73 | sscanf (argv[2], "%d", &h); |
72 | DeskW = w; | 74 | DeskW = w; |
73 | DeskH = h; | 75 | DeskH = h; |
74 | #endif | 76 | #endif |
75 | } | 77 | } |
76 | else | 78 | else |
77 | { | 79 | { |
78 | DeskW = 600; | 80 | DeskW = 600; |