Unfortunately every version of W9x can (with some kind of mind - please
don't start religious wars here) be considered a shell (nice, horrible,
choose what you prefer) around some kind of dos. From Win NT 4 upwards
that isn't true anymore, but for (some) compatibilities sake there are
many parallelisms which do emulate partly the behaviour of the old dos
environment.

For example, in order to rapidly create a (small file) on nt4 I still
can

C:\tmp>copy con some.file
some garbage
^Z
        1 file copiato(i).

which is just like cat >file ... ^D, the difference being con a special
not-exactly-file somewhat similar to /dev/tty on unix.

However in this case (at least when I just tried) the file won't contain
the ^Z. OTOH some dos programs still will work on NT4, NT2k and XP, and
could be used, and would create files ending with ^Z. But do they really
belong here and should wget be bothered ?

What we really need to know is:

Is ^Z still a valid, recognized character indicating end-of-file (for
textmode files) for command shell programs on windows NT 4/2k/Xp ?
Somebody with access to the *windows standards* could shed more light on
this question ?

My personal idea is:
As a matter of fact no *windows* text editor I know of, even the
supplied windows ones (notepad, wordpad) AFAIK will add the ^Z at the
end of file.txt. Wget is a *windows* program (although running in
console mode), not a *Dos* program (except for the real dos port I know
exists but never tried out).

So personally I'd say it would not be really neccessary adding support
for the ^Z, even in the win32 port; except possibly for the Dos port, if
the porter of that beast thinks it would be usefull.

Heiko

-- 
-- PREVINET S.p.A.            [EMAIL PROTECTED]
-- Via Ferretto, 1            ph  x39-041-5907073
-- I-31021 Mogliano V.to (TV) fax x39-041-5907087
-- ITALY

> -----Original Message-----
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 17, 2002 2:15 AM
> To: Michael Jennings
> Cc: [EMAIL PROTECTED]
> Subject: Re: Bug report: 1) Small error 2) Improvement to Manual
> 
> 
> Michael Jennings <[EMAIL PROTECTED]> writes:
> 
> > 1) There is a very small bug in WGet version 1.8.1. The bug occurs
> >    when a .wgetrc file is edited using an MS-DOS text editor:
> > 
> > WGet returns an error message when the .wgetrc file is terminated
> > with an MS-DOS end-of-file mark (Control-Z). MS-DOS is the
> > command-line language for all versions of Windows, so ignoring the
> > end-of-file mark would make sense.
> 
> Ouch, I never thought of that.  Wget opens files in binary mode and
> handles the line termination manually -- but I never thought to handle
> ^Z.
> 
> As much as I'd like to be helpful, I must admit I'm loath to encumber
> the code with support for this particular thing.  I have never seen it
> before; is it only an artifact of DOS editors, or is it used on
> Windows too?
> 

Reply via email to