diff --git a/panda/src/downloadertools/Sources.pp b/panda/src/downloadertools/Sources.pp index b82a5d336c..2dcd1fb7b5 100644 --- a/panda/src/downloadertools/Sources.pp +++ b/panda/src/downloadertools/Sources.pp @@ -79,13 +79,3 @@ pdecompress.cxx #end bin_target - -#begin bin_target - #define TARGET test_downloader - #define BUILD_TARGET $[HAVE_ZLIB] - #define USE_PACKAGES $[USE_PACKAGES] zlib - - #define SOURCES \ - test_downloader.cxx - -#end bin_target diff --git a/panda/src/downloadertools/test_downloader.cxx b/panda/src/downloadertools/test_downloader.cxx deleted file mode 100644 index 7d80a9798a..0000000000 --- a/panda/src/downloadertools/test_downloader.cxx +++ /dev/null @@ -1,73 +0,0 @@ -// Filename: test_downloader.cxx -// Created by: -// -//////////////////////////////////////////////////////////////////// -// -// PANDA 3D SOFTWARE -// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved -// -// All use of this software is subject to the terms of the Panda 3d -// Software license. You should have received a copy of this license -// along with this source code; you will also find a current copy of -// the license at http://www.panda3d.org/license.txt . -// -// To contact the maintainers of this program write to -// panda3d@yahoogroups.com . -// -//////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include - -int -main(int argc, char *argv[]) { - - //if (argc < 4) { - if (argc < 3) { - //cerr << "Usage: test_downloader " - cerr << "Usage: test_downloader " - << endl; - return 0; - } - - string server_name = argv[1]; - Filename src_file = argv[2]; - //Filename dest_file = argv[3]; - - Downloader dl; - if (dl.connect_to_server(server_name) == false) - return 0; - - //int ret = dl.initiate(src_file, dest_file); - int ret = dl.initiate(src_file); - if (ret < 0) - return 0; - - //for (;;) { - bool done = false; - while (!done) { - ret = dl.run(); - if (ret == EU_success) { - cerr << "bytes per second: " << dl.get_bytes_per_second() << endl; - //return 1; - done = true; - } else if (ret == EU_write) { - cerr << "bytes per second: " << dl.get_bytes_per_second() << endl; - } else if (ret < 0) { - cerr << "error!" << endl; - return 0; - } - } - - cerr << "download to memory complete" << endl; - Ramfile rfile; - dl.get_ramfile(rfile); - cerr << "ram file length: " << rfile._data.length() << endl; - Decompressor dc; - dc.decompress(rfile); - cerr << "ram file length: " << rfile._data.length() << endl; - - return 0; -}