]> granicus.if.org Git - curl/commitdiff
syncing with local edit
authorDaniel Stenberg <daniel@haxx.se>
Mon, 10 Jan 2000 23:36:14 +0000 (23:36 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Jan 2000 23:36:14 +0000 (23:36 +0000)
15 files changed:
CHANGES
config.sub-991124 [deleted file]
curl.1
head [deleted file]
lib/formdata.h
lib/ftp.c
lib/getenv.c
lib/getenv.h
lib/netrc.h
lib/url.c
lib/urldata.h
src/Makefile
src/curl
src/hugehelp.c
src/main.c

diff --git a/CHANGES b/CHANGES
index 34cc7bf83ce0739690cee6e5fab993d7acb685d9..acdc348cf1556c5597e0b68a898d235aecfe5d8f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,23 @@
 
 Version 6.4
 
+Daniel (10 January 2000):
+ - Renumbered some enums in curl/curl.h since tag number 35 was used twice!
+ - Added "postquote" support to the ftp section that enables post-ftp-transfer
+   quote commands.
+ - Now made the -Q/--quote parameter recognize '-' as a prefix, which means
+   that command will be issued AFTER a successful ftp transfer. This can of
+   course be used to delete or rename a file after it has been uploaded or
+   downloaded. Use your imagination! ;-)
+ - Since I do the main development on solaris 2.6 now, I had to download and
+   install GNU groff to generate the hugehelp.c file. The solaris nroff cores
+   on the man page!
+ - Added all the curl exit codes to the man page.
+ - Jim Gallagher <jmgallag@usa.net> properly tracked down a bug in autoconf
+   2.13. The AC_CHECK_LIB() macro wrongfully uses the -l flag before the -L
+   flag to 'ld' which causes the HP-UX 10.20 flavour to fail on all libchecks
+   and thefore you can't make the configure script find the openssl libs!
+
 Daniel (28 December 1999):
  - Tim Verhoeven <dj@walhalla.sin.khk.be> correctly identified that curl
    doesn't support URL formatted file names when getting ftp. Now, there's a
diff --git a/config.sub-991124 b/config.sub-991124
deleted file mode 100755 (executable)
index e24b850..0000000
+++ /dev/null
@@ -1,952 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# 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 2 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., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# 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.
-
-# 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.
-
-if [ x$1 = x ]
-then
-       echo Configuration name missing. 1>&2
-       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-       echo "or     $0 ALIAS" 1>&2
-       echo where ALIAS is a recognized configuration type. 1>&2
-       exit 1
-fi
-
-# First pass through any local machine types.
-case $1 in
-       *local*)
-               echo $1
-               exit 0
-               ;;
-       *)
-       ;;
-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
-  linux-gnu*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    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)
-               os=
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -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/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               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*)
-               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
-               ;;
-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.
-       tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-               | arme[lb] | pyramid | mn10200 | mn10300 \
-               | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-               | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
-               | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
-               | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
-               | mipstx39 | mipstx39el \
-               | sparc | sparclet | sparclite | sparc64 | v850)
-               basic_machine=$basic_machine-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[34567]86)
-         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.
-       vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
-             | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
-             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-             | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
-             | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
-             | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
-             | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
-             | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-             | sparc64-* | mips64-* | mipsel-* \
-             | mips64el-* | mips64orion-* | mips64orionel-*  \
-             | mipstx39-* | mipstx39el-* \
-             | f301-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-cbm
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-cbm
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-cbm
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       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 | ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       cray2)
-               basic_machine=cray2-cray
-               os=-unicos
-               ;;
-       [ctj]90-cray)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       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
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-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
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i[34567]86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i[34567]86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i[34567]86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i[34567]86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       mipsel*-linux*)
-               basic_machine=mipsel-unknown
-               os=-linux-gnu
-               ;;
-       mips*-linux*)
-               basic_machine=mips-unknown
-               os=-linux-gnu
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       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
-               ;;
-       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
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-        pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pentium | p5 | k5 | nexen)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | k6 | 6x86)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | nexen-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | k6-* | 6x86-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=rs6000-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  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/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       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
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       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
-               ;;
-       xmp)
-               basic_machine=xmp-cray
-               os=-unicos
-               ;;
-        xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       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.
-       mips)
-               if [ x$os = x-linux-gnu ]; then
-                       basic_machine=mips-unknown
-               else
-                       basic_machine=mips-mips
-               fi
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sparc)
-               basic_machine=sparc-sun
-               ;;
-        cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       *)
-               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.
-       -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* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -uxpv*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -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|'`
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -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
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-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
-               ;;
-       f301-fujitsu)
-               os=-uxpv
-               ;;
-       *)
-               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
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -vxsim* | -vxworks*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
diff --git a/curl.1 b/curl.1
index f93bc0ea0cff3e2a6f6b2ddef76c56271e50822d..9d8edfe9962f372c7964832c84831b7435328676 100644 (file)
--- a/curl.1
+++ b/curl.1
@@ -2,7 +2,7 @@
 .\" nroff -man curl.1
 .\" Written by Daniel Stenberg
 .\"
-.TH curl 1 "8 November 1999" "Curl 6.3" "Curl Manual"
+.TH curl 1 "10 Janurary 2000" "Curl 6.4" "Curl Manual"
 .SH NAME
 curl \- get a URL with FTP, TELNET, LDAP, GOPHER, DICT, FILE, HTTP or
 HTTPS syntax.
@@ -227,7 +227,11 @@ file will not be read and used as a config file.
 .IP "-Q/--quote <comand>"
 (FTP) Send an arbitrary command to the remote FTP server, by using the QUOTE
 command of the server. Not all servers support this command, and the set of
