summaryrefslogtreecommitdiff
blob: e38596f986cb71c33d91e38bb34d69f80b24b9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
diff -EbBcr knapster2-0.4/knapster2/incomingconnection.cpp knapster2-0.4s/knapster2/incomingconnection.cpp
*** knapster2-0.4/knapster2/incomingconnection.cpp	2002-04-13 11:29:43.000000000 +0200
--- knapster2-0.4s/knapster2/incomingconnection.cpp	2002-10-08 00:36:13.000000000 +0200
***************
*** 4,9 ****
--- 4,10 ----
   */
  #include "incomingconnection.h"
  #include <iostream>
+ using namespace std;
  #include "support_funcs.h"
  
  #include <ksock.h>
diff -EbBcr knapster2-0.4/knapster2/knap_adduserdlg.cpp knapster2-0.4s/knapster2/knap_adduserdlg.cpp
*** knapster2-0.4/knapster2/knap_adduserdlg.cpp	2002-04-13 11:29:43.000000000 +0200
--- knapster2-0.4s/knapster2/knap_adduserdlg.cpp	2002-10-08 00:35:34.000000000 +0200
***************
*** 18,23 ****
--- 18,24 ----
  //#include <qwhatsthis.h>
  
  #include <iostream>
+ using namespace std;
  /* 
   *  Constructs a KNAP_AddUserDlg which is a child of 'parent', with the 
   *  name 'name' and widget flags set to 'f' 
diff -EbBcr knapster2-0.4/knapster2/knap_chanlist.cpp knapster2-0.4s/knapster2/knap_chanlist.cpp
*** knapster2-0.4/knapster2/knap_chanlist.cpp	2002-04-13 11:29:43.000000000 +0200
--- knapster2-0.4s/knapster2/knap_chanlist.cpp	2002-10-08 00:34:41.000000000 +0200
***************
*** 17,22 ****
--- 17,23 ----
  #include "support_funcs.h"
  
  #include <iostream>
+ using namespace std;
  /* 
   *  Constructs a KNAP_Channellist which is a child of 'parent', with the 
   *  name 'name' and widget flags set to 'f' 
diff -EbBcr knapster2-0.4/knapster2/knap_chanpanel.cpp knapster2-0.4s/knapster2/knap_chanpanel.cpp
*** knapster2-0.4/knapster2/knap_chanpanel.cpp	2002-04-14 05:22:33.000000000 +0200
--- knapster2-0.4s/knapster2/knap_chanpanel.cpp	2002-10-08 00:33:40.000000000 +0200
***************
*** 32,37 ****
--- 32,38 ----
  #include "speedbad.xpm" 
  
  #include <iostream>
+ using namespace std;
  
  KNAP_ChanPanel::KNAP_ChanPanel(QWidget *parent,const char *name)
  : QFrame(parent,name)
diff -EbBcr knapster2-0.4/knapster2/knap_connectdlg.cpp knapster2-0.4s/knapster2/knap_connectdlg.cpp
*** knapster2-0.4/knapster2/knap_connectdlg.cpp	2002-04-14 03:26:42.000000000 +0200
--- knapster2-0.4s/knapster2/knap_connectdlg.cpp	2002-10-08 00:32:40.000000000 +0200
***************
*** 17,22 ****
--- 17,23 ----
  #include "knap_preferences.h"
  
  #include <iostream>
+ using namespace std;
  
  /* 
   *  Constructs a KNAP_ConnectDlg which is a child of 'parent', with the 
diff -EbBcr knapster2-0.4/knapster2/knap_homepanel.cpp knapster2-0.4s/knapster2/knap_homepanel.cpp
*** knapster2-0.4/knapster2/knap_homepanel.cpp	2002-04-13 11:29:43.000000000 +0200
--- knapster2-0.4s/knapster2/knap_homepanel.cpp	2002-10-08 00:31:51.000000000 +0200
***************
*** 4,13 ****
  #include <qwidget.h>
  
  #include <iostream>
  
  //#include "welcome-html.h"
  
! KNAP_HomePanel::KNAP_HomePanel(QWidget *parent,const char *name=0)
     : QWidget(parent,name)
  {
  
--- 4,14 ----
  #include <qwidget.h>
  
  #include <iostream>
+ using namespace std;
  
  //#include "welcome-html.h"
  
! KNAP_HomePanel::KNAP_HomePanel(QWidget *parent,const char *name)
     : QWidget(parent,name)
  {
  
diff -EbBcr knapster2-0.4/knapster2/knap_hotlistpanel.cpp knapster2-0.4s/knapster2/knap_hotlistpanel.cpp
*** knapster2-0.4/knapster2/knap_hotlistpanel.cpp	2002-04-14 03:36:59.000000000 +0200
--- knapster2-0.4s/knapster2/knap_hotlistpanel.cpp	2002-10-08 00:29:30.000000000 +0200
***************
*** 19,24 ****
--- 19,25 ----
  #include "songinfo.h"
  
  #include <iostream>
+ using namespace std;
  #include <stdio.h>
  #include <stdlib.h>
  #include <math.h>
***************
*** 362,368 ****
  
     if(user == song->user)
     { 
!       QString s_time = QString().setNum(floor(song->seconds / 60));
        cerr << "KNAP_HotlistPanel::addSong(): time is " << song->seconds << endl;
        s_time += ":";
        int sec = song->seconds % 60;
--- 363,369 ----
  
     if(user == song->user)
     { 
!       QString s_time = QString().setNum((int)floor((double)(song->seconds / 60)));
        cerr << "KNAP_HotlistPanel::addSong(): time is " << song->seconds << endl;
        s_time += ":";
        int sec = song->seconds % 60;
diff -EbBcr knapster2-0.4/knapster2/knap_librarypanel.cpp knapster2-0.4s/knapster2/knap_librarypanel.cpp
*** knapster2-0.4/knapster2/knap_librarypanel.cpp	2002-04-13 12:13:51.000000000 +0200
--- knapster2-0.4s/knapster2/knap_librarypanel.cpp	2002-10-08 00:26:13.000000000 +0200
***************
*** 35,41 ****
  
  #include "songinfo.h"
  
! #include <iostream.h>
  
  #include <qdir.h>
  #include <qfile.h>
--- 35,42 ----
  
  #include "songinfo.h"
  
! #include <iostream>
! using namespace std;
  
  #include <qdir.h>
  #include <qfile.h>
***************
*** 236,242 ****
    // put the item in the listview
    // field 6 is invisible & holds the FULL path name of the song
  
!   QString s_time = QString().setNum(floor(seconds / 60));
    s_time += ":";
    int sec = seconds % 60;
    if (sec < 10) s_time += "0";
--- 237,243 ----
    // put the item in the listview
    // field 6 is invisible & holds the FULL path name of the song
  
!   QString s_time = QString().setNum((int)floor((double)(seconds / 60)));
    s_time += ":";
    int sec = seconds % 60;
    if (sec < 10) s_time += "0";
diff -EbBcr knapster2-0.4/knapster2/knap_listview.cpp knapster2-0.4s/knapster2/knap_listview.cpp
*** knapster2-0.4/knapster2/knap_listview.cpp	2002-04-13 12:14:19.000000000 +0200
--- knapster2-0.4s/knapster2/knap_listview.cpp	2002-10-08 00:06:06.000000000 +0200
***************
*** 27,33 ****
  #include <qheader.h>
  #include <qstring.h>
  
! #include <iostream.h>
  //#include <stdlib.h>
  
  static int stricmp(const char *s1, const char *s2)
--- 27,33 ----
  #include <qheader.h>
  #include <qstring.h>
  
! #include <iostream>
  //#include <stdlib.h>
  
  static int stricmp(const char *s1, const char *s2)
diff -EbBcr knapster2-0.4/knapster2/knap_player.cpp knapster2-0.4s/knapster2/knap_player.cpp
*** knapster2-0.4/knapster2/knap_player.cpp	2002-04-14 05:51:34.000000000 +0200
--- knapster2-0.4s/knapster2/knap_player.cpp	2002-10-08 00:22:09.000000000 +0200
***************
*** 3,8 ****
--- 3,10 ----
  #include <sys/types.h>
  #include <sys/wait.h>
  #include <errno.h>
+ #include <iostream>
+ using namespace std;
  
  #include "knap_player.h"
  #include <klocale.h>
diff -EbBcr knapster2-0.4/knapster2/knap_playlist.cpp knapster2-0.4s/knapster2/knap_playlist.cpp
*** knapster2-0.4/knapster2/knap_playlist.cpp	2002-04-13 11:29:43.000000000 +0200
--- knapster2-0.4s/knapster2/knap_playlist.cpp	2002-10-08 00:19:24.000000000 +0200
***************
*** 13,18 ****
--- 13,19 ----
  #include <qtextstream.h>
  
  #include <iostream>
+ using namespace std;
  
  #include "support_funcs.h"
  
diff -EbBcr knapster2-0.4/knapster2/knap_preferencesdlg.cpp knapster2-0.4s/knapster2/knap_preferencesdlg.cpp
*** knapster2-0.4/knapster2/knap_preferencesdlg.cpp	2002-04-13 11:29:43.000000000 +0200
--- knapster2-0.4s/knapster2/knap_preferencesdlg.cpp	2002-10-08 00:18:19.000000000 +0200
***************
*** 36,41 ****
--- 36,42 ----
  #include <kfiledialog.h>
  
  #include <iostream>
+ using namespace std;
  
  static const char* const image0_data[] = { 
  "48 48 30 1",
diff -EbBcr knapster2-0.4/knapster2/knap_searchpanel.cpp knapster2-0.4s/knapster2/knap_searchpanel.cpp
*** knapster2-0.4/knapster2/knap_searchpanel.cpp	2002-04-13 11:39:41.000000000 +0200
--- knapster2-0.4s/knapster2/knap_searchpanel.cpp	2002-10-08 00:16:54.000000000 +0200
***************
*** 36,42 ****
  #include "songinfo.h"
  #include "support_funcs.h"
  
! #include <iostream.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <math.h>
--- 36,43 ----
  #include "songinfo.h"
  #include "support_funcs.h"
  
! #include <iostream>
! using namespace std;
  #include <stdio.h>
  #include <stdlib.h>
  #include <math.h>
***************
*** 421,427 ****
     char buf[10];
     sprintf(buf,"%05d",song->speed);
  
!    QString s_time = QString().setNum(floor(song->seconds / 60));
     s_time += ":";
     int sec = song->seconds % 60;
     if (sec < 10) s_time += "0";
--- 422,428 ----
     char buf[10];
     sprintf(buf,"%05d",song->speed);
  
!    QString s_time = QString().setNum((int)floor((long double)(song->seconds / 60)));
     s_time += ":";
     int sec = song->seconds % 60;
     if (sec < 10) s_time += "0";
diff -EbBcr knapster2-0.4/knapster2/knapster2.cpp knapster2-0.4s/knapster2/knapster2.cpp
*** knapster2-0.4/knapster2/knapster2.cpp	2002-05-19 06:12:13.000000000 +0200
--- knapster2-0.4s/knapster2/knapster2.cpp	2002-10-08 00:08:03.000000000 +0200
***************
*** 1,4 ****
--- 1,5 ----
  #include <iostream>
+ using namespace std;
  #include <stdio.h> // for sscanf
  
  #include <klocale.h>
diff -EbBcr knapster2-0.4/knapster2/knap_transferpanel.cpp knapster2-0.4s/knapster2/knap_transferpanel.cpp
*** knapster2-0.4/knapster2/knap_transferpanel.cpp	2002-05-19 06:21:50.000000000 +0200
--- knapster2-0.4s/knapster2/knap_transferpanel.cpp	2002-10-08 00:12:58.000000000 +0200
***************
*** 44,50 ****
  
  #include <qtimer.h>
  
! #include <iostream.h>
  
  #include <qpainter.h>
  #include <qcursor.h>
--- 44,51 ----
  
  #include <qtimer.h>
  
! #include <iostream>
! using namespace std;
  
  #include <qpainter.h>
  #include <qcursor.h>
***************
*** 84,91 ****
  	       ret=""; // i18n("Unknown");
  	       return ret;
  	    }
! 	    int hours = (int)floor(timeleft / 3600);
! 	    int minutes = (int)floor((timeleft % 3600) / 60);
  	    int seconds = timeleft % 60;
  	    ret = QString().setNum(hours).rightJustify(2, '0') + ":" +
  	       QString().setNum(minutes).rightJustify(2, '0') + ":" +
--- 85,92 ----
  	       ret=""; // i18n("Unknown");
  	       return ret;
  	    }
! 	    int hours = (int)floor((long double)(timeleft / 3600));
! 	    int minutes = (int)floor((long double)((timeleft % 3600) / 60));
  	    int seconds = timeleft % 60;
  	    ret = QString().setNum(hours).rightJustify(2, '0') + ":" +
  	       QString().setNum(minutes).rightJustify(2, '0') + ":" +
diff -EbBcr knapster2-0.4/knapster2/napsterconnection.cpp knapster2-0.4s/knapster2/napsterconnection.cpp
*** knapster2-0.4/knapster2/napsterconnection.cpp	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/napsterconnection.cpp	2002-10-08 00:48:01.000000000 +0200
***************
*** 24,29 ****
--- 24,30 ----
  /*
  #include <netdb.h>
   */
