9unsigned int byte_chr(
char *s,
unsigned int n,
int c)
15 if (!n) {
break; }
if (*t == ch) {
break; } ++t; --n;
20void byte_copy(
void *to,
unsigned int n,
const void *from)
23 const char *in = from;
26 if (!n) {
return; } *out++ = *in++; --n;
33 const char *in = from + n;
36 if (!n) {
return; } *--out = *--in; --n;
40int byte_diff(
const void *s,
unsigned int n,
const void *t)
46 if (!n) {
return 0; }
if (*a != *b) {
break; } ++a; ++b; --n;
48 return ((
int)(
unsigned int)(
unsigned char) *a)
49 - ((int)(
unsigned int)(
unsigned char) *b);
59 if (!n) {
break; }
if (*t == ch) { u = t; } ++t; --n;
70 if (!n) {
break; } *out++ = 0; --n;
80 if (!n) {
break; } *s++ = ch; --n;
void byte_fill(void *to, unsigned int n, int c)
void byte_zero(void *s, unsigned int n)
int byte_diff(const void *s, unsigned int n, const void *t)
void byte_copyr(void *to, unsigned int n, const void *from)
unsigned int byte_chr(char *s, unsigned int n, int c)
unsigned int byte_rchr(char *s, unsigned int n, int c)
void byte_copy(void *to, unsigned int n, const void *from)