mirror of
https://github.com/aria2/aria2.git
synced 2025-04-03 04:27:38 +03:00
Merge branch 'pr1802'
This resolves conflicts on https://github.com/aria2/aria2/pull/1802 and does fixups.
This commit is contained in:
commit
08b48dccb6
18 changed files with 52 additions and 53 deletions
41
COPYING
41
COPYING
|
@ -1,12 +1,12 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
|
@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
|||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
|
@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
|
@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
|||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
|
@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
|||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
|
@ -225,7 +225,7 @@ impose that choice.
|
|||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
|
@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
|||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
|
@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
|
@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||
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
|
||||
|
||||
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.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
|
|||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
|
|
@ -421,7 +421,7 @@ multi-file mode
|
|||
|
||||
Before download starts, a complete directory structure is created if
|
||||
needed. By default, aria2 opens at most 100 files mentioned in
|
||||
.torrent file, and directly writes to and reads from these files.
|
||||
.torrent file, and directly writes to and reads from these files.
|
||||
The number of files to open simultaneously can be controlled by
|
||||
``--bt-max-open-files`` option.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# files in the program, then also delete it here.
|
||||
|
||||
# cd to the directory where this script exists.
|
||||
cd $(dirname $0)
|
||||
cd "$(dirname $0)"
|
||||
. ./script-helper
|
||||
|
||||
get_version
|
||||
|
@ -43,8 +43,8 @@ if [ -z "$VERSION" ]; then
|
|||
fi
|
||||
|
||||
DIST_DIR=aria2-$VERSION-aarch64-linux-android-build1
|
||||
mkdir $DIST_DIR
|
||||
mkdir "$DIST_DIR"
|
||||
cp AUTHORS COPYING ChangeLog LICENSE.OpenSSL NEWS README.html README.android \
|
||||
android-out/aria2c $DIST_DIR
|
||||
zip -9 -r $DIST_DIR.zip $DIST_DIR
|
||||
rm -rf $DIST_DIR
|
||||
android-out/aria2c "$DIST_DIR"
|
||||
zip -9 -r "$DIST_DIR.zip" "$DIST_DIR"
|
||||
rm -rf "$DIST_DIR"
|
||||
|
|
|
@ -6,27 +6,27 @@ BUILDDIR=/tmp/aria2buildtest
|
|||
|
||||
if [ ! -d "$BUILDDIR" ]; then
|
||||
mkdir "$BUILDDIR" \
|
||||
|| { echo "Failed to create directory $BUILDDIR" && exit -1; }
|
||||
|| { echo "Failed to create directory $BUILDDIR" && exit 1; }
|
||||
fi
|
||||
|
||||
echo -n "Starting build test "
|
||||
echo `date`
|
||||
echo "$(date)"
|
||||
|
||||
# build CONFIGURE_OPTS BIN_SUFFIX DESC
|
||||
build()
|
||||
{
|
||||
echo -n "new build() started at "
|
||||
echo `date`
|
||||
echo "$(date)"
|
||||
echo "*** configure opts=$1"
|
||||
BIN_NAME="aria2c_$2"
|
||||
if [ -f "$BUILDDIR/$BIN_NAME" ]; then
|
||||
echo "$BIN_NAME exists, skipping"
|
||||
return
|
||||
fi
|
||||
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log"\
|
||||
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log" \
|
||||
&& cp config.log "$BUILDDIR/config.log_$2" \
|
||||
&& LANG=C make clean \
|
||||
&& LANG=C make -j2 check 2>&1 |tee "$BUILDDIR/aria2c_$2.log" \
|
||||
&& LANG=C make -j2 check 2>&1 | tee "$BUILDDIR/aria2c_$2.log" \
|
||||
&& cp src/aria2c "$BUILDDIR/aria2c_$2"
|
||||
|
||||
if [ -f "test/aria2c.log" ]; then
|
||||
|
@ -36,8 +36,8 @@ build()
|
|||
|
||||
clear()
|
||||
{
|
||||
for file in `ls $BUILDDIR`; do
|
||||
rm -f "$BUILDDIR/$file";
|
||||
for file in $(ls "$BUILDDIR"); do
|
||||
rm -f "$BUILDDIR/$file"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ echo -n "en@quot en@boldquot" > "$PO_DIR"/LINGUAS
|
|||
for file in "$WORK_DIR"/*.po; do
|
||||
# First remove useless '\r' in messages
|
||||
sed -i -e 's/\\r//' "$file"
|
||||
bn=`basename "$file"`
|
||||
bn=$(basename "$file")
|
||||
bn=${bn#aria2-}
|
||||
dst="$PO_DIR"/"$bn"
|
||||
# copy file to po directory
|
||||
|
|
|
@ -238,7 +238,7 @@ endef
|
|||
export ARIA2_DISTXML
|
||||
|
||||
|
||||
# Detect numer of CPUs to be used with make -j
|
||||
# Detect number of CPUs to be used with make -j
|
||||
CPUS = $(shell sysctl hw.ncpu | cut -d" " -f2)
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ test -z "$BUILD_VER" && BUILD_VER=1
|
|||
test -z "$LABEL" && LABEL=$HOST
|
||||
|
||||
# cd to the directory where this script exists.
|
||||
cd $(dirname $0)
|
||||
cd "$(dirname "$0")"
|
||||
. ./script-helper
|
||||
|
||||
get_version
|
||||
|
@ -48,8 +48,8 @@ fi
|
|||
|
||||
DIST_DIR=aria2-${VERSION}-${LABEL}-build${BUILD_VER}
|
||||
|
||||
mkdir $DIST_DIR
|
||||
mkdir "$DIST_DIR"
|
||||
cp AUTHORS COPYING ChangeLog LICENSE.OpenSSL NEWS README.html README.mingw \
|
||||
mingw-out/aria2c.exe $DIST_DIR
|
||||
zip -9 -r $DIST_DIR.zip $DIST_DIR
|
||||
rm -rf $DIST_DIR
|
||||
mingw-out/aria2c.exe "$DIST_DIR"
|
||||
zip -9 -r "$DIST_DIR.zip" "$DIST_DIR"
|
||||
rm -rf "$DIST_DIR"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
# version. If you delete this exception statement from all source
|
||||
# files in the program, then also delete it here.
|
||||
|
||||
get_version () {
|
||||
VERSION=`grep AC_INIT configure.ac | sed '/AC_INIT/ s/AC_INIT(\[aria2\],\[\([^]]\+\)\],.*/\1/'`
|
||||
get_version() {
|
||||
VERSION=$(grep AC_INIT configure.ac | sed '/AC_INIT/ s/AC_INIT(\[aria2\],\[\([^]]\+\)\],.*/\1/')
|
||||
echo "Version: $VERSION"
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ struct hash_finder {
|
|||
|
||||
std::string errToString(OSStatus err)
|
||||
{
|
||||
std::string rv = "Unkown error";
|
||||
std::string rv = "Unknown error";
|
||||
CFRef<CFStringRef> cerr(SecCopyErrorMessageString(err, nullptr));
|
||||
if (!cerr) {
|
||||
return rv;
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
~DHTSetup();
|
||||
|
||||
// Returns two vector of Commands. First one contains regular
|
||||
// commands. Secod one contains so called routine commands, which
|
||||
// commands. Second one contains so called routine commands, which
|
||||
// executed once per event poll returns.
|
||||
std::pair<std::vector<std::unique_ptr<Command>>,
|
||||
std::vector<std::unique_ptr<Command>>>
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
virtual void closeFile() = 0;
|
||||
|
||||
/**
|
||||
* Opens a file. If the file doesnot exists, an exception may be
|
||||
* Opens a file. If the file does not exist, an exception may be
|
||||
* thrown.
|
||||
*/
|
||||
virtual void openExistingFile(int64_t totalLength = 0) = 0;
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
bool parse(const std::string& data);
|
||||
|
||||
/**
|
||||
* Retruns the number of bytes processed in the last invocation of
|
||||
* Returns the number of bytes processed in the last invocation of
|
||||
* parse().
|
||||
*/
|
||||
size_t getLastBytesProcessed() const;
|
||||
|
|
|
@ -179,7 +179,7 @@ void Netrc::parse(const std::string& path)
|
|||
else {
|
||||
if (!authenticator) {
|
||||
throw DL_ABORT_EX(
|
||||
fmt("Netrc:parse error. %s encounterd where 'machine'"
|
||||
fmt("Netrc:parse error. %s encountered where 'machine'"
|
||||
" or 'default' expected.",
|
||||
std::string((*iter).first, (*iter).second).c_str()));
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
virtual bool execute() CXX11_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Binds port. If successful, the bound port number is assinged to port and
|
||||
* Binds port. If successful, the bound port number is assigned to port and
|
||||
* returns true, otherwise port is undefined and returns false.
|
||||
*/
|
||||
bool bindPort(uint16_t& port, SegList<int>& seq);
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
virtual bool evaluate() = 0;
|
||||
|
||||
/**
|
||||
* Used for reseting status.
|
||||
* Used for resetting status.
|
||||
*/
|
||||
virtual void reset() = 0;
|
||||
};
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
// Adds the cache entry |ent| to the storage. The size of cached
|
||||
// data of ent is added to total_.
|
||||
bool add(WrDiskCacheEntry* ent);
|
||||
// Removes the cache entry |ent| from the stroage. The size of
|
||||
// Removes the cache entry |ent| from the storage. The size of
|
||||
// cached data of ent is subtracted from total_.
|
||||
bool remove(WrDiskCacheEntry* ent);
|
||||
// Updates the already added entry |ent|. The |delta| means how many
|
||||
|
|
|
@ -210,7 +210,7 @@ void createPeerMessageString(unsigned char* msg, size_t msgLength,
|
|||
size_t payloadLength, uint8_t messageId);
|
||||
|
||||
/**
|
||||
* Creates compact form(packed addresss + 2bytes port) and stores the
|
||||
* Creates compact form(packed address + 2bytes port) and stores the
|
||||
* results in compact. This function looks addr and if it is IPv4
|
||||
* address, it stores 6bytes in compact and if it is IPv6, it stores
|
||||
* 18bytes in compact. So compact must be at least 18 bytes and
|
||||
|
|
|
@ -275,7 +275,7 @@ error_code::Value option_processing(Option& op, bool standalone,
|
|||
// we must clear eof bit and seek to the beginning of the buffer.
|
||||
cmdstream.clear();
|
||||
cmdstream.seekg(0, std::ios::beg);
|
||||
// finaly let's parse and store command-iine options.
|
||||
// finally let's parse and store command-line options.
|
||||
op.setParent(confOption);
|
||||
oparser->parse(op, cmdstream);
|
||||
oparser->parse(op, options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue