#ifndef OPEN_H #define OPEN_H /* /////////////////////////////////////////////////////////////// // // // open.h - gets a stream definition from user // // ver 1.0 // // manual page // // // // Language: Borland C, ver 3.0 // // Platform: Gateway 386/25, win95.400 // // Application: CSE784 demonstration // // Author: Jim Fawcett, 123 Link Hall, Syracuse Univ. // // (315) 443-2654, jfawcett@cat.syr.edu // // // /////////////////////////////////////////////////////////////// open Operations: ================ This module is part of a simple demonstration of how modules are constructed. Its purpose is to attach a file to an input or output stream. If a file name is provided it is used. Otherwise the program user is asked to supply one. FILE *fptr = getRStream("foo.bar"); - attempts to open file foo.bar for reading FILE *fptr = getRStream(0); - asks user to supply a filename for reading - returns pointer to stream FILE *fptr = getWStream("fee.bar"); - attempts to open file fee.bar for writing FILE *fptr = getWStream(0); - asks user to supply a filename for writing - returns pointer to stream */ /* */ /* /////////////////////////////////////////////////////////////// // // // maintenance page // // // /////////////////////////////////////////////////////////////// // // // Build Process // // // // Files Required: // // open.h, open.c, lines.h, lines.c // // // // Integrated Environment: // // - close any open project // // - select Options\Compiler\Code generation\defines // // enter TEST_OPEN // // - run // // // // Command Line Environment: // // tcc -w+ -DTEST_OPEN open.c // // // /////////////////////////////////////////////////////////////// Maintenance History: ver 1.0 : 07 Sep 96 */ /* /////////////////////////////////////////////////////////////// // // // Declarations // // // /////////////////////////////////////////////////////////////// */ #include /* FILE */ FILE *getRStream(char *name); /* returns pointer to stream */ FILE *getWStream(char *name); /* returns pointer to stream */ #endif