summary refs log tree commit diff
path: root/ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'ring.c')
-rw-r--r--ring.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ring.c b/ring.c
index d66961d..912d0d3 100644
--- a/ring.c
+++ b/ring.c
@@ -16,6 +16,7 @@
 
 #include <assert.h>
 #include <err.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <sysexits.h>
 #include <time.h>
@@ -79,3 +80,13 @@ const char *ringConsume(time_t *time, size_t consumer) {
 	if (time) *time = ring.times[i];
 	return ring.lines[i];
 }
+
+void ringInfo(void) {
+	fprintf(stderr, "producer: %zu\n", ring.write);
+	for (size_t i = 0; i < read.len; ++i) {
+		fprintf(
+			stderr, "consumer %s: %zu (%zu)\n",
+			read.names[i], read.ptrs[i], ring.write - read.ptrs[i]
+		);
+	}
+}
8a151798110d9bef68731&follow=1'>Use MacPorts rather than pkgsrcJune McEnroe My system is probably such a mess now... 2020-09-11Add debian VM name to sshJune McEnroe 2020-09-11Add influencer tweetJune McEnroe 2020-09-10Add The Kingdom of GodsJune McEnroe Reading has really slowed down :( 2020-09-07Add SunglassesJune McEnroe An IRC find. 2020-09-06Add Between the BreathsJune McEnroe One of those good songs from a soundtrack of a film that probably isn't? The summary sounds a lot more interesting than the title implies, at least. 2020-09-04Open /dev/tty in nudgeJune McEnroe This makes it work even when it's run connected to a pipe, i.e. as the notify command of catgirl... 2020-09-04Add nudgeJune McEnroe 2020-09-03Build fbclock with -lzJune McEnroe I guess this got lost somewhere, long ago... 2020-08-29Add tweets from retweetsJune McEnroe