libk  Diff

Differences From Artifact [e3d3c3c357]:

To Artifact [8ac183a3d1]:


     7      7    * platform-specific code is found in the *.platform.h
     8      8    * files.
     9      9    */
    10     10   
    11     11   #include <k/str.h>
    12     12   #include <k/type.h>
    13     13   #include <k/mem.h>
           14  +
           15  +#ifdef __cplusplus
           16  +extern "C" {
           17  +#endif
    14     18   
    15     19   typedef enum kiostream_kind {
    16     20   	kiostream_closed,
    17     21   	  // this kiostream cannot be written to
    18     22   	kiostream_file,
    19     23   	  // this kiostream represents a file
    20     24   	kiostream_sock,
................................................................................
    22     26   	  // UNIX, IP, or otherwise
    23     27   	kiostream_term,
    24     28   	  // this socket is being used to communicate
    25     29   	  // directly with a human being
    26     30   	kiostream_ansi,
    27     31   	  // like kiostream_term, but can also understand
    28     32   	  // ANSI control codes
           33  +	kiostream_pipe,
           34  +	  // this kiostream sends or receives data to
           35  +	  // another running process
    29     36   	kiostream_other
    30     37   	  // no fuckin idea
    31     38   } kiostream_kind;
    32     39   
    33     40   typedef struct kiostream {
    34     41   	kiostream_kind kind;
    35     42   	#include "kiostream.platform.h"
................................................................................
    54     61       kiocond_fail, // action failed - unspecified reason
    55     62   	kiocond_fail_closed_stream, // action failed because stream is closed
    56     63   } kiocond;
    57     64   
    58     65   kiocond kiosend(kiochan, ksraw, sz*); // send data to a channel
    59     66   kiocond kiorecv(kiochan, ksraw*); // receive data from a channel
    60     67   kmptr kiorecvall(kiochan, kmcell*, kmkind); // automatically allocate a bufer for a channel
    61         -  // kmkind is only used if kmcell* is NULL
           68  +  // kmkind is only used if kmcell* is null
    62     69   kiocond kiocon(kiochan, kiochan); // connect one channel to another
           70  +
           71  +#ifdef __cplusplus
           72  +}
           73  +#endif
    63     74   
    64     75   #endif