From 9c0e19a3be2288db79e2502e5fa450c3e20a668d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 9 May 2003 16:04:00 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r610, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611 --- pd/src/s_entry.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'pd/src/s_entry.c') diff --git a/pd/src/s_entry.c b/pd/src/s_entry.c index 354512e5..ad1e28fa 100644 --- a/pd/src/s_entry.c +++ b/pd/src/s_entry.c @@ -1,10 +1,51 @@ -/* In NT, this is all there is to pd; the rest sits in a "pdlib" dll so +/* In MSW, this is all there is to pd; the rest sits in a "pdlib" dll so that externs can link back to functions defined in pd. */ +#include int sys_main(int argc, char **argv); + /* WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler( + ULONG FirstHandler, + PVECTORED_EXCEPTION_HANDLER VectoredHandler ); */ + +#ifdef MSW +#if 0 +#incldue "winbase.h" + +LONG NTAPI VectoredExceptionHandler(void *PEXCEPTION_POINTERS) +{ + fprintf(stderr, "caught exception\n"); + return(EXCEPTION_CONTINUE_SEARCH); +} + + +int main(int argc, char **argv) +{ + printf("Pd entry point\n"); + AddVectoredExceptionHandler( + ULONG FirstHandler, + PVECTORED_EXCEPTION_HANDLER VectoredHandler ); + + +#endif + +#if 1 +int main(int argc, char **argv) +{ + __try + { + sys_main(argc, argv); + } + __finally + { + printf("caught an exception; stopping\n"); + } +} +#endif +#else /* not MSW */ int main(int argc, char **argv) { return (sys_main(argc, argv)); } +#endif -- cgit v1.2.1