]> Joshua Wise's Git repositories - netwatch.git/blobdiff - lib/minilib.c
Force IDT packing with __attribute__((packed)).
[netwatch.git] / lib / minilib.c
index c1d36b6e143eb54cb929334b293c81fdb306e290..664a0b42a7abe24229793a7490fd5b5cc934a923 100644 (file)
@@ -50,6 +50,16 @@ int strcmp (const char *a2, const char *a1) {
        }
 }
 
+int strncmp (const char *a2, const char *a1, int n) {
+       while (n--) {
+               if (*a2 != *a1) return 1;
+               if (*a2 == 0) return 0;
+               a1++;
+               a2++;
+       }
+       return 0;
+}
+
 int strlen(const char *c)
 {
        int l = 0;
@@ -65,6 +75,15 @@ void strcpy(char *a2, const char *a1)
        } while (*(a1++));
 }
 
+void strcat(char *dest, char *src)
+{
+       while (*dest)
+               dest++;
+       while (*src)
+               *(dest++) = *(src++);
+       *(dest++) = *(src++);
+}
+
 void puts(const char *c)
 {
        putbytes(c, strlen(c));
This page took 0.021256 seconds and 4 git commands to generate.