-QUOTE commands are server specific!
+QUOTE commands are server specific! Quote commands are sent BEFORE the
+transfer is taking place. To make commands take place after a successful
+transfer, prefix them with a dash '-'. You may specify any amount of commands
+to be run before and after the transfer. If the server returns failure for one
+of the commands, the entire operation will be aborted.
 .IP "-r/--range <range>"
 (HTTP/FTP)
 Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP
@@ -350,10 +354,99 @@ asterisk '*' only, it matches all hosts.
 .IP "COLUMNS <integer>"
 The width of the terminal.  This variable only affects curl when the
 --progress-bar option is used.
-.SH DIAGNOSTICS
-There exists a bunch of different error messages that may appear during
-bad conditions. They're all pretty verbose and descriptive and therefore
-you won't find any closer description of them here.
+.SH EXIT CODES
+There exists a bunch of different error codes and their corresponding error
+messages that may appear during bad conditions. At the time of this writing,
+the exit codes are:
+.IP 1
+Unsupported protocol. This build of curl has no support for this protocol.
+.IP 2
+Failed to initialize.
+.IP 3
+URL malformat. The syntax was not correct.
+.IP 4
+URL user malformatted. The user-part of the URL syntax was not correct.
+.IP 5
+Couldn't resolve proxy. The given proxy host could not be resolved.
+.IP 6
+Couldn't resolve host. The given remote host was not resolved.
+.IP 7
+Failed to connect to host.
+.IP 8
+FTP weird server reply. The server sent data curl couldn't parse.
+.IP 9
+FTP access denied. The server denied login.
+.IP 10
+FTP user/password incorrect. Either one or both were not accepted by the
+server.
+.IP 11
+FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
+.IP 12
+FTP weird USER reply. Curl couldn't parse the reply sent to the USER request.
+.IP 13
+FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
+.IP 14
+FTP weird 227 formay. Curl couldn't parse the 227-line the server sent.
+.IP 15
+FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
+.IP 16
+FTP can't reconnect. Couldn't connect to the host we got in the 227-line.
+.IP 17
+FTP couldn't set binary. Couldn't change transfer method to binary.
+.IP 18
+Partial file. Only a part of the file was transfered.
+.IP 19
+FTP couldn't RETR file. The RETR command failed.
+.IP 20
+FTP write error. The transfer was reported bad by the server.
+.IP 21
+FTP quote error. A quote command returned error from the server.
+.IP 22
+HTTP not found. The requested page was not found. This return code only
+appears if --fail is used.
+.IP 23
+Write error. Curl couldn't write data to a local filesystem or similar.
+.IP 24
+Malformat user. User name badly specified.
+.IP 25
+FTP couldn't STOR file. The server denied the STOR operation.
+.IP 26
+Read error. Various reading problems.
+.IP 27
+Out of memory. A memory allocation request failed.
+.IP 28
+Operation timeout. The specified time-out period was reached according to the
+conditions.
+.IP 29
+FTP couldn't set ASCII. The server returned an unknown reply.
+.IP 30
+FTP PORT failed. The PORT command failed.
+.IP 31
+FTP couldn't use REST. The REST command failed.
+.IP 32
+FTP couldn't use SIZE. The SIZE command failed. The command is an extension
+to the original FTP spec RFC 959.
+.IP 33
+HTTP range error. The range "command" didn't work.
+.IP 34
+HTTP post error. Internal post-request generation error.
+.IP 35
+SSL connect error. The SSL handshaking failed.
+.IP 36
+FTP bad download resume. Couldn't continue an earlier aborted download.
+.IP 37
+FILE couldn't read file. Failed to open the file. Permissions?
+.IP 38
+LDAP cannot bind. LDAP bind operation failed.
+.IP 39
+LDAP search failed.
+.IP 40
+Library not found. The LDAP library was not found.
+.IP 41
+Function not found. A required LDAP function was not found.
+.IP XX
+There will appear more error codes here in future releases. The existing ones
+are meant to never change.
 .SH BUGS
 If you do find any (or have other suggestions), mail Daniel Stenberg
 <Daniel.Stenberg@haxx.nu>.
diff --git a/head b/head
deleted file mode 100644 (file)
index 827f817..0000000
--- a/head
+++ /dev/null
@@ -1,7 +0,0 @@
-HTTP/1.1 200 OK\r
-Server: Microsoft-IIS/4.0\r
-Date: Thu, 02 Dec 1999 23:15:03 GMT\r
-Content-Type: text/html\r
-Set-Cookie: ASPSESSIONIDGQQQGGPD=HEDEOJCAIDADIKKLCFIFEJAJ; path=/\r
-Cache-control: private\r
-\r
index 6b08a05b4769332492f5f476d76e7bb750d719b9..9dcde397edfefeb3798d8db30ebda62229e9ddb8 100644 (file)
@@ -52,8 +52,8 @@
  *
  * ------------------------------------------------------------
  * $Log$
- * Revision 1.1  1999-12-29 14:21:22  bagder
- * Initial revision
+ * Revision 1.2  2000-01-10 23:36:14  bagder
+ * syncing with local edit
  *
  * Revision 1.4  1999/09/06 06:59:40  dast
  * Changed email info
index d62891298be941eb921033fc5684c2be61e997e6..fb753f2136bb19db01028c9a68e9d1a4724ac04e 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -79,7 +79,7 @@
 #include "progress.h"
 #include "upload.h"
 #include "download.h"
-
+#include "escape.h"
 
 /* returns last node in linked list */
 static struct curl_slist *slist_get_last(struct curl_slist *list)
@@ -1014,6 +1014,28 @@ UrgError _ftp(struct UrlData *data,
     return URG_FTP_WRITE_ERROR;
   }
 
