diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2008-03-01 12:25:14 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2008-03-01 12:25:14 +0100 |
commit | ce6f9f6dab399a907f9f623f1986870df34f4663 (patch) | |
tree | 668b6a80d258692d8176c36af24a37406f51b6f1 /inotail.h | |
parent | 66911157cfad3ccb5e24c11c77d3b0ff3252abd3 (diff) | |
parent | a4d7f34d0210344d2e25e5af1c2e61057422521d (diff) |
Merge branch 'pipe'
Conflicts:
inotail.c
Diffstat (limited to 'inotail.h')
-rw-r--r-- | inotail.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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)) |