mirror of
https://github.com/xroche/httrack.git
synced 2026-05-18 17:06:04 +03:00
Compare commits
245 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d742104a1 | ||
|
|
16aec722bf | ||
|
|
4ff55249ed | ||
|
|
fea8122ed3 | ||
|
|
7323230eb3 | ||
|
|
c9f656fdeb | ||
|
|
042525a1db | ||
|
|
3fde59c090 | ||
|
|
edaaa73328 | ||
|
|
cc424a4503 | ||
|
|
1f18c67f8a | ||
|
|
a016accc4b | ||
|
|
1315e03cc5 | ||
|
|
917d6bd3c4 | ||
|
|
a085b2b2fa | ||
|
|
67b8737ed4 | ||
|
|
9d67ab4cf0 | ||
|
|
b331963ba6 | ||
|
|
f48114006d | ||
|
|
9208228e2d | ||
|
|
9a17499b99 | ||
|
|
91714c7a28 | ||
|
|
3a3d27386c | ||
|
|
d59341813d | ||
|
|
65eb4e58e5 | ||
|
|
7e75314395 | ||
|
|
5ff78eebd0 | ||
|
|
76dc4d04fc | ||
|
|
5b0c24aa71 | ||
|
|
ba35564fac | ||
|
|
0db2125bdc | ||
|
|
032be64885 | ||
|
|
b41e6dc3af | ||
|
|
a798cd3a8d | ||
|
|
d2435b1b5e | ||
|
|
213359b3db | ||
|
|
3b1bf0b8af | ||
|
|
6aef8ee820 | ||
|
|
ac6cc76bab | ||
|
|
a3fb178b10 | ||
|
|
b1fa75dfe0 | ||
|
|
4da59a6399 | ||
|
|
44688bdbdf | ||
|
|
6ce91ec1f3 | ||
|
|
95b9374ff3 | ||
|
|
c7edfe0f5f | ||
|
|
381eebc056 | ||
|
|
5544f503bf | ||
|
|
b3fa8537c4 | ||
|
|
aafafee47e | ||
|
|
632befbd53 | ||
|
|
908f3ac832 | ||
|
|
d46e835fc2 | ||
|
|
1f6b64f81a | ||
|
|
24eee92311 | ||
|
|
75b5002c63 | ||
|
|
792311df15 | ||
|
|
3e63dbc69c | ||
|
|
589b5ed78f | ||
|
|
015cff31b9 | ||
|
|
8e0c4ab867 | ||
|
|
919030900d | ||
|
|
859f4625cb | ||
|
|
0985f4c014 | ||
|
|
21debe05da | ||
|
|
d0d9660ac9 | ||
|
|
2fe3a96b09 | ||
|
|
ef647e9136 | ||
|
|
159e3d0017 | ||
|
|
9661b389d9 | ||
|
|
80c61e94f7 | ||
|
|
e8f4361fbc | ||
|
|
0df1c16c79 | ||
|
|
c7b0023dd7 | ||
|
|
70a44456fb | ||
|
|
dce3642432 | ||
|
|
91c6288d40 | ||
|
|
eb93fb8a2e | ||
|
|
6523d94ee3 | ||
|
|
1e6399e37b | ||
|
|
5bfb2e60b1 | ||
|
|
7cc1dc33d5 | ||
|
|
20253490d4 | ||
|
|
acef5cc38c | ||
|
|
3664cd1ae4 | ||
|
|
06b9b88365 | ||
|
|
61ee568eda | ||
|
|
3c68700357 | ||
|
|
b70ff055c4 | ||
|
|
943bb355f9 | ||
|
|
f358fabf0c | ||
|
|
0e16f522c8 | ||
|
|
9a58582853 | ||
|
|
8bfa3841fa | ||
|
|
57cc0da6cc | ||
|
|
70185ab310 | ||
|
|
008601e493 | ||
|
|
c95ab92329 | ||
|
|
903450d453 | ||
|
|
f967595e08 | ||
|
|
ee04f0c687 | ||
|
|
b772388bbd | ||
|
|
d88b5f9b27 | ||
|
|
e34523ab27 | ||
|
|
08741a5938 | ||
|
|
b32b41cf08 | ||
|
|
4d94eb7643 | ||
|
|
df46fbe8d5 | ||
|
|
c11fe60bee | ||
|
|
011ba96d53 | ||
|
|
d7cc6f5b55 | ||
|
|
62247b4d5c | ||
|
|
47f244e22c | ||
|
|
3b40219431 | ||
|
|
9f0340968f | ||
|
|
a8e34d6f1f | ||
|
|
a7de9c6e7d | ||
|
|
cc8a7a4077 | ||
|
|
60644a7309 | ||
|
|
afea93461d | ||
|
|
4961951ca6 | ||
|
|
8789dedb58 | ||
|
|
a7753d1697 | ||
|
|
b68cef069a | ||
|
|
da8ba57520 | ||
|
|
c0154f5e77 | ||
|
|
bd28ac98de | ||
|
|
fa1e5e3113 | ||
|
|
fd69106947 | ||
|
|
5bd7e12eae | ||
|
|
c24f80f50c | ||
|
|
8b7c561b9f | ||
|
|
d4453441f1 | ||
|
|
96e6c1e205 | ||
|
|
600b76ca4b | ||
|
|
9067f94db3 | ||
|
|
a5d9076a99 | ||
|
|
30455d9d66 | ||
|
|
2d6017ad06 | ||
|
|
e002254001 | ||
|
|
5ab61bd6e3 | ||
|
|
1e12f60120 | ||
|
|
d99ea7fb86 | ||
|
|
a4ce809b06 | ||
|
|
82a30ce1b4 | ||
|
|
fe1a951c09 | ||
|
|
ce17800658 | ||
|
|
ffefedefa9 | ||
|
|
84cdc70b4a | ||
|
|
ea741caba7 | ||
|
|
8fd32cb662 | ||
|
|
86035dd001 | ||
|
|
b85c807544 | ||
|
|
a0a9c07027 | ||
|
|
9468c3ee82 | ||
|
|
d6d3802dcc | ||
|
|
ffd4bfe568 | ||
|
|
47f23cda40 | ||
|
|
4e903579b2 | ||
|
|
e77141ceae | ||
|
|
9caffeb8ae | ||
|
|
dc202c3f51 | ||
|
|
6c0e97adfd | ||
|
|
ba04076ef5 | ||
|
|
1d684d2c65 | ||
|
|
0bdb3d3506 | ||
|
|
857a799f83 | ||
|
|
c2caf1c8e7 | ||
|
|
3f2e30924e | ||
|
|
fd8f99609a | ||
|
|
683668120e | ||
|
|
724dad4380 | ||
|
|
e72170d412 | ||
|
|
a228111f97 | ||
|
|
5237bd6f13 | ||
|
|
8eaf0a1e18 | ||
|
|
6516c4f306 | ||
|
|
818001ba76 | ||
|
|
b4c15a3b3b | ||
|
|
7f8131f249 | ||
|
|
4c3c704fb7 | ||
|
|
f9086f5849 | ||
|
|
d9b93413c1 | ||
|
|
496a08ec7d | ||
|
|
7d8c7064c2 | ||
|
|
482e33c0fc | ||
|
|
4c6c2fa349 | ||
|
|
1ed1ddf658 | ||
|
|
676776e99b | ||
|
|
98ea5be208 | ||
|
|
931062d509 | ||
|
|
942bebf4b2 | ||
|
|
e4b71bb7d4 | ||
|
|
39501c8aeb | ||
|
|
d03d97a163 | ||
|
|
f154d0e78c | ||
|
|
358cd09f71 | ||
|
|
9674c7f418 | ||
|
|
de1c1d80a9 | ||
|
|
538c049521 | ||
|
|
1f2aa72a82 | ||
|
|
b838c92227 | ||
|
|
b6ee0d8d5d | ||
|
|
57c732da58 | ||
|
|
87c2781ecc | ||
|
|
b44edd5116 | ||
|
|
e5d811f51e | ||
|
|
0ae8baf47b | ||
|
|
3ea9e69625 | ||
|
|
f8569c130c | ||
|
|
1fb810430a | ||
|
|
01f22fb1ec | ||
|
|
33e87222df | ||
|
|
c7d33c0a8e | ||
|
|
3d542bbc82 | ||
|
|
01553e56bd | ||
|
|
f776329ee6 | ||
|
|
2e88036808 | ||
|
|
d2a3d7a3ff | ||
|
|
00fe2d4432 | ||
|
|
ed28e87267 | ||
|
|
235f1881dd | ||
|
|
97a9679c0b | ||
|
|
62fdaaf4eb | ||
|
|
7d27b60e55 | ||
|
|
4e0f29cc07 | ||
|
|
f7de42a81a | ||
|
|
f281133bfe | ||
|
|
f96bff35ae | ||
|
|
638a9b6df7 | ||
|
|
a835ee13e3 | ||
|
|
b5e663cd80 | ||
|
|
588d526aed | ||
|
|
9c3e5b43bd | ||
|
|
9090ee17b3 | ||
|
|
9e61bc36f3 | ||
|
|
a01be59015 | ||
|
|
4c904ad7fa | ||
|
|
99b25bcd84 | ||
|
|
74d06310eb | ||
|
|
f7446a3c57 | ||
|
|
0817df2fb6 | ||
|
|
f42a5fa5dd | ||
|
|
b2a632795b | ||
|
|
4352498227 |
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
Welcome to HTTrack Website Copier!
|
||||
|
||||
|
||||
142
compile
Executable file
142
compile
Executable file
@@ -0,0 +1,142 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -63,12 +63,6 @@
|
||||
/* Check for libsocket */
|
||||
#undef LIBSOCKET
|
||||
|
||||
/* LLint format */
|
||||
#undef LLINT_FORMAT
|
||||
|
||||
/* LLint type */
|
||||
#undef LLINT_TYPE
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
233
configure
vendored
233
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for httrack 3.47.19.
|
||||
# Generated by GNU Autoconf 2.69 for httrack 3.48.6.
|
||||
#
|
||||
# Report bugs to <roche+packaging@httrack.com>.
|
||||
#
|
||||
@@ -590,8 +590,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='httrack'
|
||||
PACKAGE_TARNAME='httrack'
|
||||
PACKAGE_VERSION='3.47.19'
|
||||
PACKAGE_STRING='httrack 3.47.19'
|
||||
PACKAGE_VERSION='3.48.6'
|
||||
PACKAGE_STRING='httrack 3.48.6'
|
||||
PACKAGE_BUGREPORT='roche+packaging@httrack.com'
|
||||
PACKAGE_URL='http://www.httrack.com/'
|
||||
|
||||
@@ -1337,7 +1337,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# 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.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures httrack 3.47.19 to adapt to many kinds of systems.
|
||||
\`configure' configures httrack 3.48.6 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1407,7 +1407,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of httrack 3.47.19:";;
|
||||
short | recursive ) echo "Configuration of httrack 3.48.6:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1521,7 +1521,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
httrack configure 3.47.19
|
||||
httrack configure 3.48.6
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2248,7 +2248,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by httrack $as_me 3.47.19, which was
|
||||
It was created by httrack $as_me 3.48.6, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3067,7 +3067,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='httrack'
|
||||
VERSION='3.47.19'
|
||||
VERSION='3.48.6'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -3107,7 +3107,7 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
|
||||
|
||||
|
||||
|
||||
VERSION_INFO="2:47:0"
|
||||
VERSION_INFO="2:48:0"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
|
||||
@@ -15393,203 +15393,10 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
### Check LLint format
|
||||
if test x"$ac_cv_sizeof_long" = x"8"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking long printf format" >&5
|
||||
$as_echo_n "checking long printf format... " >&6; }
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
main() { long int c = -1, d = -1; char* f = "%ld"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
|
||||
$as_echo "found" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%ld\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE long int" >>confdefs.h
|
||||
|
||||
|
||||
else
|
||||
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
main() { long int c = -1, d = -1; char* f = "%d"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
|
||||
$as_echo "found" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%d\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE long int" >>confdefs.h
|
||||
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming not on target machine" >&5
|
||||
$as_echo "assuming not on target machine" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%d\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE int" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
elif test x"$ac_cv_sizeof_long_long" = x"8"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking long long printf format" >&5
|
||||
$as_echo_n "checking long long printf format... " >&6; }
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
main() { long long int c = -1, d = -1; char* f = "%lld"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
|
||||
$as_echo "found" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%lld\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE long long int" >>confdefs.h
|
||||
|
||||
|
||||
else
|
||||
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
main() { long long int c = -1, d = -1; char* f = "%ld"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
|
||||
$as_echo "found" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%ld\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE long long int" >>confdefs.h
|
||||
|
||||
|
||||
else
|
||||
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "cannot run test program while cross compiling
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
main() { long long int c = -1, d = -1; char* f = "%d"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
|
||||
$as_echo "found" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%d\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE long long int" >>confdefs.h
|
||||
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming not on target machine" >&5
|
||||
$as_echo "assuming not on target machine" >&6; }
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%d\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE int" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
$as_echo "#define LLINT_FORMAT \"%d\"" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define LLINT_TYPE int" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
### check for in_addr_t
|
||||
ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
"
|
||||
if test "x$ac_cv_type_in_addr_t" = xyes; then :
|
||||
|
||||
@@ -15613,26 +15420,24 @@ if test "${with_zlib+set}" = set; then :
|
||||
withval=$with_zlib; if test "$withval" != no ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
if test -d "$withval"
|
||||
then
|
||||
ZLIB_HOME="$withval"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $withval does not exist, checking usual places" >&5
|
||||
$as_echo "$as_me: WARNING: Sorry, $withval does not exist, checking usual places" >&2;}
|
||||
fi
|
||||
ZLIB_HOME="$withval"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
ZLIB_HOME=/usr/local
|
||||
if test ! -f "${ZLIB_HOME}/include/zlib.h"
|
||||
then
|
||||
ZLIB_HOME=/usr
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Locate zlib, if wanted
|
||||
#
|
||||
@@ -17087,7 +16892,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by httrack $as_me 3.47.19, which was
|
||||
This file was extended by httrack $as_me 3.48.6, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -17154,7 +16959,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
httrack config.status 3.47.19
|
||||
httrack config.status 3.48.6
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
80
configure.ac
80
configure.ac
@@ -1,9 +1,9 @@
|
||||
AC_INIT([httrack], [3.47.19], [roche+packaging@httrack.com], [httrack], [http://www.httrack.com/])
|
||||
AC_INIT([httrack], [3.48.6], [roche+packaging@httrack.com], [httrack], [http://www.httrack.com/])
|
||||
AC_CONFIG_SRCDIR(src/httrack.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AM_INIT_AUTOMAKE
|
||||
VERSION_INFO="2:47:0"
|
||||
VERSION_INFO="2:48:0"
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
@@ -11,7 +11,7 @@ AC_PREREQ(2.50)
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_STDC_HEADERS
|
||||
AM_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
AC_PROG_LN_S
|
||||
|
||||
# Export LD_LIBRARY_PATH name or equivalent.
|
||||
@@ -39,83 +39,13 @@ AC_SUBST(VERSION_INFO)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
|
||||
### Check LLint format
|
||||
if test x"$ac_cv_sizeof_long" = x"8"; then
|
||||
AC_MSG_CHECKING(long printf format)
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long int c = -1, d = -1; char* f = "%ld"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
],
|
||||
[AC_MSG_RESULT(found)
|
||||
AC_DEFINE(LLINT_FORMAT,"%ld",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,long int,[LLint type])
|
||||
],
|
||||
[
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long int c = -1, d = -1; char* f = "%d"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(found)
|
||||
AC_DEFINE(LLINT_FORMAT,"%d",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,long int,[LLint type])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_RESULT(assuming not on target machine)
|
||||
AC_DEFINE(LLINT_FORMAT,"%d",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,int,[LLint type])
|
||||
])
|
||||
])
|
||||
elif test x"$ac_cv_sizeof_long_long" = x"8"; then
|
||||
AC_MSG_CHECKING(long long printf format)
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long long int c = -1, d = -1; char* f = "%lld"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
],
|
||||
[AC_MSG_RESULT(found)
|
||||
AC_DEFINE(LLINT_FORMAT,"%lld",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,long long int,[LLint type])
|
||||
],
|
||||
[
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long long int c = -1, d = -1; char* f = "%ld"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(found)
|
||||
AC_DEFINE(LLINT_FORMAT,"%ld",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,long long int,[LLint type])
|
||||
],
|
||||
[
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long long int c = -1, d = -1; char* f = "%d"; sscanf("1234", f, &c, &d);
|
||||
exit (c != 1234 || d != -1); }
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(found)
|
||||
AC_DEFINE(LLINT_FORMAT,"%d",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,long long int,[LLint type])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_RESULT(assuming not on target machine)
|
||||
AC_DEFINE(LLINT_FORMAT,"%d",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,int,[LLint type])
|
||||
])
|
||||
])
|
||||
])
|
||||
else
|
||||
AC_DEFINE(LLINT_FORMAT,"%d",[LLint format])
|
||||
AC_DEFINE(LLINT_TYPE,int,[LLint type])
|
||||
fi
|
||||
|
||||
### check for in_addr_t
|
||||
AC_CHECK_TYPE(in_addr_t,
|
||||
AC_DEFINE(HTS_DO_NOT_REDEFINE_in_addr_t,,[Check for in_addr_t]),
|
||||
AC_MSG_WARN([*** in_addr_t not found]),
|
||||
[#include <sys/types.h>
|
||||
#include <netinet/in.h>])
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>])
|
||||
|
||||
### zlib
|
||||
CHECK_ZLIB()
|
||||
|
||||
121
debian/changelog
vendored
121
debian/changelog
vendored
@@ -1,3 +1,124 @@
|
||||
httrack (3.48.6-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.48.6 (3.48-6)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Tue, 13 May 2014 21:23:02 +0200
|
||||
|
||||
httrack (3.48.5-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.48.5 (3.48-5)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Fri, 02 May 2014 16:37:08 +0200
|
||||
|
||||
httrack (3.48.4-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.48.4 (3.48-4)
|
||||
closes:#746173
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Sun, 27 Apr 2014 18:48:57 +0200
|
||||
|
||||
httrack (3.48.3-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.48.3 (3.48-3)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Fri, 11 Apr 2014 20:31:21 +0200
|
||||
|
||||
httrack (3.48.2-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.48.2 (3.48-2)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Thu, 10 Apr 2014 18:30:08 +0200
|
||||
|
||||
httrack (3.48.1-5) unstable; urgency=low
|
||||
|
||||
* Really call dh_autoreconf, fix configure dependencies.
|
||||
|
||||
-- Matthias Klose <doko@ubuntu.com> Wed, 16 Apr 2014 14:46:20 +0200
|
||||
|
||||
httrack (3.48.1-4) unstable; urgency=low
|
||||
|
||||
* Cleanup in dependencies
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Tue, 15 Apr 2014 22:13:19 +0200
|
||||
|
||||
httrack (3.48.1-3) unstable; urgency=low
|
||||
|
||||
* Fixed FTBFS due to a missing Build-Depends: dh-autoreconf
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Tue, 15 Apr 2014 21:32:03 +0200
|
||||
|
||||
httrack (3.48.1-2) unstable; urgency=low
|
||||
|
||||
* Fixed removal of .a files even on architectures where .a are libraries
|
||||
closes:#744594
|
||||
Enable verosity of unit tests
|
||||
Call dh_autoreconf_clean before dh_clean
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Tue, 15 Apr 2014 21:02:14 +0200
|
||||
|
||||
httrack (3.48.1-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.48.1 (3.48-1)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Wed, 09 Apr 2014 21:02:08 +0200
|
||||
|
||||
httrack (3.47.27-3) unstable; urgency=low
|
||||
|
||||
* Do not depend on automake1.9 but on automake instead
|
||||
see: http://lists.debian.org/debian-devel/2013/05/msg01459.html
|
||||
closes:#724390
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Thu, 26 Sep 2013 20:09:12 +0200
|
||||
|
||||
httrack (3.47.27-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.27 (3.47-27)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Sun, 15 Sep 2013 10:59:50 +0200
|
||||
|
||||
httrack (3.47.26-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.26 (3.47-26)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Fri, 06 Sep 2013 21:51:28 +0200
|
||||
|
||||
httrack (3.47.25-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.25 (3.47-25)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Sun, 01 Sep 2013 16:47:55 +0200
|
||||
|
||||
httrack (3.47.24-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.24 (3.47-24)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Fri, 23 Aug 2013 09:45:34 +0200
|
||||
|
||||
httrack (3.47.23-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.23 (3.47-23)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Sat, 17 Aug 2013 12:15:37 +0200
|
||||
|
||||
httrack (3.47.22-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.22 (3.47-22)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Sun, 11 Aug 2013 21:50:49 +0200
|
||||
|
||||
httrack (3.47.21-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.21 (3.47-21)
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Fri, 05 Jul 2013 20:12:25 +0200
|
||||
|
||||
httrack (3.47.20-1) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.20 (3.47-20)
|
||||
Mostly typos, and lintian fixes
|
||||
|
||||
-- Xavier Roche <xavier@debian.org> Fri, 28 Jun 2013 19:46:33 +0200
|
||||
|
||||
httrack (3.47.19-3) unstable; urgency=low
|
||||
|
||||
* Updated to 3.47.19 (3.47-19)
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -2,8 +2,8 @@ Source: httrack
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Xavier Roche <roche@httrack.com>
|
||||
Standards-Version: 3.9.4
|
||||
Build-Depends: debhelper (>= 8.0.0), zlib1g-dev, libssl-dev, autotools-dev, autoconf, automake1.9, libtool
|
||||
Standards-Version: 3.9.5
|
||||
Build-Depends: debhelper (>= 8.0.0), dh-autoreconf, autotools-dev, autoconf, automake, libtool, zlib1g-dev, libssl-dev
|
||||
Homepage: http://www.httrack.com
|
||||
|
||||
Package: httrack
|
||||
|
||||
10
debian/copyright
vendored
10
debian/copyright
vendored
@@ -5,12 +5,12 @@ The current Debian maintainer is Xavier Roche <xavier@debian.org>
|
||||
|
||||
Upstream author: Xavier Roche <roche@httrack.com>
|
||||
|
||||
Copyright: 1998-2013 Xavier Roche and other contributors
|
||||
Copyright: 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License can be found in /usr/share/common-licenses/GPL file.
|
||||
|
||||
4
debian/libhttrack2.files
vendored
4
debian/libhttrack2.files
vendored
@@ -1,5 +1,5 @@
|
||||
usr/lib/libhttrack.so.2.0.47
|
||||
usr/lib/libhttrack.so.2.0.48
|
||||
usr/lib/libhttrack.so.2
|
||||
usr/lib/libhtsjava.so.2.0.47
|
||||
usr/lib/libhtsjava.so.2.0.48
|
||||
usr/lib/libhtsjava.so.2
|
||||
usr/share/httrack/templates
|
||||
|
||||
19
debian/rules
vendored
19
debian/rules
vendored
@@ -23,11 +23,16 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
endif
|
||||
|
||||
# as suggested by Simon McVittie
|
||||
# (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744380)
|
||||
override_dh_auto_test:
|
||||
VERBOSE=1 dh_auto_test
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
|
||||
autoreconf -v -i
|
||||
dh_autoreconf
|
||||
# note: dpkg-buildflags to be removed when compat=9
|
||||
dh_auto_configure -- --enable-online-unit-tests=auto $(shell dpkg-buildflags --export=configure)
|
||||
|
||||
@@ -50,6 +55,7 @@ clean:
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
dh_auto_clean
|
||||
dh_autoreconf_clean
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
@@ -79,10 +85,17 @@ install: build
|
||||
mkdir -p $(CURDIR)/debian/httrack/usr/lib/httrack/
|
||||
mv $(CURDIR)/debian/httrack/usr/bin/htsserver \
|
||||
$(CURDIR)/debian/httrack/usr/lib/httrack/
|
||||
rm -f $(CURDIR)/debian/httrack/usr/lib/*.a
|
||||
# remove *.la (https://wiki.debian.org/ReleaseGoals/LAFileRemoval)
|
||||
rm -f $(CURDIR)/debian/httrack/usr/lib/*.la
|
||||
rm -f $(CURDIR)/debian/httrack/usr/lib/httrack/*.a
|
||||
rm -f $(CURDIR)/debian/httrack/usr/lib/httrack/*.la
|
||||
# remove *.a unless we do not have *.so files
|
||||
# see BUG #744594
|
||||
if ls $(CURDIR)/debian/httrack/usr/lib/*.so >/dev/null 2>/dev/null ; then \
|
||||
rm -f $(CURDIR)/debian/httrack/usr/lib/*.a ; \
|
||||
fi
|
||||
if ls $(CURDIR)/debian/httrack/usr/lib/httrack/*.so >/dev/null 2>/dev/null ; then \
|
||||
rm -f $(CURDIR)/debian/httrack/usr/lib/httrack/*.a ; \
|
||||
fi
|
||||
mv $(CURDIR)/debian/httrack/usr/lib/httrack/lib* \
|
||||
$(CURDIR)/debian/httrack/usr/share/httrack/libtest/
|
||||
mkdir -p $(CURDIR)/debian/httrack/usr/lib/httrack/libtest
|
||||
|
||||
2
debian/source/options
vendored
2
debian/source/options
vendored
@@ -1 +1 @@
|
||||
extend-diff-ignore="(^|/)(config\.sub|config\.guess|test-driver|Makefile)$"
|
||||
extend-diff-ignore="(^|/)(config\.sub|config\.guess|test-driver|Makefile|.*\.in|aclocal\.m4|configure)$"
|
||||
|
||||
37
history.txt
37
history.txt
@@ -4,7 +4,28 @@ HTTrack Website Copier release history:
|
||||
|
||||
This file lists all changes and fixes that have been made for HTTrack.
|
||||
|
||||
3.47-19
|
||||
3.48-6
|
||||
+ Fixed: mitigate the "hashtable internal error: cuckoo/stash collision" errors
|
||||
+ Fixed: safety cleanup in many strings operations
|
||||
+ Fixed: buggy option pannels
|
||||
+ New: Enforce check against CVE-2014-0160
|
||||
+ New: improved hashtables to speedup large mirrors
|
||||
+ New: added unit tests
|
||||
+ New: Added %a option, allowing to define the "Accept:" header line.
|
||||
+ New: Added %X option, to define additional request header lines.
|
||||
+ New: Added option '-%t', preserving the original file type (which may produce non-browseable file locally)
|
||||
+ Fixed: remove scope id (% character) in dotted address resolution (especially for catchurl proxy)
|
||||
+ Fixed: build fixes, including for Android, non-SSL releases
|
||||
+ Fixed: buggy keep-alive handling, leading to waste connections
|
||||
+ Fixed: removed chroot and setuid features (this is definitely not our business)
|
||||
+ Fixed: removed MMS (Microsoft Media Server) ripping code (mmsrip) (dead protocol, unmaintained code, licensing issues)
|
||||
+ Fixed: type mishandling when processing a redirect (such as a .PDF redirecting to another .PDF, with a text/html type tagged in the redirect message)
|
||||
+ Fixed: infinite loop when attempting to download a file:/// directory on Unix (gp)<br/>
|
||||
+ Fixed: removed background DNS resolution, prone to bugs
|
||||
+ Fixed: do not choke on Windows 2000 because of missing SetDllDirectory() (Andy Hewitt)
|
||||
+ Fixed: %h custom build structure parameter not taken in account (William Clark)
|
||||
|
||||
3.47-27
|
||||
+ New: support for IDNA / RFC 3492 (punycode) handling
|
||||
+ New: openssl is no longer dynamically probed at stratup, but dynamically linked
|
||||
+ Fixed: random closing of files/sockets, leading to "zip_zipWriteInFileInZip_failed" assertion, "bogus state" messages, or random garbage in downloaded files
|
||||
@@ -34,6 +55,20 @@ This file lists all changes and fixes that have been made for HTTrack.
|
||||
+ Fixed: more windows-specific fixes regarding 260-character path limit
|
||||
+ Fixed: escaping issue in top index
|
||||
+ Fixed: Linux build cleanup (gentoo patches merge, lintian fixes et al.)
|
||||
+ Fixed: Fixed div-by-zero when specifying more than 1000 connections per seconds (probably not very common)
|
||||
+ Fixed: Mishandling of '+' in URLs introduced in 3.47-15 (sarclaudio)
|
||||
+ Fixed: "Wildcard domains in cookies do not match" (alexei dot co at gmail dot com )
|
||||
+ Fixed: buggy referer while parsing: the referer of all links in the page is the current page being parsed, NOT the parent page. (alexei dot com at gmail dot com)
|
||||
+ Fixed: Russian translation fixes by Oleg Komarov (komoleg at mail dot ru)
|
||||
+ New: Added .torrent => application/x-bittorrent built-in MIME type (alexei dot co at gmail dot com)
|
||||
+ Fixed: unable to download an URL whose filename embeds special characters such as # (lugusto)
|
||||
+ New: Croatian translation by Dominko Aždajić (domazd at mail dot ru)
|
||||
+ Fixed: url-escaping regression introduced in the previous subrelease
|
||||
+ Fixed: content-disposition NOT taken in account (Stephan Matthiesen)
|
||||
+ Fixed: buggy DNS cache leading to random crashes
|
||||
+ Fixed: fixed logging not displaying robots.txt rules limits by default
|
||||
+ Fixed: license year and GPL link, libtool fixes (cicku)
|
||||
+ Fixed: Keywords field in desktop files (Sebastian Pipping)
|
||||
|
||||
3.46-1
|
||||
* New: Unicode filenames handling
|
||||
|
||||
@@ -375,7 +375,7 @@ example: httrack --continue
|
||||
continues a mirror in the current folder
|
||||
|
||||
HTTrack version 3.03BETAo4 (compiled Jul 1 2001)
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2013 Xavier Roche and other contributors
|
||||
[compiled: Linux linux 2.2.18 #9 SMP Sat Dec 30 09:51:39 CET 2000 i586 unknown]
|
||||
|
||||
</pre>
|
||||
|
||||
@@ -52,8 +52,7 @@ offline browser : copy websites to a local directory</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>httrack [
|
||||
url ]... [ −filter ]... [ +filter ]... [ −O,
|
||||
−−path</b> ] [ <b>−%O,
|
||||
−−chroot</b> ] [ <b>−w,
|
||||
−−path</b> ] [ <b>−w,
|
||||
−−mirror</b> ] [ <b>−W,
|
||||
−−mirror−wizard</b> ] [ <b>−g,
|
||||
−−get−files</b> ] [ <b>−i,
|
||||
@@ -70,15 +69,13 @@ url ]... [ −filter ]... [ +filter ]... [ −O,
|
||||
−−max−rate[=N]</b> ] [ <b>−%cN,
|
||||
−−connection−per−second[=N]</b> ] [
|
||||
<b>−GN, −−max−pause[=N]</b> ] [
|
||||
<b>−%mN,
|
||||
−−max−mms−time[=N]</b> ] [
|
||||
<b>−cN, −−sockets[=N]</b> ] [
|
||||
<b>−TN, −−timeout</b> ] [ <b>−RN,
|
||||
−−retries[=N]</b> ] [ <b>−JN,
|
||||
−−min−rate[=N]</b> ] [ <b>−HN,
|
||||
−−host−control[=N]</b> ] [ <b>−%P,
|
||||
−−extended−parsing[=N]</b> ] [
|
||||
<b>−n, −−near</b> ] [ <b>−t,
|
||||
<b>−TN, −−timeout[=N]</b> ] [
|
||||
<b>−RN, −−retries[=N]</b> ] [
|
||||
<b>−JN, −−min−rate[=N]</b> ] [
|
||||
<b>−HN, −−host−control[=N]</b> ] [
|
||||
<b>−%P, −−extended−parsing[=N]</b> ]
|
||||
[ <b>−n, −−near</b> ] [ <b>−t,
|
||||
−−test</b> ] [ <b>−%L,
|
||||
−−list</b> ] [ <b>−%S,
|
||||
−−urllist</b> ] [ <b>−NN,
|
||||
@@ -111,7 +108,9 @@ url ]... [ −filter ]... [ +filter ]... [ −O,
|
||||
−−referer</b> ] [ <b>−%E,
|
||||
−−from</b> ] [ <b>−%F,
|
||||
−−footer</b> ] [ <b>−%l,
|
||||
−−language</b> ] [ <b>−C,
|
||||
−−language</b> ] [ <b>−%a,
|
||||
−−accept</b> ] [ <b>−%X,
|
||||
−−headers</b> ] [ <b>−C,
|
||||
−−cache[=N]</b> ] [ <b>−k,
|
||||
−−store−all−in−cache</b> ] [
|
||||
<b>−%n, −−do−not−recatch</b> ]
|
||||
@@ -144,8 +143,7 @@ url ]... [ −filter ]... [ +filter ]... [ −O,
|
||||
<b>−%!,
|
||||
−−disable−security−limits</b> ] [
|
||||
<b>−V, −−userdef−cmd</b> ] [
|
||||
<b>−%U, −−user</b> ] [ <b>−%W,
|
||||
−−callback</b> ] [ <b>−K,
|
||||
<b>−%W, −−callback</b> ] [ <b>−K,
|
||||
−−keep−links[=N]</b> ] [</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
@@ -227,29 +225,17 @@ options:</b></p>
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p>−O</p></td>
|
||||
<td width="7%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>path for mirror/logfiles+cache (−O path
|
||||
mirror[,path cache and logfiles]) (−−path
|
||||
<param>)</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p>−%O</p></td>
|
||||
<td width="7%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>chroot path to, must be r00t (−%O root path)
|
||||
(−−chroot <param>)</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Action
|
||||
@@ -475,19 +461,6 @@ hour) (−−max−time[=N])</p></td></tr>
|
||||
|
||||
<p>pause transfer if N bytes reached, and wait until lock
|
||||
file is deleted (−−max−pause[=N])</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="9%">
|
||||
|
||||
|
||||
<p>−%mN</p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>maximum mms stream download time in seconds (60=1
|
||||
minute, 3600=1 hour)
|
||||
(−−max−mms−time[=N])</p> </td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Flow
|
||||
@@ -518,7 +491,7 @@ control:</b></p>
|
||||
|
||||
|
||||
<p>timeout, number of seconds after a non−responding
|
||||
link is shutdown (−−timeout)</p></td></tr>
|
||||
link is shutdown (−−timeout[=N])</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
@@ -1049,6 +1022,32 @@ HTTP headers (−F "user−agent name")
|
||||
|
||||
<p>preffered language (−%l "fr, en, jp, *"
|
||||
(−−language <param>)</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p>−%a</p></td>
|
||||
<td width="7%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>accepted formats (−%l
|
||||
"text/html,image/png,image/jpeg,image/gif;q=0.9,*/*;q=0.1"
|
||||
(−−accept <param>)</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p>−%X</p></td>
|
||||
<td width="7%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>additional HTTP header line (−%X
|
||||
"X−Magic: 42" (−−headers
|
||||
<param>)</p> </td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Log, index,
|
||||
@@ -1632,18 +1631,6 @@ memory boundary checks)
|
||||
|
||||
<p>generate transfer rate statictics every minutes
|
||||
(−−debug−ratestats)</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="6%">
|
||||
|
||||
|
||||
<p>−#!</p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>execute a shell command (−#! "echo
|
||||
hello") (−−exec <param>)</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Dangerous
|
||||
@@ -1707,25 +1694,13 @@ specific options:</b></p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em">execute system command after
|
||||
each files ($0 is the filename: −V "rm ")
|
||||
each files ($0 is the filename: −V "rm \$0")
|
||||
(−−userdef−cmd <param>)</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p>−%U</p></td>
|
||||
<td width="7%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>run the engine with another id when called as root
|
||||
(−%U smith) (−−user <param>)</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p>−%W</p></td>
|
||||
<td width="7%"></td>
|
||||
<td width="78%">
|
||||
@@ -2311,13 +2286,13 @@ other information you deem necessary.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
|
||||
Xavier Roche and other contributors</p>
|
||||
1998-2014 Xavier Roche and other contributors</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">This program is
|
||||
free software; you can redistribute it and/or modify it
|
||||
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 3
|
||||
of the License, or any later version.</p>
|
||||
published by the Free Software Foundation, either version 3
|
||||
of the License, or (at your option) any later version.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">This program is
|
||||
distributed in the hope that it will be useful, but WITHOUT
|
||||
@@ -2327,9 +2302,8 @@ GNU General Public License for more details.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA.</p>
|
||||
this program. If not, see
|
||||
<http://www.gnu.org/licenses/>.</p>
|
||||
|
||||
<h2>AVAILABILITY
|
||||
<a name="AVAILABILITY"></a>
|
||||
|
||||
@@ -5,5 +5,6 @@ Categories=Network;
|
||||
Terminal=false
|
||||
Name=Browse Mirrored Websites
|
||||
Comment=Browse Websites Mirrored by WebHTTrack
|
||||
Keywords=browse mirrored;
|
||||
Exec=webhttrack browse
|
||||
Icon=httrack
|
||||
|
||||
@@ -5,5 +5,6 @@ Categories=Network;
|
||||
Terminal=false
|
||||
Name=WebHTTrack Website Copier
|
||||
Comment=Copy websites to your computer
|
||||
Keywords=copy website;backup website;capture website;offline browser;surf offline;mirror;mirroring;archiving;forensics;crawl;preservation;
|
||||
Exec=webhttrack
|
||||
Icon=httrack
|
||||
|
||||
18
lang.def
18
lang.def
@@ -54,6 +54,8 @@ Bulgarian
|
||||
LANGUAGE_27
|
||||
Finnish
|
||||
LANGUAGE_28
|
||||
Croatian
|
||||
LANGUAGE_29
|
||||
LANGUAGE_NAME
|
||||
LANGUAGE_NAME
|
||||
LANGUAGE_FILE
|
||||
@@ -428,6 +430,8 @@ LANG_I6
|
||||
Create a Start Page
|
||||
LANG_I6b
|
||||
Create a word database of all html pages
|
||||
LANG_I6c
|
||||
Build a complete RFC822 mail (MHT/EML) archive of the mirror
|
||||
LANG_I7
|
||||
Create error logging and report files
|
||||
LANG_I8
|
||||
@@ -476,6 +480,12 @@ LANG_I23
|
||||
Browser identity
|
||||
LANG_I23b
|
||||
Comment to be placed in each HTML file
|
||||
LANG_I23c
|
||||
Languages accepted by the browser
|
||||
LANG_I23d
|
||||
Additional HTTP headers to be sent in each requests
|
||||
LANG_I23e
|
||||
HTTP referer to be sent for initial URLs
|
||||
LANG_I24
|
||||
Back to starting page
|
||||
LANG_I25
|
||||
@@ -536,6 +546,8 @@ LANG_I35
|
||||
Make an index
|
||||
LANG_I35b
|
||||
Make a word database
|
||||
LANG_I35c
|
||||
Build a mail archive
|
||||
LANG_I36
|
||||
Log files
|
||||
LANG_I37
|
||||
@@ -564,6 +576,12 @@ LANG_I43
|
||||
Identity
|
||||
LANG_I43b
|
||||
HTML footer
|
||||
LANG_I43c
|
||||
Languages
|
||||
LANG_I43d
|
||||
Additional HTTP Headers
|
||||
LANG_I43e
|
||||
Default referer URL
|
||||
LANG_I44
|
||||
N# connections
|
||||
LANG_I45
|
||||
|
||||
13
lang.indexes
13
lang.indexes
@@ -1,8 +1,9 @@
|
||||
bg:27
|
||||
es:3
|
||||
cz:21
|
||||
ct:14
|
||||
cs:13
|
||||
cs:21
|
||||
zh_tw:14
|
||||
zh:13
|
||||
hr:29
|
||||
da:15
|
||||
de:4
|
||||
et:16
|
||||
@@ -11,13 +12,13 @@ fi:28
|
||||
fr:2
|
||||
el:26
|
||||
it:9
|
||||
jp:19
|
||||
ja:19
|
||||
mk:18
|
||||
hu:11
|
||||
nl:5
|
||||
no:23
|
||||
pl:6
|
||||
pt:12
|
||||
pt_br:12
|
||||
pt:7
|
||||
ro:25
|
||||
ru:8
|
||||
@@ -25,4 +26,4 @@ sk:20
|
||||
si:24
|
||||
sv:17
|
||||
tr:10
|
||||
ua:22
|
||||
uk:22
|
||||
|
||||
@@ -3,7 +3,7 @@ LANGUAGE_NAME
|
||||
LANGUAGE_FILE
|
||||
Cesky
|
||||
LANGUAGE_ISO
|
||||
cz
|
||||
cs
|
||||
LANGUAGE_AUTHOR
|
||||
Antonín Matìjèík (matejcik@volny.cz) \r \n
|
||||
LANGUAGE_CHARSET
|
||||
|
||||
@@ -3,7 +3,7 @@ Chinese-BIG5
|
||||
LANGUAGE_FILE
|
||||
Chinese-BIG5
|
||||
LANGUAGE_ISO
|
||||
ct
|
||||
zh_TW
|
||||
LANGUAGE_AUTHOR
|
||||
David Hing Cheong Hung (DAVEHUNG@mtr.com.hk)\r\n
|
||||
LANGUAGE_CHARSET
|
||||
|
||||
@@ -3,7 +3,7 @@ Chinese-Simplified
|
||||
LANGUAGE_FILE
|
||||
Chinese-Simplified
|
||||
LANGUAGE_ISO
|
||||
cs
|
||||
zh
|
||||
LANGUAGE_AUTHOR
|
||||
Brook Qin (brookqwr at sina.com) \r\n
|
||||
LANGUAGE_CHARSET
|
||||
|
||||
932
lang/Croatian.txt
Executable file
932
lang/Croatian.txt
Executable file
@@ -0,0 +1,932 @@
|
||||
LANGUAGE_NAME
|
||||
Hrvatski
|
||||
LANGUAGE_FILE
|
||||
Croatian
|
||||
LANGUAGE_ISO
|
||||
hr
|
||||
LANGUAGE_AUTHOR
|
||||
Dominko Aždajiæ (domazd@mail.ru) \r\n
|
||||
LANGUAGE_CHARSET
|
||||
ISO-8859-2
|
||||
LANGUAGE_WINDOWSID
|
||||
Croatian
|
||||
OK
|
||||
U redu
|
||||
Cancel
|
||||
Odustati
|
||||
Exit
|
||||
Svršetak
|
||||
Close
|
||||
Zatvoriti
|
||||
Cancel changes
|
||||
Opozvati izmjene
|
||||
Click to confirm
|
||||
Preuzeti izmjene
|
||||
Click to get help!
|
||||
Kliknuti za pomoæ!
|
||||
Click to return to previous screen
|
||||
Kliknuti za povratak na prethodni prikaz
|
||||
Click to go to next screen
|
||||
Kliknuti za povratak na slijedeæi prikaz
|
||||
Hide password
|
||||
Sakriti lozinku
|
||||
Save project
|
||||
Pohraniti projekt
|
||||
Close current project?
|
||||
Zatvoriti tekuæi projekt?
|
||||
Delete this project?
|
||||
Izbrisati taj projekt?
|
||||
Delete empty project %s?
|
||||
Izbrisati prazni projekt %s?
|
||||
Action not yet implemented
|
||||
Funkcija još nije raspoloživa
|
||||
Error deleting this project
|
||||
Pogreška tijekom brisanja tog projekta
|
||||
Select a rule for the filter
|
||||
Izaberite neko pravilo za taj filtar
|
||||
Enter keywords for the filter
|
||||
Unesite kljuène rijeèi za taj filtar
|
||||
Cancel
|
||||
Odustati
|
||||
Add this rule
|
||||
Dodati to pravilo
|
||||
Please enter one or several keyword(s) for the rule
|
||||
Unesite molim jednu ili više kljuènih rijeèi za to pravilo
|
||||
Add Scan Rule
|
||||
Dodati pravilo filtriranja
|
||||
Criterion
|
||||
Pravilo filtra:
|
||||
String
|
||||
Unesite rijeè:
|
||||
Add
|
||||
Dodati
|
||||
Scan Rules
|
||||
Pravila filtriranja
|
||||
Use wildcards to exclude or include URLs or links.\nYou can put several scan strings on the same line.\nUse spaces as separators.\n\nExample: +*.zip -www.*.com -www.*.edu/cgi-bin/*.cgi
|
||||
Koristite višeznaènik za ukljuèivanje ili iskljuèivanje mrežnih adresa ili poveznica.\nU isti redak možete staviti i nekoliko filtarskih pravila uzastopno.\nUpotrijebite praznine kao razdjelnike.\n\nPrimjerice: +*.zip -www.*.com -www.*.edu/cgi-bin/*.cgi
|
||||
Exclude links
|
||||
Izuzete poveznice
|
||||
Include link(s)
|
||||
Obuhvaæene poveznice
|
||||
Tip: To have ALL GIF files included, use something like +www.someweb.com/*.gif. \n(+*.gif / -*.gif will include/exclude ALL GIFs from ALL sites)
|
||||
Preporuka: Za obuhvaæanje SVIH datoteka GIF, upotrijebite nešto poput +www.neka-mreža.com/*.gif. \n(+*.gif / -*.gif æe ukljuèivat/iskljuèivati SVE GIF-ove sa SVIH stranica)
|
||||
Save prefs
|
||||
Pohraniti postavke
|
||||
Matching links will be excluded:
|
||||
Shodne poveznice æe biti izuzete:
|
||||
Matching links will be included:
|
||||
Shodne poveznice æe biti obuhvaæene:
|
||||
Example:
|
||||
Primjer:
|
||||
gif\r\nWill match all GIF files
|
||||
gif\r\nPronalazi sve datoteke GIF
|
||||
blue\r\nWill find all files with a matching 'blue' sub-string such as 'bluesky-small.jpeg'
|
||||
blue\r\nPronalazi sve datoteke koje sadržavaju 'blue' kao primjerice 'bluesky-small.jpeg'
|
||||
bigfile.mov\r\nWill match the file 'bigfile.mov', but not 'bigfile2.mov'
|
||||
bigfile.mov\r\Pronalazi sve datoteke 'bigfile.mov', ali ne i 'bigfile2.mov'
|
||||
cgi\r\nWill find links with folder name matching sub-string 'cgi' such as /cgi-bin/somecgi.cgi
|
||||
cgi\r\nPronalazi sve poveznice s mapama koje u nazivu sadrže 'cgi' kao primjerice /cgi-bin/somecgi.cgi
|
||||
cgi-bin\r\nWill find links with folder name matching whole 'cgi-bin' string (but not cgi-bin-2, for example)
|
||||
cgi-bin\r\nPronalazi poveznice prema mapama koje u nazivu sadrže cijeli niz 'cgi-bin' (ali ne i primjerice cgi-bin-2)
|
||||
someweb.com\r\nWill find links with matching sub-string such as www.someweb.com, private.someweb.com etc.
|
||||
someweb.com\r\nPronalazi poveznice s pod-nizovima poput www.neka-mreža.com, privatno.neka-mreža.com itd.
|
||||
someweb\r\nWill find links with matching folder sub-string such as www.someweb.com, www.someweb.edu, private.someweb.otherweb.com etc.
|
||||
someweb\r\nPronalazi poveznice sa shodnim pod-nizom poput www.neka-mreža.com, www.neka-mreža.edu, private.neka-mreža.druga-mreža.com itd.
|
||||
www.someweb.com\r\nWill find links matching whole 'www.someweb.com' sub-string (but not links such as private.someweb.com/..)
|
||||
www.someweb.com\r\nPronalazi poveznice koje u nazivu sadrže cijeli pod-niz 'www.neka-mreža.com' (ali ne i poveznice poput privatno.neka-mreža.com/..)
|
||||
someweb\r\nWill find any links with matching sub-string such as www.someweb.com/.., www.test.abc/fromsomeweb/index.html, www.test.abc/test/someweb.html etc.
|
||||
someweb\r\nPronalazi bilo koju poveznicu sa shodnim pod-nizom poput www.neka-mreža.com/.., www.primjer.abc/s-neke-mreže/kazalo.html, www.primjer.abc/primjer/neka-mreža.html itd.
|
||||
www.test.com/test/someweb.html\r\nWill only find the 'www.test.com/test/someweb.html' file. Note that you have to type the complete path (URL + site path)
|
||||
www.test.com/test/someweb.html\r\nPronalazi samo datoteku 'www.primjer.com/primjer/neka-mreža.html'. Imajte na umu da morate unijeti potpunu putanju (URL + putanja do mrežnog mjesta)
|
||||
All links will match
|
||||
Obuhvaæene su sve poveznice
|
||||
Add exclusion filter
|
||||
Pridodati filtar izuzimanja
|
||||
Add inclusion filter
|
||||
Pridodati filtar obuhvaæanja
|
||||
Existing filters
|
||||
Postojeæi filtri
|
||||
Cancel changes
|
||||
Opozvati izmjene
|
||||
Save current preferences as default values
|
||||
Tekuæe postavke pohraniti kao polazne vrijednosti
|
||||
Click to confirm
|
||||
Kliknite za potvrðivanje
|
||||
No log files in %s!
|
||||
U %s nema datoteka zapisnika!
|
||||
No 'index.html' file in %s!
|
||||
U %s nema datoteke 'index.html'!
|
||||
Click to quit WinHTTrack Website Copier
|
||||
Kliknite za okonèavanje rada s WinHTTrack Website Copierom
|
||||
View log files
|
||||
Prikazati zapisnièke datoteke
|
||||
Browse HTML start page
|
||||
Prikazati poèetnu stranicu HTML-a
|
||||
End of mirror
|
||||
Zrcaljenje sadržaja je završeno
|
||||
View log files
|
||||
Prikazati zapisnièke datoteke
|
||||
Browse Mirrored Website
|
||||
Prikazati zrcaljene sadržaje
|
||||
New project...
|
||||
Novi projekt...
|
||||
View error and warning reports
|
||||
Prikazati izvješæa o pogreškama i upozorenjima
|
||||
View report
|
||||
Prikaz izvješæa
|
||||
Close the log file window
|
||||
Zatvoriti okno zapisnièke datoteke
|
||||
Info type:
|
||||
Vrsta informacija:
|
||||
Errors
|
||||
Pogreške
|
||||
Infos
|
||||
Informacije
|
||||
Find
|
||||
Pronaæi
|
||||
Find a word
|
||||
Pronaæi rijeè
|
||||
Info log file
|
||||
Zapisnièka info-datoteka
|
||||
Warning/Errors log file
|
||||
Datoteka zapisa o upozorenjima/pogreškama
|
||||
Unable to initialize the OLE system
|
||||
Sustav OLE-a nije mogao biti pokrenut
|
||||
WinHTTrack could not find any interrupted download file cache in the specified folder!
|
||||
WinHTTrack u navedenoj mapi nije mogao pronaæi meðupohranu nikakvog prekinutog preuzimanja datoteka!
|
||||
Could not connect to provider
|
||||
Povezivanje s dobavljaèem nije uspjelo
|
||||
receive
|
||||
zaprimiti
|
||||
request
|
||||
zatražiti
|
||||
connect
|
||||
povezati
|
||||
search
|
||||
tražiti
|
||||
ready
|
||||
gotovo
|
||||
error
|
||||
pogreška
|
||||
Receiving files..
|
||||
Zaprimanje datoteka..
|
||||
Parsing HTML file..
|
||||
Rašèlanjivanje datoteke HTML-a..
|
||||
Purging files..
|
||||
Èišæenje datoteka..
|
||||
Loading cache in progress..
|
||||
U tijeku je uèitavanje meðuspremnika..
|
||||
Parsing HTML file (testing links)..
|
||||
Rašèlanjivanje datoteke HTML-a (provjeravanje poveznica)..
|
||||
Pause - Toggle [Mirror]/[Pause download] to resume operation
|
||||
Stanka - Nastavak putem izbornièkih naredbi [Zrcaljenje]/[Stanka preuzimanja]
|
||||
Finishing pending transfers - Select [Cancel] to stop now!
|
||||
Završavaju se tekuæi prijenosi - Trenutna obustava pomoæu [Odustati]
|
||||
scanning
|
||||
pregledavanje
|
||||
Waiting for scheduled time..
|
||||
Èeka se zadano vrijeme..
|
||||
Transferring data..
|
||||
Prenošenje podataka..
|
||||
Connecting to provider
|
||||
Povezivanje s dobavljaèem
|
||||
[%d seconds] to go before start of operation
|
||||
[%d sekundi] do poèetka radnje
|
||||
Site mirroring in progress [%s, %s bytes]
|
||||
Zrcaljenje sadržaja je u tijeku [%s, %s bajta]
|
||||
Site mirroring finished!
|
||||
Zrcaljenje sadržaja je završeno!
|
||||
A problem occured during the mirroring operation\n
|
||||
Tijekom zrcaljenja je nastao jedan problem\n
|
||||
\nDuring:\n
|
||||
\nTrajanje:\n
|
||||
\nSee the log file if necessary.\n\nClick FINISH to quit WinHTTrack Website Copier.\n\nThanks for using WinHTTrack!
|
||||
\nPojedinosti po potrebi pogledajte u zapisnièkoj datoteci.\n\nKliknite na ZAVRŠITI za okonèavanje rada WinHTTrack Website Copiera.\n\nHvala Vam na uporabi WinHTTracka!
|
||||
Mirroring operation complete.\nClick Exit to quit WinHTTrack.\nSee log file(s) if necessary to ensure that everything is OK.\n\nThanks for using WinHTTrack!
|
||||
Zrcaljenje je dovršeno.\nKliknite na Svršetak za okonèavanje rada s WinHTTrackom.\nPogledajte po potrebi u zapisnik(e) kako bi se uvjerili da je sve u redu.\n\nHvala Vam na uporabi WinHTTracka!!
|
||||
* * MIRROR ABORTED! * *\r\nThe current temporary cache is required for any update operation and only contains data downloaded during the present aborted session.\r\nThe former cache might contain more complete information; if you do not want to lose that information, you have to restore it and delete the current cache.\r\n[Note: This can easily be done here by erasing the hts-cache/new.* files]\r\n\r\nDo you think the former cache might contain more complete information, and do you want to restore it?
|
||||
* * ZRCALJENJE JE PREKINUTO! * *\r\nTekuæi privremeni meðuspremnik æe biti potreban za neku buduæu aktualizaciju i sadrži samo podatke, koji su preuzeti tijekom upravo prekinutog zasjedanja.\r\nPrethodni meðuspremnik možda sadrži potpunije podatke; ukoliko te podatke ne želite izgubiti, morate ih ponovno uspostaviti i izbrisati tekuæi meðuspremnik.\r\n[Napomena: To se jednostavno može napraviti brisanjem datoteka hts-cache/new.*]\r\n\r\nMislite li da ovom zasjedanju prethodeæi meðuspremnik može sadržavati potpunije podatke, i želite li ga ponovno uspostaviti?
|
||||
* * MIRROR ERROR! * *\r\nHTTrack has detected that the current mirror is empty. If it was an update, the previous mirror has been restored.\r\nReason: the first page(s) either could not be found, or a connection problem occured.\r\n=> Ensure that the website still exists, and/or check your proxy settings! <=
|
||||
* * POGREŠKA PRI ZRCALJENJU! * *\r\nHTTrack je zapazio da je tekuæe zrcalo prazno. Ukoliko je to bila neka dogradnja, onda je prethodno zrcalo ponovno uspostavljeno.\r\nRazlog: ili prva stranica nije mogla biti pronaðena, ili se pak pojavio neki problem.\r\n=> Uvjerite se da dotièno mrežno mjesto još uvijek postoji, i/ili provjerite postavke Vašeg usmjerivaèa! <=
|
||||
\n\nTip: Click [View log file] to see warning or error messages
|
||||
\n\nPreporuka: Kliknite na [Prikazati zapisnièke datoteke], kako bi vidjeli upozorenja ili dojave pogreški
|
||||
Error deleting a hts-cache/new.* file, please do it manually
|
||||
Pogreška pri brisanju datoteke hts-cache/new.*, molim obavite to ruèno
|
||||
Do you really want to quit WinHTTrack Website Copier?
|
||||
Doista želite okonèati rad s WinHTTrack Website Copierom?
|
||||
- Mirroring Mode -\n\nEnter address(es) in URL box
|
||||
- Stanje zrcaljenja -\n\nUnesite adresu(-e) u polje URL-a
|
||||
- Interactive Wizard Mode (questions) -\n\nEnter address(es) in URL box
|
||||
- Interaktivno stanje vodièa s povratnim pitanjima -\n\nUnesite adresu(-e) u polje URL-a
|
||||
- File Download Mode -\n\nEnter file address(es) in URL box
|
||||
- Stanje preuzimanja datoteka -\n\nUnesite adresu(-e) datoteke u polje URL-a
|
||||
- Link Testing Mode -\n\nEnter Web address(es) with links to test in URL box
|
||||
- Stanje provjere poveznica -\n\nUnesite spletnu adresu(-e) s poveznicama za provjeravanje u polje URL-a
|
||||
- Update Mode -\n\nVerify address(es) in URL box, check parameters if necessary then click on 'NEXT' button
|
||||
- Stanje nadograðivanja -\n\nOvjerite adresu(-e) u polje URL-a, provjerite po potrebi parametre a zatim kliknite na gumb 'SLIJEDEÆE'
|
||||
- Resume Mode (Interrupted Operation) -\n\nVerify address(es) in URL box, check parameters if necessary then click on 'NEXT' button
|
||||
- Stanje nadovezivanja (prekinute radnje) -\n\nOvjerite adresu(-e) u polje URL-a, provjerite po potrebi parametre a zatim kliknite na gumb 'SLIJEDEÆE'
|
||||
Log files Path
|
||||
Putanja zapisnièkih datoteka
|
||||
Path
|
||||
Putanja
|
||||
- Links List Mode -\n\nUse URL box to enter address(es) of page(s) containing links to mirror
|
||||
- Stanje nabrajanja poveznica -\n\nKoristite okvir URL-a za unos adrese(-a) stranice(-a) koje sadrže dotiène poveznice
|
||||
New project / Import?
|
||||
Novi projekat / Uvoz?
|
||||
Choose criterion
|
||||
Odaberite kriterij
|
||||
Maximum link scanning depth
|
||||
Maksimum dubine grananja poveznica
|
||||
Enter address(es) here
|
||||
Ovdje unijeti adresu(-e)
|
||||
Define additional filtering rules
|
||||
Odrediti dodatna pravila filtriranja
|
||||
Proxy Name (if needed)
|
||||
Naziv posrednièkog raèunalo (po potrebi)
|
||||
Proxy Port
|
||||
Posrednièki port
|
||||
Define proxy settings
|
||||
Odredite postavke posrednika
|
||||
Use standard HTTP proxy as FTP proxy
|
||||
Koristiti standardni posrednik HTTP-a kao posrednik FTP-a
|
||||
Path
|
||||
Putanja
|
||||
Select Path
|
||||
Odabrati putanju
|
||||
Path
|
||||
Putanja
|
||||
Select Path
|
||||
Odabrati putanju
|
||||
Quit WinHTTrack Website Copier
|
||||
Okonèati rad WinHTTrack Website Copiera
|
||||
About WinHTTrack
|
||||
O programu WinHTTrack
|
||||
Save current preferences as default values
|
||||
Tekuæe postavke pohraniti kao polazne vrijednosti
|
||||
Click to continue
|
||||
Kliknite ovdje za nastavak
|
||||
Click to define options
|
||||
Kliknite ovdje za odreðivanje moguænosti
|
||||
Click to add a URL
|
||||
Kliknite ovdje za dodavanje URL-a
|
||||
Load URL(s) from text file
|
||||
URL(-e) uèitati iz tekstualne datoteke
|
||||
WinHTTrack preferences (*.opt)|*.opt||
|
||||
Postavke WinHTTracka (*.opt)|*.opt||
|
||||
Address List text file (*.txt)|*.txt||
|
||||
Tekstualna datoteka sa spiskom adresa (*.txt)|*.txt||
|
||||
File not found!
|
||||
Datoteka nije pronaðena!
|
||||
Do you really want to change the project name/path?
|
||||
Doista želite izmijeniti naziv i putanju projekta?
|
||||
Load user-default options?
|
||||
Uèitati korisnikom zadane polazne moguænosti?
|
||||
Save user-default options?
|
||||
Pohraniti korisnikom zadane polazne moguænosti?
|
||||
Reset all default options?
|
||||
Sve moguænosti vratiti na polazno?
|
||||
Welcome to WinHTTrack!
|
||||
Dobrodošli u WinHTTrack!
|
||||
Action:
|
||||
Radnja:
|
||||
Max Depth
|
||||
Maksimum dubine
|
||||
Maximum external depth:
|
||||
Maksimum vanjske dubine:
|
||||
Filters (refuse/accept links) :
|
||||
Filtri (odbiti/pohraniti poveznice) :
|
||||
Paths
|
||||
Putanje
|
||||
Save prefs
|
||||
Postavke pohraniti
|
||||
Define..
|
||||
Odrediti..
|
||||
Set options..
|
||||
Postaviti moguænosti..
|
||||
Preferences and mirror options:
|
||||
Postavke i moguænosti zrcaljenja:
|
||||
Project name
|
||||
Naziv projekta
|
||||
Add a URL...
|
||||
Dodati mrežnu adresu...
|
||||
Web Addresses: (URL)
|
||||
Mrežne adrese: (URL)
|
||||
Stop WinHTTrack?
|
||||
Zaustaviti WinHTTrack?
|
||||
No log files in %s!
|
||||
U %s nema zapisnièkih datoteka!
|
||||
Pause Download?
|
||||
Napraviti stanku preuzimanja?
|
||||
Stop the mirroring operation
|
||||
Zaustaviti postupak zrcaljenja
|
||||
Minimize to System Tray
|
||||
Minimizirati u sustavnu traku odlaganja
|
||||
Click to skip a link or stop parsing
|
||||
Kliknite za preskok poveznice ili zaustavljanje rašèlanjivanja
|
||||
Click to skip a link
|
||||
Kliknite za preskok poveznice
|
||||
Bytes saved
|
||||
Pohranjeno bajta
|
||||
Links scanned
|
||||
Obraðene poveznice
|
||||
Time:
|
||||
Vrijeme:
|
||||
Connections:
|
||||
Veze:
|
||||
Running:
|
||||
Djelatno:
|
||||
Hide
|
||||
Sakriti
|
||||
Transfer rate
|
||||
Stopa prijenosa
|
||||
SKIP
|
||||
PRESKOÈITI
|
||||
Information
|
||||
Informacija
|
||||
Files written:
|
||||
Zapisano datoteka:
|
||||
Files updated:
|
||||
Aktualizirano datoteka:
|
||||
Errors:
|
||||
Pogreške:
|
||||
In progress:
|
||||
U tijeku:
|
||||
Follow external links
|
||||
Slijediti vanjske poveznice
|
||||
Test all links in pages
|
||||
Na stranicama provjeriti sve poveznice
|
||||
Try to ferret out all links
|
||||
Pokušati slijediti sve poveznice
|
||||
Download HTML files first (faster)
|
||||
Najprije preuzimati datoteke HTML-a (brže)
|
||||
Choose local site structure
|
||||
Odaberite mjesnu strukturu sadržaja
|
||||
Set user-defined structure on disk
|
||||
Sâmi odredite strukturu na disku
|
||||
Use a cache for updates and retries
|
||||
Za dogradnje i ponavljanja koristiti meðuspremnik
|
||||
Do not update zero size or user-erased files
|
||||
Ne nadopunjavati datoteke koje su prazne ili one koje je korisnik izbrisao
|
||||
Create a Start Page
|
||||
Napraviti poèetnu stranicu
|
||||
Create a word database of all html pages
|
||||
Napraviti spisak rijeèi sa svih stranica HTML-a
|
||||
Create error logging and report files
|
||||
Napraviti datoteke zapisnika pogrešaka i izvješæa o tijeku postupka
|
||||
Generate DOS 8-3 filenames ONLY
|
||||
Generirati nazive datoteka SAMO sukladno DOS-u 8-3
|
||||
Generate ISO9660 filenames ONLY for CDROM medias
|
||||
Generirati nazive datoteka SAMO sukladno ISO9660 za medije CDROM-a
|
||||
Do not create HTML error pages
|
||||
Ne stvarati stranice pogrešaka HTML-a
|
||||
Select file types to be saved to disk
|
||||
Odaberite vrste datoteka, koje treba pohranjivati na disku
|
||||
Select parsing direction
|
||||
Odaberite smjer rašèlanjivanja
|
||||
Select global parsing direction
|
||||
Odaberite opæi smjer rašèlanjivanja
|
||||
Setup URL rewriting rules for internal links (downloaded ones) and external links (not downloaded ones)
|
||||
Postavke pravila prilagoðavanja URL-a za unutarnje (jednom veæ preuzimane) i vanjske (ni jednom nisu preuzimane) poveznice
|
||||
Max simultaneous connections
|
||||
Maksimum istovremenih prikljuèivanja/veza
|
||||
File timeout
|
||||
Vrijeme èekanja na datoteke
|
||||
Cancel all links from host if timeout occurs
|
||||
Pri prekoraèenju vremena èekanja prekinuti sve poveznice prema dotiènom raèunalu
|
||||
Minimum admissible transfer rate
|
||||
Najniža podnošljiva stopa prijenosa
|
||||
Cancel all links from host if too slow
|
||||
Prekinuti sve poveznice prema ugostiteljskom raèunalu ako je presporo
|
||||
Maximum number of retries on non-fatal errors
|
||||
Najviši broj pokušaja ponavljanja pri ne-fatalnim pogreškama
|
||||
Maximum size for any single HTML file
|
||||
Vrhunac velièine neke pojedinaène datoteke HTML-a
|
||||
Maximum size for any single non-HTML file
|
||||
Vrhunac velièine neke pojedinaène datoteke ne-HTML-a
|
||||
Maximum amount of bytes to retrieve from the Web
|
||||
Vrhunac iznosa u bajtima za dobaviti s mrežnih mjesta
|
||||
Make a pause after downloading this amount of bytes
|
||||
Napraviti stanku nakon preuzimanja tog iznosa u bajtima
|
||||
Maximum duration time for the mirroring operation
|
||||
Vrhunac vremena trajanja za postupak zrcaljenja
|
||||
Maximum transfer rate
|
||||
Vrhunac stope prijenosa
|
||||
Maximum connections/seconds (avoid server overload)
|
||||
Najviši broj veza/sekundi (sprjeèava preoptereæivanje poslužitelja)
|
||||
Maximum number of links that can be tested (not saved!)
|
||||
Najviši broj poveznica, koje mogu biti provjeravane (za pohranjivanje nema ogranièenja!)
|
||||
Browser identity
|
||||
Preglednièko obilježje
|
||||
Comment to be placed in each HTML file
|
||||
Komentar koji æe biti smješten u svakoj datoteci HTML-a
|
||||
Back to starting page
|
||||
Natrag na poèetnu stranicu
|
||||
Save current preferences as default values
|
||||
Tekuæe postavke pohraniti kao polazne vrijednosti
|
||||
Click to continue
|
||||
Kliknite za nastavak
|
||||
Click to cancel changes
|
||||
Kliknuti za opoziv izmjena
|
||||
Follow local robots rules on sites
|
||||
Na mrežnim mjestima slijediti pravila mjesnih robota
|
||||
Links to non-localised external pages will produce error pages
|
||||
Poveznice prema nepreslikanim vanjskim stranicama æe stvarati stranice pogreški
|
||||
Do not erase obsolete files after update
|
||||
Nakon dogradnje ne brisati zastarjele datoteke
|
||||
Accept cookies?
|
||||
Prihvatiti kolaèiæ?
|
||||
Check document type when unknown?
|
||||
Provjeravati vrstu datoteke ukoliko je nepoznata?
|
||||
Parse java applets to retrieve included files that must be downloaded?
|
||||
Rašèlanjivati java applete radi pronalaženja obuhvaæenih datoteka, koje još moraju biti preuzete?
|
||||
Store all files in cache instead of HTML only
|
||||
Spremati sve datoteke u meðuspremnik a ne samo one u HTML-u
|
||||
Log file type (if generated)
|
||||
Vrsta datoteke zapisnika (ukoliko je naèinjen)
|
||||
Maximum mirroring depth from root address
|
||||
Najveæa dubina zrcaljenja od prve adrese
|
||||
Maximum mirroring depth for external/forbidden addresses (0, that is, none, is the default)
|
||||
Najveæa dubina zrcaljenja za vanjske/zabranjene adrese (polazno je 0, tj. bez vanjskog preuzimanja)
|
||||
Create a debugging file
|
||||
Naèiniti datoteku za traženje pogrešaka
|
||||
Use non-standard requests to get round some server bugs
|
||||
Koristiti nestandardne zahtjeve, kako bi se zaobišle neke poslužiteljske pogreške
|
||||
Use old HTTP/1.0 requests (limits engine power!)
|
||||
Koristiti zahtjeve starog HTTP/1.0 (ogranièava brzinu rada!)
|
||||
Attempt to limit retransfers through several tricks (file size test..)
|
||||
Raznim varkama pokušati ogranièiti opetovanja prijenosa (provjera velièine datoteka..)
|
||||
Attempt to limit the number of links by skipping similar URLs (www.foo.com==foo.com, http=https ..)
|
||||
Preskakanjem sliènih URL-a (www.foo.com==foo.com, http=https ..) pokušati ogranièiti broj poveznica
|
||||
Write external links without login/password
|
||||
Vanjske poveznice zapisivati bez prijave/lozinke
|
||||
Write internal links without query string
|
||||
Unutarnje poveznice zapisivati bez teksta za upite
|
||||
Get non-HTML files related to a link, eg external .ZIP or pictures
|
||||
Dobavljati datoteke ne-HTML-a, združene s poveznicom (primjerice vanjski .ZIP ili slike)
|
||||
Test all links (even forbidden ones)
|
||||
Provjeravati sve poveznice (èak i one zabranjene)
|
||||
Try to catch all URLs (even in unknown tags/code)
|
||||
Pokušati pronaæi sve URL-e (èak i u nepoznatim oznakama/skriptama)
|
||||
Get HTML files first!
|
||||
Dobaviti najprije datoteke HTML-a!
|
||||
Structure type (how links are saved)
|
||||
Vrsta strukture (kako se pohranjuju poveznice)
|
||||
Use a cache for updates
|
||||
Za dogradnje koristiti meðuspremnik
|
||||
Do not re-download locally erased files
|
||||
Ne preuzimati ponovno datoteke, koje su veæ mjesno izbrisane
|
||||
Make an index
|
||||
Napraviti kazalo
|
||||
Make a word database
|
||||
Napraviti spisak rijeèi
|
||||
Log files
|
||||
Zapisnièke datoteke
|
||||
DOS names (8+3)
|
||||
Nazivi sukladno DOS-u (8+3)
|
||||
ISO9660 names (CDROM)
|
||||
Nazivi prema ISO9660 (CDROM)
|
||||
No error pages
|
||||
Bez stranica pogrešaka
|
||||
Primary Scan Rule
|
||||
Glavno pravilo filtra
|
||||
Travel mode
|
||||
Naèin traženja
|
||||
Global travel mode
|
||||
Globalni naèin traženja
|
||||
These options should be modified only exceptionally
|
||||
Ove moguænosti bi trebale biti preinaèavane samo iznimno
|
||||
Activate Debugging Mode (winhttrack.log)
|
||||
Aktivirati postupak traženja pogrešaka (winhttrack.log)
|
||||
Rewrite links: internal / external
|
||||
Prilagoditi poveznièke adrese: unutarnje / vanjske
|
||||
Flow control
|
||||
Nadzor toka
|
||||
Limits
|
||||
Granice
|
||||
Identity
|
||||
Obilježje
|
||||
HTML footer
|
||||
Podnožje HTML-a
|
||||
N# connections
|
||||
Broj veza
|
||||
Abandon host if error
|
||||
Pri pogreškama napustiti ugostitelja
|
||||
Minimum transfer rate (B/s)
|
||||
Minimum stope prijenosa (B/s)
|
||||
Abandon host if too slow
|
||||
Napustiti ugostitelja ukoliko je prespor
|
||||
Configure
|
||||
Prilagoditi
|
||||
Use proxy for ftp transfers
|
||||
Koristiti posrednika za prijenose putem FTP-a
|
||||
TimeOut(s)
|
||||
Vremenska ogranièenja
|
||||
Persistent connections (Keep-Alive)
|
||||
Održavati veze (Keep-Alive)
|
||||
Reduce connection time and type lookup time using persistent connections
|
||||
Održavane veze smanjuju vrijeme povezivanja i vrijeme za traženje vrsta
|
||||
Retries
|
||||
Opetovanja
|
||||
Size limit
|
||||
Ogranièenje velièine
|
||||
Max size of any HTML file (B)
|
||||
Najviši broj bajta u datotekama HTML-a
|
||||
Max size of any non-HTML file
|
||||
Najveæa velièina datoteka ne-HTML-a
|
||||
Max site size
|
||||
Najveæa velièina sadržaja
|
||||
Max time
|
||||
Najduže vrijeme
|
||||
Save prefs
|
||||
Pohraniti postavke
|
||||
Max transfer rate
|
||||
Vrhunac stope prijenosa
|
||||
Follow robots.txt
|
||||
Slijediti robots.txt
|
||||
No external pages
|
||||
Bez vanjskih stranica
|
||||
Do not purge old files
|
||||
Ne brisati stare datoteke
|
||||
Accept cookies
|
||||
Prihvaæati kolaèiæe
|
||||
Check document type
|
||||
Provjeravati vrstu dokumenata
|
||||
Parse java files
|
||||
Rašèlanjivati datoteke Java
|
||||
Store ALL files in cache
|
||||
Spremati SVE datoteke u meðuspremnik
|
||||
Tolerant requests (for servers)
|
||||
Snošljivi zahtjevi (za poslužitelje)
|
||||
Update hack (limit re-transfers)
|
||||
Iznuda dogradnji (ogranièava opetovane prijenose)
|
||||
URL hacks (join similar URLs)
|
||||
URL hacks (združuje sliène URL-e)
|
||||
Force old HTTP/1.0 requests (no 1.1)
|
||||
Nametati zahtjeve starog HTTP/1.0 (ne 1.1)
|
||||
Max connections / seconds
|
||||
Najviši broj veza / sekundi
|
||||
Maximum number of links
|
||||
Najviši broj poveznica
|
||||
Pause after downloading..
|
||||
Èekati nakon preuzimanja..
|
||||
Hide passwords
|
||||
Sakriti lozinke
|
||||
Hide query strings
|
||||
Sakriti tekst za upite
|
||||
Links
|
||||
Poveznice
|
||||
Build
|
||||
Graða
|
||||
Experts Only
|
||||
Samo za struènjake
|
||||
Flow Control
|
||||
Nadzor toka
|
||||
Limits
|
||||
Ogranièenja
|
||||
Browser ID
|
||||
Preglednièki ID
|
||||
Scan Rules
|
||||
Pravila filtriranja
|
||||
Spider
|
||||
Pauk
|
||||
Log, Index, Cache
|
||||
Zapisnik, Kazalo, Meðuspremnik
|
||||
Proxy
|
||||
Posrednik
|
||||
MIME Types
|
||||
Vrste MIME
|
||||
Do you really want to quit WinHTTrack Website Copier?
|
||||
Doista želite okonèati rad WinHTTrack Website Copiera?
|
||||
Do not connect to a provider (already connected)
|
||||
Ne povezivati s dobaviteljem (veæ je povezano)
|
||||
Do not use remote access connection
|
||||
Ne koristiti vezu daljinskog pristupa
|
||||
Schedule the mirroring operation
|
||||
Odrediti vrijeme zrcaljenja
|
||||
Quit WinHTTrack Website Copier
|
||||
Okonèati rad WinHTTrack Website Copiera
|
||||
Back to starting page
|
||||
Natrag na poèetnu stranicu
|
||||
Click to start!
|
||||
Kliknite za poèetak!
|
||||
No saved password for this connection!
|
||||
Za tu vezu nema pohranjene lozinke!
|
||||
Can not get remote connection settings
|
||||
Ne mogu se dobiti postavke daljinske veze
|
||||
Select a connection provider
|
||||
Odaberite dobavitelja veze
|
||||
Start
|
||||
Zapoèeti
|
||||
Please adjust connection parameters if necessary,\nthen press FINISH to launch the mirroring operation.
|
||||
Po potrebi prilagodite molim parametre veze,\na zatim stisnite ZAVRŠITI kako bi pokrenuli zrcaljenje.
|
||||
Save settings only, do not launch download now.
|
||||
Samo pohraniti postavke, preuzimanje ne pokretati sada.
|
||||
On hold
|
||||
Na èekanju
|
||||
Transfer scheduled for: (hh/mm/ss)
|
||||
Prijenos je predviðen za: (hh/mm/ss)
|
||||
Start
|
||||
Zapoèeti
|
||||
Connect to provider (RAS)
|
||||
Povezati s dobavljaèem (RAS)
|
||||
Connect to this provider
|
||||
Povezati s tim dobavljaèem
|
||||
Disconnect when finished
|
||||
Prekinuti vezu kada bude gotovo
|
||||
Disconnect modem on completion
|
||||
Po dovršetku odvojiti modemsku vezu
|
||||
\r\n(Please notify us of any bug or problem)\r\n\r\nDevelopment:\r\nInterface (Windows): Xavier Roche\r\nSpider: Xavier Roche\r\nJavaParserClasses: Yann Philippot\r\n\r\n(C)1998-2003 Xavier Roche and other contributors\r\nMANY THANKS for translation tips to:\r\nRobert Lagadec (rlagadec@yahoo.fr)
|
||||
\r\n(Molimo da nas obavijestite o svim pogreškama i poteškoæama)\r\n\r\nRazvoj:\r\nSuèelje (Windows): Xavier Roche\r\nPauk: Xavier Roche\r\nRazrediRašèlanjivaèaJave: Yann Philippot\r\n\r\n(C)1998-2003 Xavier Roche i drugi suradnici\r\nPUNO HVALA za prijevodne preporuke upuæujemo:\r\nRobert Lagadec (rlagadec@yahoo.fr)
|
||||
About WinHTTrack Website Copier
|
||||
O programu WinHTTrack Website Copier
|
||||
Please visit our Web page
|
||||
Molimo da posjetite našu spletnu stranicu
|
||||
Wizard query
|
||||
Upit vodièa
|
||||
Your answer:
|
||||
Vaš odgovor:
|
||||
Link detected..
|
||||
Pronaðena je poveznica..
|
||||
Choose a rule
|
||||
Birajte pravilo
|
||||
Ignore this link
|
||||
Zanemariti tu poveznicu
|
||||
Ignore directory
|
||||
Zanemariti mape
|
||||
Ignore domain
|
||||
Zanemariti domenu
|
||||
Catch this page only
|
||||
Dobaviti samo tu stranicu
|
||||
Mirror site
|
||||
Sadržaj zrcaljenja
|
||||
Mirror domain
|
||||
Domena zrcaljenja
|
||||
Ignore all
|
||||
Bez poveznica
|
||||
Wizard query
|
||||
Upit vodièa
|
||||
NO
|
||||
NE
|
||||
File
|
||||
Datoteka
|
||||
Options
|
||||
Moguænosti
|
||||
Log
|
||||
Zapisnik
|
||||
Window
|
||||
Okno
|
||||
Help
|
||||
Pomoæ
|
||||
Pause transfer
|
||||
Napraviti stanku prijenosa
|
||||
Exit
|
||||
Svršetak
|
||||
Modify options
|
||||
Izmijeniti moguænosti
|
||||
View log
|
||||
Prikazati zapisnik
|
||||
View error log
|
||||
Prikazati zapisnik pogrešaka
|
||||
View file transfers
|
||||
Prikazati prijenose datoteka
|
||||
Hide
|
||||
Sakriti
|
||||
About WinHTTrack Website Copier
|
||||
O programu WinHTTrack Website Copier
|
||||
Check program updates...
|
||||
Potražiti programske dogradnje...
|
||||
&Toolbar
|
||||
&Traka alatki
|
||||
&Status Bar
|
||||
&Traka stanja
|
||||
S&plit
|
||||
Raz&dijeliti
|
||||
File
|
||||
Datoteka
|
||||
Preferences
|
||||
Postavke
|
||||
Mirror
|
||||
Zrcalo
|
||||
Log
|
||||
Zapisnik
|
||||
Window
|
||||
Okno
|
||||
Help
|
||||
Pomoæ
|
||||
Exit
|
||||
Svršetak
|
||||
Load default options
|
||||
Uèitati polazne moguænosti
|
||||
Save default options
|
||||
Pohraniti polazne moguænosti
|
||||
Reset to default options
|
||||
Vratiti polazne moguænosti
|
||||
Load options...
|
||||
Uèitati moguænosti...
|
||||
Save options as...
|
||||
Moguænosti pohraniti kao...
|
||||
Language preference...
|
||||
Jeziène postavke...
|
||||
Contents...
|
||||
Sadržaji...
|
||||
About WinHTTrack...
|
||||
O programu WinHTTrack...
|
||||
New project\tCtrl+N
|
||||
Novi projekat\tCtrl+N
|
||||
&Open...\tCtrl+O
|
||||
&Otvoriti...\tCtrl+O
|
||||
&Save\tCtrl+S
|
||||
&Pohraniti\tCtrl+S
|
||||
Save &As...
|
||||
Pohraniti &kao...
|
||||
&Delete...
|
||||
&Izbrisati...
|
||||
&Browse sites...
|
||||
&Pregledati sadržaje...
|
||||
User-defined structure
|
||||
Korisnikom odreðena struktura
|
||||
%n\tName of file without file type (ex: image)\r\n%N\tName of file including file type (ex: image.gif)\r\n%t\tFile type only (ex: gif)\r\n%p\tPath [without ending /] (ex: /someimages)\r\n%h\tHost name (ex: www.someweb.com)\r\n%M\tMD5 URL (128 bits, 32 ascii bytes)\r\n%Q\tMD5 query string (128 bits, 32 ascii bytes)\r\n%q\tMD5 small query string (16 bits, 4 ascii bytes)\r\n\r\n%s?\tShort name (ex: %sN)
|
||||
%n\tNaziv datoteke bez nastavka (npr. slika)\r\n%N\tNaziv datoteke s nastavkom (npr. slika.gif)\r\n%t\tSamo nastavak naziva datoteke (npr. gif)\r\n%p\tPutanja [bez svršetka /] (npr. /nekeslike)\r\n%h\tNaziv ugostitelja (npr. www.nekisplet.com)\r\n%M\tMD5 URL (128 bita, 32 ascii bajta)\r\n%Q\tTekst upita MD5 (128 bita, 32 ascii bajta)\r\n%q\tKratki tekst upita MD5 (16 bita, 4 ascii bajta)\r\n\r\n%s?\tKratki naziv (npr. %sN)
|
||||
Example:\t%h%p/%n%q.%t\n->\t\tc:\\mirror\\www.someweb.com\\someimages\\image.gif
|
||||
Primjerice:\t%h%p/%n%q.%t\n->\t\tc:\\zrcaljenje\\www.nekisplet.com\\nekeslike\\slika.gif
|
||||
Proxy settings
|
||||
Postavke posrednika
|
||||
Proxy address:
|
||||
Adresa posrednika:
|
||||
Proxy port:
|
||||
Port posrednika:
|
||||
Authentication (only if needed)
|
||||
Ovjeravanje (samo po potrebi)
|
||||
Login
|
||||
Prijava
|
||||
Password
|
||||
Lozinka
|
||||
Enter proxy address here
|
||||
Ovdje unesite adresu posrednika
|
||||
Enter proxy port here
|
||||
Ovdje unesite port posrednika
|
||||
Enter proxy login
|
||||
Unesite prijavu na posredniku
|
||||
Enter proxy password
|
||||
Unesite lozinku na posredniku
|
||||
Enter project name here
|
||||
Ovdje unesite naziv projekta
|
||||
Enter saving path here
|
||||
Ovdje unesite putanju za pohranjivanje
|
||||
Select existing project to update
|
||||
Birajte postojeæi projekt za dogradnju
|
||||
Click here to select path
|
||||
Ovdje kliknite za izbor putanje
|
||||
Select or create a new category name, to sort your mirrors in categories
|
||||
Odaberite ili nadjenite neki naziv novoj kategoriji, kako bi Vaša zrcaljenja svrstali u kategorije
|
||||
HTTrack Project Wizard...
|
||||
Pomoènik za projekte HTTracka...
|
||||
New project name:
|
||||
Naziv novog projekta:
|
||||
Existing project name:
|
||||
Naziv postojeæeg projekta:
|
||||
Project name:
|
||||
Naziv projekta:
|
||||
Base path:
|
||||
Osnovna putanja:
|
||||
Project category:
|
||||
Kategorija projekta:
|
||||
C:\\My Web Sites
|
||||
C:\\Moji spletni sadržaji
|
||||
Type a new project name, \r\nor select existing project to update/resume
|
||||
Utipkajte naziv novog projekta, \r\nili odaberite postojeæi projekat za dograditi/nadovezati
|
||||
New project
|
||||
Novi projekat
|
||||
Insert URL
|
||||
Umetnite URL
|
||||
URL:
|
||||
URL:
|
||||
Authentication (only if needed)
|
||||
Ovjeravanje (samo ako je nužno)
|
||||
Login
|
||||
Prijava
|
||||
Password
|
||||
Lozinka
|
||||
Forms or complex links:
|
||||
Obrasci ili kompleksne poveznice:
|
||||
Capture URL...
|
||||
Zahvatiti URL...
|
||||
Enter URL address(es) here
|
||||
Ovdje unesite adresu(-e) URL-a
|
||||
Enter site login
|
||||
Unesite prijavu za to mrežno mjesto
|
||||
Enter site password
|
||||
Unesite lozinku za to mrežno mjesto
|
||||
Use this capture tool for links that can only be accessed through forms or javascript code
|
||||
Koristite ovu funkciju za dobavu povezanih sadržaja, kojima se inaèe može pristupiti samo putem obrazaca ili kôda JavaScript
|
||||
Choose language according to preference
|
||||
Izaberite jezik
|
||||
Catch URL!
|
||||
Dobaviti URL!
|
||||
Please set temporary browser proxy settings to the following values (Copy/Paste Proxy Address and Port).\nThen click on the Form SUBMIT button in your browser page, or click on the specific link you want to capture.
|
||||
Molimo da privremeno izmijenite preglednikove postavke posrednièkog poslužitelja na slijedeæe vrijednosti (Adresu i port posrednika odavdje preslikati).\nKliknite zatim na stranici obrasca u Vašem pregledniku na gumb SUBMIT/POSLATI ili pak na odreðenu poveznicu, koju želite dobaviti.
|
||||
This will send the desired link from your browser to WinHTTrack.
|
||||
Time æe željena poveznica iz Vašeg preglednika biti poslana u WinHTTrack.
|
||||
ABORT
|
||||
PREKINUTI
|
||||
Copy/Paste the temporary proxy parameters here
|
||||
Privremene postavke posrednièkog poslužitelja preslikati odavdje
|
||||
Cancel
|
||||
Odustati
|
||||
Unable to find Help files!
|
||||
Nije bilo moguæe pronaæi datoteke Pomoæi!
|
||||
Unable to save parameters!
|
||||
Nije bilo moguæe pohraniti parametre!
|
||||
Please drag only one folder at a time
|
||||
Povucite mišom molim samo jednu mapu istovremeno
|
||||
Please drag only folders, not files
|
||||
Povucite mišom molim samo mape, ne datoteke
|
||||
Please drag folders only
|
||||
Povucite mišom molim samo mape
|
||||
Select user-defined structure?
|
||||
Za preslik sadržaja odabrati korisnikom odreðenu strukturu?
|
||||
Please ensure that the user-defined-string is correct,\notherwise filenames will be bogus!
|
||||
Provjerite molim je li korisnikom odreðeni znakovni niz ispravan,\nu suprotnom æe nastati iskrivljeni nazivi datoteka!
|
||||
Do you really want to use a user-defined structure?
|
||||
Doista želite koristiti korisnikom odreðenu strukturu?
|
||||
Too manu URLs, cannot handle so many links!!
|
||||
Previše je URL-a, ne mogu obraðivati toliko poveznica!!
|
||||
Not enough memory, fatal internal error..
|
||||
Nema dovoljno spremnika, fatalna unutarnja pogreška..
|
||||
Unknown operation!
|
||||
Nepoznata operacija!
|
||||
Add this URL?\r\n
|
||||
Dodati taj URL?\r\n
|
||||
Warning: main process is still not responding, cannot add URL(s)..
|
||||
Warning: main process is still not responding, cannot add URL(s)..
|
||||
Type/MIME associations
|
||||
Type/MIME associations
|
||||
File types:
|
||||
Vrste datoteka:
|
||||
MIME identity:
|
||||
Istovjetnost MIME:
|
||||
Select or modify your file type(s) here
|
||||
Ovdje birajte ili izmijenite Vaše vrste datoteka
|
||||
Select or modify your MIME type(s) here
|
||||
Ovdje birajte ili izmijenite Vaše vrste MIME
|
||||
Go up
|
||||
Na gore
|
||||
Go down
|
||||
Na dolje
|
||||
File download information
|
||||
Informacije o preuzimanju datoteka
|
||||
Freeze Window
|
||||
Uglaviti okno
|
||||
More information:
|
||||
Više informacija:
|
||||
Welcome to WinHTTrack Website Copier!\n\nPlease click on the NEXT button to\n\n- start a new project\n- or resume a partial download
|
||||
Dobrodošli u program WinHTTrack Website Copier!\n\nKliknite molim na gumb SLIJEDEÆE kako bi\n\n- zapoèeli novi projekat\n- ili nastavili nedovršeno preuzimanje
|
||||
File names with extension:\nFile names containing:\nThis file name:\nFolder names containing:\nThis folder name:\nLinks on this domain:\nLinks on domains containing:\nLinks from this host:\nLinks containing:\nThis link:\nALL LINKS
|
||||
Nazivi datoteka s proširenjem:\nNazivi datoteka sadržavaju:\nTaj naziv datoteke:\nNazivi mapa sadržavaju:\nTaj naziv mape:\nPoveznice u toj domeni:\nPoveznice u domenama sadržavaju:\nPoveznice s tog ugostitelja:\nPoveznice sadržavaju:\nTa poveznica:\nSVE POVEZNICE
|
||||
Show all\nHide debug\nHide infos\nHide debug and infos
|
||||
Prikazati sve\nSakriti debug\nSakriti informacije\nSakriti debug i informacije
|
||||
Site-structure (default)\nHtml in web/, images/other files in web/images/\nHtml in web/html, images/other in web/images\nHtml in web/, images/other in web/\nHtml in web/, images/other in web/xxx, where xxx is the file extension\nHtml in web/html, images/other in web/xxx\nSite-structure, without www.domain.xxx/\nHtml in site_name/, images/other files in site_name/images/\nHtml in site_name/html, images/other in site_name/images\nHtml in site_name/, images/other in site_name/\nHtml in site_name/, images/other in site_name/xxx\nHtml in site_name/html, images/other in site_name/xxx\nAll files in web/, with random names (gadget !)\nAll files in site_name/, with random names (gadget !)\nUser-defined structure..
|
||||
Struktura sadržaja (polazno)\nHTML u spletu/, slike/ostale datoteke u spletu/slike/\nHTML u spletu/html, slike/ostalo u spletu/slike\nHTML u spletu/, slike/ostalo u spletu/\nHTML u spletu/, slike/ostalo u spletu/xxx, pri èemu je xxx proširenje naziva datoteke\nHTML u spletu/html, slike/ostalo u spletu/xxx\nStruktura sadržaja, bez www.domena.xxx/\nHTML u naziv_sadržaja/, slike/ostale datoteke u nazivu_sadržaja/slike/\nHTML u naziv_sadržaja/html, slike/ostalo u naziv_sadržaja/slike\nHTML u naziv_sadržaja/, slike/ostalo u naziv_sadržaja/\nHTML u naziv_sadržaja/, slike/ostalo u naziv_sadržaja/xxx\nHTML u naziv_sadržaja/html, slike/ostalo u naziv_sadržaja/xxx\nSve datoteke u spletu/, s nasumiènim nazivima (gadget !)\nSve datoteke u naziv_sadržaja/, s nasumiènim nazivima (gadget !)\nKorisnikom odreðena struktura..
|
||||
Just scan\nStore html files\nStore non html files\nStore all files (default)\nStore html files first
|
||||
Samo pregledati poveznice\nStpremiti datoteke HTML-a\nStpremiti datoteke ne-HTML-a\nSpremiti sve datoteke (polazno)\nSpremiti najprije datoteke HTML-a
|
||||
Stay in the same directory\nCan go down (default)\nCan go up\nCan both go up & down
|
||||
Ostati u istoj mapi\nMože iæi dolje (polazno)\nMože iæi gore\nMože iæi i gore i dolje
|
||||
Stay on the same address (default)\nStay on the same domain\nStay on the same top level domain\nGo everywhere on the web
|
||||
Ostati na istoj adresi (polazno)\nOstati u istoj domeni\nOstati u istoj demeni vršne razine\nIæi posvuda po spletu
|
||||
Never\nIf unknown (except /)\nIf unknown
|
||||
Nikada\nUkoliko je nepoznato (izuzev /)\nUkoliko je nepoznato
|
||||
no robots.txt rules\nrobots.txt except wizard\nfollow robots.txt rules
|
||||
bez pravila iz robots.txt\nslijediti pravila iz robots.txt s izuzetkom pomoènika\nslijediti pravila iz robots.txt
|
||||
normal\nextended\ndebug
|
||||
uobièajeno\nprošireno\ndebug
|
||||
Download web site(s)\nDownload web site(s) + questions\nGet individual files\nDownload all sites in pages (multiple mirror)\nTest links in pages (bookmark test)\n* Continue interrupted download\n* Update existing download
|
||||
Preuzimanje spletnih sadržaja\nPreuzimanje spletnih sadržaja + pitanja\nDobavljanje pojedinih datoteka\nPreuzimanje svih sadržaja sa stranica (višestruko zrcaljenje)\nProvjeriti poveznice u stranicama (provjera poveznica)\n* Nastaviti prekinuto preuzimanje\n* Aktualizirati postojeæe preuzimanje
|
||||
Relative URI / Absolute URL (default)\nAbsolute URL / Absolute URL\nAbsolute URI / Absolute URL\nOriginal URL / Original URL
|
||||
Relativni URI / Apsolutni URL (polazno)\nApsolutni URL / Apsolutni URL\nApsolutni URI / Apsolutni URL\nIzvorni URL / Izvorni URL
|
||||
Open Source offline browser
|
||||
Open Source offline browser
|
||||
Website Copier/Offline Browser. Copy remote websites to your computer. Free.
|
||||
Preslikavatelj spletnih sadržaja/Preglednik mjesnih sadržaja. Preslikavanje internetskih sadržaja na Vaše raèunalo. Besplatno.
|
||||
httrack, winhttrack, webhttrack, offline browser
|
||||
httrack, winhttrack, webhttrack, offline browser
|
||||
URL list (.txt)
|
||||
Spisak URL-a (.txt)
|
||||
Previous
|
||||
Prethodno
|
||||
Next
|
||||
Slijedeæe
|
||||
URLs
|
||||
URL-i
|
||||
Warning
|
||||
Upozorenje
|
||||
Your browser does not currently support javascript. For better results, please use a javascript-aware browser.
|
||||
Vaš preglednik trenutno ne podržava JavaScript. Za bolje rezultate koristite molim preglednik koji ovladava JavaScript.
|
||||
Thank you
|
||||
Hvala Vam
|
||||
You can now close this window
|
||||
Sada možete zatvoriti ovo okno
|
||||
Server terminated
|
||||
Poslužitelj je razriješen
|
||||
A fatal error has occured during this mirror
|
||||
Tijekom ovog zrcaljenja je nastala fatalna pogreška
|
||||
@@ -711,9 +711,9 @@ Log
|
||||
Window
|
||||
A&ken
|
||||
Help
|
||||
&Abi
|
||||
Abi
|
||||
Exit
|
||||
&Välju
|
||||
Välju
|
||||
Load default options
|
||||
Laadi vaikimisi seaded
|
||||
Save default options
|
||||
|
||||
@@ -372,6 +372,8 @@ Create a Start Page
|
||||
Create a Start Page
|
||||
Create a word database of all html pages
|
||||
Create a word database of all html pages
|
||||
Build a complete RFC822 mail (MHT/EML) archive of the mirror
|
||||
Build a complete RFC822 mail (MHT/EML) archive of the mirror
|
||||
Create error logging and report files
|
||||
Create error logging and report files
|
||||
Generate DOS 8-3 filenames ONLY
|
||||
@@ -420,6 +422,12 @@ Browser identity
|
||||
Browser identity
|
||||
Comment to be placed in each HTML file
|
||||
Comment to be placed in each HTML file
|
||||
Languages accepted by the browser
|
||||
Languages accepted by the browser
|
||||
Additional HTTP headers to be sent in each requests
|
||||
Additional HTTP headers to be sent in each requests
|
||||
HTTP referer to be sent for initial URLs
|
||||
HTTP referer to be sent for initial URLs
|
||||
Back to starting page
|
||||
Back to starting page
|
||||
Save current preferences as default values
|
||||
@@ -480,6 +488,8 @@ Make an index
|
||||
Make an index
|
||||
Make a word database
|
||||
Make a word database
|
||||
Build a mail archive
|
||||
Build a mail archive
|
||||
Log files
|
||||
Log files
|
||||
DOS names (8+3)
|
||||
@@ -508,6 +518,12 @@ Identity
|
||||
Identity
|
||||
HTML footer
|
||||
HTML footer
|
||||
Languages
|
||||
Languages
|
||||
Additional HTTP Headers
|
||||
Additional HTTP Headers
|
||||
Default referer URL
|
||||
Default referer URL
|
||||
N# connections
|
||||
N# connections
|
||||
Abandon host if error
|
||||
@@ -930,3 +946,33 @@ Server terminated
|
||||
Server terminated
|
||||
A fatal error has occured during this mirror
|
||||
A fatal error has occured during this mirror
|
||||
View Documentation
|
||||
View Documentation
|
||||
Go To HTTrack Website
|
||||
Go To HTTrack Website
|
||||
Go To HTTrack Forum
|
||||
Go To HTTrack Forum
|
||||
View License
|
||||
View License
|
||||
Beware: you local browser might be unable to browse files with embedded filenames
|
||||
Beware: you local browser might be unable to browse files with embedded filenames
|
||||
Recreated HTTrack internal cached resources
|
||||
Recreated HTTrack internal cached resources
|
||||
Could not create internal cached resources
|
||||
Could not create internal cached resources
|
||||
Could not get the system external storage directory
|
||||
Could not get the system external storage directory
|
||||
Could not write to:
|
||||
Could not write to:
|
||||
Read-only media (SDCARD)
|
||||
Read-only media (SDCARD)
|
||||
No storage media (SDCARD)
|
||||
No storage media (SDCARD)
|
||||
HTTrack may not be able to download websites until this problem is fixed
|
||||
HTTrack may not be able to download websites until this problem is fixed
|
||||
HTTrack: mirror '%s' stopped!
|
||||
HTTrack: mirror '%s' stopped!
|
||||
Click on this notification to restart the interrupted mirror
|
||||
Click on this notification to restart the interrupted mirror
|
||||
HTTrack: could not save profile for '%s'!
|
||||
HTTrack: could not save profile for '%s'!
|
||||
|
||||
@@ -671,7 +671,7 @@ EI
|
||||
File
|
||||
&Tiedosto
|
||||
Options
|
||||
&Valinnat
|
||||
Valinnat
|
||||
Log
|
||||
&Loki
|
||||
Window
|
||||
@@ -681,7 +681,7 @@ O&hje
|
||||
Pause transfer
|
||||
Pysäytä siirto
|
||||
Exit
|
||||
&Poistu
|
||||
Poistu
|
||||
Modify options
|
||||
&Muokkaa valintoja
|
||||
View log
|
||||
@@ -713,9 +713,9 @@ Log
|
||||
Window
|
||||
&Ikkuna
|
||||
Help
|
||||
O&hje
|
||||
Ohje
|
||||
Exit
|
||||
&Poistu
|
||||
Poistu
|
||||
Load default options
|
||||
&Lataa vakioasetukset
|
||||
Save default options
|
||||
|
||||
@@ -420,6 +420,10 @@ Browser identity
|
||||
Identifiants du Navigateur Internet
|
||||
Comment to be placed in each HTML file
|
||||
Commentaire de page placé dans chaque fichier HTML
|
||||
Languages accepted by the browser
|
||||
Langues acceptée par le navigateur
|
||||
Additional HTTP headers to be sent in each requests
|
||||
En-têtes HTTP additionnels à envoyer dans chaque requête
|
||||
Back to starting page
|
||||
Retour à la page de démarrage
|
||||
Save current preferences as default values
|
||||
@@ -508,6 +512,10 @@ Identity
|
||||
Identification
|
||||
HTML footer
|
||||
En-tête HTML
|
||||
Languages
|
||||
Langues
|
||||
Additional HTTP Headers
|
||||
En têtes HTTP additionnels
|
||||
N# connections
|
||||
Nombre de connexions
|
||||
Abandon host if error
|
||||
@@ -721,7 +729,7 @@ Utiliser les options par d
|
||||
Save default options
|
||||
Enregistrer en tant qu'options par défaut
|
||||
Reset to default options
|
||||
Charger les options par défaut
|
||||
Initialiser les options par défaut
|
||||
Load options...
|
||||
Charger les options
|
||||
Save options as...
|
||||
@@ -743,7 +751,7 @@ Enregistrer &sous...
|
||||
&Delete...
|
||||
&Effacer...
|
||||
&Browse sites...
|
||||
&Browse sites...
|
||||
&Explorer sites...
|
||||
User-defined structure
|
||||
Définir une structure personnalisée
|
||||
%n\tName of file without file type (ex: image)\r\n%N\tName of file including file type (ex: image.gif)\r\n%t\tFile type only (ex: gif)\r\n%p\tPath [without ending /] (ex: /someimages)\r\n%h\tHost name (ex: www.someweb.com)\r\n%M\tMD5 URL (128 bits, 32 ascii bytes)\r\n%Q\tMD5 query string (128 bits, 32 ascii bytes)\r\n%q\tMD5 small query string (16 bits, 4 ascii bytes)\r\n\r\n%s?\tShort name (ex: %sN)
|
||||
@@ -930,3 +938,41 @@ Server terminated
|
||||
Serveur arrêté
|
||||
A fatal error has occured during this mirror
|
||||
Une erreur critique est intervenue durant l'aspiration
|
||||
View Documentation
|
||||
Lire la documentation
|
||||
Go To HTTrack Website
|
||||
Visiter le site de HTTrack
|
||||
Go To HTTrack Forum
|
||||
Visiter le forum de HTTrack
|
||||
View License
|
||||
Lire la license
|
||||
Beware: you local browser might be unable to browse files with embedded filenames
|
||||
Attention: il se pourrait que votre navigateur soit incapable de lire les fichiers contenant des espaces
|
||||
Recreated HTTrack internal cached resources
|
||||
Cache des ressources interne recréé
|
||||
Could not create internal cached resources
|
||||
Impossible de créer le cache des ressources interne
|
||||
Could not get the system external storage directory
|
||||
Impossible de localuser le système de stockage externe
|
||||
Could not write to:
|
||||
Impossible d'écrire dans:
|
||||
Read-only media (SDCARD)
|
||||
Média en lecture seule (SDCARD)
|
||||
No storage media (SDCARD)
|
||||
Pas de média (SDCARD)
|
||||
HTTrack may not be able to download websites until this problem is fixed
|
||||
Il se peut que HTTrack soit incapable de télécharger des sites tant que ce problème n'est pas réglé
|
||||
HTTrack: mirror '%s' stopped!
|
||||
HTTrack: miroir '%s' stoppé!
|
||||
Click on this notification to restart the interrupted mirror
|
||||
Cliquez sur cette notification pour redémarrer la copie interrompue
|
||||
HTTrack: could not save profile for '%s'!
|
||||
HTTrack: impossible de sauver le profil pour '%s'
|
||||
Build a complete RFC822 mail (MHT/EML) archive of the mirror
|
||||
Construire une archive email complète (MHT/EML) au format RFC822
|
||||
HTTP referer to be sent for initial URLs
|
||||
Champ HTTP referer a envoyer pour les URL initiales
|
||||
Build a mail archive
|
||||
Construire une archive mail
|
||||
Default referer URL
|
||||
Champ referer par défaut
|
||||
|
||||
@@ -3,7 +3,7 @@ Japanese
|
||||
LANGUAGE_FILE
|
||||
Japanese
|
||||
LANGUAGE_ISO
|
||||
jp
|
||||
ja
|
||||
LANGUAGE_AUTHOR
|
||||
TAPKAL\r\n
|
||||
LANGUAGE_CHARSET
|
||||
|
||||
@@ -3,7 +3,7 @@ Portugu
|
||||
LANGUAGE_FILE
|
||||
Portugues-Brasil
|
||||
LANGUAGE_ISO
|
||||
pt
|
||||
pt_BR
|
||||
LANGUAGE_AUTHOR
|
||||
Paulo Neto (layoutbr at lexxa.com.br) \r\n
|
||||
LANGUAGE_CHARSET
|
||||
|
||||
108
lang/Russian.txt
108
lang/Russian.txt
@@ -11,7 +11,7 @@ windows-1251
|
||||
LANGUAGE_WINDOWSID
|
||||
Russian
|
||||
OK
|
||||
LANGUAGE_WINDOWSID
|
||||
OK
|
||||
Cancel
|
||||
Îòìåíà
|
||||
Exit
|
||||
@@ -89,7 +89,7 @@ cgi\r\n
|
||||
cgi-bin\r\nWill find links with folder name matching whole 'cgi-bin' string (but not cgi-bin-2, for example)
|
||||
cgi-bin\r\nÎòëîâèò àäðåñà, ñîäåðæàùèå êàòàëîã 'cgi-bin' (íî íå cgi-bin-2, íàïðèìåð)
|
||||
someweb.com\r\nWill find links with matching sub-string such as www.someweb.com, private.someweb.com etc.
|
||||
someweb.com\r\nÎòëîâèò òàêèå ëèíêè, êàê www.someweb.com, private.someweb.com è ò.ï..
|
||||
someweb.com\r\nÎòëîâèò òàêèå ëèíêè, êàê www.someweb.com, private.someweb.com è ò.ï.
|
||||
someweb\r\nWill find links with matching folder sub-string such as www.someweb.com, www.someweb.edu, private.someweb.otherweb.com etc.
|
||||
someweb\r\nÎòëîâèò àäðåñà òèïà www.someweb.com, www.someweb.edu, private.someweb.otherweb.com è ò.ä.\r\n
|
||||
www.someweb.com\r\nWill find links matching whole 'www.someweb.com' sub-string (but not links such as private.someweb.com/..)
|
||||
@@ -155,7 +155,7 @@ Unable to initialize the OLE system
|
||||
WinHTTrack could not find any interrupted download file cache in the specified folder!
|
||||
 óêàçàííîì êàòàëîãå WinHTTrack íå ìîæåò íàéòè íè îäíîãî êýøà ïðåðâàííîé çàêà÷êè!
|
||||
Could not connect to provider
|
||||
Íå âîçìîæíî ñîåäèíèòüñÿ ñ ïðîâàéäåðîì
|
||||
Íåâîçìîæíî ñîåäèíèòüñÿ ñ ïðîâàéäåðîì
|
||||
receive
|
||||
ïîëó÷åíèå
|
||||
request
|
||||
@@ -169,7 +169,7 @@ ready
|
||||
error
|
||||
îøèáêà
|
||||
Receiving files..
|
||||
Ïîëó÷àåì ôàéëû
|
||||
Ïîëó÷àåì ôàéëû..
|
||||
Parsing HTML file..
|
||||
Ðàçáîð HTML ôàéëà...
|
||||
Purging files..
|
||||
@@ -179,13 +179,13 @@ Loading cache in progress..
|
||||
Parsing HTML file (testing links)..
|
||||
Àíàëèçèðóåì HTML ôàéë (ïðîâåðÿåì ëèíêè)...
|
||||
Pause - Toggle [Mirror]/[Pause download] to resume operation
|
||||
Îñòàíîâëåíî (äëÿ ïðîäîëæåíèÿ âûáåðåòå [Çåðêàëî]/[Ïðèîñòàíîâèòü çàêà÷êó] )
|
||||
Îñòàíîâëåíî (äëÿ ïðîäîëæåíèÿ âûáåðèòå [Çåðêàëî]/[Ïðèîñòàíîâèòü çàêà÷êó])
|
||||
Finishing pending transfers - Select [Cancel] to stop now!
|
||||
Çàâåðøàþòñÿ îòëîæåííûå çàêà÷êè - ÷òîáû ïðåðâàòü, íàæìèòå Cancel!
|
||||
scanning
|
||||
ñêàíèðóåì
|
||||
Waiting for scheduled time..
|
||||
Îæèäàåì çàäàííîå âðåìÿ íà÷àëà
|
||||
Îæèäàåì çàäàííîå âðåìÿ íà÷àëà..
|
||||
Connecting to provider
|
||||
Ñîåäèíÿåìñÿ ñ ïðîâàéäåðîì
|
||||
[%d seconds] to go before start of operation
|
||||
@@ -197,43 +197,43 @@ Site mirroring finished!
|
||||
A problem occured during the mirroring operation\n
|
||||
 ïðîöåññå çàêà÷êè ïðîèçîøëà îøèáêà\n
|
||||
\nDuring:\n
|
||||
 òå÷åíèè:\n
|
||||
 òå÷åíèå:\n
|
||||
\nSee the log file if necessary.\n\nClick FINISH to quit WinHTTrack Website Copier.\n\nThanks for using WinHTTrack!
|
||||
 ñëó÷àå íåîáõîäèìîñòè, ñìîòðè ëîã ôàéë.\n\nÄëÿ âûõîäà èç WinHTTrack íàæìèòå êíîïêó OK.\n\nÑïàñèáî çà èñïîëüçîâàíèå WinHTTrack!
|
||||
Mirroring operation complete.\nClick Exit to quit WinHTTrack.\nSee log file(s) if necessary to ensure that everything is OK.\n\nThanks for using WinHTTrack!
|
||||
Ñîçäàíèå çåðêàëà çàâåðøåíî.\nÄëÿ âûõîäà èç ïðîãðàììû íàæìèòå êíîïêó OK.\nÄëÿ ïðîâåðêè óñïåøíîñòè çàêà÷êè ïîñìîòðèòå ëîã ôàéë(û).\n\nÑïàñèáî çà èñïîëüçîâàíèå WinHTTrack!
|
||||
* * MIRROR ABORTED! * *\r\nThe current temporary cache is required for any update operation and only contains data downloaded during the present aborted session.\r\nThe former cache might contain more complete information; if you do not want to lose that information, you have to restore it and delete the current cache.\r\n[Note: This can easily be done here by erasing the hts-cache/new.* files]\r\n\r\nDo you think the former cache might contain more complete information, and do you want to restore it?
|
||||
* * ÇÀÊÀ×ÊÀ ÏÐÅÐÂÀÍÀ! * *\r\nÂðåìåííûé êýø, ñîçäàííûé âî âðåìÿ òåêóùåé ñåññèé, ñîäåðæèò äàííûå, çàãðóæåííûå òîëüêî âî âðåìÿ äàííîé ñåññèè è ïîòðåáóåòñÿ òîëüêî â ñëó÷àå âîçîáíîâëåíèÿ çàêà÷êè.\r\nÎäíàêî, ïðåäûäóùèé êýø ìîæåò ñîäåðæàòü áîëåå ïîëíóþ èíôîðìàöèþ. Åñëè âû íå õîòèòå ïîòåðÿòü ýòè äàííûå, âàì íóæíî óäàëèòü òåêóùèé êýø è âîçîáíîâèòü ïðåäûäóùèé.\r\n(Ýòî ìîæíî ëåãêî ñäåëàòü ïðÿìî çäåñü, óäàëèâ ôàéëû hts-cache/new.]\r\n\r\nÑ÷èòàåò-ëè âû, ÷òî ïðåäûäóùèé êýø ìîæåò ñîäåðæàòü áîëåå ïîëíóþ èíôîðìàöèþ, è õîòèòå ëè âû âîññòàíîâèòü åãî?
|
||||
* * ÇÀÊÀ×ÊÀ ÏÐÅÐÂÀÍÀ! * *\r\nÂðåìåííûé êýø, ñîçäàííûé âî âðåìÿ òåêóùåé ñåññèé, ñîäåðæèò äàííûå, çàãðóæåííûå òîëüêî âî âðåìÿ äàííîé ñåññèè è ïîòðåáóåòñÿ òîëüêî â ñëó÷àå âîçîáíîâëåíèÿ çàêà÷êè.\r\nÎäíàêî, ïðåäûäóùèé êýø ìîæåò ñîäåðæàòü áîëåå ïîëíóþ èíôîðìàöèþ. Åñëè âû íå õîòèòå ïîòåðÿòü ýòè äàííûå, âàì íóæíî óäàëèòü òåêóùèé êýø è âîçîáíîâèòü ïðåäûäóùèé.\r\n(Ýòî ìîæíî ëåãêî ñäåëàòü ïðÿìî çäåñü, óäàëèâ ôàéëû hts-cache/new.]\r\n\r\nÑ÷èòàåòå ëè âû, ÷òî ïðåäûäóùèé êýø ìîæåò ñîäåðæàòü áîëåå ïîëíóþ èíôîðìàöèþ, è õîòèòå ëè âû âîññòàíîâèòü åãî?
|
||||
* * MIRROR ERROR! * *\r\nHTTrack has detected that the current mirror is empty. If it was an update, the previous mirror has been restored.\r\nReason: the first page(s) either could not be found, or a connection problem occured.\r\n=> Ensure that the website still exists, and/or check your proxy settings! <=
|
||||
* * ÎØÈÁÊÀ! * *\r\nÒåêóùåå çåðêàëî - ïóñòî. Åñëè ýòî áûëî îáíîâëåíèå, ïðåäûäóùàÿ âåðñèÿ çåðêàëà âîññòàíîâëåíà.\r\nÏðè÷èíà: ïåðâàÿ ñòðàíèöà(û) èëè íå íàéäåíà, èëè áûëè ïðîáëåìû ñ ñîåäèíåíèåì.\r\n=> Óáåäèòåñü, ÷òî âåáñàéò âñå-åùå ñóùåñòâóåò, è/èëè ïðîâåðüòå óñòàíîâêè ïðîêñè-ñåðâåðà! <=
|
||||
* * ÎØÈÁÊÀ! * *\r\nÒåêóùåå çåðêàëî - ïóñòî. Åñëè ýòî áûëî îáíîâëåíèå, ïðåäûäóùàÿ âåðñèÿ çåðêàëà âîññòàíîâëåíà.\r\nÏðè÷èíà: ïåðâàÿ ñòðàíèöà(û) èëè íå íàéäåíà, èëè áûëè ïðîáëåìû ñ ñîåäèíåíèåì.\r\n=> Óáåäèòåñü, ÷òî âåáñàéò âñå åùå ñóùåñòâóåò, è/èëè ïðîâåðüòå óñòàíîâêè ïðîêñè-ñåðâåðà! <=
|
||||
\n\nTip: Click [View log file] to see warning or error messages
|
||||
\nÏîäñêàçêà:Äëÿ ïðîñìîòðà ñîîáùåíèé îá îøèáêàõ è ïðåäóïðåæäåíèé íàæìèòå [Ïðîñìîòð ëîã ôàéëà]
|
||||
\nÏîäñêàçêà: Äëÿ ïðîñìîòðà ñîîáùåíèé îá îøèáêàõ è ïðåäóïðåæäåíèé íàæìèòå [Ïðîñìîòð ëîã ôàéëà]
|
||||
Error deleting a hts-cache/new.* file, please do it manually
|
||||
Îøèáêà óäàëåíèÿ ôàéëà hts-cache/new.* , ïîæàëóéñòà, óäàëèòå åãî ðó÷êàìè.\r\n
|
||||
Îøèáêà óäàëåíèÿ ôàéëà hts-cache/new.* , ïîæàëóéñòà, óäàëèòå åãî âðó÷íóþ.\r\n
|
||||
Do you really want to quit WinHTTrack Website Copier?
|
||||
Âû äåéñòâèòåëüíî õîòèòå âûéòè èç WinHTTrack?
|
||||
- Mirroring Mode -\n\nEnter address(es) in URL box
|
||||
- Ìîäà çåðêàëèçàöèè -\n\nÂâåäèòå àäðåñ(à) â ïîëå URL.
|
||||
- Ðåæèì çåðêàëèðîâàíèÿ -\n\nÂâåäèòå àäðåñ(à) â ïîëå URL.
|
||||
- Interactive Wizard Mode (questions) -\n\nEnter address(es) in URL box
|
||||
- Èíòåðàêòèâíàÿ ìîäà - Ìàñòåð ñîçäàíèÿ çåðêàëà (áóäóò çàäàíû âîïðîñû) -\n\nÂâåäèòå àäðåñ(à) â ïîëå URL.
|
||||
- Èíòåðàêòèâíûé ðåæèì - Ìàñòåð ñîçäàíèÿ çåðêàëà (áóäóò çàäàíû âîïðîñû) -\n\nÂâåäèòå àäðåñ(à) â ïîëå URL.
|
||||
- File Download Mode -\n\nEnter file address(es) in URL box
|
||||
- Ìîäà çàêà÷êè îòäåëüíûõ ôàéëîâ -\n\nÂâåäèòå àäðåñ(à) ôàéëîâ â ïîëå URL.
|
||||
- Ðåæèì çàêà÷êè îòäåëüíûõ ôàéëîâ -\n\nÂâåäèòå àäðåñ(à) ôàéëîâ â ïîëå URL.
|
||||
- Link Testing Mode -\n\nEnter Web address(es) with links to test in URL box
|
||||
- Ìîäà òåñòèðîâàíèÿ ëèíêîâ -\n\nÂâåäèòå àäðåñ(à) ñòðàíèö, ñîäåðæàùèõ URL'û, êîòîðûå âû õîòèòå ïðîòåñòèðîâàòü.
|
||||
- Ðåæèì òåñòèðîâàíèÿ ëèíêîâ -\n\nÂâåäèòå àäðåñ(à) ñòðàíèö, ñîäåðæàùèõ URL'û, êîòîðûå âû õîòèòå ïðîòåñòèðîâàòü.
|
||||
- Update Mode -\n\nVerify address(es) in URL box, check parameters if necessary then click on 'NEXT' button
|
||||
- Ìîäà îáíîâëåíèÿ -\n\nÏðîâåðüòå àäðåñ(à) â ïîëå URL, çàòåì íàæìèòå êíîïêó 'ÄÀËÅÅ' è ïðîâåðüòå ïàðàìåòðû.
|
||||
- Ðåæèì îáíîâëåíèÿ -\n\nÏðîâåðüòå àäðåñ(à) â ïîëå URL, çàòåì íàæìèòå êíîïêó 'ÄÀËÅÅ' è ïðîâåðüòå ïàðàìåòðû.
|
||||
- Resume Mode (Interrupted Operation) -\n\nVerify address(es) in URL box, check parameters if necessary then click on 'NEXT' button
|
||||
- Ìîäà ïðîäîëæåíèÿ ðàíåå ïðåðâàííîãî ñîçäàíèÿ çåðêàëà -\n\nÏðîâåðüòå àäðåñ(à) â ïîëå URL, çàòåì íàæìèòå êíîïêó 'ÄÀËÅÅ' è ïðîâåðüòå ïàðàìåòðû.
|
||||
- Ðåæèì ïðîäîëæåíèÿ ðàíåå ïðåðâàííîãî ñîçäàíèÿ çåðêàëà -\n\nÏðîâåðüòå àäðåñ(à) â ïîëå URL, çàòåì íàæìèòå êíîïêó 'ÄÀËÅÅ' è ïðîâåðüòå ïàðàìåòðû.
|
||||
Log files Path
|
||||
Ïóòü ê ëîã ôàéëàì
|
||||
Path
|
||||
Ïóòü
|
||||
- Links List Mode -\n\nUse URL box to enter address(es) of page(s) containing links to mirror
|
||||
Ìîäà ñîçäàíèÿ çåðêàë èç ñïèñêà-\n\n ïîëå URL çàïîëíèòå àäðåñà ñòðàíèö, ñîäåðæàùèõ URL'û, êîòîðûå âû õîòèòå çåðêàëèçîâàòü.
|
||||
Ðåæèì ñîçäàíèÿ çåðêàë èç ñïèñêà-\n\n ïîëå URL ââåäèòå àäðåñ(à) ñòðàíèö(û) ñ ëèíêàìè äëÿ ñîçäàíèÿ çåðêàëà.
|
||||
New project / Import?
|
||||
Íîâûé ïðîåêò / èìïîðòèðîâàòü?
|
||||
Choose criterion
|
||||
Âûáåðåòå äåéñòâèå
|
||||
Âûáåðèòå äåéñòâèå
|
||||
Maximum link scanning depth
|
||||
Ìàêñ.ãëóáèíà ñêàíèðîâàíèÿ
|
||||
Enter address(es) here
|
||||
@@ -251,11 +251,11 @@ Use standard HTTP proxy as FTP proxy
|
||||
Path
|
||||
Ïóòü
|
||||
Select Path
|
||||
Âûáåðåòå ïóòü
|
||||
Âûáåðèòå ïóòü
|
||||
Path
|
||||
Ïóòü
|
||||
Select Path
|
||||
Âûáåðåòå ïóòü
|
||||
Âûáåðèòå ïóòü
|
||||
Quit WinHTTrack Website Copier
|
||||
Âûéòè èç WinHTTrack Website Copier
|
||||
About WinHTTrack
|
||||
@@ -303,7 +303,7 @@ Define..
|
||||
Set options..
|
||||
Çàäàòü ïàðàìåòðû...
|
||||
Preferences and mirror options:
|
||||
Íàñòðîéêè ïàðàìåòðîâ çàêà÷êè::
|
||||
Íàñòðîéêè ïàðàìåòðîâ çàêà÷êè:
|
||||
Project name
|
||||
Íàçâàíèå ïðîåêòà
|
||||
Add a URL...
|
||||
@@ -369,7 +369,7 @@ Do not update zero size or user-erased files
|
||||
Create a Start Page
|
||||
Ñîçäàòü íà÷àëüíóþ ñòðàíèöó
|
||||
Create a word database of all html pages
|
||||
óÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ ÓÌÏ×, ÓÏÄÅÒÖÁÝÉÈÓÑ × html-ÓÔÒÁÎÉÃÁÈ
|
||||
Ñîçäàòü áàçó äàííûõ ñëîâ, ñîäåðæàùèõñÿ â html-ñòðàíèöàõ
|
||||
Create error logging and report files
|
||||
Ñîçäàòü ëîã ôàéëû ñ èíôîðìàöèåé î ðàáîòå è îøèáêàõ
|
||||
Generate DOS 8-3 filenames ONLY
|
||||
@@ -379,41 +379,41 @@ Generate ISO9660 filenames ONLY for CDROM medias
|
||||
Do not create HTML error pages
|
||||
Íå çàïèñûâàòü ôàéëû html-îøèáîê
|
||||
Select file types to be saved to disk
|
||||
Âûáåðåòå òèïû ôàéëîâ, ñîõðàíÿåìûõ íà äèñêå
|
||||
Âûáåðèòå òèïû ôàéëîâ, ñîõðàíÿåìûõ íà äèñêå
|
||||
Select parsing direction
|
||||
Âûáåðåòå íàïðàâëåíèå ïðîäâèæåíèÿ ïî ñàéòó
|
||||
Âûáåðèòå íàïðàâëåíèå ïðîäâèæåíèÿ ïî ñàéòó
|
||||
Select global parsing direction
|
||||
Âûáåðåòå ãëîáàëüíîå íàïðàâëåíèå ïðîäâèæåíèÿ ïî ñàéòó
|
||||
Âûáåðèòå ãëîáàëüíîå íàïðàâëåíèå ïðîäâèæåíèÿ ïî ñàéòó
|
||||
Setup URL rewriting rules for internal links (downloaded ones) and external links (not downloaded ones)
|
||||
Óñòàíîâèòü ïðàâèëà ïåðåèìåíîâàíèÿ ëèíêîâ êàê äëÿ âíóòðåííèõ (çàêà÷èâàåìûõ) òàê è äëÿ âíåøíèõ (íå çàãðóæàåìûõ) àäðåñîâ
|
||||
Max simultaneous connections
|
||||
Maêñèìàëüíîå ÷èñëî ñîåäèíåíèé
|
||||
Ìàêñèìàëüíîå ÷èñëî ñîåäèíåíèé
|
||||
File timeout
|
||||
Maêñèìàëüíîå âðåìÿ íå àêòèâíîñòè çàêà÷êè
|
||||
Ìàêñèìàëüíîå âðåìÿ íå àêòèâíîñòè çàêà÷êè
|
||||
Cancel all links from host if timeout occurs
|
||||
 ñëó÷àå ïðåâûøåíèÿ âðåìåíè îæèäàíèÿ îòìåíèòü âñå ëèíêè ñ äàííîãî õîñòà
|
||||
Minimum admissible transfer rate
|
||||
Mèíèìàëüíî äîïóñòèìàÿ ñêîðîñòü çàêà÷êè
|
||||
Ìèíèìàëüíî äîïóñòèìàÿ ñêîðîñòü çàêà÷êè
|
||||
Cancel all links from host if too slow
|
||||
 ñëó÷àå, åñëè õîñò ñëèøêîì ìåäëåííûé, îòìåíèòü âñå ëèíêè ñ äàííîãî õîñòà
|
||||
Maximum number of retries on non-fatal errors
|
||||
Maêñèìàëüíîå ÷èñëî ïîâòîðíûõ ïîïûòîê, â ñëó÷àå íå ôàòàëüíûõ îøèáîê.
|
||||
Ìàêñèìàëüíîå ÷èñëî ïîâòîðíûõ ïîïûòîê, â ñëó÷àå íå ôàòàëüíûõ îøèáîê.
|
||||
Maximum size for any single HTML file
|
||||
Maêñèìàëüíûé ðàçìåð ëþáîãî html-ôàéëà
|
||||
Ìàêñèìàëüíûé ðàçìåð ëþáîãî html-ôàéëà
|
||||
Maximum size for any single non-HTML file
|
||||
Maêñèìàëüíûé ðàçìåð ëþáîãî íå HTML-ôàéëà
|
||||
Ìàêñèìàëüíûé ðàçìåð ëþáîãî íå HTML-ôàéëà
|
||||
Maximum amount of bytes to retrieve from the Web
|
||||
Maêñèìàëüíîå êîëè÷åñòâî áàéò, äîïóñòèìûõ äëÿ çàêà÷êè
|
||||
Ìàêñèìàëüíîå êîëè÷åñòâî áàéò, äîïóñòèìûõ äëÿ çàêà÷êè
|
||||
Make a pause after downloading this amount of bytes
|
||||
Ïîñëå çàãðóçêè óêàçàííîãî ÷èñëà áàéòîâ, ñäåëàòü ïàóçó
|
||||
Maximum duration time for the mirroring operation
|
||||
Maêñ. ïðîäîëæèòåëüíîñòü çåðêàëèçàöèè
|
||||
Ìàêñ. ïðîäîëæèòåëüíîñòü çåðêàëèçàöèè
|
||||
Maximum transfer rate
|
||||
Ìàêñ. ñêîðîñòü çàêà÷êè
|
||||
Maximum connections/seconds (avoid server overload)
|
||||
Ìàêñ. êîëè÷åñòâî ñîåäèíåíèé â ñåêóíäó (íå ïåðåãðóæàòü ñåðâåð)
|
||||
Maximum number of links that can be tested (not saved!)
|
||||
íÁËÓÉÍÁÌØÎÏÅ ÞÉÓÌÏ ÔÅÓÔÉÒÕÅÍÙÈ ÌÉÎËÏ× (ÔÅÓÔÉÒÕÅÍÙÈ, Á ÎÅ ÓÏÈÒÁÎÑÅÍÙÈ!)
|
||||
Ìàêñèìàëüíîå ÷èñëî òåñòèðóåìûõ ëèíêîâ (òåñòèðóåìûõ, à íå ñîõðàíÿåìûõ!)
|
||||
Browser identity
|
||||
Èäåíòèôèêàöèÿ áðîóçåðà (ñòðîêà User-Agent)
|
||||
Comment to be placed in each HTML file
|
||||
@@ -477,7 +477,7 @@ Do not re-download locally erased files
|
||||
Make an index
|
||||
Ñîçäàòü èíäåêñ
|
||||
Make a word database
|
||||
óÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ ÓÌÏ×
|
||||
Ñîçäàòü áàçó äàííûõ ñëîâ
|
||||
Log files
|
||||
Log ôàéëû
|
||||
DOS names (8+3)
|
||||
@@ -489,13 +489,13 @@ No error pages
|
||||
Primary Scan Rule
|
||||
Îñíîâíîé ôèëüòð
|
||||
Travel mode
|
||||
Ìîäà ñêàíèðîâàíèÿ
|
||||
Ðåæèì ñêàíèðîâàíèÿ
|
||||
Global travel mode
|
||||
Ãëîáàëüíàÿ ìîäà ñêàíèðîâàíèÿ
|
||||
Ðåæèì ãëîáàëüíîãî ñêàíèðîâàíèÿ
|
||||
These options should be modified only exceptionally
|
||||
Êàê ïðàâèëî, ýòè íàñòðîéêè èçìåíÿòü íå ñëåäóåò
|
||||
Activate Debugging Mode (winhttrack.log)
|
||||
Âêëþ÷èòü ìîäó îòëàäêè (winhttrack.log)
|
||||
Âêëþ÷èòü ðåæèì îòëàäêè (winhttrack.log)
|
||||
Rewrite links: internal / external
|
||||
Ïåðåèìåíîâàòü ëèíêè: âíóòðåííèå/âíåøíèå
|
||||
Flow control
|
||||
@@ -511,7 +511,7 @@ N#
|
||||
Abandon host if error
|
||||
Ïðåêðàòèòü çàêà÷êó ñ õîñòà, â ñëó÷àå îøèáêè
|
||||
Minimum transfer rate (B/s)
|
||||
Mèíèìàëüíàÿ ñêîðîñòü çàêà÷êè (B/s)
|
||||
Ìèíèìàëüíàÿ ñêîðîñòü çàêà÷êè (B/s)
|
||||
Abandon host if too slow
|
||||
Ïðåêðàòèòü çàêà÷êó ñ õîñòà, åñëè îíà ñëèøêîì ìåäëåííàÿ
|
||||
Configure
|
||||
@@ -557,15 +557,15 @@ Store ALL files in cache
|
||||
Tolerant requests (for servers)
|
||||
Òîëåðàíòíûå çàïðîñû (ê ñåðâåðàì)
|
||||
Update hack (limit re-transfers)
|
||||
Update hack (îãðàíè÷åíèå ïîâòîðíûõ çàêà÷åê)
|
||||
Update hack (îãðàíè÷åíèå ïîâòîðíûõ çàêà÷åê)
|
||||
URL hacks (join similar URLs)
|
||||
Õàê URL (îáúåäåíèòü àíàëîãè÷íûå URLs)
|
||||
Õàê URL (îáúåäåíèòü àíàëîãè÷íûå URLs)
|
||||
Force old HTTP/1.0 requests (no 1.1)
|
||||
Èñïîëüçîâàòü ñòàðûé ïðîòîêîë HTTP/1.0 (íå 1.1)
|
||||
Max connections / seconds
|
||||
Ìàêñ. ÷èñëî ñîåäèíåíèé/ñåê.
|
||||
Maximum number of links
|
||||
íÁËÓÉÍÁÌØÎÏÅ ÞÍÓÌÏ ÌÉÎËÏ×
|
||||
Ìàêñèìàëüíîå ÷èñëî ëèíêîâ
|
||||
Pause after downloading..
|
||||
Ïàóçà ïîñëå çàãðóçêè...
|
||||
Hide passwords
|
||||
@@ -613,7 +613,7 @@ No saved password for this connection!
|
||||
Can not get remote connection settings
|
||||
Íå ìîãó ïîëó÷èòü óñòàíîâêè óäàëåííîãî ñîåäèíåíèÿ
|
||||
Select a connection provider
|
||||
Âûáåðåòå ïðîâàéäåðà, ê êîòîðîìó óñòàíîâèòü ñîåäèíåíèå
|
||||
Âûáåðèòå ïðîâàéäåðà, ê êîòîðîìó óñòàíîâèòü ñîåäèíåíèå
|
||||
Start
|
||||
Íà÷àòü
|
||||
Please adjust connection parameters if necessary,\nthen press FINISH to launch the mirroring operation.
|
||||
@@ -645,9 +645,9 @@ Wizard query
|
||||
Your answer:
|
||||
Âàø îòâåò:
|
||||
Link detected..
|
||||
Íàéäåí ëèíê
|
||||
Íàéäåí ëèíê..
|
||||
Choose a rule
|
||||
Âûáåðåòå ïðàâèëî
|
||||
Âûáåðèòå ïðàâèëî
|
||||
Ignore this link
|
||||
Èãíîðèðîâàòü ýòîò ëèíê
|
||||
Ignore directory
|
||||
@@ -773,7 +773,7 @@ Enter project name here
|
||||
Enter saving path here
|
||||
Óêàæèòå êàòàëîã äëÿ ñîõðàíåíèÿ ïðîåêòà
|
||||
Select existing project to update
|
||||
Äëÿ îáíîâëåíèÿ ïðîåêòà, âûáåðåòå åãî èç ñïèñêà
|
||||
Äëÿ îáíîâëåíèÿ ïðîåêòà, âûáåðèòå åãî èç ñïèñêà
|
||||
Click here to select path
|
||||
Âûáðàòü êàòàëîã ïðîåêòà
|
||||
Select or create a new category name, to sort your mirrors in categories
|
||||
@@ -793,7 +793,7 @@ Project category:
|
||||
C:\\My Web Sites
|
||||
C:\\Ìîè Web Ñàéòû
|
||||
Type a new project name, \r\nor select existing project to update/resume
|
||||
Çàäàéòå íàçâàíèå íîâîãî ïðîåêòà, \r\nèëè âûáåðåòå ñóùåñòâóþùèé ïðîåêò äëÿ åãî àêòóàëèçàöèè/ïðîäîëæåíèÿ
|
||||
Çàäàéòå íàçâàíèå íîâîãî ïðîåêòà, \r\nèëè âûáåðèòå ñóùåñòâóþùèé ïðîåêò äëÿ åãî àêòóàëèçàöèè/ïðîäîëæåíèÿ
|
||||
New project
|
||||
Íîâûé ïðîåêò
|
||||
Insert URL
|
||||
@@ -835,7 +835,7 @@ Cancel
|
||||
Unable to find Help files!
|
||||
Íå íàéäåíû ôàéëû ïîìîùè!
|
||||
Unable to save parameters!
|
||||
Íå âîçìîæíî ñîõðàíèòü ïàðàìåòðû!
|
||||
Íåâîçìîæíî ñîõðàíèòü ïàðàìåòðû!
|
||||
Please drag only one folder at a time
|
||||
Ïîæàëóéñòà, ïåðåòàñêèâàéòå òîëüêî îäíó ïàïêó
|
||||
Please drag only folders, not files
|
||||
@@ -851,13 +851,13 @@ Do you really want to use a user-defined structure?
|
||||
Too manu URLs, cannot handle so many links!!
|
||||
Ñëèøêîì ìíîãî URL'îâ, íå ìîãó îáðàáîòàòü òàêîå êîëè÷åñòâî ëèíêîâ!
|
||||
Not enough memory, fatal internal error..
|
||||
Íå äîñòàòî÷íî ïàìÿòè, ôàòàëüíàÿ âíóòðåííÿÿ îøèáêà...
|
||||
Íåäîñòàòî÷íî ïàìÿòè, ôàòàëüíàÿ âíóòðåííÿÿ îøèáêà...
|
||||
Unknown operation!
|
||||
Íåèçâåñòíàÿ îïåðàöèÿ
|
||||
Add this URL?\r\n
|
||||
Äîáàâèòü ýòîò URL?\r\n
|
||||
Warning: main process is still not responding, cannot add URL(s)..
|
||||
Âíèìàíèå: ïðîãðàììà íå îòâå÷àåò íà çàïðîñû, íå âîçìîæíî äîáàâèòü URL'û...
|
||||
Âíèìàíèå: ïðîãðàììà íå îòâå÷àåò íà çàïðîñû, íåâîçìîæíî äîáàâèòü URL'û...
|
||||
Type/MIME associations
|
||||
Ñîîòâåòñâèå òèïó ôàéëîâ (Type/MIME)
|
||||
File types:
|
||||
@@ -891,7 +891,7 @@ Just scan\nStore html files\nStore non html files\nStore all files (default)\nSt
|
||||
Stay in the same directory\nCan go down (default)\nCan go up\nCan both go up & down
|
||||
Îñòàâàòüñÿ â òîéæå äèðåêòîðèè\nÌîæíî äâèãàòüñÿ âíèç (ïî óìîë÷àíèþ)\nÌîæíî äâèãàòüñÿ ââåðõ\nÌîæíî äâèãàòüñÿ ââåðõ è âíèç
|
||||
Stay on the same address (default)\nStay on the same domain\nStay on the same top level domain\nGo everywhere on the web
|
||||
Îñòàâàòüñÿ íà òîì æå àäðåñå (ïî óìîë÷àíèþt)\nÎñòàâàòüñÿ íà òîì æå äîìåíå\nÎñòàâàòüñÿ íà òîì äå äîìåíå âåðõíåãî óðîâíÿ\nÈäòè êóäà óãîäíî
|
||||
Îñòàâàòüñÿ íà òîì æå àäðåñå (ïî óìîë÷àíèþ)\nÎñòàâàòüñÿ íà òîì æå äîìåíå\nÎñòàâàòüñÿ íà òîì æå äîìåíå âåðõíåãî óðîâíÿ\nÈäòè êóäà óãîäíî
|
||||
Never\nIf unknown (except /)\nIf unknown
|
||||
Íèêîãäà\nÅñëè íåèçâåñòíî (êðîìå /)\nÅñëè íåèçâåñòíî
|
||||
no robots.txt rules\nrobots.txt except wizard\nfollow robots.txt rules
|
||||
@@ -901,7 +901,7 @@ normal\nextended\ndebug
|
||||
Download web site(s)\nDownload web site(s) + questions\nGet individual files\nDownload all sites in pages (multiple mirror)\nTest links in pages (bookmark test)\n* Continue interrupted download\n* Update existing download
|
||||
Çàãðóçèòü ñàéò(û)\nÇàãðóçèòü ñàéò(û) +âîïðîñû\nÇàãðóçèòü îòäåëüíûå ôàéëû\nÇàãðóçèòü âñå ñàéòû ñî ñòðàíèöû (íåñêîëüêî çåðêàë)\nÒåñòèðîâàòü ëèíêè ñî ñòðàíèöû (òåñò çàêëàäîê)\n* Ïðîäîëæèòü ïðåðâàííóþ çàãðóçêó\n* Îáíîâèòü ñóùåñòâóþùóþ çàêà÷êó
|
||||
Relative URI / Absolute URL (default)\nAbsolute URL / Absolute URL\nAbsolute URI / Absolute URL\nOriginal URL / Original URL
|
||||
Îòíîñèòåëüíûé URI / Àáñîëþòíûé URL (ïî-óìîë÷àíèþ)\nÀáñîëþòíûé URL / Àáñîëþòíûé URL\nÀáñîëþòíûé URI / Àáñîëþòíûé URL\nÏåðâîíà÷àëüíûé URL / Ïåðâîíà÷àëüíûé URL
|
||||
Îòíîñèòåëüíûé URI / Àáñîëþòíûé URL (ïî óìîë÷àíèþ)\nÀáñîëþòíûé URL / Àáñîëþòíûé URL\nÀáñîëþòíûé URI / Àáñîëþòíûé URL\nÏåðâîíà÷àëüíûé URL / Ïåðâîíà÷àëüíûé URL
|
||||
Open Source offline browser
|
||||
Open Source îôôëàéí áðàóçåð
|
||||
Website Copier/Offline Browser. Copy remote websites to your computer. Free.
|
||||
@@ -919,7 +919,7 @@ URLs
|
||||
Warning
|
||||
Ïðåäóïðåæäåíèå
|
||||
Your browser does not currently support javascript. For better results, please use a javascript-aware browser.
|
||||
Âàø áðàóçåð èëè íå ïîääåðæèâàåò javascript èëè åãî ïîääåðæêà âûêëþ÷åíà. Äëÿ ïîëó÷åíèÿ íàèëó÷øåãî ðåçóëüòàòà àêòèâèçèðóéòå ïîääåðæêó javascript.
|
||||
Âàø áðàóçåð èëè íå ïîääåðæèâàåò javascript èëè åãî ïîääåðæêà âûêëþ÷åíà. Äëÿ ïîëó÷åíèÿ íàèëó÷øåãî ðåçóëüòàòà àêòèâèçèðóéòå ïîääåðæêó javascript.
|
||||
Thank you
|
||||
Ñïàñèáî
|
||||
You can now close this window
|
||||
|
||||
@@ -3,7 +3,7 @@ Ukrainian
|
||||
LANGUAGE_FILE
|
||||
Ukrainian
|
||||
LANGUAGE_ISO
|
||||
ua
|
||||
uk
|
||||
LANGUAGE_AUTHOR
|
||||
Andrij Shevchuk (http://programy.com.ua, http://vic-info.com.ua) \r\n
|
||||
LANGUAGE_CHARSET
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "htsdefines.h"
|
||||
|
||||
/* Local definitions */
|
||||
#include "example.h"
|
||||
#include "example-main.h"
|
||||
|
||||
/*
|
||||
* Name: main
|
||||
@@ -20,7 +20,7 @@ Copyright (C) Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
|
||||
13
license.txt
13
license.txt
@@ -1,12 +1,12 @@
|
||||
HTTrack Website Copier License Agreement:
|
||||
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, as a special exception, Xavier Roche gives permission to
|
||||
link the code of this program with the openSSL library (or with
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
dnl @synopsis CHECK_ZLIB()
|
||||
dnl
|
||||
dnl This macro searches for an installed zlib library. If nothing was
|
||||
dnl specified when calling configure, it searches first in /usr/local
|
||||
dnl This macro searches for an installed zlib library. If nothing
|
||||
dnl was specified when calling configure, it searches first in /usr/local
|
||||
dnl and then in /usr. If the --with-zlib=DIR is specified, it will try
|
||||
dnl to find it in DIR/include/zlib.h and DIR/lib/libz.a. If
|
||||
dnl --without-zlib is specified, the library is not searched at all.
|
||||
dnl to find it in DIR/include/zlib.h and DIR/lib/libz.a. If --without-zlib
|
||||
dnl is specified, the library is not searched at all.
|
||||
dnl
|
||||
dnl If either the header file (zlib.h) or the library (libz) is not
|
||||
dnl found, the configuration exits on error, asking for a valid zlib
|
||||
dnl installation directory or --without-zlib.
|
||||
dnl found, the configuration exits on error, asking for a valid
|
||||
dnl zlib installation directory or --without-zlib.
|
||||
dnl
|
||||
dnl The macro defines the symbol HAVE_LIBZ if the library is found. You
|
||||
dnl should use autoheader to include a definition for this symbol in a
|
||||
dnl config.h file. Sample usage in a C/C++ source is as follows:
|
||||
dnl The macro defines the symbol HAVE_LIBZ if the library is found. You should
|
||||
dnl use autoheader to include a definition for this symbol in a config.h
|
||||
dnl file. Sample usage in a C/C++ source is as follows:
|
||||
dnl
|
||||
dnl #ifdef HAVE_LIBZ
|
||||
dnl #include <zlib.h>
|
||||
dnl #endif /* HAVE_LIBZ */
|
||||
dnl
|
||||
dnl @category InstalledPackages
|
||||
dnl @version $Id$
|
||||
dnl @author Loic Dachary <loic@senga.org>
|
||||
dnl @version 2004-09-20
|
||||
dnl @license GPLWithACException
|
||||
dnl
|
||||
|
||||
AC_DEFUN([CHECK_ZLIB],
|
||||
#
|
||||
@@ -34,21 +33,17 @@ AC_ARG_WITH(zlib,
|
||||
--without-zlib to disable zlib usage completely],
|
||||
[if test "$withval" != no ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
if test -d "$withval"
|
||||
then
|
||||
ZLIB_HOME="$withval"
|
||||
else
|
||||
AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
|
||||
fi
|
||||
ZLIB_HOME="$withval"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi])
|
||||
|
||||
fi], [
|
||||
AC_MSG_RESULT(yes)
|
||||
ZLIB_HOME=/usr/local
|
||||
if test ! -f "${ZLIB_HOME}/include/zlib.h"
|
||||
then
|
||||
ZLIB_HOME=/usr
|
||||
fi
|
||||
])
|
||||
|
||||
#
|
||||
# Locate zlib, if wanted
|
||||
|
||||
@@ -35,12 +35,12 @@ Please reports bugs to
|
||||
.B <bugs@httrack.com>.
|
||||
Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of (web)httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2013 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -48,8 +48,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.SH AVAILABILITY
|
||||
The most recent released version of (web)httrack can be found at:
|
||||
.B http://www.httrack.com
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
.\" Process this file with
|
||||
.\" groff -man -Tascii httrack.1
|
||||
.\"
|
||||
.TH httrack 1 "May 2013" "httrack website copier"
|
||||
.TH httrack 1 "12 May 2014" "httrack website copier"
|
||||
.SH NAME
|
||||
httrack \- offline browser : copy websites to a local directory
|
||||
.SH SYNOPSIS
|
||||
.B httrack [ url ]... [ \-filter ]... [ +filter ]... [
|
||||
.B \-O, \-\-path
|
||||
] [
|
||||
.B \-%O, \-\-chroot
|
||||
] [
|
||||
.B \-w, \-\-mirror
|
||||
] [
|
||||
.B \-W, \-\-mirror\-wizard
|
||||
@@ -42,11 +40,9 @@ httrack \- offline browser : copy websites to a local directory
|
||||
] [
|
||||
.B \-GN, \-\-max\-pause[=N]
|
||||
] [
|
||||
.B \-%mN, \-\-max\-mms\-time[=N]
|
||||
] [
|
||||
.B \-cN, \-\-sockets[=N]
|
||||
] [
|
||||
.B \-TN, \-\-timeout
|
||||
.B \-TN, \-\-timeout[=N]
|
||||
] [
|
||||
.B \-RN, \-\-retries[=N]
|
||||
] [
|
||||
@@ -122,6 +118,10 @@ httrack \- offline browser : copy websites to a local directory
|
||||
] [
|
||||
.B \-%l, \-\-language
|
||||
] [
|
||||
.B \-%a, \-\-accept
|
||||
] [
|
||||
.B \-%X, \-\-headers
|
||||
] [
|
||||
.B \-C, \-\-cache[=N]
|
||||
] [
|
||||
.B \-k, \-\-store\-all\-in\-cache
|
||||
@@ -174,8 +174,6 @@ httrack \- offline browser : copy websites to a local directory
|
||||
] [
|
||||
.B \-V, \-\-userdef\-cmd
|
||||
] [
|
||||
.B \-%U, \-\-user
|
||||
] [
|
||||
.B \-%W, \-\-callback
|
||||
] [
|
||||
.B \-K, \-\-keep\-links[=N]
|
||||
@@ -214,9 +212,6 @@ mirror[,path
|
||||
cache
|
||||
and
|
||||
logfiles]) (\-\-path <param>)
|
||||
.IP \-%O
|
||||
chroot path to, must be r00t (\-%O root
|
||||
path) (\-\-chroot <param>)
|
||||
|
||||
.SS Action options:
|
||||
.IP \-w
|
||||
@@ -257,14 +252,12 @@ maximum transfer rate in bytes/seconds (1000=1KB/s max) (\-\-max\-rate[=N])
|
||||
maximum number of connections/seconds (*%c10) (\-\-connection\-per\-second[=N])
|
||||
.IP \-GN
|
||||
pause transfer if N bytes reached, and wait until lock file is deleted (\-\-max\-pause[=N])
|
||||
.IP \-%mN
|
||||
maximum mms stream download time in seconds (60=1 minute, 3600=1 hour) (\-\-max\-mms\-time[=N])
|
||||
|
||||
.SS Flow control:
|
||||
.IP \-cN
|
||||
number of multiple connections (*c8) (\-\-sockets[=N])
|
||||
.IP \-TN
|
||||
timeout, number of seconds after a non\-responding link is shutdown (\-\-timeout)
|
||||
timeout, number of seconds after a non\-responding link is shutdown (\-\-timeout[=N])
|
||||
.IP \-RN
|
||||
number of retries, in case of timeout or non\-fatal errors (*R1) (\-\-retries[=N])
|
||||
.IP \-JN
|
||||
@@ -353,6 +346,10 @@ from email address sent in HTTP headers (\-\-from <param>)
|
||||
footer string in Html code (\-%F "Mirrored [from host %s [file %s [at %s]]]" (\-\-footer <param>)
|
||||
.IP \-%l
|
||||
preffered language (\-%l "fr, en, jp, *" (\-\-language <param>)
|
||||
.IP \-%a
|
||||
accepted formats (\-%l "text/html,image/png,image/jpeg,image/gif;q=0.9,*/*;q=0.1" (\-\-accept <param>)
|
||||
.IP \-%X
|
||||
additional HTTP header line (\-%X "X\-Magic: 42" (\-\-headers <param>)
|
||||
|
||||
.SS Log, index, cache
|
||||
.IP \-C
|
||||
@@ -455,8 +452,6 @@ generate transfer ops. log every minutes (\-\-debug\-xfrstats)
|
||||
wait time (\-\-advanced\-wait)
|
||||
.IP \-#Z
|
||||
generate transfer rate statictics every minutes (\-\-debug\-ratestats)
|
||||
.IP \-#!
|
||||
execute a shell command (\-#! "echo hello") (\-\-exec <param>)
|
||||
|
||||
.SS Dangerous options: (do NOT use unless you exactly know what you are doing)
|
||||
.IP \-%!
|
||||
@@ -468,9 +463,7 @@ IT WITH EXTREME CARE
|
||||
|
||||
.SS Command\-line specific options:
|
||||
.IP \-V
|
||||
execute system command after each files ($0 is the filename: \-V "rm \$0") (\-\-userdef\-cmd <param>)
|
||||
.IP \-%U
|
||||
run the engine with another id when called as root (\-%U smith) (\-\-user <param>)
|
||||
execute system command after each files ($0 is the filename: \-V "rm \\$0") (\-\-userdef\-cmd <param>)
|
||||
.IP \-%W
|
||||
use an external library function as a wrapper (\-%W myfoo.so[,myparameters]) (\-\-callback <param>)
|
||||
|
||||
@@ -617,12 +610,12 @@ Please reports bugs to
|
||||
.B <bugs@httrack.com>.
|
||||
Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -630,8 +623,8 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
.SH AVAILABILITY
|
||||
The most recent released version of httrack can be found at:
|
||||
.B http://www.httrack.com
|
||||
|
||||
@@ -25,12 +25,12 @@ Please reports bugs to
|
||||
.B <bugs@httrack.com>.
|
||||
Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of (web)httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2013 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -38,8 +38,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.SH AVAILABILITY
|
||||
The most recent released version of (web)httrack can be found at:
|
||||
.B http://www.httrack.com
|
||||
|
||||
@@ -36,12 +36,12 @@ Please reports bugs to
|
||||
.B <bugs@httrack.com>.
|
||||
Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of (web)httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary.
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2013 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -49,8 +49,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.SH AVAILABILITY
|
||||
The most recent released version of (web)httrack can be found at:
|
||||
.B http://www.httrack.com
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#SUBDIRS = swf
|
||||
|
||||
DevIncludesdir = $(includedir)/httrack
|
||||
DevIncludes_DATA = \
|
||||
httrack-library.h \
|
||||
@@ -46,13 +44,11 @@ libhttrack_la_SOURCES = htscore.c htsparse.c htsback.c htscache.c \
|
||||
htshelp.c htslib.c htscoremain.c \
|
||||
htsname.c htsrobots.c htstools.c htswizard.c \
|
||||
htsalias.c htsthread.c htsindex.c htsbauth.c \
|
||||
htsmd5.c htszlib.c htswrap.c \
|
||||
htsmd5.c htszlib.c htswrap.c htsconcat.c \
|
||||
htsmodules.c htscharset.c punycode.c htsencoding.c \
|
||||
md5.c \
|
||||
htsmms.c \
|
||||
minizip/ioapi.c minizip/mztools.c minizip/unzip.c minizip/zip.c \
|
||||
mmsrip/error.c mmsrip/mms.c \
|
||||
hts-indextmpl.h htsalias.h htsback.h htsbase.h \
|
||||
hts-indextmpl.h htsalias.h htsback.h htsbase.h htssafe.h \
|
||||
htsbasenet.h htsbauth.h htscache.h htscatchurl.h \
|
||||
htsconfig.h htscore.h htsparse.h htscoremain.h htsdefines.h \
|
||||
htsfilters.h htsftp.h htsglobal.h htshash.h htsinthash.h \
|
||||
@@ -61,12 +57,11 @@ libhttrack_la_SOURCES = htscore.c htsparse.c htsback.c htscache.c \
|
||||
htsopt.h htsrobots.h htsthread.h \
|
||||
htstools.h htswizard.h htswrap.h htszlib.h \
|
||||
htsstrings.h httrack-library.h htscharset.h punycode.h htsencoding.h \
|
||||
htsentities.h htsentities.sh \
|
||||
md5.h \
|
||||
htsmms.h \
|
||||
minizip/crypt.h minizip/ioapi.h minizip/mztools.h minizip/unzip.h minizip/zip.h \
|
||||
mmsrip/error.h mmsrip/mms.h
|
||||
htsentities.h htsentities.sh htsbasiccharsets.sh htscodepages.h \
|
||||
md5.h murmurhash3.h \
|
||||
minizip/crypt.h minizip/ioapi.h minizip/mztools.h minizip/unzip.h minizip/zip.h
|
||||
libhttrack_la_LIBADD = $(THREADS_LIBS) $(ZLIB_LIBS) $(OPENSSL_LIBS) $(DL_LIBS) $(SOCKET_LIBS) $(ICONV_LIBS)
|
||||
libhttrack_la_CFLAGS = $(AM_CFLAGS) -DLIBHTTRACK_EXPORTS
|
||||
libhttrack_la_LDFLAGS = -version-info $(VERSION_INFO)
|
||||
|
||||
libhtsjava_la_SOURCES = htsjava.c htsjava.h
|
||||
@@ -77,13 +72,6 @@ EXTRA_DIST = httrack.h webhttrack \
|
||||
minizip/ChangeLogUnzip \
|
||||
minizip/iowin32.c \
|
||||
minizip/iowin32.h \
|
||||
mmsrip/common.h \
|
||||
mmsrip/main.c \
|
||||
mmsrip/COPYING \
|
||||
mmsrip/AUTHORS \
|
||||
mmsrip/NEWS \
|
||||
mmsrip/README \
|
||||
mmsrip/ChangeLog \
|
||||
proxy/AUTHORS \
|
||||
proxy/COPYING \
|
||||
proxy/changelog.txt \
|
||||
|
||||
369
src/Makefile.in
369
src/Makefile.in
@@ -15,8 +15,6 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#SUBDIRS = swf
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -112,17 +110,27 @@ libhtsjava_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
libhttrack_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
am_libhttrack_la_OBJECTS = htscore.lo htsparse.lo htsback.lo \
|
||||
htscache.lo htscatchurl.lo htsfilters.lo htsftp.lo htshash.lo \
|
||||
htsinthash.lo htshelp.lo htslib.lo htscoremain.lo htsname.lo \
|
||||
htsrobots.lo htstools.lo htswizard.lo htsalias.lo htsthread.lo \
|
||||
htsindex.lo htsbauth.lo htsmd5.lo htszlib.lo htswrap.lo \
|
||||
htsmodules.lo htscharset.lo punycode.lo htsencoding.lo md5.lo \
|
||||
htsmms.lo ioapi.lo mztools.lo unzip.lo zip.lo error.lo mms.lo
|
||||
am_libhttrack_la_OBJECTS = libhttrack_la-htscore.lo \
|
||||
libhttrack_la-htsparse.lo libhttrack_la-htsback.lo \
|
||||
libhttrack_la-htscache.lo libhttrack_la-htscatchurl.lo \
|
||||
libhttrack_la-htsfilters.lo libhttrack_la-htsftp.lo \
|
||||
libhttrack_la-htshash.lo libhttrack_la-htsinthash.lo \
|
||||
libhttrack_la-htshelp.lo libhttrack_la-htslib.lo \
|
||||
libhttrack_la-htscoremain.lo libhttrack_la-htsname.lo \
|
||||
libhttrack_la-htsrobots.lo libhttrack_la-htstools.lo \
|
||||
libhttrack_la-htswizard.lo libhttrack_la-htsalias.lo \
|
||||
libhttrack_la-htsthread.lo libhttrack_la-htsindex.lo \
|
||||
libhttrack_la-htsbauth.lo libhttrack_la-htsmd5.lo \
|
||||
libhttrack_la-htszlib.lo libhttrack_la-htswrap.lo \
|
||||
libhttrack_la-htsconcat.lo libhttrack_la-htsmodules.lo \
|
||||
libhttrack_la-htscharset.lo libhttrack_la-punycode.lo \
|
||||
libhttrack_la-htsencoding.lo libhttrack_la-md5.lo \
|
||||
libhttrack_la-ioapi.lo libhttrack_la-mztools.lo \
|
||||
libhttrack_la-unzip.lo libhttrack_la-zip.lo
|
||||
libhttrack_la_OBJECTS = $(am_libhttrack_la_OBJECTS)
|
||||
libhttrack_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libhttrack_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libhttrack_la_CFLAGS) \
|
||||
$(CFLAGS) $(libhttrack_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_htsserver_OBJECTS = htsserver.$(OBJEXT) htsweb.$(OBJEXT)
|
||||
htsserver_OBJECTS = $(am_htsserver_OBJECTS)
|
||||
@@ -343,13 +351,11 @@ libhttrack_la_SOURCES = htscore.c htsparse.c htsback.c htscache.c \
|
||||
htshelp.c htslib.c htscoremain.c \
|
||||
htsname.c htsrobots.c htstools.c htswizard.c \
|
||||
htsalias.c htsthread.c htsindex.c htsbauth.c \
|
||||
htsmd5.c htszlib.c htswrap.c \
|
||||
htsmd5.c htszlib.c htswrap.c htsconcat.c \
|
||||
htsmodules.c htscharset.c punycode.c htsencoding.c \
|
||||
md5.c \
|
||||
htsmms.c \
|
||||
minizip/ioapi.c minizip/mztools.c minizip/unzip.c minizip/zip.c \
|
||||
mmsrip/error.c mmsrip/mms.c \
|
||||
hts-indextmpl.h htsalias.h htsback.h htsbase.h \
|
||||
hts-indextmpl.h htsalias.h htsback.h htsbase.h htssafe.h \
|
||||
htsbasenet.h htsbauth.h htscache.h htscatchurl.h \
|
||||
htsconfig.h htscore.h htsparse.h htscoremain.h htsdefines.h \
|
||||
htsfilters.h htsftp.h htsglobal.h htshash.h htsinthash.h \
|
||||
@@ -358,13 +364,12 @@ libhttrack_la_SOURCES = htscore.c htsparse.c htsback.c htscache.c \
|
||||
htsopt.h htsrobots.h htsthread.h \
|
||||
htstools.h htswizard.h htswrap.h htszlib.h \
|
||||
htsstrings.h httrack-library.h htscharset.h punycode.h htsencoding.h \
|
||||
htsentities.h htsentities.sh \
|
||||
md5.h \
|
||||
htsmms.h \
|
||||
minizip/crypt.h minizip/ioapi.h minizip/mztools.h minizip/unzip.h minizip/zip.h \
|
||||
mmsrip/error.h mmsrip/mms.h
|
||||
htsentities.h htsentities.sh htsbasiccharsets.sh htscodepages.h \
|
||||
md5.h murmurhash3.h \
|
||||
minizip/crypt.h minizip/ioapi.h minizip/mztools.h minizip/unzip.h minizip/zip.h
|
||||
|
||||
libhttrack_la_LIBADD = $(THREADS_LIBS) $(ZLIB_LIBS) $(OPENSSL_LIBS) $(DL_LIBS) $(SOCKET_LIBS) $(ICONV_LIBS)
|
||||
libhttrack_la_CFLAGS = $(AM_CFLAGS) -DLIBHTTRACK_EXPORTS
|
||||
libhttrack_la_LDFLAGS = -version-info $(VERSION_INFO)
|
||||
libhtsjava_la_SOURCES = htsjava.c htsjava.h
|
||||
libhtsjava_la_LIBADD = $(THREADS_LIBS) $(DL_LIBS) libhttrack.la
|
||||
@@ -373,13 +378,6 @@ EXTRA_DIST = httrack.h webhttrack \
|
||||
minizip/ChangeLogUnzip \
|
||||
minizip/iowin32.c \
|
||||
minizip/iowin32.h \
|
||||
mmsrip/common.h \
|
||||
mmsrip/main.c \
|
||||
mmsrip/COPYING \
|
||||
mmsrip/AUTHORS \
|
||||
mmsrip/NEWS \
|
||||
mmsrip/README \
|
||||
mmsrip/ChangeLog \
|
||||
proxy/AUTHORS \
|
||||
proxy/COPYING \
|
||||
proxy/changelog.txt \
|
||||
@@ -555,42 +553,43 @@ mostlyclean-compile:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsalias.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsback.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsbauth.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscache.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscatchurl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscharset.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscore.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscoremain.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsencoding.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsfilters.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsftp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htshash.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htshelp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsindex.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsinthash.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsjava.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htslib.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsmd5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsmms.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsmodules.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsname.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsparse.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsrobots.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsserver.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsthread.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htstools.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsweb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htswizard.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htswrap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htszlib.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httrack.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioapi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mms.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mztools.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsalias.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsback.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsbauth.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htscache.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htscatchurl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htscharset.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsconcat.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htscore.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htscoremain.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsencoding.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsfilters.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsftp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htshash.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htshelp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsindex.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsinthash.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htslib.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsmd5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsmodules.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsname.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsparse.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsrobots.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htsthread.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htstools.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htswizard.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htswrap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-htszlib.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-ioapi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-md5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-mztools.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-punycode.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-unzip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhttrack_la-zip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxytrack-htsinthash.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxytrack-htsmd5.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxytrack-ioapi.Po@am__quote@
|
||||
@@ -601,9 +600,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxytrack-store.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxytrack-unzip.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxytrack-zip.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/punycode.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zip.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@@ -626,47 +622,236 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
ioapi.lo: minizip/ioapi.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ioapi.lo -MD -MP -MF $(DEPDIR)/ioapi.Tpo -c -o ioapi.lo `test -f 'minizip/ioapi.c' || echo '$(srcdir)/'`minizip/ioapi.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ioapi.Tpo $(DEPDIR)/ioapi.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/ioapi.c' object='ioapi.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
libhttrack_la-htscore.lo: htscore.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htscore.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htscore.Tpo -c -o libhttrack_la-htscore.lo `test -f 'htscore.c' || echo '$(srcdir)/'`htscore.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htscore.Tpo $(DEPDIR)/libhttrack_la-htscore.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htscore.c' object='libhttrack_la-htscore.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ioapi.lo `test -f 'minizip/ioapi.c' || echo '$(srcdir)/'`minizip/ioapi.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htscore.lo `test -f 'htscore.c' || echo '$(srcdir)/'`htscore.c
|
||||
|
||||
mztools.lo: minizip/mztools.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mztools.lo -MD -MP -MF $(DEPDIR)/mztools.Tpo -c -o mztools.lo `test -f 'minizip/mztools.c' || echo '$(srcdir)/'`minizip/mztools.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mztools.Tpo $(DEPDIR)/mztools.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/mztools.c' object='mztools.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
libhttrack_la-htsparse.lo: htsparse.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsparse.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsparse.Tpo -c -o libhttrack_la-htsparse.lo `test -f 'htsparse.c' || echo '$(srcdir)/'`htsparse.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsparse.Tpo $(DEPDIR)/libhttrack_la-htsparse.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsparse.c' object='libhttrack_la-htsparse.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mztools.lo `test -f 'minizip/mztools.c' || echo '$(srcdir)/'`minizip/mztools.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsparse.lo `test -f 'htsparse.c' || echo '$(srcdir)/'`htsparse.c
|
||||
|
||||
unzip.lo: minizip/unzip.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unzip.lo -MD -MP -MF $(DEPDIR)/unzip.Tpo -c -o unzip.lo `test -f 'minizip/unzip.c' || echo '$(srcdir)/'`minizip/unzip.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/unzip.Tpo $(DEPDIR)/unzip.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/unzip.c' object='unzip.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
libhttrack_la-htsback.lo: htsback.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsback.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsback.Tpo -c -o libhttrack_la-htsback.lo `test -f 'htsback.c' || echo '$(srcdir)/'`htsback.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsback.Tpo $(DEPDIR)/libhttrack_la-htsback.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsback.c' object='libhttrack_la-htsback.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unzip.lo `test -f 'minizip/unzip.c' || echo '$(srcdir)/'`minizip/unzip.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsback.lo `test -f 'htsback.c' || echo '$(srcdir)/'`htsback.c
|
||||
|
||||
zip.lo: minizip/zip.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zip.lo -MD -MP -MF $(DEPDIR)/zip.Tpo -c -o zip.lo `test -f 'minizip/zip.c' || echo '$(srcdir)/'`minizip/zip.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/zip.Tpo $(DEPDIR)/zip.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/zip.c' object='zip.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
libhttrack_la-htscache.lo: htscache.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htscache.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htscache.Tpo -c -o libhttrack_la-htscache.lo `test -f 'htscache.c' || echo '$(srcdir)/'`htscache.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htscache.Tpo $(DEPDIR)/libhttrack_la-htscache.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htscache.c' object='libhttrack_la-htscache.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zip.lo `test -f 'minizip/zip.c' || echo '$(srcdir)/'`minizip/zip.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htscache.lo `test -f 'htscache.c' || echo '$(srcdir)/'`htscache.c
|
||||
|
||||
error.lo: mmsrip/error.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.lo -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.lo `test -f 'mmsrip/error.c' || echo '$(srcdir)/'`mmsrip/error.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmsrip/error.c' object='error.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
libhttrack_la-htscatchurl.lo: htscatchurl.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htscatchurl.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htscatchurl.Tpo -c -o libhttrack_la-htscatchurl.lo `test -f 'htscatchurl.c' || echo '$(srcdir)/'`htscatchurl.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htscatchurl.Tpo $(DEPDIR)/libhttrack_la-htscatchurl.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htscatchurl.c' object='libhttrack_la-htscatchurl.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.lo `test -f 'mmsrip/error.c' || echo '$(srcdir)/'`mmsrip/error.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htscatchurl.lo `test -f 'htscatchurl.c' || echo '$(srcdir)/'`htscatchurl.c
|
||||
|
||||
mms.lo: mmsrip/mms.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mms.lo -MD -MP -MF $(DEPDIR)/mms.Tpo -c -o mms.lo `test -f 'mmsrip/mms.c' || echo '$(srcdir)/'`mmsrip/mms.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mms.Tpo $(DEPDIR)/mms.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmsrip/mms.c' object='mms.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
libhttrack_la-htsfilters.lo: htsfilters.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsfilters.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsfilters.Tpo -c -o libhttrack_la-htsfilters.lo `test -f 'htsfilters.c' || echo '$(srcdir)/'`htsfilters.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsfilters.Tpo $(DEPDIR)/libhttrack_la-htsfilters.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsfilters.c' object='libhttrack_la-htsfilters.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mms.lo `test -f 'mmsrip/mms.c' || echo '$(srcdir)/'`mmsrip/mms.c
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsfilters.lo `test -f 'htsfilters.c' || echo '$(srcdir)/'`htsfilters.c
|
||||
|
||||
libhttrack_la-htsftp.lo: htsftp.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsftp.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsftp.Tpo -c -o libhttrack_la-htsftp.lo `test -f 'htsftp.c' || echo '$(srcdir)/'`htsftp.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsftp.Tpo $(DEPDIR)/libhttrack_la-htsftp.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsftp.c' object='libhttrack_la-htsftp.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsftp.lo `test -f 'htsftp.c' || echo '$(srcdir)/'`htsftp.c
|
||||
|
||||
libhttrack_la-htshash.lo: htshash.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htshash.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htshash.Tpo -c -o libhttrack_la-htshash.lo `test -f 'htshash.c' || echo '$(srcdir)/'`htshash.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htshash.Tpo $(DEPDIR)/libhttrack_la-htshash.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htshash.c' object='libhttrack_la-htshash.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htshash.lo `test -f 'htshash.c' || echo '$(srcdir)/'`htshash.c
|
||||
|
||||
libhttrack_la-htsinthash.lo: htsinthash.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsinthash.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsinthash.Tpo -c -o libhttrack_la-htsinthash.lo `test -f 'htsinthash.c' || echo '$(srcdir)/'`htsinthash.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsinthash.Tpo $(DEPDIR)/libhttrack_la-htsinthash.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsinthash.c' object='libhttrack_la-htsinthash.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsinthash.lo `test -f 'htsinthash.c' || echo '$(srcdir)/'`htsinthash.c
|
||||
|
||||
libhttrack_la-htshelp.lo: htshelp.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htshelp.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htshelp.Tpo -c -o libhttrack_la-htshelp.lo `test -f 'htshelp.c' || echo '$(srcdir)/'`htshelp.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htshelp.Tpo $(DEPDIR)/libhttrack_la-htshelp.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htshelp.c' object='libhttrack_la-htshelp.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htshelp.lo `test -f 'htshelp.c' || echo '$(srcdir)/'`htshelp.c
|
||||
|
||||
libhttrack_la-htslib.lo: htslib.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htslib.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htslib.Tpo -c -o libhttrack_la-htslib.lo `test -f 'htslib.c' || echo '$(srcdir)/'`htslib.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htslib.Tpo $(DEPDIR)/libhttrack_la-htslib.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htslib.c' object='libhttrack_la-htslib.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htslib.lo `test -f 'htslib.c' || echo '$(srcdir)/'`htslib.c
|
||||
|
||||
libhttrack_la-htscoremain.lo: htscoremain.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htscoremain.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htscoremain.Tpo -c -o libhttrack_la-htscoremain.lo `test -f 'htscoremain.c' || echo '$(srcdir)/'`htscoremain.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htscoremain.Tpo $(DEPDIR)/libhttrack_la-htscoremain.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htscoremain.c' object='libhttrack_la-htscoremain.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htscoremain.lo `test -f 'htscoremain.c' || echo '$(srcdir)/'`htscoremain.c
|
||||
|
||||
libhttrack_la-htsname.lo: htsname.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsname.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsname.Tpo -c -o libhttrack_la-htsname.lo `test -f 'htsname.c' || echo '$(srcdir)/'`htsname.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsname.Tpo $(DEPDIR)/libhttrack_la-htsname.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsname.c' object='libhttrack_la-htsname.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsname.lo `test -f 'htsname.c' || echo '$(srcdir)/'`htsname.c
|
||||
|
||||
libhttrack_la-htsrobots.lo: htsrobots.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsrobots.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsrobots.Tpo -c -o libhttrack_la-htsrobots.lo `test -f 'htsrobots.c' || echo '$(srcdir)/'`htsrobots.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsrobots.Tpo $(DEPDIR)/libhttrack_la-htsrobots.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsrobots.c' object='libhttrack_la-htsrobots.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsrobots.lo `test -f 'htsrobots.c' || echo '$(srcdir)/'`htsrobots.c
|
||||
|
||||
libhttrack_la-htstools.lo: htstools.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htstools.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htstools.Tpo -c -o libhttrack_la-htstools.lo `test -f 'htstools.c' || echo '$(srcdir)/'`htstools.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htstools.Tpo $(DEPDIR)/libhttrack_la-htstools.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htstools.c' object='libhttrack_la-htstools.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htstools.lo `test -f 'htstools.c' || echo '$(srcdir)/'`htstools.c
|
||||
|
||||
libhttrack_la-htswizard.lo: htswizard.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htswizard.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htswizard.Tpo -c -o libhttrack_la-htswizard.lo `test -f 'htswizard.c' || echo '$(srcdir)/'`htswizard.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htswizard.Tpo $(DEPDIR)/libhttrack_la-htswizard.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htswizard.c' object='libhttrack_la-htswizard.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htswizard.lo `test -f 'htswizard.c' || echo '$(srcdir)/'`htswizard.c
|
||||
|
||||
libhttrack_la-htsalias.lo: htsalias.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsalias.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsalias.Tpo -c -o libhttrack_la-htsalias.lo `test -f 'htsalias.c' || echo '$(srcdir)/'`htsalias.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsalias.Tpo $(DEPDIR)/libhttrack_la-htsalias.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsalias.c' object='libhttrack_la-htsalias.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsalias.lo `test -f 'htsalias.c' || echo '$(srcdir)/'`htsalias.c
|
||||
|
||||
libhttrack_la-htsthread.lo: htsthread.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsthread.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsthread.Tpo -c -o libhttrack_la-htsthread.lo `test -f 'htsthread.c' || echo '$(srcdir)/'`htsthread.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsthread.Tpo $(DEPDIR)/libhttrack_la-htsthread.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsthread.c' object='libhttrack_la-htsthread.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsthread.lo `test -f 'htsthread.c' || echo '$(srcdir)/'`htsthread.c
|
||||
|
||||
libhttrack_la-htsindex.lo: htsindex.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsindex.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsindex.Tpo -c -o libhttrack_la-htsindex.lo `test -f 'htsindex.c' || echo '$(srcdir)/'`htsindex.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsindex.Tpo $(DEPDIR)/libhttrack_la-htsindex.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsindex.c' object='libhttrack_la-htsindex.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsindex.lo `test -f 'htsindex.c' || echo '$(srcdir)/'`htsindex.c
|
||||
|
||||
libhttrack_la-htsbauth.lo: htsbauth.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsbauth.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsbauth.Tpo -c -o libhttrack_la-htsbauth.lo `test -f 'htsbauth.c' || echo '$(srcdir)/'`htsbauth.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsbauth.Tpo $(DEPDIR)/libhttrack_la-htsbauth.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsbauth.c' object='libhttrack_la-htsbauth.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsbauth.lo `test -f 'htsbauth.c' || echo '$(srcdir)/'`htsbauth.c
|
||||
|
||||
libhttrack_la-htsmd5.lo: htsmd5.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsmd5.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsmd5.Tpo -c -o libhttrack_la-htsmd5.lo `test -f 'htsmd5.c' || echo '$(srcdir)/'`htsmd5.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsmd5.Tpo $(DEPDIR)/libhttrack_la-htsmd5.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsmd5.c' object='libhttrack_la-htsmd5.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsmd5.lo `test -f 'htsmd5.c' || echo '$(srcdir)/'`htsmd5.c
|
||||
|
||||
libhttrack_la-htszlib.lo: htszlib.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htszlib.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htszlib.Tpo -c -o libhttrack_la-htszlib.lo `test -f 'htszlib.c' || echo '$(srcdir)/'`htszlib.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htszlib.Tpo $(DEPDIR)/libhttrack_la-htszlib.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htszlib.c' object='libhttrack_la-htszlib.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htszlib.lo `test -f 'htszlib.c' || echo '$(srcdir)/'`htszlib.c
|
||||
|
||||
libhttrack_la-htswrap.lo: htswrap.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htswrap.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htswrap.Tpo -c -o libhttrack_la-htswrap.lo `test -f 'htswrap.c' || echo '$(srcdir)/'`htswrap.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htswrap.Tpo $(DEPDIR)/libhttrack_la-htswrap.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htswrap.c' object='libhttrack_la-htswrap.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htswrap.lo `test -f 'htswrap.c' || echo '$(srcdir)/'`htswrap.c
|
||||
|
||||
libhttrack_la-htsconcat.lo: htsconcat.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsconcat.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsconcat.Tpo -c -o libhttrack_la-htsconcat.lo `test -f 'htsconcat.c' || echo '$(srcdir)/'`htsconcat.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsconcat.Tpo $(DEPDIR)/libhttrack_la-htsconcat.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsconcat.c' object='libhttrack_la-htsconcat.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsconcat.lo `test -f 'htsconcat.c' || echo '$(srcdir)/'`htsconcat.c
|
||||
|
||||
libhttrack_la-htsmodules.lo: htsmodules.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsmodules.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsmodules.Tpo -c -o libhttrack_la-htsmodules.lo `test -f 'htsmodules.c' || echo '$(srcdir)/'`htsmodules.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsmodules.Tpo $(DEPDIR)/libhttrack_la-htsmodules.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsmodules.c' object='libhttrack_la-htsmodules.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsmodules.lo `test -f 'htsmodules.c' || echo '$(srcdir)/'`htsmodules.c
|
||||
|
||||
libhttrack_la-htscharset.lo: htscharset.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htscharset.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htscharset.Tpo -c -o libhttrack_la-htscharset.lo `test -f 'htscharset.c' || echo '$(srcdir)/'`htscharset.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htscharset.Tpo $(DEPDIR)/libhttrack_la-htscharset.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htscharset.c' object='libhttrack_la-htscharset.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htscharset.lo `test -f 'htscharset.c' || echo '$(srcdir)/'`htscharset.c
|
||||
|
||||
libhttrack_la-punycode.lo: punycode.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-punycode.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-punycode.Tpo -c -o libhttrack_la-punycode.lo `test -f 'punycode.c' || echo '$(srcdir)/'`punycode.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-punycode.Tpo $(DEPDIR)/libhttrack_la-punycode.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='punycode.c' object='libhttrack_la-punycode.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-punycode.lo `test -f 'punycode.c' || echo '$(srcdir)/'`punycode.c
|
||||
|
||||
libhttrack_la-htsencoding.lo: htsencoding.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-htsencoding.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-htsencoding.Tpo -c -o libhttrack_la-htsencoding.lo `test -f 'htsencoding.c' || echo '$(srcdir)/'`htsencoding.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-htsencoding.Tpo $(DEPDIR)/libhttrack_la-htsencoding.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='htsencoding.c' object='libhttrack_la-htsencoding.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-htsencoding.lo `test -f 'htsencoding.c' || echo '$(srcdir)/'`htsencoding.c
|
||||
|
||||
libhttrack_la-md5.lo: md5.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-md5.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-md5.Tpo -c -o libhttrack_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-md5.Tpo $(DEPDIR)/libhttrack_la-md5.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5.c' object='libhttrack_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
|
||||
|
||||
libhttrack_la-ioapi.lo: minizip/ioapi.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-ioapi.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-ioapi.Tpo -c -o libhttrack_la-ioapi.lo `test -f 'minizip/ioapi.c' || echo '$(srcdir)/'`minizip/ioapi.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-ioapi.Tpo $(DEPDIR)/libhttrack_la-ioapi.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/ioapi.c' object='libhttrack_la-ioapi.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-ioapi.lo `test -f 'minizip/ioapi.c' || echo '$(srcdir)/'`minizip/ioapi.c
|
||||
|
||||
libhttrack_la-mztools.lo: minizip/mztools.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-mztools.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-mztools.Tpo -c -o libhttrack_la-mztools.lo `test -f 'minizip/mztools.c' || echo '$(srcdir)/'`minizip/mztools.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-mztools.Tpo $(DEPDIR)/libhttrack_la-mztools.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/mztools.c' object='libhttrack_la-mztools.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-mztools.lo `test -f 'minizip/mztools.c' || echo '$(srcdir)/'`minizip/mztools.c
|
||||
|
||||
libhttrack_la-unzip.lo: minizip/unzip.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-unzip.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-unzip.Tpo -c -o libhttrack_la-unzip.lo `test -f 'minizip/unzip.c' || echo '$(srcdir)/'`minizip/unzip.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-unzip.Tpo $(DEPDIR)/libhttrack_la-unzip.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/unzip.c' object='libhttrack_la-unzip.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-unzip.lo `test -f 'minizip/unzip.c' || echo '$(srcdir)/'`minizip/unzip.c
|
||||
|
||||
libhttrack_la-zip.lo: minizip/zip.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -MT libhttrack_la-zip.lo -MD -MP -MF $(DEPDIR)/libhttrack_la-zip.Tpo -c -o libhttrack_la-zip.lo `test -f 'minizip/zip.c' || echo '$(srcdir)/'`minizip/zip.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libhttrack_la-zip.Tpo $(DEPDIR)/libhttrack_la-zip.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='minizip/zip.c' object='libhttrack_la-zip.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhttrack_la_CFLAGS) $(CFLAGS) -c -o libhttrack_la-zip.lo `test -f 'minizip/zip.c' || echo '$(srcdir)/'`minizip/zip.c
|
||||
|
||||
proxytrack-main.o: proxy/main.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(proxytrack_CFLAGS) $(CFLAGS) -MT proxytrack-main.o -MD -MP -MF $(DEPDIR)/proxytrack-main.Tpo -c -o proxytrack-main.o `test -f 'proxy/main.c' || echo '$(srcdir)/'`proxy/main.c
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -169,7 +168,7 @@ regen:
|
||||
" <BR>"LF\
|
||||
" <BR>"LF\
|
||||
" <H6 ALIGN=\"RIGHT\">"LF\
|
||||
" <I>Mirror and index made by HTTrack Website Copier [XR&CO'2013]</I>"LF\
|
||||
" <I>Mirror and index made by HTTrack Website Copier [XR&CO'2014]</I>"LF\
|
||||
" </H6>"LF\
|
||||
" %s"LF\
|
||||
" <!-- Thanks for using HTTrack Website Copier! -->"LF\
|
||||
@@ -187,7 +186,7 @@ regen:
|
||||
""LF\
|
||||
"<table width=\"76%%\" border=\"0\" align=\"center\" valign=\"bottom\" cellspacing=\"0\" cellpadding=\"0\">"LF\
|
||||
" <tr>"LF\
|
||||
" <td id=\"footer\"><small>© 2013 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" <td id=\"footer\"><small>© 2014 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" </tr>"LF\
|
||||
"</table>"LF\
|
||||
""LF\
|
||||
@@ -318,7 +317,7 @@ regen:
|
||||
" </TABLE>"LF\
|
||||
" <BR>"LF\
|
||||
" <H6 ALIGN=\"RIGHT\">"LF\
|
||||
" <I>Mirror and index made by HTTrack Website Copier [XR&CO'2013]</I>"LF\
|
||||
" <I>Mirror and index made by HTTrack Website Copier [XR&CO'2014]</I>"LF\
|
||||
" </H6>"LF\
|
||||
" %s"LF\
|
||||
" <!-- Thanks for using HTTrack Website Copier! -->"LF\
|
||||
@@ -336,7 +335,7 @@ regen:
|
||||
""LF\
|
||||
"<table width=\"76%%\" border=\"0\" align=\"center\" valign=\"bottom\" cellspacing=\"0\" cellpadding=\"0\">"LF\
|
||||
" <tr>"LF\
|
||||
" <td id=\"footer\"><small>© 2013 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" <td id=\"footer\"><small>© 2014 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" </tr>"LF\
|
||||
"</table>"LF\
|
||||
""LF\
|
||||
@@ -476,7 +475,7 @@ regen:
|
||||
""LF\
|
||||
"<table width=\"76%%\" height=\"100%%\" border=\"0\" align=\"center\" valign=\"bottom\" cellspacing=\"0\" cellpadding=\"0\">"LF\
|
||||
" <tr>"LF\
|
||||
" <td id=\"footer\"><small>© 2013 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" <td id=\"footer\"><small>© 2014 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" </tr>"LF\
|
||||
"</table>"LF\
|
||||
""LF\
|
||||
@@ -613,7 +612,7 @@ regen:
|
||||
""LF\
|
||||
"<table width=\"76%%\" height=\"100%%\" border=\"0\" align=\"center\" valign=\"bottom\" cellspacing=\"0\" cellpadding=\"0\">"LF\
|
||||
" <tr>"LF\
|
||||
" <td id=\"footer\"><small>© 2013 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" <td id=\"footer\"><small>© 2014 Xavier Roche & other contributors - Web Design: Kauler Leto.</small></td>"LF\
|
||||
" </tr>"LF\
|
||||
"</table>"LF\
|
||||
""LF\
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -38,20 +37,9 @@ Please visit our Website: http://www.httrack.com
|
||||
#include "htsbase.h"
|
||||
#include "htsalias.h"
|
||||
#include "htsglobal.h"
|
||||
|
||||
void linput(FILE * fp, char *s, int max);
|
||||
void hts_lowcase(char *s);
|
||||
#include "htslib.h"
|
||||
|
||||
#define _NOT_NULL(a) ( (a!=NULL) ? (a) : "" )
|
||||
// #define is_realspace(c) (strchr(" \x0d\x0a\x09\x0b\x0c",(c))!=NULL)
|
||||
#define is_realspace(c) ( \
|
||||
(c) == ' ' \
|
||||
|| (c) == '\x09' \
|
||||
|| (c) == '\x0a' \
|
||||
|| (c) == '\x0b' \
|
||||
|| (c) == '\x0c' \
|
||||
|| (c) == '\x0d' \
|
||||
)
|
||||
|
||||
// COPY OF cmdl_ins in htsmain.c
|
||||
// Insert a command in the argc/argv
|
||||
@@ -89,7 +77,6 @@ void hts_lowcase(char *s);
|
||||
const char *hts_optalias[][4] = {
|
||||
/* {"","","",""}, */
|
||||
{"path", "-O", "param1", "output path"},
|
||||
{"chroot", "-%O", "param1", "default top path"},
|
||||
{"mirror", "-w", "single", ""},
|
||||
{"mirror-wizard", "-W", "single", ""},
|
||||
{"get-files", "-g", "single", ""},
|
||||
@@ -103,7 +90,6 @@ const char *hts_optalias[][4] = {
|
||||
{"max-files", "-m", "param", ""},
|
||||
{"max-size", "-M", "param", ""},
|
||||
{"max-time", "-E", "param", ""},
|
||||
{"max-mms-time", "-%m", "param", ""},
|
||||
{"max-rate", "-A", "param", ""},
|
||||
{"max-pause", "-G", "param", ""},
|
||||
{"sockets", "-c", "param", "number of simultaneous connections allowed"},
|
||||
@@ -125,6 +111,8 @@ const char *hts_optalias[][4] = {
|
||||
{"list", "-%L", "param1", ""},
|
||||
{"urllist", "-%S", "param1", ""},
|
||||
{"language", "-%l", "param1", ""}, {"lang", "-%l", "param1", ""},
|
||||
{"accept", "-%a", "param1", ""},
|
||||
{"headers", "-%X", "param1", ""},
|
||||
{"structure", "-N", "param", ""}, {"user-structure", "-N", "param1", ""},
|
||||
{"long-names", "-L", "param", ""},
|
||||
{"keep-links", "-K", "param", ""},
|
||||
@@ -211,7 +199,6 @@ const char *hts_optalias[][4] = {
|
||||
{"debug-xfrstats", "-#T", "single", ""},
|
||||
{"advanced-wait", "-#u", "single", ""},
|
||||
{"debug-ratestats", "-#Z", "single", ""},
|
||||
{"exec", "-#!", "param1", ""},
|
||||
{"fast-engine", "-#X", "single", "Enable fast routines"},
|
||||
{"debug-overflows", "-#X0", "single", "Attempt to detect buffer overflows"},
|
||||
{"debug-cache", "-#C", "param1", "List files in the cache"},
|
||||
@@ -257,10 +244,6 @@ const char *hts_optalias[][4] = {
|
||||
{"add", "", "param0", "add URLs"},
|
||||
/* */
|
||||
|
||||
/* Specific */
|
||||
{"user", "-%U", "param1", "output path"},
|
||||
/* */
|
||||
|
||||
/* Internal */
|
||||
{"catchurl", "--catchurl", "single", "catch complex URL through proxy"},
|
||||
{"updatehttrack", "--updatehttrack", "single",
|
||||
@@ -578,13 +561,11 @@ int optinclude_file(const char *name, int *argc, char **argv, char *x_argvblk,
|
||||
/* Get home directory, '.' if failed */
|
||||
/* example: /home/smith */
|
||||
char *hts_gethome(void) {
|
||||
#ifndef _WIN32_WCE
|
||||
char *home = getenv("HOME");
|
||||
|
||||
if (home)
|
||||
return home;
|
||||
else
|
||||
#endif
|
||||
return ".";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
434
src/htsback.c
434
src/htsback.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -56,17 +55,11 @@ Please visit our Website: http://www.httrack.com
|
||||
#ifdef _WIN32
|
||||
#ifndef __cplusplus
|
||||
// DOS
|
||||
#ifndef _WIN32_WCE
|
||||
#include <process.h> /* _beginthread, _endthread */
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#endif
|
||||
|
||||
#if HTS_USEMMS
|
||||
#include "htsmms.h"
|
||||
#endif
|
||||
|
||||
#define VT_CLREOL "\33[K"
|
||||
|
||||
/* Slot operations */
|
||||
@@ -74,13 +67,15 @@ static int slot_can_be_cached_on_disk(const lien_back * back);
|
||||
static int slot_can_be_cleaned(const lien_back * back);
|
||||
static int slot_can_be_finalized(httrackp * opt, const lien_back * back);
|
||||
|
||||
struct_back *back_new(int back_max) {
|
||||
struct_back *back_new(httrackp *opt, int back_max) {
|
||||
int i;
|
||||
struct_back *sback = calloct(1, sizeof(struct_back));
|
||||
|
||||
sback->count = back_max;
|
||||
sback->lnk = (lien_back *) calloct((back_max + 1), sizeof(lien_back));
|
||||
sback->ready = inthash_new(32767);
|
||||
sback->ready = inthash_new(0);
|
||||
hts_set_hash_handler(sback->ready, opt);
|
||||
inthash_set_name(sback->ready, "back_new");
|
||||
sback->ready_size_bytes = 0;
|
||||
inthash_value_is_malloc(sback->ready, 1);
|
||||
// init
|
||||
@@ -202,20 +197,20 @@ static int back_index_ready(httrackp * opt, struct_back * sback, char *adr,
|
||||
char *fileback = (char *) ptr;
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
|
||||
if ((fp = FOPEN(fconv(catbuff, fileback), "rb")) != NULL) {
|
||||
if ((fp = FOPEN(fconv(catbuff, sizeof(catbuff), fileback), "rb")) != NULL) {
|
||||
if (back_unserialize(fp, &itemback) != 0) {
|
||||
if (itemback != NULL) {
|
||||
back_clear_entry(itemback);
|
||||
freet(itemback);
|
||||
itemback = NULL;
|
||||
}
|
||||
hts_log_print(opt, LOG_INFO | LOG_ERRNO,
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"engine: warning: unserialize error for %s%s (%s)", adr,
|
||||
fil, sav);
|
||||
}
|
||||
fclose(fp);
|
||||
} else {
|
||||
hts_log_print(opt, LOG_INFO | LOG_ERRNO,
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"engine: warning: unserialize error for %s%s (%s), file disappeared",
|
||||
adr, fil, sav);
|
||||
}
|
||||
@@ -238,7 +233,7 @@ static int back_index_ready(httrackp * opt, struct_back * sback, char *adr,
|
||||
back_set_locked(sback, q); /* locked */
|
||||
return q;
|
||||
} else {
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
"engine: warning: unserialize error for %s%s (%s): no more space to wakeup frozen slots",
|
||||
adr, fil, sav);
|
||||
}
|
||||
@@ -307,7 +302,7 @@ int back_cleanup_background(httrackp * opt, cache_back * cache,
|
||||
}
|
||||
/* Security check */
|
||||
if (fexist_utf8(filename)) {
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
"engine: warning: temporary file %s already exists",
|
||||
filename);
|
||||
}
|
||||
@@ -320,13 +315,13 @@ int back_cleanup_background(httrackp * opt, cache_back * cache,
|
||||
nclean++;
|
||||
back_clear_entry(&back[i]); /* entry is now recycled */
|
||||
} else {
|
||||
hts_log_print(opt, LOG_INFO | LOG_ERRNO,
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"engine: warning: serialize error for %s%s to %s: write error",
|
||||
back[i].url_adr, back[i].url_fil, filename);
|
||||
}
|
||||
fclose(fp);
|
||||
} else {
|
||||
hts_log_print(opt, LOG_INFO | LOG_ERRNO,
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"engine: warning: serialize error for %s%s to %s: open error (%s, %s)",
|
||||
back[i].url_adr, back[i].url_fil, filename,
|
||||
dir_exists(filename) ? "directory exists" :
|
||||
@@ -337,7 +332,7 @@ int back_cleanup_background(httrackp * opt, cache_back * cache,
|
||||
if (filename != NULL)
|
||||
free(filename);
|
||||
} else {
|
||||
hts_log_print(opt, LOG_INFO | LOG_ERRNO,
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"engine: warning: serialize error for %s%s to %s: memory full",
|
||||
back[i].url_adr, back[i].url_fil, filename);
|
||||
}
|
||||
@@ -408,7 +403,7 @@ int back_done_incache(struct_back * sback) {
|
||||
// stored (ready) slots
|
||||
if (sback->ready != NULL) {
|
||||
#ifndef HTS_NO_BACK_ON_DISK
|
||||
n += inthash_nitems(sback->ready);
|
||||
n += (int) inthash_nitems(sback->ready);
|
||||
#else
|
||||
struct_inthash_enum e = inthash_enum_new(sback->ready);
|
||||
inthash_chain *item;
|
||||
@@ -456,6 +451,31 @@ int back_nsoc_overall(struct_back * sback) {
|
||||
return n;
|
||||
}
|
||||
|
||||
/* generate temporary file on lien_back */
|
||||
/* Note: utf-8 */
|
||||
static int create_back_tmpfile(httrackp * opt, lien_back *const back) {
|
||||
// do not use tempnam() but a regular filename
|
||||
back->tmpfile_buffer[0] = '\0';
|
||||
if (back->url_sav != NULL && back->url_sav[0] != '\0') {
|
||||
snprintf(back->tmpfile_buffer, sizeof(back->tmpfile_buffer), "%s.z",
|
||||
back->url_sav);
|
||||
back->tmpfile = back->tmpfile_buffer;
|
||||
if (structcheck(back->tmpfile) != 0) {
|
||||
hts_log_print(opt, LOG_WARNING, "can not create directory to %s",
|
||||
back->tmpfile);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
snprintf(back->tmpfile_buffer, sizeof(back->tmpfile_buffer),
|
||||
"%s/tmp%d.z", StringBuff(opt->path_html_utf8),
|
||||
opt->state.tmpnameid++);
|
||||
back->tmpfile = back->tmpfile_buffer;
|
||||
}
|
||||
/* OK */
|
||||
hts_log_print(opt, LOG_TRACE, "produced temporary name %s", back->tmpfile);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// objet (lien) téléchargé ou transféré depuis le cache
|
||||
//
|
||||
// fermer les paramètres de transfert,
|
||||
@@ -506,27 +526,11 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
back[p].compressed_size = back[p].r.size;
|
||||
// en mémoire -> passage sur disque
|
||||
if (!back[p].r.is_write) {
|
||||
#if 1
|
||||
#ifdef _WIN32
|
||||
#undef tempnam
|
||||
#define tempnam _tempnam
|
||||
#endif
|
||||
char *const tmp = tempnam(NULL, "httrack_temporaryGzipFile_");
|
||||
|
||||
if (tmp != NULL) {
|
||||
strcpybuff(back[p].tmpfile_buffer, tmp);
|
||||
free(tmp);
|
||||
back[p].tmpfile = back[p].tmpfile_buffer;
|
||||
} else {
|
||||
back[p].tmpfile = NULL;
|
||||
}
|
||||
#else
|
||||
back[p].tmpfile_buffer[0] = '\0';
|
||||
back[p].tmpfile = tmpnam(back[p].tmpfile_buffer);
|
||||
#endif
|
||||
if (back[p].tmpfile != NULL && back[p].tmpfile[0] != '\0') {
|
||||
/* note: tmpfile is a local system filename */
|
||||
back[p].r.out = fopen(back[p].tmpfile, "wb");
|
||||
// do not use tempnam() but a regular filename
|
||||
if (create_back_tmpfile(opt, &back[p]) == 0) {
|
||||
assertf(back[p].tmpfile != NULL);
|
||||
/* note: tmpfile is utf-8 */
|
||||
back[p].r.out = FOPEN(back[p].tmpfile, "wb");
|
||||
if (back[p].r.out) {
|
||||
if ((back[p].r.adr) && (back[p].r.size > 0)) {
|
||||
if (fwrite
|
||||
@@ -542,11 +546,15 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
strcpybuff(back[p].r.msg, "Empty compressed file");
|
||||
}
|
||||
} else {
|
||||
snprintf(back[p].r.msg, sizeof(back[p].r.msg),
|
||||
"Open error when decompressing (can not create temporary file %s)",
|
||||
back[p].tmpfile);
|
||||
back[p].tmpfile[0] = '\0';
|
||||
back[p].r.statuscode = STATUSCODE_INVALID;
|
||||
strcpybuff(back[p].r.msg,
|
||||
"Open error when decompressing (can not create a temporary file)");
|
||||
}
|
||||
} else {
|
||||
snprintf(back[p].r.msg, sizeof(back[p].r.msg),
|
||||
"Open error when decompressing (can not generate a temporary file)");
|
||||
}
|
||||
}
|
||||
// fermer fichier sortie
|
||||
@@ -555,7 +563,7 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
back[p].r.out = NULL;
|
||||
}
|
||||
// décompression
|
||||
if (back[p].tmpfile != NULL && back[p].tmpfile[0] != '\0') {
|
||||
if (back[p].tmpfile != NULL) {
|
||||
if (back[p].url_sav[0]) {
|
||||
LLint size;
|
||||
|
||||
@@ -634,7 +642,7 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
// remove (temporary) file!
|
||||
UNLINK(fconv(catbuff, back[p].url_sav));
|
||||
UNLINK(fconv(catbuff, sizeof(catbuff), back[p].url_sav));
|
||||
}
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
@@ -658,7 +666,7 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
if (A == NULL) {
|
||||
int localtime_returned_null = 0;
|
||||
|
||||
assert(localtime_returned_null);
|
||||
assertf(localtime_returned_null);
|
||||
}
|
||||
strftime(s, 250, "%H:%M:%S", A);
|
||||
|
||||
@@ -705,6 +713,9 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
if (strcmp(back[p].url_fil, "/robots.txt") != 0) {
|
||||
HTS_STAT.stat_bytes += back[p].r.size;
|
||||
HTS_STAT.stat_files++;
|
||||
hts_log_print(opt, LOG_TRACE, "added file %s%s => %s",
|
||||
back[p].url_adr, back[p].url_fil,
|
||||
back[p].url_sav != NULL ? back[p].url_sav : "");
|
||||
}
|
||||
if ((!back[p].r.notmodified) && (opt->is_update)) {
|
||||
HTS_STAT.stat_updated_files++; // page modifiée
|
||||
@@ -756,27 +767,27 @@ int back_finalize(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
}
|
||||
}
|
||||
if (cache->txt) {
|
||||
#undef ESC_URL
|
||||
#define ESC_URL(S) escape_check_url_addr(S, OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt))
|
||||
fprintf(cache->txt,
|
||||
"%d\t" "%s ('%s')\t" "%s\t" "%s%s\t" "%s%s%s\t%s\t"
|
||||
"(from %s%s%s)" LF, back[p].r.statuscode, state,
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt), back[p].r.msg),
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt),
|
||||
back[p].r.contenttype),
|
||||
((back[p].r.
|
||||
etag[0]) ? "etag:" : ((back[p].r.
|
||||
ESC_URL(back[p].r.msg),
|
||||
ESC_URL(back[p].r.contenttype),
|
||||
((back[p].r.etag[0]) ? "etag:" : ((back[p].r.
|
||||
lastmodified[0]) ? "date:" : "")),
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt),
|
||||
(back[p].r.etag[0]) ? back[p].r.
|
||||
ESC_URL((back[p].r.etag[0]) ? back[p].r.
|
||||
etag : (back[p].r.lastmodified)),
|
||||
(link_has_authority(back[p].url_adr) ? "" : "http://"),
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt), back[p].url_adr),
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt), back[p].url_fil),
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt), back[p].url_sav),
|
||||
ESC_URL(back[p].url_adr),
|
||||
ESC_URL(back[p].url_fil),
|
||||
ESC_URL(back[p].url_sav),
|
||||
(link_has_authority(back[p].referer_adr)
|
||||
|| !back[p].referer_adr[0]) ? "" : "http://",
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt), back[p].referer_adr),
|
||||
escape_check_url_addr(OPT_GET_BUFF(opt), back[p].referer_fil)
|
||||
ESC_URL(back[p].referer_adr),
|
||||
ESC_URL(back[p].referer_fil)
|
||||
);
|
||||
#undef ESC_URL
|
||||
if (opt->flush)
|
||||
fflush(cache->txt);
|
||||
}
|
||||
@@ -976,11 +987,11 @@ int back_serialize_ref(httrackp * opt, const lien_back * src) {
|
||||
if (fp == NULL) {
|
||||
#ifdef _WIN32
|
||||
if (mkdir
|
||||
(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), CACHE_REFNAME))
|
||||
(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), CACHE_REFNAME))
|
||||
== 0)
|
||||
#else
|
||||
if (mkdir
|
||||
(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), CACHE_REFNAME),
|
||||
(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), CACHE_REFNAME),
|
||||
S_IRWXU | S_IRWXG | S_IRWXO) == 0)
|
||||
#endif
|
||||
{
|
||||
@@ -1044,9 +1055,12 @@ int back_maydelete(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
lien_back tmp;
|
||||
|
||||
strcpybuff(tmp.url_adr, back[p].url_adr);
|
||||
tmp.ka_time_start = back[p].ka_time_start;
|
||||
if (back_letlive(opt, cache, sback, p)) {
|
||||
strcpybuff(back[p].url_adr, tmp.url_adr);
|
||||
back[p].ka_time_start = tmp.ka_time_start;
|
||||
back[p].status = STATUS_ALIVE; // alive & waiting
|
||||
assertf(back[p].ka_time_start != 0);
|
||||
hts_log_print(opt, LOG_DEBUG,
|
||||
"(Keep-Alive): successfully saved #%d (%s)",
|
||||
back[p].r.debugid, back[p].url_adr);
|
||||
@@ -1092,12 +1106,15 @@ void back_maydeletehttp(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
lien_back tmp;
|
||||
|
||||
strcpybuff(tmp.url_adr, back[p].url_adr);
|
||||
tmp.ka_time_start = back[p].ka_time_start;
|
||||
deletehttp(&back[q].r); // security check
|
||||
back_connxfr(&back[p].r, &back[q].r); // transfer live connection settings from p to q
|
||||
back[q].ka_time_start = back[p].ka_time_start; // refresh
|
||||
back[p].r.soc = INVALID_SOCKET;
|
||||
strcpybuff(back[q].url_adr, tmp.url_adr); // address
|
||||
back[q].ka_time_start = tmp.ka_time_start;
|
||||
back[q].status = STATUS_ALIVE; // alive & waiting
|
||||
assertf(back[q].ka_time_start != 0);
|
||||
hts_log_print(opt, LOG_DEBUG,
|
||||
"(Keep-Alive): successfully preserved #%d (%s)",
|
||||
back[q].r.debugid, back[q].url_adr);
|
||||
@@ -1121,6 +1138,7 @@ int back_trylive(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
if (i >= 0 && i != p) {
|
||||
deletehttp(&back[p].r); // security check
|
||||
back_connxfr(&back[i].r, &back[p].r); // transfer live connection settings from i to p
|
||||
back[p].ka_time_start = back[i].ka_time_start;
|
||||
back_delete(opt, cache, sback, i); // delete old slot
|
||||
back[p].status = STATUS_CONNECTING; // ready to connect
|
||||
return 1; // success: will reuse live connection
|
||||
@@ -1293,6 +1311,7 @@ int back_delete(httrackp * opt, cache_back * cache, struct_back * sback,
|
||||
back[p].url_adr, back[p].url_fil, back[p].url_sav);
|
||||
}
|
||||
if (cache != NULL) {
|
||||
//hts_log_print(opt, LOG_TRACE, "finalizing from back_delete");
|
||||
back_finalize(opt, cache, sback, p);
|
||||
}
|
||||
}
|
||||
@@ -1487,7 +1506,8 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
if (cache->cached_tests != NULL) {
|
||||
intptr_t ptr = 0;
|
||||
|
||||
if (inthash_read(cache->cached_tests, concat(OPT_GET_BUFF(opt), adr, fil), &ptr)) { // gotcha
|
||||
if (inthash_read(cache->cached_tests,
|
||||
concat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), adr, fil), &ptr)) { // gotcha
|
||||
if (ptr != 0) {
|
||||
char *text = (char *) ptr;
|
||||
char *lf = strchr(text, '\n');
|
||||
@@ -1554,7 +1574,7 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
if (pos < 0) { // pas de mise en cache data, vérifier existence
|
||||
#endif
|
||||
/* note: no check with IS_DELAYED_EXT() enabled - postcheck by client please! */
|
||||
if (save[0] != '\0' && !IS_DELAYED_EXT(save) && fsize_utf8(fconv(catbuff, save)) <= 0) { // fichier final n'existe pas ou est vide!
|
||||
if (save[0] != '\0' && !IS_DELAYED_EXT(save) && fsize_utf8(fconv(catbuff, sizeof(catbuff), save)) <= 0) { // fichier final n'existe pas ou est vide!
|
||||
int found = 0;
|
||||
|
||||
/* It is possible that the file has been moved due to changes in build structure */
|
||||
@@ -1572,10 +1592,10 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
if (r.is_write && previous_save[0] != '\0') {
|
||||
/* Exists, but with another (old) filename: rename (almost) silently */
|
||||
if (strcmp(previous_save, save) != 0
|
||||
&& fexist_utf8(fconv(catbuff, previous_save))) {
|
||||
rename(fconv(catbuff, previous_save),
|
||||
fconv(catbuff2, save));
|
||||
if (fexist_utf8(fconv(catbuff, save))) {
|
||||
&& fexist_utf8(fconv(catbuff, sizeof(catbuff), previous_save))) {
|
||||
rename(fconv(catbuff, sizeof(catbuff), previous_save),
|
||||
fconv(catbuff2, sizeof(catbuff2), save));
|
||||
if (fexist_utf8(fconv(catbuff, sizeof(catbuff), save))) {
|
||||
found = 1;
|
||||
hts_log_print(opt, LOG_DEBUG,
|
||||
"File '%s' has been renamed since last mirror to '%s' ; applying changes",
|
||||
@@ -1601,8 +1621,8 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
// sinon, le fichier est ok à priori, mais on renverra un if-modified-since pour
|
||||
// en être sûr
|
||||
if (opt->norecatch) { // tester norecatch
|
||||
if (!fexist_utf8(fconv(catbuff, save))) { // fichier existe pas mais déclaré: on l'a effacé
|
||||
FILE *fp = FOPEN(fconv(catbuff, save), "wb");
|
||||
if (!fexist_utf8(fconv(catbuff, sizeof(catbuff), save))) { // fichier existe pas mais déclaré: on l'a effacé
|
||||
FILE *fp = FOPEN(fconv(catbuff, sizeof(catbuff), save), "wb");
|
||||
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
@@ -1684,6 +1704,7 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
// finalize transfer
|
||||
if (!test) {
|
||||
if (back[p].r.statuscode > 0) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing in back_add");
|
||||
back_finalize(opt, cache, sback, p);
|
||||
}
|
||||
}
|
||||
@@ -1760,7 +1781,7 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
}
|
||||
/* Not in cache ; maybe in temporary cache ? Warning: non-movable "url_sav" */
|
||||
else if (back_unserialize_ref(opt, adr, fil, &itemback) == 0) {
|
||||
const long file_size = fsize_utf8(itemback->url_sav);
|
||||
const off_t file_size = fsize_utf8(itemback->url_sav);
|
||||
|
||||
/* Found file on disk */
|
||||
if (file_size > 0) {
|
||||
@@ -1795,7 +1816,7 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
}
|
||||
/* Not in cache or temporary cache ; found on disk ? (hack) */
|
||||
else if (fexist_utf8(save)) {
|
||||
off_t sz = fsize_utf8(save);
|
||||
const off_t sz = fsize_utf8(save);
|
||||
|
||||
// Bon, là il est possible que le fichier ait été partiellement transféré
|
||||
// (s'il l'avait été en totalité il aurait été inscrit dans le cache ET existerait sur disque)
|
||||
@@ -1892,17 +1913,18 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
// recopier proxy
|
||||
if ((back[p].r.req.proxy.active = opt->proxy.active)) {
|
||||
if (StringBuff(opt->proxy.bindhost) != NULL)
|
||||
strcpybuff(back[p].r.req.proxy.bindhost,
|
||||
StringBuff(opt->proxy.bindhost));
|
||||
back[p].r.req.proxy.bindhost = StringBuff(opt->proxy.bindhost);
|
||||
if (StringBuff(opt->proxy.name) != NULL)
|
||||
strcpybuff(back[p].r.req.proxy.name, StringBuff(opt->proxy.name));
|
||||
back[p].r.req.proxy.name = StringBuff(opt->proxy.name);
|
||||
back[p].r.req.proxy.port = opt->proxy.port;
|
||||
}
|
||||
// et user-agent
|
||||
strcpy(back[p].r.req.user_agent, StringBuff(opt->user_agent));
|
||||
strcpy(back[p].r.req.referer, StringBuff(opt->referer));
|
||||
strcpy(back[p].r.req.from, StringBuff(opt->from));
|
||||
strcpy(back[p].r.req.lang_iso, StringBuff(opt->lang_iso));
|
||||
back[p].r.req.user_agent = StringBuff(opt->user_agent);
|
||||
back[p].r.req.referer = StringBuff(opt->referer);
|
||||
back[p].r.req.from = StringBuff(opt->from);
|
||||
back[p].r.req.lang_iso = StringBuff(opt->lang_iso);
|
||||
back[p].r.req.accept = StringBuff(opt->accept);
|
||||
back[p].r.req.headers = StringBuff(opt->headers);
|
||||
back[p].r.req.user_agent_send = opt->user_agent_send;
|
||||
// et http11
|
||||
back[p].r.req.http11 = back[p].http11;
|
||||
@@ -1931,26 +1953,6 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#if HTS_USEMMS
|
||||
else if (strfield(back[p].url_adr, "mms://")) {
|
||||
MMSDownloadStruct str;
|
||||
|
||||
if (back[p].testmode) {
|
||||
hts_log_print(opt, LOG_DEBUG,
|
||||
"error: forbidden test with mms link for back_add");
|
||||
return -1; // erreur pas de test permis
|
||||
}
|
||||
if (back[p].r.req.proxy.active) {
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
"warning: direct connection for mms links (proxy settings ignored)");
|
||||
}
|
||||
back[p].status = STATUS_FTP_TRANSFER; // connexion externe
|
||||
str.pBack = &back[p];
|
||||
str.pOpt = opt;
|
||||
launch_mms(&str);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#if HTS_USEOPENSSL
|
||||
else if (strfield(back[p].url_adr, "https://")) { // let's rock
|
||||
back[p].r.ssl = 1;
|
||||
@@ -2047,7 +2049,7 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
#if HTS_XCONN
|
||||
back[p].status = STATUS_CONNECTING; // connexion en cours
|
||||
#else
|
||||
back[p].status = 99; // chargement en tête en cours
|
||||
back[p].status = STATUS_WAIT_HEADERS; // chargement en tête en cours
|
||||
#endif
|
||||
else
|
||||
back[p].status = 1; // chargement fichier
|
||||
@@ -2113,152 +2115,39 @@ int back_add(struct_back * sback, httrackp * opt, cache_back * cache, char *adr,
|
||||
}
|
||||
|
||||
#if HTS_XGETHOST
|
||||
#if USE_BEGINTHREAD
|
||||
// lancement multithread du robot
|
||||
typedef struct {
|
||||
char iadr_p[HTS_URLMAXSIZE];
|
||||
httrackp *opt;
|
||||
} HostlookupStruct;
|
||||
void Hostlookup(void *pP) {
|
||||
HostlookupStruct *str = (HostlookupStruct *) pP;
|
||||
char iadr[256];
|
||||
t_dnscache *cache = _hts_cache(str->opt); // adresse du cache
|
||||
t_hostent *hp;
|
||||
int error_found = 0;
|
||||
|
||||
// recopier (après id:pass)
|
||||
#if DEBUGDNS
|
||||
printf("resolv in background: %s\n", jump_identification(iadr_p));
|
||||
#endif
|
||||
strcpybuff(iadr, jump_identification(str->iadr_p));
|
||||
// couper éventuel :
|
||||
{
|
||||
char *a;
|
||||
|
||||
if ((a = jump_toport(iadr)))
|
||||
*a = '\0'; // get rid of it
|
||||
}
|
||||
freet(pP);
|
||||
|
||||
hts_mutexlock(&dns_lock);
|
||||
|
||||
while(cache->n) {
|
||||
if (strcmp(cache->iadr, iadr) == 0) {
|
||||
error_found = 1;
|
||||
}
|
||||
cache = cache->n; // calculer queue
|
||||
}
|
||||
if (strcmp(cache->iadr, iadr) == 0) {
|
||||
error_found = 1;
|
||||
}
|
||||
|
||||
if (!error_found) {
|
||||
// en gros copie de hts_gethostbyname sans le return
|
||||
cache->n = (t_dnscache *) calloct(1, sizeof(t_dnscache));
|
||||
if (cache->n != NULL) {
|
||||
t_fullhostent fullhostent_buffer;
|
||||
|
||||
strcpybuff(cache->n->iadr, iadr);
|
||||
cache->n->host_length = 0; /* pour le moment rien */
|
||||
cache->n->n = NULL;
|
||||
|
||||
/* resolve */
|
||||
#if DEBUGDNS
|
||||
printf("gethostbyname() in progress for %s\n", iadr);
|
||||
#endif
|
||||
cache->n->host_length = -1;
|
||||
memset(cache->n->host_addr, 0, sizeof(cache->n->host_addr));
|
||||
hp = vxgethostbyname(iadr, &fullhostent_buffer);
|
||||
if (hp != NULL) {
|
||||
memcpy(cache->n->host_addr, hp->h_addr, hp->h_length);
|
||||
cache->n->host_length = hp->h_length;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#if DEBUGDNS
|
||||
printf("aborting resolv for %s (found)\n", iadr);
|
||||
#endif
|
||||
}
|
||||
|
||||
hts_mutexrelease(&dns_lock);
|
||||
|
||||
#if DEBUGDNS
|
||||
printf("quitting resolv for %s (result: %d)\n", iadr,
|
||||
(cache->n != NULL) ? cache->n->host_length : (-999));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// attendre que le host (ou celui du proxy) ait été résolu
|
||||
// si c'est un fichier, la résolution est immédiate
|
||||
// idem pour ftp://
|
||||
void back_solve(httrackp * opt, lien_back * back) {
|
||||
assertf(opt != NULL);
|
||||
assertf(back != NULL);
|
||||
if ((!strfield(back->url_adr, "file://"))
|
||||
&& !strfield(back->url_adr, "ftp://")
|
||||
#if HTS_USEMMS
|
||||
&& !strfield(back->url_adr, "mms://")
|
||||
#endif
|
||||
) {
|
||||
//## if (back->url_adr[0]!=lOCAL_CHAR) { // qq chose à préparer
|
||||
const char *a;
|
||||
|
||||
if (!(back->r.req.proxy.active))
|
||||
a = back->url_adr;
|
||||
else
|
||||
a = back->r.req.proxy.name;
|
||||
assertf(a != NULL);
|
||||
a = jump_protocol(a);
|
||||
if (!hts_dnstest(opt, a)) { // non encore testé!..
|
||||
// inscire en thread
|
||||
#ifdef _WIN32
|
||||
// Windows
|
||||
#if USE_BEGINTHREAD
|
||||
{
|
||||
HostlookupStruct *str =
|
||||
(HostlookupStruct *) malloct(sizeof(HostlookupStruct));
|
||||
if (str) {
|
||||
strcpybuff(str->iadr_p, a);
|
||||
str->opt = opt;
|
||||
hts_newthread(Hostlookup, str);
|
||||
}
|
||||
}
|
||||
#else
|
||||
/*t_hostent* h= */
|
||||
/*hts_gethostbyname(a); */// calcul
|
||||
#endif
|
||||
#else
|
||||
#if USE_BEGINTHREAD
|
||||
char *p = calloct(strlen(a) + 2, 1);
|
||||
|
||||
if (p) {
|
||||
strcpybuff(p, a);
|
||||
hts_newthread(Hostlookup, p);
|
||||
}
|
||||
#else
|
||||
// Sous Unix, le gethostbyname() est bloquant..
|
||||
/*t_hostent* h= */
|
||||
/*hts_gethostbyname(a); */// calcul
|
||||
#endif
|
||||
#endif
|
||||
if (check_hostname_dns(a)) {
|
||||
hts_log_print(opt, LOG_DEBUG, "resolved: %s", a);
|
||||
} else {
|
||||
hts_log_print(opt, LOG_DEBUG, "failed to resolve: %s", a);
|
||||
}
|
||||
//if (hts_dnstest(opt, a, 1) == 2) { // non encore testé!..
|
||||
// hts_log_print(opt, LOG_DEBUG, "resolving in background: %s", a);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
// détermine si le host a pu être résolu
|
||||
int host_wait(httrackp * opt, lien_back * back) {
|
||||
if ((!strfield(back->url_adr, "file://"))
|
||||
&& (!strfield(back->url_adr, "ftp://"))
|
||||
#if HTS_USEMMS
|
||||
&& (!strfield(back->url_adr, "mms://"))
|
||||
#endif
|
||||
) {
|
||||
//## if (back->url_adr[0]!=lOCAL_CHAR) {
|
||||
if (!(back->r.req.proxy.active)) {
|
||||
return (hts_dnstest(opt, back->url_adr));
|
||||
} else {
|
||||
return (hts_dnstest(opt, back->r.req.proxy.name));
|
||||
}
|
||||
} else
|
||||
return 1; // prêt, fichier local
|
||||
// Always synchronous. No more background DNS resolution
|
||||
// (does not really improve performances)
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2283,7 +2172,7 @@ static int slot_can_be_finalized(httrackp * opt, const lien_back * back) {
|
||||
&& !may_be_hypertext_mime(opt, back->r.contenttype, back->url_fil) // may NOT be parseable mime type
|
||||
/* Has not been added before the heap saw the link, or now exists on heap */
|
||||
&& (!back->early_add
|
||||
|| hash_read(opt->hash, back->url_sav, "", 0, opt->urlhack) >= 0);
|
||||
|| hash_read(opt->hash, back->url_sav, NULL, HASH_STRUCT_FILENAME) >= 0);
|
||||
}
|
||||
|
||||
void back_clean(httrackp * opt, cache_back * cache, struct_back * sback) {
|
||||
@@ -2305,10 +2194,10 @@ void back_clean(httrackp * opt, cache_back * cache, struct_back * sback) {
|
||||
//}
|
||||
/* MANDATORY if we don't want back_fill() to endlessly put the same file on download! */
|
||||
{
|
||||
int index = hash_read(opt->hash, back[i].url_sav, "", 0, opt->urlhack); // lecture type 0 (sav)
|
||||
int index = hash_read(opt->hash, back[i].url_sav, NULL, HASH_STRUCT_FILENAME ); // lecture type 0 (sav)
|
||||
|
||||
if (index >= 0) {
|
||||
opt->hash->liens[index]->pass2 = -1; /* DONE! */
|
||||
opt->liens[index]->pass2 = -1; /* DONE! */
|
||||
} else {
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
"engine: warning: entry cleaned up, but no trace on heap: %s%s (%s)",
|
||||
@@ -2365,9 +2254,23 @@ void back_clean(httrackp * opt, cache_back * cache, struct_back * sback) {
|
||||
if (!back[i].r.keep_alive || back[i].r.soc == INVALID_SOCKET
|
||||
|| back[i].r.keep_alive_max < 1
|
||||
|| time_local() >= back[i].ka_time_start + back[i].r.keep_alive_t) {
|
||||
const char *reason = "unknown";
|
||||
char buffer[128];
|
||||
if (!back[i].r.keep_alive) {
|
||||
reason = "not keep-alive";
|
||||
} else if (back[i].r.soc == INVALID_SOCKET) {
|
||||
reason = "closed";
|
||||
} else if (back[i].r.keep_alive_max < 1) {
|
||||
reason = "keep-alive-max reached";
|
||||
} else if (time_local() >= back[i].ka_time_start + back[i].r.keep_alive_t) {
|
||||
assertf(back[i].ka_time_start != 0);
|
||||
snprintf(buffer, sizeof(buffer), "keep-alive timeout = %ds)",
|
||||
(int) back[i].r.keep_alive_t);
|
||||
reason = buffer;
|
||||
}
|
||||
hts_log_print(opt, LOG_DEBUG,
|
||||
"(Keep-Alive): live socket closed #%d (%s)",
|
||||
back[i].r.debugid, back[i].url_adr);
|
||||
"(Keep-Alive): live socket #%d (%s) closed (%s)",
|
||||
back[i].r.debugid, back[i].url_adr, reason);
|
||||
back_delete(opt, cache, sback, i); // delete backing entry
|
||||
}
|
||||
}
|
||||
@@ -2499,9 +2402,12 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
|
||||
// vérification de sécurité
|
||||
if (back[i].r.soc != INVALID_SOCKET) { // hey, you never know..
|
||||
// Do not endlessly wait when receiving SSL http data (Patrick Pfeifer)
|
||||
if (
|
||||
// Do not endlessly wait when receiving SSL http data (Patrick Pfeifer)
|
||||
#if HTS_USEOPENSSL
|
||||
if (!(back[i].r.ssl && back[i].status > 0 && back[i].status < 1000)) {
|
||||
!back[i].r.ssl &&
|
||||
#endif
|
||||
back[i].status > 0 && back[i].status < 1000) {
|
||||
do_wait = 1;
|
||||
|
||||
// noter socket read
|
||||
@@ -2522,7 +2428,6 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
nfds = back[i].r.soc;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
back[i].r.statuscode = STATUSCODE_CONNERROR;
|
||||
if (back[i].status == STATUS_CONNECTING)
|
||||
@@ -2553,7 +2458,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
#if HTS_WIDE_DEBUG
|
||||
DEBUG_W("select\n");
|
||||
#endif
|
||||
select(nfds, &fds, &fds_c, &fds_e, &tv);
|
||||
select((int) nfds, &fds, &fds_c, &fds_e, &tv);
|
||||
#if HTS_WIDE_DEBUG
|
||||
DEBUG_W("select done\n");
|
||||
#endif
|
||||
@@ -2631,7 +2536,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
back[i].r.ssl_con = SSL_new(openssl_ctx);
|
||||
if (back[i].r.ssl_con) {
|
||||
SSL_clear(back[i].r.ssl_con);
|
||||
if (SSL_set_fd(back[i].r.ssl_con, back[i].r.soc) == 1) {
|
||||
if (SSL_set_fd(back[i].r.ssl_con, (int) back[i].r.soc) == 1) {
|
||||
SSL_set_connect_state(back[i].r.ssl_con);
|
||||
back[i].status = STATUS_SSL_WAIT_HANDSHAKE; /* handshake wait */
|
||||
} else
|
||||
@@ -2687,7 +2592,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
back[i].url_adr, back[i].url_fil,
|
||||
back[i].referer_adr, back[i].referer_fil,
|
||||
&back[i].r);
|
||||
back[i].status = 99; // attendre en tête maintenant
|
||||
back[i].status = STATUS_WAIT_HEADERS; // attendre en tête maintenant
|
||||
}
|
||||
}
|
||||
// attente gethostbyname
|
||||
@@ -2809,6 +2714,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
back_set_finished(sback, i);
|
||||
// finalize transfer
|
||||
if (back[i].r.statuscode > 0) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing ftp");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
}
|
||||
}
|
||||
@@ -2819,6 +2725,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
back_set_finished(sback, i);
|
||||
// finalize transfer
|
||||
if (back[i].r.statuscode > 0) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing ftp");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
}
|
||||
} else if ((back[i].status > 0) && (back[i].status < 1000)) { // en réception http
|
||||
@@ -2874,27 +2781,11 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
if (back[i].r.compressed &&
|
||||
/* .gz are *NOT* depacked!! */
|
||||
(strfield
|
||||
(get_ext(catbuff, back[i].url_sav), "gz") == 0)
|
||||
(get_ext(catbuff, sizeof(catbuff), back[i].url_sav), "gz") == 0)
|
||||
) {
|
||||
#if 1
|
||||
#ifdef _WIN32
|
||||
#undef tempnam
|
||||
#define tempnam _tempnam
|
||||
#endif
|
||||
char *const tmp =
|
||||
tempnam(NULL, "httrack_temporaryGzipFile_");
|
||||
if (tmp != NULL) {
|
||||
strcpybuff(back[i].tmpfile_buffer, tmp);
|
||||
free(tmp);
|
||||
back[i].tmpfile = back[i].tmpfile_buffer;
|
||||
} else {
|
||||
back[i].tmpfile = NULL;
|
||||
}
|
||||
#else
|
||||
back[i].tmpfile_buffer[0] = '\0';
|
||||
back[i].tmpfile = tmpnam(back[p].tmpfile_buffer);
|
||||
#endif
|
||||
if (back[i].tmpfile != NULL && back[i].tmpfile[0]) {
|
||||
if (create_back_tmpfile(opt, &back[i]) == 0) {
|
||||
assertf(back[i].tmpfile != NULL);
|
||||
/* note: tmpfile is utf-8 */
|
||||
if ((back[i].r.out =
|
||||
FOPEN(back[i].tmpfile, "wb")) == NULL) {
|
||||
last_errno = errno;
|
||||
@@ -2935,12 +2826,18 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
"* * Fatal write error, giving up");
|
||||
}
|
||||
back[i].r.is_write = 0; // erreur, abandonner
|
||||
back[i].status = STATUS_READY; // terminé
|
||||
back_set_finished(sback, i);
|
||||
if (back[i].r.soc != INVALID_SOCKET) {
|
||||
deletehttp(&back[i].r);
|
||||
back[i].r.soc = INVALID_SOCKET;
|
||||
}
|
||||
} else {
|
||||
#ifndef _WIN32
|
||||
chmod(back[i].url_sav, HTS_ACCESS_FILE);
|
||||
#endif
|
||||
/* create a temporary reference file in case of broken mirror */
|
||||
if (back[i].r.out != NULL) {
|
||||
if (back[i].r.out != NULL && opt->cache != 0) {
|
||||
if (back_serialize_ref(opt, &back[i]) != 0) {
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
"Could not create temporary reference file for %s%s",
|
||||
@@ -3012,7 +2909,6 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
} else
|
||||
retour_fread =
|
||||
(int) http_xfread1(&(back[i].r), (int) max_read_bytes);
|
||||
// retour_fread=http_fread1(&(back[i].r));
|
||||
} else
|
||||
retour_fread = READ_EOF; // interruption ou annulation interne (peut ne pas être une erreur)
|
||||
|
||||
@@ -3079,6 +2975,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
// finalize transfer
|
||||
if (back[i].r.statuscode > 0 && !IS_DELAYED_EXT(back[i].url_sav)
|
||||
) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing regular file");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
}
|
||||
|
||||
@@ -3236,6 +3133,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
|
||||
// finalize transfer if not temporary
|
||||
if (!IS_DELAYED_EXT(back[i].url_sav)) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing at chunk end");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
} else {
|
||||
if (back[i].r.statuscode == HTTP_OK) {
|
||||
@@ -3699,6 +3597,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
// finalize
|
||||
//file_notify(back[i].url_adr, back[i].url_fil, back[i].url_sav, 0, 0, back[i].r.notmodified); // not modified
|
||||
if (back[i].r.statuscode > 0) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing after cache load");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
}
|
||||
#if DEBUGCA
|
||||
@@ -3732,6 +3631,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
back_set_finished(sback, i);
|
||||
// finalize
|
||||
if (back[i].r.statuscode > 0) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing redirect & 4xx");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
}
|
||||
#endif
|
||||
@@ -3759,8 +3659,8 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
file_notify(opt, back[i].url_adr, back[i].url_fil,
|
||||
back[i].url_sav, 0, 1,
|
||||
back[i].r.notmodified);
|
||||
back[i].r.out = FOPEN(fconv(catbuff, back[i].url_sav), "ab"); // append
|
||||
if (back[i].r.out) {
|
||||
back[i].r.out = FOPEN(fconv(catbuff, sizeof(catbuff), back[i].url_sav), "ab"); // append
|
||||
if (back[i].r.out && opt->cache != 0) {
|
||||
back[i].r.is_write = 1; // écrire
|
||||
back[i].r.size = sz; // déja écrit
|
||||
back[i].r.statuscode = HTTP_OK; // Forcer 'OK'
|
||||
@@ -3785,7 +3685,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
}
|
||||
} else { // mémoire
|
||||
FILE *fp =
|
||||
FOPEN(fconv(catbuff, back[i].url_sav), "rb");
|
||||
FOPEN(fconv(catbuff, sizeof(catbuff), back[i].url_sav), "rb");
|
||||
if (fp) {
|
||||
LLint alloc_mem = sz + 1;
|
||||
|
||||
@@ -3858,6 +3758,7 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
&& (back[i].r.adr = (char *) malloct(2))) {
|
||||
back[i].r.adr[0] = 0;
|
||||
}
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing empty");
|
||||
back_finalize(opt, cache, sback, i);
|
||||
} else if (!back[i].r.is_chunk) { // pas de chunk
|
||||
//if (back[i].r.http11!=2) { // pas de chunk
|
||||
@@ -4019,9 +3920,8 @@ int back_checksize(httrackp * opt, lien_back * eback, int check_only_totalsize)
|
||||
if (size_to_test >= 0) {
|
||||
|
||||
/* Interdiction taille par le wizard? */
|
||||
if (hts_testlinksize
|
||||
(opt, eback->url_adr, eback->url_fil,
|
||||
eback->r.totalsize / 1024) == -1) {
|
||||
if (hts_testlinksize(opt, eback->url_adr, eback->url_fil,
|
||||
size_to_test / 1024) == -1) {
|
||||
return 0; /* interdit */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -69,7 +68,7 @@ typedef struct htsblk htsblk;
|
||||
#ifdef HTS_INTERNAL_BYTECODE
|
||||
|
||||
// create/destroy
|
||||
struct_back *back_new(int back_max);
|
||||
struct_back *back_new(httrackp *opt, int back_max);
|
||||
void back_free(struct_back ** sback);
|
||||
|
||||
// backing
|
||||
@@ -139,12 +138,6 @@ int host_wait(httrackp * opt, lien_back * sback);
|
||||
int back_checksize(httrackp * opt, lien_back * eback, int check_only_totalsize);
|
||||
int back_checkmirror(httrackp * opt);
|
||||
|
||||
#if HTS_XGETHOST
|
||||
#if USE_BEGINTHREAD
|
||||
void Hostlookup(void *iadr_p);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
247
src/htsbase.h
247
src/htsbase.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -41,6 +40,7 @@ extern "C" {
|
||||
|
||||
#include "htsglobal.h"
|
||||
#include "htsstrings.h"
|
||||
#include "htssafe.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
@@ -68,10 +68,12 @@ extern "C" {
|
||||
#ifdef __GNUC__
|
||||
#define HTS_UNUSED __attribute__ ((unused))
|
||||
#define HTS_STATIC static __attribute__ ((unused))
|
||||
#define HTS_INLINE __inline__
|
||||
#define HTS_PRINTF_FUN(fmt, arg) __attribute__ ((format (printf, fmt, arg)))
|
||||
#else
|
||||
#define HTS_UNUSED
|
||||
#define HTS_STATIC static
|
||||
#define HTS_INLINE
|
||||
#define HTS_PRINTF_FUN(fmt, arg)
|
||||
#endif
|
||||
#endif
|
||||
@@ -105,237 +107,6 @@ extern "C" {
|
||||
#define DynamicGet(handle, sym) dlsym(handle, sym)
|
||||
#endif
|
||||
|
||||
// emergency log
|
||||
typedef void (*t_abortLog) (char *msg, char *file, int line);
|
||||
extern HTSEXT_API t_abortLog abortLog__;
|
||||
#define abortLog(a) abortLog__(a, __FILE__, __LINE__)
|
||||
#define _ ,
|
||||
#ifndef _WIN32_WCE
|
||||
#define abortLogFmt(a) do { \
|
||||
FILE* fp = fopen("CRASH.TXT", "wb"); \
|
||||
if (!fp) fp = fopen("/tmp/CRASH.TXT", "wb"); \
|
||||
if (!fp) fp = fopen("C:\\CRASH.TXT", "wb"); \
|
||||
if (!fp) fp = fopen("\\Temp\\CRASH.TXT", "wb"); \
|
||||
if (!fp) fp = fopen("\\CRASH.TXT", "wb"); \
|
||||
if (!fp) fp = fopen("CRASH.TXT", "wb"); \
|
||||
if (fp) { \
|
||||
fprintf(fp, "HTTrack " HTTRACK_VERSIONID " closed at '" __FILE__ "', line %d\r\n", __LINE__); \
|
||||
fprintf(fp, "Reason:\r\n"); \
|
||||
fprintf(fp, a); \
|
||||
fprintf(fp, "\r\n"); \
|
||||
fflush(fp); \
|
||||
fclose(fp); \
|
||||
} \
|
||||
} while(0)
|
||||
#else
|
||||
#define abortLogFmt(a) do { \
|
||||
XCEShowMessageA("HTTrack " HTTRACK_VERSIONID " closed at '" __FILE__ "', line %d\r\nReason:\r\n%s\r\n", __LINE__, a); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#define assertf(exp) do { \
|
||||
if (! ( exp ) ) { \
|
||||
abortLog("assert failed: " #exp); \
|
||||
if (htsCallbackErr != NULL) { \
|
||||
htsCallbackErr("assert failed: " #exp, __FILE__ , __LINE__ ); \
|
||||
} \
|
||||
assert(exp); \
|
||||
abort(); \
|
||||
} \
|
||||
} while(0)
|
||||
/* non-fatal assert */
|
||||
#define assertnf(exp) do { \
|
||||
if (! ( exp ) ) { \
|
||||
abortLog("assert failed: " #exp); \
|
||||
if (htsCallbackErr != NULL) { \
|
||||
htsCallbackErr("assert failed: " #exp, __FILE__ , __LINE__ ); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* regular malloc's() */
|
||||
#ifndef HTS_TRACE_MALLOC
|
||||
#define malloct(A) malloc(A)
|
||||
#define calloct(A,B) calloc((A), (B))
|
||||
#define freet(A) do { assertnf((A) != NULL); if ((A) != NULL) { free(A); (A) = NULL; } } while(0)
|
||||
#define strdupt(A) strdup(A)
|
||||
#define realloct(A,B) ( ((A) != NULL) ? realloc((A), (B)) : malloc(B) )
|
||||
#define memcpybuff(A, B, N) memcpy((A), (B), (N))
|
||||
#else
|
||||
/* debug version */
|
||||
#define malloct(A) hts_malloc(A)
|
||||
#define calloct(A,B) hts_calloc(A,B)
|
||||
#define strdupt(A) hts_strdup(A)
|
||||
#define freet(A) do { hts_free(A); (A) = NULL; } while(0)
|
||||
#define realloct(A,B) hts_realloc(A,B)
|
||||
void hts_freeall();
|
||||
void *hts_malloc(size_t);
|
||||
void *hts_calloc(size_t, size_t);
|
||||
char *hts_strdup(char *);
|
||||
void *hts_xmalloc(size_t, size_t);
|
||||
void hts_free(void *);
|
||||
void *hts_realloc(void *, size_t);
|
||||
mlink *hts_find(char *adr);
|
||||
/* protected memcpy */
|
||||
#define memcpybuff(A, B, N) do { \
|
||||
mlink* lnk = hts_find((void*)(A)); \
|
||||
if (lnk != NULL) { \
|
||||
assertf(lnk != NULL); \
|
||||
assertf( * ( (t_htsboundary*) ( ((char*) lnk->adr) - sizeof(htsboundary) ) ) == htsboundary ); \
|
||||
assertf( * ( (t_htsboundary*) ( ((char*) lnk->adr) + lnk->len ) ) == htsboundary ); \
|
||||
assertf( ( ((char*)(A)) + (N)) < (char*) (lnk->adr + lnk->len) ); \
|
||||
} \
|
||||
memcpy(A, B, N); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
||||
typedef void (*htsErrorCallback) (char *msg, char *file, int line);
|
||||
extern HTSEXT_API htsErrorCallback htsCallbackErr;
|
||||
extern HTSEXT_API int htsMemoryFastXfr;
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
#define stringdup()
|
||||
|
||||
#ifdef STRDEBUG
|
||||
|
||||
/* protected strcat, strncat and strcpy - definitely useful */
|
||||
#define strcatbuff(A, B) do { \
|
||||
assertf( (A) != NULL ); \
|
||||
assertf( (B) != NULL ); \
|
||||
if (htsMemoryFastXfr) { \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
(A)[sizeof(A) - 1] = '\0'; \
|
||||
} \
|
||||
strcat(A, B); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf((A)[sizeof(A) - 1] == '\0'); \
|
||||
} \
|
||||
} else { \
|
||||
unsigned int sz = (unsigned int) strlen(A); \
|
||||
unsigned int szf = (unsigned int) strlen(B); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf(sz + szf + 1 < sizeof(A)); \
|
||||
if (szf > 0) { \
|
||||
if (sz + szf + 1 < sizeof(A)) { \
|
||||
memcpy((A) + sz, (B), szf + 1); \
|
||||
} \
|
||||
} \
|
||||
} else if (szf > 0) { \
|
||||
memcpybuff((A) + sz, (B), szf + 1); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
#define strncatbuff(A, B, N) do { \
|
||||
assertf( (A) != NULL ); \
|
||||
assertf( (B) != NULL ); \
|
||||
if (htsMemoryFastXfr) { \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
(A)[sizeof(A) - 1] = '\0'; \
|
||||
} \
|
||||
strncat(A, B, N); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf((A)[sizeof(A) - 1] == '\0'); \
|
||||
} \
|
||||
} else { \
|
||||
unsigned int sz = (unsigned int) strlen(A); \
|
||||
unsigned int szf = (unsigned int) strlen(B); \
|
||||
if (szf > (unsigned int) (N)) szf = (unsigned int) (N); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf(sz + szf + 1 < sizeof(A)); \
|
||||
if (szf > 0) { \
|
||||
if (sz + szf + 1 < sizeof(A)) { \
|
||||
memcpy((A) + sz, (B), szf); \
|
||||
* ( (A) + sz + szf) = '\0'; \
|
||||
} \
|
||||
} \
|
||||
} else if (szf > 0) { \
|
||||
memcpybuff((A) + sz, (B), szf); \
|
||||
* ( (A) + sz + szf) = '\0'; \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
#define strcpybuff(A, B) do { \
|
||||
assertf( (A) != NULL ); \
|
||||
assertf( (const char*) (B) != NULL ); \
|
||||
if (htsMemoryFastXfr) { \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
(A)[sizeof(A) - 1] = '\0'; \
|
||||
} \
|
||||
strcpy(A, B); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf((A)[sizeof(A) - 1] == '\0'); \
|
||||
} \
|
||||
} else { \
|
||||
unsigned int szf = (unsigned int) strlen(B); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf(szf + 1 < sizeof(A)); \
|
||||
if (szf > 0) { \
|
||||
if (szf + 1 < sizeof(A)) { \
|
||||
memcpy((A), (B), szf + 1); \
|
||||
} else { \
|
||||
* (A) = '\0'; \
|
||||
} \
|
||||
} else { \
|
||||
* (A) = '\0'; \
|
||||
} \
|
||||
} else { \
|
||||
memcpybuff((A), (B), szf + 1); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
|
||||
#ifdef STRDEBUGFAST
|
||||
|
||||
/* protected strcat, strncat and strcpy - definitely useful */
|
||||
#define strcatbuff(A, B) do { \
|
||||
assertf( (A) != NULL ); \
|
||||
assertf( (B) != NULL ); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
(A)[sizeof(A) - 1] = '\0'; \
|
||||
} \
|
||||
strcat(A, B); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf((A)[sizeof(A) - 1] == '\0'); \
|
||||
} \
|
||||
} while(0)
|
||||
#define strncatbuff(A, B, N) do { \
|
||||
assertf( (A) != NULL ); \
|
||||
assertf( (B) != NULL ); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
(A)[sizeof(A) - 1] = '\0'; \
|
||||
} \
|
||||
strncat(A, B, N); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf((A)[sizeof(A) - 1] == '\0'); \
|
||||
} \
|
||||
} while(0)
|
||||
#define strcpybuff(A, B) do { \
|
||||
assertf( (A) != NULL ); \
|
||||
assertf( (B) != NULL ); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
(A)[sizeof(A) - 1] = '\0'; \
|
||||
} \
|
||||
strcpy(A, B); \
|
||||
if (sizeof(A) != sizeof(char*)) { \
|
||||
assertf((A)[sizeof(A) - 1] == '\0'); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
|
||||
#define strcatbuff strcat
|
||||
#define strncatbuff strncat
|
||||
#define strcpybuff strcpy
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -41,7 +40,6 @@ Please visit our Website: http://www.httrack.com
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#undef HTS_USESCOPEID
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
// KB955045 (http://support.microsoft.com/kb/955045)
|
||||
@@ -53,10 +51,6 @@ Please visit our Website: http://www.httrack.com
|
||||
#include <Wspiapi.h>
|
||||
//#include <winsock2.h>
|
||||
//#include <tpipv6.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <socket.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
59
src/htsbasiccharsets.sh
Executable file
59
src/htsbasiccharsets.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
# Change this to download files
|
||||
if false; then
|
||||
echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-*.TXT" | lftp
|
||||
echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP*.TXT" | lftp
|
||||
echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP*.TXT" | lftp
|
||||
echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP*.TXT" | lftp
|
||||
echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP*.TXT" | lftp
|
||||
echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8*.TXT" | lftp
|
||||
rm -f CP932.TXT CP936.TXT CP949.TXT CP950.TXT
|
||||
fi
|
||||
|
||||
# Produce code
|
||||
printf "/** GENERATED FILE ($0), DO NOT EDIT **/\n\n"
|
||||
for i in *.TXT ; do
|
||||
echo "processing $i" >&2
|
||||
grep -vE "^(#|$)" $i | grep -E "^0x" | sed -e 's/[[:space:]]/ /g' | cut -f1,2 -d' ' | \
|
||||
(
|
||||
unset arr
|
||||
while read LINE ; do
|
||||
from=$[$(echo $LINE | cut -f1 -d' ')]
|
||||
if ! test -n "$from"; then
|
||||
echo "error with $i" >&2
|
||||
exit 1
|
||||
elif test $from -ge 256; then
|
||||
echo "out-of-range ($LINE) with $i" >&2
|
||||
exit 1
|
||||
fi
|
||||
to=$(echo $LINE | cut -f2 -d' ')
|
||||
arr[$from]=$to
|
||||
done
|
||||
name=$(echo $i | tr 'A-Z' 'a-z' | tr '-' '_' | sed -e 's/\.txt//' -e 's/8859/iso_8859/')
|
||||
printf "/* Table for $i */\nstatic const hts_UCS4 table_${name}[256] = {\n "
|
||||
i=0
|
||||
while test "$i" -lt 256; do
|
||||
if test "$i" -gt 0; then
|
||||
printf ", "
|
||||
if test $[${i}%8] -eq 0; then
|
||||
printf "\n "
|
||||
fi
|
||||
fi
|
||||
value=${arr[$i]:-0}
|
||||
printf "0x%04x" $value
|
||||
i=$[${i}+1]
|
||||
done
|
||||
printf " };\n\n"
|
||||
)
|
||||
echo "processed $i" >&2
|
||||
done
|
||||
|
||||
# Indexes
|
||||
printf "static const struct {\n const char *name;\n const hts_UCS4 *table;\n} table_mappings[] = {\n"
|
||||
for i in *.TXT ; do
|
||||
name=$(echo $i | tr 'A-Z' 'a-z' | tr '-' '_' | sed -e 's/\.txt//' -e 's/8859/iso_8859/')
|
||||
printf " { \"$(echo $name | tr -d '_')\", table_${name} },\n"
|
||||
done
|
||||
printf " { NULL, NULL }\n};\n"
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -13,8 +13,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -126,6 +125,29 @@ int cookie_del(t_cookie * cookie, char *cook_name, char *domain, char *path) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Matches wildcard cookie domains that start with a dot
|
||||
// chk_dom: the domain stored in the cookie (potentially wildcard).
|
||||
// domain: query domain
|
||||
static int cookie_cmp_wildcard_domain(char *chk_dom, char *domain) {
|
||||
const size_t n = strlen(chk_dom);
|
||||
const size_t m = strlen(domain);
|
||||
const size_t l = n < m ? n : m;
|
||||
size_t i;
|
||||
for (i = l - 1; i >= 0; i--) {
|
||||
if (chk_dom[n - i - 1] != domain[m - i - 1]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (m < n && chk_dom[0] == '.') {
|
||||
return 0;
|
||||
}
|
||||
else if (m != n) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// rechercher cookie à partir de la position s (par exemple s=cookie.data)
|
||||
// renvoie pointeur sur ligne, ou NULL si introuvable
|
||||
// path est aligné à droite et cook_name peut être vide (chercher alors tout cookie)
|
||||
@@ -145,15 +167,15 @@ char *cookie_find(char *s, char *cook_name, char *domain, char *path) {
|
||||
//
|
||||
char *chk_dom = cookie_get(buffer, a, 0); // domaine concerné par le cookie
|
||||
|
||||
if ((int) strlen(chk_dom) <= (int) strlen(domain)) {
|
||||
if (strcmp(chk_dom, domain + strlen(domain) - strlen(chk_dom)) == 0) { // même domaine
|
||||
if (((int) strlen(chk_dom) <= (int) strlen(domain) &&
|
||||
strcmp(chk_dom, domain + strlen(domain) - strlen(chk_dom)) == 0) ||
|
||||
!cookie_cmp_wildcard_domain(chk_dom, domain)) { // même domaine
|
||||
//
|
||||
char *chk_path = cookie_get(buffer, a, 2); // chemin concerné par le cookie
|
||||
char *chk_path = cookie_get(buffer, a, 2); // chemin concerné par le cookie
|
||||
|
||||
if ((int) strlen(chk_path) <= (int) strlen(path)) {
|
||||
if (strncmp(path, chk_path, strlen(chk_path)) == 0) { // même chemin
|
||||
return a;
|
||||
}
|
||||
if ((int) strlen(chk_path) <= (int) strlen(path)) {
|
||||
if (strncmp(path, chk_path, strlen(chk_path)) == 0) { // même chemin
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,7 +222,7 @@ int cookie_load(t_cookie * cookie, const char *fpath, const char *name) {
|
||||
do {
|
||||
if (!(find.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
if (!(find.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)) {
|
||||
FILE *fp = fopen(fconcat(catbuff, fpath, find.cFileName), "rb");
|
||||
FILE *fp = fopen(fconcat(catbuff, sizeof(catbuff), fpath, find.cFileName), "rb");
|
||||
|
||||
if (fp) {
|
||||
char cook_name[256];
|
||||
@@ -242,7 +264,7 @@ int cookie_load(t_cookie * cookie, const char *fpath, const char *name) {
|
||||
}
|
||||
fclose(fp);
|
||||
if (cookie_merged)
|
||||
remove(fconcat(catbuff, fpath, find.cFileName));
|
||||
remove(fconcat(catbuff, sizeof(catbuff), fpath, find.cFileName));
|
||||
} // if fp
|
||||
}
|
||||
} while(FindNextFileA(h, &find));
|
||||
@@ -253,7 +275,7 @@ int cookie_load(t_cookie * cookie, const char *fpath, const char *name) {
|
||||
|
||||
// Ensuite, cookies.txt
|
||||
{
|
||||
FILE *fp = fopen(fconcat(catbuff, fpath, name), "rb");
|
||||
FILE *fp = fopen(fconcat(catbuff, sizeof(catbuff), fpath, name), "rb");
|
||||
|
||||
if (fp) {
|
||||
char BIGSTK line[8192];
|
||||
@@ -294,7 +316,7 @@ int cookie_save(t_cookie * cookie, char *name) {
|
||||
|
||||
if (strnotempty(cookie->data)) {
|
||||
char BIGSTK line[8192];
|
||||
FILE *fp = fopen(fconv(catbuff, name), "wb");
|
||||
FILE *fp = fopen(fconv(catbuff, sizeof(catbuff), name), "wb");
|
||||
|
||||
if (fp) {
|
||||
char *a = cookie->data;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
209
src/htscache.c
209
src/htscache.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -148,7 +147,7 @@ void cache_mayadd(httrackp * opt, cache_back * cache, htsblk * r,
|
||||
// cached "fast" header doesn't yet exists
|
||||
if (inthash_read
|
||||
(cache->cached_tests,
|
||||
concat(OPT_GET_BUFF(opt), url_adr, url_fil), NULL) == 0) {
|
||||
concat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), url_adr, url_fil), NULL) == 0) {
|
||||
char BIGSTK tempo[HTS_URLMAXSIZE * 2];
|
||||
|
||||
sprintf(tempo, "%d", (int) r->statuscode);
|
||||
@@ -160,7 +159,7 @@ void cache_mayadd(httrackp * opt, cache_back * cache, htsblk * r,
|
||||
"Cached fast-header response: %s%s is %d",
|
||||
url_adr, url_fil, (int) r->statuscode);
|
||||
inthash_add(cache->cached_tests,
|
||||
concat(OPT_GET_BUFF(opt), url_adr, url_fil),
|
||||
concat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), url_adr, url_fil),
|
||||
(intptr_t) strdupt(tempo));
|
||||
}
|
||||
}
|
||||
@@ -367,10 +366,10 @@ void cache_add(httrackp * opt, cache_back * cache, const htsblk * r,
|
||||
FILE *fp;
|
||||
|
||||
// On recopie le fichier->.
|
||||
off_t file_size = fsize_utf8(fconv(catbuff, url_save));
|
||||
off_t file_size = fsize_utf8(fconv(catbuff, sizeof(catbuff), url_save));
|
||||
|
||||
if (file_size >= 0) {
|
||||
fp = FOPEN(fconv(catbuff, url_save), "rb");
|
||||
fp = FOPEN(fconv(catbuff, sizeof(catbuff), url_save), "rb");
|
||||
if (fp != NULL) {
|
||||
char BIGSTK buff[32768];
|
||||
size_t nl;
|
||||
@@ -752,7 +751,7 @@ static htsblk cache_readex_new(httrackp * opt, cache_back * cache,
|
||||
|
||||
/* Ensure the file is present, because returning a reference to a missing file is useless! */
|
||||
if (!dataincache) { /* Data are supposed to be on disk */
|
||||
if (!fexist_utf8(fconv(catbuff, previous_save))) { // un fichier existe déja
|
||||
if (!fexist_utf8(fconv(catbuff, sizeof(catbuff), previous_save))) { // un fichier existe déja
|
||||
if (!opt->norecatch) {
|
||||
hts_log_print(opt, LOG_DEBUG, "Cache: could not find %s",
|
||||
previous_save);
|
||||
@@ -776,10 +775,10 @@ static htsblk cache_readex_new(httrackp * opt, cache_back * cache,
|
||||
r.msg[0] = '\0';
|
||||
|
||||
// File exists on disk with declared cache name (this is expected!)
|
||||
if (fexist_utf8(fconv(catbuff, previous_save))) { // un fichier existe déja
|
||||
if (fexist_utf8(fconv(catbuff, sizeof(catbuff), previous_save))) { // un fichier existe déja
|
||||
// Expected size ?
|
||||
const size_t fsize =
|
||||
fsize_utf8(fconv(catbuff, previous_save));
|
||||
fsize_utf8(fconv(catbuff, sizeof(catbuff), previous_save));
|
||||
if (fsize == r.size) {
|
||||
// Target name is the previous name, and the file looks good: nothing to do!
|
||||
if (strcmp(previous_save, target_save) == 0) {
|
||||
@@ -791,8 +790,8 @@ static htsblk cache_readex_new(httrackp * opt, cache_back * cache,
|
||||
char catbuff2[CATBUFF_SIZE];
|
||||
|
||||
if (RENAME
|
||||
(fconv(catbuff, previous_save),
|
||||
fconv(catbuff2, target_save)) == 0) {
|
||||
(fconv(catbuff, sizeof(catbuff), previous_save),
|
||||
fconv(catbuff2, sizeof(catbuff2), target_save)) == 0) {
|
||||
// So far so good
|
||||
ok = 1; // plus rien à faire
|
||||
|
||||
@@ -813,9 +812,9 @@ static htsblk cache_readex_new(httrackp * opt, cache_back * cache,
|
||||
}
|
||||
// File exists with the target name and not previous one ?
|
||||
// Suppose a broken mirror, with a file being renamed: OK
|
||||
else if (fexist_utf8(fconv(catbuff, target_save))) {
|
||||
else if (fexist_utf8(fconv(catbuff, sizeof(catbuff), target_save))) {
|
||||
// Expected size ?
|
||||
const size_t fsize = fsize_utf8(fconv(catbuff, target_save));
|
||||
const size_t fsize = fsize_utf8(fconv(catbuff, sizeof(catbuff), target_save));
|
||||
|
||||
if (fsize == r.size) {
|
||||
// So far so good
|
||||
@@ -928,7 +927,7 @@ static htsblk cache_readex_new(httrackp * opt, cache_back * cache,
|
||||
"Previous cache file not found (empty filename)");
|
||||
}
|
||||
} else { /* Read in memory from disk */
|
||||
FILE *const fp = FOPEN(fconv(catbuff, previous_save), "rb");
|
||||
FILE *const fp = FOPEN(fconv(catbuff, sizeof(catbuff), previous_save), "rb");
|
||||
|
||||
if (fp != NULL) {
|
||||
r.adr = (char *) malloct((int) r.size + 4);
|
||||
@@ -1160,7 +1159,7 @@ static htsblk cache_readex_old(httrackp * opt, cache_back * cache,
|
||||
int ok = 0;
|
||||
|
||||
r.is_write = 1; // écrire
|
||||
if (fexist_utf8(fconv(catbuff, save))) { // un fichier existe déja
|
||||
if (fexist_utf8(fconv(catbuff, sizeof(catbuff), save))) { // un fichier existe déja
|
||||
//if (fsize_utf8(fconv(save))==r.size) { // même taille -- NON tant pis (taille mal declaree)
|
||||
ok = 1; // plus rien à faire
|
||||
filenote(&opt->state.strc, save, NULL); // noter comme connu
|
||||
@@ -1230,7 +1229,7 @@ static htsblk cache_readex_old(httrackp * opt, cache_back * cache,
|
||||
strcpybuff(r.msg, "Previous cache file not found (2)");
|
||||
} else { /* Read in memory from cache */
|
||||
if (strnotempty(return_save) && fexist_utf8(return_save)) {
|
||||
FILE *fp = FOPEN(fconv(catbuff, return_save), "rb");
|
||||
FILE *fp = FOPEN(fconv(catbuff, sizeof(catbuff), return_save), "rb");
|
||||
|
||||
if (fp != NULL) {
|
||||
r.adr = (char *) malloct((size_t) r.size + 4);
|
||||
@@ -1398,7 +1397,7 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
// ---
|
||||
// utilisation du cache: renommer ancien éventuel et charger index
|
||||
hts_log_print(opt, LOG_DEBUG, "Cache: enabled=%d, base=%s, ro=%d",
|
||||
(int) opt->cache, fconcat(OPT_GET_BUFF(opt),
|
||||
(int) opt->cache, fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/"), (int) cache->ro);
|
||||
if (opt->cache) {
|
||||
@@ -1407,40 +1406,40 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
#endif
|
||||
if (!cache->ro) {
|
||||
#ifdef _WIN32
|
||||
mkdir(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache"));
|
||||
mkdir(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache"));
|
||||
#else
|
||||
mkdir(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache"),
|
||||
mkdir(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache"),
|
||||
HTS_PROTECT_FOLDER);
|
||||
#endif
|
||||
if ((fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/new.zip")))) { // il existe déja un cache précédent.. renommer
|
||||
if ((fexist(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/new.zip")))) { // il existe déja un cache précédent.. renommer
|
||||
/* Previous cache from the previous cache version */
|
||||
#if 0
|
||||
/* No.. reuse with old httrack releases! */
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"));
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"));
|
||||
#endif
|
||||
/* Previous cache version */
|
||||
if ((fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/new.dat"))) && (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/new.ndx")))) { // il existe déja un cache précédent.. renommer
|
||||
if ((fexist(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/new.dat"))) && (fexist(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/new.ndx")))) { // il existe déja un cache précédent.. renommer
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"));
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"));
|
||||
}
|
||||
@@ -1448,11 +1447,11 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
/* Remove OLD cache */
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip"))) {
|
||||
if (remove
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip")) != 0) {
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"Cache: error while moving previous cache");
|
||||
@@ -1462,8 +1461,8 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
/* Rename */
|
||||
if (hts_rename
|
||||
(opt,
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.zip"), fconcat(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.zip"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip")) != 0) {
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
@@ -1471,33 +1470,33 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
} else {
|
||||
hts_log_print(opt, LOG_DEBUG, "Cache: successfully renamed");
|
||||
}
|
||||
} else if ((fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/new.dat"))) && (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/new.ndx")))) { // il existe déja un cache précédent.. renommer
|
||||
} else if ((fexist(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/new.dat"))) && (fexist(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/new.ndx")))) { // il existe déja un cache précédent.. renommer
|
||||
#if DEBUGCA
|
||||
printf("work with former cache\n");
|
||||
#endif
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"));
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"));
|
||||
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"));
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"));
|
||||
} else { // un des deux (ou les deux) fichiers cache absents: effacer l'autre éventuel
|
||||
@@ -1506,17 +1505,17 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
#endif
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"));
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"));
|
||||
}
|
||||
} else {
|
||||
@@ -1525,30 +1524,30 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
hts_log_print(opt, LOG_DEBUG, "Cache: size %d",
|
||||
(int)
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip")));
|
||||
|
||||
// charger index cache précédent
|
||||
if ((!cache->ro
|
||||
&&
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip")) > 0)
|
||||
|| (cache->ro
|
||||
&&
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.zip")) > 0)
|
||||
) {
|
||||
if (!cache->ro) {
|
||||
cache->zipInput =
|
||||
unzOpen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip"));
|
||||
} else {
|
||||
cache->zipInput =
|
||||
unzOpen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.zip"));
|
||||
}
|
||||
|
||||
@@ -1560,25 +1559,25 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
|
||||
if (!cache->ro) {
|
||||
name =
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.zip");
|
||||
} else {
|
||||
name =
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.zip");
|
||||
}
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
"Cache: damaged cache, trying to repair");
|
||||
if (unzRepair
|
||||
(name,
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/repair.zip"), fconcat(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/repair.zip"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/repair.tmp"),
|
||||
&repaired, &repairedBytes) == Z_OK) {
|
||||
unlink(name);
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/repair.zip"), name);
|
||||
cache->zipInput = unzOpen(name);
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
@@ -1680,20 +1679,20 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
if ((!cache->ro
|
||||
&&
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat")) >= 0
|
||||
&&
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx")) > 0)
|
||||
|| (cache->ro
|
||||
&&
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat")) >= 0
|
||||
&&
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx")) > 0)
|
||||
) {
|
||||
FILE *oldndx = NULL;
|
||||
@@ -1704,20 +1703,20 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
if (!cache->ro) {
|
||||
cache->olddat =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"), "rb");
|
||||
oldndx =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"), "rb");
|
||||
} else {
|
||||
cache->olddat =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"), "rb");
|
||||
oldndx =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"), "rb");
|
||||
}
|
||||
// les deux doivent être ouvrables
|
||||
@@ -1739,20 +1738,20 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
if (!cache->ro) {
|
||||
buffl =
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"));
|
||||
cache->use =
|
||||
readfile(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"));
|
||||
} else {
|
||||
buffl =
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"));
|
||||
cache->use =
|
||||
readfile(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"));
|
||||
}
|
||||
if (cache->use != NULL) {
|
||||
@@ -1823,7 +1822,7 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
}
|
||||
} else {
|
||||
hts_log_print(opt, LOG_DEBUG, "Cache: no cache found in %s",
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/"));
|
||||
}
|
||||
|
||||
@@ -1833,39 +1832,39 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
if (!cache->ro) {
|
||||
// ouvrir caches actuels
|
||||
structcheck(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/"));
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/"));
|
||||
|
||||
if (1) {
|
||||
/* Create ZIP file cache */
|
||||
cache->zipOutput =
|
||||
(void *)
|
||||
zipOpen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.zip"), 0);
|
||||
|
||||
if (cache->zipOutput != NULL) {
|
||||
// supprimer old.lst
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"));
|
||||
// renommer
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst")))
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"));
|
||||
// ouvrir
|
||||
cache->lst =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), "wb");
|
||||
strcpybuff(opt->state.strc.path, StringBuff(opt->path_html));
|
||||
opt->state.strc.lst = cache->lst;
|
||||
@@ -1879,25 +1878,25 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
// supprimer old.txt
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt"));
|
||||
// renommer
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt")))
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt"));
|
||||
// ouvrir
|
||||
cache->txt =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"), "wb");
|
||||
if (cache->txt) {
|
||||
fprintf(cache->txt,
|
||||
@@ -1910,11 +1909,11 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
} else {
|
||||
cache->dat =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"), "wb");
|
||||
cache->ndx =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"), "wb");
|
||||
// les deux doivent être ouvrables
|
||||
if ((cache->dat == NULL) && (cache->ndx != NULL)) {
|
||||
@@ -1941,25 +1940,25 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
// supprimer old.lst
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"));
|
||||
// renommer
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst")))
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"));
|
||||
// ouvrir
|
||||
cache->lst =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), "wb");
|
||||
strcpybuff(opt->state.strc.path, StringBuff(opt->path_html));
|
||||
opt->state.strc.lst = cache->lst;
|
||||
@@ -1973,25 +1972,25 @@ void cache_init(cache_back * cache, httrackp * opt) {
|
||||
// supprimer old.txt
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt")))
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt"));
|
||||
// renommer
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt")))
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt"));
|
||||
// ouvrir
|
||||
cache->txt =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"), "wb");
|
||||
if (cache->txt) {
|
||||
fprintf(cache->txt,
|
||||
@@ -2031,7 +2030,7 @@ char *readfile2(char *fil, LLint * size) {
|
||||
if (len >= 0) { // exists
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(fconv(catbuff, fil), "rb");
|
||||
fp = fopen(fconv(catbuff, sizeof(catbuff), fil), "rb");
|
||||
if (fp != NULL) { // n'existe pas (!)
|
||||
adr = (char *) malloct(len + 1);
|
||||
if (size != NULL)
|
||||
@@ -2056,7 +2055,7 @@ char *readfile_utf8(char *fil) {
|
||||
const off_t len = fsize_utf8(fil);
|
||||
|
||||
if (len >= 0) { // exists
|
||||
FILE *const fp = FOPEN(fconv(catbuff, fil), "rb");
|
||||
FILE *const fp = FOPEN(fconv(catbuff, sizeof(catbuff), fil), "rb");
|
||||
|
||||
if (fp != NULL) { // n'existe pas (!)
|
||||
adr = (char *) malloct(len + 1);
|
||||
@@ -2081,7 +2080,7 @@ char *readfile_or(char *fil, char *defaultdata) {
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
|
||||
if (!fexist(fil))
|
||||
realfile = fconcat(catbuff, hts_rootdir(NULL), fil);
|
||||
realfile = fconcat(catbuff, sizeof(catbuff), hts_rootdir(NULL), fil);
|
||||
ret = readfile(realfile);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -41,9 +40,7 @@ Please visit our Website: http://www.httrack.com
|
||||
#include "htsbase.h"
|
||||
#include "htsnet.h"
|
||||
#include "htslib.h"
|
||||
#ifndef _WIN32_WCE
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
@@ -198,11 +195,12 @@ HTSEXT_API int catch_url(T_SOC soc, char *url, char *method, char *data) {
|
||||
char BIGSTK url_fil[HTS_URLMAXSIZE * 2];
|
||||
|
||||
// méthode en majuscule
|
||||
int i, r = 0;
|
||||
size_t i;
|
||||
int r = 0;
|
||||
|
||||
url_adr[0] = url_fil[0] = '\0';
|
||||
//
|
||||
for(i = 0; i < (int) strlen(method); i++) {
|
||||
for(i = 0; method[i] != '\0'; i++) {
|
||||
if ((method[i] >= 'a') && (method[i] <= 'z'))
|
||||
method[i] -= ('a' - 'A');
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,9 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -24,11 +22,9 @@ Important notes:
|
||||
emails addresses, or collecting any other private information on persons.
|
||||
This would disgrace our work, and spoil the many hours we spent on it.
|
||||
|
||||
|
||||
Please visit our Website: http://www.httrack.com
|
||||
*/
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* File: URL catch .h */
|
||||
/* Author: Xavier Roche */
|
||||
@@ -37,7 +33,7 @@ Please visit our Website: http://www.httrack.com
|
||||
// Fichier intercepteur d'URL .h
|
||||
|
||||
#ifndef HTS_CATCHURL_DEFH
|
||||
#define HTS_CATCHURL_DEFH
|
||||
#define HTS_CATCHURL_DEFH
|
||||
|
||||
#include "htsbasenet.h"
|
||||
|
||||
@@ -45,12 +41,7 @@ Please visit our Website: http://www.httrack.com
|
||||
#ifdef HTS_INTERNAL_BYTECODE
|
||||
|
||||
// Fonctions
|
||||
void socinput(T_SOC soc,char* s,int max);
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API T_SOC catch_url_init_std(int* port_prox,char* adr_prox);
|
||||
HTSEXT_API T_SOC catch_url_init(int* port,char* adr);
|
||||
HTSEXT_API int catch_url(T_SOC soc,char* url,char* method,char* data);
|
||||
#endif
|
||||
void socinput(T_SOC soc, char *s, int max);
|
||||
|
||||
#define CATCH_RESPONSE \
|
||||
"HTTP/1.0 200 OK\r\n"\
|
||||
@@ -74,10 +65,7 @@ HTSEXT_API int catch_url(T_SOC soc,char* url,char* method,char* data);
|
||||
"</BODY></HTML>"\
|
||||
"<!-- Generated by HTTrack Website Copier -->\r\n"\
|
||||
"\r\n"\
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
189
src/htscharset.c
189
src/htscharset.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -34,8 +33,7 @@ Please visit our Website: http://www.httrack.com
|
||||
#include "htscharset.h"
|
||||
#include "htsbase.h"
|
||||
#include "punycode.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include "htssafe.h"
|
||||
|
||||
int hts_isStringAscii(const char *s, size_t size) {
|
||||
size_t i;
|
||||
@@ -50,6 +48,40 @@ int hts_isStringAscii(const char *s, size_t size) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define IS_ALNUM(C) ( ((C) >= 'A' && (C) <= 'Z') || ((C) >= 'a' && (C) <= 'z') || ((C) >= '0' && (C) <= '9') )
|
||||
#define CHAR_LOWER(C) ( ((C) >= 'A' && (C) <= 'Z') ? ((C) + 'a' - 'A') : (C) )
|
||||
static int hts_equalsAlphanum(const char *a, const char *b) {
|
||||
size_t i, j;
|
||||
for(i = 0, j = 0;; i++, j++) {
|
||||
/* Skip non-alnum */
|
||||
for(; a[i] != '\0' && !IS_ALNUM(a[i]); i++) ;
|
||||
for(; b[j] != '\0' && !IS_ALNUM(b[j]); j++) ;
|
||||
/* Compare */
|
||||
if (CHAR_LOWER(a[i]) != CHAR_LOWER(b[j])) {
|
||||
break;
|
||||
}
|
||||
/* End of string ? (note: a[i] == b[j]) */
|
||||
else if (a[i] == '\0') {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#undef IS_ALNUM
|
||||
#undef CHAR_LOWER
|
||||
|
||||
/* Copy the memory region [s .. s + size - 1 ] as a \0-terminated string. */
|
||||
static char *hts_stringMemCopy(const char *s, size_t size) {
|
||||
char *dest = malloc(size + 1);
|
||||
|
||||
if (dest != NULL) {
|
||||
memcpy(dest, s, size);
|
||||
dest[size] = '\0';
|
||||
return dest;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
typedef struct wincodepage_t wincodepage_t;
|
||||
@@ -208,45 +240,17 @@ static const wincodepage_t codepages[] = {
|
||||
UINT hts_getCodepage(const char *name) {
|
||||
int id;
|
||||
|
||||
#define IS_ALNUM(C) ( ((C) >= 'A' && (C) <= 'Z') || ((C) >= 'a' && (C) <= 'z') || ((C) >= '0' && (C) <= '9') )
|
||||
#define CHAR_LOWER(C) ( ((C) >= 'A' && (C) <= 'Z') ? ((C) + 'a' - 'A') : (C) )
|
||||
for(id = 0; codepages[id].name != NULL; id++) {
|
||||
int i, j;
|
||||
|
||||
/* Compare the two strings, lowercase and alphanum only (ISO88591 == iso-8859-1) */
|
||||
const char *a = name, *b = codepages[id].name;
|
||||
|
||||
for(i = 0, j = 0;; i++, j++) {
|
||||
/* Skip non-alnum */
|
||||
for(; a[i] != '\0' && !IS_ALNUM(a[i]); i++) ;
|
||||
for(; b[j] != '\0' && !IS_ALNUM(b[j]); j++) ;
|
||||
/* Compare */
|
||||
if (CHAR_LOWER(a[i]) != CHAR_LOWER(b[j])) {
|
||||
break;
|
||||
}
|
||||
/* End of string ? (note: a[i] == b[j]) */
|
||||
else if (a[i] == '\0') {
|
||||
return codepages[id].codepage;
|
||||
}
|
||||
if (hts_equalsAlphanum(name, codepages[id].name)) {
|
||||
return codepages[id].codepage;
|
||||
}
|
||||
}
|
||||
#undef IS_ALNUM
|
||||
#undef CHAR_LOWER
|
||||
|
||||
/* Not found */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *strndup(const char *s, size_t size) {
|
||||
char *dest = malloc(size + 1);
|
||||
|
||||
if (dest != NULL) {
|
||||
memcpy(dest, s, size);
|
||||
dest[size] = '\0';
|
||||
return dest;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LPWSTR hts_convertStringToUCS2(const char *s, int size, UINT cp, int *pwsize) {
|
||||
/* Size in wide chars of the output */
|
||||
const int wsize = MultiByteToWideChar(cp, 0, (LPCSTR) s, size, NULL, 0);
|
||||
@@ -303,11 +307,11 @@ char *hts_convertUCS2StringToUTF8(LPWSTR woutput, int wsize) {
|
||||
char *hts_convertStringCPToUTF8(const char *s, size_t size, UINT cp) {
|
||||
/* Empty string ? */
|
||||
if (size == 0) {
|
||||
return strndup(s, size);
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
/* Already UTF-8 ? */
|
||||
if (cp == CP_UTF8 || hts_isStringAscii(s, size)) {
|
||||
return strndup(s, size);
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
/* Other (valid) charset */
|
||||
else if (cp != 0) {
|
||||
@@ -330,11 +334,11 @@ char *hts_convertStringCPToUTF8(const char *s, size_t size, UINT cp) {
|
||||
char *hts_convertStringCPFromUTF8(const char *s, size_t size, UINT cp) {
|
||||
/* Empty string ? */
|
||||
if (size == 0) {
|
||||
return strndup(s, size);
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
/* Already UTF-8 ? */
|
||||
if (cp == CP_UTF8 || hts_isStringAscii(s, size)) {
|
||||
return strndup(s, size);
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
/* Other (valid) charset */
|
||||
else if (cp != 0) {
|
||||
@@ -373,18 +377,65 @@ char *hts_convertStringSystemToUTF8(const char *s, size_t size) {
|
||||
#else
|
||||
|
||||
#include <errno.h>
|
||||
#include <iconv.h>
|
||||
|
||||
static char *hts_convertStringToUTF8_(const char *s, size_t size,
|
||||
#if ( defined(HTS_USEICONV) && ( HTS_USEICONV == 0 ) )
|
||||
#define DISABLE_ICONV
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_ICONV
|
||||
#include <iconv.h>
|
||||
#else
|
||||
#include "htscodepages.h"
|
||||
|
||||
/* decode from a codepage to UTF-8 */
|
||||
static char* hts_codepageToUTF8(const char *codepage, const char *s) {
|
||||
/* find the given codepage */
|
||||
size_t i;
|
||||
for(i = 0 ; table_mappings[i].name != NULL
|
||||
&& !hts_equalsAlphanum(table_mappings[i].name, codepage) ; i++) ;
|
||||
|
||||
/* found ; decode */
|
||||
if (table_mappings[i].name != NULL) {
|
||||
size_t j, k;
|
||||
char *dest = NULL;
|
||||
size_t capa = 0;
|
||||
#define MAX_UTF 8
|
||||
for(j = 0, k = 0 ; s[j] != '\0' ; j++) {
|
||||
const unsigned char c = (unsigned char) s[j];
|
||||
const hts_UCS4 uc = table_mappings[i].table[c];
|
||||
const size_t max = k + MAX_UTF;
|
||||
if (capa < max) {
|
||||
for(capa = 16 ; capa < max ; capa <<= 1) ;
|
||||
dest = realloc(dest, capa);
|
||||
if (dest == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (dest != NULL) {
|
||||
const size_t len = hts_writeUTF8(uc, &dest[k], MAX_UTF);
|
||||
k += len;
|
||||
assertf(k < capa);
|
||||
}
|
||||
}
|
||||
dest[k] = '\0';
|
||||
return dest;
|
||||
#undef MAX_UTF
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char *hts_convertStringCharset(const char *s, size_t size,
|
||||
const char *to, const char *from) {
|
||||
/* Empty string ? */
|
||||
if (size == 0) {
|
||||
return strdup("");
|
||||
}
|
||||
/* Already on correct charset ? */
|
||||
if (strcasecmp(from, to) == 0) {
|
||||
return strndup(s, size);
|
||||
if (hts_equalsAlphanum(from, to)) {
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
#ifndef DISABLE_ICONV
|
||||
/* Find codepage */
|
||||
else {
|
||||
const iconv_t cp = iconv_open(to, from);
|
||||
@@ -443,6 +494,12 @@ static char *hts_convertStringToUTF8_(const char *s, size_t size,
|
||||
return outbuf;
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* Limited codepage decoding support only. */
|
||||
if (hts_isCharsetUTF8(to)) {
|
||||
return hts_codepageToUTF8(from, s);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Error, charset not found! */
|
||||
return NULL;
|
||||
@@ -455,11 +512,11 @@ char *hts_convertStringToUTF8(const char *s, size_t size, const char *charset) {
|
||||
}
|
||||
/* Already UTF-8 ? */
|
||||
if (hts_isCharsetUTF8(charset) || hts_isStringAscii(s, size)) {
|
||||
return strndup(s, size);
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
/* Find codepage */
|
||||
else {
|
||||
return hts_convertStringToUTF8_(s, size, "utf-8", charset);
|
||||
return hts_convertStringCharset(s, size, "utf-8", charset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,11 +527,11 @@ char *hts_convertStringFromUTF8(const char *s, size_t size, const char *charset)
|
||||
}
|
||||
/* Already UTF-8 ? */
|
||||
if (hts_isCharsetUTF8(charset) || hts_isStringAscii(s, size)) {
|
||||
return strndup(s, size);
|
||||
return hts_stringMemCopy(s, size);
|
||||
}
|
||||
/* Find codepage */
|
||||
else {
|
||||
return hts_convertStringToUTF8_(s, size, charset, "utf-8");
|
||||
return hts_convertStringCharset(s, size, charset, "utf-8");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,9 +725,9 @@ static unsigned int nlz8(unsigned char x) {
|
||||
*/
|
||||
#define ADD_SEQ(UC, BITS, EMITTER) do { \
|
||||
/* number of data bits in first octet */ \
|
||||
const int bits = BITS % 6; \
|
||||
const unsigned int bits = BITS % 6; \
|
||||
/* shift for first octet */ \
|
||||
const int shift0 = BITS - bits; \
|
||||
const unsigned int shift0 = BITS - bits; \
|
||||
/* first octet */ \
|
||||
const unsigned char lead = \
|
||||
/* leading bits */ \
|
||||
@@ -924,7 +981,7 @@ char *hts_convertStringUTF8ToIDNA(const char *s, size_t size) {
|
||||
#undef WR
|
||||
|
||||
/* copy character */
|
||||
assert(segOutputSize < segSize);
|
||||
assertf(segOutputSize < segSize);
|
||||
segInt[segOutputSize++] = uc;
|
||||
|
||||
/* not anymore in sequence */
|
||||
@@ -933,7 +990,7 @@ char *hts_convertStringUTF8ToIDNA(const char *s, size_t size) {
|
||||
|
||||
/* ascii ? */
|
||||
if (c < 0x80) {
|
||||
assert(segOutputSize < segSize);
|
||||
assertf(segOutputSize < segSize);
|
||||
segInt[segOutputSize] = c;
|
||||
if (c != 0) {
|
||||
segOutputSize++;
|
||||
@@ -1134,6 +1191,26 @@ hts_UCS4* hts_convertUTF8StringToUCS4(const char *s, size_t size, size_t *nChars
|
||||
return dest;
|
||||
}
|
||||
|
||||
int hts_isStringUTF8(const char *s, size_t size) {
|
||||
const unsigned char *const data = (const unsigned char*) s;
|
||||
size_t i;
|
||||
|
||||
for(i = 0 ; i < size ; ) {
|
||||
/* Reader: can read bytes up to j */
|
||||
#define RD ( i < size ? data[i++] : -1 )
|
||||
|
||||
/* Writer: upon error, return FFFD (replacement character) */
|
||||
#define WR(C) if ((C) == -1) { return 0; }
|
||||
|
||||
/* Read Unicode character. */
|
||||
READ_UNICODE(RD, WR);
|
||||
#undef RD
|
||||
#undef WR
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *hts_convertUCS4StringToUTF8(const hts_UCS4 *s, size_t nChars) {
|
||||
size_t i;
|
||||
char *dest = NULL;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -86,6 +85,11 @@ extern char *hts_getCharsetFromMeta(const char *html, size_t size);
|
||||
**/
|
||||
extern int hts_isStringAscii(const char *s, size_t size);
|
||||
|
||||
/**
|
||||
* Is the given string an UTF-8 string ?
|
||||
**/
|
||||
extern int hts_isStringUTF8(const char *s, size_t size);
|
||||
|
||||
/**
|
||||
* Is the given charset the UTF-8 charset ?
|
||||
**/
|
||||
|
||||
1772
src/htscodepages.h
Normal file
1772
src/htscodepages.h
Normal file
File diff suppressed because it is too large
Load Diff
128
src/htsconcat.c
Normal file
128
src/htsconcat.c
Normal file
@@ -0,0 +1,128 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) 1998-2013 Xavier Roche and other contributors
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
- We hereby ask people using this source NOT to use it in purpose of grabbing
|
||||
emails addresses, or collecting any other private information on persons.
|
||||
This would disgrace our work, and spoil the many hours we spent on it.
|
||||
|
||||
Please visit our Website: http://www.httrack.com
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* File: Subroutines */
|
||||
/* Author: Xavier Roche */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "httrack.h"
|
||||
#include "httrack-library.h"
|
||||
|
||||
// concat, concatène deux chaines et renvoi le résultat
|
||||
// permet d'alléger grandement le code
|
||||
#undef concat
|
||||
HTSEXT_API char *concat(char *catbuff, size_t size, const char *a, const char *b) {
|
||||
size_t max = 0;
|
||||
|
||||
RUNTIME_TIME_CHECK_SIZE(size);
|
||||
|
||||
catbuff[0] = '\0';
|
||||
if (a != NULL && a[0] != '\0') {
|
||||
max += strlen(a);
|
||||
if (max + 1 >= size) {
|
||||
return catbuff;
|
||||
}
|
||||
strcat(catbuff, a);
|
||||
}
|
||||
if (b != NULL && b[0] != '\0') {
|
||||
max += strlen(b);
|
||||
if (max + 1 >= size) {
|
||||
return catbuff;
|
||||
}
|
||||
strcat(catbuff, b);
|
||||
}
|
||||
return catbuff;
|
||||
}
|
||||
|
||||
// conversion fichier / -> antislash
|
||||
static char *__fconv(char *a) {
|
||||
#if HTS_DOSNAME
|
||||
int i;
|
||||
|
||||
for(i = 0; a[i] != 0; i++)
|
||||
if (a[i] == '/') // Unix-to-DOS style
|
||||
a[i] = '\\';
|
||||
#endif
|
||||
return a;
|
||||
}
|
||||
|
||||
#undef fconcat
|
||||
#undef concat
|
||||
HTSEXT_API char *fconcat(char *catbuff, size_t size, const char *a, const char *b) {
|
||||
RUNTIME_TIME_CHECK_SIZE(size);
|
||||
return __fconv(concat(catbuff, size, a, b));
|
||||
}
|
||||
|
||||
#undef fconv
|
||||
HTSEXT_API char *fconv(char *catbuff, size_t size, const char *a) {
|
||||
RUNTIME_TIME_CHECK_SIZE(size);
|
||||
return __fconv(concat(catbuff, size, a, ""));
|
||||
}
|
||||
|
||||
/* / et \\ en / */
|
||||
static char *__fslash(char *a) {
|
||||
int i;
|
||||
|
||||
for(i = 0; a[i] != 0; i++)
|
||||
if (a[i] == '\\') // convertir
|
||||
a[i] = '/';
|
||||
return a;
|
||||
}
|
||||
|
||||
#undef fslash
|
||||
char *fslash(char *catbuff, size_t size, const char *a) {
|
||||
RUNTIME_TIME_CHECK_SIZE(size);
|
||||
return __fslash(concat(catbuff, size, a, NULL));
|
||||
}
|
||||
|
||||
// extension : html,gif..
|
||||
HTSEXT_API char *get_ext(char *catbuff, size_t size, const char *fil) {
|
||||
size_t i, last;
|
||||
|
||||
RUNTIME_TIME_CHECK_SIZE(size);
|
||||
|
||||
for(i = 0, last = 0 ; fil[i] != '\0' && fil[i] != '?' ; i++) {
|
||||
if (fil[i] == '.') {
|
||||
last = i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (last != 0 && i > last) {
|
||||
const size_t len = i - last;
|
||||
if (len < size) {
|
||||
catbuff[0] = '\0';
|
||||
strncat(catbuff, &fil[last], size);
|
||||
return catbuff;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -52,9 +51,6 @@ Please visit our Website: http://www.httrack.com
|
||||
// nom par défaut pour / en ftp
|
||||
#define DEFAULT_FTP "index.txt"
|
||||
|
||||
// nom par défaut pour / en mms
|
||||
#define DEFAULT_MMS "default.avi"
|
||||
|
||||
// extension par défaut pour fichiers n'en ayant pas
|
||||
#define DEFAULT_EXT ".html"
|
||||
#define DEFAULT_EXT_SHORT ".htm"
|
||||
|
||||
233
src/htscore.c
233
src/htscore.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -34,9 +33,7 @@ Please visit our Website: http://www.httrack.com
|
||||
/* Internal engine bytecode */
|
||||
#define HTS_INTERNAL_BYTECODE
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
/* File defs */
|
||||
@@ -165,13 +162,14 @@ RUN_CALLBACK0(opt, end); \
|
||||
if (opt->log != NULL) fflush(opt->log); \
|
||||
if (makestat_fp) { fclose(makestat_fp); makestat_fp=NULL; } \
|
||||
if (maketrack_fp){ fclose(maketrack_fp); maketrack_fp=NULL; } \
|
||||
if (opt->accept_cookie) cookie_save(opt->cookie,fconcat(OPT_GET_BUFF(opt),StringBuff(opt->path_log),"cookies.txt")); \
|
||||
if (opt->accept_cookie) cookie_save(opt->cookie,fconcat(OPT_GET_BUFF(opt),OPT_GET_BUFF_SIZE(opt),StringBuff(opt->path_log),"cookies.txt")); \
|
||||
if (makeindex_fp) { fclose(makeindex_fp); makeindex_fp=NULL; } \
|
||||
if (cache_hashtable) { inthash_delete(&cache_hashtable); } \
|
||||
if (cache_tests) { inthash_delete(&cache_tests); } \
|
||||
if (template_header) { freet(template_header); template_header=NULL; } \
|
||||
if (template_body) { freet(template_body); template_body=NULL; } \
|
||||
if (template_footer) { freet(template_footer); template_footer=NULL; } \
|
||||
hash_free(&hash); \
|
||||
clearCallbacks(&opt->state.callbacks); \
|
||||
/*structcheck_init(-1);*/ \
|
||||
} while(0)
|
||||
@@ -228,7 +226,7 @@ strcpybuff(liens[lien_tot]->adr,A); \
|
||||
strcpybuff(liens[lien_tot]->fil,F); \
|
||||
strcpybuff(liens[lien_tot]->sav,S); \
|
||||
liens_record_sav_len(liens[lien_tot]); \
|
||||
hash_write(hashptr,lien_tot,NORM); \
|
||||
hash_write(hashptr,lien_tot); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -238,8 +236,7 @@ if (makeindex_fp) { \
|
||||
char BIGSTK tempo[1024]; \
|
||||
if (makeindex_links == 1) { \
|
||||
char BIGSTK link_escaped[HTS_URLMAXSIZE*2]; \
|
||||
strcpybuff(link_escaped, makeindex_firstlink); \
|
||||
escape_uri_utf(link_escaped); \
|
||||
escape_uri_utf(makeindex_firstlink, link_escaped, sizeof(link_escaped)); \
|
||||
sprintf(tempo,"<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=%s\">"CRLF, link_escaped); \
|
||||
} else \
|
||||
tempo[0]='\0'; \
|
||||
@@ -250,7 +247,7 @@ if (makeindex_fp) { \
|
||||
fflush(makeindex_fp); \
|
||||
fclose(makeindex_fp); /* à ne pas oublier sinon on passe une nuit blanche */ \
|
||||
makeindex_fp=NULL; \
|
||||
usercommand(opt,0,NULL,fconcat(OPT_GET_BUFF(opt),StringBuff(opt->path_html_utf8),"index.html"),"",""); \
|
||||
usercommand(opt,0,NULL,fconcat(OPT_GET_BUFF(opt),OPT_GET_BUFF_SIZE(opt),StringBuff(opt->path_html_utf8),"index.html"),"",""); \
|
||||
} \
|
||||
} \
|
||||
makeindex_done=1; /* ok c'est fait */ \
|
||||
@@ -263,7 +260,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
int lien_tot = 0; // nombre de liens pour le moment
|
||||
lien_url **liens = NULL; // les pointeurs sur les liens
|
||||
hash_struct hash; // système de hachage, accélère la recherche dans les liens
|
||||
hash_struct *hashptr = &hash;
|
||||
hash_struct *const hashptr = &hash;
|
||||
t_cookie BIGSTK cookie; // gestion des cookies
|
||||
int lien_max = 0;
|
||||
size_t lien_size = 0; // octets restants dans buffer liens dispo
|
||||
@@ -314,7 +311,6 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
robots_wizard BIGSTK robots; // gestion robots.txt
|
||||
inthash cache_hashtable = NULL;
|
||||
inthash cache_tests = NULL;
|
||||
int cache_hash_size = 0;
|
||||
|
||||
//
|
||||
char *template_header = NULL, *template_body = NULL, *template_footer = NULL;
|
||||
@@ -372,15 +368,15 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
// et templates html
|
||||
template_header =
|
||||
readfile_or(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_bin),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_bin),
|
||||
"templates/index-header.html"), HTS_INDEX_HEADER);
|
||||
template_body =
|
||||
readfile_or(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_bin),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_bin),
|
||||
"templates/index-body.html"), HTS_INDEX_BODY);
|
||||
template_footer =
|
||||
readfile_or(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_bin),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_bin),
|
||||
"templates/index-footer.html"), HTS_INDEX_FOOTER);
|
||||
|
||||
// initialiser mimedefs
|
||||
@@ -397,16 +393,18 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
cache.ptr_ant = cache.ptr_last = 0; // pointeur pour anticiper
|
||||
|
||||
// initialiser hash cache
|
||||
if (!cache_hash_size)
|
||||
cache_hash_size = HTS_HASH_SIZE;
|
||||
cache_hashtable = inthash_new(cache_hash_size);
|
||||
cache_tests = inthash_new(cache_hash_size);
|
||||
cache_hashtable = inthash_new(0);
|
||||
cache_tests = inthash_new(0);
|
||||
if (cache_hashtable == NULL || cache_tests == NULL) {
|
||||
printf("PANIC! : Not enough memory [%d]\n", __LINE__);
|
||||
filters[0] = NULL; // uniquement a cause du warning de XH_extuninit
|
||||
XH_extuninit;
|
||||
return 0;
|
||||
}
|
||||
hts_set_hash_handler(cache_hashtable, opt);
|
||||
hts_set_hash_handler(cache_tests, opt);
|
||||
inthash_set_name(cache_hashtable, "cache_hashtable");
|
||||
inthash_set_name(cache_tests, "cache_tests");
|
||||
inthash_value_is_malloc(cache_tests, 1); /* malloc */
|
||||
cache.hashtable = (void *) cache_hashtable; /* copy backcache hash */
|
||||
cache.cached_tests = (void *) cache_tests; /* copy of cache_tests */
|
||||
@@ -449,15 +447,14 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
// initialiser ptr et lien_tot
|
||||
ptr = 0;
|
||||
lien_tot = 0;
|
||||
// initialiser hachage
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0; i < HTS_HASH_SIZE; i++)
|
||||
hash.hash[0][i] = hash.hash[1][i] = hash.hash[2][i] = -1; // pas d'entrées
|
||||
hash.liens = liens;
|
||||
hash.max_lien = 0;
|
||||
}
|
||||
// initialiser hachage
|
||||
hash_init(opt, &hash, opt->urlhack);
|
||||
// note: we need a cast because of the const
|
||||
hash.liens = (const lien_url **) liens;
|
||||
|
||||
// we need it
|
||||
opt->liens = liens;
|
||||
|
||||
// copier adresse(s) dans liste des adresses
|
||||
{
|
||||
@@ -542,7 +539,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
__LINE__);
|
||||
hts_log_print(opt, LOG_PANIC,
|
||||
"Too many filters, giving up..(>%d)", filptr);
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
hts_log_print(opt, LOG_NOTICE,
|
||||
"To avoid that: use #F option for more filters (example: -#F5000)");
|
||||
XH_extuninit;
|
||||
return 0;
|
||||
@@ -621,7 +618,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
}
|
||||
}
|
||||
// fclose(fp);
|
||||
hts_log_print(opt, LOG_INFO, "%d links added from %s", n,
|
||||
hts_log_print(opt, LOG_NOTICE, "%d links added from %s", n,
|
||||
StringBuff(opt->filelist));
|
||||
|
||||
// Free buffer
|
||||
@@ -634,8 +631,8 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
|
||||
// lien primaire
|
||||
liens_record("primary", "/primary",
|
||||
fslash(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt),
|
||||
fslash(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html_utf8), "index.html")),
|
||||
"", "", opt->urlhack);
|
||||
if (liens[lien_tot] == NULL) { // erreur, pas de place réservée
|
||||
@@ -657,15 +654,11 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
|
||||
// Initialiser cache
|
||||
{
|
||||
int backupXFR = htsMemoryFastXfr;
|
||||
|
||||
opt->state._hts_in_html_parsing = 4;
|
||||
if (!RUN_CALLBACK7(opt, loop, NULL, 0, 0, 0, lien_tot, 0, NULL)) {
|
||||
opt->state.exit_xh = 1; // exit requested
|
||||
}
|
||||
htsMemoryFastXfr = 1; /* fast load */
|
||||
cache_init(&cache, opt);
|
||||
htsMemoryFastXfr = backupXFR;
|
||||
opt->state._hts_in_html_parsing = 0;
|
||||
}
|
||||
|
||||
@@ -694,7 +687,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
// On prévoit large: les fichiers HTML ne prennent que peu de place en mémoire, et les
|
||||
// fichiers non html sont sauvés en direct sur disque.
|
||||
// --> 1024 entrées + 32 entrées par socket en supplément
|
||||
sback = back_new(opt->maxsoc * 32 + 1024);
|
||||
sback = back_new(opt, opt->maxsoc * 32 + 1024);
|
||||
if (sback == NULL) {
|
||||
hts_log_print(opt, LOG_PANIC,
|
||||
"Not enough memory, can not allocate %d bytes",
|
||||
@@ -706,7 +699,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
if (opt->makestat) {
|
||||
makestat_fp =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-stats.txt"),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-stats.txt"),
|
||||
"wb");
|
||||
if (makestat_fp != NULL) {
|
||||
fprintf(makestat_fp, "HTTrack statistics report, every minutes" LF LF);
|
||||
@@ -717,7 +710,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
if (opt->maketrack) {
|
||||
maketrack_fp =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-track.txt"),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-track.txt"),
|
||||
"wb");
|
||||
if (maketrack_fp != NULL) {
|
||||
fprintf(maketrack_fp, "HTTrack tracking report, every minutes" LF LF);
|
||||
@@ -833,16 +826,18 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
// recopier proxy
|
||||
if ((r.req.proxy.active = opt->proxy.active)) {
|
||||
if (StringBuff(opt->proxy.bindhost) != NULL)
|
||||
strcpybuff(r.req.proxy.bindhost, StringBuff(opt->proxy.bindhost));
|
||||
r.req.proxy.bindhost = StringBuff(opt->proxy.bindhost);
|
||||
if (StringBuff(opt->proxy.name) != NULL)
|
||||
strcpybuff(r.req.proxy.name, StringBuff(opt->proxy.name));
|
||||
r.req.proxy.name = StringBuff(opt->proxy.name);
|
||||
r.req.proxy.port = opt->proxy.port;
|
||||
}
|
||||
// et user-agent
|
||||
strcpy(r.req.user_agent, StringBuff(opt->user_agent));
|
||||
strcpy(r.req.referer, StringBuff(opt->referer));
|
||||
strcpy(r.req.from, StringBuff(opt->from));
|
||||
strcpy(r.req.lang_iso, StringBuff(opt->lang_iso));
|
||||
r.req.user_agent = StringBuff(opt->user_agent);
|
||||
r.req.referer = StringBuff(opt->referer);
|
||||
r.req.from = StringBuff(opt->from);
|
||||
r.req.lang_iso = StringBuff(opt->lang_iso);
|
||||
r.req.accept = StringBuff(opt->accept);
|
||||
r.req.headers = StringBuff(opt->headers);
|
||||
r.req.user_agent_send = opt->user_agent_send;
|
||||
|
||||
if (!error) {
|
||||
@@ -1040,7 +1035,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
if ((is_hypertext_mime(opt, r.contenttype, urlfil))
|
||||
|
||||
/* Is HTML or Js, .. */
|
||||
/* NO - real media is real media, and mms is mms, not HTML */
|
||||
/* NO - real media is real media, not HTML */
|
||||
/*|| (may_be_hypertext_mime(r.contenttype, urlfil) && (r.adr) ) */
|
||||
/* Is real media, .. */
|
||||
) {
|
||||
@@ -1456,7 +1451,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
|
||||
/* Remove file if being processed */
|
||||
if (is_loaded_from_file) {
|
||||
(void) unlink(fconv(OPT_GET_BUFF(opt), savename));
|
||||
(void) unlink(fconv(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), savename));
|
||||
is_loaded_from_file = 0;
|
||||
}
|
||||
|
||||
@@ -1714,7 +1709,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
}
|
||||
#ifdef IGNORE_RESTRICTIVE_ROBOTS
|
||||
else {
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
hts_log_print(opt, LOG_NOTICE,
|
||||
"Note: %s robots.txt rules are too restrictive, ignoring /",
|
||||
urladr);
|
||||
}
|
||||
@@ -1728,7 +1723,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
"Note: robots.txt forbidden links for %s are: %s",
|
||||
urladr, infobuff);
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
hts_log_print(opt, LOG_NOTICE,
|
||||
"Note: due to %s remote robots.txt rules, links beginning with these path will be forbidden: %s (see in the options to disable this)",
|
||||
urladr, infobuff);
|
||||
}
|
||||
@@ -1787,7 +1782,7 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
#ifndef _WIN32
|
||||
chmod(tempo, HTS_ACCESS_FILE);
|
||||
#endif
|
||||
usercommand(opt, 0, NULL, fconv(OPT_GET_BUFF(opt), tempo), "",
|
||||
usercommand(opt, 0, NULL, fconv(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), tempo), "",
|
||||
"");
|
||||
}
|
||||
|
||||
@@ -1978,47 +1973,47 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
if ((HTS_STAT.stat_files <= 0)
|
||||
&& (HTS_STAT.HTS_TOTAL_RECV < 32768) /* should be fine */
|
||||
) {
|
||||
hts_log_print(opt, LOG_INFO,
|
||||
hts_log_print(opt, LOG_NOTICE,
|
||||
"No data seems to have been transferred during this session! : restoring previous one!");
|
||||
XH_uninit;
|
||||
if ((fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-cache/old.dat")))
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-cache/old.dat")))
|
||||
&&
|
||||
(fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx")))) {
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"));
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"));
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"));
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"));
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.dat"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/new.dat"));
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.ndx"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/new.ndx"));
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"));
|
||||
rename(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt"), fconcat(OPT_GET_BUFF(opt),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.txt"), fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-cache/new.txt"));
|
||||
}
|
||||
@@ -2042,16 +2037,16 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
//
|
||||
old_lst =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/old.lst"), "rb");
|
||||
if (old_lst) {
|
||||
off_t sz =
|
||||
fsize(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"));
|
||||
new_lst =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-cache/new.lst"), "rb");
|
||||
if ((new_lst) && (sz > 0)) {
|
||||
char *adr = (char *) malloct(sz);
|
||||
@@ -2197,34 +2192,6 @@ int httpmirror(char *url1, httrackp * opt) {
|
||||
cache.zipOutput = NULL;
|
||||
}
|
||||
}
|
||||
#if DEBUG_HASH
|
||||
// noter les collisions
|
||||
{
|
||||
int i;
|
||||
int empty1 = 0, empty2 = 0, empty3 = 0;
|
||||
|
||||
for(i = 0; i < HTS_HASH_SIZE; i++) {
|
||||
if (hash.hash[0][i] == -1)
|
||||
empty1++;
|
||||
if (hash.hash[1][i] == -1)
|
||||
empty2++;
|
||||
if (hash.hash[2][i] == -1)
|
||||
empty3++;
|
||||
}
|
||||
printf("\n");
|
||||
printf("Debug info: Hash-table report\n");
|
||||
printf("Number of files entered: %d\n", hashnumber);
|
||||
printf("Table size: %d\n", HTS_HASH_SIZE);
|
||||
printf("\n");
|
||||
printf("Longest chain sav: %d, empty: %d\n", longest_hash[0],
|
||||
empty1);
|
||||
printf("Longest chain adr,fil: %d, empty: %d\n", longest_hash[1],
|
||||
empty2);
|
||||
printf("Longest chain former_adr/fil: %d, empty: %d\n", longest_hash[2],
|
||||
empty3);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
// fin afficher résumé dans log
|
||||
|
||||
// ending
|
||||
@@ -2388,7 +2355,7 @@ void host_ban(httrackp * opt, lien_url ** liens, int ptr, int lien_tot,
|
||||
if (strfield2(jump_identification(liens[i]->adr), host)) { // host
|
||||
hts_log_print(opt, LOG_DEBUG, "Cancel: %s%s", liens[i]->adr,
|
||||
liens[i]->fil);
|
||||
strcpybuff(liens[i]->adr, "!"); // cancel (invalide hash)
|
||||
hash_invalidate_entry(opt->hash, i); // invalidate hashtable entry
|
||||
// on efface pas le hash, because si on rencontre le lien, reverif sav..
|
||||
}
|
||||
} else {
|
||||
@@ -2881,10 +2848,10 @@ int filenote(filenote_strc * strc, const char *s, filecreate_params * params) {
|
||||
char BIGSTK savelst[HTS_URLMAXSIZE * 2];
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
|
||||
strcpybuff(savelst, fslash(catbuff, s));
|
||||
strcpybuff(savelst, fslash(catbuff, sizeof(catbuff), s));
|
||||
// couper chemin?
|
||||
if (strnotempty(strc->path)) {
|
||||
if (strncmp(fslash(catbuff, strc->path), savelst, strlen(strc->path)) == 0) { // couper
|
||||
if (strncmp(fslash(catbuff, sizeof(catbuff), strc->path), savelst, strlen(strc->path)) == 0) { // couper
|
||||
strcpybuff(savelst, s + strlen(strc->path));
|
||||
}
|
||||
}
|
||||
@@ -2933,16 +2900,16 @@ void usercommand(httrackp * opt, int _exe, const char *_cmd, const char *file,
|
||||
}
|
||||
void usercommand_exe(const char *cmd, const char *file) {
|
||||
char BIGSTK temp[8192];
|
||||
char c[2] = "";
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
temp[0] = '\0';
|
||||
//
|
||||
for(i = 0; i < (int) strlen(cmd); i++) {
|
||||
for(i = 0; cmd[i] != '\0'; i++) {
|
||||
if ((cmd[i] == '$') && (cmd[i + 1] == '0')) {
|
||||
strcatbuff(temp, file);
|
||||
i++;
|
||||
} else {
|
||||
char c[2];
|
||||
c[0] = cmd[i];
|
||||
c[1] = '\0';
|
||||
strcatbuff(temp, c);
|
||||
@@ -2970,8 +2937,9 @@ static void postprocess_file(httrackp * opt, const char *save, const char *adr,
|
||||
if (rsc_fil == NULL)
|
||||
rsc_fil = fil;
|
||||
if (strncmp
|
||||
(fslash(OPT_GET_BUFF(opt), save),
|
||||
fslash(OPT_GET_BUFF(opt), StringBuff(opt->path_html_utf8)), (n =
|
||||
(fslash(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), save),
|
||||
fslash(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html_utf8)), (n =
|
||||
(int)
|
||||
strlen
|
||||
(StringBuff
|
||||
@@ -2985,8 +2953,22 @@ static void postprocess_file(httrackp * opt, const char *save, const char *adr,
|
||||
//first = 1;
|
||||
opt->state.mimefp =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_html), "index.mht"),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html), "index.mht"),
|
||||
"wb");
|
||||
(void) unlink(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html),
|
||||
"index.eml"));
|
||||
#ifndef _WIN32
|
||||
if (symlink("index.mht",
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_html),
|
||||
"index.eml")) != 0) {
|
||||
if (errno != EPERM) {
|
||||
hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
|
||||
"could not create symbolic link from index.mht to index.eml");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (opt->state.mimefp != NULL) {
|
||||
char BIGSTK rndtmp[1024], currtime[256];
|
||||
|
||||
@@ -3025,17 +3007,7 @@ static void postprocess_file(httrackp * opt, const char *save, const char *adr,
|
||||
mimebuff[0] = '\0';
|
||||
|
||||
/* CID */
|
||||
strcpybuff(cid, adr);
|
||||
strcatbuff(cid, fil);
|
||||
escape_in_url(cid);
|
||||
{
|
||||
char *a = cid;
|
||||
|
||||
while((a = strchr(a, '%'))) {
|
||||
*a = 'X';
|
||||
a++;
|
||||
}
|
||||
}
|
||||
make_content_id(adr, fil, cid, sizeof(cid));
|
||||
|
||||
guess_httptype(opt, mimebuff, save);
|
||||
fprintf(opt->state.mimefp, "--%s\r\n",
|
||||
@@ -3094,7 +3066,7 @@ int fspc(httrackp * opt, FILE * fp, const char *type) {
|
||||
if (A == NULL) {
|
||||
int localtime_returned_null = 0;
|
||||
|
||||
assert(localtime_returned_null);
|
||||
assertf(localtime_returned_null);
|
||||
}
|
||||
strftime(s, 250, "%H:%M:%S", A);
|
||||
if (strnotempty(type))
|
||||
@@ -3255,12 +3227,12 @@ int back_fill(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
|
||||
// Why in hell did I do that ?
|
||||
//if (ok && liens[p]->sav != NULL && liens[p]->sav[0] != '\0'
|
||||
// && hash_read(opt->hash,liens[p]->sav,"",0,opt->urlhack) >= 0) // lookup in liens_record
|
||||
// && hash_read(opt->hash,liens[p]->sav,NULL,HASH_STRUCT_FILENAME ) >= 0) // lookup in liens_record
|
||||
//{
|
||||
// ok = 0;
|
||||
//}
|
||||
if (liens[p]->sav == NULL || liens[p]->sav[0] == '\0'
|
||||
|| hash_read(opt->hash, liens[p]->sav, "", 0, opt->urlhack) < 0) {
|
||||
|| hash_read(opt->hash, liens[p]->sav, NULL, HASH_STRUCT_FILENAME ) < 0) {
|
||||
ok = 0;
|
||||
}
|
||||
// note: si un backing est fini, il reste en mémoire jusqu'à ce que
|
||||
@@ -3311,11 +3283,7 @@ int read_stdin(char *s, int max) {
|
||||
|
||||
#ifdef _WIN32
|
||||
int check_stdin(void) {
|
||||
#ifndef _WIN32_WCE
|
||||
return (_kbhit());
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
int check_flot(T_SOC s) {
|
||||
@@ -3347,7 +3315,7 @@ int check_sockerror(T_SOC s) {
|
||||
FD_SET((T_SOC) s, &fds);
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
select(s + 1, NULL, NULL, &fds, &tv);
|
||||
select((int) s + 1, NULL, NULL, &fds, &tv);
|
||||
return FD_ISSET(s, &fds);
|
||||
}
|
||||
|
||||
@@ -3360,7 +3328,7 @@ int check_sockdata(T_SOC s) {
|
||||
FD_SET((T_SOC) s, &fds);
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
select(s + 1, &fds, NULL, NULL, &tv);
|
||||
select((int) s + 1, &fds, NULL, NULL, &tv);
|
||||
return FD_ISSET(s, &fds);
|
||||
}
|
||||
|
||||
@@ -3599,11 +3567,6 @@ HTSEXT_API int copy_htsopt(const httrackp * from, httrackp * to) {
|
||||
if (from->maxtime > -1)
|
||||
to->maxtime = from->maxtime;
|
||||
|
||||
#if HTS_USEMMS
|
||||
if (from->mms_maxtime > -1)
|
||||
to->mms_maxtime = from->mms_maxtime;
|
||||
#endif
|
||||
|
||||
if (from->maxrate > -1)
|
||||
to->maxrate = from->maxrate;
|
||||
|
||||
@@ -3797,7 +3760,7 @@ int htsAddLink(htsmoduleStruct * str, char *link) {
|
||||
//
|
||||
// On part de la fin et on essaye de se presser (économise temps machine)
|
||||
{
|
||||
int i = hash_read(hashptr, save, "", 0, opt->urlhack); // lecture type 0 (sav)
|
||||
int i = hash_read(hashptr, save, NULL, HASH_STRUCT_FILENAME ); // lecture type 0 (sav)
|
||||
|
||||
if (i >= 0) {
|
||||
liens[i]->depth = maximum(liens[i]->depth, prio_fix);
|
||||
@@ -3887,5 +3850,5 @@ void voidf(void) {
|
||||
(void) a;
|
||||
}
|
||||
|
||||
// HTTrack Website Copier Copyright (C) Xavier Roche and other contributors
|
||||
// HTTrack Website Copier Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
//
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -43,12 +42,8 @@ Please visit our Website: http://www.httrack.com
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef _WIN32
|
||||
#ifndef _WIN32_WCE
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#ifndef _WIN32_WCE
|
||||
#include <direct.h>
|
||||
#endif
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
@@ -155,8 +150,6 @@ struct lien_url {
|
||||
char *cod; // chemin codebase éventuel si classe java
|
||||
char *former_adr; // adresse initiale (avant éventuel moved), peut être nulle
|
||||
char *former_fil; // nom du fichier distant initial (avant éventuel moved), peut être nul
|
||||
// pour optimisation:
|
||||
int hash_next[3]; // prochain lien avec même valeur hash
|
||||
};
|
||||
|
||||
// chargement de fichiers en 'arrière plan'
|
||||
@@ -261,9 +254,19 @@ struct cache_back {
|
||||
typedef struct hash_struct hash_struct;
|
||||
#endif
|
||||
struct hash_struct {
|
||||
lien_url **liens; // pointeur sur liens
|
||||
int max_lien; // indice le plus grand rencontré
|
||||
int hash[3][HTS_HASH_SIZE]; // tables pour sav/adr-fil/former_adr-former_fil
|
||||
/* Links big array reference */
|
||||
const lien_url **liens;
|
||||
/* Savename (case insensitive ; lowercased) */
|
||||
inthash sav;
|
||||
/* Address and path */
|
||||
inthash adrfil;
|
||||
/* Former address and path */
|
||||
inthash former_adrfil;
|
||||
/** Buffers **/
|
||||
int normalized;
|
||||
char normfil[HTS_URLMAXSIZE * 2];
|
||||
char normfil2[HTS_URLMAXSIZE * 2];
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
};
|
||||
|
||||
#ifndef HTS_DEF_FWSTRUCT_filecreate_params
|
||||
@@ -295,26 +298,6 @@ HTS_STATIC int cache_readable(cache_back * cache) {
|
||||
/* Library internal definictions */
|
||||
#ifdef HTS_INTERNAL_BYTECODE
|
||||
|
||||
//
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int hts_is_parsing(httrackp * opt, int flag);
|
||||
HTSEXT_API int hts_is_testing(httrackp * opt);
|
||||
HTSEXT_API int hts_addurl(httrackp * opt, char **url);
|
||||
HTSEXT_API int hts_resetaddurl(httrackp * opt);
|
||||
HTSEXT_API int copy_htsopt(const httrackp * from, httrackp * to);
|
||||
HTSEXT_API char *hts_errmsg(httrackp * opt);
|
||||
HTSEXT_API int hts_setpause(httrackp * opt, int);
|
||||
|
||||
//
|
||||
HTSEXT_API int hts_is_exiting(httrackp * opt);
|
||||
HTSEXT_API int hts_request_stop(httrackp * opt, int force);
|
||||
|
||||
//
|
||||
HTSEXT_API int hts_cancel_file_push(httrackp * opt, const char *url);
|
||||
HTSEXT_API void hts_cancel_test(httrackp * opt);
|
||||
HTSEXT_API void hts_cancel_parsing(httrackp * opt);
|
||||
#endif
|
||||
|
||||
char *hts_cancel_file_pop(httrackp * opt);
|
||||
|
||||
#endif
|
||||
@@ -342,11 +325,6 @@ void usercommand(httrackp * opt, int exe, const char *cmd, const char *file,
|
||||
void usercommand_exe(const char *cmd, const char *file);
|
||||
int filters_init(char ***ptrfilters, int maxfilter, int filterinc);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int structcheck(const char *path);
|
||||
HTSEXT_API int structcheck_utf8(const char *path);
|
||||
HTSEXT_API int dir_exists(const char *path);
|
||||
#endif
|
||||
int fspc(httrackp * opt, FILE * fp, const char *type);
|
||||
char *next_token(char *p, int flag);
|
||||
|
||||
@@ -374,13 +352,6 @@ int backlinks_done(struct_back * sback, lien_url ** liens, int lien_tot,
|
||||
int back_fillmax(struct_back * sback, httrackp * opt, cache_back * cache,
|
||||
lien_url ** liens, int ptr, int numero_passe, int lien_tot);
|
||||
|
||||
// cancel file
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int hts_cancel_file_push(httrackp * opt, const char *url);
|
||||
HTSEXT_API void hts_cancel_test(httrackp * opt);
|
||||
HTSEXT_API void hts_cancel_parsing(httrackp * opt);
|
||||
#endif
|
||||
|
||||
int ask_continue(httrackp * opt);
|
||||
int nombre_digit(int n);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -44,11 +43,6 @@ Please visit our Website: http://www.httrack.com
|
||||
|
||||
/* Library internal definictions */
|
||||
#ifdef HTS_INTERNAL_BYTECODE
|
||||
// Main, récupère les paramètres et appelle le robot
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int hts_main(int argc, char **argv);
|
||||
HTSEXT_API int hts_main2(int argc, char **argv, httrackp * opt);
|
||||
#endif
|
||||
|
||||
int cmdl_opt(char *s);
|
||||
int check_path(String * s, char *defaultname);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -31,10 +30,9 @@ Please visit our Website: http://www.httrack.com
|
||||
/* Author: Xavier Roche */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "htscharset.h"
|
||||
#include "htsencoding.h"
|
||||
#include "htssafe.h"
|
||||
|
||||
/* static int decode_entity(const unsigned int hash, const size_t len);
|
||||
*/
|
||||
@@ -68,7 +66,7 @@ int hts_unescapeEntitiesWithCharset(const char *src, char *dest, const size_t ma
|
||||
int hex;
|
||||
unsigned int hash;
|
||||
|
||||
assert(max != 0);
|
||||
assertf(max != 0);
|
||||
for(i = 0, j = 0, ampStart = (size_t) -1, ampStartDest = 0,
|
||||
uc = -1, hex = 0, hash = 0 ; src[i] != '\0' ; i++) {
|
||||
/* start of entity */
|
||||
@@ -204,12 +202,14 @@ int hts_unescapeEntities(const char *src, char *dest, const size_t max) {
|
||||
return hts_unescapeEntitiesWithCharset(src, dest, max, "UTF-8");
|
||||
}
|
||||
|
||||
int hts_unescapeUrl(const char *src, char *dest, const size_t max) {
|
||||
int hts_unescapeUrlSpecial(const char *src, char *dest, const size_t max,
|
||||
const int flags) {
|
||||
size_t i, j, lastI, lastJ, k, utfBufferJ, utfBufferSize;
|
||||
int seenQuery = 0;
|
||||
char utfBuffer[32];
|
||||
|
||||
assert(src != dest);
|
||||
assert(max != 0);
|
||||
assertf(src != dest);
|
||||
assertf(max != 0);
|
||||
|
||||
for(i = 0, j = 0, k = 0, utfBufferJ = 0, utfBufferSize = 0,
|
||||
lastI = (size_t) -1, lastJ = (size_t) -1
|
||||
@@ -218,7 +218,7 @@ int hts_unescapeUrl(const char *src, char *dest, const size_t max) {
|
||||
unsigned char cUtf = (unsigned char) c;
|
||||
|
||||
/* Replacement for ' ' */
|
||||
if (c == '+') {
|
||||
if (c == '+' && seenQuery) {
|
||||
c = cUtf = ' ';
|
||||
k = 0; /* cancel any sequence */
|
||||
}
|
||||
@@ -238,7 +238,10 @@ int hts_unescapeUrl(const char *src, char *dest, const size_t max) {
|
||||
cUtf = (unsigned char) ec;
|
||||
|
||||
/* Shortcut for ASCII (do not unescape non-printable) */
|
||||
if ((unsigned char) ec < 0x80 && (unsigned char) ec >= 32) {
|
||||
if (
|
||||
(cUtf < 0x80 && cUtf >= 32)
|
||||
&& ( flags & UNESCAPE_URL_NO_ASCII ) == 0
|
||||
) {
|
||||
/* Rollback new write position and character */
|
||||
j = lastJ;
|
||||
c = ec;
|
||||
@@ -250,6 +253,9 @@ int hts_unescapeUrl(const char *src, char *dest, const size_t max) {
|
||||
/* ASCII (and not in %xx) */
|
||||
else if (cUtf < 0x80 && i != lastI + 1) {
|
||||
k = 0; /* cancel any sequence */
|
||||
if (c == '?' && !seenQuery) {
|
||||
seenQuery = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* UTF-8 sequence in progress (either a raw or a %xx character) */
|
||||
@@ -312,3 +318,7 @@ int hts_unescapeUrl(const char *src, char *dest, const size_t max) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hts_unescapeUrl(const char *src, char *dest, const size_t max) {
|
||||
return hts_unescapeUrlSpecial(src, dest, max, 0);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -41,6 +40,14 @@ Please visit our Website: http://www.httrack.com
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Flags for hts_unescapeUrlSpecial().
|
||||
**/
|
||||
typedef enum unescapeFlags {
|
||||
/** Do not decode ASCII. **/
|
||||
UNESCAPE_URL_NO_ASCII = 1
|
||||
} unescapeFlags;
|
||||
|
||||
/**
|
||||
* Unescape HTML entities (as per HTML 4.0 Specification)
|
||||
* and replace them in-place by their UTF-8 equivalents.
|
||||
@@ -71,4 +78,15 @@ extern int hts_unescapeEntitiesWithCharset(const char *src,
|
||||
**/
|
||||
extern int hts_unescapeUrl(const char *src, char *dest, const size_t max);
|
||||
|
||||
/**
|
||||
* Unescape an URL-encoded string. The implicit charset is UTF-8.
|
||||
* In case of UTF-8 decoding error inside URL-encoded characters,
|
||||
* the characters are left undecoded.
|
||||
* "flags" is a mask composed of UNESCAPE_URL_XXX constants.
|
||||
* Note: source and destination MUST NOT be the same.
|
||||
* Returns 0 upon success, -1 upon overflow or error.
|
||||
**/
|
||||
extern int hts_unescapeUrlSpecial(const char *src, char *dest, const size_t max,
|
||||
const int flags);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
19
src/htsftp.c
19
src/htsftp.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -50,11 +49,9 @@ Please visit our Website: http://www.httrack.com
|
||||
#ifdef _WIN32
|
||||
#ifndef __cplusplus
|
||||
// DOS
|
||||
#ifndef _WIN32_WCE
|
||||
#include <process.h> /* _beginthread, _endthread */
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ftp mode passif
|
||||
// #if HTS_INET6==0
|
||||
@@ -220,7 +217,7 @@ int run_launch_ftp(FTPDownloadStruct * pStruct) {
|
||||
ftp_filename = a;
|
||||
if (strnotempty(a)) {
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
char *ua = unescape_http(catbuff, a);
|
||||
char *ua = unescape_http(catbuff, sizeof(catbuff), a);
|
||||
int len_a = (int) strlen(ua);
|
||||
|
||||
if (len_a > 0 && ua[len_a - 1] == '/') { /* obviously a directory listing */
|
||||
@@ -531,7 +528,7 @@ int run_launch_ftp(FTPDownloadStruct * pStruct) {
|
||||
if (back->r.statuscode != -1) {
|
||||
if (!transfer_list) {
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
char *ua = unescape_http(catbuff, ftp_filename);
|
||||
char *ua = unescape_http(catbuff, sizeof(catbuff), ftp_filename);
|
||||
|
||||
if ((strchr(ua, ' '))
|
||||
|| (strchr(ua, '\"'))
|
||||
|
||||
13
src/htsftp.h
13
src/htsftp.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
100
src/htsglobal.h
100
src/htsglobal.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -37,24 +36,14 @@ Please visit our Website: http://www.httrack.com
|
||||
#define HTTRACK_GLOBAL_DEFH
|
||||
|
||||
// Version (also check external version information)
|
||||
#define HTTRACK_VERSION "3.47-19"
|
||||
#define HTTRACK_VERSIONID "3.47.19"
|
||||
#define HTTRACK_VERSION "3.48-7"
|
||||
#define HTTRACK_VERSIONID "3.48.7"
|
||||
#define HTTRACK_AFF_VERSION "3.x"
|
||||
#define HTTRACK_LIB_VERSION "2.0"
|
||||
|
||||
#ifndef HTS_NOINCLUDES
|
||||
#ifndef _WIN32_WCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HTS_CECOMPAT
|
||||
#include "cecompat.h"
|
||||
#else
|
||||
#include "celib.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Définition plate-forme
|
||||
@@ -68,12 +57,22 @@ Please visit our Website: http://www.httrack.com
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* GCC extension */
|
||||
#ifndef HTS_UNUSED
|
||||
#ifdef __GNUC__
|
||||
#define HTS_UNUSED __attribute__ ((unused))
|
||||
#define HTS_STATIC static __attribute__ ((unused))
|
||||
#define HTS_PRINTF_FUN(fmt, arg) __attribute__ ((format (printf, fmt, arg)))
|
||||
#else
|
||||
#define HTS_UNUSED
|
||||
#define HTS_STATIC static
|
||||
#define HTS_PRINTF_FUN(fmt, arg)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// config.h
|
||||
#ifdef _WIN32
|
||||
|
||||
// WIN32
|
||||
#ifndef _WIN32_WCE
|
||||
|
||||
/*
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
@@ -92,39 +91,6 @@ Please visit our Website: http://www.httrack.com
|
||||
|
||||
#else
|
||||
|
||||
// Win32CE
|
||||
//#pragma runtime_checks( "s", restore )
|
||||
#define HTS_SPARE_MEMORY 1
|
||||
#define HTS_ALIGN 8
|
||||
#define BIGSTK static
|
||||
#undef DLLIB // LoadLibrary(libssl) crashes
|
||||
#define NOSTRDEBUG 1
|
||||
#undef HTS_MAKE_KEYWORD_INDEX
|
||||
#ifdef HTS_CECOMPAT
|
||||
#define HTS_DO_NOT_USE_FTIME 1
|
||||
/*
|
||||
#undef HAVE_SYS_STAT_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
*/
|
||||
#else
|
||||
#undef HTS_DO_NOT_USE_FTIME
|
||||
/*
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
*/
|
||||
#endif
|
||||
|
||||
#define HTS_DLOPEN 0
|
||||
#undef HTS_INET6
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(m) ((m) & _S_IFREG)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef FTIME
|
||||
@@ -198,11 +164,6 @@ Please visit our Website: http://www.httrack.com
|
||||
#define HTS_USEOPENSSL 1
|
||||
#endif
|
||||
|
||||
// utiliser mms://?
|
||||
#ifndef HTS_USEMMS
|
||||
#define HTS_USEMMS 1
|
||||
#endif
|
||||
|
||||
#ifndef HTS_DLOPEN
|
||||
#define HTS_DLOPEN 1
|
||||
#endif
|
||||
@@ -246,23 +207,19 @@ Please visit our Website: http://www.httrack.com
|
||||
#endif
|
||||
|
||||
#if HTS_SPARE_MEMORY==0
|
||||
/* Gestion des tables de hashage */
|
||||
#define HTS_HASH_SIZE 20147
|
||||
/* Taille max d'une URL */
|
||||
#define HTS_URLMAXSIZE 1024
|
||||
/* Taille max ligne de commande (>=HTS_URLMAXSIZE*2) */
|
||||
#define HTS_CDLMAXSIZE 1024
|
||||
#else
|
||||
/* Gestion des tables de hashage */
|
||||
#define HTS_HASH_SIZE 1023
|
||||
/* Taille max d'une URL */
|
||||
#define HTS_URLMAXSIZE 256
|
||||
/* Taille max ligne de commande (>=HTS_URLMAXSIZE*2) */
|
||||
#define HTS_CDLMAXSIZE 1024
|
||||
#endif
|
||||
|
||||
/* Copyright (C) Xavier Roche and other contributors */
|
||||
#define HTTRACK_AFF_AUTHORS "[XR&CO'2013]"
|
||||
/* Copyright (C) 1998-2014 Xavier Roche and other contributors */
|
||||
#define HTTRACK_AFF_AUTHORS "[XR&CO'2014]"
|
||||
#define HTS_DEFAULT_FOOTER "<!-- Mirrored from %s%s by HTTrack Website Copier/"HTTRACK_AFF_VERSION" "HTTRACK_AFF_AUTHORS", %s -->"
|
||||
#define HTTRACK_WEB "http://www.httrack.com"
|
||||
#define HTS_UPDATE_WEBSITE "http://www.httrack.com/update.php3?Product=HTTrack&Version="HTTRACK_VERSIONID"&VersionStr="HTTRACK_VERSION"&Platform=%d&Language=%s"
|
||||
@@ -283,8 +240,8 @@ Please visit our Website: http://www.httrack.com
|
||||
#define maximum(A,B) ( (A) > (B) ? (A) : (B) )
|
||||
#define minimum(A,B) ( (A) < (B) ? (A) : (B) )
|
||||
|
||||
/* chaine vide? */
|
||||
#define strnotempty(A) (((A)[0]!='\0') ? 1 : 0)
|
||||
/* chaine no empty ? (and not null) */
|
||||
#define strnotempty(A) (((A) != NULL && (A)[0] != '\0'))
|
||||
|
||||
/* optimisation inline si possible */
|
||||
#ifdef __cplusplus
|
||||
@@ -327,9 +284,10 @@ typedef __int64 LLint;
|
||||
typedef __int64 TStamp;
|
||||
|
||||
#define LLintP "%I64d"
|
||||
#elif (defined(__x86_64__) || defined(_LP64) || defined(__64BIT__))
|
||||
typedef unsigned long int LLint;
|
||||
typedef unsigned long int TStamp;
|
||||
#elif (defined(_LP64) || defined(__x86_64__) \
|
||||
|| defined(__powerpc64__) || defined(__64BIT__))
|
||||
typedef long int LLint;
|
||||
typedef long int TStamp;
|
||||
|
||||
#define LLintP "%ld"
|
||||
#else
|
||||
|
||||
523
src/htshash.c
523
src/htshash.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -35,14 +34,15 @@ Please visit our Website: http://www.httrack.com
|
||||
/* Internal engine bytecode */
|
||||
#define HTS_INTERNAL_BYTECODE
|
||||
|
||||
#include "htsopt.h"
|
||||
#include "htshash.h"
|
||||
|
||||
/* specific definitions */
|
||||
#include "htsbase.h"
|
||||
#include "htsopt.h"
|
||||
#include "htsglobal.h"
|
||||
#include "htsmd5.h"
|
||||
#include "htscore.h"
|
||||
#include "htsinthash.h"
|
||||
/* END specific definitions */
|
||||
|
||||
/* Specific macros */
|
||||
@@ -56,267 +56,278 @@ Please visit our Website: http://www.httrack.com
|
||||
// GESTION DES TABLES DE HACHAGE
|
||||
// Méthode à 2 clés (adr+fil), 2e cle facultative
|
||||
// hash[no_enregistrement][pos]->hash est un index dans le tableau général liens
|
||||
// #define HTS_HASH_SIZE 8191 (premier si possible!)
|
||||
// type: numero enregistrement - 0 est case insensitive (sav) 1 (adr+fil) 2 (former_adr+former_fil)
|
||||
// recherche dans la table selon nom1,nom2 et le no d'enregistrement
|
||||
|
||||
/* Key free handler (NOOP) ; addresses are kept */
|
||||
static void key_freehandler(void *arg, void *value) {
|
||||
}
|
||||
|
||||
/* Key strdup (pointer copy) */
|
||||
static char* key_duphandler(void *arg, const char *name) {
|
||||
union {
|
||||
const char *roname;
|
||||
char *name;
|
||||
} u;
|
||||
u.roname = name;
|
||||
return u.name;
|
||||
}
|
||||
|
||||
/* Key sav hashes are using case-insensitive version */
|
||||
static inthash_keys key_sav_hashes(void *arg, const char *value) {
|
||||
hash_struct *const hash = (hash_struct*) arg;
|
||||
convtolower(hash->catbuff, value);
|
||||
return inthash_hash_value(hash->catbuff);
|
||||
}
|
||||
|
||||
/* Key sav comparison is case-insensitive */
|
||||
static int key_sav_equals(void *arg, const char *a, const char *b) {
|
||||
return strcasecmp(a, b) == 0;
|
||||
}
|
||||
|
||||
static const char* key_sav_debug_print(void *arg, const char *a) {
|
||||
return a;
|
||||
}
|
||||
|
||||
static const char* value_sav_debug_print(void *arg, void *a) {
|
||||
return (char*) a;
|
||||
}
|
||||
|
||||
/* Pseudo-key (lien_url structure) hash function */
|
||||
static inthash_keys key_adrfil_hashes_generic(void *arg, const char *value_,
|
||||
const int former) {
|
||||
hash_struct *const hash = (hash_struct*) arg;
|
||||
const lien_url*const lien = (lien_url*) value_;
|
||||
const char *const adr = !former ? lien->adr : lien->former_adr;
|
||||
const char *const fil = !former ? lien->fil : lien->former_fil;
|
||||
const char *const adr_norm = adr != NULL ?
|
||||
( hash->normalized ? jump_normalized(adr) : jump_identification(adr) )
|
||||
: NULL;
|
||||
|
||||
// copy address
|
||||
assertf(adr_norm != NULL);
|
||||
strcpy(hash->normfil, adr_norm);
|
||||
|
||||
// copy link
|
||||
assertf(fil != NULL);
|
||||
if (hash->normalized) {
|
||||
fil_normalized(fil, &hash->normfil[strlen(hash->normfil)]);
|
||||
} else {
|
||||
strcpy(&hash->normfil[strlen(hash->normfil)], fil);
|
||||
}
|
||||
|
||||
// hash
|
||||
return inthash_hash_value(hash->normfil);
|
||||
}
|
||||
|
||||
/* Pseudo-key (lien_url structure) comparison function */
|
||||
static int key_adrfil_equals_generic(void *arg, const char *a_, const char *b_,
|
||||
const int former) {
|
||||
hash_struct *const hash = (hash_struct*) arg;
|
||||
const int normalized = hash->normalized;
|
||||
const lien_url*const a = (lien_url*) a_;
|
||||
const lien_url*const b = (lien_url*) b_;
|
||||
const char *const a_adr = !former ? a->adr : a->former_adr;
|
||||
const char *const b_adr = !former ? b->adr : b->former_adr;
|
||||
const char *const a_fil = !former ? a->fil : a->former_fil;
|
||||
const char *const b_fil = !former ? b->fil : b->former_fil;
|
||||
const char *ja;
|
||||
const char *jb;
|
||||
|
||||
// safety
|
||||
assertf(a_adr != NULL);
|
||||
assertf(b_adr != NULL);
|
||||
assertf(a_fil != NULL);
|
||||
assertf(b_fil != NULL);
|
||||
|
||||
// skip scheme and authentication to the domain (possibly without www.)
|
||||
ja = normalized ? jump_normalized(a_adr) : jump_identification(a_adr);
|
||||
jb = normalized ? jump_normalized(b_adr) : jump_identification(b_adr);
|
||||
assertf(ja != NULL);
|
||||
assertf(jb != NULL);
|
||||
if (strcasecmp(ja, jb) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// now compare pathes
|
||||
if (normalized) {
|
||||
fil_normalized(a_fil, hash->normfil);
|
||||
fil_normalized(b_fil, hash->normfil2);
|
||||
return strcmp(hash->normfil, hash->normfil2) == 0;
|
||||
} else {
|
||||
return strcmp(a_fil, b_fil) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
static const char* key_adrfil_debug_print_(void *arg, const char *a_, const int former) {
|
||||
hash_struct *const hash = (hash_struct*) arg;
|
||||
const int normalized = hash->normalized;
|
||||
const lien_url*const a = (lien_url*) a_;
|
||||
const char *const a_adr = !former ? a->adr : a->former_adr;
|
||||
const char *const a_fil = !former ? a->fil : a->former_fil;
|
||||
snprintf(hash->normfil, sizeof(hash->normfil), "%s%s", a_adr, a_fil);
|
||||
return hash->normfil;
|
||||
}
|
||||
|
||||
static const char* key_adrfil_debug_print(void *arg, const char *a_) {
|
||||
return key_adrfil_debug_print_(arg, a_, 0);
|
||||
}
|
||||
|
||||
static const char* key_former_adrfil_debug_print(void *arg, const char *a_) {
|
||||
return key_adrfil_debug_print_(arg, a_, 1);
|
||||
}
|
||||
|
||||
static const char* value_adrfil_debug_print(void *arg, void *value) {
|
||||
hash_struct *const hash = (hash_struct*) arg;
|
||||
inthash_value v;
|
||||
v.ptr = value;
|
||||
snprintf(hash->normfil2, sizeof(hash->normfil2), "%d", (int) v.intg);
|
||||
return hash->normfil2;
|
||||
}
|
||||
|
||||
/* "adr"/"fil" lien_url structure members hashing function */
|
||||
static inthash_keys key_adrfil_hashes(void *arg, const char *value_) {
|
||||
return key_adrfil_hashes_generic(arg, value_, 0);
|
||||
}
|
||||
|
||||
/* "adr"/"fil" lien_url structure members comparison function */
|
||||
static int key_adrfil_equals(void *arg, const char *a, const char *b) {
|
||||
return key_adrfil_equals_generic(arg, a, b, 0);
|
||||
}
|
||||
|
||||
/* "former_adr"/"former_fil" lien_url structure members hashing function */
|
||||
static inthash_keys key_former_adrfil_hashes(void *arg, const char *value_) {
|
||||
return key_adrfil_hashes_generic(arg, value_, 1);
|
||||
}
|
||||
|
||||
/* "former_adr"/"former_fil" lien_url structure members comparison function */
|
||||
static int key_former_adrfil_equals(void *arg, const char *a, const char *b) {
|
||||
return key_adrfil_equals_generic(arg, a, b, 1);
|
||||
}
|
||||
|
||||
void hash_init(httrackp *opt, hash_struct * hash, int normalized) {
|
||||
hash->sav = inthash_new(0);
|
||||
hash->adrfil = inthash_new(0);
|
||||
hash->former_adrfil = inthash_new(0);
|
||||
hash->normalized = normalized;
|
||||
|
||||
hts_set_hash_handler(hash->sav, opt);
|
||||
hts_set_hash_handler(hash->adrfil, opt);
|
||||
hts_set_hash_handler(hash->former_adrfil, opt);
|
||||
|
||||
inthash_set_name(hash->sav, "hash->sav");
|
||||
inthash_set_name(hash->adrfil, "hash->adrfil");
|
||||
inthash_set_name(hash->former_adrfil, "hash->former_adrfil");
|
||||
|
||||
/* Case-insensitive comparison ; keys are direct char* filenames */
|
||||
inthash_value_set_key_handler(hash->sav,
|
||||
key_duphandler,
|
||||
key_freehandler,
|
||||
key_sav_hashes,
|
||||
key_sav_equals,
|
||||
hash);
|
||||
|
||||
/* URL-style comparison ; keys are lien_url structure pointers casted
|
||||
to char* */
|
||||
inthash_value_set_key_handler(hash->adrfil,
|
||||
key_duphandler,
|
||||
key_freehandler,
|
||||
key_adrfil_hashes,
|
||||
key_adrfil_equals,
|
||||
hash);
|
||||
inthash_value_set_key_handler(hash->former_adrfil,
|
||||
key_duphandler,
|
||||
key_freehandler,
|
||||
key_former_adrfil_hashes,
|
||||
key_former_adrfil_equals,
|
||||
hash);
|
||||
|
||||
/* pretty-printing */
|
||||
inthash_set_print_handler(hash->sav,
|
||||
key_sav_debug_print,
|
||||
value_sav_debug_print,
|
||||
NULL);
|
||||
inthash_set_print_handler(hash->adrfil,
|
||||
key_adrfil_debug_print,
|
||||
value_adrfil_debug_print,
|
||||
hash);
|
||||
inthash_set_print_handler(hash->former_adrfil,
|
||||
key_former_adrfil_debug_print,
|
||||
value_adrfil_debug_print,
|
||||
hash);
|
||||
}
|
||||
|
||||
void hash_free(hash_struct *hash) {
|
||||
if (hash != NULL) {
|
||||
inthash_delete(&hash->sav);
|
||||
inthash_delete(&hash->adrfil);
|
||||
inthash_delete(&hash->former_adrfil);
|
||||
}
|
||||
}
|
||||
|
||||
// retour: position ou -1 si non trouvé
|
||||
int hash_read(const hash_struct * hash, const char *nom1, const char *nom2,
|
||||
int type, int normalized) {
|
||||
char BIGSTK normfil_[HTS_URLMAXSIZE * 2];
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
const char *normfil;
|
||||
const char *normadr;
|
||||
unsigned int cle;
|
||||
int pos;
|
||||
hash_struct_type type) {
|
||||
intptr_t intvalue;
|
||||
lien_url lien;
|
||||
|
||||
// calculer la clé de recherche, non modulée
|
||||
if (type)
|
||||
cle = hash_cle(nom1, nom2);
|
||||
else
|
||||
cle = hash_cle(convtolower(catbuff, nom1), nom2); // case insensitive
|
||||
// la position se calcule en modulant
|
||||
pos = (int) (cle % HTS_HASH_SIZE);
|
||||
// entrée trouvée?
|
||||
if (hash->hash[type][pos] >= 0) { // un ou plusieurs enregistrement(s) avec une telle clé existe..
|
||||
// tester table de raccourcis (hash)
|
||||
// pos est maintenant la position recherchée dans liens
|
||||
pos = hash->hash[type][pos];
|
||||
while(pos >= 0) { // parcourir la chaine
|
||||
switch (type) {
|
||||
case 0: // sav
|
||||
if (strfield2(nom1, hash->liens[pos]->sav)) { // case insensitive
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: found shortcut at %d\n", pos);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
break;
|
||||
case 1: // adr+fil
|
||||
{
|
||||
if (!normalized)
|
||||
normfil = hash->liens[pos]->fil;
|
||||
else
|
||||
normfil = fil_normalized(hash->liens[pos]->fil, normfil_);
|
||||
if (!normalized)
|
||||
normadr = jump_identification(hash->liens[pos]->adr);
|
||||
else
|
||||
normadr = jump_normalized(hash->liens[pos]->adr);
|
||||
if ((strfield2(nom1, normadr) != 0) && (strcmp(nom2, normfil) == 0)) {
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: found shortcut at %d\n", pos);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: // former_adr+former_fil
|
||||
{
|
||||
if (hash->liens[pos]->former_adr) {
|
||||
if (!normalized)
|
||||
normfil = hash->liens[pos]->former_fil;
|
||||
else
|
||||
normfil = fil_normalized(hash->liens[pos]->former_fil, normfil_);
|
||||
if (!normalized)
|
||||
normadr = jump_identification(hash->liens[pos]->former_adr);
|
||||
else
|
||||
normadr = jump_normalized(hash->liens[pos]->former_adr);
|
||||
|
||||
if ((strfield2(nom1, normadr) != 0) && (strcmp(nom2, normfil) == 0)) {
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: found shortcut at %d\n", pos);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// calculer prochaine position dans la chaine
|
||||
{
|
||||
int old = pos;
|
||||
|
||||
pos = hash->liens[pos]->hash_next[type]; // sinon prochain dans la chaine
|
||||
if (old == pos)
|
||||
pos = -1; // erreur de bouclage (ne devrait pas arriver)
|
||||
}
|
||||
/* read */
|
||||
switch(type) {
|
||||
case HASH_STRUCT_FILENAME:
|
||||
if (inthash_read(hash->sav, nom1, &intvalue)) {
|
||||
return (int) intvalue;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Ok va falloir chercher alors..
|
||||
/*pos=hash->max_lien; // commencer à max_lien
|
||||
switch (type) {
|
||||
case 0: // sav
|
||||
while(pos>=0) {
|
||||
if (hash->liens[pos]->hash_sav == cle ) {
|
||||
if (strcmp(nom1,hash->liens[pos]->sav)==0) {
|
||||
hash->hash[type][(int) (cle%HTS_HASH_SIZE)] = pos; // noter plus récent dans shortcut table
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: found long search at %d\n",pos);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
pos--;
|
||||
}
|
||||
break;
|
||||
case 1: // adr+fil
|
||||
while(pos>=0) {
|
||||
if (hash->liens[pos]->hash_adrfil == cle ) {
|
||||
if ((strcmp(nom1,hash->liens[pos]->adr)==0) && (strcmp(nom2,hash->liens[pos]->fil)==0)) {
|
||||
hash->hash[type][(int) (cle%HTS_HASH_SIZE)] = pos; // noter plus récent dans shortcut table
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: found long search at %d\n",pos);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
pos--;
|
||||
}
|
||||
break;
|
||||
case 2: // former_adr+former_fil
|
||||
while(pos>=0) {
|
||||
if (hash->liens[pos]->hash_fadrfil == cle ) {
|
||||
if (hash->liens[pos]->former_adr)
|
||||
if ((strcmp(nom1,hash->liens[pos]->former_adr)==0) && (strcmp(nom2,hash->liens[pos]->former_fil)==0)) {
|
||||
hash->hash[type][(int) (cle%HTS_HASH_SIZE)] = pos; // noter plus récent dans shortcut table
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: found long search at %d\n",pos);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
pos--;
|
||||
}
|
||||
} */
|
||||
#if DEBUG_HASH==1
|
||||
printf("hash: not found after test %s%s\n", nom1, nom2);
|
||||
#endif
|
||||
return -1; // non trouvé
|
||||
} else {
|
||||
#if DEBUG_HASH==2
|
||||
printf("hash: not found %s%s\n", nom1, nom2);
|
||||
#endif
|
||||
return -1; // non trouvé : clé non entrée (même une fois)
|
||||
break;
|
||||
case HASH_STRUCT_ADR_PATH:
|
||||
memset(&lien, 0, sizeof(lien));
|
||||
lien.adr = key_duphandler(NULL, nom1);
|
||||
lien.fil = key_duphandler(NULL, nom2);
|
||||
if (inthash_read(hash->adrfil, (char*) &lien, &intvalue)) {
|
||||
return (int) intvalue;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case HASH_STRUCT_ORIGINAL_ADR_PATH:
|
||||
memset(&lien, 0, sizeof(lien));
|
||||
lien.former_adr = key_duphandler(NULL, nom1);
|
||||
lien.former_fil = key_duphandler(NULL, nom2);
|
||||
if (inthash_read(hash->former_adrfil, (char*) &lien, &intvalue)) {
|
||||
return (int) intvalue;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assertf(! "unexpected case");
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// enregistrement lien lpos dans les 3 tables hash1..3
|
||||
void hash_write(hash_struct * hash, int lpos, int normalized) {
|
||||
char BIGSTK normfil_[HTS_URLMAXSIZE * 2];
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
const char *normfil;
|
||||
unsigned int cle;
|
||||
int pos;
|
||||
int *ptr;
|
||||
void hash_write(hash_struct * hash, int lpos) {
|
||||
/* first entry: destination filename (lowercased) */
|
||||
inthash_write(hash->sav, hash->liens[lpos]->sav, lpos);
|
||||
|
||||
//
|
||||
if (hash->liens[lpos]) { // on sait jamais..
|
||||
hash->max_lien = max(hash->max_lien, lpos);
|
||||
#if DEBUG_HASH
|
||||
hashnumber = hash->max_lien;
|
||||
#endif
|
||||
// élément actuel sur -1 (fin de chaine)
|
||||
hash->liens[lpos]->hash_next[0] = hash->liens[lpos]->hash_next[1] =
|
||||
hash->liens[lpos]->hash_next[2] = -1;
|
||||
//
|
||||
cle = hash_cle(convtolower(catbuff, hash->liens[lpos]->sav), ""); // CASE INSENSITIVE
|
||||
pos = (int) (cle % HTS_HASH_SIZE);
|
||||
ptr = hash_calc_chaine(hash, 0, pos); // calculer adresse chaine
|
||||
*ptr = lpos; // noter dernier enregistré
|
||||
#if DEBUG_HASH==3
|
||||
printf("[%d", pos);
|
||||
#endif
|
||||
//
|
||||
if (!normalized)
|
||||
normfil = hash->liens[lpos]->fil;
|
||||
else
|
||||
normfil = fil_normalized(hash->liens[lpos]->fil, normfil_);
|
||||
if (!normalized)
|
||||
cle = hash_cle(jump_identification(hash->liens[lpos]->adr), normfil);
|
||||
else
|
||||
cle = hash_cle(jump_normalized(hash->liens[lpos]->adr), normfil);
|
||||
pos = (int) (cle % HTS_HASH_SIZE);
|
||||
ptr = hash_calc_chaine(hash, 1, pos); // calculer adresse chaine
|
||||
*ptr = lpos; // noter dernier enregistré
|
||||
#if DEBUG_HASH==3
|
||||
printf(",%d", pos);
|
||||
#endif
|
||||
//
|
||||
if (hash->liens[lpos]->former_adr) { // former_adr existe?
|
||||
if (!normalized)
|
||||
normfil = hash->liens[lpos]->former_fil;
|
||||
else
|
||||
normfil = fil_normalized(hash->liens[lpos]->former_fil, normfil_);
|
||||
if (!normalized)
|
||||
cle =
|
||||
hash_cle(jump_identification(hash->liens[lpos]->former_adr), normfil);
|
||||
else
|
||||
cle = hash_cle(jump_normalized(hash->liens[lpos]->former_adr), normfil);
|
||||
pos = (int) (cle % HTS_HASH_SIZE);
|
||||
ptr = hash_calc_chaine(hash, 2, pos); // calculer adresse chaine
|
||||
*ptr = lpos; // noter dernier enregistré
|
||||
#if DEBUG_HASH==3
|
||||
printf(",%d", pos);
|
||||
#endif
|
||||
}
|
||||
#if DEBUG_HASH==3
|
||||
printf("] ");
|
||||
fflush(stdout);
|
||||
#endif
|
||||
/* second entry: URL address and path */
|
||||
inthash_write(hash->adrfil, (char*) hash->liens[lpos], lpos);
|
||||
|
||||
/* third entry: URL address and path before redirect */
|
||||
if (hash->liens[lpos]->former_adr) { // former_adr existe?
|
||||
inthash_write(hash->former_adrfil, (char*) hash->liens[lpos], lpos);
|
||||
}
|
||||
#if DEBUT_HASH
|
||||
else {
|
||||
printf("* hash_write=0!!\n");
|
||||
abortLogFmt("unexpected error in hash_write (pos=%d)" _pos);
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
//
|
||||
}
|
||||
|
||||
// calcul clé
|
||||
// il n'y a pas de formule de hashage universelle, celle-ci semble acceptable..
|
||||
unsigned long int hash_cle(const char *nom1, const char *nom2) {
|
||||
/*
|
||||
unsigned int sum=0;
|
||||
int i=0;
|
||||
while(*nom1) {
|
||||
sum += 1;
|
||||
sum += (unsigned int) *(nom1);
|
||||
sum *= (unsigned int) *(nom1++);
|
||||
sum += (unsigned int) i;
|
||||
i++;
|
||||
}
|
||||
while(*nom2) {
|
||||
sum += 1;
|
||||
sum += (unsigned int) *(nom2);
|
||||
sum *= (unsigned int) *(nom2++);
|
||||
sum += (unsigned int) i;
|
||||
i++;
|
||||
}
|
||||
*/
|
||||
return md5sum32(nom1)
|
||||
+ md5sum32(nom2);
|
||||
}
|
||||
|
||||
// calcul de la position finale dans la chaine des elements ayant la même clé
|
||||
int *hash_calc_chaine(hash_struct * hash, int type, int pos) {
|
||||
#if DEBUG_HASH
|
||||
int count = 0;
|
||||
#endif
|
||||
if (hash->hash[type][pos] == -1)
|
||||
return &(hash->hash[type][pos]); // premier élément dans la chaine
|
||||
pos = hash->hash[type][pos];
|
||||
while(hash->liens[pos]->hash_next[type] != -1) {
|
||||
pos = hash->liens[pos]->hash_next[type];
|
||||
#if DEBUG_HASH
|
||||
count++;
|
||||
#endif
|
||||
void hash_invalidate_entry(hash_struct * hash, int lpos) {
|
||||
if (inthash_remove(hash->adrfil, (char*) hash->liens[lpos])) {
|
||||
/* devalidate entry now it is removed from hashtable */
|
||||
strcpybuff(hash->liens[lpos]->adr, "!");
|
||||
/* add back */
|
||||
inthash_write(hash->adrfil, (char*) hash->liens[lpos], lpos);
|
||||
} else {
|
||||
assertf(! "error invalidating hash entry");
|
||||
}
|
||||
#if DEBUG_HASH
|
||||
count++;
|
||||
longest_hash[type] = max(longest_hash[type], count);
|
||||
#endif
|
||||
return &(hash->liens[pos]->hash_next[type]);
|
||||
}
|
||||
|
||||
// FIN GESTION DES TABLES DE HACHAGE
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -44,11 +43,21 @@ Please visit our Website: http://www.httrack.com
|
||||
typedef struct hash_struct hash_struct;
|
||||
#endif
|
||||
|
||||
/** Type of hash. **/
|
||||
typedef enum hash_struct_type {
|
||||
HASH_STRUCT_FILENAME = 0,
|
||||
HASH_STRUCT_ADR_PATH,
|
||||
HASH_STRUCT_ORIGINAL_ADR_PATH
|
||||
} hash_struct_type;
|
||||
|
||||
// tables de hachage
|
||||
void hash_init(httrackp *opt, hash_struct *hash, int normalized);
|
||||
void hash_free(hash_struct *hash);
|
||||
int hash_read(const hash_struct * hash, const char *nom1, const char *nom2,
|
||||
int type, int normalized);
|
||||
void hash_write(hash_struct * hash, int lpos, int normalized);
|
||||
int *hash_calc_chaine(hash_struct * hash, int type, int pos);
|
||||
hash_struct_type type);
|
||||
void hash_write(hash_struct * hash, int lpos);
|
||||
void hash_invalidate_entry(hash_struct * hash, int lpos);
|
||||
int *hash_calc_chaine(hash_struct * hash, hash_struct_type type, int pos);
|
||||
unsigned long int hash_cle(const char *nom1, const char *nom2);
|
||||
#endif
|
||||
|
||||
|
||||
105
src/htshelp.c
105
src/htshelp.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -117,16 +116,51 @@ void infomsg(char *msg) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct help_wizard_buffers {
|
||||
char urls[HTS_URLMAXSIZE * 2];
|
||||
char mainpath[256];
|
||||
char projname[256];
|
||||
char stropt[2048]; // options
|
||||
char stropt2[2048]; // options longues
|
||||
char strwild[2048]; // wildcards
|
||||
char cmd[4096];
|
||||
char str[256];
|
||||
char *argv[256];
|
||||
} help_wizard_buffers;
|
||||
|
||||
void help_wizard(httrackp * opt) {
|
||||
char *urls = (char *) malloct(HTS_URLMAXSIZE * 2);
|
||||
char *mainpath = (char *) malloct(256);
|
||||
char *projname = (char *) malloct(256);
|
||||
char *stropt = (char *) malloct(2048); // options
|
||||
char *stropt2 = (char *) malloct(2048); // options longues
|
||||
char *strwild = (char *) malloct(2048); // wildcards
|
||||
char *cmd = (char *) malloct(4096);
|
||||
char *str = (char *) malloct(256);
|
||||
char **argv = (char **) malloct(256 * sizeof(char *));
|
||||
help_wizard_buffers *buffers = malloct(sizeof(help_wizard_buffers));
|
||||
|
||||
#undef urls
|
||||
#undef mainpath
|
||||
#undef projname
|
||||
#undef stropt
|
||||
#undef stropt2
|
||||
#undef strwild
|
||||
#undef cmd
|
||||
#undef str
|
||||
#undef argv
|
||||
|
||||
#define urls (buffers->urls)
|
||||
#define mainpath (buffers->mainpath)
|
||||
#define projname (buffers->projname)
|
||||
#define stropt (buffers->stropt)
|
||||
#define stropt2 (buffers->stropt2)
|
||||
#define strwild (buffers->strwild)
|
||||
#define cmd (buffers->cmd)
|
||||
#define str (buffers->str)
|
||||
#define argv (buffers->argv)
|
||||
|
||||
//char *urls = (char *) malloct(HTS_URLMAXSIZE * 2);
|
||||
//char *mainpath = (char *) malloct(256);
|
||||
//char *projname = (char *) malloct(256);
|
||||
//char *stropt = (char *) malloct(2048); // options
|
||||
//char *stropt2 = (char *) malloct(2048); // options longues
|
||||
//char *strwild = (char *) malloct(2048); // wildcards
|
||||
//char *cmd = (char *) malloct(4096);
|
||||
//char *str = (char *) malloct(256);
|
||||
//char **argv = (char **) malloct(256 * sizeof(char *));
|
||||
|
||||
//
|
||||
char *a;
|
||||
@@ -148,7 +182,7 @@ void help_wizard(httrackp * opt) {
|
||||
printf("\n");
|
||||
printf("Welcome to HTTrack Website Copier (Offline Browser) " HTTRACK_VERSION
|
||||
"%s\n", hts_get_version_info(opt));
|
||||
printf("Copyright (C) Xavier Roche and other contributors\n");
|
||||
printf("Copyright (C) 1998-2014 Xavier Roche and other contributors\n");
|
||||
#ifdef _WIN32
|
||||
printf("Note: You are running the commandline version,\n");
|
||||
printf("run 'WinHTTrack.exe' to get the GUI version.\n");
|
||||
@@ -319,14 +353,16 @@ void help_wizard(httrackp * opt) {
|
||||
}
|
||||
|
||||
/* Free buffers */
|
||||
freet(urls);
|
||||
freet(mainpath);
|
||||
freet(projname);
|
||||
freet(stropt);
|
||||
freet(stropt2);
|
||||
freet(strwild);
|
||||
freet(cmd);
|
||||
freet(str);
|
||||
free(buffers);
|
||||
#undef urls
|
||||
#undef mainpath
|
||||
#undef projname
|
||||
#undef stropt
|
||||
#undef stropt2
|
||||
#undef strwild
|
||||
#undef cmd
|
||||
#undef str
|
||||
#undef argv
|
||||
}
|
||||
int help_query(char *list, int def) {
|
||||
char s[256];
|
||||
@@ -402,7 +438,7 @@ void help_catchurl(const char *dest_path) {
|
||||
{
|
||||
char BIGSTK finalurl[HTS_URLMAXSIZE * 2];
|
||||
|
||||
escape_check_url(dest);
|
||||
inplace_escape_check_url(dest, sizeof(dest));
|
||||
sprintf(finalurl, "%s" POSTTOK "file:%s", url, dest);
|
||||
printf("\nThe URL is: \"%s\"\n", finalurl);
|
||||
printf("You can capture it through: httrack \"%s\"\n", finalurl);
|
||||
@@ -445,7 +481,7 @@ void help(char *app, int more) {
|
||||
infomsg("1");
|
||||
if (more != 2) {
|
||||
sprintf(info,
|
||||
"HTTrack version " HTTRACK_VERSION "%s (compiled " __DATE__ ")",
|
||||
"HTTrack version " HTTRACK_VERSION "%s",
|
||||
hts_is_available());
|
||||
infomsg(info);
|
||||
#ifdef HTTRACK_AFF_WARNING
|
||||
@@ -461,9 +497,6 @@ void help(char *app, int more) {
|
||||
infomsg("General options:");
|
||||
infomsg
|
||||
(" O path for mirror/logfiles+cache (-O path_mirror[,path_cache_and_logfiles])");
|
||||
#ifndef _WIN32
|
||||
infomsg(" %O chroot path to, must be r00t (-%O root_path)");
|
||||
#endif
|
||||
infomsg("");
|
||||
infomsg("Action options:");
|
||||
infomsg(" w *mirror web sites");
|
||||
@@ -489,10 +522,6 @@ void help(char *app, int more) {
|
||||
infomsg(" %cN maximum number of connections/seconds (*%c10)");
|
||||
infomsg
|
||||
(" GN pause transfer if N bytes reached, and wait until lock file is deleted");
|
||||
#if HTS_USEMMS
|
||||
infomsg
|
||||
(" %mN maximum mms stream download time in seconds (60=1 minute, 3600=1 hour)");
|
||||
#endif
|
||||
infomsg("");
|
||||
infomsg("Flow control:");
|
||||
infomsg(" cN number of multiple connections (*c8)");
|
||||
@@ -576,6 +605,8 @@ void help(char *app, int more) {
|
||||
infomsg
|
||||
(" %F footer string in Html code (-%F \"Mirrored [from host %s [file %s [at %s]]]\"");
|
||||
infomsg(" %l preffered language (-%l \"fr, en, jp, *\"");
|
||||
infomsg(" %a accepted formats (-%l \"text/html,image/png,image/jpeg,image/gif;q=0.9,*/*;q=0.1\"");
|
||||
infomsg(" %X additional HTTP header line (-%X \"X-Magic: 42\"");
|
||||
infomsg("");
|
||||
infomsg("Log, index, cache");
|
||||
infomsg
|
||||
@@ -632,7 +663,6 @@ void help(char *app, int more) {
|
||||
infomsg(" #T generate transfer ops. log every minutes");
|
||||
infomsg(" #u wait time");
|
||||
infomsg(" #Z generate transfer rate statictics every minutes");
|
||||
infomsg(" #! execute a shell command (-#! \"echo hello\")");
|
||||
infomsg("");
|
||||
infomsg
|
||||
("Dangerous options: (do NOT use unless you exactly know what you are doing)");
|
||||
@@ -644,7 +674,6 @@ void help(char *app, int more) {
|
||||
infomsg("Command-line specific options:");
|
||||
infomsg
|
||||
(" V execute system command after each files ($0 is the filename: -V \"rm \\$0\")");
|
||||
infomsg(" %U run the engine with another id when called as root (-%U smith)");
|
||||
infomsg
|
||||
(" %W use an external library function as a wrapper (-%W myfoo.so[,myparameters])");
|
||||
/* infomsg(" %O do a chroot before setuid"); */
|
||||
@@ -763,10 +792,10 @@ void help(char *app, int more) {
|
||||
infomsg("example: httrack --continue");
|
||||
infomsg("continues a mirror in the current folder");
|
||||
infomsg("");
|
||||
sprintf(info, "HTTrack version " HTTRACK_VERSION "%s (compiled " __DATE__ ")",
|
||||
sprintf(info, "HTTrack version " HTTRACK_VERSION "%s",
|
||||
hts_is_available());
|
||||
infomsg(info);
|
||||
infomsg("Copyright (C) Xavier Roche and other contributors");
|
||||
infomsg("Copyright (C) 1998-2014 Xavier Roche and other contributors");
|
||||
#ifdef HTS_PLATFORM_NAME
|
||||
infomsg("[compiled: " HTS_PLATFORM_NAME "]");
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -120,14 +119,12 @@ int hts_primindex_words = 0;
|
||||
*/
|
||||
void index_init(const char *indexpath) {
|
||||
#if HTS_MAKE_KEYWORD_INDEX
|
||||
#ifndef _WIN32_WCE
|
||||
/* remove(concat(indexpath,"index.txt")); */
|
||||
hts_index_init = 1;
|
||||
hts_primindex_size = 0;
|
||||
hts_primindex_words = 0;
|
||||
fp_tmpproject = tmpfile();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -146,7 +143,7 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
|
||||
int i = 0;
|
||||
|
||||
//
|
||||
int WordIndexSize = 1024;
|
||||
//int WordIndexSize = 1024;
|
||||
inthash WordIndexHash = NULL;
|
||||
FILE *tmpfp = NULL;
|
||||
|
||||
@@ -164,8 +161,8 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
|
||||
|
||||
// Init ?
|
||||
if (hts_index_init) {
|
||||
UNLINK(concat(catbuff, indexpath, "index.txt"));
|
||||
UNLINK(concat(catbuff, indexpath, "sindex.html"));
|
||||
UNLINK(concat(catbuff, sizeof(catbuff), indexpath, "index.txt"));
|
||||
UNLINK(concat(catbuff, sizeof(catbuff), indexpath, "sindex.html"));
|
||||
hts_index_init = 0;
|
||||
}
|
||||
// Check MIME type
|
||||
@@ -175,11 +172,7 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
|
||||
// FIXME - temporary fix for image/svg+xml (svg)
|
||||
// "IN XML" (html like, in fact :) )
|
||||
else if ((strfield2(mime, "image/svg+xml"))
|
||||
|| (strfield2(mime, "image/svg-xml"))
|
||||
#if HTS_USEMMS
|
||||
|| strfield2(mime, "video/x-ms-asf")
|
||||
#endif
|
||||
) {
|
||||
|| (strfield2(mime, "image/svg-xml"))) {
|
||||
inscript = 0;
|
||||
} else if ((strfield2(mime, "application/x-javascript"))
|
||||
|| (strfield2(mime, "text/css"))
|
||||
@@ -197,7 +190,7 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
|
||||
|
||||
// Create hash structure
|
||||
// Hash tables rulez da world!
|
||||
WordIndexHash = inthash_new(WordIndexSize);
|
||||
WordIndexHash = inthash_new(0);
|
||||
if (!WordIndexHash)
|
||||
return 0;
|
||||
|
||||
@@ -298,7 +291,7 @@ int index_keyword(const char *html_data, LLint size, const char *mime,
|
||||
|
||||
e++; /* 0 means "once" */
|
||||
|
||||
if (strncmp((const char *) fslash(catbuff, (char *) indexpath), filename, strlen(indexpath)) == 0) // couper
|
||||
if (strncmp((const char *) fslash(catbuff, sizeof(catbuff), (char *) indexpath), filename, strlen(indexpath)) == 0) // couper
|
||||
strcpybuff(savelst, filename + strlen(indexpath));
|
||||
else
|
||||
strcpybuff(savelst, filename);
|
||||
@@ -365,9 +358,9 @@ void index_finish(const char *indexpath, int mode) {
|
||||
|
||||
// Write new file
|
||||
if (mode == 1) // TEXT
|
||||
fp = fopen(concat(catbuff, indexpath, "index.txt"), "wb");
|
||||
fp = fopen(concat(catbuff, sizeof(catbuff), indexpath, "index.txt"), "wb");
|
||||
else // HTML
|
||||
fp = fopen(concat(catbuff, indexpath, "sindex.html"), "wb");
|
||||
fp = fopen(concat(catbuff, sizeof(catbuff), indexpath, "sindex.html"), "wb");
|
||||
if (fp) {
|
||||
char current_word[KEYW_LEN + 32];
|
||||
char word[KEYW_LEN + 32];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
1526
src/htsinthash.c
1526
src/htsinthash.c
File diff suppressed because it is too large
Load Diff
362
src/htsinthash.h
362
src/htsinthash.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -27,12 +26,32 @@ Please visit our Website: http://www.httrack.com
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* File: httrack.c subroutines: */
|
||||
/* hash table system (fast index) */
|
||||
/* File: hash table system (fast index) */
|
||||
/* Author: Xavier Roche */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
// inthash -- simple hash table, using a key (char[]) and a value (uintptr_t)
|
||||
/**
|
||||
* Library notes:
|
||||
* This small hashtable library provides key/value hashtable, with a string
|
||||
* key, and integer/pointer value (with an associated optional allocator)
|
||||
* It features O(1) average insertion, O(1) lookup, and O(1) delete.
|
||||
*
|
||||
* Implementation notes:
|
||||
* Implementation is auto-rehashable, and uses cuckoo hashing of size 2**n
|
||||
* with a MD5 or FNV-1 hash function, with one additional auxiliary hash
|
||||
* function.
|
||||
* It also uses a small stash area to handle rare cases of collisions.
|
||||
* Enumeration of all key/values is possible, deletion is also possible, but
|
||||
* currently without any auto-shrinking (ie. table will never shrink).
|
||||
* Overall, two main blocks are allocated: one for the items, and one for
|
||||
* the keys (pool).
|
||||
*
|
||||
* References:
|
||||
* Cuckoo Hashing http://en.wikipedia.org/wiki/Cuckoo_hashing
|
||||
* Cuckoo Stash http://research.microsoft.com/pubs/73856/stash-full.9-30.pdf
|
||||
* FNV http://www.isthe.com/chongo/tech/comp/fnv/
|
||||
* MD5 http://en.wikipedia.org/wiki/MD5
|
||||
**/
|
||||
|
||||
#ifndef HTSINTHASH_DEFH
|
||||
#define HTSINTHASH_DEFH
|
||||
@@ -40,101 +59,324 @@ Please visit our Website: http://www.httrack.com
|
||||
/* Includes */
|
||||
#ifdef _WIN32
|
||||
#include <stddef.h>
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#elif (defined(SOLARIS) || defined(sun) || defined(HAVE_INTTYPES_H) \
|
||||
|| defined(BSD) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD_kernel__))
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
// value
|
||||
/** Value. **/
|
||||
typedef union inthash_value {
|
||||
uintptr_t intg; /* integer value */
|
||||
void *ptr; /* ptr value */
|
||||
/** Integer value. **/
|
||||
intptr_t intg;
|
||||
|
||||
/** Unsigned integer value. **/
|
||||
uintptr_t uintg;
|
||||
|
||||
/** Pointer value. **/
|
||||
void *ptr;
|
||||
} inthash_value;
|
||||
|
||||
/** NULL Value. **/
|
||||
#define INTHASH_VALUE_NULL { 0 }
|
||||
|
||||
// simple hash table for other routines
|
||||
#ifndef HTS_DEF_FWSTRUCT_inthash_chain
|
||||
#define HTS_DEF_FWSTRUCT_inthash_chain
|
||||
typedef struct inthash_chain inthash_chain;
|
||||
#ifndef HTS_DEF_FWSTRUCT_inthash_item
|
||||
#define HTS_DEF_FWSTRUCT_inthash_item
|
||||
typedef struct inthash_item inthash_item;
|
||||
#endif
|
||||
struct inthash_chain {
|
||||
char *name; /* key (name) */
|
||||
inthash_value value; /* value */
|
||||
struct inthash_chain *next; /* next element */
|
||||
|
||||
/** Hash key (32-bit) **/
|
||||
typedef uint32_t inthash_key;
|
||||
|
||||
/** Pair of hashes **/
|
||||
typedef struct inthash_keys {
|
||||
inthash_key hash1;
|
||||
inthash_key hash2;
|
||||
} inthash_keys;
|
||||
|
||||
/** NULL pair of hashes. **/
|
||||
#define INTHASH_KEYS_NULL { 0, 0 }
|
||||
|
||||
/** Item holding a value. **/
|
||||
struct inthash_item {
|
||||
/** Key. **/
|
||||
char *name;
|
||||
|
||||
/** Value. **/
|
||||
inthash_value value;
|
||||
|
||||
/** Hashes of the key. **/
|
||||
inthash_keys hashes;
|
||||
};
|
||||
|
||||
typedef void (*t_inthash_freehandler) (void *value);
|
||||
/** Log level. **/
|
||||
typedef enum inthash_loglevel {
|
||||
inthash_log_critical,
|
||||
inthash_log_warning,
|
||||
inthash_log_info,
|
||||
inthash_log_debug,
|
||||
inthash_log_trace
|
||||
} inthash_loglevel;
|
||||
|
||||
/* inthash structure */
|
||||
/** Alias for legacy code. **/
|
||||
typedef inthash_item inthash_chain;
|
||||
|
||||
/** Value free handler **/
|
||||
typedef void (*t_inthash_freehandler)(void *arg, void *value);
|
||||
|
||||
/** Name dup handler. **/
|
||||
typedef char* (*t_inthash_duphandler)(void *arg, const char *name);
|
||||
|
||||
/** Hash computation handler. **/
|
||||
typedef inthash_keys (*t_inthash_hasheshandler)(void *arg, const char *value);
|
||||
|
||||
/** Hashtable logging handler. **/
|
||||
typedef void (*t_inthash_loghandler)(void *arg, inthash_loglevel level,
|
||||
const char* format, va_list args);
|
||||
|
||||
/** Hashtable fatal assertion failure. **/
|
||||
typedef void (*t_inthash_asserthandler)(void *arg, const char* exp, const char* file, int line);
|
||||
|
||||
/** Key printer (debug) **/
|
||||
typedef const char* (*t_inthash_printkeyhandler)(void *arg, const char *name);
|
||||
|
||||
/** Value printer (debug) **/
|
||||
typedef const char* (*t_inthash_printvaluehandler)(void *arg, void *value);
|
||||
|
||||
/**
|
||||
* Value comparison handler (returns non-zero value if strings are equal).
|
||||
**/
|
||||
typedef int (*t_inthash_cmphandler)(void *arg, const char *a, const char *b);
|
||||
|
||||
/** Hashtable (opaque structure). **/
|
||||
#ifndef HTS_DEF_FWSTRUCT_struct_inthash
|
||||
#define HTS_DEF_FWSTRUCT_struct_inthash
|
||||
typedef struct struct_inthash struct_inthash, *inthash;
|
||||
#endif
|
||||
struct struct_inthash {
|
||||
inthash_chain **hash;
|
||||
unsigned int nitems;
|
||||
t_inthash_freehandler free_handler;
|
||||
unsigned int hash_size;
|
||||
unsigned short flag_valueismalloc;
|
||||
};
|
||||
|
||||
// enumeration
|
||||
/** Hashtable enumeration (opaque structure). **/
|
||||
#ifndef HTS_DEF_FWSTRUCT_struct_inthash_enum
|
||||
#define HTS_DEF_FWSTRUCT_struct_inthash_enum
|
||||
typedef struct struct_inthash_enum struct_inthash_enum;
|
||||
#endif
|
||||
|
||||
/** Enumeration. **/
|
||||
struct struct_inthash_enum {
|
||||
inthash table;
|
||||
int index;
|
||||
inthash_chain *item;
|
||||
size_t index;
|
||||
};
|
||||
|
||||
/* Library internal definictions */
|
||||
#ifdef HTS_INTERNAL_BYTECODE
|
||||
|
||||
// main functions:
|
||||
/**
|
||||
* Create a new hashtable, with initial bucket size of 'size'.
|
||||
* If size is 0, use the default minimal bucket size.
|
||||
* Return a non-NULL pointer upon success.
|
||||
**/
|
||||
inthash inthash_new(size_t size);
|
||||
|
||||
/* Hash functions: */
|
||||
inthash inthash_new(int size); /* Create a new hash table */
|
||||
int inthash_created(inthash hashtable); /* Test if the hash table was successfully created */
|
||||
unsigned int inthash_nitems(inthash hashtable); /* Number of items */
|
||||
void inthash_delete(inthash * hashtable); /* Delete an hash table */
|
||||
void inthash_value_is_malloc(inthash hashtable, int flag); /* Is the 'value' member a value that needs to be free()'ed ? */
|
||||
void inthash_value_set_free_handler(inthash hashtable, /* value free() handler (default one is 'free') */
|
||||
t_inthash_freehandler free_handler);
|
||||
/**
|
||||
* Was the hashtable successfully created ?
|
||||
* Return non-zero value if the hashtable is valid.
|
||||
**/
|
||||
int inthash_created(inthash hashtable);
|
||||
|
||||
/* */
|
||||
int inthash_read(inthash hashtable, const char *name, intptr_t * intvalue); /* Read entry from the hash table */
|
||||
int inthash_readptr(inthash hashtable, const char *name, intptr_t * intvalue); /* Same function, but returns 0 upon null ptr */
|
||||
int inthash_exists(inthash hashtable, const char *name); /* Is the key existing ? */
|
||||
/**
|
||||
* Delete a hashtable, freeing all entries.
|
||||
**/
|
||||
void inthash_delete(inthash * hashtable);
|
||||
|
||||
/* */
|
||||
/**
|
||||
* Return the number of items in the hashtable.
|
||||
**/
|
||||
size_t inthash_nitems(inthash hashtable);
|
||||
|
||||
/**
|
||||
* Return the memory size taken by the hashtable.
|
||||
* (This does not take account of the possible memory taken by values)
|
||||
**/
|
||||
size_t inthash_memory_size(inthash hashtable);
|
||||
|
||||
/**
|
||||
* If 'flag' is non-zero, calls inthash_value_set_value_handler() with
|
||||
* default system free() handler function, otherwise, free the value handlers.
|
||||
**/
|
||||
void inthash_value_is_malloc(inthash hashtable, int flag);
|
||||
|
||||
/**
|
||||
* Set handlers for values.
|
||||
* free: this handler will be called when a value is to be removed from
|
||||
* the hashtable. if NULL, values won't be free'd.
|
||||
* arg: opaque custom argument to be used by functions.
|
||||
* Handler(s) MUST NOT be changed once elements have been added.
|
||||
**/
|
||||
void inthash_value_set_value_handler(inthash hashtable,
|
||||
t_inthash_freehandler free,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* Set handlers for keys.
|
||||
* dup: handler called to duplicate a key. if NULL, the internal pool is used.
|
||||
* free: handler called to free a key. if NULL, the internal pool is used.
|
||||
* hash: hashing handler, called to hash a key. if NULL, the default hash
|
||||
* function is used.
|
||||
* equals: comparison handler, returning non-zero value when two keys are
|
||||
* identical. if NULL, the default comparison function is used.
|
||||
* arg: opaque custom argument to be used by functions.
|
||||
* Handler(s) MUST NOT be changed once elements have been added.
|
||||
**/
|
||||
void inthash_value_set_key_handler(inthash hashtable,
|
||||
t_inthash_duphandler dup,
|
||||
t_inthash_freehandler free,
|
||||
t_inthash_hasheshandler hash,
|
||||
t_inthash_cmphandler equals,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* Set assertion failure handler.
|
||||
* log: handler called upon serious programming error
|
||||
* fatal: handler called upon serious programming error
|
||||
**/
|
||||
void inthash_set_assert_handler(inthash hashtable,
|
||||
t_inthash_loghandler log,
|
||||
t_inthash_asserthandler fatal,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* Set pretty print loggers (debug). Both handlers must return a string
|
||||
* pointer which shall be valid until the next call. Both key and value
|
||||
* pointers shall be valid at the same time.
|
||||
* name: handler called to print the string representation of the name
|
||||
* value: handler called to print the string representation of the value
|
||||
**/
|
||||
void inthash_set_print_handler(inthash hashtable,
|
||||
t_inthash_printkeyhandler key,
|
||||
t_inthash_printvaluehandler value,
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* Set the hashtable name, for degugging purpose.
|
||||
* name: the hashtable name (ASCII or UTF-8)
|
||||
*/
|
||||
void inthash_set_name(inthash hashtable, const char *name);
|
||||
|
||||
/**
|
||||
* Get the hashtable name, for degugging purpose.
|
||||
* Return NULL if no name was defined.
|
||||
**/
|
||||
const char* inthash_get_name(inthash hashtable);
|
||||
|
||||
/**
|
||||
* Read an integer entry from the hashtable.
|
||||
* Return non-zero value upon success and sets intvalue.
|
||||
**/
|
||||
int inthash_read(inthash hashtable, const char *name, intptr_t * intvalue);
|
||||
|
||||
/**
|
||||
* Same as inthash_read(), but return 0 is the value was zero.
|
||||
**/
|
||||
int inthash_readptr(inthash hashtable, const char *name, intptr_t * intvalue);
|
||||
|
||||
/**
|
||||
* Return non-zero value if the given entry exists.
|
||||
**/
|
||||
int inthash_exists(inthash hashtable, const char *name);
|
||||
|
||||
/**
|
||||
* Read an entry from the hashtable.
|
||||
* Return non-zero value upon success and sets value.
|
||||
**/
|
||||
int inthash_read_value(inthash hashtable, const char *name,
|
||||
inthash_value * value);
|
||||
|
||||
/**
|
||||
* Write an entry to the hashtable.
|
||||
* Return non-zero value if the entry was added, zero if it was replaced.
|
||||
**/
|
||||
int inthash_write_value(inthash hashtable, const char *name,
|
||||
inthash_value value);
|
||||
void inthash_add_value(inthash hashtable, const char *name,
|
||||
inthash_value value);
|
||||
/* */
|
||||
/**
|
||||
* Read a pointer entry from the hashtable.
|
||||
* Return non-zero value upon success and sets value.
|
||||
**/
|
||||
int inthash_read_pvoid(inthash hashtable, const char *name, void **value);
|
||||
|
||||
/**
|
||||
* Write a pointer entry to the hashtable.
|
||||
* Return non-zero value if the entry was added, zero if it was replaced.
|
||||
**/
|
||||
int inthash_write_pvoid(inthash hashtable, const char *name, void *value);
|
||||
|
||||
/**
|
||||
* Alias to inthash_write_pvoid()
|
||||
**/
|
||||
void inthash_add_pvoid(inthash hashtable, const char *name, void *value);
|
||||
|
||||
/* */
|
||||
void inthash_add(inthash hashtable, const char *name, intptr_t value); /* Add entry in the hash table */
|
||||
void *inthash_addblk(inthash hashtable, const char *name, int blksize); /* Add entry in the hash table and set value to a new memory block */
|
||||
int inthash_write(inthash hashtable, const char *name, intptr_t value); /* Overwrite/add entry in the hash table */
|
||||
int inthash_inc(inthash hashtable, const char *name); /* Increment entry in the hash table */
|
||||
int inthash_remove(inthash hashtable, const char *name); /* Remove an entry from the hashtable */
|
||||
/**
|
||||
* Write an integer entry to the hashtable.
|
||||
* Return non-zero value if the entry was added, zero if it was replaced.
|
||||
**/
|
||||
int inthash_write(inthash hashtable, const char *name, intptr_t value);
|
||||
|
||||
/* */
|
||||
struct_inthash_enum inthash_enum_new(inthash hashtable); /* Start a new enumerator */
|
||||
inthash_chain *inthash_enum_next(struct_inthash_enum * e); /* Fetch an item in the enumerator */
|
||||
/**
|
||||
* Alias to inthash_write()
|
||||
**/
|
||||
void inthash_add(inthash hashtable, const char *name, intptr_t value);
|
||||
|
||||
/**
|
||||
* Increment an entry value in the hashtable
|
||||
* (or create a new entry with value 1 if it does not yet exist)
|
||||
* Return non-zero value if the entry was added, zero if it was changed.
|
||||
**/
|
||||
int inthash_inc(inthash hashtable, const char *name);
|
||||
|
||||
/**
|
||||
* Decrement an entry value in the hashtable
|
||||
* (or create a new entry with value -1 if it does not yet exist)
|
||||
* Return non-zero value if the entry was added, zero if it was changed.
|
||||
**/
|
||||
int inthash_dec(inthash hashtable, const char *name);
|
||||
|
||||
/**
|
||||
* Remove an entry from the hashtable
|
||||
* Return non-zero value if the entry was removed, zero otherwise.
|
||||
**/
|
||||
int inthash_remove(inthash hashtable, const char *name);
|
||||
|
||||
/**
|
||||
* Return a new enumerator.
|
||||
* Note: deleting entries is safe while enumerating, but adding entries
|
||||
* lead to undefined enumeration behavior (yet safe).
|
||||
**/
|
||||
struct_inthash_enum inthash_enum_new(inthash hashtable);
|
||||
|
||||
/**
|
||||
* Enumerate the next entry.
|
||||
**/
|
||||
inthash_item *inthash_enum_next(struct_inthash_enum * e);
|
||||
|
||||
/**
|
||||
* Compute a hash, given a string value.
|
||||
**/
|
||||
inthash_keys inthash_hash_value(const char *value);
|
||||
|
||||
/**
|
||||
* Set default global assertion failure handler.
|
||||
* The handler will be used if no specific handler was defined in the
|
||||
* hashtable itself.
|
||||
* log: handler called upon serious error log (opaque argument
|
||||
* is the hashtable itself)
|
||||
* fatal: handler called upon serious programming error (opaque argument
|
||||
* is the hashtable itself)
|
||||
**/
|
||||
void inthash_set_global_assert_handler(t_inthash_loghandler log,
|
||||
t_inthash_asserthandler fatal);
|
||||
|
||||
/* End of hash functions: */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -173,7 +172,7 @@ static int hts_parse_java(t_hts_callbackarg * carg, httrackp * opt,
|
||||
#if JAVADEBUG
|
||||
printf("fopen\n");
|
||||
#endif
|
||||
if ((fpout = FOPEN(fconv(catbuff, file), "r+b")) == NULL) {
|
||||
if ((fpout = FOPEN(fconv(catbuff, sizeof(catbuff), file), "r+b")) == NULL) {
|
||||
//fprintf(stderr, "Cannot open input file.\n");
|
||||
sprintf(str->err_msg, "Unable to open file %s", file);
|
||||
return 0; // une erreur..
|
||||
@@ -447,12 +446,14 @@ static RESP_STRUCT readtable(htsmoduleStruct * str, FILE * fp,
|
||||
static unsigned short int readshort(FILE * fp) {
|
||||
unsigned short int valint;
|
||||
|
||||
fread(&valint, sizeof(valint), 1, fp);
|
||||
|
||||
if (reverse_endian())
|
||||
return hts_swap16(valint);
|
||||
else
|
||||
return valint;
|
||||
if (fread(&valint, sizeof(valint), 1, fp) == 1) {
|
||||
if (reverse_endian())
|
||||
return hts_swap16(valint);
|
||||
else
|
||||
return valint;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -476,7 +477,7 @@ static int tris(httrackp * opt, char *buffer) {
|
||||
if (strnotempty(type)) // type reconnu!
|
||||
return 1;
|
||||
// ajout RX 05/2001
|
||||
else if (is_dyntype(get_ext(catbuff, buffer))) // asp,cgi...
|
||||
else if (is_dyntype(get_ext(catbuff, sizeof(catbuff), buffer))) // asp,cgi...
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -485,7 +486,7 @@ static int tris(httrackp * opt, char *buffer) {
|
||||
static char *printname(char rname[1024], char name[1024]) {
|
||||
char *p;
|
||||
char *p1;
|
||||
int j;
|
||||
size_t j;
|
||||
|
||||
rname[0] = '\0';
|
||||
//
|
||||
@@ -497,7 +498,7 @@ static char *printname(char rname[1024], char name[1024]) {
|
||||
p += 2;
|
||||
//rname=(char*)calloct(strlen(name)+8,sizeof(char));
|
||||
p1 = rname;
|
||||
for(j = 0; j < (int) strlen(name); j++, p++) {
|
||||
for(j = 0; name[j] != '\0'; j++, p++) {
|
||||
if (*p == '/')
|
||||
*p1 = '.';
|
||||
if (*p == ';') {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
1367
src/htslib.c
1367
src/htslib.c
File diff suppressed because it is too large
Load Diff
255
src/htslib.h
255
src/htslib.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -36,6 +35,8 @@ Please visit our Website: http://www.httrack.com
|
||||
#ifndef HTS_DEFH
|
||||
#define HTS_DEFH
|
||||
|
||||
#include "httrack-library.h"
|
||||
|
||||
/* Forward definitions */
|
||||
#ifndef HTS_DEF_FWSTRUCT_htsrequest
|
||||
#define HTS_DEF_FWSTRUCT_htsrequest
|
||||
@@ -93,7 +94,8 @@ MSVC2003INLINEBUG HTS_STATIC char *getHtsOptBuff_(httrackp * opt) {
|
||||
}
|
||||
|
||||
#undef MSVC2003INLINEBUG
|
||||
#define OPT_GET_BUFF(OPT) ( getHtsOptBuff_(OPT) )
|
||||
#define OPT_GET_BUFF(OPT) ( getHtsOptBuff_(OPT) )
|
||||
#define OPT_GET_BUFF_SIZE(OPT) ( sizeof(opt->state.concat.buff[0]) )
|
||||
|
||||
// structure pour paramètres supplémentaires lors de la requête
|
||||
#ifndef HTS_DEF_FWSTRUCT_htsrequest_proxy
|
||||
@@ -102,9 +104,9 @@ typedef struct htsrequest_proxy htsrequest_proxy;
|
||||
#endif
|
||||
struct htsrequest_proxy {
|
||||
int active;
|
||||
char name[1024];
|
||||
const char* name;
|
||||
int port;
|
||||
char bindhost[256]; // bind this host
|
||||
const char* bindhost; // bind this host
|
||||
};
|
||||
|
||||
#ifndef HTS_DEF_FWSTRUCT_htsrequest
|
||||
@@ -118,10 +120,12 @@ struct htsrequest {
|
||||
short int range_used; // Range utilisé
|
||||
short int nocompression; // Pas de compression
|
||||
short int flush_garbage; // recycled
|
||||
char user_agent[128];
|
||||
char referer[256];
|
||||
char from[256];
|
||||
char lang_iso[64];
|
||||
const char* user_agent;
|
||||
const char* referer;
|
||||
const char* from;
|
||||
const char* lang_iso;
|
||||
const char* accept;
|
||||
const char* headers;
|
||||
htsrequest_proxy proxy; // proxy
|
||||
};
|
||||
|
||||
@@ -162,7 +166,7 @@ struct htsblk {
|
||||
SSL *ssl_con; // connection structure
|
||||
#endif
|
||||
char lastmodified[64]; // Last-Modified
|
||||
char etag[64]; // Etag
|
||||
char etag[256]; // Etag
|
||||
char cdispo[256]; // Content-Disposition coupé
|
||||
LLint crange; // Content-Range
|
||||
LLint crange_start; // Content-Range
|
||||
@@ -216,45 +220,33 @@ struct OLD_htsblk {
|
||||
typedef struct t_dnscache t_dnscache;
|
||||
#endif
|
||||
struct t_dnscache {
|
||||
char iadr[1024];
|
||||
struct t_dnscache *n;
|
||||
char host_addr[HTS_MAXADDRLEN]; // 4 octets (v4), ou 16 octets (v6)
|
||||
int host_length; // 4 normalement - ==0 alors en cours de résolution
|
||||
char host_addr[HTS_MAXADDRLEN]; // 4 octets (v4), ou 16 octets (v6)
|
||||
// ou >16 si sockaddr
|
||||
// ==-1 alors erreur (host n'éxiste pas)
|
||||
char iadr[1024];
|
||||
};
|
||||
|
||||
/* Library internal definictions */
|
||||
#ifdef HTS_INTERNAL_BYTECODE
|
||||
|
||||
extern htsmutex dns_lock;
|
||||
|
||||
// initialize an htsblk structure
|
||||
void hts_init_htsblk(htsblk * r);
|
||||
|
||||
// attach specific project log to hachtable logger
|
||||
void hts_set_hash_handler(inthash hashtable, httrackp *opt);
|
||||
|
||||
// version
|
||||
HTSEXT_API const char* hts_version(void);
|
||||
|
||||
// fonctions unix/winsock
|
||||
int hts_read(htsblk * r, char *buff, int size);
|
||||
|
||||
//int HTS_TOTAL_RECV_CHECK(int var);
|
||||
LLint check_downloadable_bytes(int rate);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int hts_init(void);
|
||||
HTSEXT_API int hts_uninit(void);
|
||||
HTSEXT_API int hts_uninit_module(void);
|
||||
HTSEXT_API int hts_resetvar(void); /* dummy */
|
||||
HTSEXT_API void hts_debug(int level);
|
||||
HTSEXT_API httrackp *hts_create_opt(void);
|
||||
HTSEXT_API void hts_free_opt(httrackp * opt);
|
||||
HTSEXT_API void set_wrappers(httrackp * opt); /* LEGACY */
|
||||
HTSEXT_API int plug_wrapper(httrackp * opt, const char *moduleName,
|
||||
const char *argv);
|
||||
|
||||
HTSEXT_API char *hts_strdup(const char *string);
|
||||
HTSEXT_API void *hts_malloc(size_t size);
|
||||
HTSEXT_API void *hts_realloc(void *data, size_t size);
|
||||
HTSEXT_API void hts_free(void *data);
|
||||
#endif
|
||||
|
||||
// fonctions principales
|
||||
T_SOC http_fopen(httrackp * opt, char *adr, char *fil, htsblk * retour);
|
||||
@@ -263,7 +255,6 @@ T_SOC http_xfopen(httrackp * opt, int mode, int treat, int waitconnect,
|
||||
int http_sendhead(httrackp * opt, t_cookie * cookie, int mode, char *xsend,
|
||||
char *adr, char *fil, char *referer_adr, char *referer_fil,
|
||||
htsblk * retour);
|
||||
htsblk httpget(httrackp * opt, char *url);
|
||||
|
||||
//int newhttp(char* iadr,char* err=NULL);
|
||||
T_SOC newhttp(httrackp * opt, const char *iadr, htsblk * retour, int port,
|
||||
@@ -276,48 +267,32 @@ htsblk http_location(httrackp * opt, char *adr, char *fil, char *loc);
|
||||
htsblk http_test(httrackp * opt, char *adr, char *fil, char *loc);
|
||||
int check_readinput(htsblk * r);
|
||||
int check_readinput_t(T_SOC soc, int timeout);
|
||||
void http_fread(T_SOC soc, htsblk * retour);
|
||||
LLint http_fread1(htsblk * r);
|
||||
void treathead(t_cookie * cookie, char *adr, char *fil, htsblk * retour,
|
||||
char *rcvd);
|
||||
void treatfirstline(htsblk * retour, char *rcvd);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API void infostatuscode(char *msg, int statuscode);
|
||||
#endif
|
||||
|
||||
// sous-fonctions
|
||||
htsblk xhttpget(httrackp * opt, char *adr, char *fil);
|
||||
htsblk http_gethead(httrackp * opt, char *adr, char *fil);
|
||||
LLint http_xfread1(htsblk * r, int bufl);
|
||||
HTS_INLINE t_hostent *hts_gethostbyname2(httrackp * opt, const char *iadr,
|
||||
void *v_buffer, const char **error);
|
||||
HTS_INLINE t_hostent *hts_gethostbyname(httrackp * opt, const char *iadr,
|
||||
void *v_buffer);
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API t_hostent *vxgethostbyname2(char *hostname, void *v_buffer, const char **error);
|
||||
HTSEXT_API t_hostent *vxgethostbyname(char *hostname, void *v_buffer);
|
||||
#endif
|
||||
t_hostent *_hts_ghbn(t_dnscache * cache, const char *iadr, t_hostent * retour);
|
||||
HTSEXT_API t_hostent *vxgethostbyname2(const char *const hostname, void *v_buffer, const char **error);
|
||||
HTSEXT_API t_hostent *vxgethostbyname(const char *const hostname, void *v_buffer);
|
||||
HTSEXT_API int check_hostname_dns(const char *const hostname);
|
||||
|
||||
int ftp_available(void);
|
||||
|
||||
#if HTS_DNSCACHE
|
||||
void hts_cache_free(t_dnscache * cache);
|
||||
int hts_dnstest(httrackp * opt, const char *_iadr);
|
||||
void hts_cache_free(t_dnscache *const cache);
|
||||
t_dnscache *_hts_cache(httrackp * opt);
|
||||
#endif
|
||||
|
||||
// outils divers
|
||||
HTS_INLINE TStamp time_local(void);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API HTS_INLINE TStamp mtime_local(void);
|
||||
#endif
|
||||
void sec2str(char *s, TStamp t);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API void qsec2str(char *st, TStamp t);
|
||||
#endif
|
||||
void time_gmt_rfc822(char *s);
|
||||
void time_local_rfc822(char *s);
|
||||
struct tm *convert_time_rfc822(struct tm *buffer, const char *s);
|
||||
@@ -327,12 +302,6 @@ int get_filetime_rfc822(const char *file, char *date);
|
||||
HTS_INLINE void time_rfc822(char *s, struct tm *A);
|
||||
HTS_INLINE void time_rfc822_local(char *s, struct tm *A);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API char *int2char(strc_int2bytes2 * strc, int n);
|
||||
HTSEXT_API char *int2bytes(strc_int2bytes2 * strc, LLint n);
|
||||
HTSEXT_API char *int2bytessec(strc_int2bytes2 * strc, long int n);
|
||||
HTSEXT_API char **int2bytes2(strc_int2bytes2 * strc, LLint n);
|
||||
#endif
|
||||
HTS_INLINE int sendc(htsblk * r, const char *s);
|
||||
int finput(int fd, char *s, int max);
|
||||
int binput(char *buff, char *s, int max);
|
||||
@@ -345,7 +314,7 @@ void rawlinput(FILE * fp, char *s, int max);
|
||||
char *strstrcase(char *s, char *o);
|
||||
int ident_url_absolute(const char *url, char *adr, char *fil);
|
||||
void fil_simplifie(char *f);
|
||||
int is_unicode_utf8(const char *buffer, size_t size);
|
||||
int is_unicode_utf8(const char *buffer, const size_t size);
|
||||
void map_characters(unsigned char *buffer, unsigned int size,
|
||||
unsigned int *map);
|
||||
int ishtml(httrackp * opt, const char *urlfil);
|
||||
@@ -353,125 +322,73 @@ int ishtml_ext(const char *a);
|
||||
int ishttperror(int err);
|
||||
void guess_httptype(httrackp * opt, char *s, const char *fil);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API void get_httptype(httrackp * opt, char *s, const char *fil,
|
||||
int flag);
|
||||
#endif
|
||||
int get_userhttptype(httrackp * opt, char *s, const char *fil);
|
||||
void give_mimext(char *s, const char *st);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int is_knowntype(httrackp * opt, const char *fil);
|
||||
HTSEXT_API int is_userknowntype(httrackp * opt, const char *fil);
|
||||
HTSEXT_API int is_dyntype(const char *fil);
|
||||
HTSEXT_API char *get_ext(char *catbuff, const char *fil);
|
||||
#endif
|
||||
int may_unknown(httrackp * opt, const char *st);
|
||||
int may_bogus_multiple(httrackp * opt, const char *mime, const char *filename);
|
||||
int may_unknown2(httrackp * opt, const char *mime, const char *filename);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API char *jump_identification(const char *);
|
||||
HTSEXT_API char *jump_normalized(const char *);
|
||||
HTSEXT_API char *jump_toport(const char *);
|
||||
HTSEXT_API char *fil_normalized(const char *source, char *dest);
|
||||
HTSEXT_API char *adr_normalized(const char *source, char *dest);
|
||||
#endif
|
||||
char *strrchr_limit(const char *s, char c, const char *limit);
|
||||
char *strstr_limit(const char *s, const char *sub, const char *limit);
|
||||
HTS_INLINE char *jump_protocol(const char *source);
|
||||
void code64(unsigned char *a, int size_a, unsigned char *b, int crlf);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API void unescape_amp(char *s);
|
||||
HTSEXT_API void escape_spc_url(char *s);
|
||||
HTSEXT_API void escape_in_url(char *s);
|
||||
HTSEXT_API void escape_uri(char *s);
|
||||
HTSEXT_API void escape_uri_utf(char *s);
|
||||
HTSEXT_API void escape_check_url(char *s);
|
||||
HTSEXT_API char *escape_check_url_addr(char *catbuff, const char *s);
|
||||
HTSEXT_API void x_escape_http(char *s, int mode);
|
||||
HTSEXT_API void x_escape_html(char *s);
|
||||
HTSEXT_API void escape_remove_control(char *s);
|
||||
HTSEXT_API void escape_for_html_print(char *s, char *d);
|
||||
HTSEXT_API void escape_for_html_print_full(char *s, char *d);
|
||||
#endif
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API char *unescape_http(char *catbuff, const char *s);
|
||||
HTSEXT_API char *unescape_http_unharm(char *catbuff, const char *s,
|
||||
int no_high);
|
||||
HTSEXT_API char *antislash_unescaped(char *catbuff, const char *s);
|
||||
HTSEXT_API char *concat(char *catbuff, const char *a, const char *b);
|
||||
HTSEXT_API char *fconcat(char *catbuff, const char *a, const char *b);
|
||||
HTSEXT_API char *fconv(char *catbuff, const char *a);
|
||||
#endif
|
||||
#define copychar(catbuff,a) concat(catbuff,(a),NULL)
|
||||
char *fslash(char *catbuff, const char *a);
|
||||
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API int hts_log(httrackp * opt, const char *prefix, const char *msg);
|
||||
HTSEXT_API void hts_log_print(httrackp * opt, int type, const char *format,
|
||||
...) HTS_PRINTF_FUN(3, 4);
|
||||
#endif
|
||||
char *convtolower(char *catbuff, const char *a);
|
||||
void hts_lowcase(char *s);
|
||||
void hts_replace(char *s, char from, char to);
|
||||
int multipleStringMatch(const char *s, const char *match);
|
||||
|
||||
char *convtolower(char *catbuff, const char *a);
|
||||
void hts_lowcase(char *s);
|
||||
void hts_replace(char *s, char from, char to);
|
||||
int multipleStringMatch(const char *s, const char *match);
|
||||
|
||||
void fprintfio(FILE * fp, char *buff, char *prefix);
|
||||
void fprintfio(FILE * fp, char *buff, char *prefix);
|
||||
|
||||
#ifdef _WIN32
|
||||
#else
|
||||
int sig_ignore_flag(int setflag); // flag ignore
|
||||
int sig_ignore_flag(int setflag); // flag ignore
|
||||
#endif
|
||||
|
||||
void cut_path(char *fullpath, char *path, char *pname);
|
||||
int fexist(const char *s);
|
||||
int fexist_utf8(const char *s);
|
||||
void cut_path(char *fullpath, char *path, char *pname);
|
||||
int fexist(const char *s);
|
||||
int fexist_utf8(const char *s);
|
||||
|
||||
/*LLint fsize(const char* s); */
|
||||
off_t fpsize(FILE * fp);
|
||||
off_t fsize(const char *s);
|
||||
off_t fsize_utf8(const char *s);
|
||||
|
||||
/* root dir */
|
||||
#ifndef HTTRACK_DEFLIB
|
||||
HTSEXT_API char *hts_rootdir(char *file);
|
||||
#endif
|
||||
off_t fpsize(FILE * fp);
|
||||
off_t fsize(const char *s);
|
||||
off_t fsize_utf8(const char *s);
|
||||
|
||||
// Threads
|
||||
typedef void *(*beginthread_type) (void *);
|
||||
typedef void *(*beginthread_type) (void *);
|
||||
|
||||
/*unsigned long _beginthread( beginthread_type start_address, unsigned stack_size, void *arglist );*/
|
||||
|
||||
/* variables globales */
|
||||
extern HTSEXT_API hts_stat_struct HTS_STAT;
|
||||
extern int _DEBUG_HEAD;
|
||||
extern FILE *ioinfo;
|
||||
extern HTSEXT_API hts_stat_struct HTS_STAT;
|
||||
extern int _DEBUG_HEAD;
|
||||
extern FILE *ioinfo;
|
||||
|
||||
/* constantes */
|
||||
extern const char *hts_mime_keep[];
|
||||
extern const char *hts_mime[][2];
|
||||
extern const char *hts_main_mime[];
|
||||
extern const char *hts_detect[];
|
||||
extern const char *hts_detectbeg[];
|
||||
extern const char *hts_nodetect[];
|
||||
extern const char *hts_detectURL[];
|
||||
extern const char *hts_detectandleave[];
|
||||
extern const char *hts_detect_js[];
|
||||
extern const char *hts_mime_keep[];
|
||||
extern const char *hts_mime[][2];
|
||||
extern const char *hts_main_mime[];
|
||||
extern const char *hts_detect[];
|
||||
extern const char *hts_detectbeg[];
|
||||
extern const char *hts_nodetect[];
|
||||
extern const char *hts_detectURL[];
|
||||
extern const char *hts_detectandleave[];
|
||||
extern const char *hts_detect_js[];
|
||||
|
||||
// htsmodule.c definitions
|
||||
extern void *openFunctionLib(const char *file_);
|
||||
extern void *getFunctionPtr(void *handle, const char *fncname);
|
||||
extern void closeFunctionLib(void *handle);
|
||||
extern void *openFunctionLib(const char *file_);
|
||||
extern void *getFunctionPtr(void *handle, const char *fncname);
|
||||
extern void closeFunctionLib(void *handle);
|
||||
|
||||
extern void clearCallbacks(htscallbacks * chain);
|
||||
extern size_t hts_get_callback_offs(const char *name);
|
||||
int hts_set_callback(t_hts_htmlcheck_callbacks * callbacks,
|
||||
const char *name, void *function);
|
||||
void *hts_get_callback(t_hts_htmlcheck_callbacks * callbacks,
|
||||
const char *name);
|
||||
extern void clearCallbacks(htscallbacks * chain);
|
||||
extern size_t hts_get_callback_offs(const char *name);
|
||||
int hts_set_callback(t_hts_htmlcheck_callbacks * callbacks,
|
||||
const char *name, void *function);
|
||||
void *hts_get_callback(t_hts_htmlcheck_callbacks * callbacks,
|
||||
const char *name);
|
||||
|
||||
#define CBSTRUCT(OPT) ((t_hts_htmlcheck_callbacks*) ((OPT)->callbacks_fun))
|
||||
#define GET_USERCALLBACK(OPT, NAME) ( CBSTRUCT(OPT)-> NAME .fun )
|
||||
@@ -574,6 +491,7 @@ HTSEXT_API void hts_log_print(httrackp * opt, int type, const char *format,
|
||||
|| (code) == 302 \
|
||||
|| (code) == 303 \
|
||||
|| (code) == 307 \
|
||||
|| (code) == 308 \
|
||||
)
|
||||
#define HTTP_IS_NOTMODIFIED(code) ( \
|
||||
(code) == 304 \
|
||||
@@ -583,7 +501,7 @@ HTSEXT_API void hts_log_print(httrackp * opt, int type, const char *format,
|
||||
|
||||
// compare le début de f avec s et retourne la position de la fin
|
||||
// 'A=a' (case insensitive)
|
||||
HTS_STATIC int strfield(const char *f, const char *s) {
|
||||
HTS_STATIC int strfield(const char *f, const char *s) {
|
||||
int r = 0;
|
||||
|
||||
while(streql(*f, *s) && ((*f) != 0) && ((*s) != 0)) {
|
||||
@@ -595,7 +513,8 @@ HTSEXT_API void hts_log_print(httrackp * opt, int type, const char *format,
|
||||
return r;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
HTS_STATIC int strcmpnocase(char *a, char *b) {
|
||||
while(*a) {
|
||||
int cmp = hichar(*a) - hichar(*b);
|
||||
@@ -619,12 +538,6 @@ HTS_STATIC int strcmpnocase(char *a, char *b) {
|
||||
// is this MIME an hypertext MIME (text/html), html/js-style or other script/text type?
|
||||
#define HTS_HYPERTEXT_DEFAULT_MIME "text/html"
|
||||
|
||||
#if HTS_USEMMS
|
||||
#define OPT_MMS(a) (strfield2((a), "video/x-ms-asf") != 0)
|
||||
#else
|
||||
#define OPT_MMS(a) (0)
|
||||
#endif
|
||||
|
||||
#define is_html_mime_type(a) \
|
||||
( (strfield2((a),"text/html")!=0)\
|
||||
|| (strfield2((a),"application/xhtml+xml")!=0) \
|
||||
@@ -645,7 +558,6 @@ HTS_STATIC int strcmpnocase(char *a, char *b) {
|
||||
(strfield2((a),"audio/x-pn-realaudio")!=0) \
|
||||
|| (strfield2((a),"audio/x-mpegurl")!=0) \
|
||||
/*|| (strfield2((a),"text/xml")!=0) || (strfield2((a),"application/xml")!=0) : TODO: content check */ \
|
||||
|| OPT_MMS(a) \
|
||||
)
|
||||
|
||||
/* Library internal definictions */
|
||||
@@ -698,31 +610,6 @@ HTS_STATIC int compare_mime(httrackp * opt, const char *mime, const char *file,
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32_WCE_XXC
|
||||
extern char cwd[MAX_PATH + 1];
|
||||
HTS_STATIC char *getcwd_ce(char *buffer, int maxlen) {
|
||||
TCHAR fileUnc[MAX_PATH + 1];
|
||||
char *plast;
|
||||
|
||||
if (cwd[0] == 0) {
|
||||
GetModuleFileName(NULL, fileUnc, MAX_PATH);
|
||||
WideCharToMultiByte(CP_ACP, 0, fileUnc, -1, cwd, MAX_PATH, NULL, NULL);
|
||||
plast = strrchr(cwd, '\\');
|
||||
if (plast)
|
||||
*plast = 0;
|
||||
/* Special trick to keep start menu clean... */
|
||||
if (_stricmp(cwd, "\\windows\\start menu") == 0)
|
||||
strcpy(cwd, "\\Apps");
|
||||
}
|
||||
if (buffer)
|
||||
strncpy(buffer, cwd, maxlen);
|
||||
return cwd;
|
||||
}
|
||||
|
||||
#undef getcwd
|
||||
#define getcwd getcwd_ce
|
||||
#endif
|
||||
|
||||
/* dirent() compatibility */
|
||||
#ifdef _WIN32
|
||||
#define HTS_DIRENT_SIZE 256
|
||||
|
||||
13
src/htsmd5.c
13
src/htsmd5.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
13
src/htsmd5.h
13
src/htsmd5.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
235
src/htsmms.c
235
src/htsmms.c
@@ -1,235 +0,0 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Important notes:
|
||||
|
||||
- We hereby ask people using this source NOT to use it in purpose of grabbing
|
||||
emails addresses, or collecting any other private information on persons.
|
||||
This would disgrace our work, and spoil the many hours we spent on it.
|
||||
|
||||
Please visit our Website: http://www.httrack.com
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* File: basic mms protocol manager */
|
||||
/* Author: Xavier Roche */
|
||||
/* */
|
||||
/* The mms routines were written by Nicolas BENOIT, */
|
||||
/* based on the work of SDP Multimedia and Major MMS */
|
||||
/* Thanks to all of them! */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
/* Internal engine bytecode */
|
||||
#define HTS_INTERNAL_BYTECODE
|
||||
|
||||
// Gestion protocole mms
|
||||
|
||||
#include "htsglobal.h"
|
||||
|
||||
#if HTS_USEMMS
|
||||
|
||||
#include "htscore.h"
|
||||
|
||||
#include "htsmms.h"
|
||||
#include "mmsrip/mms.h"
|
||||
|
||||
#define FTP_STATUS_READY 1001
|
||||
|
||||
static int run_launch_mms(MMSDownloadStruct * back);
|
||||
static void back_launch_mms(void *pP) {
|
||||
MMSDownloadStruct *pStruct = (MMSDownloadStruct *) pP;
|
||||
|
||||
if (pStruct == NULL)
|
||||
return;
|
||||
|
||||
/* Initialize */
|
||||
hts_init();
|
||||
|
||||
/* Run */
|
||||
run_launch_mms(pStruct);
|
||||
|
||||
/* Set as ready */
|
||||
{
|
||||
lien_back *back = pStruct->pBack;
|
||||
|
||||
back->status = FTP_STATUS_READY;
|
||||
}
|
||||
|
||||
/* Delete structure */
|
||||
free(pP);
|
||||
|
||||
/* Uninitialize */
|
||||
hts_uninit();
|
||||
return;
|
||||
}
|
||||
|
||||
/* download cancelled */
|
||||
static int stop_mms(lien_back * back) {
|
||||
if (back->stop_ftp) {
|
||||
strcpybuff(back->r.msg, "Cancelled by User");
|
||||
back->r.statuscode = STATUSCODE_INVALID;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Background launch */
|
||||
void launch_mms(const MMSDownloadStruct * pStruct) {
|
||||
MMSDownloadStruct *pCopy = calloc(sizeof(MMSDownloadStruct), 1);
|
||||
|
||||
memcpy(pCopy, pStruct, sizeof(*pCopy));
|
||||
hts_newthread(back_launch_mms, (void *) pCopy);
|
||||
}
|
||||
|
||||
/* Code mainly written by Nicolas BENOIT */
|
||||
static int run_launch_mms(MMSDownloadStruct * pStruct) {
|
||||
lien_back *back = pStruct->pBack;
|
||||
httrackp *opt = pStruct->pOpt;
|
||||
|
||||
/* */
|
||||
char url[HTS_URLMAXSIZE * 2];
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
char catbuff2[CATBUFF_SIZE];
|
||||
MMS *mms;
|
||||
FILE *f;
|
||||
ssize_t len_written;
|
||||
uint64_t total_len_written;
|
||||
int delay = opt->mms_maxtime;
|
||||
time_t end = time(NULL) + delay;
|
||||
short checkPending = 0;
|
||||
ssize_t existingSize = fsize(back->url_sav);
|
||||
|
||||
// effacer
|
||||
strcpybuff(back->r.msg, "");
|
||||
back->status = STATUS_FTP_TRANSFER;
|
||||
back->r.statuscode = HTTP_OK;
|
||||
back->r.size = 0;
|
||||
|
||||
/* Create file */
|
||||
if (existingSize > 0) {
|
||||
/* back->r.out = fileappend(back->url_sav);
|
||||
*/
|
||||
(void) unlink(fconcat(catbuff, back->url_sav, ".old"));
|
||||
if (rename
|
||||
(fconcat(catbuff, back->url_sav, ""),
|
||||
fconcat(catbuff2, back->url_sav, ".old")) == 0) {
|
||||
checkPending = 1;
|
||||
}
|
||||
back->r.out = filecreate(&pStruct->pOpt->state.strc, back->url_sav);
|
||||
} else {
|
||||
back->r.out = filecreate(&pStruct->pOpt->state.strc, back->url_sav);
|
||||
}
|
||||
if ((f = back->r.out) != NULL) {
|
||||
// create mms resource
|
||||
strcpybuff(url, back->url_adr); /* mms:// */
|
||||
strcatbuff(url, back->url_fil);
|
||||
if ((mms = mms_create(url, f, NULL, 0, 1)) != NULL) {
|
||||
if (mms_connect(mms) == 0) {
|
||||
if (mms_handshake(mms) == 0) {
|
||||
if ((len_written = mms_write_stream_header(mms)) != -1) {
|
||||
total_len_written = len_written;
|
||||
HTS_STAT.HTS_TOTAL_RECV += len_written;
|
||||
|
||||
/* not modified */
|
||||
if (checkPending) {
|
||||
if (mms->is_live != MMS_LIVE && mms->expected_file_size == existingSize + 50 /* Why 50 additional bytes declared ?? */
|
||||
) // abort download
|
||||
{
|
||||
fclose(back->r.out);
|
||||
f = back->r.out = NULL;
|
||||
if (unlink(fconcat(catbuff, back->url_sav, "")) == 0
|
||||
&& rename(fconcat(catbuff, back->url_sav, ".old"),
|
||||
fconcat(catbuff2, back->url_sav, "")) == 0) {
|
||||
back->r.notmodified = 1;
|
||||
back->r.statuscode = HTTP_OK;
|
||||
strcpybuff(back->r.msg, "Not modified");
|
||||
} else {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg,
|
||||
"Unable to rename previous file (not updated)");
|
||||
}
|
||||
} else {
|
||||
(void) unlink(fconcat(catbuff, back->url_sav, ".old"));
|
||||
}
|
||||
}
|
||||
|
||||
/* begin rip */
|
||||
if (f != NULL && mms_begin_rip(mms) == 0) {
|
||||
if (mms->is_live != MMS_LIVE) {
|
||||
back->r.totalsize = mms->expected_file_size;
|
||||
back->r.totalsize -= 50; /* Why 50 additional bytes declared ?? */
|
||||
} else
|
||||
back->r.totalsize = -1;
|
||||
|
||||
/* Start download */
|
||||
while(!stop_mms(back)) {
|
||||
len_written = mms_write_stream_data(mms);
|
||||
if (len_written == 0) {
|
||||
break;
|
||||
} else if (len_written == -1) {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Unable to write stream data");
|
||||
break;
|
||||
}
|
||||
|
||||
total_len_written += len_written;
|
||||
back->r.size = total_len_written;
|
||||
HTS_STAT.HTS_TOTAL_RECV += len_written;
|
||||
|
||||
fflush(f);
|
||||
|
||||
if (delay != 0 && end <= time(NULL)) {
|
||||
delay = -1;
|
||||
back->r.statuscode = HTTP_OK;
|
||||
strcpybuff(back->r.msg, "Download interrupted");
|
||||
break;
|
||||
}
|
||||
} // while
|
||||
|
||||
back->r.statuscode = HTTP_OK; /* Finished */
|
||||
} else if (f != NULL) {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Can not begin ripping");
|
||||
}
|
||||
} else {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Can not write stream header");
|
||||
}
|
||||
} else {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Can not handshake");
|
||||
}
|
||||
mms_disconnect(mms);
|
||||
} else {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Can not connect");
|
||||
}
|
||||
mms_destroy(mms);
|
||||
} else {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Can not create mms resource");
|
||||
}
|
||||
} else {
|
||||
back->r.statuscode = HTTP_INTERNAL_SERVER_ERROR;
|
||||
strcpybuff(back->r.msg, "Unable to open local output file");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
65
src/htsmms.h
65
src/htsmms.h
@@ -1,65 +0,0 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Important notes:
|
||||
|
||||
- We hereby ask people using this source NOT to use it in purpose of grabbing
|
||||
emails addresses, or collecting any other private information on persons.
|
||||
This would disgrace our work, and spoil the many hours we spent on it.
|
||||
|
||||
Please visit our Website: http://www.httrack.com
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* File: basic mms protocol manager .h */
|
||||
/* Author: Xavier Roche */
|
||||
/* */
|
||||
/* The mms routines were written by Nicolas BENOIT, */
|
||||
/* based on the work of SDP Multimedia and Major MMS */
|
||||
/* Thanks to all of them! */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#ifndef HTSMMS_DEFH
|
||||
#define HTSMMS_DEFH
|
||||
|
||||
#if HTS_USEMMS
|
||||
|
||||
/* Forware definitions */
|
||||
#ifndef HTS_DEF_FWSTRUCT_lien_back
|
||||
#define HTS_DEF_FWSTRUCT_lien_back
|
||||
typedef struct lien_back lien_back;
|
||||
#endif
|
||||
#ifndef HTS_DEF_FWSTRUCT_httrackp
|
||||
#define HTS_DEF_FWSTRUCT_httrackp
|
||||
typedef struct httrackp httrackp;
|
||||
#endif
|
||||
|
||||
#ifndef HTS_DEF_FWSTRUCT_MMSDownloadStruct
|
||||
#define HTS_DEF_FWSTRUCT_MMSDownloadStruct
|
||||
typedef struct MMSDownloadStruct MMSDownloadStruct;
|
||||
#endif
|
||||
struct MMSDownloadStruct {
|
||||
lien_back *pBack;
|
||||
httrackp *pOpt;
|
||||
};
|
||||
|
||||
void launch_mms(const MMSDownloadStruct * pStruct);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -90,30 +89,6 @@ HTSEXT_API const char *hts_get_version_info(httrackp * opt) {
|
||||
return opt->state.HTbuff;
|
||||
}
|
||||
|
||||
/* memory checks */
|
||||
HTSEXT_API htsErrorCallback htsCallbackErr = NULL;
|
||||
HTSEXT_API int htsMemoryFastXfr = 1; /* fast xfr by default */
|
||||
void abortLog__fnc(char *msg, char *file, int line);
|
||||
void abortLog__fnc(char *msg, char *file, int line) {
|
||||
FILE *fp = fopen("CRASH.TXT", "wb");
|
||||
|
||||
if (!fp)
|
||||
fp = fopen("/tmp/CRASH.TXT", "wb");
|
||||
if (!fp)
|
||||
fp = fopen("C:\\CRASH.TXT", "wb");
|
||||
if (!fp)
|
||||
fp = fopen("CRASH.TXT", "wb");
|
||||
if (fp) {
|
||||
fprintf(fp, "HTTrack " HTTRACK_VERSIONID " closed at '%s', line %d\r\n",
|
||||
file, line);
|
||||
fprintf(fp, "Reason:\r\n%s\r\n", msg);
|
||||
fflush(fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
HTSEXT_API t_abortLog abortLog__ = abortLog__fnc; /* avoid VC++ inlining */
|
||||
|
||||
static void htspe_log(htsmoduleStruct * str, const char *msg);
|
||||
|
||||
int hts_parse_externals(htsmoduleStruct * str) {
|
||||
@@ -234,11 +209,6 @@ void *getFunctionPtr(void *handle, const char *fncname_) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *ssl_handle = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
void *ssl_handle_2 = NULL;
|
||||
#endif
|
||||
void htspe_init(void) {
|
||||
static int initOk = 0;
|
||||
|
||||
@@ -247,11 +217,22 @@ void htspe_init(void) {
|
||||
|
||||
/* See CVE-2010-5252 */
|
||||
#if (defined(_WIN32) && (!defined(_DEBUG)))
|
||||
/* See KB 2389418
|
||||
"If this parameter is an empty string (""), the call removes the
|
||||
current directory from the default DLL search order" */
|
||||
if (!SetDllDirectory("")) {
|
||||
assertf(!"SetDllDirectory failed");
|
||||
{
|
||||
/* >= Windows Server 2003 (Andy Hewitt) */
|
||||
const DWORD dwVersion = GetVersion();
|
||||
const DWORD dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||
const DWORD dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
|
||||
const int hasSetDllDirectory =
|
||||
dwMajorVersion >= 6 || ( dwMajorVersion == 5 && dwMinorVersion >= 2 );
|
||||
/* See KB 2389418
|
||||
"If this parameter is an empty string (""), the call removes the
|
||||
current directory from the default DLL search order" */
|
||||
if (hasSetDllDirectory && !SetDllDirectory("")) {
|
||||
/* Do no choke on NT or 98SE with KernelEx NT API (James Blough) */
|
||||
if (dwMajorVersion >= 5) {
|
||||
assertf(!"SetDllDirectory failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -268,15 +249,6 @@ void htspe_init(void) {
|
||||
}
|
||||
|
||||
void htspe_uninit(void) {
|
||||
#ifdef _WIN32
|
||||
CloseHandle(ssl_handle);
|
||||
CloseHandle(ssl_handle_2);
|
||||
ssl_handle = NULL;
|
||||
ssl_handle_2 = NULL;
|
||||
#else
|
||||
dlclose(ssl_handle);
|
||||
ssl_handle = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void htspe_log(htsmoduleStruct * str, const char *msg) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -136,7 +135,6 @@ extern void htspe_uninit(void);
|
||||
extern int hts_parse_externals(htsmoduleStruct * str);
|
||||
|
||||
/*extern int swf_is_available;*/
|
||||
extern int SSL_is_available;
|
||||
extern int V6_is_available;
|
||||
#endif
|
||||
|
||||
|
||||
127
src/htsname.c
127
src/htsname.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -147,10 +146,8 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
hash_struct * hash, int ptr, int numero_passe,
|
||||
const lien_back * headers) {
|
||||
char catbuff[CATBUFF_SIZE];
|
||||
const char *mime_type = (headers
|
||||
&& !HTTP_IS_REDIRECT(headers->r.
|
||||
statuscode)) ? headers->r.
|
||||
contenttype : NULL;
|
||||
const int is_redirect = headers != NULL && HTTP_IS_REDIRECT(headers->r.statuscode);
|
||||
const char *mime_type = headers != NULL && !is_redirect ? headers->r.contenttype : NULL;
|
||||
/*const char* mime_type = ( headers && HTTP_IS_OK(headers->r.statuscode) ) ? headers->r.contenttype : NULL; */
|
||||
lien_back *const back = sback->lnk;
|
||||
|
||||
@@ -160,9 +157,9 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
/*char BIGSTK normadr_[HTS_URLMAXSIZE*2]; */
|
||||
char BIGSTK normadr_[HTS_URLMAXSIZE * 2], normfil_[HTS_URLMAXSIZE * 2];
|
||||
enum { PROTOCOL_HTTP, PROTOCOL_HTTPS, PROTOCOL_FTP, PROTOCOL_FILE,
|
||||
PROTOCOL_MMS, PROTOCOL_UNKNOWN };
|
||||
PROTOCOL_UNKNOWN };
|
||||
static const char *protocol_str[] =
|
||||
{ "http", "https", "ftp", "file", "mms", "unknown" };
|
||||
{ "http", "https", "ftp", "file", "unknown" };
|
||||
int protocol = PROTOCOL_HTTP;
|
||||
const char *const adr = jump_identification(adr_complete);
|
||||
char *fil = fil_complete;
|
||||
@@ -224,8 +221,6 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
protocol = PROTOCOL_FTP;
|
||||
} else if (strfield(adr_complete, "file:")) {
|
||||
protocol = PROTOCOL_FILE;
|
||||
} else if (strfield(adr_complete, "mms:")) {
|
||||
protocol = PROTOCOL_MMS;
|
||||
} else {
|
||||
protocol = PROTOCOL_HTTP;
|
||||
}
|
||||
@@ -267,12 +262,12 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
if (liens != NULL) {
|
||||
int i;
|
||||
|
||||
i = hash_read(hash, normadr, normfil, 1, opt->urlhack); // recherche table 1 (adr+fil)
|
||||
i = hash_read(hash, normadr, normfil, HASH_STRUCT_ADR_PATH); // recherche table 1 (adr+fil)
|
||||
if (i >= 0) { // ok, trouvé
|
||||
strcpybuff(save, liens[i]->sav);
|
||||
return 0;
|
||||
}
|
||||
i = hash_read(hash, normadr, normfil, 2, opt->urlhack); // recherche table 2 (former_adr+former_fil)
|
||||
i = hash_read(hash, normadr, normfil, HASH_STRUCT_ORIGINAL_ADR_PATH); // recherche table 2 (former_adr+former_fil)
|
||||
if (i >= 0) { // ok, trouvé
|
||||
// copier location moved!
|
||||
strcpybuff(adr_complete, liens[i]->adr);
|
||||
@@ -291,7 +286,7 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
fil_complete_patche[strlen(fil_complete_patche) - 1] = '\0';
|
||||
else
|
||||
strcatbuff(fil_complete_patche, "/");
|
||||
i = hash_read(hash, normadr, fil_complete_patche, 2, opt->urlhack); // recherche table 2 (former_adr+former_fil)
|
||||
i = hash_read(hash, normadr, fil_complete_patche, HASH_STRUCT_ORIGINAL_ADR_PATH); // recherche table 2 (former_adr+former_fil)
|
||||
if (i >= 0) {
|
||||
// écraser fil et adr (pas former_fil?????)
|
||||
strcpybuff(adr_complete, liens[i]->adr);
|
||||
@@ -326,33 +321,6 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
"could not URL-decode string '%s'", fil);
|
||||
}
|
||||
|
||||
#if HTS_USEMMS
|
||||
/* .asx hack */
|
||||
if (headers != NULL && headers->r.cdispo[0] != 0
|
||||
&& strfield(headers->r.contenttype, "video/")
|
||||
&& strfield2(get_ext(OPT_GET_BUFF(opt), headers->r.cdispo), "asx") == 0) {
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, "asx");
|
||||
} else if (headers != NULL && headers->r.contenttype[0] != 0
|
||||
&& strfield2(headers->r.contenttype, "video/x-ms-asf")) {
|
||||
char *exts = get_ext(OPT_GET_BUFF(opt), headers->url_fil);
|
||||
|
||||
if (strfield2(exts, "wmv") == 0) {
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, "wmv");
|
||||
} else if (strfield2(exts, "asf") == 0) {
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, "asf");
|
||||
} else if (strfield2(exts, "avi") == 0) {
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, "avi");
|
||||
} else if (strfield2(exts, "asx") == 0) {
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, "asx");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* replace shtml to html.. */
|
||||
if (opt->savename_delayed == 2)
|
||||
is_html = -1; /* ALWAYS delay type */
|
||||
@@ -360,8 +328,8 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
is_html = ishtml(opt, fil);
|
||||
switch (is_html) { /* .html,.shtml,.. */
|
||||
case 1:
|
||||
if ((strfield2(get_ext(OPT_GET_BUFF(opt), fil), "html") == 0)
|
||||
&& (strfield2(get_ext(OPT_GET_BUFF(opt), fil), "htm") == 0)
|
||||
if ((strfield2(get_ext(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), fil), "html") == 0)
|
||||
&& (strfield2(get_ext(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), fil), "htm") == 0)
|
||||
) {
|
||||
strcpybuff(ext, "html");
|
||||
ext_chg = 1;
|
||||
@@ -391,9 +359,6 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
|
||||
if (protocol != PROTOCOL_FILE
|
||||
&& protocol != PROTOCOL_FTP
|
||||
#if HTS_USEMMS
|
||||
&& protocol != PROTOCOL_MMS
|
||||
#endif
|
||||
) {
|
||||
// tester type avec requète HEAD si on ne connait pas le type du fichier
|
||||
if (!((opt->check_type == 1) && (fil[strlen(fil) - 1] == '/'))) // slash doit être html?
|
||||
@@ -407,14 +372,16 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
s[0] = '\0';
|
||||
hts_log_print(opt, LOG_DEBUG, "Testing link type (from cache) %s%s",
|
||||
adr_complete, fil_complete);
|
||||
if (strnotempty(r.cdispo)) { /* filename given */
|
||||
ext_chg = 2; /* change filename */
|
||||
strcpybuff(ext, r.cdispo);
|
||||
} else if (!may_unknown2(opt, r.contenttype, fil)) { // on peut patcher à priori?
|
||||
give_mimext(s, r.contenttype); // obtenir extension
|
||||
if (strnotempty(s) > 0) { // on a reconnu l'extension
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, s);
|
||||
if (!HTTP_IS_REDIRECT(r.statuscode)) {
|
||||
if (strnotempty(r.cdispo)) { /* filename given */
|
||||
ext_chg = 2; /* change filename */
|
||||
strcpybuff(ext, r.cdispo);
|
||||
} else if (!may_unknown2(opt, r.contenttype, fil)) { // on peut patcher à priori?
|
||||
give_mimext(s, r.contenttype); // obtenir extension
|
||||
if (strnotempty(s) > 0) { // on a reconnu l'extension
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEFAULT_BIN_EXT
|
||||
@@ -444,7 +411,23 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
// note: if savename_delayed is enabled, the naming will be temporary (and slightly invalid!)
|
||||
// note: if we are about to stop (opt->state.stop), back_add() will fail later
|
||||
else if (opt->savename_delayed != 0 && !opt->state.stop) {
|
||||
if (mime_type != NULL) {
|
||||
// Check if the file is ready in backing. We basically take the same logic as later.
|
||||
// FIXME: we should cleanup and factorize this unholy mess
|
||||
if (headers != NULL && headers->status >= 0 && !is_redirect) {
|
||||
if (strnotempty(headers->r.cdispo)) { /* filename given */
|
||||
ext_chg = 2; /* change filename */
|
||||
strcpybuff(ext, headers->r.cdispo);
|
||||
} else if (!may_unknown2(opt, headers->r.contenttype, headers->url_fil)) { // on peut patcher à priori? (pas interdit ou pas de type)
|
||||
char s[16];
|
||||
s[0] = '\0';
|
||||
give_mimext(s, headers->r.contenttype); // obtenir extension
|
||||
if (strnotempty(s) > 0) { // on a reconnu l'extension
|
||||
ext_chg = 1;
|
||||
strcpybuff(ext, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mime_type != NULL) {
|
||||
ext[0] = '\0';
|
||||
if (*mime_type) {
|
||||
give_mimext(ext, mime_type);
|
||||
@@ -587,9 +570,6 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
|
||||
// ftp: stop!
|
||||
if (strfield(mov_url, "ftp://")
|
||||
#if HTS_USEMMS
|
||||
|| strfield(mov_url, "mms://")
|
||||
#endif
|
||||
) { // ftp, ok on arrête
|
||||
has_been_moved = 1;
|
||||
back_maydelete(opt, cache, sback, b); // ok
|
||||
@@ -730,15 +710,8 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
// Donner nom par défaut?
|
||||
if (fil[strlen(fil) - 1] == '/') {
|
||||
if (!strfield(adr_complete, "ftp://")
|
||||
#if HTS_USEMMS
|
||||
&& !strfield(adr_complete, "mms://")
|
||||
#endif
|
||||
) {
|
||||
strcatbuff(fil, DEFAULT_HTML); // nommer page par défaut!!
|
||||
#if HTS_USEMMS
|
||||
} else if (strfield(adr_complete, "mms://")) {
|
||||
strcatbuff(fil, DEFAULT_MMS);
|
||||
#endif
|
||||
} else {
|
||||
if (!opt->proxy.active)
|
||||
strcatbuff(fil, DEFAULT_FTP); // nommer page par défaut (texte)
|
||||
@@ -748,7 +721,7 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
}
|
||||
// Changer extension?
|
||||
// par exemple, php3 sera sauvé en html, cgi en html ou gif, xbm etc.. selon les cas
|
||||
if (ext_chg) { // changer ext
|
||||
if (ext_chg && !opt->no_type_change) { // changer ext
|
||||
char *a = fil + strlen(fil) - 1;
|
||||
|
||||
if ((opt->debug > 1) && (opt->log != NULL)) {
|
||||
@@ -872,7 +845,7 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
*d++ = *c++;
|
||||
}
|
||||
*d = '\0';
|
||||
d = unescape_http(catbuff, name[0]);
|
||||
d = unescape_http(catbuff, sizeof(catbuff), name[0]);
|
||||
if (d && *d) {
|
||||
strcpybuff(b, d); /* value */
|
||||
b += strlen(b);
|
||||
@@ -992,6 +965,7 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
/* release */
|
||||
RELEASE_ADR();
|
||||
}
|
||||
b += strlen(b); // pointer à la fin
|
||||
break;
|
||||
case 'H': // host, raw (old mode)
|
||||
*b = '\0';
|
||||
@@ -1181,7 +1155,7 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
}
|
||||
break;
|
||||
case 99:{ // 'codé' .. c'est un gadget
|
||||
int i;
|
||||
size_t i;
|
||||
int j;
|
||||
char *a;
|
||||
char C[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-";
|
||||
@@ -1191,10 +1165,10 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
unsigned int s = 0;
|
||||
|
||||
L = (int) strlen(C);
|
||||
for(i = 0; i < (int) strlen(fil_complete); i++) {
|
||||
for(i = 0; fil_complete[i] != '\0'; i++) {
|
||||
s += (unsigned int) fil_complete[i];
|
||||
}
|
||||
for(i = 0; i < (int) strlen(adr_complete); i++) {
|
||||
for(i = 0; adr_complete[i] != '\0'; i++) {
|
||||
s += (unsigned int) adr_complete[i];
|
||||
}
|
||||
srand(s);
|
||||
@@ -1555,7 +1529,7 @@ int url_savename(char *adr_complete, char *fil_complete, char *save,
|
||||
printf("\nStart search\n");
|
||||
#endif
|
||||
|
||||
i = hash_read(hash, save, "", 0, 0); // lecture type 0 (sav)
|
||||
i = hash_read(hash, save, NULL, HASH_STRUCT_FILENAME); // lecture type 0 (sav)
|
||||
if (i >= 0) {
|
||||
int sameAdr = (strfield2(liens[i]->adr, normadr) != 0);
|
||||
int sameFil;
|
||||
@@ -1740,7 +1714,8 @@ char *url_savename_refname_fullpath(httrackp * opt, const char *adr,
|
||||
char digest_filename[64];
|
||||
|
||||
url_savename_refname(adr, fil, digest_filename);
|
||||
return fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), digest_filename);
|
||||
return fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log), digest_filename);
|
||||
}
|
||||
|
||||
/* remove refname if any */
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
27
src/htsnet.h
27
src/htsnet.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -43,9 +42,7 @@ Please visit our Website: http://www.httrack.com
|
||||
#include <ctype.h>
|
||||
#ifdef _WIN32
|
||||
// pour read
|
||||
#ifndef _WIN32_WCE
|
||||
#include <io.h>
|
||||
#endif
|
||||
// pour FindFirstFile
|
||||
#include <winbase.h>
|
||||
#else
|
||||
@@ -235,9 +232,15 @@ if (hpsize == sizeof(struct sockaddr_in6)) { \
|
||||
|
||||
/* Get dotted address */
|
||||
#define SOCaddr_inetntoa(namebuf, namebuflen, ss, sslen) do { \
|
||||
(namebuf)[0]='\0'; \
|
||||
getnameinfo((struct sockaddr *)&(ss), sslen, \
|
||||
(namebuf), namebuflen, NULL, 0, NI_NUMERICHOST); \
|
||||
char *pos_; \
|
||||
(namebuf)[0]='\0'; \
|
||||
getnameinfo((struct sockaddr *)&(ss), sslen, \
|
||||
(namebuf), namebuflen, NULL, 0, NI_NUMERICHOST); \
|
||||
/* remove scope id */ \
|
||||
pos_ = strrchr(namebuf, '%'); \
|
||||
if (pos_ != NULL) { \
|
||||
*pos_ = '\0'; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* Get protocol ID */
|
||||
|
||||
36
src/htsopt.h
36
src/htsopt.h
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -163,15 +162,22 @@ struct fspc_strc {
|
||||
int info;
|
||||
};
|
||||
|
||||
/* lien_url */
|
||||
#ifndef HTS_DEF_FWSTRUCT_lien_url
|
||||
#define HTS_DEF_FWSTRUCT_lien_url
|
||||
typedef struct lien_url lien_url;
|
||||
#endif
|
||||
|
||||
#ifndef HTS_DEF_DEFSTRUCT_hts_log_type
|
||||
#define HTS_DEF_DEFSTRUCT_hts_log_type
|
||||
typedef enum hts_log_type {
|
||||
LOG_DEBUG,
|
||||
LOG_INFO,
|
||||
LOG_NOTICE,
|
||||
LOG_WARNING,
|
||||
LOG_ERROR,
|
||||
LOG_PANIC,
|
||||
LOG_ERROR,
|
||||
LOG_WARNING,
|
||||
LOG_NOTICE,
|
||||
LOG_INFO,
|
||||
LOG_DEBUG,
|
||||
LOG_TRACE,
|
||||
LOG_ERRNO = 1 << 8
|
||||
} hts_log_type;
|
||||
#endif
|
||||
@@ -225,6 +231,7 @@ struct htsoptstate {
|
||||
int verif_backblue_done;
|
||||
int verif_external_status;
|
||||
t_dnscache *dns_cache;
|
||||
int dns_cache_nthreads;
|
||||
/* HTML parsing state */
|
||||
char _hts_errmsg[HTS_CDLMAXSIZE + 256];
|
||||
int _hts_in_html_parsing;
|
||||
@@ -282,6 +289,7 @@ struct httrackp {
|
||||
int depth; // nombre de niveaux de récursion
|
||||
int extdepth; // nombre de niveaux de récursion à l'éxtérieur
|
||||
int urlmode; // liens relatifs etc
|
||||
int no_type_change; // do not change file type according to MIME
|
||||
int debug; // mode débug log
|
||||
int getmode; // sauver html, images..
|
||||
FILE *log; // fichier log
|
||||
@@ -299,7 +307,6 @@ struct httrackp {
|
||||
int rateout; // nombre d'octets minium pour le transfert
|
||||
int maxtime; // temps max en secondes
|
||||
int maxrate; // taux de transfert max
|
||||
int mms_maxtime; // max duration of a mms file
|
||||
float maxconn; // nombre max de connexions/s
|
||||
int waittime; // démarrage programmé
|
||||
int cache; // génération d'un cache
|
||||
@@ -355,8 +362,11 @@ struct httrackp {
|
||||
String urllist; // fichier liste de filtres à inclure
|
||||
htsfilters filters; // contient les pointeurs pour les filtres
|
||||
hash_struct *hash; // hash structure
|
||||
lien_url **liens; // liens
|
||||
robots_wizard *robotsptr; // robots ptr
|
||||
String lang_iso; // en, fr ..
|
||||
String accept; // Accept:
|
||||
String headers; // Additional headers
|
||||
String mimedefs; // ext1=mimetype1\next2=mimetype2..
|
||||
String mod_blacklist; // (3.41)
|
||||
int convert_utf8; // filenames UTF-8 conversion (3.46)
|
||||
|
||||
284
src/htsparse.c
284
src/htsparse.c
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -36,9 +35,7 @@ Please visit our Website: http://www.httrack.com
|
||||
/* Internal engine bytecode */
|
||||
#define HTS_INTERNAL_BYTECODE
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
/* File defs */
|
||||
@@ -80,12 +77,14 @@ Please visit our Website: http://www.httrack.com
|
||||
// version optimisée, qui permet de ne pas toucher aux html non modifiés (update)
|
||||
#define REALLOC_SIZE 8192
|
||||
#define HT_ADD_CHK(A) if (((int) (A)+ht_len+1) >= ht_size) { \
|
||||
char message[256]; \
|
||||
ht_size=(A)+ht_len+REALLOC_SIZE; \
|
||||
ht_buff=(char*) realloct(ht_buff,ht_size); \
|
||||
if (ht_buff==NULL) { \
|
||||
printf("PANIC! : Not enough memory [%d]\n", __LINE__); \
|
||||
XH_uninit; \
|
||||
abortLogFmt("not enough memory for current html document in HT_ADD_CHK : realloct("LLintP") failed" _ ht_size); \
|
||||
snprintf(message, sizeof(message), "not enough memory for current html document in HT_ADD_CHK : realloct("LLintP") failed", (LLint) ht_size); \
|
||||
abortLog(message); \
|
||||
abort(); \
|
||||
} \
|
||||
} \
|
||||
@@ -109,7 +108,7 @@ Please visit our Website: http://www.httrack.com
|
||||
if ((opt->getmode & 1) && (ptr>0)) { \
|
||||
size_t i_, j_; \
|
||||
char BIGSTK tempo_[HTS_URLMAXSIZE*2]; \
|
||||
escape_for_html_print(A, tempo_); \
|
||||
escape_for_html_print(A, tempo_, sizeof(tempo_)); \
|
||||
i_=strlen(tempo_); \
|
||||
j_=ht_len; \
|
||||
if (i_) { \
|
||||
@@ -121,7 +120,7 @@ Please visit our Website: http://www.httrack.com
|
||||
if ((opt->getmode & 1) && (ptr>0)) { \
|
||||
size_t i_, j_; \
|
||||
char BIGSTK tempo_[HTS_URLMAXSIZE*2]; \
|
||||
escape_for_html_print_full(A, tempo_); \
|
||||
escape_for_html_print_full(A, tempo_, sizeof(tempo_)); \
|
||||
i_=strlen(tempo_); \
|
||||
j_=ht_len; \
|
||||
if (i_) { \
|
||||
@@ -130,6 +129,7 @@ Please visit our Website: http://www.httrack.com
|
||||
ht_buff[j_+i_]='\0'; \
|
||||
} }
|
||||
#define HT_ADD_START \
|
||||
char message[256]; \
|
||||
size_t ht_size=(size_t)(r->size*5)/4+REALLOC_SIZE; \
|
||||
size_t ht_len=0; \
|
||||
char* ht_buff=NULL; \
|
||||
@@ -138,7 +138,8 @@ Please visit our Website: http://www.httrack.com
|
||||
if (ht_buff==NULL) { \
|
||||
printf("PANIC! : Not enough memory [%d]\n",__LINE__); \
|
||||
XH_uninit; \
|
||||
abortLogFmt("not enough memory for current html document in HT_ADD_START : malloct("LLintP") failed" _ ht_size); \
|
||||
snprintf(message, sizeof(message), "not enough memory for current html document in HT_ADD_START : malloct("LLintP") failed", (LLint) ht_size); \
|
||||
abortLog(message); \
|
||||
abort(); \
|
||||
} \
|
||||
ht_buff[0]='\0'; \
|
||||
@@ -147,7 +148,7 @@ Please visit our Website: http://www.httrack.com
|
||||
int ok=0;\
|
||||
if (ht_buff) { \
|
||||
char digest[32+2];\
|
||||
off_t fsize_old = fsize(fconv(OPT_GET_BUFF(opt),savename));\
|
||||
off_t fsize_old = fsize(fconv(OPT_GET_BUFF(opt),OPT_GET_BUFF_SIZE(opt),savename));\
|
||||
digest[0]='\0';\
|
||||
domd5mem(ht_buff,ht_len,digest,1);\
|
||||
if (fsize_old==ht_len) { \
|
||||
@@ -213,8 +214,7 @@ Please visit our Website: http://www.httrack.com
|
||||
char BIGSTK tempo[1024]; \
|
||||
if (makeindex_links == 1) { \
|
||||
char BIGSTK link_escaped[HTS_URLMAXSIZE*2]; \
|
||||
strcpybuff(link_escaped, makeindex_firstlink); \
|
||||
escape_uri_utf(link_escaped); \
|
||||
escape_uri_utf(makeindex_firstlink, link_escaped, sizeof(link_escaped)); \
|
||||
sprintf(tempo,"<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=%s\">"CRLF,link_escaped); \
|
||||
} else \
|
||||
tempo[0]='\0'; \
|
||||
@@ -225,7 +225,7 @@ Please visit our Website: http://www.httrack.com
|
||||
fflush(makeindex_fp); \
|
||||
fclose(makeindex_fp); /* à ne pas oublier sinon on passe une nuit blanche */ \
|
||||
makeindex_fp=NULL; \
|
||||
usercommand(opt,0,NULL,fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_html_utf8),"index.html"),"primary","primary"); \
|
||||
usercommand(opt,0,NULL,fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_html_utf8),"index.html"),"primary","primary"); \
|
||||
} \
|
||||
} \
|
||||
makeindex_done=1; /* ok c'est fait */ \
|
||||
@@ -295,7 +295,7 @@ Please visit our Website: http://www.httrack.com
|
||||
strcpybuff(liens[lien_tot]->fil,F); \
|
||||
strcpybuff(liens[lien_tot]->sav,S); \
|
||||
liens_record_sav_len(liens[lien_tot]); \
|
||||
hash_write(hashptr,lien_tot,opt->urlhack); \
|
||||
hash_write(hashptr,lien_tot); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -657,13 +657,13 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
if (p) { // ok center
|
||||
if (makeindex_fp == NULL) {
|
||||
file_notify(opt, "", "",
|
||||
fconcat(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html_utf8),
|
||||
"index.html"), 1, 1, 0);
|
||||
verif_backblue(opt, StringBuff(opt->path_html_utf8)); // générer gif
|
||||
makeindex_fp =
|
||||
filecreate(&opt->state.strc,
|
||||
fconcat(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html_utf8),
|
||||
"index.html"));
|
||||
if (makeindex_fp != NULL) {
|
||||
@@ -695,7 +695,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
}
|
||||
if (lienrelatif
|
||||
(tempo, liens[ptr]->sav,
|
||||
concat(OPT_GET_BUFF(opt),
|
||||
concat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_html_utf8),
|
||||
"index.html")) == 0) {
|
||||
detect_title = 1; // ok détecté pour cette page!
|
||||
@@ -732,7 +732,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
}
|
||||
|
||||
// Body
|
||||
escape_uri_utf(tempo);
|
||||
inplace_escape_uri_utf(tempo, sizeof(tempo));
|
||||
fprintf(makeindex_fp, template_body, tempo, s);
|
||||
}
|
||||
}
|
||||
@@ -1701,9 +1701,6 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
#if HTS_USEOPENSSL
|
||||
|| (strfield(tempo, "https:")
|
||||
)
|
||||
#endif
|
||||
#if HTS_USEMMS
|
||||
|| strfield(tempo, "mms:")
|
||||
#endif
|
||||
) // ok pas de problème
|
||||
url_ok = 1;
|
||||
@@ -1726,7 +1723,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
get_httptype(opt, type, tempo, 0);
|
||||
if (strnotempty(type)) // type reconnu!
|
||||
url_ok = 1;
|
||||
else if (is_dyntype(get_ext(OPT_GET_BUFF(opt), tempo))) // reconnu php,cgi,asp..
|
||||
else if (is_dyntype(get_ext(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), tempo))) // reconnu php,cgi,asp..
|
||||
url_ok = 1;
|
||||
// MAIS pas les foobar@aol.com !!
|
||||
if (strchr(tempo, '@'))
|
||||
@@ -2100,18 +2097,21 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
const int hasCharset = charset != NULL
|
||||
&& *charset != '\0';
|
||||
char BIGSTK query[HTS_URLMAXSIZE * 2];
|
||||
char *const a = strchr(lien, '?');
|
||||
|
||||
// cut query string
|
||||
if (a != NULL) {
|
||||
strcpybuff(query, a);
|
||||
*a = '\0';
|
||||
} else {
|
||||
query[0] = '\0';
|
||||
{
|
||||
char *const a = strchr(lien, '?');
|
||||
if (a != NULL) {
|
||||
strcpybuff(query, a);
|
||||
*a = '\0';
|
||||
} else {
|
||||
query[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
// Unescape %XX, but not yet high-chars (supposedly encoded with UTF-8)
|
||||
strcpybuff(lien, unescape_http_unharm(catbuff, lien, 1)); /* note: '%' is still escaped */
|
||||
strcpybuff(lien,
|
||||
unescape_http_unharm(catbuff, sizeof(catbuff), lien, 1 | 2)); /* note: '%' is still escaped */
|
||||
|
||||
// Force to encode non-printable chars (should never happend)
|
||||
escape_remove_control(lien);
|
||||
@@ -2149,7 +2149,8 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
// Decode remaining %XX high characters with UTF-8
|
||||
// but only when this leads to valid UTF-8.
|
||||
// Otherwise, leave them unescaped.
|
||||
if (hts_unescapeUrl(lien, catbuff, sizeof(catbuff)) == 0) {
|
||||
if (hts_unescapeUrlSpecial(lien, catbuff, sizeof(catbuff),
|
||||
UNESCAPE_URL_NO_ASCII) == 0) {
|
||||
strcpybuff(lien, catbuff);
|
||||
} else {
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
@@ -2158,10 +2159,8 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
|
||||
// we need to encode query string non-ascii chars,
|
||||
// leaving the encoding as-is (unlike the file part)
|
||||
escape_check_url(query);
|
||||
|
||||
// copy back query
|
||||
strcatbuff(lien, query); /* restore */
|
||||
// and copy back query
|
||||
append_escape_check_url(query, lien, sizeof(lien));
|
||||
}
|
||||
|
||||
// convertir les éventuels \ en des / pour éviter des problèmes de reconnaissance!
|
||||
@@ -2601,8 +2600,8 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
|
||||
// pas d'erreur, on continue
|
||||
r_sv =
|
||||
hts_wait_delayed(str, adr, fil, save, parenturladr,
|
||||
parenturlfil, former_adr, former_fil,
|
||||
hts_wait_delayed(str, adr, fil, save, liens[ptr]->adr,
|
||||
liens[ptr]->fil, former_adr, former_fil,
|
||||
&forbidden_url);
|
||||
|
||||
/* User interaction, because hts_wait_delayed can be slow.. (3.43) */
|
||||
@@ -2781,7 +2780,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
if (lienrelatif(tempo, save, relativesavename) ==
|
||||
0) {
|
||||
/* Never escape high-chars (we don't know the encoding!!) */
|
||||
escape_uri_utf(tempo); // escape with %xx
|
||||
inplace_escape_uri_utf(tempo, sizeof(tempo)); // escape with %xx
|
||||
//if (!no_esc_utf)
|
||||
// escape_uri(tempo); // escape with %xx
|
||||
//else
|
||||
@@ -2828,7 +2827,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
if (verif_external(opt, cat_nb, 1)) {
|
||||
FILE *fp =
|
||||
filecreate(&opt->state.strc,
|
||||
fconcat(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->
|
||||
path_html_utf8),
|
||||
cat_name));
|
||||
@@ -2847,7 +2846,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
}
|
||||
fclose(fp);
|
||||
usercommand(opt, 0, NULL,
|
||||
fconcat(OPT_GET_BUFF(opt),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->
|
||||
path_html_utf8),
|
||||
cat_name), "", "");
|
||||
@@ -2946,21 +2945,11 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
}
|
||||
*/
|
||||
else if (opt->mimehtml) {
|
||||
char BIGSTK buff[HTS_URLMAXSIZE * 3];
|
||||
char BIGSTK cid[HTS_URLMAXSIZE * 3];
|
||||
|
||||
HT_ADD("cid:");
|
||||
strcpybuff(buff, adr);
|
||||
strcatbuff(buff, fil);
|
||||
escape_in_url(buff);
|
||||
{
|
||||
char *a = buff;
|
||||
|
||||
while((a = strchr(a, '%'))) {
|
||||
*a = 'X';
|
||||
a++;
|
||||
}
|
||||
}
|
||||
HT_ADD_HTMLESCAPED(buff);
|
||||
make_content_id(adr, fil, cid, sizeof(cid));
|
||||
HT_ADD_HTMLESCAPED(cid);
|
||||
lastsaved = eadr - 1; // dernier écrit+1 (enfin euh apres on fait un ++ alors hein)
|
||||
} else if (opt->urlmode == 3) { // URI absolue /
|
||||
if ((opt->getmode & 1) && (ptr > 0)) { // ecrire les html
|
||||
@@ -3023,7 +3012,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
if (lienrelatif(tempo, save, relativesavename) == 0) {
|
||||
if (!in_media) { // In media (such as real audio): don't patch
|
||||
/* Never escape high-chars (we don't know the encoding!!) */
|
||||
escape_uri_utf(tempo);
|
||||
inplace_escape_uri_utf(tempo, sizeof(tempo));
|
||||
|
||||
//if (!no_esc_utf)
|
||||
// escape_uri(tempo); // escape with %xx
|
||||
@@ -3196,7 +3185,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
//
|
||||
// On part de la fin et on essaye de se presser (économise temps machine)
|
||||
{
|
||||
int i = hash_read(hash, save, "", 0, opt->urlhack); // lecture type 0 (sav)
|
||||
int i = hash_read(hash, save, NULL, 0); // lecture type 0 (sav)
|
||||
|
||||
if (i >= 0) {
|
||||
if ((opt->debug > 1) && (opt->log != NULL)) {
|
||||
@@ -3228,9 +3217,6 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
|
||||
if (!just_test_it) {
|
||||
if ((!strfield(adr, "ftp://")) // non ftp
|
||||
&& (!strfield(adr, "file://"))
|
||||
#if HTS_USEMMS
|
||||
&& (!strfield(adr, "mms://"))
|
||||
#endif
|
||||
) { // non file
|
||||
if (opt->robots) { // récupérer robots
|
||||
if (ishtml(opt, fil) != 0) { // pas la peine pour des fichiers isolés
|
||||
@@ -3541,8 +3527,6 @@ int hts_mirror_check_moved(htsmoduleStruct * str,
|
||||
if (HTTP_IS_REDIRECT(r->statuscode)) {
|
||||
//if (r->adr!=NULL) { // adr==null si fichier direct. [catch: davename normalement si cgi]
|
||||
//int i=0;
|
||||
char *rn = NULL;
|
||||
|
||||
// char* p;
|
||||
|
||||
hts_log_print(opt, LOG_WARNING, "%s for %s%s", r->msg, urladr, urlfil);
|
||||
@@ -3622,7 +3606,7 @@ int hts_mirror_check_moved(htsmoduleStruct * str,
|
||||
urladr, urlfil, mov_adr, mov_fil);
|
||||
// canceller lien actuel
|
||||
error = 1;
|
||||
strcpybuff(liens[ptr]->adr, "!"); // caractère bidon (invalide hash)
|
||||
hash_invalidate_entry(hashptr, ptr); // invalidate hashtable entry
|
||||
// noter NOUVEAU lien
|
||||
//xxc xxc
|
||||
// set_prio_to=0+1; // protection if the moved URL is an html page!!
|
||||
@@ -3636,7 +3620,7 @@ int hts_mirror_check_moved(htsmoduleStruct * str,
|
||||
liens[liens[ptr]->precedent]->adr,
|
||||
liens[liens[ptr]->precedent]->fil, opt, liens, lien_tot,
|
||||
sback, cache, hash, ptr, numero_passe, NULL) != -1) {
|
||||
if (hash_read(hash, mov_sav, "", 0, 0) < 0) { // n'existe pas déja
|
||||
if (hash_read(hash, mov_sav, NULL, HASH_STRUCT_FILENAME) < 0) { // n'existe pas déja
|
||||
// enregistrer lien (MACRO) avec SAV IDENTIQUE
|
||||
liens_record(mov_adr, mov_fil, liens[ptr]->sav, "", "");
|
||||
//liens_record(mov_adr,mov_fil,mov_sav,"","");
|
||||
@@ -3682,50 +3666,35 @@ int hts_mirror_check_moved(htsmoduleStruct * str,
|
||||
} // ident_url_xx
|
||||
|
||||
if (get_it == 0) { // adresse vraiment différente et potentiellement en html (pas de possibilité de bouger la page tel quel à cause des <img src..> et cie)
|
||||
rn = (char *) calloct(8192, 1);
|
||||
const size_t rn_size = 8192;
|
||||
char *const rn = (char *) malloct(rn_size);
|
||||
if (rn != NULL) {
|
||||
hts_log_print(opt, LOG_WARNING, "File has moved from %s%s to %s",
|
||||
urladr, urlfil, mov_url);
|
||||
if (!opt->mimehtml) {
|
||||
escape_uri(mov_url);
|
||||
inplace_escape_uri(mov_url, sizeof(mov_url));
|
||||
} else {
|
||||
char BIGSTK buff[HTS_URLMAXSIZE * 3];
|
||||
|
||||
strcpybuff(buff, mov_adr);
|
||||
strcatbuff(buff, mov_fil);
|
||||
escape_in_url(buff);
|
||||
{
|
||||
char *a = buff;
|
||||
|
||||
while((a = strchr(a, '%'))) {
|
||||
*a = 'X';
|
||||
a++;
|
||||
}
|
||||
}
|
||||
char BIGSTK cid[HTS_URLMAXSIZE * 3];
|
||||
make_content_id(mov_adr, mov_fil, cid, sizeof(cid));
|
||||
strcpybuff(mov_url, "cid:");
|
||||
strcatbuff(mov_url, buff);
|
||||
strcatbuff(mov_url, cid);
|
||||
}
|
||||
// On prépare une page qui sautera immédiatement sur la bonne URL
|
||||
// Le scanner re-changera, ensuite, cette URL, pour la mirrorer!
|
||||
strcpybuff(rn, "<HTML>" CRLF);
|
||||
strcatbuff(rn,
|
||||
"<!-- Created by HTTrack Website Copier/" HTTRACK_VERSION
|
||||
" " HTTRACK_AFF_AUTHORS " -->" CRLF);
|
||||
strcatbuff(rn,
|
||||
"<HEAD>" CRLF "<TITLE>Page has moved</TITLE>" CRLF
|
||||
"</HEAD>" CRLF "<BODY>" CRLF);
|
||||
strcatbuff(rn, "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=");
|
||||
strcatbuff(rn, mov_url); // URL
|
||||
strcatbuff(rn, "\">" CRLF);
|
||||
strcatbuff(rn, "<A HREF=\"");
|
||||
strcatbuff(rn, mov_url);
|
||||
strcatbuff(rn, "\">");
|
||||
strcatbuff(rn, "<B>Click here...</B></A>" CRLF);
|
||||
strcatbuff(rn, "</BODY>" CRLF);
|
||||
strcatbuff(rn,
|
||||
"<!-- Created by HTTrack Website Copier/" HTTRACK_VERSION
|
||||
" " HTTRACK_AFF_AUTHORS " -->" CRLF);
|
||||
strcatbuff(rn, "</HTML>" CRLF);
|
||||
snprintf(rn, rn_size,
|
||||
"<HTML>" CRLF
|
||||
"<!-- Created by HTTrack Website Copier/" HTTRACK_VERSION " " HTTRACK_AFF_AUTHORS " -->" CRLF
|
||||
"<HEAD>" CRLF
|
||||
"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=UTF-8\">"
|
||||
"<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=%s\">"
|
||||
"<TITLE>Page has moved</TITLE>" CRLF
|
||||
"</HEAD>" CRLF
|
||||
"<BODY>" CRLF
|
||||
"<A HREF=\"%s\"><h3>Click here...</h3></A>" CRLF
|
||||
"</BODY>" CRLF
|
||||
"<!-- Created by HTTrack Website Copier/" HTTRACK_VERSION " " HTTRACK_AFF_AUTHORS " -->" CRLF
|
||||
"</HTML>" CRLF,
|
||||
mov_url, mov_url);
|
||||
|
||||
// changer la page
|
||||
if (r->adr) {
|
||||
@@ -3745,48 +3714,47 @@ int hts_mirror_check_moved(htsmoduleStruct * str,
|
||||
) { // Precondition Failed, c'est à dire pour nous redemander TOUT le fichier
|
||||
if (fexist_utf8(liens[ptr]->sav)) {
|
||||
remove(liens[ptr]->sav); // Eliminer
|
||||
if (!fexist_utf8(liens[ptr]->sav)) { // Bien éliminé? (sinon on boucle..)
|
||||
#if HDEBUG
|
||||
printf("Partial content NOT up-to-date, reget all file for %s\n",
|
||||
liens[ptr]->sav);
|
||||
#endif
|
||||
hts_log_print(opt, LOG_DEBUG, "Partial file reget (%s) for %s%s",
|
||||
r->msg, urladr, urlfil);
|
||||
// enregistrer le MEME lien (MACRO)
|
||||
liens_record(liens[ptr]->adr, liens[ptr]->fil, liens[ptr]->sav, "",
|
||||
"");
|
||||
if (liens[lien_tot] != NULL) { // OK, pas d'erreur
|
||||
liens[lien_tot]->testmode = liens[ptr]->testmode; // mode test?
|
||||
liens[lien_tot]->link_import = 0; // pas mode import
|
||||
liens[lien_tot]->depth = liens[ptr]->depth;
|
||||
liens[lien_tot]->pass2 = max(liens[ptr]->pass2, numero_passe);
|
||||
liens[lien_tot]->retry = liens[ptr]->retry;
|
||||
liens[lien_tot]->premier = liens[ptr]->premier;
|
||||
liens[lien_tot]->precedent = ptr;
|
||||
lien_tot++;
|
||||
//
|
||||
// canceller lien actuel
|
||||
error = 1;
|
||||
strcpybuff(liens[ptr]->adr, "!"); // caractère bidon (invalide hash)
|
||||
//
|
||||
} else { // oups erreur, plus de mémoire!!
|
||||
printf("PANIC! : Not enough memory [%d]\n", __LINE__);
|
||||
hts_log_print(opt, LOG_PANIC,
|
||||
"Not enough memory, can not re-allocate %d bytes",
|
||||
(int) ((add_tab_alloc + 1) * sizeof(lien_url)));
|
||||
//if (opt->getmode & 1) { if (fp) { fclose(fp); fp=NULL; } }
|
||||
XH_uninit; // désallocation mémoire & buffers
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
hts_log_print(opt, LOG_ERROR, "Can not remove old file %s", urlfil);
|
||||
error = 1;
|
||||
}
|
||||
} else {
|
||||
hts_log_print(opt, LOG_WARNING,
|
||||
"Unexpected 412/416 error (%s) for %s%s, '%s' could not be found on disk",
|
||||
r->msg, urladr, urlfil,
|
||||
liens[ptr]->sav != NULL ? liens[ptr]->sav : "");
|
||||
}
|
||||
if (!fexist_utf8(liens[ptr]->sav)) { // Bien éliminé? (sinon on boucle..)
|
||||
#if HDEBUG
|
||||
printf("Partial content NOT up-to-date, reget all file for %s\n",
|
||||
liens[ptr]->sav);
|
||||
#endif
|
||||
hts_log_print(opt, LOG_DEBUG, "Partial file reget (%s) for %s%s",
|
||||
r->msg, urladr, urlfil);
|
||||
// enregistrer le MEME lien (MACRO)
|
||||
liens_record(liens[ptr]->adr, liens[ptr]->fil, liens[ptr]->sav, "",
|
||||
"");
|
||||
if (liens[lien_tot] != NULL) { // OK, pas d'erreur
|
||||
liens[lien_tot]->testmode = liens[ptr]->testmode; // mode test?
|
||||
liens[lien_tot]->link_import = 0; // pas mode import
|
||||
liens[lien_tot]->depth = liens[ptr]->depth;
|
||||
liens[lien_tot]->pass2 = max(liens[ptr]->pass2, numero_passe);
|
||||
liens[lien_tot]->retry = liens[ptr]->retry;
|
||||
liens[lien_tot]->premier = liens[ptr]->premier;
|
||||
liens[lien_tot]->precedent = ptr;
|
||||
lien_tot++;
|
||||
//
|
||||
// canceller lien actuel
|
||||
error = 1;
|
||||
hash_invalidate_entry(hashptr, ptr); // invalidate hashtable entry
|
||||
//
|
||||
} else { // oups erreur, plus de mémoire!!
|
||||
printf("PANIC! : Not enough memory [%d]\n", __LINE__);
|
||||
hts_log_print(opt, LOG_PANIC,
|
||||
"Not enough memory, can not re-allocate %d bytes",
|
||||
(int) ((add_tab_alloc + 1) * sizeof(lien_url)));
|
||||
//if (opt->getmode & 1) { if (fp) { fclose(fp); fp=NULL; } }
|
||||
XH_uninit; // désallocation mémoire & buffers
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
hts_log_print(opt, LOG_ERROR, "Can not remove old file %s", urlfil);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
@@ -3975,13 +3943,16 @@ void hts_mirror_process_user_interaction(htsmoduleStruct * str,
|
||||
// user pause lockfile : create hts-paused.lock --> HTTrack will be paused
|
||||
if (fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-stop.lock"))) {
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log), "hts-stop.lock"))) {
|
||||
// remove lockfile
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-stop.lock"));
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log), "hts-stop.lock"));
|
||||
if (!fexist
|
||||
(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-stop.lock"))) {
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log), "hts-stop.lock"))) {
|
||||
do_pause = 1;
|
||||
}
|
||||
}
|
||||
@@ -4029,7 +4000,8 @@ void hts_mirror_process_user_interaction(htsmoduleStruct * str,
|
||||
{
|
||||
FILE *fp =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-paused.lock"), "wb");
|
||||
if (fp) {
|
||||
fspc(NULL, fp, "info"); // dater
|
||||
@@ -4043,10 +4015,10 @@ void hts_mirror_process_user_interaction(htsmoduleStruct * str,
|
||||
stat_fragment = HTS_STAT.stat_bytes;
|
||||
/* Info for wrappers */
|
||||
hts_log_print(opt, LOG_INFO, "engine: pause: %s",
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-paused.lock"));
|
||||
RUN_CALLBACK1(opt, pause,
|
||||
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log),
|
||||
"hts-paused.lock"));
|
||||
}
|
||||
//
|
||||
@@ -4074,7 +4046,7 @@ void hts_mirror_process_user_interaction(htsmoduleStruct * str,
|
||||
if (url_savename
|
||||
(add_adr, add_fil, add_sav, NULL, NULL, NULL, NULL, opt, liens,
|
||||
lien_tot, sback, cache, hash, ptr, numero_passe, NULL) != -1) {
|
||||
if (hash_read(hash, add_sav, "", 0, 0) < 0) { // n'existe pas déja
|
||||
if (hash_read(hash, add_sav, NULL, HASH_STRUCT_FILENAME) < 0) { // n'existe pas déja
|
||||
// enregistrer lien (MACRO)
|
||||
liens_record(add_adr, add_fil, add_sav, "", "");
|
||||
if (liens[lien_tot] != NULL) { // OK, pas d'erreur
|
||||
@@ -4382,15 +4354,17 @@ int hts_mirror_wait_for_next_file(htsmoduleStruct * str,
|
||||
int a = 0;
|
||||
|
||||
*stre->last_info_shell_ = tl;
|
||||
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), "hts-autopsy"))) { // débuggage: teste si le robot est vivant
|
||||
if (fexist(fconcat(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), StringBuff(opt->path_log), "hts-autopsy"))) { // débuggage: teste si le robot est vivant
|
||||
// (oui je sais un robot vivant.. mais bon.. il a le droit de vivre lui aussi)
|
||||
// (libérons les robots esclaves de l'internet!)
|
||||
remove(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-autopsy"));
|
||||
fp =
|
||||
fopen(fconcat
|
||||
(OPT_GET_BUFF(opt), StringBuff(opt->path_log),
|
||||
(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt),
|
||||
StringBuff(opt->path_log),
|
||||
"hts-isalive"), "wb");
|
||||
a = 1;
|
||||
}
|
||||
@@ -4624,7 +4598,7 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
|
||||
}
|
||||
|
||||
/* Check if the file was recorded already (necessary for redirects) */
|
||||
if (hash_read(hash, save, "", 0, opt->urlhack) >= 0) {
|
||||
if (hash_read(hash, save, NULL, HASH_STRUCT_FILENAME) >= 0) {
|
||||
if (loops == 0) { /* Should not happend */
|
||||
hts_log_print(opt, LOG_ERROR,
|
||||
"Duplicate entry in hts_wait_delayed() cancelled: %s%s -> %s",
|
||||
@@ -4652,7 +4626,7 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
|
||||
/* We added the link before the parser recorded it -- the background download MUST NOT clean silently this entry! (Petr Gajdusek) */
|
||||
back[b].early_add = 1;
|
||||
|
||||
/* Cache read failed because file does not exists (bad delayed name!)
|
||||
/* Cache read failed because file does not exist (bad delayed name!)
|
||||
Just re-add with the correct name, as we know the MIME now!
|
||||
*/
|
||||
if (back[b].r.statuscode == STATUSCODE_INVALID && back[b].r.adr == NULL) {
|
||||
@@ -4664,7 +4638,8 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
|
||||
back_copy_static(&back[b], &delayed_back);
|
||||
|
||||
/* Delete entry */
|
||||
back_delete(opt, cache, sback, b); // cancel
|
||||
back[b].r.statuscode = 0; /* TEMPORARY INVESTIGATE WHY WE FETCHED A SOCKET HERE */
|
||||
back_maydelete(opt, cache, sback, b); // cancel
|
||||
b = -1;
|
||||
|
||||
/* Recompute filename with MIME type */
|
||||
@@ -4792,7 +4767,7 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
|
||||
strcpybuff(mov_url, back[b].r.location); // copier URL
|
||||
|
||||
/* Remove (temporarily created) file if it was created */
|
||||
UNLINK(fconv(OPT_GET_BUFF(opt), back[b].url_sav));
|
||||
UNLINK(fconv(OPT_GET_BUFF(opt), OPT_GET_BUFF_SIZE(opt), back[b].url_sav));
|
||||
|
||||
/* Remove slot! */
|
||||
if (back[b].status == STATUS_READY) {
|
||||
@@ -4840,11 +4815,7 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
|
||||
}
|
||||
|
||||
// ftp: stop!
|
||||
if (strfield(mov_url, "ftp://")
|
||||
#if HTS_USEMMS
|
||||
|| strfield(mov_url, "mms://")
|
||||
#endif
|
||||
) {
|
||||
if (strfield(mov_url, "ftp://")) {
|
||||
strcpybuff(adr, mov_adr);
|
||||
strcpybuff(fil, mov_fil);
|
||||
break;
|
||||
@@ -4904,6 +4875,7 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
|
||||
/* Finalize now as we have the type */
|
||||
if (back[b].status == STATUS_READY) {
|
||||
if (!back[b].finalized) {
|
||||
hts_log_print(opt, LOG_TRACE, "finalizing as we have the type");
|
||||
back_finalize(opt, cache, sback, b);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) Xavier Roche and other contributors
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3
|
||||
of the License, or any later version.
|
||||
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 3 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
|
||||
@@ -14,8 +14,7 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
|
||||
173
src/htssafe.h
Normal file
173
src/htssafe.h
Normal file
@@ -0,0 +1,173 @@
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Important notes:
|
||||
|
||||
- We hereby ask people using this source NOT to use it in purpose of grabbing
|
||||
emails addresses, or collecting any other private information on persons.
|
||||
This would disgrace our work, and spoil the many hours we spent on it.
|
||||
|
||||
Please visit our Website: http://www.httrack.com
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* File: htssafe.h safe strings operations, and asserts */
|
||||
/* Author: Xavier Roche */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#ifndef HTSSAFE_DEFH
|
||||
#define HTSSAFE_DEFH
|
||||
|
||||
#include "htsglobal.h"
|
||||
|
||||
/**
|
||||
* Optional user-defined callback upon fatal error.
|
||||
*/
|
||||
typedef void (*htsErrorCallback) (const char *msg, const char *file, int line);
|
||||
|
||||
/**
|
||||
* Emergency logging.
|
||||
*/
|
||||
#ifndef HTSSAFE_ABORT_FUNCTION
|
||||
HTSEXT_API htsErrorCallback htsCallbackErr;
|
||||
#define HTSSAFE_ABORT_FUNCTION(A,B,C) do { if (htsCallbackErr != NULL) { htsCallbackErr(A,B,C); } } while(0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Log an abort condition, and calls abort().
|
||||
*/
|
||||
#define abortLog(a) abortf_(a, __FILE__, __LINE__)
|
||||
|
||||
/**
|
||||
* Fatal assertion check.
|
||||
*/
|
||||
#define assertf__(exp, sexp, file, line) (void) ( (exp) || (abortf_(sexp, file, line), 0) )
|
||||
|
||||
/**
|
||||
* Fatal assertion check.
|
||||
*/
|
||||
#define assertf_(exp, file, line) assertf__(exp, #exp, __FILE__, __LINE__)
|
||||
|
||||
/**
|
||||
* Fatal assertion check.
|
||||
*/
|
||||
#define assertf(exp) assertf_(exp, __FILE__, __LINE__)
|
||||
|
||||
static HTS_UNUSED void log_abort_(const char *msg, const char *file, int line) {
|
||||
fprintf(stderr, "%s failed at %s:%d\n", msg, file, line);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
static HTS_UNUSED void abortf_(const char *exp, const char *file, int line) {
|
||||
HTSSAFE_ABORT_FUNCTION(exp, file, line);
|
||||
log_abort_(exp, file, line);
|
||||
abort();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check wether 'VAR' is of type char[].
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* Note: char[] and const char[] are compatible */
|
||||
#define HTS_IS_CHAR_BUFFER(VAR) ( __builtin_types_compatible_p ( typeof (VAR), char[] ) )
|
||||
#else
|
||||
/* Note: a bit lame as char[8] won't be seen. */
|
||||
#define HTS_IS_CHAR_BUFFER(VAR) ( sizeof(VAR) != sizeof(char*) )
|
||||
#endif
|
||||
#define HTS_IS_NOT_CHAR_BUFFER(VAR) ( ! HTS_IS_CHAR_BUFFER(VAR) )
|
||||
|
||||
/**
|
||||
* Append at most N characters from "B" to "A".
|
||||
* If "A" is a char[] variable whose size is not sizeof(char*), then the size
|
||||
* is assumed to be the capacity of this array.
|
||||
*/
|
||||
#define strncatbuff(A, B, N) \
|
||||
( HTS_IS_NOT_CHAR_BUFFER(A) \
|
||||
? strncat(A, B, N) \
|
||||
: strncat_safe_(A, sizeof(A), B, \
|
||||
HTS_IS_NOT_CHAR_BUFFER(B) ? (size_t) -1 : sizeof(B), N, \
|
||||
"overflow while appending '" #B "' to '"#A"'", __FILE__, __LINE__) )
|
||||
|
||||
/**
|
||||
* Copy characters from "B" to "A".
|
||||
* If "A" is a char[] variable whose size is not sizeof(char*), then the size
|
||||
* is assumed to be the capacity of this array.
|
||||
*/
|
||||
#define strcpybuff(A, B) \
|
||||
( HTS_IS_NOT_CHAR_BUFFER(A) \
|
||||
? strcpy(A, B) \
|
||||
: strcpy_safe_(A, sizeof(A), B, \
|
||||
HTS_IS_NOT_CHAR_BUFFER(B) ? (size_t) -1 : sizeof(B), \
|
||||
"overflow while copying '" #B "' to '"#A"'", __FILE__, __LINE__) )
|
||||
|
||||
/* note: "size_t is an unsigned integral type" */
|
||||
|
||||
/**
|
||||
* Append characters of "B" to "A".
|
||||
* If "A" is a char[] variable whose size is not sizeof(char*), then the size
|
||||
* is assumed to be the capacity of this array.
|
||||
*/
|
||||
#define strcatbuff(A, B) strncatbuff(A, B, (size_t) -1)
|
||||
|
||||
/**
|
||||
* Append characters of "B" to "A", "A" having a maximum capacity of "S".
|
||||
*/
|
||||
#define strlcatbuff(A, B, S) \
|
||||
strncat_safe_(A, S, B, \
|
||||
HTS_IS_NOT_CHAR_BUFFER(B) ? (size_t) -1 : sizeof(B), (size_t) -1, \
|
||||
"overflow while copying '" #B "' to '"#A"'", __FILE__, __LINE__)
|
||||
|
||||
static HTS_INLINE HTS_UNUSED size_t strlen_safe_(const char *source, const size_t sizeof_source,
|
||||
const char *file, int line) {
|
||||
size_t size;
|
||||
assertf_( source != NULL, file, line );
|
||||
size = strnlen(source, sizeof_source);
|
||||
assertf_( size < sizeof_source, file, line );
|
||||
return size;
|
||||
}
|
||||
|
||||
static HTS_INLINE HTS_UNUSED char* strncat_safe_(char *const dest, const size_t sizeof_dest,
|
||||
const char *const source, const size_t sizeof_source,
|
||||
const size_t n,
|
||||
const char *exp, const char *file, int line) {
|
||||
const size_t source_len = strlen_safe_(source, sizeof_source, file, line);
|
||||
const size_t dest_len = strlen_safe_(dest, sizeof_dest, file, line);
|
||||
const size_t source_copy = source_len <= n ? source_len : n;
|
||||
const size_t dest_final_len = dest_len + source_copy;
|
||||
assertf__(dest_final_len < sizeof_dest, exp, file, line);
|
||||
memcpy(dest + dest_len, source, source_copy);
|
||||
dest[dest_final_len] = '\0';
|
||||
return dest;
|
||||
}
|
||||
|
||||
static HTS_INLINE HTS_UNUSED char* strcpy_safe_(char *const dest, const size_t sizeof_dest,
|
||||
const char *const source, const size_t sizeof_source,
|
||||
const char *exp, const char *file, int line) {
|
||||
assertf_(sizeof_dest != 0, file, line);
|
||||
dest[0] = '\0';
|
||||
return strncat_safe_(dest, sizeof_dest, source, sizeof_source, (size_t) -1, exp, file, line);
|
||||
}
|
||||
|
||||
#define malloct(A) malloc(A)
|
||||
#define calloct(A,B) calloc((A), (B))
|
||||
#define freet(A) do { if ((A) != NULL) { free(A); (A) = NULL; } } while(0)
|
||||
#define strdupt(A) strdup(A)
|
||||
#define realloct(A,B) realloc(A, B)
|
||||
#define memcpybuff(A, B, N) memcpy((A), (B), (N))
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user