1 #ifndef _MKSH_MACRO_H 2 #define _MKSH_MACRO_H 3 /* 4 * CDDL HEADER START 5 * 6 * This file and its contents are supplied under the terms of the 7 * Common Development and Distribution License ("CDDL"), version 1.0. 8 * You may use this file only in accordance with the terms of version 9 * 1.0 of the CDDL. 10 * 11 * A full copy of the text of the CDDL should have accompanied this 12 * source. A copy of the CDDL is also available via the Internet at 13 * http://www.opensource.org/licenses/cddl1.txt 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 19 * If applicable, add the following below this CDDL HEADER, with the 20 * fields enclosed by brackets "[]" replaced with your own identifying 21 * information: Portions Copyright [yyyy] [name of copyright owner] 22 * 23 * CDDL HEADER END 24 */ 25 /* 26 * Copyright 2002 Sun Microsystems, Inc. All rights reserved. 27 * Use is subject to license terms. 28 */ 29 /* 30 * @(#)macro.h 1.3 06/12/12 31 */ 32 33 #pragma ident "@(#)macro.h 1.3 06/12/12" 34 35 /* 36 * Copyright 2021 J. Schilling 37 * 38 * @(#)macro.h 1.4 21/08/15 2021 J. Schilling 39 */ 40 41 #include <mksh/defs.h> 42 43 /* 44 * The expansion type for expand_macro() and expand_value(). 45 * 46 */ 47 typedef enum { 48 deflt_expand = 0, /* The default macro expansion behavior */ 49 no_expand = 1, /* Do not expand GNU type ::= macros */ 50 keep_ddollar = 2 /* Keep $$ if doing :::= or +:= assignment */ 51 } Expand_Type; 52 53 extern void expand_macro(register Source source, register String destination, wchar_t *current_string, Boolean cmd, Expand_Type exp_type = deflt_expand); 54 extern void expand_value(Name value, register String destination, Boolean cmd, Expand_Type exp_type = deflt_expand); 55 extern Name getvar(register Name name); 56 57 extern Property setvar_daemon(register Name name, register Name value, Boolean append, Daemon daemon, Boolean strip_trailing_spaces, short debug_level); 58 59 #endif 60