Add libbroken.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@417 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Unknown User d91-jda
1996-04-23 07:15:17 +00:00
parent d4ebb7fe66
commit 89af9ddeda
20 changed files with 670 additions and 0 deletions

33
lib/roken/memmove.c Normal file
View File

@@ -0,0 +1,33 @@
/*
* memmove for systems that doesn't have it
*
* $Id$
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/types.h>
RCSID("$Id$");
void* memmove(void *s1, const void *s2, size_t n)
{
char *s=(char*)s2, *d=(char*)s1;
if(d > s){
s+=n-1;
d+=n-1;
while(n){
*d--=*s--;
n--;
}
}else if(d < s)
while(n){
*d++=*s++;
n--;
}
return s1;
}