X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/9b8c947be2d07e7c5006a92127e58b6022718cbd..86c89e89a88d25e85956b258005b52e0f2686b89:/grubload/minilib.c?ds=sidebyside 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;