diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/internal/ntapi.c | 1 | ||||
-rw-r--r-- | src/internal/ntapi_fnapi.h | 1 | ||||
-rw-r--r-- | src/string/ntapi_tt_strcmp_multibyte.c | 18 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/internal/ntapi.c b/src/internal/ntapi.c index e67bcf1..b01a52c 100644 --- a/src/internal/ntapi.c +++ b/src/internal/ntapi.c @@ -167,6 +167,7 @@ static int32_t __fastcall __ntapi_init_once(ntapi_vtbl ** pvtbl) __ntapi->tt_string_null_offset_dword = __ntapi_tt_string_null_offset_dword; __ntapi->tt_string_null_offset_qword = __ntapi_tt_string_null_offset_qword; __ntapi->tt_string_null_offset_ptrsize = __ntapi_tt_string_null_offset_ptrsize; + __ntapi->tt_strcmp_multibyte = __ntapi_tt_strcmp_multibyte; __ntapi->strlen = __ntapi_tt_string_null_offset_multibyte; __ntapi->wcslen = __ntapi_wcslen; __ntapi->tt_aligned_block_memset = __ntapi_tt_aligned_block_memset; diff --git a/src/internal/ntapi_fnapi.h b/src/internal/ntapi_fnapi.h index a7436c5..ab74d85 100644 --- a/src/internal/ntapi_fnapi.h +++ b/src/internal/ntapi_fnapi.h @@ -53,6 +53,7 @@ ntapi_tt_string_null_offset_short __ntapi_tt_string_null_offset_short; ntapi_tt_string_null_offset_dword __ntapi_tt_string_null_offset_dword; ntapi_tt_string_null_offset_qword __ntapi_tt_string_null_offset_qword; ntapi_tt_string_null_offset_ptrsize __ntapi_tt_string_null_offset_ptrsize; +ntapi_tt_strcmp_multibyte __ntapi_tt_strcmp_multibyte; ntapi_wcslen __ntapi_wcslen; ntapi_tt_aligned_block_memset __ntapi_tt_aligned_block_memset; ntapi_tt_aligned_block_memcpy __ntapi_tt_aligned_block_memcpy; diff --git a/src/string/ntapi_tt_strcmp_multibyte.c b/src/string/ntapi_tt_strcmp_multibyte.c new file mode 100644 index 0000000..b6d04b2 --- /dev/null +++ b/src/string/ntapi_tt_strcmp_multibyte.c @@ -0,0 +1,18 @@ +/********************************************************/ +/* ntapi: Native API core library */ +/* Copyright (C) 2013--2016 Z. Gilboa */ +/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */ +/********************************************************/ + +#include <psxtypes/psxtypes.h> +#include <ntapi/nt_string.h> + +int __cdecl __ntapi_tt_strcmp_multibyte( + __in const char * a, + __in const char * b) +{ + for (; (*a == *b) && *a; a++, b++) + (void)0; + + return (int)*a - (int)*b; +} |