summaryrefslogtreecommitdiff
path: root/inotail.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-06-11 20:08:11 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-06-11 20:08:11 +0200
commitb50204eabab7a2f5f21f12e5668f7c8d954aa84a (patch)
tree990dd80476428acc6ab9048bfea9e5ef35e83bc4 /inotail.h
parent9c0be883f40880366241e5953cfa36f20f3c3fc4 (diff)
inotail.c/.h: Clean up a bit
Diffstat (limited to 'inotail.h')
-rw-r--r--inotail.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/inotail.h b/inotail.h
index 836c1de..8e0f30a 100644
--- a/inotail.h
+++ b/inotail.h
@@ -7,8 +7,8 @@
#ifndef _INOTAIL_H
#define _INOTAIL_H
-/* Number of items to tail. */
-#define DEFAULT_N_LINES 10
+#define BUFFER_SIZE 4096
+#define DEFAULT_N_LINES 10 /* Number of items to tail. */
/* tail modes */
enum { M_LINES, M_BYTES };
@@ -22,6 +22,14 @@ 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[BUFFER_SIZE];
+ size_t n_lines;
+ size_t n_bytes;
+ struct line_buf *next;
+};
+
#define IS_PIPELIKE(mode) \
(S_ISFIFO(mode) || S_ISSOCK(mode))