Skip to content

Commit

Permalink
curl: remove tool_writeenv.[ch]
Browse files Browse the repository at this point in the history
... and USE_ENVIRONMENT and --environment. It was once added for RISC OS
support and its platform specific behavior has been annoying ever
since. Added in commit c3c8bbd, mostly unchanged since
then. Most probably not actually used for years.

Closes curl#1463
  • Loading branch information
bagder committed May 6, 2017
1 parent ba5fa1c commit a8e388d
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 178 deletions.
2 changes: 1 addition & 1 deletion docs/cmdline-opts/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DPAGES = abstract-unix-socket.d anyauth.d append.d basic.d cacert.d capath.d cer
data-raw.d data-urlencode.d delegation.d digest.d disable.d \
disable-eprt.d disable-epsv.d dns-interface.d dns-ipv4-addr.d \
dns-ipv6-addr.d dns-servers.d dump-header.d egd-file.d engine.d \
environment.d expect100-timeout.d fail.d fail-early.d false-start.d \
expect100-timeout.d fail.d fail-early.d false-start.d \
form.d form-string.d ftp-account.d ftp-alternative-to-user.d \
ftp-create-dirs.d ftp-method.d ftp-pasv.d ftp-port.d ftp-pret.d \
ftp-skip-pasv-ip.d ftp-ssl-ccc.d ftp-ssl-ccc-mode.d ftp-ssl-control.d \
Expand Down
7 changes: 0 additions & 7 deletions docs/cmdline-opts/environment.d

This file was deleted.

2 changes: 0 additions & 2 deletions src/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ CURL_CFILES = \
tool_urlglob.c \
tool_util.c \
tool_vms.c \
tool_writeenv.c \
tool_writeout.c \
tool_xattr.c

Expand Down Expand Up @@ -103,7 +102,6 @@ CURL_HFILES = \
tool_util.h \
tool_version.h \
tool_vms.h \
tool_writeenv.h \
tool_writeout.h \
tool_xattr.h

Expand Down
2 changes: 0 additions & 2 deletions src/makefile.dj
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ endif

EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a

CFLAGS += -DUSE_ENVIRONMENT

PROGRAM = curl.exe
OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))

Expand Down
3 changes: 1 addition & 2 deletions src/tool_cfgable.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
* Copyright (C) 1998 - 2017, Daniel Stenberg, <[email protected]>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -151,7 +151,6 @@ struct OperationConfig {
bool proxybasic;
bool proxyanyauth;
char *writeout; /* %-styled format string to output */
bool writeenv; /* write results to environment, if available */
struct curl_slist *quote;
struct curl_slist *postquote;
struct curl_slist *prequote;
Expand Down
8 changes: 0 additions & 8 deletions src/tool_getparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ static const struct LongShort aliases[]= {
{"*E", "epsv", ARG_BOOL},
/* 'epsv' made like this to make --no-epsv and --epsv to work
although --disable-epsv is the documented option */
#ifdef USE_ENVIRONMENT
{"*f", "environment", ARG_BOOL},
#endif
{"*F", "dns-servers", ARG_STRING},
{"*g", "trace", ARG_STRING},
{"*G", "npn", ARG_BOOL},
Expand Down Expand Up @@ -562,11 +559,6 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
case 'E': /* --epsv */
config->disable_epsv = (!toggle)?TRUE:FALSE;
break;
#ifdef USE_ENVIRONMENT
case 'f':
config->writeenv = toggle;
break;
#endif
case 'F': /* --dns-servers */
/* IP addrs of DNS servers */
GetStr(&config->dns_servers, nextarg);
Expand Down
5 changes: 1 addition & 4 deletions src/tool_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
* Copyright (C) 1998 - 2017, Daniel Stenberg, <[email protected]>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -81,9 +81,6 @@ static const char *const helptext[] = {
" -D, --dump-header FILE Write the received headers to FILE",
" --egd-file FILE EGD socket path for random data (SSL)",
" --engine ENGINE Crypto engine (use \"--engine list\" for list) (SSL)",
#ifdef USE_ENVIRONMENT
" --environment Write results to environment variables (RISC OS)",
#endif
" --expect100-timeout SECONDS How long to wait for 100-continue (H)",
" -f, --fail Fail silently (no output at all) on HTTP errors (H)",
" --fail-early Fail on first transfer error, do not continue",
Expand Down
4 changes: 0 additions & 4 deletions src/tool_operate.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
#include "tool_sleep.h"
#include "tool_urlglob.h"
#include "tool_util.h"
#include "tool_writeenv.h"
#include "tool_writeout.h"
#include "tool_xattr.h"
#include "tool_vms.h"
Expand Down Expand Up @@ -1748,9 +1747,6 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(config->writeout)
ourWriteOut(curl, &outs, config->writeout);

if(config->writeenv)
ourWriteEnv(curl);

/*
** Code within this loop may jump directly here to label 'show_error'
** in order to display an error message for CURLcode stored in 'res'
Expand Down
113 changes: 0 additions & 113 deletions src/tool_writeenv.c

This file was deleted.

35 changes: 0 additions & 35 deletions src/tool_writeenv.h

This file was deleted.

0 comments on commit a8e388d

Please sign in to comment.