/* file: tools.h ------------------------------------------------------------- */ /* header file for the C tools library. */ /* modified September 2009 */ #ifndef TOOLS_H #define TOOLS_H /* --------------------------------------------------------------------------- */ /* Local definitions. */ /* Please enter your own name. */ /* --------------------------------------------------------------------------- */ #define NAME "Ima Goetting Closeur" #define CLASS "CPSC 427a/527a" #include #include /* for malloc() and calloc()*/ #include /* for time_t, time() and ctime()*/ #include #include #include /* for isspace() and isdigit() */ #include /* for INT_MAX */ #include /* for DOUBLE_MAX, etc. */ #include /* for functions with variable # of arguments */ #include /* for Unix-specific functions */ #include typedef char* string; typedef const char* const_string; typedef FILE* stream; /* --------------------------------------------------------------------------- */ /* Routine screen and process management.------------------------------------- */ /* --------------------------------------------------------------------------- */ void fbanner( stream sout ); #define banner() fbanner( stdout ) void bye( void ); void say( const_string format, ... ); void delay( int ); /* --------------------------------------------------------------------------- */ /* Error handling. ----------------------------------------------------------- */ /* --------------------------------------------------------------------------- */ int fatal( const_string format, ... ); /* --------------------------------------------------------------------------- */ /* Time and date. -------------------------------------------------------------*/ /* --------------------------------------------------------------------------- */ void when( string date, string hour ); string today( string date ); string oclock( string hour ); #endif