removed some unnecessary includes
This commit is contained in:
parent
233071cfe0
commit
d6d577627b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue