lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV patch for djgpp downloaders


From: Klaus Peter Wegge
Subject: Re: LYNX-DEV patch for djgpp downloaders
Date: Mon, 9 Feb 1998 10:10:47 +0100 (MET)

> On Fri, 6 Feb 1998, Klaus Peter Wegge wrote:
> 
> > when defining a specific downloader in lynx.cfg, the transferred path
> > parameters are qouted. There handling in DOS batch files
> > is not very easy.
> 
> Can you give an example where the current code causes problems?  I may
> have been lucky in not coming across this. If a patch is necessary, you
> may want to make it "ifdef __DJGPP__" rather than "ifdef DOSPATH", since
> spaces need to be quoted for Windows32, etc.

OK:
1. The following entry in lynx.cfg:
DOWNLOADER:show picture:dvpeg %s:TRUE

2. A small batchfile named DVPEG.bat:
@echo off
echo %1
pause
c:\www\dvpeg\dvpeg +config c:\www\dvpeg\dvpeg.cfg +title "*Bild" %1 +exit

3. test:
start lynx with links for pictures.
Download a picture by klicking the link.
Additional to
   save to a file
you now have the choice
   show picture
Using the latter one, the batchfile will show you the filename
first. It is quoted. Continuing the execution, dvpeg will not find
the file. Removing the quotes by sed or with my patch, the problem
will not longer occur.

Doug's suggestion to "ifdef __DJGPP__" rather than "ifdef DOSPATH"
is OK.
The reason for modifying the method calls but the method itself
is pedantery: What now happens is:
Give a string to the method, allocate memory, copy the string to the
memory, return to the caller, use the strings copy and free memory.
Why not using the original string without this overhead.
But, of course, it's realy not relevant for runtime behaviour...
There seems to be no need to quote the strings in some exceptions.

Klaus-Peter

reply via email to

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