xref: /NextBSD/usr.bin/migcom/statement.h (revision 33da5adc555b3bc29986eeadca03829e4ad06b1e)
1 /*
2  * Copyright 1991-1998 by Open Software Foundation, Inc.
3  *              All Rights Reserved
4  *
5  * Permission to use, copy, modify, and distribute this software and
6  * its documentation for any purpose and without fee is hereby granted,
7  * provided that the above copyright notice appears in all copies and
8  * that both the copyright notice and this permission notice appear in
9  * supporting documentation.
10  *
11  * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
12  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13  * FOR A PARTICULAR PURPOSE.
14  *
15  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
16  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
18  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
19  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  */
21 /*
22  * cmk1.1
23  */
24 /*
25  * Mach Operating System
26  * Copyright (c) 1991,1990 Carnegie Mellon University
27  * All Rights Reserved.
28  *
29  * Permission to use, copy, modify and distribute this software and its
30  * documentation is hereby granted, provided that both the copyright
31  * notice and this permission notice appear in all copies of the
32  * software, derivative works or modified versions, and any portions
33  * thereof, and that both notices appear in supporting documentation.
34  *
35  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
36  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
37  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
38  *
39  * Carnegie Mellon requests users of this software to return to
40  *
41  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
42  *  School of Computer Science
43  *  Carnegie Mellon University
44  *  Pittsburgh PA 15213-3890
45  *
46  * any improvements or extensions that they make and grant Carnegie the
47  * rights to redistribute these changes.
48  */
49 /*
50  * 91/02/05  17:55:47  mrt
51  * 	Changed to new Mach copyright
52  * 	[91/02/01  17:55:51  mrt]
53  *
54  * 90/06/02  15:05:41  rpd
55  * 	Created for new IPC.
56  * 	[90/03/26  21:13:34  rpd]
57  *
58  * 07-Apr-89  Richard Draves (rpd) at Carnegie-Mellon University
59  *	Extensive revamping.  Added polymorphic arguments.
60  *	Allow multiple variable-sized inline arguments in messages.
61  *
62  * 27-May-87  Richard Draves (rpd) at Carnegie-Mellon University
63  *	Created.
64  */
65 
66 #ifndef	_STATEMENT_H
67 #define	_STATEMENT_H
68 
69 #include "routine.h"
70 
71 typedef enum statement_kind
72 {
73     skRoutine,
74     skImport,
75     skUImport,
76     skSImport,
77     skDImport,
78     skIImport,
79     skRCSDecl
80 } statement_kind_t;
81 
82 typedef struct statement
83 {
84     statement_kind_t stKind;
85     struct statement *stNext;
86     union
87     {
88 	/* when stKind == skRoutine */
89 	routine_t *_stRoutine;
90 	/* when stKind == skImport, skUImport, skSImport, skDImport,
91 	                  skIImport */
92 	string_t _stFileName;
93     } data;
94 } statement_t;
95 
96 #define	stRoutine	data._stRoutine
97 #define	stFileName	data._stFileName
98 
99 #define stNULL		((statement_t *) 0)
100 
101 /* stNext will be initialized to put the statement in the list */
102 extern statement_t *stAlloc(void);
103 
104 /* list of statements, in order they occur in the .defs file */
105 extern statement_t *defs_stats;
106 
107 #endif	/* _STATEMENT_H */
108