scc

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

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

 1#include <assert.h>
 2#include <stdio.h>
 3#include <wchar.h>
 4
 5/*
 6output:
 7testing
 8done
 9end:
10*/
11
12int
13main(void)
14{
15	wchar_t t1[] = {0};
16	wchar_t t2[] = {0};
17	wchar_t t3[] = {0x31, 0};
18	wchar_t t4[] = {0x31, 0};
19	wchar_t t5[] = {0x32, 0x33, 0};
20
21	puts("testing");
22	assert(wcsncmp(t1, t1, 0) == 0);
23	assert(wcsncmp(t1, t2, 0) == 0);
24	assert(wcsncmp(t3, t4, 1) == 0);
25	assert(wcsncmp(t3, t5, 1) < 0);
26	assert(wcsncmp(t5, t3, 1) > 0);
27	puts("done");
28
29	return 0;
30}