home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 602b.lha / StripANSI_v1.0 / Source / source.lzh / alert.c < prev    next >
C/C++ Source or Header  |  1991-07-31  |  1KB  |  42 lines

  1. /*************************************************************************\
  2.  *                               Alert ()                                *
  3.  *       A routine for alerting user of problems or whatever!!!          *
  4.  *                                                                       *
  5.  *             Written by Syd L. Bolton, Copyright (c)1989               *
  6.  *                                                                       *
  7.  *          Version: 1.11  Date: 03/19/89  Time: 00:10:00 am             *
  8. \*************************************************************************/
  9.  
  10. #include "alert.h"
  11.  
  12. alert(text)
  13. UBYTE *text;
  14. {
  15. struct Window *AlertWindow;
  16. struct IntuiMessage *message;
  17. ULONG class;
  18. int alert_exit=0;
  19.  
  20. ATIText2.IText=text;
  21.  
  22. AlertWindow=OpenWindow(&AlertWin);
  23.  
  24. PrintIText(AlertWindow->RPort, &ATITextList, 0, 0);
  25.  
  26. DrawImage(AlertWindow->RPort, &AlertImage, 10, 13);
  27.  
  28.      do 
  29.       {
  30.             WaitPort(AlertWindow->UserPort);
  31.                   while( (message = (struct IntuiMessage *)
  32.                          GetMsg(AlertWindow->UserPort) ) != NULL)
  33.                   {
  34.                       class = message->Class;
  35.                       ReplyMsg(message);
  36.             if ( class == GADGETUP ) alert_exit=1;
  37.                   }
  38.       } while (alert_exit==0);
  39.  
  40. CloseWindow(AlertWindow);
  41. }
  42.