libk  Diff

Differences From Artifact [175e42b805]:

To Artifact [ba38860055]:


5
6
7
8
9
10
11


12
13
14
15
16
17
18
..
32
33
34
35
36
37
38












39
40
41

struct object {
	u8 a;
	s16 b;
	bool c;
};



stat_long entry(kenv e) {
	const char msg[] = "hello from libk\n";
	ksraw ptr = { Kmsz(msg), msg };

	bool maybe = true;
	maybe = no;

................................................................................

	void* top = kmlini();
	kmres rst = kmlina(1230);
	if(rst.cond != kmcond_ok) return kbad_mem;

	kmres rst2 = kmlina(789);
	if(rst2.cond != kmcond_ok) return kbad_mem;













	return kbad_ok;
}







>
>







 







>
>
>
>
>
>
>
>
>
>
>
>



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

struct object {
	u8 a;
	s16 b;
	bool c;
};

#define _slit(s) ((ksraw){Kmsz(s),s})

stat_long entry(kenv e) {
	const char msg[] = "hello from libk\n";
	ksraw ptr = { Kmsz(msg), msg };

	bool maybe = true;
	maybe = no;

................................................................................

	void* top = kmlini();
	kmres rst = kmlina(1230);
	if(rst.cond != kmcond_ok) return kbad_mem;

	kmres rst2 = kmlina(789);
	if(rst2.cond != kmcond_ok) return kbad_mem;

	const char varmsg[] = "printing environment variables\n";
	ksraw msgptr = { Kmsz(varmsg), varmsg };
	kiosend(e.std, msgptr, null);

	for (sz i = 0; i < e.varc; ++i) {
		kiosend(e.std, _slit(" - "), null);
		kiosend(e.std, e.vars[i].name, null);
		kiosend(e.std, _slit(" = ["), null);
		kiosend(e.std, e.vars[i].val, null);
		kiosend(e.std, _slit("]\n"), null);
	}

	return kbad_ok;
}