diff options
Diffstat (limited to 'usr.bin/aucat/abuf.c')
-rw-r--r-- | usr.bin/aucat/abuf.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/usr.bin/aucat/abuf.c b/usr.bin/aucat/abuf.c index 043fe15f3ea..6a9dab383ca 100644 --- a/usr.bin/aucat/abuf.c +++ b/usr.bin/aucat/abuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: abuf.c,v 1.12 2009/07/19 15:49:48 martynas Exp $ */ +/* $OpenBSD: abuf.c,v 1.13 2009/07/25 10:52:18 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -37,10 +37,10 @@ #include <stdlib.h> #include <string.h> -#include "conf.h" +#include "abuf.h" #include "aparams.h" #include "aproc.h" -#include "abuf.h" +#include "conf.h" #ifdef DEBUG void @@ -113,7 +113,7 @@ abuf_del(struct abuf *buf) } /* - * Clear buffer contents + * Clear buffer contents. */ void abuf_clear(struct abuf *buf) @@ -154,7 +154,7 @@ abuf_rgetblk(struct abuf *buf, unsigned *rsize, unsigned ofs) } /* - * Discard the block at the start postion + * Discard the block at the start postion. */ void abuf_rdiscard(struct abuf *buf, unsigned count) @@ -173,7 +173,7 @@ abuf_rdiscard(struct abuf *buf, unsigned count) } /* - * Commit the data written at the end postion + * Commit the data written at the end postion. */ void abuf_wcommit(struct abuf *buf, unsigned count) @@ -217,8 +217,8 @@ abuf_wgetblk(struct abuf *buf, unsigned *rsize, unsigned ofs) } /* - * flush buffer either by dropping samples or by calling the aproc - * call-back to consume data. Return 0 if blocked, 1 otherwise + * Flush buffer either by dropping samples or by calling the aproc + * call-back to consume data. Return 0 if blocked, 1 otherwise. */ int abuf_flush_do(struct abuf *buf) @@ -248,8 +248,8 @@ abuf_flush_do(struct abuf *buf) } /* - * fill the buffer either by generating silence or by calling the aproc - * call-back to provide data. Return 0 if blocked, 1 otherwise + * Fill the buffer either by generating silence or by calling the aproc + * call-back to provide data. Return 0 if blocked, 1 otherwise. */ int abuf_fill_do(struct abuf *buf) @@ -283,7 +283,7 @@ abuf_fill_do(struct abuf *buf) /* * Notify the reader that there will be no more input (producer - * disappeared) and destroy the buffer + * disappeared) and destroy the buffer. */ void abuf_eof_do(struct abuf *buf) @@ -305,7 +305,7 @@ abuf_eof_do(struct abuf *buf) /* * Notify the writer that the buffer has no more consumer, - * and destroy the buffer + * and destroy the buffer. */ void abuf_hup_do(struct abuf *buf) @@ -359,7 +359,7 @@ abuf_flush(struct abuf *buf) * call-back of the reader. * * Return 1 if the buffer was filled, and 0 if eof condition occured. The - * reader must detach the buffer on EOF condition, since it's aproc->eof() + * reader must detach the buffer on EOF condition, since its aproc->eof() * call-back will never be called. */ int @@ -384,7 +384,7 @@ abuf_fill(struct abuf *buf) /* * Run a read/write loop on the buffer until either the reader or the - * writer blocks, or until the buffer reaches eofs. We can not get hup hear, + * writer blocks, or until the buffer reaches eofs. We can not get hup here, * since hup() is only called from terminal nodes, from the main loop. * * NOTE: The buffer may disappear (ie. be free()ed) if eof is reached, so @@ -512,7 +512,6 @@ abuf_opos(struct abuf *buf, int delta) { struct aproc *p = buf->wproc; - if (p && p->ops->opos) { buf->inuse++; p->ops->opos(p, buf, delta); |