X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/77690f22c510be3adf79b925ce7b932f00dc8224..d56898ee77b960cfe7f1d75bca2725d9d5337553:/grubload/minilib.c diff --git a/grubload/minilib.c b/grubload/minilib.c index f2ab662..b9813d7 100644 --- a/grubload/minilib.c +++ b/grubload/minilib.c @@ -20,6 +20,24 @@ void memmove(unsigned char *dest, unsigned char *src, int bytes) *(dest++) = *(src++); } +int memcmp (unsigned char *a2, unsigned char *a1, int bytes) { + while (bytes--) + { + if (*(a2++) != *(a1++)) + return 1; + } + return 0; +} + +int strcmp (unsigned char *a2, unsigned char *a1) { + while (1) { + if (*a2 != *a1) return 1; + if (*a2 == 0) return 0; + a1++; + a2++; + } +} + int strlen(char *c) { int l = 0;