[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r12920 - trunk/subversion/libsvn_subr

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-02-05 00:42:42 CET

lundblad@tigris.org wrote:

>Author: lundblad
>Date: Fri Feb 4 16:26:03 2005
>New Revision: 12920
>
>

>+/* Copy LEN bytes of SRC, converting non-ASCII and zero bytes to ?\nnn
>+ sequences, allocating the result in POOL. */
>+const char *
>+fuzzy_escape (const char *src, apr_size_t len, apr_pool_t *pool)
>+{
>+ const char *src_orig = src, *src_end = src + len;
>+ apr_size_t new_len = 0;
>+ char *new;
>+ const char *new_orig;
>+
>+ /* First count how big a dest string we'll need. */
>+ while (src < src_end)
>+ {
>+ if (! apr_isascii (*src) || *src == '\0')
>
>
svn_ctype_isascii...

>+ new_len += 5; /* 5 slots, for "?\XXX" */
>+ else
>+ new_len += 1; /* one slot for the 7-bit char */
>+
>+ src++;
>+ }
>+
>+ /* Allocate that amount. */
>+ new = apr_palloc (pool, new_len + 1);
>+
>+ new_orig = new;
>+
>+ /* And fill it up. */
>+ while (src_orig < src_end)
>+ {
>+ if (! apr_isascii (*src_orig) || src_orig == '\0')
>
>
svn_ctype_isascii...

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 5 00:43:58 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.