xref: /titanic_44/usr/src/cmd/fm/eversholt/common/literals.h (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * literals.h -- public definitions for literals in string table
27  *
28  * all strings in this program are kept in the string table provided
29  * by the routines in stable.c.  this allows us to see if two strings
30  * are equal by checking their pointers rather than calling strcmp().
31  * when we want to check for a specific string we can either do this:
32  * 	if (s == stable("word"))
33  * or define the literal here in this file and then do this:
34  * 	if (s == L_word)
35  *
36  * the macro L_DECL() below expands to an extern const char * declaration
37  * for files that include it.  the exception is some cpp statements done by
38  * literals.c which change L_DECL() to initialize the string by calling
39  * stable().
40  */
41 
42 #ifndef	_ESC_COMMON_LITERALS_H
43 #define	_ESC_COMMON_LITERALS_H
44 
45 #pragma ident	"%Z%%M%	%I%	%E% SMI"
46 
47 #ifdef	__cplusplus
48 extern "C" {
49 #endif
50 
51 #ifndef	L_DECL
52 #define	L_DECL(s) extern const char *L_##s
53 #endif
54 
55 /* reserved words */
56 L_DECL(asru);
57 L_DECL(div);
58 L_DECL(engine);
59 L_DECL(event);
60 L_DECL(fru);
61 L_DECL(if);
62 L_DECL(mask);
63 L_DECL(prop);
64 L_DECL(config);
65 
66 /* event types */
67 L_DECL(fault);
68 L_DECL(upset);
69 L_DECL(defect);
70 L_DECL(error);
71 L_DECL(ereport);
72 
73 /* engine types */
74 L_DECL(serd);
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(FITrate);
123 L_DECL(FRU);
124 L_DECL(FRU);
125 L_DECL(FRUID);
126 L_DECL(N);
127 L_DECL(T);
128 L_DECL(count);
129 L_DECL(method);
130 L_DECL(poller);
131 L_DECL(timeout);
132 L_DECL(trip);
133 
134 /* property values */
135 L_DECL(A);
136 L_DECL(volatile);
137 L_DECL(persistent);
138 
139 /* event bubble types */
140 L_DECL(from);
141 L_DECL(to);
142 L_DECL(inhibit);
143 
144 /*
145  * internal function names.  note that "fru" and "asru" are also function
146  * names.
147  */
148 L_DECL(within);
149 L_DECL(call);
150 L_DECL(confprop);
151 L_DECL(payloadprop);
152 L_DECL(envprop);
153 L_DECL(is_connected);
154 L_DECL(is_under);
155 L_DECL(is_on);
156 L_DECL(is_present);
157 L_DECL(is_type);
158 
159 /* our enumerated types (used for debugging) */
160 L_DECL(T_NOTHING);
161 L_DECL(T_NAME);
162 L_DECL(T_GLOBID);
163 L_DECL(T_ENAME);
164 L_DECL(T_EVENT);
165 L_DECL(T_ENGINE);
166 L_DECL(T_ASRU);
167 L_DECL(T_FRU);
168 L_DECL(T_TIMEVAL);
169 L_DECL(T_NUM);
170 L_DECL(T_QUOTE);
171 L_DECL(T_FUNC);
172 L_DECL(T_NVPAIR);
173 L_DECL(T_ASSIGN);
174 L_DECL(T_CONDIF);
175 L_DECL(T_CONDELSE);
176 L_DECL(T_NOT);
177 L_DECL(T_AND);
178 L_DECL(T_OR);
179 L_DECL(T_EQ);
180 L_DECL(T_NE);
181 L_DECL(T_SUB);
182 L_DECL(T_ADD);
183 L_DECL(T_MUL);
184 L_DECL(T_DIV);
185 L_DECL(T_MOD);
186 L_DECL(T_LT);
187 L_DECL(T_LE);
188 L_DECL(T_GT);
189 L_DECL(T_GE);
190 L_DECL(T_BITAND);
191 L_DECL(T_BITOR);
192 L_DECL(T_BITXOR);
193 L_DECL(T_BITNOT);
194 L_DECL(T_LSHIFT);
195 L_DECL(T_RSHIFT);
196 L_DECL(T_ARROW);
197 L_DECL(T_LIST);
198 L_DECL(T_FAULT);
199 L_DECL(T_UPSET);
200 L_DECL(T_DEFECT);
201 L_DECL(T_ERROR);
202 L_DECL(T_EREPORT);
203 L_DECL(T_SERD);
204 L_DECL(T_PROP);
205 L_DECL(T_MASK);
206 L_DECL(N_UNSPEC);
207 L_DECL(N_FAULT);
208 L_DECL(N_UPSET);
209 L_DECL(N_DEFECT);
210 L_DECL(N_ERROR);
211 L_DECL(N_EREPORT);
212 L_DECL(N_SERD);
213 L_DECL(IT_NONE);
214 L_DECL(IT_VERTICAL);
215 L_DECL(IT_HORIZONTAL);
216 L_DECL(IT_ENAME);
217 
218 /* misc */
219 L_DECL(nofile);
220 
221 #ifdef	__cplusplus
222 }
223 #endif
224 
225 #endif	/* _ESC_COMMON_LITERALS_H */
226