Subject: Re: a proposal for two new libc functions: shquote() and shquotev()
To: Christos Zoulas <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 03/02/2001 22:58:48
email@example.com (Christos Zoulas) writes:
> How about an allocating version like asprintf()? That would cut down your
> example significantly.
I can imagine some trivial cases where that'd help, when _all_ of your
arguments are coming from the argc/argv given to shquotev().
However, for the most part, you have to combine the result of
shquote() or shquotev() with other strings. That would mean that
you'd have to do something like: quote+allocate, calculate length of
combined string, allocate for it, combine, then free the thing
allocated by "quote+allocate"... it doesn't help. 8-)
What did you have in mind as the simplified example?
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.