1 /* 2 Copyright (c) 1990 Regents of the University of California. 3 All rights reserved. 4 */ 5 /* Misc. local definitions for libc/stdlib */ 6 7 #ifndef _LOCAL_H_ 8 #define _LOCAL_H_ 9 10 char * _gcvt (double , int , char *, char, int); 11 12 #include "../locale/setlocale.h" 13 14 #ifndef __machine_mbstate_t_defined 15 #include <wchar.h> 16 #endif 17 18 typedef int wctomb_f (char *, wchar_t, mbstate_t *); 19 typedef wctomb_f *wctomb_p; 20 21 wctomb_f __ascii_wctomb; 22 #ifdef _MB_CAPABLE 23 wctomb_f __utf8_wctomb; 24 wctomb_f __sjis_wctomb; 25 wctomb_f __eucjp_wctomb; 26 wctomb_f __jis_wctomb; 27 wctomb_p __iso_wctomb (int val); 28 wctomb_p __cp_wctomb (int val); 29 #ifdef __CYGWIN__ 30 wctomb_f __gbk_wctomb; 31 wctomb_f __gb18030_wctomb; 32 wctomb_f __kr_wctomb; 33 wctomb_f __big5_wctomb; 34 #endif 35 #endif 36 37 #define __WCTOMB (__get_current_locale()->wctomb) 38 39 typedef int mbtowc_f (wchar_t *, const char *, size_t, 40 mbstate_t *); 41 typedef mbtowc_f *mbtowc_p; 42 43 mbtowc_f __ascii_mbtowc; 44 #ifdef _MB_CAPABLE 45 mbtowc_f __utf8_mbtowc; 46 mbtowc_f __sjis_mbtowc; 47 mbtowc_f __eucjp_mbtowc; 48 mbtowc_f __jis_mbtowc; 49 mbtowc_p __iso_mbtowc (int val); 50 mbtowc_p __cp_mbtowc (int val); 51 #ifdef __CYGWIN__ 52 mbtowc_f __gbk_mbtowc; 53 mbtowc_f __gb18030_mbtowc; 54 mbtowc_f __kr_mbtowc; 55 mbtowc_f __big5_mbtowc; 56 #endif 57 #endif 58 59 #define __MBTOWC (__get_current_locale()->mbtowc) 60 61 extern wchar_t __iso_8859_conv[14][0x60]; 62 int __iso_8859_val_index (int); 63 int __iso_8859_index (const char *); 64 65 extern wchar_t __cp_conv[][0x80]; 66 int __cp_val_index (int); 67 int __cp_index (const char *); 68 69 #endif 70