Author: hyperion
Date: Mon Feb 26 18:55:43 2007
New Revision: 25909
URL:
http://svn.reactos.org/svn/reactos?rev=25909&view=rev
Log:
Reformatted, for real
Modified:
trunk/reactos/lib/pseh/framebased.c
Modified: trunk/reactos/lib/pseh/framebased.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/framebased.c?rev=…
==============================================================================
--- trunk/reactos/lib/pseh/framebased.c (original)
+++ trunk/reactos/lib/pseh/framebased.c Mon Feb 26 18:55:43 2007
@@ -44,194 +44,194 @@
static void __stdcall _SEHLocalUnwind
(
- _SEHPortableFrame_t * frame,
- _SEHPortableTryLevel_t * dsttrylevel
-)
-{
- _SEHPortableTryLevel_t * trylevel;
-
- for
- (
- trylevel = frame->SPF_TopTryLevel;
- trylevel != dsttrylevel;
- trylevel = trylevel->SPT_Next
- )
- {
- _SEHFinally_t pfnFinally;
-
- /* ASSERT(trylevel); */
-
- pfnFinally = trylevel->SPT_Handlers->SH_Finally;
-
- if(pfnFinally)
- pfnFinally(frame);
- }
+ _SEHPortableFrame_t * frame,
+ _SEHPortableTryLevel_t * dsttrylevel
+)
+{
+ _SEHPortableTryLevel_t * trylevel;
+
+ for
+ (
+ trylevel = frame->SPF_TopTryLevel;
+ trylevel != dsttrylevel;
+ trylevel = trylevel->SPT_Next
+ )
+ {
+ _SEHFinally_t pfnFinally;
+
+ /* ASSERT(trylevel); */
+
+ pfnFinally = trylevel->SPT_Handlers->SH_Finally;
+
+ if(pfnFinally)
+ pfnFinally(frame);
+ }
}
static void __cdecl _SEHCallHandler
(
- _SEHPortableFrame_t * frame,
- _SEHPortableTryLevel_t * trylevel
-)
-{
- _SEHGlobalUnwind(frame);
- _SEHLocalUnwind(frame, trylevel);
- frame->SPF_Handler(trylevel);
+ _SEHPortableFrame_t * frame,
+ _SEHPortableTryLevel_t * trylevel
+)
+{
+ _SEHGlobalUnwind(frame);
+ _SEHLocalUnwind(frame, trylevel);
+ frame->SPF_Handler(trylevel);
}
static int __cdecl _SEHFrameHandler
(
- struct _EXCEPTION_RECORD * ExceptionRecord,
- void * EstablisherFrame,
- struct _CONTEXT * ContextRecord,
- void * DispatcherContext
-)
-{
- _SEHPortableFrame_t * frame;
-
- _SEHCleanHandlerEnvironment();
-
- frame = EstablisherFrame;
-
- /* Unwinding */
- if(ExceptionRecord->ExceptionFlags & (4 | 2))
- _SEHLocalUnwind(frame, NULL);
- /* Handling */
- else
- {
- int ret;
- _SEHPortableTryLevel_t * trylevel;
-
- if(ExceptionRecord->ExceptionCode)
- frame->SPF_Code = ExceptionRecord->ExceptionCode;
- else
- frame->SPF_Code = 0xC0000001;
-
- for
- (
- trylevel = frame->SPF_TopTryLevel;
- trylevel != NULL;
- trylevel = trylevel->SPT_Next
- )
- {
- _SEHFilter_t pfnFilter = trylevel->SPT_Handlers->SH_Filter;
-
- switch((UINT_PTR)pfnFilter)
- {
- case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER):
- case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH):
- case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_EXECUTION):
- {
- ret = (int)((UINT_PTR)pfnFilter) - 2;
- break;
- }
-
- default:
- {
- if(trylevel->SPT_Handlers->SH_Filter)
- {
- EXCEPTION_POINTERS ep;
-
- ep.ExceptionRecord = ExceptionRecord;
- ep.ContextRecord = ContextRecord;
-
- ret = pfnFilter(&ep, frame);
- }
- else
- ret = _SEH_CONTINUE_SEARCH;
-
- break;
- }
- }
-
- /* _SEH_CONTINUE_EXECUTION */
- if(ret < 0)
- return ExceptionContinueExecution;
- /* _SEH_EXECUTE_HANDLER */
- else if(ret > 0)
- _SEHCallHandler(frame, trylevel);
- /* _SEH_CONTINUE_SEARCH */
- else
- continue;
- }
-
- /* FALLTHROUGH */
- }
-
- return ExceptionContinueSearch;
+ struct _EXCEPTION_RECORD * ExceptionRecord,
+ void * EstablisherFrame,
+ struct _CONTEXT * ContextRecord,
+ void * DispatcherContext
+)
+{
+ _SEHPortableFrame_t * frame;
+
+ _SEHCleanHandlerEnvironment();
+
+ frame = EstablisherFrame;
+
+ /* Unwinding */
+ if(ExceptionRecord->ExceptionFlags & (4 | 2))
+ _SEHLocalUnwind(frame, NULL);
+ /* Handling */
+ else
+ {
+ int ret;
+ _SEHPortableTryLevel_t * trylevel;
+
+ if(ExceptionRecord->ExceptionCode)
+ frame->SPF_Code = ExceptionRecord->ExceptionCode;
+ else
+ frame->SPF_Code = 0xC0000001;
+
+ for
+ (
+ trylevel = frame->SPF_TopTryLevel;
+ trylevel != NULL;
+ trylevel = trylevel->SPT_Next
+ )
+ {
+ _SEHFilter_t pfnFilter = trylevel->SPT_Handlers->SH_Filter;
+
+ switch((UINT_PTR)pfnFilter)
+ {
+ case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER):
+ case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH):
+ case (UINT_PTR)_SEH_STATIC_FILTER(_SEH_CONTINUE_EXECUTION):
+ {
+ ret = (int)((UINT_PTR)pfnFilter) - 2;
+ break;
+ }
+
+ default:
+ {
+ if(trylevel->SPT_Handlers->SH_Filter)
+ {
+ EXCEPTION_POINTERS ep;
+
+ ep.ExceptionRecord = ExceptionRecord;
+ ep.ContextRecord = ContextRecord;
+
+ ret = pfnFilter(&ep, frame);
+ }
+ else
+ ret = _SEH_CONTINUE_SEARCH;
+
+ break;
+ }
+ }
+
+ /* _SEH_CONTINUE_EXECUTION */
+ if(ret < 0)
+ return ExceptionContinueExecution;
+ /* _SEH_EXECUTE_HANDLER */
+ else if(ret > 0)
+ _SEHCallHandler(frame, trylevel);
+ /* _SEH_CONTINUE_SEARCH */
+ else
+ continue;
+ }
+
+ /* FALLTHROUGH */
+ }
+
+ return ExceptionContinueSearch;
}
void __stdcall _SEHEnterFrame_s
(
- _SEHPortableFrame_t * frame,
- _SEHPortableTryLevel_t * trylevel
-)
-{
- _SEHEnterFrame_f(frame, trylevel);
+ _SEHPortableFrame_t * frame,
+ _SEHPortableTryLevel_t * trylevel
+)
+{
+ _SEHEnterFrame_f(frame, trylevel);
}
void __stdcall _SEHEnterTry_s(_SEHPortableTryLevel_t * trylevel)
{
- _SEHEnterTry_f(trylevel);
+ _SEHEnterTry_f(trylevel);
}
void __stdcall _SEHLeave_s(void)
{
- _SEHLeave_f();
+ _SEHLeave_f();
}
void _SEH_FASTCALL _SEHEnterFrame_f
(
- _SEHPortableFrame_t * frame,
- _SEHPortableTryLevel_t * trylevel
-)
-{
- /* ASSERT(frame); */
- /* ASSERT(trylevel); */
- frame->SPF_Registration.SER_Handler = _SEHFrameHandler;
- frame->SPF_Code = 0;
- frame->SPF_TopTryLevel = trylevel;
- trylevel->SPT_Next = NULL;
- _SEHRegisterFrame(&frame->SPF_Registration);
+ _SEHPortableFrame_t * frame,
+ _SEHPortableTryLevel_t * trylevel
+)
+{
+ /* ASSERT(frame); */
+ /* ASSERT(trylevel); */
+ frame->SPF_Registration.SER_Handler = _SEHFrameHandler;
+ frame->SPF_Code = 0;
+ frame->SPF_TopTryLevel = trylevel;
+ trylevel->SPT_Next = NULL;
+ _SEHRegisterFrame(&frame->SPF_Registration);
}
void _SEH_FASTCALL _SEHEnterTry_f(_SEHPortableTryLevel_t * trylevel)
{
- _SEHPortableFrame_t * frame;
-
- frame = _SEH_CONTAINING_RECORD
- (
- _SEHCurrentRegistration(),
- _SEHPortableFrame_t,
- SPF_Registration
- );
-
- trylevel->SPT_Next = frame->SPF_TopTryLevel;
- frame->SPF_TopTryLevel = trylevel;
+ _SEHPortableFrame_t * frame;
+
+ frame = _SEH_CONTAINING_RECORD
+ (
+ _SEHCurrentRegistration(),
+ _SEHPortableFrame_t,
+ SPF_Registration
+ );
+
+ trylevel->SPT_Next = frame->SPF_TopTryLevel;
+ frame->SPF_TopTryLevel = trylevel;
}
void _SEH_FASTCALL _SEHLeave_f(void)
{
- _SEHPortableFrame_t * frame;
- _SEHPortableTryLevel_t * trylevel;
-
- frame = _SEH_CONTAINING_RECORD
- (
- _SEHCurrentRegistration(),
- _SEHPortableFrame_t,
- SPF_Registration
- );
-
- /* ASSERT(frame); */
-
- trylevel = frame->SPF_TopTryLevel;
-
- /* ASSERT(trylevel); */
-
- if(trylevel->SPT_Next)
- frame->SPF_TopTryLevel = trylevel->SPT_Next;
- else
- _SEHUnregisterFrame();
+ _SEHPortableFrame_t * frame;
+ _SEHPortableTryLevel_t * trylevel;
+
+ frame = _SEH_CONTAINING_RECORD
+ (
+ _SEHCurrentRegistration(),
+ _SEHPortableFrame_t,
+ SPF_Registration
+ );
+
+ /* ASSERT(frame); */
+
+ trylevel = frame->SPF_TopTryLevel;
+
+ /* ASSERT(trylevel); */
+
+ if(trylevel->SPT_Next)
+ frame->SPF_TopTryLevel = trylevel->SPT_Next;
+ else
+ _SEHUnregisterFrame();
}
/* EOF */