copyParsedURL(ParsedURL *p, const ParsedURL *q)
{
    if (q == NULL) {
	memset(p, 0, sizeof(ParsedURL));
	p->scheme = SCM_UNKNOWN;
	return;
    }
    p->scheme = q->scheme;
    p->port = q->port;
    p->is_nocache = q->is_nocache;
    p->user = ALLOC_STR(q->user);
    p->pass = ALLOC_STR(q->pass);
    p->host = ALLOC_STR(q->host);
    p->file = ALLOC_STR(q->file);
    p->real_file = ALLOC_STR(q->real_file);
    p->label = ALLOC_STR(q->label);
    p->query = ALLOC_STR(q->query);
}
Unknown