/* *****                                                            *****
** *****           Program created by Ken Farinsky, 1986.           *****
** *****                                                            *****
**
** All material contained herein may be used in any way desired.
**                    >>>>> i.e.  PUBLIC DOMAIN. <<<<<
** Not limited to any single bulletin board - can be freely transferred.
**
** Original distribution through:
**     Slipped Disk, Inc.
**     Madison Heights,  MI  48071
**     (313) 583-9803
**
** Distributed in the hopes of increasing the level of understanding of the
** Amiga personal computer.  Even the best computer can only succeed with
** the proper software support.
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include <functions.h>
#include <view.h>

static struct IntuiText msg3_text =
   {-1L,-1L,JAM1,5L,24L,NULL,NULL,NULL} ;
static struct IntuiText msg2_text =
   {-1L,-1L,JAM1,5L,16L,NULL,NULL,&msg3_text} ;
static struct IntuiText msg1_text =
   {-1L,-1L,JAM1,5L,8L,NULL,NULL,&msg2_text} ;
static struct IntuiText yes_text =
   {-1L,-1L,JAM1,5L,2L,NULL,NULL,NULL} ;
static struct IntuiText no_text =
   {-1L,-1L,JAM1,5L,2L,NULL,NULL,NULL} ;

/*----------------------------------------------------------------------
** error() - puts up an autorequester for text display.  does not
** require a window, may be called from anywhere (even background progs!)
** good way to display information.
**
** the text is passed in as arguements.  only used for credits in this code.
*/
void         error( msg1, msg2, msg3)
UBYTE         *msg1 ;
UBYTE         *msg2 ;
UBYTE         *msg3 ;
{
struct Window            *win ;
static struct NewWindow      new_win =
   {
   0,0,400,70,-1,-1,
   GADGETUP | GADGETDOWN,
   SIMPLE_REFRESH | BORDERLESS | ACTIVATE | NOCAREREFRESH | RMBTRAP,
   NULL,NULL,NULL,NULL,NULL,0,0,0,0,WBENCHSCREEN,
   } ;

win = OpenWindow( &new_win) ;
msg1_text.IText = msg1 ;
msg2_text.IText = msg2 ;
msg3_text.IText = msg3 ;
no_text.IText = " OK " ;
AutoRequest(win,&msg1_text,NULL,&no_text,NULL,NULL,400L,70L) ;
CloseWindow(win) ;
}
