X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/9b8c947be2d07e7c5006a92127e58b6022718cbd..60a917ef0909a3d22904e8204a0df64094af6e50:/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;