2002-09-06 18:00:07 +00:00
|
|
|
#include "byte.h"
|
2004-05-07 00:12:30 +00:00
|
|
|
#include "errmsg.h"
|
2002-09-06 18:00:07 +00:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
char buf[4096];
|
2004-05-07 00:12:30 +00:00
|
|
|
carp("both aligned");
|
2002-09-06 18:00:07 +00:00
|
|
|
byte_copy(buf,16,"this is a test!\n");
|
2004-05-07 00:12:30 +00:00
|
|
|
carp("destination aligned, source unaligned");
|
2002-09-06 18:00:07 +00:00
|
|
|
byte_copy(buf,1000,buf+1);
|
2004-05-07 00:12:30 +00:00
|
|
|
carp("destination unaligned, source aligned");
|
2002-09-06 18:00:07 +00:00
|
|
|
byte_copy(buf+1,1000,buf);
|
2004-05-07 00:12:30 +00:00
|
|
|
carp("both unaligned");
|
2002-09-06 18:00:07 +00:00
|
|
|
byte_copy(buf+1,1000,buf+3);
|
2004-11-25 21:52:35 +00:00
|
|
|
return 0;
|
2002-09-06 18:00:07 +00:00
|
|
|
}
|