scc

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

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

 1#include <wchar.h>
 2
 3#undef wmemcmp
 4
 5int
 6wmemcmp(const wchar_t *s, const wchar_t *t, size_t n)
 7{
 8	unsigned long ls, lt;
 9
10	for (; n > 0 && *s == *t; --n)
11		++s, ++t;
12	if (n == 0)
13		return 0;
14
15	ls = *s, lt = *t;
16	return ls - lt;
17}