+  /* Send any post-transfer QUOTE strings? */
+  if(data->postquote) {
+    qitem = data->postquote;
+    /* Send all QUOTE strings in same order as on command-line */
+    while (qitem) {
+      /* Send string */
+      if (qitem->data) {
+        sendf(data->firstsocket, data, "%s\r\n", qitem->data);
+
+        nread = GetLastResponse(data->firstsocket, buf, data);
+
+        if (buf[0] != '2') {
+          failf(data, "QUOT string not accepted: %s",
+                qitem->data);
+          return URG_FTP_QUOTE_ERROR;
+        }
+      }
+      qitem = qitem->next;
+    }
+  }
+
+
   return URG_OK;
 }
 
index 404f1c97087b18d3472269e915ba012ff2f9e474..e39d3c19414153b454381a5f0b8c505e52860496 100644 (file)
@@ -49,8 +49,8 @@
  *
  * ------------------------------------------------------------
  * $Log$
- * Revision 1.1  1999-12-29 14:21:29  bagder
- * Initial revision
+ * Revision 1.2  2000-01-10 23:36:14  bagder
+ * syncing with local edit
  *
  * Revision 1.4  1999/09/06 06:59:40  dast
  * Changed email info
index 83b9495e1187e1d5753f4c113805bc1ca7a0be1a..78f9bc88291adcdf98d55eaad03b12b55e4b1b0a 100644 (file)
@@ -51,8 +51,8 @@
  *
  * ------------------------------------------------------------
  * $Log$
- * Revision 1.1  1999-12-29 14:21:30  bagder
- * Initial revision
+ * Revision 1.2  2000-01-10 23:36:14  bagder
+ * syncing with local edit
  *
  * Revision 1.3  1999/09/06 06:59:40  dast
  * Changed email info
index 2875cbc533b66b93a8354898f4eddd5554ba4099..ffbd4794b34855baa35eaa1c1a93103b3f926af4 100644 (file)
@@ -51,8 +51,8 @@
  *
  * ------------------------------------------------------------
  * $Log$
- * Revision 1.1  1999-12-29 14:21:35  bagder
- * Initial revision
+ * Revision 1.2  2000-01-10 23:36:15  bagder
+ * syncing with local edit
  *
  * Revision 1.3  1999/09/06 06:59:41  dast
  * Changed email info
index b520898dcca72bb9a092c23a7142cac426bb5b90..2abdb6343e92051dbfe803a54bb29efda2e4b21c 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -413,6 +413,9 @@ UrgError curl_urlget(UrgTag tag, ...)
       case URGTAG_USERPWD:
         data->userpwd = (char *)param_obj;
         break;
+      case URGTAG_POSTQUOTE:
+        data->postquote = (struct curl_slist *)param_obj;
+        break;
       case URGTAG_PROXYUSERPWD:
         data->proxyuserpwd = (char *)param_obj;
         break;
