Add FS #10214. Initial commit of the original PDa code for the GSoC Pure Data plugin...
[kugel-rb.git] / apps / plugins / pdbox / PDa / src / s_entry.c
blob23a5cb7fe35e70babdede06270786782f684ca36
1 /* In MSW, this is all there is to pd; the rest sits in a "pdlib" dll so
2 that externs can link back to functions defined in pd. */
4 #include <stdio.h>
6 int sys_main(int argc, char **argv);
8 /* WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler(
9 ULONG FirstHandler,
10 PVECTORED_EXCEPTION_HANDLER VectoredHandler ); */
12 #ifdef MSW
13 #if 0
14 #incldue "winbase.h"
16 LONG NTAPI VectoredExceptionHandler(void *PEXCEPTION_POINTERS)
18 fprintf(stderr, "caught exception\n");
19 return(EXCEPTION_CONTINUE_SEARCH);
23 int main(int argc, char **argv)
25 printf("Pd entry point\n");
26 AddVectoredExceptionHandler(
27 ULONG FirstHandler,
28 PVECTORED_EXCEPTION_HANDLER VectoredHandler );
31 #endif
33 #if 1
34 int main(int argc, char **argv)
36 __try
38 sys_main(argc, argv);
40 __finally
42 printf("caught an exception; stopping\n");
45 #endif
46 #else /* not MSW */
47 int main(int argc, char **argv)
49 return (sys_main(argc, argv));
51 #endif
52 /* In MSW, this is all there is to pd; the rest sits in a "pdlib" dll so
53 that externs can link back to functions defined in pd. */
55 #include <stdio.h>
57 int sys_main(int argc, char **argv);
59 /* WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler(
60 ULONG FirstHandler,
61 PVECTORED_EXCEPTION_HANDLER VectoredHandler ); */
63 #ifdef MSW
64 #if 0
65 #incldue "winbase.h"
67 LONG NTAPI VectoredExceptionHandler(void *PEXCEPTION_POINTERS)
69 fprintf(stderr, "caught exception\n");
70 return(EXCEPTION_CONTINUE_SEARCH);
74 int main(int argc, char **argv)
76 printf("Pd entry point\n");
77 AddVectoredExceptionHandler(
78 ULONG FirstHandler,
79 PVECTORED_EXCEPTION_HANDLER VectoredHandler );
82 #endif
84 #if 1
85 int main(int argc, char **argv)
87 __try
89 sys_main(argc, argv);
91 __finally
93 printf("caught an exception; stopping\n");
96 #endif
97 #else /* not MSW */
98 int main(int argc, char **argv)
100 return (sys_main(argc, argv));
102 #endif