Commit 724a09ab authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

ucrtbase: Add _isblank_l.

parent 21d6e97d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@ stub __wcsncnt @ stub __wcsncnt
@ cdecl _isalnum_l(long ptr) ucrtbase._isalnum_l @ cdecl _isalnum_l(long ptr) ucrtbase._isalnum_l
@ cdecl _isalpha_l(long ptr) ucrtbase._isalpha_l @ cdecl _isalpha_l(long ptr) ucrtbase._isalpha_l
@ stub _isblank_l @ cdecl _isblank_l(long ptr) ucrtbase._isblank_l
@ cdecl _iscntrl_l(long ptr) ucrtbase._iscntrl_l @ cdecl _iscntrl_l(long ptr) ucrtbase._iscntrl_l
@ cdecl _isctype(long long) ucrtbase._isctype @ cdecl _isctype(long long) ucrtbase._isctype
@ cdecl _isctype_l(long long ptr) ucrtbase._isctype_l @ cdecl _isctype_l(long long ptr) ucrtbase._isctype_l
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
@ cdecl is_wctype(long long) ucrtbase.is_wctype @ cdecl is_wctype(long long) ucrtbase.is_wctype
@ cdecl isalnum(long) ucrtbase.isalnum @ cdecl isalnum(long) ucrtbase.isalnum
@ cdecl isalpha(long) ucrtbase.isalpha @ cdecl isalpha(long) ucrtbase.isalpha
@ stub isblank @ cdecl isblank(long) ucrtbase.isblank
@ cdecl iscntrl(long) ucrtbase.iscntrl @ cdecl iscntrl(long) ucrtbase.iscntrl
@ cdecl isdigit(long) ucrtbase.isdigit @ cdecl isdigit(long) ucrtbase.isdigit
@ cdecl isgraph(long) ucrtbase.isgraph @ cdecl isgraph(long) ucrtbase.isgraph
......
...@@ -1291,7 +1291,7 @@ ...@@ -1291,7 +1291,7 @@
@ cdecl _isalnum_l(long ptr) MSVCRT__isalnum_l @ cdecl _isalnum_l(long ptr) MSVCRT__isalnum_l
@ cdecl _isalpha_l(long ptr) MSVCRT__isalpha_l @ cdecl _isalpha_l(long ptr) MSVCRT__isalpha_l
@ cdecl _isatty(long) MSVCRT__isatty @ cdecl _isatty(long) MSVCRT__isatty
@ stub _isblank_l @ cdecl _isblank_l(long ptr) MSVCRT__isblank_l
@ cdecl _iscntrl_l(long ptr) MSVCRT__iscntrl_l @ cdecl _iscntrl_l(long ptr) MSVCRT__iscntrl_l
@ cdecl _isctype(long long) MSVCRT__isctype @ cdecl _isctype(long long) MSVCRT__isctype
@ cdecl _isctype_l(long long ptr) MSVCRT__isctype_l @ cdecl _isctype_l(long long ptr) MSVCRT__isctype_l
...@@ -2215,7 +2215,7 @@ ...@@ -2215,7 +2215,7 @@
@ cdecl is_wctype(long long) ntdll.iswctype @ cdecl is_wctype(long long) ntdll.iswctype
@ cdecl isalnum(long) MSVCRT_isalnum @ cdecl isalnum(long) MSVCRT_isalnum
@ cdecl isalpha(long) MSVCRT_isalpha @ cdecl isalpha(long) MSVCRT_isalpha
@ stub isblank @ cdecl isblank(long) MSVCRT_isblank
@ cdecl iscntrl(long) MSVCRT_iscntrl @ cdecl iscntrl(long) MSVCRT_iscntrl
@ cdecl isdigit(long) MSVCRT_isdigit @ cdecl isdigit(long) MSVCRT_isdigit
@ cdecl isgraph(long) MSVCRT_isgraph @ cdecl isgraph(long) MSVCRT_isgraph
......
...@@ -1194,7 +1194,7 @@ ...@@ -1194,7 +1194,7 @@
@ cdecl _isalnum_l(long ptr) msvcr120._isalnum_l @ cdecl _isalnum_l(long ptr) msvcr120._isalnum_l
@ cdecl _isalpha_l(long ptr) msvcr120._isalpha_l @ cdecl _isalpha_l(long ptr) msvcr120._isalpha_l
@ cdecl _isatty(long) msvcr120._isatty @ cdecl _isatty(long) msvcr120._isatty
@ stub _isblank_l @ cdecl _isblank_l(long ptr) msvcr120._isblank_l
@ cdecl _iscntrl_l(long ptr) msvcr120._iscntrl_l @ cdecl _iscntrl_l(long ptr) msvcr120._iscntrl_l
@ cdecl _isctype(long long) msvcr120._isctype @ cdecl _isctype(long long) msvcr120._isctype
@ cdecl _isctype_l(long long ptr) msvcr120._isctype_l @ cdecl _isctype_l(long long ptr) msvcr120._isctype_l
...@@ -1878,7 +1878,7 @@ ...@@ -1878,7 +1878,7 @@
@ stub imaxdiv @ stub imaxdiv
@ cdecl isalnum(long) msvcr120.isalnum @ cdecl isalnum(long) msvcr120.isalnum
@ cdecl isalpha(long) msvcr120.isalpha @ cdecl isalpha(long) msvcr120.isalpha
@ stub isblank @ cdecl isblank(long) msvcr120.isblank
@ cdecl iscntrl(long) msvcr120.iscntrl @ cdecl iscntrl(long) msvcr120.iscntrl
@ cdecl isdigit(long) msvcr120.isdigit @ cdecl isdigit(long) msvcr120.isdigit
@ cdecl isgraph(long) msvcr120.isgraph @ cdecl isgraph(long) msvcr120.isgraph
......
...@@ -293,6 +293,22 @@ int CDECL MSVCRT_isxdigit(int c) ...@@ -293,6 +293,22 @@ int CDECL MSVCRT_isxdigit(int c)
} }
/********************************************************************* /*********************************************************************
* _isblank_l (MSVCRT.@)
*/
int CDECL MSVCRT__isblank_l(int c, MSVCRT__locale_t locale)
{
return c == '\t' || MSVCRT__isctype_l( c, MSVCRT__BLANK, locale );
}
/*********************************************************************
* isblank (MSVCRT.@)
*/
int CDECL MSVCRT_isblank(int c)
{
return c == '\t' || MSVCRT__isctype( c, MSVCRT__BLANK );
}
/*********************************************************************
* __isascii (MSVCRT.@) * __isascii (MSVCRT.@)
*/ */
int CDECL MSVCRT___isascii(int c) int CDECL MSVCRT___isascii(int c)
......
...@@ -86,6 +86,9 @@ static char* (CDECL *p__get_narrow_winmain_command_line)(void); ...@@ -86,6 +86,9 @@ static char* (CDECL *p__get_narrow_winmain_command_line)(void);
static int (CDECL *p_sopen_dispatch)(const char *, int, int, int, int *, int); static int (CDECL *p_sopen_dispatch)(const char *, int, int, int, int *, int);
static int (CDECL *p_sopen_s)(int *, const char *, int, int, int); static int (CDECL *p_sopen_s)(int *, const char *, int, int, int);
static MSVCRT_lldiv_t (CDECL *p_lldiv)(LONGLONG,LONGLONG); static MSVCRT_lldiv_t (CDECL *p_lldiv)(LONGLONG,LONGLONG);
static int (CDECL *p__isctype)(int,int);
static int (CDECL *p_isblank)(int);
static int (CDECL *p__isblank_l)(int,_locale_t);
static void test__initialize_onexit_table(void) static void test__initialize_onexit_table(void)
{ {
...@@ -380,6 +383,9 @@ static BOOL init(void) ...@@ -380,6 +383,9 @@ static BOOL init(void)
p_sopen_dispatch = (void*)GetProcAddress(module, "_sopen_dispatch"); p_sopen_dispatch = (void*)GetProcAddress(module, "_sopen_dispatch");
p_sopen_s = (void*)GetProcAddress(module, "_sopen_s"); p_sopen_s = (void*)GetProcAddress(module, "_sopen_s");
p_lldiv = (void*)GetProcAddress(module, "lldiv"); p_lldiv = (void*)GetProcAddress(module, "lldiv");
p__isctype = (void*)GetProcAddress(module, "_isctype");
p_isblank = (void*)GetProcAddress(module, "isblank");
p__isblank_l = (void*)GetProcAddress(module, "_isblank_l");
return TRUE; return TRUE;
} }
...@@ -460,6 +466,26 @@ static void test_lldiv(void) ...@@ -460,6 +466,26 @@ static void test_lldiv(void)
ok(r.rem == 0x222, "rem = %x%08x\n", (INT32)(r.rem >> 32), (UINT32)r.rem); ok(r.rem == 0x222, "rem = %x%08x\n", (INT32)(r.rem >> 32), (UINT32)r.rem);
} }
static void test_isblank(void)
{
int c;
for(c = 0; c <= 0xff; c++) {
if(c == '\t' || c == ' ') {
if(c == '\t')
ok(!p__isctype(c, _BLANK), "tab shouldn't be blank\n");
else
ok(p__isctype(c, _BLANK), "space should be blank\n");
ok(p_isblank(c), "%d should be blank\n", c);
ok(p__isblank_l(c, NULL), "%d should be blank\n", c);
} else {
ok(!p__isctype(c, _BLANK), "%d shouldn't be blank\n", c);
ok(!p_isblank(c), "%d shouldn't be blank\n", c);
ok(!p__isblank_l(c, NULL), "%d shouldn't be blank\n", c);
}
}
}
START_TEST(misc) START_TEST(misc)
{ {
int arg_c; int arg_c;
...@@ -483,4 +509,5 @@ START_TEST(misc) ...@@ -483,4 +509,5 @@ START_TEST(misc)
test__sopen_dispatch(); test__sopen_dispatch();
test__sopen_s(); test__sopen_s();
test_lldiv(); test_lldiv();
test_isblank();
} }
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
@ cdecl _isalnum_l(long ptr) MSVCRT__isalnum_l @ cdecl _isalnum_l(long ptr) MSVCRT__isalnum_l
@ cdecl _isalpha_l(long ptr) MSVCRT__isalpha_l @ cdecl _isalpha_l(long ptr) MSVCRT__isalpha_l
@ cdecl _isatty(long) MSVCRT__isatty @ cdecl _isatty(long) MSVCRT__isatty
@ stub _isblank_l @ cdecl _isblank_l(long ptr) MSVCRT__isblank_l
@ cdecl _iscntrl_l(long ptr) MSVCRT__iscntrl_l @ cdecl _iscntrl_l(long ptr) MSVCRT__iscntrl_l
@ cdecl _isctype(long long) MSVCRT__isctype @ cdecl _isctype(long long) MSVCRT__isctype
@ cdecl _isctype_l(long long ptr) MSVCRT__isctype_l @ cdecl _isctype_l(long long ptr) MSVCRT__isctype_l
...@@ -2349,7 +2349,7 @@ ...@@ -2349,7 +2349,7 @@
@ cdecl is_wctype(long long) ntdll.iswctype @ cdecl is_wctype(long long) ntdll.iswctype
@ cdecl isalnum(long) MSVCRT_isalnum @ cdecl isalnum(long) MSVCRT_isalnum
@ cdecl isalpha(long) MSVCRT_isalpha @ cdecl isalpha(long) MSVCRT_isalpha
@ stub isblank @ cdecl isblank(long) MSVCRT_isblank
@ cdecl iscntrl(long) MSVCRT_iscntrl @ cdecl iscntrl(long) MSVCRT_iscntrl
@ cdecl isdigit(long) MSVCRT_isdigit @ cdecl isdigit(long) MSVCRT_isdigit
@ cdecl isgraph(long) MSVCRT_isgraph @ cdecl isgraph(long) MSVCRT_isgraph
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment