paw: spkg: Create seperate strlib directory

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-22 03:37:02 +00:00
parent f38cd9e619
commit 9e98bae25b
4 changed files with 0 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2026, Chloe M.
* Provided under the BSD-3 clause.
*
* Description: RtlMemCmp() implementation
* Author: Chloe M.
*/
#include <string.h>
LONG
RtlMemCmp(const VOID *Buffer1, const VOID *Buffer2, USIZE Length)
{
const UCHAR *Ptr1 = Buffer1;
const UCHAR *Ptr2 = Buffer2;
if (Buffer1 == NULL || Buffer2 == NULL) {
return 0;
}
if (Length == 0) {
return 0;
}
do {
if (*Ptr1++ != *Ptr2++) {
return (*--Ptr1 - *--Ptr2);
}
} while (--Length != 0);
return 0;
}