X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/270b8403580b7fd0feae995b9e8bad4a2ff660ff..e9940d072c811c67f2b3a13782fc40bf591491b7:/fwd.h diff --git a/fwd.h b/fwd.h index 2da55a3..2d139e4 100644 --- a/fwd.h +++ b/fwd.h @@ -87,6 +87,7 @@ #include #include #include +#include #include #include #include @@ -153,6 +154,7 @@ typedef struct chan { unsigned base, len; /* Base and length of data */ unsigned f; /* Various interesting flags */ void (*func)(void */*p*/); /* Function to call on closure */ + int err; /* What's wrong with the channel */ void *p; /* Argument to pass function */ sel_file r, w; /* Reader and writer selectors */ char buf[CHAN_BUFSZ]; /* The actual data buffer */ @@ -565,6 +567,18 @@ extern int conf_prefix(scanner */*sc*/, const char */*p*/); extern void conf_name(scanner */*sc*/, char /*delim*/, dstr */*d*/); +/* --- @conf_fname@ --- * + * + * Arguments: @scanner *sc@ = pointer to scanner + * @dstr *d@ = pointer to dynamic string for output + * + * Returns: --- + * + * Use: Reads a file name from the input and stores it in @d@. + */ + +extern void conf_fname(scanner */*sc*/, dstr */*d*/); + /*----- Reference-counted file descriptors --------------------------------*/ typedef struct reffd { @@ -878,13 +892,21 @@ extern void endpt_killall(void); * * Arguments: @endpt *a@ = pointer to first endpoint * @endpt *b@ = pointer to second endpoint + * @const char *desc@ = description of connection * * Returns: --- * - * Use: Joins two endpoints together. + * Use: Joins two endpoints together. It's OK to join endpoints + * which are already joined; in fact, the the right thing to do + * when your endpoint decides that it's not pending any more is + * to join it to its partner again. + * + * If the endpoints are already connected then the description + * string is ignored. The endpoint manager takes a copy of + * the string, so you don't need to keep it around. */ -extern void endpt_join(endpt */*a*/, endpt */*b*/); +extern void endpt_join(endpt */*a*/, endpt */*b*/, const char */*desc*/); /* --- @source_add@ --- * *