libk  Diff

Differences From Artifact [ba38860055]:

To Artifact [aec04b5f97]:


     7      7   	u8 a;
     8      8   	s16 b;
     9      9   	bool c;
    10     10   };
    11     11   
    12     12   #define _slit(s) ((ksraw){Kmsz(s),s})
    13     13   
    14         -stat_long entry(kenv e) {
           14  +kbad entry(kenv e) {
    15     15   	const char msg[] = "hello from libk\n";
    16     16   	ksraw ptr = { Kmsz(msg), msg };
    17     17   
    18     18   	bool maybe = true;
    19     19   	maybe = no;
    20     20   
    21     21   	if (kiosend(e.std, ptr, null) == kiocond_ok) {
................................................................................
    35     35   	void* top = kmlini();
    36     36   	kmres rst = kmlina(1230);
    37     37   	if(rst.cond != kmcond_ok) return kbad_mem;
    38     38   
    39     39   	kmres rst2 = kmlina(789);
    40     40   	if(rst2.cond != kmcond_ok) return kbad_mem;
    41     41   
    42         -	const char varmsg[] = "printing environment variables\n";
    43         -	ksraw msgptr = { Kmsz(varmsg), varmsg };
    44         -	kiosend(e.std, msgptr, null);
           42  +	kiosend(e.std,  _slit("printing environment variables\n"), null);
    45     43   
    46     44   	for (sz i = 0; i < e.varc; ++i) {
    47     45   		kiosend(e.std, _slit(" - "), null);
    48     46   		kiosend(e.std, e.vars[i].name, null);
    49     47   		kiosend(e.std, _slit(" = ["), null);
    50     48   		kiosend(e.std, e.vars[i].val, null);
    51     49   		kiosend(e.std, _slit("]\n"), null);
    52     50   	}
    53     51   
    54     52   	return kbad_ok;
    55     53   }