Subversion Repositories Kolibri OS

Rev

Rev 4874 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4874 Rev 4921
1
/* NetWare can not use this implementation of abort.  It provides its
1
/* NetWare can not use this implementation of abort.  It provides its
2
   own version of abort in clib.nlm.  If we can not use clib.nlm, then
2
   own version of abort in clib.nlm.  If we can not use clib.nlm, then
3
   we must write abort in sys/netware.  */
3
   we must write abort in sys/netware.  */
4
 
4
 
5
#ifdef ABORT_PROVIDED
5
#ifdef ABORT_PROVIDED
6
 
6
 
7
int _dummy_abort = 1;
7
int _dummy_abort = 1;
8
 
8
 
9
#else
9
#else
10
 
10
 
11
/*
11
/*
12
FUNCTION
12
FUNCTION
13
<>---abnormal termination of a program
13
<>---abnormal termination of a program
14
 
14
 
15
INDEX
15
INDEX
16
	abort
16
	abort
17
 
17
 
18
ANSI_SYNOPSIS
18
ANSI_SYNOPSIS
19
	#include 
19
	#include 
20
	void abort(void);
20
	void abort(void);
21
 
21
 
22
TRAD_SYNOPSIS
22
TRAD_SYNOPSIS
23
	#include 
23
	#include 
24
	void abort();
24
	void abort();
25
 
25
 
26
DESCRIPTION
26
DESCRIPTION
27
Use <> to signal that your program has detected a condition it
27
Use <> to signal that your program has detected a condition it
28
cannot deal with.  Normally, <> ends your program's execution.
28
cannot deal with.  Normally, <> ends your program's execution.
29
 
29
 
30
Before terminating your program, <> raises the exception <>
30
Before terminating your program, <> raises the exception <>
31
(using `<>').  If you have used <> to register
31
(using `<>').  If you have used <> to register
32
an exception handler for this condition, that handler has the
32
an exception handler for this condition, that handler has the
33
opportunity to retain control, thereby avoiding program termination.
33
opportunity to retain control, thereby avoiding program termination.
34
 
34
 
35
In this implementation, <> does not perform any stream- or
35
In this implementation, <> does not perform any stream- or
36
file-related cleanup (the host environment may do so; if not, you can
36
file-related cleanup (the host environment may do so; if not, you can
37
arrange for your program to do its own cleanup with a <>
37
arrange for your program to do its own cleanup with a <>
38
exception handler).
38
exception handler).
39
 
39
 
40
RETURNS
40
RETURNS
41
<> does not return to its caller.
41
<> does not return to its caller.
42
 
42
 
43
PORTABILITY
43
PORTABILITY
44
ANSI C requires <>.
44
ANSI C requires <>.
45
 
45
 
46
Supporting OS subroutines required: <<_exit>> and optionally, <>.
46
Supporting OS subroutines required: <<_exit>> and optionally, <>.
47
*/
47
*/
48
 
48
 
49
#include 
49
#include 
50
#include 
50
#include 
51
#include 
51
#include 
52
 
52
 
53
_VOID
53
_VOID
54
_DEFUN_VOID (abort)
54
_DEFUN_VOID (abort)
55
{
55
{
56
#ifdef ABORT_MESSAGE
56
#ifdef ABORT_MESSAGE
57
  write (2, "Abort called\n", sizeof ("Abort called\n")-1);
57
  write (2, "Abort called\n", sizeof ("Abort called\n")-1);
58
#endif
58
#endif
59
 
59
 
60
  while (1)
60
  while (1)
61
    {
61
    {
62
//      raise (SIGABRT);
62
      raise (SIGABRT);
63
      _exit (1);
63
      _exit (1);
64
    }
64
    }
65
}
65
}
66
 
66
 
67
#endif
67
#endif