From 46b112bcd439f4413925a7300d66a3e6f148765e Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 16 Feb 2010 13:32:45 +0000 Subject: replaced tabs with spaces --- CMake/CurlTests.c | 2 +- CMake/FindCARES.cmake | 4 +- docs/INSTALL | 12 +- docs/MANUAL | 2 +- docs/examples/anyauthput.c | 2 +- docs/examples/ftpuploadresume.c | 152 ++++++++++---------- docs/libcurl/curl_formadd.3 | 4 +- docs/libcurl/libcurl.m4 | 100 ++++++------- lib/README.encoding | 2 +- packages/OS400/README.OS400 | 2 +- perl/README | 2 +- perl/contrib/checklinks.pl.in | 278 ++++++++++++++++++------------------- perl/contrib/crawlink.pl | 166 +++++++++++----------- perl/contrib/formfind | 6 +- perl/contrib/getlinks.pl.in | 224 +++++++++++++++--------------- perl/contrib/recursiveftpget.pl.in | 2 +- src/mkhelp.pl | 26 ++-- tests/getpart.pm | 2 +- tests/libtest/test1013.pl | 10 +- tests/libtest/test1022.pl | 26 ++-- tests/libtest/test307.pl | 8 +- tests/libtest/test610.pl | 46 +++--- tests/libtest/test613.pl | 148 ++++++++++---------- tests/libtest/test75.pl | 8 +- tests/memanalyze.pl | 2 +- tests/runtests.pl | 2 +- 26 files changed, 619 insertions(+), 619 deletions(-) diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index a3851a5f1..09434589c 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -503,7 +503,7 @@ main () /* IoctlSocket source code */ if(0 != IoctlSocket(0, 0, 0)) - return 1; + return 1; ; return 0; } diff --git a/CMake/FindCARES.cmake b/CMake/FindCARES.cmake index 7e92a8e7c..f08aae6a5 100755 --- a/CMake/FindCARES.cmake +++ b/CMake/FindCARES.cmake @@ -6,12 +6,12 @@ # CARES_FOUND, If false, do not try to use c-ares. # also defined, but not for general use are # CARES_LIBRARY, where to find the c-ares library. - + FIND_PATH(CARES_INCLUDE_DIR ares.h /usr/local/include /usr/include ) - + SET(CARES_NAMES ${CARES_NAMES} cares) FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} diff --git a/docs/INSTALL b/docs/INSTALL index 7a13b5cf8..168f366ef 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -672,8 +672,8 @@ eCos of running curl in this way is the contents of the configuration file printed to the console. ---- src/main.c 19 Jul 2006 19:09:56 -0000 1.363 -+++ src/main.c 24 Jul 2006 21:37:23 -0000 +--- src/main.c 19 Jul 2006 19:09:56 -0000 1.363 ++++ src/main.c 24 Jul 2006 21:37:23 -0000 @@ -4286,11 +4286,31 @@ } @@ -808,10 +808,10 @@ CROSS COMPILE export NM=ppc_405-nm ./configure --target=powerpc-hardhat-linux \ - --host=powerpc-hardhat-linux \ - --build=i586-pc-linux-gnu \ - --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \ - --exec-prefix=/usr/local + --host=powerpc-hardhat-linux \ + --build=i586-pc-linux-gnu \ + --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \ + --exec-prefix=/usr/local (end script) diff --git a/docs/MANUAL b/docs/MANUAL index 208fc79c7..d7085b7f6 100644 --- a/docs/MANUAL +++ b/docs/MANUAL @@ -46,7 +46,7 @@ SIMPLE USAGE Get a file from an SSH server using SCP using a private key to authenticate: curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \ - scp://shell.example.com/~/personal.txt + scp://shell.example.com/~/personal.txt Get the main page from an IPv6 web server: diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index c96f3c180..d0c65cf1b 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -136,7 +136,7 @@ int main(int argc, char **argv) /* and give the size of the upload, this supports large file sizes on systems that have general support for it */ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, - (curl_off_t)file_info.st_size); + (curl_off_t)file_info.st_size); /* tell libcurl we can use "any" auth, which lets the lib pick one, but it also costs one extra round-trip and possibly sending of all the PUT diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c index 362711c33..d20c4a9c6 100644 --- a/docs/examples/ftpuploadresume.c +++ b/docs/examples/ftpuploadresume.c @@ -34,126 +34,126 @@ int __cdecl _snscanf(const char * input, size_t length, const char * format, ... /* parse headers for Content-Length */ size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) { - int r; - long len = 0; + int r; + long len = 0; - /* _snscanf() is Win32 specific */ - r = _snscanf(ptr, size * nmemb, "Content-Length: %ld\n", &len); + /* _snscanf() is Win32 specific */ + r = _snscanf(ptr, size * nmemb, "Content-Length: %ld\n", &len); - if (r) /* Microsoft: we don't read the specs */ - *((long *) stream) = len; + if (r) /* Microsoft: we don't read the specs */ + *((long *) stream) = len; - return size * nmemb; + return size * nmemb; } /* discard downloaded data */ size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) { - return size * nmemb; + return size * nmemb; } /* read data to upload */ size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream) { - FILE *f = stream; - size_t n; + FILE *f = stream; + size_t n; - if (ferror(f)) - return CURL_READFUNC_ABORT; + if (ferror(f)) + return CURL_READFUNC_ABORT; - n = fread(ptr, size, nmemb, f) * size; + n = fread(ptr, size, nmemb, f) * size; - return n; + return n; } int upload(CURL *curlhandle, const char * remotepath, const char * localpath, long timeout, long tries) { - FILE *f; - long uploaded_len = 0; - CURLcode r = CURLE_GOT_NOTHING; - int c; + FILE *f; + long uploaded_len = 0; + CURLcode r = CURLE_GOT_NOTHING; + int c; - f = fopen(localpath, "rb"); - if (f == NULL) { - perror(NULL); - return 0; - } + f = fopen(localpath, "rb"); + if (f == NULL) { + perror(NULL); + return 0; + } - curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L); + curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L); - curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath); + curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath); - if (timeout) - curl_easy_setopt(curlhandle, CURLOPT_FTP_RESPONSE_TIMEOUT, timeout); + if (timeout) + curl_easy_setopt(curlhandle, CURLOPT_FTP_RESPONSE_TIMEOUT, timeout); - curl_easy_setopt(curlhandle, CURLOPT_HEADERFUNCTION, getcontentlengthfunc); - curl_easy_setopt(curlhandle, CURLOPT_HEADERDATA, &uploaded_len); + curl_easy_setopt(curlhandle, CURLOPT_HEADERFUNCTION, getcontentlengthfunc); + curl_easy_setopt(curlhandle, CURLOPT_HEADERDATA, &uploaded_len); - curl_easy_setopt(curlhandle, CURLOPT_WRITEFUNCTION, discardfunc); + curl_easy_setopt(curlhandle, CURLOPT_WRITEFUNCTION, discardfunc); - curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc); - curl_easy_setopt(curlhandle, CURLOPT_READDATA, f); + curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc); + curl_easy_setopt(curlhandle, CURLOPT_READDATA, f); - curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */ - curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L); + curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */ + curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L); - curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1L); + curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1L); - for (c = 0; (r != CURLE_OK) && (c < tries); c++) { - /* are we resuming? */ - if (c) { /* yes */ - /* determine the length of the file already written */ + for (c = 0; (r != CURLE_OK) && (c < tries); c++) { + /* are we resuming? */ + if (c) { /* yes */ + /* determine the length of the file already written */ - /* - * With NOBODY and NOHEADER, libcurl will issue a SIZE - * command, but the only way to retrieve the result is - * to parse the returned Content-Length header. Thus, - * getcontentlengthfunc(). We need discardfunc() above - * because HEADER will dump the headers to stdout - * without it. - */ - curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L); - curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L); + /* + * With NOBODY and NOHEADER, libcurl will issue a SIZE + * command, but the only way to retrieve the result is + * to parse the returned Content-Length header. Thus, + * getcontentlengthfunc(). We need discardfunc() above + * because HEADER will dump the headers to stdout + * without it. + */ + curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L); + curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L); - r = curl_easy_perform(curlhandle); - if (r != CURLE_OK) - continue; + r = curl_easy_perform(curlhandle); + if (r != CURLE_OK) + continue; - curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0L); - curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0L); + curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0L); + curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0L); - fseek(f, uploaded_len, SEEK_SET); + fseek(f, uploaded_len, SEEK_SET); - curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L); - } - else { /* no */ - curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0L); - } + curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L); + } + else { /* no */ + curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0L); + } - r = curl_easy_perform(curlhandle); - } + r = curl_easy_perform(curlhandle); + } - fclose(f); + fclose(f); - if (r == CURLE_OK) - return 1; - else { - fprintf(stderr, "%s\n", curl_easy_strerror(r)); - return 0; - } + if (r == CURLE_OK) + return 1; + else { + fprintf(stderr, "%s\n", curl_easy_strerror(r)); + return 0; + } } int main(int c, char **argv) { - CURL *curlhandle = NULL; + CURL *curlhandle = NULL; - curl_global_init(CURL_GLOBAL_ALL); - curlhandle = curl_easy_init(); + curl_global_init(CURL_GLOBAL_ALL); + curlhandle = curl_easy_init(); - upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3); + upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3); - curl_easy_cleanup(curlhandle); - curl_global_cleanup(); + curl_easy_cleanup(curlhandle); + curl_global_cleanup(); - return 0; + return 0; } diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3 index 906172227..90576ba9d 100644 --- a/docs/libcurl/curl_formadd.3 +++ b/docs/libcurl/curl_formadd.3 @@ -165,8 +165,8 @@ to a CURL_FORMADD_* constant defined in /* Add ptrname/ptrcontent section */ curl_formadd(&post, &last, CURLFORM_PTRNAME, namebuffer, - CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH, - namelength, CURLFORM_END); + CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH, + namelength, CURLFORM_END); /* Add name/ptrcontent/contenttype section */ curl_formadd(&post, &last, CURLFORM_COPYNAME, "html_code_with_hole", diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4 index 50dc20d9f..f551e3026 100644 --- a/docs/libcurl/libcurl.m4 +++ b/docs/libcurl/libcurl.m4 @@ -78,30 +78,30 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], AC_PATH_PROG([_libcurl_config],[curl-config],["$withval/bin"], ["$withval/bin"]) else - AC_PATH_PROG([_libcurl_config],[curl-config]) + AC_PATH_PROG([_libcurl_config],[curl-config]) fi if test x$_libcurl_config != "x" ; then AC_CACHE_CHECK([for the version of libcurl], - [libcurl_cv_lib_curl_version], + [libcurl_cv_lib_curl_version], [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`]) - _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse` - _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse` + _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse` + _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse` if test $_libcurl_wanted -gt 0 ; then - AC_CACHE_CHECK([for libcurl >= version $2], - [libcurl_cv_lib_version_ok], + AC_CACHE_CHECK([for libcurl >= version $2], + [libcurl_cv_lib_version_ok], [ - if test $_libcurl_version -ge $_libcurl_wanted ; then - libcurl_cv_lib_version_ok=yes - else - libcurl_cv_lib_version_ok=no - fi + if test $_libcurl_version -ge $_libcurl_wanted ; then + libcurl_cv_lib_version_ok=yes + else + libcurl_cv_lib_version_ok=no + fi ]) fi - if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then + if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then if test x"$LIBCURL_CPPFLAGS" = "x" ; then LIBCURL_CPPFLAGS=`$_libcurl_config --cflags` fi @@ -109,8 +109,8 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], LIBCURL=`$_libcurl_config --libs` # This is so silly, but Apple actually has a bug in their - # curl-config script. Fixed in Tiger, but there are still - # lots of Panther installs around. + # curl-config script. Fixed in Tiger, but there are still + # lots of Panther installs around. case "${host}" in powerpc-apple-darwin7*) LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'` @@ -118,18 +118,18 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], esac fi - # All curl-config scripts support --feature - _libcurl_features=`$_libcurl_config --feature` + # All curl-config scripts support --feature + _libcurl_features=`$_libcurl_config --feature` # Is it modern enough to have --protocols? (7.12.4) - if test $_libcurl_version -ge 461828 ; then + if test $_libcurl_version -ge 461828 ; then _libcurl_protocols=`$_libcurl_config --protocols` fi - else + else _libcurl_try_link=no - fi + fi - unset _libcurl_wanted + unset _libcurl_wanted fi if test $_libcurl_try_link = yes ; then @@ -167,8 +167,8 @@ x=CURLOPT_VERBOSE; if test $libcurl_cv_lib_curl_usable = yes ; then - # Does curl_free() exist in this version of libcurl? - # If not, fake it with free() + # Does curl_free() exist in this version of libcurl? + # If not, fake it with free() _libcurl_save_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS" @@ -176,8 +176,8 @@ x=CURLOPT_VERBOSE; LIBS="$LIBS $LIBCURL" AC_CHECK_FUNC(curl_free,, - AC_DEFINE(curl_free,free, - [Define curl_free() as free() if our version of curl lacks curl_free.])) + AC_DEFINE(curl_free,free, + [Define curl_free() as free() if our version of curl lacks curl_free.])) CPPFLAGS=$_libcurl_save_cppflags LIBS=$_libcurl_save_libs @@ -190,40 +190,40 @@ x=CURLOPT_VERBOSE; AC_SUBST(LIBCURL) for _libcurl_feature in $_libcurl_features ; do - AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1]) - eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes + AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1]) + eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes done - if test "x$_libcurl_protocols" = "x" ; then + if test "x$_libcurl_protocols" = "x" ; then - # We don't have --protocols, so just assume that all - # protocols are available - _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP" + # We don't have --protocols, so just assume that all + # protocols are available + _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP" - if test x$libcurl_feature_SSL = xyes ; then - _libcurl_protocols="$_libcurl_protocols HTTPS" + if test x$libcurl_feature_SSL = xyes ; then + _libcurl_protocols="$_libcurl_protocols HTTPS" - # FTPS wasn't standards-compliant until version - # 7.11.0 (0x070b00 == 461568) - if test $_libcurl_version -ge 461568; then - _libcurl_protocols="$_libcurl_protocols FTPS" - fi - fi + # FTPS wasn't standards-compliant until version + # 7.11.0 (0x070b00 == 461568) + if test $_libcurl_version -ge 461568; then + _libcurl_protocols="$_libcurl_protocols FTPS" + fi + fi - # RTSP, IMAP, POP3 and SMTP were added in + # RTSP, IMAP, POP3 and SMTP were added in # 7.20.0 (0x071400 == 463872) - if test $_libcurl_version -ge 463872; then - _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP" - fi - fi - - for _libcurl_protocol in $_libcurl_protocols ; do - AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1]) - eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes + if test $_libcurl_version -ge 463872; then + _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP" + fi + fi + + for _libcurl_protocol in $_libcurl_protocols ; do + AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1]) + eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes done - else - unset LIBCURL - unset LIBCURL_CPPFLAGS + else + unset LIBCURL + unset LIBCURL_CPPFLAGS fi fi diff --git a/lib/README.encoding b/lib/README.encoding index ca9b4ec55..0d31b3652 100644 --- a/lib/README.encoding +++ b/lib/README.encoding @@ -1,5 +1,5 @@ - Content Encoding Support for libcurl + Content Encoding Support for libcurl * About content encodings: diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400 index e5410f32d..ce64e54a2 100644 --- a/packages/OS400/README.OS400 +++ b/packages/OS400/README.OS400 @@ -110,7 +110,7 @@ options: CURLOPT_RTSP_STREAM_URI CURLOPT_RTSP_TRANSPORT CURLOPT_SOCKS5_GSSAPI_SERVICE - CURLOPT_MAIL_FROM + CURLOPT_MAIL_FROM Else it is the same as for curl_easy_setopt(). Note that CURLOPT_ERRORBUFFER is not in the list above, since it gives the address of an (empty) character buffer, not the address of a string. diff --git a/perl/README b/perl/README index 26d627a2b..d19deed81 100644 --- a/perl/README +++ b/perl/README @@ -12,7 +12,7 @@ line or use the curl interface. The latest release of Curl_easy, a Perl interface to curl is available from - http://curl.haxx.se/libcurl/perl/ + http://curl.haxx.se/libcurl/perl/ (Georg Horn's original version of Curl_easy, supporting curl versions before 7.7 is still available from: http://www.koblenz-net.de/~horn/export/ ) diff --git a/perl/contrib/checklinks.pl.in b/perl/contrib/checklinks.pl.in index 1b453742f..db70bb112 100644 --- a/perl/contrib/checklinks.pl.in +++ b/perl/contrib/checklinks.pl.in @@ -88,32 +88,32 @@ sub SplitURL { my $inurl = $_[0]; if($inurl=~ /^([^:]+):\/\/([^\/]*)\/(.*)\/(.*)/ ) { - $getprotocol = $1; - $getserver = $2; - $getpath = $3; - $getdocument = $4; + $getprotocol = $1; + $getserver = $2; + $getpath = $3; + $getdocument = $4; } elsif ($inurl=~ /^([^:]+):\/\/([^\/]*)\/(.*)/ ) { - $getprotocol = $1; - $getserver = $2; - $getpath = $3; - $getdocument = ""; - - if($getpath !~ /\//) { - $getpath =""; - $getdocument = $3; - } + $getprotocol = $1; + $getserver = $2; + $getpath = $3; + $getdocument = ""; + + if($getpath !~ /\//) { + $getpath =""; + $getdocument = $3; + } } elsif ($inurl=~ /^([^:]+):\/\/(.*)/ ) { - $getprotocol = $1; - $getserver = $2; - $getpath = ""; - $getdocument = ""; + $getprotocol = $1; + $getserver = $2; + $getpath = ""; + $getdocument = ""; } else { - print "Couldn't parse the specified URL, retry please!\n"; - exit; + print "Couldn't parse the specified URL, retry please!\n"; + exit; } } @@ -127,52 +127,52 @@ sub SplitURL { if(!$usestdin) { open(HEADGET, "$linkcheck $geturl|") || - die "Couldn't get web page for some reason"; + die "Couldn't get web page for some reason"; headget: while() { -# print $_; - if($_ =~ /HTTP\/.*3\d\d /) { - $pagemoved=1; - } - elsif($pagemoved && - ($_ =~ /^Location: (.*)/)) { - $geturl = $1; - - &SplitURL($geturl); - - $pagemoved++; - last headget; - } +# print $_; + if($_ =~ /HTTP\/.*3\d\d /) { + $pagemoved=1; + } + elsif($pagemoved && + ($_ =~ /^Location: (.*)/)) { + $geturl = $1; + + &SplitURL($geturl); + + $pagemoved++; + last headget; + } } close(HEADGET); if($pagemoved == 1) { - print "Page is moved but we don't know where. Did you forget the ", - "traling slash?\n"; - exit; + print "Page is moved but we don't know where. Did you forget the ", + "traling slash?\n"; + exit; } open(WEBGET, "$htmlget $geturl|") || - die "Couldn't get web page for some reason"; + die "Couldn't get web page for some reason"; while() { - $line = $_; - push @indoc, $line; - $line=~ s/\n//g; - $line=~ s/\r//g; -# print $line."\n"; - $in=$in.$line; + $line = $_; + push @indoc, $line; + $line=~ s/\n//g; + $line=~ s/\r//g; +# print $line."\n"; + $in=$in.$line; } close(WEBGET); } else { while() { - $line = $_; - push @indoc, $line; - $line=~ s/\n//g; - $line=~ s/\r//g; - $in=$in.$line; + $line = $_; + push @indoc, $line; + $line=~ s/\n//g; + $line=~ s/\r//g; + $in=$in.$line; } } @@ -193,21 +193,21 @@ sub LinkWorks { boo: if( $doc[0] =~ /^HTTP[^ ]+ (\d+)/ ) { - $error = $1; - - if($error < 400 ) { - return "GOOD"; - } - else { - - if($head && ($error >= 500)) { - # This server doesn't like HEAD! - @doc = `$linkcheckfull \"$check\"`; - $head = 0; - goto boo; - } - return "BAD"; - } + $error = $1; + + if($error < 400 ) { + return "GOOD"; + } + else { + + if($head && ($error >= 500)) { + # This server doesn't like HEAD! + @doc = `$linkcheckfull \"$check\"`; + $head = 0; + goto boo; + } + return "BAD"; + } } return "BAD"; } @@ -219,43 +219,43 @@ sub GetLinks { getlinkloop: while($in =~ /[^<]*(<[^>]+>)/g ) { - # we have a tag in $1 - $tag = $1; - - if($tag =~ /^