libk  Diff

Differences From Artifact [18dd12a221]:

To Artifact [48272504c4]:


     8      8   #endif
     9      9   
    10     10   typedef struct ksraw {
    11     11   	sz size;
    12     12   	const char* ptr;
    13     13   } ksraw;
    14     14   
           15  +#define Ksraw(str) ((ksraw){sizeof(str),str})
           16  +
    15     17   typedef struct ksmut {
    16     18   	sz size;
    17     19   	char* ptr;
    18     20   } ksmut;
    19     21   
    20     22   sz kssz(const char* str, sz max);
    21     23   
    22     24   #include <k/mem.h>
    23     25   
    24     26   typedef struct kstr {
    25     27   	sz size;
    26     28   	kmptr ptr;
    27     29   } kstr;
           30  +
    28     31   
    29     32   #include <k/io.h>
    30     33   
    31     34   #include <k/internal.egroup.h>
    32     35   typedef enum kscond {
    33     36   	kscond_ok = kscond_id,
    34     37   	kscond_partial,
................................................................................
    75     78   
    76     79   kscond kscp(ksraw str, ksmut dest, sz* len);
    77     80   
    78     81   ksbuf* ksbufmk(void* where, kiochan channel, sz run);
    79     82   
    80     83   #include <k/core.h>
    81     84   
    82         -kcond ksbufput(ksbuf*, ksraw);
    83         -
           85  +kcond   ksbufput(ksbuf*, ksraw);
    84     86   kiocond ksbufflush(ksbuf*);
           87  +kcond   ksbufwrite(ksbuf*, const char** array);
           88  +kcond   ksemitc(const char** array, sz bufsz, kiochan channel);
    85     89   
    86     90   #ifdef __cplusplus
    87     91   }
    88     92   #endif
    89     93   
    90     94   #endif