Ignore:
Timestamp:
Sep 5, 2001, 2:14:25 PM (24 years ago)
Author:
bird
Message:

Added $Id:$ keyword.

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 $ */
    12/*
    23 * CRTDLL exit/abort/atexit functions
    3  * 
     4 *
    45 * Copyright 1996,1998 Marcus Meissner
    56 * Copyright 1996 Jukka Iivonen
     
    1011 * and whether they return to the caller (really!).
    1112 *            return      do
    12  *  Name      to caller?  cleanup? 
     13 *  Name      to caller?  cleanup?
    1314 *  _c_exit     Y           N
    1415 *  _cexit      Y           Y
     
    5455
    5556/*********************************************************************
    56  *      __dllonexit                             (CRTDLL.25)
     57 *  __dllonexit                     (CRTDLL.25)
    5758 */
    5859VOID CDECL CRTDLL___dllonexit ()
    59 {       
     60{
    6061  dprintf(("__dllonexit not implemented.\n"));
    6162  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     
    6465
    6566/*********************************************************************
    66  *      _abnormal_termination                   (CRTDLL.36)
     67 *  _abnormal_termination           (CRTDLL.36)
    6768 */
    6869int CDECL CRTDLL__abnormal_termination(void)
     
    8384{
    8485  dprintf2(("CRTDLL: _amsg_exit\n"));
    85  
     86
    8687  // fprintf(stderr,strerror(errnum));
    8788  // ExitProcess(-1);
    88  
     89
    8990  CRTDLL_fprintf(CRTDLL_stderr,"\nrun-time error:\nError Code %d\n",errnum);
    9091  CRTDLL__exit(255);
     
    9596 *                  _assert     (CRTDLL.041)
    9697 *
    97  * Print an assertion message and call abort(). Really only present 
     98 * Print an assertion message and call abort(). Really only present
    9899 * for win binaries. Winelib programs would typically use libc's
    99100 * version.
     
    102103{
    103104  dprintf2(("CRTDLL: _assert\n"));
    104  
     105
    105106  CRTDLL_fprintf(CRTDLL_stderr,"Assertion failed: %s, file %s, line %d\n\n",
    106107                 (char*)str,(char*)file, line);
    107108  CRTDLL_abort();
    108  
     109
    109110  // _assert(str, file, line);
    110111}
     
    119120  dprintf2(("_c_exit(%d)\n",ret));
    120121  FIXME("not calling CRTDLL cleanup\n");
    121  
     122
    122123  /* dont exit, return to caller */
    123  
     124
    124125  ExitProcess(ret);
    125126}
     
    135136  FIXME("not calling CRTDLL cleanup\n");
    136137  /* dont exit, return to caller */
    137  
     138
    138139  ExitProcess(ret);
    139140}
     
    145146VOID CDECL CRTDLL__exit(LONG ret)
    146147{
    147   dprintf2(("CRTDLL: _exit (%08xh)\n", 
     148  dprintf2(("CRTDLL: _exit (%08xh)\n",
    148149            ret));
    149150  TRACE(":exit code %ld\n",ret);
     
    199200{
    200201  dprintf2(("CRTDLL: abort\n"));
    201  
     202
    202203  CRTDLL_fprintf(CRTDLL_stderr,"\nabnormal program termination\n");
    203204  CRTDLL__exit(3);
     
    207208
    208209/*********************************************************************
    209  *                  atexit      (CRTDLL.342)
     210 *                  atexit  (CRTDLL.342)
    210211 *
    211212 * Register a function to be called when the process terminates.
     
    214215{
    215216  dprintf(("CRTDLL: atexit\n"));
    216  
     217
    217218  return CRTDLL__onexit(func) == func ? 0 : -1;
    218  
     219
    219220  // if (_atexit_n >= sizeof (_atexit_v) / sizeof (_atexit_v[0]))
    220221  //   return -1;
Note: See TracChangeset for help on using the changeset viewer.