]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/_info
ccan/io: pass struct io_plan explicitly.
[ccan] / ccan / io / _info
index affd97b430a6ee5d070b4d91e9d2262a3f8177af..e7dfe9da7b817190ab1c97ab3fb2578b6bde07e5 100644 (file)
  * };
  *
  * // This reads from stdin.
- * static struct io_plan *wake_writer(struct io_conn *, struct stdin_buffer *);
+ * static struct io_plan wake_writer(struct io_conn *, struct stdin_buffer *);
  * // This writes the stdin buffer to the child.
- * static struct io_plan *write_to_child(struct io_conn *c,
- *                                      struct stdin_buffer *b);
- * static struct io_plan *read_stdin(struct io_conn *c, struct stdin_buffer *b)
+ * static struct io_plan write_to_child(struct io_conn *c,
+ *                                     struct stdin_buffer *b);
+ * static struct io_plan read_stdin(struct io_conn *c, struct stdin_buffer *b)
  * {
  *     assert(c == b->reader);
  *     b->len = sizeof(b->inbuf);
  *     return io_read_partial(c, b->inbuf, &b->len, wake_writer, b);
  * }
  *
- * static struct io_plan *wake_writer(struct io_conn *c, struct stdin_buffer *b)
+ * static struct io_plan wake_writer(struct io_conn *c, struct stdin_buffer *b)
  * {
  *     assert(c == b->reader);
  *     io_wake(b->writer, write_to_child, b);
  *     b->reader = NULL;
  * }
  *
- * static struct io_plan *wake_reader(struct io_conn *c, struct stdin_buffer *b)
+ * static struct io_plan wake_reader(struct io_conn *c, struct stdin_buffer *b)
  * {
  *     assert(c == b->writer);
  *     io_wake(b->reader, read_stdin, b);
  *     return io_idle(c);
  * }
  *
- * static struct io_plan *write_to_child(struct io_conn *conn,
+ * static struct io_plan write_to_child(struct io_conn *conn,
  *                                     struct stdin_buffer *b)
  * {
  *     assert(conn == b->writer);
@@ -73,8 +73,8 @@
  *     return io_write(conn, b->inbuf, b->len, wake_reader, b);
  * }
  *
- * static struct io_plan *start_writer(struct io_conn *conn,
- *                                    struct stdin_buffer *b)
+ * static struct io_plan start_writer(struct io_conn *conn,
+ *                                   struct stdin_buffer *b)
  * {
  *     assert(conn == b->writer);
  *     return io_idle(conn);
@@ -87,8 +87,8 @@
  * }
  *
  * // This reads from the child and saves it into buffer.
- * static struct io_plan *read_from_child(struct io_conn *conn,
- *                                       struct buffer *b)
+ * static struct io_plan read_from_child(struct io_conn *conn,
+ *                                      struct buffer *b)
  * {
  *     b->off += b->rlen;
  *