Package: paraview / 5.4.1+dfsg4-3.1

use_system_utf8.patch Patch series | download
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
Description: Use system utf8
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2016-02-04

Index: ParaView-v5.4.1/VTK/Common/Core/vtkUnicodeString.cxx
===================================================================
--- ParaView-v5.4.1.orig/VTK/Common/Core/vtkUnicodeString.cxx
+++ ParaView-v5.4.1/VTK/Common/Core/vtkUnicodeString.cxx
@@ -41,7 +41,7 @@ vtkUnicodeString::const_iterator::const_
 
 vtkUnicodeString::value_type vtkUnicodeString::const_iterator::operator*() const
 {
-  return vtk_utf8::unchecked::peek_next(this->Position);
+  return utf8::unchecked::peek_next(this->Position);
 }
 
 bool vtkUnicodeString::const_iterator::operator==(const const_iterator& rhs) const
@@ -56,27 +56,27 @@ bool vtkUnicodeString::const_iterator::o
 
 vtkUnicodeString::const_iterator& vtkUnicodeString::const_iterator::operator++()
 {
-  vtk_utf8::unchecked::next(this->Position);
+  utf8::unchecked::next(this->Position);
   return *this;
 }
 
 vtkUnicodeString::const_iterator vtkUnicodeString::const_iterator::operator++(int)
 {
   const_iterator result(this->Position);
-  vtk_utf8::unchecked::next(this->Position);
+  utf8::unchecked::next(this->Position);
   return result;
 }
 
 vtkUnicodeString::const_iterator& vtkUnicodeString::const_iterator::operator--()
 {
-  vtk_utf8::unchecked::prior(this->Position);
+  utf8::unchecked::prior(this->Position);
   return *this;
 }
 
 vtkUnicodeString::const_iterator vtkUnicodeString::const_iterator::operator--(int)
 {
   const_iterator result(this->Position);
-  vtk_utf8::unchecked::prior(this->Position);
+  utf8::unchecked::prior(this->Position);
   return result;
 }
 
