home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / utility / resgrep0.lzh / ResGrep / src / output.cc < prev    next >
C/C++ Source or Header  |  1992-04-11  |  1KB  |  52 lines

  1. //
  2. // Hier sind alle Outputroutinen versammelt.
  3. // Besonders Fehler und Warnungsmeldungen.
  4. // Die Funktionen 'Error()', 'Warning()', 'Ask()'  und 'Message()' rufen alle
  5. // dieselbe Funktion auf, nur die ▄berschriften sind andere. Bei 'Ask()' wird
  6. // zusΣtzlich noch ein Button eingefⁿgt.
  7. //
  8.  
  9. #include <intuition/intuition.h>
  10. #include "export.h"
  11. #include "resgrep.h"
  12.  
  13. struct EasyStruct OutRequest =
  14. {
  15.    sizeof (struct EasyStruct),
  16.    0,
  17.    NULL,
  18.    NULL,
  19.    NULL
  20. };
  21.  
  22. int ReqOut(char *Headline, char *text, char *wahl)
  23. {
  24.    OutRequest.es_Title          = Headline;
  25.    OutRequest.es_TextFormat   = text;
  26.    OutRequest.es_GadgetFormat = wahl;
  27.  
  28.    return EasyRequest(theWindow,&OutRequest,0);
  29. }
  30.  
  31.  
  32. void ResError(char *text)
  33. {
  34.    ReqOut("ResGrep Error",text,"Oh, no!");
  35. }
  36.  
  37. void ResWarning(char *text)
  38. {
  39.    ReqOut("ResGrep Warning",text,"It'll better next time.");
  40. }
  41.  
  42. void ResMessage(char *text)
  43. {
  44.    ReqOut("ResGrep Message",text,"Read it!");
  45. }
  46.  
  47. int ResAsk(char *text, char *wahl)
  48. {
  49.    return ReqOut("ResGrep Message",text,wahl);
  50. }
  51.  
  52.