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 #include <stdio.h> 37 #include "out.h" 38 #include "stable.h" 39 #define L_DECL(s) const char *L_##s 40 #include "literals.h" 41 42 void 43 literals_init() 44 { 45 46 /* 47 * this turns the statements like: 48 * extern const char *L_something; 49 * in literals.h into initialization statements like: 50 * L_something = stable("something"); 51 * 52 */ 53 #undef _ESC_COMMON_LITERALS_H 54 #undef L_DECL 55 #define L_DECL(s) L_##s = stable(#s) 56 57 #include "literals.h" 58 59 } 60 61 void 62 literals_fini(void) 63 { 64 } 65