OSDN Git Service

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