+ #include <sys/types.h>
  #include <sys/socket.h>
  
  #include <sys/time.h>
***************
*** 41,47 ****
  
  #include <kapp.h>
  
! #include <iostream.h>
  
  #include "songinfo.h"
  // for doing looping inbetween parts set this 0- not that it makes much difference
--- 42,53 ----
  
  #include <kapp.h>
  
! #include <iostream>
! using namespace std;
! //namespace std {
! //	extern int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);
! //	int close(int fd);
! //} // namespace std
  
  #include "songinfo.h"
  // for doing looping inbetween parts set this 0- not that it makes much difference
***************
*** 178,187 ****
  //   kapp->processEvents(1000);
  #endif
  
!    if(std::connect(_napstersock,(sockaddr
  	       *)&_sockaddr,sizeof(struct sockaddr))<0) 
     {
!       std::close(_napstersock);
        _napstersock=-1;
        cerr<<"NapsterConnection::open(): Can't connect!\n"<<flush;
        _lasterror=NAP_NO_CONNECT;
--- 184,193 ----
  //   kapp->processEvents(1000);
  #endif
  
!    if(::connect(_napstersock,(sockaddr
  	       *)&_sockaddr,sizeof(struct sockaddr))<0) 
     {
!       ::close(_napstersock);
        _napstersock=-1;
        cerr<<"NapsterConnection::open(): Can't connect!\n"<<flush;
        _lasterror=NAP_NO_CONNECT;
***************
*** 398,404 ****
         }
         // kill from list
         else 
! 	  std::close(i->getSocket());
         
         incominglist.removeRef(i);
       }
