Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/converters/mimelib/files/patch-mimelib-string.cpp
16171 views
1
--- mimelib/string.cpp.bak 1997-09-27 13:54:17.000000000 +0200
2
+++ mimelib/string.cpp 2011-01-20 11:16:24.000000000 +0100
3
@@ -29,7 +29,7 @@
4
#include <ctype.h>
5
#include <stdlib.h>
6
#include <string.h>
7
-#include <new.h>
8
+#include <new>
9
#include <mimelib/string.h>
10
11
#define DW_MIN(a,b) ((a) <= (b) ? (a) : (b))
12
@@ -138,9 +138,9 @@
13
assert(rep != 0);
14
#if defined(DW_DEBUG_VERSION) || defined(DW_DEVELOPMENT_VERSION)
15
if (rep->mRefCount <= 0) {
16
- cerr << "Error: attempt to delete a DwStringRep "
17
+ std::cerr << "Error: attempt to delete a DwStringRep "
18
"with ref count <= 0\n";
19
- cerr << "(Possibly 'delete' was called twice for same object)\n";
20
+ std::cerr << "(Possibly 'delete' was called twice for same object)\n";
21
abort();
22
}
23
#endif // defined(DW_DEBUG_VERSION) || defined(DW_DEVELOPMENT_VERSION)
24
@@ -173,8 +173,8 @@
25
{
26
#if defined (DW_DEBUG_VERSION) || defined (DW_DEVELOPMENT_VERSION)
27
if (mBuffer == 0) {
28
- cerr << "DwStringRep destructor called for bad DwStringRep object\n";
29
- cerr << "(Possibly 'delete' was called twice for same object)\n";
30
+ std::cerr << "DwStringRep destructor called for bad DwStringRep object\n";
31
+ std::cerr << "(Possibly 'delete' was called twice for same object)\n";
32
abort();
33
}
34
#endif // defined (DW_DEBUG_VERSION) || defined (DW_DEVELOPMENT_VERSION)
35
@@ -1045,7 +1045,7 @@
36
}
37
38
39
-void DwString::WriteTo(ostream& aStrm) const
40
+void DwString::WriteTo(std::ostream& aStrm) const
41
{
42
const char* buf = mRep->mBuffer + mStart;
43
for (size_t i=0; i < mLength; ++i) {
44
@@ -1336,7 +1336,7 @@
45
}
46
47
48
-void DwString::PrintDebugInfo(ostream& aStrm) const
49
+void DwString::PrintDebugInfo(std::ostream& aStrm) const
50
{
51
#if defined (DW_DEBUG_VERSION)
52
aStrm <<
53
@@ -1633,7 +1633,7 @@
54
}
55
56
57
-ostream& operator << (ostream& aOstrm, const DwString& aStr)
58
+std::ostream& operator << (std::ostream& aOstrm, const DwString& aStr)
59
{
60
const char* buf = aStr.data();
61
for (size_t i=0; i < aStr.length(); ++i) {
62
@@ -1643,7 +1643,7 @@
63
}
64
65
66
-istream& getline(istream& aIstrm, DwString& aStr, char aDelim)
67
+std::istream& getline(std::istream& aIstrm, DwString& aStr, char aDelim)
68
{
69
aStr.clear();
70
char ch;
71
@@ -1657,7 +1657,7 @@
72
}
73
74
75
-istream& getline(istream& aIstrm, DwString& aStr)
76
+std::istream& getline(std::istream& aIstrm, DwString& aStr)
77
{
78
return getline(aIstrm, aStr, '\n');
79
}
80
81