diff options
author | joe <joe@jerkface.net> | 2015-05-08 23:07:47 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2015-05-08 23:07:47 -0400 |
commit | 220534453eecc2c07ad710d72268aafd20b83138 (patch) | |
tree | 469bd5db135e31b7ea908152aa3389b9b1e06d5b /byte_copy.c |
initial commit
Diffstat (limited to 'byte_copy.c')
-rw-r--r-- | byte_copy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/byte_copy.c b/byte_copy.c new file mode 100644 index 0000000..74c9e4a --- /dev/null +++ b/byte_copy.c | |||
@@ -0,0 +1,16 @@ | |||
1 | /* Public domain. */ | ||
2 | |||
3 | #include "byte.h" | ||
4 | |||
5 | void byte_copy(to,n,from) | ||
6 | register char *to; | ||
7 | register unsigned int n; | ||
8 | register char *from; | ||
9 | { | ||
10 | for (;;) { | ||
11 | if (!n) return; *to++ = *from++; --n; | ||
12 | if (!n) return; *to++ = *from++; --n; | ||
13 | if (!n) return; *to++ = *from++; --n; | ||
14 | if (!n) return; *to++ = *from++; --n; | ||
15 | } | ||
16 | } | ||