diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-02-06 14:08:52 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-02-06 14:08:52 +0000 |
commit | d7896d335fea2aec52950169a86206063cdee03a (patch) | |
tree | 0b4c735c8063a438dbbc342bd81eab9449dce6c5 /misc | |
parent | 05079e44280b32f0ad87246d3622a87caea6c6c2 (diff) |
Notes
Diffstat (limited to 'misc')
-rw-r--r-- | misc/colortail/Makefile | 8 | ||||
-rw-r--r-- | misc/colortail/files/patch-Colorizer.cc | 48 | ||||
-rw-r--r-- | misc/colortail/files/patch-OptionsParser.cc | 38 | ||||
-rw-r--r-- | misc/colortail/files/patch-TailFile.cc | 21 | ||||
-rw-r--r-- | misc/colortail/files/patch-TailFile.h | 21 |
5 files changed, 107 insertions, 29 deletions
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 <bsd.port.pre.mk> - -.if ${OSVERSION} >= 502000 -BROKEN= "Does not compile" -.endif - post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/example-conf/conf* ${EXAMPLESDIR} .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> 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 <assert.h> #include <stdio.h> -#include <strstream.h> -+#include <iostream.h> ++#include <strstream> Colorizer::Colorizer() +@@ -111,7 +111,7 @@ + ListIterator<SearchData*> 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 @@ + */ + + #include <iostream.h> +-#include <strstream.h> ++#include <strstream> + #include <string.h> + #include <stdio.h> + #include <stdlib.h> +@@ -130,7 +130,7 @@ + int loop = 1; + while (loop) + { +- ostrstream filename; ++ std::ostrstream filename; - 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(); + 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 <stdio.h> +-#include <strstream.h> ++#include <iostream> ++#include <strstream> + + #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); |