#include <mLib/fdflags.h>
#include <mLib/fdpass.h>
#include <mLib/ident.h>
+#include <mLib/mdup.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
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 */
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 {
*
* 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@ --- *
*