scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <string.h>
 2
 3#undef memchr
 4
 5void *
 6memchr(const void *s, int c, size_t n)
 7{
 8	unsigned char *bp = (unsigned char *) s;
 9
10	for ( ; n > 0 && *bp != c; n--)
11		++bp;
12	return (n == 0) ? NULL : bp;
13}