/*
    ####             #    #     # #
    #   #            #    #       #          The FreeWare C library for
    #   #  ##   ###  #  # #     # ###             RISC OS machines
    #   # #  # #     # #  #     # #  #   ___________________________________
    #   # ####  ###  ##   #     # #  #
    #   # #        # # #  #     # #  #    Please refer to the accompanying
    ####   ### ####  #  # ##### # ###    documentation for conditions of use
    ________________________________________________________________________

    File:    Jump.h
    Author:  Copyright  1995 Julian Smith, Martin Ebourne, Jos Horsmeier
                              Paul Field.
    Version: 1.02 (07 Nov 1995)
    Purpose: Easy use of set/longjmp.
    History: 1.00 8 Sep 1995
             1.01 29 Sep 1995 JS Added Desk_JumpAuto_TryCatch
             1.02 07 Nov 1995 JS Changed Desk_JumpAuto_TryCatch slightly - you
                                 *shouldn't* put a ';' after the macro now.
             1.10 29 Nov 1995    Changed Jump to use a struct in SDLS 
                                 compiles.
                                 Borrowed some macro ideas from PF, which 
                                 in turn were based on code by ME and JH.
*/

#ifndef __Desk_Jump_h
#define __Desk_Jump_h

#ifdef __cplusplus
	extern "C" {
#endif

#ifndef __Desk_JumpRaw_h
	#include "Desk.JumpRaw.h"
#endif

#ifndef __Desk_Error2_h
	#include "Desk.Error2.h"
#endif

#ifndef __Desk_Debug_h
	#include "Desk.Debug.h"
#endif







Desk_error2_block	*Desk_JumpAuto_Error2Handler( Desk_error2_block *error);
/*
A simple error handler which simply calls Desk_JumpAuto_Throw( (int) error)
if in a try-catch loop, otherwise it calls Desk_Error2_Exit.

'error' is passed in the call to Desk_JumpAuto_LongJmp, and so will appear to
catch code as 'Desk_jumpauto_val'. You can alternatively use
Desk_jumpauto_lasterror.

To always use jumpauto, do 'Desk_Error2_SetHandler( Desk_JumpAuto_Error2Handler);'
 */


extern Desk_error2_block*	Desk_jumpauto_lasterror;
/*
This is set by Desk_JumpAuto_Error2Handler to be the last Desk_error2_block sent
to (Desk_JumpAuto_Error2Handler.

This means that catch code can use either '(Desk_error2_block*) Desk_jumpauto_val'
or 'Desk_jumpauto_lasterror' - they will be the same.

[
Actually, Desk_jumpauto_lasterror has been added to allow the non-Desktop
parts of DeskLib to be compiled on non-RISC OS machines where ints can
be smaller than pointers, so that Desk_jumpauto_val isn't large enough to
contain a pointer.
 ]
 */



#ifdef __cplusplus
	}
#endif

#endif
