works pretty reliable now under MiNT

This commit is contained in:
Markus Fröschle
2013-05-11 18:27:00 +00:00
parent bfff40e0b2
commit b041d6197c
5 changed files with 76 additions and 34 deletions

View File

@@ -28,6 +28,13 @@ char *strcpy(char *dst, const char *src)
return ptr;
}
char *strncpy(char *dst, const char *src, int max)
{
char *ptr = dst;
while ((*dst++ = *src++) != '\0' && max-- >= 0);
return ptr;
}
int atoi(const char *c)
{
int value = 0;