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 <stdlib.h>
 4#include <string.h>
 5
 6/*
 7output:
 8testing
 9done
10end:
11*/
12
13int putenv(char *);
14
15int
16main(void)
17{
18	char *s;
19
20	puts("testing");
21	s = getenv("THIS_CANNOT_BE_A_ENV_CAR");
22	assert(s == NULL);
23
24#if defined(__unix__) || defined(__SCC_PUTENV__)
25	putenv("AVAR=avalue");
26	s = getenv("AVAR");
27	assert(strcmp(s, "avalue") == 0);
28#endif
29	puts("done");
30
31	return 0;
32}