/*-----------------------------------------------------------------------------+
|                                                                              |
|       Copyright (c), Raisonance S.A.S., 1987-2007                            |
|                                                                              |
+------------------------------------------------------------------------------+
|                                                                              |
|       File: SETJMP.H                                                         |
|                                                                              |
+--------------+-------+----------------------------------------------+--------+
|     DATE     |VERSION| HISTORY/CHANGES                              |   BY   |
|  (MM/DD/YY)  | VX.Y  |                                              |        |
+--------------+-------+----------------------------------------------+--------+
|   ??/??/??   |  1.0  | Initial implementation                       |   XX   |
|   11/07/02   |  1.1  | Reimplementation                             |   JR   |
+--------------+-------+----------------------------------------------+--------+
|Purpose    :                                                                  |
|   Prototypes for nonlocal jumps                                              |
+-----------------------------------------------------------------------------*/

#ifndef _SETJMP_H_
#define _SETJMP_H_

/* include particular files at this point */
#pragma SAVE

#if defined(__RC51__)
   #include <51\MAIN_C51.h>
#elif defined( __RCXA__)
   #include <XA\MAIN_XA.h>
#elif defined(__RCMC__)
   #include <MC\MAIN_MC.h>
#elif defined(__RCST7__)
   #include <ST7\MAIN_ST7.h>
#endif

/* function prototypes */
#ifdef _JBLEN
#ifndef _JMP_BUF_DEFINED
   typedef  char jmp_buf[_JBLEN];
   #define _JMP_BUF_DEFINED
#endif

extern int  setjmp  (LOCAL_FAR jmp_buf);
extern void longjmp (LOCAL_FAR jmp_buf, int);
#endif

#pragma RESTORE

#endif
