1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy is of the CDDL is also available via the Internet 9 * at http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2013 David Hoeppner. All rights reserved. 14 */ 15 16 /* 17 * POSIX iconv. 18 */ 19 20 #include <sys/types.h> 21 22 #include <libintl.h> 23 #include <stdarg.h> 24 #include <stdio.h> 25 #include <stdlib.h> 26 #include <strings.h> 27 28 /* 29 * Macros. 30 */ 31 #define _(x) gettext(x) 32 33 extern int com_char; /* Comment character */ 34 extern int esc_char; /* Escape character */ 35 extern int mb_cur_max; 36 extern int mb_cur_min; 37 38 extern int yydebug; 39 extern int lineno; 40 41 /* 42 * Functions from scanner.c 43 */ 44 char *to_mb_string(const wchar_t *); 45 void set_wide_encoding(const char *); 46 void add_wcs(wchar_t); 47 wchar_t *get_wcs(void); 48 void reset_scanner(const char *); 49 void yyerror(const char *); 50 void errf(const char *, ...); 51 void scan_to_eol(void); 52 53 /* 54 * Functions from charmap.c 55 */ 56 void init_charmap(void); 57 void switch_charmap(void); 58 void add_charmap(char *, int); 59 void add_charmap_range(char *, char *, int);