2007-12-12 13:12:24 +01:00
|
|
|
/* wchar.h: Extra wchar defs
|
|
|
|
|
2009-03-24 13:18:34 +01:00
|
|
|
Copyright 2007, 2009 Red Hat, Inc.
|
2007-12-12 13:12:24 +01:00
|
|
|
|
|
|
|
This file is part of Cygwin.
|
|
|
|
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
|
|
|
#ifndef _CYGWIN_WCHAR_H
|
|
|
|
#define _CYGWIN_WCHAR_H
|
|
|
|
|
|
|
|
#include_next <wchar.h>
|
|
|
|
|
2009-04-07 14:13:37 +02:00
|
|
|
#define ENCODING_LEN 31
|
|
|
|
|
2007-12-12 13:12:24 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-03-24 13:18:34 +01:00
|
|
|
typedef int mbtowc_f (struct _reent *, wchar_t *, const char *, size_t,
|
|
|
|
const char *, mbstate_t *);
|
|
|
|
typedef mbtowc_f *mbtowc_p;
|
2007-12-12 13:12:24 +01:00
|
|
|
|
2009-04-07 14:13:37 +02:00
|
|
|
extern mbtowc_p __mbtowc;
|
2009-03-24 14:21:23 +01:00
|
|
|
extern mbtowc_f __ascii_mbtowc;
|
|
|
|
extern mbtowc_f __utf8_mbtowc;
|
|
|
|
extern mbtowc_f __iso_mbtowc;
|
|
|
|
extern mbtowc_f __cp_mbtowc;
|
2009-07-20 17:44:55 +02:00
|
|
|
extern mbtowc_f __sjis_mbtowc;
|
|
|
|
extern mbtowc_f __eucjp_mbtowc;
|
|
|
|
extern mbtowc_f __gbk_mbtowc;
|
|
|
|
extern mbtowc_f __kr_mbtowc;
|
|
|
|
extern mbtowc_f __big5_mbtowc;
|
2007-12-12 13:12:24 +01:00
|
|
|
|
2009-04-07 14:13:37 +02:00
|
|
|
typedef int wctomb_f (struct _reent *, char *, wchar_t, const char *,
|
|
|
|
mbstate_t *);
|
|
|
|
typedef wctomb_f *wctomb_p;
|
|
|
|
|
|
|
|
extern wctomb_p __wctomb;
|
2009-05-14 21:49:37 +02:00
|
|
|
extern wctomb_f __ascii_wctomb;
|
2009-04-07 14:13:37 +02:00
|
|
|
extern wctomb_f __utf8_wctomb;
|
|
|
|
|
2009-03-24 14:21:23 +01:00
|
|
|
extern char *__locale_charset ();
|
2009-03-24 13:18:34 +01:00
|
|
|
|
2009-03-24 14:33:57 +01:00
|
|
|
extern mbtowc_p __set_charset_from_codepage (unsigned int cp, char *charset);
|
2007-12-12 13:12:24 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2009-04-07 14:13:37 +02:00
|
|
|
|
2009-04-07 18:22:55 +02:00
|
|
|
#ifdef __INSIDE_CYGWIN__
|
2009-09-28 14:10:32 +02:00
|
|
|
size_t __stdcall sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
|
2009-04-07 18:22:55 +02:00
|
|
|
const wchar_t *, size_t = (size_t) -1)
|
2009-04-07 14:13:37 +02:00
|
|
|
__attribute__ ((regparm(3)));
|
2009-05-14 21:49:37 +02:00
|
|
|
size_t __stdcall sys_wcstombs (char *dst, size_t len, const wchar_t * src,
|
|
|
|
size_t nwc = (size_t) -1)
|
|
|
|
__attribute__ ((regparm(3)));
|
2009-04-07 18:22:55 +02:00
|
|
|
size_t __stdcall sys_wcstombs_alloc (char **, int, const wchar_t *,
|
2009-04-07 14:13:37 +02:00
|
|
|
size_t = (size_t) -1)
|
|
|
|
__attribute__ ((regparm(3)));
|
|
|
|
|
2009-09-28 14:10:32 +02:00
|
|
|
size_t __stdcall sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
|
2009-04-07 14:13:37 +02:00
|
|
|
const char *, size_t = (size_t) -1)
|
|
|
|
__attribute__ ((regparm(3)));
|
2009-05-15 13:27:41 +02:00
|
|
|
size_t __stdcall sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src,
|
2009-05-14 21:49:37 +02:00
|
|
|
size_t nms = (size_t) -1)
|
|
|
|
__attribute__ ((regparm(3)));
|
2009-04-07 18:22:55 +02:00
|
|
|
size_t __stdcall sys_mbstowcs_alloc (wchar_t **, int, const char *,
|
2009-04-07 14:13:37 +02:00
|
|
|
size_t = (size_t) -1)
|
|
|
|
__attribute__ ((regparm(3)));
|
2009-04-07 18:22:55 +02:00
|
|
|
#endif /* __INSIDE_CYGWIN__ */
|
2009-04-07 14:13:37 +02:00
|
|
|
|
2007-12-12 13:12:24 +01:00
|
|
|
#endif /* _CYGWIN_WCHAR_H */
|