wget-1.17.1/0000775000000000000000000000000012632615677007537 500000000000000wget-1.17.1/build-aux/0000775000000000000000000000000012632615677011431 500000000000000wget-1.17.1/build-aux/compile0000755000000000000000000001624512632605302012715 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, see . # 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 or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= 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'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= 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 . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= 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 's|^.*[\\/]||; s|^[a-zA-Z]:||; 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 test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/announce-gen0000775000000000000000000003721212632604574013653 00000000000000eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' & eval 'exec perl -wS "$0" $argv:q' if 0; # Generate a release announcement message. my $VERSION = '2013-07-09 06:39'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2002-2015 Free Software Foundation, Inc. # 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 . # Written by Jim Meyering use strict; use Getopt::Long; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; my %valid_release_types = map {$_ => 1} qw (alpha beta stable); my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); my %digest_classes = ( 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'), 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA') or (eval { require Digest::SHA1; } and 'Digest::SHA1')) ); my $srcdir = '.'; sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { my @types = sort keys %valid_release_types; print $STREAM < = C Compute the sizes of the C<@file> and return them as a hash. Return C if one of the computation failed. =cut sub sizes (@) { my (@file) = @_; my $fail = 0; my %res; foreach my $f (@file) { my $cmd = "du -h $f"; my $t = `$cmd`; # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS $@ and (warn "command failed: '$cmd'\n"), $fail = 1; chomp $t; $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/; $res{$f} = $t; } return $fail ? undef : %res; } =item C dedicated to the list of <@file>, which sizes are stored in C<%size>, and which are available from the C<@url>. =cut sub print_locations ($\@\%@) { my ($title, $url, $size, @file) = @_; print "Here are the $title:\n"; foreach my $url (@{$url}) { for my $file (@file) { print " $url/$file"; print " (", $$size{$file}, ")" if exists $$size{$file}; print "\n"; } } print "\n"; } =item C. =cut sub print_checksums (@) { my (@file) = @_; print "Here are the MD5 and SHA1 checksums:\n"; print "\n"; foreach my $meth (qw (md5 sha1)) { my $class = $digest_classes{$meth} or next; foreach my $f (@file) { open IN, '<', $f or die "$ME: $f: cannot open for reading: $!\n"; binmode IN; my $dig = $class->new->addfile(*IN)->hexdigest; close IN; print "$dig $f\n"; } } print "\n"; } =item C addressing changes between versions C<$prev_version> and C<$curr_version>. =cut sub print_news_deltas ($$$) { my ($news_file, $prev_version, $curr_version) = @_; my $news_name = $news_file; $news_name =~ s|^\Q$srcdir\E/||; print "\n$news_name\n\n"; # Print all lines from $news_file, starting with the first one # that mentions $curr_version up to but not including # the first occurrence of $prev_version. my $in_items; my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; my $found_news; open NEWS, '<', $news_file or die "$ME: $news_file: cannot open for reading: $!\n"; while (defined (my $line = )) { if ( ! $in_items) { # Match lines like these: # * Major changes in release 5.0.1: # * Noteworthy changes in release 6.6 (2006-11-22) [stable] $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o or next; $in_items = 1; print $line; } else { # This regexp must not match version numbers in NEWS items. # For example, they might well say "introduced in 4.5.5", # and we don't want that to match. $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o and last; print $line; $line =~ /\S/ and $found_news = 1; } } close NEWS; $in_items or die "$ME: $news_file: no matching lines for '$curr_version'\n"; $found_news or die "$ME: $news_file: no news item found for '$curr_version'\n"; } sub print_changelog_deltas ($$) { my ($package_name, $prev_version) = @_; # Print new ChangeLog entries. # First find all CVS-controlled ChangeLog files. use File::Find; my @changelog; find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS' and push @changelog, $File::Find::name}}, '.'); # If there are no ChangeLog files, we're done. @changelog or return; my %changelog = map {$_ => 1} @changelog; # Reorder the list of files so that if there are ChangeLog # files in the specified directories, they're listed first, # in this order: my @dir = qw ( . src lib m4 config doc ); # A typical @changelog array might look like this: # ./ChangeLog # ./po/ChangeLog # ./m4/ChangeLog # ./lib/ChangeLog # ./doc/ChangeLog # ./config/ChangeLog my @reordered; foreach my $d (@dir) { my $dot_slash = $d eq '.' ? $d : "./$d"; my $target = "$dot_slash/ChangeLog"; delete $changelog{$target} and push @reordered, $target; } # Append any remaining ChangeLog files. push @reordered, sort keys %changelog; # Remove leading './'. @reordered = map { s!^\./!!; $_ } @reordered; print "\nChangeLog entries:\n\n"; # print join ("\n", @reordered), "\n"; $prev_version =~ s/\./_/g; my $prev_cvs_tag = "\U$package_name\E-$prev_version"; my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered"; open DIFF, '-|', $cmd or die "$ME: cannot run '$cmd': $!\n"; # Print two types of lines, making minor changes: # Lines starting with '+++ ', e.g., # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247 # and those starting with '+'. # Don't print the others. my $prev_printed_line_empty = 1; while (defined (my $line = )) { if ($line =~ /^\+\+\+ /) { my $separator = "*"x70 ."\n"; $line =~ s///; $line =~ s/\s.*//; $prev_printed_line_empty or print "\n"; print $separator, $line, $separator; } elsif ($line =~ /^\+/) { $line =~ s///; print $line; $prev_printed_line_empty = ($line =~ /^$/); } } close DIFF; # The exit code should be 1. # Allow in case there are no modified ChangeLog entries. $? == 256 || $? == 128 or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n"; } sub get_tool_versions ($$) { my ($tool_list, $gnulib_version) = @_; @$tool_list or return (); my $fail; my @tool_version_pair; foreach my $t (@$tool_list) { if ($t eq 'gnulib') { push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version; next; } # Assume that the last "word" on the first line of # 'tool --version' output is the version string. my ($first_line, undef) = split ("\n", `$t --version`); if ($first_line =~ /.* (\d[\w.-]+)$/) { $t = ucfirst $t; push @tool_version_pair, "$t $1"; } else { defined $first_line and $first_line = ''; warn "$t: unexpected --version output\n:$first_line"; $fail = 1; } } $fail and exit 1; return @tool_version_pair; } { # Neutralize the locale, so that, for instance, "du" does not # issue "1,2" instead of "1.2", what confuses our regexps. $ENV{LC_ALL} = "C"; my $mail_headers; my $release_type; my $package_name; my $prev_version; my $curr_version; my $gpg_key_id; my @url_dir_list; my @news_file; my $bootstrap_tools; my $gnulib_version; my $print_checksums_p = 1; # Reformat the warnings before displaying them. local $SIG{__WARN__} = sub { my ($msg) = @_; # Warnings from GetOptions. $msg =~ s/Option (\w)/option --$1/; warn "$ME: $msg"; }; GetOptions ( 'mail-headers=s' => \$mail_headers, 'release-type=s' => \$release_type, 'package-name=s' => \$package_name, 'previous-version=s' => \$prev_version, 'current-version=s' => \$curr_version, 'gpg-key-id=s' => \$gpg_key_id, 'url-directory=s' => \@url_dir_list, 'news=s' => \@news_file, 'srcdir=s' => \$srcdir, 'bootstrap-tools=s' => \$bootstrap_tools, 'gnulib-version=s' => \$gnulib_version, 'print-checksums!' => \$print_checksums_p, 'archive-suffix=s' => \@archive_suffixes, help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, ) or usage 1; my $fail = 0; # Ensure that each required option is specified. $release_type or (warn "release type not specified\n"), $fail = 1; $package_name or (warn "package name not specified\n"), $fail = 1; $prev_version or (warn "previous version string not specified\n"), $fail = 1; $curr_version or (warn "current version string not specified\n"), $fail = 1; $gpg_key_id or (warn "GnuPG key ID not specified\n"), $fail = 1; @url_dir_list or (warn "URL directory name(s) not specified\n"), $fail = 1; my @tool_list = split ',', $bootstrap_tools if $bootstrap_tools; grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version and (warn "when specifying gnulib as a tool, you must also specify\n" . "--gnulib-version=V, where V is the result of running git describe\n" . "in the gnulib source directory.\n"), $fail = 1; !$release_type || exists $valid_release_types{$release_type} or (warn "'$release_type': invalid release type\n"), $fail = 1; @ARGV and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"), $fail = 1; $fail and usage 1; my $my_distdir = "$package_name-$curr_version"; my $xd = "$package_name-$prev_version-$curr_version.xdelta"; my @candidates = map { "$my_distdir.$_" } @archive_suffixes; my @tarballs = grep {-f $_} @candidates; @tarballs or die "$ME: none of " . join(', ', @candidates) . " were found\n"; my @sizable = @tarballs; -f $xd and push @sizable, $xd; my %size = sizes (@sizable); %size or exit 1; my $headers = ''; if (defined $mail_headers) { ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g; $headers .= "\n"; } # The markup is escaped as <\# so that when this script is sent by # mail (or part of a diff), Gnus is not triggered. print < FIXME: put comments here EOF if (@url_dir_list == 1 && @tarballs == 1) { # When there's only one tarball and one URL, use a more concise form. my $m = "$url_dir_list[0]/$tarballs[0]"; print "Here are the compressed sources and a GPG detached signature[*]:\n" . " $m\n" . " $m.sig\n\n"; } else { print_locations ("compressed sources", @url_dir_list, %size, @tarballs); -f $xd and print_locations ("xdelta diffs (useful? if so, " . "please tell bug-gnulib\@gnu.org)", @url_dir_list, %size, $xd); my @sig_files = map { "$_.sig" } @tarballs; print_locations ("GPG detached signatures[*]", @url_dir_list, %size, @sig_files); } if ($url_dir_list[0] =~ "gnu\.org") { print "Use a mirror for higher download bandwidth:\n"; if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!) { (my $m = "$url_dir_list[0]/$tarballs[0]") =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!; print " $m\n" . " $m.sig\n\n"; } else { print " http://www.gnu.org/order/ftp.html\n\n"; } } $print_checksums_p and print_checksums (@sizable); print <, 1996. # 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/config.sub0000775000000000000000000010646312632601525013331 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-11-22' # This file 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 . # # 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 Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # 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-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -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/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # 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/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; 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 ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -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* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -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* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: wget-1.17.1/build-aux/gitlog-to-changelog0000775000000000000000000003633612632604574015136 00000000000000eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' & eval 'exec perl -wS "$0" $argv:q' if 0; # Convert git log output to ChangeLog format. my $VERSION = '2015-06-11 01:03'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2008-2015 Free Software Foundation, Inc. # 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 . # Written by Jim Meyering use strict; use warnings; use Getopt::Long; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; # use File::Coda; # http://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { print $STREAM < ChangeLog $ME -- -n 5 foo > last-5-commits-to-branch-foo SPECIAL SYNTAX: The following types of strings are interpreted specially when they appear at the beginning of a log message line. They are not copied to the output. Copyright-paperwork-exempt: Yes Append the "(tiny change)" notation to the usual "date name email" ChangeLog header to mark a change that does not require a copyright assignment. Co-authored-by: Joe User List the specified name and email address on a second ChangeLog header, denoting a co-author. Signed-off-by: Joe User These lines are simply elided. In a FILE specified via --amend, comment lines (starting with "#") are ignored. FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on a line) referring to a commit in the current project, and CODE refers to one or more consecutive lines of Perl code. Pairs must be separated by one or more blank line. Here is sample input for use with --amend=FILE, from coreutils: 3a169f4c5d9159283548178668d2fae6fced3030 # fix typo in title: s/all tile types/all file types/ 1379ed974f1fa39b12e2ffab18b3f7a607082202 # Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. # Change the author to be Paul. Note the escaped "@": s,Jim .*>,Paul Eggert , EOF } exit $exit_code; } # If the string $S is a well-behaved file name, simply return it. # If it contains white space, quotes, etc., quote it, and return the new string. sub shell_quote($) { my ($s) = @_; if ($s =~ m![^\w+/.,-]!) { # Convert each single quote to '\'' $s =~ s/\'/\'\\\'\'/g; # Then single quote the string. $s = "'$s'"; } return $s; } sub quoted_cmd(@) { return join (' ', map {shell_quote $_} @_); } # Parse file F. # Comment lines (starting with "#") are ignored. # F must consist of pairs where SHA is a 40-byte SHA1 # (alone on a line) referring to a commit in the current project, and # CODE refers to one or more consecutive lines of Perl code. # Pairs must be separated by one or more blank line. sub parse_amend_file($) { my ($f) = @_; open F, '<', $f or die "$ME: $f: failed to open for reading: $!\n"; my $fail; my $h = {}; my $in_code = 0; my $sha; while (defined (my $line = )) { $line =~ /^\#/ and next; chomp $line; $line eq '' and $in_code = 0, next; if (!$in_code) { $line =~ /^([0-9a-fA-F]{40})$/ or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), $fail = 1, next; $sha = lc $1; $in_code = 1; exists $h->{$sha} and (warn "$ME: $f:$.: duplicate SHA1\n"), $fail = 1, next; } else { $h->{$sha} ||= ''; $h->{$sha} .= "$line\n"; } } close F; $fail and exit 1; return $h; } # git_dir_option $SRCDIR # # From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR # is undef). Return as a list (0 or 1 element). sub git_dir_option($) { my ($srcdir) = @_; my @res = (); if (defined $srcdir) { my $qdir = shell_quote $srcdir; my $cmd = "cd $qdir && git rev-parse --show-toplevel"; my $qcmd = shell_quote $cmd; my $git_dir = qx($cmd); defined $git_dir or die "$ME: cannot run $qcmd: $!\n"; $? == 0 or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; chomp $git_dir; push @res, "--git-dir=$git_dir/.git"; } @res; } { my $since_date; my $until_date; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; my $cluster = 1; my $ignore_matching; my $ignore_line; my $strip_tab = 0; my $strip_cherry_pick = 0; my $srcdir; GetOptions ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, 'until=s' => \$until_date, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, 'cluster!' => \$cluster, 'ignore-matching=s' => \$ignore_matching, 'ignore-line=s' => \$ignore_line, 'strip-tab' => \$strip_tab, 'strip-cherry-pick' => \$strip_cherry_pick, 'srcdir=s' => \$srcdir, ) or usage 1; defined $since_date and unshift @ARGV, "--since=$since_date"; defined $until_date and unshift @ARGV, "--until=$until_date"; # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) # that makes a correction in the log or attribution of that commit. my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; my @cmd = ('git', git_dir_option $srcdir, qw(log --log-size), '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); open PIPE, '-|', @cmd or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); my $prev_multi_paragraph; my $prev_date_line = ''; my @prev_coauthors = (); my @skipshas = (); while (1) { defined (my $in = ) or last; $in =~ /^log size (\d+)$/ or die "$ME:$.: Invalid line (expected log size):\n$in"; my $log_nbytes = $1; my $log; my $n_read = read PIPE, $log, $log_nbytes; $n_read == $log_nbytes or die "$ME:$.: unexpected EOF\n"; # Extract leading hash. my ($sha, $rest) = split ':', $log, 2; defined $sha or die "$ME:$.: malformed log entry\n"; $sha =~ /^[0-9a-fA-F]{40}$/ or die "$ME:$.: invalid SHA1: $sha\n"; my $skipflag = 0; if (@skipshas) { foreach(@skipshas) { if ($sha =~ /^$_/) { $skipflag = 1; ## Perhaps only warn if a pattern matches more than once? warn "$ME: warning: skipping $sha due to $_\n"; last; } } } # If this commit's log requires any transformation, do it now. my $code = $amend_code->{$sha}; if (defined $code) { eval 'use Safe'; my $s = new Safe; # Put the unpreprocessed entry into "$_". $_ = $rest; # Let $code operate on it, safely. my $r = $s->reval("$code") or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; # Note that we've used this entry. delete $amend_code->{$sha}; # Update $rest upon success. $rest = $_; } # Remove lines inserted by "git cherry-pick". if ($strip_cherry_pick) { $rest =~ s/^\s*Conflicts:\n.*//sm; $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; } my @line = split /[ \t]*\n/, $rest; my $author_line = shift @line; defined $author_line or die "$ME:$.: unexpected EOF\n"; $author_line =~ /^(\d+) (.*>)$/ or die "$ME:$.: Invalid line " . "(expected date/author/email):\n$author_line\n"; # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog # `(tiny change)' annotation. my $tiny = (grep (/^(?:Copyright-paperwork-exempt|Tiny-change):\s+[Yy]es$/, @line) ? ' (tiny change)' : ''); my $date_line = sprintf "%s %s$tiny\n", strftime ("%Y-%m-%d", localtime ($1)), $2; my @coauthors = grep /^Co-authored-by:.*$/, @line; # Omit meta-data lines we've already interpreted. @line = grep !/^(?:Signed-off-by:[ ].*>$ |Co-authored-by:[ ] |Copyright-paperwork-exempt:[ ] |Tiny-change:[ ] )/x, @line; # Remove leading and trailing blank lines. if (@line) { while ($line[0] =~ /^\s*$/) { shift @line; } while ($line[$#line] =~ /^\s*$/) { pop @line; } } # Handle Emacs gitmerge.el "skipped" commits. # Yes, this should be controlled by an option. So sue me. if ( grep /^(; )?Merge from /, @line ) { my $found = 0; foreach (@line) { if (grep /^The following commit.*skipped:$/, $_) { $found = 1; ## Reset at each merge to reduce chance of false matches. @skipshas = (); next; } if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/) { push ( @skipshas, $1 ); } } } # Ignore commits that match the --ignore-matching pattern, if specified. if (! ($skipflag || (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/))) { if (defined $ignore_line && @line) { @line = grep ! /$ignore_line/, @line; while ($line[$#line] =~ /^\s*$/) { pop @line; } } # Record whether there are two or more paragraphs. my $multi_paragraph = grep /^\s*$/, @line; # Format 'Co-authored-by: A U Thor ' lines in # standard multi-author ChangeLog format. for (@coauthors) { s/^Co-authored-by:\s*/\t /; s/\s*/ or warn "$ME: warning: missing email address for " . substr ($_, 5) . "\n"; } # If clustering of commit messages has been disabled, if this header # would be different from the previous date/name/etc. header, # or if this or the previous entry consists of two or more paragraphs, # then print the header. if ( ! $cluster || $date_line ne $prev_date_line || "@coauthors" ne "@prev_coauthors" || $multi_paragraph || $prev_multi_paragraph) { $prev_date_line eq '' or print "\n"; print $date_line; @coauthors and print join ("\n", @coauthors), "\n"; } $prev_date_line = $date_line; @prev_coauthors = @coauthors; $prev_multi_paragraph = $multi_paragraph; # If there were any lines if (@line == 0) { warn "$ME: warning: empty commit message:\n $date_line\n"; } else { if ($append_dot) { # If the first line of the message has enough room, then if (length $line[0] < 72) { # append a dot if there is no other punctuation or blank # at the end. $line[0] =~ /[[:punct:]\s]$/ or $line[0] .= '.'; } } # Remove one additional leading TAB from each line. $strip_tab and map { s/^\t// } @line; # Prefix each non-empty line with a TAB. @line = map { length $_ ? "\t$_" : '' } @line; print "\n", join ("\n", @line), "\n"; } } defined ($in = ) or last; $in ne "\n" and die "$ME:$.: unexpected line:\n$in"; } close PIPE or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; # FIXME-someday: include $PROCESS_STATUS in the diagnostic # Complain about any unused entry in the --amend=F specified file. my $fail = 0; foreach my $sha (keys %$amend_code) { warn "$ME:$amend_file: unused entry: $sha\n"; $fail = 1; } exit $fail; } # Local Variables: # mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC" # time-stamp-end: "'; # UTC" # End: wget-1.17.1/build-aux/install-sh0000775000000000000000000003452312345145370013351 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/vc-list-files0000775000000000000000000000734312632604574013761 00000000000000#!/bin/sh # List version-controlled file names. # Print a version string. scriptversion=2011-05-16.22; # UTC # Copyright (C) 2006-2015 Free Software Foundation, Inc. # 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 . # List the specified version-controlled files. # With no argument, list them all. With a single DIRECTORY argument, # list the version-controlled files in that directory. # If there's an argument, it must be a single, "."-relative directory name. # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/ postprocess= case $1 in --help) cat <. EOF exit ;; --version) year=`echo "$scriptversion" | sed 's/[^0-9].*//'` cat < This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. EOF exit ;; -C) test "$2" = . || postprocess="| sed 's|^|$2/|'" cd "$2" || exit 1 shift; shift ;; esac test $# = 0 && set . for dir do if test -d .git; then test "x$dir" = x. \ && dir= sed_esc= \ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } # Ignore git symlinks - either they point into the tree, in which case # we don't need to visit the target twice, or they point somewhere # else (often into a submodule), in which case the content does not # belong to this package. eval exec git ls-tree -r 'HEAD:"$dir"' \ \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess elif test -d .hg; then eval exec hg locate '"$dir/*"' $postprocess elif test -d .bzr; then test "$postprocess" = '' && postprocess="| sed 's|^\./||'" eval exec bzr ls -R --versioned '"$dir"' $postprocess elif test -d CVS; then test "$postprocess" = '' && postprocess="| sed 's|^\./||'" if test -x build-aux/cvsu; then eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess elif (cvsu --help) >/dev/null 2>&1; then eval cvsu --find --types=AFGM '"$dir"' $postprocess else eval awk -F/ \''{ \ if (!$1 && $3 !~ /^-/) { \ f=FILENAME; \ if (f ~ /CVS\/Entries$/) \ f = substr(f, 1, length(f)-11); \ print f $2; \ }}'\'' \ `find "$dir" -name Entries -print` /dev/null' $postprocess fi elif test -d .svn; then eval exec svn list -R '"$dir"' $postprocess else echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 exit 1 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/snippet/0000775000000000000000000000000012632615674013110 500000000000000wget-1.17.1/build-aux/snippet/warn-on-use.h0000664000000000000000000001200712632604574015351 00000000000000/* A C macro for emitting warnings if a function is used. Copyright (C) 2010-2015 Free Software Foundation, Inc. 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 . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") is like _GL_WARN_ON_USE (function, "string"), except that the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_EXTERN_C declaration; performs the declaration with C linkage. */ #ifndef _GL_WARN_EXTERN_C # if defined __cplusplus # define _GL_WARN_EXTERN_C extern "C" # else # define _GL_WARN_EXTERN_C extern # endif #endif wget-1.17.1/build-aux/snippet/_Noreturn.h0000664000000000000000000000046212632604574015153 00000000000000#if !defined _Noreturn && __STDC_VERSION__ < 201112 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif wget-1.17.1/build-aux/snippet/c++defs.h0000664000000000000000000002675312632604574014425 00000000000000/* C++ compatible function declaration macros. Copyright (C) 2010-2015 Free Software Foundation, Inc. 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 . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H /* The three most frequent use cases of these macros are: * For providing a substitute for a function that is missing on some platforms, but is declared and works fine on the platforms on which it exists: #if @GNULIB_FOO@ # if !@HAVE_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on all platforms, but is broken/insufficient and needs to be replaced on some platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on some platforms but is broken/insufficient and needs to be replaced on some of them and is additionally either missing or undeclared on some other platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif */ /* _GL_EXTERN_C declaration; performs the declaration with C linkage. */ #if defined __cplusplus # define _GL_EXTERN_C extern "C" #else # define _GL_EXTERN_C extern #endif /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function, named rpl_func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype rpl_func parameters_and_attributes /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function, named func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype func parameters_and_attributes /* _GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to rpl_func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); */ #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = ::rpl_func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = \ reinterpret_cast(::rpl_func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* If we were to write rettype (*const func) parameters = ::func; like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls better (remove an indirection through a 'static' pointer variable), but then the _GL_CXXALIASWARN macro below would cause a warning not only for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = ::func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast(::func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function is picked among a set of overloaded functions, namely the one with rettype2 and parameters2. Two consecutive casts are used to silence the "cannot find a match" and "invalid conversion" errors that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* The outer cast must be a reinterpret_cast. The inner cast: When the function is defined as a set of overloaded functions, it works as a static_cast<>, choosing the designated variant. When the function is defined as a single variant, it works as a reinterpret_cast<>. The parenthesized cast syntax works both ways. */ # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast( \ (rettype2(*)parameters2)(::func)); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMESPACE::func is used. func must be defined without overloaded variants. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN(func) \ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN_2(func,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN(func) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the given overloaded variant of ::func is used but not when GNULIB_NAMESPACE::func is used. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif #endif /* _GL_CXXDEFS_H */ wget-1.17.1/build-aux/snippet/arg-nonnull.h0000664000000000000000000000230012632604574015425 00000000000000/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009-2015 Free Software Foundation, Inc. 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 . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif wget-1.17.1/build-aux/ar-lib0000755000000000000000000001330212632605302012422 00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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, see . # 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 or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat <. # Originally written by Alexandre Duret-Lutz . # The master copy of this file is maintained in the gnulib Git repository. # Please send bug reports and feature requests to bug-gnulib@gnu.org. set -e GPG='gpg --batch --no-tty' conffile=.gnuploadrc to= dry_run=false replace= symlink_files= delete_files= delete_symlinks= collect_var= dbg= nl=' ' usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...] Sign all FILES, and process them at the destinations specified with --to. If CMD is not given, it defaults to uploading. See examples below. Commands: --delete delete FILES from destination --symlink create symbolic links --rmsymlink remove symbolic links -- treat the remaining arguments as files to upload Options: --to DEST specify a destination DEST for FILES (multiple --to options are allowed) --user NAME sign with key NAME --replace allow replacements of existing files --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names --dry-run do nothing, show what would have been done (including the constructed directive file) --version output version information and exit --help print this help text and exit If --symlink-regex is given without EXPR, then the link target name is created by replacing the version information with '-latest', e.g.: foo-1.3.4.tar.gz -> foo-latest.tar.gz Recognized destinations are: alpha.gnu.org:DIRECTORY savannah.gnu.org:DIRECTORY savannah.nongnu.org:DIRECTORY ftp.gnu.org:DIRECTORY build directive files and upload files by FTP download.gnu.org.ua:{alpha|ftp}/DIRECTORY build directive files and upload files by SFTP [user@]host:DIRECTORY upload files with scp Options and commands are applied in order. If the file $conffile exists in the current working directory, its contents are prepended to the actual command line options. Use this to keep your defaults. Comments (#) and empty lines in $conffile are allowed. gives some further background. Examples: 1. Upload foobar-1.0.tar.gz to ftp.gnu.org: gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz 2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org: gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz 3. Same as above, and also create symbolic links to foobar-latest.tar.*: gnupload --to ftp.gnu.org:foobar \\ --symlink-regex \\ foobar-1.0.tar.gz foobar-1.0.tar.xz 4. Upload foobar-0.9.90.tar.gz to two sites: gnupload --to alpha.gnu.org:foobar \\ --to sources.redhat.com:~ftp/pub/foobar \\ foobar-0.9.90.tar.gz 5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz (the -- terminates the list of files to delete): gnupload --to alpha.gnu.org:foobar \\ --to sources.redhat.com:~ftp/pub/foobar \\ --delete oopsbar-0.9.91.tar.gz \\ -- foobar-0.9.91.tar.gz gnupload executes a program ncftpput to do the transfers; if you don't happen to have an ncftp package installed, the ncftpput-ftp script in the build-aux/ directory of the gnulib package (http://savannah.gnu.org/projects/gnulib) may serve as a replacement. Send patches and bug reports to ." # Read local configuration file if test -r "$conffile"; then echo "$0: Reading configuration file $conffile" conf=`sed 's/#.*$//;/^$/d' "$conffile" | tr "\015$nl" ' '` eval set x "$conf \"\$@\"" shift fi while test -n "$1"; do case $1 in -*) collect_var= case $1 in --help) echo "$usage" exit $? ;; --to) if test -z "$2"; then echo "$0: Missing argument for --to" 1>&2 exit 1 elif echo "$2" | grep 'ftp-upload\.gnu\.org' >/dev/null; then echo "$0: Use ftp.gnu.org:PKGNAME or alpha.gnu.org:PKGNAME" >&2 echo "$0: for the destination, not ftp-upload.gnu.org (which" >&2 echo "$0: is used for direct ftp uploads, not with gnupload)." >&2 echo "$0: See --help and its examples if need be." >&2 exit 1 else to="$to $2" shift fi ;; --user) if test -z "$2"; then echo "$0: Missing argument for --user" 1>&2 exit 1 else GPG="$GPG --local-user $2" shift fi ;; --delete) collect_var=delete_files ;; --replace) replace="replace: true" ;; --rmsymlink) collect_var=delete_symlinks ;; --symlink-regex=*) symlink_expr=`expr "$1" : '[^=]*=\(.*\)'` ;; --symlink-regex) symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|' ;; --symlink) collect_var=symlink_files ;; --dry-run|-n) dry_run=: ;; --version) echo "gnupload $scriptversion" exit $? ;; --) shift break ;; -*) echo "$0: Unknown option '$1', try '$0 --help'" 1>&2 exit 1 ;; esac ;; *) if test -z "$collect_var"; then break else eval "$collect_var=\"\$$collect_var $1\"" fi ;; esac shift done dprint() { echo "Running $* ..." } if $dry_run; then dbg=dprint fi if test -z "$to"; then echo "$0: Missing destination sites" >&2 exit 1 fi if test -n "$symlink_files"; then x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'` if test -n "$x"; then echo "$0: Odd number of symlink arguments" >&2 exit 1 fi fi if test $# = 0; then if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then echo "$0: No file to upload" 1>&2 exit 1 fi else # Make sure all files exist. We don't want to ask # for the passphrase if the script will fail. for file do if test ! -f $file; then echo "$0: Cannot find '$file'" 1>&2 exit 1 elif test -n "$symlink_expr"; then linkname=`echo $file | sed "$symlink_expr"` if test -z "$linkname"; then echo "$0: symlink expression produces empty results" >&2 exit 1 elif test "$linkname" = $file; then echo "$0: symlink expression does not alter file name" >&2 exit 1 fi fi done fi # Make sure passphrase is not exported in the environment. unset passphrase unset passphrase_fd_0 GNUPGHOME=${GNUPGHOME:-$HOME/.gnupg} # Reset PATH to be sure that echo is a built-in. We will later use # 'echo $passphrase' to output the passphrase, so it is important that # it is a built-in (third-party programs tend to appear in 'ps' # listings with their arguments...). # Remember this script runs with 'set -e', so if echo is not built-in # it will exit now. if $dry_run || grep -q "^use-agent" $GNUPGHOME/gpg.conf; then :; else PATH=/empty echo -n "Enter GPG passphrase: " stty -echo read -r passphrase stty echo echo passphrase_fd_0="--passphrase-fd 0" fi if test $# -ne 0; then for file do echo "Signing $file ..." rm -f $file.sig echo "$passphrase" | $dbg $GPG $passphrase_fd_0 -ba -o $file.sig $file done fi # mkdirective DESTDIR BASE FILE STMT # Arguments: See upload, below mkdirective () { stmt="$4" if test -n "$3"; then stmt=" filename: $3$stmt" fi cat >${2}.directive<&2 fi $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files ;; savannah.nongnu.org:*) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files ;; download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*) destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'` destdir_topdir=`echo "$destdir" | sed 's,/.*,,'` mkdirective "$destdir_p1" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive for f in $files $base.directive.asc do echo put $f done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir ;; /*) dest_host=`echo "$dest" | sed 's,:.*,,'` mkdirective "$destdir" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive $dbg cp $files $base.directive.asc $dest_host ;; *) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg scp $files $dest ;; esac rm -f $base.directive $base.directive.asc } ##### # Process any standalone directives stmt= if test -n "$symlink_files"; then stmt="$stmt `mksymlink $symlink_files`" fi for file in $delete_files do stmt="$stmt archive: $file" done for file in $delete_symlinks do stmt="$stmt rmsymlink: $file" done if test -n "$stmt"; then for dest in $to do destdir=`echo $dest | sed 's/[^:]*://'` upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt" done fi # Process actual uploads for dest in $to do for file do echo "Uploading $file to $dest ..." stmt= # # allowing file replacement is all or nothing. if test -n "$replace"; then stmt="$stmt $replace" fi # files="$file $file.sig" destdir=`echo $dest | sed 's/[^:]*://'` if test -n "$symlink_expr"; then linkname=`echo $file | sed "$symlink_expr"` stmt="$stmt symlink: $file $linkname symlink: $file.sig $linkname.sig" fi upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files" done done exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/git-version-gen0000775000000000000000000001753112632604574014315 00000000000000#!/bin/sh # Print a version string. scriptversion=2014-12-02.19; # UTC # Copyright (C) 2007-2015 Free Software Foundation, Inc. # # 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 . # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. # It may be run two ways: # - from a git repository in which the "git describe" command below # produces useful output (thus requiring at least one signed tag) # - from a non-git-repo directory containing a .tarball-version file, which # presumes this script is invoked like "./git-version-gen .tarball-version". # In order to use intra-version strings in your project, you will need two # separate generated version string files: # # .tarball-version - present only in a distribution tarball, and not in # a checked-out repository. Created with contents that were learned at # the last time autoconf was run, and used by git-version-gen. Must not # be present in either $(srcdir) or $(builddir) for git-version-gen to # give accurate answers during normal development with a checked out tree, # but must be present in a tarball when there is no version control system. # Therefore, it cannot be used in any dependencies. GNUmakefile has # hooks to force a reconfigure at distribution time to get the value # correct, without penalizing normal development with extra reconfigures. # # .version - present in a checked-out repository and in a distribution # tarball. Usable in dependencies, particularly for files that don't # want to depend on config.h but do want to track version changes. # Delete this file prior to any autoconf run where you want to rebuild # files to pick up a version string change; and leave it stale to # minimize rebuild time after unrelated changes to configure sources. # # As with any generated file in a VC'd directory, you should add # /.version to .gitignore, so that you don't accidentally commit it. # .tarball-version is never generated in a VC'd directory, so needn't # be listed there. # # Use the following line in your configure.ac, so that $(VERSION) will # automatically be up-to-date each time configure is run (and note that # since configure.ac no longer includes a version string, Makefile rules # should not depend on configure.ac for version updates). # # AC_INIT([GNU project], # m4_esyscmd([build-aux/git-version-gen .tarball-version]), # [bug-project@example]) # # Then use the following lines in your Makefile.am, so that .version # will be present for dependencies, and so that .version and # .tarball-version will exist in distribution tarballs. # # EXTRA_DIST = $(top_srcdir)/.version # BUILT_SOURCES = $(top_srcdir)/.version # $(top_srcdir)/.version: # echo $(VERSION) > $@-t && mv $@-t $@ # dist-hook: # echo $(VERSION) > $(distdir)/.tarball-version me=$0 version="git-version-gen $scriptversion Copyright 2011 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING." usage="\ Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] Print a version string. Options: --prefix PREFIX prefix of git tags (default 'v') --fallback VERSION fallback version to use if \"git --version\" fails --help display this help and exit --version output version information and exit Running without arguments will suffice in most cases." prefix=v fallback= while test $# -gt 0; do case $1 in --help) echo "$usage"; exit 0;; --version) echo "$version"; exit 0;; --prefix) shift; prefix="$1";; --fallback) shift; fallback="$1";; -*) echo "$0: Unknown option '$1'." >&2 echo "$0: Try '--help' for more information." >&2 exit 1;; *) if test "x$tarball_version_file" = x; then tarball_version_file="$1" elif test "x$tag_sed_script" = x; then tag_sed_script="$1" else echo "$0: extra non-option argument '$1'." >&2 exit 1 fi;; esac shift done if test "x$tarball_version_file" = x; then echo "$usage" exit 1 fi tag_sed_script="${tag_sed_script:-s/x/x/}" nl=' ' # Avoid meddling by environment variable of the same name. v= v_from_git= # First see if there is a tarball-only version file. # then try "git describe", then default. if test -f $tarball_version_file then v=`cat $tarball_version_file` || v= case $v in *$nl*) v= ;; # reject multi-line output [0-9]*) ;; *) v= ;; esac test "x$v" = x \ && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 fi if test "x$v" != x then : # use $v # Otherwise, if there is at least one git commit involving the working # directory, and "git describe" output looks sensible, use that to # derive a version string. elif test "`git log -1 --pretty=format:x . 2>&1`" = x \ && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \ || git describe --abbrev=4 HEAD 2>/dev/null` \ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ && case $v in $prefix[0-9]*) ;; *) (exit 1) ;; esac then # Is this a new git that lists number of commits since the last # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb case $v in *-*-*) : git describe is okay three part flavor ;; *-*) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version # of git describe. vtag=`echo "$v" | sed 's/-.*//'` commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \ || { commit_list=failed; echo "$0: WARNING: git rev-list failed" 1>&2; } numcommits=`echo "$commit_list" | wc -l` v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; test "$commit_list" = failed && v=UNKNOWN ;; esac # Change the first '-' to a '.', so version-comparing tools work properly. # Remove the "g" in git describe's output string, to save a byte. v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; v_from_git=1 elif test "x$fallback" = x || git --version >/dev/null 2>&1; then v=UNKNOWN else v=$fallback fi v=`echo "$v" |sed "s/^$prefix//"` # Test whether to append the "-dirty" suffix only if the version # string we're using came from git. I.e., skip the test if it's "UNKNOWN" # or if it came from .tarball-version. if test "x$v_from_git" != x; then # Don't declare a version "dirty" merely because a time stamp has changed. git update-index --refresh > /dev/null 2>&1 dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= case "$dirty" in '') ;; *) # Append the suffix only if there isn't one already. case $v in *-dirty) ;; *) v="$v-dirty" ;; esac ;; esac fi # Omit the trailing newline, so that m4_esyscmd can use the result directly. printf %s "$v" # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/depcomp0000775000000000000000000005370012474351273012724 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2015 Free Software Foundation, Inc. # 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/build_info.pl0000775000000000000000000000576612627054074014031 00000000000000#!/usr/bin/env perl # Generate build_info.c. # Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. # 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 . use strict; use warnings; use Carp qw(croak); my $file = shift @ARGV; { my $data = parse_config(); output_code($data); } sub parse_config { my $features = []; my $choice_key; my $choice = []; my $list = $features; open(my $fh, '<', "$file.in") or die "Cannot open $file.in: $!"; while (<$fh>) { next if /^\s*$/; if ($list eq $choice) { unless (s/^\s+//) { $list = $features; push @$features, [$choice_key, $choice]; $choice = []; undef $choice_key; } } elsif (/^([A-Za-z0-9_-]+) \s+ choice:\s*$/x) { $choice_key = $1; $list = $choice; next; } if (/^([A-Za-z0-9_-]+) \s+ (.*)$/x) { push @$list, [$1, $2]; } else { croak "Can't parse line: $_"; } } if ($list eq $choice) { push @$features, [$choice_key, $choice]; } close($fh); return $features; } sub output_code { my $features = shift; open(my $fh, '>', "$file") or die "Cannot open $file: $!"; print $fh do { local $/; }, "\n"; print $fh <[0] cmp $b->[0] } @$features) { my ($name, $check) = @$feature; if (ref $check eq 'ARRAY') { my ($ch_name, $ch_check) = @{ shift @$check }; print $fh < #include "version.h" wget-1.17.1/build-aux/useless-if-before-free0000775000000000000000000001411412632604574015530 00000000000000eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}' & eval 'exec perl -wST "$0" $argv:q' if 0; # Detect instances of "if (p) free (p);". # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. my $VERSION = '2012-01-06 07:23'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2008-2015 Free Software Foundation, Inc. # 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 . # Written by Jim Meyering use strict; use warnings; use Getopt::Long; (my $ME = $0) =~ s|.*/||; # use File::Coda; # http://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { print $STREAM < sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, list => \$list, 'name=s@' => \@name, ) or usage 1; # Make sure we have the right number of non-option arguments. # Always tell the user why we fail. @ARGV < 1 and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR; my $or = join '|', @name; my $regexp = qr/(?:$or)/; # Set the input record separator. # Note: this makes it impractical to print line numbers. $/ = '"'; my $found_match = 0; FILE: foreach my $file (@ARGV) { open FH, '<', $file or (warn "$ME: can't open '$file' for reading: $!\n"), $err = EXIT_ERROR, next; while (defined (my $line = )) { while ($line =~ /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\) # 1 2 3 (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;| \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg) { my $all = $1; my ($lhs, $rhs) = ($2, $3); my ($free_opnd, $braced_free_opnd) = ($4, $5); my $non_NULL; if (!defined $rhs) { $non_NULL = $lhs } elsif (is_NULL $rhs) { $non_NULL = $lhs } elsif (is_NULL $lhs) { $non_NULL = $rhs } else { next } # Compare the non-NULL part of the "if" expression and the # free'd expression, without regard to white space. $non_NULL =~ tr/ \t//d; my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd; $e2 =~ tr/ \t//d; if ($non_NULL eq $e2) { $found_match = 1; $list and (print "$file\0"), next FILE; print "$file: $all\n"; } } } } continue { close FH; } $found_match && $err == EXIT_NO_MATCH and $err = EXIT_MATCH; exit $err; } my $foo = <<'EOF'; # The above is to *find* them. # This adjusts them, removing the unnecessary "if (p)" part. # FIXME: do something like this as an option (doesn't do braces): free=xfree git grep -l -z "$free *(" \ | xargs -0 useless-if-before-free -l --name="$free" \ | xargs -0 perl -0x3b -pi -e \ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s' # Use the following to remove redundant uses of kfree inside braces. # Note that -0777 puts perl in slurp-whole-file mode; # but we have plenty of memory, these days... free=kfree git grep -l -z "$free *(" \ | xargs -0 useless-if-before-free -l --name="$free" \ | xargs -0 perl -0777 -pi -e \ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms' Be careful that the result of the above transformation is valid. If the matched string is followed by "else", then obviously, it won't be. When modifying files, refuse to process anything other than a regular file. EOF ## Local Variables: ## mode: perl ## indent-tabs-mode: nil ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "my $VERSION = '" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC" ## time-stamp-end: "'; # UTC" ## End: wget-1.17.1/build-aux/config.guess0000775000000000000000000012517512632601525013667 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-11-19' # This file 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 . # # 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 Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; k1om:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: wget-1.17.1/build-aux/mdate-sh0000775000000000000000000001363712474351273013004 00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2010-08-21.06; # UTC # Copyright (C) 1995-2015 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # 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, see . # 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 or send patches to # . if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST fi case $1 in '') echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification day of FILE, in the format: 1 January 1970 Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac error () { echo "$0: $1" >&2 exit 1 } # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done test -n "$month" || error "failed parsing '$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/texinfo.tex0000664000000000000000000130360212632601525013537 00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2015-11-27.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 % Free Software Foundation, Inc. % % This texinfo.tex file 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 texinfo.tex file 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 . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. This Exception is an additional permission under section 7 % of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or % http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexsp=\sp \let\ptexstar=\* \let\ptexsup=\sup \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Give the space character the catcode for a space. \def\spaceisspace{\catcode`\ =10\relax} \chardef\dashChar = `\- \chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. % \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % Output routine % % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt } % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... % \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 % 0: top marks (\last...) \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) \noexpand\else \the\toks8 % 2: color marks }% } % \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark. % % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\lastsection{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % Main output routine. % \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. % \shipout a vbox for a single page, adding an optional header, footer, % cropmarks, and footnote. This also causes index entries for this page % to be written to the auxiliary files. % \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Common context changes for both heading and footing. % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} % % Retrieve the information for the headings from the marks in the page, % and call Plain TeX's \makeheadline and \makefootline, which use the % values in \headline and \footline. % % This is used to check if we are on the first page of a chapter. \ifcase0\topmark\fi \ifx\thischapter\empty % See comment for \gettopheadingmarks \ifcase0\firstmark\fi \let\curchaptername\thischaptername \ifcase1\firstmark\fi \let\prevchaptername\thischaptername \else \let\curchaptername\thischaptername \ifcase1\topmark\fi \let\prevchaptername\thischaptername \fi % \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi % \ifx\curchaptername\prevchaptername \let\thischapterheading\thischapter \else % \thischapterheading is the same as \thischapter except it is blank % for the first page of a chapter. This is to prevent the chapter name % being shown twice. \def\thischapterheading{}% \fi % \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% % {% % Set context for writing to auxiliary files like index files. % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen % Main part of page, including any footnotes \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Argument parsing % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % For example, \def\foo{\parsearg\fooxxx}. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. Also remove a @texinfoc % comment (see \scanmacro for details). Pass the result on to \argcheckspaces. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} \def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef - define a command taking an argument on the line % % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. \addgroupbox \prevdepth = \dimen1 \checkinserts } \def\addgroupbox{ % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). This command % is not documented, not supported, and doesn't work. % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} % \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\centersub\centerH \else \let\centersub\centerV \fi \centersub{\hfil \ignorespaces#1\unskip \hfil}% \let\centersub\relax % don't let the definition persist, just in case } \def\centerH#1{{% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }} % \newcount\centerpenalty \def\centerV#1{% % The idea here is the same as in \startdefun, \cartouche, etc.: if % @center is the first thing after a section heading, we need to wipe % out the negative parskip inserted by \sectionheading, but still % prevent a page break here. \centerpenalty = \lastpenalty \ifnum\centerpenalty>10000 \vskip\parskip \fi \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi \line{\kern\leftskip #1\kern\rightskip}% } % @sp n outputs n lines of vertical space % \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment % \def\comment{\begingroup \catcode`\^^M=\active% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}% {\catcode`\^^M=\active% \gdef\commentxxx#1^^M{\endgroup% \futurelet\nexttoken\commentxxxx}% \gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}% } \def\c{\begingroup \catcode`\^^M=\active% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \cxxx} {\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} % See comment in \scanmacro about why the definitions of @c and @comment differ % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent {\restorefirstparagraphindent \indent}% \gdef\noindent{\restorefirstparagraphindent \noindent}% \global\everypar = {\kern -\parindent \restorefirstparagraphindent}% } % \gdef\restorefirstparagraphindent{% \global\let\indent = \ptexindent \global\let\noindent = \ptexnoindent \global\everypar = {}% } % @refill is a no-op. \let\refill=\relax % @setfilename INFO-FILENAME - ignored \let\setfilename=\comment % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newbox\boxB \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to % do this reliably, so we use it. % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% \ifx\pdfescapestring\thisisundefined % No primitive available; should we give a warning or log? % Many times it won't matter. \else % The expandable \pdfescapestring primitive escapes parentheses, % backslashes, and other special chars. \xdef#1{\pdfescapestring{#1}}% \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros using ideas from pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. The dark red here is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. We use % black by default, though. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % rg sets the color for filling (usual text, etc.); % RG sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .pdf, .png, .jpg (among % others). Let's try in that order, PDF first since if % someone has a scalable image, presumably better to use that than a % bitmap. \let\pdfimgext=\empty \begingroup \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \pdfimagewidth \fi \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use black for everything. \def\urlcolor{\rgbBlack} \def\linkcolor{\rgbBlack} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % TODO this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike % Texinfo index files. So set that up. \def\{{\lbracecharliteral}% \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } {\catcode`[=1 \catcode`]=2 \catcode`{=\other \catcode`}=\other \gdef\lbracecharliteral[{]% \gdef\rbracecharliteral[}]% ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \nextsp} \def\getfilename#1{% \filenamelength=0 % If we don't expand the argument now, \skipspaces will get % snagged on things like "@value{foo}". \edef\temp{#1}% \expandafter\skipspaces\temp|\relax } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named \fontprefix#2. % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). % Example: % #1 = \textrm % #2 = \rmshape % #3 = 10 % #4 = \mainmagstep % #5 = OT1 % \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % % (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. (The default in Texinfo.) % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defsl\slshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \let\tensl=\defsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions, \definetextfontsizexi % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defsl\slshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tensl=\defsl \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions, \definetextfontsizex % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. We don't % bother to reset \scriptfont and \scriptscriptfont; awaiting user need. % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used % in, e.g., the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{17pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqkbd \markupsetcodequoteleft \let\markupsetuprqkbd \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ifx\next\.% \else\ifx\next\comma% \else\ptexslash \fi\fi\fi\fi\fi \aftersmartic } % Unconditional use \ttsl, and no ic. @var is set to this for defuns. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \def\aftersmartic{} \def\var#1{% \let\saveaftersmartic = \aftersmartic \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% \smartslanted{#1}% } \let\i=\smartitalic \let\slanted=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % @indicateurl is \samp, that is, with quotes. \let\indicateurl=\samp % @code (and similar) prints in typewriter, but with spaces the same % size as normal in the surrounding text, without hyphenation, etc. % This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % (But see \codedashfinish below.) % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\normaldash \let_\realunder \fi % Given -foo (with a single dash), we do not want to allow a break % after the hyphen. \global\let\codedashprev=\codedash % \codex } % \gdef\codedash{\futurelet\next\codedashfinish} \gdef\codedashfinish{% \normaldash % always output the dash character itself. % % Now, output a discretionary to allow a line break, unless % (a) the next character is a -, or % (b) the preceding character is a -. % E.g., given --posix, we do not want to allow a break after either -. % Given --foo-bar, we do want to allow a break between the - and the b. \ifx\next\codedash \else \ifx\codedashprev\codedash \else \discretionary{}{}{}\fi \fi % we need the space after the = for the case when \next itself is a % space token; it would get swallowed otherwise. As in @code{- a}. \global\let\codedashprev= \next } } \def\normaldash{-} % \def\codex #1{\tclose{#1}\endgroup} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is bad. % @allowcodebreaks provides a document-level way to turn breaking at - % and _ on and off. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } % For @command, @env, @file, @option quotes seem unnecessary, % so use \code rather than \samp. \let\command=\code \let\env=\code \let\file=\code \let\option=\code % @uref (abbreviation for `urlref') aka @url takes an optional % (comma-separated) second argument specifying the text to display and % an optional third arg as text to display instead of (rather than in % addition to) the url itself. First (mandatory) arg is the url. % TeX-only option to allow changing PDF output to show only the second % arg (if given), and not the url (which is then just the link target). \newif\ifurefurlonlylink % The main macro is \urefbreak, which allows breaking at expected % places within the url. (There used to be another version, which % didn't support automatic breaking.) \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak % \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% look for second arg \ifdim\wd0 > 0pt \ifpdf \ifurefurlonlylink % PDF plus option to not display url, show just arg \unhbox0 \else % PDF, normally display both arg and url for consistency, % visibility, if the pdf is eventually used to print, etc. \unhbox0\ (\urefcode{#1})% \fi \else \unhbox0\ (\urefcode{#1})% DVI, always show arg and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode`\&=\active \catcode`\.=\active \catcode`\#=\active \catcode`\?=\active \catcode`\/=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretchamount{.13em} \def\urefpoststretchamount{.1em} \def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} \def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} \def\xkey{\key} \def\kbdsub#1#2#3\par{% \def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi } % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot % have to provide another name for sup operator \let\mathopsup=\sup $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % for @sub and @sup, if in math mode, just do a normal sub/superscript. % If in text, use math to place as sub/superscript, but switch % into text mode, with smaller fonts. This is a different font than the % one used for real math sub/superscripts (8pt vs. 7pt), but let's not % fix it (significant additions to font machinery) until someone notices. % \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} \def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}% % \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} \def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}% % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. % \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} \long\def\doinlinefmt#1,#2,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } % % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if % FMTNAME is tex, else ELSE-TEXT. \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} \long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi } % % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being % ignored. But this isn't important because if people want a literal % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. % \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% \def\inlinerawname{#1}% \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi \endgroup % close group opened by \tex. } % @inlineifset{VAR, TEXT} expands TEXT if VAR is @set. % \long\def\inlineifset#1{\doinlineifset #1,\finish} \long\def\doinlineifset#1,#2,\finish{% \def\inlinevarname{#1}% \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \else\ignorespaces#2\fi } % @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set. % \long\def\inlineifclear#1{\doinlineifclear #1,\finish} \long\def\doinlineifclear#1,#2,\finish{% \def\inlinevarname{#1}% \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi } \message{glyphs,} % and logos. % @@ prints an @, as does @atchar{}. \def\@{\char64 } \let\atchar=\@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. Define \ensuremath to switch into math mode % unless we are already there. Expansion tricks may not be needed here, % but safer, and can't hurt. \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi} \def\ensuredmath#1{$\relax#1$} % \def\bullet{\ensuremath\ptexbullet} \def\geq{\ensuremath\ge} \def\leq{\ensuremath\le} \def\minus{\ensuremath-} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the European Computer Modern fonts (cm-super in outline format) % for non-CM glyphs. That is ec* for regular text and tc* for the text % companion symbols (LaTeX TS1 encoding). Both are part of the ec % package and follow the same conventions. % \def\ecfont{\etcfont{e}} \def\tcfont{\etcfont{t}} % \def\etcfont#1{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifmonospace % typewriter: \font\thisecfont = #1ctt\ecsize \space at \nominalsize \else \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{% \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } % Settings used for typesetting titles: no hyphenation, no indentation, % don't worry much about spacing, ragged right. This should be used % inside a \vbox, and fonts need to be set appropriately first. Because % it is always used for titles, nothing else, we call \rmisbold. \par % should be specified before the end of the \vbox, since a vbox is a group. % \def\raggedtitlesettings{% \rmisbold \hyphenpenalty=10000 \parindent=0pt \tolerance=5000 \ptexraggedright } % Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } % Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make \makeheadline and \makefootline in Plain TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks % These define \getoddheadingmarks, \getevenheadingmarks, % \getoddfootingmarks, and \getevenfootingmarks, each to one of % \gettopheadingmarks, \getbottomheadingmarks. % \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\headingsoff{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapterheading\hfil\folio}} \global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapterheading\hfil\folio}} \global\oddheadline={\line{\thischapterheading\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark so that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \ifinner\else \vadjust{\penalty 1200}% not good to break after first line of item. \fi % We can be in inner vertical mode in a footnote, although an % @itemize looks awful there. }% \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. Assignments % have to be global since we are inside the implicit group of an % alignment entry. \everycr below resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % default for tables with no headings. \let\headitemcrhook=\relax % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% Reset from possible headitem. \global\colcount=0 % Reset the column counter. % % Check for saved footnotes, etc.: \checkinserts % % Perhaps a \nobreak, then reset: \headitemcrhook \global\let\headitemcrhook=\relax }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi % Test to see if parskip is larger than space between lines of % table. If not, do nothing. % If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\-=\active \catcode`\_=\active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\normaldash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % % Unfortunately, this has the consequence that when _ is in the *value* % of an @set, it does not print properly in the roman fonts (get the cmr % dot accent at position 126 instead). No fix comes to mind, and it's % been this way since 2003 or earlier, so just ignore it. % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get the special treatment we need for `@end ifset,' we call % \makecond and then redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written % without the @) is in fact defined. We can only feasibly check at the % TeX level, so something like `mathcode' is going to considered % defined even though it is not a Texinfo command. % \makecond{ifcommanddefined} \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} % \def\doifcmddefined#1#2{{% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname #2\endcsname\relax #1% If not defined, \let\next as above. \fi \expandafter }\next } \def\ifcmddefinedfail{\doignore{ifcommanddefined}} % @ifcommandnotdefined CMD ... handled similar to @ifclear above. \makecond{ifcommandnotdefined} \def\ifcommandnotdefined{% \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} % Set the `txicommandconditionals' variable, so documents have a way to % test if the @ifcommand...defined conditionals are available. \set txicommandconditionals % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named IX. % It automatically defines \IXindex such that % \IXindex ...rest of line... puts an entry in the index IX. % It also defines \IXindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is IX. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \expandafter\chardef\csname#1indfile\endcsname=0 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \expandafter\chardef\csname#1indfile\endcsname=0 \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % The default indices: \newindex{cp}% concepts, \newcodeindex{fn}% functions, \newcodeindex{vr}% variables, \newcodeindex{tp}% types, \newcodeindex{ky}% keys \newcodeindex{pg}% and programs. % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all index macros. % Argument #1 is generated by the calling \fooindex macro, % and it the two-letter name of the index. \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx} \def\doindexxxx #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} % Used when writing an index entry out to an index file, to prevent % expansion of Texinfo commands that can appear in an index entry. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should use @lbracechar and @rbracechar? \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq \definedummyword\mathopsup \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result \definedummyword\sub \definedummyword\sup \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % Define \definedumyletter, \definedummyaccent and \definedummyword before % using. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\abbr \definedummyword\acronym \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\image \definedummyword\indicateurl \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\U \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % For testing: output @{ and @} in index sort strings as \{ and \}. \newif\ifusebracesinindexes \let\indexlbrace\relax \let\indexrbrace\relax {\catcode`\@=0 \catcode`\\=13 @gdef@backslashdisappear{@def\{}} } { \catcode`\<=13 \catcode`\-=13 \catcode`\`=13 \gdef\indexnonalnumdisappear{% \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else % @set txiindexlquoteignore makes us ignore left quotes in the sort term. % (Introduced for FSFS 2nd ed.) \let`=\empty \fi % \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else \backslashdisappear \fi % \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else \def-{}% \fi \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else \def<{}% \fi \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else \def\@{}% \fi } \gdef\indexnonalnumreappear{% \useindexbackslash \let-\normaldash \let<\normalless \def\@{@}% } } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % \def\lbracechar{{\indexlbrace}}% \def\rbracechar{{\indexrbrace}}% \let\{=\lbracechar \let\}=\rbracechar % % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{TH}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{th}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. % TODO: Two-level index? Operation index? % Workhorse for all indexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% \requireopenindexfile{#1}% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Check if an index file has been opened, and if not, open it. \def\requireopenindexfile#1{% \ifnum\csname #1indfile\endcsname=0 \expandafter\newwrite \csname#1indfile\endcsname \edef\suffix{#1}% % A .fls suffix would conflict with the file extension for the output % of -recorder, so use .f1s instead. \ifx\suffix\indexisfl\def\suffix{f1}\fi % Open the file \immediate\openout\csname#1indfile\endcsname \jobname.\suffix % Using \immediate here prevents an object entering into the current box, % which could confound checks such as those in \safewhatsit for preceding % skips. \fi} \def\indexisfl{fl} % Output \ as {\indexbackslash}, because \ is an escape character in % the index files. \let\indexbackslash=\relax {\catcode`\@=0 \catcode`\\=\active @gdef@useindexbackslash{@def\{{@indexbackslash}}} } % Definition for writing index entry text. \def\sortas#1{\ignorespaces}% % Definition for writing index entry sort key. Should occur at the at % the beginning of the index entry, like % @cindex @sortas{september} \september % The \ignorespaces takes care of following space, but there's no way % to remove space before it. { \catcode`\-=13 \gdef\indexwritesortas{% \begingroup \indexnonalnumreappear \indexwritesortasxxx} \gdef\indexwritesortasxxx#1{% \xdef\indexsortkey{#1}\endgroup} } % Write the entry in \toks0 to the index file. % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \useindexbackslash % \indexbackslash isn't defined now so it will be output % as is; and it will print as backslash. % Get the string to sort by, by processing the index entry with all % font commands turned off. {\indexnofonts \indexnonalnumdisappear \xdef\indexsortkey{}% \let\sortas=\indexwritesortas \edef\temp{\the\toks0}% \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas \ifx\indexsortkey\empty \xdef\indexsortkey{\temp}% \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi \fi }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% }% \temp } \newbox\dummybox % used above % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{\ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 % See comment in \requireopenindexfile. \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi \openin 1 \jobname.\indexname s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else \catcode`\\ = 0 \escapechar = `\\ % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \thisline \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\ttbackslash}% \let\indexlbrace\{ % Likewise, set these sequences for braces \let\indexrbrace\} % used in the sort key. \begindoublecolumns \let\entryorphanpenalty=\indexorphanpenalty % % Read input from the index file line by line. \loopdo \ifeof1 \let\firsttoken\relax \else \read 1 to \nextline \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% \act \fi \thisline % \ifeof1\else \let\thisline\nextline \repeat %% \enddoublecolumns \fi \fi \closein 1 \endgroup} \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} \def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. {\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13 \catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 \catcode`\$=3 \gdef\initialglyphs{% % Some changes for non-alphabetic characters. Using the glyphs from the % math fonts looks more consistent than the typewriter font used elsewhere % for these characters. \def\indexbackslash{\math{\backslash}}% \let\\=\indexbackslash % % Can't get bold backslash so don't use bold forward slash \catcode`\/=13 \def/{{\secrmnotbold \normalslash}}% \def-{{\normaldash\normaldash}}% en dash `--' \def^{{\chapbf \normalcaret}}% \def~{{\chapbf \normaltilde}}% \def\_{% \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% \def|{$\vert$}% \def<{$\less$}% \def>{$\gtr$}% \def+{$\normalplus$}% }} \def\initial{% \bgroup \initialglyphs \initialx } \def\initialx#1{% % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. % The glue before the bonus allows a little bit of space at the % bottom of a column to reduce an increase in inter-line spacing. \nobreak \vskip 0pt plus 5\baselineskip \penalty -300 \vskip 0pt plus -5\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus 1\baselineskip \leftline{\secfonts \kern-0.05em \secbf #1}% % \secfonts is inside the argument of \leftline so that the change of % \baselineskip will not affect any glue inserted before the vbox that % \leftline creates. % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip \egroup % \initialglyphs } \newdimen\entryrightmargin \entryrightmargin=0pt % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % No extra space above this paragraph. \parskip = 0in % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% An undocumented command % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus0.5pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% % Save the text of the entry \global\setbox\boxA=\hbox\bgroup \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. % Not absorbing as a macro argument reduces the chance of problems % with catcodes occurring. } {\catcode`\@=11 \gdef\finishentry#1{% \egroup % end box A \dimen@ = \wd\boxA % Length of text of entry \global\setbox\boxA=\hbox\bgroup\unhbox\boxA % #1 is the page number. % % Get the width of the page numbers, and only use % leaders if they are present. \global\setbox\boxB = \hbox{#1}% \ifdim\wd\boxB = 0pt \null\nobreak\hfill\ % \else % \null\nobreak\indexdotfill % Have leaders before the page number. % \ifpdf \pdfgettoks#1.% \bgroup\let\domark\relax \hskip\skip\thinshrinkable\the\toksA \egroup % The redefinion of \domark stops marks being added in \pdflink to % preserve coloured links across page boundaries. Otherwise the marks % would get in the way of \lastbox in \insertindexentrybox. \else \hskip\skip\thinshrinkable #1% \fi \fi \egroup % end \boxA \ifdim\wd\boxB = 0pt \global\setbox\entryindexbox=\vbox{\unhbox\boxA}% \else \global\setbox\entryindexbox=\vbox\bgroup \prevdepth=\entrylinedepth \noindent % We want the text of the entries to be aligned to the left, and the % page numbers to be aligned to the right. % \advance\leftskip by 0pt plus 1fil \advance\leftskip by 0pt plus -1fill \rightskip = 0pt plus -1fil \advance\rightskip by 0pt plus 1fill % Cause last line, which could consist of page numbers on their own % if the list of page numbers is long, to be aligned to the right. \parfillskip=0pt plus -1fill % \hangindent=1em % \advance\rightskip by \entryrightmargin % Determine how far we can stretch into the margin. % This allows, e.g., "Appendix H GNU Free Documentation License" to % fit on one line in @letterpaper format. \ifdim\entryrightmargin>2.1em \dimen@i=2.1em \else \dimen@i=0em \fi \advance \parfillskip by 0pt minus 1\dimen@i % \dimen@ii = \hsize \advance\dimen@ii by -1\leftskip \advance\dimen@ii by -1\entryrightmargin \advance\dimen@ii by 1\dimen@i \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line \ifdim\dimen@ > 0.8\dimen@ii % due to long index text \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly \dimen@ii = \hsize \advance \dimen@ii by -1em \ifnum\dimen@>\dimen@ii % If the entry is too long, use the whole line \dimen@ = \dimen@ii \fi \advance\leftskip by 0pt plus 1fill % ragged right \advance \dimen@ by 1\rightskip \parshape = 2 0pt \dimen@ 1em \dimen@ii % Ideally we'd add a finite glue at the end of the first line only, but % TeX doesn't seem to provide a way to do such a thing. \fi\fi \unhbox\boxA % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % Word spacing - no stretch \spaceskip=\fontdimen2\font minus \fontdimen4\font % \linepenalty=1000 % Discourage line breaks. \hyphenpenalty=5000 % Discourage hyphenation. % \par % format the paragraph \egroup % The \vbox \fi \endgroup % delay text of entry until after penalty \bgroup\aftergroup\insertindexentrybox \entryorphanpenalty }} \newskip\thinshrinkable \skip\thinshrinkable=.15em minus .15em \newbox\entryindexbox \def\insertindexentrybox{% \copy\entryindexbox % The following gets the depth of the last box. This is for even % line spacing when entries span several lines. \setbox\dummybox\vbox{% \unvbox\entryindexbox \nointerlineskip \lastbox \global\entrylinedepth=\prevdepth }% % Note that we couldn't simply \unvbox\entryindexbox followed by % \nointerlineskip\lastbox to remove the last box and then reinstate it, % because this resets how far the box has been \moveleft'ed to 0. \unvbox % doesn't affect \prevdepth either. } \newdimen\entrylinedepth % Default is no penalty \let\entryorphanpenalty\egroup % Used from \printindex. \firsttoken should be the first token % after the \entry. If it's not another \entry, we are at the last % line of a group of index entries, so insert a penalty to discourage % orphaned index entries. \long\def\indexorphanpenalty{% \def\isentry{\entry}% \ifx\firsttoken\isentry \else \unskip\penalty 9000 % The \unskip here stops breaking before the glue. It relies on the % \vskip above being there, otherwise there is an error % "You can't use `\unskip' in vertical mode". There has to be glue % in the current vertical list that hasn't been added to the % "current page". See Chapter 24 of the TeXbook. This contradicts % Section 8.3.7 in "TeX by Topic," though. \fi \egroup % now comes the box added with \aftergroup } % Like plain.tex's \dotfill, except uses up at least 1 em. % The filll stretch here overpowers both the fil and fill stretch to push % the page number to the right. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 % private names \newbox\partialpage \newdimen\doublecolumnhsize \newdimen\doublecolumntopgap \doublecolumntopgap = 0pt \newtoks\savedtopmark % Used in \begindoublecolumns \newtoks\savedfirstmark \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% % Save \topmark and \firstmark \global\savedtopmark=\expandafter{\topmark}% \global\savedfirstmark=\expandafter{\firstmark}% }% \eject % run that output routine to set \partialpage % % We recover the two marks that the last output routine saved in order % to propagate the information in marks added around a chapter heading, % which could be otherwise be lost by the time the final page is output. % \mark{\the\savedtopmark}% Only mark in page passed to following \output. \output = {% \setbox0=\box\PAGE % clear box 255 }abc\eject % \mark{\the\savedfirstmark}% % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \global\doublecolumntopgap = \topskip \global\advance\doublecolumntopgap by -1\baselineskip \global\advance\vsize by -1\doublecolumntopgap \vsize = 2\vsize \topskip=0pt \global\entrylinedepth=0pt\relax } % The double-column output routine for all double-column pages except % the last, which is done by \balancecolumns. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \vbox{% \vskip\doublecolumntopgap \hbox to\pagewidth{\box0\hfil\box2}}% } % Finished with with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Only called for the last of the double column material. \doublecolumnout % does the others. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \ifdim\dimen@<14\baselineskip % Don't split a short final column in two. \setbox2=\vbox{}% \else \divide\dimen@ by 2 % target to split to \dimen@ii = \dimen@ \splittopskip = \topskip % Loop until the second column is no higher than the first {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ % Remove glue from bottom of first column to % make sure it is higher than the second. \global\setbox1 = \vbox{\unvbox1\unpenalty\unskip}% \ifdim\ht3>\ht1 \global\advance\dimen@ by 1pt \repeat }% \multiply\dimen@ii by 4 \divide\dimen@ii by 5 \ifdim\ht3<\dimen@ii % Column heights are too different, so don't make their bottoms % flush with each other. The glue at the end of the second column % allows a second column to stretch, reducing the difference in % height between the two. \setbox0=\vbox to\dimen@{\unvbox1\vfill}% \setbox2=\vbox to\dimen@{\unvbox3\vskip 0pt plus 0.3\ht0}% \else \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% \fi \fi % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page % This outputs a mark at the end of the page that clears \thischapter % and \thissection, as is done in \startcontents. \let\pchapsepmacro\relax \chapmacro{}{Yomitfromtoc}{}% \chapoddpage \endgroup } % \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. % \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip \nobreak \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. % Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip % Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} % Start a new page \def\chappager{\par\vfill\supereject} % \chapoddpage - start on an odd page for a new chapter % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % \chapmacro - Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % Not used for @heading series. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yappendixkeyword{Yappendix} \def\Yomitfromtockeyword{Yomitfromtoc} % \def\chapmacro#1#2#3{% \checkenv{}% chapters, etc., should not start inside an environment. % % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold \let\footnote=\errfootnoteheading % give better error message % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text of the title, % #2 is the section level (sec/subsec/subsubsec), % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), % #4 is the section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \def\sectionlevel{#2}% \def\temptype{#3}% % % It is ok for the @heading series commands to appear inside an % environment (it's been historically allowed, though the logic is % dubious), but not the others. \ifx\temptype\Yomitfromtockeyword\else \checkenv{}% non-@*heading should not be in an environment. \fi \let\footnote=\errfootnoteheading % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \global\let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) However, when a paragraph is not started next % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out % or the negative glue will cause weirdly wrong output, typically % obscuring the section heading with something else. \vskip-\parskip % % This is so the last item on the main vertical list is a known % \penalty > 10000, so \startdefun, etc., can recognize the situation % and do the needful. \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \entryrightmargin=\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup % Move the page numbers slightly to the right \advance\entryrightmargin by -0.05em \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode `\`=\other \catcode `\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % % Inverse of the list at the beginning of the file. \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\sp=\ptexsp \let\*=\ptexstar %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % we've made it outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip \ifnum\lastpenalty<10000 % Penalize breaking before the environment, because preceding text % often leads into it. \penalty100 \fi \vskip\envskipamount \fi \fi }} \def\afterenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can % collide with the section heading. \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi % \setbox\groupbox=\vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \addgroupbox \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#1#2{% \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. Don't stretch around special % characters in urls in this environment, since the stretch at the right % should be enough. \envdef\raggedright{% \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax \def\urefprestretchamount{0pt}% \def\urefpoststretchamount{0pt}% } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax \advance\rightskip by \lispnarrowing \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % @indentedblock is like @quotation, but indents only on the left and % has no optional argument. % \makedispenvdef{indentedblock}{\indentedblockstart} % \def\indentedblockstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi } % Keep a nonzero parskip for the environment, since we're doing normal filling. % \def\Eindentedblock{% \par {\parskip=0pt \afterenvbreak}% } \def\Esmallindentedblock{\Eindentedblock} % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count. % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } \newif\ifdoingtypefn % doing typed function? \newif\ifrettypeownline % typeset return type on its own line? % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. % \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxideftypefnnl\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETtxideftypefnnl\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @txideftypefnnl value `\temp', must be on|off}% \fi\fi } % Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } % Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } % Types: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % Determine if we are typesetting the return type of a typed function % on a line by itself. \rettypeownlinefalse \ifdoingtypefn % doing a typed function specifically? % then check user option for putting return type on its own line: \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else \rettypeownlinetrue \fi \fi % % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. We'll always have at % least two. \tempnum = 2 % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % % If doing a return type on its own line, we'll have another line. \ifrettypeownline \advance\tempnum by 1 \def\maybeshapeline{0in \hsize}% \else \def\maybeshapeline{}% \fi % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % % The final paragraph shape: \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 % % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% text of the return type \ifx\temp\empty\else \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. We used to recommend @var for that, so % leave the code in, but it's strange for @var to lead to typewriter. % Nowadays we recommend @code, since the difference between a ttsl hyphen % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \let\aftermacroxxx\relax \def\aftermacro{\aftermacroxxx} % alias because \c means cedilla in @tex or @math \let\texinfoc=\c % Used at the time of macro expansion. % Argument is macro body with arguments substituted \def\scanmacro#1{% \newlinechar`\^^M \def\xprocessmacroarg{\eatspaces}% % % Process the macro body under the current catcode regime. \scantokens{#1\texinfoc}\aftermacro% % % The \c is to remove the \newlinechar added by \scantokens, and % can be noticed by \parsearg. % The \aftermacro allows a \comment at the end of the macro definition % to duplicate itself past the final \newlinechar added by \scantokens: % this is used in the definition of \group to comment out a newline. We % don't do the same for \c to support Texinfo files with macros that ended % with a @c, which should no longer be necessary. % We avoid surrounding the call to \scantokens with \bgroup and \egroup % to allow macros to open or close groups themselves. } % Used for copying and captions \def\scanexp#1{% \bgroup % Undo catcode changes of \startcontents and \printindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. % FIXME: This may not be needed. %\catcode`\@=0 \catcode`\\=\active \escapechar=`\@ \edef\temp{\noexpand\scanmacro{#1}}% \temp \egroup } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\@=\other \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\ =\other \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } % Used when scanning braced macro arguments. Note, however, that catcode % changes here are ineffectual if the macro invocation was nested inside % an argument to another Texinfo command. \def\macroargctxt{% \scanctxt \catcode`\ =\active \catcode`\^^M=\other \catcode`\\=\active } \def\macrolineargctxt{% used for whole-line arguments without braces \scanctxt \catcode`\{=\other \catcode`\}=\other } % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. % {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\margbackslash#1{\char`\#1 } \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0\relax \else \expandafter\parsemargdef \argl;% \if\paramno>256\relax \ifx\eTeXversion\thisisundefined \errhelp = \EMsimple \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} \fi \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % \getargs -- Parse the arguments to a @macro line. Set \macname to % the name of the macro, and \argl to the braced argument list. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % This made use of the feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. % Parse the optional {params} list to @macro or @rmacro. % Set \paramno to the number of arguments, % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a % three-param macro.) Define \macarg.BLAH for each BLAH in the params % list to some hook where the argument is to be expanded. If there are % less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % % If there are 10 or more arguments, a different technique is used: see % \parsemmanyargdef. % \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax % \hash is redefined to `#' later to get it into definitions \let\processmacroarg\relax \parsemargdefxxx#1,;,% \ifnum\paramno<10\relax\else \paramno0\relax \parsemmanyargdef@@#1,;,% 10 or more arguments \fi } \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\processmacroarg{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % \parsemacbody, \parsermacbody % % Read recursive and nonrecursive macro bodies. (They're different since % rec and nonrec macros end differently.) % % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro % body to be transformed. % Set \macrobody to the body of the macro, and call \defmacro. % {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% % Make @ a letter, so that we can make private-to-Texinfo macro names. \edef\texiatcatcode{\the\catcode`\@} \catcode `@=11\relax %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% % If there are 10 or more arguments, a different technique is used, where the % hook remains in the body, and when macro is to be expanded the body is % processed again to replace the arguments. % % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the % argument N value and then \edef the body (nothing else will expand because of % the catcode regime under which the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more % arguments, no macro can have more than 256 arguments (else error). % % In case that there are 10 or more arguments we parse again the arguments % list to set new definitions for the \macarg.BLAH macros corresponding to % each BLAH argument. It was anyhow needed to parse already once this list % in order to count the arguments, and as macros with at most 9 arguments % are by far more frequent than macro with 10 or more arguments, defining % twice the \macarg.BLAH macros does not cost too much processing power. \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa \expandafter{\csname macarg.\tempb\endcsname}% % Note that we need some extra \noexpand\noexpand, this is because we % don't want \the to be expanded in the \parsermacbody as it uses an % \xdef . \expandafter\edef\tempa {\noexpand\noexpand\noexpand\the\toks\the\paramno}% \advance\paramno by 1\relax \fi\next} \let\endargs@\relax \let\nil@\relax \def\nilm@{\nil@}% \long\def\nillm@{\nil@}% % This macro is expanded during the Texinfo macro expansion, not during its % definition. It gets all the arguments' values and assigns them to macros % macarg.ARGNAME % % #1 is the macro name % #2 is the list of argument names % #3 is the list of argument values \def\getargvals@#1#2#3{% \def\macargdeflist@{}% \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. \def\paramlist{#2,\nil@}% \def\macroname{#1}% \begingroup \macroargctxt \def\argvaluelist{#3,\nil@}% \def\@tempa{#3}% \ifx\@tempa\empty \setemptyargvalues@ \else \getargvals@@ \fi } \def\getargvals@@{% \ifx\paramlist\nilm@ % Some sanity check needed here that \argvaluelist is also empty. \ifx\argvaluelist\nillm@ \else \errhelp = \EMsimple \errmessage{Too many arguments in macro `\macroname'!}% \fi \let\next\macargexpandinbody@ \else \ifx\argvaluelist\nillm@ % No more arguments values passed to macro. Set remaining named-arg % macros to empty. \let\next\setemptyargvalues@ \else % pop current arg name into \@tempb \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% \expandafter\@tempa\expandafter{\paramlist}% % pop current argument value into \@tempc \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% \expandafter\@tempa\expandafter{\argvaluelist}% % Here \@tempb is the current arg name and \@tempc is the current arg value. % First place the new argument macro definition into \@tempd \expandafter\macname\expandafter{\@tempc}% \expandafter\let\csname macarg.\@tempb\endcsname\relax \expandafter\def\expandafter\@tempe\expandafter{% \csname macarg.\@tempb\endcsname}% \edef\@tempd{\long\def\@tempe{\the\macname}}% \push@\@tempd\macargdeflist@ \let\next\getargvals@@ \fi \fi \next } \def\push@#1#2{% \expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter#1#2}% } % Replace arguments by their values in the macro body, and place the result % in macro \@tempa. % \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument % values into respective token registers. % % First we save the token context, and initialize argument numbering. \begingroup \paramno0\relax % Then, for each argument number #N, we place the corresponding argument % value into a new token list register \toks#N \expandafter\putargsintokens@\saveparamlist@,;,% % Then, we expand the body so that argument are replaced by their % values. The trick for values not to be expanded themselves is that they % are within tokens and that tokens expand only once in an \edef . \edef\@tempc{\csname mac.\macroname .body\endcsname}% % Now we restore the token stack pointer to free the token list registers % which we have used, but we make sure that expanded body is saved after % group. \expandafter \endgroup \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } % Define the named-macro outside of this group and then close this group. % \def\macargexpandinbody@{% \expandafter \endgroup \macargdeflist@ % First the replace in body the macro arguments by their values, the result % is in \@tempa . \macvalstoargs@ % Then we point at the \norecurse or \gobble (for recursive) macro value % with \@tempb . \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname % Depending on whether it is recursive or not, we need some tailing % \egroup . \ifx\@tempb\gobble \let\@tempc\relax \else \let\@tempc\egroup \fi % And now we do the real job: \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% \@tempd } \def\putargsintokens@#1,{% \if#1;\let\next\relax \else \let\next\putargsintokens@ % First we allocate the new token list register, and give it a temporary % alias \@tempb . \toksdef\@tempb\the\paramno % Then we place the argument value into that token list register. \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname \expandafter\@tempb\expandafter{\@tempa}% \advance\paramno by 1\relax \fi \next } % Trailing missing arguments are set to empty. % \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ \else \expandafter\setemptyargvaluesparser@\paramlist\endargs@ \let\next\setemptyargvalues@ \fi \next } \def\setemptyargvaluesparser@#1,#2\endargs@{% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter\def\csname macarg.#1\endcsname{}}% \push@\@tempa\macargdeflist@ \def\paramlist{#2}% } % #1 is the element target macro % #2 is the list macro % #3,#4\endargs@ is the list value \def\pop@#1#2#3,#4\endargs@{% \def#1{#3}% \def#2{#4}% } \long\def\longpop@#1#2#3,#4\endargs@{% \long\def#1{#3}% \long\def#2{#4}% } %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% % Remove following spaces at the expansion stage. % This works because spaces are discarded before each argument when TeX is % getting the arguments for a macro. % This must not be immediately followed by a }. \long\def\gobblespaces#1{#1} % This defines a Texinfo @macro or @rmacro, called by \parsemacbody. % \macrobody has the body of the macro in it, with placeholders for % its parameters, looking like "\processmacroarg{\hash 1}". % \paramno is the number of parameters % \paramlist is a TeX parameter text, e.g. "#1,#2,#3," % There are eight cases: recursive and nonrecursive macros of zero, one, % up to nine, and many arguments. % \xdef is used so that macro definitions will survive the file % they're defined in: @include reads the file inside a group. % \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifnum\paramno=1 \def\processmacroarg{\gobblespaces}% % This removes the pair of braces around the argument. We don't % use \eatspaces, because this can cause ends of lines to be lost % when the argument to \eatspaces is read, leading to line-based % commands like "@itemize" not being read correctly. \else \def\processmacroarg{\xprocessmacroarg}% \let\xprocessmacroarg\relax \fi \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\macrobody}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup \noexpand\braceorline \expandafter\noexpand\csname\the\macname @@@\endcsname}% \expandafter\xdef\csname\the\macname @@@\endcsname##1{% \expandafter\noexpand\csname\the\macname @@@@\endcsname{% \noexpand\gobblespaces##1\empty}% % The \empty is for \gobblespaces in case #1 is empty }% \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% \egroup\noexpand\scanmacro{\macrobody}}% \else \ifnum\paramno<10\relax % at most 9 % See non-recursive section below for comments \expandafter\xdef\csname\the\macname\endcsname{% \bgroup \noexpand\expandafter \noexpand\macroargctxt \noexpand\expandafter \expandafter\noexpand\csname\the\macname @@\endcsname}% \expandafter\xdef\csname\the\macname @@\endcsname##1{% \noexpand\passargtomacro \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% \expandafter\xdef\csname\the\macname @@@\endcsname##1{% \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname @@@@\endcsname\paramlist{% \egroup\noexpand\scanmacro{\macrobody}}% \else % 10 or more \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble \fi \fi \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%% \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\macrobody}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup \noexpand\braceorline \expandafter\noexpand\csname\the\macname @@@\endcsname}% \expandafter\xdef\csname\the\macname @@@\endcsname##1{% \expandafter\noexpand\csname\the\macname @@@@\endcsname{% \noexpand\gobblespaces##1\empty}% % The \empty is for \gobblespaces in case #1 is empty }% \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% \egroup \noexpand\scanmacro{\macrobody}% }% \else % at most 9 \ifnum\paramno<10\relax % @MACNAME sets the context for reading the macro argument % @MACNAME@@ gets the argument, processes backslashes and appends a % comma. % @MACNAME@@@ removes braces surrounding the argument list. % @MACNAME@@@@ scans the macro body with arguments substituted. \expandafter\xdef\csname\the\macname\endcsname{% \bgroup \noexpand\expandafter % This \expandafter skip any spaces after the \noexpand\macroargctxt % macro before we change the catcode of space. \noexpand\expandafter \expandafter\noexpand\csname\the\macname @@\endcsname}% \expandafter\xdef\csname\the\macname @@\endcsname##1{% \noexpand\passargtomacro \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% \expandafter\xdef\csname\the\macname @@@\endcsname##1{% \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname @@@@\endcsname\paramlist{% \egroup\noexpand\scanmacro{\macrobody}}% \else % 10 or more: \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse \fi \fi \fi} \catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % {\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape @catcode`@_=11 % private names @catcode`@!=11 % used as argument separator % \passargtomacro#1#2 - % Call #1 with a list of tokens #2, with any doubled backslashes in #2 % compressed to one. % % This implementation works by expansion, and not execution (so we cannot use % \def or similar). This reduces the risk of this failing in contexts where % complete expansion is done with no execution (for example, in writing out to % an auxiliary file for an index entry). % % State is kept in the input stream: the argument passed to % @look_ahead, @gobble_and_check_finish and @add_segment is % % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) % % where: % THE_MACRO - name of the macro we want to call % ARG_RESULT - argument list we build to pass to that macro % PENDING_BS - either a backslash or nothing % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next @gdef@passargtomacro#1#2{% @add_segment #1!{}@relax#2\@_finish\% } @gdef@_finish{@_finishx} @global@let@_finishx@relax % #1 - THE_MACRO ARG_RESULT % #2 - PENDING_BS % #3 - NEXT_TOKEN % #4 used to look ahead % % If the next token is not a backslash, process the rest of the argument; % otherwise, remove the next token. @gdef@look_ahead#1!#2#3#4{% @ifx#4\% @expandafter@gobble_and_check_finish @else @expandafter@add_segment @fi#1!{#2}#4#4% } % #1 - THE_MACRO ARG_RESULT % #2 - PENDING_BS % #3 - NEXT_TOKEN % #4 should be a backslash, which is gobbled. % #5 looks ahead % % Double backslash found. Add a single backslash, and look ahead. @gdef@gobble_and_check_finish#1!#2#3#4#5{% @add_segment#1\!{}#5#5% } @gdef@is_fi{@fi} % #1 - THE_MACRO ARG_RESULT % #2 - PENDING_BS % #3 - NEXT_TOKEN % #4 is input stream until next backslash % % Input stream is either at the start of the argument, or just after a % backslash sequence, either a lone backslash, or a doubled backslash. % NEXT_TOKEN contains the first token in the input stream: if it is \finish, % finish; otherwise, append to ARG_RESULT the segment of the argument up until % the next backslash. PENDING_BACKSLASH contains a backslash to represent % a backslash just before the start of the input stream that has not been % added to ARG_RESULT. @gdef@add_segment#1!#2#3#4\{% @ifx#3@_finish @call_the_macro#1!% @else % append the pending backslash to the result, followed by the next segment @expandafter@is_fi@look_ahead#1#2#4!{\}@fi % this @fi is discarded by @look_ahead. % we can't get rid of it with \expandafter because we don't know how % long #4 is. } % #1 - THE_MACRO % #2 - ARG_RESULT % #3 discards the res of the conditional in @add_segment, and @is_fi ends the % conditional. @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \braceorline MAC is used for a one-argument macro MAC. It checks % whether the next non-whitespace character is a {. It sets the context % for reading the argument (slightly different in the two cases). Then, % to read the argument, in the whole-line case, it then calls the regular % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup \macroargctxt \expandafter\passargtomacro \else \macrolineargctxt\expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Make them active and then expand them all to nothing. % \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{% \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \requireauxfile \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\fi } % % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref{\putwordsee{} \xrefXX} \def\xref{\putwordSee{} \xrefXX} \def\ref{\xrefXX} \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX} \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]} % \newbox\toprefbox \newbox\printedrefnamebox \newbox\infofilenamebox \newbox\printedmanualbox % \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces % % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% % \def\infofilename{\ignorespaces #4}% \setbox\infofilenamebox = \hbox{\infofilename\unskip}% % \def\printedmanual{\ignorespaces #5}% \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% % % If the printed reference name (arg #3) was not explicitly given in % the @xref, figure out what we want to use. \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Auto section-title: use chapter/section title inside % the square brackets if we have it. \ifdim \wd\printedmanualbox > 0pt % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. This ignores all spaces in % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % % This (wrongly) does not take account of leading or trailing % spaces in #1, which should be ignored. \edef\pdfxrefdest{#1}% \ifx\pdfxrefdest\empty \def\pdfxrefdest{Top}% no empty targets \else \txiescapepdf\pdfxrefdest % escape PDF special chars \fi % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. % \ifdim \wd\printedmanualbox > 0pt % Cross-manual reference with a printed manual name. % \crossmanualxref{\cite{\printedmanual\unskip}}% % \else\ifdim \wd\infofilenamebox > 0pt % Cross-manual reference with only an info filename (arg 4), no % printed manual name (arg 5). This is essentially the same as % the case above; we output the filename, since we have nothing else. % \crossmanualxref{\code{\infofilename\unskip}}% % \else % Reference within this manual. % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \ifx,\tokenafterxref \else\ifx.\tokenafterxref \else\ifx;\tokenafterxref \else\ifx)\tokenafterxref \else,% add a , if xref not followed by punctuation \fi\fi\fi\fi \fi\fi \fi \endlink \endgroup} % Output a cross-manual xref to #1. Used just above (twice). % % Only include the text "Section ``foo'' in" if the foo is neither % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply % "see The Foo Manual", the idea being to refer to the whole manual. % % But, this being TeX, we can't easily compare our node name against the % string "Top" while ignoring the possible spaces before and after in % the input. By adding the arbitrary 7sp below, we make it much less % likely that a real node name would have the same width as "Top" (e.g., % in a monospaced font). Hopefully it will never happen in practice. % % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. % \def\crossmanualxref#1{% \setbox\toprefbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% \ifdim \wd2 > 7sp % nonempty? \ifdim \wd2 = \wd\toprefbox \else % same as Top? \putwordSection{} ``\printedrefname'' \putwordin{}\space \fi \fi #1% } % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% \requireauxfile {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate at the beginning of the file. % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % Used when writing to the aux file, or when using data from it. \def\requireauxfile{% \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi \global\let\requireauxfile=\relax % Only do this once. } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {\setnonasciicharscatcodenonglobal\other}% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % % Nested footnotes are not supported in TeX, that would take a lot % more work. (\startsavinginserts does not suffice.) \let\footnote=\errfootnotenest % % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut % % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 \def\errfootnotenest{% \errhelp=\EMsimple \errmessage{Nested footnotes not supported in texinfo.tex, even though they work in makeinfo; sorry} } \def\errfootnoteheading{% \errhelp=\EMsimple \errmessage{Footnotes in chapters, sections, etc., are not supported} } % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro % If the image is by itself, center it. \ifvmode \imagevmodetrue \else \ifx\centersub\centerV % for @center @image, we need a vbox so we can have our vertical space \imagevmodetrue \vbox\bgroup % vbox has better behavior than vtop herev \fi\fi % \ifimagevmode \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. % However, if we're at the top level, we don't want the % normal paragraph indentation. % On the other hand, if we are in the case of @center @image, we don't % want to start a paragraph, which will create a hsize-width box and % eradicate the centering. \ifx\centersub\centerV\else \noindent \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip % space after a standalone image \fi \ifx\centersub\centerV \egroup \fi \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \requireauxfile \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{% \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \let_ = \normalunderscore % normal _ character for filename test \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore #1_\finish \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX } % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} \def\documentencodingzzz#1{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active % since we already invoked \utfeightchardefs at the top level % (below), do not re-invoke it, then our check for duplicated % definitions triggers. Making non-ascii chars active is enough. % \else \message{Ignoring unknown document encoding: #1.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % emacs-page % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing, sorry: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{{\tcfont \char162}} % cent \gdef^^a3{\pounds} \gdef^^a4{{\tcfont \char164}} % currency \gdef^^a5{{\tcfont \char165}} % yen \gdef^^a6{{\tcfont \char166}} % broken bar \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{\ensuremath\lnot} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} \gdef^^b7{\ensuremath\cdot} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \def\globallet{\global\let} % save some \expandafter's below % @U{xxxx} to produce U+xxxx, if we support it. \def\U#1{% \expandafter\ifx\csname uni:#1\endcsname \relax \errhelp = \EMsimple \errmessage{Unicode character U+#1 not supported, sorry}% \else \csname uni:#1\endcsname \fi } \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% % \expandafter\ifx\csname uni:#1\endcsname \relax \else \message{Internal error, already defined: #1}% \fi % % define an additional control sequence for this code point. \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B % % Many of our renditions are less than wonderful, and all the missing % characters are available somewhere. Loading the necessary fonts % awaits user request. We can't truly support Unicode without % reimplementing everything that's been done in LaTeX for many years, % plus probably using luatex or xetex, and who knows what else. % We won't be doing that here in this simple file. But we can try to at % least make most of the characters not bomb out. % \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar \DeclareUnicodeCharacter{00A7}{\S} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B1}{\ensuremath\pm} \DeclareUnicodeCharacter{00B2}{$^2$} \DeclareUnicodeCharacter{00B3}{$^3$} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B5}{$\mu$} \DeclareUnicodeCharacter{00B6}{\P} \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00B9}{$^1$} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BC}{$1\over4$} \DeclareUnicodeCharacter{00BD}{$1\over2$} \DeclareUnicodeCharacter{00BE}{$3\over4$} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D7}{\ensuremath\times} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F7}{\ensuremath\div} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{010F}{d'} \DeclareUnicodeCharacter{0110}{\DH} \DeclareUnicodeCharacter{0111}{\dh} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0122}{\cedilla{G}} \DeclareUnicodeCharacter{0123}{\cedilla{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{012E}{\ogonek{I}} \DeclareUnicodeCharacter{012F}{\ogonek{i}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0136}{\cedilla{K}} \DeclareUnicodeCharacter{0137}{\cedilla{k}} \DeclareUnicodeCharacter{0138}{\ensuremath\kappa} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{013B}{\cedilla{L}} \DeclareUnicodeCharacter{013C}{\cedilla{l}} \DeclareUnicodeCharacter{013D}{L'}% should kern \DeclareUnicodeCharacter{013E}{l'}% should kern \DeclareUnicodeCharacter{013F}{L\U{00B7}} \DeclareUnicodeCharacter{0140}{l\U{00B7}} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0145}{\cedilla{N}} \DeclareUnicodeCharacter{0146}{\cedilla{n}} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{0149}{'n} \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0156}{\cedilla{R}} \DeclareUnicodeCharacter{0157}{\cedilla{r}} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{T}} \DeclareUnicodeCharacter{0163}{\cedilla{t}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0165}{\v{t}} \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0172}{\ogonek{U}} \DeclareUnicodeCharacter{0173}{\ogonek{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} % Greek letters upper case \DeclareUnicodeCharacter{0391}{{\it A}} \DeclareUnicodeCharacter{0392}{{\it B}} \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}} \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}} \DeclareUnicodeCharacter{0395}{{\it E}} \DeclareUnicodeCharacter{0396}{{\it Z}} \DeclareUnicodeCharacter{0397}{{\it H}} \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}} \DeclareUnicodeCharacter{0399}{{\it I}} \DeclareUnicodeCharacter{039A}{{\it K}} \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}} \DeclareUnicodeCharacter{039C}{{\it M}} \DeclareUnicodeCharacter{039D}{{\it N}} \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}} \DeclareUnicodeCharacter{039F}{{\it O}} \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}} \DeclareUnicodeCharacter{03A1}{{\it P}} %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}} \DeclareUnicodeCharacter{03A4}{{\it T}} \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}} \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}} \DeclareUnicodeCharacter{03A7}{{\it X}} \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}} \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}} % Vowels with accents \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}} \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}} \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}} \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}} \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}} \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}} % Standalone accent \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}} % Greek letters lower case \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha} \DeclareUnicodeCharacter{03B2}{\ensuremath\beta} \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma} \DeclareUnicodeCharacter{03B4}{\ensuremath\delta} \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon} \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta} \DeclareUnicodeCharacter{03B7}{\ensuremath\eta} \DeclareUnicodeCharacter{03B8}{\ensuremath\theta} \DeclareUnicodeCharacter{03B9}{\ensuremath\iota} \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa} \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda} \DeclareUnicodeCharacter{03BC}{\ensuremath\mu} \DeclareUnicodeCharacter{03BD}{\ensuremath\nu} \DeclareUnicodeCharacter{03BE}{\ensuremath\xi} \DeclareUnicodeCharacter{03BF}{{\it o}} % omicron \DeclareUnicodeCharacter{03C0}{\ensuremath\pi} \DeclareUnicodeCharacter{03C1}{\ensuremath\rho} \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma} \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma} \DeclareUnicodeCharacter{03C4}{\ensuremath\tau} \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon} \DeclareUnicodeCharacter{03C6}{\ensuremath\phi} \DeclareUnicodeCharacter{03C7}{\ensuremath\chi} \DeclareUnicodeCharacter{03C8}{\ensuremath\psi} \DeclareUnicodeCharacter{03C9}{\ensuremath\omega} % More Greek vowels with accents \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}} \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}} \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}} \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}} \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}} % Variant Greek letters \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta} \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi} \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} % Punctuation \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2020}{\ensuremath\dagger} \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{202F}{\thinspace} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} % Mathematical symbols \DeclareUnicodeCharacter{2200}{\ensuremath\forall} \DeclareUnicodeCharacter{2203}{\ensuremath\exists} \DeclareUnicodeCharacter{2208}{\ensuremath\in} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\ast} \DeclareUnicodeCharacter{221E}{\ensuremath\infty} \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} \DeclareUnicodeCharacter{2227}{\ensuremath\wedge} \DeclareUnicodeCharacter{2229}{\ensuremath\cap} \DeclareUnicodeCharacter{2261}{\equiv} \DeclareUnicodeCharacter{2264}{\ensuremath\leq} \DeclareUnicodeCharacter{2265}{\ensuremath\geq} \DeclareUnicodeCharacter{2282}{\ensuremath\subset} \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq} \DeclareUnicodeCharacter{2016}{\ensuremath\Vert} \DeclareUnicodeCharacter{2032}{\ensuremath\prime} \DeclareUnicodeCharacter{210F}{\ensuremath\hbar} \DeclareUnicodeCharacter{2111}{\ensuremath\Im} \DeclareUnicodeCharacter{2113}{\ensuremath\ell} \DeclareUnicodeCharacter{2118}{\ensuremath\wp} \DeclareUnicodeCharacter{211C}{\ensuremath\Re} \DeclareUnicodeCharacter{2127}{\ensuremath\mho} \DeclareUnicodeCharacter{2135}{\ensuremath\aleph} \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow} \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow} \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow} \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow} \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow} \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow} \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow} \DeclareUnicodeCharacter{2198}{\ensuremath\searrow} \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow} \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto} \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow} \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow} \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup} \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown} \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright} \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup} \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown} \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons} \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow} \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow} \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow} \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow} \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow} \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto} \DeclareUnicodeCharacter{2201}{\ensuremath\complement} \DeclareUnicodeCharacter{2202}{\ensuremath\partial} \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset} \DeclareUnicodeCharacter{2207}{\ensuremath\nabla} \DeclareUnicodeCharacter{2209}{\ensuremath\notin} \DeclareUnicodeCharacter{220B}{\ensuremath\owns} \DeclareUnicodeCharacter{220F}{\ensuremath\prod} \DeclareUnicodeCharacter{2210}{\ensuremath\coprod} \DeclareUnicodeCharacter{2211}{\ensuremath\sum} \DeclareUnicodeCharacter{2213}{\ensuremath\mp} \DeclareUnicodeCharacter{2218}{\ensuremath\circ} \DeclareUnicodeCharacter{221A}{\ensuremath\surd} \DeclareUnicodeCharacter{221D}{\ensuremath\propto} \DeclareUnicodeCharacter{2220}{\ensuremath\angle} \DeclareUnicodeCharacter{2223}{\ensuremath\mid} \DeclareUnicodeCharacter{2228}{\ensuremath\vee} \DeclareUnicodeCharacter{222A}{\ensuremath\cup} \DeclareUnicodeCharacter{222B}{\ensuremath\smallint} \DeclareUnicodeCharacter{222E}{\ensuremath\oint} \DeclareUnicodeCharacter{223C}{\ensuremath\sim} \DeclareUnicodeCharacter{2240}{\ensuremath\wr} \DeclareUnicodeCharacter{2243}{\ensuremath\simeq} \DeclareUnicodeCharacter{2245}{\ensuremath\cong} \DeclareUnicodeCharacter{2248}{\ensuremath\approx} \DeclareUnicodeCharacter{224D}{\ensuremath\asymp} \DeclareUnicodeCharacter{2250}{\ensuremath\doteq} \DeclareUnicodeCharacter{2260}{\ensuremath\neq} \DeclareUnicodeCharacter{226A}{\ensuremath\ll} \DeclareUnicodeCharacter{226B}{\ensuremath\gg} \DeclareUnicodeCharacter{227A}{\ensuremath\prec} \DeclareUnicodeCharacter{227B}{\ensuremath\succ} \DeclareUnicodeCharacter{2283}{\ensuremath\supset} \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq} \DeclareUnicodeCharacter{228E}{\ensuremath\uplus} \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset} \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset} \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq} \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq} \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap} \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup} \DeclareUnicodeCharacter{2295}{\ensuremath\oplus} \DeclareUnicodeCharacter{2296}{\ensuremath\ominus} \DeclareUnicodeCharacter{2297}{\ensuremath\otimes} \DeclareUnicodeCharacter{2298}{\ensuremath\oslash} \DeclareUnicodeCharacter{2299}{\ensuremath\odot} \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash} \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv} \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop} \DeclareUnicodeCharacter{22A5}{\ensuremath\bot} \DeclareUnicodeCharacter{22A8}{\ensuremath\models} \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd} \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd} \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge} \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee} \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap} \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup} \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond} \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot} \DeclareUnicodeCharacter{22C6}{\ensuremath\star} \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie} \DeclareUnicodeCharacter{2308}{\ensuremath\lceil} \DeclareUnicodeCharacter{2309}{\ensuremath\rceil} \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor} \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor} \DeclareUnicodeCharacter{2322}{\ensuremath\frown} \DeclareUnicodeCharacter{2323}{\ensuremath\smile} \DeclareUnicodeCharacter{25A1}{\ensuremath\Box} \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle} \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright} \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown} \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft} \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond} \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit} \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit} \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit} \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit} \DeclareUnicodeCharacter{266D}{\ensuremath\flat} \DeclareUnicodeCharacter{266E}{\ensuremath\natural} \DeclareUnicodeCharacter{266F}{\ensuremath\sharp} \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc} \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle} \DeclareUnicodeCharacter{27C2}{\ensuremath\perp} \DeclareUnicodeCharacter{27E8}{\ensuremath\langle} \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow} \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow} \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow} \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto} \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus} \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot} \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus} \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes} \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus} \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup} \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join} \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg} \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq} \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq} \global\mathchardef\checkmark="1370 % actually the square root sign \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Latin1 (ISO-8859-1) character definitions. \def\nonasciistringdefs{% \setnonasciicharscatcode\active \def\defstringchar##1{\def##1{\string##1}}% % \defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83% \defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87% \defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b% \defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f% % \defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93% \defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97% \defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b% \defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f% % \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% % \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% % \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% % \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% % \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% % \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% } % define all the unicode characters we know about, for the sake of @U. \utfeightchardefs % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} \def^^L{\par} % remove \outer, so ^L can appear in an @comment % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Set catcodes for Texinfo file % Active characters for printing the wanted glyph. % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. % \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde \chardef\hatchar=`\^ \catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \let\realunder=_ \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless \chardef \gtr=`\> \catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix \catcode`\-=\active \let-=\normaldash % used for headline/footline in the output routine, in case the page % breaks in the middle of an @tex block. \def\texinfochars{% \let< = \activeless \let> = \activegtr \let~ = \activetilde \let^ = \activehat \markupsetuplqdefault \markupsetuprqdefault \let\b = \strong \let\i = \smartitalic % in principle, all other definitions in \tex have to be undone too. } % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In Texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active % @ for escape char from now on. % Print a typewriter backslash. For math mode, we can't simply use % \backslashcurfont: the story here is that in math mode, the \char % of \backslashcurfont ends up printing the roman \ from the math symbol % font (because \char in math mode uses the \mathcode, and plain.tex % sets \mathcode`\\="026E). Hence we use an explicit \mathchar, % which is the decimal equivalent of "715c (class 7, e.g., use \fam; % ignored family value; char position "5C). We can't use " for the % usual hex value because it has already been made active. @def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % {@catcode`- = @active @gdef@normalturnoffactive{% @nonasciistringdefs @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @let\=@ttbackslash @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } } % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have @fixbackslash turn them back on. @catcode`+=@other @catcode`@_=@other % \enablebackslashhack - allow file to begin `\input texinfo' % % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % If the file did not have a `\input texinfo', then it is turned off after % the first line; otherwise the first `\' in the file would cause an error. % This is used on the very last line of this file, texinfo.tex. % We also use @c to call @fixbackslash, in case ends of lines are hidden. { @catcode`@^=7 @catcode`@^^M=13@gdef@enablebackslashhack{% @global@let\ = @eatinput% @catcode`@^^M=13% @def@c{@fixbackslash@c}% @def ^^M{@let^^M@secondlinenl}% @gdef @secondlinenl{@let^^M@thirdlinenl}% @gdef @thirdlinenl{@fixbackslash}% }} {@catcode`@^=7 @catcode`@^^M=13% @gdef@eatinput input texinfo#1^^M{@fixbackslash}} @gdef@fixbackslash{% @ifx\@eatinput @let\ = @ttbackslash @fi @catcode13=5 % regular end of line @let@c=@texinfoc % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. @catcode`+=@active @catcode`@_=@active % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets % called at the beginning of every Texinfo file. Not opening texinfo.cnf % directly in this file, texinfo.tex, makes it possible to make a format % file for Texinfo. % @openin 1 texinfo.cnf @ifeof 1 @else @input texinfo.cnf @fi @closein 1 } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. % @hashchar{} gets its own user-level command, because of #line. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore @enablebackslashhack wget-1.17.1/build-aux/update-copyright0000775000000000000000000002243312632604574014565 00000000000000eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' & eval 'exec perl -wS -0777 -pi "$0" $argv:q' if 0; # Update an FSF copyright year list to include the current year. my $VERSION = '2015-01-15.20:53'; # UTC # Copyright (C) 2009-2015 Free Software Foundation, Inc. # # 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, 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 . # Written by Jim Meyering and Joel E. Denny # The arguments to this script should be names of files that contain # copyright statements to be updated. The copyright holder's name # defaults to "Free Software Foundation, Inc." but may be changed to # any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment # variable. # # For example, you might wish to use the update-copyright target rule # in maint.mk from gnulib's maintainer-makefile module. # # Iff a copyright statement is recognized in a file and the final # year is not the current year, then the statement is updated for the # new year and it is reformatted to: # # 1. Fit within 72 columns. # 2. Convert 2-digit years to 4-digit years by prepending "19". # 3. Expand copyright year intervals. (See "Environment variables" # below.) # # A warning is printed for every file for which no copyright # statement is recognized. # # Each file's copyright statement must be formatted correctly in # order to be recognized. For example, each of these is fine: # # Copyright @copyright{} 1990-2005, 2007-2009 Free Software # Foundation, Inc. # # # Copyright (C) 1990-2005, 2007-2009 Free Software # # Foundation, Inc. # # /* # * Copyright © 90,2005,2007-2009 # * Free Software Foundation, Inc. # */ # # However, the following format is not recognized because the line # prefix changes after the first line: # # ## Copyright (C) 1990-2005, 2007-2009 Free Software # # Foundation, Inc. # # However, any correctly formatted copyright statement following # a non-matching copyright statements would be recognized. # # The exact conditions that a file's copyright statement must meet # to be recognized are: # # 1. It is the first copyright statement that meets all of the # following conditions. Subsequent copyright statements are # ignored. # 2. Its format is "Copyright (C)", then a list of copyright years, # and then the name of the copyright holder. # 3. The "(C)" takes one of the following forms or is omitted # entirely: # # A. (C) # B. (c) # C. @copyright{} # D. © # # 4. The "Copyright" appears at the beginning of a line, except that it # may be prefixed by any sequence (e.g., a comment) of no more than # 5 characters -- including white space. # 5. Iff such a prefix is present, the same prefix appears at the # beginning of each remaining line within the FSF copyright # statement. There is one exception in order to support C-style # comments: if the first line's prefix contains nothing but # whitespace surrounding a "/*", then the prefix for all subsequent # lines is the same as the first line's prefix except with each of # "/" and possibly "*" replaced by a " ". The replacement of "*" # by " " is consistent throughout all subsequent lines. # 6. Blank lines, even if preceded by the prefix, do not appear # within the FSF copyright statement. # 7. Each copyright year is 2 or 4 digits, and years are separated by # commas or dashes. Whitespace may appear after commas. # # Environment variables: # # 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement # is reformatted even if it does not need updating for the new # year. If unset or set to 0, only updated FSF copyright # statements are reformatted. # 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive # copyright years (such as 90, 1991, 1992-2007, 2008) in a # reformatted FSF copyright statement is collapsed to a single # interval (such as 1990-2008). If unset or set to 0, all existing # copyright year intervals in a reformatted FSF copyright statement # are expanded instead. # If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps # to the minimal containing range. For example, convert # 2000, 2004-2007, 2009 to 2000-2009. # 3. For testing purposes, you can set the assumed current year in # UPDATE_COPYRIGHT_YEAR. # 4. The default maximum line length for a copyright line is 72. # Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length. # 5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other # than "Free Software Foundation, Inc.". use strict; use warnings; my $copyright_re = 'Copyright'; my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; $holder ||= 'Free Software Foundation, Inc.'; my $prefix_max = 5; my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH}; !$margin || $margin !~ m/^\d+$/ and $margin = 72; my $tab_width = 8; my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR}; if (!$this_year || $this_year !~ m/^\d{4}$/) { my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ()); $this_year = $year + 1900; } # Unless the file consistently uses "\r\n" as the EOL, use "\n" instead. my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n"; my $leading; my $prefix; my $ws_re; my $stmt_re; while (/(^|\n)(.{0,$prefix_max})$copyright_re/g) { $leading = "$1$2"; $prefix = $2; if ($prefix =~ /^(\s*\/)\*(\s*)$/) { $prefix =~ s,/, ,; my $prefix_ws = $prefix; $prefix_ws =~ s/\*/ /; # Only whitespace. if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/) { $prefix = $prefix_ws; } } $ws_re = '[ \t\r\f]'; # \s without \n $ws_re = "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)"; my $holder_re = $holder; $holder_re =~ s/\s/$ws_re/g; my $stmt_remainder_re = "(?:$ws_re$circle_c_re)?" . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*" . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re"; if (/\G$stmt_remainder_re/) { $stmt_re = quotemeta($leading) . "($copyright_re$stmt_remainder_re)"; last; } } if (defined $stmt_re) { /$stmt_re/ or die; # Should never die. my $stmt = $1; my $final_year_orig = $2; # Handle two-digit year numbers like "98" and "99". my $final_year = $final_year_orig; $final_year <= 99 and $final_year += 1900; if ($final_year != $this_year) { # Update the year. $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/; } if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'}) { # Normalize all whitespace including newline-prefix sequences. $stmt =~ s/$ws_re/ /g; # Put spaces after commas. $stmt =~ s/, ?/, /g; # Convert 2-digit to 4-digit years. $stmt =~ s/(\b\d\d\b)/19$1/g; # Make the use of intervals consistent. if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS}) { $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg; } else { $stmt =~ s/ (\d{4}) (?: (,\ |-) ((??{ if ($2 eq '-') { '\d{4}'; } elsif (!$3) { $1 + 1; } else { $3 + 1; } })) )+ /$1-$3/gx; # When it's 2, emit a single range encompassing all year numbers. $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2 and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/; } # Format within margin. my $stmt_wrapped; my $text_margin = $margin - length($prefix); if ($prefix =~ /^(\t+)/) { $text_margin -= length($1) * ($tab_width - 1); } while (length $stmt) { if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//) || ($stmt =~ s/^([\S]+)(?: |$)//)) { my $line = $1; $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading; $stmt_wrapped .= $line; } else { # Should be unreachable, but we don't want an infinite # loop if it can be reached. die; } } # Replace the old copyright statement. s/$stmt_re/$stmt_wrapped/; } } else { print STDERR "$ARGV: warning: copyright statement not found\n"; } # Local variables: # mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" # time-stamp-time-zone: "UTC" # time-stamp-end: "'; # UTC" # End: wget-1.17.1/build-aux/test-driver0000755000000000000000000001104012632605303013522 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # 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, see . # 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 or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: wget-1.17.1/build-aux/config.rpath0000775000000000000000000004421612474351273013661 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2015 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. wget-1.17.1/COPYING0000664000000000000000000010451312477336107010511 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . wget-1.17.1/testenv/0000775000000000000000000000000012632615677011227 500000000000000wget-1.17.1/testenv/Test--https-crl.py0000775000000000000000000000256412631756630014437 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from test.base_test import HTTP, HTTPS from misc.wget_file import WgetFile import os """ This test ensures that Wget can download files from HTTPS Servers """ TEST_NAME = "HTTPS CRL" if os.getenv('SSL_TESTS') is None: exit (77) ############# File Definitions ############################################### File1 = "Would you like some Tea?" File2 = "With lemon or cream?" A_File = WgetFile ("File1", File1) B_File = WgetFile ("File2", File2) CAFILE = os.path.abspath(os.path.join(os.getenv('srcdir', '.'), 'certs', 'ca-cert.pem')) CRLFILE = os.path.abspath(os.path.join(os.getenv('srcdir', '.'), 'certs', 'server-crl.pem')) WGET_OPTIONS = "--crl-file " + CRLFILE + " --ca-certificate=" + CAFILE WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] Servers = [HTTPS] ExpectedReturnCode = 5 ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test, protocols=Servers ).begin () exit (err) wget-1.17.1/testenv/Test-cookie.py0000775000000000000000000000261012627054075013702 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget's cookie jar support works correctly. """ TEST_NAME = "Basic Cookie Functionality" ############# File Definitions ############################################### File1 = """All happy families are alike; Each unhappy family is unhappy in its own way""" File2 = "Anyone for chocochip cookies?" File1_rules = { "SendHeader" : { "Set-Cookie" : "sess-id=0213; path=/" } } File2_rules = { "ExpectHeader" : { "Cookie" : "sess-id=0213" } } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) WGET_OPTIONS = "" WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-condget.py0000775000000000000000000001011312627054074014050 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ Simple test for HTTP Conditional-GET Requests using the -N command """ TEST_NAME = "HTTP Conditional-GET Requests" ############# File Definitions ############################################### # Keep same length ! Cont1 = """THIS IS 1 FILE""" Cont2 = """THIS IS 2 FILE""" Cont3 = """THIS IS 3 FILE""" Cont4 = """THIS IS 4 FILE""" # Local Wget files # These have same timestamp as remote files UpToDate_Local_File1 = WgetFile ("UpToDateFile1", Cont1, timestamp="1995-01-01 00:00:00") UpToDate_Local_File2 = WgetFile ("UpToDateFile2", Cont1, timestamp="1995-01-01 00:00:00") UpToDate_Local_File3 = WgetFile ("UpToDateFile3", Cont1, timestamp="1995-01-01 00:00:00") # This is newer than remote (expected same behaviour as for above files) Newer_Local_File = WgetFile ("NewerFile", Cont1, timestamp="1995-02-02 02:02:02") # This is older than remote - should be clobbered Outdated_Local_File = WgetFile ("UpdatedFile", Cont2, timestamp="1990-01-01 00:00:00") UpToDate_Rules1 = { "SendHeader" : { # RFC1123 format "Last-Modified" : "Sun, 01 Jan 1995 00:00:00 GMT", }, "Response": 304, "ExpectHeader" : { "If-Modified-Since" : "Sun, 01 Jan 1995 00:00:00 GMT" }, } UpToDate_Rules2 = { "SendHeader" : { # RFC850 format "Last-Modified" : "Sunday, 01-Jan-95 00:00:00 GMT", }, "Response": 304, "ExpectHeader" : { "If-Modified-Since" : "Sun, 01 Jan 1995 00:00:00 GMT" }, } UpToDate_Rules3 = { "SendHeader" : { # Asctime format "Last-Modified" : "Sun Jan 01 00:00:00 1995", }, "Response": 304, "ExpectHeader" : { "If-Modified-Since" : "Sun, 01 Jan 1995 00:00:00 GMT" }, } Newer_Rules = { "SendHeader" : { # Asctime format "Last-Modified" : "Sun Jan 01 00:00:00 1995", }, "Response": 304, "ExpectHeader" : { "If-Modified-Since" : "Thu, 02 Feb 1995 02:02:02 GMT" }, } Outdated_Rules = { "SendHeader" : { # RFC850 format "Last-Modified" : "Thursday, 01-Jan-15 00:00:00 GMT", }, "ExpectHeader" : { "If-Modified-Since" : "Mon, 01 Jan 1990 00:00:00 GMT", }, } UpToDate_Server_File1 = WgetFile ("UpToDateFile1", Cont3, rules=UpToDate_Rules1) UpToDate_Server_File2 = WgetFile ("UpToDateFile2", Cont3, rules=UpToDate_Rules2) UpToDate_Server_File3 = WgetFile ("UpToDateFile3", Cont3, rules=UpToDate_Rules3) Newer_Server_File = WgetFile ("NewerFile", Cont3, rules=Newer_Rules) Updated_Server_File = WgetFile ("UpdatedFile", Cont4, rules=Outdated_Rules) WGET_OPTIONS = "-N" WGET_URLS = [["UpToDateFile1", "UpToDateFile2", "UpToDateFile3", "NewerFile", "UpdatedFile", ]] Files = [[UpToDate_Server_File1, UpToDate_Server_File2, UpToDate_Server_File3, Newer_Server_File, Updated_Server_File, ]] Existing_Files = [UpToDate_Local_File1, UpToDate_Local_File2, UpToDate_Local_File3, Newer_Local_File, Outdated_Local_File] ExpectedReturnCode = 0 # The uptodate file should not be downloaded ExpectedDownloadedFiles = [UpToDate_Local_File1, UpToDate_Local_File2, UpToDate_Local_File3, Newer_Local_File, Updated_Server_File] # Kind of hack to ensure proper request types Request_List = [ [ "GET /UpToDateFile1", "GET /UpToDateFile2", "GET /UpToDateFile3", "GET /NewerFile", "GET /UpdatedFile", ] ] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, "LocalFiles" : Existing_Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode, "FilesCrawled" : Request_List, } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/certs/0000775000000000000000000000000012627054075012340 500000000000000wget-1.17.1/testenv/certs/server-cert.pem0000664000000000000000000000237112627054075015227 00000000000000-----BEGIN CERTIFICATE----- MIIDgDCCAmigAwIBAgIIVGI73zrIeeMwDQYJKoZIhvcNAQELBQAwMDERMA8GA1UE AxMIR05VIFdnZXQxDTALBgNVBAsTBFdnZXQxDDAKBgNVBAoTA0dOVTAiGA8yMDE0 MTExMTE2NDAwMFoYDzk5OTkxMjMxMjM1OTU5WjAxMRIwEAYDVQQDEwkxMjcuMC4w LjExDTALBgNVBAsTBFdnZXQxDDAKBgNVBAoTA0dOVTCCASIwDQYJKoZIhvcNAQEB BQADggEPADCCAQoCggEBAMjC3Gt55EfStl6mE371+pD3/cpR5MLxkdbBss5MlIP2 TDhiPOItLXml8oxs4BjUm3wfn3GV9iJLmbzbIWL+0kbRkQ2LCPKUf+Cln3z2ZE+r XwdWlT8gVfv51Opfkp2lLDVUqLfNKRGQgivjSCmLqY2LqeB0SaVNvuaD3EpqZyIH 0E5SZgjqBHgRRtvGkcy0rOmp5SI2NASLugUioXa9OLWjpYDwodsd3ERlL0DJ1aJW 8TC8Tqix4i0osWzar+LXBIin0Qvar9/uRHN0p1kq3p0XgNHKqWpiTT54+WYx7Pem v4qRXz11swiJzUL+Pw1DurQ9smbzDgAsz7V2FJnUeCcCAwEAAaOBmDCBlTAMBgNV HRMBAf8EAjAAMB8GA1UdEQQYMBaCCTEyNy4wLjAuMYIJbG9jYWxob3N0MBMGA1Ud JQQMMAoGCCsGAQUFBwMBMA8GA1UdDwEB/wQFAwMHoAAwHQYDVR0OBBYEFJfm323L JbKTM/tMKSt0qlUqewbnMB8GA1UdIwQYMBaAFPM+TjiESqm+wW/HYaNQ2m4pi+tU MA0GCSqGSIb3DQEBCwUAA4IBAQCDmuSD4IGmn0UQ5jhGQquh92Iu59j64Rrg7EIM zoppciyYR8gDUutOI9CEisxJz6umvAdOo5L981gcFaBv6hHWaE/krAZccR+ZXZP6 fI9btO8My8O63fYcd2KkLEFqvKDF43i01S2LrqXdPo3uELbFZwxCmUKsexFGsoW1 CbXbRjnS7w/f72myRmvBeDiNMuGfe1lb4IflybH3DMlKC7i0AN1JKglp+IKn5XAE neWR03i3UaYJsibIxj0DkTS+hVPu5MXQ9RlF5CkRdFKjGinLE/u70XyAyx0/IeAN e7c2MJvpdfRmTXm2ew4sNyK9RXo7Bv0Yqkl65iMscF8LNnxL -----END CERTIFICATE----- wget-1.17.1/testenv/certs/server-crl.pem0000664000000000000000000000126212627054075015050 00000000000000-----BEGIN X509 CRL----- MIIB1DCBvQIBATANBgkqhkiG9w0BAQsFADAwMREwDwYDVQQDEwhHTlUgV2dldDEN MAsGA1UECxMEV2dldDEMMAoGA1UEChMDR05VGA8yMDE0MTExMTE2NDU1NFoYDzk5 OTkxMjMxMjM1OTU5WjAdMBsCCFRiO986yHnjGA8yMDE0MTExMTE2NDU1NFqgNjA0 MB8GA1UdIwQYMBaAFPM+TjiESqm+wW/HYaNQ2m4pi+tUMBEGA1UdFAQKAghUYj1E KHs9ijANBgkqhkiG9w0BAQsFAAOCAQEAZgwqs1VOFG39dFHHMXvBr4eJfhwiG4bC cL6IvLhvl9ikcyQMHrpOBtNjkCtgclSbJjjTDdera1+zuCWE0WBOJ4mojYdAIOhR QvSwp4NwAtibu2F/fjeXoo+LEpcRKtLvAotB30eCZ1OPrijsa/HxFILOLlayjns8 wM4RmQC4o43y1G/1jqM8hGDg4Wz0j1URVuyP+pU55JpubV5LlExy3gIRwevD2lam q3hiighenJYFO3HGZkYT2SIoSpXZnQqKPJ4HwRBSg/cjOpc1y1lIIvKhmk+Cut6M +S5HL4pIk8vGYg57nTfOOkj1goqFkfU0DBqvVAZj02ay/VIDu61T1g== -----END X509 CRL----- wget-1.17.1/testenv/certs/ca-key.pem0000664000000000000000000001327712627054075014146 00000000000000Public Key Info: Public Key Algorithm: RSA Key Security Level: Medium (2048 bits) modulus: 00:bf:62:11:d7:f8:2c:68:9b:27:f9:e8:2d:54:56: cc:30:c6:e2:bc:af:9e:57:33:d8:f3:01:17:6f:67: e5:a5:ef:5a:2a:4c:33:f3:6e:27:49:2a:d6:7d:18: a0:42:67:ff:38:39:0d:94:ad:b1:f7:59:29:a5:f3: e6:5a:40:a5:51:11:10:07:72:38:77:fb:07:16:7c: ea:0a:41:4a:98:dc:2d:55:3e:03:b0:be:3b:56:e9: a0:64:5e:99:8d:2a:93:61:00:f7:30:31:f7:56:11: 63:d6:22:ab:44:c3:3f:68:26:57:c2:7b:43:fb:ae: ec:2b:0e:94:3d:77:c5:6d:f5:0e:45:e7:29:6f:b7: c2:64:f6:45:54:56:12:b7:18:1c:17:b7:32:1f:e0: c0:0c:b5:f9:40:21:23:88:b6:07:d5:eb:3a:15:7a: dd:c3:ec:a9:83:00:65:f8:7b:8b:91:0f:f8:80:4d: 09:2d:02:b9:3c:02:92:61:e2:f2:d0:91:01:50:fa: 2f:90:c5:d3:fa:bf:5a:3e:44:01:17:ff:56:0f:ab: 94:3e:26:b4:11:11:db:30:84:f4:33:2f:38:84:1a: c6:f5:de:6e:e6:05:cf:9c:7d:59:c4:a2:2b:f2:22: 4e:60:2c:9d:56:36:27:76:7d:b5:ce:cd:88:13:1c: 0b:eb: public exponent: 01:00:01: private exponent: 45:0c:7f:fd:98:a7:85:12:3d:a9:17:90:8b:36:49: b3:6b:7e:50:af:58:04:84:4b:48:d9:62:f8:29:d7: 1c:38:30:22:c4:9d:95:bd:6f:65:21:94:83:4b:c8: 3e:4d:41:32:aa:ba:f0:a2:7e:6c:0c:7a:4f:4a:a1: 18:7c:ec:68:44:2c:b1:53:0f:76:92:56:2b:51:e4: 2a:d1:05:b6:02:f2:44:27:fc:b2:de:df:8f:ea:f8: 98:5d:dd:2e:a6:66:c7:ff:ce:2f:50:47:b9:80:ca: b1:6e:8e:b6:5f:6f:58:07:45:70:80:82:b5:a2:95: c8:af:18:e2:d8:7c:9d:bf:c5:a9:da:4f:af:08:37: 92:27:94:12:c0:94:70:90:ff:e4:05:8b:ed:18:a9: 19:3c:47:3a:7c:fe:4f:9c:15:ab:f6:7e:48:2a:58: d7:14:67:96:bd:e6:fa:9f:3a:51:0c:63:49:14:d5: 9d:e9:a8:24:19:2a:83:e4:fe:e2:ec:db:f9:13:33: a6:d3:62:d2:6b:7e:a9:5b:93:73:f5:c9:d0:ad:58: 11:cb:77:d3:13:3c:bf:37:f9:64:95:c7:4c:69:f2: 6e:b8:36:69:57:93:4a:03:06:58:8a:51:3d:d6:97: 61:2f:7c:76:33:14:88:51:45:68:4e:29:fe:12:43: 69: prime1: 00:e0:e6:81:38:18:3e:c8:98:51:71:2d:5f:22:8c: 93:95:37:17:47:00:4f:6a:87:98:73:8d:f3:c3:02: f7:e1:9d:a0:5c:a5:10:a6:0d:88:5d:e0:72:10:93: 24:af:6e:a4:0e:55:5c:03:37:5f:1d:90:41:c2:d6: e3:a6:ba:20:08:0b:01:31:eb:fc:7e:97:66:3c:fe: b5:ab:4c:0b:2f:18:16:f3:28:47:70:41:dc:cf:04: 9c:7e:28:78:3b:3f:31:cf:b1:77:2c:6d:c9:bf:ad: 19:ff:03:1f:c6:98:9a:60:47:a5:1d:c4:52:c5:9e: 77:5a:cc:a4:e3:96:81:d4:4d: prime2: 00:d9:d9:0c:6e:81:bb:0e:5d:c6:92:cc:48:70:b8: da:60:e8:56:e7:2a:20:da:29:0f:c9:f0:9f:b8:9f: df:d9:a1:68:7e:ce:3e:7c:f2:00:66:68:79:c4:01: fa:b9:71:3e:73:06:3f:85:5c:83:33:ee:58:77:50: 89:aa:90:33:d0:6c:aa:6f:34:b2:30:8b:e9:a9:82: df:e2:7f:04:09:9f:14:9a:db:c7:cb:e5:85:46:b2: 42:d0:a7:fe:7a:e3:ff:1e:84:9c:36:50:e3:de:fb: 11:1c:34:09:fe:46:db:45:c3:50:19:f1:25:c0:e3: 5c:d5:0d:88:13:e1:9a:5d:17: coefficient: 00:ca:79:cb:79:87:91:9f:9a:99:0b:5d:c5:78:21: a7:60:c6:8a:2d:a5:b5:87:a2:d6:df:b0:17:5f:bf: e1:ce:f0:ca:89:18:0e:e0:4a:7f:00:e5:41:2d:04: 5b:05:51:e5:08:89:dd:80:82:c7:94:94:1c:f4:0f: 1b:9a:d0:72:83:bb:e9:ca:d5:09:0d:4b:c0:b7:6a: a7:b4:c3:df:4e:f1:7f:0f:57:ad:25:ff:e4:d3:ef: 05:95:31:ca:00:54:97:4b:2d:56:aa:1a:89:d8:a0: d6:dc:64:88:88:36:26:92:39:57:8b:da:18:23:77: c3:e3:39:0e:95:f7:3c:77:fe: exp1: 00:99:f2:8f:4f:93:a1:1e:74:cd:82:f8:78:df:d0: 74:91:b6:a5:53:6f:cd:ec:f1:26:95:2a:fd:4a:67: 34:c1:16:c2:17:c8:d1:ed:a8:e3:c8:c7:03:ad:7e: db:a4:ce:ca:b4:19:10:24:0f:7a:27:65:80:ee:5b: 64:77:d3:7e:6b:a3:04:cd:64:69:71:4a:37:ac:d6: fa:0a:68:c2:5b:19:55:54:5b:25:13:9d:b2:05:6f: 75:a4:12:15:c3:10:8e:0b:4a:c2:76:02:2d:10:ec: f0:17:94:ce:e2:85:c1:5e:d8:8c:19:25:33:37:9d: 32:bc:4f:cb:2b:12:f2:8a:1d: exp2: 3e:53:68:c9:1c:f8:a5:6d:92:e8:60:e5:c0:ca:42: 40:43:78:c9:7e:36:13:f4:77:7d:f1:07:e1:4c:6c: 40:d9:7b:09:fc:7b:c8:47:7c:71:d0:26:36:3b:d2: bd:c7:76:74:76:2f:2a:3a:83:97:11:f3:e1:7e:fb: 43:ff:29:b3:d1:c3:19:39:dc:59:23:4e:60:9e:fe: ea:d0:28:19:90:97:d6:8e:56:a5:31:2f:66:40:8d: f9:20:77:20:35:a6:c1:d6:72:d2:df:65:b2:5f:e6: 4f:49:5c:2a:91:9f:1e:60:78:c4:53:47:d7:dd:b4: ab:87:c9:8c:d6:98:d1:55: Public Key ID: F3:3E:4E:38:84:4A:A9:BE:C1:6F:C7:61:A3:50:DA:6E:29:8B:EB:54 Public key's random art: +--[ RSA 2048]----+ | | | | | | | .. . | | Eo . S | | .+o..+. + | | .+o.= oo o | |.o.o* o +. | |+o+*.. .o. | +-----------------+ -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAv2IR1/gsaJsn+egtVFbMMMbivK+eVzPY8wEXb2flpe9aKkwz 824nSSrWfRigQmf/ODkNlK2x91kppfPmWkClUREQB3I4d/sHFnzqCkFKmNwtVT4D sL47VumgZF6ZjSqTYQD3MDH3VhFj1iKrRMM/aCZXwntD+67sKw6UPXfFbfUORecp b7fCZPZFVFYStxgcF7cyH+DADLX5QCEjiLYH1es6FXrdw+ypgwBl+HuLkQ/4gE0J LQK5PAKSYeLy0JEBUPovkMXT+r9aPkQBF/9WD6uUPia0ERHbMIT0My84hBrG9d5u 5gXPnH1ZxKIr8iJOYCydVjYndn21zs2IExwL6wIDAQABAoIBAEUMf/2Yp4USPakX kIs2SbNrflCvWASES0jZYvgp1xw4MCLEnZW9b2UhlINLyD5NQTKquvCifmwMek9K oRh87GhELLFTD3aSVitR5CrRBbYC8kQn/LLe34/q+Jhd3S6mZsf/zi9QR7mAyrFu jrZfb1gHRXCAgrWilcivGOLYfJ2/xanaT68IN5InlBLAlHCQ/+QFi+0YqRk8Rzp8 /k+cFav2fkgqWNcUZ5a95vqfOlEMY0kU1Z3pqCQZKoPk/uLs2/kTM6bTYtJrfqlb k3P1ydCtWBHLd9MTPL83+WSVx0xp8m64NmlXk0oDBliKUT3Wl2EvfHYzFIhRRWhO Kf4SQ2kCgYEA4OaBOBg+yJhRcS1fIoyTlTcXRwBPaoeYc43zwwL34Z2gXKUQpg2I XeByEJMkr26kDlVcAzdfHZBBwtbjprogCAsBMev8fpdmPP61q0wLLxgW8yhHcEHc zwScfih4Oz8xz7F3LG3Jv60Z/wMfxpiaYEelHcRSxZ53Wsyk45aB1E0CgYEA2dkM boG7Dl3GksxIcLjaYOhW5yog2ikPyfCfuJ/f2aFofs4+fPIAZmh5xAH6uXE+cwY/ hVyDM+5Yd1CJqpAz0GyqbzSyMIvpqYLf4n8ECZ8UmtvHy+WFRrJC0Kf+euP/HoSc NlDj3vsRHDQJ/kbbRcNQGfElwONc1Q2IE+GaXRcCgYEAmfKPT5OhHnTNgvh439B0 kbalU2/N7PEmlSr9Smc0wRbCF8jR7ajjyMcDrX7bpM7KtBkQJA96J2WA7ltkd9N+ a6MEzWRpcUo3rNb6CmjCWxlVVFslE52yBW91pBIVwxCOC0rCdgItEOzwF5TO4oXB XtiMGSUzN50yvE/LKxLyih0CgYA+U2jJHPilbZLoYOXAykJAQ3jJfjYT9Hd98Qfh TGxA2XsJ/HvIR3xx0CY2O9K9x3Z0di8qOoOXEfPhfvtD/ymz0cMZOdxZI05gnv7q 0CgZkJfWjlalMS9mQI35IHcgNabB1nLS32WyX+ZPSVwqkZ8eYHjEU0fX3bSrh8mM 1pjRVQKBgQDKect5h5GfmpkLXcV4IadgxootpbWHotbfsBdfv+HO8MqJGA7gSn8A 5UEtBFsFUeUIid2AgseUlBz0Dxua0HKDu+nK1QkNS8C3aqe0w99O8X8PV60l/+TT 7wWVMcoAVJdLLVaqGonYoNbcZIiINiaSOVeL2hgjd8PjOQ6V9zx3/g== -----END RSA PRIVATE KEY----- wget-1.17.1/testenv/certs/README0000664000000000000000000000577312627054075013154 00000000000000To create the server RSA private key: $ certtool --generate-privkey --outfile server-key.pem --rsa To create a self signed CA certificate: $ certtool --generate-privkey --outfile ca-key.pem $ certtool --generate-self-signed --load-privkey ca-key.pem --outfile ca-cert.pem Common name: GNU Wget UID: Organizational unit name: Wget Organization name: GNU Locality name: State or province name: Country name (2 chars): Enter the subject's domain component (DC): This field should not be used in new certificates. E-mail: Enter the certificate's serial number in decimal (default: 6080487640893163573): Activation/Expiration time. The certificate will expire in (days): -1 Extensions. Does the certificate belong to an authority? (y/N): y Path length constraint (decimal, -1 for no constraint): Is this a TLS web client certificate? (y/N): Will the certificate be used for IPsec IKE operations? (y/N): Is this a TLS web server certificate? (y/N): Enter a dnsName of the subject of the certificate: Enter a URI of the subject of the certificate: Enter the IP address of the subject of the certificate: Enter the e-mail of the subject of the certificate: Will the certificate be used to sign other certificates? (y/N): y Will the certificate be used to sign CRLs? (y/N): y Will the certificate be used to sign code? (y/N): Will the certificate be used to sign OCSP requests? (y/N): y Will the certificate be used for time stamping? (y/N): Enter the URI of the CRL distribution point: To generate a server certificate using the private key only: $ certtool --generate-certificate --load-privkey server-key.pem --outfile server-cert.pem --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem Common name: 127.0.0.1 UID: Organizational unit name: Wget Organization name: GNU Locality name: State or province name: Country name (2 chars): Enter the subject's domain component (DC): This field should not be used in new certificates. E-mail: Enter the certificate's serial number in decimal (default: 6080488276853553635): Activation/Expiration time. The certificate will expire in (days): -1 Extensions. Does the certificate belong to an authority? (y/N): Is this a TLS web client certificate? (y/N): Will the certificate be used for IPsec IKE operations? (y/N): Is this a TLS web server certificate? (y/N): y Enter a dnsName of the subject of the certificate: 127.0.0.1 Enter a dnsName of the subject of the certificate: localhost Enter a dnsName of the subject of the certificate: Enter a URI of the subject of the certificate: Enter the IP address of the subject of the certificate: Will the certificate be used for signing (DHE and RSA-EXPORT ciphersuites)? (Y/n): Will the certificate be used for encryption (RSA ciphersuites)? (Y/n): To create a CRL for the server certificate: $ certtool --generate-crl --load-ca-privkey ca-key.pem --load-ca-certificate ca-cert.pem --load-certificate server-cert.pem --outfile server-crl.pem Generating a signed CRL... Update times. The certificate will expire in (days): -1 CRL Number (default: 6080006793650397145): wget-1.17.1/testenv/certs/ca-cert.pem0000664000000000000000000000224012627054075014277 00000000000000-----BEGIN CERTIFICATE----- MIIDPjCCAiagAwIBAgIIVGI7SyiXCDUwDQYJKoZIhvcNAQELBQAwMDERMA8GA1UE AxMIR05VIFdnZXQxDTALBgNVBAsTBFdnZXQxDDAKBgNVBAoTA0dOVTAiGA8yMDE0 MTExMTE2MzczM1oYDzk5OTkxMjMxMjM1OTU5WjAwMREwDwYDVQQDEwhHTlUgV2dl dDENMAsGA1UECxMEV2dldDEMMAoGA1UEChMDR05VMIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAv2IR1/gsaJsn+egtVFbMMMbivK+eVzPY8wEXb2flpe9a Kkwz824nSSrWfRigQmf/ODkNlK2x91kppfPmWkClUREQB3I4d/sHFnzqCkFKmNwt VT4DsL47VumgZF6ZjSqTYQD3MDH3VhFj1iKrRMM/aCZXwntD+67sKw6UPXfFbfUO Recpb7fCZPZFVFYStxgcF7cyH+DADLX5QCEjiLYH1es6FXrdw+ypgwBl+HuLkQ/4 gE0JLQK5PAKSYeLy0JEBUPovkMXT+r9aPkQBF/9WD6uUPia0ERHbMIT0My84hBrG 9d5u5gXPnH1ZxKIr8iJOYCydVjYndn21zs2IExwL6wIDAQABo1gwVjAPBgNVHRMB Af8EBTADAQH/MBMGA1UdJQQMMAoGCCsGAQUFBwMJMA8GA1UdDwEB/wQFAwMHBgAw HQYDVR0OBBYEFPM+TjiESqm+wW/HYaNQ2m4pi+tUMA0GCSqGSIb3DQEBCwUAA4IB AQCWKV1Txo3xytRSO1PwWK9ce5FhvQW9mubuuWmbEnQt9JaOhO1Og6ZmdPDlAQeo m0CJZZ0VNeodoBXPGopy3VyzF4ZzUR9leGk3sb1qTSoDCvJd/zLrfukHKugtwuK0 b1fPnEjBjQ6gQI21coc1tmyX8Qsm7of5n+Ji601WG+FiVmmdEsCjmA/eAvwSbu1E cAVH476KUt4CrpVPQQVqzFPDz8i4iw/P+Jo+iNmL5S72OG2GfkSJq3XkUYa509W6 N+8c3p4y0q/PcQ92s1OIHyEPZFRFhm4xw0sHkhD2KVoHseHZjCoYn4/lIzMPnJ6v EfZUJQXndeJnffbthaUp8Ea2 -----END CERTIFICATE----- wget-1.17.1/testenv/certs/server-key.pem0000664000000000000000000001330212627054075015056 00000000000000Public Key Info: Public Key Algorithm: RSA Key Security Level: Medium (2048 bits) modulus: 00:c8:c2:dc:6b:79:e4:47:d2:b6:5e:a6:13:7e:f5: fa:90:f7:fd:ca:51:e4:c2:f1:91:d6:c1:b2:ce:4c: 94:83:f6:4c:38:62:3c:e2:2d:2d:79:a5:f2:8c:6c: e0:18:d4:9b:7c:1f:9f:71:95:f6:22:4b:99:bc:db: 21:62:fe:d2:46:d1:91:0d:8b:08:f2:94:7f:e0:a5: 9f:7c:f6:64:4f:ab:5f:07:56:95:3f:20:55:fb:f9: d4:ea:5f:92:9d:a5:2c:35:54:a8:b7:cd:29:11:90: 82:2b:e3:48:29:8b:a9:8d:8b:a9:e0:74:49:a5:4d: be:e6:83:dc:4a:6a:67:22:07:d0:4e:52:66:08:ea: 04:78:11:46:db:c6:91:cc:b4:ac:e9:a9:e5:22:36: 34:04:8b:ba:05:22:a1:76:bd:38:b5:a3:a5:80:f0: a1:db:1d:dc:44:65:2f:40:c9:d5:a2:56:f1:30:bc: 4e:a8:b1:e2:2d:28:b1:6c:da:af:e2:d7:04:88:a7: d1:0b:da:af:df:ee:44:73:74:a7:59:2a:de:9d:17: 80:d1:ca:a9:6a:62:4d:3e:78:f9:66:31:ec:f7:a6: bf:8a:91:5f:3d:75:b3:08:89:cd:42:fe:3f:0d:43: ba:b4:3d:b2:66:f3:0e:00:2c:cf:b5:76:14:99:d4: 78:27: public exponent: 01:00:01: private exponent: 00:92:80:1f:f9:0d:e9:d7:bf:9b:f5:55:9b:c4:7a: 1b:6e:ce:89:14:aa:ce:14:b3:d3:88:b3:b0:97:7a: aa:a5:e1:85:9d:5f:92:ae:39:e9:85:6b:e3:a3:35: 90:12:8e:93:27:f0:ab:99:67:a5:45:41:85:de:9a: c9:b2:43:e1:8e:6c:3f:3d:72:c8:04:bc:f8:d4:26: 08:4c:58:40:bb:22:83:26:07:b8:c1:68:07:56:e8: e8:c6:5f:17:ce:92:49:c0:61:16:fd:89:68:fe:b8: 45:45:61:85:b7:4b:83:5f:17:1b:cf:ff:0b:fe:e4: cc:f9:ca:1f:66:ee:5e:74:25:94:7a:27:0e:0f:43: 50:14:48:ad:c6:8a:e1:ac:ff:8e:10:ed:e6:92:48: c8:94:c1:3a:2c:db:86:71:66:8e:19:93:13:ed:f9: 47:06:5e:8b:e2:2e:cb:3a:c2:b3:5e:8d:31:e4:c5: a7:cd:3f:09:70:e4:02:5d:34:2a:4d:b7:f5:06:e2: f5:3b:8f:b6:ad:4a:22:b8:fe:43:a7:4d:67:ef:c3: e1:ed:83:e2:d5:f2:d0:37:0f:56:ab:5b:47:69:0a: 14:03:2c:43:a3:73:e9:05:72:5e:df:68:9c:67:4b: 08:64:2d:c2:67:23:aa:e5:35:88:56:99:95:17:60: 20:01: prime1: 00:ea:ca:12:86:c0:25:b8:ab:fd:44:2c:1a:3f:1b: 19:68:d4:26:6e:9c:ad:6d:35:12:29:9f:40:c2:4c: 96:ef:8b:08:61:39:08:b7:8a:1f:81:97:71:ff:af: 5a:5b:db:9a:2f:2f:29:ab:92:bb:c5:51:a2:84:c5: f4:88:79:ac:a2:b8:17:1e:4a:66:62:be:e5:ab:fd: 01:42:6b:16:f9:73:7b:cd:3e:f7:5c:5c:95:dd:79: 73:c4:60:a8:cf:95:80:ba:7d:02:14:9c:7e:58:4f: 8c:08:2c:b8:46:31:23:b2:1a:c3:38:78:5c:ea:50: 9d:42:23:31:30:9a:0f:3f:27: prime2: 00:da:e5:d3:66:0f:34:53:8c:e8:bf:5f:1e:46:93: 47:df:30:57:be:1f:30:6a:7e:e9:f0:6b:3f:61:89: 51:e2:0b:da:51:09:65:f6:23:3a:61:86:02:46:0a: cf:11:73:7c:2d:65:bd:64:b8:0e:24:d2:b7:51:8f: 39:b4:a2:1b:e4:9a:bc:66:31:e2:00:eb:3e:20:06: 97:0a:a0:bb:82:da:bf:d5:e9:20:77:a7:55:86:69: ce:eb:38:d3:f4:ad:82:9e:ce:02:05:c5:11:aa:c0: b9:66:6f:e7:f4:26:57:72:fa:50:0b:ad:76:44:86: e0:3e:f7:c0:3e:f3:94:9f:01: coefficient: 00:94:f2:42:a9:1a:62:1c:7a:bf:34:1b:a7:87:ae: bd:3a:d9:f1:8c:4e:f6:f5:27:5a:ae:f1:1e:15:06: a6:d0:e4:e0:ec:3a:40:02:13:b9:31:9a:cd:3a:c6: 34:7d:c6:9d:9e:60:5b:ca:03:88:87:56:f0:e1:ea: 37:96:2b:53:40:b2:78:4e:80:e2:e0:24:8c:83:0e: f8:77:a4:64:d5:cc:09:6c:d6:52:49:f9:55:61:16: 72:b5:d2:ea:e1:61:fb:31:24:f0:30:8c:fe:5c:29: 71:06:09:11:4d:ef:51:a6:33:62:54:d2:c7:de:ba: 78:17:b1:27:50:f4:ef:c4:3a: exp1: 1f:36:0d:90:6c:2a:97:8a:05:78:f2:83:ea:af:a7: 89:0f:ea:ab:f9:97:f4:54:81:bd:96:b5:fd:1e:41: 52:46:a1:2e:8b:6e:65:37:af:48:82:e1:5c:a3:ea: d7:1b:32:3b:e3:81:1e:95:ba:f0:58:11:ca:a4:a6: 05:1e:67:9c:99:ec:38:d2:9b:19:b5:56:c2:ae:37: 64:a4:e7:c0:f1:61:1b:bf:ab:12:54:1c:77:fc:95: 2f:1d:ca:53:0e:04:b6:c5:b7:69:16:04:95:a8:bd: 6c:b8:c5:26:4f:91:f7:33:27:90:72:2f:a7:d6:5f: 91:53:2c:4e:d1:ac:05:31: exp2: 00:83:a4:55:a6:fa:1b:d8:e7:54:0d:ca:f1:55:36: 3b:b1:f0:cb:c3:cd:d3:fb:27:ca:1e:c9:10:bb:e2: ae:78:c7:f2:0a:6c:21:82:8e:1b:0d:0d:5f:8e:a9: ef:6f:aa:49:12:b0:2d:df:45:85:54:05:d9:33:56: 74:38:ba:89:15:c9:2c:e6:34:b7:9b:1f:de:23:ba: 72:d9:74:62:70:46:87:b9:e8:52:9b:42:e9:ff:44: e0:a8:bb:6b:54:a9:88:75:62:a4:fa:bd:52:6b:a3: 2d:9c:7a:4e:3f:99:53:5c:15:47:50:4e:88:62:9b: ce:7e:6f:d6:90:c5:42:2b:01: Public Key ID: 97:E6:DF:6D:CB:25:B2:93:33:FB:4C:29:2B:74:AA:55:2A:7B:06:E7 Public key's random art: +--[ RSA 2048]----+ | | | | | | | . | | S + . | | .+oo. . | | .=+oo.+ .| | +E.=O.oo| | o+ .=*++o| +-----------------+ -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAyMLca3nkR9K2XqYTfvX6kPf9ylHkwvGR1sGyzkyUg/ZMOGI8 4i0teaXyjGzgGNSbfB+fcZX2IkuZvNshYv7SRtGRDYsI8pR/4KWffPZkT6tfB1aV PyBV+/nU6l+SnaUsNVSot80pEZCCK+NIKYupjYup4HRJpU2+5oPcSmpnIgfQTlJm COoEeBFG28aRzLSs6anlIjY0BIu6BSKhdr04taOlgPCh2x3cRGUvQMnVolbxMLxO qLHiLSixbNqv4tcEiKfRC9qv3+5Ec3SnWSrenReA0cqpamJNPnj5ZjHs96a/ipFf PXWzCInNQv4/DUO6tD2yZvMOACzPtXYUmdR4JwIDAQABAoIBAQCSgB/5DenXv5v1 VZvEehtuzokUqs4Us9OIs7CXeqql4YWdX5KuOemFa+OjNZASjpMn8KuZZ6VFQYXe msmyQ+GObD89csgEvPjUJghMWEC7IoMmB7jBaAdW6OjGXxfOkknAYRb9iWj+uEVF YYW3S4NfFxvP/wv+5Mz5yh9m7l50JZR6Jw4PQ1AUSK3GiuGs/44Q7eaSSMiUwTos 24ZxZo4ZkxPt+UcGXoviLss6wrNejTHkxafNPwlw5AJdNCpNt/UG4vU7j7atSiK4 /kOnTWfvw+Htg+LV8tA3D1arW0dpChQDLEOjc+kFcl7faJxnSwhkLcJnI6rlNYhW mZUXYCABAoGBAOrKEobAJbir/UQsGj8bGWjUJm6crW01EimfQMJMlu+LCGE5CLeK H4GXcf+vWlvbmi8vKauSu8VRooTF9Ih5rKK4Fx5KZmK+5av9AUJrFvlze80+91xc ld15c8RgqM+VgLp9AhScflhPjAgsuEYxI7Iawzh4XOpQnUIjMTCaDz8nAoGBANrl 02YPNFOM6L9fHkaTR98wV74fMGp+6fBrP2GJUeIL2lEJZfYjOmGGAkYKzxFzfC1l vWS4DiTSt1GPObSiG+SavGYx4gDrPiAGlwqgu4Lav9XpIHenVYZpzus40/Stgp7O AgXFEarAuWZv5/QmV3L6UAutdkSG4D73wD7zlJ8BAoGAHzYNkGwql4oFePKD6q+n iQ/qq/mX9FSBvZa1/R5BUkahLotuZTevSILhXKPq1xsyO+OBHpW68FgRyqSmBR5n nJnsONKbGbVWwq43ZKTnwPFhG7+rElQcd/yVLx3KUw4EtsW3aRYElai9bLjFJk+R 9zMnkHIvp9ZfkVMsTtGsBTECgYEAg6RVpvob2OdUDcrxVTY7sfDLw83T+yfKHskQ u+KueMfyCmwhgo4bDQ1fjqnvb6pJErAt30WFVAXZM1Z0OLqJFcks5jS3mx/eI7py 2XRicEaHuehSm0Lp/0TgqLtrVKmIdWKk+r1Sa6MtnHpOP5lTXBVHUE6IYpvOfm/W kMVCKwECgYEAlPJCqRpiHHq/NBunh669OtnxjE729SdarvEeFQam0OTg7DpAAhO5 MZrNOsY0fcadnmBbygOIh1bw4eo3litTQLJ4ToDi4CSMgw74d6Rk1cwJbNZSSflV YRZytdLq4WH7MSTwMIz+XClxBgkRTe9RpjNiVNLH3rp4F7EnUPTvxDo= -----END RSA PRIVATE KEY----- wget-1.17.1/testenv/Test--https.py0000775000000000000000000000277012631756630013660 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from test.base_test import HTTP, HTTPS from misc.wget_file import WgetFile import os """ This test ensures that Wget can download files from HTTPS Servers """ TEST_NAME = "HTTPS Downloads" if os.getenv('SSL_TESTS') is None: exit (77) ############# File Definitions ############################################### File1 = "Would you like some Tea?" File2 = "With lemon or cream?" File3 = "Sure you're joking Mr. Feynman" A_File = WgetFile ("File1", File1) B_File = WgetFile ("File2", File2) C_File = WgetFile ("File3", File3) CAFILE = os.path.abspath(os.path.join(os.getenv('srcdir', '.'), 'certs', 'ca-cert.pem')) WGET_OPTIONS = "--ca-certificate=" + CAFILE WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] Existing_Files = [C_File] Servers = [HTTPS] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File, C_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, "LocalFiles" : Existing_Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test, protocols=Servers ).begin () exit (err) wget-1.17.1/testenv/Test-Content-disposition-2.py0000775000000000000000000000271712627054074016553 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget parses the Content-Disposition header correctly and creates the appropriate file when the said filename exists. """ TEST_NAME = "Content Disposition Clobber" ############# File Definitions ############################################### File1 = "Teapot" File2 = "The Teapot Protocol" # use upper case 'I' to provoke Wget failure with turkish locale File2_rules = { "SendHeader" : { "Content-DIsposition" : "Attachment; FILENAME=HTTP.Teapot" } } A_File = WgetFile ("HTTP.Teapot", File1) B_File = WgetFile ("File2", File2, rules=File2_rules) WGET_OPTIONS = "--content-disposition" WGET_URLS = [["File2"]] Files = [[B_File]] Existing_Files = [A_File] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [WgetFile ("HTTP.Teapot.1", File2), A_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, "LocalFiles" : Existing_Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/conf/0000775000000000000000000000000012632604243012137 500000000000000wget-1.17.1/testenv/conf/expect_header.py0000664000000000000000000000045312627054075015241 00000000000000from conf import rule """ Rule: ExpectHeader This rule defines a dictionary of headers and their value which the server should expect in each request for the file to which the rule was applied. """ @rule() class ExpectHeader: def __init__(self, header_obj): self.headers = header_obj wget-1.17.1/testenv/conf/authentication.py0000664000000000000000000000162112627054075015456 00000000000000from conf import rule """ Rule: Authentication This file defines an authentication rule which when applied to any file will cause the server to prompt the client for the required authentication details before serving it. auth_type must be either of: Basic, Digest, Both or Both-inline When auth_type is Basic or Digest, the server asks for the respective authentication in its response. When auth_type is Both, the server sends two Authenticate headers, one requesting Basic and the other requesting Digest authentication. If auth_type is Both-inline, the server sends only one Authenticate header, but lists both Basic and Digest as supported mechanisms in that. """ @rule() class Authentication: def __init__(self, auth_obj): self.auth_type = auth_obj['Type'] self.auth_user = auth_obj['User'] self.auth_pass = auth_obj['Pass'] self.auth_parm = auth_obj.get('Parm', None) wget-1.17.1/testenv/conf/hook_sample.py0000664000000000000000000000115712627054075014744 00000000000000from exc.test_failed import TestFailed from conf import hook """ Hook: SampleHook This a sample file for how a new hook should be defined. Any errors should always be reported by raising a TestFailed exception instead of returning a true or false value. """ @hook(alias='SampleHookAlias') class SampleHook: def __init__(self, sample_hook_arg): # do conf initialization here self.arg = sample_hook_arg def __call__(self, test_obj): # implement hook here # if you need the test case instance, refer to test_obj if False: raise TestFailed("Reason") pass wget-1.17.1/testenv/conf/expected_ret_code.py0000664000000000000000000000202312627054075016101 00000000000000from exc.test_failed import TestFailed from conf import hook """ Post-Test Hook: ExpectedRetCode This is a post-test hook which checks if the exit code of the Wget instance under test is the same as that expected. As a result, this is a very important post test hook which is checked in all the tests. Returns a TestFailed exception if the return code does not match the expected value. Else returns gracefully. """ @hook(alias='ExpectedRetcode') class ExpectedRetCode: def __init__(self, expected_ret_code): self.expected_ret_code = expected_ret_code def __call__(self, test_obj): if test_obj.ret_code != self.expected_ret_code: if test_obj.ret_code == 45: failure = "Memory Leak Found by Valgrind" else: failure = "Return codes do not match.\n" \ "Expected: %s\n" \ "Actual: %s" % (self.expected_ret_code, test_obj.ret_code) raise TestFailed(failure) wget-1.17.1/testenv/conf/response.py0000664000000000000000000000045012627054075014274 00000000000000from conf import rule """ Rule: Response When this rule is set against a certain file, the server will unconditionally respond to any request for the said file with the provided response code. """ @rule() class Response: def __init__(self, ret_code): self.response_code = ret_code wget-1.17.1/testenv/conf/expected_files.py0000664000000000000000000000365112627054075015427 00000000000000from difflib import unified_diff import os import sys from conf import hook from exc.test_failed import TestFailed """ Post-Test Hook: ExpectedFiles This is a Post-Test hook that checks the test directory for the files it contains. A dictionary object is passed to it, which contains a mapping of filenames and contents of all the files that the directory is expected to contain. Raises a TestFailed exception if the expected files are not found or if extra files are found, else returns gracefully. """ @hook() class ExpectedFiles: def __init__(self, expected_fs): self.expected_fs = expected_fs @staticmethod def gen_local_fs_snapshot(): snapshot = {} for parent, dirs, files in os.walk('.'): for name in files: f = {'content': ''} file_path = os.path.join(parent, name) with open(file_path) as fp: f['content'] = fp.read() snapshot[file_path[2:]] = f return snapshot def __call__(self, test_obj): local_fs = self.gen_local_fs_snapshot() for file in self.expected_fs: if file.name in local_fs: local_file = local_fs.pop(file.name) formatted_content = test_obj._replace_substring(file.content) if formatted_content != local_file['content']: for line in unified_diff(local_file['content'], formatted_content, fromfile='Actual', tofile='Expected'): print(line, file=sys.stderr) raise TestFailed('Contents of %s do not match' % file.name) else: raise TestFailed('Expected file %s not found.' % file.name) if local_fs: print(local_fs) raise TestFailed('Extra files downloaded.') wget-1.17.1/testenv/conf/files_crawled.py0000664000000000000000000000200412627054075015236 00000000000000from misc.colour_terminal import print_red from conf import hook from exc.test_failed import TestFailed """ Post-Test Hook: FilesCrawled This is a post test hook that is invoked in tests that check wget's behaviour in recursive mode. It expects an ordered list of the request lines that Wget must send to the server. If the requests received by the server do not match the provided list, IN THE GIVEN ORDER, then it raises a TestFailed exception. Such a test can be used to check the implementation of the recursion algorithm in Wget too. """ @hook() class FilesCrawled: def __init__(self, request_headers): self.request_headers = request_headers def __call__(self, test_obj): for headers, remaining in zip(map(set, self.request_headers), test_obj.request_remaining()): diff = headers.symmetric_difference(remaining) if diff: print_red(str(diff)) raise TestFailed('Not all files were crawled correctly.') wget-1.17.1/testenv/conf/server_files.py0000664000000000000000000000210012627054075015120 00000000000000from conf import hook """ Pre-Test Hook: ServerFiles This hook is used to define a set of files on the server's virtual filesystem. server_files is expected to be dictionary that maps filenames to their contents. In the future, this can be used to add additional metadata to the files using the WgetFile class too. This hook also does some additional processing on the contents of the file. Any text between {{and}} is replaced by the contents of a class variable of the same name. This is useful in creating files that contain an absolute link to another file on the same server. """ @hook() class ServerFiles: def __init__(self, server_files): self.server_files = server_files def __call__(self, test_obj): for server, files in zip(test_obj.servers, self.server_files): files_content = {f.name: test_obj._replace_substring(f.content) for f in files} files_rules = {f.name: test_obj.get_server_rules(f) for f in files} server.server_conf(files_content, files_rules) wget-1.17.1/testenv/conf/send_header.py0000664000000000000000000000051712627054075014703 00000000000000from conf import rule """ Rule: SendHeader Have the server send custom headers when responding to a request for the file this rule is applied to. The header_obj object is expected to be dictionary mapping headers to their contents. """ @rule() class SendHeader: def __init__(self, header_obj): self.headers = header_obj wget-1.17.1/testenv/conf/local_files.py0000664000000000000000000000141012627054075014707 00000000000000from os import utime from time import strptime from calendar import timegm from conf import hook """ Pre-Test Hook: LocalFiles This is a pre-test hook used to generate the specific environment before a test is run. The LocalFiles hook creates the files which should exist on disk before invoking Wget. """ @hook() class LocalFiles: def __init__(self, local_files): self.local_files = local_files def __call__(self, _): for f in self.local_files: with open(f.name, 'w') as fp: fp.write(f.content) if f.timestamp is not None: tstamp = timegm(strptime(f.timestamp, '%Y-%m-%d %H:%M:%S')) atime = tstamp mtime = tstamp utime(f.name, (atime, mtime)) wget-1.17.1/testenv/conf/rule_sample.py0000664000000000000000000000047012627054075014750 00000000000000from conf import rule @rule(alias='SampleRuleAlias') class SampleRule: def __init__(self, rule): # do rule initialization here # you may also need to implement a method the same name of this # class in server/protocol/protocol_server.py to apply this rule. self.rule = rule wget-1.17.1/testenv/conf/wget_commands.py0000664000000000000000000000064712627054075015275 00000000000000from conf import hook """ Pre-Test Hook: WgetCommands This hook is used to specify the test specific switches that must be passed to wget on invokation. Default switches are hard coded in the test suite itself. """ @hook() class WgetCommands: def __init__(self, commands): self.commands = commands def __call__(self, test_obj): test_obj.wget_options = test_obj._replace_substring(self.commands) wget-1.17.1/testenv/conf/reject_header.py0000664000000000000000000000047312627054075015227 00000000000000from conf import rule """ Rule: RejectHeader This is a server side rule which expects a dictionary object of Headers and their values which should be blacklisted by the server for a particular file's requests. """ @rule() class RejectHeader: def __init__(self, header_obj): self.headers = header_obj wget-1.17.1/testenv/conf/domains.py0000664000000000000000000000031012627054075014063 00000000000000from conf import hook @hook(alias='Domains') class Domains: def __init__(self, domains): self.domains = domains def __call__(self, test_obj): test_obj.domains = self.domains wget-1.17.1/testenv/conf/__init__.py0000664000000000000000000000254612627054075014205 00000000000000import os # this file implements the mechanism of conf class auto-registration, # don't modify this file if you have no idea what you're doing def gen_hook(): hook_table = {} class Wrapper: """ Decorator class which implements the conf class registration. """ def __init__(self, alias=None): self.alias = alias def __call__(self, cls): # register the class object with the name of the class hook_table[cls.__name__] = cls if self.alias: # also register the alias of the class hook_table[self.alias] = cls return cls def find_hook(name): try: return hook_table[name] except: raise AttributeError return Wrapper, find_hook _register, find_conf = gen_hook() hook = rule = _register __all__ = ['hook', 'rule'] for module in os.listdir(os.path.dirname(__file__)): # import every module under this package except __init__.py, # so that the decorator `register` applies # (nothing happens if the script is not loaded) if module != '__init__.py' and module.endswith('.py'): module_name = module[:-3] mod = __import__('%s.%s' % (__name__, module_name), globals(), locals()) __all__.append(module_name) wget-1.17.1/testenv/conf/urls.py0000664000000000000000000000047212627054075013427 00000000000000from conf import hook """ Pre-Test Hook: URLS This hook is used to define the paths of the files on the test server that wget will send a request for. """ @hook(alias='Urls') class URLs: def __init__(self, urls): self.urls = urls def __call__(self, test_obj): test_obj.urls = self.urls wget-1.17.1/testenv/Test-cookie-domain-mismatch.py0000775000000000000000000000275212627054075016761 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget identifies bad servers trying to set cookies for a different domain and rejects them. """ TEST_NAME = "Cookie Domain Mismatch" ############# File Definitions ############################################### File1 = "Would you care for a cup of coffee?" File2 = "Anyone for chocochip cookies?" File1_rules = { "SendHeader" : { # use upper case 'I' to provoke Wget failure with turkish locale "Set-Cookie" : "sess-id=0213; path=/; DoMAIn=.example.com" } } File2_rules = { "RejectHeader" : { "Cookie" : "sess-id=0213" } } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) WGET_OPTIONS = "" WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/README0000664000000000000000000003360112627054074012022 00000000000000This document describes the working of the GNU Wget Test Suite. Install Instructions: ================================================================================ This Test Suite exploits the Parallel Test Harness available in GNU Autotools. Since it uses features from a relatively recent verion of Autotools, the minimum required version as been bumped up to 1.11. Run the './configure' command to generate the Makefile and then run 'make check' to execute the Test Suite. Use the '-j n' option with 'make check' to execute n tests simultaneously. Structure: ================================================================================ * server: This package contains custom programmatically configurable servers (both HTTP and FTP) for testing Wget. The HTTP server runs an instance of Python's http.server module. The FTP server is to be implemented. * test: This package contains the test case classes for HTTP and FTP. The test case classes includes methods for initializing and cleaning up of the test environment. * Test-Proto.py: This is a prototype Test Case file. The file defines all the acceptable elements and their uses. Typically, one must copy this file and edit it for writing Test Cases. * exc: This package contains custom exception classes used in this test suite. * conf: This package contains the configuration classes for servers to be configured with. * misc: This package contains several helper modules used in this test suite. - colour_terminal.py: A custom module for printing coloured output to the terminal. Currently it only supports 4 colours in a *nix environment. - wget_file.py: Module which contains WgetFile, which is a file data container object. Working: ================================================================================ The Test Files are valid Python scripts and the default mask for them is 755. A singular Test must be invoked in the following manner: $ ./python3 OR $ ./ The script will then initialize the various elements and pass them to an object of the respective Test Class. A directory with the name -test will be created and the PWD will be changed to this directory. The server is then spawned with the required configuration elements. A blocking call to Wget is made with the command line arguments specified in the Test Case along with the list of URLs that it must download. The server is killed once Wget returns and the following checks are used to determine the pass/fail status of the test: * Return Code: The Exit code of Wget is matched against the expected Exit Code as mentioned in the Test Case File. * Downloaded Files: Check whether the expected downloaded files exist on disk. * File Content: Test whether the file contents were correctly downloaded by Wget and not corrupted mid-way. * Excess Files: Check to see whether any unexpected files were downloaded by Wget. Exit Codes: =============================================================================== Following is a list of Exit Status Codes for the tests: * 0 Test Successful * 66 Errors/Warnings Reported by Thread Sanitizer (If built with -fsanitize) * 77 Test Skipped * 99 Hard Error * 100 Test Failed Tests are skipped when they are either not supported by the platform, or Wget is not compiled with support for that feature. This feature has not yet been implemented. Hard Errors occur when there are problems with the Environment code. Hard Error reporting is currently not enabled and all errors are reported as failures. All exceptions should ideally be handled gracefully. If you see any unhandled exceptions, please file a bug report at Environment Variables: ================================================================================ * SERVER_WAIT: Set this environment variable with a value for the number of seconds the test should sleep between invoking the server and calling the Wget executable. This is used when one would like to test a different version of the executable or for running the test through external utilities like gdb and valgrind. * NO_CLEANUP: Do not remove the temporary files created by the test. This will prevent the ${testname}-test directory from being deleted * VALGRIND_TESTS: If this variable is set and contains the valgrind command line, the test suite will execute all the tests via this command. If it is set to "1", valgrind memcheck is enabled with hard coded options. This variable is set by ./configure --enable-valgrind-tests. File Structure: ================================================================================ The test case files are Python scripts. It is believed that Python is a simple yet elegant language and should be easy for everyone to comprehend. This test suite is written with the objective of making it easy to write new tests. The structure has been kept as intuitive as possible and should not require much effort to get accustomed to. All Test Files MUST begin with the following Three Lines: #!/usr/bin/python3 from sys import exit from WgetTest import {HTTPTest|FTPTest} from misc.wget_file import WgetFile It is recommended that a small description of the Test Case is provided next. This would be very helpful to future contributors. Next, is the const variable, TEST_NAME that defines the name of the Test. Each File in the Test must be represented as a WgetFile object. The WgetFile Class has the following prototype: WgetFile (str name, str contents, str timestamp, dict rules) None except name is a mandatory paramter, one may pass only those parameters that are required by the File object. The timestamp string should be in a format: "YYYY-MM-DD HH:MM:SS" in UTC zone. The rules object is a dictionary element, with the key as the Rule Name and value as the Rule Data. In most cases, the Rule Data is another dictionary. Various variables used consistently across all tests are: * WGET_OPTIONS: The command line string passed to Wget upon invokation. This string may contain URLs, like in the case where in-URL authentication is used. Variable names passed like {{var_name}} will be replaced by the contents of the variable self.var_name before being passed to Wget * WGET_URLS: This is a list of filenames which will be appended as the URLs to Wget during invokation. This is a list of lists, where WGET_URLS[0] represents the list of Filenames called from Server[0], WGET_URLS[1] is a list of files downloaded from Server[2], etc. * Files: This variable defines the files that exist in the Server's filesystem. The Files variable is a list of lists of WgetFile objects. This means that File[0] is a list of WgetFile objects that lie on Server[0], File[1] a list of files on Server[1] and so on. * Existing_Files: This is a list of files that already exist in the directory from which Wget is invoked. * ExpectedReturnCode: The Exit Code expected to be returned by Wget after the test. * ExpectedDownloadedFiles: A list of files that are expected in the local directory after Wget has finished executing. This does not include the files already existing before Wget was launched and must be mentioned again. * Request_List: An unordered list of Requests that each server must receive. This too is a list of lists and follows the same convention as others above. Both, the HTTPTest and FTPTest modules have the same prototype: { name, pre_hook, test_options, post_hook, protocols } name should be a string, and is usually passed to the TEST_NAME variable, the three hooks should be Python dict objects and protocols should be a list of protocols, like [HTTP, HTTPS]. Valid File Rules: ================================================================================ This section lists the currently supported File Rules and their structure. * Authentication: Used when a File must require Authorization for access. The value for this key is the following dictionary: |-->Type : Basic|Digest|Both|Both_inline |-->User : --->Pass : * ExpectHeader : The following Headers MUST exist in every Request for the File. The value for this key is a dictionary object where each header is represented as: |-->Header Name :
* RejectHeader : This list of Headers must NEVER occur in a request. It uses the same value format as ExpectHeader. * SendHeader : This list of Headers will be sent in EVERY response to a request for the respective file. It follows the same value format as ExpectHeader. Additionally you can specify a list of strings as
if you want the header repeated with multiple values. * Response : The HTTP Response Code to send to a request for this File. The value is an Integer that represents a valid HTTP Response Code. Pre Test Hooks: ================================================================================ The Pre-Test Hooks are executed just after starting the server and just before spawning an instance of the server. These are usually used for setting up the Test Environment and Server Rules. The currently supported Pre-Test Hooks are: * ServerFiles : A list of WgetFile objects that must exist on the Server * LocalFiles : A list of WgetFile objects that exist locally on disk before Wget is executed. Since pre_test is a dictionary, one may not assume that the hooks will be executed in the same order as they are defined. Test Options: ================================================================================ The test_options dictionary defines the commands to be used when the Test is executed. The currently supported options are: * Urls : A list of the filenames that Wget must attempt to download. The complete URL will be created and passed to Wget automatically. (alias URLs) * WgetCommands : A string consisting of the various commandline switches sent to Wget upon invokation. Any data placed between {{ }} in this string will be replaced with the contents of self. before being passed to Wget. This is particularly useful for getting the hostname and port for a file. While all Download URL's are passed to Urls, a notable exception is when in-url authentication is used. In such a case, the URL is specified in the WgetCommands string. Post-Test Hooks: ================================================================================ These hooks are executed as soon as the call to Wget returns. The post-test hooks are usually used to run checks on the data, files downloaded, return code, etc. The following hooks are currently supported: * ExpectedRetcode : This is an integer value of the ReturnCode with which Wget is expected to exit. (alias ExpectedRetCode) * ExpectedFiles : This is a list of WgetFile objects of the files that must exist locally on disk in the Test directory. * FilesCrawled : This requires a list of the Requests that the server is expected to receive. The order is un-important since it will vary on the parallel-wget branch. This hook is used in tests for Recursive mode to ensure that the website is traversed correctly. Writing New Tests: ================================================================================ See Test-Proto.py for an example of how to write Test Case files. The recommended method for writing new Test Case files is to copy Test-Proto.py and modify it to ones needs. In case you require any functionality that is not currently defined in List of Rules defined above, you should implement a new class in the conf package. The file name doesn't matter (though it's better to give it an appropriate name). The new rule or hook class should be like this: ============================================ from conf import rule @rule() class MyNewRule: def __init__(self, rule_arg): self.rule_arg = rule_arg # your rule initialization code goes here ============================================ from conf import hook @hook() class MyNewHook: def __init__(self, hook_arg): self.hook_arg = hook_arg # your hook initialization code goes here def __call__(self, test_obj): # your hook code goes here ============================================ Once a new Test File is created, it must be added to the TESTS variable in Makefile.am. This way the Test will be executed on running a 'make check'. If a Test is expected to fail on the current master branch, then the Test should also be added to the XFAIL_TESTS variable. This will allow expected failures to pass through. If a test mentioned in the XFAIL_TESTS variable passes, it gets red-flagged as a XPASS. Currently, tests expected to fail under valgrind are not explicitly marked as XFAIL. Tests failing under valgrind must always be considered a blocking error. Remember to always name the Test correctly using the TEST_NAME variable. This is essential since a directory with the Test Name is created and this can cause synchronization problems when the Parallel Test Harness is used. One can use the following command on Unix systems to check for TEST_NAME clashes: $ grep -r -h "TEST_NAME =" | cut -c13- | uniq -c -d Work Remaining: ================================================================================ Some amount of work still remains to be done. * Errors in server-side checks need to be handled more explicitly * Support parallel-wget branch * Support to spawn multiple servers is already in place. Need to handle multiple requests to a server simultaneously. Use THreading MixIn. * SSL Tests. Use xyne's HTTPS server implemention * Complete support for FTP Tests * IRI Support. This shouldn't require much effort Requirements: ================================================================================ 1. Python >= 3.0 2. Automake >= 1.11 wget-1.17.1/testenv/Test-auth-digest.py0000775000000000000000000000314312627054074014650 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures Wget's Digest Authorization Negotiation. """ TEST_NAME = "Digest Authorization" ############# File Definitions ############################################### File1 = "Need a cookie?" File2 = "Want cookies with milk!" File1_rules = { "Authentication" : { "Type" : "Digest", "User" : "Pacman", "Pass" : "Omnomnom", "Parm" : { "qop" : "auth" } } } File2_rules = { "Authentication" : { "Type" : "Digest", "User" : "Pacman", "Pass" : "Omnomnom", "Parm" : { "qop" : None } } } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) WGET_OPTIONS = "--user=Pacman --password=Omnomnom" WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-redirect-crash.py0000775000000000000000000000525212627054075015335 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile import os # This test caused wget up to 1.16 to crash #os.environ["LC_ALL"] = "en_US.UTF-8" urls = [ "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/directory", "File formats/Images/SVG, Scalable Vector Graphics/html, W3C v1.2 rec (tiny)/directory/", "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/directory/somefile.rng", "File%20formats/Images/SVG%2C%20Scalable%20Vector%20Graphics/html%2c%20W3C%20v1.2%20rec%20%28tiny%29/directory/somefile.rng", "File%20formats/Images/SVG%2C%20Scalable%20Vector%20Graphics/html%2c%20W3C%20v1.2%20rec%20%28tiny%29/directory/", "File%20formats/Images/SVG%2C%20Scalable%20Vector%20Graphics/html%2C%20W3C%20v1.2%20rec%20%28tiny%29/directory"] redirected = [ "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/directory/" ] TEST_NAME = "Redirection crash" ############# File Definitions ############################################### Index = "" for i in urls: Index = Index + "" % i File1 = "" def get_redirect(url): data = { "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/directory" : "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/directory/", "File%20formats/Images/SVG%2C%20Scalable%20Vector%20Graphics/html%2C%20W3C%20v1.2%20rec%20%28tiny%29/directory" : "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/directory/" } dest = data.get(url) if dest: return {"Response" : 301, "SendHeader" : {"Location" : "/%s" % dest}} return None index_url = "File%20formats/Images/SVG,%20Scalable%20Vector%20Graphics/html,%20W3C%20v1.2%20rec%20(tiny)/index.html" Index_File = WgetFile (index_url, Index) Files = ([Index_File] + [WgetFile(i, File1, rules=get_redirect(i)) for i in (redirected + urls)]) WGET_OPTIONS = "--recursive -e robots=off" WGET_URLS = [[index_url]] ExpectedReturnCode = 0 ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : [Files] } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedRetcode" : ExpectedReturnCode, } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/server/0000775000000000000000000000000012632604243012520 500000000000000wget-1.17.1/testenv/server/ftp/0000775000000000000000000000000012627054075013317 500000000000000wget-1.17.1/testenv/server/ftp/ftp_server.py0000664000000000000000000001241712627054075015775 00000000000000import os import re import threading import socket import pyftpdlib.__main__ from pyftpdlib.ioloop import IOLoop import pyftpdlib.handlers as Handle from pyftpdlib.servers import FTPServer from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib._compat import PY3, u, b, getcwdu, callable class FTPDHandler (Handle.FTPHandler): def ftp_LIST (self, path): try: iterator = self.run_as_current_user(self.fs.get_list_dir, path) except (OSError, FilesystemError): err = sys.exc_info()[1] why = _strerror (err) self.respond ('550 %s. ' % why) else: if self.isRule ("Bad List") is True: iter_list = list () for flist in iterator: line = re.compile (r'(\s+)').split (flist.decode ('utf-8')) line[8] = '0' iter_l = ''.join (line).encode ('utf-8') iter_list.append (iter_l) iterator = (n for n in iter_list) producer = Handle.BufferedIteratorProducer (iterator) self.push_dtp_data (producer, isproducer=True, cmd="LIST") return path def ftp_PASV (self, line): if self._epsvall: self.respond ("501 PASV not allowed after EPSV ALL.") return self._make_epasv(extmode=False) if self.isRule ("FailPASV") is True: del self.server.global_rules["FailPASV"] self.socket.close () def isRule (self, rule): rule_obj = self.server.global_rules[rule] return False if not rule_obj else rule_obj[0] class FTPDServer (FTPServer): def set_global_rules (self, rules): self.global_rules = rules class FTPd(threading.Thread): """A threaded FTP server used for running tests. This is basically a modified version of the FTPServer class which wraps the polling loop into a thread. The instance returned can be used to start(), stop() and eventually re-start() the server. """ handler = FTPDHandler server_class = FTPDServer def __init__(self, addr=None): os.mkdir ('server') os.chdir ('server') try: HOST = socket.gethostbyname ('localhost') except socket.error: HOST = 'localhost' USER = 'user' PASSWD = '12345' HOME = getcwdu () threading.Thread.__init__(self) self.__serving = False self.__stopped = False self.__lock = threading.Lock() self.__flag = threading.Event() if addr is None: addr = (HOST, 0) authorizer = DummyAuthorizer() authorizer.add_user(USER, PASSWD, HOME, perm='elradfmwM') # full perms authorizer.add_anonymous(HOME) self.handler.authorizer = authorizer # lowering buffer sizes = more cycles to transfer data # = less false positive test failures self.handler.dtp_handler.ac_in_buffer_size = 32768 self.handler.dtp_handler.ac_out_buffer_size = 32768 self.server = self.server_class(addr, self.handler) self.host, self.port = self.server.socket.getsockname()[:2] os.chdir ('..') def set_global_rules (self, rules): self.server.set_global_rules (rules) def __repr__(self): status = [self.__class__.__module__ + "." + self.__class__.__name__] if self.__serving: status.append('active') else: status.append('inactive') status.append('%s:%s' % self.server.socket.getsockname()[:2]) return '<%s at %#x>' % (' '.join(status), id(self)) @property def running(self): return self.__serving def start(self, timeout=0.001): """Start serving until an explicit stop() request. Polls for shutdown every 'timeout' seconds. """ if self.__serving: raise RuntimeError("Server already started") if self.__stopped: # ensure the server can be started again FTPd.__init__(self, self.server.socket.getsockname(), self.handler) self.__timeout = timeout threading.Thread.start(self) self.__flag.wait() def run(self): self.__serving = True self.__flag.set() while self.__serving: self.__lock.acquire() self.server.serve_forever(timeout=self.__timeout, blocking=False) self.__lock.release() self.server.close_all() def stop(self): """Stop serving (also disconnecting all currently connected clients) by telling the serve_forever() loop to stop and waits until it does. """ if not self.__serving: raise RuntimeError("Server not started yet") self.__serving = False self.__stopped = True self.join() def mk_file_sys (file_list): os.chdir ('server') for name, content in file_list.items (): file_h = open (name, 'w') file_h.write (content) file_h.close () os.chdir ('..') def filesys (): fileSys = dict () os.chdir ('server') for parent, dirs, files in os.walk ('.'): for filename in files: file_handle = open (filename, 'r') file_content = file_handle.read () fileSys[filename] = file_content os.chdir ('..') return fileSys wget-1.17.1/testenv/server/ftp/__init__.py0000664000000000000000000000000012627054075015336 00000000000000wget-1.17.1/testenv/server/http/0000775000000000000000000000000012632604243013477 500000000000000wget-1.17.1/testenv/server/http/http_server.py0000664000000000000000000004470112627054075016352 00000000000000from http.server import HTTPServer, BaseHTTPRequestHandler from exc.server_error import ServerError, AuthError, NoBodyServerError from socketserver import BaseServer from posixpath import basename, splitext from base64 import b64encode from random import random from hashlib import md5 import threading import socket import os class StoppableHTTPServer(HTTPServer): """ This class extends the HTTPServer class from default http.server library in Python 3. The StoppableHTTPServer class is capable of starting an HTTP server that serves a virtual set of files made by the WgetFile class and has most of its properties configurable through the server_conf() method. """ request_headers = list() """ Define methods for configuring the Server. """ def server_conf(self, filelist, conf_dict): """ Set Server Rules and File System for this instance. """ self.server_configs = conf_dict self.fileSys = filelist def get_req_headers(self): return self.request_headers class HTTPSServer(StoppableHTTPServer): """ The HTTPSServer class extends the StoppableHTTPServer class with additional support for secure connections through SSL. """ def __init__(self, address, handler): import ssl BaseServer.__init__(self, address, handler) # step one up because test suite change directory away from $srcdir # (don't do that !!!) CERTFILE = os.path.abspath(os.path.join('..', os.getenv('srcdir', '.'), 'certs', 'server-cert.pem')) KEYFILE = os.path.abspath(os.path.join('..', os.getenv('srcdir', '.'), 'certs', 'server-key.pem')) self.socket = ssl.wrap_socket( sock=socket.socket(self.address_family, self.socket_type), ssl_version=ssl.PROTOCOL_TLSv1, certfile=CERTFILE, keyfile=KEYFILE, server_side=True ) self.server_bind() self.server_activate() class _Handler(BaseHTTPRequestHandler): """ This is a private class which tells the server *HOW* to handle each request. For each HTTP Request Command that the server should be capable of responding to, there must exist a do_REQUESTNAME() method which details the steps in which such requests should be processed. The rest of the methods in this class are auxilliary methods created to help in processing certain requests. """ def get_rule_list(self, name): return self.rules.get(name) # The defailt protocol version of the server we run is HTTP/1.1 not # HTTP/1.0 which is the default with the http.server module. protocol_version = 'HTTP/1.1' """ Define functions for various HTTP Requests. """ def do_HEAD(self): self.send_head("HEAD") def do_GET(self): """ Process HTTP GET requests. This is the same as processing HEAD requests and then actually transmitting the data to the client. If send_head() does not specify any "start" offset, we send the complete data, else transmit only partial data. """ content, start = self.send_head("GET") if content: if start is None: self.wfile.write(content.encode('utf-8')) else: self.wfile.write(content.encode('utf-8')[start:]) def do_POST(self): """ According to RFC 7231 sec 4.3.3, if the resource requested in a POST request does not exist on the server, the first POST request should create that resource. PUT requests are otherwise used to create a resource. Hence, we call the handle for processing PUT requests if the resource requested does not already exist. Currently, when the server recieves a POST request for a resource, we simply append the body data to the existing file and return the new file to the client. If the file does not exist, a new file is created using the contents of the request body. """ path = self.path[1:] if path in self.server.fileSys: self.rules = self.server.server_configs.get(path) if not self.rules: self.rules = dict() if not self.custom_response(): return(None, None) body_data = self.get_body_data() self.send_response(200) self.add_header("Content-type", "text/plain") content = self.server.fileSys.pop(path) + "\n" + body_data total_length = len(content) self.server.fileSys[path] = content self.add_header("Content-Length", total_length) self.add_header("Location", self.path) self.finish_headers() try: self.wfile.write(content.encode('utf-8')) except Exception: pass else: self.send_put(path) def do_PUT(self): path = self.path[1:] self.rules = self.server.server_configs.get(path) if not self.custom_response(): return(None, None) self.send_put(path) """ End of HTTP Request Method Handlers. """ """ Helper functions for the Handlers. """ def parse_range_header(self, header_line, length): import re if header_line is None: return None if not header_line.startswith("bytes="): raise ServerError("Cannot parse header Range: %s" % (header_line)) regex = re.match(r"^bytes=(\d*)\-$", header_line) range_start = int(regex.group(1)) if range_start >= length: raise ServerError("Range Overflow") return range_start def get_body_data(self): cLength_header = self.headers.get("Content-Length") cLength = int(cLength_header) if cLength_header is not None else 0 body_data = self.rfile.read(cLength).decode('utf-8') return body_data def send_put(self, path): if path in self.server.fileSys: self.server.fileSys.pop(path, None) self.send_response(204) else: self.rules = dict() self.send_response(201) body_data = self.get_body_data() self.server.fileSys[path] = body_data self.add_header("Location", self.path) self.finish_headers() """ This empty method is called automatically when all the rules are processed for a given request. However, send_header() should only be called AFTER a response has been sent. But, at the moment of processing the rules, the appropriate response has not yet been identified. As a result, we defer the processing of this rule till later. Each do_* request handler MUST call finish_headers() instead of end_headers(). The finish_headers() method takes care of sending the appropriate headers before completing the response. """ def SendHeader(self, header_obj): pass def send_cust_headers(self): header_obj = self.get_rule_list('SendHeader') if header_obj: for header in header_obj.headers: self.add_header(header, header_obj.headers[header]) def finish_headers(self): self.send_cust_headers() try: for keyword, value in self._headers_dict.items(): if isinstance(value, list): for value_el in value: self.send_header(keyword, value_el) else: self.send_header(keyword, value) # Clear the dictionary of existing headers for the next request self._headers_dict.clear() except AttributeError: pass self.end_headers() def Response(self, resp_obj): self.send_response(resp_obj.response_code) self.finish_headers() if resp_obj.response_code == 304: raise NoBodyServerError("Conditional get falling to head") raise ServerError("Custom Response code sent.") def custom_response(self): codes = self.get_rule_list('Response') if codes: self.send_response(codes.response_code) self.finish_headers() return False else: return True def add_header(self, keyword, value): if not hasattr(self, "_headers_dict"): self._headers_dict = dict() self._headers_dict[keyword.lower()] = value def base64(self, data): string = b64encode(data.encode('utf-8')) return string.decode('utf-8') """ Send an authentication challenge. This method calls self.send_header() directly instead of using the add_header() method because sending multiple WWW-Authenticate headers actually makes sense and we do use that feature in some tests. """ def send_challenge(self, auth_type, auth_parm): auth_type = auth_type.lower() if auth_type == "both": self.send_challenge("basic", auth_parm) self.send_challenge("digest", auth_parm) return if auth_type == "basic": challenge_str = 'BasIc realm="Wget-Test"' elif auth_type == "digest" or auth_type == "both_inline": self.nonce = md5(str(random()).encode('utf-8')).hexdigest() self.opaque = md5(str(random()).encode('utf-8')).hexdigest() # 'DIgest' to provoke a Wget failure with turkish locales challenge_str = 'DIgest realm="Test", nonce="%s", opaque="%s"' % ( self.nonce, self.opaque) try: if auth_parm['qop']: challenge_str += ', qop="%s"' % auth_parm['qop'] except KeyError: pass if auth_type == "both_inline": # 'BasIc' to provoke a Wget failure with turkish locales challenge_str = 'BasIc realm="Wget-Test", ' + challenge_str self.send_header("WWW-Authenticate", challenge_str) def authorize_basic(self, auth_header, auth_rule): if auth_header is None or auth_header.split(' ')[0].lower() != 'basic': return False else: self.user = auth_rule.auth_user self.passw = auth_rule.auth_pass auth_str = "basic " + self.base64(self.user + ":" + self.passw) return True if auth_str.lower() == auth_header.lower() else False def parse_auth_header(self, auth_header): n = len("digest ") auth_header = auth_header[n:].strip() items = auth_header.split(", ") keyvals = [i.split("=", 1) for i in items] keyvals = [(k.strip(), v.strip().replace('"', '')) for k, v in keyvals] return dict(keyvals) def KD(self, secret, data): return self.H(secret + ":" + data) def H(self, data): return md5(data.encode('utf-8')).hexdigest() def A1(self): return "%s:%s:%s" % (self.user, "Test", self.passw) def A2(self, params): return "%s:%s" % (self.command, params["uri"]) def check_response(self, params): if "qop" in params: data_str = params['nonce'] \ + ":" + params['nc'] \ + ":" + params['cnonce'] \ + ":" + params['qop'] \ + ":" + self.H(self.A2(params)) else: data_str = params['nonce'] + ":" + self.H(self.A2(params)) resp = self.KD(self.H(self.A1()), data_str) return True if resp == params['response'] else False def authorize_digest(self, auth_header, auth_rule): if auth_header is None or \ auth_header.split(' ')[0].lower() != 'digest': return False else: self.user = auth_rule.auth_user self.passw = auth_rule.auth_pass params = self.parse_auth_header(auth_header) if self.user != params['username'] or \ self.nonce != params['nonce'] or \ self.opaque != params['opaque']: return False req_attribs = ['username', 'realm', 'nonce', 'uri', 'response'] for attrib in req_attribs: if attrib not in params: return False if not self.check_response(params): return False def authorize_both(self, auth_header, auth_rule): return False def authorize_both_inline(self, auth_header, auth_rule): return False def Authentication(self, auth_rule): try: self.handle_auth(auth_rule) except AuthError as se: self.send_response(401, "Authorization Required") self.send_challenge(auth_rule.auth_type, auth_rule.auth_parm) self.finish_headers() raise se def handle_auth(self, auth_rule): is_auth = True auth_header = self.headers.get("Authorization") required_auth = auth_rule.auth_type.lower() if required_auth == "both" or required_auth == "both_inline": if auth_header: auth_type = auth_header.split(' ')[0].lower() else: auth_type = required_auth else: auth_type = required_auth try: assert hasattr(self, "authorize_" + auth_type) is_auth = getattr(self, "authorize_" + auth_type)(auth_header, auth_rule) except AssertionError: raise AuthError("Authentication Mechanism %s not supported" % auth_type) except AttributeError as ae: raise AuthError(ae.__str__()) if is_auth is False: raise AuthError("Unable to Authenticate") def ExpectHeader(self, header_obj): exp_headers = header_obj.headers for header_line in exp_headers: header_recd = self.headers.get(header_line) if header_recd is None or header_recd != exp_headers[header_line]: self.send_error(400, "Expected Header %s not found" % header_line) self.finish_headers() raise ServerError("Header " + header_line + " not found") def RejectHeader(self, header_obj): rej_headers = header_obj.headers for header_line in rej_headers: header_recd = self.headers.get(header_line) if not header_recd and header_recd == rej_headers[header_line]: self.send_error(400, 'Blacklisted Header %s received' % header_line) self.finish_headers() raise ServerError("Header " + header_line + ' received') def __log_request(self, method): req = method + " " + self.path self.server.request_headers.append(req) def send_head(self, method): """ Common code for GET and HEAD Commands. This method is overriden to use the fileSys dict. The method variable contains whether this was a HEAD or a GET Request. According to RFC 2616, the server should not differentiate between the two requests, however, we use it here for a specific test. """ if self.path == "/": path = "index.html" else: path = self.path[1:] self.__log_request(method) if path in self.server.fileSys: self.rules = self.server.server_configs.get(path) content = self.server.fileSys.get(path) content_length = len(content) for rule_name in self.rules: try: assert hasattr(self, rule_name) getattr(self, rule_name)(self.rules[rule_name]) except AssertionError as ae: msg = "Rule " + rule_name + " not defined" self.send_error(500, msg) return(None, None) except AuthError as ae: print(ae.__str__()) return(None, None) except NoBodyServerError as nbse: print(nbse.__str__()) return(None, None) except ServerError as se: print(se.__str__()) return(content, None) try: self.range_begin = self.parse_range_header( self.headers.get("Range"), content_length) except ServerError as ae: # self.log_error("%s", ae.err_message) if ae.err_message == "Range Overflow": self.send_response(416) self.finish_headers() return(None, None) else: self.range_begin = None if self.range_begin is None: self.send_response(200) else: self.send_response(206) self.add_header("Accept-Ranges", "bytes") self.add_header("Content-Range", "bytes %d-%d/%d" % (self.range_begin, content_length - 1, content_length)) content_length -= self.range_begin cont_type = self.guess_type(path) self.add_header("Content-Type", cont_type) self.add_header("Content-Length", content_length) self.finish_headers() return(content, self.range_begin) else: self.send_error(404, "Not Found") return(None, None) def guess_type(self, path): base_name = basename("/" + path) name, ext = splitext(base_name) extension_map = { ".txt": "text/plain", ".css": "text/css", ".html": "text/html" } return extension_map.get(ext, "text/plain") class HTTPd(threading.Thread): server_class = StoppableHTTPServer handler = _Handler def __init__(self, addr=None): threading.Thread.__init__(self) if addr is None: addr = ('localhost', 0) self.server_inst = self.server_class(addr, self.handler) self.server_address = self.server_inst.socket.getsockname()[:2] def run(self): self.server_inst.serve_forever() def server_conf(self, file_list, server_rules): self.server_inst.server_conf(file_list, server_rules) class HTTPSd(HTTPd): server_class = HTTPSServer # vim: set ts=4 sts=4 sw=4 tw=79 et : wget-1.17.1/testenv/server/http/__init__.py0000664000000000000000000000000012627054075015524 00000000000000wget-1.17.1/testenv/server/__init__.py0000664000000000000000000000000012627054075014545 00000000000000wget-1.17.1/testenv/Test-auth-retcode.py0000775000000000000000000000214512627054074015017 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget returns the correct return code when sent a 403 Forbidden by the Server. """ TEST_NAME = "Forbidden Retcode" ############# File Definitions ############################################### File1 = "Apples and Oranges? Really?" File1_rules = { "Response" : 403 } A_File = WgetFile ("File1", File1, rules=File1_rules) WGET_OPTIONS = "" WGET_URLS = [["File1"]] Files = [[A_File]] ExpectedReturnCode = 8 ExpectedDownloadedFiles = [] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test--spider-r.py0000775000000000000000000000460012627054074014233 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test executed Wget in Spider mode with recursive retrieval. """ TEST_NAME = "Recursive Spider" ############# File Definitions ############################################### mainpage = """ Main Page

Some text and a link to a second page. Also, a broken link.

""" secondpage = """ Second Page

Some text and a link to a third page. Also, a broken link.

""" thirdpage = """ Third Page

Some text and a link to a text file. Also, another broken link.

""" dummyfile = "Don't care." index_html = WgetFile ("index.html", mainpage) secondpage_html = WgetFile ("secondpage.html", secondpage) thirdpage_html = WgetFile ("thirdpage.html", thirdpage) dummy_txt = WgetFile ("dummy.txt", dummyfile) Request_List = [ [ "HEAD /", "GET /", "GET /robots.txt", "HEAD /secondpage.html", "GET /secondpage.html", "HEAD /nonexistent", "HEAD /thirdpage.html", "GET /thirdpage.html", "HEAD /dummy.txt", "HEAD /againnonexistent" ] ] WGET_OPTIONS = "--spider -r" WGET_URLS = [[""]] Files = [[index_html, secondpage_html, thirdpage_html, dummy_txt]] ExpectedReturnCode = 8 ExpectedDownloadedFiles = [] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode, "FilesCrawled" : Request_List } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test--convert-links--content-on-error.py0000775000000000000000000000347512627054074020603 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget link conversion works also on HTTP error pages. """ TEST_NAME = "Test--convert-links--content-on-error" ############# File Definitions ############################################### a_x_FileContent = """ """ a_x_LocalFileContent = """ """ error_FileContent = '404 page content' error_FileRules = { 'Response': 404 , 'SendHeader': { 'Content-Length': len(error_FileContent), 'Content-Type': 'text/plain', } } a_x_File = WgetFile ("a/x.html", a_x_FileContent) robots_File = WgetFile ("robots.txt", '') error_File = WgetFile ("b/y.html", error_FileContent, rules=error_FileRules) B_File = WgetFile ("a/x.html", a_x_LocalFileContent) WGET_OPTIONS = "--no-host-directories -r -l2 --convert-links --content-on-error" WGET_URLS = [["a/x.html"]] Files = [[a_x_File, robots_File, error_File]] ExpectedReturnCode = 8 ExpectedDownloadedFiles = [B_File, robots_File, error_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-cookie-expires.py0000775000000000000000000000422612627054075015364 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget handles Cookie expiry dates correctly. Simultaneuously, we also check if multiple cookies to the same domain are handled correctly """ TEST_NAME = "Cookie Expires" ############# File Definitions ############################################### File1 = "Hello World!" File2 = "'Ello! This is Amazing!" File3 = "So what are we looking at?" File4 = "This was downloaded" File1_rules = { "SendHeader" : { "Set-Cookie" : "sess-id=0213; path=/" } } File2_rules = { "ExpectHeader" : { "Cookie" : "sess-id=0213" }, "SendHeader" : { "Set-Cookie" : "new-sess=N" } } File3_rules = { "SendHeader" : { # use upper case 'I' to provoke Wget failure with turkish locale "Set-Cookie" : "sess-id=0213; path=/; ExPIRes=Sun, 06 Nov 2001 12:32:43 GMT" }, "ExpectHeader" : { "Cookie" : "new-sess=N; sess-id=0213" } } File4_rules = { "RejectHeader" : { "Cookie" : "sess-id=0213" }, "ExpectHeader" : { "Cookie" : "new-sess=N" } } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) C_File = WgetFile ("File3", File3, rules=File3_rules) D_File = WgetFile ("File4", File4, rules=File4_rules) WGET_OPTIONS = "" WGET_URLS = [["File1", "File2", "File3", "File4"]] Files = [[A_File, B_File, C_File, D_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File, C_File, D_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test--rejected-log.py0000775000000000000000000000550512627054074015057 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test executed Wget in recursive mode with a rejected log outputted. """ TEST_NAME = "Rejected Log" ############# File Definitions ############################################### mainpage = """ Main Page

Recurse to a second page.

""" secondpage = """ Second Page

Recurse to a third page. Try the blacklisted main page.

""" thirdpage = """ Third Page

Try a hidden dummy file. Try to leave to another domain.

""" robots = """ User-agent: * Disallow: /dummy.txt """ log = """\ REASON U_URL U_SCHEME U_HOST U_PORT U_PATH U_PARAMS U_QUERY U_FRAGMENT P_URL P_SCHEME P_HOST P_PORT P_PATH P_PARAMS P_QUERY P_FRAGMENT BLACKLIST http%3A//127.0.0.1%3A{{port}}/index.html SCHEME_HTTP 127.0.0.1 {{port}} index.html http%3A//127.0.0.1%3A{{port}}/secondpage.html SCHEME_HTTP 127.0.0.1 {{port}} secondpage.html ROBOTS http%3A//127.0.0.1%3A{{port}}/dummy.txt SCHEME_HTTP 127.0.0.1 {{port}} dummy.txt http%3A//127.0.0.1%3A{{port}}/thirdpage.html SCHEME_HTTP 127.0.0.1 {{port}} thirdpage.html SPANNEDHOST http%3A//no.such.domain/ SCHEME_HTTP no.such.domain 80 http%3A//127.0.0.1%3A{{port}}/thirdpage.html SCHEME_HTTP 127.0.0.1 {{port}} thirdpage.html """ dummyfile = "Don't care." index_html = WgetFile ("index.html", mainpage) secondpage_html = WgetFile ("secondpage.html", secondpage) thirdpage_html = WgetFile ("thirdpage.html", thirdpage) robots_txt = WgetFile ("robots.txt", robots) dummy_txt = WgetFile ("dummy.txt", dummyfile) log_csv = WgetFile ("log.csv", log) WGET_OPTIONS = "-nd -r --rejected-log log.csv" WGET_URLS = [["index.html"]] Files = [[index_html, secondpage_html, thirdpage_html, robots_txt, dummy_txt]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [index_html, secondpage_html, thirdpage_html, robots_txt, log_csv] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-auth-both.py0000775000000000000000000000440312627054074014325 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures Wget's Basic Authorization Negotiation. Also, we ensure that Wget saves the host after a successfull auth and doesn't wait for a challenge the second time. """ TEST_NAME = "Multiple authentication support" ############# File Definitions ############################################### File1 = "Would you like some Tea?" File2 = "With lemon or cream?" File3 = "Sure you're joking Mr. Feynman" File1_rules = { "Authentication" : { "Type" : "Both", "User" : "Sauron", "Pass" : "TheEye", "Parm" : { "qop" : "auth" } }, "RejectHeader" : { "Authorization" : "Basic U2F1cm9uOlRoZUV5ZQ==" } } File2_rules = { "Authentication" : { "Type" : "Both_inline", "User" : "Sauron", "Pass" : "TheEye", "Parm" : { "qop" : "auth" } }, "RejectHeader" : { "Authorization" : "Basic U2F1cm9uOlRoZUV5ZQ==" } } File3_rules = { "Authentication" : { "Type" : "Digest", "User" : "Sauron", "Pass" : "TheEye", "Parm" : { "qop" : "auth" } } } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) C_File = WgetFile ("File3", File3, rules=File3_rules) WGET_OPTIONS = "--user=Sauron --password=TheEye" WGET_URLS = [["File1", "File2", "File3"]] Files = [[A_File, B_File, C_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File, C_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/exc/0000775000000000000000000000000012632604243011771 500000000000000wget-1.17.1/testenv/exc/test_failed.py0000664000000000000000000000023112627054075014550 00000000000000 class TestFailed(Exception): """ A Custom Exception raised by the Test Environment. """ def __init__(self, error): self.error = error wget-1.17.1/testenv/exc/server_error.py0000664000000000000000000000111312627054075015004 00000000000000 class ServerError (Exception): """ A custom exception which is raised by the test servers. Often used to handle control flow. """ def __init__(self, err_message): self.err_message = err_message class NoBodyServerError (Exception): """ A custom exception which is raised by the test servers. Used if no body should be sent in response. """ def __init__(self, err_message): self.err_message = err_message class AuthError (ServerError): """ A custom exception raised byt he servers when authentication of the request fails. """ pass wget-1.17.1/testenv/exc/__init__.py0000664000000000000000000000000012627054075014016 00000000000000wget-1.17.1/testenv/Makefile.am0000664000000000000000000000645312631756630013205 00000000000000# Makefile for `wget' utility # Copyright (C) 2013, 2015 Free Software Foundation, Inc. # 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 Wget. If not, see . # Additional permission under GNU GPL version 3 section 7 # If you modify this program, or any covered work, by linking or # combining it with the OpenSSL project's OpenSSL library (or a # modified version of that library), containing parts covered by the # terms of the OpenSSL or SSLeay licenses, the Free Software Foundation # grants you additional permission to convey the resulting work. # Corresponding Source for a non-source form of such a combination # shall include the source code for the parts of OpenSSL used as well # as that of the covered work. if METALINK_IS_ENABLED METALINK_TESTS = Test-metalink-xml.py \ Test-metalink-http.py else METALINK_TESTS = endif AUTOMAKE_OPTIONS = parallel-tests AM_TESTS_ENVIRONMENT = export WGETRC=/dev/null; MAKE_CHECK=True; export MAKE_CHECK;\ export PYTHONPATH=$$PYTHONPATH:$(srcdir); export VALGRIND_TESTS="@VALGRIND_TESTS@"; if WITH_SSL AM_TESTS_ENVIRONMENT += export SSL_TESTS=1; endif if HAVE_PYTHON3 TESTS = Test-auth-basic-fail.py \ Test-auth-basic.py \ Test-auth-both.py \ Test-auth-digest.py \ Test-auth-no-challenge.py \ Test-auth-no-challenge-url.py \ Test-auth-retcode.py \ Test-auth-with-content-disposition.py \ Test-c-full.py \ Test-Content-disposition-2.py \ Test-Content-disposition.py \ Test--convert-links--content-on-error.py \ Test-cookie-401.py \ Test-cookie-domain-mismatch.py \ Test-cookie-expires.py \ Test-cookie.py \ Test-Head.py \ Test--https.py \ Test--https-crl.py \ Test-hsts.py \ Test-O.py \ Test-Post.py \ Test-504.py \ Test--spider-r.py \ Test--rejected-log.py \ Test-redirect-crash.py \ Test-reserved-chars.py \ Test-condget.py \ $(METALINK_TESTS) endif EXTRA_DIST = certs conf exc misc server test README $(TESTS) TEST_EXTENSIONS = .py PY_LOG_COMPILER = python3 AM_PY_LOG_FLAGS = -O wget-1.17.1/testenv/Test-auth-with-content-disposition.py0000775000000000000000000000260712627054074020362 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget handles Content-Disposition correctly when coupled with Authentication """ TEST_NAME = "Authentication with Content Disposition" ############# File Definitions ############################################### File1 = "Need a cookie?" File1_rules = { "Authentication" : { "Type" : "Basic", "User" : "Pacman", "Pass" : "Omnomnom" }, "SendHeader" : { "Content-Disposition" : "Attachment; filename=Arch" } } A_File = WgetFile ("File1", File1, rules=File1_rules) WGET_OPTIONS = "--user=Pacman --password=Omnomnom --content-disposition" WGET_URLS = [["File1"]] Files = [[A_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [WgetFile ("Arch", File1)] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-auth-no-challenge-url.py0000775000000000000000000000254212627054074016527 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures Wget's Basic Authorization Negotiation, when credentials are provided in-URL """ TEST_NAME = "Auth no challenge in URL" ############# File Definitions ############################################### File1 = "Need a cookie?" File1_rules = { "Authentication" : { "Type" : "Basic", "User" : "Pacman", "Pass" : "Omnomnom" }, "ExpectHeader" : { "Authorization" : "Basic UGFjbWFuOk9tbm9tbm9t" } } A_File = WgetFile ("File1", File1, rules=File1_rules) WGET_OPTIONS = "--auth-no-challenge http://Pacman:Omnomnom@localhost:{{port}}/File1" WGET_URLS = [[]] Files = [[A_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-Content-disposition.py0000775000000000000000000000310012627054074016377 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget parses the Content-Disposition header correctly and creates a local file accordingly. """ TEST_NAME = "Content Disposition Header" ############# File Definitions ############################################### File1 = """All that is gold does not glitter, Not all those who wander are lost; The old that is strong does not wither, Deep roots are not reached by the frost. From the ashes a fire shall be woken, A light from the shadows shall spring; Renewed shall be blade that was broken, The crownless again shall be king.""" File1_rules = { "SendHeader" : { "Content-Disposition" : "Attachment; filename=JRR.Tolkein" } } A_File = WgetFile ("LOTR", File1, rules=File1_rules) WGET_OPTIONS = "--content-disposition" WGET_URLS = [["LOTR"]] Files = [[A_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [WgetFile ("JRR.Tolkein", File1)] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-504.py0000775000000000000000000000402512627054074012742 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget handles a 504 Gateway Timeout response correctly. Since, we do not have a direct mechanism for conditionally sending responses via the HTTP Server, I've used a workaround. The server will always respond to a request for File1 with a 504 Gateway Timeout. Using the --tries=2 option, we ensure that Wget attempts the file only twice and then move on to the next file. Finally, check the exact requests that the Server received and compare them, in order, to the expected sequence of requests. In this case, we expect Wget to attempt File1 twice and File2 once. If Wget considered 504 as a general Server Error, it would be a fatal failure and Wget would request File1 only once. """ TEST_NAME = "504 Gateway Timeouts" ############# File Definitions ############################################### File1 = """All happy families are alike; Each unhappy family is unhappy in its own way""" File2 = "Anyone for chocochip cookies?" File1_rules = { "Response" : 504 } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2) Request_List = [ [ "GET /File1", "GET /File1", "GET /File2", ] ] WGET_OPTIONS = "--tries=2" WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] ExpectedReturnCode = 4 ExpectedDownloadedFiles = [B_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode, "FilesCrawled" : Request_List } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Makefile.in0000664000000000000000000020317112632605303013201 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile for `wget' utility # Copyright (C) 2013, 2015 Free Software Foundation, Inc. # 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 Wget. If not, see . # Additional permission under GNU GPL version 3 section 7 # If you modify this program, or any covered work, by linking or # combining it with the OpenSSL project's OpenSSL library (or a # modified version of that library), containing parts covered by the # terms of the OpenSSL or SSLeay licenses, the Free Software Foundation # grants you additional permission to convey the resulting work. # Corresponding Source for a non-source form of such a combination # shall include the source code for the parts of OpenSSL used as well # as that of the covered work. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @WITH_SSL_TRUE@am__append_1 = export SSL_TESTS=1; @HAVE_PYTHON3_TRUE@TESTS = Test-auth-basic-fail.py Test-auth-basic.py \ @HAVE_PYTHON3_TRUE@ Test-auth-both.py Test-auth-digest.py \ @HAVE_PYTHON3_TRUE@ Test-auth-no-challenge.py \ @HAVE_PYTHON3_TRUE@ Test-auth-no-challenge-url.py \ @HAVE_PYTHON3_TRUE@ Test-auth-retcode.py \ @HAVE_PYTHON3_TRUE@ Test-auth-with-content-disposition.py \ @HAVE_PYTHON3_TRUE@ Test-c-full.py \ @HAVE_PYTHON3_TRUE@ Test-Content-disposition-2.py \ @HAVE_PYTHON3_TRUE@ Test-Content-disposition.py \ @HAVE_PYTHON3_TRUE@ Test--convert-links--content-on-error.py \ @HAVE_PYTHON3_TRUE@ Test-cookie-401.py \ @HAVE_PYTHON3_TRUE@ Test-cookie-domain-mismatch.py \ @HAVE_PYTHON3_TRUE@ Test-cookie-expires.py Test-cookie.py \ @HAVE_PYTHON3_TRUE@ Test-Head.py Test--https.py \ @HAVE_PYTHON3_TRUE@ Test--https-crl.py Test-hsts.py Test-O.py \ @HAVE_PYTHON3_TRUE@ Test-Post.py Test-504.py Test--spider-r.py \ @HAVE_PYTHON3_TRUE@ Test--rejected-log.py \ @HAVE_PYTHON3_TRUE@ Test-redirect-crash.py \ @HAVE_PYTHON3_TRUE@ Test-reserved-chars.py Test-condget.py \ @HAVE_PYTHON3_TRUE@ $(am__EXEEXT_1) subdir = testenv ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/arpa_inet_h.m4 \ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/base32.m4 \ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/close.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 \ $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/flock.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fseek.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/futimens.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/gl-openssl.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mkdir.m4 \ $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/posix_spawn.m4 $(top_srcdir)/m4/printf.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/secure_getenv.m4 \ $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/servent.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sha256.m4 \ $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/sigpipe.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \ $(top_srcdir)/m4/socketlib.m4 $(top_srcdir)/m4/sockets.m4 \ $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sockpfaf.m4 \ $(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdalign.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtok_r.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timegm.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/unistd-safer.m4 \ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/vsnprintf.m4 \ $(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \ $(top_srcdir)/m4/wget.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck @METALINK_IS_ENABLED_TRUE@am__EXEEXT_1 = Test-metalink-xml.py \ @METALINK_IS_ENABLED_TRUE@ Test-metalink-http.py TEST_SUITE_LOG = test-suite.log am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.py.log=.log) PY_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver PY_LOG_COMPILE = $(PY_LOG_COMPILER) $(AM_PY_LOG_FLAGS) $(PY_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/test-driver README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMENT_IF_NO_POD2MAN = @COMMENT_IF_NO_POD2MAN@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOCK = @GNULIB_FLOCK@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@ GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@ GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@ GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@ GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@ GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@ GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@ GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@ GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@ GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PSELECT = @GNULIB_PSELECT@ GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GPGME_CFLAGS = @GPGME_CFLAGS@ GPGME_CONFIG = @GPGME_CONFIG@ GPGME_LIBS = @GPGME_LIBS@ GREP = @GREP@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FLOCK = @HAVE_FLOCK@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBGNUTLS = @HAVE_LIBGNUTLS@ HAVE_LIBSSL = @HAVE_LIBSSL@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@ HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@ HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PSELECT = @HAVE_PSELECT@ HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCHED_H = @HAVE_SCHED_H@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SPAWN_H = @HAVE_SPAWN_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VALGRIND = @HAVE_VALGRIND@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HOSTENT_LIB = @HOSTENT_LIB@ ICONV_CONST = @ICONV_CONST@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNUTLS = @LIBGNUTLS@ LIBGNUTLS_PREFIX = @LIBGNUTLS_PREFIX@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPSL_CFLAGS = @LIBPSL_CFLAGS@ LIBPSL_LIBS = @LIBPSL_LIBS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBSSL = @LIBSSL@ LIBSSL_PREFIX = @LIBSSL_PREFIX@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_CRYPTO = @LIB_CRYPTO@ LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@ LIB_SELECT = @LIB_SELECT@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBGNUTLS = @LTLIBGNUTLS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBSSL = @LTLIBSSL@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ METALINK_CFLAGS = @METALINK_CFLAGS@ METALINK_LIBS = @METALINK_LIBS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NETINET_IN_H = @NETINET_IN_H@ NETTLE_LIBS = @NETTLE_LIBS@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SCHED_H = @NEXT_SCHED_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_SPAWN_H = @NEXT_SPAWN_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GAI_STRERROR = @REPLACE_GAI_STRERROR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ REPLACE_INET_PTON = @REPLACE_INET_PTON@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PSELECT = @REPLACE_PSELECT@ REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SCHED_H = @SCHED_H@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDALIGN_H = @STDALIGN_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VALGRIND_TESTS = @VALGRIND_TESTS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ 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@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @METALINK_IS_ENABLED_FALSE@METALINK_TESTS = @METALINK_IS_ENABLED_TRUE@METALINK_TESTS = Test-metalink-xml.py \ @METALINK_IS_ENABLED_TRUE@ Test-metalink-http.py AUTOMAKE_OPTIONS = parallel-tests AM_TESTS_ENVIRONMENT = export WGETRC=/dev/null; MAKE_CHECK=True; \ export MAKE_CHECK; export PYTHONPATH=$$PYTHONPATH:$(srcdir); \ export VALGRIND_TESTS="@VALGRIND_TESTS@"; $(am__append_1) EXTRA_DIST = certs conf exc misc server test README $(TESTS) TEST_EXTENSIONS = .py PY_LOG_COMPILER = python3 AM_PY_LOG_FLAGS = -O all: all-am .SUFFIXES: .SUFFIXES: .log .py .py$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testenv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu testenv/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .py.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(PY_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_PY_LOG_DRIVER_FLAGS) $(PY_LOG_DRIVER_FLAGS) -- $(PY_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.py$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(PY_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_PY_LOG_DRIVER_FLAGS) $(PY_LOG_DRIVER_FLAGS) -- $(PY_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am recheck tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wget-1.17.1/testenv/Test-Post.py0000775000000000000000000000241712627054074013362 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ Simple test for HTTP POST Requests usiong the --method command """ TEST_NAME = "HTTP POST Requests" ############# File Definitions ############################################### File1 = """A reader lives a thousand lives before he dies, said Jojen. The man who never reads lives only one""" File1_response = """A reader lives a thousand lives before he dies, said Jojen. The man who never reads lives only one TestMessage""" A_File = WgetFile ("File1", File1) WGET_OPTIONS = "--method=post --body-data=TestMessage" WGET_URLS = [["File1"]] Files = [[A_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [WgetFile ("File1", File1_response)] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-Head.py0000775000000000000000000000205512627054074013274 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget correctly handles responses to HEAD requests and does not actually download any data """ TEST_NAME = "HEAD Requests" ############# File Definitions ############################################### File1 = "You shall not pass!" A_File = WgetFile ("File1", File1) WGET_OPTIONS = "--method=HEAD" WGET_URLS = [["File1"]] Files = [[A_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-O.py0000775000000000000000000000211412627054074012625 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget correctly handles the -O command for output filenames. """ TEST_NAME = "Output Filename Command" ############# File Definitions ############################################### File1 = "Test Contents." A_File = WgetFile ("File1", File1) WGET_OPTIONS = "-O NewFile.txt" WGET_URLS = [["File1"]] Files = [[A_File]] ExistingFiles = [A_File] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [WgetFile ("NewFile.txt", File1)] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-hsts.py0000775000000000000000000000373412631756630013423 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from test.base_test import HTTP, HTTPS from misc.wget_file import WgetFile import time import os """ This test makes sure Wget can parse a given HSTS database and apply the indicated HSTS policy. """ TEST_NAME = "HSTS basic test" print (os.getenv('SSL_TESTS')) if os.getenv('SSL_TESTS') is None: exit (77) def hsts_database_path(): hsts_file = ".wget-hsts-testenv" return os.path.abspath(hsts_file) def create_hsts_database(path, host, port): # we want the current time as an integer, # not as a floating point curtime = int(time.time()) max_age = "123456" f = open(path, "w") f.write("# dummy comment\n") f.write(host + "\t" + str(port) + "\t0\t" + str(curtime) + "\t" + max_age + "\n") f.close() File_Name = "hw" File_Content = "Hello, world!" File = WgetFile(File_Name, File_Content) Hsts_File_Path = hsts_database_path() CAFILE = os.path.abspath(os.path.join(os.getenv('srcdir', '.'), 'certs', 'ca-cert.pem')) WGET_OPTIONS = "--hsts-file=" + Hsts_File_Path + " --ca-certificate=" + CAFILE WGET_URLS = [[File_Name]] Files = [[File]] Servers = [HTTPS] Requests = ["http"] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [File] pre_test = { "ServerFiles" : Files, "Domains" : ["localhost"] } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetCode" : ExpectedReturnCode, } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } test = HTTPTest( name = TEST_NAME, pre_hook = pre_test, post_hook = post_test, test_params = test_options, protocols = Servers, req_protocols = Requests ) # start the web server and create the temporary HSTS database test.setup() create_hsts_database(Hsts_File_Path, 'localhost', test.port) err = test.begin() # remove the temporary HSTS database os.unlink(hsts_database_path()) exit(err) wget-1.17.1/testenv/Test-auth-basic.py0000775000000000000000000000303512627054074014452 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures Wget's Basic Authorization Negotiation. Also, we ensure that Wget saves the host after a successfull auth and doesn't wait for a challenge the second time. """ TEST_NAME = "Basic Authorization" ############# File Definitions ############################################### File1 = "I am an invisble man." File2 = "I too am an invisible man." File1_rules = { "Authentication" : { "Type" : "Basic", "User" : "Sauron", "Pass" : "TheEye" } } File2_rules = { "ExpectHeader" : { "Authorization" : "Basic U2F1cm9uOlRoZUV5ZQ==" } } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) WGET_OPTIONS = "--user=Sauron --password=TheEye" WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, B_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/test/0000775000000000000000000000000012632604243012171 500000000000000wget-1.17.1/testenv/test/http_test.py0000664000000000000000000000412712627054075014513 00000000000000from misc.colour_terminal import print_green from server.http.http_server import HTTPd, HTTPSd from test.base_test import BaseTest, HTTP, HTTPS class HTTPTest(BaseTest): """ Class for HTTP Tests. """ # Temp Notes: It is expected that when pre-hook functions are executed, # only an empty test-dir exists. pre-hook functions are executed just prior # to the call to Wget is made. post-hook functions will be executed # immediately after the call to Wget returns. def __init__(self, name="Unnamed Test", pre_hook=None, test_params=None, post_hook=None, protocols=(HTTP,), req_protocols=None): super(HTTPTest, self).__init__(name, pre_hook, test_params, post_hook, protocols, req_protocols) def setup(self): self.server_setup() self.ready = True def begin(self): if not self.ready: # this is to maintain compatibility with scripts that # don't call setup() self.setup() with self: # If any exception occurs, self.__exit__ will be immediately called. # We must call the parent method in the end in order to verify # whether the tests succeeded or not. if self.ready: self.do_test() print_green("Test Passed.") else: self.tests_passed = False super(HTTPTest, self).begin() def instantiate_server_by(self, protocol): server = {HTTP: HTTPd, HTTPS: HTTPSd}[protocol]() server.start() return server def request_remaining(self): return [s.server_inst.get_req_headers() for s in self.servers] def stop_server(self): for server in self.servers: server.server_inst.shutdown() # vim: set ts=4 sts=4 sw=4 tw=80 et : wget-1.17.1/testenv/test/base_test.py0000664000000000000000000002067412627054075014453 00000000000000import os import shutil import shlex import traceback import re import time from subprocess import call from misc.colour_terminal import print_red, print_blue from exc.test_failed import TestFailed import conf HTTP = "HTTP" HTTPS = "HTTPS" class BaseTest: """ Class that defines methods common to both HTTP and FTP Tests. Note that this is an abstract class, subclasses must implement * stop_server() * instantiate_server_by(protocol) """ def __init__(self, name, pre_hook, test_params, post_hook, protocols, req_protocols): """ Define the class-wide variables (or attributes). Attributes should not be defined outside __init__. """ self.name = name # if pre_hook == None, then {} (an empty dict object) is passed to # self.pre_configs self.pre_configs = pre_hook or {} self.test_params = test_params or {} self.post_configs = post_hook or {} self.protocols = protocols if req_protocols is None: self.req_protocols = map(lambda p: p.lower(), self.protocols) else: self.req_protocols = req_protocols self.servers = [] self.domains = [] self.ports = [] self.addr = None self.port = -1 self.wget_options = '' self.urls = [] self.tests_passed = True self.ready = False self.init_test_env() self.ret_code = 0 def get_test_dir(self): return self.name + '-test' def init_test_env(self): test_dir = self.get_test_dir() try: os.mkdir(test_dir) except FileExistsError: shutil.rmtree(test_dir) os.mkdir(test_dir) os.chdir(test_dir) def get_domain_addr(self, addr): # TODO if there's a multiple number of ports, wouldn't it be # overridden to the port of the last invocation? # Set the instance variables 'addr' and 'port' so that # they can be queried by test cases. self.addr = str(addr[0]) self.port = str(addr[1]) return [self.addr, self.port] def server_setup(self): print_blue("Running Test %s" % self.name) for protocol in self.protocols: instance = self.instantiate_server_by(protocol) self.servers.append(instance) # servers instantiated by different protocols may differ in # ports and etc. # so we should record different domains respect to servers. domain = self.get_domain_addr(instance.server_address) self.domains.append(domain[0]) self.ports.append(domain[1]) def exec_wget(self): cmd_line = self.gen_cmd_line() params = shlex.split(cmd_line) print(params) if os.getenv("SERVER_WAIT"): time.sleep(float(os.getenv("SERVER_WAIT"))) try: ret_code = call(params) except FileNotFoundError: raise TestFailed("The Wget Executable does not exist at the " "expected path.") return ret_code def gen_cmd_line(self): test_path = os.path.abspath(".") wget_path = os.path.abspath(os.path.join(test_path, "..", '..', 'src', "wget")) wget_options = '--debug --no-config %s' % self.wget_options valgrind = os.getenv("VALGRIND_TESTS", "") gdb = os.getenv("GDB_TESTS", "") # GDB has precedence over Valgrind # If both VALGRIND_TESTS and GDB_TESTS are defined, # GDB will be executed. if gdb == "1": cmd_line = 'gdb --args %s %s ' % (wget_path, wget_options) elif valgrind == "1": cmd_line = 'valgrind --error-exitcode=301 ' \ '--leak-check=yes ' \ '--track-origins=yes ' \ '--suppressions=../valgrind-suppression-ssl ' \ '%s %s ' % (wget_path, wget_options) elif valgrind not in ("", "0"): cmd_line = '%s %s %s ' % (os.getenv("VALGRIND_TESTS", ""), wget_path, wget_options) else: cmd_line = '%s %s ' % (wget_path, wget_options) for req_protocol, urls, domain, port in zip(self.req_protocols, self.urls, self.domains, self.ports): # zip is function for iterating multiple lists at the same time. # e.g. for item1, item2 in zip([1, 5, 3], # ['a', 'e', 'c']): # print(item1, item2) # generates the following output: # 1 a # 5 e # 3 c for url in urls: cmd_line += '%s://%s:%s/%s ' % (req_protocol, domain, port, url) print(cmd_line) return cmd_line def __test_cleanup(self): os.chdir('..') try: if not os.getenv("NO_CLEANUP"): shutil.rmtree(self.get_test_dir()) except: print("Unknown Exception while trying to remove Test Environment.") def _exit_test(self): self.__test_cleanup() def begin(self): return 0 if self.tests_passed else 100 def call_test(self): self.hook_call(self.test_params, 'Test Option') try: self.ret_code = self.exec_wget() except TestFailed as e: raise e finally: self.stop_server() def do_test(self): self.pre_hook_call() self.call_test() self.post_hook_call() def hook_call(self, configs, name): for conf_name, conf_arg in configs.items(): try: # conf.find_conf(conf_name) returns the required conf class, # then the class is instantiated with conf_arg, then the # conf instance is called with this test instance itself to # invoke the desired hook conf.find_conf(conf_name)(conf_arg)(self) except AttributeError: self.stop_server() raise TestFailed("%s %s not defined." % (name, conf_name)) def pre_hook_call(self): self.hook_call(self.pre_configs, 'Pre Test Function') def post_hook_call(self): self.hook_call(self.post_configs, 'Post Test Function') def _replace_substring(self, string): """ Replace first occurrence of "{{name}}" in @string with "getattr(self, name)". """ pattern = re.compile(r'\{\{\w+\}\}') match_obj = pattern.search(string) if match_obj is not None: rep = match_obj.group() temp = getattr(self, rep.strip('{}')) string = string.replace(rep, temp) return string def instantiate_server_by(self, protocol): """ Subclasses must override this method to actually instantiate servers for test cases. """ raise NotImplementedError def stop_server(self): """ Subclasses must implement this method in order to stop certain servers of different types. """ raise NotImplementedError @staticmethod def get_server_rules(file_obj): """ The handling of expect header could be made much better when the options are parsed in a true and better fashion. For an example, see the commented portion in Test-basic-auth.py. """ server_rules = {} for rule_name, rule in file_obj.rules.items(): server_rules[rule_name] = conf.find_conf(rule_name)(rule) return server_rules def __enter__(self): """ Initialization for with statement. """ return self def __exit__(self, exc_type, exc_val, exc_tb): """ If the with statement got executed with no exception raised, then exc_type, exc_val, exc_tb are all None. """ if exc_val: self.tests_passed = False if exc_type is TestFailed: print_red('Error: %s.' % exc_val.error) else: print_red('Unhandled exception caught.') print(exc_val) traceback.print_tb(exc_tb) self.__test_cleanup() return True wget-1.17.1/testenv/test/__init__.py0000664000000000000000000000000012627054075014216 00000000000000wget-1.17.1/testenv/Test-auth-basic-fail.py0000775000000000000000000000241012627054074015357 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget returns the correct exit code when Basic authentcation failes due to a username/password error. """ TEST_NAME = "Basic Authentication Failure" ############# File Definitions ############################################### File1 = "I am an invisble man." File1_rules = { "Authentication" : { "Type" : "Basic", "User" : "Sauron", "Pass" : "TheEye" } } A_File = WgetFile ("File1", File1, rules=File1_rules) WGET_OPTIONS = "--user=Sauron --password=Eye" WGET_URLS = [["File1"]] Files = [[A_File]] ExpectedReturnCode = 6 ExpectedDownloadedFiles = [] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/misc/0000775000000000000000000000000012632604243012145 500000000000000wget-1.17.1/testenv/misc/wget_file.py0000664000000000000000000000050512627054075014412 00000000000000 class WgetFile: """ WgetFile is a File Data Container object """ def __init__( self, name, content="Test Contents", timestamp=None, rules=None ): self.name = name self.content = content self.timestamp = timestamp self.rules = rules or {} wget-1.17.1/testenv/misc/colour_terminal.py0000664000000000000000000000272112627054075015645 00000000000000from functools import partial import platform from os import getenv import sys """ This module allows printing coloured output to the terminal when running a Wget Test under certain conditions. The output is coloured only on Linux systems. This is because coloured output in the terminal on Windows requires too much effort for what is simply a convenience. This might work on OSX terminals, but without a confirmation, it remains unsupported. Another important aspect is that the coloured output is printed only if the environment variable MAKE_CHECK is not set. This variable is set when running the test suite through, `make check`. In that case, the output is not only printed to the terminal but also copied to a log file where the ANSI escape codes on;y add clutter. """ T_COLORS = { 'PURPLE': '\033[95m', 'BLUE': '\033[94m', 'GREEN': '\033[92m', 'YELLOW': '\033[93m', 'RED': '\033[91m', 'ENDC': '\033[0m' } system = True if platform.system() in ('Linux', 'Darwin') else False check = False if getenv("MAKE_CHECK") == 'True' else True def printer(color, string): if sys.stdout.isatty() and system and check: print(T_COLORS.get(color) + string + T_COLORS.get('ENDC')) else: print(string) print_blue = partial(printer, 'BLUE') print_red = partial(printer, 'RED') print_green = partial(printer, 'GREEN') print_purple = partial(printer, 'PURPLE') print_yellow = partial(printer, 'YELLOW') # vim: set ts=8 sw=3 tw=80 et : wget-1.17.1/testenv/misc/__init__.py0000664000000000000000000000000012627054075014172 00000000000000wget-1.17.1/testenv/Test-metalink-xml.py0000775000000000000000000000477612627054075015052 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile import re import hashlib """ This is to test Metalink as XML file support in Wget. """ TEST_NAME = "Metalink in XML" ############# File Definitions ############################################### File1 = "Would you like some Tea?" File1_lowPref = "Do not take this" File1_sha256 = hashlib.sha256 (File1.encode ('UTF-8')).hexdigest () MetaXml = \ """ GNU Wget GNU GPL http://www.gnu.org/licenses/gpl.html Wget Test File 1 1.2.3 Wget Test File 1 description {{FILE1_HASH}} http://broken.example/File1 http://{{SRV_HOST}}:{{SRV_PORT}}/File1_lowPref http://{{SRV_HOST}}:{{SRV_PORT}}/File1 """ A_File = WgetFile ("File1", File1) B_File = WgetFile ("File1_lowPref", File1_lowPref) MetaFile = WgetFile ("test.meta4", MetaXml) WGET_OPTIONS = "--input-metalink test.meta4" WGET_URLS = [[]] Files = [[A_File, B_File]] Existing_Files = [MetaFile] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, MetaFile] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, "LocalFiles" : Existing_Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } http_test = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test, ) http_test.server_setup() ### Get and use dynamic server sockname srv_host, srv_port = http_test.servers[0].server_inst.socket.getsockname () MetaXml = re.sub (r'{{FILE1_HASH}}', File1_sha256, MetaXml) MetaXml = re.sub (r'{{SRV_HOST}}', srv_host, MetaXml) MetaXml = re.sub (r'{{SRV_PORT}}', str (srv_port), MetaXml) MetaFile.content = MetaXml err = http_test.begin () exit (err) wget-1.17.1/testenv/Test-auth-no-challenge.py0000775000000000000000000000254512627054074015732 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures Wget's Basic Authorization Negotiation, when the --auth-no-challenge command is used. """ TEST_NAME = "Auth No Challenge Command" ############# File Definitions ############################################### File1 = "Need a cookie?" File1_rules = { "Authentication" : { "Type" : "Basic", "User" : "Pacman", "Pass" : "Omnomnom" }, "ExpectHeader" : { "Authorization" : "Basic UGFjbWFuOk9tbm9tbm9t" } } A_File = WgetFile ("File1", File1, rules=File1_rules) WGET_OPTIONS = "--auth-no-challenge --user=Pacman --password=Omnomnom" WGET_URLS = [["File1"]] Files = [[A_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-cookie-401.py0000775000000000000000000000270012627054075014204 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget stores the cookie even in the event of a 401 Unauthorized Response """ TEST_NAME = "Basic Cookie 401 Response" ############# File Definitions ############################################### File1 = """All happy families are alike; Each unhappy family is unhappy in its own way""" File2 = "Anyone for chocochip cookies?" File1_rules = { "SendHeader" : { "Set-Cookie" : "sess-id=0213; path=/" }, "Response" : 401 } File2_rules = { "ExpectHeader" : { "Cookie" : "sess-id=0213" }, } A_File = WgetFile ("File1", File1, rules=File1_rules) B_File = WgetFile ("File2", File2, rules=File2_rules) WGET_OPTIONS = "" WGET_URLS = [["File1", "File2"]] Files = [[A_File, B_File]] ExpectedReturnCode = 6 ExpectedDownloadedFiles = [B_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-reserved-chars.py0000775000000000000000000000264312627054075015354 00000000000000#!/usr/bin/env python3 from sys import exit from os import environ # to set LC_ALL from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget keeps reserved characters in URLs in non-UTF-8 charsets. """ # This bug only happened with ASCII charset, # so we need to set LC_ALL="C" in order to reproduce it. environ["LC_ALL"] = "C" TEST_NAME = "URLs with reserved characters" ######### File Definitions ######### RequestList = [ [ "HEAD /base.html", "GET /base.html", "GET /robots.txt", "HEAD /a%2Bb.html", "GET /a%2Bb.html" ] ] A_File_Name = "base.html" B_File_Name = "a%2Bb.html" A_File = WgetFile (A_File_Name, "") B_File = WgetFile (B_File_Name, "this is file B") WGET_OPTIONS = " --spider -r" WGET_URLS = [[A_File_Name]] Files = [[A_File, B_File]] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [] ######### Pre and Post Test Hooks ######### pre_test = { "ServerFiles" : Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode, "FilesCrawled" : RequestList } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/testenv/Test-metalink-http.py0000775000000000000000000001110112627054075015205 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile import re import hashlib from base64 import b64encode """ This is to test Metalink as HTTP file support in Wget. """ TEST_NAME = "Metalink in HTTP" # Helper function for hostname, port and digest substitution def SubstituteServerInfo (text, host, port, digest): text = re.sub (r'{{FILE1_HASH}}', digest, text) text = re.sub (r'{{SRV_HOST}}', host, text) text = re.sub (r'{{SRV_PORT}}', str (port), text) return text ############# File Definitions ############################################### File1 = "Would you like some Tea?" File1_corrupted = "Would you like some Coffee?" File1_lowPref = "Do not take this" File1_sha256 = b64encode (hashlib.sha256 (File1.encode ('UTF-8')).digest ()).decode ('ascii') Signature = '''-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) This is no valid signature. But it should be downloaded. The attempt to verify should fail but should not prevent a successful metalink resource retrieval (the sig failure should not be fatal). -----END PGP SIGNATURE----- ''' File2 = "No meta data for this file." LinkHeaders = [ # This file has low priority and should not be picked. "; rel=duplicate; pri=9; geo=pl", # This file should be picked second, after hash failure. "; rel =duplicate;pref; pri=7", # This signature download will fail. "; rel=describedby; type=application/pgp-signature", # Two good signatures "; rel=describedby; type=application/pgp-signature", "; rel=describedby; type=application/pgp-signature", # Bad URL scheme "; rel=duplicate; pri=4", # rel missing "; pri=1; pref", # invalid rel "; rel=strange; pri=4", # This file should be picked first, because it has the lowest pri among preferred. "; rel=duplicate; geo=su; pri=4; pref", # This file should NOT be picked third due to preferred location set to 'uk' "; rel =duplicate;pri=5", # This file should be picked as third try, and it should succeed "; rel=duplicate; pri=5;geo=uk" ] DigestHeader = "SHA-256={{FILE1_HASH}}" # This will be filled as soon as we know server hostname and port MetaFileRules = {'SendHeader' : {}} FileOkServer = WgetFile ("File1_try3_ok", File1) FileBadPref = WgetFile ("File1_lowPref", File1_lowPref) FileBadHash = WgetFile ("File1_try1_corrupted", File1_corrupted) MetaFile = WgetFile ("test.meta", rules=MetaFileRules) # In case of Metalink over HTTP, the local file name is # derived from the URL suffix. FileOkLocal = WgetFile ("test.meta", File1) SigFile = WgetFile ("Sig.asc", Signature) FileNoMeta = WgetFile ("File2", File2) WGET_OPTIONS = "--metalink-over-http --preferred-location=uk" WGET_URLS = [["test.meta", "File2"]] Files = [[FileOkServer, FileBadPref, FileBadHash, MetaFile, SigFile, FileNoMeta]] Existing_Files = [] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [FileNoMeta, FileOkLocal] RequestList = [ [ "HEAD /test.meta", "GET /Sig2.asc", "GET /Sig.asc", "GET /File1_try1_corrupted", "GET /File1_try3_ok", "HEAD /File2", "GET /File2", ] ] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, "LocalFiles" : Existing_Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode, "FilesCrawled" : RequestList, } http_test = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test, ) http_test.server_setup() srv_host, srv_port = http_test.servers[0].server_inst.socket.getsockname () MetaFileRules["SendHeader"] = { 'Link': [ SubstituteServerInfo (LinkHeader, srv_host, srv_port, File1_sha256) for LinkHeader in LinkHeaders ], 'Digest': SubstituteServerInfo (DigestHeader, srv_host, srv_port, File1_sha256), } err = http_test.begin () exit (err) wget-1.17.1/testenv/Test-c-full.py0000775000000000000000000000265412627054074013622 00000000000000#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ Test Wget's response when the file requested already exists on disk with a filesize greater than or equal to the requested file. """ TEST_NAME = "Test continue option" ############# File Definitions ############################################### File1 = "abababababababababababababababababababababababababababababababababab" File2 = "ababababababababababababababababababab" A_File = WgetFile ("File1", File1) B_File = WgetFile ("File1", File1) C_File = WgetFile ("File2", File1) D_File = WgetFile ("File2", File2) E_File = WgetFile ("File3", File1) WGET_OPTIONS = "-c" WGET_URLS = [["File1", "File2", "File3"]] Files = [[A_File, C_File, E_File]] Existing_Files = [B_File, D_File] ExpectedReturnCode = 0 ExpectedDownloadedFiles = [A_File, C_File, E_File] ################ Pre and Post Test Hooks ##################################### pre_test = { "ServerFiles" : Files, "LocalFiles" : Existing_Files } test_options = { "WgetCommands" : WGET_OPTIONS, "Urls" : WGET_URLS } post_test = { "ExpectedFiles" : ExpectedDownloadedFiles, "ExpectedRetcode" : ExpectedReturnCode } err = HTTPTest ( name=TEST_NAME, pre_hook=pre_test, test_params=test_options, post_hook=post_test ).begin () exit (err) wget-1.17.1/README0000664000000000000000000000774012627054026010334 00000000000000 -*- text -*- GNU Wget ======== Current Web home: http://www.gnu.org/software/wget/ GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. It can follow links in HTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is sometimes referred to as "recursive downloading." While doing that, Wget respects the Robot Exclusion Standard (/robots.txt). Wget can be instructed to convert the links in downloaded HTML files to the local files for offline viewing. Recursive downloading also works with FTP, where Wget can retrieves a hierarchy of directories and files. With both HTTP and FTP, Wget can check whether a remote file has changed on the server since the previous run, and only download the newer files. Wget has been designed for robustness over slow or unstable network connections; if a download fails due to a network problem, it will keep retrying until the whole file has been retrieved. If the server supports regetting, it will instruct the server to continue the download from where it left off. If you are behind a firewall that requires the use of a socks style gateway, you can get the socks library and compile wget with support for socks. Most of the features are configurable, either through command-line options, or via initialization file .wgetrc. Wget allows you to install a global startup file (/usr/local/etc/wgetrc by default) for site settings. Wget works under almost all Unix variants in use today and, unlike many of its historical predecessors, is written entirely in C, thus requiring no additional software, such as Perl. The external software it does work with, such as OpenSSL, is optional. As Wget uses the GNU Autoconf, it is easily built on and ported to new Unix-like systems. The installation procedure is described in the INSTALL file. As with other GNU software, the latest version of Wget can be found at the master GNU archive site ftp.gnu.org, and its mirrors. Wget resides at . Please report bugs in Wget to . See the file `MAILING-LIST' for information about Wget mailing lists. Wget's home page is at . If you would like to contribute code for Wget, please read http://wget.addictivecode.org/PatchGuidelines. Wget was originally written and mainained by Hrvoje Niksic. Please see the file AUTHORS for a list of major contributors, and the ChangeLogs for a detailed listing of all contributions. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 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, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Additional permission under GNU GPL version 3 section 7 If you modify this program, or any covered work, by linking or combining it with the OpenSSL project's OpenSSL library (or a modified version of that library), containing parts covered by the terms of the OpenSSL or SSLeay licenses, the Free Software Foundation grants you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of OpenSSL used as well as that of the covered work. wget-1.17.1/util/0000775000000000000000000000000012632615677010514 500000000000000wget-1.17.1/util/README0000664000000000000000000000073212620135231011272 00000000000000 -*- text -*- This directory contains various optional utilities to help you use Wget. rmold.pl ======== This Perl script is used to check which local files are no longer on the remote server. You can use it to get the list of files, or $ rmold.pl [dir] | xargs rm trunc ===== This small program may be used to create files of arbitrary size; useful for testing certain scenarios using wget's --continue option. wget-1.17.1/util/trunc.c0000664000000000000000000000556412627054075011736 00000000000000/* trunc.c: Set the size of an existing file, or create a file of a * specified size. * * Copyright (C) 2008 Micah J. Cowan * * Copying and distribution of this file, with or without modification, * are permitted in any medium without royalty provided the copyright * notice and this notice are preserved. */ #include #include #include #include #include #include #define PROGRAM_NAME "trunc" void usage (FILE *f) { fputs ( PROGRAM_NAME " [-c] file sz\n\ \n\ Set the filesize of FILE to SIZE.\n\ \n\ -c: create FILE if it doesn't exist.\n\ \n\ Multiplier suffixes for SIZE (case-insensitive):\n\ k: SIZE * 1024\n\ m: SIZE * 1024 * 1024\n", f); } off_t get_size (const char str[]) { unsigned long val; int suffix; char *end; errno = 0; val = strtoul(str, &end, 10); if (end == str) { fputs (PROGRAM_NAME ": size is not a number.\n", stderr); usage (stderr); exit (EXIT_FAILURE); } else if (errno == ERANGE || (unsigned long)(off_t)val != val) { fputs (PROGRAM_NAME ": size is out of range.\n", stderr); exit (EXIT_FAILURE); } suffix = tolower ((unsigned char) end[0]); if (suffix == 'k') { val *= 1024; } else if (suffix == 'm') { val *= 1024 * 1024; } return val; } int main (int argc, char *argv[]) { const char *fname; const char *szstr; off_t sz; int create = 0; int option; int fd; #ifdef ENABLE_NLS /* Set the current locale. */ setlocale (LC_ALL, ""); /* Set the text message domain. */ bindtextdomain ("wget", LOCALEDIR); textdomain ("wget"); #endif /* ENABLE_NLS */ /* Parse options. */ while ((option = getopt (argc, argv, "c")) != -1) { switch (option) { case 'c': create = 1; break; case '?': fprintf (stderr, PROGRAM_NAME ": Unrecognized option `%c'.\n\n", optopt); usage (stderr); exit (EXIT_FAILURE); default: /* We shouldn't reach here. */ abort(); } } if (argv[optind] == NULL || argv[optind+1] == NULL || argv[optind+2] != NULL) { usage (stderr); exit (EXIT_FAILURE); } fname = argv[optind]; szstr = argv[optind+1]; sz = get_size(szstr); if (create) { mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; fd = open(fname, O_WRONLY | O_CREAT, mode); } else { fd = open(fname, O_WRONLY); } if (fd == -1) { perror (PROGRAM_NAME ": open"); exit (EXIT_FAILURE); } if (ftruncate(fd, sz) == -1) { perror (PROGRAM_NAME ": truncate"); exit (EXIT_FAILURE); } if (close (fd) < 0) { perror (PROGRAM_NAME ": close"); exit (EXIT_FAILURE); } return 0; } wget-1.17.1/util/Makefile.am0000664000000000000000000000256012627054075012464 00000000000000# Makefile for `wget' utility # Copyright (C) 1995, 1996, 1997, 2007, 2008, 2009, 2010, 2011, 2015 # Free Software Foundation, Inc. # 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 . # Additional permission under GNU GPL version 3 section 7 # If you modify this program, or any covered work, by linking or # combining it with the OpenSSL project's OpenSSL library (or a # modified version of that library), containing parts covered by the # terms of the OpenSSL or SSLeay licenses, the Free Software Foundation # grants you additional permission to convey the resulting work. # Corresponding Source for a non-source form of such a combination # shall include the source code for the parts of OpenSSL used as well # as that of the covered work. # # Version: @VERSION@ # EXTRA_DIST = README rmold.pl trunc.c wget-1.17.1/util/Makefile.in0000664000000000000000000014600412632605303012467 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile for `wget' utility # Copyright (C) 1995, 1996, 1997, 2007, 2008, 2009, 2010, 2011, 2015 # Free Software Foundation, Inc. # 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 . # Additional permission under GNU GPL version 3 section 7 # If you modify this program, or any covered work, by linking or # combining it with the OpenSSL project's OpenSSL library (or a # modified version of that library), containing parts covered by the # terms of the OpenSSL or SSLeay licenses, the Free Software Foundation # grants you additional permission to convey the resulting work. # Corresponding Source for a non-source form of such a combination # shall include the source code for the parts of OpenSSL used as well # as that of the covered work. # # Version: @VERSION@ # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = util ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/arpa_inet_h.m4 \ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/base32.m4 \ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/close.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 \ $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/flock.m4 \ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fseek.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ $(top_srcdir)/m4/futimens.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/gl-openssl.m4 $(top_srcdir)/m4/glibc21.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/iconv_h.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libunistring-base.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mkdir.m4 \ $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/posix_spawn.m4 $(top_srcdir)/m4/printf.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/secure_getenv.m4 \ $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/servent.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sha256.m4 \ $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/sigpipe.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \ $(top_srcdir)/m4/socketlib.m4 $(top_srcdir)/m4/sockets.m4 \ $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sockpfaf.m4 \ $(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-time.m4 \ $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdalign.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strchrnul.m4 \ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/strerror_r.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtok_r.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/sys_file_h.m4 \ $(top_srcdir)/m4/sys_ioctl_h.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_uio_h.m4 \ $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timegm.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/unistd-safer.m4 \ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utimens.m4 \ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/vsnprintf.m4 \ $(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wcwidth.m4 \ $(top_srcdir)/m4/wget.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMENT_IF_NO_POD2MAN = @COMMENT_IF_NO_POD2MAN@ CONFIG_INCLUDE = @CONFIG_INCLUDE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETADDRINFO_LIB = @GETADDRINFO_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOCK = @GNULIB_FLOCK@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_ICONV = @GNULIB_ICONV@ GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ GNULIB_INET_PTON = @GNULIB_INET_PTON@ GNULIB_IOCTL = @GNULIB_IOCTL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@ GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@ GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@ GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@ GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@ GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@ GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@ GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@ GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@ GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PSELECT = @GNULIB_PSELECT@ GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GPGME_CFLAGS = @GPGME_CFLAGS@ GPGME_CONFIG = @GPGME_CONFIG@ GPGME_LIBS = @GPGME_LIBS@ GREP = @GREP@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FLOCK = @HAVE_FLOCK@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBGNUTLS = @HAVE_LIBGNUTLS@ HAVE_LIBSSL = @HAVE_LIBSSL@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@ HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@ HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PSELECT = @HAVE_PSELECT@ HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCHED_H = @HAVE_SCHED_H@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SPAWN_H = @HAVE_SPAWN_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VALGRIND = @HAVE_VALGRIND@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HOSTENT_LIB = @HOSTENT_LIB@ ICONV_CONST = @ICONV_CONST@ ICONV_H = @ICONV_H@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBGNUTLS = @LIBGNUTLS@ LIBGNUTLS_PREFIX = @LIBGNUTLS_PREFIX@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPSL_CFLAGS = @LIBPSL_CFLAGS@ LIBPSL_LIBS = @LIBPSL_LIBS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBSSL = @LIBSSL@ LIBSSL_PREFIX = @LIBSSL_PREFIX@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_CRYPTO = @LIB_CRYPTO@ LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@ LIB_SELECT = @LIB_SELECT@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBGNUTLS = @LTLIBGNUTLS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBSSL = @LTLIBSSL@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ METALINK_CFLAGS = @METALINK_CFLAGS@ METALINK_LIBS = @METALINK_LIBS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NETINET_IN_H = @NETINET_IN_H@ NETTLE_LIBS = @NETTLE_LIBS@ NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SCHED_H = @NEXT_SCHED_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_SPAWN_H = @NEXT_SPAWN_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@ NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GAI_STRERROR = @REPLACE_GAI_STRERROR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_ICONV = @REPLACE_ICONV@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ REPLACE_INET_PTON = @REPLACE_INET_PTON@ REPLACE_IOCTL = @REPLACE_IOCTL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PSELECT = @REPLACE_PSELECT@ REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SCHED_H = @SCHED_H@ SED = @SED@ SERVENT_LIB = @SERVENT_LIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDALIGN_H = @STDALIGN_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VALGRIND_TESTS = @VALGRIND_TESTS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ 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@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = README rmold.pl trunc.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu util/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wget-1.17.1/util/rmold.pl0000775000000000000000000000441612627054075012107 00000000000000#!/usr/bin/env perl -w # Copyright (C) 1995, 1996, 1997, 2007, 2008, 2009, 2010, 2011, 2015 # Free Software Foundation, Inc. # 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 . # This script is a very lame hack to remove local files, until the # time when Wget proper will have this functionality. # Use with utmost care! # If the remote server supports BSD-style listings, set this to 0. $sysvlisting = 1; $verbose = 0; if (@ARGV && ($ARGV[0] eq '-v')) { shift; $verbose = 1; } (@dirs = @ARGV) || push (@dirs,'.'); foreach $_ (@dirs) { &procdir($_); } # End here sub procdir { local $dir = shift; local(@lcfiles, @lcdirs, %files, @fl); print STDERR "Processing directory '$dir':\n" if $verbose; opendir(DH, $dir) || die("Cannot open $dir: $!\n"); @lcfiles = (); @lcdirs = (); # Read local files and directories. foreach $_ (readdir(DH)) { /^(\.listing|\.\.?)$/ && next; lstat ("$dir/$_"); if (-d _) { push (@lcdirs, $_); } else { push (@lcfiles, $_); } } closedir(DH); # Parse .listing if (open(FD, "<$dir/.listing")) { while () { # Weed out the line beginning with 'total' /^total/ && next; # Weed out everything but plain files and symlinks. /^[-l]/ || next; @fl = split; $files{$fl[7 + $sysvlisting]} = 1; } close FD; foreach $_ (@lcfiles) { if (!$files{$_}) { print "$dir/$_\n"; } } } else { print STDERR "Warning: $dir/.listing: $!\n"; } foreach $_ (@lcdirs) { &procdir("$dir/$_"); } } wget-1.17.1/MAILING-LIST0000664000000000000000000000364512627054074011233 00000000000000Mailing Lists ============= Primary List ------------ The primary mailinglist for discussion, bug-reports, or questions about GNU Wget is at . To subscribe, send an email to , or visit `http://lists.gnu.org/mailman/listinfo/bug-wget'. You do not need to subscribe to send a message to the list; however, please note that unsubscribed messages are moderated, and may take a while before they hit the list--*usually around a day*. If you want your message to show up immediately, please subscribe to the list before posting. Archives for the list may be found at `http://lists.gnu.org/pipermail/bug-wget/'. An NNTP/Usenettish gateway is also available via Gmane (http://gmane.org/about.php). You can see the Gmane archives at `http://news.gmane.org/gmane.comp.web.wget.general'. Note that the Gmane archives conveniently include messages from both the current list, and the previous one. Messages also show up in the Gmane archives sooner than they do at `lists.gnu.org'. Bug Notices List ---------------- Additionally, there is the mailing list. This is a non-discussion list that receives bug report notifications from the bug-tracker. To subscribe to this list, send an email to , or visit `http://addictivecode.org/mailman/listinfo/wget-notify'. Obsolete Lists -------------- Previously, the mailing list was used as the main discussion list, and another list, was used for submitting and discussing patches to GNU Wget. Messages from are archived at `http://www.mail-archive.com/wget%40sunsite.dk/' and at `http://news.gmane.org/gmane.comp.web.wget.general' (which also continues to archive the current list, ). Messages from are archived at `http://news.gmane.org/gmane.comp.web.wget.patches'. wget-1.17.1/msdos/0000775000000000000000000000000012632615674010661 500000000000000wget-1.17.1/msdos/Makefile.DJ0000664000000000000000000000441312627054074012532 00000000000000# # GNU Makefile for wget / djgpp / MSDOS. # By Gisle Vanem 2009. # # `cd' to `./src' and issue the command: # make -f ../msdos/Makefile.dj depend # followed by: # make -f ../msdos/Makefile.dj # VERSION = 1.12 (djgpp/DOS) .SUFFIXES: .exe VPATH = ../lib ../md5 ../msdos USE_OPENSSL = 0 USE_IPV6 = 1 # # Change to suite. # OPENSSL_ROOT = e:/net/OpenSSL.099 ZLIB_ROOT = e:/djgpp/contrib/zlib OBJ_DIR = djgpp.obj CC = gcc CFLAGS = -O2 -g -Wall -Wcast-align -I. -I../msdos -I../lib -I../md5 \ -I/dev/env/WATT_ROOT/inc -DHAVE_CONFIG_H -DENABLE_DEBUG \ -DUSE_WATT32 # LDFLAGS = -s ifeq ($(USE_OPENSSL),1) CFLAGS += -DHAVE_OPENSSL -DHAVE_SSL -DOPENSSL_NO_KRB5 -I$(OPENSSL_ROOT) EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a \ $(ZLIB_ROOT)/libz.a SOURCES += openssl.c http-ntlm.c endif ifeq ($(USE_IPV6),1) CFLAGS += -DENABLE_IPV6 endif EX_LIBS += /dev/env/WATT_ROOT/lib/libwatt.a SOURCES += cmpt.c connect.c cookies.c exits.c ftp.c ftp-basic.c ftp-ls.c \ ftp-opie.c hash.c host.c html-parse.c html-url.c http.c \ init.c log.c main.c gen-md5.c netrc.c progress.c recur.c \ res.c retr.c snprintf.c url.c utils.c version.c convert.c \ ptimer.c spider.c css.c css-url.c build_info.c ../md5/md5.c \ ../msdos/msdos.c \ $(addprefix ../lib/, error.c exitfail.c quote.c \ quotearg.c getopt.c getopt1.c xalloc-die.c xmalloc.c) OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o))) all: $(OBJ_DIR) wget.exe @echo 'Welcome to Wget' $(OBJ_DIR): mkdir $(OBJ_DIR) wget.exe: $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $^ $(EX_LIBS) css.c: css.l flex -8 -o$@ $^ clean: rm -f $(OBJ_DIR)/*.o $(MAPFILE) vclean realclean: clean rm -f wget.exe depend.dj version.c - rmdir $(OBJ_DIR) $(OBJ_DIR)/%.o: %.c $(CC) $(CFLAGS) -o $@ -c $< @echo version.c: ../msdos/Makefile.DJ @echo 'char *version_string = "$(VERSION)";' > $@ @echo 'char *compilation_string = "$(CC) $(CFLAGS)";' >> $@ @echo 'char *link_string = "$(CC) $(LDFLAGS) -o wget.exe $$(OBJECTS) $(EX_LIBS)";' >> $@ depend: version.c $(CC) -MM $(CFLAGS) $(SOURCES) | \ sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj -include depend.dj wget-1.17.1/msdos/Makefile.WC0000664000000000000000000000460012627054074012544 00000000000000# # Makefile for Wget / DOS32A / OpenWatcom # by G. Vanem 2009 # VERSION = 1.12 (Watcom/DOS) COMPILE = *wcc386 -mf -3r -w3 -d2 -zq -zm -of -I. -I$(%watt_root)\inc & -I..\msdos -I..\lib -I..\md5 -fr=nul -bt=dos -s -dHAVE_CONFIG_H & -dENABLE_DEBUG -dSIZEOF_INT=4 -dUSE_WATT32 LINK = *wlink option quiet, map, verbose, eliminate, caseexact, stack=100k & debug all system dos32a .c: ..\lib .c: ..\md5 .c: ..\msdos OBJ_DIR = WC_DOS.obj OBJECTS = $(OBJ_DIR)\cmpt.obj $(OBJ_DIR)\build_info.obj & $(OBJ_DIR)\c-ctype.obj $(OBJ_DIR)\cookies.obj & $(OBJ_DIR)\connect.obj $(OBJ_DIR)\convert.obj & $(OBJ_DIR)\css.obj $(OBJ_DIR)\css-url.obj & $(OBJ_DIR)\error.obj $(OBJ_DIR)\exits.obj & $(OBJ_DIR)\exitfail.obj $(OBJ_DIR)\ftp-basic.obj & $(OBJ_DIR)\ftp-ls.obj $(OBJ_DIR)\ftp-opie.obj & $(OBJ_DIR)\ftp.obj $(OBJ_DIR)\gen-md5.obj & $(OBJ_DIR)\getopt.obj $(OBJ_DIR)\getopt1.obj & $(OBJ_DIR)\hash.obj $(OBJ_DIR)\msdos.obj & $(OBJ_DIR)\host.obj $(OBJ_DIR)\html-parse.obj & $(OBJ_DIR)\html-url.obj $(OBJ_DIR)\http.obj & $(OBJ_DIR)\init.obj $(OBJ_DIR)\log.obj & $(OBJ_DIR)\main.obj $(OBJ_DIR)\md5.obj & $(OBJ_DIR)\netrc.obj $(OBJ_DIR)\progress.obj & $(OBJ_DIR)\ptimer.obj $(OBJ_DIR)\recur.obj & $(OBJ_DIR)\res.obj $(OBJ_DIR)\retr.obj & $(OBJ_DIR)\spider.obj $(OBJ_DIR)\url.obj & $(OBJ_DIR)\utils.obj $(OBJ_DIR)\version.obj & $(OBJ_DIR)\xalloc-die.obj $(OBJ_DIR)\xmalloc.obj & $(OBJ_DIR)\quote.obj $(OBJ_DIR)\quotearg.obj all: $(OBJ_DIR) wget.exe .SYMBOLIC @echo 'Welcome to Wget / Watcom' $(OBJ_DIR): - mkdir $^@ .ERASE .c{$(OBJ_DIR)}.obj: .AUTODEPEND *$(COMPILE) -fo=$@ $[@ css.c: css.l flex -8 -o$@ $[@ wget.exe: $(OBJECTS) $(LINK) name $@ file { $(OBJECTS) } library $(%watt_root)\lib\wattcpwf.lib version.c: ..\msdos\Makefile.WC @echo char *version_string = "$(VERSION)"; > $@ @echo char *compilation_string = "$(COMPILE)"; >> $@ @echo char *link_string = "$(LINK) name wget.exe file { $$(OBJECTS) }"; >> $@ clean: .SYMBOLIC - rm $(OBJ_DIR)\*.obj wget.exe wget.map version.c css.c - rmdir $(OBJ_DIR) wget-1.17.1/msdos/config.h0000664000000000000000000000671512627054074012223 00000000000000/* Configuration header file for MS-DOS/Watt-32 Copyright (C) 2007, 2008, 2009, 2010, 2011, 2015 Free Software Foundation, Inc. This file is part of GNU Wget. GNU Wget 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. GNU Wget 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 Wget. If not, see . Additional permission under GNU GPL version 3 section 7 If you modify this program, or any covered work, by linking or combining it with the OpenSSL project's OpenSSL library (or a modified version of that library), containing parts covered by the terms of the OpenSSL or SSLeay licenses, the Free Software Foundation grants you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of OpenSSL used as well as that of the covered work. */ #ifndef CONFIG_DOS_H #define CONFIG_DOS_H #include #include #include #include #ifdef __DJGPP__ #include #endif #include #if defined(__WATCOMC__) #if (__WATCOMC__ >= 1250) /* OW 1.5+ */ #define OPENWATCOM_15 #endif #if (__WATCOMC__ >= 1270) /* OW 1.7+ */ #define OPENWATCOM_17 #endif #endif #if defined(__HIGHC__) #define HAVE_UNISTD_H 1 #define HAVE_UTIME_H 1 #endif #if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__HIGHC__) #define inline #endif #define USE_OPIE 1 #define USE_DIGEST 1 #define DEBUG #ifdef __DJGPP__ #define HAVE__BOOL 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 #define HAVE_SIGSETJMP 1 #define HAVE_SIGBLOCK 1 #define HAVE_STRUCT_UTIMBUF 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_USLEEP 1 #define HAVE_UTIME_H 1 #define HAVE_INT64_T 1 #if (DJGPP_MINOR >= 4) #define HAVE_STDBOOL_H 1 #define HAVE_STDINT_H 1 #define HAVE_SNPRINTF 1 #define HAVE_VSNPRINTF 1 #define HAVE_UINT32_T 1 #endif #endif #ifdef __HIGHC__ #define HAVE_STRUCT_UTIMBUF 1 #define HAVE_UTIME_H 1 #endif #ifdef OPENWATCOM_15 #define HAVE_ALLOCA_H 1 #define HAVE_INT64_T 1 #define HAVE_SNPRINTF 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 #define HAVE_STDINT_H 1 #define HAVE_UTIME_H 1 #endif #ifdef OPENWATCOM_17 #define HAVE__BOOL 1 #define HAVE_STDBOOL_H 1 #endif #define HAVE_PROCESS_H 1 #define HAVE_STRDUP 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_BUILTIN_MD5 1 #define HAVE_ISATTY 1 #define lookup_host wget_lookuphost #define select select_s #define socklen_t int #define sock_read wget_sock_read #define sock_write wget_sock_write #define sock_close wget_sock_close #if !defined(__DJGPP__) #include #define mkdir(p,a) (mkdir)(p) #define strcasecmp stricmp #endif #if !defined(MSDOS) #define MSDOS #endif #if !defined(USE_WATT32) #define USE_WATT32 #endif #define LOCALEDIR "" #define OS_TYPE "DOS" #endif /* CONFIG_DOS_H */ wget-1.17.1/maint.mk0000664000000000000000000017350012632604577011123 00000000000000# -*-Makefile-*- # This Makefile fragment tries to be general-purpose enough to be # used by many projects via the gnulib maintainer-makefile module. ## Copyright (C) 2001-2015 Free Software Foundation, Inc. ## ## 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 . # This is reported not to work with make-3.79.1 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := maint.mk # Helper variables. _empty = _sp = $(_empty) $(_empty) # _equal,S1,S2 # ------------ # If S1 == S2, return S1, otherwise the empty string. _equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1))) # member-check,VARIABLE,VALID-VALUES # ---------------------------------- # Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and # return it. Die otherwise. member-check = \ $(strip \ $(if $($(1)), \ $(if $(findstring $(_sp),$($(1))), \ $(error invalid $(1): '$($(1))', expected $(2)), \ $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \ $(error invalid $(1): '$($(1))', expected $(2)))), \ $(error $(1) undefined))) # Do not save the original name or timestamp in the .tar.gz file. # Use --rsyncable if available. gzip_rsyncable := \ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \ && printf %s --rsyncable) GZIP_ENV = '--no-name --best $(gzip_rsyncable)' GIT = git VC = $(GIT) VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) # You can override this variable in cfg.mk to set your own regexp # matching files to ignore. VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ # This is to preprocess robustly the output of $(VC_LIST), so that even # when $(srcdir) is a pathological name like "....", the leading sed command # removes only the intended prefix. _dot_escaped_srcdir = $(subst .,\.,$(srcdir)) # Post-process $(VC_LIST) output, prepending $(srcdir)/, but only # when $(srcdir) is not ".". ifeq ($(srcdir),.) _prepend_srcdir_prefix = else _prepend_srcdir_prefix = | $(SED) 's|^|$(srcdir)/|' endif # In order to be able to consistently filter "."-relative names, # (i.e., with no $(srcdir) prefix), this definition is careful to # remove any $(srcdir) prefix, and to restore what it removes. _sc_excl = \ $(or $(exclude_file_name_regexp--$@),^$$) VC_LIST_EXCEPT = \ $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \ | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ $(_prepend_srcdir_prefix) ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version endif PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null) VERSION_REGEXP = $(subst .,\.,$(VERSION)) PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION)) ifeq ($(VC),$(GIT)) this-vc-tag = v$(VERSION) this-vc-tag-regexp = v$(VERSION_REGEXP) else tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]') tag-this-version = $(subst .,_,$(VERSION)) this-vc-tag = $(tag-package)-$(tag-this-version) this-vc-tag-regexp = $(this-vc-tag) endif my_distdir = $(PACKAGE)-$(VERSION) # Old releases are stored here. release_archive_dir ?= ../release # If RELEASE_TYPE is undefined, but RELEASE is, use its second word. # But overwrite VERSION. ifdef RELEASE VERSION := $(word 1, $(RELEASE)) RELEASE_TYPE ?= $(word 2, $(RELEASE)) endif # Validate and return $(RELEASE_TYPE), or die. RELEASE_TYPES = alpha beta stable release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES)) # Override gnu_rel_host and url_dir_list in cfg.mk if these are not right. # Use alpha.gnu.org for alpha and beta releases. # Use ftp.gnu.org for stable releases. gnu_ftp_host-alpha = alpha.gnu.org gnu_ftp_host-beta = alpha.gnu.org gnu_ftp_host-stable = ftp.gnu.org gnu_rel_host ?= $(gnu_ftp_host-$(release-type)) url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \ http://ftpmirror.gnu.org/$(PACKAGE), \ ftp://$(gnu_rel_host)/gnu/$(PACKAGE)) # Override this in cfg.mk if you are using a different format in your # NEWS file. today = $(shell date +%Y-%m-%d) # Select which lines of NEWS are searched for $(news-check-regexp). # This is a sed line number spec. The default says that we search # lines 1..10 of NEWS for $(news-check-regexp). # If you want to search only line 3 or only lines 20-22, use "3" or "20,22". news-check-lines-spec ?= 1,10 news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' # Prevent programs like 'sort' from considering distinct strings to be equal. # Doing it here saves us from having to set LC_ALL elsewhere in this file. export LC_ALL = C ## --------------- ## ## Sanity checks. ## ## --------------- ## ifneq ($(_gl-Makefile),) _cfg_mk := $(wildcard $(srcdir)/cfg.mk) # Collect the names of rules starting with 'sc_'. syntax-check-rules := $(sort $(shell $(SED) -n \ 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(srcdir)/$(ME) $(_cfg_mk))) .PHONY: $(syntax-check-rules) ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0) local-checks-available += $(syntax-check-rules) else local-checks-available += no-vc-detected no-vc-detected: @echo "No version control files detected; skipping syntax check" endif .PHONY: $(local-checks-available) # Arrange to print the name of each syntax-checking rule just before running it. $(syntax-check-rules): %: %.m sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules)) .PHONY: $(sc_m_rules_) $(sc_m_rules_): @echo $(patsubst sc_%.m, %, $@) @date +%s.%N > .sc-start-$(basename $@) # Compute and print the elapsed time for each syntax-check rule. sc_z_rules_ = $(patsubst %, %.z, $(syntax-check-rules)) .PHONY: $(sc_z_rules_) $(sc_z_rules_): %.z: % @end=$$(date +%s.%N); \ start=$$(cat .sc-start-$*); \ rm -f .sc-start-$*; \ awk -v s=$$start -v e=$$end \ 'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null # The patsubst here is to replace each sc_% rule with its sc_%.z wrapper # that computes and prints elapsed time. local-check := \ $(patsubst sc_%, sc_%.z, \ $(filter-out $(local-checks-to-skip), $(local-checks-available))) syntax-check: $(local-check) endif # _sc_search_regexp # # This macro searches for a given construct in the selected files and # then takes some action. # # Parameters (shell variables): # # prohibit | require # # Regular expression (ERE) denoting either a forbidden construct # or a required construct. Those arguments are exclusive. # # exclude # # Regular expression (ERE) denoting lines to ignore that matched # a prohibit construct. For example, this can be used to exclude # comments that mention why the nearby code uses an alternative # construct instead of the simpler prohibited construct. # # in_vc_files | in_files # # grep-E-style regexp selecting the files to check. For in_vc_files, # the regexp is used to select matching files from the list of all # version-controlled files; for in_files, it's from the names printed # by "find $(srcdir)". When neither is specified, use all files that # are under version control. # # containing | non_containing # # Select the files (non) containing strings matching this regexp. # If both arguments are specified then CONTAINING takes # precedence. # # with_grep_options # # Extra options for grep. # # ignore_case # # Ignore case. # # halt # # Message to display before to halting execution. # # Finally, you may exempt files based on an ERE matching file names. # For example, to exempt from the sc_space_tab check all files with the # .diff suffix, set this Make variable: # # exclude_file_name_regexp--sc_space_tab = \.diff$ # # Note that while this functionality is mostly inherited via VC_LIST_EXCEPT, # when filtering by name via in_files, we explicitly filter out matching # names here as well. # Initialize each, so that envvar settings cannot interfere. export require = export prohibit = export exclude = export in_vc_files = export in_files = export containing = export non_containing = export halt = export with_grep_options = # By default, _sc_search_regexp does not ignore case. export ignore_case = _ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :) define _sc_say_and_exit dummy=; : so we do not need a semicolon before each use; \ { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; }; endef define _sc_search_regexp dummy=; : so we do not need a semicolon before each use; \ \ : Check arguments; \ test -n "$$prohibit" && test -n "$$require" \ && { msg='Cannot specify both prohibit and require' \ $(_sc_say_and_exit) } || :; \ test -z "$$prohibit" && test -z "$$require" \ && { msg='Should specify either prohibit or require' \ $(_sc_say_and_exit) } || :; \ test -z "$$prohibit" && test -n "$$exclude" \ && { msg='Use of exclude requires a prohibit pattern' \ $(_sc_say_and_exit) } || :; \ test -n "$$in_vc_files" && test -n "$$in_files" \ && { msg='Cannot specify both in_vc_files and in_files' \ $(_sc_say_and_exit) } || :; \ test "x$$halt" != x \ || { msg='halt not defined' $(_sc_say_and_exit) }; \ \ : Filter by file name; \ if test -n "$$in_files"; then \ files=$$(find $(srcdir) | grep -E "$$in_files" \ | grep -Ev '$(_sc_excl)'); \ else \ files=$$($(VC_LIST_EXCEPT)); \ if test -n "$$in_vc_files"; then \ files=$$(echo "$$files" | grep -E "$$in_vc_files"); \ fi; \ fi; \ \ : Filter by content; \ test -n "$$files" && test -n "$$containing" \ && { files=$$(grep -l "$$containing" $$files); } || :; \ test -n "$$files" && test -n "$$non_containing" \ && { files=$$(grep -vl "$$non_containing" $$files); } || :; \ \ : Check for the construct; \ if test -n "$$files"; then \ if test -n "$$prohibit"; then \ grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \ | grep -vE "$${exclude:-^$$}" \ && { msg="$$halt" $(_sc_say_and_exit) } || :; \ else \ grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \ | grep . \ && { msg="$$halt" $(_sc_say_and_exit) } || :; \ fi \ else :; \ fi || :; endef sc_avoid_if_before_free: @$(srcdir)/$(_build-aux)/useless-if-before-free \ $(useless_free_options) \ $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \ { echo '$(ME): found useless "if" before "free" above' 1>&2; \ exit 1; } || : sc_cast_of_argument_to_free: @prohibit='\&2; \ exit 1; } || : # Error messages should not start with a capital letter sc_error_message_uppercase: @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '"[A-Z]' \ | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \ { echo '$(ME): found capitalized error message' 1>&2; \ exit 1; } || : # Error messages should not end with a period sc_error_message_period: @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \ | grep -E '[^."]\."' && \ { echo '$(ME): found error message ending in period' 1>&2; \ exit 1; } || : sc_file_system: @prohibit=file''system \ ignore_case=1 \ halt='found use of "file''system"; spell it "file system"' \ $(_sc_search_regexp) # Don't use cpp tests of this symbol. All code assumes config.h is included. sc_prohibit_have_config_h: @prohibit='^# *if.*HAVE''_CONFIG_H' \ halt='found use of HAVE''_CONFIG_H; remove' \ $(_sc_search_regexp) # Nearly all .c files must include . However, we also permit this # via inclusion of a package-specific header, if cfg.mk specified one. # config_h_header must be suitable for grep -E. config_h_header ?= sc_require_config_h: @require='^# *include $(config_h_header)' \ in_vc_files='\.c$$' \ halt='the above files do not include ' \ $(_sc_search_regexp) # You must include before including any other header file. # This can possibly be via a package-specific header, if given by cfg.mk. sc_require_config_h_first: @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ fail=0; \ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ grep '^# *include\>' $$i | $(SED) 1q \ | grep -E '^# *include $(config_h_header)' > /dev/null \ || { echo $$i; fail=1; }; \ done; \ test $$fail = 1 && \ { echo '$(ME): the above files include some other header' \ 'before ' 1>&2; exit 1; } || :; \ else :; \ fi sc_prohibit_HAVE_MBRTOWC: @prohibit='\bHAVE_MBRTOWC\b' \ halt="do not use $$prohibit; it is always defined" \ $(_sc_search_regexp) # To use this "command" macro, you must first define two shell variables: # h: the header name, with no enclosing <> or "" # re: a regular expression that matches IFF something provided by $h is used. define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ grep -LE "$$re" $$files | grep . && \ { echo "$(ME): the above files include $$h but don't use it" \ 1>&2; exit 1; } || :; \ else :; \ fi endef # Prohibit the inclusion of assert.h without an actual use of assert. sc_prohibit_assert_without_use: @h='assert.h' re='\new(file => "/dev/stdin")->as_string'|sed 's/\?://g' # Note this was produced by the above: # _xa1 = \ #x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup) # But we can do better, in at least two ways: # 1) take advantage of two "dup"-suffixed strings: # x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup) # 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable # "char|[cmz]" # x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) _xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) _xa2 = X([CZ]|N?M)ALLOC sc_prohibit_xalloc_without_use: @h='xalloc.h' \ re='\<($(_xa1)|$(_xa2)) *\('\ $(_sc_header_without_use) # Extract function names: # perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/hash.h _hash_re = \ clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning _hash_fn = \<($(_hash_re)) *\( _hash_struct = (struct )?\<[Hh]ash_(table|tuning)\> sc_prohibit_hash_without_use: @h='hash.h' \ re='$(_hash_fn)|$(_hash_struct)'\ $(_sc_header_without_use) sc_prohibit_cloexec_without_use: @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \ $(_sc_header_without_use) sc_prohibit_posixver_without_use: @h='posixver.h' re='\' \ halt='do not use HAVE''_FCNTL_H or O'_NDELAY \ $(_sc_search_regexp) # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ # Each nonempty ChangeLog line must start with a year number, or a TAB. sc_changelog: @prohibit='^[^12 ]' \ in_vc_files='^ChangeLog$$' \ halt='found unexpected prefix in a ChangeLog' \ $(_sc_search_regexp) # Ensure that each .c file containing a "main" function also # calls set_program_name. sc_program_name: @require='set_program_name *\(.*\);' \ in_vc_files='\.c$$' \ containing='\
/dev/null \ && : || { die=1; echo $$i; } \ done; \ test $$die = 1 && \ { echo 1>&2 '$(ME): the final line in each of the above is not:'; \ echo 1>&2 'Exit something'; \ exit 1; } || :; \ fi sc_trailing_blank: @prohibit='[ ]$$' \ halt='found trailing blank(s)' \ exclude='^Binary file .* matches$$' \ $(_sc_search_regexp) # Match lines like the following, but where there is only one space # between the options and the description: # -D, --all-repeated[=delimit-method] print all duplicate lines\n longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)? sc_two_space_separator_in_usage: @prohibit='^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \ halt='help2man requires at least two spaces between an option and its description'\ $(_sc_search_regexp) # A regexp matching function names like "error" that may be used # to emit translatable messages. _gl_translatable_diag_func_re ?= error # Look for diagnostics that aren't marked for translation. # This won't find any for which error's format string is on a separate line. sc_unmarked_diagnostics: @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \ exclude='(_|ngettext ?)\(' \ halt='found unmarked diagnostic(s)' \ $(_sc_search_regexp) # Avoid useless parentheses like those in this example: # #if defined (SYMBOL) || defined (SYM2) sc_useless_cpp_parens: @prohibit='^# *if .*defined *\(' \ halt='found useless parentheses in cpp directive' \ $(_sc_search_regexp) # List headers for which HAVE_HEADER_H is always true, assuming you are # using the appropriate gnulib module. CAUTION: for each "unnecessary" # #if HAVE_HEADER_H that you remove, be sure that your project explicitly # requires the gnulib module that guarantees the usability of that header. gl_assured_headers_ = \ cd $(gnulib_dir)/lib && echo *.in.h|$(SED) 's/\.in\.h//g' # Convert the list of names to upper case, and replace each space with "|". az_ = abcdefghijklmnopqrstuvwxyz AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ gl_header_upper_case_or_ = \ $$($(gl_assured_headers_) \ | tr $(az_)/.- $(AZ_)___ \ | tr -s ' ' '|' \ ) sc_prohibit_always_true_header_tests: @or=$(gl_header_upper_case_or_); \ re="HAVE_($$or)_H"; \ prohibit='\<'"$$re"'\>' \ halt=$$(printf '%s\n' \ 'do not test the above HAVE_
_H symbol(s);' \ ' with the corresponding gnulib module, they are always true') \ $(_sc_search_regexp) sc_prohibit_defined_have_decl_tests: @prohibit='(#[ ]*ifn?def|\[ (]+HAVE_DECL_' \ halt='HAVE_DECL macros are always defined' \ $(_sc_search_regexp) # ================================================================== gl_other_headers_ ?= \ intprops.h \ openat.h \ stat-macros.h # Perl -lne code to extract "significant" cpp-defined symbols from a # gnulib header file, eliminating a few common false-positives. # The exempted names below are defined only conditionally in gnulib, # and hence sometimes must/may be defined in application code. gl_extract_significant_defines_ = \ /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\ && $$2 !~ /(?:rpl_|_used_without_)/\ && $$1 !~ /^(?:NSIG|ENODATA)$$/\ && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\ and print $$1 # Create a list of regular expressions matching the names # of macros that are guaranteed to be defined by parts of gnulib. define def_sym_regex gen_h=$(gl_generated_headers_); \ (cd $(gnulib_dir)/lib; \ for f in *.in.h $(gl_other_headers_); do \ test -f $$f \ && perl -lne '$(gl_extract_significant_defines_)' $$f; \ done; \ ) | sort -u \ | $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/' endef # Don't define macros that we already get from gnulib header files. sc_prohibit_always-defined_macros: @if test -d $(gnulib_dir); then \ case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \ echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \ esac; \ $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \ && { echo '$(ME): define the above via some gnulib .h file' \ 1>&2; exit 1; } || :; \ fi # ================================================================== # Prohibit checked in backup files. sc_prohibit_backup_files: @$(VC_LIST) | grep '~$$' && \ { echo '$(ME): found version controlled backup file' 1>&2; \ exit 1; } || : # Require the latest GPL. sc_GPL_version: @prohibit='either ''version [^3]' \ halt='GPL vN, N!=3' \ $(_sc_search_regexp) # Require the latest GFDL. Two regexp, since some .texi files end up # line wrapping between 'Free Documentation License,' and 'Version'. _GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any) sc_GFDL_version: @prohibit='$(_GFDL_regexp)' \ halt='GFDL vN, N!=3' \ $(_sc_search_regexp) # Don't use Texinfo's @acronym{}. # http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$ sc_texinfo_acronym: @prohibit='@acronym\{' \ in_vc_files='$(texinfo_suffix_re_)' \ halt='found use of Texinfo @acronym{}' \ $(_sc_search_regexp) cvs_keywords = \ Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State sc_prohibit_cvs_keyword: @prohibit='\$$($(cvs_keywords))\$$' \ halt='do not use CVS keyword expansion' \ $(_sc_search_regexp) # This Perl code is slightly obfuscated. Not only is each "$" doubled # because it's in a Makefile, but the $$c's are comments; we cannot # use "#" due to the way the script ends up concatenated onto one line. # It would be much more concise, and would produce better output (including # counts) if written as: # perl -ln -0777 -e '/\n(\n+)$/ and print "$ARGV: ".length $1' ... # but that would be far less efficient, reading the entire contents # of each file, rather than just the last two bytes of each. # In addition, while the code below detects both blank lines and a missing # newline at EOF, the above detects only the former. # # This is a perl script that is expected to be the single-quoted argument # to a command-line "-le". The remaining arguments are file names. # Print the name of each file that does not end in exactly one newline byte. # I.e., warn if there are blank lines (2 or more newlines), or if the # last byte is not a newline. However, currently we don't complain # about any file that contains exactly one byte. # Exit nonzero if at least one such file is found, otherwise, exit 0. # Warn about, but otherwise ignore open failure. Ignore seek/read failure. # # Use this if you want to remove trailing empty lines from selected files: # perl -pi -0777 -e 's/\n\n+$/\n/' files... # require_exactly_one_NL_at_EOF_ = \ foreach my $$f (@ARGV) \ { \ open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next; \ my $$p = sysseek (F, -2, 2); \ my $$c = "seek failure probably means file has < 2 bytes; ignore"; \ my $$last_two_bytes; \ defined $$p and $$p = sysread F, $$last_two_bytes, 2; \ close F; \ $$c = "ignore read failure"; \ $$p && ($$last_two_bytes eq "\n\n" \ || substr ($$last_two_bytes,1) ne "\n") \ and (print $$f), $$fail=1; \ } \ END { exit defined $$fail } sc_prohibit_empty_lines_at_EOF: @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \ || { echo '$(ME): empty line(s) or no newline at EOF' \ 1>&2; exit 1; } || : # Make sure we don't use st_blocks. Use ST_NBLOCKS instead. # This is a bit of a kludge, since it prevents use of the string # even in comments, but for now it does the job with no false positives. sc_prohibit_stat_st_blocks: @prohibit='[.>]st_blocks' \ halt='do not use st_blocks; use ST_NBLOCKS' \ $(_sc_search_regexp) # Make sure we don't define any S_IS* macros in src/*.c files. # They're already defined via gnulib's sys/stat.h replacement. sc_prohibit_S_IS_definition: @prohibit='^ *# *define *S_IS' \ halt='do not define S_IS* macros; include ' \ $(_sc_search_regexp) # Perl block to convert a match to FILE_NAME:LINENO:TEST, # that is shared by two definitions below. perl_filename_lineno_text_ = \ -e ' {' \ -e ' $$n = ($$` =~ tr/\n/\n/ + 1);' \ -e ' ($$v = $$&) =~ s/\n/\\n/g;' \ -e ' print "$$ARGV:$$n:$$v\n";' \ -e ' }' prohibit_doubled_word_RE_ ?= \ /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims prohibit_doubled_word_ = \ -e 'while ($(prohibit_doubled_word_RE_))' \ $(perl_filename_lineno_text_) # Define this to a regular expression that matches # any filename:dd:match lines you want to ignore. # The default is to ignore no matches. ignore_doubled_word_match_RE_ ?= ^$$ sc_prohibit_doubled_word: @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \ | grep -vE '$(ignore_doubled_word_match_RE_)' \ | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || : # A regular expression matching undesirable combinations of words like # "can not"; this matches them even when the two words appear on different # lines, but not when there is an intervening delimiter like "#" or "*". # Similarly undesirable, "See @xref{...}", since an @xref should start # a sentence. Explicitly prohibit any prefix of "see" or "also". # Also prohibit a prefix matching "\w+ +". # @pxref gets the same see/also treatment and should be parenthesized; # presume it must *not* start a sentence. bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{ bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{ prohibit_undesirable_word_seq_RE_ ?= \ /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims prohibit_undesirable_word_seq_ = \ -e 'while ($(prohibit_undesirable_word_seq_RE_))' \ $(perl_filename_lineno_text_) # Define this to a regular expression that matches # any filename:dd:match lines you want to ignore. # The default is to ignore no matches. ignore_undesirable_word_sequence_RE_ ?= ^$$ sc_prohibit_undesirable_word_seq: @perl -n -0777 $(prohibit_undesirable_word_seq_) \ $$($(VC_LIST_EXCEPT)) \ | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \ && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || : # Except for shell files and for loops, double semicolon is probably a mistake sc_prohibit_double_semicolon: @prohibit='; *;[ {} \]*(/[/*]|$$)' \ in_vc_files='\.[chly]$$' \ exclude='\bfor *\(.*\)' \ halt="Double semicolon detected" \ $(_sc_search_regexp) _ptm1 = use "test C1 && test C2", not "test C1 -''a C2" _ptm2 = use "test C1 || test C2", not "test C1 -''o C2" # Using test's -a and -o operators is not portable. # We prefer test over [, since the latter is spelled [[ in configure.ac. sc_prohibit_test_minus_ao: @prohibit='(\ /dev/null \ || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \ done; \ test $$fail = 1 && \ { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \ exit 1; } || :; \ fi # Warn about "c0nst struct Foo const foo[]", # but not about "char const *const foo" or "#define const const". sc_redundant_const: @prohibit='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \ halt='redundant "const" in declarations' \ $(_sc_search_regexp) sc_const_long_option: @prohibit='^ *static.*struct option ' \ exclude='const struct option|struct option const' \ halt='add "const" to the above declarations' \ $(_sc_search_regexp) NEWS_hash = \ $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ $(srcdir)/NEWS \ | perl -0777 -pe \ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \ | md5sum - \ | $(SED) 's/ .*//') # Ensure that we don't accidentally insert an entry into an old NEWS block. sc_immutable_NEWS: @if test -f $(srcdir)/NEWS; then \ test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \ { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \ fi # Update the hash stored above. Do this after each release and # for any corrections to old entries. update-NEWS-hash: NEWS perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \ $(srcdir)/cfg.mk # Ensure that we use only the standard $(VAR) notation, # not @...@ in Makefile.am, now that we can rely on automake # to emit a definition for each substituted variable. # However, there is still one case in which @VAR@ use is not just # legitimate, but actually required: when augmenting an automake-defined # variable with a prefix. For example, gettext uses this: # MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ # otherwise, makeinfo would put German or French (current locale) # navigation hints in the otherwise-English documentation. # # Allow the package to add exceptions via a hook in cfg.mk; # for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. _makefile_at_at_check_exceptions ?= sc_makefile_at_at_check: @perl -ne '/\@\w+\@/' \ -e ' && !/(\w+)\s+=.*\@\1\@$$/' \ -e ''$(_makefile_at_at_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-check: NEWS $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \ | grep -E $(news-check-regexp) >/dev/null; then \ :; \ else \ echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \ exit 1; \ fi sc_makefile_TAB_only_indentation: @prohibit='^ [ ]{8}' \ in_vc_files='akefile|\.mk$$' \ halt='found TAB-8-space indentation' \ $(_sc_search_regexp) sc_m4_quote_check: @prohibit='(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \ in_vc_files='(^configure\.ac|\.m4)$$' \ halt='quote the first arg to AC_DEF*' \ $(_sc_search_regexp) fix_po_file_diag = \ 'you have changed the set of files with translatable diagnostics;\n\ apply the above patch\n' # Verify that all source files using _() (more specifically, files that # match $(_gl_translatable_string_re)) are listed in po/POTFILES.in. po_file ?= $(srcdir)/po/POTFILES.in generated_files ?= $(srcdir)/lib/*.[ch] _gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$) sc_po_check: @if test -f $(po_file); then \ grep -E -v '^(#|$$)' $(po_file) \ | grep -v '^src/false\.c$$' | sort > $@-1; \ files=; \ for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do \ test -r $$file || continue; \ case $$file in \ *.m4|*.mk) continue ;; \ *.?|*.??) ;; \ *) continue;; \ esac; \ case $$file in \ *.[ch]) \ base=`expr " $$file" : ' \(.*\)\..'`; \ { test -f $$base.l || test -f $$base.y; } && continue;; \ esac; \ files="$$files $$file"; \ done; \ grep -E -l '$(_gl_translatable_string_re)' $$files \ | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ rm -f $@-1 $@-2; \ fi # Sometimes it is useful to change the PATH environment variable # in Makefiles. When doing so, it's better not to use the Unix-centric # path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'. msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead' sc_makefile_path_separator_check: @prohibit='PATH[=].*:' \ in_vc_files='akefile|\.mk$$' \ halt=$(msg) \ $(_sc_search_regexp) # Check that 'make alpha' will not fail at the end of the process, # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release) # and is read-only. writable-files: $(AM_V_GEN)if test -d $(release_archive_dir); then \ for file in $(DIST_ARCHIVES); do \ for p in ./ $(release_archive_dir)/; do \ test -e $$p$$file || continue; \ test -w $$p$$file \ || { echo ERROR: $$p$$file is not writable; fail=1; }; \ done; \ done; \ test "$$fail" && exit 1 || : ; \ else :; \ fi v_etc_file = $(gnulib_dir)/lib/version-etc.c sample-test = tests/sample-test texi = doc/$(PACKAGE).texi # Make sure that the copyright date in $(v_etc_file) is up to date. # Do the same for the $(sample-test) and the main doc/.texi file. sc_copyright_check: @require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' \ in_files=$(v_etc_file) \ halt='out of date copyright in $(v_etc_file); update it' \ $(_sc_search_regexp) @require='# Copyright \(C\) '$$(date +%Y)' Free' \ in_vc_files=$(sample-test) \ halt='out of date copyright in $(sample-test); update it' \ $(_sc_search_regexp) @require='Copyright @copyright\{\} .*'$$(date +%Y) \ in_vc_files=$(texi) \ halt='out of date copyright in $(texi); update it' \ $(_sc_search_regexp) # If tests/help-version exists and seems to be new enough, assume that its # use of init.sh and path_prepend_ is correct, and ensure that every other # use of init.sh is identical. # This is useful because help-version cross-checks prog --version # with $(VERSION), which verifies that its path_prepend_ invocation # sets PATH correctly. This is an inexpensive way to ensure that # the other init.sh-using tests also get it right. _hv_file ?= $(srcdir)/tests/help-version _hv_regex_weak ?= ^ *\. .*/init\.sh" # Fix syntax-highlighters " _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh" sc_cross_check_PATH_usage_in_tests: @if test -f $(_hv_file); then \ grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \ || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2; \ exit 0; }; \ grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \ || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \ exit 1; }; \ good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file)); \ grep -LFx "$$good" \ $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT))) \ | grep . && \ { echo "$(ME): the above files use path_prepend_ inconsistently" \ 1>&2; exit 1; } || :; \ fi # BRE regex of file contents to identify a test script. _test_script_regex ?= \ # In tests, use "compare expected actual", not the reverse. sc_prohibit_reversed_compare_failure: @prohibit='\ vc-diffs || : $(AM_V_at)if test -s vc-diffs; then \ cat vc-diffs; \ echo "Some files are locally modified:" 1>&2; \ exit 1; \ else \ rm vc-diffs; \ fi rel-files = $(DIST_ARCHIVES) gnulib_dir ?= $(srcdir)/gnulib gnulib-version = $$(cd $(gnulib_dir) \ && { git describe || git rev-parse --short=10 HEAD; } ) bootstrap-tools ?= autoconf,automake,gnulib gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv) # If it's not already specified, derive the GPG key ID from # the signed tag we've just applied to mark this release. gpg_key_ID ?= \ $$(cd $(srcdir) \ && git cat-file tag v$(VERSION) \ | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \ | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}') translation_project_ ?= coordinator@translationproject.org # Make info-gnu the default only for a stable release. announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT) announcement_mail_headers_stable = \ To: info-gnu@gnu.org \ Cc: $(announcement_Cc_) \ Mail-Followup-To: $(PACKAGE_BUGREPORT) announcement_Cc_alpha = $(translation_project_) announcement_mail_headers_alpha = \ To: $(PACKAGE_BUGREPORT) \ Cc: $(announcement_Cc_) announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha) announcement_mail_headers_beta = $(announcement_mail_headers_alpha) announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type)) announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type)) announcement: NEWS ChangeLog $(rel-files) # Not $(AM_V_GEN) since the output of this command serves as # announcement message: it would start with " GEN announcement". $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \ --mail-headers='$(announcement_mail_headers_)' \ --release-type=$(release-type) \ --package=$(PACKAGE) \ --prev=$(PREV_VERSION) \ --curr=$(VERSION) \ --gpg-key-id=$(gpg_key_ID) \ --srcdir=$(srcdir) \ --news=$(srcdir)/NEWS \ --bootstrap-tools=$(bootstrap-tools) \ $$(case ,$(bootstrap-tools), in (*,gnulib,*) \ echo --gnulib-version=$(gnulib-version);; esac) \ --no-print-checksums \ $(addprefix --url-dir=, $(url_dir_list)) .PHONY: release-commit release-commit: $(AM_V_GEN)cd $(srcdir) \ && $(_build-aux)/do-release-commit-and-tag \ -C $(abs_builddir) $(RELEASE) ## ---------------- ## ## Updating files. ## ## ---------------- ## ftp-gnu = ftp://ftp.gnu.org/gnu www-gnu = http://www.gnu.org upload_dest_dir_ ?= $(PACKAGE) upload_command = \ $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \ --to $(gnu_rel_host):$(upload_dest_dir_) \ $(rel-files) emit_upload_commands: @echo ===================================== @echo ===================================== @echo '$(upload_command)' @echo '# send the ~/announce-$(my_distdir) e-mail' @echo ===================================== @echo ===================================== .PHONY: upload upload: $(AM_V_GEN)$(upload_command) define emit-commit-log printf '%s\n' 'maint: post-release administrivia' '' \ '* NEWS: Add header line for next release.' \ '* .prev-version: Record previous version.' \ '* cfg.mk (old_NEWS_hash): Auto-update.' endef .PHONY: no-submodule-changes no-submodule-changes: $(AM_V_GEN)if test -d $(srcdir)/.git \ && git --version >/dev/null 2>&1; then \ diff=$$(cd $(srcdir) && git submodule -q foreach \ git diff-index --name-only HEAD) \ || exit 1; \ case $$diff in '') ;; \ *) echo '$(ME): submodule files are locally modified:'; \ echo "$$diff"; exit 1;; esac; \ else \ : ; \ fi submodule-checks ?= no-submodule-changes public-submodule-commit # Ensure that each sub-module commit we're using is public. # Without this, it is too easy to tag and release code that # cannot be built from a fresh clone. .PHONY: public-submodule-commit public-submodule-commit: $(AM_V_GEN)if test -d $(srcdir)/.git \ && git --version >/dev/null 2>&1; then \ cd $(srcdir) && \ git submodule --quiet foreach \ 'test "$$(git rev-parse "$$sha1")" \ = "$$(git merge-base origin "$$sha1")"' \ || { echo '$(ME): found non-public submodule commit' >&2; \ exit 1; }; \ else \ : ; \ fi # This rule has a high enough utility/cost ratio that it should be a # dependent of "check" by default. However, some of us do occasionally # commit a temporary change that deliberately points to a non-public # submodule commit, and want to be able to use rules like "make check". # In that case, run e.g., "make check gl_public_submodule_commit=" # to disable this test. gl_public_submodule_commit ?= public-submodule-commit check: $(gl_public_submodule_commit) .PHONY: alpha beta stable release ALL_RECURSIVE_TARGETS += alpha beta stable alpha beta stable: $(local-check) writable-files $(submodule-checks) $(AM_V_GEN)test $@ = stable \ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ || : $(AM_V_at)$(MAKE) vc-diff-check $(AM_V_at)$(MAKE) news-check $(AM_V_at)$(MAKE) distcheck $(AM_V_at)$(MAKE) dist $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@ $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ release: $(AM_V_GEN)$(MAKE) _version $(AM_V_GEN)$(MAKE) $(release-type) # Override this in cfg.mk if you follow different procedures. release-prep-hook ?= release-prep gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?] .PHONY: release-prep release-prep: $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \ > ~/announce-$(my_distdir) $(AM_V_at)if test -d $(release_archive_dir); then \ ln $(rel-files) $(release_archive_dir); \ chmod a-w $(rel-files); \ fi $(AM_V_at)echo $(VERSION) > $(prev_version_file) $(AM_V_at)$(MAKE) update-NEWS-hash $(AM_V_at)perl -pi \ -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' \ $(srcdir)/NEWS $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1; \ cd $(srcdir) && $(VC) commit -m "$$msg" -a # Override this with e.g., -s $(srcdir)/some_other_name.texi # if the default $(PACKAGE)-derived name doesn't apply. gendocs_options_ ?= .PHONY: web-manual web-manual: $(AM_V_GEN)test -z "$(manual_title)" \ && { echo define manual_title in cfg.mk 1>&2; exit 1; } || : $(AM_V_at)cd '$(srcdir)/doc'; \ $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \ -o '$(abs_builddir)/doc/manual' \ --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ "$(PACKAGE_NAME) - $(manual_title)" $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs." .PHONY: web-manual-update web-manual-update: $(AM_V_GEN)cd $(srcdir) \ && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir) # Code Coverage init-coverage: $(MAKE) $(AM_MAKEFLAGS) clean lcov --directory . --zerocounters COVERAGE_CCOPTS ?= "-g --coverage" COVERAGE_OUT ?= doc/coverage build-coverage: $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check mkdir -p $(COVERAGE_OUT) lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \ --capture gen-coverage: genhtml --output-directory $(COVERAGE_OUT) \ $(COVERAGE_OUT)/$(PACKAGE).info \ --highlight --frames --legend \ --title "$(PACKAGE_NAME)" coverage: init-coverage build-coverage gen-coverage # Some projects carry local adjustments for gnulib modules via patches in # a gnulib patch directory whose default name is gl/ (defined in bootstrap # via local_gl_dir=gl). Those patches become stale as the originals evolve # in gnulib. Use this rule to refresh any stale patches. It applies each # patch to the original in $(gnulib_dir) and uses the temporary result to # generate a fuzz-free .diff file. If you customize the name of your local # gnulib patch directory via bootstrap.conf, this rule detects that name. # Run this from a non-VPATH (i.e., srcdir) build directory. .PHONY: refresh-gnulib-patches refresh-gnulib-patches: gl=gl; \ if test -f bootstrap.conf; then \ t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;' \ -e 'END{defined $$d and print $$d}' bootstrap.conf); \ test -n "$$t" && gl=$$t; \ fi; \ for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \ b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \ VERSION_CONTROL=none \ patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \ ( cd $(gnulib_dir) || exit 1; \ git diff "$$b" > "../$$gl/$$diff"; \ git checkout $$b ) || exit 1; \ done # Update gettext files. PACKAGE ?= $(shell basename $(PWD)) PO_DOMAIN ?= $(PACKAGE) POURL = http://translationproject.org/latest/$(PO_DOMAIN)/ PODIR ?= po refresh-po: rm -f $(PODIR)/*.po && \ echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \ wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \ echo 'en@boldquot' > $(PODIR)/LINGUAS && \ echo 'en@quot' >> $(PODIR)/LINGUAS && \ ls $(PODIR)/*.po | $(SED) 's/\.po//;s,$(PODIR)/,,' | \ sort >> $(PODIR)/LINGUAS # Running indent once is not idempotent, but running it twice is. INDENT_SOURCES ?= $(C_SOURCES) .PHONY: indent indent: indent $(INDENT_SOURCES) indent $(INDENT_SOURCES) # If you want to set UPDATE_COPYRIGHT_* environment variables, # put the assignments in this variable. update-copyright-env ?= # Run this rule once per year (usually early in January) # to update all FSF copyright year lists in your project. # If you have an additional project-specific rule, # add it in cfg.mk along with a line 'update-copyright: prereq'. # By default, exclude all variants of COPYING; you can also # add exemptions (such as ChangeLog..* for rotated change logs) # in the file .x-update-copyright. .PHONY: update-copyright update-copyright: $(AM_V_GEN)grep -l -w Copyright \ $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \ | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@ # This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not # overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS. # NOTE: to override any _gl_TS_* default value, you must # define the variable(s) using "export" in cfg.mk. _gl_TS_dir ?= src ALL_RECURSIVE_TARGETS += sc_tight_scope sc_tight_scope: tight-scope.mk @fail=0; \ if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \ > /dev/null \ && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \ > /dev/null 2>&1; then \ echo '$(ME): skipping $@'; \ else \ $(MAKE) -s -C $(_gl_TS_dir) \ -f Makefile \ -f $(abs_top_srcdir)/cfg.mk \ -f $(abs_top_builddir)/$< \ _gl_tight_scope \ || fail=1; \ fi; \ rm -f $<; \ exit $$fail tight-scope.mk: $(ME) @rm -f $@ $@-t @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t @chmod a=r $@-t && mv $@-t $@ ifeq (a,b) # TS-start # Most functions should have static scope. # Any that don't must be marked with 'extern', but 'main' # and 'usage' are exceptions: they're always extern, but # do not need to be marked. Symbols matching '__.*' are # reserved by the compiler, so are automatically excluded below. _gl_TS_unmarked_extern_functions ?= main usage _gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\w+) *\(/ # If your project uses a macro like "XTERN", then put # the following in cfg.mk to override this default: # export _gl_TS_extern = extern|XTERN _gl_TS_extern ?= extern # The second nm|grep checks for file-scope variables with 'extern' scope. # Without gnulib's progname module, you might put program_name here. # Symbols matching '__.*' are reserved by the compiler, # so are automatically excluded below. _gl_TS_unmarked_extern_vars ?= # NOTE: the _match variables are perl expressions -- not mere regular # expressions -- so that you can extend them to match other patterns # and easily extract matched variable names. # For example, if your project declares some global variables via # a macro like this: GLOBAL(type, var_name, initializer), then you # can override this definition to automatically extract those names: # export _gl_TS_var_match = \ # /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/ _gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/ # The names of object files in (or relative to) $(_gl_TS_dir). _gl_TS_obj_files ?= *.$(OBJEXT) # Files in which to search for the one-line style extern declarations. # $(_gl_TS_dir)-relative. _gl_TS_headers ?= $(noinst_HEADERS) _gl_TS_other_headers ?= *.h .PHONY: _gl_tight_scope _gl_tight_scope: $(bin_PROGRAMS) sed_wrap='s/^/^_?/;s/$$/$$/'; \ t=exceptions-$$$$; \ trap 's=$$?; rm -f $$t; exit $$s' 0; \ for sig in 1 2 3 13 15; do \ eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \ done; \ src=`for f in $(SOURCES); do \ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ hdr=`for f in $(_gl_TS_headers); do \ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ grep -h -A1 '^extern .*[^;]$$' $$src \ | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \ perl -lne \ '$(_gl_TS_function_match) and print $$1' $$hdr; \ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \ && { echo the above functions should have static scope >&2; \ exit 1; } || : ; \ ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars); \ perl -lne '$(_gl_TS_var_match) and print $$1' \ $$hdr $(_gl_TS_other_headers) \ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \ | sort -u | grep -Ev -f $$t \ && { echo the above variables should have static scope >&2; \ exit 1; } || : # TS-end endif wget-1.17.1/configure.ac0000664000000000000000000005334312627054074011745 00000000000000dnl Template file for GNU Autoconf dnl Copyright (C) 1995, 1996, 1997, 2001, 2007, 2008, 2009, 2010, 2011, 2012, dnl 2013, 2014 Free Software Foundation, Inc. dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl Additional permission under GNU GPL version 3 section 7 dnl If you modify this program, or any covered work, by linking or dnl combining it with the OpenSSL project's OpenSSL library (or a dnl modified version of that library), containing parts covered by the dnl terms of the OpenSSL or SSLeay licenses, the Free Software Foundation dnl grants you additional permission to convey the resulting work. dnl Corresponding Source for a non-source form of such a combination dnl shall include the source code for the parts of OpenSSL used as well dnl as that of the covered work. dnl dnl Process this file with autoconf to produce a configure script. dnl AC_INIT([wget], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [bug-wget@gnu.org]) AC_PREREQ(2.61) dnl dnl What version of Wget are we building? dnl AC_MSG_NOTICE([configuring for GNU Wget $PACKAGE_VERSION]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/wget.h]) dnl dnl Automake setup dnl AM_INIT_AUTOMAKE([1.9]) dnl dnl Get cannonical host dnl AC_CANONICAL_HOST AC_DEFINE_UNQUOTED([OS_TYPE], "$host_os", [Define to be the name of the operating system.]) dnl dnl Process External Libraries dnl dnl Libpsl: Public Suffix List checking AC_ARG_WITH([libpsl], [AS_HELP_STRING([--without-libpsl], [disable support for libpsl cookie checking.])]) dnl SSL: Configure SSL backend to use AC_ARG_WITH([ssl], [AS_HELP_STRING([--with-ssl={gnutls,openssl}], [specify SSL backend. GNU TLS is the default.])]) dnl Zlib: Configure use of zlib for compression AC_ARG_WITH([zlib], [AS_HELP_STRING([--without-zlib], [disable zlib.])]) dnl Metalink: Configure use of the Metalink library AC_ARG_WITH([metalink], [AS_HELP_STRING([--with-metalink], [enable support for metalinks.])]) dnl dnl Process features dnl dnl Opie: Support for opie s/key FTP logins AC_ARG_ENABLE([opie], [AS_HELP_STRING([--disable-opie], [disable support for opie or s/key FTP login])], [ENABLE_OPIE=$enableval], [ENABLE_OPIE=yes]) AS_IF([test "x$ENABLE_OPIE" = xyes], [AC_DEFINE([ENABLE_OPIE], [1], [Define if you want Opie support for FTP compiled in.])], [] ) dnl Digest: Support for HTTP Digest Authentication AC_ARG_ENABLE([digest], [AS_HELP_STRING([--disable-digest], [disable support for HTTP digest authorization])], [ENABLE_DIGEST=$enableval], [ENABLE_DIGEST=yes]) AS_IF([test "x$ENABLE_DIGEST" = xyes], [AC_DEFINE([ENABLE_DIGEST], [1], [Define if you want the HTTP Digest Authorization compiled in.])], [] ) dnl NTLM: Support for HTTP NTLM Authentication AC_ARG_ENABLE([ntlm], [AS_HELP_STRING([--disable-ntlm], [disable support for NTLM authorization])], [ENABLE_NTLM=$enableval], [ENABLE_NTLM=auto] ) dnl Debug: Support for printing debugging output AC_ARG_ENABLE([debug], [AS_HELP_STRING([--disable-debug], [disable support for debugging output])], [ENABLE_DEBUG=$enableval], [ENABLE_DEBUG=yes]) AS_IF([test "x$ENABLE_DEBUG" = xyes], [AC_DEFINE([ENABLE_DEBUG], [1], [Define if you want the debug output support compiled in.])], [] ) dnl Valgrind-tests: Should test suite be run under valgrind? AC_ARG_ENABLE(valgrind-tests, [AS_HELP_STRING([--enable-valgrind-tests], [enable using Valgrind for tests])], [ENABLE_VALGRIND=$enableval], [ENABLE_VALGRIND=no]) AS_IF([test "x$ENABLE_VALGRIND" != xno], [ AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no) AS_IF([test "x$HAVE_VALGRIND" = xyes], [ VALGRIND_TESTS="1" AC_SUBST(VALGRIND_TESTS) VALGRIND_INFO="Test suite will be run under Valgrind" ], [ VALGRIND_INFO="Valgrind not found" ]) ], [ VALGRIND_INFO="Valgrind testing not enabled" ]) AC_ARG_ENABLE(assert, [AS_HELP_STRING([--enable-assert], [enable assertions in code base])], [ENABLE_ASSERTION=$enableval], [ENABLE_ASSERTION=no] ) AS_IF([test "x$ENABLE_ASSERTION" != xyes], [ CFLAGS="-DNDEBUG $CFLAGS" ], []) dnl dnl Find the compiler dnl dnl We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS= auto_cflags=1 test -z "$CC" && cc_specified=yes AC_PROG_CC AM_PROG_CC_C_O AC_AIX gl_EARLY dnl dnl Find python3 dnl AM_PATH_PYTHON([3.0],,[:]) AM_CONDITIONAL([HAVE_PYTHON3], [test "$PYTHON" != :]) dnl dnl Gettext dnl AM_GNU_GETTEXT([external],[need-ngettext]) AM_GNU_GETTEXT_VERSION([0.18.1]) AC_PROG_RANLIB AC_PROG_LEX dnl Turn on optimization by default. Specifically: dnl dnl if the user hasn't specified CFLAGS, then dnl if compiler is gcc, then dnl use -O2 and some warning flags dnl else dnl use os-specific flags or -O dnl dnl For these tests, the system considers clang to be gcc if test -n "$auto_cflags"; then if test -n "$GCC"; then CFLAGS="$CFLAGS -O2 -Wall -Wextra" else case "$host_os" in *hpux*) CFLAGS="$CFLAGS +O3" ;; *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;; *) CFLAGS="$CFLAGS -O" ;; esac fi fi dnl dnl Checks for basic compiler characteristics. dnl AC_C_CONST AC_C_INLINE AC_C_VOLATILE dnl Check for basic headers, even though we expect them to exist and dnl #include them unconditionally in the code. Their detection is dnl still needed because test programs used by Autoconf macros check. dnl Without the checks they will fail to be included in test programs, dnl which will subsequently fail. AC_HEADER_STDC dnl Check for large file support. This check needs to come fairly dnl early because it could (in principle) affect whether functions and dnl headers are available, whether they work, etc. AC_SYS_LARGEFILE AC_CHECK_SIZEOF(off_t) dnl dnl Checks for system header files that might be missing. dnl AC_HEADER_STDBOOL AC_CHECK_HEADERS(unistd.h sys/time.h) AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h) AC_CHECK_HEADERS(stdint.h inttypes.h pwd.h wchar.h) AC_CHECK_DECLS(h_errno,,,[#include ]) dnl dnl Check sizes of integer types. These are used to find n-bit dnl integral types on older systems that fail to provide intN_t and dnl uintN_t typedefs. dnl AC_CHECK_SIZEOF([short]) AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([void *]) dnl dnl Checks for non-universal or system-specific types. dnl AC_TYPE_SIZE_T AC_TYPE_PID_T AC_CHECK_TYPES([uint32_t, uintptr_t, intptr_t, int64_t]) AC_CHECK_TYPES(sig_atomic_t, [], [], [ #include #include #include #include ]) # gnulib gl_INIT dnl dnl Checks for library functions. dnl AC_FUNC_MMAP AC_FUNC_FSEEKO AC_CHECK_FUNCS(strptime timegm vsnprintf vasprintf drand48 pathconf) AC_CHECK_FUNCS(strtoll usleep ftello sigblock sigsetjmp memrchr wcwidth mbtowc) AC_CHECK_FUNCS(sleep symlink utime strlcpy random) if test x"$ENABLE_OPIE" = xyes; then AC_LIBOBJ([ftp-opie]) fi dnl We expect to have these functions on Unix-like systems configure dnl runs on. The defines are provided to get them in config.h.in so dnl Wget can still be ported to non-Unix systems (such as Windows) dnl that lack some of these functions. AC_DEFINE([HAVE_STRCASECMP], 1, [Define to 1 if you have the `strcasecmp' function.]) AC_DEFINE([HAVE_STRNCASECMP], 1, [Define to 1 if you have the `strncasecmp' function.]) AC_DEFINE([HAVE_STRDUP], 1, [Define to 1 if you have the `strdup' function.]) AC_DEFINE([HAVE_ISATTY], 1, [Define to 1 if you have the `isatty' function.]) dnl dnl Call Wget-specific macros defined in aclocal. dnl WGET_STRUCT_UTIMBUF WGET_FNMATCH WGET_NANOSLEEP WGET_POSIX_CLOCK WGET_NSL_SOCKET dnl Deal with specific hosts case $host_os in *mingw32* ) LIBS+=' -lws2_32' AC_LIBOBJ([mswindows]) ;; esac dnl dnl Checks for libraries. dnl PKG_PROG_PKG_CONFIG AS_IF([test "x$with_libpsl" != xno], [ PKG_CHECK_MODULES([LIBPSL], libpsl, [ with_libpsl=yes # correct $LIBPSL_LIBS (in libpsl <= 0.6.0) AS_IF([test "x$LIBPSL_LIBS" = "x-llibpsl "], [LIBPSL_LIBS="-lpsl"]) LIBS="$LIBPSL_LIBS $LIBS" CFLAGS="$LIBPSL_CFLAGS $CFLAGS" AC_DEFINE([HAVE_LIBPSL], [1], [PSL support enabled]) ], [ AC_SEARCH_LIBS(psl_builtin, psl, [with_libpsl=yes; AC_DEFINE([HAVE_LIBPSL], [1], [PSL support enabled])], [with_libpsl=no; AC_MSG_WARN(*** libpsl was not found. Fallback to builtin cookie checking.)]) ]) ]) AS_IF([test x"$with_zlib" != xno], [ with_zlib=yes PKG_CHECK_MODULES([ZLIB], zlib, [ LIBS="$ZLIB_LIBS $LIBS" CFLAGS="$ZLIB_CFLAGS $CFLAGS" AC_DEFINE([HAVE_LIBZ], [1], [Define if using zlib.]) ], [ AC_CHECK_LIB(z, compress) ]) ]) AS_IF([test x"$with_ssl" = xopenssl], [ if [test x"$with_libssl_prefix" = x]; then PKG_CHECK_MODULES([OPENSSL], [openssl], [ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL]) AC_LIBOBJ([openssl]) LIBS="$OPENSSL_LIBS $LIBS" CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS" LIBSSL=" " # ntlm check below wants this AC_CHECK_FUNCS([RAND_egd]) AC_DEFINE([HAVE_LIBSSL], [1], [Define if using openssl.]) ssl_found=yes ]) fi if [test x"$ssl_found" != xyes]; then dnl As of this writing (OpenSSL 0.9.6), the libcrypto shared library dnl doesn't record its dependency on libdl, so we need to make sure dnl -ldl ends up in LIBS on systems that have it. Most OSes use dnl dlopen(), but HP-UX uses shl_load(). AC_CHECK_LIB(dl, dlopen, [], [ AC_CHECK_LIB(dl, shl_load) ]) ssl_found=no case $host_os in *mingw32* ) dnl prefer link to openssl dlls if possible. if not then fallback on static libs. if not then error AC_CHECK_LIB(eay32, EVP_MD_CTX_init) if test x"$ac_cv_lib_eay32_EVP_MD_CTX_init" != xno then AC_CHECK_LIB(ssl32, SSL_connect, [ ssl_found=yes AC_MSG_NOTICE([Enabling support for SSL via OpenSSL (shared)]) AC_LIBOBJ([openssl]) LIBS="${LIBS} -lssl32" AC_DEFINE([HAVE_LIBSSL32], [1], [Define to 1 if you have the `ssl32' library (-lssl32).]) ], AC_MSG_ERROR([openssl not found: shared lib eay32 found but ssl32 not found])) else LIBS+=' -lgdi32' dnl fallback and test static libs fi dnl add zdll lib as dep for above tests? ;; esac AS_IF([test x$ssl_found != xyes], [ dnl Now actually check for -lssl if it wasn't already found AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [ #include #include #include #include #include #include #include ], [SSL_library_init ()]) if test x"$LIBSSL" != x then ssl_found=yes AC_MSG_NOTICE([compiling in support for SSL via OpenSSL]) AC_LIBOBJ([openssl]) LIBS="$LIBSSL $LIBS" AC_CHECK_FUNCS([RAND_egd]) elif test x"$with_ssl" != x then AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.]) fi ]) fi ], [ # --with-ssl is not openssl: check if it's no AS_IF([test x"$with_ssl" != xno], [ dnl default is -lgnutls with_ssl=gnutls dnl Now actually check for -lgnutls if [test x"$with_libgnutls_prefix" = x]; then PKG_CHECK_MODULES([GNUTLS], [gnutls], [ AC_MSG_NOTICE([compiling in support for SSL via GnuTLS]) AC_LIBOBJ([gnutls]) LIBS="$GNUTLS_LIBS $LIBS" CFLAGS="$GNUTLS_CFLAGS -DHAVE_LIBGNUTLS $CFLAGS" AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define if using gnutls.]) ssl_found=yes ]) fi if [test x"$ssl_found" != xyes]; then AC_LIB_HAVE_LINKFLAGS([gnutls], [], [ #include ], [gnutls_global_init()]) if test x"$LIBGNUTLS" != x then ssl_found=yes AC_MSG_NOTICE([compiling in support for SSL via GnuTLS]) AC_LIBOBJ([gnutls]) LIBS="$LIBGNUTLS $LIBS" else AC_MSG_ERROR([GnuTLS has not been found. Use --with-ssl=openssl if you explicitly want OpenSSL.]) fi fi AC_CHECK_FUNCS(gnutls_priority_set_direct) ]) # endif: --with-ssl != no? ]) # endif: --with-ssl == openssl? dnl Enable NTLM if requested and if SSL is available. if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes then if test x"$ENABLE_NTLM" != xno then ENABLE_NTLM=yes AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.]) AC_LIBOBJ([http-ntlm]) fi else AC_CHECK_LIB(nettle, nettle_md4_init, [HAVE_NETTLE=yes], [HAVE_NETTLE=no; AC_MSG_WARN(*** libnettle was not found. You will not be able to use NTLM)]) if test x"$HAVE_NETTLE" = xyes then AC_SUBST(NETTLE_LIBS, "-lnettle") AC_DEFINE([HAVE_NETTLE], [1], [Use libnettle]) if test x"$ENABLE_NTLM" != xno then ENABLE_NTLM=yes AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.]) AC_LIBOBJ([http-ntlm]) LIBS="$NETTLE_LIBS $LIBS" fi else dnl If SSL is unavailable and the user explicitly requested NTLM, dnl abort. if test x"$ENABLE_NTLM" = xyes then AC_MSG_ERROR([NTLM authorization requested and SSL not enabled; aborting]) fi fi fi dnl dnl Check for libmetalink dnl AS_IF([test x"$with_metalink" != xno], [ PKG_CHECK_MODULES([METALINK], libmetalink, [ LIBS="$METALINK_LIBS $LIBS" CFLAGS="$METALINK_CFLAGS $CFLAGS" AC_DEFINE([HAVE_METALINK], [1], [Define if using metalink.]) with_metalink=yes ], [ with_metalink=no ]) have_gpg=no AS_IF([test x"$with_metalink" = xyes], [ dnl dnl Check for GPGME dnl m4_ifdef([AM_PATH_GPGME], [ AM_PATH_GPGME([], [ LIBS="$GPGME_LIBS $LIBS" CFLAGS="$GPGME_CFLAGS $CFLAGS" AC_DEFINE([HAVE_GPGME], [1], [Define if GPGME is available.]) have_gpg=yes ]) ]) ]) ]) dnl ********************************************************************** dnl Checks for IPv6 dnl ********************************************************************** dnl dnl We test for IPv6 by checking, in turn, for availability of dnl presence of the INET6 address/protocol family and the existence of dnl struct sockaddr_in6. If any of them is missing, IPv6 is disabled, dnl and the code reverts to old-style gethostbyname. dnl dnl If --enable-ipv6 is explicitly specified on the configure command dnl line, we check for IPv6 and abort if not found. If --disable-ipv6 dnl is specified, we disable IPv6 and don't check for it. The default dnl is to autodetect IPv6 and use it where available. dnl AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]), [case "${enable_ipv6}" in no) AC_MSG_NOTICE([disabling IPv6 at user request]) dnl Disable IPv6 checking ipv6=no ;; yes) dnl IPv6 explicitly enabled: force its use (abort if unavailable). ipv6=yes force_ipv6=yes ;; auto) dnl Auto-detect IPv6, i.e. check for IPv6, but don't force it. ipv6=yes ;; *) AC_MSG_ERROR([Invalid --enable-ipv6 argument \`$enable_ipv6']) ;; esac ], [ dnl If nothing is specified, assume auto-detection. ipv6=yes ] ) if test "X$ipv6" = "Xyes"; then PROTO_INET6([], [ AC_MSG_NOTICE([Disabling IPv6 support: your system does not support the PF_INET6 protocol family]) ipv6=no ]) fi if test "X$ipv6" = "Xyes"; then TYPE_STRUCT_SOCKADDR_IN6([],[ AC_MSG_NOTICE([Disabling IPv6 support: your system does not support \`struct sockaddr_in6']) ipv6=no ]) if test "X$ipv6" = "Xyes"; then WGET_STRUCT_SOCKADDR_STORAGE MEMBER_SIN6_SCOPE_ID fi fi if test "X$ipv6" = "Xyes"; then AC_DEFINE([ENABLE_IPV6], 1, [Define if IPv6 support is enabled.]) AC_MSG_NOTICE([Enabling support for IPv6.]) elif test "x$force_ipv6" = "xyes"; then AC_MSG_ERROR([IPv6 support requested but not found; aborting]) fi dnl dnl Find makeinfo. We used to provide support for Emacs processing dnl Texinfo using `emacs -batch -eval ...' where makeinfo is dnl unavailable, but that broke with the addition of makeinfo-specific dnl command-line options, such as `-I'. Now we depend on makeinfo to dnl build the Info documentation. dnl AC_CHECK_PROGS(MAKEINFO, [makeinfo], [true]) dnl dnl Find perl and pod2man dnl AC_PATH_PROGS(PERL, [perl5 perl], no) AC_PATH_PROG(POD2MAN, pod2man, no) if test "x${POD2MAN}" = xno; then COMMENT_IF_NO_POD2MAN="# " else COMMENT_IF_NO_POD2MAN= fi AC_SUBST(COMMENT_IF_NO_POD2MAN) dnl dnl Check for IDN/IRIs dnl AC_ARG_ENABLE(iri, AC_HELP_STRING([--disable-iri],[disable IDN/IRIs support]), [case "${enable_iri}" in no) dnl Disable IRIs checking AC_MSG_NOTICE([disabling IRIs at user request]) iri=no ;; yes) dnl IRIs explicitly enabled iri=yes force_iri=yes ;; auto) dnl Auto-detect IRI iri=yes ;; *) AC_MSG_ERROR([Invalid --enable-iri argument \`$enable_iri']) ;; esac ], [ dnl If nothing is specified, assume auto-detection iri=yes ] ) AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], [Support IDN/IRIs (needs GNU Libidn)]), libidn=$withval, libidn="") AS_IF([test "X$iri" != "Xno"],[ AM_ICONV if test "X$am_cv_func_iconv" != "Xyes"; then iri=no if test "X$force_iri" = "Xyes"; then AC_MSG_ERROR([Libiconv is required for IRIs support]) else AC_MSG_NOTICE([disabling IRIs because libiconv wasn't found]) fi fi ],[ # else # For some reason, this seems to be set even when we don't check. # Explicitly unset. LIBICONV= ]) if test "X$iri" != "Xno"; then if test "$libidn" != ""; then LDFLAGS="${LDFLAGS} -L$libidn/lib" CPPFLAGS="${CPPFLAGS} -I$libidn/include" fi # If idna.h can't be found, check to see if it was installed under # /usr/include/idn (OpenSolaris, at least, places it there). # Check for idn-int.h in that case, because idna.h won't find # idn-int.h until we've decided to add -I/usr/include/idn. AC_CHECK_HEADER(idna.h, , [AC_CHECK_HEADER(idn/idn-int.h, [CPPFLAGS="${CPPFLAGS} -I/usr/include/idn"], [iri=no])] ) if test "X$iri" != "Xno"; then AC_CHECK_LIB(idn, stringprep_check_version, [iri=yes LIBS="${LIBS} -lidn"], iri=no) fi if test "X$iri" != "Xno" ; then AC_DEFINE([ENABLE_IRI], 1, [Define if IRI support is enabled.]) AC_MSG_NOTICE([Enabling support for IRI.]) else AC_MSG_WARN([Libidn not found]) fi fi dnl dnl Check for UUID dnl AC_ARG_WITH(libuuid, AC_HELP_STRING([--without-libuuid], [Generate UUIDs for WARC files via libuuid])) AS_IF([test "x$with_libuuid" = xyes], [ # libuuid was explicitly requested PKG_CHECK_MODULES([UUID], uuid, [ LIBS="$UUID_LIBS $LIBS" CFLAGS="$UUID_CFLAGS $CFLAGS" uuid_mode=1 ], [ AC_SEARCH_LIBS(uuid_generate, uuid, [uuid_mode=1], [AC_MSG_ERROR(*** libuuid was explicitly requested but wasn't found.)]) ]) ], [test "x$with_libuuid" = xno], [ # libuuid was explicitly *not* requested AC_CHECK_HEADER(uuid.h, AC_CHECK_FUNC(uuid_create, [uuid_mode=2])) ], [ # default: AC_CHECK_HEADER(uuid.h, [ AC_CHECK_FUNC(uuid_create, [uuid_mode=2]) ], [ AC_CHECK_HEADER(uuid/uuid.h, AC_SEARCH_LIBS(uuid_generate, uuid, [uuid_mode=1])) ]) ]) AS_IF([test "x$uuid_mode" = x1], [ AC_DEFINE([HAVE_LIBUUID], [1], [Define if using libuuid.]) ], [test "x$uuid_mode" = x2], [ AC_DEFINE([HAVE_UUID_CREATE], 1, [Define if uuid_create is available.]) ]) dnl dnl Check for PCRE dnl AC_ARG_ENABLE(pcre, AC_HELP_STRING([--disable-pcre], [Disable PCRE style regular expressions])) AS_IF([test "X$enable_pcre" != "Xno"],[ PKG_CHECK_MODULES([PCRE], libpcre, [ CFLAGS="$PCRE_CFLAGS $CFLAGS" AC_CHECK_HEADER(pcre.h, [ LIBS="$PCRE_LIBS $LIBS" AC_DEFINE([HAVE_LIBPCRE], [1], [Define if libpcre is available.]) ]) ], [ AC_CHECK_HEADER(pcre.h, [ AC_CHECK_LIB(pcre, pcre_compile, [ LIBS="${LIBS} -lpcre" AC_DEFINE([HAVE_LIBPCRE], 1, [Define if libpcre is available.]) ]) ]) ]) ]) dnl Needed by src/Makefile.am AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" != "Xno"]) AM_CONDITIONAL([WITH_SSL], [test "X$with_ssl" != "Xno"]) AM_CONDITIONAL([METALINK_IS_ENABLED], [test "X$with_metalink" != "Xno"]) dnl dnl Create output dnl AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in tests/Makefile lib/Makefile testenv/Makefile]) AC_CONFIG_HEADERS([src/config.h]) AC_OUTPUT AC_MSG_NOTICE([Summary of build options: Version: $PACKAGE_VERSION Host OS: $host_os Install prefix: $prefix Compiler: $CC CFlags: $CFLAGS $CPPFLAGS LDFlags: $LDFLAGS Libs: $LIBS SSL: $with_ssl Zlib: $with_zlib PSL: $with_libpsl Digest: $ENABLE_DIGEST NTLM: $ENABLE_NTLM OPIE: $ENABLE_OPIE Debugging: $ENABLE_DEBUG Assertions: $ENABLE_ASSERTION Valgrind: $VALGRIND_INFO Metalink: $with_metalink GPGME: $have_gpg ]) wget-1.17.1/ChangeLog0000664000000000000000000263646612632615677011260 000000000000002015-12-11 Giuseppe Scrivano Tag release 1.17.1 * NEWS: Update. * gnulib: sync from upstream. 2015-12-11 Tim Rühsen Remove ABOUT-NLS from git * ABOUT-NLS: Remove from repository, it will be autogenerated. * .gitignore: Add ABOUT-NLS and build-aux/ar-lib 2015-12-11 Jernej SimonÄiÄ * src/metalink.c: Specify 'rb' as mode to open file 2015-12-10 Ãngel González * doc/wget.texi: add hint for self-signed certificates 2015-12-10 Ander Juaristi Fix Coverity issues * src/ftp.c (getftp): on error, close the file and attempt to remove it before exiting. * src/hsts.c (hsts_store_open): update modification time in the end. 2015-12-10 Darshit Shah Faster Travis Builds * contrib/travis-ci: Test under different languages only when all the features are enabled. This covers the maximum number of strings. For the other option permutations, test only in the default C locale Fix remaining bugs in progress bar implementation * src/progress.c (create_image): Ensure that the entire screen width is drawn everytime to prevent any artefacts from leaking through. 2015-12-09 Darshit Shah Add bug-wget to list of travis recipients * .travis.yml: Add bug-wget to list of Travis Report Recipients Eliminate more compiler warnings * src/options.h (CHECK_CERT_MODES): Remove C99 style comma after last value * src/progress.c (create_image): Do not mix statements and declarations * src/init.c (cmd_boolean_internal): Mark unused parameters Re-enable test on multibyte locale in Travis * .travis.yml: Use Russian locale instead of Japanese since it seems to be more complete * contrib/travis-ci: Re-enable testing on a Russian locale Fix progress bar assertion with multibyte locales * src/progress.c (bar_create): Define size of progress buffer explicitly (create_image): Clean up progress bar image creation. Use memset instead of for loops to create arrays of the same byte. 2015-12-06 Darshit Shah Introduce Travis Integration * .travis.yml: Configuration file for Travis-CI * contrib/travis-ci: Script to run on travis. Similar to check-hard but modified for travis. * tests/valgrind-suppressions{-ssl}: Add extra suppressions to prevent a Valgrind False Positive errors in an old version Since Travis currently supports only public repositories on GitHub, the support for automated testing through Travis will be done using my Clone of Wget on GitHub at: https://github.com/darnir/wget.git Any commits pushed to this repository will trigger a build on Travis. 2015-12-04 Tim Rühsen SKIP SSL/TLS tests if configured without it * testenv/Makefile.am: Set SSL_TESTS env variable * testenv/Test--https-crl.py, testenv/Test--https.py, testenv/Test-hsts.py: Return 77 (SKIP) if SSL/TLS is not configured 2015-12-03 Tim Rühsen Add Test-hsts.py to SSL_TESTS * testenv/Makefile.am: Add Test-hsts.py to SSL_TESTS 2015-12-03 Ygal Blum Fix compilation when without-ssl is selected 2015-12-03 Darshit Shah Include Metalink and GPG information in version * src/build_info.c.in: Include the presence of Metalink and GPGME features in the output for wget --version 2015-12-03 Giuseppe Scrivano Add --check-certificate=quiet * doc/wget.texi: Add documentation for --check-certificate=quiet. * src/options.h (enum CHECK_CERT_MODES): New enum. * src/init.c (cmd_check_cert): New static function. (cmd_boolean_internal): Likewise. * src/gnutls.c (ssl_check_certificate): Handle CHECK_CERT_QUIET. * src/openssl.c (ssl_check_certificate): Handle CHECK_CERT_QUIET. 2015-11-24 Tim Rühsen Fix regression in HTTP authentication * src/http.c (initialize_request): Fix wrong params to search_netrc() Regression introduced in commit 29850e77 Reported-by: Axel Reinhold 2015-11-23 Tim Rühsen Fix SIGSEGV in -N / --content-disposition combination * src/http.c (http_loop): Fix SIGSEGV Reported-by: "Schleusener, Jens" 2015-11-20 Ander Juaristi Fix potential NULL pointer dereference * src/gnutls.c (ssl_connect_wget): check for NULL before calls 2015-11-20 Giuseppe Scrivano * configure.ac: change gettext version to 0.18.1 2015-11-19 Ikey Doherty configure.ac: Use correct gettext version 2015-11-19 Tim Rühsen Fix HSTS memory issue + test code issue * src/hsts.c (hsts_find_entry): Fix freeing memory (hsts_remove_entry): Remove freeing host member (hsts_match): Free host member here (hsts_store_entry): Free host member here (test_url_rewrite): Fix 'created' value (test_hsts_read_database): Fix 'created' value Reported-by: Dagobert Michelsen 2015-11-17 Tim Rühsen Include errno.h instead of sys/errno.h (Solaris issue) * src/metalink.c: Include errno.h instead of sys/errno.h Reported-by: Dagobert Michelsen 2015-11-17 Darshit Shah Fix compile error when IPv6 is disabled * src/ftp-basic.c: The code for the new FTPS functionality was unintentionally inside a #ifdef IPV6 block. Move the code around so that it is defined even when IPV6 isn't used Use gnulib module flock to provide function * bootstrap.conf: Use module flock from gnulib to provide it on other platforms such as Windows. 2015-11-16 Darshit Shah Eliminate NDEBUG redefined warnings * src/wget.h: Define NDEBUG only if it hasn't been defined before 2015-11-15 Giuseppe Scrivano NEWS: prepare new release cycle Prepare release 1.17 * gnulib: sync with upstream. * NEWS: Update. * src/main.c: Change the copyright year. 2015-11-03 Tim Rühsen Document combination of -nc and -O Fixes #46359 2015-11-03 Tim Rühsen Do not download/save file on error when --spider enabled * src/http.c (gethttp,http_loop): Do not download/save file on error when --spider is enabled and not working recursive. Reported-by: Сковорода Ðикита Ðндреевич chalkerx@gmail.com Fixes #45821 2015-10-27 Tim Rühsen Fix URL conversion for colons in filenames * src/convert.c (construct_relative): Prepend './' to filename * tests/Test-k.px: Amend test to succeed 2015-10-15 Tim Rühsen Adjust indentation of --no-use-server-timestamps in help output * src/main.c: Adjust indentation of --no-use-server-timestamps 2015-10-13 Ander Juaristi Added --convert-file-only option * src/convert.c (convert_links_in_hashtable, convert_links): test for CO_CONVERT_BASENAME_ONLY. (convert_basename): new function. * src/convert.h: new constant CO_CONVERT_BASENAME_ONLY. * src/init.c, src/main.c, src/options.h: new option "--convert-file-only". * doc/wget.texi: updated documentation. Reviewed-by: Gabriel Somlo 2015-10-12 Darshit Shah Fix Test-ftp-pasv-not-supported.px * tests/Test-ftp-pasv-not-supported.px: We do *NOT* expect any downloaded files. Also, do not negate the Test response. The test originally expected a downloaded file, but this is not true. As a result, the test would fail and return exit code 1. This was presumably the reason why the test result was negated before returning to the shell. Fix this issue, so that the test runs correctly without any hacks. 2015-10-12 Darshit Shah Fix make distcheck failures in Perl SSL Tests * tests/Makefile.am: Add valgrind-suppressions-ssl to EXTRA_DIST * tests/Test-proxied-https-auth-keepalive.px: Find valgrind in correct path during make distcheck * tests/Test-proxied-https-auth.px: Same 2015-10-12 christian fafard Skip HTTPS perl tests if IO::Socket::SSL not installed * tests/Test-proxied-https-auth-keepalive.px: Skip test if perl module IO::Socket::SSL is not installed (trivial change). * tests/Test-proxied-https-auth.px: Skip test if perl module IO::Socket::SSL is not installed (trivial change). 2015-10-09 Ander Juaristi Fix potential race condition * src/hsts.c (hsts_read_database): get an open file handle instead of a file name. (hsts_store_dump): get an open file handle instead of a file name. (hsts_store_open): open the file and pass the open file handle. (hsts_store_save): lock the file before the read-merge-dump process. Reported-by: Daniel Kahn Gillmor 2015-10-09 Ander Juaristi Fix HSTS merge bug * src/hsts.c (hsts_store_merge): call hsts_new_entry() if the entry does not exist in the database. When merging the existing HSTS database on disk with the one on memory, the entries that were on disk but not on memory were ignored. Thus, only the existing entries were merged. This behavior was only triggered when more than one Wget processes were using the same HSTS database simultaneously. This commit fixes the bug by adding the new entries to the on-memory database if they were not found there. 2015-09-28 Giuseppe Scrivano testenv/Test--rejected-log.py: Remove trailing white spaces 2015-09-28 Tim Rühsen Handle TLS rehandshakes in GnuTLS code * src/gnutls.c: New static function _do_handshake() * src/gnutls.c (wgnutls_read_timeout): Handle rehandshake * src/gnutls.c (wgnutls_write): Handle rehandshake * src/gnutls.c (ssl_connect_wget): Move handshake code into _do_handshake() Fixes #46061 2015-09-22 Darshit Shah Add tests for missing qop in digest auth * testenv/test-auth-both.py: Add qop parameter for digest auth * testenv/test-auth-digest.py: Same * testenv/conf/authentication.py: Support additional parameters for authentication * testenv/servers/http/http_server.py: Same Do not test for impossible qop value * http.c (digest_authentication_encode): Wget already errors out if qop != "auth". Then it makes no sense to test for qop == "auth-int" later on. Currently, Wget does not support the "auth-int" qop value and till nobidy requests, it may remain so. 2015-09-22 Darshit Shah Fix #46024. Support RFC 2069 Digest Authentication * http.c (digest_authentication_encode): Some servers are still using the obsolete RFC 2069 Digest Authentication. Allow Digest authentication without the qop parameter for this. Reported-by: Andreas Longwitz 2015-09-21 Darshit Shah Revert "Disable progress bar when wget is backgrounded (trivial patch)" This reverts commit e6247325633d7d0007906f88d573a3bfa37307a7. 2015-09-20 Giuseppe Scrivano NEWS: cite FTPS support 2015-09-14 Ander Juaristi Added support for FTPS * doc/wget.texi: updated documentation to reflect the new FTPS functionality. * src/ftp-basic.c (ftp_greeting): new function to read the server's greeting. (ftp_login): greeting code was previously here. Moved to ftp_greeting to support FTPS implicit mode. (ftp_auth): wrapper around the AUTH TLS command. (ftp_ccc): wrapper around the CCC command. (ftp_pbsz): wrapper around the PBSZ command. (ftp_prot): wraooer around the PROT command. * src/ftp.c (get_ftp_greeting): new static function. (init_control_ssl_connection): new static function to start SSL/TLS on the control channel. (getftp): added hooks to support FTPS commands (RFCs 2228 and 4217). (ftp_loop_internal): test for new FTPS error codes. * src/ftp.h: new enum 'prot_level' with available FTPS protection levels + prototypes of previous functions. New flag for enum 'wget_ftp_fstatus' to track whether the data channel has some security mechanism enabled or not. * src/gnutls.c (struct wgnutls_transport_context): new field 'session_data'. (wgnutls_close): free GnuTLS session data before exiting. (ssl_connect_wget): save/resume SSL/TLS session. * src/http.c (establish_connection): refactor ssl_connect_wget call. (metalink_from_http): take into account SCHEME_FTPS as well. * src/init.c, src/main.c, src/options.h: new command line/wgetrc options. (main): in recursive downloads, check for SCHEME_FTPS as well. * src/openssl.c (struct openssl_transport_context): new field 'sess'. (ssl_connect_wget): save/resume SSL/TLS session. * src/retr.c (retrieve_url): check new scheme SCHEME_FTPS. * src/ssl.h (ssl_connect_wget): refactor. New parameter of type 'int *'. * src/url.c. src/url.h: new scheme SCHEME_FTPS. * src/wget.h: new FTPS error codes. * src/metalink.h: support FTPS scheme. 2015-09-10 Christian Neukirchen Disable progress bar when wget is backgrounded (trivial patch) * src/progress.c (create_image): progress only when in foreground Sometimes I start wget, but the remote site is too slow, so I rather want to run it in background, however when I simply use job control for that, wget will keep spewing the progress bar all over my terminal. I have found the SIGHUP/SIGUSR1 feature to redirect output to a log file, but I think the following small patch is even more useful, since the progress bar will simply resume when wget is foregrounded again (also, the final message is still printed to the terminal in any case): 2015-09-04 Hubert Tarasiuk Add information about libmetalink and GnuPG * README.checkout: Optional dependencies and URL references. 2015-09-02 Hubert Tarasiuk Do not free Metalink structure if not initialized * src/main.c (main): Move metalink_delete to the conditional block. 2015-09-01 Ander Juaristi Updated HSTS documentation * doc/wget.texi: updated HSTS documentation. Reported-by: Daniel Kahn Gillmor 2015-09-01 Ander Juaristi Extra debug traces for HSTS. * src/main.c (load_hsts, save_hsts): added DEBUGP() calls to signal reads and saves of the HSTS database file. 2015-08-31 Darshit Shah Fix coding style violation in last commit * http.c (test_parse_range_header): Declare loop variable explicitly. Not in gnu99 standard. 2015-08-30 Darshit Shah Add unit test for parse_content_range() method * http.c (test_parse_range_header): New function to test the function for parsing the HTTP/1.1 Content-Range header. * test.[ch]: Same * http.c (parse_content_range): Fix parsing code. Fail on scenarios mentioned in rfc 7233. 2015-08-30 Tim Rühsen Fix null pointer dereference * src/metalink.c (gpg_skip_verification): Check output_stream before fclose Fix leaks found by Coverity * src/http.c (parse_strict_transport_security): Free c_max_age (open_output_stream): Fix indentation * src/iri.c (locale_to_utf8): Free new 2015-08-29 Tim Rühsen Fix two leaks foudn by Coverity * src/http.c (gethttp): Do not leak 'message'. * src/main.c (format_and_print_line): Do not leak 'line_dup'. Fix resource leak discovered by Coverity * src/retr.c (retrieve_url): Don't leak local_file. 2015-08-29 Darshit Shah Fix memory leaks in unit-test * hsts.c (get_hsts_store_filename): Free the homedir value (close_hsts_test_store): Actually free the store struct too (test_hsts_new_entry): Pass store to close_hsts_test_store() (test_hsts_url_rewrite_superdomain): Same (test_hsts_url_rewrite_congruent): Same (test_hsts_read_database): Same and homedir and store filename * http.c (test_parse_content_disposition): Free the returned filename * url.c (test_append_uri_pathel): Free allocated string Fix mixed-indentation in http.c * http.c: Fix mix indentation. Visual change only. 2015-08-27 Tim Rühsen Suppress debug output when strings may contain password * iri.c (do_conversion): Do not print out converted strings if they contain an '@'. That could be an URL with embedded password. Fixes #45825 2015-08-26 Ander Juaristi Fix resource leak. * src/http.c (parse_strict_transport_security): Freed memory to avoid resource leak. Comply with GNU coding style. 2015-08-22 Tim Rühsen Fix typo in NEWS * NEWS: Change typo --accept-reject into --accept-regex Reported-by: grarpamp 2015-08-21 Jookia <166291@gmail.com> Clarify that links are being converted. * src/convert.c: Add 'links in' after 'Converted %d' and 'Converting %s'. Removed useless TODOs. * testenv/Test--reject-log.py: Remove TODOs. 2015-08-15 Miquel Llobet Fixed #44516 -o- not logging to stdout src/log.c (log_init): check for hypen on filename, set stdout 2015-08-15 Daniele Calore Fix #40426: Allow -r -O- only if FILE is regular * main.c: added check of "-r -O FILE" option combination allow only if FILE is a regular file (bug #40426) 2015-08-15 Darshit Shah Fix var name conflicts with math.h and wingdi.h * src/recur.c (reject_reason): Rename all enum members to WG_RR_xx. * src/recur.c (retrieve_tree, download_child, write_reject_log_reason): Same 2015-08-14 Tim Rühsen Let bootstrap/autoreconf work without GPGME installed * configure.ac: Check for existance of AM_PATH_GPGME 2015-08-11 Tim Rühsen Fix IP address exposure in FTP code * src/ftp.c (getftp): Do not use PORT when PASV fails. * tests/FTPServer.px: Add pasv_not_supported server flag. * tests/Makefile.am: Add Test-ftp-pasv-not-supported.px * tests/Test-ftp-pasv-not-supported.px: New test Fix IP address exposure when automatically falling back from passive mode to active mode (using the PORT command). A behavior that may be used to expose a client's privacy even when using a proxy. 2015-08-07 Tim Rühsen Fix C89 compliancy in HSTS test code * src/hsts.c (test_hsts_new_entry): Move variable assignment before code Fix C89 compliancy in latest code * src/recur.c: Declare variables before code (write_reject_log_url): Use const keyword where appropriate Use the 'default' switch statement Use xfree() instead of free() Renamed variable f -> fp (write_reject_log_reason): Use const keyword where appropriate Use the 'default' switch statement Renamed variable f -> fp Renamed variable r -> reason 2015-08-07 Tim Rühsen Remove redundant definition of _GNU_SOURCE * src/warc.c: Remove definition of _GNU_SOURCE _GNU_SOURCE is already defined in config.h 2015-08-07 Giuseppe Scrivano NEWS: update 2015-08-07 Jookia <166291@gmail.com> Rewrite the --rejected-log test using the new framework. * tests/Test--rejected-log.px: Remove old test. * testenv/Test--rejected-log.py: Create new test. Replace variables before comparing expected files. * expected_files.py: Use formatted_content instead of file.content. 2015-08-06 Jookia <166291@gmail.com> Add option to write URL rejections to a tab-delimited CSV log. * main.c: Add "--rejected-log" option. * init.c: Add "rejectedlog" command. * options.h: Add "rejected_log" parameter string. * wget.texi: Add brief documentation on new --rejected-log option. * recur.c: Optionally log details of URLs not traversed. Add reject_reason enum. (download_child_p -> download_child): Return a reject_reason. (descend_redirect_p -> descend_redirect): Return a reject_reason. (retrieve_tree): Support logging reasons for rejection. Add write_reject_log_header that writes a CSV format header to a file. Add write_reject_log_url that writes a url struct to a file in CSV format. Add write_reject_log_reason that writes the URL and parent URL as well as the rejection reason to a CSV file. * Test--rejected-log.px: Add a basic test for the --rejected-log command. * tests/Makefile.am: Run Test--rejected-log.px. This allows you to figure out why URLs are being rejected and some context around it. CSV is used as the output format since it can be used easily parsed, it's delimited by tabs instead of commas to allow using all (quoted) URL characters and includes column names which may be used for compatibility. 2015-08-04 Tim Rühsen Fix memory leak in HSTS code * src/main.c (get_hsts_database): Free 'home' variable void uninitialized variable in metalink code * src/metalink.c: Init retr_err with METALINK_MISSING_RESOURCE * src/wget.h: Add enum METALINK_MISSING_RESOURCE 2015-07-24 Darshit Shah Fix function name collision with OpenSSL library * src/utils.[ch], src/http.c, src/metalink.c: Rename function hex_to_string() to wg_hex_to_string sine it collides with a similarly named function in OpenSSL Library. Fix configure options for metalink * configure.ac: Ensure metalink support can be properly disabled 2015-07-22 Alex Henrie Make the filename marquee a proper marquee * src/progress.c: Start the marquee in the middle of the available space and do not restart it until all of the text has scrolled out of view. 2015-07-20 Giuseppe Scrivano NEWS: cite HSTS Fix metalink tests testenv/Test-metalink-http.py: initialize HTTP test server testenv/Test-metalink-xml.py: initialize HTTP test server 2015-07-20 Ander Juaristi Enhancements in testsuite engine + new HSTS test. * testenv/Makefile.am: added new test 'Test-hsts.py'. * testenv/Test-hsts.py: new test for HSTS. * testenv/conf/domains.py: new hook to override domain list. * testenv/test/base_test.py: (__init__): new optional parameter for tests 'req_protocols'. (get_domain_addr): set the instance variables 'addr' and 'port'. Return address as an array (domain, port) instead of string. (gen_cmd_line): take into account domain and port. * testenv/test/http_test.py (__init__): new optional parameter 'req_protocols'. (setup): new function. Call to server_setup() decoupled from begin() and moved here. (begin): call to superclass to maintain backward compatibility. Removed call to server_setup(). This patch adds a new parameter to the test suite called 'req_protocols', and a new function called 'setup'. The ability for tests to be able to set some extra parameters such as the actual requested protocols (with 'req_protocols') became obvious when support for HSTS was added to Wget, where the requested URI and the actual executed URI do not have to be the same. This new parameter is optional and if not specified, the test suite behaves as before. Also, the new function 'setup' is provided as a means to start the test HTTP server, but not launch the test yet (this is done when calling 'begin', as usual), in case we want to query the address and port in which the test server listens. If 'setup' is not called, it is automatically invoked when calling 'begin'. With these measures, we preserve backward-compatibility with existing tests. 2015-07-20 Ander Juaristi Added support for HSTS. * Makefile.am: Added new source files hsts.c and hsts.h. * http.c (parse_strict_transport_security): new function for STS header parsing. (gethttp): update the HSTS store. * http.h: new include "hsts.h". * init.c: new options --hsts and --hsts-file. * main.c (get_hsts_database, load_hsts, save_hsts): new functions. New options --no-hsts and --hsts-file added to help. (main): load and save HSTS store. * options.h: new variables for supporting --hsts and --hsts-file. * retr.c (retrieve_url): rewrite the URI according to the HSTS policy before entering http_loop. * test.c, test.h: new unit tests for HSTS. * utils.c, utils.h (countchars): new function. * wget.h: new preprocessor check. * hsts.c, hsts.h: new files with the HSTS engine implementation. Added support for HTTP Strict Transport Security (HSTS), as defined by RFC 6797. 2015-07-20 Giuseppe Scrivano NEWS: cite metalink support fix compiler warnings * src/utils.h: Include * src/recur.c: Include "exits.h" 2015-07-20 Hubert Tarasiuk Test preferred location in Metalink-over-HTTP test case. * testenv/Test-metalink-http.py: Ensure preferred location is handled properly. Geolocation support for Metalink resources. * doc/wget.text: Add information about --preferred-location. * src/init.c: Add --preferred-location option. * src/main.c (option_data): Handle --preferred-location argument. (main): Sort resources based on location if requested. * src/metalink.c (metalink_res_cmp): Compare based on location if priority and preference are equal. * src/options.h (options): Add preferred_location option. Support at most one file signature. Adapt comments to libmetalink 0.13. * src/metalink.c (retrieve_from_metalink): Add comment about new libmetalink version. Do not iterate over signatures - support just one. Move some Metalink-related code from http.c to metalink.c. * src/http.c: Move find_key_value, has_key, find_key_values. * src/metalink.c: To here. * src/metalink.h: Make them non-static and add prototypes here. Unit test for find_key_values. * src/http.c: Add test_find_key_values. * src/test.c (main): Run new test. * src/test.h: Add test_find_key_values. Unit test for has_key. * src/http.c: Add test_has_key. * src/test.c (main): Run new test. * src/test.h: Add test_has_key. Unit test for find_key_value. * src/http.c: Add test_find_key_value. * src/test.c (main): Run new test. * src/test.h: Add test_find_key_value. Test case for Metalink over HTTP. * testenv/Test-metalink-http.py: New test. * testenv/Makefile.am: Add to test list. Support multiple headers with same name in Python test suite. * testenv/README: Describe how to use repeated header name. * testenv/server/http/http_server.py (finish_headers): Send all values from list if the header value is a Python list. Test case for Metalink in XML. * testenv/Test-metalink-xml.py: New test. * testenv/Makefile.am: Add file for automake. Start HTTP test only when calling begin(). * testenv/test/http_test.py: Move self.do_test() from __init__ to begin(). Metalink support. * bootstrap.conf: Add crypto/sha256 * configure.ac: Look for libmetalink and GPGME * doc/wget.texi: Add --input-metalink and --metalink-over-http options description. * po/POTFILES.in: Add metalink.c * src/Makefile.am: Add new translation unit (metalink.c) * src/http.c (http_stat): Add metalink field. (free_stat): Free metalink field. (find_key_value): Find value of given key in header string. (has_key): Check if token exists in header string. (find_key_values): Find all key=value pairs in header string. (metalink_from_http): Obtain Metalink metadata from HTTP response. (gethttp): Call metalink_from_http if requested. (http_loop): Request Metalink metadata from HTTP response if should be. Fall back to regular download if no Metalink metadata found. * src/init.c: Add --input-metalink and --metalink-over-http options * src/main.c (option_data): Handle --input-metalink and --metalink-over-http cmd arguments. (print_help): Print --input-metalink option description. (main): Retrieve files from Metalink file * src/metalink.c (retrieve_from_metalink): Download files described by metalink. (metalink_res_cmp): Comparator for resources priority-sorting. * src/metalink.h: Create header for metalink.c (RES_TYPE_SUPPORTED): Define supported resources media. (DEFAULT_PRI): Default mirror priority for Metalink over HTTP. (VALID_PRI_RANGE): Valid priority range. * src/options.h (options): Add input_metalink option and metalink_over_http options. * src/utils.c (hex_to_string): Convert binary data to ASCII-hex. * src/utils.h (hex_to_string): Add prototype. * src/wget.h: Add metalink-related error enums Add METALINK_METADATA flag for document type. 2015-07-15 Romain Bentz Add NULL value check to fix #45289 * src/recur.c (retrieve_tree): Check return value of url_parse() 2015-07-14 Tim Rühsen Let HTTPS tests XFAIL when no TLS support configured * configure.ac: Export WITH_SSL for use in Makefile.am * testenv/Makefile.am: Add HTTPS tests to XFAIL_TESTS when !WITH_SSL Reported-by: Ander Juaristi 2015-07-01 Tim Rühsen Change function params to const in src/iri.[ch] * iri.h, iri.c: Added const attribute for params of parse_charsset(), check_encoding_name(), idn_encode(), idn_decode(), remote_to_utf8(), set_uri_encoding(), set_content_encoding(). Work around a libidn <= 1.30 vulnerability * src/iri.c: Add _utf8_is_valid() to check UTF-8 sequences before passing them to idna_to_ascii_8z(). 2015-06-27 Ãngel González Fix wgetrc filename creation for Windows * init.c/wgetrc_file_name: Remove obsolete code in WINDOWS code path Reported-by: Gisle Vanem 2015-06-16 Darshit Shah Add valgrind suppression files for HTTPS tests * testenv/test/base_test.py: Use Valgrind SSL suppressions file for tests * testenv/valgrind-suppression-ssl, tests/valgrind-suppression-ssl: Add new suppression files to suppress OpenSSL errors in valgrind * tests/test-proxied-https-auth.px: Use the valgrind SSL suppressions file for the test * tests/test-proxied-https-auth-keepalive.px: Same 2015-06-14 Darshit Shah contrib/check-hard: Indentation and spacing cleanup * contrib/check-hard: Reduce the amount of text output to the screen. Also implement some indentation and whitespace cleanups. 2015-06-14 Tim Rühsen Fix usage of CFLAGS in contrib/check-hard * contrib/check-hard: Set CFLAGS per command line instead of using export. 'make distcheck' changes CFLAGS. So using ./configure -C together with exported CFLAGS fails. Setting CFLAGS per command line works smoothly. 2015-06-13 Tim Rühsen Move test_* function protoypes from test.c to test.h * src/test.c: Remove test_* function prototypes, make tests_run static * src/test.h: Add test_* function protoypes 2015-05-23 Giuseppe Scrivano NEWS: cite --if-modified-since gnulib: update gnulib 2015-05-22 Hubert Tarasiuk Include --if-modified-since option in user manual. * doc/wget.texi: Add --if-modified-since section. Support If-Modified-Since header in timestamping mode. * src/wget.h: Add IF_MODIFIED_SINCE enum for dt. Add TIMECONV_ERR enum to uerr_t. * src/http.c (time_to_rfc1123): Convert time_t do http time. * src/http.c (initialize_request): Include If-Modified-Since header if appropriate. * src/http.c (set_file_timestamp): Separate this code from check_file_output. * src/http.c (check_file_output): Use set_file_timestamp. * src/http.c (gethttp): Handle properly 304 return code and 200 if server ignores If-Modified-Since headers. * src/http.c (http_loop): Load filename to hstat if condget was requested, use IF_MODIFIED_SINCE if requested and current timestamp can be obtained. Add --if-modified-since option * src/init.c: Add to commands array. * src/main.c: Add to cmdline_option. Add to help message. * src/options.h: Add to options struct. Add test for condget requests. * testenv/Test-condget.py: the test * testenv/Makefile.am: add to tests list Support conditional GET in testenv server. * src/exc/server_error.py: Add exception for GET to HEAD fallback. * src/server/http/http_server.py: Do not send body if 304 return code requested for a file. Implement timestamp support for local files in testenv * testenv/README: Change timestamp format definition * testenv/conf/local_files.py: Set proper timestamps 2015-05-20 Pär Karlsson Fix undeclared loop variable in Perl test suite Reported-by: Hubert Tarasiuk 2015-05-12 Ander Juaristi Make sure Wget does not unescape reserved chars. * testenv/Test-reserved-chars.py: New file. * testenv/Makefile.am: Added new test Test-reserved-chars.py. When following redirections, Wget should not unescape the reserved characters that might appear in target URLs. 2015-05-12 Ander Juaristi Fixed incorrect handling of reserved chars. * src/iri.c (do_conversion): Call url_unescape_except_reserved, instead of url_unescape. * src/url.c (url_unescape_1): New static function. (url_unescape): Calls url_unescape_1 with mask zero. Preserves same behavior as before. Only code changes. (url_unescape_except_reserved): New function. * src/url.h: Added prototype for url_unescape_except_reserved(). When the locale is US-ASCII, URIs that contain special characters in them are converted to IRIs according to RFC 3987, section 3.2 "Converting URIs to IRIs". 2015-05-07 Darshit Shah Fix documentation for update_speed_ring() * progress.c (update_speed_ring): The comment for the function incorrectly stated that the function uses thirty samples from the past instead of twenty. Reported-By: Yi Li 2015-05-04 Darshit Shah Remove shadowed variable in http.c * http.c (gethttp): Rename err to conn_err to prevent shadowed variable 2015-05-04 Steven Schubiger paramcheck: use explicit quoting for here-docs * util/paramcheck.pl: Adjust here-docs 2015-05-03 Tim Ruehsen Fix format specifier warning * src/utils.c (aprintf): Use %d for int argument 2015-05-01 Nikolay Merinov Fix timestamping and continue behaviour with ftp protocol. * src/ftp.c (ftp_loop_internal): Add option `force_full_retrieve' that force to retrieve full file. (ftp_retrieve_list): Pass `true' as `force_full_retrieve' option to `ftp_loop_internal' if we want to download file with newer timestamp than local copy. 2015-04-27 Rohit Mathulla openssl: Read cert from private key file when needed * src/openssl.c (ssl_init): Assign opt.cert_{file, type} from opt.private_key(_type) Fix double free bug in SSL code * src/openssl.c, src/gnutls.c (ssl_init): Copy options using xstrdup 2015-04-20 Hubert Tarasiuk Single exit point and common cleanup code in gethttp * src/http.c (gethttp): Common cleanup for type, message, req, resp, head. Single exit point. 2015-04-17 Tim Rühsen Silence warning in perl test suite * tests/WgetTests.pm: Use string comparisons for $valgrind variable 2015-04-17 Tim Rühsen Check memory allocations in WARC code * src/warc.c: Remove some memory allocations, use xmalloc instead of malloc Reported-by: Bill Parker 2015-04-17 Tim Rühsen Add more const usage to function params * warc.c, warc.h: Add const specifier to several function args 2015-04-14 Darshit Shah PEP8'ify the Python Test Suite * testenv/conf/{__init__,authentication,files_crawled, hook_sample,reject_header,server_files}.py: Aesthetic changes to meet Python PEP8 guidelines * testenv/exc/{server_error,test_failed}.py: Same * testenv/misc/{colour_terminal,wget_file}.py: Same * testenv/server/http/http_server.py: Same * testenv/test/base_test.py: Same 2015-04-13 Ander Juaristi Improved test suite documentation * README.checkout: Added reference to Python. New section "Testing and development". Updated information about test suites. Added support for GDB in Python tests * base_test.py (gen_cmd_line): Check GDB_TESTS environment variable. 2015-04-13 Tim Ruehsen Added GDB support to Perl tests * WgetTests.pm (run): Check GDB_TESTS environment variable. 2015-04-11 Hubert Tarasiuk Add Valgrind suppression for libidn.so at idna_to_ascii_4z * tests/WgetTests.pm (run): Include suppression file when running Valgrind. * tests/valgrind-suppressions: Add suppression for idn_to_ascii_4z. * tests/Makefile.am: Add valgrind-suppressions to EXTRA_DIST. 2015-04-11 Ãngel González Remove memory leak in idn_encode. * src/iri.c (idn_encode): Free buffer from remote_to_utf8 when needed; give meaningful names to variables; remove excessive comment. 2015-04-10 Hubert Tarasiuk Fix error in free_vec. * src/utils.c (free_vec): Increment pointer instead of its value. Reported-by: Gisle Vanem 2015-04-10 Ãngel González Fix const usage in iri.c * src/iri.c (remote_to_utf8): Do not qualify with const the output pointer. (do_conversion): Use the provided input parameter as const. (idn_encode): casts to remote_to_utf8 parameters are no longer needed. * src/iri.h: Adjusted remote_to_utf8 prototype. * src/url.c: It is no longer necessary to cast new_url to const char. 2015-04-06 Miquel Llobet Fixed #44628 honoring RFC 6266 content-disposition src/http.c (parse_content_disposition): stores filename* and filename separately and choses filename* if available. (test_parse_content_disposition): added new tests. 2015-04-02 Giuseppe Scrivano NEWS: cite last change 2015-04-02 Steven M. Schweda Add option to restrict filenames used VMS. * src/options.h (enum restrict_files_os): Define "restrict_vms". * src/init.c (defaults) [__VMS]: Set "opt.restrict_files_os" to "restrict_vms". (cmd_spec_restrict_file_names): honor "vms". * src/url.c (filechr_not_unix): Define "filechr_not_vms". (filechr_table): Update for VMS. (append_uri_pathel): Honor opt.restrict_files_os. (FN_QUERY_SEP): Update for VMS. (FN_QUERY_SEP_STR): Update for VMS. 2015-04-01 Hubert Tarasiuk Change semantics of resp_free and request_free in http.c * src/http.c (resp_free): Change the semantics of this function. (request_free): Change the semantics of this function. (initialize_request): Adjust request_free call. (establish_connection): Adjust request_free, resp_free calls. (gethttp): Adjust request_free, resp_free calls. Do not free request in establish_connection; do it in gethttp * src/http.c (establish_connection): Do not free request here (it is * never allocated here). * src/http.c (gethttp): Free request before returning if error in * establish_connection encountered. Transform read_header label and goto into a loop * src/http.c (gethttp): Replace label and goto statement with a do loop. 2015-03-31 Hubert Tarasiuk Factor out set_content_type function from gethttp * src/http.c (gethttp): Move some code in... (set_content_type): ... a new function. 2015-03-18 Giuseppe Scrivano Factor out some gethttp code * src/http.c (gethttp): Move some code in... (open_output_stream): ... a new function. Factor out some auth gethttp code * src/http.c (gethttp): Move some code in... (check_auth): ... a new function. Factor out some gethttp code * src/http.c (gethttp): Move some code in... (check_file_output): ... a new function. Factor out some connection initialization code for gethttp * src/http.c (gethttp): Move some initialization code in... (establish_connection): ... a new function. Factor out some proxy initialization code for gethttp * src/http.c (gethttp): Move some initialization code in... (initialize_proxy_configuration): ... a new function. Factor out some initialization code for gethttp * src/http.c (gethttp): Move some initialization code in... (initialize_request): ... a new function. 2015-03-18 Tim Ruehsen src/ftp.c: make sure warc_tmp becomes closed before return Reported-by: Coverity bug #1188044 src/http.c: fix error return of digest_authentication_encode() Reported-by: Coverity bug #1188036 2015-03-17 Rohan Prinja Convert wget.texi to UTF-8 * doc/wget.texi: convert to UTF-8 by adding @documentencoding * doc/Makefile.am: Pass argument --utf8 to pod2man. 2015-03-16 Ander Juaristi Alamos * doc/wget.texi: The default is GnuTLS, not OpenSSL. 2015-03-16 Darshit Shah testenv/http_server: Allow overriding Headers We would like to override existing headers in the response from the server to allow the test cases to define their own headers. This patch allows this behaviour through the use of the add_header() method while also allowing sending multiple headers of the same name. 2015-03-14 Darshit Shah retr.c: Fix memory leak in retrieve_from_file() Reported by: Coverity Bug 1188045 html-url.c: Fix potential memory leaks Reported by: Coverity Bug 1188050 main.c: Fix two potential memory leaks Reported by: Coverity bug 1188048 retr.c: Fix two memory leaks when proxy URL is bad Reported by: Coverity bug 1188047 2015-03-13 Darshit Shah Docs: --post-file is binary data Wget considers the file mentioned in the --post-file argument as a binary file and does not strip any control characters. The lack of this information in the documentation can cause a lot of headaches debugging for a simple issue 2015-03-09 Giuseppe Scrivano maint: update copyright year ranges to include 2015 NEWS: Prepare new development cycle 2015-03-09 Yousong Zhou Fix --content-on-error option handling. * src/http.c: Log --content-on-error downloads. * src/retr.c (retrieve_url): Register the download of an error page when --content-on-error is specified. testenv: add test case Test--convert-links--content-on-error.py. * testenv/Makefile.am: Register the new test. * testenv/Test--convert-links--content-on-error.py: Add test case for the combination of --convert-links and --content-on-error.py. testenv: fix http_server.py with Response and Authentication. * testenv/exc/server_error.py: Try writing file content for GET request even if there is a Response rule present. * testenv/server/http/http_server.py: Likewise. testenv: improve color output a bit. * testenv/misc/colour_terminal.py: Only print color codes when stdout isatty(). testenv: typo and style fix. * testenv/server/http/http_server.py(BaseTest): Add docstring; use raw string for regex. * testenv/server/http/http_server.py(_Handler): Typo fix. * testenv/conf/server_files.py(ServerFiles): Code style change for readability plus another typo fix. 2015-03-09 Giuseppe Scrivano NEWS: tag 1.16.3 2015-03-08 Anderson Goulart src/main.c (--no-verbose): don't show progress bar Fixes #44431 2015-03-06 Darshit Shah main.c: Use assertion to test buffer size 2015-03-02 Darshit Shah main.c: Need to explicitly disallow show_progress in -q 2015-02-28 Giuseppe Scrivano NEWS: add other items and tag 1.16.2 gnulib: sync gnulib 2015-02-27 Giuseppe Scrivano NEWS: Update file 2015-02-23 Eli Zaretskii warc.c: native uuid generation on Windows * warc.c (windows_uuid_str) [WINDOWS]: New function specific to MS-Windows. (warc_uuid_str) [WINDOWS]: If windows_uuid_str succeeds, use its result; otherwise use the fallback method. 2015-02-18 Gisle Vanem idn: use idn_free() to free allocated libidn memory xfree() might crash on libidn memory on Windows. From 'man idn_free': "Under Windows, different parts of the same application may use different heap memory, and then it is important to deallocate memory allocated within the same module that allocated it. This function makes that possible." 2015-02-10 Tim Rühsen gettext: Use gnulib's gettext.h for compatibility Fixes issues with gettext on Solaris Reported-by: Kiyoshi KANAZAWA src/openssl.c: Use SSL_state() instead of ssl_st.state Changes in OpenSSL 1.0.2 API hides ssl_st structure members. Reported-by: Gisle Vanem 2015-01-31 Giuseppe Scrivano * README.checkout: Remove duplicated word * cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Add ChangeLog-2014-12-10. 2015-01-27 Tim Rühsen README.checkout: Mention libio-socket-ssl-perl to be installed 2015-01-22 Dagobert Michelsen tests/Makefile.am: Solaris needs libintl and libiconv for testsuite 2015-01-20 Darshit Shah progress bar: Allow display on stderr alongwith -o This commit causes the --show-progress option to print the progress bar to stderr even when a logfile was explicitly provided on the command line. Such a combination allows a user to log the output of Wget while simultaneously keeping track of the download status. 2015-01-18 Darshit Shah gnulib: Pull submodule forward 2015-01-16 Mathieu Parent src/connect.c: More verbose error message (tiny change) This fixes Debian bug #144076. 2015-01-04 Tim Ruehsen src/ftp-basic.c: Accept 5-digit port numbers in EPSV responses Reported-by: Adam Sampson 2015-01-02 Tim Rühsen README.checkout: Add libpcre, pkg-config, libgnutls Add description for libpcre Add description for pkg-config Add description of GnuTLS Add 2014,2015 copyright year Use ASCII copyright characters 2014-12-27 Tim Ruehsen src/http.c: Revert commit d81a8d5f56fca2746c4ad83d764bd24adcfbe927 The removal of the 'redundant' condition was a failure. Fixes: #43876 Reported-by: Sean Jensen-Grey 2014-12-25 Tim Ruehsen configure.ac: Skip pkg-config for opensl and gnutls when prefix is given Make --with-libssl-prefix and --with-libgnutls-prefix do the right thing, no matter if pkg-config is installed or not. Reported-by: Charles Diza 2014-12-25 Tim Ruehsen src/main.c, src/warc.c: Use gnulib's base_name() instead of basename() Reported-by: Eli Zaretskii 2014-12-24 Giuseppe Scrivano Generate distributed ChangeLog from git log * bootstrap.conf (gnulib_modules): Add "gitlog-to-changelog". * Makefile.am: Generate the ChangeLog file from the git log and the old ChangeLog data. merge ChangeLog files in ChangeLog-2014-12-10. * ChangeLog: truncate file. * ChangeLog.README: Likewise. * doc/ChangeLog: Likewise. * msdos/ChangeLog: Likewise. * src/ChangeLog: Likewise. * testenv/ChangeLog: Likewise. * tests/ChangeLog: Likewise. * ChangeLog-2014-12-10: New file. * Makefile.am: Distribute ChangeLog-2014-12-10. 2014-12-21 Eli Zaretskii src/utils.c: Don't include termios.h on Windows 2014-12-21 Tim Ruehsen tests/FTPServer.pm: Fix ftp tests for Windows The Single Unix strftime format specifier %e is not supported by MS Windows. Instead we now use %d. Reported-By: Eli Zaretskii 2014-12-21 Tim Rühsen gnulib: Use basename() from gnulib module 'dirname' Avoid basename incompatibilities between POSIX and GNU implementations. Also, libgen.h isn't needed any more which increases compatibility. 2014-12-21 Giuseppe Scrivano contrib/check-hard: delete trailing whitespaces and repeated word 2014-12-21 Benno Schulenberg * src/main.c (print_help): Indent description continuation lines by two spaces. * src/main.c (print_help): Don't use a possessive instead of a plural. * src/main.c (print_help): Don't use the backtick as a left quote mark in the help text. * src/main.c (print_help): Remove the full stops from option descriptions. And use semicolons to separate multiple phrases in a description. * src/main.c (print_help): Make all option descriptions start with a lowercase letter. Also spell URL consistently in all uppercase, and fix the grammar. 2014-12-20 Tim Ruehsen doc/wget.texi: Add 'https_only' in 'wgetrc commands' section Reported-By: Eli Zaretskii 2014-12-20 Eli Zaretskii tests/WgetTests.pm: Print timestamps when tests fail due to wrong timestamps 2014-12-19 Tim Rühsen sample.wgetrc: Fix wrong command 'locale' into 'localencoding' Reported-by: Eli Zaretskii wget.texi: Clarify wgetrc command syntax Reported-by: Eli Zaretskii 2014-12-18 Tim Rühsen configure.ac: Fix libuuid and uuid_create detection --with-libuuid now explictly asks for libuuid. --without-libuuid ignores libuuid and tries to use libc builtin functions. Else try builtin functions first, libuuid second and fallback to Wget's own function. 2014-12-17 Yuriy M. Kaminskiy src/log.c: Fix unexpected termination in logprintf (tiny change) When errno was set to EPIPE before call to logprintf (e.g. during close of SSL connection that was reset by peer), it will unexpectedly terminate wget. It should exit only when EPIPE was triggered by logging code. Regression by 0b5b100fc9aaa54257ffa16a083a862c031c335b 2014-12-17 Tim Rühsen configure.ac: Check for RAND_egd() in pkg-config success code src/main.c: Conditionally print help for --random-file and --egd-file --random-file is only relevant when compiled with either OpenSSL or LibreSSL. --egd-file is only relevant when compiled with OpenSSL src/init.c: Fix indentation for crlfile option wget.texi: Document --random-file and --egd-file as OpenSSL only 2014-12-17 Jérémie Courrèges-Anglas openssl: Detect the availability of RAND_egd (tiny change) Alternatives like LibreSSL don't provide RAND_egd() anymore. Fixes compilation on OpenBSD. Fix use of uuid libc functions (tiny change) * Always attempt to detect uuid.h and uuid_create(). * Split libuuid and uuid.h implementations of warc_uuid_str(), since those APIs vary significantly. * Correctly use the uuid.h functions 2014-12-16 Darshit Shah Revert "ChangeLog: Move all ChangeLog files to .pre-gitlog" This reverts commit fcd3b3c473be25c4967fd8139d976e76faaef1b6. Turns out that removing the ChangeLog files causes the Wget build to fail. While this issue is investigated and sorted out, the commit is reversed to allow people to be able to build Wget from master 2014-12-16 Tim Rühsen contrib: Added script contrib/check-hard to check Wget status This script automates some tests, e.g. testing with and without valgrind, using different configure options. It is aimed at developers to execute before pushing commits. 2014-12-16 Cong Ma ftp: fix invalid pointer dereference in getftp() (tiny change) The pointer respline in use after being passed to ftp_response() may be uninitialized if ftp_response() fails. Ensure that respline be used after checking the return value of ftp_response(). 2014-12-15 Darshit Shah ChangeLog: Move all ChangeLog files to .pre-gitlog From v1.16.1 onwards, Wget no longer maintains an active ChangeLog file. Instead the ChangeLog will be automatically generated on each release through gnulib's gitlog-to-changelog script. However, the old versions of the ChangeLog files are retained for reference. These files are renamed with a .pre-gitlog appended to their filenames. Also removed ChangeLog.README file which is not required anymore 2014-12-12 Tim Rühsen src/iri.c: Call xstrndup instead of strndup strndup() does not exist in some older C libraries, also xstrndup() exits on memory allocation failures. bootstrap.conf: Add module 'getline' This function does not exist in some older C libraries. 2014-12-12 Tim Rühsen src/iri.c: Use c_strcasestr instead of strcasestr This also fixes a problem with strcasestr not being in the boostrap.conf module list. Reported-by: Kiyoshi KANAZAWA 2014-12-11 Friedrich Haubensak Add support for older versions of flex (tiny change) E.g. flex 2.5.4 (Solaris 10) does not like a space after -o. 2014-12-11 Tim Ruehsen * src/Makefile.am: Support older versions of flex 2014-12-10 Tim Ruehsen * configure.ac: Check for pcre.h 2014-12-08 Giuseppe Scrivano * cfg.mk (local-checks-to-skip): Add sc_cast_of_argument_to_free. 2014-12-05 Tim Ruehsen * src/Makefile.am: Removed reference to cmpt.c 2014-12-05 Tim Ruehsen * configure.ac: Fix message for when GnuTLS has not been found. 2014-12-05 Tim Ruehsen * bootstrap.conf: Add modules fnmatch, memrchr, strcase, strptime, strtoll, timegm Remove module strcasecmp Use module spawn-pipe instead of deprecated module pipe 2014-12-04 Darshit Shah * src/wget.h: Define MIX and MAX macros globally for all files * src/gnutls.c, retr.c: Delete declaration of MIN macro * src/http.c, progress.c: Delete declaration of MIN and MAX macros 2014-12-04 Darshit Shah * src/ftp.c (getftp): Remove a call to assert(1) and replace with error message. Also fix indentation 2014-12-03 Jérémie Courrèges-Anglas (tiny change) * src/openssl.c (ssl_init): Allow pfs to be used with protocols other than TLSv1. 2014-12-03 Gisle Vanem * src/openssl.c (ssl_init): Fix C89 warning 2014-12-03 Gisle Vanem * src/mswindows.c (ws_cleanup): Fix compiler error 2014-12-01 Tim Ruehsen * src/connect.c, iri.c, url.c, warc.c: Fix issues reported by static code analysis tool 'parfait'. Closes: #41235 Reported-by: Jiri Kukacka 2014-11-29 Tim Ruehsen * src/utils.h: xfree() sets argument to NULL after freeing, removed xfree_null() * src/connect.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c hash.c, host.c, html-url.c, http.c, init.c, iri.c, log.c, main.c, mswindows.c, netrc.c, openssl.c, recur.c, res.c, retr.c, url.c, warc.c: Replaced xfree_null() by xfree() 2014-11-28 Tim Ruehsen * src/main.c: Fix length of program_argstring, fix regression introduced with commit 9217b864d865cf1766e1589d138c8fc17d3d3d5c. 2014-11-28 Tim Ruehsen * src/gettext.h: Removed this file * src/wget.h: Do not include gettext.h, include libintl.h directly, define _() as gettext() shortcut. The header file gettext.h is simply not needed. 2014-11-28 Tim Ruehsen * src/Makefile.am: Removed gettext.h 2014-11-27 Darshit Shah * src/cookies.c, gettext.h, init.c, retr.c, url.c, warc.c: Replace usage of free() with xfree() macro. 2014-11-26 Tim Ruehsen * tests/HTTPServer.pm: Substitue server port in HTTP headers This allows us to use references like "Location" => "http://localhost:{{port}}/whatever in test cases. 2014-11-26 Tim Ruehsen * testenv/Makefile.am: Removed Test-auth-both.py from XFAIL_TESTS 2014-11-26 Tim Ruehsen * src/recur.c: Fix blacklisting of URLs to download Fixes a reported crash and prevents multiple downloads of the same file in case the URL is escaped in different ways. The crash has been Reported-by: Frédéric 2014-11-26 Tim Ruehsen * src/recur.c: Add space after function names 2014-11-26 Tim Ruehsen * src/http.c: Select strongest challenge from WWW-Authenticate, support multiple challenges per header line. 2014-11-26 Tim Ruehsen * src/gnutls.c (ssl_connect_wget): Implement missing code for --secure-protocol=TLSv1_1|TLSv1_2, print message before abort() for missing protocol implementations. * src/openssl.c (ssl_init): Print message before abort() for missing protocol implementations. 2014-11-26 Giuseppe Scrivano * testenv/Makefile.am (TESTS): Add Test-redirect-crash.py. * testenv/Test-redirect-crash.py: New File. 2014-11-25 Pär Karlsson * src/Makefile.am: Added missing version.h to wget_SOURCES 2014-11-25 Darshit Shah * bootstrap.conf: Add flex as a prerequisite to building Wget from the repository sources 2014-11-24 Tim Ruehsen * src/wget.h, test.c, main.c: Make program_name and program_argstring const 2014-11-24 Tim Ruehsen * src/warc.c: Fix C89 compile errors using ./configure --without-libuuid 2014-11-24 Tim Ruehsen * src/warc.c, warc.h, http.c: Add size of buffer to warc_timestamp() 2014-11-24 Tim Ruehsen * src/retrc.c: Fix possibly uninitialized variable 2014-11-22 Darshit Shah * src/wget.h: Make extern declaration for program_name 2014-11-22 Darshit Shah * src/wget.h: Make extern declaration for program_argstring. * src/warc.c: Remove extern declaration * src/test.c: Make program_argstring a char *, instead of const char *. 2014-11-22 Darshit Shah * src/version.h: New file. Add extern declarations for globally shared strings * src/Makefile.am: Have version.c import version.h * src/main.c: Import version.h and remove old extern declarations * src/http.c: Same * src/warc.c: Same 2014-11-22 Darshit Shah * src/version.h: Add extern for compilation_string * src/main: Remove declaration for compilation_String 2014-11-22 Darshit Shah * src/utils.c (abort_run_with_timeout): The sig parameter is not used. Mark it as such. (abort_run_with_timeout): One implementation of this function did not specify _Noreturn. Add it. 2014-11-22 Darshit Shah * src/retr.h: Declare extern variable numurls * src/http.c: Remove extern declaration for numurls * src/ftp.c: Same 2014-11-22 Darshit Shah * src/hosts.c (address_list_set_faulty): Add a helpful error message for when a logical assumption fails 2014-11-22 Darshit Shah * src/cookies.c (discard_matching_cookie): Replace defensive assert with a logical check and error message 2014-11-22 Darshit Shah * build-aux/build_info.pl: Include version.h in the final C file generated by the script. 2014-11-21 Tim Ruehsen * testenv/server/http/http_server.py: Fixed typo Blackisted to Blacklisted 2014-11-21 Daniel Stenberg * src/iri.c (remote_to_utf8): Fix compiler warning 2014-11-20 Tim Ruehsen * src/progress.c: Fix code for undefined USE_NLS_PROGRESS_BAR Reported-by: Gisle Vanem 2014-11-20 Tim Ruehsen * src/cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, html-url.c, http.c, init.c, iri.c, main.c, progress.c, res.c, url.c, utils.c, wget.h: Replaced strcasecmp and strncasecmp by c_strcasecmp and c_strncasecmp where only ASCII string comparison is wanted (instead of locale dependent). Fixes possible issues with Wget running in a turkish locale. 2014-11-20 Tim Ruehsen * src/Removed form feeds (\014) from *.c and *.h 2014-11-20 Tim Ruehsen * configure.ac: Fix libpsl<0.6.0 detection 2014-11-20 Tim Ruehsen * NEWS: remove form feeds 2014-11-20 Tim Ruehsen * src/cookies.c, ftp-basic.c, ftp.c, gnutls.c, host.c, html-url.c, http.c, main.c, progress.c, retr.c, warc.c: Trivial fixes for C89 compliancy. 2014-11-20 Gisle Vanem * src/http.c (parse_content_disposition): Fix C89 issue found by MSVC 16 2014-11-20 Gisle Vanem * src/build_info.c.in: Assume large file for WINDOWS 2014-11-20 Darshit Shah * configure.ac: Use pkg-config for libpsl detection config status for libpsl is reflected by $with_libpsl 2014-11-20 Darshit Shah * configure.ac: Use autoconf macros where available 2014-11-20 Darshit Shah * configure.ac: Change option to --enable-assert. Assertions are disabled by default. * NEWS: Edit to reflect default option. * README.checkout: Document --enable-assert for developers 2014-11-20 Darshit Shah * configure.ac: Add the -Wextra flag when no CFLAGS are set 2014-11-20 Darshit Shah * .gitignore: po/stamp-po should be ignored 2014-11-19 Tim Ruehsen * configure.ac: Check for random() 2014-11-19 Tim Ruehsen * src/utils.c (random_float, random_number): Use random() and srandom() if available. Reported-by: Coverity scanner 2014-11-19 Tim Ruehsen * src/openssl.c (ssl_check_certificate): Fix memory leak 2014-11-19 Tim Ruehsen * src/gnutls.c (ssl_init): Report load failure of cert files from cert directory only with --debug. Fixes #41331. 2014-11-19 Tim Ruehsen * src/ftp-basic.c (ftp_epsv): Fix loop check Reported-by: Coverity scanner 2014-11-19 Darshit Shah * testenv/Test-504.py: Add new test case to show how Wget handles 504 Gateway Timeouts * testenv/Makefile.am: Add Test-504.py to TESTS 2014-11-19 Darshit Shah * src/utils.c (compile_posix_regex): Fix memory leak due to unfreed regex pointer 2014-11-19 Darshit Shah * src/progress.c (create_image): Do not scroll filename if amount of scrolling is less than MIN_SCROLL_TEXT * src/retr.c (fd_read_body): Do not print the directory prefix in the progress bar 2014-11-19 Darshit Shah * src/main.c (format_and_print_line): Fix potential memory leak 2014-11-19 Darshit Shah * src/exits.c (get_status_for_err): GATEWAYTIMEOUT is a Server Error and Wget's exit code should reflect that * src/wget.h: Add GATEWAYTIMEOUT as an error * src/http.c (http_loop): Gateway timeout errors should be non-fatal 2014-11-18 Tim Ruehsen * src/Fix warnings from clang-analyzer 3.6 gnutls.c:457:3: warning: Value stored to 'err' is never read err = 0; http-ntlm.c:477:5: warning: Value stored to 'size' is never read size = (size_t) snprintf (ntlmbuf, sizeof(ntlmbuf), http.c:1479:3: warning: Attempt to free released memory xfree_null (hs->error); 2014-11-17 Tim Ruehsen * testenv/server/http/http_server.py: allow case-insensitive auth-type, send BasIc and DIgest to provoke Wget failures with turkish locales 2014-11-17 Tim Ruehsen * bootstrap.conf (gnulib_modules): Add module c-strcase 2014-11-17 Tim Ruehsen * src/main.c: code cleanup for redirect_output_signal() 2014-11-17 Tim Ruehsen * src/http.c: use c_strncasecmp() in BEGINS_WITH macro and in STARTS macro 2014-11-17 Tim Ruehsen * src/ftp.h: removed unused variable ftp_last_respline * src/init.c, test.c, warc.c: removed 'make check'compiler warnings 2014-11-16 Tom Li * src/progress.c (create_image): Ensure that the last character of the filename is scrolled to 2014-11-16 Darshit Shah * po/stamp-po: Remove autogenerated file from checked out sources 2014-11-16 Darshit Shah * gnulib: Update submodule * bootstrap: Update script from latest gnulib 2014-11-16 Darshit Shah * .gitignore: Sort gitignore file based on directories 2014-11-15 Darshit Shah * testenv/certs/README: Remove trailing whitespaces 2014-11-15 Darshit Shah * src/progress.c (create_image): Fix assertion that checks progress bar length Should fix bug #43593 2014-11-15 Darshit Shah * configure.ac: Add AC_HEADER_ASSERT. Enables --disable-assert option 2014-11-12 Witchakorn Kamolpornwijit (tiny change) * src/html-parse.c (map_html_tags): Fix range check 2014-11-12 Tim Ruehsen * src/openssl.c (ssl_init): Fix error handling for CRL loading 2014-11-11 Tim Ruehsen * testenv/recreated the certs and the CRL file, also amended certs/README 2014-11-11 Tim Ruehsen * src/openssl.c (ssl_init): Load CRL file given by --crl-file 2014-11-11 Tim Ruehsen * src/main.c: Fix missing _Noreturn declaration specifiers Reported-by: Gisle Vanem 2014-11-11 Tim Ruehsen * src/http.c (gethttp): Always add Accept-Encoding: identity Fixes bug #40819 Reported-by: Noël Köthe 2014-11-10 Tim Ruehsen * testenv/removed certs/wget-cert.pem * testenv/added certs/ca-cert.pem, certs/ca-key.pem, certs/server-cert.pem, certs/server-key.pem and certs/server-crl.pem * testenv/added certs/README for description how to generate the certs and keys * testenv/server/http/http_server.py: amended to work with new certs/ files * testenv/added Test--https-crl.py to test --crl-file * testenv/Makefile.am: added Test--https-crl.py * testenv/Test--https.py: use --ca-certificate of --no-check-certificates 2014-11-10 Tim Ruehsen * src/openssl.c: Fix compile-time check for TLSv1.1 and TLSv1.2 Reported-by: Velemas Vosak 2014-11-09 Darshit Shah * src/http.c (gethttps): Honour keep-alive when server responds with a 416 Range not Satisfiable 2014-11-09 Darshit Shah * src/http.c (gethttp): Remove redundant condition evaluation 2014-11-06 Tim Ruehsen * src/init.c, main.c, options.h: added new option --crl-file for specifying a CRL (Certificate Revocation List) file. * src/gnutls.c: load CRL file given by --crl-file Reported-by: Noël Köthe 2014-11-06 Tim Ruehsen * doc/wget.texi: added description for --crl-file 2014-11-05 Tim Ruehsen * tests/Test-stdouterr.px: fix skip exit code to 77 2014-11-05 Tim Ruehsen * tests/Makefile.am: added $(LIB_CLOCK_GETTIME) to unit test linkage Reported-by: kdevel@vogtner.de 2014-11-05 Tim Ruehsen * configure.ac: check for python3 * Makefile.am: only use python test suite if python3 found 2014-11-05 Giuseppe Scrivano * contrib/tsocked-wget (TSOCKS_CONF_FILE): Remove empty new-line. 2014-11-04 Tim Ruehsen * src/iri.c (do_conversion): fix quote() misuse * src/iri.c (remote_to_utf8): fix segfault on do_conversion() error Reported-by: Mikael Magnusson 2014-11-04 Darshit Shah * README.checkout: Bootstrap script is ./bootstrap not ./bootstrap.sh 2014-11-03 Tim Ruehsen * tests/added new test Test-proxied-https-auth-keepalive.px 2014-11-03 Tim Ruehsen * tests/Test-proxied-https-auth.px: add valgrind support, sync parent / child (client / server) 2014-11-03 Tim Ruehsen * src/log.c: turn on automatic format check for log_vprintf_internal() 2014-11-03 Pär Karlsson * tests/WgetFeature.pm: Fixed finding of WgetFeature.cfg when using separate build dirs. * tests/WgetFeature.pm: Fixed warning from BLOCK eval, made it indo EXPR eval 2014-11-03 Jakub ÄŒajka * src/iri.c (remote_to_utf8): Fixed assumption that char is signed. Fixes fellowing test case failures idn-cmd-utf8, idn-robots-utf8, if char is unsigned. 2014-11-01 Mike Frysinger * configure.ac: Use pkg-config to check for zlib presence and fallback to the previous code if that doesn't work. * configure.ac: Use pkg-config to check for libuuid presence and fallback to the previous code if that doesn't work. * configure.ac: Use pkg-config to check for pcre presence and fallback to the previous code if that doesn't work. * configure.ac: Use pkg-config to check for openssl presence and fallback to the previous code if that doesn't work. * configure.ac: Use pkg-config to check for gnutls presence and fallback to the previous code if that doesn't work. 2014-11-01 Giuseppe Scrivano * src/http.c (gethttp): Do not check for "Connection: close" header only when the Content-Length is specified. 2014-11-01 Darshit Shah * src/progress.c (create_image): Extra padding for size_grouped_diff has already been added. Do not add that again. (create_image): Assert that the progress bar being drawn is lesser than the size of the screen. 2014-11-01 Darshit Shah * configure.ac: Fix check for libpsl 2014-10-31 Tim Ruehsen * src/openssl.c: make _get_rfc2253_formatted() static 2014-10-31 Pär Karlsson * tests/WgetTests.pm: Proper conditional operators, tidied up code, idiomatic improvements as per modern Perl best practices. * tests/WgetFeature.pm: Tidied up code, idiomatic improvements for readability * tests/FTPServer.pm: Tidied up code (perltidy -gnu) * tests/FTPTest.pm: Likewise * tests/HTTPServer.pm: Likewise * tests/HTTPTest.pm: Likewise 2014-10-30 Mike Frysinger * tests/WgetFeature.pm: fix skip exit code to 77 2014-10-30 Mike Frysinger * src/openssl.c: fix implicit decl warning 2014-10-29 Tim Ruehsen * src/openssl.c: print cert subject and issuer RFC2253 compliant * src/openssl.c (ssl_check_certificate): removed memory leak 2014-10-29 Tim Ruehsen * src/http.c (gethttp): use CLOSE_INVALIDATE instead of fd_close 2014-10-29 Tim Ruehsen * src/http.c (gethttp): fix memory leak 2014-10-29 Tim Ruehsen * src/http.c (CLOSE_FINISH): always set fd invalid after close 2014-10-29 Peter Meiser (tiny change) * src/openssl.c (ssl_init) [! OPENSSL_NO_SSL3]: Add guard for OpenSSL without SSLv3. 2014-10-28 Tim Ruehsen * tests/Test-proxied-https-auth.px: synchronize client and server 2014-10-28 Tim Ruehsen * configure.ac: check for strlcpy() 2014-10-28 Tim Ruehsen * configure.ac: add --enable-valgrind-tests 2014-10-28 Tim Ruehsen * src/utils.c: added strlcpy(), concat_strings() rewritten * src/utils.h: added strlcpy() 2014-10-28 Tim Ruehsen * src/ftp.c (ftp_loop_internal): Fix memory leak * src/http.c (gethttp): Fix two memory leaks * src/init.c (cleanup): Fix compile errors and warnings * src/init.c (cleanup): Free more opt variables * src/main.c (main): Fix two memory leaks * src/retr.c (retrieve_url): Fix two memory leaks * src/retr.c (retrieve_url): Add iri to call to url_parse() * src/url.c (url_parse): Fix memory leak 2014-10-28 Giuseppe Scrivano * tests/Makefile.am: Replace $FOO with @VAR@. 2014-10-28 Giuseppe Scrivano * src/Makefile.am: Replace $FOO with @VAR@. 2014-10-28 Giuseppe Scrivano * doc/Makefile.am: Replace $FOO with @VAR@. 2014-10-28 Giuseppe Scrivano * cfg.mk (local-checks-to-skip): Add sc_makefile_at_at_check. * Makefile.am: Replace $FOO with @VAR@. 2014-10-25 Tim Ruehsen * tests/WgetTests.pm (run): generate valgrind command line if requested * tests/Makefile.am: set/export VALGRIND_TESTS 2014-10-25 Tim Ruehsen * testenv/test/base_test.py (gen_cmd_line): generate valgrind command line if requested * testenv/README: amend description of VALGRIND_TESTS * testenv/Makefile.am: set/export VALGRIND_TESTS 2014-10-22 Ãngel González * src/css-url.c (get_uri_string): Honor the specified length argument. 2014-10-21 Matthew Atkinson (tiny change) * src/http.c (gethttp): Always send Content-Length header when method is POST, PUT, or PATCH even with no post body, as some servers will reject the request otherwise. 2014-10-16 Tim Ruehsen * src/url.c (url_parse): little code cleanup * src/html-url.c (get_urls_html): HTTP header Content-Type charset preceeds http-equiv * src/iri.c (do_conversion): moved iconv code completely into the function * src/iri.c (do_conversion): call url_unescape to fix charset conversion * src/iri.c (remote_to_utf8): use strcasecmp to compare encoding * src/gnutls.c (ssl_connect_wget): do not use SSLv3 except explicitely requested * src/openssl.c (ssl_init): do not use SSLv3 except explicitely requested 2014-10-16 Tim Ruehsen * doc/wget.texi (Download Options): update --secure-protocol description 2014-10-08 Nikolay Morozov Sergey Lvov * src/init.c (cmd_spec_secure_protocol): Add support for TLS v1.1 and TLS v1.2 protocols * src/openssl.c (ssl_init): Add support for OpenSSL engines 2014-10-08 Darshit Shah * testenv/Makefile.am: Fix EXTRA_DIST variable for make distcheck * testenv/server/http/http_server.py (HTTPServer.__init__): Fix how CERTFILE is found when running make dist / make distcheck. 2014-10-06 Tim Ruehsen * tests/Test-iri.px: fixed encodings * tests/Test-iri-forced-remote.px: fixed encodings * tests/Test-iri-percent.px: fixed encodings * tests/Test-idn-meta.px: fixed encodings 2014-10-02 Tim Ruehsen * tests/tests/WgetTests.pm: use filename as default test name * tests/tests/Test-*.px: removed redundant 'name => ...' 2014-10-01 Tim Ruehsen * tests/tests/Makefile.am: remove run-px, fixing dist-check 2014-10-01 Tim Ruehsen * tests/Test--post-file.px: name => "Test--post-file", fixing race condition. * tests/Test-N-no-info.px: name => "Test-N-no-info", fixing race condition. * tests/Test-N-smaller.px: name => "Test-N-smaller", fixing race condition. * tests/Test-c-shorter.px: name => "Test-c-shorter", fixing race condition. * tests/Test-proxy-auth-basic.px: name => "Test-proxy-auth-basic", fixing race condition. * tests/Test-proxied-https-auth.px: removed debug print line. 2014-10-01 Darshit Shah * testenv/Makefile.am: Run the tests in Python's Optimizedmode * testenv/conf/__init__.py (gen_hook): Use try..except instead of if..else * testenv/misc/color_terminal.py: System and check will not change while a test is run. Do not test for them on every invokation of printer() * testenv/server/http/http_server.py: The ssl and re modules are required by specific functions. Load them lazily (HTTPSServer.__init__): Lazy load ssl module here (_handler.parse_range_header): Lazy load re module here (_Handler.get_rule_list): get() can return a default value. Use it (_Handler.guess_type): Same (_Handler.is_authorized): Unused function artefact. Remove (_Handler.reject_headers): Unused function artefact. Remove 2014-09-30 Tim Ruehsen * testenv/test/base_test.py: Add --track-origins=yes to valgrind testing 2014-09-25 Tim Ruehsen * tests/Makefile.am: Modified to use parallel test harness * tests/Test-proxied-https-auth.px: get $top_srcdir from ENV * tests/run-px: removed * tests/WgetTest.pm.in: removed * tests/WgetTest.pm: get $top_srcdir from ENV 2014-09-25 Tim Ruehsen * configure.ac: removed WgetTest.pm.in * .gitignore: removed WgetTest.pm 2014-09-12 Darshit Shah * bootstrap.conf: Add GNULib module mbiter 2014-09-08 Darshit Shah * src/init.c (defaults): Set retr-symlinks to true by default. This changes a default setting of wget. Fixes security bug CVE-2014-4877 2014-09-08 Darshit Shah * src/ftp.c (ftp_retrieve_glob): Also check for invalid entries along with harmful filenames (is_valid_entry): New function. Check if the provided node is a valid entry in a listing file. 2014-09-08 Darshit Shah * doc/wget.texi (symbolic links): Update documentation of retr-symlinks to reflect the new default. Add warning about potential security issues with --retr-symlinks=yes. 2014-08-08 Darshit Shah * testenv/conf/__init__.py: Add extra newline according to PEP8 * testenv/conf/{authentication,expect_header,expected_files,expected_ret_code, files_crawled,hook_sample,local_files,reject_header,response,send_header, server_files,urls,wget_commands}.py: Add docstrings explaining the conf file and how it should be used * testenv/server/http/http_server (InvalidRangeHeader): Clear TODO and eliminate this exception. Use ServerError for all such purposes. (_Handler): Remove reference to InvalidRangeHeader (_handler.parse_range_header): User ServerError instead of InvalidRangeHeader (_Handler.do_GET): Add docstring (_Handler.do_POST): Add docstring. Also create an empty dict for rules if no rules are supplied. Send the Location header as suggested in RFC 7231 (_Handler.do_PUT): Don't pop the server file already. Push it to later in .. (_Handler.send_put): .. Here. If the file exists respond with a 204 No Content message and pop the file for replacement. Do not send the Content-Length, Content-Type headers since PUT requests should not respond with data. (_Handler.parse_auth_header): Fit line within 80 chars (_Handler.check_response): Better visual indent (_Handler.authorize_digest): Better visual indent. (_Handler.expect_headers): Remove unused function (_Handler.guess_type): Fix indentation (HTTPd): Add newline according to PEP8 guidelines (HTTPSd): Fix indentation (StoppableHTTPServer): Add docstring (HTTPSServer): Fix indentation (WgetHTTPRequestHandler): Merge class into _handler. (_Handler): Add docstring (_Handler.parse_range_header): Fix indentation (ServerError): Split exception into separate file ... * testenv/exc/server_error.py: ... Here * testenv/misc/colour_terminal.py: Add docstring, fix indentation * testenv/test/base_test.py: Fix visual indent * testenv/test/http_test.py: Fit within 80 char lines 2014-08-04 Darshit Shah * testenv/conf/server_conf.py: Delete file. Server configuration is now done via the server_conf() method. * testenv/server/http/http_server.py (StppableHTTPServer.server_sett): Delete method required by the above hook (HTTPd.server_sett): Same 2014-08-03 Giuseppe Scrivano * doc/wget.texi (Download Options): Fix texinfo warning. 2014-07-28 Ãngel González * contrib: Created contrib folder. * contrib/tsocked-wget: Added wrapper for usage with socks proxy. 2014-07-26 Darshit Shah * testenv/Test-*.py: Remove the '-d' switch from WGET_OPTIONS. * testenv/test/base_test (BaseTest.gen_cmd_line): Add --debug and --no-config to the list of switches passed to wget unconditionally. 2014-07-25 Darshit Shah * .gitignore: Add a gitignore file for the project. 2014-07-23 Darshit Shah * testenv/test/base_test.py (BaseTest.gen_cmd_line): Add support for running all tests through valgrind if the relevant environment variable is set * testenv/conf/expected_ret_code (ExpectedRetCode.__call__): Valgrind returns error code 45 when it detects a memory leak. * testenv/Readme: Update with details about valgrind tests 2014-07-23 Darshit Shah * src/http.c (gethttp): Fix a memory leak when retrying authorization (gethttp): Fix memory leak when trying to parse content disposition headers (http_loop): Assigning a new value to *local)file without freeing the old one causes a memory leak (http_loop): Free the HTTP message and error strings before continuing loop 2014-07-22 Darshit Shah * testenv/(README): Remove old TODO and document SERVER_WAIT variable 2014-07-22 Darshit Shah * configure.ac: Fix broken code for detecting libpsl 2014-07-21 Darshit Shah * src/cookies.c (check_domain_match): Fix a potential memory leak when checking cookie domain names 2014-07-21 Darshit Shah * configure.ac: Fix check for Libpsl 2014-07-21 Daniel Stenberg * src/main.c (print_help): HTTP Method is a part of the Request not Header 2014-07-07 Tomas Hozza * src/iri.c (locale_to_utf8): Fix checking of iconv_open return code. 2014-07-05 Darshit Shah * src/http.c (gethttp): Fix indentation of conditional block (gethttp): Remove unneeded variable 2014-07-05 Darshit Shah * src/cookies.c (check_domain_match): Libpsl requires that all domain names passed to it be in utf8 lower case. 2014-07-03 Darshit Shah * src/wget.h (uerr_t): Remove unused error codes * src/http.c: (http_loop): Remove reference to unused error code 2014-06-30 Giuseppe Scrivano * src/convert.c (local_quote_string): Initialize newname. 2014-06-29 Giuseppe Scrivano * src/warc.c (warc_write_date_header): Avoid out-of-scope variable usage. 2014-06-28 Giuseppe Scrivano * src/Makefile.am (wget_SOURCES): Remove space-tab indentation. 2014-06-28 Giuseppe Scrivano * cfg.mk (local-checks-to-skip): Remove some checks. 2014-06-27 Giuseppe Scrivano * cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Ignore msdos/* and vms/* from syntax-check. 2014-06-22 Giuseppe Scrivano * src/warc.c [HAVE_UUID_CREATE]: Include (warc_uuid_str) [HAVE_UUID_CREATE]: Use uuid_create and uuid_to_string to generate the UUID. Reported by: Alex Zimnitsky 2014-06-22 Giuseppe Scrivano * configure.ac: Add check for uuid_create. 2014-06-22 Darshit Shah (tiny change) * src/progress.c (create_image): Align percentage download output better. 2014-06-22 Darshit Shah * testenv/(conf.files_crawled): diff is a set object and needs explicit str conversion. 2014-06-21 Nikita Vetrov (tiny change) * src/openssl.c: Add one-time call OPENSSL_config in ssl_init. 2014-06-21 Giuseppe Scrivano * src/mswindows.c (fake_fork_child): Fix build error. Reported by: Gisle Vanem . 2014-06-19 Giuseppe Scrivano * src/mswindows.c (fake_fork_child): Revert dinamic allocation of info->lfilename. Reported by: Gisle Vanem . 2014-06-16 Giuseppe Scrivano * src/http.c (gethttp): Set "Connection: Keep-Alive" with keep-alive connections when using a proxy too. Reported by: Thorsten Schroeteler . 2014-06-16 Darshit Shah * src/test.c: Include locale.h header for gettext. 2014-06-16 Darshit Shah * src/main.c (print_help, print_version): Mark as noreturn. * src/utils.c (memfatal, abort_run_with_timout): Same 2014-06-11 Giuseppe Scrivano * tests/Makefile.am: Remove @VAR@ with $FOO. * tests/FTPTest.pm: Remove terminating empty lines. * tests/HTTPServer.pm: Likewise. * tests/HTTPTest.pm: Likewise. * tests/Test--httpsonly-r.px: Likewise. * tests/Test--no-content-disposition-trivial.px: Likewise. * tests/Test--no-content-disposition.px: Likewise. * tests/Test--spider-fail.px: Likewise. * tests/Test--spider-r--no-content-disposition-trivial.px: Likewise. * tests/Test--spider-r--no-content-disposition.px: Likewise. * tests/Test--spider-r-HTTP-Content-Disposition.px: Likewise. * tests/Test--spider-r.px: Likewise. * tests/Test--spider.px: Likewise. * tests/Test--start-pos--continue.px: Likewise. * tests/Test--start-pos.px: Likewise. * tests/Test-E-k-K.px: Likewise. * tests/Test-E-k.px: Likewise. * tests/Test-HTTP-Content-Disposition-1.px: Likewise. * tests/Test-HTTP-Content-Disposition-2.px: Likewise. * tests/Test-HTTP-Content-Disposition.px: Likewise. * tests/Test-N--no-content-disposition-trivial.px: Likewise. * tests/Test-N--no-content-disposition.px: Likewise. * tests/Test-N-HTTP-Content-Disposition.px: Likewise. * tests/Test-N-current.px: Likewise. * tests/Test-N-no-info.px: Likewise. * tests/Test-N-old.px: Likewise. * tests/Test-N-smaller.px: Likewise. * tests/Test-N.px: Likewise. * tests/Test-O--no-content-disposition-trivial.px: Likewise. * tests/Test-O--no-content-disposition.px: Likewise. * tests/Test-O-HTTP-Content-Disposition.px: Likewise. * tests/Test-O-nc.px: Likewise. * tests/Test-O-nonexisting.px: Likewise. * tests/Test-O.px: Likewise. * tests/Test-Restrict-Lowercase.px: Likewise. * tests/Test-Restrict-Uppercase.px: Likewise. * tests/Test-auth-basic.px: Likewise. * tests/Test-auth-no-challenge-url.px: Likewise. * tests/Test-auth-no-challenge.px: Likewise. * tests/Test-auth-with-content-disposition.px: Likewise. * tests/Test-c-full.px: Likewise. * tests/Test-c-partial.px: Likewise. * tests/Test-c-shorter.px: Likewise. * tests/Test-c.px: Likewise. * tests/Test-cookies-401.px: Likewise. * tests/Test-cookies.px: Likewise. * tests/Test-ftp--start-pos.px: Likewise. * tests/Test-ftp-bad-list.px: Likewise. * tests/Test-ftp-iri-disabled.px: Likewise. * tests/Test-ftp-iri-fallback.px: Likewise. * tests/Test-ftp-iri-recursive.px: Likewise. * tests/Test-ftp-iri.px: Likewise. * tests/Test-ftp-list-Multinet.px: Likewise. * tests/Test-ftp-list-UNIX-hidden.px: Likewise. * tests/Test-ftp-list-Unknown-a.px: Likewise. * tests/Test-ftp-list-Unknown-hidden.px: Likewise. * tests/Test-ftp-list-Unknown-list-a-fails.px: Likewise. * tests/Test-ftp-list-Unknown.px: Likewise. * tests/Test-ftp-pasv-fail.px: Likewise. * tests/Test-ftp-recursive.px: Likewise. * tests/Test-ftp.px: Likewise. * tests/Test-i-ftp.px: Likewise. * tests/Test-i-http.px: Likewise. * tests/Test-idn-cmd-utf8.px: Likewise. * tests/Test-idn-cmd.px: Likewise. * tests/Test-idn-headers.px: Likewise. * tests/Test-idn-meta.px: Likewise. * tests/Test-idn-robots-utf8.px: Likewise. * tests/Test-idn-robots.px: Likewise. * tests/Test-iri-disabled.px: Likewise. * tests/Test-iri-forced-remote.px: Likewise. * tests/Test-iri-list.px: Likewise. * tests/Test-iri-percent.px: Likewise. * tests/Test-iri.px: Likewise. * tests/Test-k.px: Likewise. * tests/Test-meta-robots.px: Likewise. * tests/Test-nonexisting-quiet.px: Likewise. * tests/Test-noop.px: Likewise. * tests/Test-np.px: Likewise. * tests/Test-proxy-auth-basic.px: Likewise. * tests/Test-restrict-ascii.px: Likewise. * tests/Test-stdouterr.px: Likewise. * tests/WgetTest.pm.in: Likewise. 2014-06-11 Giuseppe Scrivano * src/ftp.c: Replace main() with main in comments. * src/http.c: Likewise. * src/init.c: Likewise. * src/cmpt.c (day_of_the_week): Remove repeated word in a comment. * src/utils.c: Remove repeated word in a comment. * src/gnutls.c: Do not include . * src/connect.c: Do not depend on always defined macros. * src/convert.c: Likewise. * src/css-url.c: Likewise. * src/hash.c: Likewise. * src/mswindows.h: Likewise. * src/netrc.c: Likewise. * src/progress.c: Likewise. * src/sysdep.h: Likewise. * src/utils.c: Likewise. * src/wget.h: Likewise. * src/Makefile.am: Remove @VAR@ with $FOO. * src/DESCRIP_MODS.MMS: Remove terminating empty lines. * src/DESCRIP_SRC.MMS: Likewise. * src/convert.c: Likewise. * src/exits.c: Likewise. * src/http.c: Likewise. * src/init.c: Likewise. * src/iri.c: Likewise. * src/res.c: Likewise. * src/spider.c: Likewise. * src/test.c: Likewise. * src/test.h * src/url.c: Likewise. * src/utils.c: Likewise. * src/vms.c: Likewise. * src/decc_ver.c (main): Ensure bindtextdomain is called. * src/hash.c (main): Likewise. * src/html-parse.c: Likewise. * src/netrc.c: Likewise. * src/test.c: Likewise. * src/trunc.c: Likewise. 2014-06-11 Giuseppe Scrivano * msdos/Makefile.DJ: Remove terminating empty lines. * msdos/Makefile.WC: Likewise. * msdos/msdos.c: Likewise. 2014-06-11 Giuseppe Scrivano * doc/Makefile.am: Remove @VAR@ with $FOO. * doc/fdl.texi: Remove terminating empty lines. 2014-06-11 Giuseppe Scrivano * NEWS: Remove repeated word. * po/POTFILES.in: Add lib/regcomp.c. * configure.ac: Do not depend on always defined macros. * vms/vms.h: Likewise. * Makefile.am: Remove @VAR@ with $FOO. * util/Makefile.am: Likewise. * ABOUT-NLS: Remove terminating empty lines. * MAILING-LIST: Likewise. * util/rmold.pl: Likewise. * util/trunc.c (main): Ensure bindtextdomain is called. 2014-06-10 Giuseppe Scrivano * src/wget.h: Remove trailing whitespaces. * src/retr.c (getproxy): Return a dinamically allocated string and... (retrieve_from_file, retrieve_url, url_uses_proxy): ...fix the caller to handle it. * src/init.c (home_dir): Replace strncpy with strdup. * src/mswindows.c (struct fake_fork_info): Make lfilename a pointer. (fake_fork_child): Replace strncpy with strdup. * src/http.c (ensure_extension): Replace strncpy with memcpy, not much better but make "make syntax-check" happy and we know the size. * src/ftp.c (getftp): Add parameter last_expected_bytes. (ftp_loop_internal): Pass parameter last_expected_bytes to getftp. * src/ftp-basic.c: Remove declaration of ftp_last_respline. (ftp_response): Do not set ftp_last_respline. * src/css-url.c (get_uri_string): Replace strncpy with strdup. * src/vms.c (set_vms_name): Replace strncpy with strdup. * src/exits.c: Move WGET_EXIT_* definitions to... * src/exits.h: ...here. Add WGET_EXIT_GENERIC_ERROR, WGET_EXIT_PARSE_ERROR. Remove WGET_EXIT_MINIMUM. * src/init.c: Fix calls to exit(). * src/log.c: Likewise. * src/main.c: Likewise. * src/mswindows.c: Likewise. * src/netrc.c: Likewise. * src/utils.c: Likewise. * src/warc.c: Likewise. * src/Test-stdouterr.px: Likewise. 2014-06-10 Giuseppe Scrivano * doc/wget.texi: Remove trailing whitespaces. * doc/fdl.texi: Copy from gnulib. 2014-06-10 Giuseppe Scrivano * build-aux/build_info.pl: Remove trailing whitespaces. * configure.ac: Likewise. 2014-06-08 Giuseppe Scrivano * src/main.c: Make `program_name' not static. * src/cookies.c [HAVE_PSL]: Include only when HAVE_PSL is defined. 2014-05-30 Darshit Shah * src/cookies.c (check_domain_match): Use libpsl to check if the cookie domain is valid. Also remove unneeded test for numeric addresses. 2014-05-30 Darshit Shah * src/connect.{c,h}, convert.{c,h}, cookies.{c,h}, ftp-ls.c, ftp.h, gettext.h, hash.h, host.h, html-parse.h, html-url.h, http.c, init.c, main.c, mswindows.c, netrc.h, openssl.c, options.h, ptimer.h, recur.c, retr.c, sysdep.h, url.h, vms.c, warc.c, wget.h: Whitespace and formatting changes only. 2014-05-30 Darshit Shah * configure.ac: Allow compilation without libpsl. * README.checkout: Add libpsl as a dependency. 2014-05-24 Giuseppe Scrivano * gnulib: update module. 2014-05-24 Darshit Shah * doc/wget.texi: Document noscroll parameter to progress=bar 2014-05-20 Darshit Shah * src/utils.c (human_readable): Add new parameters, acc and decimals for the function. acc decides the number under which decimal values are shown for a certain value, while decimals decides the number of decimal digits displayed * src/utils.h (human_readable): Update declartion of the function * src/ftp.c (print_length): Update call to human_readable * src/http.c (gethttp): Same * src/init.c (defaults): Enable scrolling filenames by default * src/main.c (main): Update call to human_readable * src/options.h (options): Add new option noscroll * src/progress.c (create_image): Update the look of the progress bar. Human readable download size by default and add support for noscroll. (dot_set_params, bar_set_params): Change paramter to char * since strtok needs to modify the string. (bar_set_params): Add support for noscroll parameter to bar. 2014-05-03 Tim Ruehsen * src/retr.c (retrieve_url): fixed memory leak 2014-05-03 Tim Ruehsen * src/ftp-ls.c (ftp_parse_vms_ls): Explicitly typecast strlen's output * src/ftp.c (getftp): Prevent declaration of shadow variable * src/html-url.c (tag_handle_base, tag_handle_form, tag_handle_link, tag_handle_meta): Compiler directive to ignore unused variable * src/html-url.h (cleanup_html_url): Add function declaration * src/http-ntlm.c (ntlm_input, mkhash): Use ssize_t to declare variables that store sizes. (mkhash): Explicitly typecast output of c_toupper (short_pair): Add typecasts to prevent compiler warnings (ntlm-output): Fix datatypes of various variables * src/http.c (gethttp): Prevent declaration of shadow variable err (gethttp): remove unreachable code (test_parse_content_disposition): Fix variable declarations and use countof() macro * src/init.c (run_command): Prevent declaration of ghost variable (cmd_string, cmd_string_uppercase, cmd_file, cnd_vector, cmd_directory_vector, cmd_spec_dirstruct, cmd_spec_header, cmd_spec_warc_header, cmd_spec_htmlify, cmd_spec_mirror, cmd_spec_prefer_family, cmd_spec_progress, cmd_spec_recursive, cmd_spec_regex_type, cmd_spec_restrict_file_names, cmd_spec_report_speed, cmd_spec_timeout, cmd_spec_useragent, cmd_spec_verbose): Add compiler directive to ignore unused variable (cleanup_html_url, spider_cleanup): Remove declarations (test_commands_sorted): Cleanup code (test_cmd_spec_restrict_file_names): Use correct data types * src/iri.c (remote_to_utf8): Use more verbose variable name * src/main.c (init_switches): Prevent declaration of ghost variable * src/netrc.c (netrc_cleanup): Create cleanup function on common naming scheme * src/netrc.h (netrc_cleanup): Declare function * src/openssl.c (openssl_write, openssl_errstr): Compiler directive to ignore unused parameter (openssl_errstr): Explcicitly typecasr output of ASN1_STRING_length * src/options.h (struct options): Declare includes and excludes as const char ** * src/progress.c (progress_interactive_p, progress_handle_sigwinch): Compiler directive to ignore unused parameter * src/res.c (test_is_robots_txt_url): Fix datatypes * src/retr.c (line_terminator): Add compiler directive for ignoring unused paramter. Remove unused variable. * src/spider.h (spider_cleanup): Declare function * src/test,c (main): declare unused paramter * src/test.h (test_*): Declare functions * src/url.c (url_string): Explicit typecast of password strings (run_test): Declare *test, struct tests and *expected_result as const (test_path_simplify, test_append_uri_pathl, test_are_urls_equal): Fix datatypes * src/utls.c (fork_to_background): Be more verbose when errors occur (dir_matches_p, test_dir_matches_p): Declare char * as const as required (base64_encode, base64_decode, get_max_length): Set correct return type (match_pcre_regex, match_posix_regex): Use correct datatypes and typecasts (test_subdir_p): static const struct * src/utils.h (base64_encode, base64_decode, get_max_length): Fix return type * src/warc.c (ward_write_cdx_record): unused parameter (struct hash_table *warc_cdx_dedup_table): Declare as static 2014-05-01 Darshit Shah (tiny change) * src/progress.c (dot_finish): Do not print extra newlines when not in verbose mode. (Purely aesthetic change) (get_eta): Add extra space when eta is printed. (create_image): Remove erroneous space from being added to progress bar when filename > MAX_FILENAME_LEN (create_image): Remove extra space before printed download speeds Make the filename a fixed width column. 2014-05-01 Darshit Shah * doc/wget.texi: Add documentation for --show-progress 2014-05-01 Benjamin Goose * src/http.c: Fix small memory leak 2014-04-22 Tim Ruehsen * src/http.c (gethttp): Fix 204 response handling * tests/Test-204.px: added file * tests/run-px: added Test-204.px * tests/Makefile.am: added Test-204.px 2014-04-22 Giuseppe Scrivano * tests/Makefile.am (EXTRA_DIST): Add missing Test--start-pos.px, Test-ftp--start-pos.px and Test--start-pos--continue.px. 2014-04-19 Darshit Shah * src/log.h (log_options): Add new logging options, LOG_PROGRESS. All progress bar related output should use LOG_PROGRESS. * src/log.c (CHECK_VERBOSE): Implement LOG_PROGRESS output * src/progress.c (dot_create, print_row_stats, dot_update, dot_finish, bar_finish, display_image): Output progress information through LOG_PROGRESS (progress_implementation, dot_create, bar_create, progress_create): The progress bar create functions accept an extra paramter for the filename of the local file (bar_progress): Add new variable to store filename of currently downloading file (bar_finish): Aesthetic change. Print two newlines if in verbose mode, else only one. (MACRO): Define new macro, MIN (create_image): Implement displaying filename in progress bar output Filename tick implementation copied from Giuseppe's patch on parallel-wget * src/progress.h (progress_create): Accept another parameter for filename * src/http.c (gethttp): Remove unnecessary conditional (read_response_body): Send local filename to fd_read_body so that it can be printed on the progress bar * src/main.c (option_data): Add new switch, --show-progress (main): If in verbose output, show progress bar by default (main): Set progress implemetation when displaying progress bar (no_prefix): Increase buffer size to 2048 to prevent overflows * src/init.c (commands): Add new command, showprogress (defaults): By default initialize show_progress to false * src/options.h (options): Add new option, show_progress * src/retr.c (fd_read_body): Accept new parameter for filename of currently downlaoding file (fd_read_body): Create and update progress bar when opt.show_progress is set (fd_read_body): Display progress information in Windows console titlebars * src/retr.h (fd_read_body): Update declaration * src/ftp.c (getftp): Send filename of the local file so that it can be printed with the progress bar. 2014-03-26 Darshit Shah * src/ftp.c (getftp): Rearrange parameters to fix compiler warning * src/utils.c (get_dir_matches_p): Do not pass a const char** to a function that expects char** 2014-03-25 Daniel Stenberg * src/url.c (shorten_length): Remove unused function. 2014-03-19 Yousong Zhou * src/init.c, main.c, options.h: Add option --start-pos for specifying start position of a download. * src/http.c: Utilize opt.start_pos for HTTP download. * src/ftp.c: Utilize opt.start_pos for FTP retrieval. 2014-03-13 Zihang Chen * testenv/test: (new package) package for test case classes * testenv/WgetTest.py: Split into test/base_test.py and test/http_test.py. * testenv/Test-*.py: Optimize the imports according to changes of WgetTest.py 2014-03-13 Zihang Chen * testenv/server: (new package) package for the server classes * testenv/server.http: (new package) package for HTTP server * testenv/server.ftp: (new package) package for FTP server * testenv/HTTPServer.py: Move to server/http/http_server.py. Also change the CERTFILE to '../certs/wget-cert.pem'. * testenv/FTPServer.py: Move to server/ftp/ftp_server.py. * testenv/WgetTest.py: Optimize import respect to the server classes. 2014-03-13 Zihang Chen * testenv/misc: (new package) package for miscellaneous modules * testenv/ColourTerm.py: Move to package misc and rename to colour_terminal.py, add print_color functions to reduce the use of string literals like "BLUE", "RED" etc. * testenv/WgetTest.py: (CommonMethods.Server_setup): Change invocation to printer to print_blue. (CommonMethods.FilesCrawled): Change invocation to printer to print_red. (HTTPTest.__init__): Change invocations to printer to print_red and print_green respectively. 2014-03-13 Zihang Chen * testenv/exc: (new package) package for miscellaneous exceptions * testenv/WgetTest.py: Move TestFailed to exc/test_failed.py. 2014-03-13 Zihang Chen * testenv/conf: (new package) package for rule classes and hook methods * testenv/WgetTest.py: (CommonMethods.Authentication): Move to conf/authentication.py. (CommonMethods.ExpectHeader): Move to conf/expect_header.py. (CommonMethods.RejectHeader): Move to conf/reject_header.py. (CommonMethods.Response): Move to conf/response.py. (CommonMethods.SendHeader): Move to conf/send_header.py. (CommonMethods.ServerFiles): Move to conf/server_files.py. (CommonMethods.LocalFiles): Move to conf/local_files.py. (CommonMethods.ServerConf): Move to conf/server_conf.py. (CommonMethods.WgetCommands): Move to conf/wget_commands.py. (CommonMethods.Urls): Move to conf/urls.py. (CommonMethods.ExpectedRetcode): Move to conf/expected_retcode.py. (CommonMethods.ExpectedFiles): Move to conf/expected_files.py. (CommonMethods.FilesCrawled): Move to conf/files_crawled.py. (CommonMethods.__check_downloaded_files): Rename to _check_downloaded_files, so that the method is callable from outside the class. (CommomMethods.get_server_rules): Modify so that it utilizes the conf package. (HTTPTest): Add a method hook_call(configs, name) to reduce duplications in pre_hook_call, call_test and post_hook_call utilizing the conf package. * testenv/conf/hook_sample.py: (new file) sample for hooks * testenv/conf/rule_sample.py: (new file) sample for rules * testenv/REAMDE: Update sections about customizing rules and hooks. 2014-03-13 Zihang Chen * testenv/base_test.py: (CommonMethods): Rename to BaseTest. (BaseTest): Implement __init__ method where the class-wide variables are initialized. Also variable names like `xxx_list` is renamed to its plural form, e.g. `server_list` => `servers`. (BaseTest.init_test_env): Remove name argument due to its unnecessarity. (BaseTest.get_test_dir): Because the path of the test directory is needed in multiple methods, this method is implemented. (BaseTest.get_domain_addr): Rewrite the return statement utilizing str formatting (which is more Pythonic). (BaseTest.get_cmd_line): Rename to gen_cmd_line. Change the variables with capitcal characters to lower ones. Also, the nested for loop is rewritten to a plain loop using the zip function. (BaseTest.__gen_local_filesys): Rename to gen_local_fs_snapshot. Move to ExpectedFiles in conf/expected_files.py and is marked as a static method. Refactor to a less verbose implementation. (BaseTest._check_downloaded_files): Rename to __call__ to agree with the invocation in test case classes. Move to ExpectedFiles in conf/expected_files.py. (BaseTest.get_server_rules): Refactor to a more Pythonic form utilizing dict.items() and is marked static. (BaseTest.stop_server): (new method) an abstract method which should stop the currently using servers. (BaseTest.instantiate_server_by): (new method) an abstract method which should instantiate a server instance according to the given argument. (BaseTest.__enter__): (new method) method which initialize the context manager (BaseTest.__exit__): (new method) method that finilize the context manager and deal with the exceptions during the execution of the with statement, subclasses can override this method for extensibility * testenv/http_test.py: (HTTPTest.__init__): Add call to super.__init__. Default values of pre_hook, test_params, post_hook are set to None to avoid a subtle bug of Python. Argument servers is renamed to protocols. (HTTPTest.Server_setup): Move to BaseTest and rename to server_setup. Calls to pre_hook_call, call_test, post_hook_call are removed. (HTTPTest.hook_call, pre_hook_call, call_test, post_hook_call): Move to BaseTest for that both HTTP test cases and FTP test cases may use these methods. (HTTPTest.init_HTTP_Server, init_HTTPS_Server): Merge and rename to instantiate_server_by to implement the abstract method in BaseTest. (HTTPTest.stop_HTTP_Server): Rename to stop_server to implement the abstract method in BaseTest. Also, pull out the part where remaining requests are gathered into a new method request_remaining. (BaseTest.act_retcode): Rename to ret_code because ExpectedRetCode is moved out from BaseTest, so the name act_retcode is actually a bit verbose. * testenv/conf/expected_ret_code.py: (ExpectedRetCode.__call__): Rewrite the str into a more readable form. * testenv/conf/files_crawled.py: (FilesCrawled.__call__): Refactor this method into a more Pythonic form utilizing the zip function. * testenv/conf/local_files.py: (LocalFiles__call__): Rewrite this method with the recommended with statement. * testenv/conf/server_conf.py: (ServerConf.__call__): Rewrite this method due to BaseTest.server_list is renamed to BaseTest.servers. * testenv/conf/server_files.py: (ServerFiles.__call__): Refactor the nested for loop into a plain one utilizing the zip function. * testenv/conf/urls.py: (URLs): Rename url_list to urls. * testenv/conf/wget_commands.py: (WgetCommands): Rename command_list to commands, rename test_obj.options to test_obj.wget_options. * testenv/Test--https.py, Test-Proto.py, Test-Parallel-Proto.py: Argument servers is changed to protocols due to change in the signature of HTTPTest.__init__. 2014-03-13 Zihang Chen * testenv/WgetTest.py: Move WgetFile to package misc. * testenv/README: Modify documentation respect to WgetFile. * testenv/Test-*.py: Optimize imports about WgetFile. 2014-03-13 Zihang Chen * testenv/Test-Proto.py: Fix a typo (line 71: server to servers). 2014-03-04 Giuseppe Scrivano * src/http.c (modify_param_value, extract_param): Aesthetic change. 2014-02-24 Yousong Zhou (tiny change) * tests/tests/Test--httpsonly-r.px: Add feature constraint on https. 2014-02-24 Giuseppe Scrivano * gnulib: update module. Reported by: Darshit Shah . 2014-02-14 Vladimír Pýcha (tiny change) * src/http.c (parse_content_disposition, extract_param) (append_value_to_filename, digest_authentication_encode): URL-decode the filename parameter of Content-Disposition HTTP header if it is encoded. This is related to --content-disposition. New parameter of extract_param(), "is_url_encoded". Add argument NULL to the call of extract_param() in digest_authentication_encode(). * src/http.h: Add the new parameter to the declaration of extract_param(). * src/cookies.c (parse_set_cookie, test_cookies): Add argument NULL to the calls of extract_param(). * src/url.c (url_unescape): Remove "static" modifier. * src/url.h: Add declaration of url_unescape(). 2014-02-13 Yousong Zhou * tests/Wget.pm.in: Exclude existing files from the check of unexpected downloads. 2014-02-13 Yousong Zhou * tests/Test--start-pos.px: Test --start-pos for HTTP downloads. * tests/Test-ftp--start-pos.px: Test --start-pos for FTP downloads. * tests/Test--start-pos--continue.px: Test the case when --start-pos and --continue were both specified. 2014-02-13 Yousong Zhou * tests/FTPServer.pm: Fix the handling of TYPE command and avoid endless loop when doing binary mode RETR. 2014-02-10 Yousong Zhou * doc/wget.texi: Add documentation for --start-pos. 2014-02-06 Giuseppe Scrivano * src/main.c (print_version): Move copyright year out of the localized string and update it. 2014-02-06 Giuseppe Scrivano * configure.ac: Update copyright years. 2014-01-29 Darshit Shah * src/main.c: Remove pre-processor variable WHEN_DEBUG (option_data[]): Do not fail on --debug even if debug support is not compiled in. (main): Explicitly set opt.debug to false in case debugging support was not compiled. * src/init.c (commands[]): Support --debug wven when support is not compiled in. * src/options.h: Same 2014-01-23 Lars Wendler (tiny change) * tests/Test--post-file.px: Do not fail when wget has no debug support. 2014-01-17 Darshit Shah * src/init.c (commands[]): Add --no-config. * src/options.h: Same. * src/main.c (option_data[]): Same. (print_help): Same. (main): If --no-config is set, then do not read the wgetrc files. 2014-01-05 HÃ¥kon VÃ¥gsether (tiny change) * src/http.c (http_loop): Fix checking the URL length when filename is specified. 2014-01-02 Darshit Shah * testenv/WgetTest.py (CommonMentods.exec_wget): Wait for n seconds before calling the Wget executable. 2014-01-02 Darshit Shah * testenv/Makefile.am: Add new Test--https.py to list of tests and EXTRA_DIST. Also replace all tabs with spaces in file for conformity. * testenv/Test--https.py: New test to check if Wget works correctly with HTTPS servers * testenv/HTTPServer.py: Import new modules for use in HTTPS Servers (HTTPSServer): New class that generates a SSL-wrapped socket for use in a HTTPS Server. (HTTPSd): HTTPS daemon class. Analogous to the HTTPd class * testenv/WgetTest.py: Define global variables HTTP and HTTPS to reflect Server types (CommonMethods.exec_wget): Add the protocol information to the URL before passing it to wget (HTTPTest.__init__): Edit syntax. The servers variable now accepts a list of servers defined by their type. E.g. HTTP, HTTPS. (HTTPTest.Server_setup): Reflect change in type of variable servers. However, we maintin the value of self.servers to allow most of the code to remain unchanged. (HTTPTest.init_HTTPS_Server): Initialize a HTTPS Server * testenv/Test-Parallel-Proto.py: Edit to reflect slight change in Test Fiel Syntax. * testenv/Test-Proto.py: Same 2013-12-29 Giuseppe Scrivano * src/init.c (home_dir): Remove useless 'if'. * src/warc.c (warc_start_new_file): Likewise. (warc_process_cdx_line): Likewise. (warc_write_response_record): Likewise. 2013-12-29 Giuseppe Scrivano * doc/wget.texi: Update to GFDL 1.3. 2013-12-27 Darshit Shah * testenv/WgetTest.py: Add modeline (CommonMethods.ServerConf): New pre-test hook that sets BaseHTTPRequestHandler class variables in all available servers * testenv/HTTPServer.py (HTTPd.ServerConf): Call the respective method in the Server to set the class variables (StoppableHTTPServer.server_sett): Set the handler class variables 2013-12-26 Tim Ruehsen * src/gnutls.c (ssl_connect_wget): Fix connect timeout failure 2013-12-26 Darshit Shah * testenv/WgetTest.py (HTTPTest.call_test): Correct the call to stop_HTTP_Server. 2013-12-25 Darshit Shah * testenv/WgetTest.py (CommonMehtods.exec_wget): Catch and handle exception if the Wget executable is not found at src/wget (HTTPTest.call_test): In case of error during execution, remove all existing servers before quitting 2013-12-22 Mike Frysinger * doc/sample.wgetrc: add links to the manual. 2013-12-22 Giuseppe Scrivano * gnulib: add git submodule. 2013-12-15 Darshit Shah * testenv/WgetTest.py (HTTPTest.HTTP_setup): Rename to Server_setup so it can be easily reused for other non-HTTP servers. (HTTPTest.__init__): Call Server_setup instead of HTTP_setup (HTTPTest.Server_setup): Split into three more functions, that handle pre-hooks, test execution and post-hooks respectively. (HTTPTest.pre_hook_call): Set up and execute the pre-test hooks. Code split from HTTPTest.Server_setup (HTTPTest.call_test): Execute wget and log exit code. Code split from HTTPTest.Server_setup (HTTPTest.post_hook_call): Set up and execute post-test hooks. Code split from HTTPTest.Server_setup 2013-11-04 Darshit Shah * tests/Makefile.am: Add new tests introduced in last commit to EXTRA_DIST. Reported by: Andrea Urbani 2013-11-02 Giuseppe Scrivano * src/progress.c (struct progress_implementation): New method draw. (bar_update): Split into... (bar_draw): ...this new function. (dot_update): Split into... (dot_draw): New function. (progress_update): Also invoke draw on `current_impl'. 2013-11-02 Giuseppe Scrivano * src/http.c (gethttp): Increase max header value length to 512. 2013-10-30 Giuseppe Scrivano * src/http.c (skip_short_body): Remove assert which is always true. Reported by: David Binderman 2013-10-26 Bykov Aleksey * src/utils.c (match_tail): Fix cookies reject * src/ftp-ls.c (ftp_parse_unix_ls): Fix parsing month name in uppercase 2013-10-22 Ãngel González * bootstrap.conf (gnulib_modules): Add module xstrndup. 2013-10-17 Andrea Urbani * tests/FTPServer.pm (GetBehavior): new routine. * tests/FTPServer.pm (get_list): new parameter to skip hidden files * tests/Test-ftp-list-Multinet.px: Test LIST on a "UNIX MultiNet Unix Emulation" system that returns an empty content when "LIST -a" is requested (probably because no "-a" files exist) * tests/Test-ftp-list-Unknown.px: Test LIST on a "Unknown ftp service" system that returns an empty content when "LIST -a" is requested (probably because no "-a" files exist) * tests/Test-ftp-list-Unknown-a.px: Test LIST on a "Unknown ftp service" system that recognises "LIST -a" as "give me the -a file" and there is a "-a" file + other two files. "LIST -a" will return only "-a", "LIST" all the three files. * tests/Test-ftp-list-Unknown-hidden.px: Test LIST on a "Unknown ftp service" system that recognises "LIST -a" as an "UNIX Type: L8" system (show me also the hidden files) and there is an hidden file. * tests/Test-ftp-list-Unknown-list-a-fails.px: Test LIST on a "Unknown ftp service" system that raises an error on "LIST -a" command. * tests/Test-ftp-list-UNIX-hidden.px: Test LIST on a "UNIX Type: L8" system that recognises "LIST -a" as "show me also the hidden files" and there is an hidden file. 2013-10-17 Andrea Urbani * src/ftp.c (getftp): force "LIST" or "LIST -a" according to the remote system type. If the remote system is not known, it tries, only the first time, "LIST -a", after "LIST" and decides which one to use. For more information look for "__LIST_A_EXPLANATION__" * src/ftp.h (enum ustype): New ustype enum. * src/ftp.h (ftp_syst): New enum ustype *unix_type parameter. * src/ftp.h (ftp_list): Removed enum stype rs parameter, added. bool avoid_list_a, bool avoid_list, bool *list_a_used parameters. * src/ftp.h (wget_ftp_fstatus): New AVOID_LIST_A, AVOID_LIST, LIST_AFTER_LIST_A_CHECK_DONE values. * src/ftp-basic.c (ftp_list): it handles the new avoid_list_a, avoid_list and list_a_used parameters. * src/ftp.h (ftp_syst): it stores information about the "215 UNIX" systems into the new unix_type parameter. 2013-10-14 Giuseppe Scrivano * testenv/Makefile.am (XFAIL_TESTS): Remove Test--spider-r.py. 2013-10-10 Giuseppe Scrivano * tests/Test-idn-robots-utf8.px: Remove -H. * tests/Test-idn-cmd.px: Likewise. * tests/Test-idn-cmd-utf8.px: Likewise. Suggested by: Tim Ruehsen 2013-10-10 Giuseppe Scrivano * src/url.c (url_parse): Try to convert UTF-8 URLs to IDN. * src/html-url.c (append_url): Parse URLs specifying an IRI structure. 2013-10-07 Tim Ruehsen * tests/Test-idn-robots.px: added punycoded and escaped URLs to follow removed -H 2013-10-06 Tim Ruehsen * doc/wget.texi: add/explain quoting of wildcard patterns 2013-10-06 Giuseppe Scrivano * testenv/Makefile.am (EXTRA_DIST): Distribute test files. 2013-09-16 Darshit Shah * testenv/README: Update documentation 2013-09-14 Darshit Shah * testenv/HTTPServer.py (StoppableHTTPServer): Define object variable request_headers which stores a list of requests received by the server (StoppableHTTPServer.get_req_headers): Return the list of Request Headers stored by the server (_Handler.do_HEAD): Send the Request MEthod string for identification (_Handler.do_GET): Same (_Handler.__log_request): Log the request in Request_Headers list (_Handler.send_head): Make a call to __log_request * testenv/Test--spider-r.py: Add new list, Request_List, which contains all the requests that Wget is expected to send. This will allow for fine-grained tests on recursive downloading. * testenv/WgetTest.py (CommonMethods.FilesCrawled): New Post-Test Hook, that ensures that all the expected Files on the server were accessed as expected. (HTTPTest.stop_HTTP_server): On stopping server, asks it to respond with list of all requests it received. 2013-09-13 Tim Ruehsen * src/recur.c (download_child_p): fix compile error when configured using --without-ssl. 2013-09-13 Tim Ruehsen * configure.ac: added a summary of build options fixed some indentations removed the unconditionally adding of libz with --with-ssl removed -lgcrypt and -lgpg-error for gnutls 2013-09-13 Darshit Shah * testenv/WgetTest.py (CommonMethods._replace_substring): New method that will replace a substring delimited by {{ }} characters by the value of self. variable (CommonMethods.WgetCommands): Use the _replace_substring () call to replace the substrings in the the command line. (CommonMethods.ServerFiles): Run the _replace_substring () method on the File contents too. 2013-09-13 Darshit Shah * testenv/Test--spider-r.py: Test retrieval in recursive spider mode. * testenv/Makefile.am: add new file 2013-09-13 Darshit Shah * testenv/HTTPServer.py (_Handler.do_HEAD): If requested path is /, respond with /index.html (_Handler.do_HEAD): Smartly guess value of Content-Type Header from file extension (_Handler.guess_type): Use a preset list of extensions and Content-Type strings. If the extension matches one in the list, use that string, else default to "text/plain" 2013-09-11 Darshit Shah * testenv/WgetTest.py (CommonMethods.exec_wget): Expect domain_list instead of domain. (CommonMethods.get_cmd_line): Same. Generate command line by prepending to each file it's respective domain string (CommonMethods.ServerFiles): Generate file_list and server_rules for each Server and set the config details (HTTPTest): New named parameter, servers which signifies number of servers to spawn (HTTPTest.HTTP_setup): This method now takes servers as a new parameter. Instead of storing server and domain, we now store server_list and domain_list. Each server must be initialized through a loop. (HTTPTest.stop_HTTP_server): Stop all servers in a loop. * testenv/Test-Parallel-Proto.py: Prototype test file for multiple servers. 2013-09-10 Darshit Shah * testenv/WgetTest.py (HTTPTest.stop_HTTP_server): With the threaded servers, we can simply use the socketserver.shutdown() method to close the server instead of sending a QUIT command * testenv/HTTPServer.py (StoppabelHTTPServer.serve_forever): Delete method. No need to override this method anymore. (WgetHTTPRequestHandler.do_QUIT): No longer required (HTTPd): Rename self.server to self.server_inst to reduce ambiguity when referenced from WgetTest 2013-09-09 Tim Ruehsen * src/gnutls.c (ssl_connect_wget): changed checking of option "PFS" to be better prepared for some kinds of backports. Reported by: Daniel Kahn Gillmor 2013-09-08 Darshit Shah * testenv/README (File Structure): Add explanation about various variables used consistently across all tests. 2013-09-07 Tim Ruehsen * src/gnutls.c (ssl_connect_wget): use gnutls_check_version() to check if option "PFS" is available Reported by: Daniel Kahn Gillmor 2013-09-07 Darshit Shah * testenv/Test-Post.py: Test basic functionality for sending HTTP POST requests using the --method command * testenv/Makefile.am: Add new test 2013-09-07 Darshit Shah * testenv/HTTPServer.py: Remove bunch of old code artefacts * testenv/WgetTest.py: Same 2013-09-07 Darshit Shah * testenv/HTTPServer.py (StoppableHTTPServer.server_conf): Change global variable fileSys to an object variable. This is good programming practice and required for parallel-wget support. (StoppableHTTPServer.server_forever): Edit overridden method to remove the global queue variable. No longer required under the new working (WgetHTTPRequestHandler.do_QUIT): Don't push fileSys through the queue (_Handler): Rename class __Handler to _Handler to match Python's encapsulation rules (_Handler.do_POST): fileSys is now an object variable of the server (_Handler.do_PUT): Same (_Handler.send_put): Same (_Handler.send_head): Same (HTTPd): New class that wraps around the server for Threading (create_server): Make new object of HTTPd. (spawn_server): Start the thread created through create_server (ret_fileSys): Removed method. No longer required. * testenv/WgetTest.py (HTTPTest.__init__): Don't explicitly set self.act_retcode. Instead toggle tests_passed boolean to set the correct return code. (HTTPTest.HTTP_setup): We no longer call HTTPServer.spawn_server to start a new instance of the server. (HTTPTest.init_HTTP_server): We no longer call the old create_server(), spawn_server() methods. Instead use the new HTTPd class interface to create new instances of the server (HTTPTest.stop_HTTP_server): Don't ask server to return fileSys. 2013-09-06 Darshit Shah * testenv/WgetTest.py (CommonMethods.__check_downloaded_files): Print a unified diff in case there is a mismatch in the file contents 2013-09-06 Darshit Shah * testenv/README: New section on pending work. Will keep updating this to keep track of work that remains to be done on this implementation 2013-09-06 Darshit Shah * testenv/HTTPServer.py (WgetHTTPRequestHandler.test_cookies): Comment out the old test_cookies code. This is no longer used and was causing problems with expected cookies. The code will soon be removed anyways * testenv/Test-cookie.py: Add new test for basic cookie functionality * testenv/Test-cookie-401.py: Ensure cookies are saved during a 401 response * testenv/Test-cookie-expires.py: Ensure that the Expires field is correctly handled * testenv/Test-cookies-domain-mismatch.py: Ensure that mismatched domains are handled by Wget * testenv/Makefile.am: Add the new tests 2013-09-05 Darshit Shah * testenv/Test-auth-with-content-disposition.py: Add test that ensures Content Disposition works alongwith authentication * testenv/Makefile.am: Add new test 2013-09-04 Tim Ruehsen * doc/sample.wgetrc: added "secureprotocol" example * doc/wget.texi (HTTPS (SSL/TLS) Options): Document PFS. 2013-09-04 Darshit Shah * testenv/Test-c-full.py: Test Continue options * testenv/Makefile.am: Add Test-c-full.py and Test-O 2013-09-03 Tim Ruehsen * src/main.c: Add new value 'PFS' to --secure-protocol to enforce the so-called Perfect Forward Security. * src/init.c (cmd_spec_secure_protocol): added secure_protocol_pfs * src/openssl.c, gnutls.c, options.h: likewise 2013-09-02 Darshit Shah * testenv/Makefile.am: Add new Test * testenv/Test-Head.py: New Test to ensure HEAD requests are handled correctly 2013-08-31 Darshit Shah * testenv/WgetTest.py: Remove import module defaultdict. (CommonMethods.get_server_rules): server_rules should be a dict, not a defaultdict (list). * testenv/HTTPServer.py (WgetHTTPRequestHandler.get_rule_list): If rule does not exist, return None. Not an emppty list. (WgetHTTPRequestHandler.test_cookies): Rule variable is not a list. (__Handler.send_cust_headers): Same. (__Handler.custom_response): Same. (__Handler.is_authorized): Same. (__Handler.expect_headers): Same. (__Handler.reject_headers): Same. 2013-08-31 Darshit Shah * testenv/README: Explain that TEST_NAME needs to be unique * testenv/Test-auth-no-challenge.py: Edit non-unique TEST_NAME 2013-08-31 Darshit Shah * testenv/README: (newfile) Simple help / instructions about using the Test Environment. * testenv/Makefile.am: (newfile) Makefile for the Test Environment. Uses the Automake Parallel Test Harness * testenv/WgetTest.py: (newfile) Base module that executes the Test. * testenv/HTTPServer.py: (newfile) Contains the custom HTTP Server for the Test Environment. Creates an instance of http.server in Python3. * testenv/FTPServer.py: (newfile) Overrides methods from pyftpdlib for use in the Test Environment. ** Work under progress **. * testenv/ColourTerm.py: (newfile) A custom module to output coloured text to the terminal. Known to work on POSIX shells. * testenv/Test-Proto.py: (newfile) A prototype Test File. This should be copied when writing a new Test Case. * testenv/Test-Content-disposition-2.py: Test Content Disposition clobbering * testenv/Test-Content-disposition.py: Test Content Disposition Headers * testenv/Test-O.py: Test Output filename command * testenv/Test-auth-basic-fail.py: Test returncode on auth failure * testenv/Test-auth-basic.py: Test Basic Auth negotiation * testenv/Test-auth-both.py: Test handling of Multiple auth providers. This test currently fails. * testenv/Test-auth-digest.py: Test Digest Auth Negotiation * testenv/Test-auth-no-challenge-url.py: Ensure --auth-no-challenge is handled when auth details are in-URL. * testenv/Test-auth-no-challenge.py: Ensure --auth-no-challenge is honoured * testenv/Test-auth-retcode.py: Ensure correct return code after 403 Forbidden response. 2013-08-31 Darshit Shah * testenv/HTTPTest.py (ServerError): Define new Exception for handling internal control flow. (StoppableHTTPServer.SendHeader): Simply pass. Do nothing. Adding functionality here seems to crash for no apparent reason. (stoppableHTTPServer.send_cust_headers): Minor optimization. No need for extra variable. (__Handler.Response): Handle explicit Response Code Rules (__Handler.Authentication): Handle Authentication rules (__Handler.handle_auth): Actual worker method for authentication (__Handler.ExpectHeader): Ensure Expected Headers are received (__Handler.RejectHeader): Ensure Blacklisted Headers are NOT received (__Handler.send_HEAD): Dynamically call server rule functions based on the self.rules list. This feature will later be added to POST/PUT, etc 2013-08-31 Darshit Shah * configure.ac: Add testenv/Makefile to AC_CONFIG_FILES. * Makefile.am: Add testenv to SUBDIRS 2013-08-23 Tim Ruehsen * doc/sample.wgetrc: added "httpsonly" example 2013-08-22 Tim Ruehsen * tests/Makefile.am (EXTRA_DIST): Add Test--httpsonly-r.px. * tests/run-px (tests): Likewise. * tests/Test--httpsonly-r.px: New file. 2013-08-22 Tim Ruehsen * src/main.c: Add new option --https-only. * src/options.h: Likewise. * src/recur.c (download_child_p): add check for HTTPS. 2013-08-22 Tim Ruehsen * doc/wget.texi: added description for --https-only 2013-08-13 Hrvoje Niksic * doc/wget.texi (Download Options): Fix misspelling. 2013-08-09 Tim Ruehsen * src/gnutls.c (ssl_init): Prevent CA files from being loaded twice if possible. * src/gnutls.c (ssl_check_certificate): Added some error messages * src/gnutls.c: Fixed some compiler warnings 2013-08-08 Will Dietz (tiny change): * src/main.c (format_and_print_line): Wrap correctly long tokens. 2013-07-23 Tim Ruehsen * configure.ac: Remove AM_CONDITIONAL HAVE_NETTLE. Reported by: Darshit Shah . 2013-07-16 Darshit Shah * src/wget.h (err_t): Added new errors, ATTRMISSING and UNKNOWNATTR to handle missing attributes and Unknown attribute values respectively in HTTP Headers. * src/exits.c (get_status_for_err): ATTRMISSING is a Protocol Error while UNKNOWNATTR is a general error, presumably because of a feature that is not yet implemented. * src/http.c (gethttp): Call create_authorization_line () separately. In case the auth_err flag has been set with an error, handle it and exit. * src/http.c (create_authorization_line): Pass a pointer, auth_err to set the flag for different kinds of errors encountered. * src/http.c (http_loop): Handle the errors raised by the authentication handlers. * src/http.c (digest_authentication_encode): Pass pointer auth_err to set the error flags. Set qop to NULL in case the value of the qop / algorithm attribute is unknown to Wget. Set an appropriate error too. 2013-07-13 Tim Ruehsen * src/http.c (digest_authentication_encode): Fix a crash when the algorithm is not specified in the server response. Free dynamic memory used by the function when the function exits. * src/http-ntlm.c [HAVE_NETTLE]: Include and . (setup_des_key) [HAVE_NETTLE]: New function to deal with libnettle. (calc_resp) [HAVE_NETTLE]: Add support for libnettle. (mkhash) [HAVE_NETTLE]: Likewise. Reported by: Tim Ruehsen . 2013-07-13 Tim Ruehsen * configure.ac: check for libnettle when GNU TLS is used. 2013-07-13 Steven M. Schweda * src/warc.c (warc_tempfile): Fix a portability issue on VMS. 2013-07-12 Giuseppe Scrivano * src/http.c (digest_authentication_encode): Set default value of `algorithm' to "MD5". Check if `qop' is not-NULL before access it. 2013-07-11 Tomas Hozza * src/ftp.c (ftp_loop): Use ftp_retrieve_glob() also in case --preserve-permissions was specified. 2013-07-11 Tomas Hozza * doc/wget.texi: Document --regex-type and --preserve-permissions. 2013-07-11 Tim Ruehsen * src/gnutls.c (ssl_connect_wget): respect connect timeout. 2013-07-11 Karsten Hopp * src/openssl.c (struct openssl_read_args, struct scwt_context): New struct. (openssl_read, ssl_connect_with_timeout_callback): New function. (ssl_connect_wget): respect connect timeout. 2013-07-10 Giuseppe Scrivano * src/http.c (read_response_body) [ALLOW_CLOBBER]: Move definition to.. * src/options.h (struct options): Make `backups' an int. * src/url.h [ALLOW_CLOBBER]: .. Here. Do not clobber when backups are used. * src/url.c (url_file_name): Use the ALLOW_CLOBBER macro instead of repeating the code. 2013-07-09 Giuseppe Scrivano * doc/wget.texi (Download Options): Add documentation for --backups. (Wgetrc Commands): Add documentation for backups. Reported by: Tomas Hozza . 2013-07-08 Steven M. Schweda * src/retr.c (rotate_backups): Support for VMS files. 2013-06-26 Darshit Shah * src/http.c (gethttp): Reverse change by commit 90896 that prevented downloading response body data to non-GET Request methods. 2013-06-22 Ãngel González * src/init.c (cmd_string_uppercase): Rewrite function. 2013-06-19 Ciprian Vieru (tiny change) * src/html-url.c: Define TAG_TD, TAG_TH, TAG_VIDEO, TAG_AUDIO, TAG_SOURCE. (tag_url_attributes, known_tags): Likewise. 2013-06-19 Tim Ruehsen * src/connect.c (socket_ip_address): zero out ip address structure to avoid access to uninitialized values by inet_ntop(). * src/ftp.c (ftp_loop_internal): fix segfault caused by warc_tmp NULL pointer. 2013-06-17 Dave Reisner (tiny change) * doc/texi2pod.pl: Fix formatting error that causes build to fail with Perl 5.18 2013-06-17 Darshit Shah * doc/wget.texi (POST): Explain the new redirection rules. * doc/wget.texi (Other HTTP Methods): Same. * doc/wget.texi (body-data): Fix typo in description. 2013-06-13 Darshit Shah * src/http.c (gethttp): Follow RFC 2616 and httpbis specifications when handling redirections. Do not suspend the method on 301/302 redirects. (gethttp): If method if not GET, we do not intend to download anything. * src/main.c (main): Set spider mode when opt.method is HEAD. This will prevent Wget from downloading any file. * src/retr.c (SUSPEND_METHOD): Rename macro SUSPEND_POST_DATA to SUSPEND_METHOD to more accurately reflect its use. Similarly rename related variables. 2013-05-21 Ray Satiro * src/url.c (url_file_name): Use MAX_PATH in Windows. 2013-05-17 Bykov Aleksey * bootstrap: Add `mkostemp' 2013-05-14 Bykov Aleksey * src/warc.c (warc_tempfile): For fix "Could not open temporary WARC manifest file." issue in Win system force to use `mkostemp(filename, O_TEMPORARY)' instead of `mkstemp(filename)'. Thank to Angel Gonzalez for help. 2013-05-14 Tim Ruehsen * src/cookies.c (cookie_jar_load): Replaced read_whole_file() by getline(). * src/init.c (run_wgetrc): Likewise. * src/netrc.c (parse_netrc): Likewise. * src/utils.c: Likewise. * src/ftp.c (getftp): Likewise. * src/ftp-ls.c (ftp_parse_unix_ls, ftp_parse_winnt_ls, ftp_parse_vms_ls): Likewise. * src/ftp-ls.c (clean_line): Accept the string length as parameter. * src/ftp-ls.c: Replaced indent tabs by spaces. * src/ftp.c: Likewise. * src/utils.c: Removed read_whole_file() definition. * src/netrc.c: Removed read_whole_file() definition for STANDALONE. * src/utils.h: Removed read_whole_file() declaration. 2013-05-10 Darshit Shah (tiny change) * doc/wget.texi (No of tries): Fix typo to make it clear that --tries option sets number of tries not retries. Reported by: Hauke Hoffman 2013-05-09 Tim Ruehsen * src/utils.c (acceptable): use standard string functions instead of self-written code. (match_tail): Likewise. (suffix): Likewise. (has_wildcards_p): Likewise. (test_subdir_p): Fix some warnings. (test_dir_matches_p): Likewise. 2013-05-05 mancha (tiny change) * src/gnutls.c (ssl_connect_wget): Don't abort on non-fatal alerts received during handshake. For example, when connecting to servers using TSL-SNI that send warning-level unrecognized_name alerts. 2013-05-04 Darshit Shah * src/init.c (cmd_string_uppercase): Fix issue that cased invalid headers when converting to uppercase. 2013-05-01 Giuseppe Scrivano * src/init.c: Declare `cmd_string_uppercase'. (commands): Now `method' uses cmd_string_uppercase. (cmd_string_uppercase): New method * src/http.c (gethttp): Do not transform opt.method to uppercase. Reported by: Stefano Lattarini 2013-05-01 Gijs van Tulder * src/retr.c (retrieve_url): New variable `saved_method'. (SUSPEND_POST_DATA): Save the method to `saved_method'. (RESTORE_POST_DATA): Restore the method from `saved_method'. 2013-04-28 Giuseppe Scrivano * doc/wget.texi (Types of Files...): Document --accept-regex, --reject-regex. Reported by: Tomas Hozza . 2013-04-26 Tomas Hozza (tiny change) * src/log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message when `logfile' is NULL. * src/utils.c (unique_create): Ensure `logfile' has always a value. 2013-04-24 Darshit Shah * src/http.c (gethttp): Remove check for opt.post_data and opt.post_file_name. * src/main.c (main): Change location in code where --post-data and --post-file options are converted to --body-data --body-file. 2013-04-21 Gijs van Tulder * src/http.c: Copy opt.body_data to the WARC file, instead of opt.post_data (the old option). 2013-04-14 Giuseppe Scrivano * doc/wget.texi (Download Options): Document "mega" dot style. 2013-04-12 Gijs van Tulder * src/warc.c: Generate unique UUIDs for the manifest and the record holding the command-line arguments. Write the manifest to a "metadata" record to follow the WARC implementation guidelines. * src/warc.h: Declare new function warc_write_metadata_record. 2013-04-05 Darshit Shah * doc/doc/wget.texi: Fix ambiguous wording in --post-data section. Make it clear that wget does not check for the format of the post-data. * doc/doc/wget.texi: Add documentation for --method, --body-data and --body-file. 2013-03-31 Gijs van Tulder * src/warc.c: Correctly write the field length in the skip length field of .warc.gz files. (Following the GZIP spec in RFC 1952.) 2013-03-20 Tomas Hozza * src/http.c (gethttp): Set "sock" to -1 if it's not and we have no persistent connection 2013-03-15 Darshit Shah * src/http.c (post_file): Rename function to body_file_send to more accurately reflect its use. * src/http.c (gethttp): Add support for --method, --body-data and --body-file * src/init.c (commands): Same. * src/options.h (options): Same. * src/main.c (option_data): Same. * src/main.c (print_help): Add --method command. * src/main.c (main): Make old --post-{data,file} commands aliases to --method. Add sanity checks for --method, --body-data and --body-file. * src/retr.c (SUSPEND_POST_DATA): Edit Macro Definition to use body_data. * src/retr.c (RESTORE_POST_DATA): Same. 2013-03-12 Darshit Shah * tests/Makefile.am (EXTRA_DIST): Add Test--post-file.px. * tests/run-px (tests): Likewise. * tests/Test--post-file.px: New file. 2013-03-12 Darshit Shah * src/http.c (gethttp): Make wget return FILEBADFILE error and abort if post-file does not exist. * src/http.c (http_loop): Handle FILEBADFILE as a valid err. * src/exits.c (get_status_for_err): Mark FILEBADFILE as an IO error. 2013-02-15 Darshit Shah * src/cookies.c (cookie_handle_set_cookie): Set cookie->discard_requested to true on domain mismatch. 2013-01-30 Pavel Mateja (tiny change) * src/http.c (gethttp): Specify "Host" for CONNECT method. 2012-12-20 Tim Ruehsen * src/gnutls.c (ssl_connect_wget): added +VERS-SSL3.0 to fix --secure-protocol=SSLv2/SSLv3. 2012-12-09 Giuseppe Scrivano * src/main.c (main): Keep looking for "config" until there are arguments to parse. Reported by: Adrien Dumont * src/test.c: Include "wget.h". 2012-12-08 Michael Stapelberg (tiny change) * src/retr.c (retrieve_url): Set iri->orig_url to NULL after it is freed. 2012-11-26 Giuseppe Scrivano * src/wget.h (MAX_INT_TO_STRING_LEN): Define macro. * src/warc.c (warc_write_block_from_file): Use `MAX_INT_TO_STRING_LEN' to find the buffer size. (warc_write_cdx_record): Likewise. 2012-11-24 Giuseppe Scrivano * src/warc.c (warc_write_block_from_file): Use `number_to_string' to convert the content-length to a string. 2012-11-24 Gijs van Tulder * src/warc.c (warc_write_cdx_record): Use `number_to_string' to convert the offset to a string. 2012-11-15 Giuseppe Scrivano * src/retr.c (write_data): Fix comment. 2012-11-14 Ãngel González * src/warc.c (warc_sha1_stream_with_payload): Fix compilation under gcc -std=c89. 2012-11-13 Giuseppe Scrivano * src/retr.c (fd_read_body): Correctly check the return code from write_data. Reported by: Torsten Scheck 2012-11-09 Tim Ruehsen * tests/HTTPServer.pm: added check for must-not-match request-header * tests/Test-cookies.px: check cookie deletion and cookie domain matching 2012-10-08 Stefano Lattarini (tiny change) docs: fix errors and warnings with Texinfo 5 Or rather, with the development version 4.13.90, which will eventually become Texinfo 5.0. * doc/wget.texi: Use '@item' instead of '@itemx' in several places, as Texinfo 5 refuses to process an '@itemx' that is not preceded by an '@item'. 2012-10-07 Tim Ruehsen Giuseppe Scrivano * src/utils.c (get_max_length): If `pathconf' is not available fallback to PATH_MAX. 2012-10-07 Ray Satiro * src/url.c: Change the functions of a growable string object to null terminate the string. * src/url.c (append_null): New function to null terminate a growable string object. * src/url.c (shorten_length): New function to shorten the length of a growable string object. 2012-10-07 Giuseppe Scrivano * configure.ac: Check for patchconf. 2012-10-06 Giuseppe Scrivano * src/http.c (http_loop): Send a HEAD request when -c and --content-disposition are used together. 2012-10-03 Merinov Nikolay * src/ftp.c (ftp_loop_internal): Ignore --no-clobber option when receiving directory listing. 2012-09-29 Merinov Nikolay * src/ftp-ls.c (ftp_parse_winnt_ls): Support filename extracting with new listing format. 2012-09-29 Tim Ruehsen * src/url.h (CHOMP_BUFFER): Add definition. * src/url.c (url_file_name): New local variables `fname_len_check' and `max_length'. Check that the length of the file name is acceptable. * src/utils.h (get_max_length): Declare function. * src/utils.c (get_max_length): New function. 2012-09-28 Steven Schubiger * src/src/recur.c (retrieve_tree): Combine duplicated code. 2012-09-23 Merinov Nikolay * m4/wget.m4 (WGET_FNMATCH): Add AC_LANG_SOURCE into AC_COMPILE_IFELSE in order to silence autoconf 2.68 warning. 2012-09-20 Giuseppe Scrivano * bootstrap: Update from gnulib. 2012-09-03 Tim Ruehsen * src/http.c (digest_authentication_encode): Add support for RFC 2617 MD5-sess authentication algorithm. Feature request and testing by: Avinash 2012-09-02 Nguyá»…n Thái Ngá»c Duy (tiny change) * src/src/main.c (main): mark more strings for translation. * src/src/mswindows.c (fork_to_background): Likewise. * src/src/recur.c (download_child_p): Likewise. 2012-09-02 Nguyá»…n Thái Ngá»c Duy (tiny change) * po/POTFILES.in: Add more files. 2012-08-29 Rohit Mathulla (tiny change) * src/html-url.c (get_urls_file): Convert shorthand URLs. 2012-08-28 Tim Ruehsen * doc/wget.texi: remove -nv from --report-speed 2012-08-28 Tim Ruehsen * src/gnutls.c (ssl_check_certificate): deinit gnutls_x509_crt_t. * src/gnutls.c (ssl_init): don't error if CA directory is empty. 2012-08-25 Hrvoje Niksic * src/warc.c (warc_find_duplicate_cdx_record): Use hash_table_get instead of hash_table_get_pair. 2012-08-21 (tiny change) * src/connect.c (connect_to_ip) [ENABLE_IPV6]: Attempt to use IPv6. * src/http.c (gethttp): Likewise. 2012-08-04 mancha (tiny change) * doc/wget.texi: Export ENVIRONMENT to the man page. 2012-07-08 Steven Schubiger * src/exits.h: Fix comment. * src/exits.c: Likewise. 2012-07-08 Giuseppe Scrivano * bootstrap: Update from gnulib. * bootstrap.conf (gnulib_extra_files): Remove $build_aux/missing. * lib/Makefile.am: Delete file. 2012-07-07 Tim Ruehsen (digest_authentication_encode): Add support for RFC 2617 Digest Access Authentication. 2012-07-07 Giuseppe Scrivano * src/http.c (http_loop): Fix log message. * src/main.c (main): Likewise. Reported by: Petr Pisar 2012-07-07 Giuseppe Scrivano * src/html-url.c (cleanup_html_url): Remove "static" modifier. * src/init.c (cleanup_html_url): Likewise. Reported by: Mike Frysinger . 2012-07-03 Steven Schubiger * src/init.c: Include warc.h for warc_close in cleanup function. 2012-06-17 Giuseppe Scrivano * src/wget.h: Define `CLOSEFAILED'. * src/init.c: Include "exits.h". (cleanup): Check `fclose' failure. * src/exits.c (get_status_for_err): Handle `CLOSEFAILED'. 2012-06-16 Giuseppe Scrivano * tests/Makefile.am (EXTRA_DIST): Add Test-stdouterr.px. * tests/run-px (tests): Likewise. * tests/Test-stdouterr.px: New file. 2012-06-16 Giuseppe Scrivano * src/main.c (main): Move some cleanup related function to... * src/init.c (cleanup): ...here. * src/main.c: Do not include "stdout.h". (main): Do not register `close_stdout' at exit. Reported by: Micah Cowan . 2012-06-16 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Remove `closeout'. Reported by: Micah Cowan . 2012-06-09 Giuseppe Scrivano * src/main.c (print_help): Move --report-speed under the section "Logging and input file". 2012-06-09 Giuseppe Scrivano * doc/wget.texi (Logging and Input File Options): Document "--report-speed". (HTTPS (SSL/TLS) Options): Document WARC. * doc/texi2pod.pl: Revert change from 2011-08-06. 2012-06-06 Giuseppe Scrivano * src/main.c (print_help): Rename --bits to --report-bps. (cmdline_options): Likewise. * src/init.c (commands): Rename --report-bps to --report-speed. (cmd_spec_report_speed): New function. * src/options.h (struct options): Rename `bits_fmt' to `report_bps'. * src/main.c (print_help): Rename --bits to --report-bps. (cmdline_options): Likewise. * src/init.c (commands): Likewise * src/progress.c (create_image): Adjust caller. * src/retr.c (retr_rate): Likewise. * src/utils.c (convert_to_bits): Likewise. 2012-06-04 Tim Ruehsen * src/main.c (main): Check for filename != NULL. * src/warc.c (warc_process_cdx_line): Fix memory leak. * src/utils.c (match_posix_regex, compile_posix_regex): Remove dead assignment. * src/openssl.c (ssl_init): Fix old-style function definition. 2012-06-02 Giuseppe Scrivano * src/connect.c: Include and . 2012-05-31 Ãngel González * convert.c: fix segfault on wrong urls (bug 36570) 2012-05-30 Gijs van Tulder * src/warc.c: Fix segfault if CDX record is not found. 2012-05-26 Mike Frysinger * src/warc.c: Change type of `warc_current_gzfile' to gzFile. 2012-05-26 Giuseppe Scrivano * src/warc.c (warc_load_cdx_dedup_file): Change type of `line_length' to ssize_t. Suggested by: Ãngel González 2012-05-19 illusionoflife (tiny change) * src/convert.c (register_html,register_css): Fixed functions signature to not accept unused argument * src/retr.c (retrieve_url): Changed register_{css,html} usage according new signature. 2012-05-18 Tim Ruehsen * src/gnutls.c (wgnutls_poll): Honor the specified `timeout' value. (wgnutls_peek): Likewise. 2012-05-16 Giuseppe Scrivano * src/warc.h: Cut length lines to 80 columns. * src/warc.c: Likewise. 2012-05-14 Tim Ruehsen * src/gnutls.c (wgnutls_read_timeout): removed warnings, moved fcntl stuff outside loop. * src/hash.h (hash_table_put): Make argument "value" const. * src/hash.c (hash_table_put): Make argument value const. Cast `value' to void. * src/http.c (request_set_header): Make argument `name' const. Cast `value' and `name' to void*. (request_remove_header): Make argument `name' const. * src/url.c (url_file_name): Make `index_filename' static. * src/warc.h (warc_write_cdx_record): Make `url', `timestamp', `mime_type', `payload_digest', `redirect_location', `warc_filename', response_uuid' arguments const. Make `checksum' const. * src/warc.c (warc_write_date_header): Make the `timestamp' argument const. Make `extension' const. (warc_write_cdx_record): Make `url', `timestamp', `mime_type', `payload_digest', `redirect_location', `warc_filename', response_uuid' arguments const. Make `checksum' const. 2012-05-13 Tim Ruehsen * src/gnutls.c (credentials): Change type to gnutls_certificate_credentials_t. (ssl_init): Do not use deprecated types. (ssl_connect_wget): Likewise. 2012-05-13 Giuseppe Scrivano * doc/wget.texi (Types of Files): Document --accept-regex and --reject-regex. 2012-05-13 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `git-version-gen'. * build-aux/bzr-version-gen: Remove file. * configure.ac: Invoke `build-aux/git-version-gen' to get the dist version. * Makefile.am (EXTRA_DIST): Distribute build-aux/git-version-gen instead of build-aux/bzr-version-gen. 2012-04-22 Tim Ruehsen * src/main.c (main): Dynamically allocate `opt.progress_type'. 2012-04-21 Tim Ruehsen * src/ftp-basic.c (ftp_pasv): Fix memory leak. * src/http.c (gethttp): Fix memory leak. * src/ftp.c (getftp): Silent compiler warning. 2012-04-13 Tim Ruehsen (tiny change) * src/warc.c (warc_load_cdx_dedup_file): Fix a memory leak by freeing `lineptr'. 2012-04-11 Gijs van Tulder * src/init.c: Add --accept-regex, --reject-regex and --regex-type. * src/main.c: Likewise. * src/options.c: Likewise. * src/recur.c: Likewise. * src/utils.c: Add regex-related functions. * src/utils.h: Add regex-related functions. 2012-04-11 Gijs van Tulder * bootstrap.conf (gnulib_modules): Include module `regex'. * configure.ac: Check for PCRE library. 2012-04-07 Daniel Kahn Gillmor (tiny change) * src/gnutls.c (key_type_to_gnutls_type): New function. (ssl_init): Use correctly the specified gnutls certificate. 2012-04-01 Giuseppe Scrivano * src/gnutls.c (wgnutls_read_timeout): Ensure timer is freed. * src/gnutls.c (wgnutls_read_timeout): Do not use timer if it is not allocated. Reported by: Xu Zhongxing 2012-04-01 Gijs van Tulder * src/html-url.c: Prevent crash on incomplete STYLE tag. 2012-03-30 Tim Ruehsen (tiny change) * src/warc.c: make warc_uuid_str() implementation depend on HAVE_LIBUUID. 2012-03-30 Tim Ruehsen * src/url.c: Use empty query in local filenames. 2012-03-30 Tim Ruehsen * src/convert.c (convert_links_in_hashtable): Mmake it static. * src/cookies.c (parse_set_cookie): Remove empty else branches. * src/css-url.c: Include "css-url.h". (get_uri_string): Make it static. * src/css-url.h (get_urls_css): Add protoype. * src/gnutls.c (ssl_init): Add prototype. * src/html-parse.c (tagstack_push): Make it static. * src/html-parse.c (tagstack_pop): Make it static. * src/html-parse.c (tagstack_find): Make it static. * src/html-url.c (cleanup_html_url): Make it static. * src/progress.c (count_cols): Make it static. * src/progress.c (get_eta): Make it static. * src/retr.h (convert_to_bits): Remove prototype. * src/util.h (convert_to_bits): Add prototype. * src/spider.c (spider_cleanup): Make it static. * src/warc.c (warc_write_start_record): Add prototype. * src/warc.c (warc_write_end_record): Add prototype. * src/warc.c (warc_start_cdx_file): Add prototype. * src/warc.c (warc_init): Add prototype. * src/warc.c (warc_load_cdx_dedup_file): Add prototype. * src/warc.c (warc_write_metadata): Add prototype. * src/warc.c (warc_close): Add prototype. * src/warc.c (warc_tempfile): Add prototype. * src/warc.c (warc_write_warcinfo_record): Make it static. * src/warc.c (warc_load_cdx_dedup_file): Make it static. * src/warc.c (warc_write_metadata): Make it static. * src/warc.h (warc_init): Fix prototype. * src/warc.h (warc_close): Fix prototype. * src/warc.h (warc_tempfile): Fix prototype. 2012-03-29 Tim Ruehsen (tiny change) * src/utils.c (library): Include . 2012-03-25 Ray Satiro * src/build_info.c.in: Check that HAVE_LIBSSL32 is defined when OpenSSL is used. 2012-03-25 Ray Satiro * configure.ac: Fix build under mingw when OpenSSL is used. 2012-03-25 Giuseppe Scrivano * src/utils.c: Include . * src/ptimer.c: Include . * src/connect.c: Include , , . Reported by: Ray Satiro . 2012-03-20 Ãngel González * bootstrap.conf (gnulib_modules): Add modules `ftello', `mkstemp' and `strtok_r'. 2012-03-07 Steven Schubiger * src/init.c (wgetrc_user_file_name): Correct typo. 2012-03-06 Sasikantha Babu * src/utils.c (convert_to_bits): Added new function convert_to_bits to convert bytes to bits. * src/retr.c (calc_rate): Modified the function to handle --bits option and download rate calculated as bits per sec (SI-prefix) for --bits otherwise bytes (IEC-prefix). (retr_rate): Rates will display in bits per sec for --bits. * src/options.h (struct opt): Added --bit option bool variable bits_fmt. * src/main.c (print_help) : Added help for --bit. * src/init.c: Defined command for --bit option. * src/retr.h: Added function prototype. 2012-02-26 Giuseppe Scrivano * src/main.c: Include "closeout.h" (main): Register close_stdout at exit. 2012-02-26 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add module `closeout'. 2012-02-23 Giuseppe Scrivano * src/main.c (main): Write diagnostic messages to `stderr' not to `stdout'. * src/main.c (main): Fail gracefully if `malloc' fails. * src/gnutls.c (wgnutls_read): Remove unused variables `timer' and `flags'. 2012-02-17 Steven Schubiger * src/warc.c: Add license header. 2012-02-01 Gijs van Tulder * src/warc.c: Fix large file support with ftello, fseeko. * src/warc.h: Fix large file support. * src/http.c: Fix large file support. 2012-01-27 Gijs van Tulder * src/retr.c (fd_read_body): If the response is chunked, the chunk headers are now written to the WARC file, making the WARC file an exact copy of the HTTP response. 2012-01-27 Gijs van Tulder * src/retr.c (fd_read_body): Fix a memory leak with chunked responses. * src/http.c (skip_short_body): Fix the same memory leak. 2012-01-09 Sasikantha Babu (tiny change) * src/connect.c (connect_to_ip): properly formatted ipv6 address display. (socket_family): New function - returns socket family type. * src/http.c (gethttp): properly formatted ipv6 address display. 2012-01-09 Gijs van Tulder * src/init.c: Disable WARC compression if zlib is disabled. * src/main.c: Do not show the 'no-warc-compression' option if zlib is disabled. * src/warc.c: Do not compress WARC files if zlib is disabled. 2012-01-09 Gijs van Tulder * configure.ac: Always try to use libz, even without SSL. 2011-12-12 Giuseppe Scrivano * Makefile.am (EXTRA_DIST): Add build-aux/bzr-version-gen. Reported by: Elan Ruusamäe . 2011-12-11 Giuseppe Scrivano * util/trunc.c (main): Call `close' on the fd and check for errors. Reported by: . 2011-11-09 Gijs van Tulder * src/warc.c: Call gzdopen() with wb9 instead of wb+9, which fails on zlib version >= 1.2.4. 2011-11-04 Steven Schweda * src/warc.c [! WINDOWS]: Include . (warc_write_warcinfo_record): Assign a new allocated buffer and free it on errors. 2011-11-01 Steven Schweda * src/gnutls.c (ssl_init): Ensure GNU TLS is loaded only once. 2011-10-23 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Include module `vsnprintf'. 2011-10-16 Steven Schubiger * util/paramcheck.pl: Match 1 or more times where applicable. (extract_entries): Return a copy instead of reference. 2011-10-07 Steven Schweda * src/connect.c: Add HAVE_SYS_SELECT_H and HAVE_SYS_SOCKET_H conditions on includes of and , respectively. * src/ftp.c (getftp): Move BIN_TYPE_TRANSFER macro into VMS-specific section. On VMS, use Stream_LF attributes for listing files. Pass BIN_TYPE_FILE to fopen_excl() instead of constant-everywhere "true". * src/ftp.c (ftp_retrieve_list): Restore lost test of opt.preserve_perm (--preserve-permissions) on the chmod() operation. * src/init.c, main.c: Remove "deprecated" from opt.preserve_perm (--preserve-permissions). * src/init.c (initialize): Use distinct messages for errors in C macro SYSTEM_WGETRC and environment-variable SYSTEM_WGETRC. Avoid use of C macro SYSTEM_WGETRC when it's not defined. * src/log.c (log_close): Avoid closing logfp when it's stderr. * src/main.c (print_help): Restore --preserve-permissions. * src/main.c (main): Avoid using a negative value of longindex as a subscript (for long_options[]) when searching for "--config". * src/main.c (main): Exit the program using exit() instead of "return". (VMS handles these differently, and exit() is better.) * src/openssl.c (ssl_init): Add type cast (SSL_METHOD *) to newly "const" "meth" argument to accommodate OpenSSL version 0.9.8, where that argument is not "const" in the OpenSSL function (SSL_CTX_new). * src/test.c: Declare "program_argstring". * src/utils.c (fopen_excl): Comment typography. * src/warc.h: New file. * src/warc.c: New file. 2011-10-02 Henrik Holst (tiny change) * doc/wget.texi (HTTP Options): Document option --content-on-error. 2011-10-02 Henrik Holst (tiny change) * src/http.c (gethttp): If 'contentonerror' is used then do not skip the http body on 4xx and 5xx errors. * src/init.c (commands): Add 'contentonerror'. * src/main.c (print_help, option_data): Add new option 'contentonerror' to make wget not skip the http content on 4xx and 5xx errors. * src/options.h: New variable 'content_on_error'. 2011-09-27 Karl Berry (tiny change) * doc/wget.texi: Make dir entry consistent with others. 2011-09-19 Giuseppe Scrivano * src/main.c (print_version): Update copyright year. (print_version): Fix typo. 2011-09-13 Giuseppe Scrivano * src/ftp.c (ftp_retrieve_glob): Propagate correctly the `res' error code. 2011-09-07 Giuseppe Scrivano * src/http.c (gethttp): Don't inhibit arest request if opt.timestamping is set. Reported by 2011-09-06 Jakob Matthes (tiny change) * src/main.c (print_version): Do not exit prematurely when --help is passed. 2011-09-04 Christian Jullien (tiny change) * src/gnutls.c: Include . 2011-09-04 Alan Hourihane (tiny change) * configure.ac: Check for libz when gnutls is used. 2011-09-02 Mojca Miklavec (tiny change) * src/main.c (print_version): Do not exit prematurely when --version is passed. 2011-08-30 Giuseppe Scrivano * src/gnutls.c (wgnutls_read_timeout): Use the non blocking socket only for `gnutls_record_recv'. Set errno to ETIMEDOUT on a read timeout. 2011-08-29 Giuseppe Scrivano * src/gnutls.c (wgnutls_read_timeout): New function. (wgnutls_read): Use wgnutls_read_timeout. (wgnutls_peek): Likewise. 2011-08-27 Giuseppe Scrivano * src/main.c (print_help): Exit with an error status if print to stdout fails. (print_usage): Change method signature and return a status code. (print_version): Likewise. 2011-08-26 Giuseppe Scrivano * src/gnutls.c: Include "ptimer.h". (wgnutls_read): Honor read timeout. * src/openssl.c (ssl_init): Make `meth' const. 2011-08-26 Giuseppe Scrivano * configure.ac: Under mingw don't check for static OpenSSL libraries if the shared version was already found. Suggested by: Ray Satiro . 2011-08-25 Giuseppe Scrivano * src/utils.c [HAVE_UTIME && HAVE_UTIME_H]: Include . [HAVE_UTIME && HAVE_SYS_UTIME_H]: Include . (touch) [HAVE_UTIME: Prefers utime over futimens when it is available. It was reported that Cygwin has a not working futimens. 2011-08-25 Giuseppe Scrivano * configure.ac: Check for `utime'. 2011-08-19 Giuseppe Scrivano * src/init.c (home_dir) [MSDOS]: Move local variable `len' here. 2011-08-18 Giuseppe Scrivano * doc/texi2pod.pl: Don't assume the perl executable is under /usr/bin/. 2011-08-18 Giuseppe Scrivano * src/http.c (gethttp): Fix a memory leak on some errors. Free the head buffer. * src/Makefile.am: Use an additional file "css_.c" which in turn includes "wget.h" and immediately "css.c". * src/http.c (gethttp): Reset chunked_transfer_encoding on redirections. 2011-08-13 Giuseppe Scrivano * src/retr.c (fd_read_body): Ensure max is not already defined. * src/mswindows.h (snprintf): Remove definition. (vsnprintf): Likewise. 2011-08-12 Giuseppe Scrivano * src/css.l: Remove include "wget.h". Reported by: Perry Smith . 2011-08-11 Giuseppe Scrivano * src/utils.c (abort_run_with_timeout): Use sigprocmask instead of sigsetmask. * src/gnutls.c (ssl_connect_wget): Remove call to deprecated function `gnutls_certificate_type_set_priority'. * src/Makefile.am (version.c): Don't invoke hg to set version string. 2011-08-11 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `sigprocmask'. * configure.ac: Do not hardcode GNU TLS and OpenSSL libraries. * bootstrap.conf (gnulib_modules): Include module iconv. * configure.ac: Allow --with-libgnutls-prefix and --with-libssl-prefix Suggested by: Karl Berry * build-aux/bzr-version-gen (TAG): Consider only the last tag. 2011-08-10 Giuseppe Scrivano Fix a linker error on systems with an older gnutls version. * src/gnutls.c (ssl_connect_wget) [HAVE_GNUTLS_PRIORITY_SET_DIRECT]: Use gnutls_priority_set_direct. [! HAVE_GNUTLS_PRIORITY_SET_DIRECT]: Use gnutls_protocol_set_priority. Reported by: Karl Berry 2011-08-10 Giuseppe Scrivano * configure.ac: Print usage string for --with-ssl. Reported by: Karl Berry * configure.ac: Check for `gnutls_priority_set_direct' when gnutls is used. Reported by: Karl Berry 2011-08-09 Giuseppe Scrivano * build-aux/bzr-version-gen: Fix some portability issues. 2011-08-06 Jochen Roderburg * src/host.c (lookup_host): Ensure it doesn't print more IPs than available ones. 2011-08-06 Giuseppe Scrivano * src/init.c (defaults): Set default value for show_all_dns_entries. * src/host.c (lookup_host): If `showalldnsentries' is used then print all the IP corresponding to a DNS entry. * src/init.c (commands): Add `showalldnsentries'. Suggested by: Witold Baryluk * src/http.c (gethttp): Add the Cache-Control HTTP header when --no-cache is specified. Reported by: Коренберг Марк . 2011-08-06 Giuseppe Scrivano * doc/wget.texi (Wgetrc Commands): Document show_all_dns_entries. * doc/Makefile.am (wget.pod): Pass the VERSION value to texi2pod. * doc/texi2pod.pl: Update from GCC. 2011-08-05 Giuseppe Scrivano * src/utils.c (acceptable): Accept always the file if it is the specified output destination. Reported by: Shai Berger 2011-08-05 Giuseppe Scrivano * src/gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead of the deprecated `gnutls_protocol_set_priority'. 2011-08-02 Giuseppe Scrivano * src/cookies.c (parse_set_cookie): If the value is quoted, do not modify it. Reported by: Nirgal Vourgère 2011-07-29 Giuseppe Scrivano * src/log.c (logprintf): Exit immediately on a SIGPIPE error. Reported by: Noèl Köthe . 2011-07-28 Noèl Köthe (tiny change) * doc/wget.texi (HTTP Options): Fix typo. 2011-07-26 Giuseppe Scrivano * src/retr.c (retrieve_url): Do not register redirects when in spider mode. 2011-07-26 Giuseppe Scrivano * doc/wget.info (cookies): Remove reference to --cookies. Reported by: Noèl Köthe. 2011-07-26 Carlos Martín Nieto (tiny change) * src/init.c (home_dir): Allocate path buffer dinamically. 2011-07-20 Merinov Nikolay * src/iri.c (remote_to_utf8): Add test for non-ASCII symbols with UTF-8 URI encoding. * src/res.c (res_retrieve_file): Fix url_parse call. 2011-07-05 Giuseppe Scrivano * doc/wget.texi (Recursive Retrieval Options): Make clearer that recursion, by default, uses 5 levels. Reported by: Marc Deop . 2011-06-08 Giuseppe Scrivano * src/retr.c (retrieve_from_file): Parse the url careless if IRI is enabled. Reported by: Volker Kuhlmann . 2011-06-03 Merinov Nikolay * tests/Test-idn-cmd-utf8.px: Added test for idn with utf-8 local encoding. * tests/Test-idn-robots-utf8.px: Added test for idn with utf-8 local encoding and robots.txt file. * tests/Makefile.am, run-px: Add new tests. 2011-05-26 Steven Schweda * src/connect.c [HAVE_SYS_SOCKET_H]: Include . [HAVE_SYS_SELECT_H]: Include . 2011-05-25 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `strerror_r-posix'. 2011-05-24 Giuseppe Scrivano * src/retr.c (fd_read_body): Define max. 2011-05-23 Giuseppe Scrivano * src/retr.c (fd_read_body): Be sure the buffer size is at least 8Kb. BUFSIZ may assume very small values with a negative impact on the performances. * src/mswindows.h [NEED_GAI_STRERROR]: remove definition for gai_strerror. 2011-05-19 Giuseppe Scrivano * COPYING: Fix the copyright years. Reported by: Brett Smith . 2011-05-15 Ray Satiro * src/connect.c (select_fd) [WINDOWS]: Ensure the socket is blocking. * src/mswindows.h: Add declaration for set_windows_fd_as_blocking_socket. * src/mswindows.c (set_windows_fd_as_blocking_socket): New function. * src/openssl.c (openssl_read): Prevent loops on read errors. 2011-04-24 Giuseppe Scrivano * src/html-url.c: Include "exists.h". * src/gnutls.c (wgnutls_peek): Remove local variable `ret'. 2011-04-21 Daniel Manrique (tiny change) * src/main.c (main): Set exit status when invalid host name given in command line. * src/html-url.c (get_urls_file): Set exit status when invalid host name given in input file. 2011-04-19 Ray Satiro * configure.ac: Adjust indentation. 2011-04-19 Giuseppe Scrivano * tests/Makefile.am (LIBS): Add $(LIB_CLOCK_GETTIME). 2011-04-19 Giuseppe Scrivano * src/gnutls.c: Do not include . * src/gnutls.c (wgnutls_peek): Ensure there is data available before attempt a read on the blocking socket. * src/Makefile.am (LIBS): Add $(LIB_CLOCK_GETTIME) * src/utils.c: Include . Do not include . (touch): Use `futimens' instead of `utimes'. * src/mswindows.h: Do not include . Remove macro definition for mkdir. 2011-04-19 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `mkdir'. 2011-04-18 Giuseppe Scrivano * src/utils.c: Include . Do not include . (touch): Use `utimes' instead of `utime'. * src/openssl.c (openssl_read): Fix build error. 2011-04-17 Giuseppe Scrivano * src/wget.h [HAVE_LIBSSL32]: Define HAVE_SSL. * src/gnutls.c (wgnutls_peek): Use correctly FIONBIO codes under Mingw32. Reported by: Ray Satiro 2011-04-17 Giuseppe Scrivano * configure.ac: Do not check the host_os twice and if windres is available. Reported by: Ray Satiro 2011-04-16 Ray Satiro 2011-04-16 Giuseppe Scrivano * configure.ac: Detect dynamically linked OpenSSL libraries under mingw32. 2011-04-14 Giuseppe Scrivano * bootstrap: Update from gnulib. * bootstrap.conf (gnulib_modules): Add `pipe' and `sigpipe'. * .cvsignore: Remove file. * .hgignore: Likewise. * .symlinks: Likewise. * bootstrap.conf (gnulib_modules): Add `mbtowc and `unlocked-io'. 2011-04-13 Giuseppe Scrivano * src/openssl.c (openssl_poll): Check if the specified timeout is zero after SSL_pending. (openssl_peek): Make the call non-blocking. 2011-04-11 Cristian Rodríguez (tiny change) * src/openssl.c (ssl_init) [! OPENSSL_NO_SSL2]: Use SSLv2 only when available. 2011-04-07 Ray Satiro (tiny change) (wgnutls_read): Check for the GNUTLS_E_AGAIN return code in the recv tight loop. (wgnutls_write): Likewise. (wgnutls_peek): Likewise. 2011-04-07 Giuseppe Scrivano * src/gnutls.c (wgnutls_peek): New local variable `read'. Use `read' instead of `ret' to store the number of read bytes. Reported by: Ray Satiro 2011-04-07 Giuseppe Scrivano * src/gnutls.c (ssl_init): Allow X509 v1 certificates. Suggested by: Ray Satiro (wgnutls_peek): Remove tight loop around gnutls_record_recv. 2011-04-04 Giuseppe Scrivano * tests/Makefile.am (LIBS): Remove @LIBSSL@ @W32LIBS@ 2011-04-04 Giuseppe Scrivano * src/openssl.c [WINDOWS]: Include . (openssl_read): Retry the read on SSL_ERROR_WANT_READ. * src/host.c [WINDOWS]: Include and . Suggested by: Ray Satiro . * src/Makefile.am (LIBS): Remove @LIBSSL@ @W32LIBS@ 2011-04-04 Giuseppe Scrivano * configure.ac: Use AC_CHECK_LIB to look for the openssl library. 2011-04-03 Giuseppe Scrivano * src/gnutls.c: Include . (wgnutls_peek): Make the socket non blocking before attempt a read. * src/gnutls.c: Include . (wgnutls_peek) [F_GETFL]: Use fcntl. (wgnutls_peek) [! F_GETFL]: Use ioctl. 2011-04-03 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `fcntl'. (gnulib_modules): Add `ioctl'. 2011-03-31 Giuseppe Scrivano * src/recur.c (download_child_p): When --no-parent is used, check that the ports are the same only in case the same protocol is used. Reported by: Karl Berry * src/res.c (res_parse): Add new line to debug messages. 2011-03-26 Giuseppe Scrivano * configure.ac: Fix the gnutls detection. 2011-03-21 Giuseppe Scrivano * src/iri.h (parse_charset) [!ENABLE_IRI]: Use the parameter to avoid a compiler warning. * src/iri.h: Declare `dummy_iri' as extern not static. * src/main.c [!ENABLE_IRI]: Define `dummy_iri'. (main) [!ENABLE_IRI]: Initialize `dummy_iri'. 2011-03-21 Giuseppe Scrivano * doc/wget.texi: Do not cite the current maintainer. Reported by: Micah Cowan . 2011-03-21 Giuseppe Scrivano * bootstrap: Update from gnulib. 2011-03-19 Giuseppe Scrivano * bootstrap.conf (buildreq): Update build prerequisites list. 2011-03-11 Giuseppe Scrivano * src/ftp.c (getftp): Fix some memory leaks. * src/ftp-ls.c (ftp_parse_winnt_ls): Likewise. Reported by: Zhenbo Xu . 2011-03-02 Tomasz Buchert (tiny change) * src/http.c (ensure_extension): Do not adjust the extension if the file ends in .htm. 2011-02-22 Steven Schubiger * src/http.c (gethttp, http_loop): Move duplicated code which is run when an existing file is not to be clobbered to a function. (get_file_flags): New static function. 2011-02-22 Gilles Carry * src/main.c (prompt_for_password): Use stderr instead of stdout to prompt password. This allows to use --output-document=- and --ask-password simultaneously. Without this, redirecting stdout makes password prompt invisible and mucks up payload such as in this example: wget --output-document=- --ask-password -user=foo \ http://foo.com/tarball.tgz | tar zxf - 2010-12-28 Adrien Nader (tiny change) * src/main.c [WINDOWS]: Include and . (main) [WINDOWS]: Set the stdout file mode to binary. Submitted also by: Martin Panter 2010-12-22 Giuseppe Scrivano * doc/wget.texi (HTTP Options): Remove sentence which doesn't reflect the wget behaviour when -k -K are used with -E. Reported by: pike-wget@kw.nl. 2010-12-10 Evgeniy Philippov (tiny change) * src/main.c (main): Initialize `total_downloaded_bytes'. 2010-12-09 Giuseppe Scrivano * src/main.c (main): If --no-clobber and --convert-links are used at the same time, use only the latter. Reported by: Romain Vimont 2010-12-07 Jessica McKellar (tiny change) * vms/WGET.HLP: Make help message clearer. 2010-12-07 Jessica McKellar (tiny change) * src/main.c: Make help message clearer. 2010-12-02 Giuseppe Scrivano * src/build_info.c.in: Do not list md5. 2010-12-01 Giuseppe Scrivano * src/cmpt.c: Include inconditionally. * src/connect.c: Likewise. * src/convert.c: Likewise. * src/ftp-basic.c: Likewise. * src/ftp-ls.c: Likewise. * src/ftp.c: Likewise. * src/gnutls.c: Likewise. * src/http.c: Likewise. * src/init.c: Likewise. * src/log.c: Likewise. * src/main.c: Likewise. * src/openssl.c: Likewise. * src/progress.c: Likewise. * src/ptimer.c: Likewise. * src/recur.c: Likewise. * src/retr.c: Likewise. * src/url.c: Likewise. * src/utils.c: Likewise. * src/retr.c (fd_read_body): Dinamically allocate `dlbuf'. 2010-11-27 Reza Snowdon * src/init.c (initialize): If 'ok' is not zero; exit, as this indicates there was a problem parsing 'SYSTEM_WGETRC'. Fixes bug #20370. 2010-11-22 Giuseppe Scrivano Revert last commit. * src/ftp.c (getftp): When count > 0, don't append to the existing file. * src/http.c (gethttp): Likewise. 2010-11-21 Giuseppe Scrivano * src/ftp.c (getftp): If `count' is bigger than zero, try to resume the download, not restart it. * src/http.c (gethttp): Likewise. Suggested by: Evgeny Kapun . 2010-11-20 Filipe Brandenburger (tiny change) * src/http.c (gethttp): Repeat a POST request on a 307 response. * src/retr.c (retrieve_url): Use NEWLOCATION_KEEP_POST. * src/wget.h: Define NEWLOCATION_KEEP_POST. 2010-11-19 Giuseppe Scrivano * src/ftp.c (getftp): Accept new argument `count'. When `count' is bigger than zero, assume the file can be overwritten. (ftp_loop_internal): Pass new argument `count' to `getftp'. * src/http.c (gethttp): Accept new argument `count'. When `count' is bigger than zero, assume the file can be overwritten. (http_loop): Pass new argument `count' to `gethttp'. Reported by: Evgeny Kapun . 2010-10-26 Giuseppe Scrivano * doc/wget.texi (Download Options): Remove unclear statement about the --waitretry option. Reported by: Manfred Koizar . 2010-10-24 Jessica McKellar (tiny change) * src/main.c (main): Print the total download time as part of the summary for downloads using the recursive or page requisites options. Fixes bug #21359. 2010-10-24 Jessica McKellar (tiny change) * NEWS: Mention the change to the the summary for recursive downloads. 2010-10-24 Giuseppe Scrivano * src/gnutls.c (wgnutls_peek): Do not return an error when `gnutls_record_recv' fails but some data is already available. 2010-10-23 Giuseppe Scrivano * tests/Makefile.am (LIBS): Remove @LIBGNUTLS@ and use @W32LIBS@ as last component. 2010-10-23 Giuseppe Scrivano * src/Makefile.am (LIBS): Remove @LIBGNUTLS@ and use @W32LIBS@ as last component. * src/gnutls.c (wgnutls_peek): Block until data is available. 2010-10-23 Giuseppe Scrivano * configure.ac: Add check for libgpg-error and libgcrypt. 2010-10-21 Giuseppe Scrivano * src/retr.c (retrieve_url): Do not register HTML files twice. Reported by: Manfred Koizar . 2010-10-18 Manfred Koizar (tiny change) * src/html-url.c (tag_handle_link): Do not assume external links type to be always "text/html". 2010-10-16 Giuseppe Scrivano * src/connect.c (socket_ip_address): Initialize `sockaddr' to zero. * src/ftp-basic.c (ftp_epsv): Remove dead assignment to `s'. * src/ftp-ls.c (ftp_parse_vms_ls): Remove dead assignment to `len'. * src/http.c (skip_short_body): Remove dead assignment to `ret'. * src/init.c (wgetrc_user_file_name): Remove dead assignment to `home'. * src/main.c (main): Silent warning reported by clang. (http_loop): Silent warning reported by clang. * src/retr.c (retrieve_url): Likewise. * src/url.c (init_seps): Remove dead assignment to `p'. 2010-10-11 Steven Schubiger * src/ftp.c (getftp): Initialize `targ'. 2010-10-11 Giuseppe Scrivano * src/ftp.c (getftp): Fix indentation. 2010-10-08 Ivanov Anton (tiny change) * src/html-url.c (check_style_attr): Skip quotes when they are present. 2010-10-06 Giuseppe Scrivano * src/main.c (main): Remove unused variable `status'. 2010-09-25 Merinov Nikolay * src/init.c: Add "unlink" command into command list. * src/main.c: Add "unlink" option into option_data list. * src/options.h: Adding unlink field into struct options. * src/wget.h: Addind UNLINKERR error into uerr_t enum. * src/exits.c (get_status_for_err): define status for UNLINKERR. * src/ftp.c (getftp): unlink file if exists, instead clobbering. (ftp_loop_internal): processing UNLINKERR. * src/http.c (gethttp): unlink file if exists, instead clobbering. (http_loop): processing UNLINKERR. 2010-09-25 Merinov Nikolay * doc/wget.texi (Download Options): Document --unlink option. 2010-09-24 Dennis, CHENG Renquan Fix problem when content-disposition is used with recursive downloading. * src/url.h (url_file_name): Add a new argument `replaced_filename'. * src/url.c (url_file_name): Likewise. * src/http.c (parse_content_disposition): Do not add a prefix to the return value. (test_parse_content_disposition): Adjust tests. (gethttp): Pass additional parameter to `url_file_name'. (http_loop): Likewise. * src/ftp.c (ftp_loop_internal, ftp_get_listing, ftp_retrieve_list) (ftp_loop): Likewise. 2010-09-14 Giuseppe Scrivano * src/convert.c (local_quote_string): Accept new parameter `no_html_quote'. Inhibit HTML quoting when `no_html_quote'. (convert_links): Disable HTML quoting in CSS files. Reported by: Manuel Reinhardt . 2010-09-13 Giuseppe Scrivano * doc/wget.texi (Recursive Accept/Reject Options): Remove superfluous dot. Reported by: Snader_LB. 2010-09-12 Mike Frysinger Fix some tests failures. * tests/Test-iri-forced-remote.px: Use --trust-server-names to the cmdline variable. * tests/Test-iri-list.px: Likewise. * tests/Test-iri.px: Likewise. 2010-09-12 Giuseppe Scrivano * src/main.c (print_help): Align --trust-server-names help text with the rest of the text. Suggested by: Mike Frysinger . 2010-09-06 Giuseppe Scrivano * lib/Makefile.am: Fix typo. 2010-08-20 Giuseppe Scrivano * src/convert.c: Include "iri.h". (convert_links_in_hashtable): Parse the url, if necessary, before check if it is present in the dowloaded url map. Reported by: . 2010-08-09 Giuseppe Scrivano Fix a problem with HTTP/1.0 proxies. * src/http.c (gethttp): Specify the connection header when keep alive connections are not used. Use persistent connections with proxies supporting them. * src/http.c (gethttp): Specify Proxy-Connection to the HTTP proxy. 2010-08-08 Reza Snowdon * src/main.c (main): inserted 'defaults'. Added additional 'getopt_long' while loop to search and apply a user specified config file before any other options. New variables 'retconf', 'use_userconfig', 'confval', 'userrc_ret', 'config_opt'. * src/init.c: Include stdbool.h. (commands): Added config details. (defaults): Removed static. (wgetrc): Removed static. (initialize): Removed 'defaults ()', changed 'int ok' to 'bool ok'. * src/options.h: New variable 'choose_config'. * src/init.h (defaults): exported function. (run_wgetrc): exported function. 2010-08-08 Reza Snowdon * doc/wget.texi: Added information about the config option to the 'Overview' section and a description of the option in 'Logging and Input File Options'. 2010-08-08 Giuseppe Scrivano * Makefile.am (EXTRA_DIST): Remove configure.bat. 2010-08-06 Giuseppe Scrivano * src/css-url.c (get_uri_string): Skip empty urls. 2010-07-30 Giuseppe Scrivano * src/html-url.h (struct map_context): Remove member `tail'. * src/html-url.c (append_url): Append the new url ordered by `position'. (get_urls_html): Do not initialize `ctx.tail'. * src/css-url.c (get_urls_css_file): Do not initialize `ctx.tail'. 2010-07-29 Giuseppe Scrivano * src/gnutls.c (wgnutls_peek): Don't read more data if the buffered peek data is sufficient. 2010-07-28 Giuseppe Scrivano * src/http.h (http_loop): Add new argument `original_url' * src/http.c (http_loop): Add new argument `original_url'. Use `original_url' to get a filename if `trustservernames' is false. * src/init.c (commands): Add "trustservernames". * src/options.h (library): Add variable `trustservernames'. * src/main.c (option_data): Add trust-server-names. (print_help): Describe --trust-server-names. * src/retr.c (retrieve_url): Pass new argument to `http_loop'. 2010-07-28 Alon Bar-Lev (tiny change) * doc/texi2pod.pl: Use the warnings module only when it is available. 2010-07-25 John Trengrove (tiny change) * src/ftp.h: Added enum `parsetype'. Modified struct to hold parsetype. * src/ftp-ls.c (ftp_parse_unix_ls): Default to TT_DAY. Change to TT_HOUR_MIN if hours/minutes parsed. (ftp_parse_winnt_ls): Default to TT_HOUR_MIN. (ftp_parse_vms_ls): Default to TT_HOUR_MIN. (ftp_index): Print only if fileinfo struct value ttype set to TT_HOUR_MIN. 2010-07-24 Giuseppe Scrivano * configure.bat: Remove file. 2010-07-20 Leonid Petrov * src/ftp.c (getftp): Don't attempt to retrieve the file if it is already completely. (ftp_loop_internal): Force the length to be zero for symlinks. 2010-07-20 Alan Jenkins (tiny change) * src/http.c (gethttp): Check content-length was set before trying to compare it with the already downloded filesize. 2010-07-18 Giuseppe Scrivano * src/http.c (gethttp): If -N is used, don't exit immediately if the content length is less or equal than the existing file size. Specify "Range" only if -N is not used. Reported by: Caleb Cushing . 2010-07-14 Giuseppe Scrivano * src/ftp.c (max): Remove definition. (getftp): New variable `got_expected_bytes'. Let `expected_bytes' be the value SIZE returns, otherwise use the bytes count returned by RETR. Suggested by Daniel Stenberg . 2010-07-14 Giuseppe Scrivano * src/ftp.c (max): Add definition. (getftp): Consider for `expected_bytes' the greatest value between the bytes count returned by SIZE and the bytes count returned by RETR. Reported by: Jozua . 2010-07-11 Giuseppe Scrivano * src/http.c (http_loop): New variable `force_full_retrieve'. If the remote file is newer that the local one then inhibit -c. Reported by: Caleb Cushing . 2010-07-11 Giuseppe Scrivano * configure.ac (AC_CHECK_SIZEOF): Quote argument. Reported by: Jochen Roderburg . 2010-07-09 Giuseppe Scrivano * src/css-url.c (get_urls_css_file): Use `wget_read_file' instead of `read_file'. Use `wget_read_file_free' instead of `read_file_free'. * src/convert.c (convert_links): Likewise. * src/html-url.c (get_urls_html, get_urls_file): Likewise. * src/res.c (res_parse_from_file): Likewise. * src/utils.h: Rename `read_file' to `wget_read_file'. Rename `read_file_free' to `wget_read_file_free'. * src/utils.c (wget_read_file): Renamed from `read_file'. (wget_read_file_free): Renamed from `read_file_free'. 2010-07-09 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `vasprintf'. Remove `asprintf'. 2010-07-09 Giuseppe Scrivano * bootstrap.conf (buildreq): Relax gettext version to 0.17. 2010-07-05 Giuseppe Scrivano * src/gnutls.c (ssl_init): New local variables `ca_directory' and `dir'. Load default root certificates under the `ca_directory' directory. 2010-07-05 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `asprintf'. 2010-07-03 Giuseppe Scrivano * src/gnutls.c (ssl_connect_wget): New local variable `allowed_protocols'. Honor the --secure-protocol flag. 2010-06-22 Giuseppe Scrivano * configure.ac: By default use GNU TLS not OpenSSL. 2010-06-20 Giuseppe Scrivano * src/main.c (print_help): Fix help string for --random-wait. Its range is [0.5*wait, 1.5*wait) not [0, 2*wait). Reported by: Tom Mizutani . 2010-06-17 Giuseppe Scrivano * windows: Remove directory. * Makefile.am (SUBDIRS): Remove windows. * configure.ac: Don't generate windows/Makefile. 2010-06-15 Giuseppe Scrivano * src/gnutls.c [WIN32]: Include "w32sock.h". (FD_TO_SOCKET): Add definition. (ssl_connect_wget): Get the real socket handle by FD_TO_SOCKET. Define FD_TO_SOCKET if it is not yet defined. 2010-06-15 Giuseppe Scrivano * m4/wget.m4 (WGET_STRUCT_SOCKADDR_STORAGE): Guard header inclusions. (TYPE_STRUCT_SOCKADDR_IN6): Likewise. (MEMBER_SIN6_SCOPE_ID): Likewise. (PROTO_INET6): Likewise. * configure.ac: Don't check for `getaddrinfo'. * bootstrap.conf (gnulib_modules): Add `getaddrinfo' module. 2010-06-14 Giuseppe Scrivano * src/gnutls.c: Include . (struct wgnutls_transport_context): Remove `peekstart'. (ssl_connect_wget): Renamed from `ssl_connect'. (wgnutls_poll): New variable `ctx'. (wgnutls_read): Don't use `ctx->peekstart'. (wgnutls_peek): Likewise. Don't attempt to read if there is not ready data. 2010-06-14 Giuseppe Scrivano * src/http.c (http_loop): Always send a HEAD request when -N is used together with --content-disposition. Reported by: Jochen Roderburg . 2010-06-10 Muthu Subramanian K (tiny change) * src/http.c (http_loop): Increase `total_downloaded_bytes' by `hstat.rd_size', not `hstat.len'. 2010-06-10 Giuseppe Scrivano * src/main.c (print_version): Drop the current maintainer line. 2010-06-10 Giuseppe Scrivano * src/Makefile.am (build_info.c): Generate the `build_info.c' file under the build directory. Patch by: Daniel Stenberg . 2010-06-10 Giuseppe Scrivano * configure.ac (AM_INIT_AUTOMAKE): Remove dist-bzip2 dist-lzma from automake options. Reported by: Daniel Stenberg . 2010-06-10 Giuseppe Scrivano * bootstrap.conf (buildreq): Add definition. 2010-06-04 Giuseppe Scrivano * tests/Test--no-content-disposition-trivial.px: Use /usr/bin/env to find the perl interpreter. * tests/Test--no-content-disposition.px: Likewise. * tests/Test--spider-fail.px: Likewise. * tests/Test--spider-r--no-content-disposition-trivial.px: Likewise. * tests/Test--spider-r--no-content-disposition.px: Likewise. * tests/Test--spider-r-HTTP-Content-Disposition.px: Likewise. * tests/Test--spider-r.px: Likewise. * tests/Test--spider.px: Likewise. * tests/Test-E-k-K.px: Likewise. * tests/Test-E-k.px: Likewise. * tests/Test-HTTP-Content-Disposition-1.px: Likewise. * tests/Test-HTTP-Content-Disposition-2.px: Likewise. * tests/Test-HTTP-Content-Disposition.px: Likewise. * tests/Test-N--no-content-disposition-trivial.px: Likewise. * tests/Test-N--no-content-disposition.px: Likewise. * tests/Test-N-HTTP-Content-Disposition.px: Likewise. * tests/Test-N-current.px: Likewise. * tests/Test-N-no-info.px: Likewise. * tests/Test-N-old.px: Likewise. * tests/Test-N-smaller.px: Likewise. * tests/Test-N.px: Likewise. * tests/Test-O--no-content-disposition-trivial.px: Likewise. * tests/Test-O--no-content-disposition.px: Likewise. * tests/Test-O-HTTP-Content-Disposition.px: Likewise. * tests/Test-O-nc.px: Likewise. * tests/Test-O-nonexisting.px: Likewise. * tests/Test-O.px: Likewise. * tests/Test-Restrict-Lowercase.px: Likewise. * tests/Test-Restrict-Uppercase.px: Likewise. * tests/Test-auth-basic.px: Likewise. * tests/Test-auth-no-challenge-url.px: Likewise. * tests/Test-auth-no-challenge.px: Likewise. * tests/Test-auth-retcode.px: Likewise. * tests/Test-auth-with-content-disposition.px: Likewise. * tests/Test-c-full.px: Likewise. * tests/Test-c-partial.px: Likewise. * tests/Test-c-shorter.px: Likewise. * tests/Test-c.px: Likewise. * tests/Test-cookies-401.px: Likewise. * tests/Test-cookies.px: Likewise. * tests/Test-ftp-bad-list.px: Likewise. * tests/Test-ftp-iri-disabled.px: Likewise. * tests/Test-ftp-iri-fallback.px: Likewise. * tests/Test-ftp-iri-recursive.px: Likewise. * tests/Test-ftp-iri.px: Likewise. * tests/Test-ftp-pasv-fail.px: Likewise. * tests/Test-ftp-recursive.px: Likewise. * tests/Test-ftp.px: Likewise. * tests/Test-i-ftp.px: Likewise. * tests/Test-i-http.px: Likewise. * tests/Test-idn-cmd.px: Likewise. * tests/Test-idn-headers.px: Likewise. * tests/Test-idn-meta.px: Likewise. * tests/Test-idn-robots.px: Likewise. * tests/Test-iri-disabled.px: Likewise. * tests/Test-iri-forced-remote.px: Likewise. * tests/Test-iri-list.px: Likewise. * tests/Test-iri-percent.px: Likewise. * tests/Test-iri.px: Likewise. * tests/Test-k.px: Likewise. * tests/Test-meta-robots.px: Likewise. * tests/Test-nonexisting-quiet.px: Likewise. * tests/Test-noop.px: Likewise. * tests/Test-np.px: Likewise. * tests/Test-proxied-https-auth.px: Likewise. * tests/Test-proxy-auth-basic.px: Likewise. * tests/Test-restrict-ascii.px: Likewise. Reported by sci-fi@hush.ai. 2010-06-04 Giuseppe Scrivano * build-aux/build_info.pl: Use /usr/bin/env to find the perl interpreter. * util/paramcheck.pl: Likewise. * util/rmold.pl: Likewise. Reported by sci-fi@hush.ai. 2010-06-03 Giuseppe Scrivano * src/http.c (http_loop): Do not send a HEAD request before the GET request when --content-disposition is used. Reported by: alex_wh@mail.ru. 2010-06-03 Giuseppe Scrivano * configure.ac (W32LIBS): Remove -lwsock32. 2010-06-03 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add iconv-h. 2010-05-31 Giuseppe Scrivano * src/sysdep.h (_SVID_SOURCE): Remove definition. (_BSD_SOURCE): Remove definition. 2010-05-31 Giuseppe Scrivano * src/recur.c (retrieve_tree): Remove variable `up_error_code'. * src/iri.c (open_locale_to_utf8): Remove function. 2010-05-31 Giuseppe Scrivano * src/html-parse.c (map_html_tags): Fix condition for closed tag. Handle the case '>' is not specified after '/'. 2010-05-31 Giuseppe Scrivano * src/css.l: Use option "nounput". (YY_NO_INPUT): Add macro definition. 2010-05-30 Giuseppe Scrivano * src/html-parse.c (NAME_CHAR_P): Consider '<' an invalid character. (advance_declaration): Close the tag if '<' is found. (map_html_tags): Likewise. 2010-05-29 Giuseppe Scrivano * tests/Makefile.am (EXTRA_DIST): Add Test-auth-retcode.px. * tests/run-px (tests): Likewise. * tests/Test-auth-retcode.px: New file. 2010-05-27 Giuseppe Scrivano * src/main.c (print_usage): Accept a new parameter `error'. (main): Print diagnostic messages to stderr, not stdout. 2010-05-27 Giuseppe Scrivano * src/main.c (main): Exit with failure when -k is specified and -O is not a regular file. 2010-05-27 Giuseppe Scrivano * src/http.c (gethttp): Consider new cookies retrieved when the authorization fails. 2010-05-27 Giuseppe Scrivano * src/Makefile.am (wget_SOURCES): Remove `snprintf.c'. * src/snprintf.c: Remove file. 2010-05-27 Giuseppe Scrivano * doc/wget.texi (Download Options): Document that -k can be used with -O only with regular files. 2010-05-27 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add `snprintf' module. * configure.ac: Remove check for the `snprintf' function. 2010-05-25 Giuseppe Scrivano * src/host.c (sufmatch): Do not consider zero length entries. * src/http.c (H_10X): New macro. (gethttp): Silently ignore 1xx responses. 2010-05-24 Giuseppe Scrivano * src/iri.h (dummy_iri): Define static. * src/css-tokens.h (css_tokens): Remove variable. 2010-05-23 Giuseppe Scrivano * src/http.c (http_atotm): Count the NUL character when copying the locale string. Reported by: Florian Weimer 2010-05-16 Giuseppe Scrivano * tests/Makefile.am (../md5/libmd5.a): Remove rule. (LDADD): Remove MD5_LDADD. 2010-05-16 Giuseppe Scrivano * src/Makefile.am (LDADD): Remove MD5_LDADD. (MD5_LDADD): Remove definition. (AM_CPPFLAGS): Remove MD5_CPPFLAGS. (version.c): Remove dependency from MD5_LDADD. (../md5/libmd5.a): Remove rule. * src/ftp-opie.c: Include "md5.h". Do not include "gen-md5.h". (skey_response): New variable ctx. Use md5 functions from the gnulib module instead of functions defined previously in the "gen-md5.h" file. * src/gen-md5.h: Remove file. * src/gen-md5.c: Likewise. * src/http.c: Include "md5.h". Do not include "gen-md5.h". (digest_authentication_encode): New variable ctx. Use md5 functions from the gnulib module instead of functions defined previously in the "gen-md5.h" file. 2010-05-16 Giuseppe Scrivano * md5: Remove directory. * bootstrap.conf (gnulib_modules): Add crypto/md5. * configure.ac: Remove any check for md5 libraries. * Makefile.am (ACLOCAL_AMFLAGS): Remove -I md5/m4. (SUBDIRS): Remove md5. 2010-05-15 Giuseppe Scrivano * src/Makefile.am: Quote any path using $(top_srcdir) or $(top_builddir). (version.c): Remove dependency from configure.ac and Makefile.am. * src/css.l: Include "wget.h". 2010-05-15 Giuseppe Scrivano * bootstrap.conf (gnulib_modules): Add "getopt-gnu". Remove "getopt". 2010-05-14 Giuseppe Scrivano * bootstrap (gnulib_path): Default to "gnulib" if it doesn't have a value. Redirect "git clone" stderr to stdout. 2010-05-09 Giuseppe Scrivano * build-aux/bzr-version-gen: New file. * Makefile.am (EXTRA_DIST): Add .version. (BUILT_SOURCES): New defition. (.version): New rule. (dist-hook): Likewise. * configure.ac (AC_INIT): Use build-aux/bzr-version-gen to generate the version string. 2010-05-08 Giuseppe Scrivano * tests/Makefile.am: Update copyright years. 2010-05-08 Giuseppe Scrivano * src/Makefile.am: Update copyright years. * src/cmpt.c: Likewise. * src/connect.h: Likewise. * src/convert.c: Likewise. * src/convert.h: Likewise. * src/cookies.c: Likewise. * src/cookies.h: Likewise. * src/css-tokens.h: Likewise. * src/css-url.c: Likewise. * src/css-url.h: Likewise. * src/css.l: Likewise. * src/exits.c: Likewise. * src/exits.h: Likewise. * src/ftp-basic.c: Likewise. * src/ftp-ls.c: Likewise. * src/ftp-opie.c: Likewise. * src/ftp.c: Likewise. * src/ftp.h: Likewise. * src/gen-md5.c: Likewise. * src/gen-md5.h: Likewise. * src/gettext.h: Likewise. * src/gnutls.c: Likewise. * src/hash.c: Likewise. * src/hash.h: Likewise. * src/host.c: Likewise. * src/host.h: Likewise. * src/html-parse.c: Likewise. * src/html-parse.h: Likewise. * src/html-url.c: Likewise. * src/html-url.h: Likewise. * src/http-ntlm.c: Likewise. * src/http-ntlm.h: Likewise. * src/http.c: Likewise. * src/http.h: Likewise. * src/init.c: Likewise. * src/init.h: Likewise. * src/iri.c: Likewise. * src/iri.h: Likewise. * src/log.c: Likewise. * src/log.h: Likewise. * src/main.c: Likewise. * src/mswindows.c: Likewise. * src/mswindows.h: Likewise. * src/netrc.c: Likewise. * src/netrc.h: Likewise. * src/openssl.c: Likewise. * src/options.h: Likewise. * src/progress.c: Likewise. * src/progress.h: Likewise. * src/ptimer.c: Likewise. * src/ptimer.h: Likewise. * src/recur.c: Likewise. * src/recur.h: Likewise. * src/res.c: Likewise. * src/res.h: Likewise. * src/retr.c: Likewise. * src/retr.h: Likewise. * src/spider.c: Likewise. * src/spider.h: Likewise. * src/ssl.h: Likewise. * src/sysdep.h: Likewise. * src/test.c: Likewise. * src/test.h: Likewise. * src/url.c: Likewise. * src/url.h: Likewise. * src/utils.c: Likewise. * src/utils.h: Likewise. * src/wget.h: Likewise. 2010-05-08 Giuseppe Scrivano * doc/Makefile.am: Update copyright years. * doc/fdl.texi: Likewise. * doc/texi2pod.pl: Likewise. * doc/wget.texi: Likewise. 2010-05-08 Giuseppe Scrivano * Makefile.am: Update copyright years. * build-aux/build_info.pl: Likewise. * configure.ac: Likewise. * configure.bat: Likewise. * doc/Makefile.am: Likewise. * doc/fdl.texi: Likewise. * doc/texi2pod.pl: Likewise. * doc/wget.texi: Likewise. * m4/exitfail.m4: Likewise. * m4/getpagesize.m4: Likewise. * m4/wchar.m4: Likewise. * m4/wctype.m4: Likewise. * m4/wget.m4: Likewise. * md5/Makefile.am: Likewise. * md5/dummy.c: Likewise. * md5/m4/00gnulib.m4: Likewise. * md5/m4/gnulib-cache.m4: Likewise. * md5/m4/gnulib-common.m4: Likewise. * md5/m4/gnulib-comp.m4: Likewise. * md5/m4/gnulib-tool.m4: Likewise. * md5/m4/include_next.m4: Likewise. * md5/m4/longlong.m4: Likewise. * md5/m4/md5.m4: Likewise. * md5/m4/multiarch.m4: Likewise. * md5/m4/stddef_h.m4: Likewise. * md5/m4/stdint.m4: Likewise. * md5/m4/wchar.m4: Likewise. * md5/m4/wchar_t.m4: Likewise. * md5/m4/wint_t.m4: Likewise. * md5/md5.h: Likewise. * md5/stddef.in.h: Likewise. * md5/stdint.in.h: Likewise. * md5/wchar.in.h: Likewise. * msdos/config.h: Likewise. * msdos/msdos.c: Likewise. * po/POTFILES.in: Likewise. * util/Makefile.am: Likewise. * util/paramcheck.pl: Likewise. * util/rmold.pl: Likewise. 2010-05-07 Giuseppe Scrivano * tests/Makefile.am (LIBS): Add definition. (LDADD): Add LIBS. 2010-05-07 Giuseppe Scrivano * src/gnutls.c (wgnutls_close): Use always `close', not `closesocket'. * src/openssl.c (openssl_close): Use always `close', not `closesocket'. (ssl_connect_wget): Get the real socket handle by FD_TO_SOCKET. Define FD_TO_SOCKET if it is not yet defined. * src/Makefile.am (libunittest_a_CPPFLAGS): Add -I$(top_builddir)/lib. * src/mswindows.h: Always include and . Do not include . [! INHIBIT_WRAP]: Remove macro's socket, bind, connect, accept, recv, send, select, getsockname, getpeername, setsockopt, closesocket. Remove wrapped_socket, wrapped_bind, wrapped_connect, wrapped_listen, wrapped_accept, wrapped_recv, wrapped_send, wrapped_select, wrapped_getsockname, wrapped_getpeername, wrapped_setsockopt, wrapped_closesocket prototypes. * src/mswindows.c: Remove wrapped_socket, wrapped_bind, wrapped_connect, wrapped_listen, wrapped_accept, wrapped_recv, wrapped_send, wrapped_select, wrapped_getsockname, wrapped_getpeername, wrapped_setsockopt, wrapped_closesocket functions. Remove WRAP macro. * src/host.h [WINDOWS]: Include not . * src/connect.c: Include and on any platform, gnulib ensures they exist. Remove `read', `write', `close' macros. * src/Makefile.am: Copy build_info.c.in only if we are working in a VPATH. (AM_CPPFLAGS): Add directory with generated gnulib files. 2010-05-07 Giuseppe Scrivano * configure.ac: Don't call macro WGET_SOCKLEN_T. (W32LIBS): Add -lws2_32. * Makefile.am (EXTRA_DIST): Remove autogen.sh. * bootstrap.conf (gnulib_modules): Use new modules from gnulib: accept, bind, close, connect, getpeername, getsockname, listen, setsockopt. * m4/wget.m4 (WGET_SOCKLEN_T): Remove macro. * po/wget.pot: Remove. 2010-05-07 Giuseppe Scrivano * configure.ac (ALL_LINGUAS): Remove. 2010-05-06 Giuseppe Scrivano * src/Makefile.am (build_info.c): Generate build_info.c in the builddir, not srcdir. 2010-05-06 Giuseppe Scrivano * bootstrap: New file. * bootstrap.conf: New file. * lib/Makefile.am: include gnulib.mk. * autogen.sh: Removed. * GNUmakefile: Likewise. * INSTALL: Likewise. * build-aux/announce-gen: Likewise. * build-aux/compile: Likewise. * build-aux/config.guess: Likewise. * build-aux/config.rpath: Likewise. * build-aux/config.sub: Likewise. * build-aux/depcomp: Likewise. * build-aux/gnupload: Likewise. * build-aux/install-sh: Likewise. * build-aux/mdate-sh: Likewise. * build-aux/missing: Likewise. * build-aux/mkinstalldirs: Likewise. * build-aux/texinfo.tex: Likewise. * build-aux/update-copyright: Likewise. * build-aux/useless-if-before-free: Likewise. * build-aux/vc-list-files: Likewise. * build-aux/ylwrap: Likewise. * lib/DESCRIP_DEPS.MMS: Likewise. * lib/DESCRIP_MODS.MMS: Likewise. * lib/DESCRIP_SRC.MMS: Likewise. * lib/alloca.c: Likewise. * lib/alloca.in.h: Likewise. * lib/c-ctype.c: Likewise. * lib/c-ctype.h: Likewise. * lib/config.charset: Likewise. * lib/errno.in.h: Likewise. * lib/error.c: Likewise. * lib/error.h: Likewise. * lib/exitfail.c: Likewise. * lib/exitfail.h: Likewise. * lib/fseeko.c: Likewise. * lib/getdelim.c: Likewise. * lib/getline.c: Likewise. * lib/getopt.c: Likewise. * lib/getopt.in.h: Likewise. * lib/getopt1.c: Likewise. * lib/getopt_int.h: Likewise. * lib/getpagesize.c: Likewise. * lib/getpass.c: Likewise. * lib/getpass.h: Likewise. * lib/gettext.h: Likewise. * lib/intprops.h: Likewise. * lib/localcharset.c: Likewise. * lib/localcharset.h: Likewise. * lib/lseek.c: Likewise. * lib/mbrtowc.c: Likewise. * lib/mbsinit.c: Likewise. * lib/memchr.c: Likewise. * lib/memchr.valgrind: Likewise. * lib/quote.c: Likewise. * lib/quote.h: Likewise. * lib/quotearg.c: Likewise. * lib/quotearg.h: Likewise. * lib/realloc.c: Likewise. * lib/ref-add.sin: Likewise. * lib/ref-del.sin: Likewise. * lib/stdbool.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdio-write.c: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/str-two-way.h: Likewise. * lib/strcasecmp.c: Likewise. * lib/strcasestr.c: Likewise. * lib/streq.h: Likewise. * lib/strerror.c: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/strncasecmp.c: Likewise. * lib/unistd.in.h: Likewise. * lib/verify.h: Likewise. * lib/wchar.in.h: Likewise. * lib/wctype.in.h: Likewise. * lib/xalloc-die.c: Likewise. * lib/xalloc.h: Likewise. * lib/xmalloc.c: Likewise. * m4/00gnulib.m4: Likewise. * m4/alloca.m4: Likewise. * m4/codeset.m4: Likewise. * m4/errno_h.m4: Likewise. * m4/error.m4: Likewise. * m4/extensions.m4: Likewise. * m4/fseeko.m4: Likewise. * m4/getdelim.m4: Likewise. * m4/getline.m4: Likewise. * m4/getopt.m4: Likewise. * m4/getpass.m4: Likewise. * m4/gettext.m4: Likewise. * m4/glibc21.m4: Likewise. * m4/gnulib-cache.m4: Likewise. * m4/gnulib-common.m4: Likewise. * m4/gnulib-comp.m4: Likewise. * m4/gnulib-tool.m4: Likewise. * m4/iconv.m4: Likewise. * m4/include_next.m4: Likewise. * m4/inline.m4: Likewise. * m4/lib-ld.m4: Likewise. * m4/lib-link.m4: Likewise. * m4/lib-prefix.m4: Likewise. * m4/localcharset.m4: Likewise. * m4/locale-fr.m4: Likewise. * m4/locale-ja.m4: Likewise. * m4/locale-zh.m4: Likewise. * m4/longlong.m4: Likewise. * m4/lseek.m4: Likewise. * m4/malloc.m4: Likewise. * m4/mbrtowc.m4: Likewise. * m4/mbsinit.m4: Likewise. * m4/mbstate_t.m4: Likewise. * m4/memchr.m4: Likewise. * m4/mmap-anon.m4: Likewise. * m4/multiarch.m4: Likewise. * m4/nls.m4: Likewise. * m4/po.m4: Likewise. * m4/progtest.m4: Likewise. * m4/quote.m4: Likewise. * m4/quotearg.m4: Likewise. * m4/realloc.m4: Likewise. * m4/stdbool.m4: Likewise. * m4/stddef_h.m4: Likewise. * m4/stdint.m4: Likewise. * m4/stdio_h.m4: Likewise. * m4/stdlib_h.m4: Likewise. * m4/strcase.m4: Likewise. * m4/strcasestr.m4: Likewise. * m4/strerror.m4: Likewise. * m4/string_h.m4: Likewise. * m4/strings_h.m4: Likewise. * m4/unistd_h.m4: Likewise. * m4/wchar_t.m4: Likewise. * m4/wint_t.m4: Likewise. * m4/xalloc.m4: Likewise. * maint.mk: Likewise. * po/Makefile.in.in: Likewise. * po/Makevars: Likewise. * po/Rules-quot: Likewise. * po/be.po: Likewise. * po/bg.po: Likewise. * po/boldquot.sed: Likewise. * po/ca.po: Likewise. * po/cs.po: Likewise. * po/da.po: Likewise. * po/de.po: Likewise. * po/el.po: Likewise. * po/en_GB.po: Likewise. * po/eo.po: Likewise. * po/es.po: Likewise. * po/et.po: Likewise. * po/eu.po: Likewise. * po/fi.po: Likewise. * po/fr.po: Likewise. * po/ga.po: Likewise. * po/gl.po: Likewise. * po/he.po: Likewise. * po/hr.po: Likewise. * po/hu.po: Likewise. * po/id.po: Likewise. * po/it.po: Likewise. * po/ja.po: Likewise. * po/lt.po: Likewise. * po/nb.po: Likewise. * po/nl.po: Likewise. * po/pl.po: Likewise. * po/pt.po: Likewise. * po/pt_BR.po: Likewise. * po/quot.sed: Likewise. * po/ro.po: Likewise. * po/ru.po: Likewise. * po/sk.po: Likewise. * po/sl.po: Likewise. * po/sr.po: Likewise. * po/sv.po: Likewise. * po/tr.po: Likewise. * po/uk.po: Likewise. * po/vi.po: Likewise. * po/zh_CN.po: Likewise. * po/zh_TW.po: Likewise. 2010-05-05 Giuseppe Scrivano * src/http.c (gethttp): Give a nicer message on a malformed status line. 2010-05-04 Giuseppe Scrivano * src/http.c (gethttp): Check `resp_status' return code and handle errors. 2010-05-04 Giuseppe Scrivano * AUTHORS: Added myself. 2010-05-03 Giuseppe Scrivano * configure.ac: Fix a sanity check by the AC_CONFIG_SRCDIR macro. 2010-05-01 Giuseppe Scrivano * src/http.c (request_send): Specify 1.1 as HTTP version for requests. (skip_short_body): Accept new parameter `chunked'. New variable `remaining_chunk_size'. Handle the chunked transfer encoding. (gethttp): New variable `chunked_transfer_encoding`. Set `keepalive' by default to true. Check if the server is using the chunked transfer encoding. * src/retr.h: Define `rb_chunked_transfer_encoding'. * src/retr.c (fd_read_body): New variable `chunked'. New variable `remaining_chunk_size'. Handle the chunked transfer encoding. 2010-05-01 Giuseppe Scrivano * NEWS: Mention support for HTTP/1.1. 2010-03-04 Steven Schubiger * src/ftp.c (ftp_loop_internal): Omit input file from being deleted after retrieval. * src/retr.c (input_file_url): New function. * src/retr.h: Add declaration for input_file_url. 2010-03-02 Steven Schubiger * src/retr.c (retrieve_from_file): Improve checking for a URL by invoking url_valid_scheme instead of url_has_scheme. * src/url.c (url_valid_scheme): New function. * src/url.h: Add declaration for url_valid_scheme. 2010-03-02 Steven Schubiger * src/retr.c (retrieve_from_file): Free memory of input file. 2010-03-01 Steven Schubiger * tests/Test-i-ftp.px: Test --input-file in conjunction with FTP. * tests/run-px, Makefile.am (EXTRA_DIST): Added Test-i-ftp.px. 2010-03-01 Steven Schubiger * src/retr.c (retrieve_url): Retrieve the local filename from ftp_loop. (retrieve_from_file): Return if there's no input file. * src/ftp.c (ftp_loop_internal): Duplicate the local filename into retrieve_url's scope when a valid reference is being passed. (ftp_loop): Call ftp_loop_internal here with passing a reference to the local filename, elsewhere with NULL. * src/ftp.h: Adjust declaration of ftp_loop. 2010-02-26 Steven Schubiger * tests/Test-i-http.px: Test --input-file in conjunction with HTTP. * tests/run-px, Makefile.am (EXTRA_DIST): Added Test-i-http.px. 2010-02-25 Steven Schubiger * tests/FTPServer.pm (FTPServer::new): Substitute port placeholders in content of files to be retrieved via FTP. 2010-01-27 Paul Townsend (tiny change) * src/retr.c (fd_read_body): Be sure to measure timer when time has elapsed, too, not just when we've made progress. 2010-01-13 Micah Cowan * src/openssl.c: Fixed some mixed declarations-and-code. 2010-01-09 Micah Cowan * src/init.c, main.c, http.c, ftp.c, options.h: Renamed --no-match-server-timestamps to --no-use-server-timestamps, and add it to print_help. 2010-01-09 Micah Cowan * doc/wget.texi (Download Options): Documented --no-use-server-timestamps. 2010-01-09 Jeremy Olexa (tiny change) * src/init.c: Deal with systems which provide PATH_MAX in sys/param.h rather than limits.h. 2010-01-09 David Holman (tiny change) * src/init.c, main.c, http.c, ftp.c, options.h: Added support for --no-match-server-timestamps. 2009-12-03 Peter Rosin * src/snprintf.c (dopr): Output %p as unsigned. 2009-10-24 Petr Pisar * src/openssl.c: Implement support for (multiple) subjectAltNames in X509 certificates, not just the commonName. 2009-10-14 Steven Schubiger * tests/Test-E-k-K.px, Test-cookies-401.px, Test-ftp-bad-list.px, Test-iri-list.px, Test-iri.px: Removed -d from invocation. Patch by Mike Frysinger. 2009-10-09 Steven Schweda * src/utils.c: Added characters " : \ | to the list of normal caret-escaped (ODS5) characters in the char_prop[] table. 2009-10-09 Steven Schweda * New VMS MMS/MMK builders, to accommodate the new source tree structure: lib/DESCRIP_DEPS.MMS Dependencies (lib) lib/DESCRIP_MODS.MMS Modules (lib) lib/DESCRIP_SRC.MMS Main (lib) md5/DESCRIP_DEPS.MMS Dependencies (md5) md5/DESCRIP_MODS.MMS Modules (md5) md5/DESCRIP_SRC.MMS Main (md5) src/DESCRIP_DEPS.MMS Dependencies (src) src/DESCRIP_MODS.MMS Modules (src) src/DESCRIP_SRC.MMS Main (src) vms/DESCRIP.MMS Main (global) vms/DESCRIP_MKDEPS.MMS Dependency generator vms/DESCRIP_SRC.MMS Main (main) vms/DESCRIP_SRC_CMN.MMS Main (common) vms/DESCRIP_SRC_FLAGS.MMS Compiler and linker flags vms/COLLECT_DEPS.COM Dependency processor vms/CONFIG_EXTRACT.COM Extract AC_INIT from configure.ac vms/WGET_MULTINET.OPT Link options for (old) MultiNet vms/WGET_SSL_HP.OPT Link options for HP SSL vms/WGET_SSL_O.OPT Link options for OpenSSL * Other VMS-specific files: vms/alloca.h Dummy alloca.h. vms/config.h_vms Manually crafted config.h vms/stdint.h Dummy stdint.h vms/vms.h Declarations, prototypes for vms.c vms/vms_ip.h Helper for netdb.h vms/VMS_NOTES.TXT Instructions, notes vms/WGET.HLP Basic VMS HELP 2009-10-09 Micah Cowan * src/main.c: Fix declaration of compiled_features. * src/build_info.c.in: Adapt to new input format. Added a check for large-file support. Replaced the "openssl" and "gnutls" advertisements with a single "ssl/foo" advertisement. 2009-10-09 Micah Cowan * build_aux/build_info.pl: Reworked the input format. Eliminated support, and need, for arbitrary #if blocks. Introduced "choices", and explicitly open the .c file rather than print to STDOUT, so we avoid creating the file if we find problems with the input. Options are advertised in alphabetical order. 2009-09-30 Micah Cowan * src/sysdep.h: Unconditionally include stdbool.h (gnulib has it for systems that don't supply it.) * src/vms.c: Added functions vms_basename(), used to extract the bare executable name from argv[0], and vms_getpass(), a VMS-specific replacement for GNU getpass(). vms.c: Added global string constants: compilation_string (NULL), link_string (NULL), and version_string (real). 2009-09-27 Micah Cowan * tests/Test-idn-cmd.px, Test-idn-headers.px, Test-idn-meta.px, Test-idn-robots.px, Test-proxy-auth-basic.px: Removed --debug from invocation (in case it wasn't built with --debug support). 2009-09-24 Steven Schweda * src/main.c (print_version): Remove VMS-conditional build info string; the new VMS builders use OS_TYPE. * src/ftp.c (getftp): Fix accidental use of target -> targ. 2009-09-24 Micah Cowan * vms/vms.c: Moved to src/src.c. 2009-09-24 Micah Cowan * tests/Test-ftp-iri-disabled.px: Fix name "Test-ftp-iri" -> "test-ftp-iri-disabled" * tests/Test-ftp-iri-fallback.px: Fix name "Test-ftp-iri" -> "test-ftp-iri-fallback" 2009-09-24 Micah Cowan * src/vms.c: Moved from vms/vms.c. * src/sysdep.h: Use proper prototypes for snprintf, vsnprintf (thanks to Steven Schweda). 2009-09-24 Micah Cowan * src/host.c (host_errstr): host_errstr should return const char *. 2009-09-22 Micah Cowan * src/Makefile.am (version.c): Explicitly tell Mercurial where the top-source repository should be, so it doesn't accidentally use the repository for a containing directory (for instance, if the user's home directory is managed by a Mercurial repo). Also ensures we find the repository, even if the build directory is outside the source directory. * src/wget.h: define WINDOWS if _WIN32 or __WIN32__ is defined, but not __CYGWIN__. * src/mswindows.c (xsleep): Check for availability of the sleep function, in addition to the usleep function. (get_winsock_error, windows_strerror): Removed (gnulib already supplies this functionality). * src/mswindows.h [NEED_GAI_STRERROR]: define gai_strerror to (gnulib's) strerror, rather than windows_strerror. Removed error macro definitions provided by gnulib. (windows_strerror): Removed (gnulib already supplies this functionality). * src/host.c: Don't declare h_errno when building on Windows. * src/Makefile.am (LIBS): Added @W32LIBS@. (EXTRA_wget_SOURCES): Removed (it's in LIBOBJ now). (version.c): Removed dependency on $(LDADD), since it may include dependencies that are not part of the Wget sources (-lwsock32, for instance). * src/openssl.c (ssl_check_certificate): Avoid reusing the same buffer space for successive quoted arguments. Thanks to Steven Schweda for pointing out the problem. 2009-09-22 Micah Cowan * configure.ac: Added "sleep" and "symlink" to AC_CHECK_FUNCS, removing the hard-coded definition of HAVE_SYMLINK. When running on MinGW, compile mswindows.c, and link against libwsock32. 2009-09-22 Arvind Jamuna Dixit * src/http.c (extract_param, parse_content_disposition): Support RFC 2231 while parsing Content-Disposition header 2009-09-21 Micah Cowan * vms/VMS-WGET.COM: "the the" -> "the". * po/POTFILES.in: Removed some files that are not using gettext. * po/*.po: Updated from translationproject.org. 2009-09-21 Micah Cowan * src/progress.c (update_speed_ring): "the the" -> "the". * src/css-url.c, iri.c, mswindows.c: Removed assert.h inclusion (not using it). 2009-09-20 Micah Cowan * INSTALL: Various minor adjustments to bring it up to date. 2009-09-11 Steven Schweda * src/utils.c, utils.h (fopen_excl): Make second argument an int, rather than a bool (so it can handle the appropriate VMS version of the flag). * src/main.c (print_version): Don't print LOCALEDIR unless NLS is enabled. * src/http.c (gethttp): Pass FOPEN_BIN_FLAG, instead of true. * src/ftp.c (ftp_retrieve_glob): Cast strcmp to assign to cmp, for a silly HP build environment. 2009-09-09 Micah Cowan * configure.ac: Add bz2 and lzma dists. 2009-09-08 Steven Schubiger * src/main.c, init.c: Mark the --preserve-permissions and --html-extension option as deprecated. 2009-09-08 Micah Cowan * po/*.po: Updated from translationproject.org. 2009-09-07 Micah Cowan * tests/run-px: Exit with a failure if there were any tests with "unknown" exit statuses. * tests/Test-auth-with-content-disposition.px: New. Test Content-Disposition support when HTTP authentication is required. * tests/run-px, Makefile.am (EXTRA_DIST): Added Test-auth-with-content-disposition.px. * tests/FTPServer.pm (FTPServer::run): Pass "server behavior" information to newly-constructed FTPPaths object. (FTPPaths::initialize): Accept "server behavior" hash. (FTPPaths::_format_for_list): If server behavior has "bad_list" set, then always report 0 for the size. * tests/Test-ftp-bad-list.px: Added. Attempts to reproduce bug 22403... but doesn't. * tests/run-px, Makefile.am (EXTRA_DIST): Added Test-ftp-bad-list.px. 2009-09-07 Micah Cowan * Makefile.am (distuninstallcheck_listfiles): Don't complain if /usr/share/info/dir and /etc/wgetrc are left behind after an uninstall. * po/Rules-quot (mostlyclean-quot): Add en_US.po for remvoal by mostlyclean. (en_US.po-update): Behave properly for VPATH builds. 2009-09-06 Micah Cowan * tests/WgetTest.pm.in (_setup): Don't expect error codes from _setup_server; none are returned. (quotechar, _show_diff): Added facilities for expounding on where output didn't match expectations. (_verify_download): Use _show_diff. * tests/FTPTest.pm (_setup_server): Pass value of server_behavior to FTPServer initialization. * tests/Test-ftp-pasv-fail.px: Added. * tests/run-px, Makefile.am (EXTRA_DIST): Added Test-ftp-pasv-fail.px. * tests/WgetTest.pm.in: Added "server_behavior" to the set of accepted initialization values. * tests/FTPServer.pm (__open_data_connection): Add "server_behavior" to the set of accepted initialization values. (run): Honor the 'fail_on_pasv' server behavior setting, to trigger the Wget getftp glitch. 2009-09-06 Micah Cowan * src/ftp.c (getftp, ftp_loop_internal): Separate "len" input/output parameter (with different meanings for input and output), into two separate parameters, one input (passed_expected_bytes) and one output (qtyread). Fixes bug #26870. 2009-09-06 Gisle Vanem * msdos/Makefile.WC: Added compilation of new file msdos.c. Simplified; no need to have explicit rules for files in ./lib and ./md5. Just use the suffix search path mechanism in wmake. 2009-09-06 Gisle Vanem * msdos/Makefile.DJ: Added compilation of new file msdos.c. 2009-09-05 Steven Schubiger * tests/run-px: Introduce two new diagnostics: Skip and Unknown. * tests/WgetFeature.pm (import): Parse the version output of Wget and assert the availability of a feature. * tests/WgetFeature.cfg: Messages to be printed in absence of a required feature. * tests/Test-ftp-iri-disabled.px, Test-ftp-iri-fallback.px, Test-ftp-iri-recursive.px, Test-ftp-iri.px, Test-idn-cmd.px, Test-idn-headers.px, Test-idn-meta.px, Test-idn-robots.px, Test-iri-forced-remote.px, Test-iri-list.px, Test-iri-percent.px, Test-iri.px: Use WgetFeature.pm to check for the presence of the IDN/IRI feature. * tests/Test-proxied-https-auth.px: Replace grepping for a feature with loading WgetFeature.pm at compile-time. * tests/Makefile.am: Add WgetFeature.pm and WgetFeature.cfg to EXTRA_DIST. 2009-09-05 Steven Schubiger * src/retr.h: Declare set_local_file() to avoid build warnings. 2009-09-05 Micah Cowan * tests/Test-ftp-recursive.px: Added. * tests/run-px, Makefile.am (EXTRA_DIST): Added Test-ftp-recursive.px. * tests/FTPTest.pm (_setup_server): Don't construct the "input" directory's contents, just pass the URLs structure to FTPServer->new. * tests/FTPServer.pm: Rewrote portions, so that the server now uses the information from the %urls hash directly, rather than reading from real files. Added an FTPPaths package to the file. 2009-09-05 Micah Cowan * configure.ac: If we can't find idna.h, check to see if it's because we need to add /usr/include/idn to the inclusion path (for OpenSolaris). 2009-09-05 Gisle Vanem * src/connect.c, init.c, main.c, openssl.c, options.h: Replace "ifdef MSDOS" with "ifdef USE_WATT32" since DOS-targets in fact use the Watt-32 tcp/ip stack. 2009-09-05 Gisle Vanem * msdos/config.h: Added 'HAVE_ALLOCA_H' for Watcom 1.5+. Added 'USE_WATT32' since all DOS-targets use the Watt-32 tcp/ip stack. Added meaningless dummy LOCALEDIR. * msdos/Makefile.WC: A much needed update. Added rules for many files in ./lib, css.c and version.c. * msdos/Makefile.DJ: A much needed update. Added rules for css.c and version.c. 2009-09-04 Steven Schubiger * configure.ac: Place gl_EARLY and md5_EARLY before the gettext macros in order to silence autoconf warnings. 2009-09-04 Micah Cowan * tests/WgetTest.pm.in (run): Error-checking improvements. 2009-09-04 Micah Cowan * src/Makefile.am: Move build_info.c to wget_SOURCES from nodist_wget_SOURCES, reduce dependencies, and invoke build_info.pl in its new home, $(top_srcdir)/build-aux. 2009-09-04 Micah Cowan * doc/wget.texi (Time-Stamping): "older" -> "not newer". * doc/Makefile.am (install.man, install.wgetrc): Use $(mkinstalldirs), not $(top_srcdir)/mkinstalldirs. 2009-09-04 Micah Cowan * Makefile.am (EXTRA_DIST): build_info.pl -> build-aux/build_info.pl * build-aux/build_info.pl: Moved from top directory. * md5/*: Updated md5 from gnulib. * configure.ac: Configured build-aux/ as auxiliarry directory. * build-aux/compile, build-aux/config.guess, build-aux/config.rpath, build-aux/config.sub, build-aux/depcomp, build-aux/install-sh, build-aux/link-warning.h, build-aux/mdate-sh, build-aux/missing, build-aux/mkinstalldirs, build-aux/texinfo.tex, build-aux/useless-if-before-free, build-aux/vc-list-files, build-aux/ylwrap: Moved from top directory. * build-aux/announce-gen: Imported from gnulib. * build-aux/update-copyright: Imported from gnulib. * build-aux/gnupload: Imported from gnulib. * lib/Makefile.am, m4/gnulib-cache.m4, m4/gnulib-comp.m4: Adjusted for announce-gen, update-copyright, and gnupload. 2009-09-03 gettextize * m4/gettext.m4: Upgrade to gettext-0.17. * m4/iconv.m4: Upgrade to gettext-0.17. * m4/lib-link.m4: Upgrade to gettext-0.17. * m4/po.m4: Upgrade to gettext-0.17. * po/Makefile.in.in: Upgrade to gettext-0.17. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. 2009-09-03 Micah Cowan * src/ftp-ls.c (ftp_parse_vms_ls): Replace use of localtime_r with localtime, as not all platforms have localtime_r. * src/Makefile.am (wget_SOURCES): Rearranged some of the file order, so .c files and .h files are apart. Added gettext.h, so that it shows up in the dist. 2009-09-03 Micah Cowan * NEWS: Give credit to jff for SSL security fix, call attention to IRI support's dependence on libidn and libiconv, and note that --html-extension is still accepted, though deprecated. * lib/*, m4/*: Updated gnulib. * lib/getpagesize.c, lib/memchr.c, lib/memchr.valgrind, lib/stddef.in.h, lib/str-two-way.h, lib/strcasecmp.c, lib/strcasestr.c, lib/strings.in.h, lib/strncasecmp.c, m4/getpagesize.m4, m4/memchr.m4, m4/mmap-anon.m4, m4/stddef_h.m3, m4/strcase.m4, m4/strcasestr.m4, m4/strings_h.m4, m4/wchar_t.m4: Added, via gnulib --import strcasestr. * configure.ac: Move AM_GNU_GETTEXT below AC_AIX, to shut up autoconf warnings. 2009-09-02 Micah Cowan * tests/Makefile.am (unit-tests): explicit dependency is unnecessary (and harmful, as it overrides the automatic one). 2009-09-02 Micah Cowan * src/gettext.h: Refreshed from gettext 0.17. * src/test.c: Added definition of program_name variable, required by lib/error.c (libgnu.a). Doesn't cause problems until you try to build on a non-GNU system... * src/build_info.c.in: Removed useless "+gettext" feature ad. 2009-09-02 Micah Cowan * po/Rules-quot (en_US.po-update): Remove use of GNU make's non-portable $^ variable. 2009-09-01 Steven Schubiger * tests/Makefile.am: Add Test-cookies.px, Test-cookies-401.px and Test-restrict-ascii.px to EXTRA_DIST. 2009-09-01 Micah Cowan * tests/Makefile.am (../src/libunittest.a): Make it a phony target, so we always make sure to get up-to-date unit-test runs. 2009-08-31 Steven Schubiger * tests/Makefile.am: Add Test-k.px to EXTRA_DIST. 2009-08-29 Steven Schubiger * tests/run-px: Add Test-k.px to the list. * tests/Test-k.px: Test escaping of semicolons in local file strings. 2009-08-29 Steven Schubiger * src/convert.c (local_quote_string): Percent-encode semicolons in local file strings. 2009-08-27 Micah Cowan * tests/run-px: Added Test-cookies.px, Test-cookies-401.px * tests/Test-cookies.px: Basic testing to make sure Wget doesn't send cookies; no path/domain checking. * tests/Test-cookies.px: Test to make sure Wget heeds cookies when they are sent with a 401 response (#26775). * tests/HTTPServer.pm (send_response): Don't try to substitute port in response body, if there isn't one. (verify_request_headers): Avoid uninitialized warning when an expected header isn't provided by Wget. 2009-08-27 Micah Cowan * tests/WgetTest.pm.in (run): Shift the errcode right by 8 binary places. * tests/Test--spider-fail.px, Test--spider-r--no-content-disposition.px, Test--spider-r--no-content-disposition-trivial.px, Test--spider-r-HTTP-Content-Disposition.px, Test--spider-r.px, Test-O-nonexisting.px, Test-cookies-401.px, Test-nonexisting-quiet.px: Adjusted "expected error code"; Wget's exit codes have changed. 2009-08-27 Micah Cowan * src/wget.h (uerr_t): added new VERIFCERTERR code for SSL certificate problems. Marked exit codes that are defined but never used (at least, the ones I could find). * src/retr.c, retr.h (retrieve_url): Added a new boolean argument to determine whether an exit status should be recorded. (retrieve_from_file): Adjust to new retrieve_url signature. * src/res.c (res_retrieve_file): Don't have retrieve_url record an exit status for robots.txt. * src/recur.c (retrieve_tree): Adjust to new retrieve_url signature. * src/main.c (main): Use the exit status stored by retrieve_url. * src/http.c (gethttp): Distinguish certificate verification problems from SSL connection issues. (http_loop): Handle newly-created VERIFCERTERR error code. * src/exits.c, exits.h: Newly added. * src/Makefile.am (wget_SOURCES): Add exits.c and exits.h. 2009-08-27 Micah Cowan * src/http.c (gethttp): Make sure Wget heeds cookies when they are sent with a 401 response; or any other sort of response for that matter (#26775). 2009-08-27 Micah Cowan * doc/texi2pod.pl: Handle @asis in table-element formatting. * doc/wget.texi (Exit Status): Document new exit codes. 2009-08-27 Micah Cowan * NEWS: Mention the changes to exit codes. 2009-08-27 Micah Cowan * NEWS: Add mention of the NUL characters SSL security fix. 2009-08-19 Micah Cowan * src/openssl.c (ssl_check_certificate): Only warn about an attack if the hostname would otherwise have matched. Also some formatting cleanup. 2009-08-19 Joao Ferreira * src/openssl.c (ssl_check_certificate): Detect embedded NUL characters in the SSL certificate common name. 2009-08-17 Tony Lewis * src/http.c (gethttp): Ensure that we parse Content-Length before we attempt to refer to its value. Without this fix, NTLM support was completely buggered. #27192 2009-08-09 Michael Baeuerle * src/ftp.c: #include for strcasecmp. 2009-08-02 Micah Cowan * doc/wget.texi (Option Syntax): "This is a complete equivalent of" -> "This is completely equivalent to". Thanks to Reuben Thomas for catching this. 2009-07-28 Micah Cowan * src/main.c (option_data): Rename --html-extension to --adjust-extension. (print_help): Ditto. * src/options.h (struct option): Rename html_extension to adjust_extension. * src/http.c (gethttp): Ditto. * src/convert.c (local_quote_string): Ditto. * src/init.c (commands): Add "adjustextension", and reflect rename change for opt.adjust_extension, for both "adjustextension" and "htmlextension". 2009-07-28 Micah Cowan * doc/wget.texi (Download Options): Document "lowercase", "uppercase", and the new "ascii" specifier for --restrict-file-names. (HTTP Options): Rename --html-extension to --adjust-extension. (Wgetrc Commands): Rename html_extension to adjust_extension. 2009-07-28 Micah Cowan * NEWS: Mention some more previously undocumented items, the new "ascii" specifer for --restrict-file-names, and the renaming of --html-extension to --adjust-extension. 2009-07-27 Petr Pisar * src/main.c (print_help): Fixed a couple typos. 2009-07-27 Petr Pisar * po/Makevars (MSGID_BUGS_ADDRESS): Fixed. 2009-07-27 Micah Cowan * tests/Test-restrict-ascii.px: New. * tests/run-px: Added Test-restrict-ascii.px. 2009-07-27 Micah Cowan * src/options.h (struct options): Added restrict_files_nonascii boolean field. * src/url.c (FILE_CHAR_TEST): Add check for chars outside the ASCII range. * src/init.c (defaults): Add restrict_files_nonascii to initialization. (cmd_spec_restrict_file_names): Allow parsing of "ascii" keyword. 2009-07-27 Marcel Telka * src/iri.c (do_conversion): Typo: invalide -> invalid 2009-07-26 Micah Cowan * tests/Test-ftp-iri.px, Test-ftp-iri-fallback.px, Test-ftp-iri-recursive.px, Test-ftp-iri-disabled.px, Test-idn-cmd.px, Test-idn-robots.px: Adjust wget invocations, replacing --locale with --local-encoding. 2009-07-26 Micah Cowan * src/main.c (option_data): Rename --locale option to --local-encoding (print_help): Document --no-iri, --local-encoding, and --remote-encoding, within usage message. Remove defunct --preserve-permissions. 2009-07-26 Micah Cowan * doc/wget.texi (Download Options): Change --iri item to --no-iri; rename --locale to --local-encoding. (Wgetrc Commands): Document iri, local_encoding, remote_encoding, ask_password, auth_no_challenge, and keep_session_cookies. 2009-07-23 Micah Cowan * src/progress.c (get_eta): Change "Translation note" in comment to "TRANSLATORS", so it actually appears in wget.pot. 2009-07-10 Micah Cowan * util/paramcheck.pl (find_documentation): Added. (emit_undocumented_opts): Check for documentation in both TexInfo and --help string. 2009-07-07 Steven Schubiger * tests/Makefile.am: Add IDN/IRI test files and Test-meta-robots.px to EXTRA_DIST. 2009-07-06 Micah Cowan * src/main.c (print_help): Improve documentation of --base. 2009-07-06 Micah Cowan * doc/wget.texi (Logging and Input File Options): Alter description of --input-file, implying that --force-html isn't necessary when the input is in HTML file. Improve accuracy of --base description. (Wgetrc Commands): Improve accuracy of "base" description. (HTTP Options): Clarify operation of --post-file. 2009-07-05 Petr Pisar * src/main.c (print_version): Mark initial line for translation, along with (env), (user), and (system). Change copyright year to 2009. * src/http.c (http_loop): Space after colon. * src/gnutls.c (ssl_check_certificate): Use quote function, rather than explicit quotes. 2009-07-05 Micah Cowan * tests/Test-meta-robots.px: Added. * tests/run-px: Add Test-meta-robots.px to the list. 2009-07-05 Micah Cowan * src/html-url.c (tag_handle_meta): Handle meta name="robots" properly: deal with whitespace, commas after... * src/netrc.c (parse_netrc): Rename local-scope variable "quote" to "qmark", to avoid conflict with the function name. 2009-07-05 Micah Cowan * src/Makefile.am (version.c): Add dependency on configure.ac. * src/iri.c: Mark some strings for translation. 2009-07-05 Micah Cowan * po/Rules-quot: Added targets to build en@{quot,boldquot}.po * po/POTFILES.in: Added src/gnutls.c, src/iri.c. * po/*.po: Updated translations from TP. New translation: Lithuanian. * lib/*, md5/*: Updated gnulib. 2009-07-04 Steven Schweda * vms/COLLECT_DEPS.COM, vms/config.h_vms, vms/decc_ver.c, vms/DESCRIP_CONFIG.MMS, vms/DESCRIP_DEPS.MMS, vms/DESCRIP_MKDEPS.MMS, vms/DESCRIP.MMS, vms/DESCRIP_SRC.MMS, vms/vms.c, vms/vms.h, vms/vms_ip.h, vms/vms_name_fix.sh, vms/VMS_NOTES.TXT, vms/VMS-WGET.COM, vms/WGET.HLP, vms/WGET_MULTINET.OPT, vms/WGET.OPT, vms/WGET_SSL_HP.OPT, vms/WGET_SSL.OPT: Added. 2009-07-04 Steven Schweda * src/wget.h (ORIG_SFX): Macro added, to supply an alternative "_orig" suffix on VMS. * src/connect.c, host.c, host.h, main.c: Include "vms_ip.h" rather than on VMS systems. * src/convert.c (write_backup_file): Use "_orig" rather than ".orig" on VMS. * src/ftp-basic.c (ftp_list): Don't use LIST -a on VMS servers. * src/ftp.c [__VMS]: Include "vms.h" * src/ftp.c (getftp): Disable some unhelpful "for VMS" code. Pass the OS type to ftp_list. (getftp) [__VMS]: Alter the filename as required, and invoke fopen with extra optional arguments. (ftp_retrieve_list): Set permissions before setting the times. * src/ftp-ls.c [__VMS]: Various improvements. * src/http.c (SET_USER_AGENT): Added. Include operating-system info in the User-Agent header. (gethttp): Use ORIG_SFX macro. (gethttp) [__VMS]: invoke fopen with extra arguments to communicate file type. (http_loop): Add cast to time_t. * src/init.c (wgetrc_user_file_name) [__VMS]: Adjustments for where to find the .wgetrc. * src/log.c: Adjustments to improve handling of log files on VMS. * src/main.c [__VMS]: Added --ftp-stmlf option (and associated documentation). Adjust description of backup-suffixes, as they now differ for VMS. (print_help, print_version): Include OS type in version information. (main) [__VMS]: Invoke fopen with extra options, to specify file type information. * src/netrc.c (search_netrc) [__VMS]: Fix .netrc-finding. * src/openssl.c, openssl.h (ssl_connect_wget): Renamed from ssl_connect. * src/options.h (struct options): Add ftp_stmlf field. * src/retr.c (write_data) [__VMS]: Avoid fflush. * src/url.c [__VMS]: Include vms.h. * src/url.c (url_file_name) [__VMS]: Handle naming as required for VMS. * src/utils.c [__VMS]: Include vms.h. Various added facilities for VMS needs. 2009-07-04 Steven Schubiger * src/url.c (url_parse): If an URL scheme is invalid, distinguish between an unsupported or missing scheme. * src/url.c: Add a "missing scheme" entry to parse_errors. 2009-07-04 Micah Cowan * src/main.c (print_version): Allow localization of the version-info labels, eschew attempts at alignment (which is complicated when handling translated strings), and avoid using printf() with variable-stored format strings that lack conversion specifications. (format_and_print_line): For similar reasons, don't calculate line-continuation tabulation based on the number of bytes in a string. 2009-07-03 Micah Cowan * tests/Test-ftp-iri-disabled.px, Test-iri-disabled.px: --iri=no --> --no-iri 2009-07-03 Micah Cowan * src/iri.h (iri_dup): Provide macro definition for when IRIs are disabled. * src/Makefile.am (LIBS): Added @LIBICONV@. (wget_SOURCES): Added iri.h. (EXTRA_wget_SOURCES): Added iri.c, so it gets packaged even if IRI support was disabled. 2009-07-03 Micah Cowan * doc/wget.texi (Download Options): --iri=no --> --no-iri (Contributors): Add Saint Xavier. 2009-07-03 Micah Cowan * configure.ac: Ensure LIBICONV is empty if IRIs are disabled. * AUTHORS: Added Ted Mielczarek and Saint Xavier. * NEWS: Added items for IRI support, new --version information. 2009-07-02 Micah Cowan * src/recur.c (url_enqueue): Quote enqueue/dequeue debug messages. * src/html-url.c (append_url): Change "merge()" quoting style from locale_quoting_style to escape_quoting_style. 2009-07-01 Steven Schubiger * src/Makefile.am: Add a rule to generate build_info.c and list the build_info.c.in file in EXTRA_DIST. Adjust elsewhere where needed. * src/build_info.c: Remove this static source file. * src/build_info.c.in: Data for generation of build_info.c. 2009-07-01 Steven Schubiger * Makefile.am: Add build_info.pl to EXTRA_DIST. * build_info.pl: Generate build_info.c from data. 2009-07-01 Micah Cowan * tests/HTTPServer.pm (send_response): Invocation of verify_request_headers, to support testing of Wget-sent header values. (verify_request_headers): Added. * tests/Test-iri.px: Added verification checks for Referer values. 2009-07-01 Micah Cowan * src/retr.c (retrieve_url): Use the existing "redirect" label, instead of superfluous "second_try". Removed no-longer-accurate debug statement. Use the "newloc" parameter to store the fallback URL, when IRI version was rejected. * src/recur.c (retrieve_tree): Always use the parsed URL for tracking the Referer, since that's the one we actually requested (if there's a difference in terms of percent-encodings and such). 2009-06-29 Micah Cowan * tests/WgetTest.pm.in (_cleanup): Allow cleanup of test directories to be skipped at user discretion. * tests/run-px, Test-iri-percent.px, Test-ftp-iri-recursive.px: Added test for percent-coded value preservation, FTP recursion when IRI support's on. 2009-06-29 Micah Cowan * src/html-url.c (append_url): Quote some more arguments that might contain characters that are inappropriate to display for the current locale. * src/retr.c (retrieve_from_file): Be sure to pass iri information when parsing an input-fle url, and be sure to hand a clean iri struct, off to retrieve_tree and retrieve_url. * src/iri.c, iri.h (iri_dup): Added. * src/retr.c (retrieve_url): Re-parse for IRI fallback. * src/main.c (main): Set up iri before the url_parse invocation (so we can use it). 2009-06-20 Micah Cowan * doc/wget.texi (Contributors): Added Jay Krell. 2009-06-20 Jay Krell * src/sysdep.h (_ALL_SOURCE): (small change) Define the _ALL_SOURCE macro on INTERIX systems. (I switched the location from ftp.c to sysdep.h --mjc) 2009-06-15 Micah Cowan * src/ftp.c (getftp): If we can't accept the connection, return CONERROR, not whatever the contents of err happens to be. Fixes bug #25015. * src/retr.c (fd_read_body): Make both args to progress_create consistent, resulting in an accurate progress display. Fixes bug #24948. 2009-06-14 Phil Pennock (tiny change) * src/host.h: Declare `is_valid_ip_address'. * src/host.c (is_valid_ip_address): New function. * src/http.c (gethttp): Specify the hostname to ssl_connect_wget. * src/gnutls.c (ssl_connect_wget): Specify the server name. * src/openssl.c (ssl_connect_wget): Likewise. * src/ssl.h: Change method signature for ssl_connect_wget. 2009-06-14 Micah Cowan * tests/Makefile.am (EXTRA_DIST): Include all the tests, run-px, and certs/, to make distcheck happy. 2009-06-14 Micah Cowan * src/Makefile.am (wget_SOURCES): css-tokens.h needs to ship with dist, too. 2009-06-14 Micah Cowan * po/Makefile.in.in (distclean): remove en_US.po, too. * Makefile.am: Include md5 as a subdir unconditionally. It may result in useless compilation, and additional risk of breaking a build of something that isn't actually needed, but otherwise it's too much of a hassle to manage a failure-free distcheck. 2009-06-14 Micah Cowan * doc/Makefile.am (wget.pod): $(srcdir)/version.texi -> version.texi 2009-06-13 Micah Cowan * src/init.c: Rename setval_internal_wrapper to setval_internal_tilde, ensure we don't "replace" the tilde unless it's actually present. Clean up some minor GNU style issues. 2009-06-13 Julien Pichon * src/init.c: Handle tilde-expansion in wgetrc commands, without resorting to setting/unsetting globals to change behavior in one call location. 2009-06-12 Micah Cowan * src/host.c: Include before . Not required by POSIX any more, but some older systems (such as FreeBSD 4.1) still need it, and it doesn't seem like it could hurt... * src/build_info.c (library): Handle "https" as a feature in its own right, apart from "gnutls" and "openssl". * src/host.c: Declare h_errno if no declaration is provided. Idea thanks to Maciej W. Rozycki. 2009-06-12 Micah Cowan * doc/wget.texi (Download Options): More accuracy on what happens when -nd is used with -r or -p. 2009-06-12 Micah Cowan * configure.ac: Check for h_errno declaration. Idea thanks to Maciej W. Rozycki. 2009-06-11 Xin Zou * src/http.c (gethttp): Fix some memory leaks. 2009-06-11 Micah Cowan * src/http.c (http_atotm): Handle potential for setlocale's return value to be static storage. Thanks to Benjamin Wolsey . * src/sysdep.h: Need NAMESPACE_TWEAKS on non-Linux glibc-based systems, too. Thanks to Robert Millan. 2009-06-11 Micah Cowan * doc/wget.texi (Contributors): Added Xin Zou, Benjamin Wolsley, and Robert Millan. 2009-06-11 Joao Ferreira * doc/wget.texi (Option Syntax): Fixed contradictory and confusing explanation of --folow-ftp and negation. 2009-06-11 Benjamin Wolsey * tests/Test-proxied-https-auth.px: Take an optional argument for the top source directory, so we can find the cert and key. * tests/run-px: Provide the top source directory as an argument, so scripts can find their way around. 2009-06-10 Micah Cowan * doc/sample.wgetrc: Add "https_proxy" to the proxy examples. Thanks to Martin Paul for the suggestion. 2009-05-28 Steven Schubiger * src/ftp.c (ftp_get_listing): Update the "listing file" string after calling ftp_loop_internal(). 2009-05-27 Steven Schubiger * src/ftp.c (ftp_get_listing): Duplicate the "listing file" string to avoid memory corruption when FOPEN_EXCL_ERR is encountered. 2009-05-17 Steven Schubiger * src/progress.c (eta_to_human_short): Fix the remaining hours to be displayed. Spotted by Tadeu Martins (#26411). 2009-04-24 Micah Cowan * src/hash.c: Change stdint.h inclusion to use HAVE_STDINT_H, not C99 check. * src/connect.c: stdint.h inclusion added. Thanks to Markus Duft for a similar patch. 2009-04-20 Micah Cowan * src/Makefile.am (version.c): Fix unportable use of "echo -n". 2009-04-13 Steven Schubiger * src/ftp.c (ftp_retrieve_list): Move the duplicated code that determines the local file to a function. * src/http.c (http_loop): Likewise. * src/retr.c (set_local_file): New function. 2009-04-11 Steven Schubiger * tests/run-px: Skip testing with real rc files by setting SYSTEM_WGETRC and WGETRC to /dev/null. 2009-04-11 Steven Schubiger * src/init.c (initialize): Run a custom SYSTEM_WGETRC when provided as an environment variable. 2009-03-03 Steven Schubiger * src/ftp.c, src/http.c, src/main.c, src/recur.h, tests/Makefile.am: Update the copyright years. 2009-02-27 Steven Schubiger * src/ftp.c (ftp_loop_internal): Don't claim for FTP retrievals when writing to standard output either that the document has been saved. Addresses bug #20520 again. 2009-02-27 Gisle Vanem * src/main.c (main): "freopen (NULL,.." causes an assertion in MSVC debug-mode. I.e. NULL isn't legal. But the "CONOUT$" device works fine. 2009-02-25 Benjamin Wolsey * tests/Makefile.am (run-px-tests): Ensure run-px is run from srcdir. * tests/run-px: Include modules from srcdir. 2009-02-21 Steven Schubiger * src/http.c (http_loop): When a document is written to standard output, don't claim it has been saved to a file. Addresses bug #20520. 2009-02-18 Steven Schubiger * src/recur.h: Remove the dangling declaration for recursive_cleanup(). 2009-02-01 Gerardo E. Gidoni * src/main.c, recur.c, recur.h, res.c, retr.c, retr.h: restructured code to avoid multiple 'url_parse' calls. 2009-01-23 Steven Schubiger * util/freeopts, util/rmold.pl, util/trunc.c: Remove unnecessary whitespace. 2008-12-04 Micah Cowan (not copyrightable) * tests/run-px, Test-idn-robots.px: Added test for robots-file downloads. * tests/Test-idn-cmd.px, Test-idn-meta.px, Test-idn-headers.px: Fix test names. 2008-11-27 Saint Xavier * src/http.c (gethttp): Move authentication code before filename allocation avoiding fallbacking on default filename because "Content-Disposition" header wasn't present before authentcation has been completed. Fixes bug #24862. 2008-11-26 Micah Cowan (not copyrightable) * tests/Test-ftp-iri-disabled.px, Test-ftp-iri-fallback.px, Test-ftp-iri.px, Test-idn-cmd.px, Test-idn-headers.px, Test-idn-meta.px, Test-iri-disabled.px, Test-iri-forced-remote.px, Test-iri-list.px, Test-iri.px: More module-scope warnings. 2008-11-25 Steven Schubiger * tests/WgetTest.pm.in: Remove the magic interpreter line; replace -w with lexical warnings. 2008-11-16 Steven Schubiger * src/main.c: Declare and initialize the numurls counter. * src/ftp.c, http.c: Make the counter visible here and use it. * src/options.h: Remove old declaration from options struct. 2008-11-15 Steven Schubiger * src/init.c (defaults): Set default waitretry value. 2008-11-15 Steven Schubiger * doc/sample.wgetrc: Comment the waitretry "default" value, because there is a global one now. * doc/wget.texi (Download Options): Mention the global default value. 2008-11-14 Steven Schubiger * src/main.c (format_and_print_line): Use a custom format string for printing leading spaces. 2008-11-13 Steven Schubiger * tests/FTPServer.pm, FTPTest.pm, HTTPServer.pm, HTTPTest.pm, WgetTest.pm.in: Clean up leftover whitespace. 2008-11-13 Micah Cowan * src/http.c (gethttp): Don't do anything when content-length >= our requested range. 2008-11-12 Steven Schubiger * tests/Test-auth-basic.px, Test-auth-no-challenge.px, Test-auth-no-challenge-url.px, Test-c-full.px, Test-c-partial.px, Test-c.px, Test-c-shorter.px, Test-E-k-K.px, Test-E-k.px, Test-ftp.px, Test-HTTP-Content-Disposition-1.px, Test-HTTP-Content-Disposition-2.px, Test-HTTP-Content-Disposition.px, Test-N-current.px, Test-N-HTTP-Content-Disposition.px, Test-N--no-content-disposition.px, Test-N--no-content-disposition-trivial.px, Test-N-no-info.px, Test--no-content-disposition.px, Test--no-content-disposition-trivial.px, Test-N-old.px, Test-nonexisting-quiet.px, Test-noop.px, Test-np.px, Test-N.px, Test-N-smaller.px, Test-O-HTTP-Content-Disposition.px, Test-O-nc.px, Test-O--no-content-disposition.px, Test-O--no-content-disposition-trivial.px, Test-O-nonexisting.px, Test-O.px, Test-proxy-auth-basic.px, Test-Restrict-Lowercase.px, Test-Restrict-Uppercase.px, Test--spider-fail.pxm, Test--spider.px, Test--spider-r-HTTP-Content-Disposition.px, Test--spider-r--no-content-disposition.px, Test--spider-r--no-content-disposition-trivial.px, Test--spider-r.px: Enforce lexically scoped warnings. * tests/Test-proxied-https-auth.px, run-px: Place use strict before use warnings. 2008-11-12 Steven Schubiger * tests/FTPServer.pm, FTPTest.pm, HTTPServer.pm, HTTPTest.pm: Remove the magic interpreter line, because it cannot be used fully. Substitute -w with use warnings. 2008-11-12 Steven Schubiger * src/main.c (print_version): Hand the relevant xstrdup/xfree calls back to format_and_print_line(). 2008-11-12 Micah Cowan * src/ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href. 2008-11-12 Alexander Belopolsky * src/url.c, url.h (url_escape_unsafe_and_reserved): Added. * src/ftp-ls.c (ftp_index): URL-escape, rather than HTML-escape, the filename appearing in the link. 2008-11-11 Steven Schubiger * src/main.c (format_and_print_line): Move both the memory allocating and freeing bits upwards to print_version(). 2008-11-11 Micah Cowan * tests/HTTPServer.pm (handle_auth): Allow testing of --auth-no-challenge. * tests/Test-auth-no-challenge.px, Test-auth-no-challenge-url.px: Added. * tests/run-px: Add Test-auth-no-challenge.px, Test-auth-no-challenge-url.px. 2008-11-10 Saint Xavier * src/http.c: Make --auth-no-challenge works with user:pass@ in URLs. 2008-11-10 Micah Cowan * doc/Makefile.am (EXTRA_DIST): Removed no-longer-present README.maint (shouldn't have been there in the first place). * doc/wget.texi (Mailing Lists): Added information aboug Gmane portal, added subsection headings. Update node pointers. 2008-11-10 Micah Cowan * MAILING-LIST: Mention Gmane, introduce subsections. 2008-11-07 Steven Schubiger * tests/run-px: Use some colors for the summary part of the test output to strengthen the distinction between a successful or failing run. 2008-11-06 Steven Schubiger * tests/run-px: When executing test scripts, invoke them with the current perl executable name as determined by env. 2008-11-06 Micah Cowan * tests/run-px: Use strict (thanks Steven Schubiger!). 2008-11-05 Micah Cowan * src/ftp.c (print_length): Should print humanized "size remaining" only when it's at least 1k. 2008-11-05 Micah Cowan * doc/wget.texi: Move --no-http-keep-alive from FTP Options to HTTP Options. (Mailing List): Mention moderation for unsubscribed posts, and archive location. 2008-11-05 Micah Cowan * MAILING-LIST: Mention moderation for unsubscribed posts, and archive location. 2008-11-04 Micah Cowan * doc/wget.texi, fdl.texi: Updated to FDL version 1.3. 2008-10-31 Micah Cowan * src/main.c (print_version): Add information about the mailing list. 2008-10-31 Micah Cowan * doc/wget.texi (Mailing List): Update info to reflect change to bug-wget@gnu.org. 2008-10-31 Micah Cowan * MAILING-LIST: Update information. * NEWS: Add mention of mailing list move. 2008-10-31 Alexander Drozdov * src/retr.c (fd_read_hunk): Make assert deal with maxsize == 0. * src/ftp-ls.c (clean_line): Prevent underflow on empty lines. 2008-10-26 Gisle Vanem * src/main.c (format_and_print_line): Put variables on top of blocks (not all compilers are C99). Add an extra '\n' if SYSTEM_WGETRC isn't defined and printed. 2008-09-30 Steven Schubiger * doc/wget.texi (Wgetrc Commands): Add default_page, save_headers, spider and user_agent to the list of recognized commands. 2008-09-10 Michael Kessler * doc/wget.texi (Robot Exclusion): Fixed typo "downloads" -> "download" 2008-09-09 Micah Cowan * tests/Test-idn-cmd.px: Added. * tests/run-px: Added Test-idn-cmd.px. 2008-09-09 Micah Cowan * src/init.c (home_dir): Save the calculated value for home, to avoid duplicated work on repeated calls. (wgetrc_file_name) [WINDOWS]: Define and initialize home var. * src/build_info.c, main.c: Remove unnecessary extern vars system_wgetrc and locale_dir. * src/main.c: Define program_name for lib/error.c. 2008-09-09 Gisle Vanem * src/url.c (url_error): Use aprintf, not asprintf. 2008-09-02 Gisle Vanem * src/mswindows.h: Must ensure is included before we redefine ?vsnprintf(). 2008-08-28 Micah Cowan * tests/HTTPServer.pm (run): Allow distinguishing between hostnames, when used as a proxy. * tests/Test-idn-headers.px, Test-idn-meta.px: Added. * tests/run-px: Added Test-idn-headers.px, Test-idn-meta.px. * tests/Test-proxy-auth-basic.px: Use the full URL, rather than just the path (made necessary by the accompanying change to HTTPServer.pm). 2008-08-14 Xavier Saint * tests/Test-iri-list.px : Fetch files from a remote list. 2008-08-08 Steven Schubiger * src/main.c, utils.h: Removed some dead conditional DEBUG_MALLOC code. 2008-08-03 Xavier Saint * tests/Test-iri.px : HTTP recursive fetch for testing IRI support and fallback. * tests/Test-iri-disabled.px : Same file structure as Test-iri.px but with IRI support disabled * tests/Test-iri-forced-remote.px : There's a difference between ISO-8859-1 and ISO-8859-15 for character 0xA4 (respectively currency sign and euro sign). So with a forced ISO-8859-1 remote encoding, wget should see 0xA4 as a currency sign and transcode it correctly in UTF-8 instead of using the ISO-8859-15 given by the server. * tests/Test-ftp-iri.px : Give a file to fetch via FTP in a specific locale and expect wget to fetch the file UTF-8 encoded. * tests/Test-ftp-iri-fallback.px : Same as above but wget should fallback on locale encoding to fetch the file. * tests/Test-ftp-iri.px : Same as Test-ftp-iri.px but with IRI support disabled. The UTF-8 encoded file should not be retrieved. 2008-08-03 Xavier Saint * doc/wget.texi : Add option descriptions for the three new options --iri, --locale and --remote-encoding related to IRI support. * doc/sample.wgetrc : Add commented lines for the three new command iri, locale and encoding related to IRI support. 2008-08-03 Steven Schubiger * src/url.c, url.h (url_error): Better messages for unsupported schemes, especially https. * src/html-url.c, recur.c, retr.c: Adjust to new url_error invocation, and free result. 2008-08-03 Micah Cowan * src/main.c (print_help): Added --default-page. 2008-08-03 Micah Cowan * src/build_info.c, css-url.c: #include wget.h, not config.h. 2008-08-03 Micah Cowan * doc/wget.texi: Don't set UPDATED; already set by version.texi. (HTTP Options): Add --default-page option. 2008-08-01 Joao Ferreira * src/init.c, main.c, options.h, url.c: Added option --default-page to support alternative default names for index.html 2008-08-01 Joao Ferreira * NEWS: Added option --default-page to support alternative default names for index.html 2008-07-17 Steven Schubiger * src/retr.c (retrieve_from_file): When given an URL as input file, use it as baseref if none was specified and treat the input file as HTML if its content type is text/html. * src/init.c (cleanup): Free the memory associated with the base option (when DEBUG_MALLOC is defined). 2008-07-17 Steven Schubiger * doc/wget.texi (Logging and Input File Options): Document for --input-file and according remote input file URLs, the implicit enforcement of treating a document as HTML and the possible baseref assumption. 2008-07-02 Xavier Saint * src/iri.c, iri.h : New function idn_decode() to decode ASCII encoded hostname to the locale. * src/host.c : Show hostname to be resolved both in locale and ASCII encoded. 2008-06-30 Micah Cowan * NEWS: Entries for 1.11.4. * AUTHORS: Added Steven Schubiger. 2008-06-29 Micah Cowan * doc/wget.texi : Added Joao Ferreira, Mike Frysinger, Alain, Guibert, Madhusudan Hosaagrahara, Jim Paris, Kenny Parnell, Benno Schulenberg, and Pranab Shenoy. Added Steven Schubiger to the "Special Thanks" section. 2008-06-28 Steven Schubiger * src/retr.c (retrieve_from_file): Allow for reading the links from an external file (HTTP/FTP). 2008-06-26 Xavier Saint * src/iri.c, iri.h : New functions locale_to_utf8() and idn_encode() adding basic capabilities of IRI/IDN. * src/url.c : Convert URLs from locale to UTF-8 allowing a basic support of IRI/IDN 2008-06-26 Xavier Saint * configure.ac : IRIs support required libiconv, check it. 2008-06-25 Steven Schubiger * src/ftp.c (getftp): When spidering a FTP URL, emit a diagnostic message if the remote file exists. 2008-06-24 Steven Schubiger * src/http.c (http_loop): Replace escnonprint() occurence with a quotearg_style() call. 2008-06-24 Micah Cowan * src/ftp-ls.c (ftp_index): Don't assume time_t* is compatible with long*. Fixes crash on Windows, and probably other systems. 2008-06-22 Steven Schubiger * src/http.c: Explicitly initialize and deallocate the message string used by the -nv --spider functionality. 2008-06-22 Steven Schubiger * src/http.c: Make -nv --spider include the file's name when it exists. 2008-06-22 Micah Cowan * tests/Test-proxied-https-auth.px: Shift exit code so it falls in the lower bits, and actually fails when it should. Use dynamic port, instead of static port. Only run the test if our Wget was built with HTTPS support. * tests/certs/server-cert.pem, certs/server-key.pem: Apparently failed to add these from 1.11.x repo. Fixed. 2008-06-22 Micah Cowan * src/Makefile.am (version.c): Fixed version string invocation so it once again can't result in unterminated strings, made all the string vars pointers-to-const, and moved line lengths below 80 (in Makefile.am, not in version.c). 2008-06-19 Xavier Saint * src/iri.c, iri.h : New function check_encoding_name() as a preliminary encoding name check. * src/main.c, iri.c : Make use of check_encoding_name(). 2008-06-19 Xavier Saint * src/iri.c, iri.h : Add a new function find_locale() to find out the local system encoding. * src/main.c : Make use of find_locale(). 2008-06-19 Xavier Saint * src/iri.c : Include missing stringprep.h file and add a cast. * src/init.c : set a default initial value for opt.enable_iri, opt.locale and opt.encoding_remote. 2008-06-19 Xavier Saint * src/html-url.c : Add "content-type" meta tag parsing for retrieving page encoding. * src/iri.h : Make no-op version of parse_charset() return NULL. 2008-06-16 Micah Cowan * src/http.c (http_loop): When hstat.len is higher than the successfully completed content's length, but it's because we _set_ it that way, don't abort. 2008-06-14 Xavier Saint * src/iri.c, iri.h : New files. * src/Makefile.am : Add files iri.h and conditional iri.c. * src/build_info.c : Add compiled feature "iri". * src/http.c : include iri.h and parse charset from Content-Type header. * src/init.c, main.c, options.h : if an options isn't supported at compiled time, don't get rid off it and show a dummy message instead if they are used. 2008-06-14 Xavier Saint * configure.ac: Add support for IRIs 2008-06-13 Micah Cowan * src/build_info.c: ENABLE_NTLM, not HAVE_NTLM; distinguish OpenSSL from "ssl". 2008-06-13 Micah Cowan * doc/wget.texi (Mailing List): The wget-notify mailing list no longer receives commit notifications from the source repository. (Internet Relay Chat): Activity isn't quite so low any more, remove notice to that effect. 2008-06-13 Madhusudan Hosaagrahara * src/Makefile.am, main.c, init.c, init.h, build_info.c: Adds build information to the --version command line option. Fixes bug #20636. 2008-06-12 Micah Cowan * tests/FTPServer.pm, FTPTest.pm, HTTPServer.pm, HTTPTest.pm, Test--no-content-disposition-trivial.px, Test--no-content-disposition.px, Test--spider-fail.px, Test--spider-r--no-content-disposition-trivial.px, Test--spider-r--no-content-disposition.px, Test--spider-r-HTTP-Content-Disposition.px, Test--spider-r.px, Test--spider.px, Test-E-k-K.px, Test-E-k.px, Test-HTTP-Content-Disposition-1.px, Test-HTTP-Content-Disposition-2.px, Test-HTTP-Content-Disposition.px, Test-N--no-content-disposition-trivial.px, Test-N--no-content-disposition.px, Test-N-HTTP-Content-Disposition.px, Test-N-current.px, Test-N-no-info.px, Test-N-old.px, Test-N-smaller.px, Test-N.px, Test-O--no-content-disposition-trivial.px, Test-O--no-content-disposition.px, Test-O-HTTP-Content-Disposition.px, Test-O-nonexisting.px, Test-O.px, Test-Restrict-Lowercase.px, Test-Restrict-Uppercase.px, Test-auth-basic.px, Test-c-full.px, Test-c-partial.px, Test-c.px, Test-ftp.px, Test-nonexisting-quiet.px, Test-noop.px, Test-np.px, Test-proxied-https-auth.px, Test-proxy-auth-basic.px, WgetTest.pm.in: Use whatever ports are available, rather than hard-coded ones. * tests/run-px: More summary info, explicit exit code. * tests/Makefile.am: Reinstate "run-px-tests" as a dependency for the "check" target. * tests/WgetTest.pm.in: Draw more attention to the fact that WgetTest.pm is a generated file. * tests/Test-proxied-https-auth.px: Better cleanup, so next test can open the port. 2008-06-01 Micah Cowan * src/main.c [WINDOWS]: Reopen stdout in binary mode, when -O - is given. 2008-05-31 Micah Cowan * src/html-url.c, http.c: Avoid casts in a couple spots. 2008-05-31 Micah Cowan * tests/Test-N-current.px: Ensure we catch failures. * tests/Test-N-old.px: Make it test only the timestamp, and not the content length in addition. * tests/Test-N-smaller.px, Test-N-no-info.px: added. * tests/Test-c-partial.px: Improve checking that the file was partially retrieved, rather than overwritten. * tests/run-px: Added Test-N-smaller.px, Test-N-no-info.px. * tests/HTTPServer.pm: Return 416 for fully-retrieved content, rather than 206 with a zero content-length. 2008-05-30 Henri Häkkinen * src/cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c, init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c, utils.c: Minor changes to silence warnings when using -Wall. 2008-05-29 Micah Cowan * po/*.po: Updated from TP (the 1.11.3 set). * po/POTFILES.in: Added some more files from lib/, remove src/xmalloc.c. * po/quot.sed, po/boldquot.sed: Automatic handling of quotearg's ` and '. 2008-05-26 Steven Schubiger * src/ftp.c (getftp): Replace last remaining invocation of escnonprint with gnulib quote. 2008-05-23 Micah Cowan * tests/Test--spider.px: Make test expect 0 return code. 2008-05-22 Micah Cowan * tests/Makefile.am (run-px-tests): Replaced ugly list of tests with run-px Perl script to manage running them. * tests/run-px: Added. * tests/FTPServer.pm (run): Avoid re-forking. Fixes bug #20458. 2008-05-19 Micah Cowan * src/main.c (main): Password prompt should be done only once (not once per argument), and should be done prior to the background fork. 2008-05-17 Steven Schubiger * doc/wget.texi (Download Options): Change documentation to reflect the new default value for --prefer-family. (Wgetrc Commands): Same, for prefer_family wgetrc command. 2008-05-17 Steven Schubiger * src/init.c (defaults): Set the preferred IP family to `none' by default. 2008-05-17 Micah Cowan * src/main.c (main): Handle Ctrl-D on command-line. 2008-05-17 Kenny Parnell (cmd_spec_prefer_family): Initialize prefer_family to prefer_none. 2008-05-15 Steven Schubiger * src/ftp.c (getftp): Verify that the file actually exists in FTP, by checking it against the listing. 2008-05-15 Micah Cowan * src/main.c (prompt_for_password): Use the quote module. 2008-05-15 Micah Cowan * NEWS: Entry for --ask-password. 2008-05-14 Micah Cowan * src/ftp.c (ftp_retrieve_list): Symlinks and other filenames should be fully quoted. 2008-05-14 Joao Ferreira * src/main.c, src/http.c, src/ftp.c: -nc is now working in conjunction with '-O file'. 2008-05-12 Micah Cowan * src/main.c (main): Downgrade "-N with -O" to a warning, and switch it off to avoid confusing messages. 2008-05-12 Micah Cowan * doc/wget.texi (Download Options): -N with -O downgraded to a warning. 2008-05-12 Micah Cowan * NEWS: Translations and -N/-O. 2008-04-30 Steven Schubiger * src/main.c (main): New code that handles prompting for passwords when specified explicitly via command-line option (using gnulib's getpass-gnu module). (main): Include the getpass header. * src/init.c: Add "ask-password" to the list of recognized commands. * src/options.h: Add an according boolean member to the options struct. * src/sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE out, because they're now defined independently by config.h. 2008-04-30 Steven Schubiger * lib/getdelim.c, lib/getline.c, lib/getpass.c, lib/getpass.h, lib/realloc.c, lib/stdio.h, lib/stdio.in.h, lib/stdlib.h, lib/stdlib.in.h: Imported from gnulib. * m4/eoverflow.m4, m4/extensions.m4, m4/getdelim.m4, m4/getline.m4, m4/getpass.m4, m4/malloc.m4, m4/realloc.m4, m4/stdio_h.m4, m4/stdlib_h.m4: Imported from gnulib. * md5/stdint.h: Imported from gnulib. * GNUmakefile: Updated from gnulib. * lib/Makefile.am, lib/getopt.c, lib/unistd.in.h: Updated from gnulib. * m4/gnulib-cache.m4, m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/include_next.m4, m4/unistd_h.m4: Updated from gnulib. * md5/Makefile.am, md5/m4/gnulib-cache.m4, md5/m4/gnulib-common.m4, md5/m4/gnulib-comp.m4, md5/m4/include_next.m4, md5/m4/md5.m4, md5/m4/stdint.m4, md5/md5.c, md5/md5.h, md5/stdint.in.h, md5/wchar.in.h: Updated from gnulib. 2008-04-30 Steven Schubiger * doc/wget.texi : Document the --ask-password option. 2008-04-30 Micah Cowan * src/progress.c (create_image): Fix glitch where too many spaces are printed on lines that don't display the ETA, in multibyte locales. 2008-04-30 Micah Cowan * NEWS: Added documentation for changes made in 1.11.2. 2008-04-27 Rabin Vincent * src/http.c (http_loop): Fix return for the case where we don't download a file because of -nc. 2008-04-27 Micah Cowan * src/url.c (path_simplify): Go back to allowing leading ".." in paths, but only for FTP URLs. (test_path_simplify): Add scheme-specificness to tests, adapt for mu_run_test. * src/test.c (all_tests): Add test_path_simplify. * src/main.c (main): Downgrade -r, -p with -O to a warning rather than an error; elaborate just a bit more for other -O combination cases. 2008-04-27 Micah Cowan * doc/wget.texi (Download Options) <-O>: Elaborate on why certain options make poor combinations with -O. 2008-04-26 Micah Cowan * tests/Makefile.am, Test-proxied-https-auth.px: Added a test for accessing password-protected HTTPS URLs through a proxy (via CONNECT). 2008-04-26 Micah Cowan * src/http.c (gethttp): Move proxy CONNECT handling to below the retry_with_auth label, to deal with properly reconnecting to proxies when we need to authenticate. 2008-04-25 Micah Cowan * src/Makefile.am: -I foo -> -Ifoo. 2008-04-24 Micah Cowan * src/main.c: Revised usage description of --convert-links to apply to CSS as well as to HTML. 2008-04-24 Micah Cowan * doc/wget.texi: Adjusted documentation to account for CSS support; added Ted Mielczarek to contributors. 2008-04-24 Micah Cowan * NEWS: Removed info about move to Automake, Gnulib. Added item about the addition of CSS support. 2008-04-23 Micah Cowan * src/utils.c (test_dir_matches_p): Added a test for the case described in issue #20518. 2008-04-22 Ted Mielczarek * src/css.lex, css-url.c, css-url.h: Added to implement support for parsing CSS in Wget. * src/convert.c: Convert links in CSS files, too. * src/convert.h (convert_options): Added for options link_css_p, link_expect_css. * src/convert.h: Added prototype for new register_css function. * src/html-parse.c: Added support for parsing element content, in addition to tag starts and ends. * src/html-parse.h (taginfo): Added delimiter fields for element content. * src/html-url.h: Added. * src/html-url.c (append_url): No longer internal-linkage only. Now takes position and size as explicit parameters. * src/html-url.c: Use new html-url.h header, add support for handling of "style" HTML attributes. Mark URIs obtained from link tags with rel="stylesheet" with link_expect_css. Adapt uses of append_url to supply the newly-added parameters for position and size. * src/http.c: Add detection for when the content-type is text/css; and ensure that such files have the ".css" filename extension, when --convert-links is active. * src/recur.h: Remove declarations for functions found in html-url.c (moved to html-url.h). * src/recur.c: Add support for culling links from CSS files, too, and tracking for when we're expecting the file to be CSS (even when its content type isn't text/css). * src/retr.c (retrieve_url): Add registration of CSS files. * src/wget.h: Added TEXTCSS to dt flags enum. * src/Makefile.am: Added css.lex, css-url.c, css-url.h, html-url.h to wget_SOURCES. 2008-04-22 Ted Mielczarek * configure.ac: Added check for lex. 2008-04-22 Steven Schubiger * src/http.c (print_response_line): Changed to make responses always be logged, even in --quiet mode, if --server-response was specified. This is to bring http.c's handling of the situation in line with ftp.c's. 2008-04-22 Rabin Vincent * src/ftp.c (ftp_get_listing): Only remove .listing if it has been created. 2008-04-22 Pranab Shenoy * src/init.c: Added test_commands_sorted unit test to check is commands are sorted. Fixes bug #21245. * src/test.c: Added test_commands_sorted to the test suite. 2008-04-22 Mike Frysinger * src/Makefile.am: Move @LIBS@ after other libraries, for better static-linking support. Fixes bug #22143. 2008-04-22 Mike Frysinger * doc/sample.wgetrc: Added prefer_family example. Resolves bug #22142. 2008-04-22 Micah Cowan * ylwrap: Added via automake -ac. 2008-04-22 Micah Cowan * src/Makefile.am, css.lex, css.l: Renamed css.lex to css.l. * src/recur.c (retrieve_tree): Fix typo to allow text/css files to be parsed. 2008-04-22 Jim Paris * src/openssl.c (ssl_init): Enable combined certificate/key in single file (apparent regression from ~1.9). Resolves issue #22767. 2008-04-22 Alain Guibert * src/test.h (mu_run_test): Move declaration before statements, for C90 conformance. Fixes bug #22789. 2008-04-16 Steven Schubiger * src/sysdep.h: Comment the defines __EXTENSIONS__ and _GNU_SOURCE out, because they're now defined independently by config.h. 2008-04-16 Steven Schubiger * src/ftp.c: Use Gnulib's quote function for printing filenames and such. * src/connect.c: Likewise. * src/convert.c: Likewise. * src/cookies.c: Likewise. * src/ftp-opie.c: Likewise. * src/gnutls.c: Likewise. * src/init.c: Likewise. * src/log.c: Likewise. * src/mswindows.c: Likewise. * src/openssl.c: Likewise. * src/progress.c: Likewise. * src/recur.c: Likewise. * src/res.c: Likewise. * src/utils.c: Likewise. 2008-04-14 Steven Schubiger * src/http.c: Use Gnulib's quote function for printing filenames and such. * src/wget.h: #include "quote.h". 2008-04-14 Micah Cowan * GNUmakefile, lib/Makefile.am, lib/error.c, lib/error.h, lib/exitfail.c, lib/exitfail.h, lib/getopt.c, lib/intprops.h, lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/stdlib.in.h, lib/strerror.c, lib/string.in.h, lib/unistd.in.h, lib/wchar.in.h, lib/wctype.in.h, lib/xalloc-die.c, lib/xalloc.h, lib/xmalloc.c, m4/error.m4, m4/exitfail.m4, m4/extensions.m4, m4/gnulib-cache.m4, m4/gnulib-comp.m4, m4/include_next.m4, m4/inline.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/quote.m4, m4/quotearg.m4, m4/stdlib_h.m4, m4/strerror.m4, m4/string_h.m4, m4/unistd_h.m4, m4/wchar.m4, m4/wctype.m4, m4/wint_t.m4, m4/xalloc.m4, md5/Makefile.am, md5/m4/gnulib-cache.m4, md5/m4/gnulib-comp.m4, md5/m4/include_next.m4, md5/m4/md5.m4, md5/m4/stdint.m4, md5/md5.c, md5/md5.h, md5/stdint.in.h, md5/wchar.in.h: Update from Gnulib, and add the "quote" module. 2008-04-12 Rabin Vincent * src/mswindows.c (fake_fork_child): Don't create a logfile for --background when --quiet is used, but not --server-response. Fixes bug #20917. * src/utils.c (fork_to_background): Likewise. 2008-04-12 Micah Cowan * src/utils.c (aprintf): Minor formatting changes to Alex's code (80- column limit, concatenated string literals, avoiding nesting levels), and removed invocation of free (since we're aborting anyway). 2008-04-11 Micah Cowan * src/ftp.c (getftp, ftp_loop_internal): Don't append to an existing .listing when --continue is used. Fixes bug #22825. Thanks to Rabin Vincent for pointing the way with a suggested fix! 2008-04-11 Micah Cowan * doc/wget.texi : Added Julien Buty, Alexander Dergachev, and Rabin Vincent. 2008-04-11 Alexander Dergachev * src/utils.c (aprintf): Now we are setting limits (1 Mb) for text buffer when we use non-C99 vsnprintf. 2008-04-10 Micah Cowan * tests/Makefile.am, Test-proxy-auth-basic.px: Added a test for accessing password-protected URLs through a proxy. 2008-04-10 Alexander Dergachev * src/xmalloc.c, xmalloc.h (memfatal): Now exported; accepts an "unknown" value for the attempted allocation size. * src/utils.c (aprintf): Now calls memfatal, instead of aborting. 2008-03-24 Micah Cowan * doc/wget.texi : Mentioned various caveats in the behavior of accept/reject lists, deprecate current always-download-HTML feature. Added @noindent to a couple of appropriate spots. 2008-03-24 Micah Cowan * NEWS: Added documentation change re: --no-parents, and various caveats on accept/reject lists behavior. Rearranged some items in order of priority. 2008-03-20 Micah Cowan * ABOUT-NLS: Reinstated, but with a message mentioning that gettext is not included. * Makefile.am: Removed "test" target; "check" should be used instead (and "test" was mildly broken, anyway). 2008-03-19 Micah Cowan * src/utils.c (test_dir_matches_p): More tests related for dir_matches_p. 2008-03-17 Micah Cowan * src/connect.c: Include sys/time.h to support use of the select function on older systems. 2008-03-17 Micah Cowan * doc/wget.texi : Mention importance of trailing slashes to --no-parents. 2008-02-14 Micah Cowan * ABOUT-NLS: Removed. 2008-02-11 Benno Schulenberg * src/http.c: More accurate and descriptive messages for when a file won't be retrieved during spider-mode. 2008-02-10 Micah Cowan * src/http.c: Added existence_checked member to the http_stat struct. (gethttp): Mark hs->existence_checked when we've checked whether a file-to-download exists; so we don't check it again if the connection gets lost (and potentially pick a new "unique" name). This fixes bug 22251. * src/progress.c (create_image): Add space for an extra column in the "eta" portion of the progress bar image; to deal with too-long Czech translation. * src/main.c, http.c, init.c: Added --auth-no-challenge option, to bring back 1.10.2 unsafe auth behavior when needed. This fixes bug #22242. 2008-02-10 Micah Cowan * doc/wget.texi : Added documentation of --auth-no-challenge. 2008-02-10 Micah Cowan * NEWS: Added note re interrupted files resulting in renames, and new --auth-no-challenge option. 2008-02-07 Micah Cowan * src/progress.c (create_image): Remove assertion on exceeding screen width, which given the less-than-robust code there, can be broken by a number of factors (such as large file downloads). 2008-02-06 Micah Cowan * src/progress.c (countcols): Use strlen() when mbtowc or wcwidth not available (or not using NLS). * src/utils.c: Ensure we use single-byte separators when not doing NLS progress-bars. * src/wget.h: Determine whether to use NLS for progress-bars, based on whether wcwidth and mbtowc are available. 2008-02-06 Micah Cowan * doc/wget.ṫexi : Remove references to no-longer-supported socks library. 2008-02-06 Micah Cowan * configure.ac (AC_CHECK_FUNCS): Added check for mbtowc. * NEWS: Added notes regarding fixes for the localized progress bar and --no-clobber wasted GET request. * po/be.po: Added from the TP. 2008-02-03 Micah Cowan * src/progress.c (create_image): Use number of characters/columns consumed, rather than number of bytes, to determine how much of a line we've used. Fixes assertion errors and field alignment bugs (#22161, #20481) (get_eta, count_cols): Added to support the changes for create_image. * src/http.c (http_loop): Put no-clobber logic back into http_loop, before starting to fetch, for when we're not doing content-disposition. 2008-02-03 Micah Cowan * configure.in: Add checks for wchar.h, wcwidth function (to support column-counting in progress.c). * NEWS: Added line for 1.11.1. * util/README, util/Makefile.am, util/trunc.c: Added a small utility program to create files of arbitrary size (useful for testing certain situations with --continue). 2008-01-31 Micah Cowan * util/README, util/dist-wget, util/download-netscape.html, util/download.html, util/update_po_files.sh, util/wget.spec: Removed (obsolete and/or incomplete). * Makefile.am: Removed no-longer-existant util stuff from extra_DIST (but added the README). 2008-01-31 Micah Cowan * src/http.c (gethttp): Don't derive hs->contlen from possibly invalid/missing Content-Length; instead, get the appropriate value from the Content-Range header values. (parse_content_range): Handle '*' instance-length field. 2008-01-31 Micah Cowan * doc/wget.texi: Ensure that license info appears in the info version of the manual. 2008-01-28 Micah Cowan * po/en@quot.po, po/en@boldquot.po, po/en_US.po: Updated translations for copyright year in --version. * po/Rules-quot: Make en@*-update should create wget.pot. * configure.ac: Ensure that en_US appears in ALL_LINGUAS exactly once. 2008-01-25 Micah Cowan * tests/Makefile.am: Updated copyright year. 2008-01-25 Micah Cowan * src/main.c: Added notes to translators regarding (C), diacritics in names. * src/Makefile.am, cmpt.c, connect.c, connect.h, convert.c, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h, main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h, spider.c, spider.h, ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h, xmalloc.c, xmalloc.h: Updated copyright year. 2008-01-25 Micah Cowan * msdos/config.h: Updated copyright year. 2008-01-25 Micah Cowan * Makefile.am, NEWS, README, configure.ac, configure.bat, m4/wget.m4, po/POTFILES.in, util/Makefile.am, util/dist-wget, util/rmold.pl, files: Updated copyright year. 2008-01-25 Micah Cowan * doc/Makefile.am, wget.texi: Updated copyright year. 2008-01-24 Micah Cowan * configure.ac: Added en_US LINGUA (generated). * po/Rules-quot: Added rule to copy en_US.po from en@quot.po. * po/boldquot.sed, po/quot.sed: Translate _all_ apostrophes we find, not just the ones used for quotes; and add rules to use the copyight symbol, and write Hrvoje's last name properly. ^_^ * po/en@quot.po, po/en@boldquot.po: Updated by new rules. * po/en_US.po: Added. 2008-01-23 Micah Cowan * tests/Makefile.am: Add libmd5 to unit-tests. 2007-12-10 Micah Cowan * src/main.c: The option is --content-disposition, not --no-content-disposition (at the moment). 2007-12-10 Micah Cowan * doc/wget.texi: Document the --content-disposition option (and not just the .wgetrc setting). 2007-12-10 Micah Cowan * NEWS: Removed developer-only notices (Autoconf, TODO, PATCHES, GNUTLS). 2007-12-08 Hrvoje Niksic * src/ftp.c (ftp_retrieve_glob): Print both arguments of fnmatch in fnmatch error message. (ftp_retrieve_glob): Don't match with fnmatch if we're only supposed to get one file. 2007-12-07 Micah Cowan * src/Makefile.am: Plug in vars to include stuff from $(top_srcdir)/md5 when appropriate. 2007-12-07 Micah Cowan * lib/Makefile.am, lib/c-ctype.c, lib/c-ctype.h, lib/gettext.h, lib/stdbool.in.h, lib/unistd.in.h, m4/gnulib-cache.m4, m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/unistd_h.m4: Updated from gnulib. * Makefile.am, configure.ac: Plugged in the md5/ stuff. * lib/md5.c, lib/md5.h, lib/stdint.in.h, lib/wchar.in.h, m4/longlong.m4, m4/md5.m4, m4/stdint.m4, m4/wchar.m4: Moved to md5/. * md5/Makefile.am, md5/dummy.c, md5/m4/gnulib-cache.m4, md5/m4/gnulib-common.m4, md5/m4/gnulib-comp.m4, md5/m4/gnulib-tool.m4, md5/m4/include_next.m4, md5/m4/longlong.m4, md5/m4/md5.m4, md5/m4/stdint.m4, md5/m4/wchar.m4, md5/md5.c, md5/md5.h, md5/stdint.in.h, md5/wchar.in.h: Moved/copied from lib/, m4/; updated from gnulib. * m4/ulonglong.m4: Removed (via update from gnulib). 2007-12-06 Micah Cowan * doc/wget.texi: "the the" -> "the" 2007-12-05 Micah Cowan * src/utils.c (subdir_p): Handle the case where d1 is "". * src/convert.c (convert_all_links): Don't return without deallocating timer. 2007-12-05 Micah Cowan * doc/wget.texi : Explicitly mention that --content-disposition has known issues. 2007-12-05 Micah Cowan * NEWS: Reword warnings regarding --content-disposition. 2007-11-28 Micah Cowan * tests/Makefile.am: Updated license exception for OpenSSL, per the SFLC. 2007-11-28 Micah Cowan * msdos/config.h: Updated license exception for OpenSSL, per the SFLC. 2007-11-28 Micah Cowan * src/Makefile.am, cmpt.c, connect.c, connect.h, convert.c, convert.h, cookies.c, cookies.h, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, ftp.h, gen-md5.c, gen-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h, html-parse.c, html-parse.h, html-url.c, http-ntlm.c, http-ntlm.h, http.c, http.h, init.c, init.h, log.c, log.h, main.c, mswindows.c, mswindows.h, netrc.c, netrc.h, openssl.c, options.h, progress.c, progress.h, ptimer.c, ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h, safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h, test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h, xmalloc.c, xmalloc.h: Updated license exception for OpenSSL, per the SFLC. 2007-11-28 Micah Cowan * Makefile.am, README, autogen.sh, configure.bat, configure.in, m4/wget.m4, util/Makefile.am, util/dist-wget: Updated license exception for OpenSSL, per the SFLC. 2007-10-30 Micah Cowan * src/main.c (main): Declare argv parameter as char **argv, rather than char *const *argv. This fixes usage of getopt_long, regardless of whether getopt_long has a constified argv or not. 2007-10-23 Micah Cowan * lib/stdbool.in.h, lib/stdint.in.h: gnulib-tool --update. Includes fix for broken stdbool.h on Tru64. 2007-10-22 Micah Cowan * po/*.po: Refresh from TP and update-po. * lib/Makefile.am, m4/gnulib-cache.m4, m4/longlong.m4, m4/ulonglong.m4, maint.mk: gnulib-tool --update. Includes fix for maint.mk with old versions of gzip. 2007-10-22 Gisle Vanem * src/mswindows.c: Move INHIBIT_WRAP macro definition up with wget.h inclusion. 2007-10-18 Steven Schweda * src/sysdep.h: #include as well as , to work around a glitch on Tru64 systems. 2007-10-18 Micah Cowan * tests/Makefile.am: Add dependency for unit_tests on libgnu.a. 2007-10-18 Micah Cowan * src/Makefile.am: version.c should not be distributed. Removed config-post.h. Add version.c dependency and gnulib include path for libunittest.a. * src/sysdep.h: Got contents of config-post.h * src/config-post.h: Removed. * src/wget.h: #include "config.h". * src/alloca.c, cmpt.c, connect.c, convert.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c, hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c, progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c, utils.c, xmalloc.c: Use wget.h at very top, and instead of config.h. 2007-10-18 Micah Cowan * po/POTFILES.in: Removed no-longer-existing or generated files. * autogen.sh: Reinstated, in case we have to do something at some point other than autoreconf. * Makefile.am: Put autogen.sh back in EXTRA_DIST. Just in case someone needs to rebuild configure. * configure.ac: Removed config-post.h inclusion from bottom of generated config.h. 2007-10-16 Micah Cowan * README: Draw attention to wiki:PatchGuidelines. 2007-10-15 Micah Cowan * src/Makefile.am: Remove intermediary hg-id file generation, make version.c-generation more portable. 2007-10-15 Gisle Vanem * msdos/config.h: Added some HAVE_* for djgpp 2.04 and Watcom 1.7+. * msdos/Makefile.DJ: rewritten for including some files from ../lib. * msdos/Makefile.WC: Ditto. Handling source-files out-of current directory makes compliation a bit more painfull. AFAICS, one must use explicit rules. 2007-10-14 Micah Cowan * src/cmpt.c, cookies.c, ftp-basic.c, ftp-ls.c, ftp.c, hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, init.c, log.c, main.c, netrc.c, openssl.c, res.c, url.c, utils.c, wget.h: Replace uses of ISSPACE, etc with c_isspace, etc. * src/gnu-md5.c, gnu-md5.h: Removed, in deference to gnulib. * src/Makefile.am: Removed gnu-md5.h from wget_SOURCES. * src/gen-md5.c: Changed #inclusion of gnu-md5.h to md5.h (gnulib's). * src/recur.c (download_child_p): Print error if unlink of robots.txt fails. * src/main.c (main): --spider or --delete-after now implies --no-directories (thanks, Josh Williams). 2007-10-14 Micah Cowan * configure.ac: Let gnulib handle builtin MD5 functionality. * NEWS: Mention gnulib. 2007-10-14 Joshua David Williams * src/recur.c (download_child_p): Remove robots.txt if --delete-after or --spider is on. 2007-10-13 Micah Cowan * src/Makefile.am: Make version.c depend on Wget dependencies (source files, plus such things as LIBOBJS so we get things like http-ntlm.c). Removed getopt.[ch], as we're now using gnulib for these. 2007-10-13 Micah Cowan * doc/wget.texi : Replaced mention of no-longer included PATCHES file with link to relevant Wgiki page. * doc/wget.texi : Added new section. 2007-10-13 Micah Cowan * GNUMakefile, maint.mk: Added as part of the gnulib-ization. * Makefile.am: gnulib-ized. * configure.ac: gnulib-ized. Removed built-in getopt checks. 2007-10-12 Micah Cowan * PATCHES: Removed. * NEWS: Updated info about source repositories, removal of PATCHES file. 2007-10-10 Micah Cowan * src/http-ntlm.c: Include openssl/opensslv.h explicitly, instead of hoping it'll be included by accident in openssl/des.h. 2007-10-10 Micah Cowan * doc/wget.texi : Fixed "doewnloads" typo. 2007-10-09 gettextize * m4/gettext.m4: New file, from gettext-0.16.1. * m4/iconv.m4: New file, from gettext-0.16.1. * m4/lib-ld.m4: Upgrade to gettext-0.16.1. * m4/lib-link.m4: Upgrade to gettext-0.16.1. * m4/lib-prefix.m4: Upgrade to gettext-0.16.1. * m4/nls.m4: New file, from gettext-0.16.1. * m4/po.m4: New file, from gettext-0.16.1. * m4/progtest.m4: New file, from gettext-0.16.1. * po/Makefile.in.in: Upgrade to gettext-0.16.1. * po/Rules-quot: New file, from gettext-0.16.1. * po/boldquot.sed: New file, from gettext-0.16.1. * po/en@boldquot.header: New file, from gettext-0.16.1. * po/en@quot.header: New file, from gettext-0.16.1. * po/insert-header.sin: New file, from gettext-0.16.1. * po/quot.sed: New file, from gettext-0.16.1. * po/remove-potcdate.sin: New file, from gettext-0.16.1. 2007-10-09 Micah Cowan * src/gettext.h: Imported from /usr/share/gettext, fuller handling of --disable-nls. * src/wget.h: Remove logic for handling lack of NLS (now in gettext.h). * src/main.c: Use gettext's ENABLE_NLS rather than HAVE_NLS. * src/Makefile.am: added @LIBINTL@ to LIBS (though it probably belongs in LDADD, along with everything else currently assigned to LIBS). 2007-10-09 Micah Cowan * configure.in: Renamed to configure.ac * configure.ac: Renamed from configure.in. Added invocations of AM_GNU_GETTEXT, etc. Added en@quot and en@boldquot pseudo-LINGUA support. * ABOUT-NLS: Added back in (required by autoreconf :\). * Makefile.am: Added ABOUT-NLS and msdos/Makefile.WC to EXTRA_DIST. * m4/wget.m4: Removed no-longer-used NLS stuff. * Makefile.in.in: Restore previous policy of not updating .po's unless explicitly asked (via update-po). 2007-10-09 Gisle Vanem * src/mswindows.c: 'argc' and 'argv' in 'windows_main()' are no longer needed. Hence simply the prototype. Free 'exec_name' at exit. 2007-10-08 Micah Cowan * src/http.c (http_loop): Add send_head_first conditional back around code that needs it, but not around the last-modified header-parsing stuff this time. Removed no-longer-useful (was it ever?) restart_loop boolean, continuing unconditionally at end of send_head_first conditional block (if we haven't jumped out). 2007-10-08 Micah Cowan * doc/wget.texi: Credit to Ralf Wildenhues for automakifying patches. 2007-10-08 Micah Cowan * AUTHORS: Credit to Ralf Wildenhues for automakifying patches. 2007-10-05 Ralf Wildenhues * tests/WgetTest.pm.in: wget is built in the build tree. Use an absolute path to the binary. * tests/Makefile.in: Removed, replaced by Makefile.am. * tests/Makefile.am: Converted from Makefile.in. 2007-10-05 Ralf Wildenhues * po/Makefile.in.in: Since `distdir' is used now, adjust DISTFILES to the missing ChangeLog file. Add trivial targets ps, pdf, html. * Makefile.in: Removed, replaced by Makefile.am. * Makefile.am: Converted from Makefile.in. * util/Makefile.in: Removed, replaced by Makefile.am. * util/Makefile.am: Converted from Makefile.in. * configure.in: Adjust for automake support. 2007-10-05 Ralf Wildenhues * doc/Makefile.in: Removed, replaced by Makefile.am. * doc/Makefile.am: Converted from Makefile.in. 2007-10-05 Micah Cowan * config.guess, config.sub, install-sh: Update from versions found in /usr/share/automake/. * autogen.sh: Removed, in favor of just running autoreconf. 2007-10-04 Micah Cowan * src/http.c (http_loop): We've got_name if content_disposition support isn't on; make sure we continue properly in that case, even though we're not sending HEAD. * src/Makefile.in: Removed, replaced by Makefile.am. * src/Makefile.am: Converted from Makefile.in. 2007-10-03 Micah Cowan * doc/wget.texi : Cleaned up alphabetization, more consistent use of underscores. Added a description of the content_disposition wgetrc command. 2007-10-03 Micah Cowan * NEWS: Note missing functionality from GnuTLS support. Call out attention to content_disposition's experimental status. 2007-10-02 Stephen Gildea * src/connect.c (connect_to_host): Warn about host lookup failures. 2007-10-02 Micah Cowan * src/ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main (main): Use datetime_str instead of time_str, for those who have potentially long-running sessions. Based on suggestions by Saso Tomat and Steven M. Schweda . * src/http.c (gethttp): Warn about host lookup failures. Adjusted from Stephen Gildea's patch. 2007-10-02 Gisle Vanem * src/ftp.c: Use "_listing" for MSDOS (".listing" is illegal). * src/url.c: Update comment for 'filechr_not_windows'. * src/utils.c: Include for 'getpid()' on Watcom. 2007-10-02 Gisle Vanem * msdos/config.h: Removed unused defines, added needed 'HAVE_*' defines. * msdos/Makefile.DJ: rewritten to be used from './src' directory. Added '-DOPENSSL_NO_KRB5' for OpenSSL build. Target is now wget.exe. * msdos/Makefile.WC: Added for building with OpenWatcom targeting 32-bit DOS (DOS32A extender). 2007-10-01 Micah Cowan * doc/wget.texi: Updated information in Mailing Lists, Reporting Bugs. Added Web Site section, and add information about Mac OS X, MS-DOS, and VMS in Portability. 2007-09-27 Micah Cowan * doc/wget.texi: Removed "for more details" from parenthesese enclosing @pxref{}s, so that texi2pod.pl knows to remove the whole reference. Made some gramattical improvements, and strengthened the recommendation to use the info manual instead. * doc/texi2pod.pl: Brought in some updates from the GCC version. Not an entire update, since a couple "fixes" there breaks stuff here. 2007-09-25 Micah Cowan * tests/Makefile.in: Use EXEEXT instead of exeext. 2007-09-25 Micah Cowan * src/Makefile.in: Use EXEEXT instead of exeext. 2007-09-25 Micah Cowan * configure.in: Remove unnecessary heuristic to generate exeext variable, since AC_PROG_CC and others automatically set EXEEXT. Pointed out by Steve Kenton . 2007-09-24 Jochen Roderburg * src/http.c (http_zero): Remove no-longer-used local_size variable. Fixes bug #21057. 2007-09-24 Gisle Vanem * src/connect.c, init.c, main.c, openssl.c, options.h, sysdep.h, url.c, utils.c: Added support for building on MS-DOS. 2007-09-24 Gisle Vanem * msdos/Makefile.DJ, config.h: Added to support building on MS-DOS via DJGPP. 2007-09-12 Micah Cowan * src/http.c (http_loop): Remove send_head_first from condition for parsing timestamp. 2007-09-12 Micah Cowan * doc/wget.texi: Expanded the description of -O. Clarified the detection of elements as "patterns" versus "suffixes" in -A, -R. Describe -p in relation to -nc. 2007-09-12 Micah Cowan * AUTHORS: Added... me... * TODO: file removed, bugtracker is authoritative source for planned changes. 2007-08-29 Micah Cowan * src/openssl.c (ssl_init): Re un-const-ified the meth local variable, to match current versions of openssl. * src/spider.c: Removed visited_url function, as it may be very inefficient. (print_broken_links): Removed traversal of referrers, until such time as a more efficient implementation can be written. * src/spider.h: Replaced declaration of visited_url with an empty-bodied, function-like macro. 2007-08-27 Micah Cowan * src/wget.h: Added macro replacement for ngettext, for environs that lack NLS. 2007-08-27 Gisle Vanem * src/mswindows.c (run_with_timeout): Ensure that the correct conversion specification is used for the return result of the GetLastError function. * src/getopt.c: Fix missing (but, accidentally, legal) comment delimiter after licensing text. * src/recur.c (retrieve_tree): Inserted missing cast for strip_auth. Includes adjustment by Ralf Wildenhues. * src/openssl.c (ssl_init): const-ified the meth local variable. * src/main.c: Include all the static function definitions in the "#ifndef TESTING" clause, leaving just the definitions for exec_name (not set), and opt. * src/utils.c (run_with_timeout): Now returns bool, to align with declaration in utils.h. 2007-08-26 Micah Cowan * src/spider.c (print_broken_links): Fixed incorrect plurals msgid usage, switched to use ngettext function. 2007-08-26 Micah Cowan * po/POTFILES.in: Added spider.c. 2007-08-24 Micah Cowan * src/http.c (http_loop): Introduced time_came_from_head boolean flag, to help avoid parsing the same Last-Modified header twice. Replaced spidering returns of RETRUNNEEDED for some situations, to RETROK, as otherwise it will be interpreted as an error. RETRUNNEEDED appears never to be referenced outside of http.c (and wget.h), and, when returned by gethttp, is translated by http_loop to RETROK. * src/url.c (are_urls_equal): Don't call getchar_from_escaped_string if u2 is shorter than u1. (getchar_from_escaped_string): Don't decode reserved characters. Handle illegally appearing '%'s as literal '%'s. Ensure hex digits before attempting to decode. (test_are_urls_equal): Added tests to handle u2 shorter than u1, and %2f not treated the same as /. * src/spider.c (in_url_list_p): Don't call are_urls_equal if one of them is NULL. 2007-08-24 Micah Cowan * po/no.po: removed; replaced by nb.po (per the translation project coordinator, Benno Schulenberg). 2007-08-23 Joshua David Williams * src/spider.c (in_url_list_p): Removed the bool verbose argument 2007-08-22 Micah Cowan * Makefile.in: Exclude .svn directories and below from distribution. 2007-08-22 Mauro Tortonesi * src/http.c (http_loop): Fall back to GET if HEAD fails with a 500 or 501 error code. 2007-08-21 Mauro Tortonesi * tests/WgetTest.pm.in: Added support for timestamping of pre-existing files. * tests/Test-N-current.px: Fixed broken test logic. * tests/Makefile.in: Updated list of automatically run tests. * tests/Test-HTTP-Content-Disposition.px: Added -e contentdisposition=on option, since now HTTP Content-Disposition header support is turned off by default. * tests/Test-HTTP-Content-Disposition-1.px: Ditto. 2007-08-21 Mauro Tortonesi * src/http.c (http_loop): Send preliminary HEAD request if -N is given and the destination file exists already. 2007-08-10 Ralf Wildenhues * src/url.c (append_uri_pathel): Do not assume dest string to be zero-terminated. (test_append_uri_pathel): Terminate string to fix test failure. 2007-08-10 Mauro Tortonesi * tests/Test--spider--no-content-disposition-trivial.px: Added new tests for validation of HTTP Content-Disposition header support logic. In particular, these tests check wget's behavior for every combination of --spider [-r] and -e contentdisposition=on/off options. * tests/Test--spider-r-HTTP-Content-Disposition.px: Ditto. * tests/Test--spider-HTTP-Content-Disposition.px: Ditto. * tests/Test--spider--no-content-disposition.px: Ditto. * tests/Test--spider-r--no-content-disposition-trivial.px: Ditto. * tests/Test--spider-r--no-content-disposition.px: Ditto. 2007-08-10 Mauro Tortonesi * src/http.c (http_loop): Fixed HTTP HEAD requests logic when --spider is given. 2007-08-09 Ralf Wildenhues * src/url.c (url_string): Use comparison, not assignment, in check for auth_mode == URL_AUTH_HIDE_PASSWD. 2007-08-09 Ralf Wildenhues * m4/wget.m4 (WGET_PROCESS_PO, AM_PATH_PROG_WITH_TEST): Add missing M4 quotation. Delete serial number. 2007-08-09 Micah Cowan * src/http.c (http_loop): If we got a HEAD and then a GET, and the GET had a timestamp, use that one, not any we may have gotten from the HEAD. 2007-08-09 Micah Cowan * NEWS: Timestamping from most recent response. 2007-08-08 Micah Cowan * src/init.c (defaults): Content disposition will not be default, since it currently results in extra round-trips. 2007-08-08 Micah Cowan * NEWS: Call attention to the fact that Content-Disposition is not enabled by default. 2007-08-07 Micah Cowan * configure.in: Fix --with-libssl-prefix failure by replacing usage of sh "if" statement with "AS_IF" macros, to force AC_REQUIRE'd macros to be expanded before the conditional statement body. * NEWS: Note that configure.in now requires autoconf >= 2.61, to support AS_IF and its expansion of AC_REQUIREs. 2007-07-31 Micah Cowan * src/http.c (gethttp): Set contlen = -1 when we encounter a negative-valued Content-Length header, so we don't consider it an internal error later on and call abort(). 2007-07-29 Micah Cowan * src/url.h, url.c (url_string): Replaced bool arg of the url_string function with enum url_auth_mode, with added option to completely remove user/pass auth information. * src/http.c, ftp.c, url.c, recur.c: Adapted call to url_string function to fit new usage. * src/recur.c (retrieve_tree): Remove auth info from Referer header. 2007-07-29 Micah Cowan * NEWS: No more auth before challenge. No more auth info in Referer. New --max-redirect option. 2007-07-28 Micah Cowan * src/options.h, init.c, retr.c, main.c: renamed opt maxredirect field to max_redirect, for improved consistency. * src/init.c: changed max_redirect parser from cmd_number_inf to cmd_number, as infinite redirects may not be appropriate. Alternatively, if cmd_number_inf should be used, then opt.max_redirect's value should be checked a bit differently in retr.c, to allow for the "infinite" meaning of zero. 2007-07-28 Micah Cowan * doc/wget.texi : Added --max-redirect option. 2007-07-25 Micah Cowan * tests/HTTPServer.pm (run, send_response): Farmed out some logic from the run method into a separate one named send_response, which was then modified to handle simple authentication testing. (handle_auth): Added to handle simple authentication testing. (verify_auth_basic): Checks to make sure Basic credentials are valid. (verify_auth_digest): Stub added; always fails test. * tests/Makefile.in: Added Test-auth-basic.px to list of automatically run tests. * tests/Test-auth-basic: Simple basic authentication test; mainly just lets the server do its testing. Its current purpose is just to ensure that correct basic creds are sent, but never until a challenge has been sent. 2007-07-25 Micah Cowan * src/http.c (create_authorization_line) (basic_authentication_encode, known_authentication_scheme_p) (load_cookies): Moved declarations up. (basic_authed_hosts): Added. Tracks what hosts have issued Basic challenge and been given the global username, password. (maybe_send_basic_creds): Added. Sends Basic creds for hosts that have issued Basic challenges. (register_basic_auth_host): Added. Instantiates basic_authed_hosts if necessary, then registers the host that has issued a challenge. (gethttp) : Only send authentication credentials after we've received a challenge from that host. This is a stop-gap fix until a proper fix can be implemented; still isn't quite right, as we should only be sending credentials automatically for authenticated paths and below, and not for the entire host. 2007-07-16 Joshua David Williams * src/test.h: tests made more verbose; now displays the name of each test run. 2007-07-16 Joshua David Williams * src/options.h: added maxredirect to options struct * src/init.c: added maxredirect to list of variables * src/retr.c (retrieve_url): replaced MAX_REDIRECTIONS with opt.maxredirect * src/main.c: added option --max-redirect 2007-07-10 Mauro Tortonesi * tests/Test--no-content-disposition.px: Added new tests for validation of HTTP Content-Disposition header support logic. In particular, these tests check wget's behavior for every combination of -N/-O and -e contentdisposition=on/off options. * tests/Test--no-content-disposition-trivial.px: Ditto. * tests/Test-N-HTTP-Content-Disposition.px: Ditto. * tests/Test-N--no-content-disposition.px: Ditto. * tests/Test-N--no-content-disposition-trivial.px: Ditto. * tests/Test-O-HTTP-Content-Disposition.px: Ditto. * tests/Test-O--no-content-disposition.px: Ditto. * tests/Test-O--no-content-disposition-trivial.px: Ditto. 2007-07-10 Mauro Tortonesi * src/http.c (http_loop): Fixed the HTTP requests logic. Now it skips the preliminary HEAD request if either -O or --no-content-disposition are given, and neither --spider and -N are given. 2007-07-09 Micah Cowan * README, util/wget.spec: Removed references to wget.sunsite.dk. 2007-07-05 Micah Cowan * tests/Makefile.in: Updated GPL reference to version 3 or later, removed FSF address. 2007-07-05 Micah Cowan * src/cmpt.c, connect.c, connect.h, convert.c, convert.h: * src/cookies.c, cookies.h, ftp-basic.c, ftp.c, ftp.h, ftp-ls.c: * src/ftp-opie.c, gen-md5.c, gen-md5.h, getopt.c, getopt.h, gnu-md5.c: * src/gnu-md5.h, gnutls.c, hash.c, hash.h, host.c, host.h: * src/html-parse.c, html-parse.h, html-url.c, http.c, http.h: * src/http-ntlm.c, http-ntlm.h, init.c, init.h, log.c, log.h, main.c: * src/Makefile.in, mswindows.c, mswindows.h, netrc.c, netrc.h: * src/openssl.c, options.h, progress.c, progress.h, ptimer.c: * src/ptimer.h, recur.c, recur.h, res.c, res.h, retr.c, retr.h: * src/safe-ctype.c, safe-ctype.h, spider.c, spider.h, ssl.h, sysdep.h: * src/test.c, test.h, url.c, url.h, utils.c, utils.h, wget.h: * src/xmalloc.c, xmalloc.h: Updated GPL reference to version 3 or later, removed FSF address. 2007-07-05 Micah Cowan * doc/fdl.texi: Changed to match the version in gnulib. * doc/Makefile.in: * doc/texi2pod.pl: * doc/texinfo.tex: Updated GPL reference to version 3 or later, removed FSF address. * doc/wget.texi: Slightly reworded the FDL license invocation. Replaced the maintainer reference. Removed the GPL text from the manual. * doc/gpl.texi: Removed due to discontinuation of reference in Wget manual. 2007-07-05 Micah Cowan * AUTHORS: Draw attention to previous maintainers. * autogen.sh, config.guess, config.sub, configure.bat: * configure.in, m4/wget.m4, Makefile.in, util/dist-wget: * util/Makefile.in, util/rmold.pl: Updated GPL reference to version 3 or later, removed FSF address. * README: Updated reference to maintainer, and updated GPL reference to version 3 or later. * COPYING: Replaced with verson 3. 2007-07-04 Mauro Tortonesi * src/http.c (http_loop): Skip HEAD request and start immediately with GET if -O is given. 2007-06-14 Mauro Tortonesi * tests/FTPServer.pm: Added FTP testing support. * tests/FTPTest.pm: Ditto. * tests/Test-ftp.px: Ditto. 2007-02-02 Hrvoje Niksic * src/netrc.c: Don't make netrc_list static, as it prevents compilation with DEBUG_MALLOC. * src/utils.c (aprintf): Don't use vasprintf when DEBUG_MALLOC is requested because, in that case, we want the calls to malloc to be coming from us. 2007-02-02 Hrvoje Niksic * src/http.c (print_server_response): Escape non-printable characters in server respone. 2007-01-23 Hrvoje Niksic * src/progress.c (create_image): Check for ETA overflow. (print_row_stats): Ditto. 2007-01-23 Hrvoje Niksic * src/cookies.c (parse_set_cookie): Would erroneously discard cookies with unparsable expiry time. 2007-01-09 Steven M. Schweda * src/ftp-basic.c (ftp_syst): Fixed segfault if response text is missing. 2007-01-09 Mauro Tortonesi * src/init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc warning about strict-aliasing violation. 2006-12-29 Gisle Vanem * src/mswindows.c: Avoid a warning if 'ws_hangup()' is unused. 2006-12-27 Mauro Tortonesi * src/http.c (parse_content_disposition): Consider directory prefix, if specified. 2006-12-22 Mauro Tortonesi * tests/HTTPTest.pm: Don't ignore initial '/' character in requested URLs. 2006-11-21 Hrvoje Niksic * src/retr.c (retrieve_from_file): Ditto. (url_uses_proxy): New function. * src/main.c (main): Don't check for opt.use_proxy when deciding whether to call retrieve_url or retrieve_tree; check whether the proxy would be used for *this* URL. 2006-11-10 Mauro Tortonesi * tests/Test-np.px: Added test for -np. * tests/HTTPTest.pm: Ignore initial '/' character in requested URLs. 2006-10-17 Mike Grant * src/ftp.c (ftp_loop_internal): Would incorrectly skip changing working directory when retrying after a failed FTP attempt. Originally reported by Nate Eldredge. 2006-10-12 Mauro Tortonesi * tests/Test1.px: Renamed to Test-noop.px. * tests/Test-noop.px: Ditto. * tests/Test2.px: Renamed to Test-N.px. * tests/Test-N.px: Ditto. * tests/Test3.px: Renamed to Test-nonexisting-quiet.px. * tests/Test-nonexisting-quiet.px: Ditto. * tests/Test4.px: Renamed to Test-O-nonexisting.px. * tests/Test-O-nonexisting.px: Ditto. * tests/Test5.px: Renamed to Test-HTTP-Content-Disposition.px. * tests/Test-HTTP-Content-Disposition.px: Ditto. * tests/Test6.px: Renamed to Test-HTTP-Content-Disposition-1.px. * tests/Test-HTTP-Content-Disposition-1.px: Ditto. * tests/Test7.px: Renamed to Test-HTTP-Content-Disposition-2.px. * tests/Test-HTTP-Content-Disposition-2.px: Ditto. * tests/Test8.px: Replaced by Test--spider-r.px. * tests/Test9.px: Renamed to Test-Restrict-Lowercase.px. * tests/Test-Restrict-Lowercase.px: Ditto. * tests/Test10.px: Renamed to Test-Restrict-Uppercase.px. * tests/Test-Restrict-Uppercase.px: Ditto. * tests/Test--spider.px: Added test for spider mode. * tests/Test--spider-fail.px: Added failing test for spider mode. * tests/Test--spider-r.px: Added test for recursive spider mode. * tests/Test-c.px: Added test for --continue mode. * tests/Test-c-full.px: Added test for --continue mode. * tests/Test-c-partial.px: Added test for --continue mode. * tests/Test-O.px: Added test for -O. * tests/Test-N-current.px: Added test for -N. * tests/Test-N-old.px: Added test for -N. * tests/Test-E-k.px: Added test for -E -k. * tests/Test-E-k-K.px: Added test for -E -k -K. 2006-10-12 Mauro Tortonesi * src/convert.c (downloaded_file): Fixed bug which used to break -E -k -K mode. 2006-08-28 Noèl Köthe * Makefile.in: Fixed a DESTDIR-related bug. 2006-08-28 Mauro Tortonesi * src/http.c: #include'd spider.h to get rid of compiler warnings. * src/main.c: Ditto. * src/recur.c: Ditto. 2006-08-24 Mauro Tortonesi * src/Makefile.in: Added spider.c to the list of files to compile and spider.h to the list of header files. Updated copyright information. * src/http.c: Major changes to recursive spider mode. Now for every resource we are supposed to check, we send a HEAD request to find out if it exists. If the resource is a HTML file, we retrieve it and parse it to discover links to other resources. * src/recur.c: Ditto. * src/res.c (res_retrieve_file): Disable opt.timestamping and opt.spider when retrieving robots.txt. Updated copyright information. * src/convert.c: Moved code tracking broken links to spider.c. * src/convert.h: Ditto. * src/spider.c: Created new file to keep track of visited URLs in spider mode. * src/spider.h: Ditto. 2006-08-21 Mauro Tortonesi * src/http.c: Fixed timestamping-related bug. 2006-08-17 Mauro Tortonesi * tests/HTTPServer.pm: Added support for Range header. 2006-08-16 Mauro Tortonesi * src/http.c: Fixed bug which broke --continue feature. Now if -c is given, http_loop sends a HEAD request to find out the destination filename before resuming download. 2006-08-08 Hrvoje Niksic * src/utils.c (datetime_str): Avoid code repetition with time_str. 2006-07-21 Hrvoje Niksic * src/init.c (commands): Correctly place "contentdisposition". 2006-07-17 Daniel Richard G. * Makefile.in: Added DESTDIR='$(DESTDIR)' to MAKEDEFS. 2006-07-14 Mauro Tortonesi * tests/Test4.px: Fixed wrong expected behaviour. 2006-07-14 Mauro Tortonesi * src/sysdep.h: If intptr_t isn't defined, simply typedef it to long. * src/http.c: Added explicit cast to int in logprintf call to remove compiler warnings on 64-bit platforms. * src/connect.c: Added a few casts to intptr_t to remove compiler warnings on 64-bit platforms. * src/main.c: Disable -r, -p and -N when -O is used. Disable -k when -O is used and multiple URLs are given. Update maintainer information. * src/all: Update copyright information. 2006-07-14 Mauro Tortonesi * configure.in: Check for intptr_t. 2006-07-10 Mauro Tortonesi * doc/wget.texi: Fixed rendering of --no-proxy description in the man page. Added information about current maintainer. 2006-07-10 KJKHyperion * src/url.c (filechr_table): Mark DEL (0x7f) as a control character and | as a character Windows can't handle. 2006-06-28 Mauro Tortonesi * src/res.c: Implemented is_robots_txt_url function for detection of robots.txt URLs and related test routine. * src/res.h: Ditto. * src/url.c: Implemented are_urls_equal function for URL comparison and related testing routine. * src/url.h: Ditto. * src/convert.c: Fixes for recursive spider mode: don't consider non-existing robots.txt as a broken link, and use are_urls_equal instead of strcasecmp for referrer URLs comparison. * src/test.c: Call tests routines for are_urls_equal and is_robots_txt_url. 2006-06-28 Mauro Tortonesi * doc/wget.texi: Removed invariant status to the GPL and GFDL sections. Changed UPDATED to Jun 2006. Updated copyright notice to include 2006. 2006-06-27 Hrvoje Niksic * configure.in: We're no longer using strtoimax. 2006-06-26 Hrvoje Niksic * src/wget.h (wgint): Typedef to any 64-bit (or larger) type we can find, not necessarily off_t or long. 2006-06-26 Hrvoje Niksic * src/cmpt.c (strtoll): Check for overflow and underflow without relying on (technically) undefined behavior. Don't assume that strtoll_type is 64 bits wide. 2006-06-26 Hrvoje Niksic * doc/wget.texi (Recursive Accept/Reject Options): Document --ignore-case. 2006-06-21 Hrvoje Niksic * src/utils.c (base64_encode): Cast void pointer to char * before doing arithmetic. 2006-06-20 Hrvoje Niksic * src/utils.c (base64_encode): Made TBL const. (base64_decode): Made the base64_char_to_value table const. 2006-06-20 Hrvoje Niksic * doc/wget.texi (Download Options): Add missing word. Reported by Adrian Knoth. 2006-06-19 Hrvoje Niksic * src/utils.c (base64_encode): Would read past end of STR. Reported by rick@eckle.org. 2006-06-19 Hrvoje Niksic * src/utils.c (base64_encode): Made the DATA pointer void * so the callers can pass it any kind of pointer (including both signed and unsigned char pointers). (base64_decode): Ditto for DEST. 2006-06-13 Mauro Tortonesi * tests/Test9.px: Added test for --restrict-file-names=lowercase option. * tests/Test10.px: Added test for --restrict-file-names=uppercase option. 2006-06-13 Mauro Tortonesi * src/options.h (struct options): Introduced member restrict_files_case to keep track of preferences on character case restrictions for filenames. * src/init.c: Modified defaults and cmd_spec_restrict_file_names to support character case restrictions for filenames. Added test_cmd_spec_restrict_file_names unit test. * src/url.c: Modified append_uri_pathel to support character case restrictions for filenames. Added test_append_uri_pathel unit test. * src/test.c: Added test_cmd_spec_restrict_file_names and test_append_uri_pathel to the list of unit tests to run. 2006-06-12 Tony Lewis * src/main.c: Improved CHEN Peng's patch by proposing a simpler logic. 2006-06-12 Mauro Tortonesi * src/retr.c (retrieve_from_file): Use retrieve_tree and automatically turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP proxy. * src/main.c: Automatically turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP proxy. 2006-06-12 CHEN Peng * src/main.c: Use retrieve_tree in case of recursive FTP retrieval through HTTP proxy. 2006-05-26 Mauro Tortonesi * tests/HTTPServer.pm: Fixed bug when returning 404. Improved logging. * tests/Test.pm: Added support for command lines which use an absolute path for the Wget binary. 2006-05-26 Mauro Tortonesi * tests/HTTPServer.pm: Added synchronization between client and server processes to prevent the test to start before the server is ready. * tests/HTTPTest.pm: Ditto. * tests/Test.pm: Ditto. * tests/Test1.px: Removed unneeded ../src/ from command line. * tests/Test2.px: Ditto. * tests/Test3.px: Ditto. * tests/Test4.px: Ditto. * tests/Test5.px: Ditto. * tests/Test6.px: Ditto. * tests/Test7.px: Ditto. * tests/Test8.px: Added test for recursive spider mode. 2006-05-25 Mauro Tortonesi * src/convert.c: Added mechanisms to keep track broken links. * src/convert.h: Ditto. * src/wget.h: Reordered and enumerated uerr_t constants. * src/recur.c: Fixes to support recursive spider mode. * src/http.c: Ditto. * src/main.c: Print broken links in case of recursive spider mode. * src/retr.c: Changed interface of retrieve_url. * src/retr.h: Ditto. * src/ftp.c: Changed interface of ftp_loop. * src/ftp.h: Ditto. * src/res.c: Minor change to reflect changes in interface of retrieve_url. 2006-05-18 Lawrence Jones * src/ftp-ls.c (ftp_parse_unix_ls): Correct size parsing, add size and filename debugging output. 2006-04-28 Mauro Tortonesi * tests/Test5.px: Added test for HTTP Content-Disposition support. * tests/Test6.px: Ditto. * tests/Test7.px: Ditto. 2006-04-28 Mauro Tortonesi * src/http.c: If Content-Disposition header is present, allow unique filename generation unless -nc is given. Permit to disable parsing of Content-Disposition header. * src/options.h: Added option --no-content-disposition to disable parsing of HTTP Content-Disposition header. * src/init.c: Ditto. * src/main.c: Ditto. 2006-04-27 Mauro Tortonesi * tests/HTTPServer.pm: Serve index.html if no filename is given. * tests/Test.pm: Added support for pre-existing files. 2006-04-11 Hrvoje Niksic * src/hash.c (TOLOWER): Wrap macro arg in parentheses. 2006-04-08 Hrvoje Niksic * src/http.c (parse_content_disposition): Doc fix. 2006-03-15 Mauro Tortonesi * src/utils.c: Restricted operational semantics of frontcmp and proclist from generic strings to directory names and them to subdir_p and dir_matches_p respectively. Applied George Ogata's one line patch to restrict algorithm of subdir_p to full directory name matching. Added testcases for subdir_p and dir_matches_p. * src/utils.h: Changed all frontcmp occurrences to subdir_p. * src/recur.c: Ditto. * src/test.c: Changed type returned by test functions from char * to const char *. Added test_subdir_p and test_dir_matches_p to the list of tests to run. * src/http.c (test_parse_content_disposition): Changed return type from char * to const char *. 2006-03-14 Mauro Tortonesi * src/recur.c (struct queue_element): Changed type of html_allowed member to bool. 2006-03-09 Mauro Tortonesi * src/ftp.c (ftp_list): Try `LIST -a' command first and revert to `LIST' in case of failure. 2006-03-06 Hrvoje Niksic * src/hash.c (TOLOWER): Fix definition when STANDALONE. Reported by Beni Serfaty. 2006-03-02 Mauro Tortonesi * src/http.c (http_loop): Fixed recursive HTTP retrieval. 2006-02-28 Hrvoje Niksic * src/url.c (find_last_char): Define in terms of memrchr. * src/cmpt.c (memrchr): Define it on systems that don't have it. * src/http.c (extract_param): New function for parsing header values with parameters. (parse_content_disposition): Use it. Don't allow slashes and backslashes in the file name. 2006-02-28 Hrvoje Niksic * src/http.c (extract_param): Declare extern so it can be used from other files. (extract_param): Return error for empty name. 2006-02-28 Hrvoje Niksic * configure.in: Check for memrchr. 2006-02-27 Hrvoje Niksic * src/url.c (path_simplify): Don't preserve ".." at beginning of path. Suggested by Frank McCown. 2006-02-25 Hrvoje Niksic * src/http.c (gethttp): Only use FILE.N.html if FILE.html exists. 2006-02-09 Hrvoje Niksic * src/mswindows.c (run_with_timeout): Made thread_hnd non-static. 2006-02-05 Hrvoje Niksic * src/retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of the specified wait period. 2006-02-05 Hrvoje Niksic * doc/wget.texi (Download Options): Document the modified meaning of --random-wait. 2006-02-05 Hrvoje Niksic (Download Options): Changed "a recent article" to "a 2001 article" in the description of --random-wait, since the article in question is not really recent. 2006-02-03 Mauro Tortonesi * src/http.c: Fixed support for Content-Disposition header. * src/test.c: Added test_parse_content_disposition to the list of unit tests to run. 2006-02-03 Hrvoje Niksic * src/utils.c (number_to_string): Don't use sprintf for printing WGINT_MIN; simply divide n by 10 and defer printing the last digit. (number_to_string): Removed the SPRINTF_WGINT macro. 2006-02-02 Hrvoje Niksic * src/hash.c: Don't define countof if it's already defined. * src/hash.c: Obtain the definition of uintptr_t when standalone. 2006-01-30 Mauro Tortonesi * src/http.c: Changed output format. Removed excessively verbose debugging output. 2006-01-24 Mauro Tortonesi * tests/HTTPServer.pm: Enhanced logging support. * tests/HTTPTest.pm: Updated to new test format. * tests/Test.pm: Improved test setup, verification and cleanup. Major refactoring. * tests/Test1.px: Updated to new test format. * tests/Test2.px: Updated to new test format. * tests/Test3.px: Added new test for quiet download of nonexistent URL. * tests/Test4.px: Added new test for quiet download of nonexistent URL with --output-document option. 2005-12-07 Mauro Tortonesi * src/http.c: Fixed pre-download verbose output which was broken by HTTP code refactoring. 2005-12-05 Mauro Tortonesi * tests/HTTPServer.pm: Refactored as a subclass of HTTP::Daemon. Removed the old run method and renamed the old run_daemon method to run. Added support for partial * tests/Testing.pm: Renamed to HTTPTest.pm. * tests/HTTPTest.pm: Refactored as a subclass of Test. Renamed Run_HTTP_Test to run, verify_download to _verify_download and added support for timestamp checking. * tests/Test.pm: Added Test class as the super class of every testcase. * tests/test1: Renamed to Test1.px. * tests/Test1.px: Refactored as an instance of the HTTPTest class. * tests/Test2.px: Added -N HTTP test. 2005-11-23 Mauro Tortonesi * src/http.c: Refactored HTTP code. If -O is not used, the new code delays the choice of the file name where the downloaded resource will be saved until the HTTP headers have been retrieved. Added support for Content-Disposition header. 2005-11-19 Hrvoje Niksic * src/hash.c (INVALID_PTR): Use uintptr_t instead of unsigned long. (hash_pointer): Don't assume a pointer fits in `unsigned long'. 2005-11-19 Hrvoje Niksic * configure.in: Check for uintptr_t. 2005-11-15 Hrvoje Niksic * doc/wget.texi: Document https_proxy. 2005-11-02 Mauro Tortonesi * tests/HTTPServer.pm: Added basic support for HTTP testing. * tests/Testing.pm: Added basic support for feature testing (only HTTP testing is supported at the moment). * tests/test1: Added basic HTTP test. 2005-11-02 Mauro Tortonesi * src/Makefile.in: Removed support for unit testing (now it is in tests/Makefile.in). 2005-11-02 Mauro Tortonesi * Makefile.in: Improved support for unit testing. * configure.in: Ditto. 2005-10-27 Mauro Tortonesi * src/Makefile.in: Added basic support for unit testing. * src/test.c: Ditto. * src/test.h: Ditto. 2005-10-27 Mauro Tortonesi * Makefile.in: Added basic support for unit testing. 2005-10-13 Daniel Stenberg * src/http-ntlm.c (ntlm_output): Fixed buffer overflow vulnerability. 2005-10-09 Russ Allbery * src/snprintf.c: Remove round to round_int and pow10 to pow10_int, to avoid warnings from GCC 4.0. 2005-10-05 Mauro Tortonesi * src/retr.c: Changed semantics of no_proxy_match. 2005-09-17 Hrvoje Niksic * src/retr.c (retr_rate): Rename parameter from MSECS to SECS since it no longer holds milliseconds. 2005-09-17 Hrvoje Niksic * src/main.c (main): Don't print the summary if nothing has been downloaded. 2005-09-02 Hrvoje Niksic * doc/sample.wgetrc: Rewrite the "passive FTP" paragraph to better reflect reality. 2005-09-01 Hrvoje Niksic * src/progress.c: Introduce symbolic constants for "magic" values of 0.2 and 0.9, REFRESH_INTERVAL and ETA_REFRESH_INTERVAL. 2005-08-27 Hrvoje Niksic * src/hash.c (hash_table_map): Rename to hash_table_for_each and update callers. Document the meaning of the callback's return value. (hash_table_iterate): New function. (hash_table_iter_next): Likewise. Update most places that used hash_table_for_each to use the iteration, which doesn't require a temporary function with explicit state management. 2005-08-27 Hrvoje Niksic * src/cmpt.c (strtoll): Correctly handle strtoll("0x", ptr, 0) and strtoll("0x", ptr, 0) -- in both cases *ptr must be set to the position of 'x', not after it. 2005-08-26 Stepan Kasal * configure.in: Abort configure if --with-ssl given but SSL unavailable. Use HAVE_LIBSSL and HAVE_LIBGNUTLS symbols provided by AC_LIB_HAVE_LINKFLAGS instead of inventing new ones. 2005-08-26 Jeremy Shapiro * src/openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY. 2005-08-26 Albert Chin * src/Makefile.in: Use @datadir@. Define localedir as $(datadir)/locale. 2005-08-23 Hrvoje Niksic * src/host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA. 2005-08-12 Hrvoje Niksic * src/wget.h: Renamed strtoll_return to strtoll_type. 2005-08-11 Hrvoje Niksic * src/progress.c (eta_to_human_short): Switch to days when printing more than 48h rather than 100h. (It's not immediately apparent how many days there are in 83h.) 2005-08-11 Hrvoje Niksic * src/cmpt.c (strtoll): Define it if missing on the system and if Wget needs it. * src/mswindows.c (str_to_int64): Move to cmpt.c and rename to strtoll. 2005-08-11 Hrvoje Niksic * configure.in: Check for strtoll and strtoimax. 2005-08-10 Hrvoje Niksic * src/host.c (print_address): Always use inet_ntop when IPv6 is enabled. * src/host.h (ip_address): Simplify the data union. 2005-08-09 Vasil Dimov * src/ftp.c (getftp): Don't free RESPLINE if ftp_response returns a status other than FTPOK. 2005-08-09 Hrvoje Niksic * src/mswindows.c (inet_ntop): Also handle IPv4 addresses for completeness. 2005-08-09 Hrvoje Niksic * src/http.c (gethttp): Don't read more than the amount of data specified by the content-length header. 2005-08-09 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Removed documentation for the now deleted command "kill_longer". 2005-08-04 Giuseppe Bonacci * src/ftp-ls.c (ftp_parse_unix_ls): Remember the position of the previous token instead of backtracking back to it. 2005-07-08 Hrvoje Niksic * src/utils.c (aprintf): Use vasprintf where available. 2005-07-08 Hrvoje Niksic * src/url.c (rewrite_shorthand_url): Simplify code using aprintf and strspn. 2005-07-08 Hrvoje Niksic * configure.in: Remove -Wno-implicit from default GCC warning flags. 2005-07-08 Hrvoje Niksic * configure.in: Don't check for symlink, which is expected to exist. Check for asprintf. 2005-07-08 Gisle Vanem * src/mswindows.h: Include process.h to get getpid() declaration. 2005-07-07 Hrvoje Niksic * src/openssl.c (ssl_check_certificate): Print custom error messages for frequent X509 certificate problems. 2005-07-07 Hrvoje Niksic * src/mswindows.h: Define an alias for stat and fstat, as requested by config-compiler.h. (gai_strerror): Define to windows_strerror if NEED_GAI_STRERROR is defined. 2005-07-07 Hrvoje Niksic * src/gnutls.c (ssl_check_certificate): Check for the validity of the presented X509 certificate. 2005-07-07 Hrvoje Niksic * configure.bat: Copy the common config.h and config-compiler.h. 2005-07-06 Hrvoje Niksic * src/utils.c: Unconditionally include . 2005-07-06 Hrvoje Niksic * src/utils.c (fnmatch_nocase): New function. (proclist): Use it instead of fnmatch when opt.ignore_case is requested. (in_acclist): Respect opt.ignore_case. (frontcmp): Respect opt.ignore_case. * src/options.h (struct options): New flag opt.ignore_case. 2005-07-06 Hrvoje Niksic * src/sysdep.h: Add a full declaration of fnmatch.h. 2005-07-06 Hrvoje Niksic * src/ptimer.c: Measure time in seconds rather than milliseconds. Adjusted all callers. 2005-07-06 Hrvoje Niksic * src/mswindows.h: Use strtoll where available. 2005-07-06 Hrvoje Niksic * src/http.c (gethttp): When freeing MESSAGE, take into account that it can be NULL. 2005-07-06 Hrvoje Niksic * configure.in: Don't check for setjmp.h. 2005-07-06 Hrvoje Niksic * Makefile.in: Also use @LIBGNUTLS@ to build LIBS. 2005-07-05 Hrvoje Niksic * src/wget.h (or): Define HAVE_SSL when either HAVE_OPENSSL or HAVE_GNUTLS are defined. * src/gnutls.c: New file. 2005-07-05 Hrvoje Niksic * src/http.c (gethttp): Don't print the request write error message twice. 2005-07-05 Hrvoje Niksic * src/cmpt.c (timegm): Remove unused variable. 2005-07-05 Hrvoje Niksic * src/cmpt.c (timegm): Handle years after 2099. 2005-07-05 Hrvoje Niksic * src/cmpt.c (timegm): Don't call mktime; simply count the seconds between 1970-01-01 and the specified date. 2005-07-05 Hrvoje Niksic * configure.in: Add check for GnuTLS if --with-ssl=gnutls is used. 2005-07-04 Hrvoje Niksic * src/xmalloc.c (debugging_free): Prefix hex pointer value with "0x" when printing. 2005-07-04 Hrvoje Niksic * src/utils.c (base64_decode): Don't silently tolerate non-base64 non-white-space characters in the base64 stream. 2005-07-04 Hrvoje Niksic * src/utils.c (NEXT_BASE64_CHAR): Rename to NEXT_CHAR and simplify to get the next non-whitespace character. 2005-07-04 Hrvoje Niksic * src/openssl.c (openssl_errstr): Separate error messages with "; ". 2005-07-04 Hrvoje Niksic * src/openssl.c (openssl_errstr): Instead of always using a large static buffer, only allocate the error string when there is an actual error. 2005-07-04 Hrvoje Niksic * src/connect.c (LAZY_RETRIEVE_INFO): Make last_tick unsigned to match transport_map_modified_tick. 2005-07-04 Hrvoje Niksic * src/config-post.h (alloca): Updated declaration to not enumerate all Windows compilers. 2005-07-03 Hrvoje Niksic * src/url.c (path_end): Skip separators appropriate for the scheme. (strpbrk_or_eos): Remove gcc-specific version, as the optimization it tried to perform no longer applies. 2005-07-03 Hrvoje Niksic * src/mswindows.h: Also wrap accept() and listen(). 2005-07-03 Hrvoje Niksic * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Use fd_errstr. * src/connect.c (fd_register_transport): Restructure parameters to include only a single structure that describes transport implementation. * src/openssl.c (openssl_errstr): New function: dump SSL error strings into a static buffer and return a pointer to the buffer. * src/connect.c (fd_errstr): New function; returns transport-specific error message, or strerror(errno) if transport doesn't supply one. 2005-07-03 Hrvoje Niksic * po/POTFILES.in: Include src/ptimer.c. 2005-07-02 Hrvoje Niksic * src/version.c: Don't use "cvs" in version name, since we're not using CVS anymore. 2005-07-02 Hrvoje Niksic * src/url.c (url_parse): Would crash when parsing fragments. Support fragments for FTP URLs too. 2005-07-02 Hrvoje Niksic * src/progress.c (create_image): Ditto. * src/retr.c (retr_rate): Display smaller rate numbers with greater precision. 2005-07-02 Hrvoje Niksic * src/http.c (response_head_terminator): Minor optimization. * src/retr.c (fd_read_hunk): Call terminator with pointer to the start of the data and the pointer to the current data. Changed all callers. 2005-07-02 Hrvoje Niksic * src/http.c (gethttp): Skip error message body in the keep-alive case. 2005-07-02 Hrvoje Niksic * src/host.c: Remove extraneous definition of netdb.h. 2005-07-02 Hrvoje Niksic * src/host.c: Don't include "connect.h" now that we no longer have socket_has_inet6. 2005-07-01 Hrvoje Niksic * src/url.c (url_parse): Make sure u->params is not initialized for http/https URLs. (url_parse): Don't crash on garbage following []-delimited IPv6 addresses. 2005-07-01 Hrvoje Niksic * src/main.c (print_help): Don't refer to the non-existent -nr in description of --mirror. 2005-07-01 Hrvoje Niksic * configure.in: Mention in message that the "GNU" md5 implementation is in fact built-in to Wget. 2005-06-30 Hrvoje Niksic * src/http.c (gethttp): Explicitly document the different cases when generating the Host header. 2005-06-30 Hrvoje Niksic * src/host.c (pretty_print_address): Renamed to just print_address. Clarify documentation. 2005-06-30 Hrvoje Niksic * src/host.c (pretty_print_address): Handle error result from inet_ntop. 2005-06-30 Gisle Vanem * src/mswindows.c (inet_ntop): New function. Print IPv6 addresses using WSAAddressToString. 2005-06-29 Hrvoje Niksic * src/wget.h: Remove obsolete definition of with_thousand_seps_sum. 2005-06-29 Hrvoje Niksic * src/utils.c: Unconditionally include locale.h. 2005-06-29 Hrvoje Niksic * src/utils.c (random_number): Use lrand48 if available. (random_float): Use drand48 if available. 2005-06-29 Hrvoje Niksic * src/ptimer.c: Include sys/time.h to get struct timeval. 2005-06-29 Hrvoje Niksic * src/main.c: Check for both SIGHUP and SIGUSR1 before using them. 2005-06-29 Hrvoje Niksic * src/main.c (secs_to_human_time): Use print_decimal when printing total download time in seconds. * src/progress.c (print_row_stats): Use it to print total download time at the end of the download. (create_image): Ditto. * src/utils.c (print_decimal): New function; print small decimal numbers with more precision than large ones. * src/progress.c (print_row_stats): New function. Print ETA after the download rate at the end of each row. 2005-06-29 Hrvoje Niksic * src/gnu-md5.h: Unconditionally include limits.h. 2005-06-29 Hrvoje Niksic * m4/wget.m4 (WGET_WITH_NLS): Don't check for locale.h. 2005-06-29 Hrvoje Niksic * configure.in: Test for $LIBSSL instead of the old $ssl_success when deciding which MD5 to use. 2005-06-29 Hrvoje Niksic * configure.in: Require Autoconf 2.59. 2005-06-29 Hrvoje Niksic * configure.in: Check for drand48. 2005-06-28 Hrvoje Niksic * src/init.c (parse_line): Check for alphanumerics. 2005-06-28 Hrvoje Niksic * src/ftp.c (getftp): Delete trailing newlines from LIST output so lines don't come out with trailing \015\012 with -S. 2005-06-28 Hrvoje Niksic * src/(dot_create): Remove unnecessary casts. 2005-06-28 Hrvoje Niksic * doc/wget.texi (Logging and Input File Options): Don't claim that --base requires --force-html to work. 2005-06-27 Hrvoje Niksic * src/wget.h (PTR_FORMAT): Cast the result of sizeof to int before passing it to printf's %*. * src/retr.h: Declare output_stream and output_stream_regular. * src/ftp.h: Declare ftp_last_respline. * src/convert.h: Declare dl_url_file_map. * src/http.h: New file. 2005-06-27 Hrvoje Niksic * src/utils.c (with_thousand_seps): Handle negative numbers. 2005-06-27 Hrvoje Niksic * src/utils.c (human_readable): Remove intermediary cast to long; MSVC has problems casting *unsigned* __int64 to double. 2005-06-27 Hrvoje Niksic * src/utils.c (get_grouping_data): Force the use of separators in C locale. 2005-06-27 Hrvoje Niksic * src/utils.c (get_grouping_data): Force separator to "." rather than " " when "," is taken. 2005-06-27 Hrvoje Niksic * src/sysdep.h: Use the system-provided fnmatch by default. 2005-06-27 Hrvoje Niksic * src/progress.c (set_progress_implementation): Type COLON as const char *. 2005-06-27 Hrvoje Niksic * src/progress.c (dot_update): Remove unused variable row_qty. 2005-06-27 Hrvoje Niksic * src/mswindows.h: Remove superfluous includes. 2005-06-27 Hrvoje Niksic * src/main.c (i18n_initialize): Set all locale categories. * src/http.c (http_atotm): Temporarily set locale to "C". 2005-06-27 Hrvoje Niksic * src/http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c. Don't compile it if GNU timegm is available. (http_atotm): Use timegm. 2005-06-27 Hrvoje Niksic * src/http.c (http_atotm): Correctly query the old locale value. 2005-06-27 Hrvoje Niksic * src/http.c (gethttp): Improve "POST data file missing" error message. 2005-06-27 Hrvoje Niksic * src/cookies.c: Make cookies_now static. 2005-06-27 Hrvoje Niksic * src/config-post.h (alloca): Don't #define alloca under MinGW32, which defines it in malloc.h, included from mswindows.h. 2005-06-27 Hrvoje Niksic * src/config-post.h (alloca): Amend alloca declaration to take care of all Win32 compilers, not just MSVC and MinGW. 2005-06-26 Hrvoje Niksic * src/utils.c (with_thousand_seps): Correctly implement thousand seps consisting of more than one character. 2005-06-26 Hrvoje Niksic * src/progress.c (create_image): Mark the "eta" string for translation. 2005-06-26 Hrvoje Niksic * src/main.c (secs_to_human_time): Ditto. * src/progress.c (create_image): Print more exact duration of very short downloads. * src/main.c (secs_to_human_time): Don't translate time suffixes "h", "m", and "s", which are not strictly SI, but are "accepted for use with SI". (secs_to_human_time): Print really small intervals as 0s, not 0.00s. 2005-06-26 Hrvoje Niksic * src/main.c (main): Print the downloaded and quota amounts with the "human_readable" function. * src/ftp.c (print_length): Ditto. * src/http.c (gethttp): Don't display thousand separators. * src/utils.c (with_thousand_seps): Rewritten to respect locale settings and to be type size agnostic. 2005-06-26 Hrvoje Niksic * src/html-url.c (get_urls_file): Don't explicitly set entry->next to NULL since entry is already zeroed out. 2005-06-26 Hrvoje Niksic * src/ftp.c (getftp): Always invoke SIZE, not only when continuing a download. * src/main.c (main): Ditto here. * src/progress.c (create_image): When the download is finished, print how long it took. 2005-06-26 Hrvoje Niksic * src/config-post.h: Replace the alloca declaration with the one from the latest Autoconf manual. This should remove a warning with GCC on AIX. 2005-06-26 Hrvoje Niksic * m4/wget.m4: Use proper GPL header. 2005-06-26 Gisle Vanem * src/mswindows.h: Define gai_strerror under MinGW. 2005-06-25 Hrvoje Niksic * src/utils.c (with_thousand_seps_sum): Now defined only if SUM_SIZE_INT is double. * src/wget.h (SUM_SIZE_INT): Instead of bothering with long, long long, __int64, and friends, simply either use wgint or double, end of story. Since we know how to print either, we no longer need LARGE_INT_FMT. * src/sysdeps.h (LARGE_INT): Renamed to SUM_SIZE_INT to better reflect its intent, and moved to wget.h. 2005-06-25 Hrvoje Niksic * src/utils.c (with_thousand_seps_sum): Decrease buffer size so it cannot overrun add_thousand_seps's buffer. 2005-06-25 Hrvoje Niksic * src/utils.c (human_readable): Divide with 1024 instead of shifting so the operation can work with non-integer N. 2005-06-25 Hrvoje Niksic * src/utils.c (SPRINTF_WGINT): The correct format is %I64d, not just %I64. 2005-06-25 Hrvoje Niksic * src/progress.c (eta_to_human): New logic for more human-readable ETA. 2005-06-25 Hrvoje Niksic * src/http.c (http_loop): Don't warn about wildcards in HTTP URLs if globbing isn't requested in the first place. * src/retr.c (retrieve_url): Temporarily turn off globbing when processing HTTP->FTP redirects. 2005-06-25 Hrvoje Niksic * src/cookies.c (parse_set_cookies): Cast pointer subtraction to int before using it with %d; AIX compiler warns on this. Reported by Jens Schleusener. 2005-06-25 Hrvoje Niksic * src/Makefile.in: No need to clean .libs. 2005-06-25 Hrvoje Niksic * doc/wget.texi (Download Options): Update -4/-6 documentation to reflect the fact that we no longer use AI_ADDRCONFIG. 2005-06-25 Hrvoje Niksic * Makefile.in: No need to clean .libs. 2005-06-25 Hrvoje Niksic * Makefile.in: Instead of creating configure.bat from configure.bat.in, simply make sure the correct EOL style in checked out of the repository. 2005-06-25 Hrvoje Niksic * Makefile.in (DISTFILES): Don't split the sed invocation across several lines, Solaris make passes the backslashes to sed literally. 2005-06-24 Hrvoje Niksic * src/init.c: opt.verbose must be declared as int. 2005-06-24 Hrvoje Niksic * src/http.c (gethttp): Don't prepend / here. * src/cookies.c (cookie_handle_set_cookie): Prepend / to PATH. (cookie_header): Ditto. 2005-06-24 Hrvoje Niksic * doc/gpl.texi (GNU General Public License): Split GPL text into a separate file and include it from wget.texi. Used the latest template from gnu.org with the updated address of the FSF. 2005-06-24 Hrvoje Niksic * configure.in: Use AC_LIB_HAVE_LINKFLAGS instead of AC_LIB_LINKFLAGS when checking for library functions. * configure.in: Don't waste time checking for headers and functions we know must be there. But manually AC_DEFINE the functions that might be missing from non-Unix systems. 2005-06-24 Hrvoje Niksic * configure.in: Move the large file check further up. Only check for endianness if GNU md5 is used (it being the only file that needs endianness information). 2005-06-24 Hrvoje Niksic * configure.in: Include m4/*.m4. * aclocal.m4: Renamed to m4/wget.m4. 2005-06-24 Hrvoje Niksic * configure.in: Enable the user to turn off SSL autodetection and disable SSL using --without-ssl. * Makefile.in ($(srcdir)/stamp-h.in): Remove the aclocal.m4 dependencies. 2005-06-24 Hrvoje Niksic * configure.in: Don't indent #include lines. 2005-06-23 Mauro Tortonesi * libtool.m4, ltmain.sh: Deleted. * configure.in: Replaced ugly libtool-based check for OpenSSL libs with a simpler config.rpath-based approach. * Makefile.in, src/Makefile.in: Removed libtool support. * m4/lib-link.m4, m4/lib-prefix.m4, m4/lib-ld.m4, config.rpath: config.rpath macros taken from gettext 0.14.5. 2005-06-23 Hrvoje Niksic * util/dist-wget: Port to subversion. 2005-06-23 Hrvoje Niksic * src/utils.c (read_file): Ditto. * src/main.c (main): Use struct_fstat. * src/mswindows.h (struct_fstat): Define a struct_fstat to deal with the fact that Borland 5.5 has 64-bit stat, but not 64-bit fstat! 2005-06-23 Hrvoje Niksic * src/sysdep.h: Remove code that deals with Watcom. 2005-06-23 Hrvoje Niksic * src/cmpt.c (strpbrk): Removed. (mktime): Removed. Include . 2005-06-23 Hrvoje Niksic * doc/wget.texi (Contributors): Updated list of principal contributors. 2005-06-23 Hrvoje Niksic * configure.in: Don't check for strpbrk and mktime. 2005-06-22 Hrvoje Niksic * src/sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf. 2005-06-22 Hrvoje Niksic * src/openssl.c, connect.c, host.c: Replace instances of #ifdef ENABLE_DEBUG if (opt.debug) {...} #endif with IF_DEBUG {...}. * src/main.c: Rename the IF_DEBUG defined here to WHEN_DEBUG. * src/wget.h (IF_DEBUG): New macro. (DEBUGP): Define in terms of IF_DEBUG. 2005-06-22 Hrvoje Niksic * src/init.c (cmd_lockable_boolean): Removed. 2005-06-22 Hrvoje Niksic * src/http.c (gethttp): Only handle --set-cookies (and assert that cookie jar exists) if opt.cookies is true. Failure to do so triggered the assert when --no-cookies was used and the server sent a Set-Cookie header. Ouch! 2005-06-22 Hrvoje Niksic * src/cookies.c (struct cookie): Use 1-bit bitfields for booleans which makes the structure takes less space at no cost in complexity. 2005-06-22 Hrvoje Niksic * src/connect.c (select_fd): Expect select() to exist. * src/utils.c (xsleep): Always use select() as sleep fallback on non-Windows platforms. * src/ptimer.c: Delete the implementation of PTIMER_TIME. * src/main.c: Assume existence of signal(), test for different signal names instead. * src/cmpt.c: Better document reasons why certain functions are included. 2005-06-22 Hrvoje Niksic * src/all: Use bool instead of int and false/true instead of 0/non-0 for boolean variables and values. 2005-06-22 Hrvoje Niksic * src/Makefile.in: Remove the manually maintained dependency list; make all object files depend on every header. 2005-06-22 Hrvoje Niksic * src/Makefile.in ($(OBJ)): Add the config.h dependency. 2005-06-22 Hrvoje Niksic * doc/wget.texi: Use the more standard authorship phrase "and others". 2005-06-22 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Remove the "lockable boolean" feature. 2005-06-22 Hrvoje Niksic * doc/wget.texi (Overview): Remove explicit vertical spacing. 2005-06-22 Hrvoje Niksic * doc/wget.texi (Mailing List): Remove reference to the wget-cvs list, which no longer exists. 2005-06-22 Hrvoje Niksic * doc/texinfo.tex: Update with a non-prehistoric version. 2005-06-22 Hrvoje Niksic * doc/texi2pod.pl: Locate perl using the "env" program, so we don't need to modify texi2pod. * doc/Makefile.in (wget.pod): Work with texi2pod.pl directly instead of generating it from texi2pod.pl.in. 2005-06-22 Hrvoje Niksic * configure.in: Don't check for signal.h. Remove the AC_HEADER_TIME check. Remove the test for ANSI C prototypes. 2005-06-22 Hrvoje Niksic * configure.in: Check for C99 conformant stdbool.h. 2005-06-22 Hrvoje Niksic * configure.in: Assume existence of gettimeofday and select. gettimeofday exists on all platforms we care about (except for Windows where Windows-specific functions are used instead), and select exists virtually everywhere. * configure.in: Assume existence of strerror, signal, strstr, and memmove, which are all required by ANSI C. 2005-06-22 Hrvoje Niksic * config.sub, config.guess: Updated from canonical location. 2005-06-22 Hrvoje Niksic * autogen.sh: New file. * Makefile.svn: Deleted, replaced with the even simpler (and more standard) `autogen.sh' script. 2005-06-22 Hrvoje Niksic * README.svn: Renamed to README.checkout. Edited to mention the autogen.sh script. 2005-06-22 Hrvoje Niksic * MAILING-LIST: Remove reference to the obsolete `wget-cvs' mailing list. 2005-06-21 Hrvoje Niksic * Makefile.cvs: Renamed to Makefile.svn. * README.cvs: Renamed to README.svn. 2005-06-20 Hrvoje Niksic * src/main.c, ptimer.c, sysdep.h, utils.c: Use #elif to simplify reading of chained if-else-else-else-... statements. 2005-06-20 Hrvoje Niksic * src/hash.c: Rename "mapping" to "cell" to avoid confusion with the term "mapping" (or "map") sometimes being used for the entire hash table. Also rename "non-empty" to "occupied" for easier reading of if (!NON_EMPTY (...)) ... . 2005-06-20 Hrvoje Niksic * src/all: Return type of signal handlers is `void'. Include signal.h unconditionally. * src/all: Don't explicitly cast values returned by malloc. We no longer support ancient compilers that don't declare malloc, and we never supported C++ builds. 2005-06-20 Hrvoje Niksic * doc/ansi2knr.1: Removed. 2005-06-20 Hrvoje Niksic * configure.in: Don't check for the return type of signal handlers; C89 requires it to be void. 2005-06-19 Hrvoje Niksic * src/init.c (cmd_lockable_boolean): Don't recognize literal "2" and "-1" values; unlike 0 and 1, those should never be exposed to the user. Update the error message to be more self-consistent, as proposed by Benno Schulenberg. 2005-06-19 Hrvoje Niksic * src/all: Don't declare errno. Include both time.h and sys/time.h, as long as sys/time.h exists. Don't dereference function pointers when invoking the functions they point to. * src/cmpt.c (memmove): Remove function mandated by C89. (strerror): Ditto. (strstr): Ditto. * src/all: Undo the K&R-ization changes from 2005-05-03. * src/all: Remove support for K&R compilers: use C89 function declarations, remove definition of PARAMS, remove support for varargs, and remove ansi2knr. Assume the presence of time.h, string.h, and other headers mandated by C89. 2005-06-19 Hrvoje Niksic * aclocal.m4: Remove support for K&R compilers. 2005-06-18 Hrvoje Niksic * src/http.c (gethttp): When -E is in use, check for file existence after appending ".html" to the name and modify the file name if necessary. 2005-06-18 Hrvoje Niksic * src/http.c (gethttp): Don't free "head" before using it to save headers. 2005-06-17 Hrvoje Niksic * src/connect.c (socket_has_inet6): Removed. * src/host.c (lookup_host): Don't use the AI_ADDRCONFIG getaddrinfo hint. 2005-06-16 Hrvoje Niksic * src/init.c (cmd_lockable_boolean): Improve the error message so it lists the more useful values first. 2005-06-16 Hrvoje Niksic * doc/wget.texi (Logging and Input File Options): It's --no-verbose, not --non-verbose. 2005-06-15 Hrvoje Niksic * src/http.c (gethttp): Also report the system error when the POST data file is missing. 2005-06-15 Hrvoje Niksic * src/host.h (ip_address): Remove the trailing comma from the type enum in the no-IPv6 case. * src/main.c (struct cmdline_option): Remove the trailing comma from the enum. Reported by Jens Schleusener. 2005-06-15 Benno Schulenberg * src/ftp.c, http.c, connect.c, cookies.c, html-url.c, init.c, res.c: Gettext-ize messages that were previously missed. 2005-06-06 Keith Moore * doc/Makefile.in: Fix a harmless (but annoying) installation warning. 2005-05-30 Hrvoje Niksic * src/url.c (strpbrk_or_eos): Check for a recent GCC version before using the statement-as-expression extension. 2005-05-30 Hrvoje Niksic * src/init.c (cmd_spec_header): Don't split the string along the commas using cmd_vector; just append the new value using vec_append instead. * src/utils.c (vec_append): New function. 2005-05-30 Hrvoje Niksic * src/http.c (gethttp): Don't attempt to "skip short body" if we're issuing a HEAD request (in which case the response head is not followed by a body). 2005-05-30 Hrvoje Niksic * doc/wget.texi (HTTP Options): Removed statement that redirect in response to POST is "technically disallowed", which I cannot find in rfc2616 nor in rfc1945. Even if that were technically the case, the widespreadedness of such responses would make the prohibition irrelevant. 2005-05-27 Andreas Beckmann * src/html-url.c (tag_handle_link): Mark the content from the tag as expecting HTML. 2005-05-24 Hrvoje Niksic * src/http.c (http_atotm): Document the origin of the "cookie date" format. 2005-05-21 Hrvoje Niksic * src/init.c (setval_internal): Report exact command name alongside the "display name". 2005-05-18 Hrvoje Niksic * src/cookies.c (update_cookie_field): Explicitly cast -1 to time_t to cope with systems where time_t is unsigned. * src/cookies.c: Remove unnecessary casts to time_t from values already of that type. 2005-05-17 Hrvoje Niksic * src/ftp.c (ftp_loop_internal): Same here. * src/http.c (http_loop): Don't clobber the file when -c is specified and the first attempt to retrieve the file fails. 2005-05-16 Hrvoje Niksic * src/openssl.c (ssl_check_certificate): Print all issues with a certificate. 2005-05-16 Hrvoje Niksic * src/init.c (cleanup): Don't free the non-existent opt.ftp_acc. Free the SSL-related stuff. 2005-05-16 Hrvoje Niksic * src/ftp.c (print_length): Consistently print \n at end of the "Length" line. 2005-05-16 Hrvoje Niksic * src/ftp-basic.c: Don't xfree() the line returned by ftp_response if the returned code is not FTPOK. 2005-05-14 Hrvoje Niksic * src/openssl.c (ssl_connect): Announce the beginning and the end of the SSL handshake when in debug mode. * src/wget.h (PTR_FORMAT): New macro for easier printing of pointer values. Use %0*lx along with PTR_FORMAT instead of %p. 2005-05-14 Hrvoje Niksic * src/http.c (gethttp): Would forget to close the connection when keep_alive was not used. 2005-05-14 Hrvoje Niksic * doc/wget.texi (Overview): Document --[no-]proxy as primarily being used to turn *off* the use of proxies. 2005-05-13 Hrvoje Niksic * src/openssl.c (pattern_match): Document the code that decides whether "*" matches ".". 2005-05-12 Hrvoje Niksic * src/url.c (rewrite_shorthand_url): Don't rewrite "https://host" to "ftp://https//host" when SSL is not used. 2005-05-12 Hrvoje Niksic * src/ftp-ls.c (ftp_index): Use %d to print the port number, which is now int. From Steven M. Schweda's VMS patches. 2005-05-11 Hrvoje Niksic * src/openssl.c (ssl_init): Always use SSL_VERIFY_NONE, so that the handshake finishes even if the certificate is invalid. That way ssl_check_server_identity can provide better diagnostics on why the verification failed. 2005-05-11 Hrvoje Niksic * src/openssl.c (ssl_check_server_identity): Renamed to ssl_check_certificate because it does more than just checking the server's identity. (ssl_check_certificate): Tell the user about --no-check-certificate. 2005-05-11 Hrvoje Niksic * src/openssl.c (pattern_match): New function. (ssl_check_server_identity): Treat peer certificate common name as wildcard. 2005-05-11 Hrvoje Niksic * doc/wget.texi (HTTPS (SSL/TLS) Options): Explain certificate checking in more detail. 2005-05-10 Hrvoje Niksic * src/res.c (res_register_specs): Correctly pass pointers to hash_table_get_pair. 2005-05-10 Hrvoje Niksic * src/openssl.c (ssl_check_server_identity): Print certificate subject and issuer. 2005-05-10 Hrvoje Niksic * src/http.c (gethttp): Call ssl_check_server_identity. * src/openssl.c (ssl_check_server_identity): New function, verifies that the host name in the certificate matches the actual host name. (verify_cert_callback): Removed, since it didn't do anything except returning the preverify_ok argument. * src/connect.c (fd_transport_context): Allow retrieval of the context pointer registered with fd_register_transport. 2005-05-10 Hrvoje Niksic * configure.in: Test for OpenSSL includes we actually need. 2005-05-09 Hrvoje Niksic * src/openssl.c (verify_cert_callback): Renamed from verify_callback. Always return the received "ok" value. Print the X509 name in debug mode. (ssl_init): Enable partial writes in SSL context. 2005-05-08 Hrvoje Niksic * src/netrc.c (parse_netrc): Explicitly check for assignment != NULL to silence warning from Borland C. * src/url.c (sync_path): Don't unnecessarily increment p. (url_parse): Don't unnecessarily set url_encode to NULL just prior to return from the function. 2005-05-08 Hrvoje Niksic * src/log.c (escnonprint_internal): Place variable declarations before other statements. 2005-05-08 Hrvoje Niksic * src/init.c (run_command): Correctly interpret the return value of parse_line. (commands): Re-alphabetize. 2005-05-08 Hrvoje Niksic * src/http.c (http_loop): Check for wildcards in the URL path component, not in the whole URL. * src/ftp.c (ftp_loop): Check for wildcards in URL path before unescaping, so the users can escape globbing metacharacters with % escapes. 2005-05-08 Hrvoje Niksic * src/html-url.c: Include recur.h. * src/http.c (request_new): Define as accepting no args. 2005-05-08 Hrvoje Niksic * doc/texi2pod.pl.in: Allow an "EXAMPLES" section. 2005-05-07 Hrvoje Niksic * src/url.c (strpbrk_or_eos): Made inline. Use strchr(s, '\0') for finding the NUL char position. 2005-05-07 Hrvoje Niksic * src/url.c (decide_copy_method): Renamed to char_needs_escaping. Since it now returns only two possible values, change it to return boolean (int). 2005-05-07 Hrvoje Niksic * src/url.c (decide_copy_method): Never cause reencode_escapes to decode % escapes; it is too intrusive and breaks some servers. 2005-05-07 Hrvoje Niksic * src/http.c (gethttp): When tunnelling SSL traffic over proxy with CONNECT, we're really talking to the remote server directly. Because of this, the request-line argument must be the URL path rather than the whole URL, as it would be when using regular proxies. Reported by Charles Lane. 2005-05-07 Hrvoje Niksic * src/ftp-basic.c (ftp_request): Prevent newlines in VALUE causing inadvertent sending of multiple FTP commands. 2005-05-06 Hrvoje Niksic * src/main.c (print_help): Fix wording of --secure-protocol help text. 2005-05-06 Hrvoje Niksic * src/init.c (cmd_spec_useragent): Allow empty User-Agent. * src/http.c (gethttp): Don't print "unknown authentication scheme" for failed Basic authentication. (SET_USER_AGENT): Don't set user-agent if opt.useragent is empty. (gethttp): Use alloca for allocation of www_authenticate. 2005-05-06 Hrvoje Niksic * src/cmpt.c (strstr): Updated from glibc 2.3.5. 2005-05-06 Hrvoje Niksic * doc/wget.texi (HTTP Options): Document empty user-agent. 2005-05-06 Hrvoje Niksic * doc/wget.texi (Download Options): Explain that the read timeout really refers to idle timeout. (Download Options): Mention that decimal and subsecond values may be used for timeouts. 2005-05-06 Hrvoje Niksic * configure.in: Set MAKEINFO to "true" so build doesn't fail for users without either makeinfo or the pre-packaged info files. 2005-05-06 Hrvoje Niksic * Makefile.in ($(srcdir)/stamp-h.in): Don't print the line with the comment about running autoheader. 2005-05-05 Hrvoje Niksic * src/utils.c (touch): Set access time to current time. 2005-05-05 Hrvoje Niksic * src/url.c (url_unescape): Don't unescape %00, it effectively truncates the string. 2005-05-05 Hrvoje Niksic * src/retr.c (limit_bandwidth_reset): Reset sleep_adjust. (limit_bandwidth): Don't allow huge "adjustment" values that result from being suspended for a while. 2005-05-05 Hrvoje Niksic * src/main.c (main): Propagate option name to setoptval. * src/init.c (setoptval): Accept another argument, OPTNAME. Propagate that argument as the option name independently of the actual command, determined by command_by_name(com). 2005-05-05 Hrvoje Niksic * src/log.c (copy_and_escape): Slightly reduce code repetition between the two loops. 2005-05-05 Hrvoje Niksic * src/log.c (copy_and_escape): Replace the FOR_URI argument with a slightly more general mechanism for specifying different kinds of escape. 2005-05-05 Hrvoje Niksic * src/init.c (parse_line): Make the return value indicate whether there was a syntax error or a setter failed. (run_wgetrc): Return an indication on whether an error has been encountered. (initialize): Abort if there have been errors running either .wgetrc file. 2005-05-05 Hrvoje Niksic * src/http.c (http_atotm): Zero out the whole struct tm being passed to strptime. 2005-05-05 Hrvoje Niksic * src/ftp-basic.c (ftp_response): Fix printing FTP server response. 2005-05-05 Hrvoje Niksic * doc/wget.texi: We're using GFDL 1.2, not 1.1. 2005-05-05 Hrvoje Niksic * doc/wget.texi (Contributors): Updated. 2005-05-05 Charles C.Fu * src/utils.c (proclist): Strip leading slash when calling fnmatch too, otherwise wildcard comparisons always fail. 2005-05-04 Hrvoje Niksic * src/wget.h: If gettext was found but libtintl.h wasn't, declare gettext's return type to avoid type mismatches. 2005-05-03 Hrvoje Niksic * src/url.c (url_parse): Rename label `error' to avoid conflict with identifier. * src/retr.c (fd_read_body): Rename label `out' to avoid conflict with identifier. (fd_read_hunk): Use explicit double constant. (retrieve_from_file): Don't use string concatenation. (sleep_between_retrievals): Make sure xsleep is called with a `double' argument. (no_proxy_match): Define as static, like it is declared. * src/progress.c (bar_create): Use 0.0 instead of 0 because K&R compilers can't automatically promote it. * src/http-ntlm.c (ntlm_output): Replace \xHH sequences with \OOO for the sake of old compilers. * src/ftp.c (ftp_loop_internal): Don't use string concatenation. * src/http.c (request_send): Use explicit double constants when calling fd_read and fd_write. (post_file): Ditto. (gethttp): Ditto. (skip_short_body): Ditto. * src/ftp-basic.c: When calling fd_write, specify the last argument as a `double' constant for the sake of K&R compilers which don't see the prototype and therefore can't promote it to double automatically. * src/cookies.c (cookie_jar_load): Rename abort label to abort_cookie to avoid name conflict in K&R compilers. 2005-05-02 Hrvoje Niksic * INSTALL: Document environment variables affecting configure, especially $CC. * INSTALL: Mention that make install requires root. 2005-04-29 Hrvoje Niksic * src/ptimer.c (posix_init): Since we allow _POSIX_MONOTONIC_CLOCK==0, it is not enough to check for _POSIX_MONOTONIC_CLOCK-0, we must also check for defined(_POSIX_MONOTONIC_CLOCK). 2005-04-29 Hrvoje Niksic * configure.in: Don't set ipv6 to yes only because struct sockaddr_in6 was found. Stop the rest of the IPv6 checks when one check fails. Abort if IPv6 was explicitly requested, but not found. 2005-04-28 Hrvoje Niksic * windows/Makefile.top.bor: Use MAKEDIR for make clean too. 2005-04-28 Hrvoje Niksic * windows/Makefile.src.bor: Don't suppress unreachable code warning. 2005-04-28 Hrvoje Niksic * windows/Makefile.src.bor: Don't delete executables other than wget.exe. Delete various auxilliary files created by the Borland build process. 2005-04-28 Hrvoje Niksic * src/init.c (commands): Wrap the use of opt.random_file in #ifdef HAVE_SSL. 2005-04-28 Hrvoje Niksic * src/http.c (gethttp): Correctly set the user agent. 2005-04-28 Hrvoje Niksic * src/ftp.c, hash.c, connect.c, host.c, http.c: Remove unreached code, such as "break" following return or abort. 2005-04-28 Hrvoje Niksic * NEWS: Advertise new-style syntax for --no-dns-cache instead of --dns-cache=off. 2005-04-28 Hrvoje Niksic * INSTALL: Mention --disable-ntlm. 2005-04-28 Herold Heiko * windows/wget.dep: Rename gen_sslfunc.c to openssl.c. 2005-04-27 Mauro Tortonesi * src/main.c: Map --ftp-password, --http-password and --proxy-password to the new ftppassword, httppassword and proxypassword commands respectively. Document the --user and --password options in the help string. 2005-04-27 Mauro Tortonesi * src/ftp.c: Add support for --user and --password. * src/http.c: Add support for --user and --password. * src/init.c: Deprecated ftppasswd, httppasswd, login, passwd and proxypasswd commands. Added ftppassword, ftpuser, httppassword, password, proxypassword and user commands. * src/main.c: Renamed --ftp-passwd to --ftp-password. Added --ftp-user, --http-password, --password, --proxy-password and --user. Deprecated --http-passwd and --proxy-passwd. Added documentation for new options and removed documentation for deprecated options in the help string. * src/options.h (struct options): Added user and passwd members to handle --user and --password respectively. Renamed ftp_acc and ftp_pass members to ftp_user and ftp_passwd for consistency. 2005-04-27 Mauro Tortonesi * doc/wget.texi: Fixed a broken reference to Security Considerations section in tex-generated documents (like the man page). 2005-04-27 Mauro Tortonesi * doc/wget.texi: Document --user, --password, --ftp-user and the corresponding Wgetrc command. Renamed --ftp-passwd to --ftp-password, --http-passwd to --http-passwd and --proxy-passwd to proxy_password. Renamed ftp_passwd to ftp_password, http_passwd to http_passwd and proxy_passwd to proxy_password. Removed documentation for the deprecated login command. 2005-04-27 Mauro Tortonesi * NEWS: Mention the new --ftp-user, --ftp-password, --user and --password options, the name changes for --http-passwd and --proxy-passwd and the deprecation of login and passwd commands. 2005-04-27 Hrvoje Niksic * src/openssl.c (ssl_init): Ditto. * src/options.h (struct options): Allow separate specification of key type and certificate type. * src/init.c (cmd_spec_cert_type): Provide a "der" synonym for "asn1" certificate encoding. 2005-04-27 Hrvoje Niksic * src/openssl.c (init_prng): Disable the weak random seed by default. * src/http.c (gethttp): Simplify SSL initialization; disable SSL when anything goes wrong with the initialization. * src/options.h (struct options): New option opt.random_file. 2005-04-27 Hrvoje Niksic * src/main.c (print_help): Advertise "DER", not "ASN1". 2005-04-27 Hrvoje Niksic * src/init.c: Wrap private key commands in IF_SSL. 2005-04-27 Hrvoje Niksic * src/init.c (cmd_spec_useragent): Free the old value of opt.useragent before setting the new one. 2005-04-27 Hrvoje Niksic * doc/wget.texi: Improve wording of command descriptions. 2005-04-27 Hrvoje Niksic * doc/wget.texi: Document the new form of SSL/TLS options. 2005-04-27 Hrvoje Niksic * doc/wget.texi (HTTPS (SSL/TLS) Options): Document --random-file. 2005-04-27 Hrvoje Niksic * doc/wget.texi (HTTP Options): Mention --keep-session-cookies when documenting --post-data. 2005-04-27 Hrvoje Niksic * doc/wget.texi (Download Options): Fix bind address cindex entry that broke concept index generation. 2005-04-26 Hrvoje Niksic * src/openssl.c: Renamed "gen_sslfunc.c" to "openssl.c" and "gen_sslfunc.h" to "openssl.h". This reflects the intent of openssl.c encapsulating the OpenSSL-specific code. 2005-04-26 Hrvoje Niksic * src/init.c: Renamed "closure" (a synonym for context in some cultures) to "place", which more accurately reflects the usage. 2005-04-26 Hrvoje Niksic * src/http.c (gethttp): Call skip_short_body only if keep_alive is in use. (gethttp): Send the User-Agent header with the CONNECT request as well. 2005-04-26 Hrvoje Niksic * src/gen_sslfunc.c (ssl_init): Use default locations for loading the certificate bundles. (ssl_init_prng): Disable the cryptographically weak PRNG initialization fallback. * src/init.c: Renamed SSL command-line arguments and wgetrc commands. (defaults): Check the server certificate by default. 2005-04-26 Hrvoje Niksic * src/cookies.c (cookie_handle_set_cookie): Delete the part of the path after the trailing slash. * src/http.c (gethttp): Call cookie_handle_set_cookie with path that begins with '/'. 2005-04-26 Hrvoje Niksic * doc/wget.texi (Option Syntax): Document boolean options. Include the option syntax in the man page. (Directory Options): Removed stray text after --protocol-directories. 2005-04-26 Hrvoje Niksic * doc/wget.texi (HTTP Options): Improved entry on --keep-session-cookies. 2005-04-26 Hrvoje Niksic * doc/wget.texi (Directory Options): Removed stray text after --protocol-directories. 2005-04-25 Hrvoje Niksic * src/main.c (option_data): Removed support for the undocumented flag --use-proxy. 2005-04-25 Hrvoje Niksic * src/main.c (option_data): Don't treat -Y as a boolean switch; treat it as a value switch instead, so "-Y off" continues to work. 2005-04-25 Hrvoje Niksic * doc/wget.texi (Download Options): Document --retry-connrefused. 2005-04-25 Hrvoje Niksic * doc/wget.texi (Advanced Usage): Don't advertise the non-existent `-s' option. 2005-04-25 Hrvoje Niksic * doc/Makefile.in (wget.info): Depend on version.texi as well. * doc/wget.texi: Simplify copyright. Replace remaining instances of --OPTION=off with --no-OPTION. 2005-04-24 Hrvoje Niksic * src/utils.c (aprintf): Delete unreachable statement. 2005-04-24 Hrvoje Niksic * src/host.c (cmp_prefer_ipv4): New function. (cmp_prefer_ipv6): New function. (lookup_host): Use the appropriate comparator according to opt.prefer_family. * src/init.c: New option prefer_family. * src/host.c (is_valid_ipv6_address): Spell NS_* constants in lower case to avoid clash with system headers. (lookup_host): Reorder the addresses so that IPv4 ones come first. * src/utils.c (stable_sort): New function. 2005-04-24 Hrvoje Niksic * src/connect.c (retryable_socket_connect_error): Return 0 for ENETUNREACH and EHOSTUNREACH. 2005-04-24 Hrvoje Niksic * doc/wget.texi (Download Options): Don't claim that -6 accepts mapped IPv4 addresses. 2005-04-24 Hrvoje Niksic * doc/wget.texi (Download Options): Document --prefer-family. 2005-04-23 Hrvoje Niksic * src/utils.c (base64_encode): Treat input as unsigned chars. Required for correct encoding of binary stuff. 2005-04-23 Hrvoje Niksic * src/http-ntlm.c: Format the function definitions in an ansi2knr-friendly fashion. 2005-04-23 Hrvoje Niksic * src/cmpt.c: Reenable the memmove implementation for systems that lack it. * src/http.c (gethttp): Store the "authorized" state of the persistent connection. (request_remove_header): New function. (gethttp): Don't send the "Basic" authentication if the connection is already authorized. 2005-04-23 Hrvoje Niksic * doc/wget.texi: Documented the SSL command-line options. 2005-04-23 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Document ftp_passwd. (FTP Options): Document --ftp-passwd. 2005-04-23 Hrvoje Niksic * doc/texi2pod.pl.in: First process @@ then @}, so @samp{-wget@@} is interpreted correctly. 2005-04-22 Hrvoje Niksic * src/http.c (gethttp): Handle multiple WWW-Authentication headers, only one of which is recognized. Those are sent by IIS with NTLM authorization. (create_authorization_line): Propagate information whether authorization is finished. (gethttp): Only stop authorization when it's really finished, not after fixed two steps. 2005-04-22 Hrvoje Niksic * po/eo.po: Added Esperanto translation. 2005-04-21 Hrvoje Niksic * src/main.c (print_help): Print the EGD option outside the cluster of SSL options. 2005-04-21 Hrvoje Niksic * src/http-ntlm.c (ntlm_output): Fix setting the domain. Suggested by Sami Krank. 2005-04-21 Hrvoje Niksic * src/gen_sslfunc.c (ssl_init): Fix warning message text; mark the message as translatable. 2005-04-21 Hrvoje Niksic * po/vi.po: Added Vietnamese translation. 2005-04-20 Mauro Tortonesi * src/connect.c: Set IPV6_V6ONLY socket option when -6 switch is used. 2005-04-20 Hrvoje Niksic * doc/wget.texi: Document behavior of -6 wrt mapped IPv4 addresses. 2005-04-20 Hrvoje Niksic * doc/wget.texi: Document IPv6 related options. 2005-04-20 FUJISHIMA Satsuki * src/http.c (request_set_header): Fix the check whether a new header needs to be allocated. 2005-04-18 Hrvoje Niksic * src/utils.c (base64_encode): Use the parameter order that makes more sense. Return the length of the base64 written. Updated all callers. 2005-04-18 Hrvoje Niksic * doc/wget.texi: Update mailing list information. 2005-04-18 Hrvoje Niksic * doc/wget.texi (Download Options): Don't claim that --no-dns-cache is necessary for dyndns servers -- it's not. 2005-04-18 Hrvoje Niksic * MACHINES: Removed. 2005-04-17 Hrvoje Niksic * src/snprintf.c (fmtstr): Declare VALUE as const char *. Based on patch by Russ Allbery. 2005-04-17 Hrvoje Niksic * src/snprintf.c (fmtfp): More correct handling of significant digit count with %g -- 0.002 has one significant digit, not three. 2005-04-17 Hrvoje Niksic * src/http.c (request_set_header): Free NAME when VALUE is NULL and freeing the header name is requested. 2005-04-16 Hrvoje Niksic * src/snprintf.c: Use the PARAMS macro to handle prototypes. Write function definitions in the ansi2knr-friendly way. (fmtstr): If string precision is specified, don't read VALUE past it. (dopr): Actually print %g and %e formats. (fmtfp): Fix a bug that caused 0.01 to be printed as 0.1. (fmtfp): Use LLONG in floating point conversions to be able to convert more digits. (fmtfp): Interpret precision as number of significant digits with %g. (fmtfp): Omit trailing decimal zeros with %g. * src/snprintf.c: Don't include because none of it is used. Include strings.h/string.h, as per Autoconf. 2005-04-16 Hrvoje Niksic * src/retr.c (fd_read_body): Respect read timeout with non-interactive or no progress gauge -- treat ETIMEDOUT specially only when progress_interactive. Reported by FUJISHIMA Satsuki. 2005-04-16 FUJISHIMA Satsuki * src/http.c (gethttp): Don't use HTTP/1.0 persistent connections over proxy. 2005-04-15 Hrvoje Niksic * src/ptimer.c: Use _POSIX_TIMERS - 0 > 0, which handles the case when _POSIX_TIMERS is defined but empty, as well as the case when it is undefined. Do the same with the check for _POSIX_MONOTONIC_CLOCK. Suggested by Larry Jones. 2005-04-15 Hrvoje Niksic * src/ptimer.c: Check that _POSIX_TIMERS is defined as well as > 0. Problem reported by Steven M. Schweda. 2005-04-14 Hrvoje Niksic * src/http.c (skip_short_body): Print the skipped body data in debug mode. (skip_short_body): Don't skip more than 4k of body data. (skip_short_body): Return whether the skipping was successful. (gethttp): If skip_short_body failed, invalidate the connection. 2005-04-12 Gisle Vanem * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Open the output file in binary mode. 2005-04-11 Hrvoje Niksic * src/xmalloc.c (register_ptr): Warn the user to increase SZ prior to aborting. 2005-04-11 Hrvoje Niksic * src/hash.c: Conditionalize including config.h on HAVE_CONFIG_H instead of on STANDALONE. 2005-04-11 Hrvoje Niksic * src/gen_sslfunc.c (ssl_print_errors): Made static. (ssl_print_errors): Eliminate potentially dangerous fixed-size error buffer. Passing NULL to ERR_error_string causes it to use its own static buffer, which is fine for our purposes. * src/gen_sslfunc.c: Include gen_sslfunc.h. Make the declarations of ssl_init and ssl_conect match the actual definitions. (ssl_connect): Simply return a boolean, the SSL context is no longer useful as a return value. * src/retr.c: Don't include SSL headers; we don't need them. 2005-04-11 Hrvoje Niksic * src/convert.c (convert_cleanup): Free converted_files. 2005-04-11 Hrvoje Niksic * src/config-post.h: Don't define _VA_LIST under Solaris; it breaks compilation with GCC 3.4 under Solaris 10. (It was defined to avoid a warning with previous versions of GCC.) 2005-04-10 Hrvoje Niksic * src/wget.h (DEBUGP): Use __builtin_expect to give a hint to GCC that opt.debug is false in the vast majority of cases. 2005-04-10 Hrvoje Niksic * src/config-post.h: Declare alloca as void *, not char *. 2005-04-09 Hrvoje Niksic * src/url.c: Use "static const" in preference to "const static". Sun's cc warns that "storage class after type is obsolescent". * src/url.c (urlchr_table): Don't mark ~ as unsafe, too many broken web sites are confused when ~ is changed to %7E. Their servers redirect /%7Efoo/ to /~foo/, which Wget again accesses using %7E, causing further redirections, therefore looping infinitely. See Debian bug #301624 for an example. 2005-04-09 Hrvoje Niksic * src/recur.c (download_child_p): When -p is used, (temporarily) ignore accept/reject rules for HTMLs, even when they are at the maximum recursion depth. That is because with -p we are, if necessary, overstepping the max. depth to get the requisites. 2005-04-09 Hrvoje Niksic * src/http-ntlm.c (ntlm_output): Use "char", not "unsigned char" for ntlmbuf. Our base64 functions accept char anyway. (ntlm_output): Join up the format string, since we nominally support K&R compilers. (ntlm_output): Ditto. 2005-04-09 Hrvoje Niksic * src/alloca.c: Include wget.h to be able to use xmalloc. In addition to defining malloc to xmalloc, also define free to xfree. 2005-04-08 Larry Jones * doc/Makefile.in (wget.info): Don't use $< in an explicit rule. 2005-04-08 Hrvoje Niksic * windows/Makefile.src: Compile ptimer.c and http-ntlm.c. 2005-04-08 Hrvoje Niksic * src/ptimer.c: Use Windows timers under Cygwin, whose POSIX timer implementation is incomplete. 2005-04-08 Hrvoje Niksic * src/ptimer.c (struct ptimer): Remove the unused initialized field. * src/ptimer.c: Renamed function parameters from WT (which used to stand for wget_timer or wtimer) to PT. 2005-04-08 Hrvoje Niksic * src/ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to be >= 0. * src/ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is defined instead of whether it's greater than 0. glibc defines it to 0, but still makes it available via sysconf. 2005-04-08 Hrvoje Niksic * src/ptimer.c (ptimer_init): Explicitly check that _POSIX_MONOTONIC_CLOCK is *both* defined and >=0. (Undefined symbols are >=0.) 2005-04-08 Hrvoje Niksic * src/ptimer.c (ptimer_diff): Fix typo affecting Windows build. 2005-04-08 Hrvoje Niksic * src/ptimer.c (posix_init): Be smarter about choosing clocks. In decreasing order of preference, use CLOCK_MONOTONIC, CLOCK_HIGHRES, and CLOCK_REALTIME. (ptimer_allocate): Removed. * src/ptimer.c: Refactor the code by cleanly separating the architecture-dependent code from the architecture-independent code. 2005-04-08 Hrvoje Niksic * src/mswindows.c (str_to_int64): Rename OVERFLOW and UNDERFLOW to INT64_OVERFLOW and INT64_UNDERFLOW, since those names are used. 2005-04-08 Hrvoje Niksic * configure.in: When checking for OpenSSL headers, check for all the ones that Wget is using. 2005-04-08 Hrvoje Niksic * configure.in: Use it. * aclocal.m4 (WGET_POSIX_CLOCK): Check whether -lrt is needed to use POSIX clock functions like clock_gettime. 2005-04-08 Hrvoje Niksic * Makefile.in ($(srcdir)/stamp-h.in): Don't attempt to run autoheader automatically; it breaks things with fresh CVS builds. 2005-04-07 Hrvoje Niksic * src/ptimer.c: New file. Move the "wtimer" functions from utils.c to this file and rename them to ptimer_. 2005-04-07 Hrvoje Niksic * src/host.c (NO_ADDRESS): Define NO_ADDRESS only after the system headers have been included. 2005-04-06 Hrvoje Niksic * src/http.c (pconn): Include NTLM data, which is per-connection. (known_authentication_scheme_p): Recognize NTLM authorization. (create_authorization_line): Call ntlm_input and ntlm_output. * src/http-ntlm.c: New file, donated by Daniel Stenberg and originally written for curl, heavily modified for Wget. * src/utils.c (base64_encode): Relocated from http.c, since it is now used by http-ntlm.c, and will possibly be used elsewhere. (base64_decode): New function, originally based on code from GNU recode. 2005-04-06 Hrvoje Niksic * configure.in: Allow the user to disable NTLM authorization. Make sure NTLM is disabled if OpenSSL is unavailable. If NTLM is *explicitly* requested and OpenSSL is unavailable, abort. * configure.in: Renamed USE_* to ENABLE_*. 2005-04-05 Mauro Tortonesi * src/Makefile.in: removed string_t.c from list of source files. 2005-04-04 Mauro Tortonesi * src/string_t.c: Removed. * src/string_t.h: Removed. 2005-04-02 Hrvoje Niksic * src/url.c (rewrite_shorthand_url): Only accept recognized schemes. That way "foo:80" will correctly be rewritten to "http://foo:80" instead of left unchanged and ultimately rejected because of "unsupported scheme foo". 2005-04-02 Hrvoje Niksic * src/ftp.c (ftp_loop): Ditto. * src/ftp-basic.c (ftp_pasv): Use the xzero shorthand for memset(0). (ftp_lpsv): Ditto. 2005-03-31 Hrvoje Niksic * src/utils.c (number_to_string): Avoid explicit 64-bit constants; construct them by multiplication at compile-time. * src/utils.c, elsewhere: Don't append "L" to 32-bit integer constants; we aren't really compilable on 16-bit systems anyway. * src/hash.c (prime_size): Remove primes larger than 2^31, but include 2^31-1, which is prime. 2005-03-30 Hrvoje Niksic * src/utils.c (string_set_to_array): New function. * src/convert.c: Replace the use of "slists" with sets/hash-tables, which in fact suit the intended purpose much better. downloaded_html_list is removed altogether. 2005-03-29 Hrvoje Niksic * src/utils.c (numdigit): More correct handling of negative numbers. 2005-03-29 Hrvoje Niksic * src/ftp.h (enum): Rename GLOBALL, GETALL, and GETONE to GLOB_GLOBALL, GLOB_GETALL, and GLOB_GETONE to avoid conflict with Linux headers. 2005-03-23 Hrvoje Niksic * po/POTFILES.in: Removed headers.c and rbuf.c. 2005-03-22 Joseph Caretto * doc/texi2pod.pl.in: Handle asis again. It used to work (see the 2001-12-11 entry), but the local change was lost in the upgrade to 1.4. 2005-03-21 Hrvoje Niksic * src/http.c (gethttp): Print the human-readable size. * src/ftp.c (getftp): Print the human-readable size of the file to be downloaded. * src/utils.c (human_readable): New function. * src/utils.c: Renamed "legible" to "with_thousand_seps", "legible_large_int" to "with_thousand_seps_large", and "legible_1" to "add_thousand_seps". 2005-03-21 Hrvoje Niksic * src/http.c (gethttp): Inhibit persistent connections when talking to proxies, as mandated by RFC 2068. 2005-03-20 Hrvoje Niksic * src/url.c (unescape_single_char): New function. (url_escape_dir): Use it to unescape slashes in directory components. (url_string): Escape unsafe chars in host name, except for the ':' charaters, which can appear in IPv6 addresses. * src/main.c (main): Don't access the cookie jar directly. * src/log.c (escnonprint_internal): Correctly calculate the needed string size. Don't forget the buffer's new size after having reallocated it. (log_cleanup): New function. Free the escnonprint ring data. * src/init.c (cleanup): Don't free the cookie jar explicitly, it is now done by http_cleanup. (cleanup): opt.user_headers is now a vector, free it with free_vec. * src/http.c (gethttp): Make sure to free the request data, the status message, and the response data before returning from the function. (save_cookies): New function. (http_cleanup): Free the cookie jar here. * src/hash.c: Renamed string_hash to hash_string and ptrhash to hash_pointer. Exported hash_pointer. * src/xmalloc.c: Organized malloc_table (previously malloc_debug) as a simple EQ hash table. register_ptr and unregister_ptr are now of O(1) complexity. * src/xmalloc.c: Renamed "*_debug" to debugging_* and "*_real" to checking_*. 2005-03-18 Hrvoje Niksic * src/init.c (cmd_file): Use concat_strings. * src/http.c (basic_authentication_encode): Use concat_strings. * src/ftp-ls.c (ftp_index): Use concat_strings. * src/ftp-basic.c (ftp_request): Use concat_strings. * src/utils.c (concat_strings): New function. 2005-03-17 Hrvoje Niksic * src/ftp-basic.c (ftp_login): Don't free the string if ftp_response returned an error status because the line didn't get allocated in the first place. 2005-03-15 Hrvoje Niksic * src/retr.c (fd_read_body): Undo the 2004-11-18 change. Instead, always be "exact". 2005-03-15 Hrvoje Niksic * src/http.c (read_http_response_head): Limit the response size to 64k bytes. * src/retr.c (fd_read_hunk): Accept a MAXSIZE argument that limits the number of bytes the function is allowed to allocate. (fd_read_line): Limit the line to 4096 bytes. 2005-03-12 Hrvoje Niksic * src/wget.h: Include options.h after wgint has been defined. * src/options.h (struct options): Declare options processed with cmd_bytes as wgint, not long. 2005-03-12 Hrvoje Niksic * src/utils.c (debug_test_md5): Moved to gen-md5.c. * src/mswindows.h: Don't declare inet_ntop, since we don't use it. * src/mswindows.h: For consistency, also wrap closesocket, it being a Winsock call. * src/mswindows.h: Don't declare sleep and usleep; we're defining xsleep now. * src/mswindows.h (mkdir): Don't special-case Borland C, _mkdir works there as well. * src/host.c: Don't include winsock header files; the correct ones are already included by mswindows.h. * src/mswindows.c (xsleep): Round toward the nearest millisecond in an attempt to avoid average short sleeps. * src/utils.c (wtimer_granularity): Report correct values for Windows timers and for high-resolution timers. * src/utils.c (wtimer_initialize_once): New function, called to initialize the timer frequency. * src/utils.c: Replace the use of GetSystemTime with high-resolution counters under Windows. When high-resolution counters are unavailable, use GetTickCount(). 2005-03-12 Hrvoje Niksic * src/init.c (simple_atof): Handle negative numbers; skip whitespace before the number. (simple_atoi): Ditto. Also, check for overflow and underflow. (cmd_number): Bail out on negative numbers. (parse_bytes_helper): Ditto. 2005-03-06 Hrvoje Niksic * windows/Makefile.src.bor: Reenable warnings under Borland C, disabling only specific warnings. Generate Pentium Pro code by default. 2005-03-06 Hrvoje Niksic * src/utils.c (read_file): Don't use wgint for file size; LFS won't work since the file is mmap'ed as a whole. * src/options.h: Don't include stdio.h. * src/log.c: Ditto. * src/init.c: Disambiguate assignment from non-zero test to avoid Borland C warning. * src/http.c (response_new): Don't needlessly post-increment count. * src/hash.c: Include stdio.h. * src/gnu-md5.h: Don't include stdio.h. * src/getopt.h (struct option): Always use const. * src/ftp.c (getftp): Avoid unnecessary assignment to RES to avoid Borland C warning. * src/ftp-ls.c: Disambiguate assignment from non-zero test to avoid Borland C warning. * src/cmpt.c (strptime_internal): Don't initialize rp_backup when !_NL_CURRENT to avoid Borland C warning. 2005-03-06 Hrvoje Niksic * src/utils.c (fopen_excl): Fix parse error when O_BINARY is available. 2005-03-06 Hrvoje Niksic * src/url.c (url_parse): Reject port numbers larger than 65535. We also check for overflow while parsing port numbers. 2005-03-06 Hrvoje Niksic * src/mswindows.c: Provide wrappers to Winsock functions that set errno to WSAGetLastError() in case of failure. Also provide a Windows-specific version of strerror. * src/mswindows.h: Wrap calls to socket, bind, connect, recv, send, select, getsockname, getpeername, and setsockopt. 2005-03-06 Hrvoje Niksic * src/init.c (defaults): Use passive FTP by default. 2005-03-06 Hrvoje Niksic * src/http.c (gethttp): Handle multiple Set-Cookie headers sent by remote server. 2005-03-05 Hrvoje Niksic * src/url.c (url_file_name): Don't allow hosts named ".." to be appended as path elements. 2005-03-03 Hrvoje Niksic * src/retr.c (retrieve_url): Escape location header. * src/http.c (print_server_response_1): Escape server response when printing it. (gethttp): Escape host name, status message, location header, and content type. (http_loop): Escape error message from server. * src/host.c (lookup_host): Escape host name when printing it. * src/ftp.c (getftp): Escape user name when printing it. (getftp): Escape remote file and directory for printing. (getftp): Escape server listing when printing it. (ftp_retrieve_list): Escape link name and file name. (ftp_retrieve_glob): Escape file name. * src/ftp-basic.c (ftp_response): Escape server response when printing it. * src/cookies.c (parse_set_cookies): Escape the cookie field when printing it. (parse_set_cookies): Escape contents of remote header. (cookie_handle_set_cookie): Escape host name and cookie domain. * src/connect.c (connect_to_ip): Escape the host name. * src/log.c (escnonprint): New function, used for printing strings coming from the server that possibly contain non-ASCII characters. (escnonprint_uri): Ditto. 2005-02-26 Hrvoje Niksic * src/utils.c: Use the nnnI64 syntax for __int64 constants under all Windows compilers. (SPRINTF_WGINT): Use "%I64" under all Windows compilers. * src/mswindows.h (WGINT_MAX): Use the nnnI64 syntax for __int64 constants under all Windows compilers. (struct_stat): Use `struct stati64' under Borland C. (fstat): Don't redefine to _fstati64 under Borland. * src/mswindows.c: Define str_to_int64 under Borland C as well as under (older) Visual C. 2005-02-26 Gisle Vanem * src/utils.c: Use the nnnLL syntax under GCC. Define struct_stat to struct _stati64 under __MINGW32__ as well as under MS VC. 2005-02-25 Hrvoje Niksic * src/ftp.c (getftp): Initialize err to suppress compiler warning. 2005-02-24 Hrvoje Niksic * src/mswindows.c (wget_ftello): Removed. * src/mswindows.h: Remove bogus definition of stat. (wget_ftello): Remove the leftover ftello replacement. 2005-02-24 Hrvoje Niksic * src/host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead of checking for HAVE_GETADDRINFO_AI_ADDRCONFIG. 2005-02-24 Hrvoje Niksic * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): When we're not supposed to overwrite files, use fopen_excl to open the file and recompute the file name. * src/log.c (redirect_output): Use unique_create to avoid a race condition. * src/mswindows.c (fake_fork_child): Use unique_create. * src/utils.c (fopen_excl): New function that opens a stdio stream with the O_EXCL flag (where available). (unique_create): New function, like unique_name, but also creating the file and returning a file pointer. (fork_to_background): Use unique_create to create the file immediately to avoid race condition with multiple instances of wget -b. 2005-02-24 Hrvoje Niksic * src/ftp.c (ftp_expected_bytes): Fix bug that caused infloop because of not correctly skipping the '(' character. 2005-02-23 Hrvoje Niksic * src/host.c (is_valid_ipv6_address): Move here from url.c. (lookup_host): If the address is numeric, don't print the "resolving..." line, don't set up DNS timeouts, and set the AI_NUMERICHOST hint, where available. 2005-02-20 Hrvoje Niksic * src/mswindows.c (wget_ftello): Wget's replacement for ftello. * src/utils.c (file_size): Use ftello where available. * src/ftp-ls.c (ftp_parse_unix_ls): Use str_to_wgint to parse the file size. (ftp_parse_winnt_ls): Ditto. * src/ftp-basic.c (ftp_size): Use str_to_wgint to convert number to wgint; pass 10 instead of 0 as the BASE argument. * src/ftp.c (ftp_expected_bytes): Use str_to_wgint to parse the file size. * src/sysdep.h (LARGE_INT_FMT): Use __int64 as LARGE_INT on MSVC/Windows; print it with "%I64". * src/wget.h: Define a `wgint' type, normally aliased to (the possibly 64-bit variant of) off_t. * src/all: Use `wgint' instead of `long' for numeric variables that can hold file sizes. * src/utils.c (number_to_string): Support printing of `wgint' argument. (number_to_static_string): New function. * src/all: Replace printf("%ld", long_value) with printf("%s", number_to_static_string(wgint_value)). 2005-02-20 Hrvoje Niksic * configure.in: Check for LFS. Determine SIZEOF_OFF_T. Check for ftello. 2005-02-18 Mauro Tortonesi * src/main.c: Added the --ftp-passwd command line option. * src/init.c: Renamed command passwd to ftppasswd. 2005-02-18 Marco Colombo * po/it.po: Updated Italian translation. 2005-02-11 Mauro Tortonesi * src/string_t.c: Fixed a bug in do_escape and triggered escape of backslashes in string_escape to avoid ambiguities in the result string. 2005-02-11 Mauro Tortonesi * doc/wget.texi: Added Simone Piunno as new contributor. 2005-02-10 Mauro Tortonesi * src/string.h: Renamed to string_t.h to fix a compilation conflict with the string.h header in the standard C library. * src/string.c: Renamed to string_t.c for consistency with string.h. * src/string_t.c: Ditto. * src/string_t.h: Ditto. 2005-01-01 Mauro Tortonesi * doc/wget.texi: Updated copyright information, added new contributors. 2004-12-31 Mauro Tortonesi * src/string.c: New file. * src/string.h: New file. * src/Makefile.in: Added string.c to the list of modules to compile. * src/main.c: Updated copyright. 2004-11-20 Hans-Andreas Engel * doc/wget.texi: Describe limitations of combining `-O' with `-k'. 2004-11-18 Ulf Harnhammar * src/ftp-ls.c: Fixed a problem in ftp_parse_winnt_ls that could allow a malicious remote FTP server to crash wget. 2004-11-18 Mauro Tortonesi * src/connect.c: Minor correction to the comment in front of fd_peek. 2004-11-18 Leonid Petrov * src/retr.c: Fix a timeout problem in fd_read_body when using http_proxy. 2004-11-18 Hans-Andreas Engel * src/http.c: Enable --convert-links (-k) when a single page is downloaded via --output-document (-O). 2004-11-15 YAMAZAKI Makoto * src/netrc.c: Fix termination by assertion bug in netrc parsing. 2004-06-12 Larry Jones * src/recur.c (download_child_p): Correct the logic in check number 6: test opt.reclevel (not DEPTH) against INFINITE_RECURSION. 2004-05-13 Nico R. * doc/Makefile.in: Allow building in a separate tree with source tree write-protected. 2004-05-09 David Fritz * windows/Makefile.src.bor: Fix broken build rule. Add clean target. * windows/Makefile.top.bor: Use tabs instead of spaces. Ignore errors in clean rules. Use lowercase filenames when building distribution .zip archive. * windows/config.h.bor: Don't define HAVE_UINT32_T. * windows/Makefile.doc: Fix remaining instance of build rules indented with spaces instead of tabs. * windows/Makefile.src: Update copyright year. * windows/Makefile.top: Update copyright year. * windows/config.h.mingw (WGET_USE_STDARG, HAVE_SIG_ATOMIC_T): Define. * windows/config.h.ms (HAVE_STRPBRK, HAVE_LIMITS_H) (HAVE_LOCALE_H): Define. * windows/Makefile.watcom: Add /I. to CFLAGS. Remove reference to specific Wget version from linker flags. Add missing dependencies. 2004-05-09 David Fritz * src/mswindows.c (fake_fork): Pass entire command line to the child process. 2004-03-31 Hrvoje Niksic * src/http.c (gethttp): Fix typo: SCHEME_SSL -> SCHEME_HTTPS. 2004-03-30 Hrvoje Niksic * src/http.c (gethttp): Send the Proxy-Authorization header over non-SSL connections too. 2004-03-25 David Fritz * src/mswindows.c (fake_fork_child): Ignore error code when OpenFileMapping() fails; assume it failed because the object does not exist. 2004-03-24 David Fritz * src/mswindows.c (fake_fork): New function. * src/mswindows.c (fork_to_background): Use it. 2004-03-19 Hrvoje Niksic * src/url.c (url_parse): Decode %HH sequences in host name. 2004-03-19 David Fritz * src/mswindows.c (ws_hangup): Incorporate old fork_to_background() code. Add event name argument. (fork_to_backgorund): Now a simple wrapper around ws_hangup(). (ws_handler): Correctly handle the case when neither CTRLC_BACKGND nor CTRLBREAK_BACKGND are defined. Don't bother handling close, logoff, or shutdown events. Call ws_hangup() with the correct event name; don't assume it was CTRL+Break. 2004-03-04 Hrvoje Niksic * src/convert.c (local_quote_string): Quote "#" as "%23" and "%" as "%25" when creating links to local files. 2004-03-04 Gisle Vanem * src/retr.c (fd_read_body): Don't change console title if quiet. 2004-03-02 David Fritz * src/mswindows.c (ws_percenttitle): Guard against future changes by doing nothing if the proper variables have not been initialized. Clamp percentage value. 2004-02-25 David Fritz * src/mswindows.c (set_sleep_mode): Remove argument and return value. Call GetModuleHandle() instead of LoadLibrary()/FreeLibrary() for kernel32.dll. Use typedef for function-pointer. Don't cast l-value. Don't use dereference operator when calling through function-pointer. (ws_startup): Update call to set_sleep_mode(). (ws_cleanup): Remove call to set_sleep_mode(). 2004-02-23 David Fritz * src/mswindows.h: Ditto. * src/mswindows.c: Misc. formatting/comment tweaks throughout. 2004-02-23 David Fritz * src/http.c (http_loop): Ditto. * src/ftp.c (ftp_loop_internal): Update call to ws_changetitle(). * src/main.c (main): Don't bother calling ws_changetitle(). * src/mswindows.h (ws_changetitle): Update prototype. * src/mswindows.c (ws_changetitle): Remove second argument. Use xfree_null(). (ws_percenttitle): Only update title when percentage has changed. 2004-02-22 Hrvoje Niksic * doc/wget.texi (Contributors): Updated. 2004-02-20 David Fritz * src/main.c (print_help): Remove call to ws_help(). * src/mswindows.c (ws_help): Remove. * src/mswindows.h (ws_help): Remove. 2004-02-16 David Fritz * src/init.c (home_dir): Use aprintf() instead of xmalloc()/sprintf(). Under Windows, if $HOME is not defined, use the directory that contains the Wget binary instead of hard-coded `C:\'. (wgetrc_file_name): Under Windows, look for $HOME/.wgetrc then, if not found, look for wget.ini in the directory of the Wget binary. * src/mswindows.c (ws_mypath): Employ slightly more robust methodology. Strip trailing path separator. 2004-02-12 Jens Roesner * doc/wget.texi (Wgetrc Commands): Document `-e' here. 2004-02-09 David Fritz * configure.bat.in: Don't clear the screen. * windows/README: Add introductory paragraph. Re-word a few sentences. Correct minor typographical errors. Use consistent capitalization of Wget, SSL, and OpenSSL. Refer to Microsoft Visual C++ as MSVC instead of VC++. Mention the --msvc option to configure.bat. Reflow paragraphs. * windows/Makefile.top: Use tabs instead of spaces. Ignore errors in clean rules. Use lowercase filenames when building distribution .zip archive. * windows/Makefile.doc: Use tabs instead of spaces. Ignore errors in clean rules. * windows/Makefile.src: Clean-up clean rules. Use tabs instead of spaces. Link against gdi32.lib. Don't define SYSTEM_WGETRC. Remove unused macros. Remove anachronistic and superfluous linker flags. Don't rename wget.exe to all upper-case. Add `preprocessor' conditionals for SSL and newer MSVC options. Use batch rules. Don't suppress all warnings. 2004-02-08 Hrvoje Niksic * doc/wget.texi (Security Considerations): Put @item contents on a separate line. Reported by Ted Rodriguez-Bell. 2004-02-06 Hrvoje Niksic * src/http.c (gethttp): Respect --ignore-length. (gethttp): Inhibit keep-alive if --ignore-length is specified. 2004-02-06 Hrvoje Niksic * src/connect.c (sockaddr_set_data): Zero out sockaddr_in/sockaddr_in6. Apparently BSD-derived stacks need this when binding a socket to local address. 2004-02-06 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Document --no-http-keep-alive and the corresponding Wgetrc command. 2004-02-04 Hrvoje Niksic * src/hash.c: Make the file compilable outside Wget source tree when -DSTANDALONE is used. 2004-01-29 Hrvoje Niksic * src/utils.c (determine_screen_width): Return 0 if not running on Windows or on a TIOCGWINSZ-capable system. 2004-01-28 David Fritz * src/utils.c (determine_screen_width): Correctly determine console width under Windows. 2004-01-28 Christian Biere * src/progress.c (bar_set_params): Fixed syntax error when HAVE_ISATTY was undefined. * src/ftp.c (ftp_loop_internal): Allocate a larger buffer in case "try" gets translated to something large. Ditto in http_loop in http.c. * src/http.c (response_header_copy): Don't write to buf[BUFSIZE]. * src/ftp-opie.c (skey_response): Eliminate unnecessary string concatenation; just call gen_md5_update twice. 2004-01-25 Hrvoje Niksic * src/utils.c (xsleep): Don't call usleep with values larger than 1,000,000. 2003-12-16 Hrvoje Niksic * src/http.c (gethttp): Fix generation of `Content-Length'. 2003-12-15 Gisle Vanem * src/url.c (url_skip_credentials): Fixed return value; 'url' if no credentials. 2003-12-14 Hrvoje Niksic * src/url.c (url_skip_credentials): Return a pointer directly. 2003-12-14 Hrvoje Niksic * src/url.c (url_file_name): Ditto. (parse_errors): Ditto. * src/retr.c (retr_rate): Ditto. * src/progress.c (create_image): Ditto. * src/netrc.c (parse_netrc): Ditto. * src/main.c (struct cmdline_option): Ditto. (redirect_output_signal): Ditto. * src/init.c (commands): Ditto. * src/ftp-ls.c (ftp_index): Ditto. * src/cookies.c (check_domain_match): Declare the pointer to a literal string as `const'. 2003-12-12 Hrvoje Niksic * src/retr.c (fd_read_body): Pass total size to progress_create, not the remaining amount. 2003-12-12 Hrvoje Niksic * src/retr.c (fd_read_body): Don't fiddle with "interactive timeout" if read timeout is unset. 2003-12-12 Hrvoje Niksic * src/connect.c (bind_local): Don't set the IPV6_V6ONLY option on the socket. 2003-12-06 Hrvoje Niksic * src/url.c (url_file_name): Respect the setting of opt.protocol_directories. * src/main.c (main): Only check for ret=='?' when longindex is unset. (option_data): New option --protocol-directories. 2003-12-06 Hrvoje Niksic * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Correctly calculate bandwidth as total data read divided with download time. * src/retr.c (fd_read_body): Separate the return values for data written and read. 2003-12-06 Hrvoje Niksic * doc/wget.texi: Document the new option `--protocol-directories'. 2003-12-06 Hrvoje Niksic * doc/wget.texi (Download Options): Don't incorrectly claim that `-O' sets the number of retries to 1. 2003-12-05 Hrvoje Niksic * src/http.c (H_REDIRECTED): Respect the HTTP/1.1 "303 See Other" response code. Suggested by Dan Razzell. 2003-11-30 Hrvoje Niksic * src/retr.c (fd_read_body): Sanitize arguments and document them better. Make sure the timer is created and updated only if necessary. Updated callers. 2003-11-30 Hrvoje Niksic * src/retr.c (fd_read_body): Report the amount of data *written* as amount_read. This is not entirely logical, but that's what the callers expect, and it's not easy to change. * src/ftp.c (ftp_loop_internal): Ditto. * src/http.c (http_loop): Be smarter about assigning restval; if we're in the nth pass of a download, simply use the information we have about how much data has been retrieved as restval. * src/ftp.c (getftp): Ditto for FTP "REST" command. * src/http.c (gethttp): When the server doesn't respect range, skip the first RESTVAL bytes of the read body. Never truncate the output file. * src/retr.c (fd_read_body): Support skipping initial STARTPOS octets. 2003-11-30 Hrvoje Niksic * src/http.c (skip_short_body): Renamed skip_body to skip_short_body; don't bother calling fd_read_body. 2003-11-30 Hrvoje Niksic * src/http.c (skip_body): New function. (gethttp): Use it to skip the body of the responses we don't care to download. That allows us to reuse the connection. (gethttp): Trust that the HEAD requests will not generate body data. * src/retr.c (fd_read_body): Don't write to OUT if it's NULL. 2003-11-29 Hrvoje Niksic * src/http.c (gethttp): Initialize SSL only the first time when SSL URL is downloaded. 2003-11-29 Hrvoje Niksic * src/cookies.c (cookie_header): Only generate the contents of the header, not the leading "Cookie: " or the trailing "\r\n". * src/http.c (gethttp): When adding headers specified with `--header', allow them to override the headers generated by Wget. * src/init.c (cmd_spec_header): Made opt.user_headers a vector. * src/http.c (request_new): New function. Returns a request structure which can be modified in various ways, most notably by adding HTTP headers to the request. (request_set_header): New function for adding the header to the request. If the header is already available, it gets replaced. (request_send): Construct and send the request. (gethttp): Use the request_* functions to generate the request. 2003-11-28 Hrvoje Niksic * src/init.c: Don't #include netinet/Winsock stuff. 2003-11-28 Hrvoje Niksic * src/http.c: Deleted the old functions header_process, header_extract_number, header_exists, header_strdup, http_process_range, http_process_none, http_process_type, and http_process_connection. * src/http.c (response_new): New function. (response_header_bounds): Ditto. (response_header_copy): Ditto. (response_header_strdup): Ditto. (response_status): Ditto. (gethttp): Use the new response_* functions to parse the response. Support HTTP/0.9 responses. 2003-11-28 Hrvoje Niksic * src/http.c (gethttp): Use the CONNECT handle to establish SSL passthrough through non-SSL proxies. 2003-11-28 Hrvoje Niksic * src/http.c (gethttp): Don't include the Proxy-Authorization header in the request tunneled through proxy. 2003-11-27 Hrvoje Niksic * src/progress.c (create_image): Don't calculate ETA if nothing has been downloaded yet, because it causes division by zero. 2003-11-27 Hrvoje Niksic * src/connect.c (bind_local): Rename sa_len to addrlen because IRIX headers define sa_len as a macro. 2003-11-26 Hrvoje Niksic * src/html-parse.c (convert_and_copy): Remove embedded newlines when AP_TRIM_BLANKS is specified. 2003-11-26 Hrvoje Niksic * src/ftp.c: Set con->csock to -1 where rbuf_uninitialize was previously used. 2003-11-26 Hrvoje Niksic * src/Makefile.in (http$o): Added the trailing backslash that was missing. 2003-11-26 Hrvoje Niksic * aclocal.m4: Don't check for AI_V4MAPPED and for AI_ALL, since Wget doesn't need them. * configure.in: Check for struct sockaddr_storage. 2003-11-21 Hrvoje Niksic * src/rbuf.c: Removed. * src/ftp-basic.c (ftp_response): Use fd_read_line. No longer use struct rbuf. Updated all callers. * src/http.c (gethttp): Use fd_read_head to read all the headers in one go. (next_header): New function. * src/retr.c (fd_read_line): New function: reads a line from FD, leaving the rest of the data unread. (fd_read_head): New function. * src/connect.c (fd_peek): New function, implements peeking. (poll_internal): New function. (fd_read): Use it. (fd_write): Ditto. (fd_peek): Ditto. (fd_register_transport): Allow registering a "peeker" callback. 2003-11-21 Hrvoje Niksic * src/headers.c: Removed. The file is no longer relevant, now that no special handling of headers is done by the rbuf code. Moved portions to http.c. 2003-11-20 Hrvoje Niksic * src/connect.c: Renamed xread/xwrite/xclose to fd_read/fd_write/fd_close. The "x" prefix is not appropriate because the semantics have diverged from read/write/close too significantly. Updated all callers. 2003-11-20 Hrvoje Niksic * src/connect.c (sock_write): It's not necessary to initialize RES. 2003-11-19 Hrvoje Niksic * src/main.c (main): Don't reference opt.ipv4_only and opt.ipv6_only if IPv6 is disabled. 2003-11-19 Hrvoje Niksic * src/connect.c (socket_has_inet6): Only compile it if IPv6 is enabled and AI_ADDRCONFIG is missing. 2003-11-18 Hrvoje Niksic * src/host.c (address_list_contains): Renamed address_list_find to address_list_contains because its result is boolean. 2003-11-18 Hrvoje Niksic * src/gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak random seed. 2003-11-18 Hrvoje Niksic * src/connect.c (select_fd): Return 1 if select is not available. 2003-11-17 Hrvoje Niksic * src/main.c (print_help): Fix alignment of FTP options output. 2003-11-17 Hrvoje Niksic * src/host.c (lookup_host): Check for the ability to create IPv6 sockets here. * src/init.c (defaults): Don't auto-set --inet4-only on IPv6-less systems. 2003-11-17 Hrvoje Niksic * src/connect.c (connect_to_host): Don't reference address list after releasing it. 2003-11-16 Hrvoje Niksic * src/main.c (print_help): Fix typo in `-O' help message. Fix docs of -Y/--proxy. Fix docs of `--cookies' and `--glob'. Improve docs of --convert-links. Fix docs of SSL options. 2003-11-16 Hrvoje Niksic * src/main.c (main): Don't allow setting of both opt.ipv4_only and opt.ipv6_only. * src/init.c (defaults): Mark opt.ipv4_only specially when set automatically. 2003-11-16 Hrvoje Niksic * src/ftp-basic.c: Don't include and others because they're no longer needed. 2003-11-15 Hrvoje Niksic * src/init.c: Make sure the options are in alphabetic order! * src/host.c (lookup_host): Merge lookup_host_passive and lookup_host after all -- having both would result in some code duplication. (lookup_host): Set hints.ai_family to AF_INET if ipv4_only is requested. Likewise, set it to AF_INET6 for ipv6_only. Specify AI_ADDRCONFIG where available. (lookup_host): New flag LH_REFRESH that specifies that a cached entry for HOST should be refreshed. (cache_query): New function. (cache_store): Ditto. (cache_remove): Ditto. (forget_host_lookup): No longer necessary, replaced with static function cache_remove. 2003-11-15 Hrvoje Niksic * src/http.c (persistent_available_p): Correctly specify the endpoint argument to socket_ip_address. (gethttp): When printing the "reusing connection to..." message, specify the host name of the reused connection, not the current host name. That makes more sense because it provides a useful piece of information -- we know to which host we're supposed to connect anyway! 2003-11-15 Hrvoje Niksic * src/host.c: Don't refer to the now-removed function forget_host_lookup in the documentation of lookup_host. 2003-11-15 Hrvoje Niksic * src/host.c (lookup_host): Use AI_ADDRCONFIG only if the family is unspecified. This ensures that specifying `--no-inet4' on systems where IPv6 resolves, but doesn't work behaves the same regardless of the availability of AI_ADDRCONFIG. 2003-11-15 Hrvoje Niksic * doc/wget.texi: Documented that --dont-remove-listing is now --no-remove-listing. 2003-11-15 Hrvoje Niksic * doc/wget.texi (Portability): Update slightly. 2003-11-14 Hrvoje Niksic * src/url.c (uri_merge): Merging "foo" and "bar" should result in "bar", not in "foo/bar". (path_simplify): Don't remove empty path elements; don't special-case leading slash. (path_simplify): Don't swallow ".."'s at the beginning of string. E.g. simplify "foo/../../bar" as "../bar", not as "bar". (append_uri_pathel): Defang ".." path element upon encountering it. 2003-11-14 Hrvoje Niksic * src/main.c: Enable -4 and -6 only if IPv6 is enabled. 2003-11-14 Hrvoje Niksic * src/connect.c (register_transport): Renamed from register_extended. Explain the intended usage. 2003-11-14 Hrvoje Niksic * doc/fdl.texi: New file. * doc/wget.texi: Upgrade to GNU Free Documentation License 1.2. 2003-11-13 Hrvoje Niksic * src/wget.h (CONNECT_ERROR): Use it. * src/connect.c (unsupported_socket_family_error): New function. 2003-11-13 Hrvoje Niksic * src/init.c (defaults): Turn on opt.ipv4_only if we're compiling with IPv6, and AI_ADDRINFO is not available, and AF_INET6 sockets can't be created. 2003-11-13 Hrvoje Niksic * src/http.c (persistent_available_p): Don't attempt to talk to two different SSL sites over the same secure connection. 2003-11-13 Hrvoje Niksic * src/http.c (gethttp): Ditto. * src/ftp.c (getftp): Use retryable_socket_connect_error instead of CONNECT_ERROR. * src/wget.h (CONNECT_ERROR): Removed. * src/connect.c (retryable_socket_connect_error): New function instead of unsupported_socket_family_error. 2003-11-13 Hrvoje Niksic * src/host.c (lookup_host): Document the fact that the addresses are returned in order. 2003-11-13 Hrvoje Niksic * src/connect.c (bind_local): Renamed bindport to bind_local; return the socket directly. Updated callers. (accept_connection): Renamed acceptport to accept_connection; return the created socket directly. Updated callers. 2003-11-12 Hrvoje Niksic * src/utils.c: Use limits.h only where available. * src/hash.c: Use INVALID_PTR and INVALID_PTR_BYTE. Include limits.h. 2003-11-12 Hrvoje Niksic * configure.in: Use a more standard checking message when checking for md5.h. 2003-11-12 Hrvoje Niksic * configure.in: Tweak ansi2knr test, use : instead of true. 2003-11-12 Hrvoje Niksic * configure.in: Check for limits.h. 2003-11-11 Hrvoje Niksic * src/main.c: Added options --inet4-only and --inet6-only. 2003-11-11 Hrvoje Niksic * src/host.c (host_errstr): Use the more standard message "Unknown host". 2003-11-10 Hrvoje Niksic * src/host.c (lookup_host): Special-case the numeric addresses only in the non-IPv6 case. 2003-11-10 Hrvoje Niksic * src/connect.c (resolve_bind_address): Call lookup_host_passive. Make sure that opt.bind_address is resolved only once. * src/host.c (lookup_host_passive): New function, handles "passive" lookups. (lookup_host): Remove the passive flags. Remove the family-related flags -- use ip_default_family instead. 2003-11-10 Hrvoje Niksic * src/connect.c (connect_to_host): Use that flag to decide whether to re-resolve the host name. * src/host.c (struct address_list): Added a flag that maintains whether the connection worked at some point. 2003-11-10 Hrvoje Niksic * aclocal.m4 (WGET_STRUCT_UTIMBUF): Use AC_CHECK_TYPES instead of AC_EGREP_CPP to check for struct utimbuf. 2003-11-10 Hrvoje Niksic * aclocal.m4 (WGET_SOCKLEN_T): Use AC_COMPILE_IFELSE instead of AC_TRY_COMPILE. 2003-11-09 Hrvoje Niksic * src/main.c (option_data): Specify the command to use for --mirror. 2003-11-09 Hrvoje Niksic * src/html-url.c: Get URLs from . 2003-11-09 Hrvoje Niksic * doc/wget.texi: Remove next/previous/up node links. Makeinfo doesn't require them, and they make the document harder to modify. 2003-11-09 Hrvoje Niksic * doc/wget.texi: No longer document options -s, -C, -g, and -G. (Contributors): Update my email address. 2003-11-09 Hrvoje Niksic * configure.in: Don't attempt to use Emacs as a makeinfo substitute. 2003-11-09 Hrvoje Niksic * aclocal.m4 (WGET_WITH_NLS): Respect the user's setting of LINGUAS, e.g. `LINGUAS="en bg ja" ./configure'. 2003-11-08 Hrvoje Niksic * src/utils.c (wtimer_allocate): Bless the use of wtimer_read on a timer that has merely been allocated because get_contents() does that. (wtimer_update): Abort if the timer is not initialized. 2003-11-08 Hrvoje Niksic * src/retr.c (get_contents): Pass the timer to limit_bandwidth(). * src/utils.c (wtimer_update): New function instead of wget_elapsed; just update the timer, but don't return anything. (wtimer_read): Read and return the last known value of the timer. 2003-11-08 Hrvoje Niksic * src/progress.c (update_speed_ring): Clear the speed ring when the download stalls. * src/retr.c (get_contents): Specify 0.95s read timeout, so that the progress gauge can be updated even when data arrives very slowly or stalls. 2003-11-08 Hrvoje Niksic * src/main.c (main): Removed one-letter options `-C', `-g', `-G', and `-s'. 2003-11-08 Hrvoje Niksic * src/main.c (main): Add --dont-remove-listing for backward compatibility with previous versions. (print_help): Fix typo, spotted by Dennis Smit. 2003-11-08 Hrvoje Niksic * src/http.c (persistent_available_p): No reason for the host lookup to be silent -- it's a lookup like any other. 2003-11-08 Hrvoje Niksic * src/http.c (persistent_available_p): Instead of matching all the addresses of HOST and last host, determine the peer's IP address with socket_ip_address and see if that address is one of those HOST resolves to. * src/host.c (address_list_match_all): Removed. (address_list_find): New function, finds an IP address in the address list. * src/ftp.c (ftp_do_pasv): Get the peer's address here, and pass it to ftp_epsv so it doesn't need to call getpeername. * src/ftp-basic.c (ftp_port): Use socket_ip_address instead of getpeername. (ftp_lprt): Ditto. * src/connect.c (socket_ip_address): Replaces conaddr, generalized to either get peer's or local address. (sockaddr_get_data): Made local to this file. 2003-11-08 Hrvoje Niksic * src/hash.c (HASH_POSITION): Explicitly accept the hash function. (grow_hash_table): Extract ht->hash_function outside the loop. (hash_table_remove): Ditto. (hash_table_clear): Fill entries with 0xff to clear them. (hash_table_remove): Mark entries as deleted with the correct marker. 2003-11-08 Hrvoje Niksic * src/cookies.c (cookie_handle_set_cookie): Specify exact match for unspecified domains. 2003-11-08 Hrvoje Niksic * src/connect.c (register_extended): Check that fd >= 0. 2003-11-08 Gisle Vanem * src/ftp-basic.c: Support Windows-2000 ftp servers. Win-2000 *is* Win-NT 5.0 so calling it ST_WINNT is okay I guess. 2003-11-07 Hrvoje Niksic * src/url.c (url_parse): Allow empty ports. 2003-11-07 Hrvoje Niksic * src/main.c (print_help): Break the help string into multiple chunks. (cmdline_option): New option handler OPT_FUNCALL. Generalized HANDLE_CMD to generic DATA. (option_data): Use the new OPT_FUNCALL feature. 2003-11-07 Hrvoje Niksic * src/hash.c (NON_EMPTY): Use the all-bit-set value as the marker that the field is empty. This allows NULL pointer and 0 value to be used as keys, which is necessary for the connect.c code to work when fd==0. (hash_table_new): Fill mappings with 0xff. (grow_hash_table): Ditto. 2003-11-07 Hrvoje Niksic * src/connect.c (LAZY_RETRIEVE_INFO): Set LAST_INFO. 2003-11-07 Hrvoje Niksic * README: Remove explicit version reference, so that the file doesn't have to be updated for each new release. 2003-11-06 Hrvoje Niksic * src/main.c (init_switches): New function. Convert option_data to long_options and short_options, which can be fed to getopt_long. (main): Execute command-line options by consulting option_data. 2003-11-06 Hrvoje Niksic * src/log.h: Declare log_init, log_close, and log_request_redirect_output here. 2003-11-06 Hrvoje Niksic * src/gen_sslfunc.c (ssl_read): Implement a more correct check for EINTR. (ssl_write): Ditto. (init_ssl): Use a global SSL context. 2003-11-06 Hrvoje Niksic * src/connect.c: Updated all callers of iread/ssl_iread/iwrite/ssl_iwrite to use xread and xwrite instead. * src/rbuf.h (struct rbuf): Removed the SSL member because SSL is handled automatically by xread. * src/hash.c (ptrhash): Made private. (ptrcmp): Ditto. (inthash): Removed. * src/connect.c (select_fd): Don't set errno, leave it to the caller. * src/gen_sslfunc.c (connect_ssl): Use register_extended to register SSL callbacks for communication with SSL-enabled endpoints. (ssl_read): New function. (ssl_write): Ditto. (ssl_poll): Ditto. (ssl_close): Ditto. * src/connect.c (register_extended): New function -- register callbacks for basic socket operations. (xread): Ditto. (xwrite): Ditto. (xclose): Ditto. (sock_read): New function, default implementation for reading. (sock_write): Ditto for writing. (sock_poll): Ditto for polling. (sock_close): Ditto for closing. 2003-11-06 Hrvoje Niksic * src/connect.c (xclose): Free INFO even if it doesn't provide a closer. 2003-11-05 Hrvoje Niksic * windows/config.h.ms: MSVC doesn't have uint32_t. 2003-11-05 Hrvoje Niksic * src/cookies.c (save_cookies_mapper): Respect the setting of keep-session-cookies. (cookie_jar_load): Import session cookies. Based on code submitted by Nicolas Schodet. * src/utils.c (datetime_str): Use information in TM when it's non-NULL. * src/main.c (main): New option `--keep-session-cookies'. 2003-11-05 Hrvoje Niksic * src/connect.c (resolve_bind_address): Use a more accurate error message -- we're not binding to ANY, we're disabling bind altogether. 2003-11-05 Hrvoje Niksic * src/connect.c (connect_to_ip): More compact error checking. (bindport): Don't treat failed setsockopt as a fatal error. 2003-11-05 Hrvoje Niksic * src/connect.c (bindport): Fix compilation under pre-C99 compilers. 2003-11-05 Hrvoje Niksic * libtool.m4, ltmain.sh, config.sub, config.guess: Upgrade to libtool 1.5. 2003-11-05 Hrvoje Niksic * doc/wget.texi (HTTP Options): Document `--keep-session-cookies'. 2003-11-05 Hrvoje Niksic * configure.in: Use the Autoconf macro AC_C_PROTOTYPES instead of the old AM_C_PROTOTYPES. 2003-11-05 Hrvoje Niksic * configure.in: Substitute ANSI2KNR and U, so we can compile. 2003-11-05 Hrvoje Niksic * configure.in: Remove the broken check for socks. 2003-11-05 Dennis Smit * src/main.c: (main): added --preserve-permissions option. * src/ftp.c (ftp_retrieve_list): added support for --preserve-permissions option. * src/init.c: added support for --preserve-permission option. * src/option.h: added support for --preserve-permission option. 2003-11-04 Hrvoje Niksic * src/progress.c (progress_handle_sigwinch): Don't call determine_screen_width() from the signal handler. Instead, just set a volatile variable. (bar_create): Check whether SIGWINCH was received. (bar_update): Ditto. * src/sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true. 2003-11-04 Hrvoje Niksic * src/config-post.h: New file, included from now autogenerated config.h.in. 2003-11-04 Hrvoje Niksic * src/Makefile.in (realclean): Delete config.h.in. 2003-11-04 Hrvoje Niksic * configure.in: Use the new form of AC_OUTPUT. * Makefile.cvs (prep): Invoke autoheader. 2003-11-04 Hrvoje Niksic * configure.in: Require Autoconf 2.57. 2003-11-04 Hrvoje Niksic * configure.in: Move some checks into aclocal.m4. Check whether fnmatch.h is includable. * configure.in: Also check whether #include works before deciding to use Solaris libmd5. * configure.in: Use AC_MSG_NOTICE instead of echo. Use AC_MSG_ERROR for fatal errors. 2003-11-04 Hrvoje Niksic * configure.in: Don't misuse AC_MSG_RESULT. Use AC_MSG_NOTICE where appropriate. 2003-11-04 Hrvoje Niksic * configure.in: Check whether volatile is supported. Don't check for gethostname and uname, which are not used. 2003-11-04 Hrvoje Niksic * aclocal.m4: Ditto. * configure.in: Add description annotations to AC_DEFINE. * Makefile.in: Update maintenance targets, preparing them for the use of `autoheader'. 2003-11-03 Hrvoje Niksic * src/wget.h (N_): Don't parenthesize argument. 2003-11-03 Hrvoje Niksic * src/utils.c (xsleep): New function. Uses nanosleep where available, resuming sleeps interrupted by signals. Updated callers of sleep and usleep to use xsleep. 2003-11-03 Hrvoje Niksic * src/log.c (logvprintf): Documented better. Renamed to log_vprintf_internal to avoid confusion with the public API functions logprintf and logputs. 2003-11-03 Hrvoje Niksic * src/host.h (ADDRESS_IPV4_DATA): Don't take the address of in.s_addr because that doesn't work on machines that define it as bitfield. 2003-11-03 Hrvoje Niksic * src/ftp-basic.c (ftp_login): Remove shadowing (and bogus) declaration of SEED. 2003-11-03 Hrvoje Niksic * src/connect.c (select_fd): Generalize the third argument into WAIT, so that the caller can request waiting for both read and write. Updated callers. 2003-11-03 Hrvoje Niksic * configure.in: Look for nanosleep in -lrt and -lposix4, which is where Solaris has them. 2003-11-03 Hrvoje Niksic * configure.in: Check for nanosleep. 2003-11-02 Hrvoje Niksic * src/wget.h: Retired the `boolean' type. Moved the DEFAULT_LOGFILE define to log.h. Moved the INFINITE_RECURSION define to recur.h. * src/xmalloc.h: Renamed FREE_MAYBE to xfree_null and moved the definition from wget.h to xmalloc.h. 2003-11-02 Hrvoje Niksic * src/html-url.c (cleanup_html_url): Destroy the hash tables, don't just call free on them. (init_interesting): Use hash_table_put instead of string_set_add because we don't need the strdup that the latter function performs. * src/init.c (cleanup): Don't pass NULL to cookie_jar_delete. * src/xmalloc.c (xfree_real): Abort when passed a NULL pointer. (xfree_debug): Print at the file and line of the offending call to free. 2003-11-02 Hrvoje Niksic * src/html-parse.c (decode_entity): New function; split the decoding of entities here. (convert_and_copy): Use it to decode entities. (decode_entity): Handle the &apos entity. (decode_entity): Don't decode Latin 1 numeric entities. Don't decode �. 2003-11-01 Hrvoje Niksic * src/host.c: Removed the ip_default_family global variable. * src/host.c (lookup_host): Document the function. Fixed declaration of VEC. 2003-11-01 Hrvoje Niksic * src/ftp-opie.c (calculate_skey_response): Use uint32_t instead of `unsigned long' for the cheksum array. Document the function. 2003-11-01 Hrvoje Niksic * src/connect.c (acceptport): Don't call select_fd when timeout is not requested. 2003-10-31 Hrvoje Niksic * src/wget.h: Move declarations of malloc and logging code to xmalloc.h and log.h respectively to unclutter this file. (STRDUP_ALLOCA): Made it side-effect free. * src/xmalloc.h: New files. Define macros xnew, xnew0, xnew_array, and xnew0_array. * src/xmalloc.c: New file. Move the xmalloc routines here. 2003-10-31 Hrvoje Niksic * src/various: Use new macros xnew, xnew0, xnew_array, and xnew0_array in various places. 2003-10-31 Hrvoje Niksic * src/sysdep.h (CLOSE): Don't call close on file descriptors less than 0, i.e. on uncreated sockets. * src/connect.c (resolve_bind_address): Work on struct sockaddr directly. (connect_to_host): Replacement for connect_to_many. Resolve HOST and connect to any of its addresses. If we can't connect and the host name lookup was cached, try to resolve it again. This should fix problems with hosts behind dynamic DNS. Updated all callers. (connect_to_ip): Replacement for connect_to_one. Removed SILENT; added the argument PRINT instead. Updated all callers. (set_connection_host_name): Removed. * src/host.c (address_list_address_at): New function instead of address_list_copy_one. It returns a pointer to ip_address *, so it's not necessary to copy the data. (address_list_cached_p): New function. (forget_host_lookup): Ditto. * src/connect.c: Got rid of the MSOCK global variable. Made bindport return the local socket it creates. Added a new argument to acceptport, the socket to call accept on. Updated callers. (closeport): Removed. * src/connect.c: Moved the sockaddr code from host.c to this file, because most of that stuff is used for connecting, and has nothing to do with host names anyway. (sockaddr_set_data, sockaddr_get_data): New functions, replace the old sockaddr_set_address, sockaddr_set_port, sockaddr_get_address, and sockaddr_get_port. 2003-10-31 Hrvoje Niksic * src/host.c (address_list_from_single): Removed. (address_list_from_ipv4_addresses): Renamed from address_list_from_vector. 2003-10-31 Hrvoje Niksic * src/connect.c (sockaddr_set_data): Remove the broken code that checked for NULL address. 2003-10-30 Hrvoje Niksic * src/url.c (append_uri_pathel): New argument ESCAPED_P that says whether [B, E) is to be treated as URL-escaped or not. If ESCAPED_P is false, don't unescape the region. (url_file_name): u->file is not URL-escaped. 2003-10-30 Hrvoje Niksic * src/sysdep.h: Use `S >= 8' rather than `S == 8' when looking for large integers. 2003-10-30 Hrvoje Niksic * src/retr.c (retrieve_from_file): Use retrieve_tree for page-requisites. * src/main.c (main): Don't define opt.recursive when -p is used. Instead, make sure that recursion is used for HTTP in that case. 2003-10-29 Hrvoje Niksic * src/host.h: Defined accessors for elements of ip_address. Updated all callers. (address_list_match_all): Use memcmp in the non-IPv6 case. * src/wget.h (CONNECT_ERROR): Don't retry connecting if connect() returned EAFNOSUPPORT. 2003-10-29 Hrvoje Niksic * configure.in: Reenable IPv6 autodetection. 2003-10-27 Mauro Tortonesi * src/connect.h: changed bindport prototype and added the related BIND_ON_IPV4_ONLY and BIND_ON_IPV6_ONLY flags. * src/connect.c: changed bindport and resolve_bind_address to allow protocol-version specific DNS resolution. modified conaddr, acceptport and connect_to_one to make use of struct sockaddr_storage and of the new ip_address structure. * src/ftp-basic.c: added LPRT/LPSV (RFC1639) support, refactored PORT/PASV (RFC959) and EPRT/EPSV (RFC2428) support code. * src/ftp.c: added the ftp_do_port and ftp_do_pasv functions to handle FTP over IPv6. * src/ftp.h: changed prototype of ftp_epsv and added prototypes for ftp_lpsv, ftp_lprt and ftp_eprt. * src/host.c: renamed the wget_sockaddr_set_address and wget_sockaddr_get_addr, and wget_sockaddr_{s,g}et_port couples to sockaddr_{s,g}et_address and sockaddr_{g,s}et_port respectively. changed address_list_match_all, address_list_from_addrinfo sockaddr_len, pretty_print_address, lookup_host, sockaddr_{s,g}et_address and sockaddr_{g,s}et_port to make use of struct sockaddr_storage and of the new ip_address structure. removed map_ipv4_to_ip and map_ip_to_ipv4. * src/host.h: redefined structure ip_address and removed structure wget_sockaddr. 2003-10-26 Hrvoje Niksic * windows/config.h.mingw: Ditto. * windows/Makefile.top.mingw: Ditto. * windows/Makefile.src.mingw: New file. * windows/wget.dep: Support convert.o. * configure.bat.in: New option `--mingw'. From Chin-yuan Kuo. 2003-10-26 Hrvoje Niksic * windows/config.h.bor: DEBUG is now ENABLE_DEBUG. Borland has snprintf, but not u_int32_t. * windows/Makefile.src.bor (OBJS): Use convert.c. From Chin-yuan Kuo. 2003-10-26 Hrvoje Niksic * windows/Makefile.src.watcom (OBJS): Use convert.c. From Chin-yuan Kuo. 2003-10-26 Hrvoje Niksic * src/sysdep.h: Include inttypes.h where available. * src/host.c: Switch from u_int32_t to uint32_t. 2003-10-26 Hrvoje Niksic * src/netrc.c (parse_netrc): Reset the QUOTE flag after the closing quote. 2003-10-26 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Fixed typo. From DervishD . 2003-10-26 Hrvoje Niksic * configure.in: Switch from u_int32_t to uint32_t. Check for inttypes.h so it's used to get the definition of uint32_t where available. 2003-10-25 Hrvoje Niksic * src/url.c (is_valid_ipv6_address): Reformat to GNU coding style. Use enums for NS_IN* constants. Use ISXDIGIT. * src/convert.c (construct_relative): Document better how the function works. 2003-10-24 Hrvoje Niksic * doc/Makefile.in (install.info): Handle the case when only wget.info is generated from wget.texi. In that case, wget.info-*[0-9] doesn't match anything and therefore ends up as a bogus value of FILE in the loop. Fix this by not calling INSTALL_DATA on nonexistent files. 2003-10-23 Hrvoje Niksic * src/version.c: Bump version. 2003-10-23 Hrvoje Niksic * src/url.c: Ditto. * src/html-parse.c (advance_declaration): Don't use trailing comma in enum because older compilers don't support it. * src/utils.c: Don't redefine HAVE_SIGSETJMP. 2003-10-23 Hrvoje Niksic * src/config.h.in: Deploy preprocessor magic to avoid Ultrix's include which defines its own u_int32_t. Reported by Bernhard Simon. 2003-10-23 Hrvoje Niksic * Makefile.in (dist): Depend on configure.bat. (realclean-top): Delete configure.bat. 2003-10-21 Hrvoje Niksic * Makefile.in (distclean-top): Remove the libtool script, because it's generated by configure. 2003-10-16 Hrvoje Niksic * src/convert.c (construct_relative): Don't handle absolute files specially -- for example, -P/tmp/foo shouldn't imply that converted files must refer to "/tmp/foo/..."! 2003-10-16 Hrvoje Niksic * configure.in: Don't check for int32_t because we're not really using it. 2003-10-15 Philip Stadermann * src/ftp.c (ftp_retrieve_glob): Correctly loop through the list whose elements might have been deleted. 2003-10-15 Hrvoje Niksic * src/http.c: Consider status 307 a valid redirect. 2003-10-13 Hrvoje Niksic * src/sysdep.h: Only define u_int32_t. 2003-10-13 Hrvoje Niksic * src/html-url.c (tag_handle_meta): Set the Refresh link to expect HTML. (append_one_url): Renamed to append_url. 2003-10-11 Hrvoje Niksic * src/utils.c (large_int_to_string): Use snprintf() to print the number. This will work even on systems where libc doesn't understand %lld, but the compiler does, because it will use our snprintf replacement. * src/init.c (parse_bytes_helper): New function. (cmd_bytes): Use it to parse bytes, but cast the result to long. (cmd_bytes_large): Ditto, but store the result to LARGE_INT. Used for --quota so that --quota=10G works even on machines without long long. * src/options.h (struct options): Declare quota as LARGE_INT. * src/retr.c (downloaded_exceeds_quota): Removed. (downloaded_increase): Ditto. (total_downloaded_bytes): New variable, replaces opt.downloaded, which was the wrong place for it anyway. Updated callers of downloaded_exceeds_quota and downloaded_increase to check this variable directly. * src/sysdep.h: Get rid of VERY_LONG_TYPE. Use LARGE_INT for the same purpose, defined as `long', `long long' or `double', depending on size of long and whether long long is available. 2003-10-11 Hrvoje Niksic * src/sysdep.h: Also check size of short for int32_t. 2003-10-11 Hrvoje Niksic * src/host.c (lookup_host): Use u_int32_t to store the result of inet_addr(). That removes the need for offset fiddling, caring about endian-ness, etc. * src/sysdep.h: Define int32_t and u_int32_t if not available. 2003-10-11 Hrvoje Niksic * src/ftp-basic.c (ftp_epsv): Use socklen_t * as the third argument to getpeername. * src/config.h.in: Define socklen_t stub. * src/host.c (sockaddr_len): Return socklen_t. * src/connect.c (conaddr): Use socklen_t as the third argument to accept, getsockname, and connect. 2003-10-11 Hrvoje Niksic * configure.in: Check for int32_t and u_int32_t. Check for SIZEOF_INT. 2003-10-10 Hrvoje Niksic * src/recur.c (retrieve_tree): Don't descend into documents that are not expected to contain HTML, regardless of their content-type. * src/html-url.c (tag_url_attributes): Record which attributes are supposed to yield HTML links that can be followed. (tag_find_urls): Propagate that information to the caller through struct urlpos. 2003-10-10 Hrvoje Niksic * src/hash.c (hash_table_new): Slightly change the meaning of the first parameter. Instead of being the minimum initial size, it is now the minimum number of items that the hash table can take without needing to resize. 2003-10-10 Hrvoje Niksic * src/hash.c (find_mapping): Return the next available mapping when the key is not found, not NULL. (hash_table_put): Use find_mapping to find the storage for the new data. (hash_table_put): Grow the table before exceeding maximum fullness, not afterwards. 2003-10-10 Hrvoje Niksic * po/tr.po: Ditto. * po/sv.po: Updated from TP. 2003-10-10 Hrvoje Niksic * aclocal.m4 (WGET_WITH_NLS): First check for gettext in libintl, then use the libc version. That way systems that get libintl.h from /usr/local/include will get the matching gettext. 2003-10-09 Hrvoje Niksic * src/html-url.c (init_interesting): Initialize interesting_tags and interesting_attributes as hash tables. This simplifies the code immensely because hash tables handle allocation and remove duplicates automatically. (find_tag): Removed. (collect_tags_mapper): Instead of calling find_tag, simply get the entry from interesting_tags hash table, which is both simpler and faster. 2003-10-09 Hrvoje Niksic * src/hash.c (hash_table_get): Declare hash-table argument as const. (find_mapping): Ditto. (hash_table_get_pair): Ditto. (hash_table_contains): Ditto. (hash_table_count): Ditto. 2003-10-09 Hrvoje Niksic * po/ft.po, po/sk.po, po/ja.po: Updated from the TP. 2003-10-09 Herold Heiko * windows/Makefile.watcom (OBJS): Ditto. * windows/Makefile.src.bor: Ditto. * windows/wget.dep: Ditto. * windows/Makefile.src: Removed references to fnmatch.c and fnmatch.o. 2003-10-08 Hrvoje Niksic * src/main.c (print_help): Fix typo; stured -> stored. 2003-10-08 Hrvoje Niksic * src/html-url.c (get_urls_html): Parse the appropriate flags to html-parse.c. * src/html-parse.c (map_html_tags): Accept FLAGS from the caller instead of examining OPT. 2003-10-08 Hrvoje Niksic * src/html-url.c (find_tag): Switch to binary search. 2003-10-08 Hrvoje Niksic * src/getopt.c: Newer version, imported from Free libit. 2003-10-08 Hrvoje Niksic * src/getopt.c: Add definitions of getopt_long and getopt_long_only. 2003-10-08 Hrvoje Niksic * src/ftp.c (has_insecure_name_p): Define it here. * src/utils.c (has_wildcards_p): Define it here. * src/sysdep.h: Declare fnmatch-related macros here, if not using system fnmatch(). Update .c files to not declare fnmatch.h directly. * src/cmpt.c (fnmatch): Moved here. Use it only under non-GNU libc. 2003-10-08 Hrvoje Niksic * src/config.h.in: Renamed DEBUG to ENABLE_DEBUG. ENABLE_DEBUG is, I think, a better name, because it implies that debugging output is merely possible, not "on by default", as might be construed from just DEBUG. 2003-10-08 Hrvoje Niksic * po/wget.pot: Recreated. 2003-10-08 Hrvoje Niksic * configure.in: Renamed DEBUG to ENABLE_DEBUG. 2003-10-07 Hrvoje Niksic * src/cookies.c (struct cookie): Remove unused backpointer to cookie jar. 2003-10-07 Hrvoje Niksic * src/cmpt.c (memmove): Comment out, since it's no longer used. * src/cookies.c (cookie_jar_generate_cookie_header): Allocate room for chains in one pass. (find_chains_of_host): Assume that the caller has allocated DEST to be sufficiently large to take all the data. (eliminate_dups): Run through the array and eliminate dups on the fly instead of using memmove. (cookie_jar_process_set_cookie): Free cookie->domain before re-setting it. 2003-10-07 Hrvoje Niksic * doc/wget.texi (HTTP Options): Documented --post-file and --post-data. 2003-10-05 Hrvoje Niksic * src/utils.c (file_size): Return -1 if fopen() returns NULL. Prior to this patch, wget --post-file=nosuchfile dumped core. 2003-10-05 Gisle Vanem * src/mswindows.c (set_sleep_mode): Fix type of _SetThreadExecutionState. 2003-10-04 Hrvoje Niksic * src/log.c: Use `...' in function definitions; ansi2knr will convert them to va_dcl. This allowed removal of the ugly VA_START_1 and VA_START_2 macros. 2003-10-04 Hrvoje Niksic * libtool.m4: New file with contents imported from libtool. * aclocal.m4: Move libtool stuff into a separate file. That leaves this file only with Wget-specific stuff. 2003-10-04 Gisle Vanem * src/mswindows.c (run_with_timeout): Use WaitForSingleObject to wait for thread termination. 2003-10-03 Hrvoje Niksic * src/html-parse.c (convert_and_copy): Move variable declarations before statements. 2003-10-03 Gisle Vanem * src/connect.c: And don't include them here. * src/mswindows.h: Include winsock headers here. 2003-10-02 Hrvoje Niksic * src/wget.h (XMALLOC_ARRAY): Removed. (ALLOCA_ARRAY): Ditto. * src/html-parse.c: Renamed alloca_p to resized. (GROW_ARRAY): Renamed DO_REALLOC_FROM_ALLOCA to GROW_ARRAY and returned it to html-parse.c, since nothing else was using it. 2003-10-02 Hrvoje Niksic * src/utils.c (alarm_set): New function; use either setitimer or alarm to set up the alarm. (alarm_cancel): New function; cancel the alarm set up by alarm_set. (run_with_timeout): Use them. 2003-10-02 Hrvoje Niksic * src/retr.c (retrieve_url): Initialize DUMMY storage for DT. Caught by valgrind. 2003-10-02 Hrvoje Niksic * src/html-parse.c (convert_and_copy): Handle numeric entities in hexadecimal, &#xHH. (convert_and_copy): Copy the contents directly to the pool without a stack-allocated intermediary. 2003-10-02 Gisle Vanem * src/mswindows.c (run_with_timeout): For Windows: Run the 'fun' in a thread via a helper function. Continually query the thread's exit-code until finished or timed out. 2003-10-01 Hrvoje Niksic * src/url.c (url_parse): Don't leak memory when a reencoded URL turns out to be invalid. * src/url.c (parse_errors): Mark error messages for translation. (url_error): Translate error messages returned to the caller. 2003-10-01 Hrvoje Niksic * src/ftp.c (ftp_loop_internal): Initialize TMRATE to NULL to shut up the compiler. 2003-10-01 Hrvoje Niksic * po/hu.po: Updated from the TP. * po/et.po: Updated from the TP. * po/ro.po: New file from the TP. 2003-10-01 Hrvoje Niksic * po/hr.po: Updated. 2003-10-01 Hrvoje Niksic * po/POTFILES.in: Added src/convert.c. 2003-10-01 Hrvoje Niksic * doc/wget.texi: Renamed prep.ai.mit.edu to ftp.gnu.org. 2003-10-01 Hrvoje Niksic * doc/wget.texi (Contributors): Updated from ChangeLog entries. 2003-09-30 Herold Heiko * windows/Makefile.src (OBJ): Fix typo. 2003-09-29 Aaron Hawley * src/ftp.c (getftp): --spider option should now work with FTP downloads. (ftp_loop_internal): quiet reports and calculations of downloads when --spider option set, nor try deleting when --delete-after also set. (ftp_loop): --spider will skip HTML-ification of .listing file. 2003-09-26 Gisle Vanem * windows/config.h.ms: Don't declare alloca under compilers that support it. * windows/config.h.ms: Define HAVE_SNPRINTF, HAVE_VSNPRINTF, and HAVE_MEMMOVE. 2003-09-26 Gisle Vanem * src/src/mswindows.c: Added ws_percenttitle() showing progress in the window titlebar. Called from retr.c. Secured ws_mypath(). * src/windows/config.h.ms: alloca() prototype not needed. Removed "#undef ENABLE_NLS"; should be in Makefile IMHO. Moved WGET_USE_STDARG from mswindows.h to config.ms.h because of #ifdef in log.c. (MSVC's vararg.h and stdarg.h are incompatible). 2003-09-26 Gisle Vanem * src/mswindows.c (read_registry): Removed. (set_sleep_mode): New function. (windows_main_junk): Call it. 2003-09-26 Gisle Vanem * src/mswindows.c (read_registry): Fix invocation of registry functions. * src/mswindows.c (read_registry): Condition definitions of sleep and usleep with not HAVE_SLEEP and HAVE_USLEEP respectively. Define HAVE_SLEEP and HAVE_USLEEP under __DMC__. 2003-09-25 Herold Heiko * windows/Makefile.src: Updated OBJ list. 2003-09-24 Hrvoje Niksic * src/url.c (url_escape_1): Revert unintentional change to lowercase xdigit escapes. (url_escape_dir): Document that this function depends on the output of url_escape_1. 2003-09-23 Hrvoje Niksic * src/progress.c (create_image): Print the current ETA if we're done with the download. (create_image): Change '-' display char to '+' in the progress bar. * src/Makefile.in (clean): Remove .libs. 2003-09-23 Hrvoje Niksic * src/cookies.c (struct cookie): New flag domain_exact. (update_cookie_field): Skip leading dot in domain. (find_matching_chains): Match numeric addresses exactly; don't needlessly copy HOST to the stack. (matching_cookie): Added argument HOST. If cookie->domain_exact is set, check that HOST is equal to cookie->domain. (cookie_jar_load): Only use TAB as delimiter. Document the meaning of DOMAIN-FLAG. Skip leading dot in domain. (cookie_jar_load): Don't ignore DOMAIN-FLAG -- instead, set domain_exact to true if DOMAIN-FLAG is false. (save_cookies_mapper): If domain_exact is false, prepend the domain with dot, like Mozilla does. 2003-09-23 Hrvoje Niksic * Makefile.in (distclean-top): Remove autom4te.cache. 2003-09-23 Hrvoje Niksic * Makefile.in (clean-top): Remove .libs. 2003-09-22 Hrvoje Niksic * src/url.c (path_simplify): Instead of calls to memmove, handle "./" and "../" by advancing pointers. 2003-09-22 Hrvoje Niksic * src/safe-ctype.h (_sch_test): The cast of BIT to unsigned char was broken -- _sch_istable bitmasks are 16-bit, not 8-bit! Cast BIT to unsigned short instead. 2003-09-22 Hrvoje Niksic * src/retr.c (getproxy): Moved from url.c. * src/convert.c: Split off link conversion from url.c into separate file. Also included the book-keeping stuff from recur.c. 2003-09-22 Hrvoje Niksic * src/progress.c (create_image): Print the initial part of the download with '-' characters, analogous to how dot progress prints the initial part with ','. * src/hash.c (ptrhash): New function. (ptrcmp): Ditto. (hash_table_new): Default to identity hash table. 2003-09-21 Matthew J. Mellon * src/http.c (gethttp): Recognize content-type "application/xhtml+xml" as what Wget considers "text/html". 2003-09-21 Hrvoje Niksic * src/main.c (main): Use setoptval() for setting the options. Use run_command for `-e'. * src/init.c (parse_line): Rewritten to return COMIND right away. Changed linkage to static. (run_wgetrc): Use the available comind when calling setval, so it doesn't have to be computed twice. (setval_internal): New function, runs the command's action without any error checking. (setoptval): New function, does what setval used to do, but exits in case of error. (run_command): New function. 2003-09-21 Hrvoje Niksic * src/init.c: Improved documentation of functions. (cmd_boolean): Attempt to make code that tries to avoid calling strcmp for "speed" a bit more readable. * src/init.c (simple_atof): Report error on encountering non-digit, non-"." character. (simple_atoi): Replacement for myatoi(), calling interface compatible with simple_atof. Updated myatoi's callers. 2003-09-21 Hrvoje Niksic * src/init.c (simple_atof): New function. (cmd_time): Use it. (cmd_bytes): Accept things like "1.5k" and such. Use simple_atof to parse decimals. * src/retr.c (limit_bandwidth): Adjust each sleep by the error of the previous one. 2003-09-21 Hrvoje Niksic * src/connect.c (select_fd): Change MAXTIME's type to double. Handle its decimal part. * src/retr.c (sleep_between_retrievals): In the random-wait case, use random_float() to wait between 0 and 2*opt.wait seconds. * src/utils.c (run_with_timeout): Accept `double' timeouts. Correctly handle timeout values in (0, 1) range. (random_float): New function. * src/options.h (struct options): Change the types of wait, waitretry, and timeout to double. * src/init.c (cmd_time): Accept floating point time. 2003-09-21 Hrvoje Niksic * src/connect.c (connect_with_timeout): Made timeout type double. * src/options.h (struct options): New members read_timeout, dns_timeout, and connect_timeout. Use them. 2003-09-21 Hrvoje Niksic * doc/wget.texi: Documented the new timeout options. 2003-09-21 Bertrand Demiddelaer * src/url.c (path_simplify): Would read two bytes past the end of the string in the "./" case. 2003-09-21 Aaron S. Hawley * doc/wget.texi: Split version to version.texi. Tweak documentation's phrasing and markup. 2003-09-20 Hrvoje Niksic * src/url.c (uri_merge): Get rid of uri_merge_1. (uri_merge): Merge "foo//", "bar" as "foo//bar", not "foo///bar", i.e. don't add an extra slash merely because BASE ends with two slashes. (parse_credentials): Renamed from parse_uname. Rewrittern in standard [beg, end) calling style. (url_skip_credentials): Renamed from url_skip_uname. Made static. (url_skip_credentials): Include # and ; as terminators. Old code would mistakenly consider "http://foo.com#hniksic@iskon.hr" to contain a username. (url_skip_scheme): Removed because it was unused. (url_has_scheme): Require "scheme" to be at least one char long. 2003-09-20 Hrvoje Niksic * src/retr.c (get_contents): Cosmetic fixes. 2003-09-19 Hrvoje Niksic * src/wget.h (BOUNDED_TO_ALLOCA): Evaluate PLACE only once. (ARRAY_SIZE): Renamed to countof. All callers updated. 2003-09-19 Hrvoje Niksic * src/url.c (url_file_name): Expect NULL dir_prefix. * src/init.c (cmd_file): Use a macro to prevent multiple #ifdef WINDOWS. (defaults): Set dir_prefix to NULL by default. 2003-09-19 Hrvoje Niksic * src/safe-ctype.h (_sch_test): Cast BIT to unsigned char, like latest gcc does. 2003-09-19 Hrvoje Niksic * src/main.c (main): New option --strict-comments. * src/html-parse.c (find_comment_end): New function: simple BM search for "-->". (map_html_tags): Use it if looking at a comment and not in strict comments mode. 2003-09-19 Hrvoje Niksic * doc/wget.texi: Changed @itemx not preceded by @item to @item. 2003-09-18 Hrvoje Niksic * src/safe-ctype.h: Don't #define ctype.h macros to errors because that loses when someone #include's ctype.h after safe-ctype.h. 2003-09-18 Hrvoje Niksic * src/retr.c (get_contents): Pass the correct argument to ssl_iread. 2003-09-17 Hrvoje Niksic * src/url.c: Undef U, W, C after use. 2003-09-17 Hrvoje Niksic * src/url.c (url_escape_1): New function. (url_escape): Use it. (sync_path): Handle pathological cases where u->file and u->dir contain really strange characters. (ENCODE): Deleted. (REENCODE): Deleted. 2003-09-17 Hrvoje Niksic * src/init.c (cmd_spec_restrict_file_names): Allow the OS setting to be augmented by ",nocontrol" which means don't escape the control characters, but otherwise keep OS settings. * src/url.c (file_unsafe_char): Deleted. (append_uri_pathel): Query filechr_table directly. (filechr_table): Separated Unix, Windows, and control-unsafe characters. 2003-09-17 Hrvoje Niksic * ltmain.sh, aclocal.m4: Upgrade to libtool 1.4.3. Libtool 1.5 has been out for a while now, but it can wait until after Wget 1.9 is released. 2003-09-17 Hrvoje Niksic * install-sh, mkinstalldirs: Updated from Autoconf 2.57. 2003-09-17 Hrvoje Niksic * doc/wget.texi (Download Options): Explain new --restrict-file-names semantics. 2003-09-17 Hrvoje Niksic * doc/wget.texi (Download Options): Explain how --tries works by default. 2003-09-17 Hrvoje Niksic * config.sub: Ditto. * config.guess: Updated from Autoconf 2.57. 2003-09-17 Aurelien Marchand * src/ftp.h: Added OS400 system in enum * src/ftp-basic.c: recognize OS400 systems * src/ftp.c: don't prepend the CWD if talking to OS400, since it breaks the change in library 2003-09-16 Noel Kothe * doc/wget.texi (Download Options): Fix misspelling. 2003-09-16 Mauro Tortonesi * configure.in, aclocal.m4: Added proper IPv6 detection. 2003-09-16 Hrvoje Niksic * util/dist-wget: Fixed portable echo checking under Bash. 2003-09-16 Hrvoje Niksic * src/utils.c (wtimer_sys_diff): Convert the time difference to signed __int64, then to double. This works around MS VC++ 6 which can't convert unsigned __int64 to double directly. 2003-09-16 Hrvoje Niksic * src/url.c (url_file_name): Don't reallocate FNAME if the file doesn't exist, as is usually the case. * src/utils.c (unique_name): New flag allow_passthrough. 2003-09-16 Hrvoje Niksic * src/http.c (post_file): Don't pad the file if it's not large enough. Bail out instead. 2003-09-16 Hrvoje Niksic * src/Makefile.in (clean): Also remove the core. files produced by recent Linux systems. 2003-09-16 Hrvoje Niksic * doc/wget.texi: Set the man page title to a string more descriptive than "Wget manual". 2003-09-16 Hrvoje Niksic * doc/Makefile.in ($(TEXI2POD)): Update only the #! line. * doc/texi2pod.pl: New version from Gcc. 2003-09-16 Hrvoje Niksic * configure.in: Change AC_CHECK_FUNC(getaddrinfo...) to AC_CHECK_FUNCS, which automatically defines HAVE_GETADDRINFO. 2003-09-16 Hrvoje Niksic * Makefile.in (all): Don't build configure.bat by default. 2003-09-15 Nicolas Schodet * doc/wget.texi (Download Options): Add link to Proxies. 2003-09-15 Hrvoje Niksic * src/wget.h (XDIGIT_TO_XCHAR): Implement as index into a literal string. (XDIGIT_TO_xchar): Ditto. 2003-09-15 Hrvoje Niksic * src/utils.c: Change the type of timer-related functions from long to double, for better precision. On machines supporting gettimeofday the timers now work with granularity of less than one millisecond. 2003-09-15 Hrvoje Niksic * src/url.c (strpbrk_or_eos): Implement as a macro under Gcc. 2003-09-15 Hrvoje Niksic * src/retr.c (get_contents): Reduce the buffer size to the amount of data that may pass through for one second. This prevents long sleeps when limiting bandwidth. * src/connect.c (connect_to_one): Reduce the socket's RCVBUF when bandwidth limitation to small values is requested. 2003-09-15 Hrvoje Niksic * src/progress.c (update_speed_ring): Moved the speed ring update to a separate function and documented it better. * src/progress.c: Use `double' for most timers to support granularity smaller than 1ms. 2003-09-15 Hrvoje Niksic * src/cookies.c (parse_set_cookies): Fixed the parser to handle more edge conditions. (test_cookies): New function, contains a test suite for parse_set_cookies. 2003-09-15 Hrvoje Niksic * src/cookies.c (parse_set_cookies): Allow trailing space in set-cookies header. Also, allow any amount of whitespace, not only one character. Allow empty set-cookies header without spewing an error. 2003-09-14 Hrvoje Niksic * src/utils.c (wtimer_sys_set): Extracted the code that sets the current time here. (wtimer_reset): Call it. (wtimer_sys_diff): Extracted the code that calculates the difference between two system times here. (wtimer_elapsed): Call it. (wtimer_elapsed): Don't return a value smaller than the previous one, which could previously happen when system time is set back. Instead, reset start time to current time and note the elapsed offset for future calculations. The returned times are now guaranteed to be monotonically nondecreasing. 2003-09-14 Hrvoje Niksic * src/url.c (append_uri_pathel): Use opt.restrict_file_names when calling file_unsafe_char. * src/init.c: New command restrict_file_names. * src/main.c (main): New option --restrict-file-names[=windows,unix]. * src/url.c (url_file_name): Renamed from url_filename. (url_file_name): Add directory and hostdir prefix here, not in mkstruct. (append_dir_structure): New function, does part of the work that used to be in mkstruct. Iterates over path elements in u->path, calling append_uri_pathel on each one to append it to the file name. (append_uri_pathel): URL-unescape a path element and reencode it with a different set of rules, more appropriate for handling of files. (file_unsafe_char): New function, uses a lookup table to decide whether a character should be escaped for use in file name. (append_string): New utility function. (append_char): Ditto. (file_unsafe_char): New argument restrict_for_windows, decide whether Windows file names should be escaped in run-time. * src/connect.c: Include to get prototype for abort(). 2003-09-14 Hrvoje Niksic * doc/wget.texi (Download Options): Document the new option --restrict-file-names and the corresponding wgetrc command. 2003-09-10 Hrvoje Niksic * src/init.c: New command dns_cache. * src/main.c (main): New option --dns-cache[=off]. 2003-09-10 Hrvoje Niksic * src/init.c (cmd_boolean): Accept yes/no along with on/off. (cmd_lockable_boolean): Ditto. 2003-09-10 Hrvoje Niksic * src/host.c (lookup_host): Print the result of the DNS lookup. 2003-09-10 Hrvoje Niksic * doc/wget.texi (Download Options): Documented new option --dns-cache. 2003-09-09 Hrvoje Niksic * src/url.c (url_parse): Return an error if the URL contains a [...] IPv6 numeric address and we don't support IPv6. 2003-09-09 Hrvoje Niksic * src/config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6. * src/all: Use #ifdef ENABLE_IPV6 instead of the older INET6. Use HAVE_GETADDRINFO for getaddrinfo-related stuff. 2003-09-09 Hrvoje Niksic * configure.in, aclocal.m4: Added configure check for IPv6 and getaddrinfo. From Daniel Stenberg. 2003-09-05 Mauro Tortonesi src/url.c: added RFC 2732 compliance for URL parsing. The functions is_*_address valid are a modified version of glibc 2.3.2 inet_pton's code. 2003-09-05 Maciej W. Rozycki * configure.in: Additional M4 quoting. 2003-09-05 Hrvoje Niksic * src/url.c (is_valid_ipv6_address): Modified to not require zero-terminated strings. (is_valid_ipv4_address): Ditto. 2003-09-04 Hrvoje Niksic * aclocal.m4, configure.in: Made them work under Autoconf 2.5x. 2003-09-03 Ahmon Dancy * src/main.c init.c options.h: Added --retry-connrefused option so that Connection Refused failures are treated as non-fatal (when trying to retrieve from busy servers). * src/wget.h: New CONNECT_ERROR macro for encapsulating this modification. * src/ftp.c http.c : Use CONNECT_ERROR macro in places where ECONNREFUSED was checked. 2003-03-09 Nicolas Schodet * Makefile.in: Fixed bad configure.bat scrdir. 2003-02-25 Hrvoje Niksic * libtool.m4, ltmain.sh, config.sub, config.guess: Upgrade to libtool 1.5.14. 2003-02-24 Hrvoje Niksic * configure.in: Don't check for AI_ADDRCONFIG here, it is checked for in the source directly. 2003-02-23 Hrvoje Niksic * libtool.m4, ltmain.sh, config.sub, config.guess: Upgrade to libtool 1.5.8. 2003-01-11 Ian Abbott * src/ftp.c (ftp_retrieve_glob): Reject insecure filenames as determined by calling new function has_insecure_name_p. This is based on a patch by Red Hat. * src/fnmatch.c (has_insecure_name_p): New function: returns non-zero if filename starts with `/' or contains `../' and is therefore considered insecure. * src/fnmatch.h: Declare has_insecure_name_p(). 2002-08-03 Hrvoje Niksic * src/init.c (cmd_file): Allocate RESULT correctly. 2002-07-24 Hrvoje Niksic * src/recur.c (retrieve_tree): Check whether downloaded_html_set is non-NULL before using it. 2002-05-27 Ian Abbott * windows/config.h.bor: Do #define WGET_USE_STDARG. 2002-05-27 Hrvoje Niksic * src/html-parse.c (NAME_CHAR_P): Allow almost any character here. 2002-05-24 Hrvoje Niksic * src/progress.c (bar_set_params): Fall back to dot progress if the terminal type is "emacs". 2002-05-20 Hrvoje Niksic * windows/config.h.ms: Ditto. * windows/config.h.bor: Don't #define __STDC__. 2002-05-20 Hrvoje Niksic * src/log.c: Don't #undef WGET_USE_STDARG. 2002-05-18 Hrvoje Niksic * ALL: Update the license to reflect the OpenSSL exception. 2002-05-16 Ian Abbott * src/url.c (schemes_are_similar_p): New function to test enumerated scheme codes for similarity. * src/url.h: Declare it. * src/recur.c (download_child_p): Use it to compare schemes. This also fixes a bug that allows hosts to be spanned (without the -H option) when the parent scheme is https and the child's is http or vice versa. 2002-05-16 Ian Abbott * src/recur.c (download_child_p): Minor optimization to avoid an unnecessary additional call to schemes_are_similar_p function. 2002-05-16 Hrvoje Niksic * src/hash.c (prime_size): Store the offset of the prime number in the prime table. When searching, start with the given offset. (hash_table_new): Pass the pointer to ht->prime_offset to prime_size. (grow_hash_table): Ditto. (prime_size): Make 13 the first prime to make empty hash tables slightly smaller. 2002-05-14 Bill Richardson * src/ftp.c (getftp): Don't ftruncate stdout. * src/http.c (gethttp): Don't ftruncate stdout. 2002-05-09 Ian Abbott * src/cmpt.c (strptime_internal): Synched with glibc-2.1.3. (get_number): Ditto. (get_alt_number): Ditto. (__isleap): New function-like macro used by strptime. (day_of_the_week): New function used by strptime. (day_of_the_year): Ditto. (__mon_yday): Now shared by mktime and strptime implementations. 2002-05-08 Hrvoje Niksic * src/cookies.c (check_domain_match): Use match_tail in case insensitive mode. * src/utils.c (match_tail): Allow the caller to specify case insensitive mode. * src/cookies.c (store_cookie): When expiry_time is 0, print it as undefined, not indefinite. 2002-05-07 Ian Abbott * src/cookies.c (cookie_jar_process_set_cookie): Do not store discarded cookie. 2002-04012 Ian Abbott * src/http.c (http_loop): Compensate for MS Windows two-second granularity of file modification time when comparing timestamps. * src/ftp.c (ftp_retrieve_list): Ditto. 2002-04-24 Hrvoje Niksic * doc/wget.texi (Robot Exclusion): Explain how to turn off the robot exclusion support from the command line. (Wgetrc Commands): Explain that the `robots' variable also takes effect on the "nofollow" matching. 2002-04-23 Ian Abbott * windows/config.h.ms: Accounted for MSVC not defining `__STDC__' when Microsoft's extensions are enabled and define it anyway (set to `1'). Defined some things that broke as a result of this. 2002-04-21 Thomas Lussnig * src/gen_ssl.c: - allow checking of server cert - allow defining client cert type - allow limit of ssl protocol - check more return values - added debug message on break 2002-04-21 Hrvoje Niksic * src/recur.c (download_child_p): Revert order of items in check number 6 for clarity. 2002-04-21 Hrvoje Niksic * src/cookies.c (check_domain_match): Allow cookies to be set for subdomains of unknown top-level domains under some circumstances. 2002-04-20 Hrvoje Niksic * src/init.c: Ditto. * src/main.c: Ditto. * src/http.c: Use the new interface. * src/cookies.c: Provide an OO-style "cookie jar" interface to enable separate cookie jars. * src/http.c (http_atotm): Declare argument as const. 2002-04-20 Hrvoje Niksic * src/cookies.c (cookie_new): Default to PORT_ANY. (find_cookie_chain_exact): Only search by DOMAIN. (find_matching_cookie): Also check that PORT matches. (store_cookie): Only match the domain. (set_cookie_header_cb): When a cookie "fakes" a domain, assume it is valid for that host rather than discarding it completely. (find_matching_chains): Don't search by PORT. (matching_cookie): Also match PORT. (load_cookies): Set the port if specified, otherwise leave it as ANY. (save_cookies_mapper): Save the port if specified, otherwise leave it empty. 2002-04-20 Hrvoje Niksic * po/de.po: Updated from the TP. 2002-04-19 Thomas Lussnig * src/init.c: The option `egdfile' was not in sort order. 2002-04-16 Hrvoje Niksic * src/http.c (gethttp): If Content-Type is not given, assume text/html. 2002-04-16 Hrvoje Niksic * src/ftp.c (getftp): Treat directories that begin with : as absolute. (getftp): Strip trailing slashes from con->id before merging it with TARGET. 2002-04-15 Ian Abbott Makefile.in: Updated several dependencies for object files to take account of nested include files. 2002-04-15 Ian Abbott Makefile.in: The target `connect$o' (connect.o) now depends on `utils.h' 2002-04-15 Ian Abbott * src/host.c (SET_H_ERRNO): New function-like macro to set `h_errno'. (gethostbyname_with_timeout): Use it. * src/utils.c: Don't define `SETJMP()', `run_with_timeout_env' or `abort_run_with_timeout()' when `USE_SIGNAL_TIMEOUT' is undefined. 2002-04-15 Hrvoje Niksic * src/recur.c (download_child_p): Don't ignore rejection of HTML documents that are themselves leaves of recursion. 2002-04-15 Hrvoje Niksic * src/host.c (getaddrinfo_with_timeout): New function. (gethostbyname_with_timeout): Ditto. (lookup_host): Use them. 2002-04-15 Hrvoje Niksic * po/hr.po: Editing the Project-Id-Version to say "wget" rather than "GNU Wget". 2002-04-15 Hrvoje Niksic * doc/wget.texi (Download Options): Fix the documentation of `--progress'. 2002-04-14 Hrvoje Niksic * src/utils.c (number_to_string): Handle the case when n < -INT_MAX. 2002-04-14 Hrvoje Niksic * src/retr.c (retrieve_url): Make sure that POST is not honored for redirections. * src/http.c (gethttp): Send the POST data when requested. (post_file): New function. (gethttp): Use it. * src/main.c (main): Ditto. * src/init.c: Add new options. * src/options.h (struct options): New options post_data and post_file_name. 2002-04-14 Hrvoje Niksic * src/main.c (print_help): Document `--post-data' and `--post-file'. 2002-04-14 Hrvoje Niksic * src/init.c (comind): Use a marginally faster implementation of binary search. To quote Martin Buchholz, "a nanosecond saved is a nanosecond earned." 2002-04-14 Hrvoje Niksic * src/http.c (gethttp): Ditto. * src/retr.c (retrieve_url): Initialize variables to appease the compiler. * src/gen_sslfunc.c (ssl_iread): Don't handle EINTR when calling select_fd. (ssl_iwrite): Ditto. * src/connect.c (select_fd): Rewrite to handle EINTR. Set errno to ETIMEDOUT in case of timeout. (iread): No need to handle EINTR when calling select_fd. (iwrite): Ditto. 2002-04-14 Hrvoje Niksic * src/connect.c (connect_with_timeout): Firing SIGALRM can result in connect() exiting with EINTR. Treat EINTR the same as ETIMEDOUT. 2002-04-14 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Document `--limit-rate'. 2002-04-13 Hrvoje Niksic * src/url.c (getproxy): Accept a struct url argument. This obviates the need for USE_PROXY_P. * src/retr.c (retrieve_url): Allow proxy to be a non-FTP URL. * src/ftp.c (getftp): Recognize FWTK-style proxy. 2002-04-13 Hrvoje Niksic * src/connect.c (connect_with_timeout): Use it. * src/utils.c (run_with_timeout): New function. 2002-04-12 Ian Abbott * windows/config.h.bor: Account for Borland not defining `__STDC__' when Borland's extensions enabled, and define it anyway. 2002-04-12 Ian Abbott * windows/Makefile.src.bor: Removed pre-compiled header options as they increase build time (on my machine). 2002-04-12 Ian Abbott * src/utils.c (has_html_suffix_p): New function to test filename for common html extensions. * src/utils.h: Declare it. * src/http.c (http_loop): Use it instead of previous test. * src/retr.c (retrieve_url): Ditto. * src/recur.c (download_child_p): Ditto. 2002-04-12 Ian Abbott * src/Makefile.in: Specify libtool mode explicitly when linking. 2002-04-12 Hrvoje Niksic * src/connect.c (connect_with_timeout): New function. (connect_to_one): Use it. * src/config.h.in: Add stubs for HAVE_SIGSETJMP, HAVE_SIGBLOCK, and HAVE_SETJMP_H. 2002-04-12 Hrvoje Niksic * src/config.h.in: Only define _VA_LIST when compiled with gcc. 2002-04-12 Hrvoje Niksic * src/config.h.in: Define _VA_LIST on Solaris to prevent stdio.h from declaring va_list. From Kevin Rodgers . 2002-04-12 Hrvoje Niksic * configure.in: Check for . Check for sigsetjmp and sigblock. 2002-04-11 Hrvoje Niksic * src/url.c (url_filename): Use compose_file_name regardless of whether opt.dirstruct is set. (mkstruct): Don't handle the query and the reencoding of DIR; that is done in compose_file_name. 2002-04-11 Hrvoje Niksic * src/progress.c (struct progress_implementation): Use PARAMS when declaring the parameters of *create, *update, *finish, and *set_params. * src/netrc.c: Ditto. * src/http.c: Reformat some function definitions so that ansi2knr can read them. * src/hash.c (struct hash_table): Use the PARAMS macro around parameters in the declaration of hash_function and test_function. (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so that pre-ANSI compilers can read them. (find_mapping): Use PARAMS when declaring EQUALS. (hash_table_put): Ditto. * src/ftp.h: Wrap the parameters of ftp_index declaration in PARAMS. * src/cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL, which was unsupported by pre-ANSI compilers. From Nelson H. F. Beebe , for the most part. 2002-04-11 Hrvoje Niksic * src/progress.c (bar_create): If INITIAL is larger than TOTAL, fix TOTAL. (bar_finish): Likewise. 2002-04-11 Hrvoje Niksic * src/log.c: Set WGET_USE_STDARG if __STDC__ is defined and stdarg.h is present. 2002-04-11 Hrvoje Niksic * src/html-url.c (tag_handle_form): New function. Pick up form actions and mark them for conversion only. 2002-04-10 Hrvoje Niksic * src/wget.h: Ditto for extern char *exec_name. * src/options.h: Don't guard against OPTIONS_DEFINED_HERE -- it is perfectly legal to follow an `extern' with a non-`extern' ones, provided the types match. * src/main.c: Don't define OPTIONS_DEFINED_HERE. 2002-04-10 Hrvoje Niksic * src/progress.c (create_image): Revert to calculating ETA based on average download speed. (create_image): Don't print ETA until the download has been active for at least 3 seconds. (create_image): When ETA is not available, don't print anything. The previous version would print --:--. 2002-04-10 Hrvoje Niksic * src/progress.c (bar_update): Keep updating a subinterval until it reaches or exceeds a watermark. That way the measurement will be guaranteed to span a configurable minimum of time. The current default is 3s in 30 100ms intervals. 2002-04-10 Hrvoje Niksic * doc/wget.texi: Warn about the dangers of specifying passwords on the command line and in unencrypted files. 2002-04-09 Ian Abbott * windows/config.h.bor: define `HACK_BCC_UTIME_BUG'. Define `utime' as `borland_utime' if `HACK_BCC_UTIME_BUG' is defined. 2002-04-09 Ian Abbott * src/mswindows.c (borland_utime): New function conditionally defined when `HACK_BCC_UTIME_BUG' is defined. A reimplementation of `utime()' as Borland's `utime()' function is broken on Windows 9x systems. (Original patch by Chin-yuan Kuo .) 2002-04-09 Hrvoje Niksic * src/progress.c (bar_update): Maintain an array of the time it took to perform previous 30 network reads. (create_image): Calculate the download speed and ETA based on the last 30 reads, not the entire download. (create_image): Make sure that the ETA is not changed more than once per second. 2002-04-08 Hrvoje Niksic * src/ftp.c (ftp_loop): Propagate the result of ftp_retrieve_glob. 2002-03-26 Ian Abbott * windows/wget.dep: Updated several dependencies for object files. 2002-03-26 Ian Abbott * src/Makefile.in: Updated several dependencies for object files. 2002-03-20 Ian Abbott * windows/config.h.bor: * windows/config.h.ms: Removed conditional cruft that was there for Unix-like systems. 2002-03-20 Ian Abbott * src/mswindows.c: Include "utils.h". 2002-03-20 Ian Abbott * * windows/wget.dep: Fix dependencies for target mswindows$o (mswindows.obj) 2002-03-19 Chin-yuan Kuo * configure.bat.in: Do not check %BORPATH% as C++Builder compiler does not use it. * windows/Makefile.src.bor: * windows/config.h.bor: Migrated to free (as in beer) C++Builder compiler. 2002-03-18 Ian Abbott * src/host.h: Don't include netdb.h on windows. 2002-03-13 Ian Abbott * configure.bat: Removed (renamed to configure.bat.ini). * configure.bat.in: New (renamed from configure.bat). * Makefile.in: Add rule to copy configure.bat.in to configure.bat, converting line endings to MS-DOS format in the process. 2002-02-19 Hrvoje Niksic * src/url.c (url_parse): Don't treat '?' as query string separator when parsing FTP URLs. 2002-02-19 Hrvoje Niksic * src/recur.c (retrieve_tree): Handle the case when start_url doesn't parse. 2002-02-19 Hrvoje Niksic * src/host.h: Include Unix-specific includes #ifndef WINDOWS. Patch originally provided by Christian Lackas. 2002-02-19 Andreas Damm * src/wget.h (DO_REALLOC_FROM_ALLOCA): Multiply with sizeof(type) when calling xmalloc and memcpy. 2002-02-19 Alan Eldridge * src/host.h: Also include and . * src/ftp-basic.c: Also include . 2002-02-11 Christian Lackas * src/recur.c: recurive downloading for https fixed. 2002-02-05 Ian Abbott * src/http.c (gethttp): when -c used, mark already fully retrieved file as successfully retrieved. 2002-02-01 Hrvoje Niksic * src/html-url.c (tag_handle_meta): Don't crash on where content is missing. 2002-01-31 Herold Heiko * src/ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h, netdb.h on windows. 2002-01-30 Hrvoje Niksic * src/retr.c (retrieve_url): Remove redirection cycle detection. This is because some sites legitimately redirect the user back to the same location, e.g. after an authorization check performed by another page. MAX_REDIRECTIONS is still used to prevent infinite redirection loops. 2002-01-26 Hrvoje Niksic * src/url.c (urlchr_table): Make square braces reserved, so we can parse http://[::1]/. (url_parse): Handle host in braces. (url_string): If url->host contains colons, wrap it in braces. 2002-01-26 Hrvoje Niksic * src/url.c (url_parse): Allow all hex digits, not only decimal ones, to form an IP address. 2002-01-26 Hrvoje Niksic * src/http.c (gethttp): Wrap host name in square brackets if it contains a colon. 2002-01-24 Hrvoje Niksic * src/source: Integrated IPv6 support. Written by Thomas Lussnig . 2002-01-24 Hrvoje Niksic * src/host.c (lookup_host): Use sizeof(ip4_address) to calculate the offset. (address_list_new): Use map_ipv4_to_ip. (wget_sockaddr_set_address): Convert ADDR to IPv4 before using it in IPv4 context. 2002-01-24 Hrvoje Niksic * src/connect.c (resolve_bind_address): New function. (connect_to_one): Use it. (bindport): Ditto. * src/init.c: Don't resolve bind-address here. * src/host.c (wget_sockaddr_set_address): Would bug out with ADDR == NULL. 2002-01-17 Hrvoje Niksic * src/netrc.c (parse_netrc): Skip leading whitespace before testing whether the line is empty. Empty lines still contain the line terminator. 2002-01-15 Ian Abbott * src/init.c (cmd_file): Change `\' to `/' for Windows (yes, really!) (cmd_directory): New function. Like cmd_file(), but strips trailing directory separators. (commands): Change action for "dirprefix" from `cmd_file' to `cmd_directory'. * src/utils.c (make_directory): Allow intermediate `mkdir' calls to fail, as not all path components that do not exist should be directory components, especially under Windows. 2002-01-15 Hrvoje Niksic * src/gen_sslfunc.c (ssl_iread): Call select on the file descriptor only if no data is pending in SSL buffers. From tony@bluetail.com. 2002-01-15 Hrvoje Niksic * MACHINES: OS X entry by Jonathan Davis. 2002-01-14 Hrvoje Niksic * src/url.c (parse_uname): URL-decode *USER and *PASSWD. 2002-01-14 Hrvoje Niksic * src/http.c (gethttp): Invalidate SOCK if get_contents encountered an error. 2002-01-14 Hrvoje Niksic * src/headers.c (header_get): Strip trailing whitespace from the header. 2002-01-07 Ian Abbott * src/url.c (uri_merge_1): Deal with "net path" relative URL (one that starts with "//"). 2001-12-24 Hrvoje Niksic * src/version.c: Wget 1.8.1 is released. 2001-12-19 Hrvoje Niksic * src/version.c: Wget 1.8.1-pre3 is released. 2001-12-19 Hrvoje Niksic * src/recur.c (retrieve_tree): Enqueue the canonical representation of start_url, so that the test against dl_url_file_map works. 2001-12-19 Hrvoje Niksic * src/log.c (logputs): Check for requested verbosity before printing anything. 2001-12-19 Hrvoje Niksic * src/html-url.c (tag_handle_link): Treat the "shortcut icon" link as inline. 2001-12-19 Csaba Raduly * windows/Makefile.watcom: add gen-md5.obj and progress.obj to the list of "sources" * configure.bat: add section for Watcom 2001-12-18 Ian Abbott * src/recur.c (retrieve_tree): Pass on referring URL when retrieving recursed URL. 2001-12-18 Hrvoje Niksic * src/recur.c (retrieve_tree): Make a copy of file obtained from dl_url_file_map because the code calls xfree(file) later. 2001-12-18 Hrvoje Niksic * src/recur.c (register_html): Maintain a hash table of HTML files along with the list. Disallow duplicates. (retrieve_tree): Use downloaded_html_set to check whether the file found in dl_url_file_map is an HTML file, and descend into it if so. (convert_all_links): Don't guard against duplicates in downloaded_html_list, since they are no longer possible. 2001-12-17 Hrvoje Niksic * src/version.c: Wget 1.8.1-pre2 is released. 2001-12-17 Hrvoje Niksic * src/retr.c (sleep_between_retrievals): Simplify indentation. 2001-12-17 Hrvoje Niksic * src/gen_sslfunc.c (ssl_init_prng): Use random_number to get a byte of "randomness" at a time. (ssl_init_prng): Don't seed the PRNG; random_number will do that. * src/retr.c (sleep_between_retrievals): Use it. Make sure that the random amount averages in opt.wait. (sleep_between_retrievals): Don't seed the PRNG; random_number will do that. * src/utils.c (random_number): New function. 2001-12-16 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Undocument simple_host_check. 2001-12-14 Hrvoje Niksic * src/url.c (path_simplify): Move here from utils.c, and make static. 2001-12-13 Hrvoje Niksic * src/version.c: Wget 1.8.1-pre1 is released. 2001-12-13 Hrvoje Niksic * src/res.c (matches): Fix broken URL in the docstring. 2001-12-13 Hrvoje Niksic * src/recur.c (register_download): Don't abort when one URL references two different files. 2001-12-13 Hrvoje Niksic * src/init.c (wgetrc_file_name): Print correct message when loading getenv("WGETRC") fails. 2001-12-13 Hrvoje Niksic * src/http.c (gethttp): Check for conn->scheme, not u->scheme, before calling ssl_iwrite. 2001-12-13 Hrvoje Niksic * src/html-url.c (tag_url_attributes): Mark as external. 2001-12-13 Hrvoje Niksic * po/ja.po: Ditto. * po/sv.po: Ditto. * po/de.po: Ditto. * po/es.po: Ditto. * po/fr.po: Ditto. * po/et.po: Ditto. * po/tr.po: Ditto. * po/ru.po: Update from TP. 2001-12-13 Hrvoje Niksic * doc/wget.texi (Robots): Fix broken URLs that point to the webcrawler web site. 2001-12-12 Hrvoje Niksic * src/url.c (get_urls_file): Cosmetic changes. 2001-12-12 Hrvoje Niksic * src/html-url.c (collect_tags_mapper): Break into several functions. (tag_url_attributes): Collect . 2001-12-12 Hrvoje Niksic * src/html-url.c (append_one_url): Resurrect warning when unable to resolve a relative link. 2001-12-12 Hrvoje Niksic * configure.in: Autodetect SSL. Check for SSL includes too. 2001-12-11 Hrvoje Niksic * src/host.c: New type ipv4_address. Use it consistently instead of `unsigned char[4]' and `unsigned char *'. (pretty_print_address): Accept a `const void *', to require even less casting. 2001-12-11 Hrvoje Niksic * src/ftp-ls.c (ftp_parse_vms_ls): Fix obvious memory leaks. 2001-12-11 Hrvoje Niksic * doc/wget.texi (HTTP Options): Explain how to make IE produce a `cookies.txt'-compatible file. Reported by Herold Heiko. 2001-12-11 Hrvoje Niksic * doc/texi2pod.pl.in: Handle @asis in table. 2001-12-11 Hrvoje Niksic * configure.in: Check for md5_calc rather than MD5Update when looking for Solaris md5. 2001-12-11 Hrvoje Niksic * config.sub: Ditto. * config.guess: Ditto. * aclocal.m4: Ditto. * ltmain.sh: Upgrade to libtool 1.4.2. 2001-12-10 Hrvoje Niksic * src/utils.c (path_simplify): Rewrite, with better comments, and without the use of strcpy to move overlapping blocks. 2001-12-10 Hrvoje Niksic * src/utils.c (path_simplify): Correctly handle the unlikely case that b starts out as path + 1. 2001-12-10 Hrvoje Niksic * src/utils.c (long_to_string): Return a pointer after where the number ends. (long_to_string): Rename to number_to_string. 2001-12-10 Hrvoje Niksic * src/main.c (main): Initialize progress after fork_to_background, so that it knows when to use dots. * src/mswindows.c (ws_hangup): Call log_request_redirect_output. * src/utils.c (fork_to_background): Print the PID of the child process. * src/log.c (log_request_redirect_output): Set a flag that output redirection has been requested. Doing anything else in a signal handler is unsafe. (check_redirect_output): New function: check whether redirection has been requested and, if so, call redirect_output(). (logputs): Call check_redirect_output. (logprintf): Ditto. (debug_logprintf): Ditto. (redirect_output): Print clearer messages. * src/main.c (redirect_output_signal): Don't call redirect_output_signal directly. Instead, call log_request_redirect_output. * src/utils.c (memfatal): Ditto. * src/progress.c (display_image): Use it. * src/log.c (log_set_save_context): New function: allow the caller to turn off saving log context lines. 2001-12-10 Hrvoje Niksic * src/host.c (address_list_set_faulty): Uncomment a sanity check. 2001-12-09 Hrvoje Niksic * src/version.c: Wget 1.8 is released. 2001-12-09 Hrvoje Niksic * src/url.c (reencode_string): Declare static. * src/res.c (registered_specs): Declare static. * src/progress.c (current_impl_locked): Declare static. * src/log.c (flush_log_p): Declare static. (needs_flushing): Ditto. * src/http.c (digest_authentication_encode): Declare static. * src/html-url.c (init_interesting): Declare static. * src/host.c (host_name_addresses_map): Declare static. * src/cookies.c (find_matching_chains): Declare static. * src/ftp-ls.c (ftp_parse_vms_ls): Warn about the memory leak indicated by lint. * src/utils.c (path_simplify): Remove unused variable STUB_CHAR. * src/host.c (address_list_set_faulty): Document that INDEX is currently unused. * src/url.c (rewrite_shorthand_url): Remove unused variable PATH. 2001-12-09 Hrvoje Niksic * src/progress.c (create_image): Fix ETA padding when hours are prined. 2001-12-09 Hrvoje Niksic * src/main.c (main): Remove stray debugging message. 2001-12-09 Hrvoje Niksic * src/init.c (cmd_spec_progress): Resurrect. Check whether VAL is a valid progress type before setting it. 2001-12-09 Hrvoje Niksic * doc/wget.texi: Bump version to 1.8. 2001-12-08 R.I.P. Deaddog * po/zh_TW.po: Updated for 1.8. 2001-12-08 Hrvoje Niksic * src/version.c: Wget 1.8-pre2 is released. 2001-12-08 Hrvoje Niksic * po/tr.po: Ditto. * po/sv.po: Ditto. * po/ru.po: Ditto. * po/fr.po: Ditto. * po/es.po: Ditto. * po/de.po: Update from TP. 2001-12-08 Hrvoje Niksic * doc/wget.texi (HTTP Options): Provide more specific information about how --load-cookies is meant to be used. 2001-12-08 Hrvoje Niksic * doc/texi2pod.pl: Include the EXAMPLES section. * doc/wget.texi (Overview): Shorten the man page DESCRIPTION. (Examples): Redo the Examples chapter. Include it in the man page. 2001-12-06 Hrvoje Niksic * src/version.c: Wget 1.8-pre1 is released. 2001-12-06 Hrvoje Niksic * src/utils.c (read_whole_line): Handle lines beginning with \0. 2001-12-06 Hrvoje Niksic * src/url.c (scheme_disable): New function. * src/main.c (main): Call ssl_init_prng from here rather than from init_ssl, so that it has a chance to disable support for https before a URL has been resolved. * src/gen_sslfunc.c (ssl_init_prng): Seed with rand() if all else failed. (ssl_init_prng): Disable support for https if seeding the PRNG fails. 2001-12-06 Hrvoje Niksic * src/progress.c (progress_handle_sigwinch): Set up the signal again. * src/utils.c: Include , where Solaris defines TIOCGWINSZ. * src/progress.c (bar_create): Don't use the last column on the screen. (create_image): Pad ETA to constant size. Pad SIZE to nine digits only until it exceeded them. 2001-12-06 Hrvoje Niksic * src/progress.c (progress_create): Make sure that, when the output is redirected, the progress implementation gets changed to the fallback one. (bar_set_params): Set current_impl_locked to 1 when "force" is specified. (progress_create): Don't change the progress implementation if current_impl_locked is non-zero. * src/main.c (redirect_output_signal): Call progress_schedule_redirect. * src/progress.c (progress_schedule_redirect): New function. 2001-12-06 Hrvoje Niksic * src/log.c (logvprintf): Restructure to allow being called multiple times. (logprintf): Call logvprintf in a loop. (debug_logprintf): Ditto. 2001-12-06 Hrvoje Niksic * src/gen_sslfunc.c (ssl_init_prng): Make the printed message translatable. 2001-12-06 Hrvoje Niksic * src/gen_sslfunc.c (ssl_init_prng): Allow the user to disable EGD by setting egd_file it to empty string. * src/main.c (main): Change the option name from --sslegdsock to --egd-file. 2001-12-06 Hrvoje Niksic * po/et.po: Update from the TP. 2001-12-06 Hrvoje Niksic * po/de.po: Ditto. * po/fr.po: Ditto. * po/tr.po: Ditto. * po/sv.po: Ditto. * po/et.po: Update from TP. * po/hu.po: New file from TP. 2001-12-06 Hrvoje Niksic * configure.in: Check for 2001-12-05 Hrvoje Niksic * src/utils.c (path_simplify): Document with test cases. 2001-12-05 Hrvoje Niksic * src/recur.c (convert_all_links): Guard against duplicates in downloaded_html_files. (register_download): Don't invalidate similar-looking URLs. (match_except_index): New function. 2001-12-04 Ian Abbott * src/snprintf.c (dopr): Use `unsigned int' as the second argument to va_arg when casting to `unsigned short' is intended. 2001-12-04 Hrvoje Niksic * src/url.c (local_quote_string): Reenable quoting of question marks, but only when `--html-extension' is used. 2001-12-04 Hrvoje Niksic * src/recur.c (retrieve_tree): Check whether the URL was already downloaded before downloading it again. (descend_child_p): Renamed to download_child_p. (register_download): When one URL is downloaded to a file already "owned" by another URL, delete all references that map any URL to that file. (register_delete_file): New function. (retrieve_tree): Use it after deleting a file. * src/url.c (url_parse): Re-canonicalize the URL also if the path is empty, so that e.g. "http://www.server.com" -> "http://www.server.com/". (lowercase_str): Use ISUPPER instead of !ISLOWER. * src/retr.c (retrieve_url): Use the canonical URL form when calling register_download(). 2001-12-04 Hrvoje Niksic * src/gen_sslfunc.c: Ditto. * src/rbuf.c: Include . 2001-12-04 Herold Heiko * windows\Makefile.src: add gen_sslfunc.c * windows\Makefile.src.bor: ditto. 2001-12-04 Herold Heiko * src/gen_sslfunc.c: on windows provide ssl crypto random initialization through RAND_screen(); could possibly be not enough for strong ssl communication (see the relevant manual page from the openssl package). 2001-12-03 Hrvoje Niksic * src/version.c: Wget 1.8-beta3 is released. 2001-12-03 Hrvoje Niksic * src/snprintf.c (dopr): Replace `short int' and `unsigned short int' with `int' when using it as the second argument to `va_arg'. 2001-12-03 Hrvoje Niksic * src/snprintf.c (dopr): Cast the result of va_arg to short int and short unsigned int where these types are expected to be used. 2001-12-03 Hrvoje Niksic * src/host.c (address_list_new_one): New function. (lookup_host): Use it. 2001-12-03 Hrvoje Niksic * src/ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting the socket data. * src/ftp.c: Ditto. * src/http.c: No need to declare h_errno. * src/host.c: Declare h_errno. 2001-12-03 Andre Majorel * src/host.c (lookup_host): Don't initialize TMPSTORE directly because it's not legal C. 2001-12-02 Hrvoje Niksic * src/version.c: Wget 1.8-beta2 is released. 2001-12-02 Hrvoje Niksic * src/utils.c (file_merge): If BASE doesn't contain a slash, just return a copy of FILE. 2001-12-01 Hrvoje Niksic * src/version.c: Wget 1.8-beta1 is released. 2001-12-01 Hrvoje Niksic * src/url.c (url_full_path): Document better. * src/http.c (gethttp): Use the full path when creating digest authorization. 2001-12-01 Hrvoje Niksic * src/url.c (replace_attr_refresh_hack): New function. (convert_links): Call replace_attr_refresh_hack for Refresh links. It will add the "TMOUT; URL=" junk before the link. * src/html-url.c (collect_tags_mapper): Set ID to the ID of the "content" attribute, not "http-equiv". (collect_tags_mapper): Don't use OFFSET to hack the raw_* values; instead, store the information that this entry belongs to a "refresh" link. 2001-12-01 Hrvoje Niksic * src/url.c (get_urls_file): If opt.base_href is specified, merge each URL with the base. 2001-12-01 Hrvoje Niksic * src/recur.c (retrieve_tree): Allow -p retrievals to exceed maximum depth by more than one. 2001-12-01 Hrvoje Niksic * src/main.c (print_help): Don't document the removed `-nh'. 2001-12-01 Hrvoje Niksic * src/ftp.c (getftp): When PWD fails, assume "/". * src/ftp-basic.c (ftp_syst): Fix indentation. 2001-12-01 Hrvoje Niksic * src/cookies.c (path_matches): Return 0 if PREFIX doesn't begin with '/'. 2001-12-01 Hrvoje Niksic * src/cookies.c (path_matches): FULL_PATH doesn't begin with '/', but PREFIX does. 2001-12-01 Hrvoje Niksic * src/cookies.c (check_domain_match): Reimplement to match Netscape's "preliminary specification" for cookies. 2001-12-01 Hrvoje Niksic * po/hr.po: Updated Croatian translation. 2001-12-01 Hrvoje Niksic * doc/wget.texi: Update the manual with the new recursive retrieval stuff. 2001-11-30 T. Bharath * src/http.c (persistent_available_p): Call SHUTDOWN_SSL if test_socket_open fails. 2001-11-30 Ingo T. Storm * doc/sample.wgetrc: Document ftp_proxy, too. 2001-11-30 Hrvoje Niksic * src/retr.c (retrieve_url): Don't allow more than 20 redirections. 2001-11-30 Hrvoje Niksic * src/recur.c (retrieve_tree): Skip the non-inline entries when enqueuing the children of a leaf HTML node in -p mode. (descend_url_p): Ignore opt.no_parent when in -p mode and UPOS is "inline". * src/html-url.c (get_urls_html): Don't accept dash_p_leaf_HTML. (collect_tags_mapper): When an entry is "inline", mark it as such. * src/recur.c (descend_url_p): Fix test when checking for acceptance/rejection rules. 2001-11-30 Hrvoje Niksic * src/progress.c (display_image): Just print one CR to reset the cursor position. 2001-11-30 Christian Fraenkel * src/init.c: New command `ssl_egd_sock'. * src/main.c (main): New option `--sslegdsock'. * src/gen_sslfunc.c (ssl_init_prng): Seed the RNG using EGD. 2001-11-29 Hrvoje Niksic * src/recur.c (descend_url_p): When resolving no_parent, compare with start_url, not parent url. Otherwise link from /a/b/ to /a/c/ wouldn't be followed, although the download started from /a/. 2001-11-29 Hrvoje Niksic * src/http.c (http_process_range): Accept the broken output of "JavaWebServer/1.1.1". 2001-11-29 Hrvoje Niksic * src/host.c (address_list_new): Initialize al->faulty. 2001-11-29 Hrvoje Niksic * src/headers: Guard against header files being included twice. 2001-11-29 Hrvoje Niksic * src/gen-md5.c: Use unsigned char * as the buffer argument to gen_md5_update. 2001-11-29 Hrvoje Niksic * src/connect.h: Declare select_fd. 2001-11-29 Hrvoje Niksic * src/cmpt.c (memmove): Include a simple memmove implementation. 2001-11-29 Hrvoje Niksic * configure.in: Use SSL's MD5 if we're compiling with SSL anyway. 2001-11-28 Hrvoje Niksic * src/progress.c (dot_set_params): If PARAMS is unspecified, use dot_style, if available. * src/init.c: Ditto. * src/main.c (main): Resurect --dot-style. * src/progress.c (dot_finish): Print the quantity if we're left at the beginning of a row. 2001-11-27 Ian Abbott * src/retr.c (retrieve_from_file): Initialize `new_file' to NULL to prevent seg fault. 2001-11-27 Hrvoje Niksic * src/url.c (convert_links): Don't translate %d-%d. * src/main.c (print_help): Remove stray HAVE_RANDOM code. 2001-11-27 Hrvoje Niksic * src/progress.c: Change the default progress implementation to "bar". 2001-11-27 Hrvoje Niksic * src/progress.c (bar_create): Print two newlines. 2001-11-27 Hrvoje Niksic * src/ftp.c (getftp): Improve output after sending PASV. Don't attempt to "look up" the IP address we already know; call connect_to_one directly. 2001-11-27 Hrvoje Niksic * src/connect.c (connect_to_many): Use address_list_set_faulty to prevent the faulty address from being reused. * src/host.c (address_list_set_faulty): New function. (address_list_get_bounds): New function, instead of address_list_count. 2001-11-27 Hrvoje Niksic * src/cmpt.c (random): Removed. * src/retr.c (sleep_between_retrievals): Use the more portable rand() instead of random(). 2001-11-27 Hrvoje Niksic * src/cmpt.c (random): New function, a simple-minded replacement for random() on systems that don't have it. 2001-11-27 Hrvoje Niksic * po/hr.po: Updated. 2001-11-27 Hrvoje Niksic * configure.in: Don't check for random. 2001-11-27 Hrvoje Niksic * configure.in: Check for random. 2001-11-26 Ian Abbott * src/http.c (gethttp): fix undeclared variable 'err' when compiled with HAVE_SSL. 2001-11-26 Hrvoje Niksic * src/recur.c (retrieve_tree): In case of followed redirection, blacklist the pre-redirection URL. 2001-11-26 Hrvoje Niksic * src/recur.c (descend_redirect_p): New function. (retrieve_tree): Make sure redirections are not blindly followed. 2001-11-26 Hrvoje Niksic * src/progress.c: Don't allocate new timers; use the timing data propagated from the caller. * src/retr.c (get_contents): Allocate and use a timer. 2001-11-26 Hrvoje Niksic * src/http.c (last_host_ip): Made into an address_list. (invalidate_persistent): Release pc_last_host_ip. (register_persistent): Use lookup_host. (persistent_available_p): Check for equality of hosts using address_list_match_all. Call address_list_release. (http_cleanup): New function. * src/ftp.c (getftp): Use lookup_host and connect_to_many. * src/http.c (gethttp): Use lookup_host and connect_to_many. * src/connect.c (make_connection): Removed. (connect_to_one): New function. (connect_to_many): Ditto. (set_connection_host_name): Ditto. * src/host.c (lookup_host): New function; new return type. (address_list_new): New function. (address_list_count): Ditto. (address_list_copy_one): Ditto. (address_list_delete): Ditto. (address_list_release): Ditto. (pretty_print_address): Ditto. 2001-11-26 Hrvoje Niksic * src/config.h.in: Put a HAVE_USLEEP stub. * src/cmpt.c (usleep): Replacement implementation of usleep using select. * src/init.c: New option init_rate. * src/main.c (main): New option --limit-rate. * src/retr.c (limit_bandwidth): New function. (get_contents): Call it to limit the bandwidth used when downloading. * src/progress.c (dot_update): Would print the wrong download speed on rows other than the first one when the download was continued. (dot_finish): Ditto. 2001-11-26 Hrvoje Niksic * configure.in: Check for usleep. 2001-11-25 Hrvoje Niksic * util/dist-wget: New file: the script used for building Wget. 2001-11-25 Hrvoje Niksic * src/url.c (reencode_string): Use unsigned char, not char -- otherwise the hex digits come out wrong for 8-bit chars such as nbsp. (lowercase_str): New function. (url_parse): Canonicalize u->url if needed. (get_urls_file): Parse each URL, and return only the valid ones. (free_urlpos): Call url_free. (mkstruct): Add :port if the port is non-standard. (mkstruct): Append the query string to the file name, if any. (urlpath_length): Use strpbrk_or_eos. (uri_merge_1): Handle the cases where LINK is an empty string, where LINK consists only of query, and where LINK consists only of fragment. (convert_links): Count and report both kinds of conversion. (downloaded_file): Use a hash table, not a list. (downloaded_files_free): Free the hash table. * src/retr.c (retrieve_from_file): Ditto. * src/main.c (main): Call either retrieve_url or retrieve_tree for each URL, not both. * src/retr.c (register_all_redirections): New function. (register_redirections_mapper): Ditto. (retrieve_url): Register the redirections. (retrieve_url): Make the string "Error parsing proxy ..." translatable. * src/res.c (add_path): Strip leading slash from robots.txt paths so that the path representations are "compatible". (free_specs): Free each individual path, too. (res_cleanup): New function. (cleanup_hash_table_mapper): Ditto. * src/recur.c (url_queue_new): New function. (url_queue_delete): Ditto. (url_enqueue): Ditto. (url_dequeue): Ditto. (retrieve_tree): New function, replacement for recursive_retrieve. (descend_url_p): New function. (register_redirection): New function. * src/progress.c (create_image): Cosmetic changes. * src/init.c (cleanup): Do all those complex cleanups only if DEBUG_MALLOC is defined. * src/main.c: Removed --simple-check and the corresponding simple_host_check in init.c. * src/html-url.c (handle_link): Parse the URL here, and propagate the parsed URL to the caller, who would otherwise have to parse it again. * src/host.c (xstrdup_lower): Moved to utils.c. (realhost): Removed. (same_host): Ditto. 2001-11-25 Hrvoje Niksic * src/url.c (convert_links): Handle CO_NULLIFY_BASE. * src/recur.c (retrieve_tree): Ignore download-ignorable children. (convert_all_links): Specify CO_NULLIFY_BASE when link_base_p. * src/html-url.c (handle_link): Return the newly created urlpos. (collect_tags_mapper): When dealing with BASE, store the base reference and mark it as download-ignorable. 2001-11-25 Hrvoje Niksic * src/url.c (convert_links): Attempt to quote '?' as "%3F" when linking to local files. Given up on the attempt, as it breaks local browsing. 2001-11-25 Hrvoje Niksic * src/recur.c (descend_url_p): Be more conservative with blacklisting URLs. (convert_all_links): Print how many files have been converted, and how long it took. * src/progress.c (create_image): Place the number of downloaded bytes right after the progress bar. * src/utils.c (suffix): Return a pointer into the string. 2001-11-25 Hrvoje Niksic * src/progress.c (dot_create): Align the "[ skipping ... ]" string with the dots. * src/retr.c (rate): Split into two functions: calc_rate and retr_rate. * src/progress.c (create_image): Draw a dummy progress bar even when total size is unknown. (display_image): Place the text cursor at the end of the "image". 2001-11-25 Hrvoje Niksic * src/main.c (private_initialize): Removed. (main): Don't call private_initialize. * src/http.c: Call lookup_host. * src/host.c (host_init): Removed. (add_host_to_cache): Initialize host_name_address_map here, on demand. (ngethostbyname): Commented out. * src/connect.c (make_connection): Remove dead code; use lookup_host. * src/host.c (store_hostaddress): Renamed to lookup_host and reversed the args. Removed host_address_name_map and host_slave_master_map. 2001-11-24 Hrvoje Niksic * src/utils.c (path_simplify): Preserver the (non-)existence of leading slash. Return non-zero if changes were made. 2001-11-24 Hrvoje Niksic * src/retr.c (retrieve_url): When the redirection URL doesn't parse, print the correct error message rather than "UNKNOWN". 2001-11-24 Hrvoje Niksic * src/recur.c (recursive_retrieve): Fix typo. 2001-11-24 Hrvoje Niksic * src/progress.c (bar_update): Don't modify bp->total_length if it is zero. 2001-11-24 Hrvoje Niksic * src/progress.c (bar_finish): If the timer didn't record any time since the download beginning, fake 1ms. 2001-11-23 Lemble Gregory * src/gen_sslfunc.c (ssl_init_prng): New function; seed the SSL RNG. 2001-11-23 Hrvoje Niksic * src/utils.c (determine_screen_width): New function. * src/main.c (main): New option `--progress=TYPE'. (main): Implement compatibility with the old option `--dot-style'. * src/init.c: Removed cmd_spec_dotstyle -- that logic is now in dp_set_params. (cmd_spec_progress): New function. * src/retr.c (get_contents): Use the progress_* functions instead of the old show_progress(). (show_progress): Removed. (rate): Print "xxxx.xx K/s" instead of "KB/s". Ditto for MB/s, etc. * src/progress.c (set_progress_implementation): New function. (valid_progress_implementation_p): Ditto. (progress_create): Ditto. (progress_update): Ditto. (progress_finish): Ditto. (dp_create): Ditto. (dp_update): Ditto. (dp_finish): Ditto. (dp_set_params): Ditto. (print_elapsed): Ditto. 2001-11-23 Hrvoje Niksic * src/progress.c: Renamed dp_* functions to dot_* for greater clarity and consistency with bar_*. (print_download_speed): Get rid of the unneeded '@' character. (create_image): Fix download rate geometry. * src/progress.c (print_elapsed): Remove spurious space. (print_elapsed): Renamed to print_download_speed, since that's what it does. 2001-11-23 Hrvoje Niksic * src/progress.c (create_image): Don't translate "%ld ". 2001-11-23 Hrvoje Niksic * src/progress.c (bar_update): If the downloaded amount becomes larger than the expected amount, adjust the expected amount accordingly. 2001-11-23 Hrvoje Niksic * src/progress.c (bar_set_params): Allow the user to force the use of the bar. 2001-11-23 Hrvoje Niksic * po/wget.pot: Rebuild. * po/POTFILES.in: Update with the new source files. 2001-11-23 Hrvoje Niksic * po/hr.po: A major overhaul. 2001-11-23 Hrvoje Niksic * doc/wget.texi (Download Options): Document the new `--progress' option. 2001-11-23 Hrvoje Niksic * configure.in: Check for sys/ioctl.h. 2001-11-22 Jochen Hein * src/main.c (main): Split the copyright notice for easier translation. 2001-11-22 Hrvoje Niksic * windows/Makefile.doc: Update docs generation. 2001-11-22 Hrvoje Niksic * src/utils.c (path_simplify): Don't remove trailing slashes. * src/ftp.c (ftp_get_listing): Use it. * src/utils.c (file_merge): New function. * src/url.c (opt_url): Removed. * src/recur.c (recursive_retrieve): Inline "opt_url" logic. * src/main.c (main): Use xfree(), not free(). * src/url.c (rewrite_url_maybe): Renamed to rewrite_shorthand_url. * src/ftp.c (ccon): Move `ccon' typedef here, since it's only used internally. * src/config.h.in: Include a stub for HAVE_STRPBRK. * src/cmpt.c (strpbrk): Include a replacement for systems without strpbrk(). * src/ftp.c: Use url_set_dir and url_set_file when modifying the URL. * src/url.c (url_set_dir): New function. (url_set_file): Ditto. * src/ftp-basic.c (ftp_process_type): Process FTP type here; the URL parser makes the URL "params" available, so we can do that in this function. * src/retr.c: Ditto. * src/ftp.c: Ditto; pass the local file information in `ccon'. * src/http.c: Get rid of the ugly kludge that had URL being replaced with the proxy URL when proxy retrieval was requested. Use a separate parameter to http_loop and gethttp for the proxy URL. * src/http.c: Changed to reflect the fact that local file, proxy, and referer information are no longer stored in struct url. The local file information is passed in `struct hstat' now. * src/url.c: Reworked URL parsing to be more regular. Reencode the URL using reencode_string. Removed non-URL-related information from struct url. This includes fields `proxy', `local', and `referer'. 2001-11-22 Hrvoje Niksic * src/retr.c (show_progress): Use it. * src/log.c (log_set_flush): New function. 2001-11-22 Hrvoje Niksic * doc/wget.texi (Proxies): Fix typo. (Proxies): Sync the text with the example. (Wgetrc Commands): There is no -f option. It's --follow-ftp. Reported by Wojtek Kotwica. 2001-11-22 Hrvoje Niksic * configure.in: Check for strpbrk(). 2001-11-22 Herold Heiko * windows/Readme * windows/Makefile.doc Windows documentation update. * windows/Makefile.src Cleanup config.h 2001-11-20 Hrvoje Niksic * src/url.c (parseurl): Don't depend on the now-obsolete TYPE. 2001-11-19 Hrvoje Niksic * src/url.c: Clean up handling of URL schemes. 2001-11-19 Hrvoje Niksic * src/url.c (getproxy): Handle URL shorthands. 2001-11-19 Hrvoje Niksic * src/main.c: Remove --wait / --waitretry backwards compatibility code. 2001-11-19 Hrvoje Niksic * src/main.c (main): Use it. * src/url.c (rewrite_url_maybe): New function. 2001-11-18 Hrvoje Niksic * src/version.c: Wget 1.7.1 is released. 2001-11-18 Hrvoje Niksic * src/res.c (res_register_specs): Initialize OLD and HP_OLD to appease the compiler. 2001-11-18 Hrvoje Niksic * src/md5.h: Renamed to gnu-md5.h. * src/md5.c: Renamed to gnu-md5.c. * src/http.c: Ditto. * src/ftp-opie.c: Use the new macros. * src/sysdep.h: Define md5-related macros. * src/config.h.in: Define HAVE_SOLARIS_MD5 or HAVE_BUILTIN_MD5 depending on which md5 implementation is used. 2001-11-18 Hrvoje Niksic * src/http.c (gethttp): Print the whole response line when printing headers is requested. 2001-11-18 Hrvoje Niksic * src/Makefile.in: Conditionally compile getopt.o. 2001-11-18 Hrvoje Niksic * po/: Installed ja.po, et.po, he.po, fr.po, da.po, uk.po, es.po, sl.po, nl.po from the Translation Project. 2001-11-18 Hrvoje Niksic * configure.in: Check for getopt_long in libc. 2001-11-18 Hrvoje Niksic * configure.in: Check for Solaris libmd5. 2001-11-17 Hrvoje Niksic * doc/Makefile.in (install.info): If info files from the build directory are not available, use the ones from $(srcdir). 2001-11-16 Peter Farmer * doc/Makefile.in: Use $? instead of $<. Use TEXI2POD more consistently. 2001-11-16 Hrvoje Niksic * src/html-parse.c (map_html_tags): Support XML-style empty tags. 2001-11-16 Hrvoje Niksic * src/html-parse.c (advance_declaration): Use 0x22 instead of '"' or '\"'. Different compilers' assert macros are broken in different ways. 2001-11-16 Hrvoje Niksic * src/headers.c (header_extract_number): Ignore trailing whitespace. 2001-11-16 Chris Seawood * src/init.c: Ditto. * src/host.c: Ditto. * src/connect.c: Ditto. * src/sysdep.h: Support compilation under BEOS. 2001-11-04 Alan Eldridge * src/config.h.in: added HAVE_RANDOM. * src/options.h: added random_wait to struct options. * src/main.c (print_help [HAVE_RANDOM], main): added arg parsing, help for --random-wait. * src/retr.c (sleep_between_retrievals) [HAVE_RANDOM]: added implementation of random wait times. * src/init.c (commands): added "randomwait" keyword. 2001-11-04 Alan Eldridge * doc/wget.texi: Document --random-wait, randomwait=on/off. 2001-10-31 Daniel BODEA * src/netrc.c (search_netrc): When slack_default is 0, still look for an account with matching password, just not the "default account". HTTP Authorization using .netrc should now work as expected. 2001-09-29 Christian Fraenkel * src/http.c (gethttp): print debug output for errors occuring during the ssl handshake. 2001-08-24 Ian Abbott * src/html-url.c (collect_tags_mapper): Fix bug converting links with -k option for tags with multiple link attributes by handling links in the order they appear. 2001-08-21 Dave Turner * src/ftp-basic.c (ftp_size): New function to send non-standard SIZE command to server to request file size. * src/ftp.h (ftp_size): Export it. * src/ftp.c (getftp): Use new ftp_size function if restoring transfer of a file with unknown size. 2001-08-15 Ian Abbott * src/ftp.c (ftp_loop_internal): Avoid a potential buffer overflow in the call to the 'rate' function by moving it past the error checking for the 'getftp' function return value. 2001-06-26 Hrvoje Niksic * src/wget.h (DO_REALLOC_FROM_ALLOCA): Set SIZEVAR after the memcpy() call because it needs the old value. 2001-06-26 Hrvoje Niksic * src/wget.h (DO_REALLOC_FROM_ALLOCA): Check for do_realloc_newsize in loop condition because we're no longer setting SIZEVAR here. 2001-06-18 Hrvoje Niksic * src/url.c (url_filename): Make sure that slashes that sneak in to u->file via query string get protected. (file_name_protect_query_string): New function. 2001-06-18 Hrvoje Niksic * src/cookies.c (ATTR_NAME_CHAR): Allow almost any character to be in an attribute name. 2001-06-16 Hrvoje Niksic * doc/wget.texi: Updated version to 1.7.1. 2001-06-16 Hrvoje Niksic * MACHINES: Added mips-sgi-irix6.5, as reported by Edward J. Sabol. 2001-06-15 Hrvoje Niksic * po/da.po: New version from TP. 2001-06-15 Hrvoje Niksic * doc/Makefile.in (install.wgetrc): Use $(DESTDIR) when testing whether $(WGETRC) exists. 2001-06-15 Hrvoje Niksic * doc/Makefile.in (install.wgetrc): Take $(DESTDIR) into account when running mkinstalldirs. 2001-06-15 Hrvoje Niksic * config.sub: New version from libtool 1.4. * config.guess: New version from libtool 1.4. * ltmain.sh: New version from libtool 1.4. * aclocal.m4: Imported `libtool.m4' from libtool 1.4. * ltconfig: Removed. * configure.in: First check the compiler, then invoke libtool. 2001-06-15 Adam J. Richter * doc/Makefile.in (install.wgetrc): Make `make install' non-interactive in all cases. 2001-06-14 Maciej W. Rozycki * configure.in: Use `libtool' to test linking of external libraries. 2001-06-14 Hrvoje Niksic * src/sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't define it. 2001-06-14 Hrvoje Niksic * src/recur.c (recursive_retrieve): Also check undesirable_urls with canonicalized URL. 2001-06-14 Hrvoje Niksic * src/http.c (gethttp): Search `.netrc' with real host, not the proxy one. 2001-06-14 Hrvoje Niksic * po/: Install new files from the TP: sv.po, cs.po, et.po, tr.po, es.po, de.po, gl.po, sk.po, ru.po, fr.po. 2001-06-14 Hrvoje Niksic * configure.in: Check for both gethostbyname and inet_ntoa before concluding that -lnsl is not needed. 2001-06-09 Jan Prikryl * src/ftp.h: Provide correct prototype for ftp_parse_ls(). 2001-06-08 Edward J. Sabol * src/url.c (url_equal): Fix a memory leak when parseurl returns an error on the second URL. Also, since url_equal is not used at the moment, do not compile it. * src/url.h: Ditto for the prototype of url_equal. 2001-06-05 Jan Prikryl * po/cs.po: Updated to match the 1.7 POT. 2001-06-05 Jan Prikryl * doc/Makefile.in (wget.info): Added -I$(srcdir) to support compilation outside the source tree. (install.man): Replaced $(srcdir)$(MAN) with $(MAN). The former did not work when compiling outside the source tree. 2001-06-04 Hrvoje Niksic * src/version.c: Wget 1.7 is released. 2001-06-04 Hrvoje Niksic * po/: New versions of de.po and gl.po from the TP. 2001-06-03 Karl Eichwalder * src/ftp-ls.c (ftp_parse_ls): Fix typo. 2001-06-03 Hrvoje Niksic * po/wget.pot: Updated. 2001-06-03 Hrvoje Niksic * po/hr.po: Updated to match the new POT. 2001-06-03 Hrvoje Niksic * po/es.po: Use the version from TP. 2001-06-02 R.I.P. Deaddog * po/zh_TW.po: Updated for 1.7. 2001-06-02 Hrvoje Niksic * po/pl.po: Use iso-8859-1 as charset. * po/hr.po: Update. 2001-06-02 Hrvoje Niksic * po/: Updated ru.po, et.po, and sv.po. Added tr.po. 2001-05-31 Hrvoje Niksic * doc/wget.texi (Mailing List): Fix the mailing list address. 2001-05-28 Maciej W. Rozycki * configure.in: Use $host_os instead of non-existent "$opsys" when deciding based on host type. * configure.in: Print "cross" when cross-compiling. 2001-05-27 Hrvoje Niksic * src/all: Update copyright information. 2001-05-27 Hrvoje Niksic * doc/wget.texi (Copying): Clarify. Link to "free-software-for-freedom.html". 2001-05-26 Hrvoje Niksic * src/version.c: Wget 1.7-pre1 is released. 2001-05-26 Hrvoje Niksic * src/version.c: Updated version to 1.7-pre1. 2001-05-26 Hrvoje Niksic * src/http.c (gethttp): Indicate that the continued download failed for *this* file. 2001-05-26 Hrvoje Niksic * po/hr.po: Updated. * po/wget.pot: Regenerated from sources. * README: Updated copyright statement. * INSTALL: Document the new OpenSSL autodetector. 2001-05-26 Hrvoje Niksic * doc/wget.texi: Updated version to 1.7. 2001-05-26 Hrvoje Niksic * doc/wget.texi: Updated version to 1.7-pre1. 2001-05-26 Hrvoje Niksic * doc/wget.texi (Contributors): Updated list of contributors. 2001-05-26 Hrvoje Niksic * configure.in: Provide a default for AC_TRY_RUN when cross-compiling. Effectively, assume that when cross-compiling, working linkage implies working executable. 2001-05-25 Hrvoje Niksic * configure.in: Rewrote OpenSSL library detection. Now the code loops over system locations where libssl/libcrypto might be located. Aside from linking, it actually tries to run the executable before concluding that the linking "worked". 2001-05-16 Csaba Raduly * windows/Makefile.watcom: Make linker accept space-separated list of object files. 2001-05-14 Hrvoje Niksic * src/http.c (gethttp): Use real URL data for cookies, not the proxy stuff. 2001-05-14 Hrvoje Niksic * src/gen_sslfunc.c: Don't include directly. 2001-05-14 Herold Heiko * windows/Makefile.src: Update for SSL. 2001-05-14 Herold Heiko * windows/Makefile.src: * windows/Makefile.src.bor: * windows/Makefile.watcom: * windows/config.h.bor: * windows/config.h.ms: * windows/wget.dep: Windows update. 2001-05-14 Csaba Raduly * windows/Makefile.watcom: Updated. 2001-05-14 Csaba Raduly * windows/Makefile.watcom: Rewritten. 2001-05-13 Hrvoje Niksic * src/url.c: Get rid of `protostrings'. (skip_proto): Don't use protostrings. (has_proto): Ditto. 2001-05-12 Hrvoje Niksic * src/res.c: New file. Implement all RES-related code here. 2001-05-12 Hrvoje Niksic * src/main.c (print_help): Document `--no-http-keep-alive'. * src/utils.c (numdigit): Handle negative numbers *correctly*. * src/hash.c (make_nocase_string_hash_table): Use term "nocase" rather than the confusing "unsigned". * src/utils.c (string_set_contains): Renamed from string_set_exists. * src/hash.c (hash_table_contains): Renamed from hash_table_exists. * src/cookies.c: Move case-insensitive hash tables to hash.c. 2001-05-09 Hrvoje Niksic * src/http.c (gethttp): Before concluding that the file is already fully retrieved, make sure that the file existed and `Range' was actually requested. 2001-05-09 Hrvoje Niksic * src/cookies.c (eliminate_dups): New function. (build_cookies_request): Use it. (build_cookies_request): Set chain_store_size after reallocating all_chains. (check_domain_match): Annotated for easier future debugging. (store_cookie): In the debug message, print whether the cookie is permanent. 2001-05-08 Hrvoje Niksic * src/http.c (http_loop): Reset no_truncate before deciding whether to set it. (gethttp): Further clarify "-c conflicts with existing file" error message, based on input from Herold Heiko. 2001-05-07 Hrvoje Niksic * src/http.c (http_loop): If restval is set, set no_truncate to 1 unconditionally. 2001-05-02 Jan Prikryl * src/ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly converted. Pointed out by . (ftp_parse_vms_ls): Ditto. 2001-04-30 Hrvoje Niksic * src/init.c (cmd_address): Zero SIN before using it; apparently needed on *BSD. 2001-04-29 Hrvoje Niksic * src/main.c (main): Make `--cookies' respect its argument. 2001-04-29 Hrvoje Niksic * src/ftp.c (ftp_loop_internal): Don't set NO_TRUNCATE if the file is empty. 2001-04-28 Hrvoje Niksic * src/main.c (main): Removed undocumented option `--email-address'. * src/netrc.c: Use the latest read_whole_line. * src/init.c (defaults): Set opt.ftp_pass to "-wget@". * src/mswindows.c (pwd_cuserid): Ditto. * src/utils.c (pwd_cuserid): Removed. * src/host.c (ftp_getaddress): Removed. 2001-04-28 Hrvoje Niksic * src/http.c (gethttp): Return RETRUNNEEDED when the retrieval is unneeded because the file is already there and fully downloaded, and -c is specified. (http_loop): Handle RETRUNNEEDED. * src/wget.h (uerr_t): New value RETRUNNEEDED. * src/http.c (http_loop): Set no_truncate for files that both exist and are non-empty. (gethttp): Consider the download finished when restval >= contlen, not only when restval==contlen. (gethttp): Handle redirection before giving up due to -c. (gethttp): Clarify error message which explains that -c will not truncate the file. (gethttp): When returning CONTNOTSUPPORTED, don't forget to free the stuff that needs freeing and release the socket. 2001-04-28 Hrvoje Niksic * doc/wget.texi (Wgetrc Commands): Update docs for `continue'. 2001-04-28 Hrvoje Niksic (http_loop): Allocate space for filename_plus_orig_suffix with alloca; this is more efficient and removes the need to free it before each and every return. 2001-04-28 Herold Heiko * windows/wget.dep: Update. * windows/Makefile.src: Update. * windows/config.h.ms: Define inline to __inline. Define ftruncate to chsize. 2001-04-28 Csaba Raduly * windows/Makefile.watcom: Update. 2001-04-27 Hrvoje Niksic * src/safe-ctype.h: Instead of throwing #error when isalpha is defined, redefine it to something that will throw a compile-time error if actually *used*. Do the same for the rest of the standard C macros. 2001-04-27 Hrvoje Niksic * src/main.c (print_help): Wget booleans accept "off", not "no". 2001-04-27 Hrvoje Niksic * src/http.c (mktime_from_utc): Improve documentation. (http_atotm): Put format strings into a separate array. 2001-04-27 Hrvoje Niksic * src/http.c (http_loop): If allow_cache is zero, always disable caching, not only when retrieving through proxy. * src/init.c: Ditto. * src/options.h (struct options): Rename proxy_cache to allow_cache. 2001-04-27 Hrvoje Niksic * po/ja.po: New update by Hiroshi Takekawa. 2001-04-27 Hrvoje Niksic * po/hr.po: Updated. 2001-04-27 Hrvoje Niksic * doc/wget.texi (HTTP Options): Document cookie options. 2001-04-26 Hrvoje Niksic * src/url.c (getproxy): Ignore empty proxy vars. 2001-04-25 Roger L. Beeman * src/http.c (http_atotm): Initialize t.tm_isdst to 0. (mktime_from_utc): Prevent mktime() from having discontinuities at DST transition points. 2001-04-25 Hrvoje Niksic * src/utils.c: Document timer functions. * src/retr.c (rate): Use it. (rate): Print in GB/s if transfer rate exceeds 1 GB/s. * src/utils.c (wtimer_granularity): New function. 2001-04-25 Hrvoje Niksic * src/utils.c: Define each DIGITS_* in one line. 2001-04-25 Hrvoje Niksic * src/url.c (UNSAFE_CHAR): Reimplement using a static table. (url_init): Removed. (init_unsafe_char_table): Removed. 2001-04-25 Hrvoje Niksic * src/snprintf.c (dopr): Replace ISDIGIT with '0' <= ch && ch <= '9'. 2001-04-25 Hrvoje Niksic * src/http.c (http_loop): Would load cookies every time. * src/cookies.c (load_cookies): Handle cookies whose values contain embedded spaces. 2001-04-25 Hrvoje Niksic * src/html-url.c (get_urls_html): Fix documentation. 2001-04-25 Hrvoje Niksic * po/POTFILES.in: Add src/cookies.c. 2001-04-24 Hrvoje Niksic * src/utils.c (numdigit): Handle negative numbers. 2001-04-24 Hrvoje Niksic * src/utils.c (long_to_string): New, faster version. Favors smaller numbers; much of the calculation is now done at compile-time. 2001-04-24 Hrvoje Niksic * src/retr.c (show_progress): Ditto. * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Use new timer functions. * src/utils.c (wtimer_allocate): New function. (wtimer_new): Ditto. (wtimer_delete): Ditto. (wtimer_reset): Ditto. (wtimer_elapsed): Ditto. 2001-04-23 Hrvoje Niksic * src/retr.c (show_progress): Print the download rate even when the percentages are not available. 2001-04-21 Hrvoje Niksic * src/ftp.c (getftp): Adjust expected_bytes if the length is authoritative. 2001-04-15 Ian Abbott windows/wget.dep: The target `connect$o' (connect.obj) now depends on `utils.h'. 2001-04-15 Hrvoje Niksic * po/da.po: Ditto. * po/de.po: Ditto. * po/el.po: Ditto. * po/es.po: Ditto. * po/et.po: Ditto. * po/fr.po: Ditto. * po/gl.po: Ditto. * po/he.po: Ditto. * po/ja.po: Ditto. * po/pl.po: Ditto. * po/sk.po: Ditto. * po/sl.po: Ditto. * po/sv.po: Ditto. * po/tr.po: Ditto. * po/zh_TW.po: Update from TP. * po/ca.po: Ditto. * po/bg.po: New file from TP. 2001-04-14 Hrvoje Niksic * src/url.c: Don't declare `construct'. * src/hash.c (grow_hash_table): Speed up rehashing; inline storing of mappings to new locations. (hash_table_new): Make resize_threshold a field in the hash table, so we don't have to recalculate it in each hash_table_put. (grow_hash_table): Update resize_threshold. (MAX): Remove unused macro. (prime_size): Made static. 2001-04-14 Hrvoje Niksic * src/retr.c (retrieve_url): Call uri_merge, not url_concat. * src/html-url.c (collect_tags_mapper): Call uri_merge, not url_concat. * src/url.c (mkstruct): Use encode_string instead of xstrdup followed by URL_CLEANSE. (path_simplify_with_kludge): Deleted. (contains_unsafe): Deleted. (construct): Renamed to uri_merge_1. (url_concat): Renamed to uri_merge. 2001-04-13 Hrvoje Niksic * src/wget.h (XDIGIT_TO_xchar): Define here. * src/url.c (decode_string): Use new name. (encode_string): Ditto. * src/http.c (XDIGIT_TO_xchar): Rename HEXD2asc to XDIGIT_TO_xchar. (dump_hash): Use new name. * src/wget.h: Rename ASC2HEXD and HEXD2ASC to XCHAR_TO_XDIGIT and XDIGIT_TO_XCHAR respectively. 2001-04-13 Hrvoje Niksic * src/url.c (str_url): Use encode_string instead of the unnecessary CLEANDUP. (encode_string_maybe): New function, returns input string if no encoding is needed. (encode_string): Call encode_string_maybe to do the dirty work, xstrdup if no work needed. 2001-04-13 Hrvoje Niksic * src/init.c: Include cookies.h. * src/cookies.h: Declare cookies_cleanup. * src/cookies.c (check_domain_match): Remove unused variable. (save_cookies): Remove extraneous argument from debug statement. * src/host.c (same_host): Don't call skip_url. * src/url.c (skip_url): Removed. Removed its calls from various functions in url.c. 2001-04-13 Hrvoje Niksic * src/cookies.c (unsigned_string_hash): Use the new code in string_hash as reference. * src/hash.c (hash_table_map): Allow deletion and change of the element processed by MAPFUN. (string_hash): Use the function from glib. 2001-04-12 Hrvoje Niksic * src/hash.h: Declare hash_table_get_pair and hash_table_count. 2001-04-12 Hrvoje Niksic * src/ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time specification. 2001-04-12 Hrvoje Niksic * src/ftp-ls.c (ftp_parse_unix_ls): Use octal constants for permissions. A compiler that doesn't accept octal constants is seriously broken and shouldn't be used -- octal constants were present in K&R C! 2001-04-12 Hrvoje Niksic * src/cookies.c: Declare http_atotm. 2001-04-12 Hrvoje Niksic * src/config.h.in: Include #undef stub. * src/hash.c (hash_table_remove): Rewrite to actually clear deleted entries instead of just marking them as deleted. 2001-04-12 Hrvoje Niksic * configure.in: Check for inline. 2001-04-11 Hrvoje Niksic * src/url.c (parseurl): Don't strip trailing slash when u->dir is "/" because that strips the *leading* slash, thus forcing relative FTP retrieval. 2001-04-11 Hrvoje Niksic * po/zh_TW.po: Reinstated, after an update by Abel Cheung. * po/zh_TW.Big5.po: Removed. 2001-04-11 Hrvoje Niksic * po/zh_TW.Big5.po: New file, submitted by Abel Cheung. * po/zh.po: Removed outdated file. 2001-04-10 Jan Prikryl * src/ftp.c (getftp): Convert initial FTP directory from VMS to UNIX notation for VMS servers. (ftp_retrieve_dirs): Do not prepend '/' to f->name when odir is an empty string. 2001-04-10 Jan Prikryl * src/ftp-ls.c (ftp_parse_winnt_ls): Made the fix for AM/PM more effective. Suggested by Edward J. Sabol. 2001-04-10 Hrvoje Niksic * src/cookies.c (build_cookies_request): Use and sort cookies from all matching domains. (build_cookies_request): Check for duplicates before generating the `Cookies' header. * src/main.c (main): Don't load cookies here. (main): Make loadcookies and savecookies call the correct command. * src/http.c (http_loop): Load cookies on-demand. 2001-04-09 Hrvoje Niksic * src/init.c (cmd_file): New function. (enable_tilde_expansion): New variable. (run_wgetrc): Use it. (cmd_file): Use it. 2001-04-09 Hrvoje Niksic * src/http.c (gethttp): Fix indentation of SSL ifdef. 2001-04-09 Hrvoje Niksic * src/ftp.c (ftp_retrieve_dirs): Don't forcibly prepend "/" to u->dir; that hack is no longer necessary. (getftp): Prepend initial directory to *non*-absolute u->dir's. 2001-04-08 Jan Prikryl * src/ftp-ls.c (ftp_parse_winnt_ls): The AM/PM change did assume 12:01PM == 00:01, which was obviously wrong. Taken care of this anomaly. * src/ChangeLog: Removed an excess conflict marker. Reformatted the entry by Philipp Thomas from 2001-03-09. * src/ftp-ls.c (ftp_parse_winnt_ls): Ensure that adjusted PM hours lay between 0 and 23. Elminate unused variable `sec'. 2001-04-08 Hrvoje Niksic * src/utils.c (datetime_str): New function. 2001-04-08 Hrvoje Niksic * src/init.c: Include cookie-related options. * src/main.c (main): Include cookie-specific options. (main): Load cookies before download is finished. (main): Save cookies when done. * src/http.c (gethttp): Process the `Set-Cookie' header. (gethttp): Include cookies in the response. * src/cookies.c: New file. 2001-04-08 Hrvoje Niksic * src/hash.c (hash_table_count): New function. 2001-04-06 Hrvoje Niksic * src/utils.c (read_file): Cast MAP_FAILED to char *. Enforced by Digital Unix cc. 2001-04-06 Hrvoje Niksic * src/sysdep.h: Don't define VERY_LONG_FORMAT. * src/utils.c (very_long_to_string): New function. (legible_very_long): Use it; don't use VERY_LONG_FORMAT. 2001-04-06 Hrvoje Niksic * src/http.c (gethttp): Prepend literal newline with `\n\'. 2001-04-06 Hrvoje Niksic * src/hash.c: Include . 2001-04-06 Hrvoje Niksic * src/config.h.in: Oops, do the namespace tweaks only on systems we know about. 2001-04-06 Hrvoje Niksic * src/config.h.in: Define "compilation environment" options that work under Linux and Solaris. To be reviewed on other OS'es. 2001-04-06 Hrvoje Niksic * aclocal.m4 (AM_PROG_CC_STDC): Don't use -Xc under SYSV. It forces strict ANSI mode, which means we lose `long long'. Generally, don't require __STDC__ to be defined to 1 because that signifies strict ANSI. 2001-04-04 Hrvoje Niksic * NEWS: Cosmetic changes. 2001-04-04 Christian Fraenkel * src/url.c (parse_uname): Would run past the end of the string if the username was present, but the URL did not contain a slash, e.g. http://foo:bar@myhost. 2001-04-03 Trond Eivind Glomsrod * po/da.po: Ditto. * po/no.po: The charset is iso-8859-1, not iso-8859-2. 2001-04-03 Paul Bludov * src/mswindows.c (sleep): Use SleepEx() instead of Sleep(). (ws_changetitle): Use alloca() instead of malloc() to avoid memory leak. (ws_mypath): Use GetModuleFileName instead of argv[0]. (ws_startup): Use data.wVersion for comparison. 2001-04-03 KOJIMA Hajime * src/http.c (http_atotm): Use %A instead of %a to match full weekday. (On most systems there is no difference.) 2001-04-02 Hrvoje Niksic * src/retr.c (retrieve_url): New variable global_download_count used to identify first retrieval. * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Rewind opt.dfp only on first retrieval. 2001-04-02 Hrvoje Niksic * src/netrc.c (parse_netrc): Don't trim the line endings explicitly; they will be handled as whitespace. (parse_netrc): Correctly handle lines that end with whitespace. 2001-04-02 Hrvoje Niksic * src/init.c (cmd_address): Heap-allocate the address that gets stored to CLOSURE. Old code would simply assign an address on the stack. 2001-04-02 Hrvoje Niksic * src/http.c (http_loop): Ditto. * src/ftp.c (ftp_loop_internal): Made the check whether to continue retrieval `-O'-friendly. 2001-04-02 Hrvoje Niksic * po/et.po: New version by Toomas Soome. 2001-04-01 Nicolas Lichtmaier * src/main.c (main): Add -C to the string that is the third arg to getopt_long(). 2001-04-01 Nicolas Lichtmaier * src/ftp.c (ftp_get_listing): Propagate error status. (ftp_retrieve_glob): Use it. (ftp_loop): Ditto. 2001-04-01 Nicolas Lichtmaier * po/es.po: New file. 2001-04-01 Hrvoje Niksic * src/ftp.c (getftp): Don't start the download from scratch if `-c' was specified, but the file is already fully downloaded. * src/http.c (gethttp): Don't truncate a pre-existing file if `-c' was specified and the server doesn't support continued download. (gethttp): Don't start the download from scratch if `-c' was specified, but the file is already fully downloaded. 2001-04-01 Hrvoje Niksic * doc/wget.texi (Recursive Retrieval Options): Document more accurately what --convert-links does. 2001-03-31 Hrvoje Niksic * src/retr.c (retrieve_url): Call register_download() for downloaded files and register_html() for downloaded HTML files. * src/recur.c (register_download): New function; register here that a file has been downloaded, rather than in recursive_retrieve(). (register_html): New function; enqueue the location of HTML files here rather than in recursive_retrieve(). 2001-03-31 Hrvoje Niksic * src/recur.c (recursive_retrieve): Clear the hash tables only when they are defined. 2001-03-31 Hrvoje Niksic * src/main.c (print_help): Use multiple fputs instead of a single ugly printf(). (main): Consistently assign numbers >128 to options without a corresponding character. 2001-03-31 Hrvoje Niksic * src/http.c (gethttp): Make sure the socket is closed with CLOSE_INVALIDATE before we have drained the body. 2001-03-31 Hrvoje Niksic (recursive_retrieve): Don't clear the hash tables at this point at all; it interferes with the normal operation of register_download. 2001-03-27 Dan Harkless * src/Makefile.in: Moved top_builddir out of "User configuration section" of top Makefile and analogous spot in this one. 2001-03-27 Dan Harkless * doc/Makefile.in: Moved top_builddir out of "User configuration section" of top Makefile and analogous spot in this one. 2001-03-27 Dan Harkless * INSTALL: Updated to reflect --with-ssl's new optional parameter. * configure.in: Christian Fraenkel's tests for -lcrypto and -lssl were in the wrong order, causing a link failure if you're using libcrypto.a and libssl.a rather than shared libraries. Also put in checks for -ldl, necessary since the libcrypto shared library doesn't record its dependency on libdl. * {.,util,windows}/Makefile.in: Moved top_builddir out of "User configuration section" of top Makefile and analogous spot in others. * po/Makefile.in.in: Previous addition of top_builddir to po/Makefile.in was bogus -- it's generated from po/Makefile.in.in. 2001-03-26 Dan Harkless * doc/wget.texi (Recursive Retrieval Options): Explained that you need to use -r -l1 -p to get the two levels of requisites for a page. Also made a few other wording improvements. 2001-03-26 Dan Harkless * TODO: -p should probably go "_two_ more hops" on pages. 2001-03-22 Dan Harkless * MACHINES: Added rs6000-ibm-aix4.3.3.0. 2001-03-21 Dan Harkless * MACHINES: Added armv4l-unknown-linux-gnu. 2001-03-20 Dan Harkless * TODO: Oops. Hostless absolute link conversion _is_ working. My test that led me to believe it wasn't was exposing a different bug -- URLs specified on the commandline as opposed to being recursed to don't always get re-converted at the end of the Wget run. 2001-03-17 Dan Harkless * src/Makefile.in: Include @SSL_INCLUDES@ substition in INCLUDES. Define top_builddir. Link wget with libtool so the user doesn't have to supply a bunch of custom environment variables to correctly link with the OpenSSL shared libraries. 2001-03-17 Dan Harkless * doc/Makefile.in: Using '^' in the sed call caused a weird failure on Solaris 2.6. Changed it to a ','. Defined top_builddir. 2001-03-17 Dan Harkless * aclocal.m4: Appended libtool 1.3.5's libtool.m4 to it. * configure.in: Use AM_PROG_LIBTOOL macro (now defined in our aclocal.m4) to create a libtool script from ltconfig and ltmain.sh. If --with-ssl specified, look in /usr/local/ssl/lib by default for OpenSSL libs. Allow override with --with-ssl=. Set up -I/include and -R/lib (possibly rewritten by libtool) as well. Don't appear to be looking for a function main() in -lcrypto. If the OpenSSL lib checks fail, don't just silently build a wget without https support -- issue a warning. Define top_builddir. * ltconfig: New file from libtool 1.3.5 distribution. * ltmain.sh: New file from libtool 1.3.5 distribution. * {.,po,util,windows}/Makefile.in: Define top_builddir. 2001-03-16 Dan Harkless * TODO: For some reason on 2000-11-19, Hrvoje removed the item about converting hostless absolute links. That isn't working yet, so I've put the item back, with a modified wording. * config.guess: Hadn't been updated since 1996 -- didn't work for recent machines and OSes, such as NetWinder ARM Linux. Updated to latest version (2001-03-16) from . * config.sub: Ditto -- updated to latest version (2001-03-12). 2001-03-12 Dan Harkless * TODO: Only normal recursion should respect -np -- page-requisite recursion should not. 2001-03-09 Philipp Thomas * src/safe-ctype.h: New file. Locale independent ctype.h replacement taken from libiberty. * src/safe-ctype.c: New file. Tables for above. * src/Makefile.in: Add safe-ctype$o to OBJS. Add dependencies for safe-ctype$o. * src/cmpt.c: Remove include of ctype.h. Use ISSPACE instead of isspace. * src/ftp-basic.c: Don't include ctype.h. * src/ftp-ls.c: Likewise. * src/ftp.c: Likewise. * src/headers.c: Likewise. * src/host.c: Likewise. * src/html-parse.c: Likewise. * src/html-url.c: Likewise. * src/http.c: Likewise. * src/init.c: Likewise. * src/main.c: Likewise. Set LC_CTYPE along with LC_MESSAGES. * src/netrc.c: Likewise. * src/recur.c: Likewise. * src/retr.c: Likewise. * src/snprintf.c: Replace ctype.h with safe-ctype.h. Use ISDIGIT instead of isdigit. * src/sysdep.h: Remove defines of ctype macros as they aren't needed for safe-ctype-h. * src/url.c: Don't include ctype.h. * src/utils.c: Likewise. * src/wget.h: Include safe-ctype.h. 2001-03-07 Jan Prikryl * TODO: Removed an obsolete item about adding VMS and MS FTP server support. 2001-03-06 Hack Kampbjorn * src/http.c (gethttp): skip :port in host header if it is the DEFAULT_HTTPS_PORT when using SSL. * src/url.c: move the #define of DEFAULT_HTTP_PORT, DEFAULT_FTP_PORT and DEFAULT_HTTPS_PORT to the header file so it can be use in the rest of the code. * src/url.h: Ditto 2001-03-05 Dan Harkless * TODO: Add a --range option to download only a given byte range. 2001-03-01 Jonas Jensen * src/retr.c (show_progress): Correctly calculate the number of bytes in the first line of the download that have been actually downloaded in this run. 2001-03-01 Dan Harkless * ChangeLog.README: Renamed from README.branches and added a note that Wget has multiple ChangeLog files (currently ./ChangeLog, doc/ChangeLog, and src/ChangeLog), since this is unusual and people have complained their patches hadn't been applied after checking only the top-level ChangeLog. 2001-02-28 Dan Harkless * MACHINES: Explicitly tell people to send us config.guess output. 2001-02-27 Dan Harkless * TODO: Re-use FTP connection if multiple URLs on one host specified. Make "ftp:///%2F" cause an initial "CWD /". 2001-02-23 Dan Harkless * src/main.c (print_help): --help documentation for -N said it would re-download files if they had the _same_ timestamp on server. (print_help): -nr belongs in "FTP options" section of --help output, not "Recursive retrieval" section. Alphabetized FTP options by long option name. 2001-02-23 Dan Harkless * doc/wget.texi: Corrections, clarifications, and English fixes to time-stamping documentation. Also moved -nr from "Recursive Retrieval Options" to "FTP Options" and gave it a @cindex entry. Alphabetized FTP options by long option name. Mentioned that .listing symlinked to /etc/passwd is not a security hole, but that other files could be, so root shouldn't run wget in user dirs. 2001-02-23 Dan Harkless * NEWS: Note that Wget now has a man page again. * po/*.po*: Updated after changing --help's description of -N and moving -nr to a different category. * TODO: "Timestamps are sometimes not copied over on files retrieved by FTP." removed. Hopefully all the failures I was seeing were due to the fact that it wasn't documented that non-globbing, non-recursive FTP downloads need -N to get the remote timestamp to be preserved. 2001-02-22 Dan Harkless * doc/Makefile.in: Make wget man page and install it if we have pod2man. Added some missing '$(srcdir)/'s. Added missing dependencies on install targets (allowing you to just do `make install' rather than forcing you to do `make && make install'). Also, Makefile rules should always use output file parameters if available rather than redirecting stdout with '>', or you falsely satisfy dependencies if the tool you're running is missing or fails -- fixed call of texi2pod.pl that did this wrong. * doc/texi2pod.pl: Removed from CVS. Now automatically generated. * doc/texi2pod.pl.in: This new file is processed into texi2pod.pl, getting the appropriate path to the Perl 5+ executable on this system and becoming executable (CVS files, by contrast, don't arrive executable). 2001-02-22 Dan Harkless * TODO: Remove empty directories created due to --accept/--reject. * configure.in: Look for perl and pod2man and make substitutions. * Makefile.in (install): Do install.man if we have pod2man. 2001-02-19 Dan Harkless * doc/wget.texi (Download Options): Further improvement to --continue documentation -- explain interaction with -r and -N, mention usefulness for downloading new sections of appended-to files, etc. 2001-02-16 Dan Harkless * src/init.c (commands): Hack Kampbjørn discovered that "httpsproxy" had been inserted into commands[] out of alphabetical order, causing "BUG: unknown command `httpuser'". 2001-02-13 Jan Prikryl * windows/Makefile.src: Removed references to ftpparse sources. * windows/wget.dep: Ditto. * windows/Makefile.watcom: Ditto. 2001-02-13 Jan Prikryl * src/ftp-ls.c (ftp_parse_ls): Added support of ST_MACOS (Unix-like listing without correct permissons). * src/ftp.h (stype): Added ST_MACOS to identify the NetPresenz MacOS FTP server. * src/ftp.c (ftp_retrieve_list): New mirroring logic: A remote file shall be donwloaded only when it's newer than the local copy or when it has the same timeestamp but its size is different. ST_VMS and ST_MACOS as special cases that lie about file size. * src/ftp-ls.c (ftp_parse_ls): Support for ST_MACOS. * src/Makefile.in: Removed dependency on ftpparse library due to unclear copyright issues and absence of any feedback to our queries. * src/ftp-ls.c: Removed dependency on ftpparse library due to unclear copyright issues and absence of any feedback to our queries. (ftp_parse_ls): Added a warning message when remote server system does not seem to be suported by wget. (ftp_parse_vms_ls): New function for parsing VMS ftp server listing output. (clean_line): New function responsible for removing end-of-line characters from FTP listing texts. * src/ftp.c (getftp): Global variables pwd and host_type are now member of the ccon structure under names ccon.id and ccon.rs. * src/ftp.h (struct ccon): Added formed global variables from ftp.c, enum stype rs (remote system identification) and char *id (initial working directory), as suggested by Hrvoje. * src/url.c (parse_uname): Added support for passwords containing '@' characters. (skip_uname): Ditto. 2001-02-11 Hrvoje Niksic * src/ftp.c (ftp_loop_internal): Disable padding. (getftp): Ditto. * src/http.c (http_loop): Disable padding. * src/retr.c (show_progress): Use it to enable padding. * src/retr.c (rate): Optional parameter PAD for padding the rate. 2001-02-11 Hrvoje Niksic * src/ftp.c (ftp_loop): Reset con. 2001-02-11 Hack Kampbjørn * src/url.c (parseurl): Debug-print u->ftp_type. 2001-02-10 Tim Mooney * src/ftp.h: Rename enums `command' to `wget_ftp_command' and `fstatus' to `wget_ftp_status' because old names clash with Tru64 net/if.h. 2001-02-10 Jonas Jensen * src/retr.c (show_progress): Print the download rate along with the percentages. Along with Anders Thorsby . 2001-02-10 Hrvoje Niksic * src/retr.c (show_progress): Make sure that the last output line includes progress. 2001-02-08 Christian Fraenkel * src/gen_sslfunc.c: verify_callback is now static * src/gen_sslfunc.c (init_ssl): load certificate if specified * src/gen_sslfunc.c (ssl_printerr): new function * src/init.c: added new --sslcertfile and --sslcertkey switches * src/main.c: ditto * src/options.h: ditto * src/http.c (gethttp): abort when init_ssl fails 2001-01-23 Herold Heiko * windows/Makefile.src: Don't attempt to compile in alloca.c; it doesn't work and it's not needed. 2001-01-23 Herold Heiko * src/mswindows.h: Include ; it's needed for alloca(). 2001-01-23 Herold Heiko * src/config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for MS VC; somebody with Borland compiler please check and provide patch if possible; * src/cmpt.c: provided a usleep emulation. 2001-01-20 Karl Eichwalder * src/Makefile.in: Provide and use DESTDIR according to the Coding Standards. 2001-01-20 Karl Eichwalder * doc/Makefile.in: Provide and use DESTDIR according to the Coding Standards. 2001-01-16 Hrvoje Niksic * NEWS: Added more NEWS items. 2001-01-15 Jan Prikryl * util/wget.spec: Updated to 1.7, merged with the spec file from RedHat. * po/Makefile.in.in: `make realclean' equal to `make maintainer-clean'. * Makefile.in (realclean-top): Remove 'configure' as well. 2001-01-15 Dan Harkless * NEWS: Was not being maintained. Added some significant 1.7-dev stuff. 2001-01-11 Dan Harkless * TODO: If -c used with -N, check to make sure a file hasn't changed on the server before "continuing" to download it. 2001-01-11 Adrian Aichner * windows/Makefile.src: Updated. * windows/wget.dep: Ditto. 2001-01-10 Dan Harkless * src/url.c (str_url): Clarified this function's comment header after Hrvoje answered my question on the list as to when hide != 1. Also Hrvoje pointed out I need to use xstrdup() on the string literal. 2001-01-09 Dan Harkless * src/html-url.c: A bunch of fixup of `--page-requisites'-related comments to reflect Hrvoje's changes to my code when transplanting it into this new file, to fix spelling mistakes, to clarify, etc. * src/url.c (write_backup_file): Clarified a comment. (str_url): Henrik van Ginhoven pointed out on the list that we shouldn't give away the number of characters in the password by replacing each character with a 'x'. Use "" instead. * src/ftp.c (ftp_retrieve_dirs): The bug where recursion into FTP directories didn't work if logging in put you in a directory other than "/" is fixed now. Removed the comment here warning of the bug. * src/main.c (print_help): --continue's description was misleading. We don't "restart", we "resume". Also, better to say "partially-downloaded file" rather than just "existing file". 2001-01-09 Dan Harkless * doc/wget.texi (Download Options): Did a bunch of clarification and correction to the description of --continue. 2001-01-09 Dan Harkless * TODO: If -c is on, don't re-download a 100%-downloaded file. * TODO: The bug where you couldn't recurse into ftp directories if logging in put you somewhere else besides the server's "/" directory got fixed without the TODO entry for it being removed. * TODO: Add a "rollback" option to have --continue throw away X corrupted (e.g. by proxy) bytes from end of file before resuming. * po/*.po*: Updated after changing --help's description of -c. 2001-01-06 Jan Prikryl * src/url.c (parse_uname): Added support for passwords containing '@' characters. (skip_uname): Ditto. 2001-01-06 Jan Prikryl * doc/wget.texi (Reporting Bugs): Deleted the setence about Cc-ing the bug report to Wget mailing list as the bug report address is an alias for the mailing ist anyway. (Mailing List): Added URL for the alternate archive. * doc/wget.texi: Bunch of cosmetical changes. * doc/Makefile.in: Added targets for manpage generation using texi2pod.pl and pod2man (comes with Perl5). As we cannot rely on Perl5 being available on the system, manpage is not being built automatically. Updated '*clean' targets to remove 'sample.wgetrc.munged...', 'wget.pod', and 'wget.man'. * doc/texi2pod.pl: New file copied from GCC distribution to facilitate automatic manpage generation. 2001-01-06 Hrvoje Niksic * src/connect.c (bindport): Declare addrlen as int. Diagnosed by Drazen Kacar . (conaddr): Ditto. 2001-01-06 Dan Harkless * src/ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be the best way to go about my aim. Removed them in favor of: * src/ChangeLog-branches/1.6_branch.ChangeLog: New file. 2001-01-06 Dan Harkless * doc/ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be the best way to go about my aim. Removed them in favor of: * doc/ChangeLog-branches/1.6_branch.ChangeLog: New file. 2001-01-06 Dan Harkless * ChangeLog: The '[Not in 1.6 branch.]'s were decided not to be the best way to go about my aim. Removed them in favor of: * ChangeLog-branches/1.6_branch.ChangeLog: New file. * README.branches: Explains the 1.6_branch.ChangeLog files. * README.cvs: Falsely claimed you only needed GNU autoconf to build from the CVS sources. You also need GNU gettext and texinfo. I also did a bunch of general re-writing of this file. 2001-01-04 Hrvoje Niksic * src/url.c (replace_attr): New function, to be used by both TO_COMPLETE and TO_RELATIVE case in convert_links. (find_fragment): New function for finding URL fragments. (replace_attr): Better handle the case where the original string is not quoted. Use find_fragment. (convert_links): Use replace_attr(). 2001-01-03 Dan Harkless * TODO: We should make a simple man page referring to info doco. 2000-12-31 Dan Harkless * src/ChangeLog: Since this flat file doesn't have multiple branches, looking at the dates would make you think that things went into 1.6 that actually just went into the 1.7-dev branch. Added "[Not in 1.6 branch.]" where appropriate to clarify. 2000-12-31 Dan Harkless * doc/Makefile.in (distclean): sample.wgetrc.munged_for_texi_inclusion needs to be included in the distribution or it'll get regenerated due to the wget.info dependency, and then that file will get regenerated, forcing people to have makeinfo installed unnecessarily. We could use a kludge of a 0-length file in the distro, but the file isn't that big and should compress very well. * doc/wget.texi: Changed "VERSION 1.5.3+dev" to "VERSION 1.7-dev" and "UPDATED Feb 2000" to "UPDATED Dec 2000". Like the comment in the file says, it'd be nice if these were handled automatically... * doc/ChangeLog: Since this flat file doesn't have multiple branches, looking at the dates would make you think that things went into 1.6 that actually just went into the 1.7-dev branch. Added "[Not in 1.6 branch.]" where appropriate to clarify. 2000-12-31 Dan Harkless * README: Changed 1.5.3 in the FTP URL to 1.6. * NEWS: Released Wget version 1.6. * po/*.po: 'Project-Id-Version's were very haphazard, saying either "wget" or "GNU wget", and with versions of 1.5.2-b[124], 1.5.3, the nonexistent 1.5.4, and 1.6-pre. Standardized all to "GNU Wget 1.7-dev". Perhaps this is wrong to do because some of the translations haven't been updated since the versions they state, but I know some of the files were updated specifically for 1.6, and none of them used this version (unless you count the sole "1.6-pre" guy). In any case, the 'POT-Creation-Date's and 'PO-Revision-Date's remain the best indicator of whether a translation's out of date. * ChangeLog: Since this flat file doesn't have multiple branches, looking at the dates would make you think that things went into 1.6 that actually just went into the 1.7-dev branch. Added "[Not in 1.6 branch.]" where appropriate to clarify. 2000-12-30 Dan Harkless * src/ftp.c, http.c: Applied Hack Kampbjørn 's patch to deal with h_errno not being defined in netdb.h under Cygwin. 2000-12-18 Csaba Raduly * windows/Makefile.watcom: Updated. 2000-12-18 Csaba Raduly * src/sysdep.h: Include and under Watcom. 2000-12-17 Igor Khristophorov * src/http.c (check_end): Fix test for '+' or '-'. 2000-12-17 Hrvoje Niksic * src/url.c (parseurl): Rename inner loop var from i to ind to avoid clash with the function top-level-declared variable i. (str_url): Likewise, rename inner-loop i to j. * src/recur.c (parse_robots): Don't declare LEN at top of function. (robots_match): Renamed parameter FORBIDDEN to avoid hiding of global variable. * src/main.c (main): Change erroneous use of bitwise and to logical. * src/init.c (cmd_address): Don't heap-allocate `sin'; it can be on the stack because it will be copied to closure. Thanks to Csaba Raduly's run of PC-LINT over the sources. 2000-12-17 Hrvoje Niksic * src/mswindows.c: Include . * src/gen_sslfunc.c: Include . * src/ftp-basic.c: Don't attempt to declare errno or h_errno because they're not used. * src/main.c: Include because errno is used. * src/ftp.c: Ditto. * src/http.c: Include for h_errno. 2000-12-17 Hrvoje Niksic * src/http.c (basic_authentication_encode): Use xmalloc(), not malloc(). Thanks to Csaba Raduly's run of PC-LINT over the sources. 2000-12-17 Csaba Raduly * src/sysdep.h: Test for __EMX__ rather than for EMXOS2 for OS/2 compilation. 2000-12-13 Hrvoje Niksic * src/html-parse.c (advance_declaration): MSVC assert() chokes on '\"'. Use '"' instead. 2000-12-11 Hrvoje Niksic * src/utils.c (xfree_real): Removed. (xfree_debug): Just call free(). * src/wget.h (xfree): Make it an alias for free. 2000-12-11 Hrvoje Niksic * src/http.c (http_loop): Furthermore, touch output_document only if it is known to be an existing regular file. 2000-12-11 Hrvoje Niksic * src/ftp.c (ftp_retrieve_list): Ditto. * src/http.c (http_loop): Touch output_document if that is used for output. 2000-12-10 Hrvoje Niksic * po/POTFILES.in: Updated. 2000-12-10 Hrvoje Niksic * doc/Makefile.in (install.info): Info files are *not* in $(srcdir), but in the current build dir. 2000-12-10 Hrvoje Niksic * configure.in: Add windows/Makefile to the output block. * windows/Makefile.in: New file. * README.cvs: New file. 2000-12-06 Hrvoje Niksic * src/rbuf.h: Implement only a single version of RBUF_READCHAR, using rbuf_read_bufferful when the buffer is depleted. * src/rbuf.c (rbuf_read_bufferful): New function. 2000-12-06 Hrvoje Niksic * src/http.c: Include gen_sslfunc.h after including Wget's headers. (persistent_available_p): Needed coma before `int ssl'. 2000-12-06 Hrvoje Niksic * src/gen_sslfunc.h: Use ansi2knr style function declarations. * src/gen_sslfunc.c: Reformat according to the GNU coding standards. More should be done. * src/http.c (persistent_available_p): Place the cheap SSL test nearer the top of the function. (CLOSE_FINISH, CLOSE_INVALIDATE): Define only one version of each. 2000-12-06 Hrvoje Niksic * src/ftp.c (ftp_loop_internal): Ditto. * src/http.c (http_loop): Use it. * src/retr.c (sleep_between_retrievals): New function that handles the logic of opt.wait and opt.waitretry. 2000-12-05 Hrvoje Niksic * src/url.c (init_unsafe_char_table): Reinstate space as an unsafe char. 2000-12-05 Hrvoje Niksic * configure.in: Don't unconditionally define HAVE_SSL, even when --with-ssl is given. 2000-12-03 Christian Fraenkel * src/Makefile.in: added gen_sslfunc object * src/config.h.in: added HAVE_SSL define * src/connect.c: changed select_fd from static int to int * src/connect.h: ditto * src/gen_sslfunc.h: New file * src/gen_sslfunc.c: ditto * src/http.c: added HTTPS fuctionality * src/retrc.c: ditto * src/url.c: ditto * src/init.c: added opt.httpsproxy * src/options.h: ditto * src/rbuf.h: added alternate rbuf struct * src/wget.h: added CONSSLERR * src/rbuf.c: ditto * src/http.c: Added HTTPS fuctionality. * src/retrc.c: Ditto. * src/url.c: Ditto. * src/init.c: Added opt.httpsproxy. * src/options.h: Ditto. * src/rbuf.h: Added alternate rbuf struct. * src/wget.h: Added CONSSLERR. * src/rbuf.c: Ditto. 2000-12-03 Christian Fraenkel * INSTALL: Added the --with-ssl switch. * configure.in: Ditto. * TODO: Removed the corresponding entry. 2000-11-30 Jan Prikryl * src/ftp-ls.c (ftp_parse_unix_ls): Added second parameter "ignore_perms" to ignore file and directory permissions for Windows NT FTP server listings. (ftp_parse_winnt_ls): New function. (ftp_parse_ls): Parses UNIX and Windows NT listings separately. Simple heuristics for distinguishing between UNIX and MS-DOS-like FTP listing provided by Windows NT FTP service. 2000-11-30 Jan Prikryl * src/ftp-ls.c (ftp_parse_unix_ls): Added second parameter "ignore_perms" to ignore file and directory permissions for Windows NT FTP server listings. (ftp_parse_winnt_ls): New function. (ftp_parse_ls): Parses UNIX and Windows NT listings separately. Simple heuristics for distinguishing between UNIX and MS-DOS-like FTP listing provided by Windows NT FTP service. 2000-11-29 John Summerfield * src/netrc.c (parse_netrc): Get rid of line ending. 2000-11-25 Karl Eichwalder * Makefile.in (SUBDIRS): Add 'windows'. (dist, DISTFILES): Don't distribute CVS directories. 2000-11-25 Hrvoje Niksic * src/ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by Dan. 2000-11-24 Karl Eichwalder * src/main.c (print_help): Untabify. 2000-11-23 Hrvoje Niksic * src/utils.c (xrealloc_debug): Do the unregister/register thing only if the pointer has actually changed. (xmalloc_real): Declare `static' in DEBUG_MALLOC builds. (xfree_real): Ditto. (xrealloc_real): Ditto. (xstrdup_real): Ditto. 2000-11-23 Hrvoje Niksic * configure.in: Build ALL_LINGUAS dynamically. 2000-11-22 Hrvoje Niksic * src/ftp.c (getftp): ftp_getaddress() returns a malloc'ed copy of the string; no need to strdup() it. (getftp): Make pwd_len a local variable. (ftp_loop): Free PWD before returning. * src/init.c (cleanup): Free opt.ftp_pass only if it's non-NULL. 2000-11-22 Hrvoje Niksic * src/all: Use xfree() instead of free. * src/utils.c (xfree): New function. 2000-11-21 Hrvoje Niksic * src/url.c (convert_links): HTML-quote the converted string. * src/utils.c (html_quote_string): Move here from ftp-ls.c (html_quote_string): Make non-static; declare in utils.h. (html_quote_string): Convert SP to . 2000-11-21 Hrvoje Niksic * src/hash.c (hash_table_put): Don't overwrite deleted mappings. 2000-11-21 Hrvoje Niksic * src/hash.c (find_mapping): New function. (hash_table_get): Use it. (hash_table_get_pair): Ditto. (hash_table_exists): Ditto. (hash_table_remove): Ditto. (hash_table_remove): Really delete the entry if the mapping following LOCATION is empty. * src/utils.c (string_set_add): Check whether the element has existed before. * src/hash.c (hash_table_get_pair): New function. 2000-11-21 Hrvoje Niksic * src/ftp.c (getftp): Reformat Jan's code according to GNU coding standards; remove (debugging?) printf's; use '\0' for the ASCII zero character. Use alloca() instead of malloc() for inter-function temporary allocations. 2000-11-20 Hrvoje Niksic * src/version.c: Bump version from 1.5.3+dev to 1.7-dev. 2000-11-20 Hrvoje Niksic * src/recur.c (recursive_retrieve): Print the "so we don't load" debugging message only if we really don't load. * src/http.c (gethttp): Inhibit keep-alive if proxy is being used. (gethttp): Don't request keep-alive if keep-alive is inhibited. 2000-11-20 Hrvoje Niksic * src/http.c (http_process_type): Ignore trailing whitespace; use strdupdelim(). * src/recur.c (recursive_retrieve): Use the new `convert' field. (convert_all_links): Ditto. (convert_all_links): Don't respect meta_disallow_follow. * src/html-url.c (handle_link): Fill out link_relative_p and link_complete_p. * src/url.h (struct _urlpos): Make elements more readable. * src/recur.c (recursive_retrieve): Call slist_prepend instead of slist_append. (convert_all_links): Call slist_nreverse before iterating through urls_html. * src/utils.c (slist_prepend): New function. (slist_nreverse): Ditto. 2000-11-20 Hrvoje Niksic * src/http.c (http_loop): If username and password are known, try the `Basic' authentication scheme by default. * src/connect.h: Declare test_socket_open. 2000-11-20 Hrvoje Niksic * src/http.c (gethttp): Don't use the return value of sprintf(). (gethttp): Inhibit keep-alive if opt.http_keep_alive is 0. 2000-11-20 Hrvoje Niksic * src/http.c (check_end): Constify. 2000-11-19 Hrvoje Niksic * src/url.c (convert_links): Handle UREL2ABS case. * src/recur.c (recursive_retrieve): Instead of the list urls_downloaded, use hash tables dl_file_url_map and dl_url_file_map. (convert_all_links): Use them to retrieve data. * src/host.c (clean_hosts): Free the hash tables. * src/main.c (private_initialize): Call host_init(). * src/host.c (store_hostaddress): Use a saner, hash table-based data model. (realhost): Ditto. (host_init): Initialize the hash tables. 2000-11-19 Hrvoje Niksic * src/retr.c (get_contents): If use_expected, make sure that the appropriate amount of data is being read. * src/http.c (gethttp): Check for both `Keep-Alive: ...' and `Connection: Keep-Alive'. * src/wget.h (DEBUGP): Call debug_logprintf only if opt.debug is turned on. 2000-11-19 Hrvoje Niksic * src/http.c (gethttp): Make the HTTP persistent connections more robust. 2000-11-19 Hrvoje Niksic * src/http.c (connection_available_p): Use it. * src/connect.c (test_socket_open): New function. * src/http.c (gethttp): Support persistent connections. Based on the ideas, and partly on code, by Sam Horrocks . (register_persistent): New function. (connection_available_p): Ditto. (invalidate_connection): Ditto. 2000-11-18 Jan Prikryl * src/ftpparse.c, ftpparse.h: New files. * src/ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers only. Use ftp_parse_nonunix_ls otherwise. (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all exotic FTP servers. * src/ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other" FTP servers. * src/ftp.c: New static wariables host_type, pwd, and pwd_len. (getftp): Support for VMS. Support for FTP servers that do not place you in the root directory after login. (ftp_retrieve_list): VMS is silent about the real file size, issue a more appropriate message. (ftp_get_listing): Pass host_type to ftp_parse_ls. * src/ftp-basic.c (ftp_pwd, ftp_syst): New functions. 2000-11-18 Jan Prikryl * src/ftpparse.c, ftpparse.h: New files. * src/ftp-ls.c (ftp_parse_ls): Use ftp_parse_unix_ls for UNIX servers only. Use ftp_parse_nonunix_ls otherwise. (ftp_parse_nonunix_ls): Stub to the ftpparse library handling all exotic FTP servers. * src/ftp.h (stype): New enum, distinguishes UNIX, VMS, and "other" FTP servers. * src/ftp.c: New static wariables host_type, pwd, and pwd_len. (getftp): Support for VMS. Support for FTP servers that do not place you in the root directory after login. (ftp_retrieve_list): VMS is silent about the real file size, issue a more appropriate message. (ftp_get_listing): Pass host_type to ftp_parse_ls. * src/ftp-basic.c (ftp_pwd, ftp_syst): New functions. 2000-11-18 Hrvoje Niksic * src/utils.c (slist_append): Eviscerate NOSORT. Hash tables are now used for what the sorted slists used to be used for. (slist_contains): Don't rely on the list being sorted. (slist_append): Simplify the code. * src/recur.c (recursive_cleanup): Use free_string_set. * src/utils.c (string_set_add, string_set_exists, string_set_free): New functions for easier freeing of hash tables whose keys are strdup'ed strings. * src/recur.c (recursive_retrieve): Use the hash table functions for storing undesirable URLs. * src/hash.c: New file. 2000-11-17 Hrvoje Niksic * src/main.c (private_initialize): Call url_init. (main): Call private_initialize. * src/url.c (unsafe_char_table): New table. (UNSAFE_CHAR): Use it. (init_unsafe_char_table): New function. (url_init): New function; call init_unsafe_char_table. 2000-11-16 Hrvoje Niksic * windows/config.h.ms: snprintf and vsnprintf exist under Windows. * windows/Makefile.src: Back out previous change. 2000-11-16 Hrvoje Niksic * src/mswindows.h: Define snprintf and vsnprintf to _snprintf and _vsnprintf respectively. 2000-11-16 Hrvoje Niksic * doc/wget.texi: Use --- consistently. Spell "Wget" with starting capital letter consistently. Use ``...'' or @dfn{} instead of simple double quotes where appropriate. Use double space as separator between sentences consistently. 2000-11-16 Herold Heiko * windows/Makefile.src: Compile in vsnprintf.c. 2000-11-15 Hrvoje Niksic * src/html-url.c (handle_link): Handle HTML fragment identifiers. * src/recur.c (recursive_retrieve): If norobot info is respected and the file is specified not to be followed by robots, respect that. * src/html-url.c (collect_tags_mapper): Handle . For us the important cases are where X is NONE or where X contains NOFOLLOW. (get_urls_html): Propagate that information to the caller. 2000-11-15 Hrvoje Niksic * src/config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only on Linux. 2000-11-15 Hrvoje Niksic * doc/wget.texi (Robots): Rearrange text. Mention the meta tag. 2000-11-15 Hrvoje Niksic * doc/wget.texi (Robots): Document that we now support the meta tag exclusion. 2000-11-14 Hrvoje Niksic * doc/wget.texi: Add GFDL; remove norobots specification. * doc/wget.texi (Sample Wgetrc): Remove warnings with lateish makeinfo, mostly by changing xref{} to pxref{} when inside parentheses. 2000-11-13 Hrvoje Niksic * src/url.c (convert_links): Unlink the file we might be reading from before writing to it. (convert_links): Use alloca instead of malloc for filename_plus_orig_suffix. 2000-11-12 Hrvoje Niksic * src/host.c (realhost): Add HOST to the list with quality==0 only if it wasn't already there. Based on analysis by Lu Guohan . 2000-11-10 Hrvoje Niksic * src/url.c (get_urls_file): Ditto. (convert_links): Ditto. * src/html-url.c (get_urls_html): Use read_file() instead of load_file(). * src/utils.c (read_file): New function, instead of the old load_file(). (read_file_free): Ditto. * src/url.c (findurl): Search only for the supported protocols. (convert_links): Use fwrite() when writing out a region of characters. 2000-11-10 Hrvoje Niksic * src/init.c (run_wgetrc): Don't bother killing off '\r' since pars_line() skips whitespace at end of line anyway. (parse_line): Oops, it didn't. Now it does. * src/recur.c (parse_robots): Ditto here. * src/ftp-ls.c (ftp_parse_unix_ls): Kill off the newline character manually because read_whole_line no longer does. * src/utils.c (read_whole_line): Rewrite to: a) use less memory (reallocates to needed size after work), b) work faster --> fgets() instead of getc, c) be more correct --> doesn't kill the newline character at the end of line. 2000-11-10 Hrvoje Niksic * src/init.c (comind): Initialize MAX to array size - 1. 2000-11-10 Hrvoje Niksic * src/ftp-ls.c: Move html_quote_string and ftp_index here. * src/url.c: Remove get_urls_html, since that's now in html-url.c. * src/html-url.c: New file. * src/html-parse.c: New file. 2000-11-10 Hrvoje Niksic * doc/wget.texi: cc.fer.hr -> srk.fer.hr. 2000-11-10 Hrvoje Niksic * configure.in: Test for MMAP. 2000-11-08 Hrvoje Niksic * src/url.c (construct): Handle the case where host name is not followed by a slash. 2000-11-08 Hrvoje Niksic * src/url.c (construct): Changed last_slash[-1] to *(last_slash - 1). Suggested by Edward J. Sabol. 2000-11-06 Hrvoje Niksic * src/init.c: commands[] need to be sorted! ("base" wasn't.) 2000-11-05 Hrvoje Niksic * src/wget.h (DO_REALLOC_FROM_ALLOCA): Use braces to disambiguate `if'. 2000-11-05 Hrvoje Niksic * src/url.c (construct): Insert unneeded initialization for the compiler to shut up. * src/config.h.in: Define _XOPEN_SOURCE to 500 to get the prototype for strptime() (*duh*). Define _SVID_SOURCE to get S_IFLNK which otherwise gets lost when you define _XOPEN_SOURCE. * src/utils.c (touch): Include the file name in the error message. From Debian. 2000-11-05 Hrvoje Niksic * src/url.c (construct): Fix comment. (find_last_char): Document. 2000-11-05 Hrvoje Niksic * src/log.c (logvprintf): Use vsnprintf() in all cases. If necessary, resize the buffer to fit the formated message. That way, messages of arbitrary size may be printed. (logvprintf): Use saved_append() to optionally log the last several lines of output. (logputs): Ditto. (log_close): Adapt to new data structures. (log_dump): Ditto. (redirect_output): Print messages to stderr, not to stdout. * src/log.c (saved_append_1): New function. Replaces the old logging system ("log all output until 10M characters") with a new, much more reasonable one ("log last screenful of text"). (saved_append): New function; call saved_append_1. (free_log_line): New function. 2000-11-05 Hrvoje Niksic * doc/wget.texi: Updated names of contributors. 2000-11-05 Hrvoje Niksic * doc/Makefile.in (sample.wgetrc.munged_for_texi_inclusion): Use $(srcdir). 2000-11-04 Hrvoje Niksic * src/snprintf.c: New file. 2000-11-03 Hrvoje Niksic * src/wget.h: If HAVE_STDARG_H is not defined, don't declare argument types to logprintf() and debug_logprintf(). 2000-11-02 Tyler Riddle * src/http.c (known_authentication_scheme_p): Recognize NTML authentication. (create_authorization_line): Treat NTML the same as `Basic'. 2000-11-02 Matthew Seaman * util/rmold.pl: Various fixes. 2000-11-02 Junio Hamano * src/ftp-basic.c (ftp_login): Make comparison case-insensitive. 2000-11-02 Hrvoje Niksic * src/url.c (parseurl): Remove possible reading past the end of sup_protos[]. Spotted by Mark A. Mankins . 2000-11-02 Hrvoje Niksic * src/retr.c (retrieve_url): Free url before returning. (retrieve_url): Free mynewloc before returning. Spotted by Mark A. Mankins . 2000-11-02 Hrvoje Niksic * src/ftp.c (ftp_loop_internal): Hide the password from the URL when printing non-verbose. Problem spotted by Dariusz Mlynarczyk . 2000-11-01 Hrvoje Niksic * src/wget.h (enum): Remove extra space after last enumeration. 2000-11-01 Hrvoje Niksic * src/utils.c (long_to_string): Update with a later, better version. 2000-11-01 Hrvoje Niksic * src/url.c (path_simplify_with_kludge): New function. (path_simplify_with_kludge): Disable it. Instead... (parse_dir): ...make sure that at this point the right thing is done, i.e. that "query" part of the URL (?...) is always assigned to the file, never to the directory portion of the path. 2000-11-01 Hrvoje Niksic * src/url.c (get_urls_html): Decode HTML entities using html_decode_entities. * src/html.c (htmlfindurl): Don't count the `#' in numeric entities (&#NNN;) as an HTML fragemnt. (html_decode_entities): New function. 2000-11-01 Hrvoje Niksic * src/url.c (construct): Rewritten for clarity. Avoids the unnecessary copying and stack-allocation the old version performed. 2000-11-01 Hrvoje Niksic * src/retr.c (retrieve_url): Detect redirection cycles. 2000-11-01 Hrvoje Niksic * src/main.c (main): Use legible_very_long() for printing opt.downloaded. * src/utils.c (legible_1): New function that operates on strings and does the brunt of legible()'s work. (legible): Use legible_1(). (legible_very_long): New function; dump the argument with sprintf(), and call legible_1(). * src/options.h (struct options): Use VERY_LONG_TYPE for opt.downloaded. * src/sysdep.h (VERY_LONG_TYPE): Define it to have a 64-bit or greater type. * src/config.h.in: Make sure that SIZEOF_LONG and SIZEOF_LONG_LONG get defined. Define HAVE_LONG_LONG if long long is available. 2000-11-01 Hrvoje Niksic * src/main.c (main): In case of opt.downloaded overflowing, print instead of a totally bogus random value. * src/retr.c (retrieve_from_file): Ditto. * src/recur.c (recursive_retrieve): Ditto. * src/main.c (main): Ditto. * src/http.c (http_loop): Ditto. * src/ftp.c (ftp_loop_internal): Use downloaded_increase() instead of `+=', and downloaded_exceeds_quota() instead of the simple-minded check. (ftp_retrieve_list): Ditto. (ftp_retrieve_dirs): Ditto. (ftp_retrieve_glob): Ditto. * src/retr.c (downloaded_increase): New function. Notice overflows of opt.downloaded. (downloaded_exceeds_quota): Make sure that opt.downloaded is not used if it overflowed. * src/options.h (struct options): New member downloaded_overflow. 2000-11-01 Hrvoje Niksic * src/html.c (htmlfindurl): Fix recognition of # HTML fragments. 2000-11-01 Hrvoje Niksic * configure.in: Check for size of long and long long. 2000-10-31 Hrvoje Niksic * src/retr.c (retrieve_url): Use url_concat() to handle relative redirections instead of /ad hoc/ code. * src/url.c (url_concat): New function encapsulating weird construct(). (urllen_http_hack): New function. (construct): When constructing new URLs, recognize that `?' does not form part of the file name in HTTP. 2000-10-31 Hrvoje Niksic * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Rewind the stream when retrying from scratch. 2000-10-30 Dan Harkless * NEWS: Hrvoje pointed out that relative URL grokking deserves mention. 2000-10-27 Dan Harkless * src/retr.c (retrieve_url): Manually applied T. Bharath 's patch to get wget to grok illegal relative URL redirects. Reformatted and re-commented it. 2000-10-27 Dan Harkless * TODO: wget now groks illegal relative URL HTTP redirects. 2000-10-24 Dan Harkless * NEWS: Forgot to update regarding new --bind-address option. 2000-10-23 Hrvoje Niksic * doc/wget.texi (HTTP Options): Remove Netscape bullying. 2000-10-23 Dan Harkless * src/connect.c (make_connection and bindport): Manually applied Rob Mayoff 's 1.5.3 patch to add --bind-address, changing coding style to GNU's. * src/ftp.c (ftp_loop_internal): --delete-after wasn't implemented for files downloaded via FTP. Per a comment, .listing files were not counted towards number of bytes and files downloaded because they're deleted anyway. Well, they aren't under -nr, so count them then. * src/init.c: Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address, alphabetizing, changing coding style to GNU's, commenting, and renaming cmd_ip_address() to cmd_address() to imply hostnames also okay. * src/main.c (main): --delete-after didn't delete the root of the tree. Ignore --convert-links if --delete-after was specified. Manually applied Rob Mayoff's 1.5.3 patch to add --bind-address, fixing duplicate use of added-since-1.5.3 case value. (print_help): Clarified that --delete-after deletes local files. Rob forgot to add a line for his new --bind-address option. * src/options.h (struct options): Manually applied Rob Mayoff's patch to add --bind-address (bind_address structure member). * src/recur.c (recursive_retrieve): Improved comment; added DEBUGP(). Ignore --convert-links if --delete-after was specified. * src/retr.c (retrieve_from_file): Just added a DEBUGP(). 2000-10-23 Dan Harkless * doc/wget.texi (Recursive Retrieval Options): Improved --delete-after docs. (Download Options): Documented Rob Mayoff's new --bind-address option. (Wgetrc Commands): Documented Rob Mayoff's new bind_address command. 2000-10-20 Dan Harkless * doc/wget.texi (Recursive Retrieval Options): Sugg. -E on 1-page download. 2000-10-20 Dan Harkless * TODO: -k needs to convert '?' to "%3F" in links to saved files containing the '?' character (e.g. CGI output). Also, we need to check the HTTP spec w.r.t. simplification of absolute URLs. Generalize --html-extension to something like --mime-extension. * MAILING-LIST: I didn't realize allowed posting by non-subscribers. soon to be an alias for it. * NEWS: Always forget to update this file when making user-vis. changes. 2000-10-19 Dan Harkless * src/ftp.c (ftp_loop_internal): downloaded_file() enumerators changed. (getftp): Applied Piotr Sulecki 's patch to work around FTP servers that incorrectly respond to the "REST" command with the remaining size rather than the total file size. * src/http.c (gethttp): Improved a comment and added code to tack on ".html" to text/html files without that extension when -E specified. (http_loop): Use new downloaded_file() enumerators and deal with the case of gethttp() called xrealloc() on u->local. * src/init.c (commands): Added new "htmlextension" command. Also renamed John Daily's cmd_quad() to the more descriptive cmd_lockable_boolean(), alpha-sorted the CMD_DECLARE()s and removed duplicate cmd_boolean() declaration. * src/main.c (print_help): Added my new -E / --html-extension option. (main): Undocumented --email-address option previously used -E synonym. Stole it away for the much more deserving --html-extension's use. * src/options.h (struct options): Added html_extension field. * src/url.c (convert_links): URL X that we saved as X.html locally due to -E needs to be backed up as X.orig, not X.html.orig. Added comments. (downloaded_file): Now remembers if we added .html extension to a file. * src/url.h (downloaded_file_t): Added extra enumerators to support above. (downloaded_file): Now takes and returns a downloaded_file_t. * src/wget.h (unnamed "dt" enum): Added ADDED_HTML_EXTENSION enumerator. 2000-10-19 Dan Harkless * doc/wget.texi (HTTP Options): Documented my new -E / --html-extension. (Wgetrc Commands): Documented my new html_extension option and John Daily's "quad" values (which I renamed to "lockable Boolean"). When I documented Damir Dzeko's --referer, I forgot to add the .wgetrc equivalent; mentioned the "referrer" spelling issue. 2000-10-19 Dan Harkless * TODO: -E / --html-extension / html_extension has been implemented. Make -I and -X allow an optional hostname before the directory name? When simplifying paths, wget needs to stop at any '?' character. * configure.in: Put "it" language in proper alphabetical order and added new languages "pl" and "ru". * po/pl.{gmo,po}: Added Grzegorz Kowal 's Polish message translation file. * po/ru.{gmo,po}: Added Const Kaplinsky 's Russian message translation file. 2000-10-16 Dan Harkless * TODO: Add option to save local filenames without extra %-encoding. 2000-10-13 Adrian Aichner * src/retr.c: Add msec timing support for WINDOWS. * src/retr.c (reset_timer): GetSystemTime() on WINDOWS. * src/retr.c (elapsed_time): Calculate delta time to msec on WINDOWS. 2000-10-09 Dan Harkless * src/html.c (htmlfindurl): Added unneeded initialization to quiet warning. * src/main.c (print_help): Clarified what --retr-symlinks does. 2000-10-09 Dan Harkless * doc/wget.texi (FTP Options): --retr-symlinks wasn't documented properly. 2000-10-09 Dan Harkless * TODO: --retr-symlinks should cause wget to traverse links to dirs too. 2000-09-25 Dan Harkless * TODO: Make wget return nonzero in situations like bad HTTP auth. Make wget follow (illegal) relative URL HTTP redirects. 2000-09-15 John Daily * src/init.c: Add support for "always" and "never" values to allow .wgetrc to override commandline (useful e.g. with .pm files calling `wget --passive-ftp' when your firewall doesn't allow that). * src/ftp.c (getftp): passive_ftp is first option to support always/never. 2000-08-30 Dan Harkless * src/ftp.c (ftp_retrieve_list): Use new INFINITE_RECURSION #define. * src/html.c: htmlfindurl() now takes final `dash_p_leaf_HTML' parameter. Wrapped some > 80-column lines. When -p is specified and we're at a leaf node, do not traverse , , or tags other than . * src/html.h (htmlfindurl): Now takes final `dash_p_leaf_HTML' parameter. * src/init.c: Added new -p / --page-requisites / page_requisites option. * src/main.c (print_help): Clarified that -l inf and -l 0 both allow infinite recursion. Changed the unhelpful --mirrior description to simply give the options it's equivalent to. Added new -p option. (main): Added some comments; handle new -p / --page-requisites. * src/options.h (struct options): Added new page_requisites field. * src/recur.c: Changed "URL-s" to "URLs" and "HTML-s" to "HTMLs". Calculate and pass down new `dash_p_leaf_HTML' parameter to get_urls_html(). Use new INFINITE_RECURSION #define. * src/retr.c: Changed "URL-s" to "URLs". get_urls_html() now takes final `dash_p_leaf_HTML' parameter. * src/url.c: get_urls_html() and htmlfindurl() now take final `dash_p_leaf_HTML' parameter. * src/url.h (get_urls_html): Now takes final `dash_p_leaf_HTML' parameter. * src/wget.h: Added some comments and new INFINITE_RECURSION #define. 2000-08-30 Dan Harkless * po/*.{gmo,po,pot}: Regenerated after modifying wget --help output. * MACHINES: Previously said to send updates to "me" (Hrvoje) -- now says to email the mailing list or bug-wget@gnu.org. * MAILING-LIST: Added mention of bug-wget@gnu.org. * NEWS: Added --waitretry and --page-requisites. 2000-08-30 Dan Harkless * doc/wget.texi (Recursive Retrieval Options): Documented new -p option. (Wgetrc Commands): Documented -p's equvialent, page_requisites. 2000-08-25 Dan Harkless * MACHINES: Alphabetized, changed "architectures" to "OSes and architectures", added missing company names, removed needless ^L, made AIX and FreeBSD entries more general to reflect successful use on those platforms by myself and others, removed the non-factual "this version of", and fixed some grammatical errors. 2000-08-23 Dan Harkless * src/main.c (print_help): -B / --base was not mentioned. 2000-08-23 Dan Harkless * doc/wget.texi (Download Options): Using -c on a file that's already fully downloaded results in an unchanged file and no second ".1" copy. * doc/wget.texi (Logging and Input File Options): -B / --base was not documented as a separate item, and the .wgetrc version was misleading. * doc/wget.texi (Wgetrc Commands): Changed all instances of ", the same as" to the more grammatical " -- the same as". 2000-08-22 Dan Harkless * src/main.c (print_help): Modified -nc description to mention that it also prevents the creation of multiple versions of the same file with "." suffixes. 2000-08-22 Dan Harkless * doc/wget.texi (Download Options): --no-clobber's documentation was severely lacking -- ameliorated the situation. Some of the previously-undocumented stuff (like the multiple-file-version numeric-suffixing) that's now mentioned for the first (and only) time in the -nc documentation should probably be mentioned elsewhere, but due to the way that wget.texi's hierarchy is laid out, I had a hard time finding anywhere else appropriate. 2000-07-21 Dan Harkless * TODO: But Brian McMahon wants old behavior as an option. 2000-07-19 Dan Harkless * TODO: -k should convert "hostless absolute" URLs, like "/index.html". 2000-07-17 Dan Harkless * doc/wget.texi (HTTP Options): Minor clarification in "download a single HTML page and all files necessary to display it" example. 2000-07-14 Jan Prikryl * src/retr.c (retrieve_url): Consistently strdup opt.referer when setting u->referer. 2000-06-09 Hrvoje Niksic * src/url.c (encode_string): Fix comment. Suggested by Herold Heiko . 2000-06-09 Dan Harkless * src/main.c (print_help): --help output for --waitretry was over 80 cols. 2000-06-01 Hrvoje Niksic * src/url.c (str_url): Print the port number only if it's different from the default port number for that protocol. 2000-06-01 Const Kaplinsky * src/ftp.c (ftp_retrieve_list): Change permissions only on plain files. 2000-05-24 Dan Harkless * TODO: Timestamps sometimes not copied over on files retrieved by FTP. 2000-05-22 Dan Harkless * src/main.c (print_help): Added --help line for Damir Dzeko 's until-now-undocumented --referer option. Removed comments that --referer and --waitretry were undocumented. Changed "`.wgetrc' command" to "`.wgetrc'-style command" on --help line for --execute. 2000-05-22 Dan Harkless * doc/wget.texi (HTTP Options): Damir Dzeko did not document his new --referer option. Did so. 2000-05-22 Dan Harkless * AUTHORS: Added myself to this file, as Hrvoje got confirmation of my FSF copyright assignment. * TODO: Added note that fragment identifiers don't work properly. * po/*.{gmo,po,pot}: Regenerated after modifying wget --help output. 2000-05-18 Hrvoje Niksic * src/ftp.c (getftp): Ditto. * src/http.c (gethttp): Check for return value of fclose/fflush. 2000-05-17 Dan Harkless * TODO: Make `-k' check for files that were downloaded in the past and convert links to them in newly-downloaded documents. 2000-04-18 Dan Harkless * doc/sample.wgetrc: Realized I put a global setting in the local section. 2000-04-13 Dan Harkless * doc/Makefile.in (sample.wgetrc.munged_for_texi_inclusion): Added build, dependencies, and distclean cleanup of this new file. * doc/sample.wgetrc: Uncommented waitretry and set it to 10, clarified some wording, and re-wrapped some text to 71 columns due to @sample indentation in wget.texi. * doc/wget.texi: Herold further expounded on the behavior of waitretry -- reworded docs again. Changed note saying _all_ lines in sample.wgetrc are commented out. Don't have an entire hand- cut-and-pasted copy of sample.wgetrc in this file -- use @include. 2000-04-12 Hrvoje Niksic * src/http.c (gethttp): Don't free REQUEST -- it was allocated with alloca(). Pointed out by Gisle Vanem . 2000-04-12 Hrvoje Niksic * src/host.c (store_hostaddress): Instead of shifting ADDR, start copying from the correct address. 2000-04-12 Dan Harkless * doc/Makefile.in (install.wgetrc): I completely missed the message that the new wgetrc wasn't being installed the first couple of times I ran `make install' after changing sample.wgetrc. Added blank lines around the message and a "", and reworded the message to be a bit more clear. * doc/sample.wgetrc: Added entries for backup_converted and waitretry. * doc/wget.texi (Download Options and Wgetrc Commands): Herold Heiko 's new --waitretry option was undocumented until now. Reworded the suggested documentation he sent to the list. 2000-04-05 Dan Harkless * TODO: Make -K only leave .orig files around when different. Add an option to save all text/html files with .html extension. Allow mirroring of FTP URLs where logging in puts you somewhere else besides '/'. 2000-04-04 Dan Harkless * src/host.c (store_hostaddress): R. K. Owen's patch introduces a "left shift count >= width of type" warning on 32-bit architectures. Got rid of it by tricking the compiler w/ a variable. * src/url.c (UNSAFE_CHAR): The macro didn't include all the illegal characters per RFC1738, namely everything above '~'. It also generated a warning on OSes where char =~ unsigned char. Fixed. 2000-04-04 Dan Harkless * NEWS (--follow-tags, -G / --ignore-tags): Forgot to mention these new options when I added them. 2000-03-31 Hrvoje Niksic * src/Use TOUPPER/TOLOWER. 2000-03-21 Hrvoje Niksic * src/wget.h (DO_REALLOC_FROM_ALLOCA): Ditto. * src/sysdep.h (ISALNUM): New macro. (TOLOWER): Ditto. (TOUPPER): Ditto. 2000-03-10 Dan Harkless * src/html.c (idmatch): Implemented checking of my new --follow-tags and --ignore-tags options. * src/init.c (commands): Added comment reminding people adding new entries doing allocation to add corresponding freeing in cleanup(). (commands): Added new followtags and ignoretags commands. (cleanup): Free storage for new followtags and ignoretags. * src/main.c: Use of "comma-separated list" was random -- normalized it. Did some alphabetization. Added comments pointing out "Options without arguments" and "Options accepting an argument" sections of long_options[]. Added new options --follow-tags and -G / --ignore-tags. Added comment that Damir's --referer is currently undocumented. Added comment that Heiko's --waitretry is partially undocumented (mentioned in --help but not in wget.texi). Moved improperly sorted 24, 129, and 'G' cases. * src/options.h (struct options): Added new fields follow_tags and ignore_tags. * src/wget.h: Added "#define EQ 0" so we can say "strcmp(a, b) == EQ". 2000-03-10 Dan Harkless * doc/wget.texi (Recursive Retrieval Options): In -K description, added a link to the discussion of interaction with -N. (Recursive Accept/Reject Options): Did some alphabetizing and added descriptions of new --follow-tags and -G / --ignore-tags options. (Following Links): Changed "the loads of" to "loads of". (Wgetrc Commands): Added descriptions of new follow_tags and ignore_tags commands. 2000-03-10 Dan Harkless * TODO: Removed done item: we now have an option (-G) that makes it easy to download a single HTML document and all its constituents. * po/*.{gmo,po,pot}: Regenerated after adding new options. * po/hr.po: Hrvoje forgot '\n's on his translations of my altered messages, causing msgfmt to balk and `make install' to fail. 2000-03-02 Hrvoje Niksic * doc/wget.texi (Contributors): Update contributors list. 2000-03-02 HIROSE Masaaki * src/html.c (html_allow): Add and