[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems
From: |
Steven M. Schweda |
Subject: |
Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems |
Date: |
Fri, 30 Sep 2011 16:56:14 -0500 (CDT) |
Two more things, both in "src/ftp.c". Part of some VMS-specific
stuff (BIN_TYPE_FILE) got lost/discarded somewhere along the line.
Also, while fooling around, I noticed that ".listing" files were being
created with binary instead of text attributes. Wget itself didn't seem
to care, but, with --no-remove-listing, for example, the resulting
(persistent) ".listing" files were unsuitable for use by normal text
editors.
--- ftp.c_orig 2011-09-13 03:05:12 -0500
+++ ftp.c 2011-09-30 16:36:31 -0500
@@ -1152,13 +1152,25 @@
Elsewhere, define a constant "binary" flag.
Isn't it nice to have distinct text and binary file types?
*/
-# define BIN_TYPE_TRANSFER (type_char != 'A')
+/* 2011-09-30 SMS.
+ Added listing files to the set of non-"binary" (text, Stream_LF)
+ files. (Wget works either way, but other programs, like, say, text
+ editors, work better on listing files which have text attributes.)
+ Now we use "binary" attributes for a binary ("IMAGE") transfer,
+ unless "--ftp-stmlf" was specified, and we always use non-"binary"
+ (text, Stream_LF) attributes for a listing file, or for an ASCII
+ transfer.
+ Tidied the VMS-specific BIN_TYPE_xxx macros, and changed the call to
+ fopen_excl() (restored?) to use BIN_TYPE_FILE instead of "true".
+*/
#ifdef __VMS
+# define BIN_TYPE_TRANSFER (type_char != 'A')
+# define BIN_TYPE_FILE \
+ ((!(cmd & DO_LIST)) && BIN_TYPE_TRANSFER && (opt.ftp_stmlf == 0))
# define FOPEN_OPT_ARGS "fop=sqo", "acc", acc_cb, &open_id
# define FOPEN_OPT_ARGS_BIN "ctx=bin,stm", "rfm=fix", "mrs=512" FOPEN_OPT_ARGS
-# define BIN_TYPE_FILE (BIN_TYPE_TRANSFER && (opt.ftp_stmlf == 0))
#else /* def __VMS */
-# define BIN_TYPE_FILE 1
+# define BIN_TYPE_FILE true
#endif /* def __VMS [else] */
if (restval && !(con->cmd & DO_LIST))
@@ -1217,7 +1229,7 @@
}
else
{
- fp = fopen_excl (con->target, true);
+ fp = fopen_excl (con->target, BIN_TYPE_FILE);
if (!fp && errno == EEXIST)
{
/* We cannot just invent a new name and use it (which is
Note that the directive:
# define BIN_TYPE_TRANSFER (type_char != 'A')
was outside the "#ifdef __VMS" block, but BIN_TYPE_TRANSFER is used only
on VMS. This change would move it inside (where it belongs). The
fopen_excl() is generic, but on VMS it needs the variable (on VMS)
BIN_TYPE_FILE argument, not a constant "true". (Which is why
BIN_TYPE_FILE exists.)
------------------------------------------------------------------------
Steven M. Schweda address@hidden
382 South Warwick Street (+1) 651-699-9818
Saint Paul MN 55105-2547
- [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/28
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/28
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/28
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/29
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/29
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/29
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems, Steven M. Schweda, 2011/09/30
- Re: [Bug-wget] Wget 1.13.4 v. VMS -- Various problems,
Steven M. Schweda <=