summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/abuf.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-07-25 10:52:20 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-07-25 10:52:20 +0000
commitd30aff0c8eee838d92d6ae854abd3a550e63f3bc (patch)
tree2c5987554d0158979e4b0904292bf691fc8e7628 /usr.bin/aucat/abuf.c
parent79aea50c7469da79466afbe39dd054c7f3fde0ae (diff)
fix comments, remove no longer needed declaration, reorder includes
from Thomas Pfaff
Diffstat (limited to 'usr.bin/aucat/abuf.c')
-rw-r--r--usr.bin/aucat/abuf.c29
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);