char *temp = (char *)calloc(1, (strlen(home) + strlen(file) + 10)); if (temp == NULL) outofmem(__FILE__, "LYAddPathToHome"); sprintf(temp, "%s%s", HTVMS_wwwName(home), (file + 1));
char *temp = NULL; HTSprintf0(&temp, "%s%s", HTVMS_wwwName(home), (file + 1));
PUBLIC void LYAddPathToHome ARGS3(	char *,		fbuffer,	size_t,		fbuffer_size,	char *,		fname){    char *home = NULL;    char *file = fname;    int len;    /*     *	Make sure we have a buffer. - FM     */    if (!fbuffer)	return;    if (fbuffer_size < 2) {	fbuffer[0] = '\0';	return;    }    fbuffer[(fbuffer_size - 1)] = '\0';    /*     *	Make sure we have a file name. - FM     */    if (!file)	file = "";    /*     *	Set up home string and length. - FM     */    StrAllocCopy(home, Home_Dir());    if (!(home && *home))	/*	 *  Home_Dir() has a bug if this ever happens. - FM	 */#ifdef VMS	StrAllocCopy(home, "Error:");#else	StrAllocCopy(home, "/error");#endif /* VMS */    len = fbuffer_size - (strlen(home) + 1);    if (len <= 0) {	/*	 *  Buffer is smaller than or only big enough for the home path.	 *  Load what fits of the home path and return.  This will fail,	 *  but we need something in the buffer. - FM	 */	LYstrncpy(fbuffer, home, (fbuffer_size - 1));	FREE(home);	return;    }#ifdef VMS    /*     *	Check whether we have a subdirectory path or just a filename. - FM     */    if (!strncmp(file, "./", 2)) {	/*	 *  We have a subdirectory path. - FM	 */	if (home[strlen(home)-1] == ']') {	    /*	     *	We got the home directory, so convert it to	     *	SHELL syntax and append subdirectory path,	     *	then convert that to VMS syntax. - FM	     */	    char *temp = (char *)calloc(1,					(strlen(home) + strlen(file) + 10));	    if (temp == NULL)		outofmem(__FILE__, "LYAddPathToHome");	    sprintf(temp, "%s%s", HTVMS_wwwName(home), (file + 1));	    sprintf(fbuffer, "%.*s",		    (fbuffer_size - 1), HTVMS_name("", temp));	    FREE(temp);	} else {	    /*	     *	This will fail, but we need something in the buffer. - FM	     */	    sprintf(fbuffer, "%s%.*s", home, len, file);	}    } else {	/*	 *  We have a file in the home directory. - FM	 */	sprintf(fbuffer, "%s%.*s", home, len, file);    }#else    /*     *	Check whether we have a subdirectory path or just a filename. - FM     */    sprintf(fbuffer, "%s/%.*s", home, len,		     (strncmp(file, "./", 2) ? file : (file + 2)));#endif /* VMS */    FREE(home);}