httrack 3.42.3

This commit is contained in:
Xavier Roche
2012-03-19 13:00:04 +00:00
parent 660b569b09
commit 4aec03f2cb
32 changed files with 9319 additions and 8136 deletions

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

1639
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

581
config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@@ -87,10 +87,10 @@
/* Check for setuid */
#undef SETUID
/* The size of a `long', as computed by sizeof. */
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `long long', as computed by sizeof. */
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
/* Define to 1 if you have the ANSI C header files. */

127
config.sub vendored
View File

@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-04-22'
timestamp='2006-09-20'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +22,15 @@ timestamp='2005-04-22'
#
# 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.
# 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.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit 0 ;;
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit 0 ;;
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
exit 0;;
exit ;;
* )
break ;;
@@ -118,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -170,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -186,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -230,7 +241,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -238,7 +249,8 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -247,6 +259,7 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -255,21 +268,24 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| mt \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| openrisc | or32 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@@ -280,6 +296,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -299,7 +318,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -310,7 +329,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -321,6 +340,7 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -329,24 +349,26 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
@@ -686,6 +708,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -761,9 +786,8 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
openrisc | openrisc-*)
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -794,6 +818,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -850,6 +880,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -876,6 +910,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -1089,13 +1127,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1168,20 +1203,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1199,7 +1237,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1333,6 +1371,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@@ -1342,9 +1386,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1388,6 +1432,9 @@ case $basic_machine in
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
@@ -1559,7 +1606,7 @@ case $basic_machine in
esac
echo $basic_machine$os
exit 0
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

13428
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
AC_INIT(src/httrack.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(httrack, 3.41.20)
VERSION_INFO="2:41:0"
AM_INIT_AUTOMAKE(httrack, 3.42.3)
VERSION_INFO="2:42:0"
AM_MAINTAINER_MODE
AC_PREREQ(2.50)
@@ -33,8 +33,7 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
### Check LLint format
if test x"$ac_cv_sizeof_long" = x"8"
then
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);
@@ -55,14 +54,13 @@ main() { long int c = -1, d = -1; char* f = "%d"; sscanf("1234", f, &c, &d);
AC_DEFINE(LLINT_TYPE,long int,[LLint type])
],
[
AC_MSG_RESULT(no),
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
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);
@@ -93,7 +91,7 @@ main() { long long int c = -1, d = -1; char* f = "%d"; sscanf("1234", f, &c, &d)
AC_DEFINE(LLINT_TYPE,long long int,[LLint type])
],
[
AC_MSG_RESULT(no),
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])
@@ -121,7 +119,7 @@ AC_DEFINE(HTS_INET6, 1,[Check for IPv6])], AC_MSG_WARN([*** IPv6 not found IPv6
AC_SUBST(V6_FLAG)
### Check for LFS
AC_CHECK_LIB(c, fopen64, [LFS_FLAG="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
AC_CHECK_LIB(c, fopen64, [LFS_FLAG="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
AC_DEFINE(HTS_LFS, 1,[Check for large files support])], AC_MSG_RESULT([not found]))
AC_SUBST(LFS_FLAG)

View File

@@ -4,7 +4,23 @@ HTTrack Website Copier release history:
This file lists all changes and fixes that have been made for HTTrack.
3.41-beta
3.42-3
+ Fixed: Bad URL length validation in the commandline (Joan CALVET)
3.42-2
+ Fixed: Random crashes at the end of the mirror due to a dangling file pointer (Carlos, angus at quovadis.com.ar)
3.42
+ Fixed: size limits are stopping the mirror gently, finishing pending transfers (David Stevenson)
3.41-3
+ Fixed: text/plain advertised files renamed into .txt
+ Fixed: broken configure.in
3.41-2
+ Fixed: major WIN32 inlined function bug caused the cache not to be used at all, causing update not to work
3.41
+ New: changed API/ABI to thread-safe ones (libhttrack1 2), big cleanup in all .h definitions
+ Fixed: Major memory usage bug when downloading large sites
+ Fixed: do not rename files if the original MIME type was compatible

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.18.1 -->
<!-- CreationDate: Sat Feb 3 14:35:31 2007 -->
<!-- CreationDate: Mon Jul 28 23:17:44 2008 -->
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">

View File

@@ -1,4 +1,5 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Categories=Application;Network

View File

@@ -1,4 +1,5 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Categories=Application;Network

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

1261
ltmain.sh

File diff suppressed because it is too large Load Diff

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@@ -1,7 +1,7 @@
.\" Process this file with
.\" groff -man -Tascii httrack.1
.\"
.TH httrack 1 "Jan 2007" "httrack website copier"
.TH httrack 1 "Nov 2007" "httrack website copier"
.SH NAME
httrack \- offline browser : copy websites to a local directory
.SH SYNOPSIS

View File

@@ -69,6 +69,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -102,12 +103,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -122,22 +120,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@@ -3649,19 +3649,27 @@ int back_checksize(httrackp* opt,lien_back* eback,int check_only_totalsize) {
}
int back_checkmirror(httrackp* opt) {
// Check max time
// Check max size
if ((opt->maxsite>0) && (HTS_STAT.stat_bytes >= opt->maxsite)) {
if (opt->log) {
fprintf(opt->log,"More than "LLintP" bytes have been transfered.. giving up"LF,(LLint)opt->maxsite);
test_flush;
}
return 0;
} else if ((opt->maxtime>0) && ((time_local()-HTS_STAT.stat_timestart)>opt->maxtime)) {
if (!opt->state.stop) { /* not yet stopped */
if (opt->log) {
fprintf(opt->log,"More than "LLintP" bytes have been transfered.. giving up"LF,(LLint)opt->maxsite);
test_flush;
}
/* cancel mirror smoothly */
hts_request_stop(opt, 0);
}
return 1; /* don'k break mirror too sharply for size limits, but stop requested */
/*return 0;
*/
}
// Check max time
if ((opt->maxtime>0) && ((time_local()-HTS_STAT.stat_timestart)>opt->maxtime)) {
if (opt->log) {
fprintf(opt->log,"More than %d seconds passed.. giving up"LF,opt->maxtime);
test_flush;
}
return 0;
}
return 0; /* stop now */
}
return 1; /* Ok, go on */
}

View File

@@ -1166,6 +1166,13 @@ int cache_readdata(cache_back* cache,const char* str1,const char* str2,char** in
return 0;
}
static int hts_rename(httrackp* opt, const char *a, const char *b) {
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: rename %s -> %s (%p %p)"LF, a, b, a, b);
}
return rename(a, b);
}
// renvoyer uniquement en tête, ou NULL si erreur
// return NULL upon error, and set -1 to r.statuscode
htsblk* cache_header(httrackp* opt,cache_back* cache,const char* adr,const char* fil,htsblk* r) {
@@ -1181,6 +1188,9 @@ htsblk* cache_header(httrackp* opt,cache_back* cache,const char* adr,const char*
void cache_init(cache_back* cache,httrackp* opt) {
// ---
// utilisation du cache: renommer ancien éventuel et charger index
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: enabled=%d, base=%s, ro=%d"LF, (int) opt->cache, fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/"), (int) cache->ro);
}
if (opt->cache) {
#if DEBUGCA
printf("cache init: ");
@@ -1207,11 +1217,26 @@ void cache_init(cache_back* cache,httrackp* opt) {
}
/* Remove OLD cache */
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip")))
remove(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip"));
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip"))) {
if (remove(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip")) != 0) {
int last_errno = errno;
if (opt->log!=NULL) {
HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Cache: error while moving previous cache: %s"LF, strerror(last_errno));
}
}
}
/* Rename */
rename(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.zip"),fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip"));
if (hts_rename(opt, fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.zip"), fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip")) != 0) {
int last_errno = errno;
if (opt->log!=NULL) {
HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Cache: error while moving previous cache: %s"LF, strerror(last_errno));
}
} else {
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: successfully renamed"LF);
}
}
}
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
#if DEBUGCA
@@ -1233,8 +1258,15 @@ void cache_init(cache_back* cache,httrackp* opt) {
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.ndx")))
remove(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.ndx"));
}
} else {
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: no cache found"LF);
}
}
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: size %d"LF, (int)fsize(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip")));
}
// charger index cache précédent
if (
(
@@ -1256,23 +1288,23 @@ void cache_init(cache_back* cache,httrackp* opt) {
// Corrupted ZIP file ? Try to repair!
if (cache->zipInput == NULL && !cache->ro) {
char* name;
uLong repaired = 0;
uLong repairedBytes = 0;
if (!cache->ro) {
name = fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip");
} else {
name = fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.zip");
}
if (opt->log) {
HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Cache: damaged cache, trying to repair"LF);
fflush(opt->log);
}
if (unzRepair(name,
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/repair.zip"),
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/repair.tmp"),
&repaired, &repairedBytes
) == Z_OK) {
char* name;
uLong repaired = 0;
uLong repairedBytes = 0;
if (!cache->ro) {
name = fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.zip");
} else {
name = fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.zip");
}
if (opt->log) {
HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Cache: damaged cache, trying to repair"LF);
fflush(opt->log);
}
if (unzRepair(name,
fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/repair.zip"),
fconcat(OPT_GET_BUFF(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),"hts-cache/repair.zip"), name);
cache->zipInput = unzOpen(name);
@@ -1291,9 +1323,10 @@ void cache_init(cache_back* cache,httrackp* opt) {
// Opened ?
if (cache->zipInput!=NULL) {
int zErr;
/* Ready directory entries */
if (unzGoToFirstFile((unzFile) cache->zipInput) == Z_OK) {
if ( ( zErr = unzGoToFirstFile((unzFile) cache->zipInput) ) == Z_OK) {
char comment[128];
char BIGSTK filename[HTS_URLMAXSIZE * 4];
int entries = 0;
@@ -1362,8 +1395,12 @@ void cache_init(cache_back* cache,httrackp* opt) {
}
opt->is_update=1; // signaler comme update
} else {
HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Cache: error trying to read the cache: %s"LF, hts_get_zerror(zErr));
}
} else {
HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Cache: error trying to open the cache"LF);
}
} else if (
@@ -1477,15 +1514,19 @@ void cache_init(cache_back* cache,httrackp* opt) {
#endif
}
}
} // taille cache>0
} else {
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: no cache found in %s"LF, fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/"));
}
}
#if DEBUGCA
printf("..create cache\n");
#endif
if (!cache->ro) {
// ouvrir caches actuels
structcheck(fconcat(OPT_GET_BUFF(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),"hts-cache/new.zip"), 0);
@@ -1497,16 +1538,16 @@ void cache_init(cache_back* cache,httrackp* opt) {
// renommer
if (fexist(fconcat(OPT_GET_BUFF(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), StringBuff(opt->path_log),"hts-cache/old.lst"));
// ouvrir
cache->lst=fopen(fconcat(OPT_GET_BUFF(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;
//{
//filecreate_params tmp;
//strcpybuff(tmp.path,StringBuff(opt->path_html)); // chemin
//tmp.lst=cache->lst; // fichier lst
//filenote("",&tmp); // initialiser filecreate
//}
// ouvrir
cache->lst=fopen(fconcat(OPT_GET_BUFF(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;
//{
//filecreate_params tmp;
//strcpybuff(tmp.path,StringBuff(opt->path_html)); // chemin
//tmp.lst=cache->lst; // fichier lst
//filenote("",&tmp); // initialiser filecreate
//}
// supprimer old.txt
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.txt")))
@@ -1533,10 +1574,10 @@ void cache_init(cache_back* cache,httrackp* opt) {
fclose(cache->dat);
cache->dat=NULL;
}
if (cache->ndx!=NULL) {
char s[256];
cache_wstr(cache->dat,"CACHE-1.5");
fflush(cache->dat);
cache_wstr(cache->ndx,"CACHE-1.5");
@@ -1545,7 +1586,7 @@ void cache_init(cache_back* cache,httrackp* opt) {
time_gmt_rfc822(s); // date et heure actuelle GMT pour If-Modified-Since..
cache_wstr(cache->ndx,s);
fflush(cache->ndx); // un petit fflush au cas où
// supprimer old.lst
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.lst")))
remove(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.lst"));
@@ -1554,15 +1595,15 @@ void cache_init(cache_back* cache,httrackp* opt) {
rename(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/new.lst"),fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.lst"));
// ouvrir
cache->lst=fopen(fconcat(OPT_GET_BUFF(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;
strcpybuff(opt->state.strc.path, StringBuff(opt->path_html));
opt->state.strc.lst = cache->lst;
//{
// filecreate_params tmp;
// strcpybuff(tmp.path,StringBuff(opt->path_html)); // chemin
// tmp.lst=cache->lst; // fichier lst
// filenote("",&tmp); // initialiser filecreate
//}
// supprimer old.txt
if (fexist(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.txt")))
remove(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log),"hts-cache/old.txt"));
@@ -1575,16 +1616,20 @@ void cache_init(cache_back* cache,httrackp* opt) {
fprintf(cache->txt,"date\tsize'/'remotesize\tflags(request:Update,Range state:File response:Modified,Chunked,gZipped)\t");
fprintf(cache->txt,"statuscode\tstatus ('servermsg')\tMIME\tEtag|Date\tURL\tlocalfile\t(from URL)"LF);
}
// test
// cache_writedata(cache->ndx,cache->dat,"//[TEST]//","test1","TEST PIPO",9);
}
}
} // cache->ndx!=NULL
} //cache->zipOutput != NULL
} else {
cache->lst = cache->dat = cache->ndx = NULL;
}
} else {
if ((opt->debug>0) && (opt->log!=NULL)) {
HTS_LOG(opt,LOG_DEBUG); fprintf(opt->log,"Cache: no cache enabled"LF);
}
}
}

View File

@@ -167,7 +167,7 @@ RUN_CALLBACK0(opt, end); \
cache.zipInput = NULL; \
} \
if (cache.olddat) { fclose(cache.olddat); cache.olddat=NULL; } \
if (cache.lst) { fclose(cache.lst); cache.lst=NULL; } \
if (cache.lst) { fclose(cache.lst); cache.lst=opt->state.strc.lst=NULL; } \
if (cache.txt) { fclose(cache.txt); cache.txt=NULL; } \
if (opt->log) fflush(opt->log); \
if (opt->log) fflush(opt->log);\
@@ -1901,7 +1901,7 @@ jump_if_done:
// purger!
if (cache.lst) {
fclose(cache.lst); cache.lst=NULL;
fclose(cache.lst); cache.lst=opt->state.strc.lst=NULL;
if (opt->delete_old) {
FILE *old_lst,*new_lst;
//

View File

@@ -231,6 +231,7 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) {
/* Vérifier argv[] non vide */
if (strnotempty(argv[na])) {
assertf(strlen(argv[na]) < HTS_CDLMAXSIZE);
/* Vérifier Commande (alias) */
result=optalias_check(argc,(const char * const *)argv,na,
@@ -1242,23 +1243,32 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) {
htsmain_free();
return -1;
} else {
char callbackname[128];
char* a = argv[na + 1];
char* pos; /* = strchr(a, '='); */
for(pos = a ; *pos != '\0' && *pos != '=' && *pos != ',' && *pos != ':' ; pos++);
char* pos;
na++;
for(pos = argv[na] ; *pos != '\0' && *pos != '=' && *pos != ',' && *pos != ':' ; pos++);
/* httrack --wrapper callback[,foo] */
if (*pos == 0 || *pos == ',' || *pos == ':') {
int ret = plug_wrapper(opt, argv[na + 1], argv[na + 1]);
int ret;
char *moduleName;
if (*pos == ',' || *pos == ':') {
*pos = '\0';
moduleName = strdupt(argv[na]);
*pos = ','; /* foce seperator to ',' */
} else {
moduleName = strdupt(argv[na]);
}
ret = plug_wrapper(opt, moduleName, argv[na]);
freet(moduleName);
if (ret == 0) {
char BIGSTK tmp[1024 * 2];
sprintf(tmp, "option %%W : unable to plug the module %s (returncode != 1)", a);
sprintf(tmp, "option %%W : unable to plug the module %s (returncode != 1)", argv[na]);
HTS_PANIC_PRINTF(tmp);
htsmain_free();
return -1;
} else if (ret == -1) {
char BIGSTK tmp[1024 * 2];
int last_errno = errno;
sprintf(tmp, "option %%W : unable to load the module %s: %s (check the library path ?)", a, strerror(last_errno));
sprintf(tmp, "option %%W : unable to load the module %s: %s (check the library path ?)", argv[na], strerror(last_errno));
HTS_PANIC_PRINTF(tmp);
htsmain_free();
return -1;
@@ -1266,9 +1276,9 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) {
}
/* Old style */
/* httrack --wrapper save-name=callback:process,string */
else if (*pos == '=' && (pos - a) > 0 && (pos - a + 2) < sizeof(callbackname)) {
else if (*pos == '=') {
fprintf(stderr, "Syntax error in option %%W : the old (<3.41) API is no more supported!\n");
HTS_PANIC_PRINTF("Syntax error in option %W : this function needs to be followed by a blank space, and a module name");
HTS_PANIC_PRINTF("Syntax error in option %W : the old (<3.41) API is no more supported!");
printf("Example: -%%W check-link=checklink.so:check\n");
htsmain_free();
return -1;
@@ -1776,11 +1786,17 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt) {
} else { // URL/filters
char catbuff[CATBUFF_SIZE];
char BIGSTK tempo[1024];
if (strnotempty(url)) strcatbuff(url," "); // espace de séparation
strcpybuff(tempo,unescape_http_unharm(catbuff,argv[na],1));
escape_spc_url(tempo);
strcatbuff(url,tempo);
char BIGSTK tempo[CATBUFF_SIZE];
const int urlSize = (int) strlen(argv[na]);
const int capa = (int) ( strlen(url) + urlSize + 32 );
assertf(urlSize < HTS_URLMAXSIZE);
if (urlSize < HTS_URLMAXSIZE) {
ensureUrlCapacity(url, url_sz, capa);
if (strnotempty(url)) strcatbuff(url," "); // espace de séparation
strcpybuff(tempo,unescape_http_unharm(catbuff,argv[na],1));
escape_spc_url(tempo);
strcatbuff(url,tempo);
}
} // if argv=- etc.
} // for

View File

@@ -40,8 +40,8 @@ Please visit our Website: http://www.httrack.com
#define HTTRACK_GLOBAL_DEFH
// Version
#define HTTRACK_VERSION "3.41"
#define HTTRACK_VERSIONID "3.41.20"
#define HTTRACK_VERSION "3.42-3"
#define HTTRACK_VERSIONID "3.42.3"
#define HTTRACK_AFF_VERSION "3.x"
#define HTTRACK_LIB_VERSION "2.0"

View File

@@ -522,6 +522,7 @@ const char* hts_mime[][2] = {
{ "video/x-ms-asf", "asf" },
{ "video/x-ms-asf", "asr" },
{ "video/x-ms-asf", "asx" },
{ "video/x-ms-wmv", "wmv" },
{ "x-world/x-vrml", "flr" },
{ "x-world/x-vrml", "vrml" },
{ "x-world/x-vrml", "wrz" },
@@ -3853,8 +3854,6 @@ HTSEXT_API void escape_for_html_print_full(char* s, char* d) {
*d = '\0';
}
// concat, concatène deux chaines et renvoi le résultat
// permet d'alléger grandement le code
// il faut savoir qu'on ne peut mettre plus de 16 concat() dans une expression

View File

@@ -77,10 +77,18 @@ typedef struct t_dnscache t_dnscache;
#define READ_INTERNAL_ERROR (-4)
/* concat */
HTS_STATIC char* getHtsOptBuff_(httrackp *opt) {
#if ( defined(_WIN32) && defined(_MSC_VER) && ( _MSC_VER >= 1300 ) && (_MSC_VER <= 1310 ) )
/* NOTE: VC2003 inlining bug in optim mode not respecting function call sequence point */
#define MSVC2003INLINEBUG __declspec(noinline)
#else
#define MSVC2003INLINEBUG
#endif
MSVC2003INLINEBUG static char* getHtsOptBuff_(httrackp *opt) {
opt->state.concat.index = ( opt->state.concat.index + 1 ) % 16;
return opt->state.concat.buff[opt->state.concat.index];
}
#undef MSVC2003INLINEBUG
#define OPT_GET_BUFF(OPT) ( getHtsOptBuff_(OPT) )
// structure pour paramètres supplémentaires lors de la requête

View File

@@ -262,8 +262,14 @@ void htspe_init(void) {
#ifdef _WIN32
handle = LoadLibraryA((char*)"ssleay32");
#else
/* We are compatible with 0.9.6/7/8 and potentially above */
handle = dlopen("libssl.so.0.9.8", RTLD_LAZY);
/* We are compatible with 0.9.6/7/8/8b and potentially above */
handle = dlopen("libssl.so.0.9.8g", RTLD_LAZY); /* added 8g release too (Debarshi Ray) */
if (handle == NULL) {
handle = dlopen("libssl.so.0.9.8b", RTLD_LAZY);
}
if (handle == NULL) {
handle = dlopen("libssl.so.0.9.8", RTLD_LAZY);
}
if (handle == NULL) {
handle = dlopen("libssl.so.0.9.7", RTLD_LAZY);
}
@@ -271,12 +277,12 @@ void htspe_init(void) {
handle = dlopen("libssl.so.0.9.6", RTLD_LAZY);
}
if (handle == NULL) {
/* Try harder */
handle = dlopen("libssl.so", RTLD_LAZY);
/* Try harder with .0 if any */
handle = dlopen("libssl.so.0", RTLD_LAZY);
}
if (handle == NULL) {
/* Try harder */
handle = dlopen("libssl.so.0", RTLD_LAZY);
/* Try harder with devel link */
handle = dlopen("libssl.so", RTLD_LAZY);
}
#endif
ssl_handle = handle;

View File

@@ -395,7 +395,9 @@ int url_savename(char* adr_complete, char* fil_complete, char* save,
mime_from_file[0] = 0;
get_httptype(opt, mime_from_file, fil, 1);
if (!strnotempty(mime_from_file) || strcasecmp(mime_type, mime_from_file) != 0) { /* different mime for this type */
ext_chg = 1;
if (!may_unknown(opt, mime_type)) {
ext_chg = 1;
}
} else {
ext_chg = 0;
}

View File

@@ -140,9 +140,33 @@ int hts_extract_meta(const char* path) {
}
return 0;
}
#else
#error HTS_USEZLIB not defined
const char* hts_get_zerror(int err) {
switch(err) {
case UNZ_OK:
return "no error";
break;
case UNZ_END_OF_LIST_OF_FILE:
return "end of list of file";
break;
case UNZ_ERRNO:
return (const char*) strerror(errno);
break;
case UNZ_PARAMERROR:
return "parameter error";
break;
case UNZ_BADZIPFILE:
return "bad zip file";
break;
case UNZ_INTERNALERROR:
return "internal error";
break;
case UNZ_CRCERROR:
return "crc error";
break;
default:
return "unknown error";
break;
}
}
#endif

View File

@@ -53,6 +53,7 @@ Please visit our Website: http://www.httrack.com
extern int gz_is_available;
extern int hts_zunpack(char* filename,char* newfile);
extern int hts_extract_meta(const char* path);
extern const char* hts_get_zerror(int err);
#endif
#endif

View File

@@ -7,7 +7,7 @@ BROWSEREXE=
SRCHBROWSEREXE="x-www-browser www-browser iceape mozilla firefox firebird galeon konqueror opera netscape"
if test -n "${BROWSER}"; then
# sensible-browser will f up if BROWSER is not set
SRCHBROWSEREXE="sensible-browser ${SRCHBROWSEREXE}"
SRCHBROWSEREXE="xdg-open sensible-browser ${SRCHBROWSEREXE}"
fi
SRCHPATH="/usr/local/bin /usr/share/bin /usr/bin /usr/lib/httrack /usr/local/lib/httrack /usr/local/share/httrack /sw/bin ${HOME}/usr/bin ${HOME}/bin"
SRCHPATH="$SRCHPATH "`echo $PATH | tr ":" " "`

View File

@@ -67,6 +67,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -100,12 +101,9 @@ THREADS_LIBS = @THREADS_LIBS@
V6_FLAG = @V6_FLAG@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -120,22 +118,29 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@