--- 404,410 ----
         }
         // kill from list
         else 
! 	  ::close(i->getSocket());
         
         incominglist.removeRef(i);
       }
***************
*** 918,924 ****
  #ifdef DEBUG_1
  	 cerr<< "bind error in connection listener\n"<<flush;
  #endif
! 	 std::close(local);
  	 local=-1;
  	 _lasterror=NAP_NO_BIND;
  	 return false;
--- 924,930 ----
  #ifdef DEBUG_1
  	 cerr<< "bind error in connection listener\n"<<flush;
  #endif
! 	 ::close(local);
  	 local=-1;
  	 _lasterror=NAP_NO_BIND;
  	 return false;
diff -EbBcr knapster2-0.4/knapster2/napsterconnection.h knapster2-0.4s/knapster2/napsterconnection.h
*** knapster2-0.4/knapster2/napsterconnection.h	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/napsterconnection.h	2002-10-07 23:33:06.000000000 +0200
***************
*** 22,28 ****
    *@author jade
    */
  
! #include <iostream.h>
  //#include <string>
  
  #include <ksock.h>  // FIXME
--- 22,28 ----
    *@author jade
    */
  
! #include <iostream>
  //#include <string>
  
  #include <ksock.h>  // FIXME
diff -EbBcr knapster2-0.4/knapster2/napsterdownload1.cpp knapster2-0.4s/knapster2/napsterdownload1.cpp
*** knapster2-0.4/knapster2/napsterdownload1.cpp	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/napsterdownload1.cpp	2002-10-08 00:04:46.000000000 +0200
***************
*** 36,42 ****
  
  #include <stdio.h>
  #include <stdlib.h>
