home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / SoundSwirl / error.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-14  |  614 b   |  27 lines  |  [TEXT/KAHL]

  1. #include "main.h"
  2.  
  3.  
  4. /***************************
  5. ** Error()
  6. **
  7. ** Error displaying routine.
  8. ****************************/
  9.  
  10. void Error(Str255 s1, Str255 s2, Str255 s3, Str255 s4)
  11. {
  12.     DialogPtr errorDlog;
  13.     GrafPtr savedPort;
  14.     int itemHit = -9;
  15.     
  16.     GetPort( &savedPort);
  17.     ParamText(s1, s2, s3, s4);
  18.     errorDlog = GetNewDialog(ErrorDlogID, NULL, (void*)(-1) );
  19.     if (errorDlog == NULL) {SysBeep(5);return;}
  20.     SelectWindow((WindowPtr)errorDlog);
  21.     while (itemHit != ErrorOKButt)
  22.         ModalDialog( NULL, &itemHit);
  23.     DisposDialog(errorDlog);
  24.     errorDlog = NULL;
  25.     SetPort(savedPort);    /* restore the old port */
  26. } /* DoAbout() */
  27.