lang-bootstrap/05/string.h

15 lines
196 B
C
Raw Normal View History

#ifndef _STRING_H
#define _STRING_H
#include <stdc_common.h>
void *memset(void *s, int c, size_t n) {
char *p = s, *end = p + n;
while (p < end)
*p++ = c;
return s;
}
#endif // _STRING_H