! #include <iostream.h>
  
  #include <ksock.h>
  
--- 36,43 ----
  
  #include <stdio.h>
  #include <stdlib.h>
! #include <iostream>
! using namespace std;
  
  #include <ksock.h>
  
diff -EbBcr knapster2-0.4/knapster2/napsterdownload1.h knapster2-0.4s/knapster2/napsterdownload1.h
*** knapster2-0.4/knapster2/napsterdownload1.h	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/napsterdownload1.h	2002-10-07 23:11:24.000000000 +0200
***************
*** 36,42 ****
  {
  //  friend NapsterConnection;
  //  friend Knapster2;
!   friend KNAP_TransferPanel;
  //  char _buffer[2048];
  
    int _sock;
--- 36,42 ----
  {
  //  friend NapsterConnection;
  //  friend Knapster2;
!   friend class KNAP_TransferPanel;
  //  char _buffer[2048];
  
    int _sock;
diff -EbBcr knapster2-0.4/knapster2/napsterupload.cpp knapster2-0.4s/knapster2/napsterupload.cpp
*** knapster2-0.4/knapster2/napsterupload.cpp	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/napsterupload.cpp	2002-10-08 00:04:55.000000000 +0200
***************
*** 39,45 ****
  
  #include <qfile.h>
  
! #include <iostream.h>
  
  #include "support_funcs.h"
  
--- 39,46 ----
  
  #include <qfile.h>
  
! #include <iostream>
! using namespace std;
  
  #include "support_funcs.h"
  
diff -EbBcr knapster2-0.4/knapster2/napsterupload.h knapster2-0.4s/knapster2/napsterupload.h
*** knapster2-0.4/knapster2/napsterupload.h	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/napsterupload.h	2002-10-07 23:10:43.000000000 +0200
***************
*** 28,34 ****
  
  class NapsterUpload : public NapsterTransfer
  {
!   friend KNAP_TransferPanel;
     
    char _buffer[1024+2];
  
--- 28,34 ----
  
  class NapsterUpload : public NapsterTransfer
  {
!   friend class KNAP_TransferPanel;
     
    char _buffer[1024+2];
  
diff -EbBcr knapster2-0.4/knapster2/songinfo.cpp knapster2-0.4s/knapster2/songinfo.cpp
*** knapster2-0.4/knapster2/songinfo.cpp	2002-04-13 11:29:44.000000000 +0200
--- knapster2-0.4s/knapster2/songinfo.cpp	2002-10-07 23:14:31.000000000 +0200
***************
*** 19,25 ****
  
  #include "md5.h"
  
! #include <iostream.h>
  
  #include <qdir.h>
  #include <qfile.h>
--- 19,25 ----
  
  #include "md5.h"
  
! #include <iostream>
  
  #include <qdir.h>
  #include <qfile.h>