1/* u_close.c 2 * 3 * Copyright (c) 1996-2005 Mike Gleason, NcFTP Software. 4 * All rights reserved. 5 * 6 */ 7 8#include "syshdrs.h" 9#ifdef PRAGMA_HDRSTOP 10# pragma hdrstop 11#endif 12 13/* Closes the file supplied, if it isn't a std stream. */ 14void 15CloseFile(FILE **f) 16{ 17 if (*f != NULL) { 18 if ((*f != stdout) && (*f != stdin) && (*f != stderr)) 19 (void) fclose(*f); 20 *f = NULL; 21 } 22} /* CloseFile */ 23