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