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 + using namespace std; #include "support_funcs.h" #include 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 #include + 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 + 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 + 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 + 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 #include //#include "welcome-html.h" ! KNAP_HomePanel::KNAP_HomePanel(QWidget *parent,const char *name=0) : QWidget(parent,name) { --- 4,14 ---- #include #include + 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 + using namespace std; #include #include #include *************** *** 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 #include #include --- 35,42 ---- #include "songinfo.h" ! #include ! using namespace std; #include #include *************** *** 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 #include ! #include //#include static int stricmp(const char *s1, const char *s2) --- 27,33 ---- #include #include ! #include //#include 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 #include #include + #include + using namespace std; #include "knap_player.h" #include 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 #include + 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 #include + 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 #include #include #include --- 36,43 ---- #include "songinfo.h" #include "support_funcs.h" ! #include ! using namespace std; #include #include #include *************** *** 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 + using namespace std; #include // for sscanf #include 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 ! #include #include #include --- 44,51 ---- #include ! #include ! using namespace std; #include #include *************** *** 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 */ + #include #include #include *************** *** 41,47 **** #include ! #include #include "songinfo.h" // for doing looping inbetween parts set this 0- not that it makes much difference --- 42,53 ---- #include ! #include ! 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"<processEvents(1000); #endif ! if(::connect(_napstersock,(sockaddr *)&_sockaddr,sizeof(struct sockaddr))<0) { ! ::close(_napstersock); _napstersock=-1; cerr<<"NapsterConnection::open(): Can't connect!\n"<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"< //#include #include // FIXME --- 22,28 ---- *@author jade */ ! #include //#include #include // 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 #include ! #include #include --- 36,43 ---- #include #include ! #include ! using namespace std; #include 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 ! #include #include "support_funcs.h" --- 39,46 ---- #include ! #include ! 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 #include #include --- 19,25 ---- #include "md5.h" ! #include #include #include