@@ -134,7 +134,7 @@ vtkUnicodeString::vtkUnicodeString(const
 vtkUnicodeString::vtkUnicodeString(size_type count, value_type character)
 {
   for(size_type i = 0; i != count; ++i)
-    vtk_utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
+    utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
 }
 
 vtkUnicodeString::vtkUnicodeString(const_iterator first, const_iterator last) :
@@ -149,7 +149,7 @@ bool vtkUnicodeString::is_utf8(const cha
 
 bool vtkUnicodeString::is_utf8(const std::string& value)
 {
-  return vtk_utf8::is_valid(value.begin(), value.end());
+  return utf8::is_valid(value.begin(), value.end());
 }
 
 vtkUnicodeString vtkUnicodeString::from_utf8(const char* value)
@@ -160,7 +160,7 @@ vtkUnicodeString vtkUnicodeString::from_
 vtkUnicodeString vtkUnicodeString::from_utf8(const char* begin, const char* end)
 {
   vtkUnicodeString result;
-  if(vtk_utf8::is_valid(begin, end))
+  if(utf8::is_valid(begin, end))
   {
     result.Storage = std::string(begin, end);
   }
@@ -174,7 +174,7 @@ vtkUnicodeString vtkUnicodeString::from_
 vtkUnicodeString vtkUnicodeString::from_utf8(const std::string& value)
 {
   vtkUnicodeString result;
-  if(vtk_utf8::is_valid(value.begin(), value.end()))
+  if(utf8::is_valid(value.begin(), value.end()))
   {
     result.Storage = value;
   }
@@ -197,9 +197,9 @@ vtkUnicodeString vtkUnicodeString::from_
 
     try
     {
-      vtk_utf8::utf16to8(value, value + length, vtkUnicodeString::back_insert_iterator(result.Storage));
+      utf8::utf16to8(value, value + length, vtkUnicodeString::back_insert_iterator(result.Storage));
     }
-    catch(vtk_utf8::invalid_utf16&)
+    catch(utf8::invalid_utf16&)
     {
       vtkGenericWarningMacro(<< "vtkUnicodeString::from_utf16(): not a valid UTF-16 string.");
     }
@@ -233,15 +233,15 @@ vtkUnicodeString::value_type vtkUnicodeS
     throw std::out_of_range("character out-of-range");
 
   std::string::const_iterator iterator = this->Storage.begin();
-  vtk_utf8::unchecked::advance(iterator, offset);
-  return vtk_utf8::unchecked::peek_next(iterator);
+  utf8::unchecked::advance(iterator, offset);
+  return utf8::unchecked::peek_next(iterator);
 }
 
 vtkUnicodeString::value_type vtkUnicodeString::operator[](size_type offset) const
 {
   std::string::const_iterator iterator = this->Storage.begin();
-  vtk_utf8::unchecked::advance(iterator, offset);
-  return vtk_utf8::unchecked::peek_next(iterator);
+  utf8::unchecked::advance(iterator, offset);
+  return utf8::unchecked::peek_next(iterator);
 }
 
 const char* vtkUnicodeString::utf8_str() const
@@ -257,14 +257,14 @@ void vtkUnicodeString::utf8_str(std::str
 std::vector<vtkTypeUInt16> vtkUnicodeString::utf16_str() const
 {
   std::vector<vtkTypeUInt16> result;
-  vtk_utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
+  utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
   return result;
 }
 
 void vtkUnicodeString::utf16_str(std::vector<vtkTypeUInt16>& result) const
 {
   result.clear();
-  vtk_utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
+  utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
 }
 
 vtkUnicodeString::size_type vtkUnicodeString::byte_count() const
@@ -274,7 +274,7 @@ vtkUnicodeString::size_type vtkUnicodeSt
 
 vtkUnicodeString::size_type vtkUnicodeString::character_count() const
 {
-  return vtk_utf8::unchecked::distance(this->Storage.begin(), this->Storage.end());
+  return utf8::unchecked::distance(this->Storage.begin(), this->Storage.end());
 }
 
 bool vtkUnicodeString::empty() const
@@ -300,9 +300,9 @@ void vtkUnicodeString::push_back(value_t
 {
   try
   {
-    vtk_utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
+    utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
   }
-  catch(vtk_utf8::invalid_code_point&)
+  catch(utf8::invalid_code_point&)
   {
     vtkGenericWarningMacro("vtkUnicodeString::push_back(): " << character << "is not a valid Unicode code point");
   }
@@ -319,7 +319,7 @@ void vtkUnicodeString::append(size_type
   {
     this->Storage.append(vtkUnicodeString(count, character).Storage);
   }
-  catch(vtk_utf8::invalid_code_point&)
+  catch(utf8::invalid_code_point&)
   {
     vtkGenericWarningMacro("vtkUnicodeString::append(): " << character << "is not a valid Unicode code point");
   }
@@ -345,7 +345,7 @@ void vtkUnicodeString::assign(size_type
   {
     this->Storage.assign(vtkUnicodeString(count, character).Storage);
   }
-  catch(vtk_utf8::invalid_code_point&)
+  catch(utf8::invalid_code_point&)
   {
     vtkGenericWarningMacro("vtkUnicodeString::assign(): " << character << "is not a valid Unicode code point");
   }
@@ -415,11 +415,11 @@ vtkUnicodeString vtkUnicodeString::subst
   std::string::const_iterator last = this->Storage.end();
 
   while(from != last && offset--)
-    vtk_utf8::unchecked::advance(from, 1);
+    utf8::unchecked::advance(from, 1);
 
   std::string::const_iterator to = from;
   while(to != last && count--)
-    vtk_utf8::unchecked::advance(to, 1);
+    utf8::unchecked::advance(to, 1);
 
   return vtkUnicodeString(from, to);
 }
Index: ParaView-v5.4.1/VTK/IO/Core/vtkUTF8TextCodec.cxx
===================================================================
--- ParaView-v5.4.1.orig/VTK/IO/Core/vtkUTF8TextCodec.cxx
+++ ParaView-v5.4.1/VTK/IO/Core/vtkUTF8TextCodec.cxx
@@ -124,7 +124,7 @@ vtkUnicodeString::value_type vtkUTF8Text
     throw(std::string("End of Input"));
   }
 
-  getSize = vtk_utf8::internal::sequence_length(c);
+  getSize = utf8::internal::sequence_length(c);
 
   if (0 == getSize)
     throw(std::string("Not enough space"));
@@ -138,7 +138,7 @@ vtkUnicodeString::value_type vtkUTF8Text
 
   istream::char_type* c1 = c;
 
-  const vtkTypeUInt32 code_point = vtk_utf8::next(c1, &c[getSize]);
+  const vtkTypeUInt32 code_point = utf8::next(c1, &c[getSize]);
 
   return code_point;
 }