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 #endif 30 31 #define __WCTOMB (__get_current_locale()->wctomb) 32 33 typedef int mbtowc_f (wchar_t *, const char *, size_t, 34 mbstate_t *); 35 typedef mbtowc_f *mbtowc_p; 36 37 mbtowc_f __ascii_mbtowc; 38 #ifdef _MB_CAPABLE 39 mbtowc_f __utf8_mbtowc; 40 mbtowc_f __sjis_mbtowc; 41 mbtowc_f __eucjp_mbtowc; 42 mbtowc_f __jis_mbtowc; 43 mbtowc_p __iso_mbtowc (int val); 44 mbtowc_p __cp_mbtowc (int val); 45 #endif 46 47 #define __MBTOWC (__get_current_locale()->mbtowc) 48 49 extern wchar_t __iso_8859_conv[14][0x60]; 50 int __iso_8859_val_index (int); 51 int __iso_8859_index (const char *); 52 53 extern wchar_t __cp_conv[][0x80]; 54 int __cp_val_index (int); 55 int __cp_index (const char *); 56 57 #endif 58