- Fix build on -current
PR: ports/62432 Submitted by: Ports Fury
This commit is contained in:
parent
05079e4428
commit
d7896d335f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=100145
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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 <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;
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
21
misc/colortail/files/patch-TailFile.cc
Normal file
21
misc/colortail/files/patch-TailFile.cc
Normal file
@ -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
|
21
misc/colortail/files/patch-TailFile.h
Normal file
21
misc/colortail/files/patch-TailFile.h
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user