* libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.
(__jp2uc): Change the scope to static function. * libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__. * libc/string/local.h (_jp2uc): Include ../ctype/local.h.
This commit is contained in:
parent
6f15a1a0f5
commit
e17c0a23e3
|
@ -1,3 +1,10 @@
|
||||||
|
2009-06-02 IWAMURO Motonori <deenheart@gmail.com>
|
||||||
|
|
||||||
|
* libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.
|
||||||
|
(__jp2uc): Change the scope to static function.
|
||||||
|
* libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__.
|
||||||
|
* libc/string/local.h (_jp2uc): Include ../ctype/local.h.
|
||||||
|
|
||||||
2009-05-27 Neal H. Walfield <neal@gnu.org>
|
2009-05-27 Neal H. Walfield <neal@gnu.org>
|
||||||
|
|
||||||
* libc/include/machine/setjmp.h (sigjmp_buf): Size according to
|
* libc/include/machine/setjmp.h (sigjmp_buf): Size according to
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
#include <newlib.h>
|
#include <newlib.h>
|
||||||
|
|
||||||
#ifdef _MB_CAPABLE
|
#ifdef _MB_CAPABLE
|
||||||
|
/* Under Cygwin, the incoming wide character is already given in UTF due
|
||||||
|
to the requirements of the underlying OS. */
|
||||||
|
#ifndef __CYGWIN__
|
||||||
|
|
||||||
#include <_ansi.h>
|
#include <_ansi.h>
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
|
@ -43,7 +46,7 @@
|
||||||
#define JP_SJIS 2
|
#define JP_SJIS 2
|
||||||
#define JP_EUCJP 3
|
#define JP_EUCJP 3
|
||||||
|
|
||||||
wint_t
|
static wint_t
|
||||||
_DEFUN (__jp2uc, (c, type), wint_t c _AND int type)
|
_DEFUN (__jp2uc, (c, type), wint_t c _AND int type)
|
||||||
{
|
{
|
||||||
int index, adj;
|
int index, adj;
|
||||||
|
@ -150,17 +153,14 @@ _DEFUN (__jp2uc, (c, type), wint_t c _AND int type)
|
||||||
wint_t
|
wint_t
|
||||||
_DEFUN (_jp2uc, (c), wint_t c)
|
_DEFUN (_jp2uc, (c), wint_t c)
|
||||||
{
|
{
|
||||||
/* Under Cygwin, the incoming wide character is already given in UTF due
|
|
||||||
to the requirements of the underlying OS. */
|
|
||||||
#ifndef __CYGWIN__
|
|
||||||
if (!strcmp (__locale_charset (), "JIS"))
|
if (!strcmp (__locale_charset (), "JIS"))
|
||||||
c = __jp2uc (c, JP_JIS);
|
c = __jp2uc (c, JP_JIS);
|
||||||
else if (!strcmp (__locale_charset (), "SJIS"))
|
else if (!strcmp (__locale_charset (), "SJIS"))
|
||||||
c = __jp2uc (c, JP_SJIS);
|
c = __jp2uc (c, JP_SJIS);
|
||||||
else if (!strcmp (__locale_charset (), "EUCJP"))
|
else if (!strcmp (__locale_charset (), "EUCJP"))
|
||||||
c = __jp2uc (c, JP_EUCJP);
|
c = __jp2uc (c, JP_EUCJP);
|
||||||
#endif
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* !__CYGWIN__ */
|
||||||
#endif /* _MB_CAPABLE */
|
#endif /* _MB_CAPABLE */
|
||||||
|
|
|
@ -23,5 +23,10 @@
|
||||||
extern char *__locale_charset ();
|
extern char *__locale_charset ();
|
||||||
|
|
||||||
/* internal function to translate JP to Unicode */
|
/* internal function to translate JP to Unicode */
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
/* Under Cygwin, the incoming wide character is already given in UTF due
|
||||||
|
to the requirements of the underlying OS. */
|
||||||
|
#define _jp2uc(c) (c)
|
||||||
|
#else
|
||||||
wint_t _EXFUN (_jp2uc, (wint_t));
|
wint_t _EXFUN (_jp2uc, (wint_t));
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include <_ansi.h>
|
#include <_ansi.h>
|
||||||
|
#include <../ctype/local.h>
|
||||||
/* internal function to translate JP to Unicode */
|
|
||||||
wint_t _EXFUN (_jp2uc, (wint_t));
|
|
||||||
|
|
||||||
/* internal function to compute width of wide char. */
|
/* internal function to compute width of wide char. */
|
||||||
int _EXFUN (__wcwidth, (wint_t));
|
int _EXFUN (__wcwidth, (wint_t));
|
||||||
|
|
Loading…
Reference in New Issue