1/* Implement timing-related runtime actions for CHILL. 2 Copyright (C) 1992,1993 Free Software Foundation, Inc. 3 Author: Wilfried Moser 4 5This file is part of GNU CC. 6 7GNU CC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 2, or (at your option) 10any later version. 11 12GNU CC is distributed in the hope that it will be useful, 13but WITHOUT ANY WARRANTY; without even the implied warranty of 14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15GNU General Public License for more details. 16 17You should have received a copy of the GNU General Public License 18along with GNU CC; see the file COPYING. If not, write to 19the Free Software Foundation, 59 Temple Place - Suite 330, 20Boston, MA 02111-1307, USA. */ 21 22/* As a special exception, if you link this library with other files, 23 some of which are compiled with GCC, to produce an executable, 24 this library does not by itself cause the resulting executable 25 to be covered by the GNU General Public License. 26 This exception does not however invalidate any other reasons why 27 the executable file might be covered by the GNU General Public License. */ 28 29#ifndef __rtltypes_h__ 30#define __rtltypes_h__ 31 32#include <setjmp.h> 33 34/* Add prototype support. */ 35#ifndef PROTO 36#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) 37#define PROTO(ARGS) ARGS 38#else 39#define PROTO(ARGS) () 40#endif 41#endif 42 43/* argc, argv */ 44typedef struct 45{ 46 unsigned short len; 47 char body[0]; 48} TVaryingCharType; 49 50#ifndef __CHILL_LIB__ 51extern TVaryingCharType **chill_argv; 52extern int chill_argc; 53#endif 54 55/* definitions for exceptions */ 56typedef struct 57{ 58 char *exname; 59 short exnumber; 60} TExceptionDefinition; 61 62#if 1 63typedef char *__ch_exception; 64#define EX_EQ(e1, e2) (strcmp(e1, e2)==0) 65#else 66typedef void *__ch_exception; 67#define EX_EQ(e1, e2) (e1 == e2) 68#endif 69#define __ch_else_except ((__ch_exception)0) 70 71struct __ch_handled_excepts 72{ 73 /* List is ended by a code==0, or ex==__ch_else_except (ELSE handler). */ 74 __ch_exception ex; 75 int code; /* Positive number indicating ordinal in handler list. */ 76}; 77 78/* definitions for exception handlers */ 79typedef struct __ch_handler 80{ 81 struct __ch_handler *prev; 82 struct __ch_handled_excepts *handlers; 83 jmp_buf jbuf; 84} TExceptionHandlerStack; 85 86/* exceptions */ 87#define EXCEPTION(x) /* nothing */ 88 89#endif /* __rtltypes_h__ */ 90