| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflmesg.h" int open_message_file (const char *filename)
Opens the specified error message file for reading. Returns 0 if the file exists and is readable, otherwise returns -1. Use this function before calling print message(). You can keep just one message file open at once; this function closes any previously-opened message file. This was done on purpose: it is common to open a message file for an entire application in the main function, then refer to it at other points in the code. It is a pain to pass file handles around the entire application, and global variables are generally a bad idea.
{ int feedback; close message file (); msgfile = file open (filename, 'r'); if (msgfile) feedback = 0; else feedback = -1; return (feedback); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |