You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libowfat/test/byte_copy.c

16 lines
362 B
C

21 years ago
#include "byte.h"
19 years ago
#include "errmsg.h"
21 years ago
int main() {
char buf[4096];
19 years ago
carp("both aligned");
21 years ago
byte_copy(buf,16,"this is a test!\n");
19 years ago
carp("destination aligned, source unaligned");
21 years ago
byte_copy(buf,1000,buf+1);
19 years ago
carp("destination unaligned, source aligned");
21 years ago
byte_copy(buf+1,1000,buf);
19 years ago
carp("both unaligned");
21 years ago
byte_copy(buf+1,1000,buf+3);
return 0;
21 years ago
}