2000-02-18 03:39:52 +08:00
|
|
|
/* Misc. local definitions for libc/stdlib */
|
|
|
|
|
|
|
|
#ifndef _LOCAL_H_
|
|
|
|
#define _LOCAL_H_
|
|
|
|
|
2017-12-04 13:54:48 +08:00
|
|
|
char * _gcvt (struct _reent *, double , int , char *, char, int);
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2016-07-21 04:05:59 +08:00
|
|
|
#include "../locale/setlocale.h"
|
2009-03-24 18:13:27 +08:00
|
|
|
|
2016-04-15 19:44:12 +08:00
|
|
|
#ifndef __machine_mbstate_t_defined
|
2009-03-24 18:13:27 +08:00
|
|
|
#include <wchar.h>
|
|
|
|
#endif
|
|
|
|
|
2016-07-21 04:05:59 +08:00
|
|
|
typedef int wctomb_f (struct _reent *, char *, wchar_t, mbstate_t *);
|
|
|
|
typedef wctomb_f *wctomb_p;
|
|
|
|
|
|
|
|
wctomb_f __ascii_wctomb;
|
2009-03-24 18:13:27 +08:00
|
|
|
#ifdef _MB_CAPABLE
|
2016-07-21 04:05:59 +08:00
|
|
|
wctomb_f __utf8_wctomb;
|
|
|
|
wctomb_f __sjis_wctomb;
|
|
|
|
wctomb_f __eucjp_wctomb;
|
|
|
|
wctomb_f __jis_wctomb;
|
|
|
|
wctomb_p __iso_wctomb (int val);
|
|
|
|
wctomb_p __cp_wctomb (int val);
|
2009-03-24 18:13:27 +08:00
|
|
|
#ifdef __CYGWIN__
|
2016-07-21 04:05:59 +08:00
|
|
|
wctomb_f __gbk_wctomb;
|
2023-03-17 01:25:09 +08:00
|
|
|
wctomb_f __gb18030_wctomb;
|
2016-07-21 04:05:59 +08:00
|
|
|
wctomb_f __kr_wctomb;
|
|
|
|
wctomb_f __big5_wctomb;
|
2009-03-24 18:13:27 +08:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2016-07-21 04:05:59 +08:00
|
|
|
#define __WCTOMB (__get_current_locale ()->wctomb)
|
|
|
|
|
|
|
|
typedef int mbtowc_f (struct _reent *, wchar_t *, const char *, size_t,
|
|
|
|
mbstate_t *);
|
|
|
|
typedef mbtowc_f *mbtowc_p;
|
|
|
|
|
|
|
|
mbtowc_f __ascii_mbtowc;
|
2009-03-24 18:13:27 +08:00
|
|
|
#ifdef _MB_CAPABLE
|
2016-07-21 04:05:59 +08:00
|
|
|
mbtowc_f __utf8_mbtowc;
|
|
|
|
mbtowc_f __sjis_mbtowc;
|
|
|
|
mbtowc_f __eucjp_mbtowc;
|
|
|
|
mbtowc_f __jis_mbtowc;
|
|
|
|
mbtowc_p __iso_mbtowc (int val);
|
|
|
|
mbtowc_p __cp_mbtowc (int val);
|
2009-03-24 18:13:27 +08:00
|
|
|
#ifdef __CYGWIN__
|
2016-07-21 04:05:59 +08:00
|
|
|
mbtowc_f __gbk_mbtowc;
|
2023-03-17 01:25:09 +08:00
|
|
|
mbtowc_f __gb18030_mbtowc;
|
2016-07-21 04:05:59 +08:00
|
|
|
mbtowc_f __kr_mbtowc;
|
|
|
|
mbtowc_f __big5_mbtowc;
|
2009-03-24 18:13:27 +08:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2016-07-21 04:05:59 +08:00
|
|
|
#define __MBTOWC (__get_current_locale ()->mbtowc)
|
|
|
|
|
2009-04-22 16:30:03 +08:00
|
|
|
extern wchar_t __iso_8859_conv[14][0x60];
|
2016-07-21 04:05:59 +08:00
|
|
|
int __iso_8859_val_index (int);
|
2009-03-24 18:13:27 +08:00
|
|
|
int __iso_8859_index (const char *);
|
|
|
|
|
2009-08-26 02:47:24 +08:00
|
|
|
extern wchar_t __cp_conv[][0x80];
|
2016-07-21 04:05:59 +08:00
|
|
|
int __cp_val_index (int);
|
2009-03-24 18:13:27 +08:00
|
|
|
int __cp_index (const char *);
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
#endif
|