} else { p = strchr(parts->host, '?'); if (p != NULL) { *p = '\0';			 parts->search = (p + 1); }
PRIVATE void scan ARGS2(	char *, 		name,	struct struct_parts *,	parts){    char * after_access;    char * p;#ifdef NOTDEFINED    int length = strlen(name);#endif /* NOTDEFINED */    parts->access = NULL;    parts->host = NULL;    parts->absolute = NULL;    parts->relative = NULL;    parts->anchor = NULL;    /*    **	Scan left-to-right for a scheme (access).    */    after_access = name;    for (p = name; *p; p++) {	if (*p==':') {	    *p = '\0';	    parts->access = name;	/* Access name has been specified */	    after_access = (p + 1);	    break;	}	if (*p == '/' || *p == '#' || *p == ';' || *p == '?')	    break;    }#ifdef NOTDEFINED    for (p = (name + length-1); p >= name; p--) {}#endif /* NOTDEFINED */    /*    **	Scan left-to-right for a fragment (anchor).    */    for (p = after_access; *p; p++) {	if (*p =='#') {	    parts->anchor = (p + 1);	    *p = '\0';			/* terminate the rest */	    break;		/* leave things after first # alone - kw */	}    }    /*    **	Scan left-to-right for a host or absolute path.    */    p = after_access;    if (*p == '/') {	if (p[1] == '/') {	    parts->host = (p + 2);	  /* host has been specified	*/	    *p = '\0';			  /* Terminate access		*/	    p = strchr(parts->host, '/'); /* look for end of host name if any */	    if (p != NULL) {		*p = '\0';			/* Terminate host */		parts->absolute = (p + 1);	/* Root has been found */	    }	} else {	    parts->absolute = (p + 1);		/* Root found but no host */	}    } else {	parts->relative = (*after_access) ?			     after_access : NULL; /* NULL for "" */    }    /*    **	Check schemes that commonly have unescaped hashes.    */    if (parts->access && parts->anchor) {	if ((!parts->host && strcasecomp(parts->access, "lynxcgi")) ||	    !strcasecomp(parts->access, "nntp") ||	    !strcasecomp(parts->access, "snews") ||	    !strcasecomp(parts->access, "news") ||	    !strcasecomp(parts->access, "data")) {	    /*	     *	Access specified but no host and not a lynxcgi URL, so the	     *	anchor may not really be one, e.g., news:j462#36487@foo.bar,	     *	or it's an nntp or snews URL, or news URL with a host.	     *	Restore the '#' in the address.	     */	    /* but only if we have found a path component of which this will	     * become part. - kw  */	    if (parts->relative || parts->absolute) {		*(parts->anchor - 1) = '#';		parts->anchor = NULL;	    }	}    }#ifdef NOT_DEFINED	/* search is just treated as part of path */    {	char *p = (relative ? relative : absolute);	if (p != NULL) {	    char *q = strchr(p, '?');	/* Any search string? */	    if (q != NULL) {		*q = '\0';		/* If so, chop that off. */		parts->search = (q + 1);	    }	}    }#endif /* NOT_DEFINED */} /*scan */