home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / clib / progs / haswinlib / info / error < prev    next >
Encoding:
Text File  |  1991-02-04  |  4.3 KB  |  85 lines

  1.  
  2.                       The HASWIN window library.
  3.                      ===========================
  4.                       Copyright H.A. Shaw 1990.
  5.                      ===========================
  6.  
  7. Error handling under the HASWIN system.
  8. ---------------------------------------
  9.         A basic error display system is provided.  This is basically so that
  10. HASWIN can report its errors correctly to the user.  I have tried, and
  11. failed, to provide proper error trapping of low level errors such as hardware
  12. errors.  This awaits future releases.
  13.  
  14. int     haswin_hourglass(int onoff);
  15.         - This routine turns the hourglass on and off.  It uses the stack
  16.           and displays a simple hourglass without LEDS or %ages.  It is used
  17.           by HASWIN at times.  If "onoff" is HASWIN_TRUE the hourglass is
  18.           turned on, and if HASWIN_FALSE it is turned off.
  19.  
  20. int     haswin_initerrorhandlers();
  21.         - This initialises the error handler code.  At present it does
  22.           nothing except set one of HASWIN's internal flags.  It is called
  23.           by "haswin_initialise()" and therefore the user should not need to
  24.           call it directly.
  25.  
  26. void    haswin_errorbox(char *err);
  27.         - This routine calls the WIMP swi Wimp_ErrorBox to display the string
  28.           "err" in an error box.  An OK icon is provided and the window title
  29.           is "Error from <taskname>".
  30.  
  31. void    haswin_internalerror(char *err);
  32.         - This is the main way HASWIN reports errors to the screen.  If the
  33.           global HASWIN flag HASWIN_FLAGS_VERBOSE is set then the string
  34.           "err" is displayed using "haswin_errorbox()".  If it is clear the
  35.           routine returns winthout doing anything.
  36.  
  37. int     haswin_errorprintf(char *fmt, ...);
  38.         - This routine is a printf-like interface to haswin_errorbox().
  39.           "fmt" is the printf-like format string and the other arguments
  40.           follow.  vsprintf() is used to process the format string, and the
  41.           result passed to haswin_errorbox().  A maximum length of 1000
  42.           characters may be passed to haswin_errorbox().
  43.         - Returns the number of characters processed by the vsprintf() call
  44.           and passed to haswin_errorbox(), or 0 on any error.
  45.  
  46. int     haswin_interrorprintf(char *fmt, ...);
  47.         - This routine is a printf-like interface to haswin_internalerror().
  48.           "fmt" is the printf-like format string and the other arguments
  49.           follow.  vsprintf() is used to process the format string, and the
  50.           result passed to haswin_internalerror().  A maximum length of 1000
  51.           characters may be passed to haswin_internalerror().
  52.         - Returns the number of characters processed by the vsprintf() call
  53.           and passed to haswin_internalerror(), or 0 on any error.
  54.  
  55. int     haswin_ok_cancel(char *err);
  56. #define HASWIN_OK                 1
  57. #define HASWIN_CANCEL             2
  58.         - This routine calls the WIMP swi Wimp_ErrorBox to display the string
  59.           "err" in an error box.  Both OK and Cancel icons are provided and
  60.           the window title is "Error from <taskname>".
  61.         - returns either HASWIN_OK or HASWIN_CANCEL depending upon which
  62.           icon was clicked, or HASWIN_FALSE on any error.
  63.  
  64. int     haswin_ok_cancelprintf(char *fmt, ...);
  65.         - This routine provides a printf-like interface to haswin_ok_cancel()
  66.           "fmt" is the printf-like format string and the other arguments
  67.           follow.  vsprintf() is used to process the format string, and the
  68.           result passed to haswin_internalerror().  A maximum length of 1000
  69.           characters may be passed to haswin_internalerror().
  70.         - returns either HASWIN_OK or HASWIN_CANCEL depending upon which
  71.           icon was clicked, or HASWIN_FALSE on any error.
  72.  
  73. void    haswin_restoreerrorhandlers();
  74.         - This routine returns the error handlers to their default state.  It
  75.           is called by the routine "haswin_exit()" and therefore should never
  76.           need to be used by the user.  At present it actually does nothing.
  77.  
  78. int     haswin_setexittrap(int (*usercode)(int code));
  79.         - This routine sets a user routine "usercode" to be called upon a
  80.           call to "haswin_exit()".  When called it is passed the exit code.
  81.           It may clear up in any way required, but when it returns HASWIN
  82.           will exit. If "usercode" is 0 then any existing exit routine is
  83.           removed.
  84.  
  85.