Ignore:
Timestamp:
Sep 15, 2001, 11:47:44 AM (24 years ago)
Author:
sandervl
Message:

restored old version

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 $ */
    21/*
    32 * CRTDLL exit/abort/atexit functions
    4  *
     3 * 
    54 * Copyright 1996,1998 Marcus Meissner
    65 * Copyright 1996 Jukka Iivonen
     
    1110 * and whether they return to the caller (really!).
    1211 *            return      do
    13  *  Name      to caller?  cleanup?
     12 *  Name      to caller?  cleanup? 
    1413 *  _c_exit     Y           N
    1514 *  _cexit      Y           Y
     
    5554
    5655/*********************************************************************
    57  *  __dllonexit                     (CRTDLL.25)
     56 *      __dllonexit                             (CRTDLL.25)
    5857 */
    5958VOID CDECL CRTDLL___dllonexit ()
    60 {
     59{       
    6160  dprintf(("__dllonexit not implemented.\n"));
    6261  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     
    6564
    6665/*********************************************************************
    67  *  _abnormal_termination           (CRTDLL.36)
     66 *      _abnormal_termination                   (CRTDLL.36)
    6867 */
    6968int CDECL CRTDLL__abnormal_termination(void)
     
    8483{
    8584  dprintf2(("CRTDLL: _amsg_exit\n"));
    86 
     85 
    8786  // fprintf(stderr,strerror(errnum));
    8887  // ExitProcess(-1);
    89 
     88 
    9089  CRTDLL_fprintf(CRTDLL_stderr,"\nrun-time error:\nError Code %d\n",errnum);
    9190  CRTDLL__exit(255);
     
    9695 *                  _assert     (CRTDLL.041)
    9796 *
    98  * Print an assertion message and call abort(). Really only present
     97 * Print an assertion message and call abort(). Really only present 
    9998 * for win binaries. Winelib programs would typically use libc's
    10099 * version.
     
    103102{
    104103  dprintf2(("CRTDLL: _assert\n"));
    105 
     104 
    106105  CRTDLL_fprintf(CRTDLL_stderr,"Assertion failed: %s, file %s, line %d\n\n",
    107106                 (char*)str,(char*)file, line);
    108107  CRTDLL_abort();
    109 
     108 
    110109  // _assert(str, file, line);
    111110}
     
    120119  dprintf2(("_c_exit(%d)\n",ret));
    121120  FIXME("not calling CRTDLL cleanup\n");
    122 
     121 
    123122  /* dont exit, return to caller */
    124 
     123 
    125124  ExitProcess(ret);
    126125}
     
    136135  FIXME("not calling CRTDLL cleanup\n");
    137136  /* dont exit, return to caller */
    138 
     137 
    139138  ExitProcess(ret);
    140139}
     
    146145VOID CDECL CRTDLL__exit(LONG ret)
    147146{
    148   dprintf2(("CRTDLL: _exit (%08xh)\n",
     147  dprintf2(("CRTDLL: _exit (%08xh)\n", 
    149148            ret));
    150149  TRACE(":exit code %ld\n",ret);
     
    200199{
    201200  dprintf2(("CRTDLL: abort\n"));
    202 
     201 
    203202  CRTDLL_fprintf(CRTDLL_stderr,"\nabnormal program termination\n");
    204203  CRTDLL__exit(3);
     
    208207
    209208/*********************************************************************
    210  *                  atexit  (CRTDLL.342)
     209 *                  atexit      (CRTDLL.342)
    211210 *
    212211 * Register a function to be called when the process terminates.
     
    215214{
    216215  dprintf(("CRTDLL: atexit\n"));
    217 
     216 
    218217  return CRTDLL__onexit(func) == func ? 0 : -1;
    219 
     218 
    220219  // if (_atexit_n >= sizeof (_atexit_v) / sizeof (_atexit_v[0]))
    221220  //   return -1;
Note: See TracChangeset for help on using the changeset viewer.