summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-06-11 19:31:27 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-06-11 19:31:27 +0200
commit484f17b6bd0ba570714aa55c67fffa9ae31ae58f (patch)
treea45126b6213c37595e1d53dd96379dd9d4e184ac
parentb46b85361b47506fd097b2067d9cca1d2cfd6560 (diff)
parent5015c1eb9a07b2f8351249eac62ab1fe55f03395 (diff)
Merge branch 'master' into pipe
Conflicts: inotail.c
-rw-r--r--Makefile2
-rw-r--r--changelog9
-rw-r--r--inotail.c3
-rw-r--r--inotail.h2
4 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a93a097..bcb8cd4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
#
# Licensed under the terms of the GNU General Public License; version 2 or later.
-VERSION = 0.3
+VERSION = 0.4
# Paths
prefix = /usr/local
diff --git a/changelog b/changelog
index 8af070a..05ced1b 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,12 @@
+inotail 0.4
+
+ * Implemented tailing of stdin
+ * Fixed handling of EINTR signal (^Z/fg) (patch by Anthony Martinez)
+ * Improved error handling (patch by Folkert van Heusden)
+ * Added uninstall target to Makefile (patch by Folkert van Heusden)
+
+ -- Tobias Klauser <tklauser@distanz.ch> 2007-06-04 14:44
+
inotail 0.3
* Follow files even if they were moved
diff --git a/inotail.c b/inotail.c
index 58c37de..2144d6a 100644
--- a/inotail.c
+++ b/inotail.c
@@ -30,7 +30,6 @@
#include <fcntl.h>
#include <errno.h>
#include <getopt.h>
-#include <ctype.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -580,7 +579,7 @@ int main(int argc, char **argv)
} else if (*optarg == '-')
optarg++;
- if (!isdigit(*optarg)) {
+ if (!is_digit(*optarg)) {
fprintf(stderr, "Invalid number of lines: %s\n", optarg);
exit(EXIT_FAILURE);
}
diff --git a/inotail.h b/inotail.h
index 4c57867..836c1de 100644
--- a/inotail.h
+++ b/inotail.h
@@ -29,6 +29,8 @@ struct file_struct {
#define IS_TAILABLE(mode) \
(S_ISREG(mode) || IS_PIPELIKE(mode) || S_ISCHR(mode))
+#define is_digit(c) ((c) >= '0' && (c) <= '9')
+
#ifdef DEBUG
# define dprintf(fmt, args...) fprintf(stderr, fmt, ##args)
#else