[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev mp3 and local files problem

From: David Woolley
Subject: Re: lynx-dev mp3 and local files problem
Date: Sun, 12 Aug 2001 10:46:18 +0100 (BST)

This is part of the previous thread that I mentioned on this sort
of problem.

Forwarded message:
Date: Wed, 25 Apr 2001 21:03:05 -0700 (PDT)
From: Doug Kaufman <address@hidden>
To: address@hidden
Cc: address@hidden
Subject: Re: lynx-dev Fwd: Lynx2.8.4

On Wed, 25 Apr 2001, David Woolley wrote:

> > the Lynx temp file is 1526329 bytes. I've compared the files and
> > found that
> > 13 hex'0D' chars are deleted. Can you check what is going wrong when
> > Lynx
> The expected number of CR LFs (0D 0A) in this size of random data file
> is about 23.  I would suggest that the file is being converted from
> nominal MSDOS text to Unix format.  This will happen whenever you feed
> a file to standard input in a C DOS program as standard input is always
> in text mode.  How this relates to Lynx requires more investigation,
> but I suspect that a helper application has the file as standard input.

The DOS and EMX ports make stdout binary rather than text with
the SetOutputMode(O_BINARY) in LYMain.c. DOS simulates pipes with
temporary files. But these temporary files also need to be written
as binary. I suspect that writing temporary files in text mode is
the problem here. The DOS port fixes this with _fmode=O_BINARY (as
SetDefaultMode(O_BINARY)). According to the comments in LYCurses.h,
EMX does not have such a default setting for files. Looking through
the source, I don't see where setmode is used in the EMX port to make
sure that files are binary. I am not sure where this should go. I
suspect that in belongs in OpenHiddenFile in LYUtils.c, where this is
done for the CYGWIN port. Perhaps someone else could comment on this.

> > 2. Usually, when loading local files I use '\' chars in drive and
> > path. For
> > example j:\test\index.html. The index file is loaded, however when
> This is certainly going to be a dodgy area.  Lynx has to take something
> that looks like a URL and realise that it isn't, then internally
> convert it to a URL.  If it fails to convert \ to / in the process,
> the rules for resolving relative URLs will strip more components
> than you intended.  It wouldn't surprise me if it is converting
> your file to file://localhost/j:\test\index.html, which will lose
> everything from the j: if you form a relative URL.

The function HTDOS_wwwName in HTDOS.c does the conversions reliably.
It needs to be called appropriately.

Doug Kaufman
Internet: address@hidden

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]