summaryrefslogtreecommitdiff
path: root/usr/src/cmd/fm/eversholt/common/literals.h
blob: 9dd790d68b300bef175ed8eaedfe452fd473e5f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 *
 * literals.h -- public definitions for literals in string table
 *
 * all strings in this program are kept in the string table provided
 * by the routines in stable.c.  this allows us to see if two strings
 * are equal by checking their pointers rather than calling strcmp().
 * when we want to check for a specific string we can either do this:
 * 	if (s == stable("word"))
 * or define the literal here in this file and then do this:
 * 	if (s == L_word)
 *
 * the macro L_DECL() below expands to an extern const char * declaration
 * for files that include it.  the exception is some cpp statements done by
 * literals.c which change L_DECL() to initialize the string by calling
 * stable().
 */

#ifndef	_ESC_COMMON_LITERALS_H
#define	_ESC_COMMON_LITERALS_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#ifdef	__cplusplus
extern "C" {
#endif

#ifndef	L_DECL
#define	L_DECL(s) extern const char *L_##s
#endif

/* reserved words */
L_DECL(asru);
L_DECL(div);
L_DECL(engine);
L_DECL(event);
L_DECL(fru);
L_DECL(if);
L_DECL(mask);
L_DECL(prop);
L_DECL(config);

/* event types */
L_DECL(fault);
L_DECL(upset);
L_DECL(defect);
L_DECL(error);
L_DECL(ereport);

/* engine types */
L_DECL(serd);
L_DECL(stat);

/* timeval suffixes */
L_DECL(nanosecond);
L_DECL(nanoseconds);
L_DECL(nsec);
L_DECL(nsecs);
L_DECL(ns);
L_DECL(microsecond);
L_DECL(microseconds);
L_DECL(usec);
L_DECL(usecs);
L_DECL(us);
L_DECL(millisecond);
L_DECL(milliseconds);
L_DECL(msec);
L_DECL(msecs);
L_DECL(ms);
L_DECL(second);
L_DECL(seconds);
L_DECL(s);
L_DECL(minute);
L_DECL(minutes);
L_DECL(min);
L_DECL(mins);
L_DECL(m);
L_DECL(hour);
L_DECL(hours);
L_DECL(hr);
L_DECL(hrs);
L_DECL(h);
L_DECL(day);
L_DECL(days);
L_DECL(d);
L_DECL(week);
L_DECL(weeks);
L_DECL(wk);
L_DECL(wks);
L_DECL(month);
L_DECL(months);
L_DECL(year);
L_DECL(years);
L_DECL(yr);
L_DECL(yrs);
L_DECL(infinity);

/* property names */
L_DECL(ASRU);
L_DECL(action);
L_DECL(FITrate);
L_DECL(FRU);
L_DECL(id);
L_DECL(message);
L_DECL(retire);
L_DECL(response);
L_DECL(FRUID);
L_DECL(N);
L_DECL(T);
L_DECL(count);
L_DECL(method);
L_DECL(poller);
L_DECL(timeout);
L_DECL(trip);
L_DECL(discard_if_config_unknown);

/* property values */
L_DECL(A);
L_DECL(volatile);
L_DECL(persistent);

/* event bubble types */
L_DECL(from);
L_DECL(to);
L_DECL(inhibit);

/*
 * internal function names.  note that "fru" and "asru" are also function
 * names.
 */
L_DECL(within);
L_DECL(call);
L_DECL(confcall);
L_DECL(confprop);
L_DECL(confprop_defined);
L_DECL(defined);
L_DECL(payloadprop);
L_DECL(payloadprop_contains);
L_DECL(payloadprop_defined);
L_DECL(setpayloadprop);
L_DECL(setserdsuffix);
L_DECL(setserdincrement);
L_DECL(setserdn);
L_DECL(setserdt);
L_DECL(envprop);
L_DECL(is_connected);
L_DECL(is_under);
L_DECL(is_on);
L_DECL(is_present);
L_DECL(is_type);
L_DECL(count);

/* our enumerated types (used for debugging) */
L_DECL(T_NOTHING);
L_DECL(T_NAME);
L_DECL(T_GLOBID);
L_DECL(T_ENAME);
L_DECL(T_EVENT);
L_DECL(T_ENGINE);
L_DECL(T_ASRU);
L_DECL(T_FRU);
L_DECL(T_TIMEVAL);
L_DECL(T_NUM);
L_DECL(T_QUOTE);
L_DECL(T_FUNC);
L_DECL(T_NVPAIR);
L_DECL(T_ASSIGN);
L_DECL(T_CONDIF);
L_DECL(T_CONDELSE);
L_DECL(T_NOT);
L_DECL(T_AND);
L_DECL(T_OR);
L_DECL(T_EQ);
L_DECL(T_NE);
L_DECL(T_SUB);
L_DECL(T_ADD);
L_DECL(T_MUL);
L_DECL(T_DIV);
L_DECL(T_MOD);
L_DECL(T_LT);
L_DECL(T_LE);
L_DECL(T_GT);
L_DECL(T_GE);
L_DECL(T_BITAND);
L_DECL(T_BITOR);
L_DECL(T_BITXOR);
L_DECL(T_BITNOT);
L_DECL(T_LSHIFT);
L_DECL(T_RSHIFT);
L_DECL(T_ARROW);
L_DECL(T_LIST);
L_DECL(T_FAULT);
L_DECL(T_UPSET);
L_DECL(T_DEFECT);
L_DECL(T_ERROR);
L_DECL(T_EREPORT);
L_DECL(T_SERD);
L_DECL(T_STAT);
L_DECL(T_PROP);
L_DECL(T_MASK);
L_DECL(N_UNSPEC);
L_DECL(N_FAULT);
L_DECL(N_UPSET);
L_DECL(N_DEFECT);
L_DECL(N_ERROR);
L_DECL(N_EREPORT);
L_DECL(N_SERD);
L_DECL(IT_NONE);
L_DECL(IT_VERTICAL);
L_DECL(IT_HORIZONTAL);
L_DECL(IT_ENAME);

/* misc */
L_DECL(nofile);

#ifdef	__cplusplus
}
#endif

#endif	/* _ESC_COMMON_LITERALS_H */