Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
451 B

#include "byte.h"
/* byte_copyr copies in[len-1] to out[len-1], in[len-2] to out[len-2],
* ... and in[0] to out[0] */
void byte_copyr(void* out, unsigned long len, const void* in) {
register char* s=(char*)out+len;
register const char* t=in;
register const char* u=t+len;
for (;;) {
if (t>=u) break; --u; --s; *s=*u;
if (t>=u) break; --u; --s; *s=*u;
if (t>=u) break; --u; --s; *s=*u;
if (t>=u) break; --u; --s; *s=*u;
}
}