wok-current annotate wvdial/stuff/wvdial-1.41-gcc4.2.diff @ rev 16350

Up: tazweb (1.9) - Fixes and editable bookmarks!
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 13 02:34:25 2014 +0200 (2014-04-13)
parents 5ae5611235c6
children
rev   line source
domcox@2665 1 --- wvdial-1.41/Makefile Sat Oct 3 05:40:30 1998
domcox@2665 2 +++ wvdial-1.41+dom/Makefile Thu Mar 19 20:56:27 2009
domcox@2665 3 @@ -1,10 +1,11 @@
domcox@2665 4 TOPDIR=$(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
domcox@2665 5
domcox@2665 6 DEBUG=0
domcox@2665 7 -PREFIX=/usr/local
domcox@2665 8 -BINDIR=${PREFIX}/bin
domcox@2665 9 -MANDIR=${PREFIX}/man
domcox@2665 10 -PPPDIR=/etc/ppp/peers
domcox@2665 11 +
domcox@2665 12 +PREFIX=/usr
domcox@2665 13 +BINDIR=${DESTDIR}/${PREFIX}/bin
domcox@2665 14 +MANDIR=${DESTDIR]/${PREFIX}/man
domcox@2665 15 +PPPDIR=${DESTDIR}/etc/ppp/peers
domcox@2665 16
domcox@2665 17 export TOPDIR DEBUG CC CXX
domcox@2665 18 include rules.mk
domcox@2665 19 --- wvdial-1.41/configfile/wvconf.cc Sun Nov 28 20:39:33 1999
domcox@2665 20 +++ wvdial-1.41+dom/configfile/wvconf.cc Thu Mar 19 20:56:27 2009
domcox@2665 21 @@ -130,7 +130,7 @@
domcox@2665 22 // it must be an element for the current section *sect.
domcox@2665 23 p = parse_value(from_file);
domcox@2665 24 if (!p)
domcox@2665 25 - p = ""; // allow empty entries
domcox@2665 26 + p = (char*)""; // allow empty entries
domcox@2665 27
domcox@2665 28 from_file = trim_string(from_file);
domcox@2665 29 if (from_file[0]) // nonblank option name
domcox@2665 30 --- wvdial-1.41/rules.mk Thu Mar 19 21:04:33 2009
domcox@2665 31 +++ wvdial-1.41+dom/rules.mk Thu Oct 21 00:37:00 1999
domcox@2665 32 @@ -47,7 +47,7 @@
domcox@2665 33 CFLAGS += -g -O6 -DDEBUG=0 -DNDEBUG
domcox@2665 34 #CFLAGS += -fomit-frame-pointer # really evil
domcox@2665 35 #CXXFLAGS += -fno-implement-inlines # causes trouble with egcs 1.0
domcox@2665 36 -CXXFLAGS += -fno-rtti -fno-exceptions
domcox@2665 37 +CXXFLAGS += -fno-rtti -fno-exceptions -fno-strict-aliasing
domcox@2665 38 LDFLAGS += -g
domcox@2665 39 endif
domcox@2665 40
domcox@2665 41 --- wvdial-1.41/streams/wvlog.cc Sat Jul 10 21:36:45 1999
domcox@2665 42 +++ wvdial-1.41+dom/streams/wvlog.cc Thu Mar 19 20:56:27 2009
domcox@2665 43 @@ -14,16 +14,16 @@
domcox@2665 44 WvLogRcvBase *WvLog::default_receiver = NULL;
domcox@2665 45
domcox@2665 46 char *WvLogRcv::loglevels[WvLog::NUM_LOGLEVELS] = {
domcox@2665 47 - "Crit",
domcox@2665 48 - "Err",
domcox@2665 49 - "Warn",
domcox@2665 50 - "Notice",
domcox@2665 51 - "Info",
domcox@2665 52 - "*1",
domcox@2665 53 - "*2",
domcox@2665 54 - "*3",
domcox@2665 55 - "*4",
domcox@2665 56 - "*5",
domcox@2665 57 + (char*)"Crit",
domcox@2665 58 + (char*)"Err",
domcox@2665 59 + (char*)"Warn",
domcox@2665 60 + (char*)"Notice",
domcox@2665 61 + (char*)"Info",
domcox@2665 62 + (char*)"*1",
domcox@2665 63 + (char*)"*2",
domcox@2665 64 + (char*)"*3",
domcox@2665 65 + (char*)"*4",
domcox@2665 66 + (char*)"*5",
domcox@2665 67 };
domcox@2665 68
domcox@2665 69
domcox@2665 70 --- wvdial-1.41/streams/wvlog.h Wed Mar 24 04:41:37 1999
domcox@2665 71 +++ wvdial-1.41+dom/streams/wvlog.h Thu Mar 19 20:56:27 2009
domcox@2665 72 @@ -25,7 +25,7 @@
domcox@2665 73 // or transmits log messages.
domcox@2665 74 class WvLogRcvBase
domcox@2665 75 {
domcox@2665 76 - friend WvLog;
domcox@2665 77 + friend class WvLog;
domcox@2665 78 protected:
domcox@2665 79 const char *appname(const WvLog *log) const;
domcox@2665 80 virtual void log(const WvLog *source, int loglevel,
domcox@2665 81 @@ -43,7 +43,7 @@
domcox@2665 82 // to all registered WvLogRcv's.
domcox@2665 83 class WvLog : public WvStream
domcox@2665 84 {
domcox@2665 85 - friend WvLogRcvBase;
domcox@2665 86 + friend class WvLogRcvBase;
domcox@2665 87 public:
domcox@2665 88 enum LogLevel {
domcox@2665 89 Critical = 0,
domcox@2665 90 --- wvdial-1.41/streams/wvstream.cc Thu Oct 21 00:37:04 1999
domcox@2665 91 +++ wvdial-1.41+dom/streams/wvstream.cc Thu Mar 19 20:56:27 2009
domcox@2665 92 @@ -9,6 +9,7 @@
domcox@2665 93 * for each stream.
domcox@2665 94 */
domcox@2665 95 #include "wvstream.h"
domcox@2665 96 +#include <time.h>
domcox@2665 97 #include <sys/time.h>
domcox@2665 98 #include <sys/types.h>
domcox@2665 99 #include <errno.h>
domcox@2665 100 --- wvdial-1.41/streams/wvtimestream.h Wed Mar 24 04:41:37 1999
domcox@2665 101 +++ wvdial-1.41+dom/streams/wvtimestream.h Thu Mar 19 20:56:27 2009
domcox@2665 102 @@ -40,7 +40,7 @@
domcox@2665 103 virtual bool test_set(SelectInfo &si);
domcox@2665 104
domcox@2665 105 // notify timestream that we have "ticked" once
domcox@2665 106 - void WvTimeStream::tick();
domcox@2665 107 + virtual void tick();
domcox@2665 108 virtual void execute();
domcox@2665 109 };
domcox@2665 110
domcox@2665 111 --- wvdial-1.41/utils/base64.cc Wed Mar 24 04:41:38 1999
domcox@2665 112 +++ wvdial-1.41+dom/utils/base64.cc Thu Mar 19 20:56:27 2009
domcox@2665 113 @@ -16,7 +16,7 @@
domcox@2665 114 #include "base64.h"
domcox@2665 115 #include <string.h>
domcox@2665 116
domcox@2665 117 -static char * alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
domcox@2665 118 +const char * alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
domcox@2665 119 "0123456789+/=";
domcox@2665 120
domcox@2665 121 char * base64_encode( char * str )
domcox@2665 122 --- wvdial-1.41/utils/base64.h Wed Mar 24 04:41:38 1999
domcox@2665 123 +++ wvdial-1.41+dom/utils/base64.h Thu Mar 19 20:56:27 2009
domcox@2665 124 @@ -12,4 +12,4 @@
domcox@2665 125 extern char * base64_encode( char * str );
domcox@2665 126 extern char * base64_decode( char * str );
domcox@2665 127
domcox@2665 128 -#endif __BASE64_H
domcox@2665 129 +#endif // __BASE64_H
domcox@2665 130 --- wvdial-1.41/utils/wvbuffer.h Sun Jun 20 21:45:55 1999
domcox@2665 131 +++ wvdial-1.41+dom/utils/wvbuffer.h Thu Mar 19 20:56:27 2009
domcox@2665 132 @@ -10,6 +10,7 @@
domcox@2665 133 #define __WVBUFFER_H
domcox@2665 134
domcox@2665 135 #include "wvlinklist.h"
domcox@2665 136 +#include <string.h>
domcox@2665 137
domcox@2665 138 class WvMiniBuffer
domcox@2665 139 {
domcox@2665 140 --- wvdial-1.41/utils/wvhashtable.h Thu Oct 14 23:33:38 1999
domcox@2665 141 +++ wvdial-1.41+dom/utils/wvhashtable.h Thu Mar 19 20:56:27 2009
domcox@2665 142 @@ -139,7 +139,7 @@
domcox@2665 143 _type_##List *sl() \
domcox@2665 144 { return (_type_##List *)slots; } \
domcox@2665 145 \
domcox@2665 146 - ~##_classname_() \
domcox@2665 147 + ~_classname_() \
domcox@2665 148 { shutdown(); delete[] sl(); } \
domcox@2665 149 \
domcox@2665 150 void add(_type_ *data, bool auto_free) \
domcox@2665 151 --- wvdial-1.41/utils/wvlinklist.h Thu Oct 14 23:33:38 1999
domcox@2665 152 +++ wvdial-1.41+dom/utils/wvlinklist.h Thu Mar 19 20:56:27 2009
domcox@2665 153 @@ -126,7 +126,7 @@
domcox@2665 154 _newname_() \
domcox@2665 155 { setup(); } \
domcox@2665 156 \
domcox@2665 157 - ~##_newname_() \
domcox@2665 158 + ~_newname_() \
domcox@2665 159 { shutdown(); _zap(); } \
domcox@2665 160 \
domcox@2665 161 void zap() \
domcox@2665 162 --- wvdial-1.41/wvdial/wvdialer.cc Fri Nov 19 06:14:46 1999
domcox@2665 163 +++ wvdial-1.41+dom/wvdial/wvdialer.cc Thu Mar 19 20:56:27 2009
domcox@2665 164 @@ -21,26 +21,26 @@
domcox@2665 165
domcox@2665 166
domcox@2665 167 static char * init_responses[] = {
domcox@2665 168 - "ok",
domcox@2665 169 - "error",
domcox@2665 170 + (char*)"ok",
domcox@2665 171 + (char*)"error",
domcox@2665 172 NULL
domcox@2665 173 };
domcox@2665 174
domcox@2665 175 static char * dial_responses[] = {
domcox@2665 176 - "connect",
domcox@2665 177 - "no carrier",
domcox@2665 178 - "no dialtone",
domcox@2665 179 - "no dial tone",
domcox@2665 180 - "busy",
domcox@2665 181 - "error",
domcox@2665 182 - "voice",
domcox@2665 183 - "fclass",
domcox@2665 184 + (char*)"connect",
domcox@2665 185 + (char*)"no carrier",
domcox@2665 186 + (char*)"no dialtone",
domcox@2665 187 + (char*)"no dial tone",
domcox@2665 188 + (char*)"busy",
domcox@2665 189 + (char*)"error",
domcox@2665 190 + (char*)"voice",
domcox@2665 191 + (char*)"fclass",
domcox@2665 192 NULL
domcox@2665 193 };
domcox@2665 194
domcox@2665 195 static char * prompt_strings[] = {
domcox@2665 196 - "}!}",
domcox@2665 197 - "!}!",
domcox@2665 198 + (char*)"}!}",
domcox@2665 199 + (char*)"!}!",
domcox@2665 200 NULL
domcox@2665 201 };
domcox@2665 202
domcox@2665 203 @@ -51,7 +51,7 @@
domcox@2665 204 // WvDialer Public Functions
domcox@2665 205 //**************************************************
domcox@2665 206
domcox@2665 207 -WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode = false )
domcox@2665 208 +WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode )
domcox@2665 209 /********************************************************/
domcox@2665 210 : WvStreamClone( (WvStream **)&modem ),
domcox@2665 211 cfg(_cfg), log( "WvDial", WvLog::Debug ),
domcox@2665 212 @@ -360,40 +360,40 @@
domcox@2665 213 {
domcox@2665 214 OptInfo opts[] = {
domcox@2665 215 // string options:
domcox@2665 216 - { "Modem", &options.modem, NULL, "/dev/modem", 0 },
domcox@2665 217 - { "Init1", &options.init1, NULL, "ATZ", 0 },
domcox@2665 218 - { "Init2", &options.init2, NULL, "", 0 },
domcox@2665 219 - { "Init3", &options.init3, NULL, "", 0 },
domcox@2665 220 - { "Init4", &options.init4, NULL, "", 0 },
domcox@2665 221 - { "Init5", &options.init5, NULL, "", 0 },
domcox@2665 222 - { "Init6", &options.init6, NULL, "", 0 },
domcox@2665 223 - { "Init7", &options.init7, NULL, "", 0 },
domcox@2665 224 - { "Init8", &options.init8, NULL, "", 0 },
domcox@2665 225 - { "Init9", &options.init9, NULL, "", 0 },
domcox@2665 226 - { "Phone", &options.phnum, NULL, "", 0 },
domcox@2665 227 - { "Dial Prefix", &options.dial_prefix, NULL, "", 0 },
domcox@2665 228 - { "Area Code", &options.areacode, NULL, "", 0 },
domcox@2665 229 - { "Dial Command", &options.dial_cmd, NULL, "ATDT", 0 },
domcox@2665 230 - { "Username", &options.login, NULL, "", 0 },
domcox@2665 231 - { "Login Prompt", &options.login_prompt, NULL, "", 0 },
domcox@2665 232 - { "Password", &options.password, NULL, "", 0 },
domcox@2665 233 - { "Password Prompt", &options.pass_prompt, NULL, "", 0 },
domcox@2665 234 - { "PPPD Path", &options.where_pppd, NULL, "/usr/sbin/pppd", 0 },
domcox@2665 235 - { "Force Address", &options.force_addr, NULL, "", 0 },
domcox@2665 236 - { "Remote Name", &options.remote, NULL, "*", 0 },
domcox@2665 237 - { "Default Reply", &options.default_reply,NULL, "ppp", 0 },
domcox@2665 238 - { "ISDN", &options.isdn, NULL, "", 0 },
domcox@2665 239 + { (char*)"Modem", &options.modem, NULL, (char*)"/dev/modem", 0 },
domcox@2665 240 + { (char*)"Init1", &options.init1, NULL, (char*)"ATZ", 0 },
domcox@2665 241 + { (char*)"Init2", &options.init2, NULL, (char*)"", 0 },
domcox@2665 242 + { (char*)"Init3", &options.init3, NULL, (char*)"", 0 },
domcox@2665 243 + { (char*)"Init4", &options.init4, NULL, (char*)"", 0 },
domcox@2665 244 + { (char*)"Init5", &options.init5, NULL, (char*)"", 0 },
domcox@2665 245 + { (char*)"Init6", &options.init6, NULL, (char*)"", 0 },
domcox@2665 246 + { (char*)"Init7", &options.init7, NULL, (char*)"", 0 },
domcox@2665 247 + { (char*)"Init8", &options.init8, NULL, (char*)"", 0 },
domcox@2665 248 + { (char*)"Init9", &options.init9, NULL, (char*)"", 0 },
domcox@2665 249 + { (char*)"Phone", &options.phnum, NULL, (char*)"", 0 },
domcox@2665 250 + { (char*)"Dial Prefix", &options.dial_prefix, NULL, (char*)"", 0 },
domcox@2665 251 + { (char*)"Area Code", &options.areacode, NULL, (char*)"", 0 },
domcox@2665 252 + { (char*)"Dial Command", &options.dial_cmd, NULL, (char*)"ATDT", 0 },
domcox@2665 253 + { (char*)"Username", &options.login, NULL, (char*)"", 0 },
domcox@2665 254 + { (char*)"Login Prompt", &options.login_prompt, NULL, (char*)"", 0 },
domcox@2665 255 + { (char*)"Password", &options.password, NULL, (char*)"", 0 },
domcox@2665 256 + { (char*)"Password Prompt", &options.pass_prompt, NULL, (char*)"", 0 },
domcox@2665 257 + { (char*)"PPPD Path", &options.where_pppd, NULL, (char*)"/usr/sbin/pppd", 0 },
domcox@2665 258 + { (char*)"Force Address", &options.force_addr, NULL, (char*)"", 0 },
domcox@2665 259 + { (char*)"Remote Name", &options.remote, NULL, (char*)"*", 0 },
domcox@2665 260 + { (char*)"Default Reply", &options.default_reply,NULL, (char*)"ppp", 0 },
domcox@2665 261 + { (char*)"ISDN", &options.isdn, NULL, (char*)"", 0 },
domcox@2665 262
domcox@2665 263 // int/bool options
domcox@2665 264 - { "Baud", NULL, &options.baud, "", DEFAULT_BAUD },
domcox@2665 265 - { "Carrier Check", NULL, &options.carrier_check, "", true },
domcox@2665 266 - { "Stupid Mode", NULL, &options.stupid_mode, "", false },
domcox@2665 267 - { "New PPPD", NULL, &options.new_pppd, "", true },
domcox@2665 268 - { "Auto Reconnect", NULL, &options.auto_reconnect,"", true },
domcox@2665 269 - { NULL, NULL, NULL, "", 0 }
domcox@2665 270 + { (char*)"Baud", NULL, &options.baud, (char*)"", DEFAULT_BAUD },
domcox@2665 271 + { (char*)"Carrier Check", NULL, &options.carrier_check, (char*)"", true },
domcox@2665 272 + { (char*)"Stupid Mode", NULL, &options.stupid_mode, (char*)"", false },
domcox@2665 273 + { (char*)"New PPPD", NULL, &options.new_pppd, (char*)"", true },
domcox@2665 274 + { (char*)"Auto Reconnect", NULL, &options.auto_reconnect,(char*)"", true },
domcox@2665 275 + { NULL, NULL, NULL, (char*)"", 0 }
domcox@2665 276 };
domcox@2665 277
domcox@2665 278 - char * d = "Dialer Defaults";
domcox@2665 279 + char * d = (char*)"Dialer Defaults";
domcox@2665 280
domcox@2665 281 for( int i=0; opts[i].name != NULL; i++ ) {
domcox@2665 282 if( opts[i].str_member == NULL ) {
domcox@2665 283 --- wvdial-1.41/wvdial/wvmodemscan.cc Mon Sep 13 22:07:35 1999
domcox@2665 284 +++ wvdial-1.41+dom/wvdial/wvmodemscan.cc Thu Mar 19 20:56:27 2009
domcox@2665 285 @@ -19,9 +19,9 @@
domcox@2665 286 // startup at atz atq0 atv1 ate1 ats0 carrier dtr fastdial
domcox@2665 287 // baudstep reinit done
domcox@2665 288 static char *commands[WvModemScan::NUM_STAGES] = {
domcox@2665 289 - NULL, "Q0 V1 E1", "Z", "S0=0",
domcox@2665 290 - "&C1", "&D2", "S11=55", "+FCLASS=0", NULL,
domcox@2665 291 - NULL, "", NULL
domcox@2665 292 + NULL, (char*)"Q0 V1 E1", (char*)"Z", (char*)"S0=0",
domcox@2665 293 + (char*)"&C1", (char*)"&D2", (char*)"S11=55", (char*)"+FCLASS=0", NULL,
domcox@2665 294 + NULL, (char*)"", NULL
domcox@2665 295 };
domcox@2665 296
domcox@2665 297
domcox@2665 298 --- wvdial-1.41/wvdial/wvpapchap.cc Sun Jun 6 19:08:49 1999
domcox@2665 299 +++ wvdial-1.41+dom/wvdial/wvpapchap.cc Thu Mar 19 20:56:27 2009
domcox@2665 300 @@ -25,16 +25,16 @@
domcox@2665 301
domcox@2665 302 // PAP secrets:
domcox@2665 303 nuke_contents();
domcox@2665 304 - load_file( PAP_SECRETS );
domcox@2665 305 + load_file( (char*)PAP_SECRETS );
domcox@2665 306 do_secret( username, password, remote );
domcox@2665 307 - if( write_file( PAP_SECRETS ) == false )
domcox@2665 308 + if( write_file( (char*)PAP_SECRETS ) == false )
domcox@2665 309 pap_success = false;
domcox@2665 310
domcox@2665 311 // CHAP secrets:
domcox@2665 312 nuke_contents();
domcox@2665 313 - load_file( CHAP_SECRETS );
domcox@2665 314 + load_file( (char*)CHAP_SECRETS );
domcox@2665 315 do_secret( username, password, remote );
domcox@2665 316 - if( write_file( CHAP_SECRETS ) == false )
domcox@2665 317 + if( write_file( (char*)CHAP_SECRETS ) == false )
domcox@2665 318 chap_success = false;
domcox@2665 319 }
domcox@2665 320
domcox@2665 321 --- wvdial-1.41/wvdial/wvpapchap.h Wed Mar 24 04:41:42 1999
domcox@2665 322 +++ wvdial-1.41+dom/wvdial/wvpapchap.h Thu Mar 19 20:56:27 2009
domcox@2665 323 @@ -43,4 +43,4 @@
domcox@2665 324 const char * remote );
domcox@2665 325 };
domcox@2665 326
domcox@2665 327 -#endif __WVPAPCHAP_H
domcox@2665 328 +#endif // __WVPAPCHAP_H
domcox@2665 329 --- wvdial-1.41/wvver.h Fri Jan 7 03:55:50 2000
domcox@2665 330 +++ wvdial-1.41+dom/wvver.h Thu Mar 19 20:56:27 2009
domcox@2665 331 @@ -28,4 +28,4 @@
domcox@2665 332 #define TUNNELV_VER 0x00020000
domcox@2665 333 #define TUNNELV_VER_STRING "2.00"
domcox@2665 334
domcox@2665 335 -#endif __WVDEFS_H
domcox@2665 336 +#endif // __WVDEFS_H
pascal@4262 337
pascal@4262 338 --- wvdial-1.41/wvdial/wvmodemscan.cc
pascal@4262 339 +++ wvdial-1.41/wvdial/wvmodemscan.cc
pascal@4262 340 @@ -331,10 +331,8 @@
pascal@4262 341 }
pascal@4262 342
pascal@4262 343
pascal@4262 344 -static int filesort(const void *_e1, const void *_e2)
pascal@4262 345 +static int filesort(const dirent **e1, const dirent **e2)
pascal@4262 346 {
pascal@4262 347 - dirent const * const *e1 = (dirent const * const *)_e1;
pascal@4262 348 - dirent const * const *e2 = (dirent const * const *)_e2;
pascal@4262 349 const char *p1, *p2;
pascal@4262 350 int diff;
pascal@4262 351