OpenCOBOL 1.1pre-rel
call.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2002-2009 Keisuke Nishida
00003  * Copyright (C) 2007-2009 Roger While
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public License
00007  * as published by the Free Software Foundation; either version 2.1,
00008  * or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; see the file COPYING.LIB.  If not write to
00017  * the Free Software Foundation, 51 Franklin Street, Fifth Floor
00018  * Boston, MA 02110-1301 USA
00019  */
00020 
00021 #ifndef COB_CALL_H
00022 #define COB_CALL_H
00023 
00024 #include <setjmp.h>
00025 #include <libcob/common.h>
00026 
00027 struct cobjmp_buf {
00028         int     cbj_int[4];
00029         void    *cbj_ptr[4];
00030         jmp_buf cbj_jmp_buf;
00031         void    *cbj_ptr_rest[2];
00032 };
00033 
00034 extern void             cob_set_cancel          (const char *, void *, void *);
00035 extern void             *cob_resolve            (const char *);
00036 extern void             *cob_resolve_1          (const char *);
00037 extern const char       *cob_resolve_error      (void);
00038 
00039 extern void             *cob_call_resolve       (const cob_field *);
00040 extern void             *cob_call_resolve_1     (const cob_field *);
00041 extern void             cob_field_cancel        (const cob_field *);
00042 extern void             cobcancel               (const char *);
00043 extern int              cobcall                 (const char *, const int, void **);
00044 extern int              cobfunc                 (const char *, const int, void **);
00045 extern void             *cobsavenv              (struct cobjmp_buf *);
00046 extern void             *cobsavenv2             (struct cobjmp_buf *, const int);
00047 extern void             coblongjmp              (struct cobjmp_buf *);
00048 
00049 #define cobsetjmp(x)    setjmp (cobsavenv (x))
00050 
00051 #ifdef __GNUC__
00052 extern void             cob_call_error (void) __attribute__ ((noreturn));
00053 #else
00054 extern void             cob_call_error (void);
00055 #endif
00056 
00057 #endif /* COB_CALL_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines