+
+/**
+ * \fn EXPORT int memcmp(const void *mem1, const void *mem2, size_t count)
+ * \brief Compare two regions of memory
+ * \param mem1 Region 1
+ * \param mem2 Region 2
+ * \param count Number of bytes to check
+ */
+EXPORT int memcmp(const void *mem1, const void *mem2, size_t count)
+{
+ while(count--)
+ {
+ if( *(unsigned char*)mem1 != *(unsigned char*)mem2 )
+ return *(unsigned char*)mem1 - *(unsigned char*)mem2;
+ mem1 ++;
+ mem2 ++;
+ }
+ return 0;
+}
+
+/**
+ * \fn EXPORT void *memchr(void *ptr, int value, size_t num)
+ * \brief Locates the first occurence of \a value starting at \a ptr
+ * \param ptr Starting memory location
+ * \param value Value to find
+ * \param num Size of memory area to check
+ */
+EXPORT void *memchr(void *ptr, int value, size_t num)
+{
+ while(num--)
+ {
+ if( *(unsigned char*)ptr == (unsigned char)value )
+ return ptr;
+ ptr ++;
+ }
+ return NULL;
+}