Coda Distributed File System
lib-src
rpc2
rp2gen
rp2.h
Go to the documentation of this file.
1
/* BLURB gpl
2
3
Coda File System
4
Release 6
5
6
Copyright (c) 1987-2018 Carnegie Mellon University
7
Additional copyrights listed below
8
9
This code is distributed "AS IS" without warranty of any kind under
10
the terms of the GNU General Public Licence Version 2, as shown in the
11
file LICENSE. The technical and financial contributors to Coda are
12
listed in the file CREDITS.
13
14
Additional copyrights
15
16
#*/
17
18
/*
19
IBM COPYRIGHT NOTICE
20
21
Copyright (C) 1986
22
International Business Machines Corporation
23
All Rights Reserved
24
25
This file contains some code identical to or derived from the 1986
26
version of the Andrew File System ("AFS"), which is owned by the IBM
27
Corporation. This code is provided "AS IS" and IBM does not warrant
28
that it is free of infringement of any intellectual rights of any
29
third party. IBM disclaims liability of any kind for any damages
30
whatsoever resulting directly or indirectly from use of this software
31
or of any derivative work. Carnegie Mellon University has obtained
32
permission to modify, distribute and sublicense this code, which is
33
based on Version 2 of AFS and does not contain the features and
34
enhancements that are part of Version 3 of AFS. Version 3 of AFS is
35
commercially available and supported by Transarc Corporation,
36
Pittsburgh, PA.
37
38
*/
39
40
#include <
rpc2/rpc2.h
>
41
#include <stdlib.h>
42
43
/* Satya (7/31/96): changed bool, FALSE, TRUE to rp2_bool, RP2_{FALSE,TRUE}
44
to avoid name clash with builtin bool on some versions of gcc; similar to
45
fix in rvmh.h */
46
typedef
unsigned
char
rp2_bool
;
47
48
#define RP2_FALSE 0
49
#define RP2_TRUE 1
50
51
#define NIL 0
52
53
/* Subsystem information structure */
54
55
struct
subsystem
{
56
char
*
subsystem_name
;
57
char
*
timeout
;
58
};
59
60
/* This structure is used for typed variables (this includes structure fields) */
61
62
typedef
struct
{
63
char
*
name
;
64
MODE
mode
;
/* Must be NO_MODE for structure fields */
65
struct
entry
*
type
;
66
char
*
array
;
/* If array structure, array suffix name */
67
char
*
arraymax
;
/* if array && !IN_MODE, array_max_size */
68
}
VAR
;
69
70
/* RPC2 types */
71
72
typedef
struct
{
73
char
*
name
;
74
char
*
rep
;
75
}
ENUM
;
76
77
typedef
struct
{
78
TYPE_TAG
tag
;
79
80
union
{
81
/* when RPC2_STRUCT_TAG => */
82
VAR
**
struct_fields
;
83
84
/* when RPC2_ENUM_TAG => */
85
ENUM
**
values
;
86
87
} fields;
88
}
RPC2_TYPE
;
89
90
/* Symbol table entry */
91
92
typedef
struct
entry
{
93
struct
entry
*
thread
;
/* For symbol table */
94
char
*
name
;
95
char
*
bound
;
/* NIL => not array, ELSE => bound */
96
RPC2_TYPE
*
type
;
/* Pointer to underlying RPC2_TYPE */
97
struct
entry
*
defined
;
/* Pointer to type that this was defined in terms of
98
(or NIL) */
99
}
ENTRY
;
100
101
typedef
struct
proc
{
102
struct
proc
*
thread
;
/* For chaining proc's together */
103
char
*
name
;
104
VAR
**
formals
;
105
char
*
timeout
;
/* NIL => no timeout override */
106
VAR
*
bd
;
/* Pointer to bulk descriptor parameter */
107
rp2_bool
108
new_connection
;
/* TRUE if this is the unique new connection procedure */
109
char
*
op_code
;
/* Name of op code for this procedure */
110
int
op_number
;
/* Opcode number for this proc */
111
int
linenum
;
/* Line number where this proc was defined */
112
}
PROC
;
113
114
/* Language values are specified for use in array */
115
typedef
enum
116
{
117
NONE
= 0,
118
C
= 1,
119
PASCAL
= 2,
120
F77
= 3
121
}
LANGUAGE
;
122
123
typedef
struct
stubelem
{
124
char
*
type
;
125
char
*
name
;
126
}
STUBELEM
;
127
128
/*
129
* crout needs to know whether to spit out ansi paste tokens, or
130
* traditional ones.
131
*/
132
133
extern
rp2_bool
ansi
;
134
135
/* make line number an externally-accessible variable so it can be
136
set on semantic errors for yyerror() and yywarn() */
137
138
extern
int
line
;
139
140
/* FUNCTION PROTOTYPES */
141
/* functions defined in the lexer, used by the parser */
142
int
yylex
(
void
);
143
void
yyerror
(
char
*s);
144
void
yywarn
(
char
*s);
145
146
/* function defined in rp2main */
147
void
spit_include
(
char
*filename);
PROC
struct proc PROC
yyerror
void yyerror(char *s)
ansi
rp2_bool ansi
Definition:
rp2main.c:124
STUBELEM
struct stubelem STUBELEM
LANGUAGE
LANGUAGE
Definition:
rp2.h:116
PASCAL
@ PASCAL
Definition:
rp2.h:119
F77
@ F77
Definition:
rp2.h:120
C
@ C
Definition:
rp2.h:118
NONE
@ NONE
Definition:
rp2.h:117
line
int line
Definition:
advice_parser.c:54
spit_include
void spit_include(char *filename)
Definition:
rp2main.c:458
yywarn
void yywarn(char *s)
yylex
int yylex(void)
ENTRY
struct entry ENTRY
rp2_bool
unsigned char rp2_bool
Definition:
rp2.h:46
rpc2.h
MODE
MODE
Definition:
rpc2.h:562
TYPE_TAG
TYPE_TAG
Definition:
rpc2.h:572
ENUM
Definition:
rp2.h:72
ENUM::name
char * name
Definition:
rp2.h:73
ENUM::rep
char * rep
Definition:
rp2.h:74
RPC2_TYPE
Definition:
rp2.h:77
RPC2_TYPE::struct_fields
VAR ** struct_fields
Definition:
rp2.h:82
RPC2_TYPE::tag
TYPE_TAG tag
Definition:
rp2.h:78
RPC2_TYPE::values
ENUM ** values
Definition:
rp2.h:85
VAR
Definition:
rp2.h:62
VAR::name
char * name
Definition:
rp2.h:63
VAR::type
struct entry * type
Definition:
rp2.h:65
VAR::array
char * array
Definition:
rp2.h:66
VAR::mode
MODE mode
Definition:
rp2.h:64
VAR::arraymax
char * arraymax
Definition:
rp2.h:67
entry
Definition:
codamergedump.cc:54
entry::thread
struct entry * thread
Definition:
rp2.h:93
entry::type
RPC2_TYPE * type
Definition:
rp2.h:96
entry::bound
char * bound
Definition:
rp2.h:95
entry::defined
struct entry * defined
Definition:
rp2.h:97
entry::name
char * name
Definition:
rp2.h:94
proc
Definition:
rp2.h:101
proc::thread
struct proc * thread
Definition:
rp2.h:102
proc::op_code
char * op_code
Definition:
rp2.h:109
proc::timeout
char * timeout
Definition:
rp2.h:105
proc::new_connection
rp2_bool new_connection
Definition:
rp2.h:108
proc::op_number
int op_number
Definition:
rp2.h:110
proc::linenum
int linenum
Definition:
rp2.h:111
proc::name
char * name
Definition:
rp2.h:103
proc::formals
VAR ** formals
Definition:
rp2.h:104
proc::bd
VAR * bd
Definition:
rp2.h:106
stubelem
Definition:
rp2.h:123
stubelem::type
char * type
Definition:
rp2.h:124
stubelem::name
char * name
Definition:
rp2.h:125
subsystem
Definition:
rp2.h:55
subsystem::subsystem_name
char * subsystem_name
Definition:
rp2.h:56
subsystem::timeout
char * timeout
Definition:
rp2.h:57
Generated by
1.9.4