Differences From
Artifact [a45d7fa32d]:
18 18 } ksraw;
19 19
20 20 typedef struct ksmut {
21 21 sz size;
22 22 char* ptr;
23 23 } ksmut;
24 24
25 +typedef enum kscond {
26 + kscond_ok,
27 + kscond_fail,
28 + kscond_unimplemented,
29 + kscond_nonnumeric,
30 +} kscond;
31 +
32 +enum ksconv {
33 + ksconv_default = 0,
34 +
35 + ksconv_raw = 1,
36 + ksconv_bin = 2,
37 + ksconv_oct = 8,
38 + ksconv_dec = 10,
39 + ksconv_hex = 16,
40 + ksconv_b32 = 32,
41 +
42 + ksconv_partial = 1 << 7,
43 + ksconv_nopfx = 1 << 8,
44 + ksconv_endh = 1 << 9,
45 + ksconv_endl = 1 << 10,
46 +};
47 +
48 +kscond ks_to_int(ksraw str,
49 + enum ksconv mode,
50 + u8* dest, sz size);
51 +
52 +kscond ks_of_int(u8* number, sz size,
53 + enum ksconv mode,
54 + char* bufstart, sz bufsize);
55 +
25 56 #ifdef __cplusplus
26 57 }
27 58 #endif
28 59
29 60 #endif