home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 488.lha / modengine_v1.0 / mod_misc.c < prev    next >
C/C++ Source or Header  |  1991-03-07  |  807b  |  34 lines

  1. /* mod_misc.c
  2.  * Copyright (C) 1990 Commodore-Amiga, Inc.
  3.  * written by David N. Junod
  4.  *
  5.  * misc. functions
  6.  *
  7.  */
  8.  
  9. #include "mod.h"
  10.  
  11. /*--- AutoRequest support variables ---*/
  12. extern struct TextAttr Topaz80;
  13.  
  14. UBYTE ErrorBuffer[255] = "\000";
  15. struct IntuiText ErrorText =
  16. {2, 1, JAM1, 20, 15, &Topaz80, &ErrorBuffer[0], NULL};
  17.  
  18. struct IntuiText ctext =
  19. {AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE, AUTOLEFTEDGE,
  20.  AUTOTOPEDGE, &Topaz80, " CONTINUE ", NULL
  21. };
  22.  
  23. BOOL NotifyUser (struct Window * win, UBYTE * msg)
  24. {
  25.     struct IntuiText *errortext;
  26.     SHORT arwidth, arheight = 60, arwadj = 60;
  27.  
  28.     sprintf (ErrorBuffer, "%s\000", msg);
  29.     errortext = &ErrorText;
  30.     arwidth = IntuiTextLength (errortext) + arwadj;
  31.     return ((BOOL) AutoRequest (win, errortext, NULL, &ctext,
  32.                 0, 0, arwidth, arheight));
  33. }
  34.