mirror of https://github.com/aria2/aria2
2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fix the bug that causes -s option not to work. * src/main.cc (main) * src/a2algo.h: New file.pull/1/head
parent
a90e103ab1
commit
583f6c9c22
|
@ -1,3 +1,9 @@
|
||||||
|
2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Fix the bug that causes -s option not to work.
|
||||||
|
* src/main.cc (main)
|
||||||
|
* src/a2algo.h: New file.
|
||||||
|
|
||||||
2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Create directory structure specified in metalink file.
|
Create directory structure specified in metalink file.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for aria2c 0.11.0.
|
# Generated by GNU Autoconf 2.61 for aria2c 0.11.1.
|
||||||
#
|
#
|
||||||
# Report bugs to <t-tujikawa@users.sourceforge.net>.
|
# Report bugs to <t-tujikawa@users.sourceforge.net>.
|
||||||
#
|
#
|
||||||
|
@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='aria2c'
|
PACKAGE_NAME='aria2c'
|
||||||
PACKAGE_TARNAME='aria2c'
|
PACKAGE_TARNAME='aria2c'
|
||||||
PACKAGE_VERSION='0.11.0'
|
PACKAGE_VERSION='0.11.1'
|
||||||
PACKAGE_STRING='aria2c 0.11.0'
|
PACKAGE_STRING='aria2c 0.11.1'
|
||||||
PACKAGE_BUGREPORT='t-tujikawa@users.sourceforge.net'
|
PACKAGE_BUGREPORT='t-tujikawa@users.sourceforge.net'
|
||||||
|
|
||||||
ac_unique_file="src/Socket.h"
|
ac_unique_file="src/Socket.h"
|
||||||
|
@ -1275,7 +1275,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures aria2c 0.11.0 to adapt to many kinds of systems.
|
\`configure' configures aria2c 0.11.1 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
@ -1345,7 +1345,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of aria2c 0.11.0:";;
|
short | recursive ) echo "Configuration of aria2c 0.11.1:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
@ -1466,7 +1466,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
aria2c configure 0.11.0
|
aria2c configure 0.11.1
|
||||||
generated by GNU Autoconf 2.61
|
generated by GNU Autoconf 2.61
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||||
|
@ -1480,7 +1480,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by aria2c $as_me 0.11.0, which was
|
It was created by aria2c $as_me 0.11.1, which was
|
||||||
generated by GNU Autoconf 2.61. Invocation command line was
|
generated by GNU Autoconf 2.61. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
@ -2150,7 +2150,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='aria2c'
|
PACKAGE='aria2c'
|
||||||
VERSION='0.11.0'
|
VERSION='0.11.1'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
@ -12941,7 +12941,7 @@ exec 6>&1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by aria2c $as_me 0.11.0, which was
|
This file was extended by aria2c $as_me 0.11.1, which was
|
||||||
generated by GNU Autoconf 2.61. Invocation command line was
|
generated by GNU Autoconf 2.61. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
@ -12994,7 +12994,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF
|
cat >>$CONFIG_STATUS <<_ACEOF
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
aria2c config.status 0.11.0
|
aria2c config.status 0.11.1
|
||||||
configured by $0, generated by GNU Autoconf 2.61,
|
configured by $0, generated by GNU Autoconf 2.61,
|
||||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
#
|
#
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(aria2c, 0.11.0, t-tujikawa@users.sourceforge.net)
|
AC_INIT(aria2c, 0.11.1, t-tujikawa@users.sourceforge.net)
|
||||||
AM_INIT_AUTOMAKE()
|
AM_INIT_AUTOMAKE()
|
||||||
AM_PATH_CPPUNIT(1.10.2)
|
AM_PATH_CPPUNIT(1.10.2)
|
||||||
AC_CONFIG_SRCDIR([src/Socket.h])
|
AC_CONFIG_SRCDIR([src/Socket.h])
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# General Public License and is *not* in the public domain.
|
# General Public License and is *not* in the public domain.
|
||||||
|
|
||||||
PACKAGE = aria2c
|
PACKAGE = aria2c
|
||||||
VERSION = 0.11.0
|
VERSION = 0.11.1
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
/* <!-- copyright */
|
||||||
|
/*
|
||||||
|
* aria2 - The high speed download utility
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the copyright holders give
|
||||||
|
* permission to link the code of portions of this program with the
|
||||||
|
* OpenSSL library under certain conditions as described in each
|
||||||
|
* individual source file, and distribute linked combinations
|
||||||
|
* including the two.
|
||||||
|
* You must obey the GNU General Public License in all respects
|
||||||
|
* for all of the code used other than OpenSSL. If you modify
|
||||||
|
* file(s) with this exception, you may extend this exception to your
|
||||||
|
* version of the file(s), but you are not obligated to do so. If you
|
||||||
|
* do not wish to do so, delete this exception statement from your
|
||||||
|
* version. If you delete this exception statement from all source
|
||||||
|
* files in the program, then also delete it here.
|
||||||
|
*/
|
||||||
|
/* copyright --> */
|
||||||
|
|
||||||
|
template<typename InputIterator, typename OutputIterator>
|
||||||
|
OutputIterator ncopy(InputIterator first, InputIterator last,
|
||||||
|
int32_t count, OutputIterator destination)
|
||||||
|
{
|
||||||
|
OutputIterator x = destination;
|
||||||
|
for(int32_t i = 0; i < count; ++i) {
|
||||||
|
x = copy(first, last, destination);
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
11
src/main.cc
11
src/main.cc
|
@ -51,6 +51,7 @@
|
||||||
#include "CUIDCounter.h"
|
#include "CUIDCounter.h"
|
||||||
#include "UriFileListParser.h"
|
#include "UriFileListParser.h"
|
||||||
#include "CookieBoxFactory.h"
|
#include "CookieBoxFactory.h"
|
||||||
|
#include "a2algo.h"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -747,7 +748,10 @@ int main(int argc, char* argv[]) {
|
||||||
while(flparser.hasNext()) {
|
while(flparser.hasNext()) {
|
||||||
Strings uris = flparser.next();
|
Strings uris = flparser.next();
|
||||||
if(!uris.empty()) {
|
if(!uris.empty()) {
|
||||||
RequestGroupHandle rg = new RequestGroup(uris, op);
|
Strings xuris;
|
||||||
|
ncopy(uris.begin(), uris.end(), op->getAsInt(PREF_SPLIT),
|
||||||
|
back_inserter(xuris));
|
||||||
|
RequestGroupHandle rg = new RequestGroup(xuris, op);
|
||||||
groups.push_back(rg);
|
groups.push_back(rg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -755,7 +759,10 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstReqInfo = new MultiUrlRequestInfo(args, op);
|
Strings xargs;
|
||||||
|
ncopy(args.begin(), args.end(), op->getAsInt(PREF_SPLIT),
|
||||||
|
back_inserter(xargs));
|
||||||
|
firstReqInfo = new MultiUrlRequestInfo(xargs, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestInfos reqInfos;
|
RequestInfos reqInfos;
|
||||||
|
|
Loading…
Reference in New Issue