From 509c2d4c2f2cc311987e841423e16fa2fa3dde71 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 25 Sep 2007 23:57:13 +0200 Subject: inotail.c: typdef mode_t --- inotail.c | 5 +++-- inotail.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inotail.c b/inotail.c index 74928f9..9142d11 100644 --- a/inotail.c +++ b/inotail.c @@ -261,7 +261,7 @@ static ssize_t tail_pipe(struct file_struct *f) return rc; } -static int tail_file(struct file_struct *f, unsigned long n_units, char mode, char forever) +static int tail_file(struct file_struct *f, unsigned long n_units, mode_t mode, char forever) { ssize_t bytes_read = 0; off_t offset = 0; @@ -458,7 +458,8 @@ int main(int argc, char **argv) int i, c, ret = 0; int n_files; unsigned long n_units = DEFAULT_N_LINES; - char forever = 0, mode = M_LINES; + mode_t mode = M_LINES; + char forever = 0; char **filenames; struct file_struct *files = NULL; diff --git a/inotail.h b/inotail.h index c95c4f8..aa2a0fa 100644 --- a/inotail.h +++ b/inotail.h @@ -13,7 +13,7 @@ #define DEFAULT_N_LINES 10 /* tail modes */ -enum { M_LINES, M_BYTES }; +typedef enum { M_LINES, M_BYTES } mode_t; /* Every tailed file is represented as a file_struct */ struct file_struct { -- cgit v1.2.3-54-g00ecf