X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2F_info;h=affd97b430a6ee5d070b4d91e9d2262a3f8177af;hb=bafb520171bacdc19bcf2f75bb224f36563d7851;hp=f494c124ead964cff335f446123fe879ad19ec4c;hpb=0a2fd289c7bf57d9fc35ad6af36df4bcc694f361;p=ccan diff --git a/ccan/io/_info b/ccan/io/_info index f494c124..affd97b4 100644 --- a/ccan/io/_info +++ b/ccan/io/_info @@ -32,19 +32,18 @@ * }; * * // This reads from stdin. - * static struct io_op *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_op *write_to_child(struct io_conn *c, - * struct stdin_buffer *b); - * static struct io_op *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(b->inbuf, &b->len, - * io_next(c, wake_writer, b)); + * return io_read_partial(c, b->inbuf, &b->len, wake_writer, b); * } * - * static struct io_op *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); @@ -58,24 +57,24 @@ * b->reader = NULL; * } * - * static struct io_op *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_op *write_to_child(struct io_conn *conn, - * struct stdin_buffer *b) + * static struct io_plan *write_to_child(struct io_conn *conn, + * struct stdin_buffer *b) * { * assert(conn == b->writer); * if (!b->reader) * return io_close(conn, NULL); - * return io_write(b->inbuf, b->len, io_next(conn, wake_reader, b)); + * return io_write(conn, b->inbuf, b->len, wake_reader, b); * } * - * static struct io_op *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); @@ -88,8 +87,8 @@ * } * * // This reads from the child and saves it into buffer. - * static struct io_op *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; * @@ -104,8 +103,8 @@ * } * * b->rlen = b->max - b->off; - * return io_read_partial(b->buf + b->off, &b->rlen, - * io_next(conn, read_from_child, b)); + * return io_read_partial(conn, b->buf + b->off, &b->rlen, + * read_from_child, b); * } * * // Feed a program our stdin, gather its stdout, print that at end. @@ -159,7 +158,8 @@ * return WIFEXITED(status) ? WEXITSTATUS(status) : 2; * } * - * License: BSD-MIT + * License: LGPL (v2.1 or any later version) + * Author: Rusty Russell */ int main(int argc, char *argv[]) { @@ -167,6 +167,8 @@ int main(int argc, char *argv[]) return 1; if (strcmp(argv[1], "depends") == 0) { + printf("ccan/time\n"); + printf("ccan/timer\n"); return 0; }