diff options
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)) |