Main Page   Data Structures   File List   Data Fields   Globals  

input.c

Go to the documentation of this file.
00001 /*
00002  * InCode - [ input.c ]
00003  * (c) 2002, J. Weeks
00004  * jweeks@mailandnews.com
00005  *
00006  */
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #include <stdio.h>
00018 
00019 #include "input.h"
00020 
00021 FILE *input;
00022 
00023 int inputInit(char *fname) {
00024   input = fopen(fname, "r");
00025   return 0;
00026 }
00027 
00028 int inputClose(void) {
00029   fclose(input);
00030   return 0;
00031 }
00032 
00033 int inputExists(void) {
00034   return !feof(input);
00035 }
00036 
00037 int inputChar(char *c) {
00038   return(*c = fgetc(input));
00039 }

Generated on Thu Feb 14 09:15:11 2002 for InCode by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001