author | mickeyl <mickeyl> | 2004-04-09 15:00:06 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-09 15:00:06 (UTC) |
commit | fb2f09533c7476a266a877c351007c2706b2da0d (patch) (unidiff) | |
tree | 9742d4cb8fd07fd5530c3c29b5f049dcecd46ef4 /noncore/settings/networksettings/ppp/modem.cpp | |
parent | 39547839995c9f72ca9216ba5c2127246428ece8 (diff) | |
download | opie-fb2f09533c7476a266a877c351007c2706b2da0d.zip opie-fb2f09533c7476a266a877c351007c2706b2da0d.tar.gz opie-fb2f09533c7476a266a877c351007c2706b2da0d.tar.bz2 |
- eliminate cylic dependency
- complete using opie debugging framework
- sanitize #include order
Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index f3f2639..5913a22 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp | |||
@@ -1,74 +1,79 @@ | |||
1 | /* | 1 | /* |
2 | * kPPP: A pppd Front End for the KDE project | 2 | * kPPP: A pppd Front End for the KDE project |
3 | * | 3 | * |
4 | * $Id$ | 4 | * $Id$ |
5 | * | 5 | * |
6 | * Copyright (C) 1997 Bernd Johannes Wuebben | 6 | * Copyright (C) 1997 Bernd Johannes Wuebben |
7 | * wuebben@math.cornell.edu | 7 | * wuebben@math.cornell.edu |
8 | * | 8 | * |
9 | * This file was added by Harri Porten <porten@tu-harburg.de> | 9 | * This file was added by Harri Porten <porten@tu-harburg.de> |
10 | * | 10 | * |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or | 12 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU Library General Public | 13 | * modify it under the terms of the GNU Library General Public |
14 | * License as published by the Free Software Foundation; either | 14 | * License as published by the Free Software Foundation; either |
15 | * version 2 of the License, or (at your option) any later version. | 15 | * version 2 of the License, or (at your option) any later version. |
16 | * | 16 | * |
17 | * This program is distributed in the hope that it will be useful, | 17 | * This program is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20 | * Library General Public License for more details. | 20 | * Library General Public License for more details. |
21 | * | 21 | * |
22 | * You should have received a copy of the GNU Library General Public | 22 | * You should have received a copy of the GNU Library General Public |
23 | * License along with this program; if not, write to the Free | 23 | * License along with this program; if not, write to the Free |
24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | /* OPIE */ | ||
28 | #include <opie2/odebug.h> | ||
29 | using namespace Opie::Core; | ||
30 | |||
31 | /* STD */ | ||
27 | #include <errno.h> | 32 | #include <errno.h> |
28 | #include <stdlib.h> | 33 | #include <stdlib.h> |
29 | #include <unistd.h> | 34 | #include <unistd.h> |
30 | #include <fcntl.h> | 35 | #include <fcntl.h> |
31 | #include <signal.h> | 36 | #include <signal.h> |
32 | #include <sys/ioctl.h> | 37 | #include <sys/ioctl.h> |
33 | #include <sys/types.h> | 38 | #include <sys/types.h> |
34 | #include <sys/stat.h> | 39 | #include <sys/stat.h> |
35 | #include <setjmp.h> | 40 | #include <setjmp.h> |
36 | #include <regex.h> | 41 | #include <regex.h> |
37 | #include <qregexp.h> | 42 | #include <qregexp.h> |
38 | #include <assert.h> | 43 | #include <assert.h> |
39 | #include <string.h> | 44 | #include <string.h> |
40 | 45 | ||
41 | #ifdef HAVE_RESOLV_H | 46 | #ifdef HAVE_RESOLV_H |
42 | # include <arpa/nameser.h> | 47 | # include <arpa/nameser.h> |
43 | # include <resolv.h> | 48 | # include <resolv.h> |
44 | #endif | 49 | #endif |
45 | 50 | ||
46 | #ifndef _PATH_RESCONF | 51 | #ifndef _PATH_RESCONF |
47 | #define _PATH_RESCONF "/etc/resolv.conf" | 52 | #define _PATH_RESCONF "/etc/resolv.conf" |
48 | #endif | 53 | #endif |
49 | 54 | ||
50 | #define strlcpy strcpy | 55 | #define strlcpy strcpy |
51 | #include "auth.h" | 56 | #include "auth.h" |
52 | #include "modem.h" | 57 | #include "modem.h" |
53 | #include "pppdata.h" | 58 | #include "pppdata.h" |
54 | #define qError qDebug | 59 | #define qError qDebug |
55 | 60 | ||
56 | 61 | ||
57 | #define MY_ASSERT(x) if (!(x)) { \ | 62 | #define MY_ASSERT(x) if (!(x)) { \ |
58 | ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \ | 63 | ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \ |
59 | exit(1); } | 64 | exit(1); } |
60 | 65 | ||
61 | 66 | ||
62 | static sigjmp_buf jmp_buffer; | 67 | static sigjmp_buf jmp_buffer; |
63 | 68 | ||
64 | //Modem *Modem::modem = 0; | 69 | //Modem *Modem::modem = 0; |
65 | 70 | ||
66 | 71 | ||
67 | const char* pppdPath() { | 72 | const char* pppdPath() { |
68 | // wasting a few bytes | 73 | // wasting a few bytes |
69 | static char buffer[sizeof(PPPDSEARCHPATH)+sizeof(PPPDNAME)]; | 74 | static char buffer[sizeof(PPPDSEARCHPATH)+sizeof(PPPDNAME)]; |
70 | static char *pppdPath = 0L; | 75 | static char *pppdPath = 0L; |
71 | char *p; | 76 | char *p; |
72 | 77 | ||
73 | if(pppdPath == 0L) { | 78 | if(pppdPath == 0L) { |
74 | const char *c = PPPDSEARCHPATH; | 79 | const char *c = PPPDSEARCHPATH; |