summaryrefslogtreecommitdiff
path: root/misc/colortail/patches/patch-ae
blob: e3fa099ba4f44d8a1380e01e6106fca462260320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
$NetBSD: patch-ae,v 1.1 2004/01/11 21:22:41 jschauma Exp $

--- Colorizer.cc.orig	2004-01-11 16:15:16.000000000 -0500
+++ Colorizer.cc	2004-01-11 16:15:46.000000000 -0500
@@ -23,7 +23,7 @@
 
 #include <assert.h>
 #include <stdio.h>
-#include <strstream.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