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

Function getvalue

modules/metadata/mod_mime_magic.c:1290–1301  ·  view source on GitHub ↗

* Read a numeric value from a pointer, into the value union of a magic * pointer, according to the magic type. Update the string pointer to point * just after the number read. Return 0 for success, non-zero for failure. */

Source from the content-addressed store, hash-verified

1288 * just after the number read. Return 0 for success, non-zero for failure.
1289 */
1290static int getvalue(server_rec *s, struct magic *m, char **p)
1291{
1292 int slen;
1293
1294 if (m->type == STRING) {
1295 *p = getstr(s, *p, m->value.s, sizeof(m->value.s), &slen);
1296 m->vallen = slen;
1297 }
1298 else if (m->reln != 'x')
1299 m->value.l = signextend(s, m, strtol(*p, p, 0));
1300 return 0;
1301}
1302
1303/*
1304 * Convert a string containing C character escapes. Stop at an unescaped

Callers 1

parseFunction · 0.85

Calls 2

getstrFunction · 0.85
signextendFunction · 0.85

Tested by

no test coverage detected