xref: /petsc/src/sys/classes/draw/impls/x/xioerr.c (revision 4e8208cbcbc709572b8abe32f33c78b69c819375)
1 #include <../src/sys/classes/draw/impls/x/ximpl.h> /*I  "petscsys.h" I*/
2 
3 #if defined(PETSC_HAVE_SETJMP_H)
4 
5 jmp_buf PetscXIOErrorHandlerJumpBuf;
6 
PetscXIOErrorHandlerJump(PETSC_UNUSED PetscCtx ctx)7 void PetscXIOErrorHandlerJump(PETSC_UNUSED PetscCtx ctx)
8 {
9   longjmp(PetscXIOErrorHandlerJumpBuf, 1);
10 }
11 
PetscSetXIOErrorHandler(PetscXIOErrorHandlerFn * xioerrhdl)12 PetscXIOErrorHandlerFn *PetscSetXIOErrorHandler(PetscXIOErrorHandlerFn *xioerrhdl)
13 {
14   return (PetscXIOErrorHandlerFn *)(PetscVoidFn *)XSetIOErrorHandler((XIOErrorHandler)(void (*)(void))xioerrhdl);
15 }
16 
17 #endif
18