summaryrefslogtreecommitdiff
path: root/inotail.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2008-03-01 12:25:14 +0100
committerTobias Klauser <tklauser@xenon.tklauser.home>2008-03-01 12:25:14 +0100
commitce6f9f6dab399a907f9f623f1986870df34f4663 (patch)
tree668b6a80d258692d8176c36af24a37406f51b6f1 /inotail.h
parent66911157cfad3ccb5e24c11c77d3b0ff3252abd3 (diff)
parenta4d7f34d0210344d2e25e5af1c2e61057422521d (diff)
Merge branch 'pipe'
Conflicts: inotail.c
Diffstat (limited to 'inotail.h')
-rw-r--r--inotail.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/inotail.h b/inotail.h
index ff77b26..ea680cb 100644
--- a/inotail.h
+++ b/inotail.h
@@ -10,8 +10,7 @@
#include <sys/types.h>
#include "inotify.h"
-/* Number of items to tail. */
-#define DEFAULT_N_LINES 10
+#define DEFAULT_N_LINES 10 /* Number of items to tail. */
#define DEFAULT_BUFFER_SIZE 4096
/* inotify event buffer length for one file */
@@ -30,6 +29,21 @@ struct file_struct {
int i_watch; /* Inotify watch associated with file_struct */
};
+/* struct for linked list of buffers/lines in tail_pipe_lines */
+struct line_buf {
+ char buf[BUFSIZ];
+ size_t n_lines;
+ size_t n_bytes;
+ struct line_buf *next;
+};
+
+/* struct for linked list of byte buffers in tail_pipe_bytes */
+struct char_buf {
+ char buf[BUFSIZ];
+ size_t n_bytes;
+ struct char_buf *next;
+};
+
#define IS_PIPELIKE(mode) \
(S_ISFIFO(mode) || S_ISSOCK(mode))