Changeset 6645 for trunk/src/crtdll/exit.c
- Timestamp:
- Sep 5, 2001, 2:14:25 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/crtdll/exit.c
r4667 r6645 1 /* $Id: exit.c,v 1.2 2001-09-05 12:14:24 bird Exp $ */ 1 2 /* 2 3 * CRTDLL exit/abort/atexit functions 3 * 4 * 4 5 * Copyright 1996,1998 Marcus Meissner 5 6 * Copyright 1996 Jukka Iivonen … … 10 11 * and whether they return to the caller (really!). 11 12 * return do 12 * Name to caller? cleanup? 13 * Name to caller? cleanup? 13 14 * _c_exit Y N 14 15 * _cexit Y Y … … 54 55 55 56 /********************************************************************* 56 * __dllonexit(CRTDLL.25)57 * __dllonexit (CRTDLL.25) 57 58 */ 58 59 VOID CDECL CRTDLL___dllonexit () 59 { 60 { 60 61 dprintf(("__dllonexit not implemented.\n")); 61 62 SetLastError(ERROR_CALL_NOT_IMPLEMENTED); … … 64 65 65 66 /********************************************************************* 66 * _abnormal_termination(CRTDLL.36)67 * _abnormal_termination (CRTDLL.36) 67 68 */ 68 69 int CDECL CRTDLL__abnormal_termination(void) … … 83 84 { 84 85 dprintf2(("CRTDLL: _amsg_exit\n")); 85 86 86 87 // fprintf(stderr,strerror(errnum)); 87 88 // ExitProcess(-1); 88 89 89 90 CRTDLL_fprintf(CRTDLL_stderr,"\nrun-time error:\nError Code %d\n",errnum); 90 91 CRTDLL__exit(255); … … 95 96 * _assert (CRTDLL.041) 96 97 * 97 * Print an assertion message and call abort(). Really only present 98 * Print an assertion message and call abort(). Really only present 98 99 * for win binaries. Winelib programs would typically use libc's 99 100 * version. … … 102 103 { 103 104 dprintf2(("CRTDLL: _assert\n")); 104 105 105 106 CRTDLL_fprintf(CRTDLL_stderr,"Assertion failed: %s, file %s, line %d\n\n", 106 107 (char*)str,(char*)file, line); 107 108 CRTDLL_abort(); 108 109 109 110 // _assert(str, file, line); 110 111 } … … 119 120 dprintf2(("_c_exit(%d)\n",ret)); 120 121 FIXME("not calling CRTDLL cleanup\n"); 121 122 122 123 /* dont exit, return to caller */ 123 124 124 125 ExitProcess(ret); 125 126 } … … 135 136 FIXME("not calling CRTDLL cleanup\n"); 136 137 /* dont exit, return to caller */ 137 138 138 139 ExitProcess(ret); 139 140 } … … 145 146 VOID CDECL CRTDLL__exit(LONG ret) 146 147 { 147 dprintf2(("CRTDLL: _exit (%08xh)\n", 148 dprintf2(("CRTDLL: _exit (%08xh)\n", 148 149 ret)); 149 150 TRACE(":exit code %ld\n",ret); … … 199 200 { 200 201 dprintf2(("CRTDLL: abort\n")); 201 202 202 203 CRTDLL_fprintf(CRTDLL_stderr,"\nabnormal program termination\n"); 203 204 CRTDLL__exit(3); … … 207 208 208 209 /********************************************************************* 209 * atexit 210 * atexit (CRTDLL.342) 210 211 * 211 212 * Register a function to be called when the process terminates. … … 214 215 { 215 216 dprintf(("CRTDLL: atexit\n")); 216 217 217 218 return CRTDLL__onexit(func) == func ? 0 : -1; 218 219 219 220 // if (_atexit_n >= sizeof (_atexit_v) / sizeof (_atexit_v[0])) 220 221 // return -1;
Note:
See TracChangeset
for help on using the changeset viewer.