home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / clib / progs / utilslib / c / Panic < prev    next >
Encoding:
Text File  |  1991-05-12  |  448 b   |  20 lines

  1. /* C.Panic - Collapse in a heap, with an error message */
  2.  
  3. #include <stdarg.h>
  4. #include <stdlib.h>
  5. #include <stdio.h>
  6. #include "utils.h"
  7.  
  8. /* Return code -1 is used, as this will give an OS error "Return code
  9.  * too large", which is reported back to the user from the supervisor.
  10.  */
  11.  
  12. void panic (const char *format, ...)
  13. {
  14.         va_list ap;
  15.         va_start(ap,format);
  16.         vfprintf(stderr,format,ap);
  17.         va_end(ap);
  18.         exit(-1);
  19. }
  20.