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

View File

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

View File

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