xref: /titanic_51/usr/src/cmd/fm/eversholt/common/literals.c (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * literals.c -- literals initialization module
27  *
28  * this file intializes all the literals so they are stored in the
29  * string table.  instead of using:
30  * 	stable("fault")
31  * other modules can use:
32  * 	L_fault
33  * and avoid repeated calls to stable().
34  */
35 
36 #pragma ident	"%Z%%M%	%I%	%E% SMI"
37 
38 #include <stdio.h>
39 #include "out.h"
40 #include "stable.h"
41 #define	L_DECL(s) const char *L_##s
42 #include "literals.h"
43 
44 void
45 literals_init()
46 {
47 
48 /*
49  * this turns the statements like:
50  *	extern const char *L_something;
51  * in literals.h into initialization statements like:
52  *	L_something = stable("something");
53  *
54  */
55 #undef	_ESC_COMMON_LITERALS_H
56 #undef	L_DECL
57 #define	L_DECL(s) L_##s = stable(#s)
58 
59 #include "literals.h"
60 
61 }
62 
63 void
64 literals_fini(void)
65 {
66 }
67