me->fp = LYNewBinFile (fnam);
me->fp = LYOpenTempRewrite(fnam, ".bin", BIN_W);
PUBLIC HTStream* HTSaveAndExecute ARGS3(	HTPresentation *,	pres,	HTParentAnchor *,	anchor,	HTStream *,		sink){    char fnam[LY_MAXPATH];    CONST char *suffix;    HTStream* me;    if (traversal) {	LYCancelledFetch = TRUE;	return(NULL);    }#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)    if (pres->quality == 999.0) { /* exec link */	if (dump_output_immediately) {	    LYCancelledFetch = TRUE;	    return(NULL);	}	if (no_exec) {	    HTAlert(EXECUTION_DISABLED);	    return HTPlainPresent(pres, anchor, sink);	}	if (!local_exec)	    if (local_exec_on_local_files &&		(LYJumpFileURL ||		 !strncmp(anchor->address,"file://localhost",16))) {		/* allow it to continue */	    } else {		char *buf = 0;		HTSprintf0(&buf, EXECUTION_DISABLED_FOR_FILE,			   key_for_func(LYK_OPTIONS));		HTAlert(buf);		FREE(buf);		return HTPlainPresent(pres, anchor, sink);	    }    }#endif /* EXEC_LINKS || EXEC_SCRIPTS */    if (dump_output_immediately) {	return(HTSaveToFile(pres, anchor, sink));    }    me = (HTStream*)calloc(sizeof(*me),1);    if (me == NULL)	outofmem(__FILE__, "HTSaveAndExecute");    me->isa = &HTFWriter;    me->input_format = pres->rep;    me->output_format = pres->rep_out;    me->anchor = anchor;    me->sink = sink;    if (LYCachedTemp(fnam, &(anchor->FileCache))) {	me->fp = LYNewBinFile (fnam);    } else {	/*	 *  Check for a suffix.	 *  Save the file under a suitably suffixed name.	 */	if (!strcasecomp(pres->rep->name, "text/html")) {	    suffix = HTML_SUFFIX;	} else if (!strcasecomp(pres->rep->name, "text/plain")) {	    suffix = ".txt";	} else if (!strcasecomp(pres->rep->name,				"application/octet-stream")) {	    suffix = ".bin";	} else if ((suffix = HTFileSuffix(pres->rep, anchor->content_encoding)) == 0		   || *suffix != '.') {	    suffix = HTML_SUFFIX;	}	me->fp = LYOpenTemp(fnam, suffix, "wb");    }    if (!me->fp) {	HTAlert(CANNOT_OPEN_TEMP);	FREE(me);	return NULL;    }    StrAllocCopy(me->viewer_command, pres->command);    /*     *	Make command to process file.     */    me->end_command = 0;    HTAddParam(&(me->end_command), pres->command, 1, fnam);    HTEndParam(&(me->end_command), pres->command, 1);    /*     *	Make command to delete file.     */    me->remove_command = 0;    HTAddParam(&(me->remove_command), REMOVE_COMMAND, 1, fnam);    HTEndParam(&(me->remove_command), REMOVE_COMMAND, 1);    StrAllocCopy(anchor->FileCache, fnam);    return me;}