httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <poir...@pobox.com>
Subject Re: svn commit: r910684 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h include/http_log.h server/log.c server/mpm/event/event.c server/mpm/netware/mpm_netware.c server/mpm/prefork/prefork.c server/mpm/winnt/mpm_winnt.c server/mpm/worker/worker.c
Date Tue, 16 Feb 2010 22:26:30 GMT
On Tue, Feb 16, 2010, at 04:03:33 PM, Jeff Trawick <trawick@gmail.com> wrote:

> FWLIW, sooner or later somebody will want quoting around args with
> embedded blanks
> (surprisingly there doesn't seem to be an existing function to do this
> work)

Maybe something along these lines would be useful?

/**
 * Concatenate multiple strings specified in a writev-style vector.
 * The separator between strings is the sep argument, and each string
 * has the quote argument preceding and following it.
 *
 * @param p The pool from which to allocate
 * @param vec The strings to concatenate
 * @param nvec The number of strings to concatenate
 * @param nbytes (output) strlen of new string (pass in NULL to omit)
 * @param sep String to place between each input string (pass in NULL to omit)
 * @param quote String to place around each input string (pass in NULL to omit)
 * @return The new string
 */
APR_DECLARE(char *) apr_pstrjoinv(apr_pool_t *a, const struct iovec *vec,
                                  apr_size_t nvec, apr_size_t *nbytes,
                                  const char *sep, const char *quote);


Mime
View raw message