pkgsrc/misc/colortail/patches/patch-aa
hubertf 27443d97cd Add colortail-0.3.0: colour-able replacement for tail(1)
Colortail works like the standard tail but it can optionally read
a color config file where it's specified expressions that results in colors.
It can be used to quickly get an overview of interesting activity by
ie. colorize those brightred or some other color of your choose.

Examples of the color configuration files are
in $PREFIX/share/examples/colortail.


XXX patch-aa replaced to work around a bug in this program that assumes
    non posix/ansi semantics of fgetc(): clearerr() must be used after
    EOF from fgetc() to read any new data.
2001-01-24 03:53:06 +00:00

16 lines
432 B
Text

$NetBSD: patch-aa,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $
--- TailFile.cc.orig Wed Jan 24 04:44:29 2001
+++ TailFile.cc
@@ -417,7 +417,10 @@
int ch = fgetc(m_file);
// add the character to the string
- m_follow_buffer->put(ch);
+ if (ch == EOF)
+ clearerr(m_file); // required by POSIX and ANSI
+ else
+ m_follow_buffer->put(ch);
// check if return
if (ch == '\n')