home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / clib / abort.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-17  |  1.0 KB  |  61 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: abort.c,v 1.2 1997/01/17 14:16:53 digulla Exp $
  4.  
  5.     Desc: ANSI C function exit()
  6.     Lang: english
  7. */
  8. #include <exec/types.h>
  9. #include <setjmp.h>
  10.  
  11. extern LONG __startup_error;
  12. extern jmp_buf __startup_jmp_buf;
  13.  
  14. /*****************************************************************************
  15.  
  16.     NAME */
  17. #include <stdlib.h>
  18.  
  19.     void abort (
  20.  
  21. /*  SYNOPSIS */
  22.     void)
  23.  
  24. /*  FUNCTION
  25.     Causes abnormal program termination. If there is a signal handler
  26.     for SIGABORT, then the handler will be called. If the handler
  27.     returns, then the program is continued.
  28.  
  29.     INPUTS
  30.     None.
  31.  
  32.     RESULT
  33.     None. This function does not return.
  34.  
  35.     NOTES
  36.  
  37.     EXAMPLE
  38.     if (fatal_error)
  39.         abort ();
  40.  
  41.     BUGS
  42.     Signal handling is not implemented yet.
  43.  
  44.     SEE ALSO
  45.     signal(), exit()
  46.  
  47.     INTERNALS
  48.  
  49.     HISTORY
  50.     17.12.1996 digulla created
  51.  
  52. ******************************************************************************/
  53. {
  54.     __startup_error = 20;
  55.  
  56.     longjmp (__startup_jmp_buf, 1);
  57.  
  58.     /* never reached */
  59. } /* abort */
  60.  
  61.