removed some unnecessary includes

This commit is contained in:
Arvid Norberg 2009-11-22 21:08:44 +00:00
parent 233071cfe0
commit d6d577627b
3 changed files with 9 additions and 13 deletions

View File

@ -30,11 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <iostream> #include <stdlib.h>
#include <fstream>
#include <iterator>
#include <exception>
#include "libtorrent/entry.hpp" #include "libtorrent/entry.hpp"
#include "libtorrent/bencode.hpp" #include "libtorrent/bencode.hpp"
#include "libtorrent/session.hpp" #include "libtorrent/session.hpp"
@ -45,8 +41,8 @@ int main(int argc, char* argv[])
if (argc != 2) if (argc != 2)
{ {
std::cerr << "usage: ./simple_client torrent-file\n" fputs("usage: ./simple_client torrent-file\n"
"to stop the client, press return.\n"; "to stop the client, press return.\n", stderr);
return 1; return 1;
} }
@ -58,20 +54,19 @@ int main(int argc, char* argv[])
p.ti = new torrent_info(argv[1], ec); p.ti = new torrent_info(argv[1], ec);
if (ec) if (ec)
{ {
std::cout << ec.message() << std::endl; fprintf(stderr, "%s\n", ec.message().c_str());
return 1; return 1;
} }
s.add_torrent(p, ec); s.add_torrent(p, ec);
if (ec) if (ec)
{ {
std::cerr << ec.message() << std::endl; fprintf(stderr, "%s\n", ec.message().c_str());
return 1; return 1;
} }
// wait for the user to end // wait for the user to end
char a; char a;
std::cin.unsetf(std::ios_base::skipws); scanf("%c\n", &a);
std::cin >> a;
return 0; return 0;
} }

View File

@ -32,10 +32,12 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/pch.hpp" #include "libtorrent/pch.hpp"
#ifdef TORRENT_DHT_VERBOSE_LOGGING
#include <fstream> #include <fstream>
#endif
#include <set> #include <set>
#include <numeric> #include <numeric>
#include <stdexcept>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/ref.hpp> #include <boost/ref.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>

View File

@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/pch.hpp" #include "libtorrent/pch.hpp"
#include <algorithm> #include <algorithm>
#include <iomanip>
#include <ctime> #include <ctime>
#include <boost/bind.hpp> #include <boost/bind.hpp>