diff options
-rw-r--r-- | inotail.c | 6 | ||||
-rw-r--r-- | inotail.h | 15 |
2 files changed, 13 insertions, 8 deletions
@@ -3,7 +3,9 @@ * A fast implementation of tail which uses the inotify API present in * recent versions of the Linux kernel. * - * Copyright (C) 2005-2009, Tobias Klauser <tklauser@distanz.ch> + * More information on http://distanz.ch/inotail + * + * Copyright (C) 2005-2011, Tobias Klauser <tklauser@distanz.ch> * * The idea was taken from turbotail. * @@ -96,7 +98,7 @@ static inline int xargmatch(const char *context, const char *arg) return (strlen(arg) == ctx_len && strncmp(arg, context, ctx_len) == 0); } -static void usage(const int status) +static void __noreturn usage(const int status) { fprintf(stdout, "Usage: %s [OPTION]... [FILE]...\n\n" " --retry keep trying to open a file even if it is not\n" @@ -1,7 +1,8 @@ /* - * Copyright (C) 2005-2009, Tobias Klauser <tklauser@distanz.ch> + * Copyright (C) 2005-2011, Tobias Klauser <tklauser@distanz.ch> * - * Licensed under the terms of the GNU General Public License; version 2 or later. + * This file is licensed under the terms of the GNU General Public License; + * version 2 or later. */ #ifndef _INOTAIL_H @@ -47,11 +48,13 @@ struct file_struct { #define is_digit(c) ((c) >= '0' && (c) <= '9') #ifdef __GNUC__ -# define likely(x) __builtin_expect(!!(x), 1) -# define unlikely(x) __builtin_expect(!!(x), 0) +# define __noreturn __attribute ((noreturn)) +# define likely(x) __builtin_expect(!!(x), 1) +# define unlikely(x) __builtin_expect(!!(x), 0) #else -# define likely(x) (x) -# define unlikely(x) (x) +# define __noreturn +# define likely(x) (x) +# define unlikely(x) (x) #endif /* __GNUC__ */ #ifdef DEBUG |