ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

pseh.h
Go to the documentation of this file.
00001 /*
00002     Copyright (c) 2004/2005 KJK::Hyperion
00003 
00004     Permission is hereby granted, free of charge, to any person obtaining a
00005     copy of this software and associated documentation files (the "Software"),
00006     to deal in the Software without restriction, including without limitation
00007     the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008     and/or sell copies of the Software, and to permit persons to whom the
00009     Software is furnished to do so, subject to the following conditions:
00010 
00011     The above copyright notice and this permission notice shall be included in
00012     all copies or substantial portions of the Software.
00013 
00014     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00017     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00019     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00020     DEALINGS IN THE SOFTWARE.
00021 */
00022 
00023 #ifndef KJK_PSEH_H_
00024 #define KJK_PSEH_H_
00025 
00026 /* Some useful macros */
00027 #if defined(__cplusplus)
00028 #   define _SEH_PVOID_CAST(TYPE_, P_) ((TYPE_)(P_))
00029 #else
00030 #   define _SEH_PVOID_CAST(TYPE_, P_) (P_)
00031 #endif
00032 
00033 #if defined(FIELD_OFFSET)
00034 #   define _SEH_FIELD_OFFSET FIELD_OFFSET
00035 #else
00036 #   include <stddef.h>
00037 #   define _SEH_FIELD_OFFSET offsetof
00038 #endif
00039 
00040 #if defined(CONTAINING_RECORD)
00041 #   define _SEH_CONTAINING_RECORD CONTAINING_RECORD
00042 #else
00043 #   define _SEH_CONTAINING_RECORD(ADDR_, TYPE_, FIELD_) \
00044     ((TYPE_ *)(((char *)(ADDR_)) - _SEH_FIELD_OFFSET(TYPE_, FIELD_)))
00045 #endif
00046 
00047 #if defined(__CONCAT)
00048 #   define _SEH_CONCAT __CONCAT
00049 #else
00050 #   define _SEH_CONCAT1(X_, Y_) X_ ## Y_
00051 #   define _SEH_CONCAT(X_, Y_) _SEH_CONCAT1(X_, Y_)
00052 #endif
00053 
00054 /*
00055     Note: just define __inline to an empty symbol if your C compiler doesn't
00056     support it
00057 */
00058 #ifdef __cplusplus
00059 #   ifndef __inline
00060 #       define __inline inline
00061 #   endif
00062 #endif
00063 
00064 /* Locals sharing support */
00065 #define _SEH_LOCALS_TYPENAME(BASENAME_) \
00066     struct _SEH_CONCAT(_SEHLocalsTag, BASENAME_)
00067 
00068 #define _SEH_DEFINE_LOCALS(BASENAME_) \
00069     _SEH_LOCALS_TYPENAME(BASENAME_)
00070 
00071 #define _SEH_DECLARE_LOCALS(BASENAME_) \
00072     _SEH_LOCALS_TYPENAME(BASENAME_) _SEHLocals; \
00073     _SEH_LOCALS_TYPENAME(BASENAME_) * _SEHPLocals; \
00074     _SEHPLocals = &_SEHLocals;
00075 
00076 /* Dummy locals */
00077 static int _SEHLocals;
00078 static void * const _SEHDummyLocals = &_SEHLocals;
00079 
00080 #include <pseh/framebased.h>
00081 
00082 #endif
00083 
00084 /* EOF */

Generated on Sun May 27 2012 04:33:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.