index f171cd096cdadef96c612cdacf6c750f5eb5b5a2..3cfee993a82cd8d01009c5210c9354c2f950e8e4 100644 (file)
@@ -176,7 +176,8 @@ struct UrlData {
   X509*    server_cert;
 #endif /* USE_SSLEAY */
   long crlf;
-  struct curl_slist *quote;
+  struct curl_slist *quote;     /* before the transfer */
+  struct curl_slist *postquote; /* after the transfer */
 
   TimeCond timecondition;
   time_t timevalue;
index a4b373e22b37ecd28016161880947cf98dd7ec12..61904fe5929623792fee6a8dd962efa6a1f5ed6c 100644 (file)
@@ -85,7 +85,7 @@ curl_LDADD = ../lib/libcurl.a
 curl_DEPENDENCIES = ../lib/libcurl.a
 BUILT_SOURCES = hugehelp.c
 CLEANFILES = hugehelp.c
-NROFF = /bin/nroff
+NROFF = gnroff
 
 EXTRA_DIST = mkhelp.pl Makefile.vc6
 
index cba40a4c0c9a3d5d2992840616c9f4f7d8af9340..a6df7db5194091e831c2109df474466f13d80d3a 100755 (executable)
Binary files a/src/curl and b/src/curl differ
index 390221935321b9312ce17d5b8626d6153fc118e2..5332776a23312c3c397134b0bd34b24fffdecd3b 100644 (file)
@@ -18,10 +18,10 @@ puts (
 "DESCRIPTION\n"
 "     curl is a client to get documents/files from servers,  using\n"
 "     any  of  the supported protocols. The command is designed to\n"
-"     work without user interaction or any kind of interactivity.\n"
+"     work without user interaction or any kind of  interactivity.\n"
 "\n"
-"     curl offers a busload of useful tricks like  proxy  support,\n"
-"     user  authentication,  ftp  upload,  HTTP post, SSL (https:)\n"
+"     curl  offers  a busload of useful tricks like proxy support,\n"
+"     user authentication, ftp upload,  HTTP  post,  SSL  (https:)\n"
 "     connections, cookies, file transfer resume and more.\n"
 "\n"
 "URL\n"
@@ -33,7 +33,7 @@ puts (
 "\n"
 "      http://site.{one,two,three}.com\n"
 "\n"
-"     or you can get sequences of alphanumeric series by using  []\n"
+"     or  you can get sequences of alphanumeric series by using []\n"
 "     as in:\n"
 "\n"
 "      ftp://ftp.numericals.com/file[1-100].txt\n"
@@ -41,11 +41,11 @@ puts (
 "     zeros)\n"
 "      ftp://ftp.letters.com/file[a-z].txt\n"
 "\n"
-"     It is possible to specify up to 9 sets or series for a  URL,\n"
+"     It  is possible to specify up to 9 sets or series for a URL,\n"
 "     but no nesting is supported at the moment:\n"
 "\n"
-"      http://www.any.org/archive[1996-1999]/volume[1-\n"
-"     4]part{a,b,c,index}.html\n"
+"      http://www.any.org/archive[1996-1999]/vol­\n"
+"     ume[1-4]part{a,b,c,index}.html\n"
 "\n"
 "OPTIONS\n"
 "     -a/--append\n"
@@ -54,15 +54,15 @@ puts (
 "          the file doesn't exist, it will be created.\n"
 "\n"
 "     -A/--user-agent <agent string>\n"
-"          (HTTP) Specify the User-Agent string  to  send  to  the\n"
-"          HTTP  server.  Some badly done CGIs fail if its not set\n"
-"          to \"Mozilla/4.0\".  To encode blanks in the string, sur-\n"
-"          round  the  string  with  single quote marks.  This can\n"
+"          (HTTP)  Specify  the  User-Agent  string to send to the\n"
+"          HTTP server. Some badly done CGIs fail if its  not  set\n"
+"          to \"Mozilla/4.0\".  To encode blanks in the string, sur­\n"
+"          round the string with single  quote  marks.   This  can\n"
 "          also be set with the -H/--header flag of course.\n"
 "     -b/--cookie <name=data>\n"
 "          (HTTP) Pass the data to the HTTP server as a cookie. It\n"
-"          is  supposedly  the  data  previously received from the\n"
-"          server in a \"Set-Cookie:\" line.  The data should be  in\n"
+"          is supposedly the data  previously  received  from  the\n"
+"          server  in a \"Set-Cookie:\" line.  The data should be in\n"
 "          the format \"NAME1=VALUE1; NAME2=VALUE2\".\n"
 "\n"
 "          If no '=' letter is used in the line, it is treated  as\n"
@@ -102,20 +102,20 @@ puts (
 "          servers.\n"
 "\n"
 "     -d/--data <data>\n"
-"          (HTTP) Sends the specified data in a  POST  request  to\n"
-"          the  HTTP server. Note that the data is sent exactly as\n"
+"          (HTTP)  Sends  the  specified data in a POST request to\n"
+"          the HTTP server. Note that the data is sent exactly  as\n"
 "          specified  with  no  extra  processing.   The  data  is\n"
-"          expected  to  be \"url-encoded\". This will cause curl to\n"
-"          pass the data to  the  server  using  the  content-type\n"
+"          expected to be \"url-encoded\". This will cause  curl  to\n"
+"          pass  the  data  to  the  server using the content-type\n"
 "          application/x-www-form-urlencoded. Compare to -F.\n"
 "\n"
 "          If you start the data  with  the  letter  @,  the  rest\n"
 "          should  be  a  file name to read the data from, or - if\n"
-"          you want curl to read the data from  stdin.   The  con-\n"
+"          you want curl to read the data from  stdin.   The  con­\n"
 "          tents of the file must already be url-encoded.\n"
 "\n"
 "     -D/--dump-header <file>\n"
-"          (HTTP/FTP) Write the HTTP headers to this  file.  Write\n"
+"          (HTTP/FTP)  Write  the HTTP headers to this file. Write\n"
 "          the FTP file info to this file if -I/--head is used.\n"
 "\n"
 "     -e/--referer <URL>\n"
@@ -128,17 +128,17 @@ puts (
 "          file  when  getting  a file with HTTPS. The certificate\n"
 "          must be in PEM format.  If the optional password  isn't\n"
 "          specified, it will be queried for on the terminal. Note\n"
-"          that this  certificate  is  the  private  key  and  the\n"
-"          private certificate concatenated!\n"
+"          that this certificate is the private key and  the  pri­\n"
+"          vate certificate concatenated!\n"
 "\n"
 "     -f/--fail\n"
-"          (HTTP) Fail silently  (no  output  at  all)  on  server\n"
-"          errors.  This is mostly done like this to better enable\n"
-"          scripts etc to better deal  with  failed  attempts.  In\n"
-"          normal  cases  when  a  HTTP  server fails to deliver a\n"
-"          document, it returns a HTML document stating so  (which\n"
-"          often  also  describes  why  and  more). This flag will\n"
-"          prevent curl from outputting  that  and  fail  silently\n"
+"          (HTTP)  Fail  silently  (no  output  at  all) on server\n"
+"          errors. This is mostly done like this to better  enable\n"
+"          scripts  etc  to  better  deal with failed attempts. In\n"
+"          normal cases when a HTTP server fails to deliver a doc­\n"
+"          ument,  it  returns  a  HTML document stating so (which\n"
+"          often also describes why and more). This flag will pre­\n"
+"          vent  curl  from  outputting  that  and  fail  silently\n"
 "          instead.\n"
 "\n"
 "     -F/--form <name=content>\n"
@@ -148,7 +148,7 @@ puts (
 "          according  to RFC1867. This enables uploading of binary\n"
 "          files etc. To force the 'content' part to be read  from\n"
 "          a  file,  prefix the file name with an @ sign. Example,\n"
-"          to send your password file to the server, where  'pass-\n"
+"          to send your password file to the server, where  'pass­\n"
 "          word'   is   the   name  of  the  form-field  to  which\n"
 "          /etc/passwd will be the input:\n"
 "\n"
@@ -162,24 +162,24 @@ puts (
 "\n"
 "     -H/--header <header>\n"
 "          (HTTP) Extra header to use when getting a web page. You\n"
-"          may  specify  any number of extra headers. Note that if\n"
-"          you should add a custom header that has the  same  name\n"
-"          as one of the internal ones curl would use, your exter-\n"
-"          nally set header will be used instead of  the  internal\n"
-"          one.  This  allows you to make even trickier stuff than\n"
-"          curl would normally do. You should not  replace  inter-\n"
-"          nally  set  headers without knowing perfectly well what\n"
+"          may specify any number of extra headers. Note  that  if\n"
+"          you  should  add a custom header that has the same name\n"
+"          as one of the internal ones curl would use, your exter­\n"
+"          nally  set  header will be used instead of the internal\n"
+"          one. This allows you to make even trickier  stuff  than\n"
+"          curl  would  normally do. You should not replace inter­\n"
+"          nally set headers without knowing perfectly  well  what\n"
 "          you're doing.\n"
 "\n"
 "     -i/--include\n"
-"          (HTTP) Include  the  HTTP-header  in  the  output.  The\n"
-"          HTTP-header  includes  things like server-name, date of\n"
-"          the document, HTTP-version and more...\n"
+"          (HTTP) Include the HTTP-header in the output. The HTTP-\n"
+"          header includes things like server-name,  date  of  the\n"
+"          document, HTTP-version and more...\n"
 "\n"
 "     -I/--head\n"
-"          (HTTP/FTP) Fetch  the  HTTP-header  only!  HTTP-servers\n"
+"          (HTTP/FTP)  Fetch  the  HTTP-header  only! HTTP-servers\n"
 "          feature the command HEAD which this uses to get nothing\n"
-"          but the header of a document. When used on a FTP  file,\n"
+"          but  the header of a document. When used on a FTP file,\n"
 "          curl displays the file size only.\n"
 "\n"
 "     -K/--config <config file>\n"
@@ -190,7 +190,7 @@ puts (
 "          first column of a config line is a '#'  character,  the\n"
 "          rest of the line will be treated as a comment.\n"
 "\n"
-"          Specify the filename as '-' to make curl read the  file\n"
+"          Specify  the filename as '-' to make curl read the file\n"
 "          from stdin.\n"
 "\n"
 "     -l/--list-only\n"
@@ -209,22 +209,22 @@ puts (
 "          shown.\n"
 "\n"
 "     -m/--max-time <seconds>\n"
-"          Maximum time in seconds that you allow the whole opera-\n"
+"          Maximum time in seconds that you allow the whole opera­\n"
 "          tion to take.  This is useful for preventing your batch\n"
-"          jobs from hanging for hours due  to  slow  networks  or\n"
-"          links  going down.  This doesn't work properly in win32\n"
+"          jobs  from  hanging  for  hours due to slow networks or\n"
+"          links going down.  This doesn't work properly in  win32\n"
 "          systems.\n"
 "     -M/--manual\n"
 "          Manual. Display the huge help text.\n"
 "\n"
 "     -n/--netrc\n"
-"          Makes curl scan the .netrc  file  in  the  user's  home\n"
-"          directory  for  login  name and password. This is typi-\n"
-"          cally used for ftp on unix. If  used  with  http,  curl\n"
+"          Makes  curl  scan  the  .netrc  file in the user's home\n"
+"          directory for login name and password.  This  is  typi­\n"
+"          cally  used  for  ftp  on unix. If used with http, curl\n"
 "          will  enable  user  authentication.  See  netrc(4)  for\n"
-"          details on the file format. Curl will not  complain  if\n"
-"          that  file  hasn't the right permissions (it should not\n"
-"          be world nor group readable). The environment  variable\n"
+"          details  on  the file format. Curl will not complain if\n"
+"          that file hasn't the right permissions (it  should  not\n"
+"          be  world nor group readable). The environment variable\n"
 "          \"HOME\" is used to find the home directory.\n"
 "\n"
 "          A quick and very simple  example  of  how  to  setup  a\n"
@@ -252,7 +252,7 @@ puts (
 "          the path is cut off.)\n"
 "\n"
 "     -P/--ftpport <address>\n"
-"          (FTP) Reverses the initiator/listenor roles  when  con-\n"
+"          (FTP) Reverses the initiator/listenor roles  when  con­\n"
 "          necting  with  ftp. This switch makes Curl use the PORT\n"
 "          command instead of PASV. In practice,  PORT  tells  the\n"
 "          server to connect to the client's specified address and\n"
@@ -266,18 +266,24 @@ puts (
 "           \"-\"       - (any single-letter string) to make it pick\n"
 "          the machine's default\n"
 "     -q   If used as the first parameter on the command line, the\n"
-"          $HOME/.curlrc  file will not be read and used as a con-\n"
+"          $HOME/.curlrc  file will not be read and used as a con­\n"
 "          fig file.\n"
 "\n"
 "     -Q/--quote <comand>\n"
 "          (FTP) Send an  arbitrary  command  to  the  remote  FTP\n"
 "          server,  by  using the QUOTE command of the server. Not\n"
 "          all servers support this command, and the set of  QUOTE\n"
-"          commands are server specific!\n"
+"          commands  are  server specific! Quote commands are sent\n"
+"          BEFORE the transfer is taking place. To  make  commands\n"
+"          take  place  after  a  successful transfer, prefix them\n"
+"          with a dash '-'. You may specify any amount of commands\n"
+"          to  be run before and after the transfer. If the server\n"
+"          returns failure for one of  the  commands,  the  entire\n"
+"          operation will be aborted.\n"
 "\n"
 "     -r/--range <range>\n"
-"          (HTTP/FTP) Retrieve a byte range (i.e a  partial  docu-\n"
-"          ment)  from  a  HTTP/1.1  or  FTP server. Ranges can be\n"
+"          (HTTP/FTP)  Retrieve  a byte range (i.e a partial docu­\n"
+"          ment) from a HTTP/1.1 or  FTP  server.  Ranges  can  be\n"
 "          specified in a number of ways.\n"
 "           0-499           - specifies the first 500 bytes\n"
 "           500-999         - specifies the second 500 bytes\n"
@@ -286,24 +292,24 @@ puts (
 "          and forward\n"
 "           0-0,-1          - specifies the first  and  last  byte\n"
 "          only(*)(H)\n"
-"           500-700,600-799 -  specifies  300  bytes  from  offset\n"
+"           500-700,600-799  -  specifies  300  bytes  from offset\n"
 "          500(H)\n"
 "           100-199,500-599 - specifies  two  separate  100  bytes\n"
 "          ranges(*)(H)\n"
 "\n"
-"          (*) = NOTE that this will cause  the  server  to  reply\n"
+"          (*)  =  NOTE  that  this will cause the server to reply\n"
 "          with a multipart response!\n"
 "\n"
 "          You should also be aware that many HTTP/1.1 servers  do\n"
 "          not have this feature enabled, so that when you attempt\n"
-"          to get a range, you'll instead get the whole document.\n"
+"          to get a range, you'll instead get the whole  document.\n"
 "\n"
-"          FTP range downloads  only  support  the  simple  syntax\n"
-"          'start-stop'  (optionally with one of the numbers omit-\n"
+"          FTP  range  downloads  only  support  the simple syntax\n"
+"          'start-stop' (optionally with one of the numbers  omit­\n"
 "          ted). It depends on the non-RFC command SIZE.\n"
 "\n"
 "     -s/--silent\n"
-"          Silent mode. Don't show progress meter  or  error  mes-\n"
+"          Silent  mode.  Don't  show progress meter or error mes­\n"
 "          sages.  Makes Curl mute.\n"
 "\n"
 "     -S/--show-error\n"
@@ -311,9 +317,9 @@ puts (
 "          it fails.\n"
 "\n"
 "     -t/--upload\n"
-"          Transfer the stdin data to  the  specified  file.  Curl\n"
-"          will  read  everything  from  stdin until EOF and store\n"
-"          with the supplied name. If this is used  on  a  http(s)\n"
+"          Transfer  the  stdin  data  to the specified file. Curl\n"
+"          will read everything from stdin  until  EOF  and  store\n"
+"          with  the  supplied  name. If this is used on a http(s)\n"
 "          server, the PUT command will be used.\n"
 "\n"
 "     -T/--upload-file <file>\n"
@@ -334,28 +340,28 @@ puts (
 "          interactively.\n"
 "\n"
 "     -U/--proxy-user <user:password>\n"
-"          Specify user and password to use for Proxy  authentica-\n"
+"          Specify  user and password to use for Proxy authentica­\n"
 "          tion. If no password is specified, curl will ask for it\n"
 "          interactively.\n"
 "\n"
 "     -v/--verbose\n"
-"          Makes  the  fetching  more  verbose/talkative.   Mostly\n"
-"          usable  for  debugging.  Lines  starting with '>' means\n"
+"          Makes   the  fetching  more  verbose/talkative.  Mostly\n"
+"          usable for debugging. Lines  starting  with  '>'  means\n"
 "          data sent by curl, '<' means data received by curl that\n"
-"          is  hidden  in normal cases and lines starting with '*'\n"
+"          is hidden in normal cases and lines starting  with  '*'\n"
 "          means additional info provided by curl.\n"
 "\n"
 "     -V/--version\n"
-"          Displays the full version of curl,  libcurl  and  other\n"
+"          Displays  the  full  version of curl, libcurl and other\n"
 "          3rd party libraries linked with the executable.\n"
 "\n"
 "     -x/--proxy <proxyhost[:port]>\n"
-"          Use specified proxy. If the port number is  not  speci-\n"
+"          Use specified proxy. If the port number is  not  speci­\n"
 "          fied, it is assumed at port 1080.\n"
 "\n"
 "     -X/--request <command>\n"
-"          (HTTP) Specifies a custom request to use when  communi-\n"
-"          cating  with  the  HTTP  server.  The specified request\n"
+"          (HTTP)  Specifies a custom request to use when communi­\n"
+"          cating with the HTTP  server.   The  specified  request\n"
 "          will be used instead of the standard GET. Read the HTTP\n"
 "          1.1 specification for details and explanations.\n"
 "\n"
@@ -363,37 +369,37 @@ puts (
 "          LIST when doing file lists with ftp.\n"
 "\n"
 "     -y/--speed-time <speed>\n"
-"          Speed Limit. If a download is slower  than  this  given\n"
-"          speed,  in  bytes per second, for Speed Time seconds it\n"
-"          gets aborted. Speed Time is set with -Y and  is  30  if\n"
+"          Speed  Limit.  If  a download is slower than this given\n"
+"          speed, in bytes per second, for Speed Time  seconds  it\n"
+"          gets  aborted.  Speed  Time is set with -Y and is 30 if\n"
 "          not set.\n"
 "\n"
 "     -Y/--speed-limit <time>\n"
 "          Speed Time. If a download is slower  than  Speed  Limit\n"
-"          bytes  per second during a Speed Time period, the down-\n"
+"          bytes  per second during a Speed Time period, the down­\n"
 "          load gets aborted. If Speed Time is used,  the  default\n"
 "          Speed Limit will be 1 unless set with -y.\n"
 "\n"
 "     -z/--time-cond <date expression>\n"
-"          (HTTP) Request to get a file  that  has  been  modified\n"
-"          later  than  the  given  time and date, or one that has\n"
+"          (HTTP)  Request  to  get  a file that has been modified\n"
+"          later than the given time and date,  or  one  that  has\n"
 "          been modified before that time. The date expression can\n"
 "          be all sorts of date strings or if it doesn't match any\n"
-"          internal ones, it tries to get the time  from  a  given\n"
-"          file  name  instead!  See  the GNU date(1) man page for\n"
+"          internal  ones,  it  tries to get the time from a given\n"
+"          file name instead! See the GNU  date(1)  man  page  for\n"
 "          date expression details.\n"
 "\n"
-"          Start the date expression with a dash (-)  to  make  it\n"
-"          request  for  a  document  that is older than the given\n"
+"          Start  the  date  expression with a dash (-) to make it\n"
+"          request for a document that is  older  than  the  given\n"
 "          date/time, default is a document that is newer than the\n"
 "          specified date/time.\n"
 "\n"
 "     -3/--sslv3\n"
-"          (HTTPS) Forces curl to use SSL version 3 when negotiat-\n"
+"          (HTTPS) Forces curl to use SSL version 3 when negotiat­\n"
 "          ing with a remote SSL server.\n"
 "\n"
 "     -2/--sslv2\n"
-"          (HTTPS) Forces curl to use SSL version 2 when negotiat-\n"
+"          (HTTPS) Forces curl to use SSL version 2 when negotiat­\n"
 "          ing with a remote SSL server.\n"
 "\n"
 "     -#/--progress-bar\n"
@@ -401,7 +407,7 @@ puts (
 "          bar instead of the default statistics.\n"
 "\n"
 "     --crlf\n"
-"          (FTP) Convert LF to CRLF  in  upload.  Useful  for  MVS\n"
+"          (FTP)  Convert  LF  to  CRLF  in upload. Useful for MVS\n"
 "          (OS/390).\n"
 "\n"
 "     --stderr <file>\n"
@@ -413,13 +419,13 @@ puts (
 "FILES\n"
 "     ~/.curlrc\n"
 "          Default config file.\n"
-"\n"
 "ENVIRONMENT\n"
 "     HTTP_PROXY [protocol://]<host>[:port]\n"
 "          Sets proxy server to use for HTTP.\n"
 "\n"
 "     HTTPS_PROXY [protocol://]<host>[:port]\n"
 "          Sets proxy server to use for HTTPS.\n"
+"\n"
 "     FTP_PROXY [protocol://]<host>[:port]\n"
 "          Sets proxy server to use for FTP.\n"
 "\n"
@@ -427,12 +433,179 @@ puts (
 "          Sets proxy server to use for GOPHER.\n"
 "\n"
 "     ALL_PROXY [protocol://]<host>[:port]\n"
-"          Sets proxy server to use if no protocol-specific  proxy\n"
+"          Sets  proxy server to use if no protocol-specific proxy\n"
 "          is set.\n"
 "\n"
 "     NO_PROXY <comma-separated list of hosts>\n"
 "          list of host names that shouldn't go through any proxy.\n"
-"          If se\n"
+"          If set to a asterisk '*' only, it matches all hosts.\n"
+"\n"
+"     COLUMNS <integer>\n"
+"          The  width of the terminal.  This variable only affects\n"
+"          curl when the --progress-bar option is used.\n"
+"\n"
+"EXIT CODES\n"
+"     There exists a bunch of different error codes and their cor­\n"
+"     responding  error messages that may appear during bad condi­\n"
+"     tions. At the time of this writing, the exit codes are:\n"
+"\n"
+"     1    Unsupported protocol. This build of curl has no support\n"
+"          for this protocol.\n"
+"\n"
+"     2    Failed to initialize.\n"
+"\n"
+"     3    URL malformat. The syntax was not correct.\n"
+"\n"
+"     4    URL  user malformatted. The user-part of the URL syntax\n"
+"          was not correct.\n"
+"\n"
+"     5    Couldn't resolve proxy. The given proxy host could  not\n"
+"          be resolved.\n"
+"\n"
+"     6    Couldn't  resolve  host.  The given remote host was not\n"
+"          resolved.\n"
+"\n"
+"     7    Failed to connect to host.\n"
+"\n"
+"     8    FTP weird server  reply.  The  server  sent  data  curl\n"
+"          couldn't parse.\n"
+"\n"
+"     9    FTP access denied. The server denied login.\n"
+"     10   FTP  user/password  incorrect.  Either one or both were\n"
+"          not accepted by the server.\n"
+"\n"
+"     11   FTP weird PASS reply. Curl  couldn't  parse  the  reply\n"
+"          sent to the PASS request.\n"
+"\n"
+"     12   FTP  weird  USER  reply.  Curl couldn't parse the reply\n"
+"          sent to the USER request.\n"
+"\n"
+"     13   FTP weird PASV reply, Curl  couldn't  parse  the  reply\n"
+"          sent to the PASV request.\n"
+"\n"
+"     14   FTP  weird 227 formay. Curl couldn't parse the 227-line\n"
+"          the server sent.\n"
+"\n"
+"     15   FTP can't get host. Couldn't resolve the host IP we got\n"
+"          in the 227-line.\n"
+"\n"
+"     16   FTP  can't  reconnect.  Couldn't connect to the host we\n"
+"          got in the 227-line.\n"
+"\n"
+"     17   FTP  couldn't  set  binary.  Couldn't  change  transfer\n"
+"          method to binary.\n"
+"\n"
+"     18   Partial file. Only a part of the file was transfered.\n"
+"\n"
+"     19   FTP couldn't RETR file. The RETR command failed.\n"
+"\n"
+"     20   FTP  write  error. The transfer was reported bad by the\n"
+"          server.\n"
+"\n"
+"     21   FTP quote error. A quote command  returned  error  from\n"
+"          the server.\n"
+"\n"
+"     22   HTTP  not found. The requested page was not found. This\n"
+"          return code only appears if --fail is used.\n"
+"\n"
+"     23   Write error.  Curl  couldn't  write  data  to  a  local\n"
+"          filesystem or similar.\n"
+"\n"
+"     24   Malformat user. User name badly specified.\n"
+"\n"
+"     25   FTP  couldn't  STOR  file.  The  server denied the STOR\n"
+"          operation.\n"
+"\n"
+"     26   Read error. Various reading problems.\n"
+"\n"
+"     27   Out of memory. A memory allocation request failed.\n"
+"\n"
+"     28   Operation timeout. The specified  time-out  period  was\n"
+"          reached according to the conditions.\n"
+"     29   FTP  couldn't set ASCII. The server returned an unknown\n"
+"          reply.\n"
+"\n"
+"     30   FTP PORT failed. The PORT command failed.\n"
+"\n"
+"     31   FTP couldn't use REST. The REST command failed.\n"
+"\n"
+"     32   FTP couldn't use SIZE. The  SIZE  command  failed.  The\n"
+"          command  is  an  extension to the original FTP spec RFC\n"
+"          959.\n"
+"\n"
+"     33   HTTP range error. The range \"command\" didn't work.\n"
+"\n"
+"     34   HTTP  post  error.  Internal  post-request   generation\n"
+"          error.\n"
+"\n"
+"     35   SSL connect error. The SSL handshaking failed.\n"
+"\n"
+"     36   FTP  bad  download resume. Couldn't continue an earlier\n"
+"          aborted download.\n"
+"\n"
+"     37   FILE couldn't read file. Failed to open the file.  Per­\n"
+"          missions?\n"
+"\n"
+"     38   LDAP cannot bind. LDAP bind operation failed.\n"
+"\n"
+"     39   LDAP search failed.\n"
+"\n"
+"     40   Library not found. The LDAP library was not found.\n"
+"\n"
+"     41   Function  not  found.  A required LDAP function was not\n"
+"          found.\n"
+"\n"
+"     XX   There will appear  more  error  codes  here  in  future\n"
+"          releases.  The existing ones are meant to never change.\n"
+"\n"
+"BUGS\n"
+"     If you do find any (or have other suggestions), mail  Daniel\n"
+"     Stenberg <Daniel.Stenberg@haxx.nu>.\n"
+"\n"
+"AUTHORS / CONTRIBUTORS\n"
+"      - Daniel Stenberg <Daniel.Stenberg@haxx.nu>\n"
+"      - Rafael Sagula <sagula@inf.ufrgs.br>\n"
+"      - Sampo Kellomaki <sampo@iki.fi>\n"
+"      - Linas Vepstas <linas@linas.org>\n"
+"      - Bjorn Reese <breese@mail1.stofanet.dk>\n"
+"      - Johan Anderson <johan@homemail.com>\n"
+"      - Kjell Ericson <Kjell.Ericson@sth.frontec.se>\n"
+"      - Troy Engel <tengel@sonic.net>\n"
+"      - Ryan Nelson <ryan@inch.com>\n"
+"      - Bjorn Stenberg <Bjorn.Stenberg@sth.frontec.se>\n"
+"      - Angus Mackay <amackay@gus.ml.org>\n"
+"      - Eric Young <eay@cryptsoft.com>\n"
+"      - Simon Dick <simond@totally.irrelevant.org>\n"
+"      - Oren Tirosh <oren@monty.hishome.net>\n"
+"      - Steven G. Johnson <stevenj@alum.mit.edu>\n"
+"      - Gilbert Ramirez Jr. <gram@verdict.uthscsa.edu>\n"
+"      - Andrés García <ornalux@redestb.es>\n"
+"      - Douglas E. Wegscheid <wegscd@whirlpool.com>\n"
+"      - Mark Butler <butlerm@xmission.com>\n"
+"      - Eric Thelin <eric@generation-i.com>\n"
+"      - Marc Boucher <marc@mbsi.ca>\n"
+"      - Greg Onufer <Greg.Onufer@Eng.Sun.COM>\n"
+"      - Doug Kaufman <dkaufman@rahul.net>\n"
+"      - David Eriksson <david@2good.com>\n"
+"      - Ralph Beckmann <rabe@uni-paderborn.de>\n"
+"      - T. Yamada <tai@imasy.or.jp>\n"
+"      - Lars J. Aas <larsa@sim.no>\n"
+"      - Jörn Hartroth <Joern.Hartroth@telekom.de>\n"
+"      - Matthew Clarke <clamat@van.maves.ca>\n"
+"      - Linus Nielsen <Linus.Nielsen@haxx.nu>\n"
+"      - Felix von Leitner <felix@convergence.de>\n"
+"      - Dan Zitter <dzitter@zitter.net>\n"
+"      - Jongki Suwandi <Jongki.Suwandi@eng.sun.com>\n"
+"      - Chris Maltby <chris@aurema.com>\n"
+"\n"
+"WWW\n"
+"     http://curl.haxx.nu\n"
+"\n"
+"FTP\n"
+"     ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
+"\n"
+"SEE ALSO\n"
+"     ftp(1), wget(1), snarf(1)\n"
 "\n"
 "LATEST VERSION\n"
 "\n"
index 5666c777ef80a42400fdc0a31394ac8f943c0fd8..a5f38138a5d6cbb6bad854250837d1fb56ed3aa3 100644 (file)
@@ -180,6 +180,7 @@ struct Configurable {
   FILE *errors; /* if stderr redirect is requested */
 
   struct curl_slist *quote;
+  struct curl_slist *postquote;
 
   long ssl_version;
   TimeCond timecond;
@@ -595,7 +596,14 @@ static int getparameter(char *flag, /* f or -long-flag */
       break;
     case 'Q':
       /* QUOTE command to send to FTP server */
-      config->quote = curl_slist_append(config->quote, nextarg);
+      if(nextarg[0] == '-') {
+        /* prefixed with a dash makes it a POST TRANSFER one */
+        nextarg++;
+        config->postquote = curl_slist_append(config->postquote, nextarg);
+      }
+      else {
+        config->quote = curl_slist_append(config->quote, nextarg);
+      }
       break;
     case 'r':
       /* byte range requested */
@@ -850,8 +858,10 @@ int main(int argc, char *argv[])
                              "%s", curl_version());
   config.showerror=TRUE;
   config.conf=CONF_DEFAULT;
+#if 0
   config.crlf=FALSE;
   config.quote=NULL;
+#endif
 
   if(argc>1 &&
      (!strnequal("--", argv[1], 2) && (argv[1][0] == '-')) &&
@@ -1108,6 +1118,7 @@ int main(int argc, char *argv[])
                     URGTAG_SSLCERTPASSWD, config.cert_passwd,
                     URGTAG_CRLF, config.crlf,
                     URGTAG_QUOTE, config.quote,
+                    URGTAG_POSTQUOTE, config.postquote,
                     URGTAG_WRITEHEADER, headerfilep,
                     URGTAG_COOKIEFILE, config.cookiefile,
                     URGTAG_SSLVERSION, config.ssl_version,