Lines Matching refs:new
120 /* Try converting string str from locale to UTF-8. Return a new string
126 char *new;
146 if (do_conversion (l2u, (char *) str, strlen ((char *) str), &new))
147 return (const char *) new;
193 char *new;
198 new = xmalloc (outlen + 1);
199 memcpy (new, s, done);
201 s = new;
215 /* Try to "ASCII encode" UTF-8 host. Return the new domain on success or NULL
220 char *new;
226 if (!remote_to_utf8 (i, (const char *) host, (const char **) &new))
228 host = new;
232 ret = idna_to_ascii_8z (host, &new, IDNA_FLAGS);
235 /* sXXXav : free new when needed ! */
241 return new;
244 /* Try to decode an "ASCII encoded" host. Return the new domain in the locale
249 char *new;
252 ret = idna_to_unicode_8zlz (host, &new, IDNA_FLAGS);
260 return new;
263 /* Try to transcode string str from remote encoding to UTF-8. On success, *new
264 contains the transcoded string. *new content is unspecified otherwise. */
266 remote_to_utf8 (struct iri *i, const char *str, const char **new)
278 if (do_conversion (cd, (char *) str, strlen ((char *) str), (char **) new))
284 if (!strcmp (str, *new))
286 xfree ((char *) *new);
293 /* Allocate a new iri structure and return a pointer to it. */