/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * globals.cpp * * Globally accessed functions for doc.cpp (Dr. Doc) * * Author : Michele D. Estebon * created : 10/29/96 * for CS1704: Intro to Data Structures and Software Design * Virginia Tech, Blacksburg, Virginia * revision 1.1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include #include #include // Fexists file operations #include "bool.h" #include "globals.h" // function prototypes #include "curses.h" #include "display.h" //*************************************************************************************// // FUNCTION : Fexists // CALLS : --- // IN : fname (filename) // OUT : --- (function returns true if file is found) // from CS1704 program tips (ND Barnette) //*************************************************************************************// Boolean Fexists( fnametype fname ) { int failed; ifstream infile (fname, ios::nocreate); failed = infile.fail(); infile.close(); return (!failed); } // Fexists /*------------------------------------------------------------- FUNCTION : No_imp IN : --- OUT : --- CALLS : IOerr (display.h) CALLED BY: main PRE : User has selected an option which has not been implemented code-wise POST : Message is displayed to IOscreen --------------------------------------------------------------*/ void No_imp(winptr &IOwin) { IOerr(IOwin, NO_IMP); } // turns off input buffering void Nobuff(void) { raw(); noecho(); } // turns on input buffering void Buffin(void) { noraw(); echo(); }