upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / freehdl / trunk / cpp-modern.patch
blob463b0ff5a48b5036b97fc6481b1a2d89c12dfea5
1 diff -Nuar freehdl-0.0.8.orig/fire/test-fire.cc freehdl-0.0.8/fire/test-fire.cc
2 --- freehdl-0.0.8.orig/fire/test-fire.cc 2006-02-16 10:56:22.000000000 +0200
3 +++ freehdl-0.0.8/fire/test-fire.cc 2020-03-30 02:54:42.423609306 +0300
4 @@ -2,7 +2,7 @@
5 #include <stdio.h>
6 #include <freehdl/fire.h>
8 -using namespace std;
9 +using std::cout;
11 extern tree_chunk_info fire_chunk_info;
13 diff -Nuar freehdl-0.0.8.orig/freehdl/cdfggen-chunk.h freehdl-0.0.8/freehdl/cdfggen-chunk.h
14 --- freehdl-0.0.8.orig/freehdl/cdfggen-chunk.h 2009-04-27 19:31:00.000000000 +0300
15 +++ freehdl-0.0.8/freehdl/cdfggen-chunk.h 2020-03-30 02:54:42.423609306 +0300
16 @@ -7,7 +7,9 @@
17 #include <string>
18 #include <vector>
19 typedef enum {to, downto} cdfgg_direction;
20 -using namespace std;
21 +using std::string;
22 +using std::vector;
23 +using std::pair;
25 extern tree_chunk_info cdfggen_chunk_info;
26 extern tree_ctype_info int_ctype_info;
27 diff -Nuar freehdl-0.0.8.orig/freehdl/cdfggen-chunk.t freehdl-0.0.8/freehdl/cdfggen-chunk.t
28 --- freehdl-0.0.8.orig/freehdl/cdfggen-chunk.t 2003-04-09 19:40:56.000000000 +0300
29 +++ freehdl-0.0.8/freehdl/cdfggen-chunk.t 2020-03-30 02:54:42.423609306 +0300
30 @@ -13,8 +13,7 @@
31 (header-add "#include <freehdl/tree-supp.h>"
32 "#include <string>"
33 "#include <vector>"
34 - "typedef enum {to, downto} cdfgg_direction;"
35 - "using namespace std;")
36 + "typedef enum {to, downto} cdfgg_direction;")
38 (impl-add "#include <freehdl/cdfggen-chunk.h>")
40 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-attributes.hh freehdl-0.0.8/freehdl/kernel-attributes.hh
41 --- freehdl-0.0.8.orig/freehdl/kernel-attributes.hh 2004-11-09 20:29:33.000000000 +0200
42 +++ freehdl-0.0.8/freehdl/kernel-attributes.hh 2020-03-30 02:54:42.423609306 +0300
43 @@ -1,6 +1,8 @@
44 #ifndef FREEHDL_KERNEL_ATTRIBUTES_H
45 #define FREEHDL_KERNEL_ATTRIBUTES_H
47 +using std::max;
49 /* *************************************************************
50 * Function kind attributes for signals
51 * ************************************************************* */
52 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-db.hh freehdl-0.0.8/freehdl/kernel-db.hh
53 --- freehdl-0.0.8.orig/freehdl/kernel-db.hh 2009-03-15 19:51:51.000000000 +0200
54 +++ freehdl-0.0.8/freehdl/kernel-db.hh 2020-04-22 20:56:59.646330605 +0300
55 @@ -3,6 +3,11 @@
57 #include <assert.h>
59 +#include <string>
60 +#include <vector>
61 +using std::string;
62 +using std::pair;
63 +using std::vector;
65 /* This header file includes the definitions that are required to
66 * setup a kernel database. This database will be used by the kernel
67 @@ -39,6 +44,11 @@
69 define_db_entry_type(driver_data, driver_data_entry)
71 +#include <string>
72 +#include <vector>
73 +using std::string;
74 +using std::pair;
75 +using std::vector;
77 // Now, create an database explorer instance. The database explorer is
78 // used to search and manipulate the database. The explorer is
79 @@ -80,9 +90,11 @@
80 #include <freehdl/kernel-util.hh>
82 #if !defined __GNUC__ || __GNUC__ != 2
83 -#include <ext/hash_map>
84 +//#include <ext/hash_map>
85 +#include <unordered_map>
86 #else
87 -#include <hash_map>
88 +//#include <hash_map>
89 +#include <unordered_map>
90 #endif
92 // Macro used to define a key type. K is the actual type of the key
93 @@ -254,10 +266,10 @@
95 // A hash function template used tp generate a hash number from
96 // d
97 -class db_basic_key_hash : public hash<unsigned long> {
98 +class db_basic_key_hash : public std::hash<unsigned long> {
99 public:
100 size_t operator()(const db_basic_key& x) const {
101 - return (*(hash<unsigned long> *)this)(((unsigned long)x.value)>>2);
102 + return (*(std::hash<unsigned long> *)this)(((unsigned long)x.value)>>2);
106 @@ -266,7 +278,8 @@
107 class db : public db_base
109 // This mappes is the actual database.
110 - typedef hash_map<void*, db_key_entry_pair, db_basic_key_hash> db_data_map_type;
111 + //typedef hash_map<void*, db_key_entry_pair, db_basic_key_hash> db_data_map_type;
112 + typedef std::unordered_map<void*, db_key_entry_pair, db_basic_key_hash> db_data_map_type;
113 db_data_map_type data_map;
115 // The transaction id is incremented each time a new key is added or
116 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-dump.hh freehdl-0.0.8/freehdl/kernel-dump.hh
117 --- freehdl-0.0.8.orig/freehdl/kernel-dump.hh 2003-04-10 18:11:23.000000000 +0300
118 +++ freehdl-0.0.8/freehdl/kernel-dump.hh 2020-03-30 02:54:42.439609671 +0300
119 @@ -13,9 +13,9 @@
120 #include <string>
121 #include <fstream>
123 -using namespace std;
124 +using std::fstream;
126 -typedef map<string, char*, less<string> > Tmap;
127 +typedef map<string, const char*, less<string> > Tmap;
128 extern Tmap mapping_translation_table;
130 // For each signal which is dumped an virtual process is created. This
131 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-fhdl-stream.hh freehdl-0.0.8/freehdl/kernel-fhdl-stream.hh
132 --- freehdl-0.0.8.orig/freehdl/kernel-fhdl-stream.hh 2005-02-15 12:02:31.000000000 +0200
133 +++ freehdl-0.0.8/freehdl/kernel-fhdl-stream.hh 2020-03-30 02:54:42.439609671 +0300
134 @@ -9,7 +9,9 @@
135 #include <string>
136 #include <iostream>
138 -using namespace std;
139 +using std::istream;
140 +using std::ostream;
141 +using std::string;
143 struct fhdl_ostream_t {
144 union {
145 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-map-list.hh freehdl-0.0.8/freehdl/kernel-map-list.hh
146 --- freehdl-0.0.8.orig/freehdl/kernel-map-list.hh 2003-07-08 15:17:35.000000000 +0300
147 +++ freehdl-0.0.8/freehdl/kernel-map-list.hh 2020-03-30 02:54:42.439609671 +0300
148 @@ -7,7 +7,6 @@
149 #include <freehdl/kernel-acl.hh>
150 #include <freehdl/kernel-sig-info.hh>
152 -using namespace std;
153 //using namespace __gnu_cxx;
155 // A signal_link instance describes the connection
156 @@ -163,9 +162,11 @@
157 #include <list>
159 #if !defined __GNUC__ || __GNUC__ != 2
160 -#include <ext/hash_map>
161 +//#include <ext/hash_map>
162 +#include <unordered_map>
163 #else
164 -#include <hash_map>
165 +//#include <hash_map>
166 +#include <unordered_map>
167 #endif
169 #include <freehdl/kernel-util.hh>
170 @@ -262,7 +263,7 @@
174 -typedef hash_map<sig_info_base *, list<fl_link>, pointer_hash<sig_info_base *> > port_signal_link_map_t;
175 +typedef std::unordered_map<sig_info_base *, list<fl_link>, pointer_hash<sig_info_base *> > port_signal_link_map_t;
177 // Stores the father signal(s) of port signals
178 extern port_signal_link_map_t port_signal_link_map;
179 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-name-stack.hh freehdl-0.0.8/freehdl/kernel-name-stack.hh
180 --- freehdl-0.0.8.orig/freehdl/kernel-name-stack.hh 2003-04-09 19:10:06.000000000 +0300
181 +++ freehdl-0.0.8/freehdl/kernel-name-stack.hh 2020-03-30 02:54:42.439609671 +0300
182 @@ -3,7 +3,7 @@
184 #include <string>
186 -using namespace std;
187 +using std::string;
189 #define NAME_STACK_INCREMENT 10
191 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-signal-source-list-array.hh freehdl-0.0.8/freehdl/kernel-signal-source-list-array.hh
192 --- freehdl-0.0.8.orig/freehdl/kernel-signal-source-list-array.hh 2006-02-16 10:56:22.000000000 +0200
193 +++ freehdl-0.0.8/freehdl/kernel-signal-source-list-array.hh 2020-03-30 02:54:42.439609671 +0300
194 @@ -4,16 +4,17 @@
195 #ifdef KERNEL
197 #if !defined __GNUC__ || __GNUC__ != 2
198 -#include <ext/hash_map>
199 +//#include <ext/hash_map>
200 +#include <unordered_map>
201 #else
202 -#include <hash_map>
203 +//#include <hash_map>
204 +#include <unordered_map>
205 #endif
207 #include <list>
208 #include <freehdl/kernel-util.hh>
209 #include <freehdl/kernel-source-descriptor.hh>
211 -using namespace std;
212 //using namespace __gnu_cxx;
214 // signal_source stores information about a source of a signal. Note
215 @@ -105,7 +106,7 @@
216 // a map stores the sources for each signal. Note that each signal is
217 // associated with a vector of signal_source_list pointers (included
218 // in signal_source_list_array).
219 -typedef hash_map<sig_info_base *, signal_source_list_array, pointer_hash<sig_info_base *> > signal_source_map_t;
220 +typedef std::unordered_map<sig_info_base *, signal_source_list_array, pointer_hash<sig_info_base *> > signal_source_map_t;
221 extern signal_source_map_t signal_source_map;
223 #endif
224 diff -Nuar freehdl-0.0.8.orig/freehdl/kernel-util.hh freehdl-0.0.8/freehdl/kernel-util.hh
225 --- freehdl-0.0.8.orig/freehdl/kernel-util.hh 2008-02-15 20:30:07.000000000 +0200
226 +++ freehdl-0.0.8/freehdl/kernel-util.hh 2020-04-22 20:36:48.558615436 +0300
227 @@ -10,24 +10,28 @@
228 #include <string>
230 #if !defined __GNUC__ || __GNUC__ != 2
231 -#include <ext/hash_map>
232 +//#include <ext/hash_map>
233 +#include <unordered_map>
234 #else
235 -#include <hash_map>
236 +//#include <hash_map>
237 +#include <unordered_map>
238 #endif
240 -using namespace std;
241 +using std::stringstream;
242 +using std::string;
245 #if !defined __GNUC__ || __GNUC__ != 2
246 -using namespace __gnu_cxx;
247 +//using namespace __gnu_cxx;
248 #endif
250 // A hash function template used tp generate a hash number from
251 // pointer values.
252 template<class T>
253 -class pointer_hash : public hash<unsigned long> {
254 +class pointer_hash : public std::hash<unsigned long> {
255 public:
256 size_t operator()(const T& x) const {
257 - return (*(hash<unsigned long> *)this)(((unsigned long)x)>>2);
258 + return (*(std::hash<unsigned long> *)this)(((unsigned long)x)>>2);
262 diff -Nuar freehdl-0.0.8.orig/freehdl/std.h freehdl-0.0.8/freehdl/std.h
263 --- freehdl-0.0.8.orig/freehdl/std.h 2003-04-09 19:10:06.000000000 +0300
264 +++ freehdl-0.0.8/freehdl/std.h 2020-03-30 02:54:42.439609671 +0300
265 @@ -1,7 +1,6 @@
266 #ifndef FREEHDL_STD_H
267 #define FREEHDL_STD_H
269 -using namespace std;
271 #include <freehdl/std-standard.hh>
272 #include <freehdl/std-vhdl-types.hh>
273 diff -Nuar freehdl-0.0.8.orig/freehdl/std-vhdl-types.hh freehdl-0.0.8/freehdl/std-vhdl-types.hh
274 --- freehdl-0.0.8.orig/freehdl/std-vhdl-types.hh 2008-02-15 18:31:41.000000000 +0200
275 +++ freehdl-0.0.8/freehdl/std-vhdl-types.hh 2020-03-30 02:54:42.443609762 +0300
276 @@ -6,13 +6,24 @@
277 #include <float.h>
278 #include <math.h>
279 #include <iostream>
280 +#include <map>
281 +#include <list>
282 +#include <functional>
283 #include <string.h>
285 #include <freehdl/std-memory.hh>
286 #include <freehdl/kernel-error.hh>
287 #include <freehdl/kernel-acl.hh>
289 -using namespace std;
290 +using std::string;
291 +using std::istream;
292 +using std::ostream;
293 +using std::min;
294 +using std::map;
295 +using std::stringstream;
296 +using std::list;
297 +using std::less;
298 +using std::iostream;
300 typedef long long int lint;
301 const int BUFFER_STREAM_SIZE_INCREMENT = 1024;
302 diff -Nuar freehdl-0.0.8.orig/freehdl/vaul-lexer.h freehdl-0.0.8/freehdl/vaul-lexer.h
303 --- freehdl-0.0.8.orig/freehdl/vaul-lexer.h 2009-04-21 22:37:36.000000000 +0300
304 +++ freehdl-0.0.8/freehdl/vaul-lexer.h 2020-03-30 02:54:42.443609762 +0300
305 @@ -32,7 +32,6 @@
306 #include <stdarg.h>
307 #include <string.h>
309 -using namespace std;
311 #undef yyFlexLexer
312 #define yyFlexLexer vaul_FlexLexer
313 diff -Nuar freehdl-0.0.8.orig/kernel/attributes.cc freehdl-0.0.8/kernel/attributes.cc
314 --- freehdl-0.0.8.orig/kernel/attributes.cc 2004-11-09 20:29:33.000000000 +0200
315 +++ freehdl-0.0.8/kernel/attributes.cc 2020-03-30 02:54:42.443609762 +0300
316 @@ -5,6 +5,7 @@
317 #include <freehdl/kernel-kernel-class.hh>
318 #include <freehdl/kernel-reader-info.hh>
319 #include <freehdl/kernel-driver-info.hh>
320 +using std::max;
321 #include <freehdl/kernel-attributes.hh>
324 diff -Nuar freehdl-0.0.8.orig/kernel/db.cc freehdl-0.0.8/kernel/db.cc
325 --- freehdl-0.0.8.orig/kernel/db.cc 2005-05-04 17:44:11.000000000 +0300
326 +++ freehdl-0.0.8/kernel/db.cc 2020-03-30 02:54:42.447609853 +0300
327 @@ -1,6 +1,5 @@
328 #define KERNEL // Include internal kernel definitions
330 -using namespace std;
331 #include <freehdl/kernel-db.hh>
334 diff -Nuar freehdl-0.0.8.orig/kernel/fhdl_stream.cc freehdl-0.0.8/kernel/fhdl_stream.cc
335 --- freehdl-0.0.8.orig/kernel/fhdl_stream.cc 2006-01-12 10:05:01.000000000 +0200
336 +++ freehdl-0.0.8/kernel/fhdl_stream.cc 2020-03-30 02:54:42.447609853 +0300
337 @@ -7,6 +7,9 @@
338 #include <freehdl/kernel-error.hh>
339 #include <freehdl/kernel-fhdl-stream.hh>
341 +using std::cin;
342 +using std::cout;
343 +using std::stringstream;
345 // Error stream to output error messages generated by the kernel,
346 // e.g. to print error messages due to invalid simulator commands
347 diff -Nuar freehdl-0.0.8.orig/kernel/kernel_class.cc freehdl-0.0.8/kernel/kernel_class.cc
348 --- freehdl-0.0.8.orig/kernel/kernel_class.cc 2009-10-11 19:34:19.000000000 +0300
349 +++ freehdl-0.0.8/kernel/kernel_class.cc 2020-03-30 02:54:42.447609853 +0300
350 @@ -15,6 +15,15 @@
351 #include <freehdl/kernel-resolver-process.hh>
352 #include <freehdl/kernel-resolver-descriptor.hh>
353 #include <freehdl/kernel-fhdl-stream.hh>
354 +#include <algorithm>
356 +using std::cerr;
357 +using std::pair;
358 +using std::binary_function;
360 +using std::cerr;
361 +using std::pair;
362 +using std::binary_function;
364 // Arguments that are passed in form the command line
365 int main_argc;
366 @@ -678,7 +687,7 @@
367 // list associated with the various reader infos. Identical lists
368 // are replaced by appropriate pointers to a single list in order to
369 // save memory.
370 - typedef hash_multimap<unsigned int, reader_info *> wait_elements_map_t;
371 + typedef std::unordered_multimap<unsigned int, reader_info *> wait_elements_map_t;
372 wait_elements_map_t wait_elements_map;
374 // Setup connection to the kernel data base
375 diff -Nuar freehdl-0.0.8.orig/kernel/main.cc freehdl-0.0.8/kernel/main.cc
376 --- freehdl-0.0.8.orig/kernel/main.cc 2009-03-15 20:48:13.000000000 +0200
377 +++ freehdl-0.0.8/kernel/main.cc 2020-03-30 02:54:42.447609853 +0300
378 @@ -34,6 +34,15 @@
379 #include <freehdl/kernel-error.hh>
380 #include <freehdl/kernel-fhdl-stream.hh>
382 +using std::ios;
383 +using std::ifstream;
384 +using std::ofstream;
385 +using std::ostringstream;
386 +using std::cin;
387 +using std::cerr;
388 +using std::cout;
389 +using std::endl;
391 #ifdef PERFMON_STATISTICS
392 #include "pcounter.hh"
393 #endif
394 diff -Nuar freehdl-0.0.8.orig/kernel/map_list.cc freehdl-0.0.8/kernel/map_list.cc
395 --- freehdl-0.0.8.orig/kernel/map_list.cc 2006-02-16 10:56:22.000000000 +0200
396 +++ freehdl-0.0.8/kernel/map_list.cc 2020-03-30 02:54:42.447609853 +0300
397 @@ -3,6 +3,12 @@
398 #include <freehdl/kernel-error.hh>
399 #include <freehdl/kernel-sig-info.hh>
400 #include <freehdl/kernel-resolver-descriptor.hh>
401 +#include <algorithm>
404 +using std::max;
406 +using std::max;
408 // Stores the father signal(s) of port signals
409 port_signal_link_map_t port_signal_link_map;
410 diff -Nuar freehdl-0.0.8.orig/kernel/name_stack.cc freehdl-0.0.8/kernel/name_stack.cc
411 --- freehdl-0.0.8.orig/kernel/name_stack.cc 2000-09-20 11:41:14.000000000 +0300
412 +++ freehdl-0.0.8/kernel/name_stack.cc 2020-03-30 02:54:42.447609853 +0300
413 @@ -1,8 +1,10 @@
414 #include <stdlib.h>
415 #include <stdio.h>
416 +#include <stack>
417 #include <freehdl/kernel-error.hh>
418 #include <freehdl/kernel-name-stack.hh>
420 +using std::stack;
422 name_stack instance_name;
424 diff -Nuar freehdl-0.0.8.orig/kernel/persistent_cdfg_dump.cc freehdl-0.0.8/kernel/persistent_cdfg_dump.cc
425 --- freehdl-0.0.8.orig/kernel/persistent_cdfg_dump.cc 2006-02-16 10:56:22.000000000 +0200
426 +++ freehdl-0.0.8/kernel/persistent_cdfg_dump.cc 2020-03-30 02:54:42.447609853 +0300
427 @@ -3,6 +3,7 @@
428 #include <freehdl/kernel-persistent-cdfg-dump.hh>
429 #include <freehdl/kernel-persistent-dump.hh>
431 +using std::endl;
433 buffer_stream register_cdfg_tmp_buffer;
435 diff -Nuar freehdl-0.0.8.orig/kernel/sig_info.cc freehdl-0.0.8/kernel/sig_info.cc
436 --- freehdl-0.0.8.orig/kernel/sig_info.cc 2009-03-15 20:23:09.000000000 +0200
437 +++ freehdl-0.0.8/kernel/sig_info.cc 2020-03-30 02:54:42.451609945 +0300
438 @@ -1,6 +1,5 @@
439 #define KERNEL // Include internal kernel definitions
441 -using namespace std;
442 #include <freehdl/kernel-error.hh>
443 #include <freehdl/kernel-db.hh>
444 #include <freehdl/kernel-sig-info.hh>
445 diff -Nuar freehdl-0.0.8.orig/std/internal_textio.cc freehdl-0.0.8/std/internal_textio.cc
446 --- freehdl-0.0.8.orig/std/internal_textio.cc 2006-01-26 09:41:24.000000000 +0200
447 +++ freehdl-0.0.8/std/internal_textio.cc 2020-03-30 02:54:42.451609945 +0300
448 @@ -10,6 +10,10 @@
449 #include <freehdl/kernel-name-stack.hh>
450 #include <freehdl/kernel-register.hh>
452 +using std::ios;
453 +using std::cin;
454 +using std::cout;
456 /* package :std:textio */
458 /* Definitions for access type :std:textio:line */
459 diff -Nuar freehdl-0.0.8.orig/std/vhdl_types.cc freehdl-0.0.8/std/vhdl_types.cc
460 --- freehdl-0.0.8.orig/std/vhdl_types.cc 2009-03-15 20:56:57.000000000 +0200
461 +++ freehdl-0.0.8/std/vhdl_types.cc 2020-03-30 02:54:42.451609945 +0300
462 @@ -12,6 +12,9 @@
463 #include <freehdl/kernel-register.hh>
466 +using std::ios;
467 +using std::ifstream;
468 +using std::ofstream;
470 /* *************************************************************
471 * Some global functions
472 diff -Nuar freehdl-0.0.8.orig/v2cc/mapping.cc freehdl-0.0.8/v2cc/mapping.cc
473 --- freehdl-0.0.8.orig/v2cc/mapping.cc 2008-02-15 20:11:15.000000000 +0200
474 +++ freehdl-0.0.8/v2cc/mapping.cc 2020-03-30 02:54:42.451609945 +0300
475 @@ -34,7 +34,12 @@
476 #include <iostream>
477 #include <stdlib.h>
479 -using namespace std;
480 +using std::string;
481 +using std::list;
482 +using std::map;
483 +using std::istream;
484 +using std::ifstream;
485 +using std::cerr;
487 v2cc_mapper::v2cc_mapper ()
489 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc.cc freehdl-0.0.8/v2cc/v2cc.cc
490 --- freehdl-0.0.8.orig/v2cc/v2cc.cc 2010-04-13 22:43:30.000000000 +0300
491 +++ freehdl-0.0.8/v2cc/v2cc.cc 2020-03-30 02:54:42.451609945 +0300
492 @@ -35,7 +35,6 @@
496 -using namespace std;
498 #if HAVE_MALLOC_H
499 #include <malloc.h>
500 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-const-fold.cc freehdl-0.0.8/v2cc/v2cc-const-fold.cc
501 --- freehdl-0.0.8.orig/v2cc/v2cc-const-fold.cc 2008-02-15 20:13:19.000000000 +0200
502 +++ freehdl-0.0.8/v2cc/v2cc-const-fold.cc 2020-03-30 02:54:42.451609945 +0300
503 @@ -16,6 +16,9 @@
504 #include "v2cc-util.h"
507 +using std::cerr;
508 +using std::max;
509 +using std::min;
511 // Used to generate error messages
512 extern vaul_error_printer codegen_error;
513 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-decl.cc freehdl-0.0.8/v2cc/v2cc-decl.cc
514 --- freehdl-0.0.8.orig/v2cc/v2cc-decl.cc 2010-05-08 15:15:38.000000000 +0300
515 +++ freehdl-0.0.8/v2cc/v2cc-decl.cc 2020-03-30 02:54:42.451609945 +0300
516 @@ -13,6 +13,9 @@
517 #include "mapping.h"
518 #include "v2cc-util.h"
520 +using std::endl;
521 +using std::min;
522 +using std::max;
524 void test (RegionStack &rstack)
526 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-explore.cc freehdl-0.0.8/v2cc/v2cc-explore.cc
527 --- freehdl-0.0.8.orig/v2cc/v2cc-explore.cc 2010-04-12 21:40:40.000000000 +0300
528 +++ freehdl-0.0.8/v2cc/v2cc-explore.cc 2020-03-30 02:54:42.455610036 +0300
529 @@ -15,7 +15,6 @@
530 #include "mapping.h"
531 #include "v2cc-util.h"
533 -using namespace std;
535 // Used to generate error messages
536 extern vaul_error_printer codegen_error;
537 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc.h freehdl-0.0.8/v2cc/v2cc.h
538 --- freehdl-0.0.8.orig/v2cc/v2cc.h 2006-03-17 11:22:55.000000000 +0200
539 +++ freehdl-0.0.8/v2cc/v2cc.h 2020-03-30 02:54:42.463610219 +0300
540 @@ -1,7 +1,17 @@
541 #ifndef V2CC_HEADER
542 #define V2CC_HEADER
544 -using namespace std;
545 +using std::vector;
546 +using std::list;
547 +using std::string;
548 +using std::pair;
549 +using std::string;
550 +using std::set;
551 +using std::less;
552 +using std::deque;
553 +using std::binary_function;
554 +using std::map;
555 +using std::binary_function;
557 #include <freehdl/vaul.h>
558 #include "mapping.h"
559 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-qid.cc freehdl-0.0.8/v2cc/v2cc-qid.cc
560 --- freehdl-0.0.8.orig/v2cc/v2cc-qid.cc 2006-02-16 10:56:22.000000000 +0200
561 +++ freehdl-0.0.8/v2cc/v2cc-qid.cc 2020-03-30 02:54:42.463610219 +0300
562 @@ -4,6 +4,7 @@
563 #include "v2cc-util.h"
566 +using std::endl;
568 // ******************************************************************************************
569 // Name: m_qid , generic function
570 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-util.cc freehdl-0.0.8/v2cc/v2cc-util.cc
571 --- freehdl-0.0.8.orig/v2cc/v2cc-util.cc 2009-04-19 01:51:38.000000000 +0300
572 +++ freehdl-0.0.8/v2cc/v2cc-util.cc 2020-03-30 02:54:42.463610219 +0300
573 @@ -9,6 +9,9 @@
575 #include "v2cc-util.h"
577 +using std::endl;
578 +using std::hex;
579 +using std::dec;
581 // ******************************************************************************************
582 // Some global variables
583 diff -Nuar freehdl-0.0.8.orig/v2cc/v2cc-util.h freehdl-0.0.8/v2cc/v2cc-util.h
584 --- freehdl-0.0.8.orig/v2cc/v2cc-util.h 2007-10-23 23:13:29.000000000 +0300
585 +++ freehdl-0.0.8/v2cc/v2cc-util.h 2020-03-30 02:55:06.160150752 +0300
586 @@ -2,12 +2,19 @@
587 #ifndef V2CC_UTIL_H
588 #define V2CC_UTIL_H
590 -using namespace std;
592 #include <sstream>
593 #include <iomanip>
594 #include <freehdl/vaul.h>
595 #include "v2cc-chunk.h"
596 +#include <type_traits>
598 +using std::stringstream;
599 +using std::setprecision;
600 +using std::showpoint;
601 +using std::ofstream;
602 +using std::cout;
603 +using std::to_string;
605 // ******************************************************************************************
606 // Some global variables
607 @@ -242,7 +249,8 @@
609 /* Convert an integer value into a string */
610 template <class T>
611 -inline string
612 +//inline string
613 +inline typename std::enable_if<!std::is_floating_point<T>::value, std::string>::type
614 to_string(T i)
616 stringstream lstr;
617 @@ -250,6 +258,8 @@
618 return lstr.str();
623 inline string
624 to_string(double i)
626 @@ -266,6 +276,7 @@
627 return str + ".0";
628 #endif
632 /* Print scalar value into a string */
633 string
634 diff -Nuar freehdl-0.0.8.orig/vaul/bison-parser.cc freehdl-0.0.8/vaul/bison-parser.cc
635 --- freehdl-0.0.8.orig/vaul/bison-parser.cc 2009-10-11 19:24:48.000000000 +0300
636 +++ freehdl-0.0.8/vaul/bison-parser.cc 2020-03-30 02:54:42.467610310 +0300
637 @@ -86,7 +86,6 @@
638 #include <malloc.h>
639 #endif
641 -using namespace std;
643 #define YYINITDEPTH 10000
644 #define YYMAXDEPTH 100000
645 diff -Nuar freehdl-0.0.8.orig/vaul/bison-parser.yy freehdl-0.0.8/vaul/bison-parser.yy
646 --- freehdl-0.0.8.orig/vaul/bison-parser.yy 2006-02-16 10:56:23.000000000 +0200
647 +++ freehdl-0.0.8/vaul/bison-parser.yy 2020-03-30 02:54:42.471610401 +0300
648 @@ -49,7 +49,6 @@
649 #include <malloc.h>
650 #endif
652 -using namespace std;
654 #define YYINITDEPTH 10000
655 #define YYMAXDEPTH 100000
656 diff -Nuar freehdl-0.0.8.orig/vaul/printer.cc freehdl-0.0.8/vaul/printer.cc
657 --- freehdl-0.0.8.orig/vaul/printer.cc 2007-10-23 23:52:52.000000000 +0300
658 +++ freehdl-0.0.8/vaul/printer.cc 2020-03-30 02:54:42.471610401 +0300
659 @@ -27,7 +27,8 @@
660 #include <string.h>
661 #include <sstream>
663 -using namespace std;
664 +using std::ostringstream;
665 +using std::ostream;
667 void vaul_printer::printf (const char *fmt, ...)
669 diff -Nuar freehdl-0.0.8.orig/vaul/tree.cc freehdl-0.0.8/vaul/tree.cc
670 --- freehdl-0.0.8.orig/vaul/tree.cc 2005-02-28 19:40:13.000000000 +0200
671 +++ freehdl-0.0.8/vaul/tree.cc 2020-03-30 02:54:42.471610401 +0300
672 @@ -31,7 +31,7 @@
673 #include <assert.h>
674 #include <stdlib.h>
676 -using namespace std;
677 +using std::ostream;
679 vaul_id_set::vaul_id_set(int dummy)