: path);
: path, TRUE);
PUBLIC BOOL HTDirTitles ARGS3(	HTStructured *, target,	HTAnchor *,	anchor,	BOOL,		tildeIsTop){    char * logical = HTAnchor_address(anchor);    char * path = HTParse(logical, "", PARSE_PATH + PARSE_PUNCTUATION);    char * current;    char * cp = NULL;    BOOL need_parent_link = FALSE;    int i;#ifdef DOSPATH    BOOL local_link = FALSE;    if (logical[18] == ':') local_link = TRUE;#endif    /*    **	Check tildeIsTop for treating home directory as Welcome    **	(assume the tilde is not followed by a username). - FM    */    if (tildeIsTop && !strncmp(path, "/~", 2)) {	if (path[2] == '\0') {	    path[1] = '\0';	} else {	    for (i = 0; path[(i + 2)]; i++) {		path[i] = path[(i + 2)];	    }	    path[i] = '\0';	}    }    /*    **	Trim out the ;type= parameter, if present. - FM    */    if ((cp = strrchr(path, ';')) != NULL) {	if (!strncasecomp((cp+1), "type=", 5)) {	    if (TOUPPER(*(cp+6)) == 'D' ||		TOUPPER(*(cp+6)) == 'A' ||		TOUPPER(*(cp+6)) == 'I')		*cp = '\0';	}	cp = NULL;    }    current = strrchr(path, '/');	/* last part or "" */    {      char * printable = NULL;#ifdef DIRED_SUPPORT      printable = HTfullURL_toFile(	    (0 == strncasecomp(path, "/%2F", 4))	/* "//" ? */	    ? (path+1)	    : path);      if (0 == strncasecomp(printable, "/vmsysu:", 8) ||	  0 == strncasecomp(printable, "/anonymou.", 10)) {	  StrAllocCopy(cp, (printable+1));	  StrAllocCopy(printable, cp);	  FREE(cp);      }#else      StrAllocCopy(printable, (current ? current + 1 : ""));      HTUnEscape(printable);#endif /* DIRED_SUPPORT */      START(HTML_HEAD);      PUTC('\n');      START(HTML_TITLE);      PUTS(*printable ? printable : WELCOME_MSG);      PUTS(SEGMENT_DIRECTORY);      END(HTML_TITLE);      PUTC('\n');      END(HTML_HEAD);      PUTC('\n');#ifdef DIRED_SUPPORT      START(HTML_H2);      PUTS(*printable ? SEGMENT_CURRENT_DIR : "");      PUTS(*printable ? printable : WELCOME_MSG);      END(HTML_H2);      PUTC('\n');#else      START(HTML_H1);      PUTS(*printable ? printable : WELCOME_MSG);      END(HTML_H1);      PUTC('\n');#endif /* DIRED_SUPPORT */      if (((0 == strncasecomp(printable, "vmsysu:", 7)) &&	   (cp = strchr(printable, '.')) != NULL &&	   strchr(cp, '/') == NULL) ||	  (0 == strncasecomp(printable, "anonymou.", 9) &&	   strchr(printable, '/') == NULL)) {	  FREE(printable);	  FREE(logical);	  FREE(path);	  return(need_parent_link);      }      FREE(printable);    }#ifndef NO_PARENT_DIR_REFERENCE    /*    **	Make link back to parent directory.    */    if (current && current[1]) {   /* was a slash AND something else too */	char * parent = NULL;	char * relative = NULL;	*current++ = '\0';	parent = strrchr(path, '/');  /* penultimate slash */	if ((parent &&	     (!strcmp(parent, "/..") ||	      !strncasecomp(parent, "/%2F", 4))) ||	    !strncasecomp(current, "%2F", 3)) {	    FREE(logical);	    FREE(path);	    return(need_parent_link);	}	relative = 0;	HTSprintf0(&relative, "%s/..", current);#ifdef DOSPATH	if (local_link)	    if (strlen(parent) == 3 )		StrAllocCat(relative, "/.");#endif#if !defined (VMS)#ifdef DOSPATH	if(!local_link)#endif	{	    /*	    **	On Unix, if it's not ftp and the directory cannot	    **	be read, don't put out a link.	    **	    **	On VMS, this problem is dealt with internally by	    **	HTVMSBrowseDir().	    */	    DIR  * dp = NULL;	    if (LYisLocalFile(logical)) {		/*		**  We need an absolute file path for the opendir.		**  We also need to unescape for this test.		**  Don't worry about %2F now, they presumably have been		**  dealt with above, and shouldn't appear for local		**  files anyway...  Assume OS / filesystem will just		**  ignore superfluous slashes. - KW		*/		char * fullparentpath = NULL;		/*		**  Path has been shortened above.		*/		StrAllocCopy(fullparentpath, *path ? path : "/");		/*		**  Guard against weirdness.		*/		if (0 == strcmp(current,"..")) {		    StrAllocCat(fullparentpath,"/../..");		} else if (0 == strcmp(current,".")) {		    StrAllocCat(fullparentpath,"/..");		}		HTUnEscape(fullparentpath);		if ((dp = opendir(fullparentpath)) == NULL) {		    FREE(fullparentpath);		    FREE(logical);		    FREE(relative);		    FREE(path);		    return(need_parent_link);		}		closedir(dp);		FREE(fullparentpath);#ifdef LONG_LIST		need_parent_link = TRUE;		FREE(logical);		FREE(path);		FREE(relative);		return(need_parent_link);#endif /* LONG_LIST */	    }	}#endif /* !VMS */	HTStartAnchor(target, "", relative);	FREE(relative);	PUTS(SEGMENT_UP_TO);	if (parent) {	    if ((0 == strcmp(current,".")) ||		(0 == strcmp(current,".."))) {		/*		**  Should not happen, but if it does,		**  at least avoid giving misleading info. - KW		*/		PUTS("..");	    } else {		char * printable = NULL;		StrAllocCopy(printable, parent + 1);		HTUnEscape(printable);		PUTS(printable);		FREE(printable);	    }	} else {	    PUTC('/');	}	END(HTML_A);	PUTC('\n');    }#endif /* !NO_PARENT_DIR_REFERENCE */    FREE(logical);    FREE(path);    return(need_parent_link);}