1 #ifndef _MKSH_MISC_H 2 #define _MKSH_MISC_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 2004 Sun Microsystems, Inc. All rights reserved. 27 * Use is subject to license terms. 28 */ 29 /* 30 * @(#)misc.h 1.4 06/12/12 31 */ 32 33 #pragma ident "@(#)misc.h 1.4 06/12/12" 34 35 /* 36 * Copyright 2017 J. Schilling 37 * 38 * @(#)misc.h 1.3 21/08/16 2017 J. Schilling 39 */ 40 41 #include <mksh/defs.h> 42 43 extern void append_char(wchar_t from, register String to); 44 extern Property append_prop(register Name target, register Property_id type); 45 extern void append_string(register wchar_t *from, register String to, register int length); 46 extern void enable_interrupt(register void (*handler) (int)); 47 extern char *errmsg(int errnum); 48 extern void fatal_mksh(const char * message, ...); 49 extern void fatal_reader_mksh(const char *pattern, ...); 50 extern char *get_current_path_mksh(void); 51 extern Property get_prop(register Property start, register Property_id type); 52 extern char *getmem(register int size); 53 extern Name getname_fn(wchar_t *name, register int len, register Boolean dont_enter, register Boolean * foundp = NULL); 54 extern void store_name(Name name); 55 extern void free_name(Name name); 56 extern void handle_interrupt_mksh(int); 57 extern Property maybe_append_prop(register Name target, register Property_id type); 58 extern void retmem(wchar_t *p); 59 extern void retmem_mb(caddr_t p); 60 extern void setup_char_semantics(void); 61 extern void setup_interrupt(register void (*handler) (int)); 62 extern void warning_mksh(char * message, ...); 63 64 extern void append_string(register char *from, register String to, register int length); 65 extern wchar_t *get_wstring(char * from); 66 67 68 #endif 69