/* $Id: catch.c,v 1.2 2007/07/23 16:00:57 meyer Exp $ */

#include <stdio.h>
#include <setjmp.h>
#include "f77name.h"
extern jmp_buf _jmp_buf;

void F77NAME(catch_load_savefile)(int *ierr,void *arg1, void *arg2, void *arg3, void *arg4, void *arg5)
{
  int retval = setjmp(_jmp_buf);
  *ierr = retval;
  if(retval != 0){
        printf("catch_load_savefile: longjmp taken retval=%d\n",retval);
        return;
  }
  F77NAME(savefile)(arg1,arg2,arg3,arg4,arg5);
  return;
}

void F77NAME(catch_dead_start)(int *ierr,void *arg1)
{
  int retval = setjmp(_jmp_buf);
  *ierr = retval;
  if(retval != 0){
        printf("catch_dead_start: longjmp taken retval=%d\n",retval);
        return;
  }
  F77NAME(deadstar)(arg1);
  return;
}


F77NAME(catch_inveq)(int *ierr, void *arg1, void *arg2, void *arg3)
{
  int retval = setjmp(_jmp_buf);
  *ierr = retval;
  if(retval != 0){
        printf("catch_inveq: longjmp taken retval=%d\n",retval);
        return;
  }
  F77NAME(inveq)(arg1,arg2,arg3);
  return;
}

void F77NAME(catch_direq)(int *ierr, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5) 
{
  int retval = setjmp(_jmp_buf);
  *ierr = retval;
  if(retval != 0){
        printf("catch_direq: longjmp taken retval=%d\n",retval);
        return;
  }
  F77NAME(direq)(arg1,arg2,arg3,arg4,arg5);
  return;
}


