static char *SccsId = "@(#)curs_error.c 4.1 (TU-Delft) 05/24/90";
/**********************************************************

Name/Version      : libfunc/4.1

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : GOULD

Author(s)         : O. Hol
Creation date     : 18-Feb-1988
Modified by       : 
Modification date : 


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1988 , All rights reserved
**********************************************************/
#include <stdio.h>
#include <curses.h>


/* curs_error() : can be called in the behavior part of function */
/*              : of function description when curses is used    */
/*              : message is given, simulation can be stopped    */

curs_error()
{
    int tmpc;

    move(23,0);
    printw("an error has been detected; do you want to continu? (y/n)");
    refresh();
    savetty();
#ifdef apollo
    crmode ();
#else
    cbreak();
#endif
    noecho();

    tmpc = getch();
    resetty();
    if ( tmpc != 'y' ) {
	    clear();
	    (void)mvcur(0, 79, 23, 0);
	    refresh();
	    endwin();
	    die (0);
    }
    else {
	clear();
	refresh();
    }
}
