cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: URL Parsing libraries

From: codemastr <codemstr_at_ptd.net>
Date: Tue, 27 Jan 2004 20:08:44 -0500

> On Linux the configure script checks for "libintl.h"
> I guess it assumes that if you have the header, then you have the lib.
> What about using ./configure --disable-nls ?
Well, the configure script it came with doesn't check for libintl.h for me,
if you grep configure.in you'll notice "intl" is not found anywhere.
Also, I don't have libintl.h either, and I did use --disable-nls, but the
thing is, if you open uri.c you'll see:
#include <libintl.h>
No #ifdef's or anything, even if you don't have the file, it still tries to
include it. If I #ifdef ENABLE_NLS that it does seem to compile fine though.
I don't know enough about libintl to know whether NLS == libintl though, so
I'm not 100% sure that actually corrects the problem.

Maybe there is some newer version I'm just not aware of? This is 2.13.0

> > Not to mention, the project seems dead, I tried contacting the
> > author regarding adding ftps support but he never responded.
>
> The library does provide a mechanism to define your own schemes,
> - i suspect ftps shouldn't be too much different than ftp?
Hmm, does it? I couldn't find anything about that in the docs. It seems you
just modify uri_schemes.mk, but I'm not sure. Any ideas?
>
>
> > What I really need is a library that runs under both *nix and Win32
>
> I haven't tried building on Win32, but I did see some references
> to "cygwin" in the Makefile.
Yeah well, in my mind, cygwin is a piece of crap. I'd rather not have
emulation layers if I don't need them. I'm sure I could port the lib to
msvc, I was just thinking, if there is already a lib that does what I want,
I'd rather be lazy :)
>
> I think that would be a great idea, as if Daniel doesn't have
> enough irons in the fire already...
Well I'm just thinking, I'm not the first one to come here asking about URL
parsing (either a library for it, or the ever popular how to do it in
libcurl) so it seems like something, if nothing more, that would certainly
have a place in an FAQ.

> Liburi is around 10,000 lines of code -
> that seems a little much just to parse a line of text :-)
Yeah it is kind of big, but I'm considering gutting it a bit. Like all that
stderr stuff can go. imho a library should NEVER write to the terminal (with
the exception of a debugging feature). I mean there really is no guarantee
that stderr does anything (e.g. Windows). So I'd probably remove all that
stuff and the like. I also don't care about half the schemes it supports, my
only purpose is to use this with libcurl, so finger, mailto, nntp, prospero,
rlogin, snews, and wais can all go as well. Probably will also remove all
the little apps it comes with (which will allow me to remove gettext as
well). Although I like curl, I've always been against distributing a library
and the application as a single package. I figure all that will cut the size
down a bit :)

Dominick Meglio

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-28