Ignore:
Timestamp:
Dec 9, 2000, 8:19:42 PM (25 years ago)
Author:
umoeller
Message:

Major updates; timers, LVM, miscellaneous.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/except.h

    r7 r14  
    5353
    5454    /********************************************************************
    55      *                                                                  *
    56      *   Declarations                                                   *
    57      *                                                                  *
     55     *
     56     *   Declarations
     57     *
    5858     ********************************************************************/
     59
     60    // forward declaration
     61    typedef struct _EXCEPTIONREGISTRATIONRECORD2 *PEXCEPTIONREGISTRATIONRECORD2;
    5962
    6063    // "OnKill" function prototype for EXCEPTIONREGISTRATIONRECORD2
    6164    // added V0.9.0 (99-10-22) [umoeller]
    62     typedef VOID APIENTRY FNEXCONKILL(VOID);
    63     typedef FNEXCONKILL *PFNEXCONKILL;
     65    // removed V0.9.7 (2000-12-08) [umoeller]
     66    // typedef VOID APIENTRY FNEXCONKILL(PEXCEPTIONREGISTRATIONRECORD2);
     67    // typedef FNEXCONKILL *PFNEXCONKILL;
    6468
    6569    /*
     
    7781        PFN             pfnHandler;         // as in EXCEPTIONREGISTRATIONRECORD
    7882        jmp_buf         jmpThread;          // additional buffer for setjmp
    79         PFNEXCONKILL    pfnOnKill;          // subroutine to call upon process/thread termination
    80     } EXCEPTIONREGISTRATIONRECORD2, *PEXCEPTIONREGISTRATIONRECORD2;
     83        // PFNEXCONKILL    pfnOnKill;          // subroutine to call upon process/thread termination
     84        PVOID           pvUser;             // user ptr
     85    } EXCEPTIONREGISTRATIONRECORD2;
    8186
    8287    /*
     
    110115
    111116    /********************************************************************
    112      *                                                                  *
    113      *   Prototypes                                                     *
    114      *                                                                  *
     117     *
     118     *   Prototypes
     119     *
    115120     ********************************************************************/
    116121
     
    133138
    134139    /********************************************************************
    135      *                                                                  *
    136      *   Macros                                                         *
    137      *                                                                  *
     140     *
     141     *   Macros
     142     *
    138143     ********************************************************************/
    139144
     
    142147    #ifdef __NO_EXCEPTION_HANDLERS__
    143148        // exception handlers can completely be disabled
    144         #define TRY_LOUD(excptstruct, _pfnOnKill)
    145     #else
    146         #define TRY_LOUD(excptstruct, _pfnOnKill)                               \
     149        #define TRY_LOUD(excptstruct)
     150    #else
     151        #define TRY_LOUD(excptstruct)                                           \
    147152                {                                                               \
    148153                    EXCEPTSTRUCT          excptstruct = {0};                    \
    149154                    excptstruct.RegRec2.pfnHandler = (PFN)excHandlerLoud;       \
    150                     excptstruct.RegRec2.pfnOnKill = _pfnOnKill;                 \
    151155                    excptstruct.arc = DosSetExceptionHandler(                   \
    152156                                (PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2)); \
     
    159163                    if (excptstruct.ulExcpt == 0)                               \
    160164                    {
    161     #endif
    162 
    163     #ifdef __NO_EXCEPTION_HANDLERS__
    164         // exception handlers can completely be disabled
    165         #define TRY_QUIET(excptstruct, _pfnOnKill)
    166     #else
    167         #define TRY_QUIET(excptstruct, _pfnOnKill)                              \
     165
     166    #endif
     167
     168    #ifdef __NO_EXCEPTION_HANDLERS__
     169        // exception handlers can completely be disabled
     170        #define TRY_QUIET(excptstruct)
     171    #else
     172        #define TRY_QUIET(excptstruct)                                          \
    168173                {                                                               \
    169174                    EXCEPTSTRUCT          excptstruct = {0};                    \
    170175                    excptstruct.RegRec2.pfnHandler = (PFN)excHandlerQuiet;      \
    171                     excptstruct.RegRec2.pfnOnKill = _pfnOnKill;                 \
    172176                    excptstruct.arc = DosSetExceptionHandler(                   \
    173177                                (PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2)); \
     
    180184                    if (excptstruct.ulExcpt == 0)                               \
    181185                    {
     186
    182187    #endif
    183188
     
    192197                    else                                                        \
    193198                    { /* exception occured: */                                  \
    194                         DosUnsetExceptionHandler(                               \
    195                                 (PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2));
     199                        DosUnsetExceptionHandler((PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2));
    196200    #endif
    197201
Note: See TracChangeset for help on using the changeset viewer.