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 strncmp
 4
 5int
 6strncmp(const char *s1, const char *s2, size_t n)
 7{
 8	for ( ; n > 0 && *s1 == *s2; --n)
 9		++s1, ++s2;
10
11	if (n == 0)
12		return 0;
13
14	return *(unsigned char *) s1 - *(unsigned char *) s2;
15}