Computer Chess Club Archives


Search

Terms

Messages

Subject: question about the function fclose and fcloseall

Author: Uri Blass

Date: 05:14:22 05/31/04


I think to close all open files and the simplest way seems to me to use
fcloseall that is supposed to close all open files.

when I look at crafty code I  see code like

if (book_file) fclose(book_file);
if (books_file) fclose(books_file);
if (book_lrn_file) fclose(book_lrn_file);
if (position_file) fclose(position_file);
if (position_lrn_file) fclose(position_lrn_file);
if (history_file) fclose(history_file);
if (log_file) fclose(log_file);

My question is if it is not more simple to use one fcloseall() function that
should close all the open files by definition.

Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.