On Feb 26 10:14:58, [email protected] wrote:
> On Sat, Feb 23, 2013 at 9:29 AM, Jan Stary <[email protected]> wrote:
>
> > Currently. sox uses wget(1) to access remote files and streams.
> > What is the developers' opinion about what do do with it
> > (if anything)?
> >
> > The obvious candidates are wget(1), ftp(1), curl(1) and libcurl(3).
> > What would be the pros and cons of each?
> >
> >
> > http://sourceforge.net/tracker/?func=detail&aid=1713308&group_id=10706&atid=360706
> >
> > (I am not sure if there are other entries in the tracker
> > related to this.)
> >
> > Jan
> >
> >
> Using libcurl is probably not going to go far for a while.
Do you silently imply that libcurl _would_ be the best solution?
What about curl(1)?
> Was it you that mentioned macport's has a patch to support BSD-like ftp
> in place of wget?
Yes (I maintain the macport and the OpenBSD port of SoX).
> Can you post patch to this list by chance?
This is how both the OpenBSD port and the macports
patches SoX 14.4.1:
--- src/formats.c.orig Sat Mar 24 06:29:07 2012
+++ src/formats.c Sat Mar 24 06:29:53 2012
@@ -348,7 +348,7 @@ static int sox_checkformat(sox_format_t * ft)
return SOX_SUCCESS;
}
-static sox_bool is_url(char const * text) /* detects only wget-supported URLs
*/
+static sox_bool is_url(char const * text)
{
return !(
strncasecmp(text, "http:" , (size_t)5) &&
@@ -385,7 +385,7 @@ static FILE * xfopen(char const * identifier, char con
else if (is_url(identifier)) {
FILE * f = NULL;
#ifdef HAVE_POPEN
- char const * const command_format = "wget --no-check-certificate -q -O-
\"%s\"";
+ char const * const command_format = "ftp -a -V -o - \"%s\"";
char * command = lsx_malloc(strlen(command_format) + strlen(identifier));
sprintf(command, command_format, identifier);
f = popen(command, POPEN_MODE);
The point is that these system have a ftp(1) in their basic
install that can do "ftp -o", and wget is a needless dependency.
> I see no down side to optionally supporting ftp in SoX; in addition to wget.
Would ./configure be the proper place to make the decision?
What about curl(1)?
Jan
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
SoX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-devel