From 67b5d6ea184c432b21b3f07649ec3ba150a1d350 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 17 Mar 2021 15:20:53 +0200 Subject: cpuid: show manufacturer and model --- libk/string.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libk/string.h') diff --git a/libk/string.h b/libk/string.h index 30824b8..d0a0b32 100644 --- a/libk/string.h +++ b/libk/string.h @@ -1,14 +1,20 @@ #pragma once #include +extern "C" { +void* memcpy(void* dstptr, const void* srcptr, const size_t n); +void* memset(void* bufptr, const int value, const size_t n); +void* memmove(void* dstptr, const void* srcptr, const size_t n); +int memcmp(const void* aptr, const void* bptr, const size_t n); +} + /** * Calculate the length of the string (in bytes) pointed to by str, excluding * the terminating null character. */ constexpr size_t strlen(const char* str) { size_t len = 0; - while (str[len] != '\0') - ++len; + while (str[len] != '\0') ++len; return len; } @@ -32,8 +38,7 @@ public: operator bool() const { return reverse ? (pos >= 0) : (pos < length); } explicit ViewIterator(const char* b, size_t l, bool r = false) : buffer(b), length(l), reverse(r) { - if (reverse) - pos = length - 1; + if (reverse) pos = length - 1; }; private: -- cgit v1.2.1