xref: /titanic_52/usr/src/cmd/fm/eversholt/common/literals.h (revision 8de5c4f463386063e184a851437d58080c6c626c)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  *
25  * literals.h -- public definitions for literals in string table
26  *
27  * all strings in this program are kept in the string table provided
28  * by the routines in stable.c.  this allows us to see if two strings
29  * are equal by checking their pointers rather than calling strcmp().
30  * when we want to check for a specific string we can either do this:
31  * 	if (s == stable("word"))
32  * or define the literal here in this file and then do this:
33  * 	if (s == L_word)
34  *
35  * the macro L_DECL() below expands to an extern const char * declaration
36  * for files that include it.  the exception is some cpp statements done by
37  * literals.c which change L_DECL() to initialize the string by calling
38  * stable().
39  */
40 
41 #ifndef	_ESC_COMMON_LITERALS_H
42 #define	_ESC_COMMON_LITERALS_H
43 
44 #pragma ident	"%Z%%M%	%I%	%E% SMI"
45 
46 #ifdef	__cplusplus
47 extern "C" {
48 #endif
49 
50 #ifndef	L_DECL
51 #define	L_DECL(s) extern const char *L_##s
52 #endif
53 
54 /* reserved words */
55 L_DECL(asru);
56 L_DECL(div);
57 L_DECL(engine);
58 L_DECL(event);
59 L_DECL(fru);
60 L_DECL(if);
61 L_DECL(mask);
62 L_DECL(prop);
63 L_DECL(config);
64 
65 /* event types */
66 L_DECL(fault);
67 L_DECL(upset);
68 L_DECL(defect);
69 L_DECL(error);
70 L_DECL(ereport);
71 
72 /* engine types */
73 L_DECL(serd);
74 L_DECL(stat);
75 
76 /* timeval suffixes */
77 L_DECL(nanosecond);
78 L_DECL(nanoseconds);
79 L_DECL(nsec);
80 L_DECL(nsecs);
81 L_DECL(ns);
82 L_DECL(microsecond);
83 L_DECL(microseconds);
84 L_DECL(usec);
85 L_DECL(usecs);
86 L_DECL(us);
87 L_DECL(millisecond);
88 L_DECL(milliseconds);
89 L_DECL(msec);
90 L_DECL(msecs);
91 L_DECL(ms);
92 L_DECL(second);
93 L_DECL(seconds);
94 L_DECL(s);
95 L_DECL(minute);
96 L_DECL(minutes);
97 L_DECL(min);
98 L_DECL(mins);
99 L_DECL(m);
100 L_DECL(hour);
101 L_DECL(hours);
102 L_DECL(hr);
103 L_DECL(hrs);
104 L_DECL(h);
105 L_DECL(day);
106 L_DECL(days);
107 L_DECL(d);
108 L_DECL(week);
109 L_DECL(weeks);
110 L_DECL(wk);
111 L_DECL(wks);
112 L_DECL(month);
113 L_DECL(months);
114 L_DECL(year);
115 L_DECL(years);
116 L_DECL(yr);
117 L_DECL(yrs);
118 L_DECL(infinity);
119 
120 /* property names */
121 L_DECL(ASRU);
122 L_DECL(action);
123 L_DECL(FITrate);
124 L_DECL(FRU);
125 L_DECL(id);
126 L_DECL(message);
127 L_DECL(retire);
128 L_DECL(response);
129 L_DECL(FRUID);
130 L_DECL(N);
131 L_DECL(T);
132 L_DECL(count);
133 L_DECL(method);
134 L_DECL(poller);
135 L_DECL(timeout);
136 L_DECL(trip);
137 L_DECL(discard_if_config_unknown);
138 
139 /* property values */
140 L_DECL(A);
141 L_DECL(volatile);
142 L_DECL(persistent);
143 
144 /* event bubble types */
145 L_DECL(from);
146 L_DECL(to);
147 L_DECL(inhibit);
148 
149 /*
150  * internal function names.  note that "fru" and "asru" are also function
151  * names.
152  */
153 L_DECL(within);
154 L_DECL(call);
155 L_DECL(confcall);
156 L_DECL(confprop);
157 L_DECL(confprop_defined);
158 L_DECL(defined);
159 L_DECL(payloadprop);
160 L_DECL(payloadprop_contains);
161 L_DECL(payloadprop_defined);
162 L_DECL(setpayloadprop);
163 L_DECL(setserdsuffix);
164 L_DECL(setserdincrement);
165 L_DECL(setserdn);
166 L_DECL(setserdt);
167 L_DECL(envprop);
168 L_DECL(is_connected);
169 L_DECL(is_under);
170 L_DECL(is_on);
171 L_DECL(is_present);
172 L_DECL(has_fault);
173 L_DECL(is_type);
174 L_DECL(count);
175 
176 /* our enumerated types (used for debugging) */
177 L_DECL(T_NOTHING);
178 L_DECL(T_NAME);
179 L_DECL(T_GLOBID);
180 L_DECL(T_ENAME);
181 L_DECL(T_EVENT);
182 L_DECL(T_ENGINE);
183 L_DECL(T_ASRU);
184 L_DECL(T_FRU);
185 L_DECL(T_TIMEVAL);
186 L_DECL(T_NUM);
187 L_DECL(T_QUOTE);
188 L_DECL(T_FUNC);
189 L_DECL(T_NVPAIR);
190 L_DECL(T_ASSIGN);
191 L_DECL(T_CONDIF);
192 L_DECL(T_CONDELSE);
193 L_DECL(T_NOT);
194 L_DECL(T_AND);
195 L_DECL(T_OR);
196 L_DECL(T_EQ);
197 L_DECL(T_NE);
198 L_DECL(T_SUB);
199 L_DECL(T_ADD);
200 L_DECL(T_MUL);
201 L_DECL(T_DIV);
202 L_DECL(T_MOD);
203 L_DECL(T_LT);
204 L_DECL(T_LE);
205 L_DECL(T_GT);
206 L_DECL(T_GE);
207 L_DECL(T_BITAND);
208 L_DECL(T_BITOR);
209 L_DECL(T_BITXOR);
210 L_DECL(T_BITNOT);
211 L_DECL(T_LSHIFT);
212 L_DECL(T_RSHIFT);
213 L_DECL(T_ARROW);
214 L_DECL(T_LIST);
215 L_DECL(T_FAULT);
216 L_DECL(T_UPSET);
217 L_DECL(T_DEFECT);
218 L_DECL(T_ERROR);
219 L_DECL(T_EREPORT);
220 L_DECL(T_SERD);
221 L_DECL(T_STAT);
222 L_DECL(T_PROP);
223 L_DECL(T_MASK);
224 L_DECL(N_UNSPEC);
225 L_DECL(N_FAULT);
226 L_DECL(N_UPSET);
227 L_DECL(N_DEFECT);
228 L_DECL(N_ERROR);
229 L_DECL(N_EREPORT);
230 L_DECL(N_SERD);
231 L_DECL(IT_NONE);
232 L_DECL(IT_VERTICAL);
233 L_DECL(IT_HORIZONTAL);
234 L_DECL(IT_ENAME);
235 
236 /* misc */
237 L_DECL(nofile);
238 
239 #ifdef	__cplusplus
240 }
241 #endif
242 
243 #endif	/* _ESC_COMMON_LITERALS_H */
244