libk  Diff

Differences From Artifact [a45d7fa32d]:

To Artifact [a9e92726f6]:


18
19
20
21
22
23
24































25
26
27
28
29
} ksraw;

typedef struct ksmut {
	sz size;
	char* ptr;
} ksmut;
































#ifdef __cplusplus
}
#endif

#endif







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





18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
} ksraw;

typedef struct ksmut {
	sz size;
	char* ptr;
} ksmut;

typedef enum kscond {
	kscond_ok,
	kscond_fail,
	kscond_unimplemented,
	kscond_nonnumeric,
} kscond;

enum ksconv {
	ksconv_default = 0,

	ksconv_raw = 1,
	ksconv_bin = 2,
	ksconv_oct = 8,
	ksconv_dec = 10,
	ksconv_hex = 16,
	ksconv_b32 = 32,

	ksconv_partial = 1 <<  7,
	ksconv_nopfx   = 1 <<  8,
	ksconv_endh    = 1 <<  9,
	ksconv_endl    = 1 << 10,
};

kscond ks_to_int(ksraw str,
		enum ksconv mode,
		u8* dest, sz size);

kscond ks_of_int(u8* number, sz size,
		enum ksconv mode,
		char* bufstart, sz bufsize);

#ifdef __cplusplus
}
#endif

#endif