if ((fn = (char *) calloc (1, (strlen (tbuf) + 1))) == NULL)
if ((fn = typecallocn(char, strlen (tbuf) + 1)) == NULL)
PUBLIC char * GetFileName NOARGS{    struct stat stat_info;    FILE *fp;    char  fbuf[LY_MAXPATH];    char  tbuf[LY_MAXPATH];    char *fn;    BOOLEAN FirstRecall = TRUE;    int     FnameNum    = -1;    int     FnameTotal;    _statusline(FILENAME_PROMPT);retry:    /*     *  No initial filename.     */    SetupFilename (fbuf, "");check_recall:    /*     *  Go get a filename (it would be nice to do TAB == filename-completion     *  as the name is entered, but we'll save doing that for another time.     */    switch (RecallFilename (fbuf,        &FirstRecall,  &FnameNum,			    &FnameTotal, GENERIC_FLAG)) {	case FN_INIT:	    goto retry;	case FN_READ:	    goto check_recall;	case FN_QUIT:	    goto quit;	default:	    break;    }    /*     *  Add raw input form to list ... we may want to reuse/edit it on a     *  subsequent call, etc.     */#ifdef VMS    if (0 == strncasecomp (fbuf, "sys$disk:", 9)) {	if (0 == strncmp ((fbuf+9), "[]", 2)) {	    HTAddSugFilename (fbuf+11);	} else {	    HTAddSugFilename (fbuf+9);	}    } else {	HTAddSugFilename (fbuf);    }#else    HTAddSugFilename (fbuf);#endif /* VMS */    /*     *  Expand tilde's, make filename absolute, etc.     */    if (!LYValidateFilename (tbuf, fbuf))	goto quit;    /*     *  Check for file existence; readability.     */    if ((stat (tbuf, &stat_info) < 0) ||       (!(S_ISREG(stat_info.st_mode)#ifdef S_IFLNK	 || S_ISLNK(stat_info.st_mode)#endif /* S_IFLNK */	))) {	HTInfoMsg (FILE_DOES_NOT_EXIST);	_statusline(FILE_DOES_NOT_EXIST_RE);	FirstRecall = TRUE;	FnameNum    = FnameTotal;	goto retry;    }    if ((fp = fopen (tbuf, "r")) == NULL) {	HTInfoMsg (FILE_NOT_READABLE);	_statusline(FILE_NOT_READABLE_RE);	FirstRecall = TRUE;	FnameNum    = FnameTotal;	goto retry;    } else {	fclose (fp);    }    /*     *  We have a valid filename, and readable file.  Return it to the     *  caller.     *     *  The returned pointer should be free()'d by the caller.     *     *  [For some silly reason, if we use StrAllocCopy() here, we get an     *   "invalid pointer" reported in the Lynx.leaks file (if compiled     *   with  --enable-find-leaks  turned on.  Dumb.]     */    if ((fn = (char *) calloc (1, (strlen (tbuf) + 1))) == NULL)	outofmem(__FILE__, "GetFileName");    return (strcpy (fn, tbuf));quit:    /*     *  The user cancelled the input (^G, or CR on empty input field).     */    return (NULL);}