X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/e32dabae3480363e6eb93153f5242ed8c9f2b590..1ef7279c324e278ecf75243ca651710db9ac708e:/selbuf.c diff --git a/selbuf.c b/selbuf.c index 0f07dfc..aafe711 100644 --- a/selbuf.c +++ b/selbuf.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: selbuf.c,v 1.1 1999/05/14 21:01:15 mdw Exp $ + * $Id: selbuf.c,v 1.2 1999/05/17 20:36:50 mdw Exp $ * * Line-buffering select handler * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: selbuf.c,v $ + * Revision 1.2 1999/05/17 20:36:50 mdw + * Make the magical constants for the buffer flags uppercase. + * * Revision 1.1 1999/05/14 21:01:15 mdw * Integrated `select' handling bits from the background resolver project. * @@ -64,8 +67,8 @@ void selbuf_enable(selbuf *b) { - if (!(b->b.f & lbuf_enable)) { - b->b.f |= lbuf_enable; + if (!(b->b.f & LBUF_ENABLE)) { + b->b.f |= LBUF_ENABLE; sel_addfile(&b->reader); lbuf_flush(&b->b, 0, 0); } @@ -83,8 +86,8 @@ void selbuf_enable(selbuf *b) void selbuf_disable(selbuf *b) { - if (b->b.f & lbuf_enable) { - b->b.f &= ~lbuf_enable; + if (b->b.f & LBUF_ENABLE) { + b->b.f &= ~LBUF_ENABLE; sel_rmfile(&b->reader); } } @@ -147,7 +150,7 @@ void selbuf_init(selbuf *b, void *p) { lbuf_init(&b->b, func, p); - b->b.f &= ~lbuf_enable; + b->b.f &= ~LBUF_ENABLE; sel_initfile(s, &b->reader, fd, SEL_READ, selbuf_read, b); selbuf_enable(b); }