libk  Diff

Differences From Artifact [ba38860055]:

To Artifact [aec04b5f97]:


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
	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;

	if (kiosend(e.std, ptr, null) == kiocond_ok) {
................................................................................
	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;
}







|







 







|
<
<











7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
35
36
37
38
39
40
41
42


43
44
45
46
47
48
49
50
51
52
53
	u8 a;
	s16 b;
	bool c;
};

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

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

	bool maybe = true;
	maybe = no;

	if (kiosend(e.std, ptr, null) == kiocond_ok) {
................................................................................
	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;

	kiosend(e.std,  _slit("printing environment variables\n"), 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;
}