Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2
#include 
3
#include 
4
#include 
5
#include 
6
#include 
7
#include 
8
#include 
9
 
10
struct __atexit *__atexit_ptr = 0;
11
 
12
extern void (*__stdio_cleanup_hook)(void);
13
 
14
/* typedef void (*FUNC)(void);
15
extern FUNC djgpp_first_dtor[] __asm__("djgpp_first_dtor");
16
extern FUNC djgpp_last_dtor[] __asm__("djgpp_last_dtor"); */
17
 
18
int keypress_at_exit=0;
19
 
20
void exit(int status)
21
{
22
  int i;
23
  struct __atexit *a = __atexit_ptr;
24
//  dosemu_atexit();	// <- this function is already in atexit list
25
			// (see crt1.c). - diamond
26
/*  if(keypress_at_exit) while(!__menuet__getkey()); */
27
  while (a)
28
  {
29
    (a->__function)();
30
    a = a->__next;
31
  }
32
/*  if (__stdio_cleanup_hook)
33
    __stdio_cleanup_hook();
34
   for (i=0; i
35
    djgpp_first_dtor[i]();*/
36
  _exit(status);
37
}