diff --git a/misc/colortail/Makefile b/misc/colortail/Makefile index 5c6827f45caa..e236392a219b 100644 --- a/misc/colortail/Makefile +++ b/misc/colortail/Makefile @@ -17,16 +17,10 @@ COMMENT= A colour-able replacement for tail(1) USE_GETOPT_LONG= yes GNU_CONFIGURE= yes -.include - -.if ${OSVERSION} >= 502000 -BROKEN= "Does not compile" -.endif - post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/example-conf/conf* ${EXAMPLESDIR} .endif -.include +.include diff --git a/misc/colortail/files/patch-Colorizer.cc b/misc/colortail/files/patch-Colorizer.cc index 3977f71bdfcc..db77ba6418a2 100644 --- a/misc/colortail/files/patch-Colorizer.cc +++ b/misc/colortail/files/patch-Colorizer.cc @@ -1,14 +1,56 @@ $FreeBSD$ ---- Colorizer.cc.orig Tue Nov 26 01:12:35 2002 -+++ Colorizer.cc Tue Nov 26 01:12:49 2002 +--- Colorizer.cc.orig Wed Aug 4 04:41:17 1999 ++++ Colorizer.cc Thu Feb 5 19:49:47 2004 @@ -23,7 +23,7 @@ #include #include -#include -+#include ++#include Colorizer::Colorizer() +@@ -111,7 +111,7 @@ + ListIterator itr(*m_items_list); + + // will contain the new string +- ostrstream newstr; ++ std::ostrstream newstr; + + SearchData *current; + int i = 0; +@@ -172,7 +172,7 @@ + } + + // write ansi reset str and a newline +- newstr << ANSI_RESET_STR << endl << ends; ++ newstr << ANSI_RESET_STR << std::endl << std::ends; + // return the new string + return newstr.str(); + } +@@ -187,12 +187,12 @@ + // check if str ends in '\n' + if (str[strlen(str)] == '\n') + { +- newstr << str << ends; ++ newstr << str << std::ends; + } + else + { + // doesn't end in '\n' +- newstr << str << endl << ends; ++ newstr << str << std::endl << std::ends; + } + + // return the new string +@@ -240,7 +240,7 @@ + + // write newline and null + //newstr << endl << ends; +- newstr << ends; ++ newstr << std::ends; + + + // return the new string diff --git a/misc/colortail/files/patch-OptionsParser.cc b/misc/colortail/files/patch-OptionsParser.cc index ed4278ef50e3..f2087e517f5e 100644 --- a/misc/colortail/files/patch-OptionsParser.cc +++ b/misc/colortail/files/patch-OptionsParser.cc @@ -1,20 +1,20 @@ ---- OptionsParser.cc.orig Thu Aug 5 01:23:39 1999 -+++ OptionsParser.cc Tue Jan 28 13:11:52 2003 -@@ -136,6 +136,8 @@ - { - if (optarg[pos] == ',') - { -+ filename.put('\0'); -+ - // found seperator - // set filename in options class - o->cfg_filenames[o->nr_cfg_files] = filename.str(); -@@ -152,6 +154,8 @@ +--- OptionsParser.cc.orig Thu Aug 5 08:23:39 1999 ++++ OptionsParser.cc Thu Feb 5 19:49:47 2004 +@@ -18,7 +18,7 @@ + */ - if (optarg[pos] == '\0') - { -+ filename.put('\0'); -+ - // found end of string - // set filename in options class - o->cfg_filenames[o->nr_cfg_files] = filename.str(); + #include +-#include ++#include + #include + #include + #include +@@ -130,7 +130,7 @@ + int loop = 1; + while (loop) + { +- ostrstream filename; ++ std::ostrstream filename; + + while (1) + { diff --git a/misc/colortail/files/patch-TailFile.cc b/misc/colortail/files/patch-TailFile.cc new file mode 100644 index 000000000000..e449443d4564 --- /dev/null +++ b/misc/colortail/files/patch-TailFile.cc @@ -0,0 +1,21 @@ +--- TailFile.cc.orig Thu Aug 5 08:09:38 1999 ++++ TailFile.cc Thu Feb 5 19:49:47 2004 +@@ -375,7 +375,7 @@ + // check if there isn't a follow buffer + if (m_follow_buffer == NULL) + { +- m_follow_buffer = new ostrstream(); ++ m_follow_buffer = new std::ostrstream(); + } + + // make buffer +@@ -417,6 +417,9 @@ + int ch = fgetc(m_file); + + // add the character to the string ++ if (ch == EOF) ++ clearerr(m_file); // required by POSIX and ANSI ++ else + m_follow_buffer->put(ch); + + // check if return diff --git a/misc/colortail/files/patch-TailFile.h b/misc/colortail/files/patch-TailFile.h new file mode 100644 index 000000000000..06aecac4647c --- /dev/null +++ b/misc/colortail/files/patch-TailFile.h @@ -0,0 +1,21 @@ +--- TailFile.h.orig Wed Aug 4 04:42:33 1999 ++++ TailFile.h Thu Feb 5 19:49:47 2004 +@@ -23,7 +23,8 @@ + #include "Colorizer.h" + + #include +-#include ++#include ++#include + + #define MAX_CHARS_READ 1024 + +@@ -40,7 +41,7 @@ + // the stream position + long m_position; + // the follow buffer, used in follow_print +- ostrstream *m_follow_buffer; ++ std::ostrstream *m_follow_buffer; + + // private methods + void find_position(int n);