You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2005/02/04 23:42:42 UTC
Re: svn commit: r12920 - trunk/subversion/libsvn_subr
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
Re: svn commit: r12920 - trunk/subversion/libsvn_subr
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sat, 5 Feb 2005, [UTF-8] Branko �^Libej wrote:
> 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...
>
Both fixed in r12922.
Thanks,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org