#include "utility.h"
int graphics_ok()
/*============================================================================*/
/* PURPOSE: DETERMINE WHETHER OR NOT GRAPHICS IS AVAILABLE TO THE PROGRAM.
/* OUTPUTS:
/* FUNCTION VALUE TRUE IF GRAPHICS IS AVAILABLE, FALSE OTHERWISE.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 24 SEPTEMBER 1992 MVG
*/
{
/* GRAPHICS IS AVAILABLE ONLY IF STDIN IS A TTY *AND* THE USER IS */
/* RUNNING THE PROGRAM ON THE MAIN (GRAPHICS) CONSOLE. */
return(isatty(0) && strcmp(getenv("TERM"),"iris-ansi")==0);
}
|