10 char *strcpy(char *dest, const char *src)
21 char *strcat(char *dest, const char *src)
25 while(*src) *dest++ = *src++;
31 * \fn int strcmp(const char *s1, const char *s2)
32 * \brief Compare two strings
34 int strcmp(const char *s1, const char *s2)
36 while(*s1 && *s1 == *s2) s1++,s2++;
41 * \fn int strlen(const char *str)
44 int strlen(const char *str)
47 while(*str) len++,str++;
51 int memcmp(const void *p1, const void *p2, int len)
53 const char *b1 = p1, *b2 = p2;
56 if(b1 != b2) return b1 - b2;
62 * \fn int file_exists(char *filename)
63 * \brief Checks if a file exists
65 int file_exists(const char *filename)
68 //fd = open(filename, OPENFLAG_READ);
69 fd = open(filename, 0);
70 if(fd == -1) return 0;
75 uint64_t __udivdi3(uint64_t Num, uint64_t Den)
77 uint64_t ret = 0, add = 1;
79 // Find what power of two times Den is > Num
91 // If the numerator is > Den, subtract and add to return value
98 // if(Rem) *Rem = Num;