Implemented isw*() wctype.h functions.

This commit is contained in:
David Howells 2000-02-13 15:04:24 +00:00 committed by Alexandre Julliard
parent ef22c25887
commit 53ec9f3287
3 changed files with 186 additions and 14 deletions

View File

@ -407,19 +407,19 @@ init CRTDLL_Init
@ cdecl ispunct(long) ispunct
@ cdecl isspace(long) isspace
@ cdecl isupper(long) isupper
@ stub iswalnum
@ stub iswalpha
@ cdecl iswalnum(long) CRTDLL_iswalnum
@ cdecl iswalpha(long) CRTDLL_iswalpha
@ stub iswascii
@ stub iswcntrl
@ stub iswctype
@ stub iswdigit
@ stub iswgraph
@ stub iswlower
@ stub iswprint
@ stub iswpunct
@ stub iswspace
@ stub iswupper
@ stub iswxdigit
@ cdecl iswcntrl(long) CRTDLL_iswcntrl
@ cdecl iswctype(long long) CRTDLL_iswctype
@ cdecl iswdigit(long) CRTDLL_iswdigit
@ cdecl iswgraph(long) CRTDLL_iswgraph
@ cdecl iswlower(long) CRTDLL_iswlower
@ cdecl iswprint(long) CRTDLL_iswprint
@ cdecl iswpunct(long) CRTDLL_iswpunct
@ cdecl iswspace(long) CRTDLL_iswspace
@ cdecl iswupper(long) CRTDLL_iswupper
@ cdecl iswxdigit(long) CRTDLL_iswxdigit
@ cdecl isxdigit(long) isxdigit
@ cdecl labs(long) labs
@ cdecl ldexp(double long) ldexp

View File

@ -19,7 +19,9 @@
#include "windef.h"
#include "crtdll.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(crtdll);
/*********************************************************************
* CRTDLL__wcsdup (CRTDLL.320)
@ -406,3 +408,173 @@ INT __cdecl CRTDLL_wctomb( LPSTR dst, WCHAR ch )
{
return wctomb( dst, (wchar_t)ch );
}
/*********************************************************************
* CRTDLL_iswalnum (CRTDLL.405)
*/
int CRTDLL_iswalnum(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswalnum
return iswalnum(wc);
#else
return isalnum( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswalpha (CRTDLL.406)
*/
int CRTDLL_iswalpha(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswalpha
return iswalpha(wc);
#else
return isalpha( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswcntrl (CRTDLL.408)
*/
int CRTDLL_iswcntrl(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswcntrl
return iswcntrl(wc);
#else
return iscntrl( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswctype (CRTDLL.409)
*/
int CRTDLL_iswctype(unsigned short wc, unsigned short wct)
{
#ifdef HAVE_WCTYPE_H
wctype_t mask = 0;
if (wct & 0x0001) mask |= _ISwupper;
if (wct & 0x0002) mask |= _ISwlower;
if (wct & 0x0004) mask |= _ISwdigit;
if (wct & 0x0008) mask |= _ISwspace;
if (wct & 0x0010) mask |= _ISwpunct;
if (wct & 0x0020) mask |= _ISwcntrl;
if (wct & 0x0040) mask |= _ISwblank;
if (wct & 0x0080) mask |= _ISwxdigit;
if (wct & 0x0100) mask |= _ISwalpha;
if (wct & 0x8000)
FIXME(": iswctype(%04hx,_LEADBYTE|...) requested\n",wc);
#undef iswctype
return iswctype(wc,mask);
#else
FIXME(":(%ld,%p): iswctype() not supported\n",hand,x2);
#endif
}
/*********************************************************************
* CRTDLL_iswdigit (CRTDLL.410)
*/
int CRTDLL_iswdigit(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswdigit
return iswdigit(wc);
#else
return isdigit( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswgraph (CRTDLL.411)
*/
int CRTDLL_iswgraph(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswgraph
return iswgraph(wc);
#else
return isgraph( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswlower (CRTDLL.412)
*/
int CRTDLL_iswlower(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswlower
return iswlower(wc);
#else
return islower( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswprint (CRTDLL.413)
*/
int CRTDLL_iswprint(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswprint
return iswprint(wc);
#else
return isprint( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswpunct (CRTDLL.414)
*/
int CRTDLL_iswpunct(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswpunct
return iswpunct(wc);
#else
return ispunct( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswspace (CRTDLL.415)
*/
int CRTDLL_iswspace(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswspace
return iswspace(wc);
#else
return isspace( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswupper (CRTDLL.416)
*/
int CRTDLL_iswupper(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswupper
return iswupper(wc);
#else
return isupper( LOBYTE(ch) ); /* FIXME */
#endif
}
/*********************************************************************
* CRTDLL_iswxdigit (CRTDLL.417)
*/
int CRTDLL_iswxdigit(unsigned short wc)
{
#ifdef HAVE_WCTYPE_H
#undef iswxdigit
return iswxdigit(wc);
#else
return isxdigit( LOBYTE(ch) ); /* FIXME */
#endif
}

View File

@ -901,8 +901,8 @@ type win32
@ cdecl isprint(long) isprint
@ cdecl isspace(long) isspace
@ cdecl isupper(long) isupper
@ stub iswalpha
@ stub iswctype
@ cdecl iswalpha(long) CRTDLL_iswalpha
@ cdecl iswctype(long long) CRTDLL_iswctype
@ cdecl isxdigit(long) isxdigit
@ stub labs
@ stub log