diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2008-06-19 17:04:14 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2008-06-19 17:04:14 +0200 |
commit | c28829f119a0f531a3f126e434dd385b7bb23548 (patch) | |
tree | 4cff0e5d2d1e0bf9eddb8471595546528381b78e | |
parent | bf475dea9e158e8af1a7765bb48e5d49d4cca731 (diff) | |
parent | 164d300c2d4d88f2bd787a0c56dc34b3ebb47073 (diff) |
Merge branch 'master' into followname
Conflicts:
inotail.c
-rw-r--r-- | inotail.c | 4 | ||||
-rw-r--r-- | inotail.h | 3 |
2 files changed, 3 insertions, 4 deletions
@@ -69,7 +69,7 @@ static const struct option long_opts[] = { { NULL, 0, NULL, 0 } }; -static void *emalloc(size_t size) +static void *emalloc(const size_t size) { void *ret = malloc(size); @@ -747,7 +747,7 @@ int main(int argc, char **argv) int i, c, ret = 0; int n_files; unsigned long n_units = DEFAULT_N_LINES; - enum tail_mode mode = M_LINES; + char mode = M_LINES; char forever = 0; char **filenames; struct file_struct *files = NULL; @@ -12,12 +12,11 @@ #define DEFAULT_N_LINES 10 /* Number of items to tail. */ -#define DEFAULT_BUFFER_SIZE 4096 /* inotify event buffer length for one file */ #define INOTIFY_BUFLEN (4 * sizeof(struct inotify_event)) /* tail modes */ -typedef enum { M_LINES, M_BYTES } mode_t; +enum tail_mode { M_LINES, M_BYTES }; /* Every tailed file is represented as a file_struct */ struct file_struct { |