MCPcopy Create free account
hub / github.com/apache/httpd / read_quoted

Function read_quoted

modules/mappers/mod_imagemap.c:290–314  ·  view source on GitHub ↗

See if string has a "quoted part", and if so set *quoted_part to * the first character of the quoted part, then hammer a \0 onto the * trailing quote, and set *string to point at the first character * past the second quote. * * Otherwise set *quoted_part to NULL, and leave *string alone. */

Source from the content-addressed store, hash-verified

288 * Otherwise set *quoted_part to NULL, and leave *string alone.
289 */
290static void read_quoted(char **string, char **quoted_part)
291{
292 char *strp = *string;
293
294 /* assume there's no quoted part */
295 *quoted_part = NULL;
296
297 while (apr_isspace(*strp)) {
298 strp++; /* go along string until non-whitespace */
299 }
300
301 if (*strp == '"') { /* if that character is a double quote */
302 strp++; /* step over it */
303 *quoted_part = strp; /* note where the quoted part begins */
304
305 while (*strp && *strp != '"') {
306 ++strp; /* skip the quoted portion */
307 }
308
309 *strp = '\0'; /* end the string with a NUL */
310
311 strp++; /* step over the last double quote */
312 *string = strp;
313 }
314}
315
316/*
317 * returns the mapped URL or NULL.

Callers 1

imap_handler_internalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected