Salome HOME
Update copyrights
[tools/configuration.git] / config / patches / omninotify.001_compilation.patch
1 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/all_cosnotify_clients.cc omniNotify-2.1.new/examples/all_cosnotify_clients.cc
2 --- omniNotify-2.1.orig/examples/all_cosnotify_clients.cc       2003-10-23 08:39:11.000000000 +0400
3 +++ omniNotify-2.1.new/examples/all_cosnotify_clients.cc        2009-06-28 17:19:34.000000000 +0400
4 @@ -41,7 +41,7 @@
5      num_con_events = 6 * num_events;
6  
7      // (2) Obtain reference to notification channel
8 -    if (verbose) cout << "Obtaining reference to notification channel" << endl;
9 +    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
10      CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
11      if (CORBA::is_nil(channel)) { // name service lookup failed
12        channel = getchan_from_iorfile(orb, ior_file, verbose);
13 @@ -51,7 +51,7 @@
14      }
15  
16      // (3) Create all 12 CosNotify-style clients
17 -    if (verbose) cout << "Creating 12 clients" << endl;
18 +    if (verbose) std::cout << "Creating 12 clients" << std::endl;
19  
20      // (3.1) any_push_consumer
21      PushConsumer_i* a_push_c =
22 @@ -59,7 +59,7 @@
23                              "", "", sample_consume_any_fn, sample_offer_change_fn,
24                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
25      if (! a_push_c) {
26 -      cerr << "Constructing any_push_consumer failed" << endl;
27 +      std::cerr << "Constructing any_push_consumer failed" << std::endl;
28        goto error_return; // failed to create a client
29      }
30      CosNotifyComm::PushConsumer_var my_a_push_c = a_push_c->_this();
31 @@ -71,7 +71,7 @@
32                                        "", "", sample_consume_structured_fn, sample_offer_change_fn,
33                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
34      if (! s_push_c) {
35 -      cerr << "Constructing struct_push_consumer failed" << endl;
36 +      std::cerr << "Constructing struct_push_consumer failed" << std::endl;
37        goto error_return; // failed to create a client
38      }
39      CosNotifyComm::StructuredPushConsumer_var my_s_push_c = s_push_c->_this();
40 @@ -83,7 +83,7 @@
41                                      "", "", sample_consume_batch_fn, sample_offer_change_fn,
42                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
43      if (! b_push_c) {
44 -      cerr << "Constructing batch_push_consumer failed" << endl;
45 +      std::cerr << "Constructing batch_push_consumer failed" << std::endl;
46        goto error_return; // failed to create a client
47      }
48      CosNotifyComm::SequencePushConsumer_var my_b_push_c = b_push_c->_this();
49 @@ -95,7 +95,7 @@
50                              "", "", sample_consume_any_fn, sample_offer_change_fn,
51                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
52      if (! a_pull_c) {
53 -      cerr << "Constructing any_pull_consumer failed" << endl;
54 +      std::cerr << "Constructing any_pull_consumer failed" << std::endl;
55        goto error_return; // failed to create a client
56      }
57      CosNotifyComm::PullConsumer_var my_a_pull_c = a_pull_c->_this();
58 @@ -107,7 +107,7 @@
59                                        "", "", sample_consume_structured_fn, sample_offer_change_fn,
60                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
61      if (! s_pull_c) {
62 -      cerr << "Constructing struct_pull_consumer failed" << endl;
63 +      std::cerr << "Constructing struct_pull_consumer failed" << std::endl;
64        goto error_return; // failed to create a client
65      }
66      CosNotifyComm::StructuredPullConsumer_var my_s_pull_c = s_pull_c->_this();
67 @@ -119,7 +119,7 @@
68                                      "", "", sample_consume_batch_fn, sample_offer_change_fn,
69                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
70      if (! b_pull_c) {
71 -      cerr << "Constructing batch_pull_consumer failed" << endl;
72 +      std::cerr << "Constructing batch_pull_consumer failed" << std::endl;
73        goto error_return; // failed to create a client
74      }
75      CosNotifyComm::SequencePullConsumer_var my_b_pull_c = b_pull_c->_this();
76 @@ -131,7 +131,7 @@
77                              "", "", sample_supply_any_fn, sample_subscription_change_fn,
78                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
79      if (! a_push_s) {
80 -      cerr << "Constructing any_push_supplier failed" << endl;
81 +      std::cerr << "Constructing any_push_supplier failed" << std::endl;
82        goto error_return; // failed to create a client
83      }
84      CosNotifyComm::PushSupplier_var my_a_push_s = a_push_s->_this();
85 @@ -143,7 +143,7 @@
86                                        "", "", sample_supply_structured_fn, sample_subscription_change_fn,
87                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
88      if (! s_push_s) {
89 -      cerr << "Constructing struct_push_supplier failed" << endl;
90 +      std::cerr << "Constructing struct_push_supplier failed" << std::endl;
91        goto error_return; // failed to create a client
92      }
93      CosNotifyComm::StructuredPushSupplier_var my_s_push_s = s_push_s->_this();
94 @@ -155,7 +155,7 @@
95                                      "", "", sample_supply_batch_fn, sample_subscription_change_fn,
96                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
97      if (! b_push_s) {
98 -      cerr << "Constructing batch_push_supplier failed" << endl;
99 +      std::cerr << "Constructing batch_push_supplier failed" << std::endl;
100        goto error_return; // failed to create a client
101      }
102      CosNotifyComm::SequencePushSupplier_var my_b_push_s = b_push_s->_this();
103 @@ -167,7 +167,7 @@
104                              "", "", sample_supply_any_fn, sample_subscription_change_fn,
105                              &evs, constraint_expr, millisecs, delay_millisecs, verbose);
106      if (! a_pull_s) {
107 -      cerr << "Constructing any_pull_supplier failed" << endl;
108 +      std::cerr << "Constructing any_pull_supplier failed" << std::endl;
109        goto error_return; // failed to create a client
110      }
111      CosNotifyComm::PullSupplier_var my_a_pull_s = a_pull_s->_this();
112 @@ -179,7 +179,7 @@
113                                        "", "", sample_supply_structured_fn, sample_subscription_change_fn,
114                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
115      if (! s_pull_s) {
116 -      cerr << "Constructing struct_pull_supplier failed" << endl;
117 +      std::cerr << "Constructing struct_pull_supplier failed" << std::endl;
118        goto error_return; // failed to create a client
119      }
120      CosNotifyComm::StructuredPullSupplier_var my_s_pull_s = s_pull_s->_this();
121 @@ -191,75 +191,75 @@
122                                      "", "", sample_supply_batch_fn, sample_subscription_change_fn,
123                                      &evs, constraint_expr, millisecs, delay_millisecs, verbose);
124      if (! b_pull_s) {
125 -      cerr << "Constructing batch_pull_supplier failed" << endl;
126 +      std::cerr << "Constructing batch_pull_supplier failed" << std::endl;
127        goto error_return; // failed to create a client
128      }
129      CosNotifyComm::SequencePullSupplier_var my_b_pull_s = b_pull_s->_this();
130      b_pull_s->_remove_ref(); // enables POA cleanup of servant
131  
132      // (4) Tell POA we are ready to go
133 -    if (verbose) cout << "Activating POA manager" << endl;
134 +    if (verbose) std::cout << "Activating POA manager" << std::endl;
135      PortableServer::POAManager_var pman = poa->the_POAManager();
136      pman->activate();
137  
138      // (5) Connect clients to their proxies -- consumers first
139 -    if (verbose) cout << "Connecting consumer clients to proxies" << endl;
140 +    if (verbose) std::cout << "Connecting consumer clients to proxies" << std::endl;
141  
142      if (a_push_c->connect()) {
143 -      cerr << "Connecting any_push_consumer failed" << endl;
144 +      std::cerr << "Connecting any_push_consumer failed" << std::endl;
145        goto error_return;
146      }
147      if (s_push_c->connect()) {
148 -      cerr << "Connecting struct_push_consumer failed" << endl;
149 +      std::cerr << "Connecting struct_push_consumer failed" << std::endl;
150        goto error_return;
151      }
152      if (b_push_c->connect()) {
153 -      cerr << "Connecting batch_push_consumer failed" << endl;
154 +      std::cerr << "Connecting batch_push_consumer failed" << std::endl;
155        goto error_return;
156      }
157  
158      if (a_pull_c->connect()) {
159 -      cerr << "Connecting any_pull_consumer failed" << endl;
160 +      std::cerr << "Connecting any_pull_consumer failed" << std::endl;
161        goto error_return;
162      }
163      if (s_pull_c->connect()) {
164 -      cerr << "Connecting struct_pull_consumer failed" << endl;
165 +      std::cerr << "Connecting struct_pull_consumer failed" << std::endl;
166        goto error_return;
167      }
168      if (b_pull_c->connect()) {
169 -      cerr << "Connecting batch_pull_consumer failed" << endl;
170 +      std::cerr << "Connecting batch_pull_consumer failed" << std::endl;
171        goto error_return;
172      }
173  
174 -    if (verbose) cout << "Connecting supplier clients to proxies" << endl;
175 +    if (verbose) std::cout << "Connecting supplier clients to proxies" << std::endl;
176  
177      if (a_push_s->connect()) {
178 -      cerr << "Connecting any_push_supplier failed" << endl;
179 +      std::cerr << "Connecting any_push_supplier failed" << std::endl;
180        goto error_return;
181      }
182      if (s_push_s->connect()) {
183 -      cerr << "Connecting struct_push_supplier failed" << endl;
184 +      std::cerr << "Connecting struct_push_supplier failed" << std::endl;
185        goto error_return;
186      }
187      if (b_push_s->connect()) {
188 -      cerr << "Connecting batch_push_supplier failed" << endl;
189 +      std::cerr << "Connecting batch_push_supplier failed" << std::endl;
190        goto error_return;
191      }
192  
193      if (a_pull_s->connect()) {
194 -      cerr << "Connecting any_pull_supplier failed" << endl;
195 +      std::cerr << "Connecting any_pull_supplier failed" << std::endl;
196        goto error_return;
197      }
198      if (s_pull_s->connect()) {
199 -      cerr << "Connecting struct_pull_supplier failed" << endl;
200 +      std::cerr << "Connecting struct_pull_supplier failed" << std::endl;
201        goto error_return;
202      }
203      if (b_pull_s->connect()) {
204 -      cerr << "Connecting batch_pull_supplier failed" << endl;
205 +      std::cerr << "Connecting batch_pull_supplier failed" << std::endl;
206        goto error_return;
207      }
208  
209 -    if (verbose) cout << "Waiting for all 12 clients to finish" << endl;
210 +    if (verbose) std::cout << "Waiting for all 12 clients to finish" << std::endl;
211      CORBA::Boolean a_push_c_err = a_push_c->wait_done();
212      CORBA::Boolean s_push_c_err = s_push_c->wait_done();
213      CORBA::Boolean b_push_c_err = b_push_c->wait_done();
214 @@ -291,10 +291,10 @@
215        b_pull_s_err;
216  
217      if (com_err && (num_events > 0)) {
218 -      if (verbose) cout << "Communication error -- probably did not process desired # of events" << endl;
219 +      if (verbose) std::cout << "Communication error -- probably did not process desired # of events" << std::endl;
220      }
221  
222 -    if (verbose) cout << "Cleaning up" << endl;
223 +    if (verbose) std::cout << "Cleaning up" << std::endl;
224  
225      if (!a_push_c_err) { a_push_c->cleanup(); }
226      if (!s_push_c_err) { s_push_c->cleanup(); }
227 @@ -315,25 +315,25 @@
228      goto normal_return;
229    }
230    catch(CORBA::SystemException&) {                     
231 -    cerr << "main caught CORBA::SystemException." << endl;  
232 +    std::cerr << "main caught CORBA::SystemException." << std::endl;  
233    }                                                    
234    catch(CORBA::Exception&) {                           
235 -    cerr << "main caught CORBA::Exception." << endl;        
236 +    std::cerr << "main caught CORBA::Exception." << std::endl;        
237    }                                                    
238  #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
239    catch(omniORB::fatalException& fe) {                 
240 -    cerr << "main caught omniORB::fatalException:" << endl; 
241 -    cerr << "  file: " << fe.file() << endl;           
242 -    cerr << "  line: " << fe.line() << endl;           
243 -    cerr << "  mesg: " << fe.errmsg() << endl;         
244 +    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
245 +    std::cerr << "  file: " << fe.file() << std::endl;           
246 +    std::cerr << "  line: " << fe.line() << std::endl;           
247 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
248    }                                                    
249  #endif
250    catch(...) {                                         
251      // nameclt comment says it is a bad idea to report an error here 
252    }
253 -  cerr << "main caught an exception." << endl;       
254 +  std::cerr << "main caught an exception." << std::endl;       
255   error_return:
256 -  cerr << "QUITTING due to error" << endl;
257 +  std::cerr << "QUITTING due to error" << std::endl;
258    // orb->destroy();
259    return -1;
260   normal_return:
261 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/demo_add_filter.cc omniNotify-2.1.new/examples/demo_add_filter.cc
262 --- omniNotify-2.1.orig/examples/demo_add_filter.cc     2003-10-12 22:51:18.000000000 +0400
263 +++ omniNotify-2.1.new/examples/demo_add_filter.cc      2009-06-28 17:20:35.000000000 +0400
264 @@ -1,5 +1,5 @@
265  #include <stdlib.h>
266 -#include <iostream.h>
267 +#include <iostream>
268  #include <stdio.h>
269  
270  #include "CosNotifyShorthands.h"
271 @@ -25,14 +25,14 @@
272                                  CORBA::Boolean verbose);
273  
274  void usage(char* pname) {
275 -  cerr << "Usage: " << pname << " [-n name] [-f file] -p file" << endl << endl;
276 -  cout << "  -n name  : channel name" << endl;
277 -  cout << "               => use event service to lookup this name" << endl;
278 -  cout << "  -f file  : file containing channel IOR" << endl;
279 -  cout << "               => use string_to_object on the IOR" << endl;
280 -  cout << "  -p file  : file with stringified IOR of proxy to be" << endl;
281 -  cout << "               sent add_filter messages (REQUIRED)" << endl;
282 -  cout << "(The channel is needed to obtain its default filter factory)" << endl;
283 +  std::cerr << "Usage: " << pname << " [-n name] [-f file] -p file" << std::endl << std::endl;
284 +  std::cout << "  -n name  : channel name" << std::endl;
285 +  std::cout << "               => use event service to lookup this name" << std::endl;
286 +  std::cout << "  -f file  : file containing channel IOR" << std::endl;
287 +  std::cout << "               => use string_to_object on the IOR" << std::endl;
288 +  std::cout << "  -p file  : file with stringified IOR of proxy to be" << std::endl;
289 +  std::cout << "               sent add_filter messages (REQUIRED)" << std::endl;
290 +  std::cout << "(The channel is needed to obtain its default filter factory)" << std::endl;
291  }
292  
293  
294 @@ -84,11 +84,11 @@
295      char buf[8096];
296      FILE* ifile;
297      if (! (ifile = fopen(proxy_ior_file, "r")) ) {
298 -      cerr << "Failed to open file " << proxy_ior_file << " for reading" << endl;
299 +      std::cerr << "Failed to open file " << proxy_ior_file << " for reading" << std::endl;
300        goto cleanup;
301      }
302      if (fscanf(ifile, "%s", buf) != 1) {
303 -      cerr << "Failed to get an IOR from file " << proxy_ior_file << endl;
304 +      std::cerr << "Failed to get an IOR from file " << proxy_ior_file << std::endl;
305        fclose(ifile);
306        goto cleanup;
307      }
308 @@ -97,32 +97,32 @@
309      try {
310        CORBA::Object_var proxy_ref = orb->string_to_object(buf);
311        if ( CORBA::is_nil(proxy_ref) ) {
312 -       cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << endl;
313 +       std::cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << std::endl;
314         goto cleanup;
315        }
316        proxy = CosNF::FilterAdmin::_narrow(proxy_ref);
317        if ( CORBA::is_nil(proxy) ) {
318 -       cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << endl;
319 +       std::cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << std::endl;
320         goto cleanup;
321        }
322      } catch (...) {
323 -      cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << endl;
324 +      std::cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << std::endl;
325        goto cleanup;
326      }
327  
328      CosNF::Filter_ptr filter = CosNF::Filter::_nil();
329      while (1) {
330 -      cout << endl << "Enter a constraint ('exit' to quit, 'remove' to remove all filters): " << endl <<  flush;
331 +      std::cout << std::endl << "Enter a constraint ('exit' to quit, 'remove' to remove all filters): " << std::endl <<  std::flush;
332        if (!(fgets(buf, 8090, stdin))) break;
333        if (strlen(buf) < 2) continue; // skip empty lines
334        buf[strlen(buf)-1] = '\0'; // strip newline from end
335        if (strcmp(buf, "exit") == 0) {
336         break;
337        }
338 -      cout << "Calling remove_all_filters on the proxy" << endl;
339 +      std::cout << "Calling remove_all_filters on the proxy" << std::endl;
340        proxy->remove_all_filters();
341        if (!CORBA::is_nil(filter)) {
342 -       cout << "Destroying the previous filter, which is no longer in use" << endl;
343 +       std::cout << "Destroying the previous filter, which is no longer in use" << std::endl;
344         filter->destroy();
345         filter = CosNF::Filter::_nil();
346        }
347 @@ -134,27 +134,27 @@
348         evs.length(0);
349         sample_add_filter(channel, proxy, evs, buf, "demo_add_filter", filter, 1);
350        }
351 -      cout << endl << "---------------------------------------------------------" << endl;
352 +      std::cout << std::endl << "---------------------------------------------------------" << std::endl;
353      }
354      orb->destroy();
355      return 0; // success
356    }
357    catch(CORBA::SystemException&) {                     
358 -    cerr << "Caught CORBA::SystemException." << endl;  
359 +    std::cerr << "Caught CORBA::SystemException." << std::endl;  
360    }                                                    
361    catch(CORBA::Exception&) {                           
362 -    cerr << "Caught CORBA::Exception." << endl;        
363 +    std::cerr << "Caught CORBA::Exception." << std::endl;        
364    }                                                    
365  #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
366    catch(omniORB::fatalException& fe) {                 
367 -    cerr << "Caught omniORB::fatalException:" << endl; 
368 -    cerr << "  file: " << fe.file() << endl;           
369 -    cerr << "  line: " << fe.line() << endl;           
370 -    cerr << "  mesg: " << fe.errmsg() << endl;         
371 +    std::cerr << "Caught omniORB::fatalException:" << std::endl; 
372 +    std::cerr << "  file: " << fe.file() << std::endl;           
373 +    std::cerr << "  line: " << fe.line() << std::endl;           
374 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
375    }                                                    
376  #endif
377    catch(...) {                                         
378 -    cerr << "Caught unknown exception." << endl;       
379 +    std::cerr << "Caught unknown exception." << std::endl;       
380    }
381   cleanup:
382    orb->destroy();
383 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/demo_offer_change.cc omniNotify-2.1.new/examples/demo_offer_change.cc
384 --- omniNotify-2.1.orig/examples/demo_offer_change.cc   2003-10-12 22:51:18.000000000 +0400
385 +++ omniNotify-2.1.new/examples/demo_offer_change.cc    2009-06-28 17:21:48.000000000 +0400
386 @@ -1,5 +1,5 @@
387  #include <stdlib.h>
388 -#include <iostream.h>
389 +#include <iostream>
390  #include <stdio.h>
391  
392  #include "CosNotifyShorthands.h"
393 @@ -58,9 +58,9 @@
394  }
395  
396  void usage(char* pname) {
397 -  cerr << "Usage: " << pname << " -p file" << endl << endl;
398 -  cout << "  -p file  : file with stringified IOR of proxy to be" << endl;
399 -  cout << "               sent offer_change messages (REQUIRED)" << endl;
400 +  std::cerr << "Usage: " << pname << " -p file" << std::endl << std::endl;
401 +  std::cout << "  -p file  : file with stringified IOR of proxy to be" << std::endl;
402 +  std::cout << "               sent offer_change messages (REQUIRED)" << std::endl;
403  }
404  
405  int main(int argc, char** argv)
406 @@ -96,11 +96,11 @@
407      char buf2[8096];
408      FILE* ifile;
409      if (! (ifile = fopen(proxy_ior_file, "r")) ) {
410 -      cerr << "Failed to open file " << proxy_ior_file << " for reading" << endl;
411 +      std::cerr << "Failed to open file " << proxy_ior_file << " for reading" << std::endl;
412        goto cleanup;
413      }
414      if (fscanf(ifile, "%s", buf) != 1) {
415 -      cerr << "Failed to get an IOR from file " << proxy_ior_file << endl;
416 +      std::cerr << "Failed to get an IOR from file " << proxy_ior_file << std::endl;
417        fclose(ifile);
418        goto cleanup;
419      }
420 @@ -109,69 +109,69 @@
421      try {
422        CORBA::Object_var proxy_ref = orb->string_to_object(buf);
423        if ( CORBA::is_nil(proxy_ref) ) {
424 -       cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << endl;
425 +       std::cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << std::endl;
426         goto cleanup;
427        }
428        proxy = CosNC::NotifyPublish::_narrow(proxy_ref);
429        if ( CORBA::is_nil(proxy) ) {
430 -       cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << endl;
431 +       std::cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << std::endl;
432         goto cleanup;
433        }
434      } catch (...) {
435 -      cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << endl;
436 +      std::cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << std::endl;
437        goto cleanup;
438      }
439  
440      while (1) {
441        added.length(0);
442        deled.length(0);
443 -      cout << endl << "Enter list of removals (or empty for none): " << endl <<  flush;
444 +      std::cout << std::endl << "Enter list of removals (or empty for none): " << std::endl <<  std::flush;
445        if (!(fgets(buf, 8090, stdin))) break;
446        if (strlen(buf) < 1) break;
447        buf[strlen(buf)-1] = '\0'; // strip newline from end
448        if (strcmp(buf, "exit") == 0) break;
449        if (strlen(buf)) {
450         if (parse_etype_list(buf, deled)) {
451 -         cerr << "Failed to parse the input as an event type list" << endl;
452 +         std::cerr << "Failed to parse the input as an event type list" << std::endl;
453           continue;
454         }
455        }
456  
457 -      cout << endl << "Enter list of additions (or empty for none): " << endl <<  flush;
458 +      std::cout << std::endl << "Enter list of additions (or empty for none): " << std::endl <<  std::flush;
459        if (!(fgets(buf2, 8090, stdin))) break;
460        if (strlen(buf2) < 1) break;
461        buf2[strlen(buf2)-1] = '\0'; // strip newline from end
462        if (strcmp(buf2, "exit") == 0) break;
463        if (strlen(buf2)) {
464         if (parse_etype_list(buf2, added)) {
465 -         cerr << "Failed to parse the input as an event type list" << endl;
466 +         std::cerr << "Failed to parse the input as an event type list" << std::endl;
467           continue;
468         }
469        }
470  
471 -      cout << "Calling offer_change on the proxy" << endl;
472 +      std::cout << "Calling offer_change on the proxy" << std::endl;
473        proxy->offer_change(added, deled);
474 -      cout << endl << "---------------------------------------------------------" << endl;
475 +      std::cout << std::endl << "---------------------------------------------------------" << std::endl;
476      }
477      orb->destroy();
478      return 0; // success
479    }
480    catch(CORBA::SystemException&) {                     
481 -    cerr << "Caught CORBA::SystemException." << endl;  
482 +    std::cerr << "Caught CORBA::SystemException." << std::endl;  
483    }                                                    
484    catch(CORBA::Exception&) {                           
485 -    cerr << "Caught CORBA::Exception." << endl;        
486 +    std::cerr << "Caught CORBA::Exception." << std::endl;        
487    }                                                    
488  #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
489    catch(omniORB::fatalException& fe) {                 
490 -    cerr << "Caught omniORB::fatalException:" << endl; 
491 -    cerr << "  file: " << fe.file() << endl;           
492 -    cerr << "  line: " << fe.line() << endl;           
493 -    cerr << "  mesg: " << fe.errmsg() << endl;         
494 +    std::cerr << "Caught omniORB::fatalException:" << std::endl; 
495 +    std::cerr << "  file: " << fe.file() << std::endl;           
496 +    std::cerr << "  line: " << fe.line() << std::endl;           
497 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
498    }                                                    
499  #endif
500    catch(...) {                                         
501 -    cerr << "Caught unknown exception." << endl;       
502 +    std::cerr << "Caught unknown exception." << std::endl;       
503    }
504   cleanup:
505    orb->destroy();
506 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/demo_subscription_change.cc omniNotify-2.1.new/examples/demo_subscription_change.cc
507 --- omniNotify-2.1.orig/examples/demo_subscription_change.cc    2003-10-12 22:51:18.000000000 +0400
508 +++ omniNotify-2.1.new/examples/demo_subscription_change.cc     2009-06-28 17:23:49.000000000 +0400
509 @@ -1,5 +1,5 @@
510  #include <stdlib.h>
511 -#include <iostream.h>
512 +#include <iostream>
513  #include <stdio.h>
514  
515  #include "CosNotifyShorthands.h"
516 @@ -58,9 +58,9 @@
517  }
518  
519  void usage(char* pname) {
520 -  cerr << "Usage: " << pname << " -p file" << endl << endl;
521 -  cout << "  -p file  : file with stringified IOR of proxy to be" << endl;
522 -  cout << "               sent subscription_change messages (REQUIRED)" << endl;
523 +  std::cerr << "Usage: " << pname << " -p file" << std::endl << std::endl;
524 +  std::cout << "  -p file  : file with stringified IOR of proxy to be" << std::endl;
525 +  std::cout << "               sent subscription_change messages (REQUIRED)" << std::endl;
526  }
527  
528  int main(int argc, char** argv)
529 @@ -96,11 +96,11 @@
530      char buf2[8096];
531      FILE* ifile;
532      if (! (ifile = fopen(proxy_ior_file, "r")) ) {
533 -      cerr << "Failed to open file " << proxy_ior_file << " for reading" << endl;
534 +      std::cerr << "Failed to open file " << proxy_ior_file << " for reading" << std::endl;
535        goto cleanup;
536      }
537      if (fscanf(ifile, "%s", buf) != 1) {
538 -      cerr << "Failed to get an IOR from file " << proxy_ior_file << endl;
539 +      std::cerr << "Failed to get an IOR from file " << proxy_ior_file << std::endl;
540        fclose(ifile);
541        goto cleanup;
542      }
543 @@ -109,69 +109,69 @@
544      try {
545        CORBA::Object_var proxy_ref = orb->string_to_object(buf);
546        if ( CORBA::is_nil(proxy_ref) ) {
547 -       cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << endl;
548 +       std::cerr << "Failed to turn IOR in file " << proxy_ior_file << " into object" << std::endl;
549         goto cleanup;
550        }
551        proxy = CosNC::NotifySubscribe::_narrow(proxy_ref);
552        if ( CORBA::is_nil(proxy) ) {
553 -       cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << endl;
554 +       std::cerr << "Failed to narrow object from IOR in file " << proxy_ior_file << std::endl;
555         goto cleanup;
556        }
557      } catch (...) {
558 -      cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << endl;
559 +      std::cerr << "Failed to convert to object from IOR in file " << proxy_ior_file << std::endl;
560        goto cleanup;
561      }
562  
563      while (1) {
564        added.length(0);
565        deled.length(0);
566 -      cout << endl << "Enter list of removals (or empty for none): " << endl <<  flush;
567 +      std::cout << std::endl << "Enter list of removals (or empty for none): " << std::endl <<  std::flush;
568        if (!(fgets(buf, 8090, stdin))) break;
569        if (strlen(buf) < 1) break;
570        buf[strlen(buf)-1] = '\0'; // strip newline from end
571        if (strcmp(buf, "exit") == 0) break;
572        if (strlen(buf)) {
573         if (parse_etype_list(buf, deled)) {
574 -         cerr << "Failed to parse the input as an event type list" << endl;
575 +         std::cerr << "Failed to parse the input as an event type list" << std::endl;
576           continue;
577         }
578        }
579  
580 -      cout << endl << "Enter list of additions (or empty for none): " << endl <<  flush;
581 +      std::cout << std::endl << "Enter list of additions (or empty for none): " << std::endl <<  std::flush;
582        if (!(fgets(buf2, 8090, stdin))) break;
583        if (strlen(buf2) < 1) break;
584        buf2[strlen(buf2)-1] = '\0'; // strip newline from end
585        if (strcmp(buf2, "exit") == 0) break;
586        if (strlen(buf2)) {
587         if (parse_etype_list(buf2, added)) {
588 -         cerr << "Failed to parse the input as an event type list" << endl;
589 +         std::cerr << "Failed to parse the input as an event type list" << std::endl;
590           continue;
591         }
592        }
593  
594 -      cout << "Calling subscription_change on the proxy" << endl;
595 +      std::cout << "Calling subscription_change on the proxy" << std::endl;
596        proxy->subscription_change(added, deled);
597 -      cout << endl << "---------------------------------------------------------" << endl;
598 +      std::cout << std::endl << "---------------------------------------------------------" << std::endl;
599      }
600      orb->destroy();
601      return 0; // success
602    }
603    catch(CORBA::SystemException&) {                     
604 -    cerr << "Caught CORBA::SystemException." << endl;  
605 +    std::cerr << "Caught CORBA::SystemException." << std::endl;  
606    }                                                    
607    catch(CORBA::Exception&) {                           
608 -    cerr << "Caught CORBA::Exception." << endl;        
609 +    std::cerr << "Caught CORBA::Exception." << std::endl;        
610    }                                                    
611  #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
612    catch(omniORB::fatalException& fe) {                 
613 -    cerr << "Caught omniORB::fatalException:" << endl; 
614 -    cerr << "  file: " << fe.file() << endl;           
615 -    cerr << "  line: " << fe.line() << endl;           
616 -    cerr << "  mesg: " << fe.errmsg() << endl;         
617 +    std::cerr << "Caught omniORB::fatalException:" << std::endl; 
618 +    std::cerr << "  file: " << fe.file() << std::endl;           
619 +    std::cerr << "  line: " << fe.line() << std::endl;           
620 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
621    }                                                    
622  #endif
623    catch(...) {                                         
624 -    cerr << "Caught unknown exception." << endl;       
625 +    std::cerr << "Caught unknown exception." << std::endl;       
626    }
627   cleanup:
628    orb->destroy();
629 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/get_channel.h omniNotify-2.1.new/examples/get_channel.h
630 --- omniNotify-2.1.orig/examples/get_channel.h  2003-10-23 08:39:11.000000000 +0400
631 +++ omniNotify-2.1.new/examples/get_channel.h   2009-06-28 17:10:29.000000000 +0400
632 @@ -19,11 +19,11 @@
633    CosNA::EventChannel_ptr channel = CosNA::EventChannel::_nil();
634    if (!ior_file || strlen(ior_file) == 0) return channel; // empty string -- ignore
635    if (! (ifile = fopen(ior_file, "r")) ) {
636 -    cerr << "Failed to open file " << ior_file << " for reading" << endl;
637 +    std::cerr << "Failed to open file " << ior_file << " for reading" << std::endl;
638      return channel; // failure
639    }
640    if (fscanf(ifile, "%s", buf) != 1) {
641 -    cerr << "Failed to get an IOR from file " << ior_file << endl;
642 +    std::cerr << "Failed to get an IOR from file " << ior_file << std::endl;
643      fclose(ifile);
644      return channel; // failure
645    }
646 @@ -31,21 +31,21 @@
647    try {
648      CORBA::Object_var channel_ref = orb->string_to_object(buf);
649      if ( CORBA::is_nil(channel_ref) ) {
650 -      cerr << "Failed to turn IOR in file " << ior_file << " into object" << endl;
651 +      std::cerr << "Failed to turn IOR in file " << ior_file << " into object" << std::endl;
652        return channel; // failure
653      }
654      channel = CosNA::EventChannel::_narrow(channel_ref);
655      if ( CORBA::is_nil(channel) ) {
656 -      cerr << "Failed to narrow object from IOR in file " << ior_file <<
657 -       " to type CosNotifyChannelAdmin::EventChannel" << endl;
658 +      std::cerr << "Failed to narrow object from IOR in file " << ior_file <<
659 +       " to type CosNotifyChannelAdmin::EventChannel" << std::endl;
660        return channel; // failure
661      }
662    } catch (...) {
663 -    cerr << "Failed to convert IOR in file " << ior_file << " to object" << endl;
664 +    std::cerr << "Failed to convert IOR in file " << ior_file << " to object" << std::endl;
665      return channel; // failure
666    }
667    if (verbose)
668 -    cout << "Found valid channel reference" << endl;
669 +    std::cout << "Found valid channel reference" << std::endl;
670    return channel; // success
671  }
672  
673 @@ -59,29 +59,29 @@
674    if (!channel_name || strlen(channel_name) == 0) return channel; // empty string -- ignore
675  
676    if (verbose)
677 -    cout << "Obtaining naming service reference" << endl;
678 +    std::cout << "Obtaining naming service reference" << std::endl;
679    try {
680      CORBA::Object_var name_service;
681      name_service = orb->resolve_initial_references("NameService"); 
682      name_context = CosNaming::NamingContext::_narrow(name_service);
683      if ( CORBA::is_nil(name_context) ) {
684 -      cerr << "Failed to obtain context for NameService" << endl;
685 +      std::cerr << "Failed to obtain context for NameService" << std::endl;
686        return channel; // failure
687      } 
688    }
689    catch(CORBA::ORB::InvalidName& ex) {
690 -    cerr << "Service required is invalid [does not exist]" << endl;
691 +    std::cerr << "Service required is invalid [does not exist]" << std::endl;
692      return channel; // failure
693    } catch (CORBA::COMM_FAILURE& ex) {
694 -    cerr << "Caught system exception COMM_FAILURE" << endl;
695 +    std::cerr << "Caught system exception COMM_FAILURE" << std::endl;
696      return channel; // failure
697    } catch (...) {
698 -    cerr << "Caught exception while resolving the naming service" << endl;
699 +    std::cerr << "Caught exception while resolving the naming service" << std::endl;
700      return channel; // failure
701    }
702  
703    if (verbose)
704 -    cout << "Looking up channel name " << channel_name << " . " << channel_name << endl;
705 +    std::cout << "Looking up channel name " << channel_name << " . " << channel_name << std::endl;
706  
707    name.length(1);
708    name[0].id   = CORBA::string_dup((const char*)channel_name);
709 @@ -91,23 +91,23 @@
710      CORBA::Object_var channel_ref = name_context->resolve(name);
711      channel = CosNA::EventChannel::_narrow(channel_ref);
712      if ( CORBA::is_nil(channel) ) {
713 -      cerr << "Failed to narrow object found in naming service " <<
714 -       " to type CosNotifyChannelAdmin::EventChannel" << endl;
715 +      std::cerr << "Failed to narrow object found in naming service " <<
716 +       " to type CosNotifyChannelAdmin::EventChannel" << std::endl;
717        return channel; // failure
718      }
719    }
720    catch(CORBA::ORB::InvalidName& ex) {
721 -    cerr << "Invalid name" << endl;
722 +    std::cerr << "Invalid name" << std::endl;
723      return channel; // failure
724    } catch (CORBA::COMM_FAILURE& ex) {
725 -    cerr << "Caught system exception COMM_FAILURE while resolving event channel name" << endl;
726 +    std::cerr << "Caught system exception COMM_FAILURE while resolving event channel name" << std::endl;
727      return channel; // failure
728    } catch (...) {
729 -    cerr << "Caught exception while resolving event channel name" << endl;
730 +    std::cerr << "Caught exception while resolving event channel name" << std::endl;
731      return channel; // failure
732    }
733    if (verbose)
734 -    cout << "Found valid channel reference" << endl;
735 +    std::cout << "Found valid channel reference" << std::endl;
736    return channel; // success
737  }
738  
739 @@ -121,30 +121,30 @@
740    CosNaming::Name name;
741  
742    if (verbose)
743 -    cout << "Obtaining naming service reference" << endl;
744 +    std::cout << "Obtaining naming service reference" << std::endl;
745    if (!factory_name || strlen(factory_name) == 0) return channel; // empty string -- ignore
746    try {
747      CORBA::Object_var name_service;
748      name_service = orb->resolve_initial_references("NameService"); 
749      name_context = CosNaming::NamingContext::_narrow(name_service);
750      if ( CORBA::is_nil(name_context) ) {
751 -      cerr << "Failed to obtain context for NameService" << endl;
752 +      std::cerr << "Failed to obtain context for NameService" << std::endl;
753        return channel; // failure
754      } 
755    }
756    catch(CORBA::ORB::InvalidName& ex) {
757 -    cerr << "Service required is invalid [does not exist]" << endl;
758 +    std::cerr << "Service required is invalid [does not exist]" << std::endl;
759      return channel; // failure
760    } catch (CORBA::COMM_FAILURE& ex) {
761 -    cerr << "Caught system exception COMM_FAILURE" << endl;
762 +    std::cerr << "Caught system exception COMM_FAILURE" << std::endl;
763      return channel; // failure
764    } catch (...) {
765 -    cerr << "Caught exception while resolving the naming service" << endl;
766 +    std::cerr << "Caught exception while resolving the naming service" << std::endl;
767      return channel; // failure
768    }
769  
770    if (verbose)
771 -    cout << "Looking up channel factory name " << factory_name << " . " << factory_name << endl;
772 +    std::cout << "Looking up channel factory name " << factory_name << " . " << factory_name << std::endl;
773  
774    name.length(1);
775    name[0].id   = CORBA::string_dup((const char*)factory_name);
776 @@ -154,41 +154,41 @@
777      CORBA::Object_var factory_ref = name_context->resolve(name);
778      factory = CosNA::EventChannelFactory::_narrow(factory_ref);
779      if ( CORBA::is_nil(factory) ) {
780 -      cerr << "Failed to narrow object found in naming service " <<
781 -       " to type CosNotifyChannelAdmin::EventChannelFactory" << endl;
782 +      std::cerr << "Failed to narrow object found in naming service " <<
783 +       " to type CosNotifyChannelAdmin::EventChannelFactory" << std::endl;
784        return channel; // failure
785      }
786    }
787    catch(CORBA::ORB::InvalidName& ex) {
788 -    cerr << "Invalid name" << endl;
789 +    std::cerr << "Invalid name" << std::endl;
790      return channel; // failure
791    } catch (CORBA::COMM_FAILURE& ex) {
792 -    cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << endl;
793 +    std::cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << std::endl;
794      return channel; // failure
795    } catch (...) {
796 -    cerr << "Caught exception while resolving event channel factory name" << endl;
797 +    std::cerr << "Caught exception while resolving event channel factory name" << std::endl;
798      return channel; // failure
799    }
800    if (verbose) {
801 -    cout << "Found valid channel factory reference" << endl;
802 -    cout << "Looking up channel id " << chan_id << endl;
803 +    std::cout << "Found valid channel factory reference" << std::endl;
804 +    std::cout << "Looking up channel id " << chan_id << std::endl;
805    }
806  
807    try {
808      channel = factory->get_event_channel( chan_id );
809      if ( CORBA::is_nil(channel) ) {
810 -      cerr << "Failed to find channel id " << chan_id << endl;
811 +      std::cerr << "Failed to find channel id " << chan_id << std::endl;
812        return channel; // failure
813      }
814    } catch (CORBA::COMM_FAILURE& ex) {
815 -    cerr << "Caught system exception COMM_FAILURE while invoking get_event_channel" << endl;
816 +    std::cerr << "Caught system exception COMM_FAILURE while invoking get_event_channel" << std::endl;
817      return channel; // failure
818    } catch (...) {
819 -    cerr << "Caught exception while invoking get_event_channel" << endl;
820 +    std::cerr << "Caught exception while invoking get_event_channel" << std::endl;
821      return channel; // failure
822    }
823    if (verbose)
824 -    cout << "Found valid channel reference" << endl;
825 +    std::cout << "Found valid channel reference" << std::endl;
826    return channel; // success
827  }
828  
829 @@ -201,30 +201,30 @@
830    CosNaming::Name name;
831  
832    if (verbose)
833 -    cout << "Obtaining naming service reference" << endl;
834 +    std::cout << "Obtaining naming service reference" << std::endl;
835    if (!factory_name || strlen(factory_name) == 0) return channel; // empty string -- ignore
836    try {
837      CORBA::Object_var name_service;
838      name_service = orb->resolve_initial_references("NameService"); 
839      name_context = CosNaming::NamingContext::_narrow(name_service);
840      if ( CORBA::is_nil(name_context) ) {
841 -      cerr << "Failed to obtain context for NameService" << endl;
842 +      std::cerr << "Failed to obtain context for NameService" << std::endl;
843        return channel; // failure
844      } 
845    }
846    catch(CORBA::ORB::InvalidName& ex) {
847 -    cerr << "Service required is invalid [does not exist]" << endl;
848 +    std::cerr << "Service required is invalid [does not exist]" << std::endl;
849      return channel; // failure
850    } catch (CORBA::COMM_FAILURE& ex) {
851 -    cerr << "Caught system exception COMM_FAILURE" << endl;
852 +    std::cerr << "Caught system exception COMM_FAILURE" << std::endl;
853      return channel; // failure
854    } catch (...) {
855 -    cerr << "Caught exception while resolving the naming service" << endl;
856 +    std::cerr << "Caught exception while resolving the naming service" << std::endl;
857      return channel; // failure
858    }
859  
860    if (verbose)
861 -    cout << "Looking up channel factory name " << factory_name << " . " << factory_name << endl;
862 +    std::cout << "Looking up channel factory name " << factory_name << " . " << factory_name << std::endl;
863  
864    name.length(1);
865    name[0].id   = CORBA::string_dup((const char*)factory_name);
866 @@ -234,24 +234,24 @@
867      CORBA::Object_var factory_ref = name_context->resolve(name);
868      factory = CosNA::EventChannelFactory::_narrow(factory_ref);
869      if ( CORBA::is_nil(factory) ) {
870 -      cerr << "Failed to narrow object found in naming service " <<
871 -       " to type CosNotifyChannelAdmin::EventChannelFactory" << endl;
872 +      std::cerr << "Failed to narrow object found in naming service " <<
873 +       " to type CosNotifyChannelAdmin::EventChannelFactory" << std::endl;
874        return channel; // failure
875      }
876    }
877    catch(CORBA::ORB::InvalidName& ex) {
878 -    cerr << "Invalid name" << endl;
879 +    std::cerr << "Invalid name" << std::endl;
880      return channel; // failure
881    } catch (CORBA::COMM_FAILURE& ex) {
882 -    cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << endl;
883 +    std::cerr << "Caught system exception COMM_FAILURE while resolving event channel factory name" << std::endl;
884      return channel; // failure
885    } catch (...) {
886 -    cerr << "Caught exception while resolving event channel factory name" << endl;
887 +    std::cerr << "Caught exception while resolving event channel factory name" << std::endl;
888      return channel; // failure
889    }
890    if (verbose) {
891 -    cout << "Found valid channel factory reference" << endl;
892 -    cout << "Creating new channel" << endl;
893 +    std::cout << "Found valid channel factory reference" << std::endl;
894 +    std::cout << "Creating new channel" << std::endl;
895    }
896  
897    CosNA::ChannelID         chan_id;
898 @@ -264,18 +264,18 @@
899  
900      channel = factory->create_channel(qosP, admP, chan_id);
901      if ( CORBA::is_nil(channel) ) {
902 -      cerr << "Failed to create new channel" << endl;
903 +      std::cerr << "Failed to create new channel" << std::endl;
904        return channel; // failure
905      }
906    } catch (CORBA::COMM_FAILURE& ex) {
907 -    cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << endl;
908 +    std::cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << std::endl;
909      return channel; // failure
910    } catch (...) {
911 -    cerr << "Caught exception while invoking create_channel" << endl;
912 +    std::cerr << "Caught exception while invoking create_channel" << std::endl;
913      return channel; // failure
914    }
915    if (verbose)
916 -    cout << "Created a new channel with channel ID " << chan_id << endl;
917 +    std::cout << "Created a new channel with channel ID " << chan_id << std::endl;
918    return channel; // success
919  }
920  
921 @@ -289,11 +289,11 @@
922  
923    if (!ior_file || strlen(ior_file) == 0) return channel; // empty string -- ignore
924    if (! (ifile = fopen(ior_file, "r")) ) {
925 -    cerr << "Failed to open file " << ior_file << " for reading" << endl;
926 +    std::cerr << "Failed to open file " << ior_file << " for reading" << std::endl;
927      return channel; // failure
928    }
929    if (fscanf(ifile, "%s", buf) != 1) {
930 -    cerr << "Failed to get an IOR from file " << ior_file << endl;
931 +    std::cerr << "Failed to get an IOR from file " << ior_file << std::endl;
932      fclose(ifile);
933      return channel; // failure
934    }
935 @@ -301,22 +301,22 @@
936    try {
937      CORBA::Object_var fact_ref = orb->string_to_object(buf);
938      if ( CORBA::is_nil(fact_ref) ) {
939 -      cerr << "Failed to turn IOR in file " << ior_file << " into object" << endl;
940 +      std::cerr << "Failed to turn IOR in file " << ior_file << " into object" << std::endl;
941        return channel; // failure
942      }
943      factory = CosNA::EventChannelFactory::_narrow(fact_ref);
944      if ( CORBA::is_nil(factory) ) {
945 -      cerr << "Failed to narrow object from IOR in file " << ior_file <<
946 -       " to type CosNotifyChannelAdmin::EventChannelFactory" << endl;
947 +      std::cerr << "Failed to narrow object from IOR in file " << ior_file <<
948 +       " to type CosNotifyChannelAdmin::EventChannelFactory" << std::endl;
949        return channel; // failure
950      }
951    } catch (...) {
952 -    cerr << "Failed to convert IOR in file " << ior_file << " to object" << endl;
953 +    std::cerr << "Failed to convert IOR in file " << ior_file << " to object" << std::endl;
954      return channel; // failure
955    }
956    if (verbose) {
957 -    cout << "Found valid channel factory reference" << endl;
958 -    cout << "Creating new channel" << endl;
959 +    std::cout << "Found valid channel factory reference" << std::endl;
960 +    std::cout << "Creating new channel" << std::endl;
961    }
962  
963    CosNA::ChannelID         chan_id;
964 @@ -329,18 +329,18 @@
965  
966      channel = factory->create_channel(qosP, admP, chan_id);
967      if ( CORBA::is_nil(channel) ) {
968 -      cerr << "Failed to create new channel" << endl;
969 +      std::cerr << "Failed to create new channel" << std::endl;
970        return channel; // failure
971      }
972    } catch (CORBA::COMM_FAILURE& ex) {
973 -    cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << endl;
974 +    std::cerr << "Caught system exception COMM_FAILURE while invoking create_channel" << std::endl;
975      return channel; // failure
976    } catch (...) {
977 -    cerr << "Caught exception while invoking create_channel" << endl;
978 +    std::cerr << "Caught exception while invoking create_channel" << std::endl;
979      return channel; // failure
980    }
981    if (verbose)
982 -    cout << "Created a new channel with channel ID " << chan_id << endl;
983 +    std::cout << "Created a new channel with channel ID " << chan_id << std::endl;
984    return channel; // success
985  }
986  
987 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/legacy_clients.cc omniNotify-2.1.new/examples/legacy_clients.cc
988 --- omniNotify-2.1.orig/examples/legacy_clients.cc      2003-10-23 08:39:11.000000000 +0400
989 +++ omniNotify-2.1.new/examples/legacy_clients.cc       2009-06-28 17:19:01.000000000 +0400
990 @@ -4,8 +4,8 @@
991  // See legacy_clients.h
992  // -------------------------------------------------------------- //
993  
994 -#include <iostream.h>
995 -#include <iomanip.h>
996 +#include <iostream>
997 +#include <iomanip>
998  #include "thread_wrappers.h"
999  
1000  #include "CosNotifyShorthands.h"
1001 @@ -40,22 +40,22 @@
1002    try {
1003      admin = channel->for_consumers();
1004      if ( CORBA::is_nil(admin) ) {
1005 -      cerr << "Failed to obtain admin" << endl;
1006 +      std::cerr << "Failed to obtain admin" << std::endl;
1007        return 0; // failure
1008      }
1009    } catch (...) {
1010 -    cerr << "Failed to obtain admin" << endl;
1011 +    std::cerr << "Failed to obtain admin" << std::endl;
1012      return 0;  // failure
1013    }
1014 -  if (verbose) cout << "Obtained admin from the channel" << endl;
1015 +  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
1016    try {
1017      proxy = admin->obtain_push_supplier();
1018    } catch (...) {  }
1019    if ( CORBA::is_nil(proxy) ) {
1020 -    cerr << "Failed to obtain proxy" << endl;
1021 +    std::cerr << "Failed to obtain proxy" << std::endl;
1022      return 0;
1023    }
1024 -  if (verbose) cout << "Obtained proxy from admin" << endl;
1025 +  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
1026  
1027      // Construct a client
1028    LegacyPushConsumer_i* client =
1029 @@ -70,16 +70,16 @@
1030    try {
1031      _my_proxy->connect_push_consumer(_this());
1032    } catch (CORBA::BAD_PARAM& ex) {
1033 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
1034 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
1035      return 1; // error
1036    } catch (CosEA::AlreadyConnected& ex) {
1037 -    cerr << _obj_name << ": Already connected" << endl;
1038 +    std::cerr << _obj_name << ": Already connected" << std::endl;
1039      return 1; // error
1040    } catch (...) {
1041 -    cerr << _obj_name << ": Failed to connect" << endl;
1042 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
1043      return 1; // error
1044    }
1045 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
1046 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
1047    // if _millisecs is set, spawn a thread to ping the proxy
1048    if (_millisecs) 
1049      _worker = new GenericBoundWorkerThread(this);
1050 @@ -91,7 +91,7 @@
1051    { // introduce lock scope
1052      TW_SCOPE_LOCK(lock, _oplock, "LegacyPushConsumer", "LegacyPushConsumer_i::cleanup");
1053      if (_worker || (!_done)) {
1054 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
1055 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
1056        return;
1057      }
1058      // this method takes sole ownership of _my_proxy ref
1059 @@ -113,7 +113,7 @@
1060    { // introduce lock scope
1061      TW_SCOPE_LOCK(lock, _oplock, "LegacyPushConsumer", "LegacyPushConsumer_i::start_working");
1062  
1063 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
1064 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
1065      // invariant: _oplock held at top of loop
1066      while ( 1 ) {
1067        if (_done || (_millisecs == 0)) break;
1068 @@ -138,7 +138,7 @@
1069        continue; // continue ping loop
1070      com_fail:
1071        if (_done) break;
1072 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using connect_push_consumer" << endl;
1073 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using connect_push_consumer" << std::endl;
1074        _done = 1;
1075        _finish.broadcast();
1076        _com_err = 1;
1077 @@ -158,16 +158,16 @@
1078    _num_events++;
1079    if (_consume_fn)
1080      (*_consume_fn)(data, _obj_name, _num_events, _verbose);
1081 -  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
1082 +  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
1083    if (_max_events && (_num_events >= _max_events)) {
1084 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
1085 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
1086      _done = 1;
1087      _finish.broadcast();
1088    }
1089    if (!_done && _delay_millisecs) {
1090      unsigned long d_secs     =  _delay_millisecs / 1000;
1091      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
1092 -    if (_verbose) cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << endl;
1093 +    if (_verbose) std::cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << std::endl;
1094      unsigned long t_secs, t_nanosecs;
1095      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
1096      _finish.timedwait(t_secs, t_nanosecs);
1097 @@ -180,7 +180,7 @@
1098  
1099    TW_SCOPE_LOCK(lock, _oplock, "LegacyPushConsumer", "LegacyPushConsumer_i::diconnect_push_consumer");
1100    if (_done) return;
1101 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
1102 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
1103    _done = 1;
1104    _finish.broadcast();
1105  }
1106 @@ -231,22 +231,22 @@
1107    try {
1108      admin = channel->for_consumers();
1109      if ( CORBA::is_nil(admin) ) {
1110 -      cerr << "Failed to obtain admin" << endl;
1111 +      std::cerr << "Failed to obtain admin" << std::endl;
1112        return 0; // failure
1113      }
1114    } catch (...) {
1115 -    cerr << "Failed to obtain admin" << endl;
1116 +    std::cerr << "Failed to obtain admin" << std::endl;
1117      return 0;  // failure
1118    }
1119 -  if (verbose) cout << "Obtained admin from the channel" << endl;
1120 +  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
1121    try {
1122      proxy = admin->obtain_pull_supplier();
1123    } catch (...) {  }
1124    if ( CORBA::is_nil(proxy) ) {
1125 -    cerr << "Failed to obtain proxy" << endl;
1126 +    std::cerr << "Failed to obtain proxy" << std::endl;
1127      return 0;
1128    }
1129 -  if (verbose) cout << "Obtained proxy from admin" << endl;
1130 +  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
1131  
1132      // Construct a client
1133    LegacyPullConsumer_i* client =
1134 @@ -261,17 +261,17 @@
1135    try {
1136      _my_proxy->connect_pull_consumer(_this());
1137    } catch (CORBA::BAD_PARAM& ex) {
1138 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
1139 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
1140      return 1; // error
1141    } catch (CosEA::AlreadyConnected& ex) {
1142 -    cerr << _obj_name << ": Already connected" << endl;
1143 +    std::cerr << _obj_name << ": Already connected" << std::endl;
1144      return 1; // error
1145    } catch (...) {
1146 -    cerr << _obj_name << ": Failed to connect" << endl;
1147 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
1148      return 1; // error
1149    }
1150    // spawn a thread to do pulling
1151 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
1152 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
1153    _worker = new GenericBoundWorkerThread(this);
1154    return 0; // OK
1155  }
1156 @@ -281,7 +281,7 @@
1157    { // introduce lock scope
1158      TW_SCOPE_LOCK(lock, _oplock, "LegacyPullConsumer", "LegacyPullConsumer_i::cleanup");
1159      if (_worker || (!_done)) {
1160 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
1161 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
1162        return;
1163      }
1164      // this method takes sole ownership of _my_proxy ref
1165 @@ -309,7 +309,7 @@
1166    { // introduce lock scope
1167      TW_SCOPE_LOCK(lock, _oplock, "LegacyPullConsumer", "LegacyPullConsumer_i::start_working");
1168  
1169 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
1170 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
1171      while ( 1 ) {
1172        if (_done) break; // must have disconnected
1173        { // introduce temporary lock release scope; do not hold oplock across pull
1174 @@ -322,7 +322,7 @@
1175        } // end temporary lock release scope
1176        if (_done) break; // must have disconnected during pull
1177        if (!data) {
1178 -       if (_verbose) cout << _obj_name << ": strange failure: pull() returned nil" << endl;
1179 +       if (_verbose) std::cout << _obj_name << ": strange failure: pull() returned nil" << std::endl;
1180         _com_err = 1;
1181         break; // break from while loop -- done
1182        }
1183 @@ -330,11 +330,11 @@
1184        _num_events++;
1185        if (_consume_fn)
1186         (*_consume_fn)(*data, _obj_name, _num_events, _verbose);
1187 -      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
1188 +      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
1189        delete data;
1190        data = 0;
1191        if (_max_events && (_num_events >= _max_events)) {
1192 -       if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
1193 +       if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
1194         break; // done 
1195        }
1196        if (_millisecs) { // sleep for specified interval
1197 @@ -349,7 +349,7 @@
1198        continue; // continue pulling
1199      com_fail:
1200        if (_done) break;
1201 -      if (_verbose) cout << _obj_name << ": communication error while calling pull()" << endl;
1202 +      if (_verbose) std::cout << _obj_name << ": communication error while calling pull()" << std::endl;
1203        _com_err = 1;
1204        break; // break from while loop -- done
1205      } // end while loop
1206 @@ -370,7 +370,7 @@
1207  
1208    TW_SCOPE_LOCK(lock, _oplock, "LegacyPullConsumer", "LegacyPullConsumer_i::disconnect_pull_consumer");
1209    if (_done) return;
1210 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
1211 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
1212    _done = 1;
1213    _finish.broadcast();
1214  }
1215 @@ -422,22 +422,22 @@
1216    try {
1217      admin = channel->for_suppliers();
1218      if ( CORBA::is_nil(admin) ) {
1219 -      cerr << "Failed to obtain admin" << endl;
1220 +      std::cerr << "Failed to obtain admin" << std::endl;
1221        return 0; // failure
1222      }
1223    } catch (...) {
1224 -    cerr << "Failed to obtain admin" << endl;
1225 +    std::cerr << "Failed to obtain admin" << std::endl;
1226      return 0;  // failure
1227    }
1228 -  if (verbose) cout << "Obtained admin from the channel" << endl;
1229 +  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
1230    try {
1231      proxy = admin->obtain_push_consumer();
1232    } catch (...) {  }
1233    if ( CORBA::is_nil(proxy) ) {
1234 -    cerr << "Failed to obtain proxy" << endl;
1235 +    std::cerr << "Failed to obtain proxy" << std::endl;
1236      return 0; // failure
1237    }
1238 -  if (verbose) cout << "Obtained proxy from admin" << endl;
1239 +  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
1240  
1241      // Construct a client
1242    LegacyPushSupplier_i* client =
1243 @@ -452,17 +452,17 @@
1244    try {
1245      _my_proxy->connect_push_supplier(_this());
1246    } catch (CORBA::BAD_PARAM& ex) {
1247 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
1248 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
1249      return 1; // error
1250    } catch (CosEA::AlreadyConnected& ex) {
1251 -    cerr << _obj_name << ": Already connected" << endl;
1252 +    std::cerr << _obj_name << ": Already connected" << std::endl;
1253      return 1; // error
1254    } catch (...) {
1255 -    cerr << _obj_name << ": Failed to connect" << endl;
1256 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
1257      return 1; // error
1258    }
1259    // spawn a thread to do pushing
1260 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
1261 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
1262    _worker = new GenericBoundWorkerThread(this);
1263    return 0; // OK
1264  }
1265 @@ -472,7 +472,7 @@
1266    { // introduce lock scope
1267      TW_SCOPE_LOCK(lock, _oplock, "LegacyPushSupplier", "LegacyPushSupplier_i::cleanup");
1268      if (_worker || (!_done)) {
1269 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
1270 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
1271        return;
1272      }
1273      // this method takes sole ownership of _my_proxy ref
1274 @@ -500,7 +500,7 @@
1275    { // introduce lock scope
1276      TW_SCOPE_LOCK(lock, _oplock, "LegacyPushSupplier", "LegacyPushSupplier_i::start_working");
1277  
1278 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
1279 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
1280      while ( 1 ) {
1281        if (_done) break; // must have disconnected
1282        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
1283 @@ -515,9 +515,9 @@
1284         if (_done) break; // must have disconnected during push
1285         _num_events++;
1286         // [rather than doing the following we let supply_fn report if it wants to]
1287 -       // if (_verbose) cout << _obj_name << ": Pushed an event, event count = " << _num_events << endl;
1288 +       // if (_verbose) std::cout << _obj_name << ": Pushed an event, event count = " << _num_events << std::endl;
1289         if (_max_events && (_num_events >= _max_events)) {
1290 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
1291 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
1292           break; // done
1293         }
1294        }
1295 @@ -534,7 +534,7 @@
1296        continue; // continue pushing
1297      com_fail:
1298        if (_done) break; // must have disconnected during push
1299 -      if (_verbose) cout << _obj_name << ": communication error while calling push()" << endl;
1300 +      if (_verbose) std::cout << _obj_name << ": communication error while calling push()" << std::endl;
1301        _com_err = 1;
1302        break; // break from while loop -- done
1303      } // end while loop
1304 @@ -554,7 +554,7 @@
1305  
1306    TW_SCOPE_LOCK(lock, _oplock, "LegacyPushSupplier", "LegacyPushSupplier_i::disconnect_push_supplier");
1307    if (_done) return;
1308 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
1309 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
1310    _done = 1;
1311    _finish.broadcast();
1312  }
1313 @@ -606,22 +606,22 @@
1314    try {
1315      admin = channel->for_suppliers();
1316      if ( CORBA::is_nil(admin) ) {
1317 -      cerr << "Failed to obtain admin" << endl;
1318 +      std::cerr << "Failed to obtain admin" << std::endl;
1319        return 0; // failure
1320      }
1321    } catch (...) {
1322 -    cerr << "Failed to obtain admin" << endl;
1323 +    std::cerr << "Failed to obtain admin" << std::endl;
1324      return 0;  // failure
1325    }
1326 -  if (verbose) cout << "Obtained admin from the channel" << endl;
1327 +  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
1328    try {
1329      proxy = admin->obtain_pull_consumer();
1330    } catch (...) {  }
1331    if ( CORBA::is_nil(proxy) ) {
1332 -    cerr << "Failed to obtain proxy" << endl;
1333 +    std::cerr << "Failed to obtain proxy" << std::endl;
1334      return 0; // failure
1335    }
1336 -  if (verbose) cout << "Obtained proxy from admin" << endl;
1337 +  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
1338  
1339      // Construct a client
1340    LegacyPullSupplier_i* client =
1341 @@ -636,16 +636,16 @@
1342    try {
1343      _my_proxy->connect_pull_supplier(_this());
1344    } catch (CORBA::BAD_PARAM& ex) {
1345 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
1346 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
1347      return 1; // error
1348    } catch (CosEA::AlreadyConnected& ex) {
1349 -    cerr << _obj_name << ": Already connected" << endl;
1350 +    std::cerr << _obj_name << ": Already connected" << std::endl;
1351      return 1; // error
1352    } catch (...) {
1353 -    cerr << _obj_name << ": Failed to connect" << endl;
1354 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
1355      return 1; // error
1356    }
1357 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
1358 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
1359    // if _millisecs is set, spawn a thread to ping the proxy
1360    if (_millisecs)
1361      _worker = new GenericBoundWorkerThread(this);
1362 @@ -657,7 +657,7 @@
1363    { // introduce lock scope
1364      TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::cleanup");
1365      if (_worker || (!_done)) {
1366 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
1367 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
1368        return;
1369      }
1370      // this method takes sole ownership of _my_proxy ref
1371 @@ -678,7 +678,7 @@
1372  
1373    { // introduce lock scope
1374      TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::start_working");
1375 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
1376 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
1377      // invariant: _oplock held at top of loop
1378      while ( 1 ) {
1379        if (_done || (_millisecs == 0)) break;
1380 @@ -703,7 +703,7 @@
1381        continue; // continue ping loop
1382      com_fail:
1383        if (_done) break;
1384 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using connect_pull_supplier" << endl;
1385 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using connect_pull_supplier" << std::endl;
1386        _done = 1;
1387        _finish.broadcast();
1388        _com_err = 1;
1389 @@ -722,7 +722,7 @@
1390  
1391    TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::try_pull");
1392    if (_done) return data;
1393 -  if (_verbose) cout << _obj_name << ": Channel called try_pull" << endl;
1394 +  if (_verbose) std::cout << _obj_name << ": Channel called try_pull" << std::endl;
1395  
1396    // If we reached done point during last try_pull, it is broadcast now
1397    // and we return from this try_pull call without an event.
1398 @@ -730,10 +730,10 @@
1399    // processed the previous try_pull (the final supplied event) before
1400    // we disconnect this supplier.
1401    if (_max_events && (_num_events >= _max_events)) {
1402 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
1403 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
1404      _done = 1;
1405      _finish.broadcast();
1406 -    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
1407 +    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
1408      return data;
1409    }
1410  
1411 @@ -741,14 +741,14 @@
1412      has_event = 1;
1413      _num_events++;
1414      // [rather than doing the following we let supply_fn report if it wants to]
1415 -    // if (_verbose) cout << _obj_name << ": Returning an event, event count = " << _num_events << endl;
1416 +    // if (_verbose) std::cout << _obj_name << ": Returning an event, event count = " << _num_events << std::endl;
1417    } else {
1418 -    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
1419 +    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
1420    }
1421    if (!_done && _delay_millisecs) {
1422      unsigned long d_secs     =  _delay_millisecs / 1000;
1423      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
1424 -    if (_verbose) cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << endl;
1425 +    if (_verbose) std::cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << std::endl;
1426      unsigned long t_secs, t_nanosecs;
1427      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
1428      _finish.timedwait(t_secs, t_nanosecs);
1429 @@ -771,7 +771,7 @@
1430    { // introduce lock scope
1431      TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::pull");
1432  
1433 -    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull" << endl;
1434 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull" << std::endl;
1435      // invariants: _oplock is held entering top of loop and 
1436      // also whenever we break out of loop
1437      while ( 1 ) {
1438 @@ -779,9 +779,9 @@
1439        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
1440         _num_events++;
1441         // [rather than doing the following we let supply_fn report if it wants to]
1442 -       // if (_verbose) cout << _obj_name << ": Returning an event, event count = " << _num_events << endl;
1443 +       // if (_verbose) std::cout << _obj_name << ": Returning an event, event count = " << _num_events << std::endl;
1444         if (_max_events && (_num_events >= _max_events)) {
1445 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
1446 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
1447           _done = 1;
1448           _finish.broadcast();
1449         }
1450 @@ -801,7 +801,7 @@
1451      if (!_done && _delay_millisecs) {
1452        unsigned long d_secs     =  _delay_millisecs / 1000;
1453        unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
1454 -      if (_verbose) cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << endl;
1455 +      if (_verbose) std::cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << std::endl;
1456        unsigned long t_secs, t_nanosecs;
1457        TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
1458        _finish.timedwait(t_secs, t_nanosecs);
1459 @@ -816,7 +816,7 @@
1460  
1461    TW_SCOPE_LOCK(lock, _oplock, "LegacyPullSupplier", "LegacyPullSupplier_i::discconnect_pull_supplier");
1462    if (_done) return;
1463 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
1464 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
1465    _done = 1;
1466    _finish.broadcast();
1467  }
1468 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/main_program.h omniNotify-2.1.new/examples/main_program.h
1469 --- omniNotify-2.1.orig/examples/main_program.h 2004-03-19 00:39:20.000000000 +0300
1470 +++ omniNotify-2.1.new/examples/main_program.h  2009-06-28 17:24:41.000000000 +0400
1471 @@ -58,7 +58,7 @@
1472  
1473  #ifndef CREATE_CHANNEL
1474      // (2) Obtain reference to notification channel
1475 -    if (verbose) cout << "Obtaining reference to notification channel" << endl;
1476 +    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
1477      CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
1478      if (CORBA::is_nil(channel)) { // name service lookup failed
1479        channel = getchan_from_iorfile(orb, ior_file, verbose);
1480 @@ -68,7 +68,7 @@
1481      }
1482  #else
1483      // (2) Create a new notification channel
1484 -    if (verbose) cout << "Creating a new notification channel" << endl;
1485 +    if (verbose) std::cout << "Creating a new notification channel" << std::endl;
1486      CosNA::EventChannel_ptr channel = getnewchan_use_ns(orb, cfact_name, verbose);
1487      if (CORBA::is_nil(channel)) { // name service lookup failed
1488        channel = getnewchan_use_iorfile(orb, cfact_ior_file, verbose);
1489 @@ -79,7 +79,7 @@
1490  #endif
1491  
1492      // (3) Create a client
1493 -    if (verbose) cout << "Creating client" << endl;
1494 +    if (verbose) std::cout << "Creating client" << std::endl;
1495  #ifndef LEGACY_CLIENT
1496      CLIENT_IMPL_CLASS* client =
1497        CLIENT_IMPL_CLASS::create(orb, channel, num_events, batch_size, CLIENT_NAME, proxy_ior_file, admin_ior_file,
1498 @@ -94,55 +94,55 @@
1499        goto error_return; // failed to create client
1500      }
1501      // Obtain reference to the external client object
1502 -    if (verbose) cout << "Obtaining CORBA object ref to client" << endl;
1503 +    if (verbose) std::cout << "Obtaining CORBA object ref to client" << std::endl;
1504      CLIENT_CLASS_VAR myref = client->_this(); // implicit activation
1505      client->_remove_ref(); // enables POA cleanup of servant
1506  
1507      // (4) Tell POA we are ready to go
1508 -    if (verbose) cout << "Activating POA manager" << endl;
1509 +    if (verbose) std::cout << "Activating POA manager" << std::endl;
1510      PortableServer::POAManager_var pman = poa->the_POAManager();
1511      pman->activate();
1512  
1513      // (5) Connect client to its proxy, wait for desired # of events
1514 -    if (verbose) cout << "Connecting client to its proxy" << endl;
1515 +    if (verbose) std::cout << "Connecting client to its proxy" << std::endl;
1516      if (client->connect()) {
1517        // an immediate error occurred
1518      } else {
1519 -      if (verbose) cout << "Waiting for desired # of events" << endl;
1520 +      if (verbose) std::cout << "Waiting for desired # of events" << std::endl;
1521        // Wait until num_events has been reached
1522        CORBA::Boolean communication_error = client->wait_done();
1523        if (communication_error && (num_events > 0)) {
1524 -       if (verbose) cout << "Communication error -- probably did not process desired # of events" << endl;
1525 +       if (verbose) std::cout << "Communication error -- probably did not process desired # of events" << std::endl;
1526        }
1527 -      if (verbose) cout << "Cleaning up" << endl;
1528 +      if (verbose) std::cout << "Cleaning up" << std::endl;
1529        client->cleanup();
1530      }
1531      goto normal_return;
1532    }
1533    catch(CORBA::SystemException&) {
1534 -    cerr << "main caught CORBA::SystemException." << endl;
1535 +    std::cerr << "main caught CORBA::SystemException." << std::endl;
1536    }
1537    catch(CORBA::Exception&) {
1538 -    cerr << "main caught CORBA::Exception." << endl;
1539 +    std::cerr << "main caught CORBA::Exception." << std::endl;
1540    }
1541  #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
1542    catch(omniORB::fatalException& fe) {
1543 -    cerr << "main caught omniORB::fatalException:" << endl;
1544 -    cerr << "  file: " << fe.file() << endl;
1545 -    cerr << "  line: " << fe.line() << endl;
1546 -    cerr << "  mesg: " << fe.errmsg() << endl;
1547 +    std::cerr << "main caught omniORB::fatalException:" << std::endl;
1548 +    std::cerr << "  file: " << fe.file() << std::endl;
1549 +    std::cerr << "  line: " << fe.line() << std::endl;
1550 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;
1551    }
1552  #endif
1553    catch(...) {
1554      // nameclt comment says it is a bad idea to report an error here 
1555    }
1556 -  cerr << "main caught an exception." << endl;
1557 +  std::cerr << "main caught an exception." << std::endl;
1558   error_return:
1559  #ifdef CREATE_CHANNEL
1560  #ifdef DESTROY_CHANNEL
1561    try {
1562      if (!CORBA::is_nil(channel)) {
1563 -      if (verbose) cout << "Destroying the channel we created" << endl;
1564 +      if (verbose) std::cout << "Destroying the channel we created" << std::endl;
1565        channel->destroy();
1566      }
1567    } catch(...) { }
1568 @@ -155,7 +155,7 @@
1569  #ifdef DESTROY_CHANNEL
1570    try {
1571      if (!CORBA::is_nil(channel)) {
1572 -      if (verbose) cout << "Destroying the channel we created" << endl;
1573 +      if (verbose) std::cout << "Destroying the channel we created" << std::endl;
1574        channel->destroy();
1575      }
1576    } catch(...) { }
1577 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/ndadmin.cc omniNotify-2.1.new/examples/ndadmin.cc
1578 --- omniNotify-2.1.orig/examples/ndadmin.cc     2003-10-12 22:51:18.000000000 +0400
1579 +++ omniNotify-2.1.new/examples/ndadmin.cc      2009-06-28 17:09:16.000000000 +0400
1580 @@ -6,7 +6,7 @@
1581  #error COS_USES_BOA should not be set for this example
1582  #endif
1583  
1584 -#include <iostream.h>
1585 +#include <iostream>
1586  
1587  #include "orb_init_name.h"
1588  #include "get_channel.h"
1589 @@ -23,15 +23,15 @@
1590  
1591  static void usage(const char* pname)
1592  {
1593 -  cout << "Usage: " << pname << " [-n name] [-f file] [-v]" << endl;
1594 -  cout << "  -n name  : channel name" << endl;
1595 -  cout << "               => use event service to lookup this name" << endl;
1596 -  cout << "  -f file  : file containing channel IOR" << endl;
1597 -  cout << "               => use string_to_object on the IOR" << endl;
1598 -  cout << "  -v       : verbose output" << endl;
1599 -  cout << "NOTE: The server has a default channel; " << pname << " finds this channel" << endl;
1600 -  cout << "      and then goes 'UP' to find the notifd server" << endl;
1601 -  cout << endl;
1602 +  std::cout << "Usage: " << pname << " [-n name] [-f file] [-v]" << std::endl;
1603 +  std::cout << "  -n name  : channel name" << std::endl;
1604 +  std::cout << "               => use event service to lookup this name" << std::endl;
1605 +  std::cout << "  -f file  : file containing channel IOR" << std::endl;
1606 +  std::cout << "               => use string_to_object on the IOR" << std::endl;
1607 +  std::cout << "  -v       : verbose output" << std::endl;
1608 +  std::cout << "NOTE: The server has a default channel; " << pname << " finds this channel" << std::endl;
1609 +  std::cout << "      and then goes 'UP' to find the notifd server" << std::endl;
1610 +  std::cout << std::endl;
1611  }
1612  
1613  int main(int argc, char** argv) {
1614 @@ -78,12 +78,12 @@
1615      }
1616  
1617      // (2) Obtain reference to notification channel
1618 -    if (verbose) cout << "Obtaining reference to notification channel" << endl;
1619 +    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
1620      channel = getchan_from_ns(orb, channel_name, verbose);
1621      if (CORBA::is_nil(channel)) { // name service lookup failed
1622        channel = getchan_from_iorfile(orb, ior_file, verbose);
1623        if (CORBA::is_nil(channel)) {
1624 -       if (verbose) cout << "Could not find server's default channel" << endl;
1625 +       if (verbose) std::cout << "Could not find server's default channel" << std::endl;
1626         goto err_return; // both methods failed
1627        }
1628      }
1629 @@ -97,7 +97,7 @@
1630      catch ( CORBA::OBJECT_NOT_EXIST& e ) { docmd_problem = 1; } \
1631      catch ( CORBA::COMM_FAILURE& e ) { docmd_problem = 1; }
1632      if (!success || !target_changed || docmd_problem) {
1633 -      if (verbose) cout << "Could not find server's default channel" << endl;
1634 +      if (verbose) std::cout << "Could not find server's default channel" << std::endl;
1635        goto err_return;
1636      }
1637      target = next_target;
1638 @@ -108,7 +108,7 @@
1639      catch ( CORBA::OBJECT_NOT_EXIST& e ) { docmd_problem = 1; } \
1640      catch ( CORBA::COMM_FAILURE& e ) { docmd_problem = 1; }
1641      if (!success || !target_changed || docmd_problem) {
1642 -      if (verbose) cout << "Could not find server's default channel" << endl;
1643 +      if (verbose) std::cout << "Could not find server's default channel" << std::endl;
1644        goto err_return;
1645      }
1646      target = AttN::Interactive::_duplicate(next_target);
1647 @@ -119,23 +119,23 @@
1648      goto norm_return;
1649    }
1650    catch(CORBA::SystemException&) {                     
1651 -    cerr << pname << " main caught CORBA::SystemException." << endl;  
1652 +    std::cerr << pname << " main caught CORBA::SystemException." << std::endl;  
1653    }                                                    
1654    catch(CORBA::Exception&) {                           
1655 -    cerr << pname << " main caught CORBA::Exception." << endl;        
1656 +    std::cerr << pname << " main caught CORBA::Exception." << std::endl;        
1657    }                                                    
1658    catch(omniORB::fatalException& fe) {                 
1659 -    cerr << "main caught omniORB::fatalException:" << endl; 
1660 -    cerr << "  file: " << fe.file() << endl;           
1661 -    cerr << "  line: " << fe.line() << endl;           
1662 -    cerr << "  mesg: " << fe.errmsg() << endl;         
1663 +    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
1664 +    std::cerr << "  file: " << fe.file() << std::endl;           
1665 +    std::cerr << "  line: " << fe.line() << std::endl;           
1666 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
1667    }                                                    
1668    catch(...) {                                         
1669      // nameclt comment says it is a bad idea to report an error here 
1670    }
1671 -  cerr << "main caught an exception." << endl;
1672 +  std::cerr << "main caught an exception." << std::endl;
1673   err_return:
1674 -  cerr << "QUITTING due to error" << endl;
1675 +  std::cerr << "QUITTING due to error" << std::endl;
1676    return -1;
1677   norm_return:
1678    return 0;
1679 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/parse_cmd_line.h omniNotify-2.1.new/examples/parse_cmd_line.h
1680 --- omniNotify-2.1.orig/examples/parse_cmd_line.h       2003-10-23 08:39:11.000000000 +0400
1681 +++ omniNotify-2.1.new/examples/parse_cmd_line.h        2009-06-28 17:13:49.000000000 +0400
1682 @@ -4,7 +4,7 @@
1683  #define _PARSE_CMD_LINE_H
1684  
1685  #include <stdlib.h>
1686 -#include <iostream.h>
1687 +#include <iostream>
1688  
1689  #include "CosNotifyShorthands.h"
1690  
1691 @@ -18,47 +18,47 @@
1692  
1693  static void usage(const char* pname, CORBA::Boolean supports_filters)
1694  {
1695 -  cout << "Usage: " << pname << " [-d #] [-b #] [-m #] [-M #] [-n name] [-f file] [-N name] [-F file] [-p file] [-a file] [-v]";
1696 +  std::cout << "Usage: " << pname << " [-d #] [-b #] [-m #] [-M #] [-n name] [-f file] [-N name] [-F file] [-p file] [-a file] [-v]";
1697    if (supports_filters) {
1698 -    cout << " [-t types] [-e expr]" << endl;
1699 +    std::cout << " [-t types] [-e expr]" << std::endl;
1700    } else {
1701 -    cout << endl;
1702 +    std::cout << std::endl;
1703    }
1704 -  cout << "  -d #     : disconnect after # events [default 0 means never disconnect]" << endl;
1705 -  cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << endl;
1706 -  cout << "               => must be >= 1" << endl;
1707 -  cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << endl;
1708 -  cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << endl;
1709 -  cout << "             (-M only applies to push consumers and pull suppliers)" << endl;
1710 -  cout << "  -n name  : channel name" << endl;
1711 -  cout << "               => use event service to lookup this name" << endl;
1712 -  cout << "  -f file  : file containing channel IOR" << endl;
1713 -  cout << "               => use string_to_object on the IOR" << endl;
1714 -  cout << "  -N name  : factory name" << endl;
1715 -  cout << "               => use event service to lookup this name" << endl;
1716 -  cout << "  -F file  : file containing channel factory IOR" << endl;
1717 -  cout << "               => use string_to_object on the IOR" << endl;
1718 -  cout << "  -p file  : file to store IOR of the proxy used by this client" << endl;
1719 -  cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << endl;
1720 -  cout << "  -a file  : file to store IOR of the admin used by this client" << endl;
1721 -  cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << endl;
1722 -  cout << "  -v       : verbose output" << endl;
1723 -  cout << endl;
1724 +  std::cout << "  -d #     : disconnect after # events [default 0 means never disconnect]" << std::endl;
1725 +  std::cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << std::endl;
1726 +  std::cout << "               => must be >= 1" << std::endl;
1727 +  std::cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << std::endl;
1728 +  std::cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << std::endl;
1729 +  std::cout << "             (-M only applies to push consumers and pull suppliers)" << std::endl;
1730 +  std::cout << "  -n name  : channel name" << std::endl;
1731 +  std::cout << "               => use event service to lookup this name" << std::endl;
1732 +  std::cout << "  -f file  : file containing channel IOR" << std::endl;
1733 +  std::cout << "               => use string_to_object on the IOR" << std::endl;
1734 +  std::cout << "  -N name  : factory name" << std::endl;
1735 +  std::cout << "               => use event service to lookup this name" << std::endl;
1736 +  std::cout << "  -F file  : file containing channel factory IOR" << std::endl;
1737 +  std::cout << "               => use string_to_object on the IOR" << std::endl;
1738 +  std::cout << "  -p file  : file to store IOR of the proxy used by this client" << std::endl;
1739 +  std::cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << std::endl;
1740 +  std::cout << "  -a file  : file to store IOR of the admin used by this client" << std::endl;
1741 +  std::cout << "                (used by demo_add_filter, demo_offer_change, or demo_subscription_chang)" << std::endl;
1742 +  std::cout << "  -v       : verbose output" << std::endl;
1743 +  std::cout << std::endl;
1744    if (supports_filters) {
1745 -    cout << "Options for adding a filter:" << endl;
1746 -    cout << "  -t types : add a filter for the specified types, which should be a" << endl;
1747 -    cout << "               comma-separated list of types of the form D::T" << endl;
1748 -    cout << "  -e expr  : add a filter with the specified boolean expression" << endl;
1749 -    cout << endl;
1750 -    cout << "If only -t specified, the expression \"true\" is used for the filter" << endl;
1751 -    cout << "If only -e specified, the event type \"*::*\" is used for the filter" << endl;
1752 -    cout << endl;
1753 -  }
1754 -  cout << "If both -n and -f are specified, the -n option is tried first" << endl;
1755 -  cout << endl;
1756 -  cout << "If neither -n or -f is specified, program first tries name service" << endl;
1757 -  cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << endl;
1758 -  cout << endl;
1759 +    std::cout << "Options for adding a filter:" << std::endl;
1760 +    std::cout << "  -t types : add a filter for the specified types, which should be a" << std::endl;
1761 +    std::cout << "               comma-separated list of types of the form D::T" << std::endl;
1762 +    std::cout << "  -e expr  : add a filter with the specified boolean expression" << std::endl;
1763 +    std::cout << std::endl;
1764 +    std::cout << "If only -t specified, the expression \"true\" is used for the filter" << std::endl;
1765 +    std::cout << "If only -e specified, the event type \"*::*\" is used for the filter" << std::endl;
1766 +    std::cout << std::endl;
1767 +  }
1768 +  std::cout << "If both -n and -f are specified, the -n option is tried first" << std::endl;
1769 +  std::cout << std::endl;
1770 +  std::cout << "If neither -n or -f is specified, program first tries name service" << std::endl;
1771 +  std::cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << std::endl;
1772 +  std::cout << std::endl;
1773  }
1774  
1775  // return 0 if etype_list is a valid comma-separated event type list
1776 @@ -201,12 +201,12 @@
1777      cfact_ior_file = (char*)"/tmp/rdifact.ior";
1778    }
1779    if ( (!supports_filters) && ( strlen(etype_list) || strlen(constraint_expr) ) ) {
1780 -    cout << "Filter options not supported for this client" << endl;
1781 +    std::cout << "Filter options not supported for this client" << std::endl;
1782      usage(pname, supports_filters);
1783      return 1; // error
1784    }
1785    if (strlen(etype_list) && parse_etype_list(etype_list, evs)) {
1786 -    cout << "Event type list for -t option must be comma-separated list of D::T" << endl << endl; 
1787 +    std::cout << "Event type list for -t option must be comma-separated list of D::T" << std::endl << std::endl; 
1788      usage(pname, supports_filters);
1789      return 1;
1790    }
1791 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/sample_clients.cc omniNotify-2.1.new/examples/sample_clients.cc
1792 --- omniNotify-2.1.orig/examples/sample_clients.cc      2003-10-23 08:39:11.000000000 +0400
1793 +++ omniNotify-2.1.new/examples/sample_clients.cc       2009-06-28 17:17:16.000000000 +0400
1794 @@ -7,9 +7,9 @@
1795  #include <stdio.h>
1796  #include <stdlib.h>
1797  #include <string.h>
1798 -#include <fstream.h>
1799 -#include <iostream.h>
1800 -#include <iomanip.h>
1801 +#include <fstream>
1802 +#include <iostream>
1803 +#include <iomanip>
1804  
1805  #ifdef HAVE_UNISTD_H
1806  #  include <unistd.h>
1807 @@ -70,7 +70,7 @@
1808  
1809  // This helper routine informs channel that type ANY will be supplied
1810  void offer_any(CosNC::NotifyPublish_ptr proxy, const char* objnm, CORBA::Boolean verbose) {
1811 -  if (verbose) cout << objnm << ": offering type %ANY" << endl;
1812 +  if (verbose) std::cout << objnm << ": offering type %ANY" << std::endl;
1813    CosN::EventTypeSeq added, deled;
1814    added.length(1);
1815    added[0].domain_name = CORBA::string_dup("");
1816 @@ -79,13 +79,13 @@
1817    try {
1818      proxy->offer_change(added, deled);
1819    } catch (...) {
1820 -    if (verbose) cout << "** registration failed **" << endl;
1821 +    if (verbose) std::cout << "** registration failed **" << std::endl;
1822    }
1823  }
1824  
1825  // This helper routine informs channel that types Stock::Ticker and Bond::Ticker will be supplied
1826  void offer_ticker(CosNC::NotifyPublish_ptr proxy, const char* objnm, CORBA::Boolean verbose) {
1827 -  if (verbose) cout << objnm << ": offering types Stock::Ticker and Bond::Ticker" << endl;
1828 +  if (verbose) std::cout << objnm << ": offering types Stock::Ticker and Bond::Ticker" << std::endl;
1829    CosN::EventTypeSeq added, deled;
1830    added.length(2);
1831    added[0].domain_name = CORBA::string_dup("Stock");
1832 @@ -96,7 +96,7 @@
1833    try {
1834      proxy->offer_change(added, deled);
1835    } catch (...) {
1836 -    if (verbose) cout << "** registration failed **" << endl;
1837 +    if (verbose) std::cout << "** registration failed **" << std::endl;
1838    }
1839  }
1840  
1841 @@ -104,19 +104,19 @@
1842  void write_ior_to_file(CORBA::ORB_ptr orb, CORBA::Object_ptr o,
1843                        const char* filenm, CORBA::Boolean verbose) {
1844    if (strlen(filenm) == 0) {
1845 -    if (verbose) cout << "ior filename empty -- skipping" << endl;
1846 +    if (verbose) std::cout << "ior filename empty -- skipping" << std::endl;
1847      return;
1848    }
1849 -  ofstream file(filenm, ios::out);
1850 +  std::ofstream file(filenm, std::ios::out);
1851    if ( ! file ) {
1852 -    if (verbose) cerr << "Failed to open IOR file: " << filenm << endl;
1853 +    if (verbose) std::cerr << "Failed to open IOR file: " << filenm << std::endl;
1854      return;
1855    }
1856    char* ior_name = orb->object_to_string(o);
1857    file << ior_name;
1858    file.close();
1859    delete [] ior_name;
1860 -  if (verbose) cout << "wrote IOR to file: " << filenm << endl;
1861 +  if (verbose) std::cout << "wrote IOR to file: " << filenm << std::endl;
1862  }
1863  
1864  // These 2 helper routines are used to obtain one of the
1865 @@ -138,14 +138,14 @@
1866    try {
1867      admin = channel->new_for_suppliers(ifoper, admID);
1868      if ( CORBA::is_nil(admin) ) {
1869 -      cerr << "Failed to obtain admin" << endl;
1870 +      std::cerr << "Failed to obtain admin" << std::endl;
1871        return generic_proxy; // failure
1872      }
1873    } catch (...) {
1874 -    cerr << "Failed to obtain admin" << endl;
1875 +    std::cerr << "Failed to obtain admin" << std::endl;
1876      return generic_proxy;  // failure
1877    }
1878 -  if (verbose) cout << "Obtained admin from the channel" << endl;
1879 +  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
1880  
1881    CosNA::ProxyID prxID;
1882    try {
1883 @@ -156,14 +156,14 @@
1884      }
1885    } catch (...) {  }
1886    if (CORBA::is_nil(generic_proxy)) {
1887 -    cerr << "Failed to obtain proxy" << endl;
1888 +    std::cerr << "Failed to obtain proxy" << std::endl;
1889      try {
1890        admin->destroy();
1891      } catch (...) { }
1892      admin = CosNA::SupplierAdmin::_nil();
1893      return generic_proxy;
1894    }
1895 -  if (verbose) cout << "Obtained proxy from admin" << endl;
1896 +  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
1897    write_ior_to_file(orb, admin, admin_ior_file, verbose);
1898    return generic_proxy; // success if generic_proxy is non-nil, otherwise failure
1899  }
1900 @@ -183,14 +183,14 @@
1901    try {
1902      admin = channel->new_for_consumers(ifoper, admID);
1903      if ( CORBA::is_nil(admin) ) {
1904 -      cerr << "Failed to obtain admin" << endl;
1905 +      std::cerr << "Failed to obtain admin" << std::endl;
1906        return generic_proxy; // failure
1907      }
1908    } catch (...) {
1909 -    cerr << "Failed to obtain admin" << endl;
1910 +    std::cerr << "Failed to obtain admin" << std::endl;
1911      return generic_proxy;  // failure
1912    }
1913 -  if (verbose) cout << "Obtained admin from the channel" << endl;
1914 +  if (verbose) std::cout << "Obtained admin from the channel" << std::endl;
1915  
1916    CosNA::ProxyID prxID;
1917    try {
1918 @@ -201,14 +201,14 @@
1919      }
1920    } catch (...) {  }
1921    if (CORBA::is_nil(generic_proxy)) {
1922 -    cerr << "Failed to obtain proxy" << endl;
1923 +    std::cerr << "Failed to obtain proxy" << std::endl;
1924      try {
1925        admin->destroy();
1926      } catch (...) { }
1927      admin = CosNA::ConsumerAdmin::_nil();
1928      return generic_proxy;
1929    }
1930 -  if (verbose) cout << "Obtained proxy from admin" << endl;
1931 +  if (verbose) std::cout << "Obtained proxy from admin" << std::endl;
1932    write_ior_to_file(orb, admin, admin_ior_file, verbose);
1933    return generic_proxy; // success if generic_proxy is non-nil, otherwise failure
1934  }
1935 @@ -226,24 +226,24 @@
1936                   CORBA::Boolean verbose) {
1937    // if evs and constraint expr are empty, we ignore them + do not add a filter
1938    if ( (evs.length() == 0) && (strlen(constraint_expr) == 0) ) {
1939 -    if (verbose) cout << obj_name << ": (no filter used)" << endl;
1940 +    if (verbose) std::cout << obj_name << ": (no filter used)" << std::endl;
1941      return 0; // OK
1942    }
1943    // Obtain a reference to the default filter factory; create a filter object 
1944    CosNF::FilterFactory_ptr ffp;
1945    filter = CosNF::Filter::_nil();
1946    try {
1947 -    if (verbose) cout << obj_name << ": Obtaining default filter factory" << endl;
1948 +    if (verbose) std::cout << obj_name << ": Obtaining default filter factory" << std::endl;
1949      ffp    = channel->default_filter_factory();  
1950      filter = ffp->create_filter("EXTENDED_TCL");
1951    } catch (CORBA::COMM_FAILURE& ex) {
1952 -    cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << endl;
1953 +    std::cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << std::endl;
1954      return 1; // error
1955    } catch (...) {
1956 -    cerr << obj_name << ": Caught exception obtaining filter object" << endl;
1957 +    std::cerr << obj_name << ": Caught exception obtaining filter object" << std::endl;
1958      return 1; // error
1959    }
1960 -  if (verbose) cout << obj_name << ": Obtained filter from default filter factory" << endl;
1961 +  if (verbose) std::cout << obj_name << ": Obtained filter from default filter factory" << std::endl;
1962  
1963    // Construct a simple constraint expression; add it to fadmin
1964    CosNF::ConstraintExpSeq   exp;
1965 @@ -252,32 +252,32 @@
1966    exp[0].constraint_expr = CORBA::string_dup(constraint_expr);
1967    CORBA::Boolean res = 0; // OK
1968    try {
1969 -    if (verbose) cout << obj_name << ": Adding constraints to filter" << endl;
1970 +    if (verbose) std::cout << obj_name << ": Adding constraints to filter" << std::endl;
1971      filter->add_constraints(exp);
1972 -    if (verbose) cout << obj_name << ": Adding filter to target" << endl;
1973 +    if (verbose) std::cout << obj_name << ": Adding filter to target" << std::endl;
1974      fadmin->add_filter(filter);
1975      if (verbose) {
1976        if (evs.length()) {
1977 -       cout << obj_name << ": Added filter for types ";
1978 +       std::cout << obj_name << ": Added filter for types ";
1979         for (unsigned int j = 0; j < evs.length(); j++) { 
1980 -         cout << (const char*)evs[j].domain_name << "::" << (const char*)evs[j].type_name;
1981 +         std::cout << (const char*)evs[j].domain_name << "::" << (const char*)evs[j].type_name;
1982           if ((j+1) < evs.length())
1983 -           cout << ", ";
1984 +           std::cout << ", ";
1985         }
1986        } else {
1987 -       cout << obj_name << ": Added filter for type *::* ";
1988 +       std::cout << obj_name << ": Added filter for type *::* ";
1989        }
1990 -      cout << " and constraint expression \"" << constraint_expr << "\" " << endl;
1991 +      std::cout << " and constraint expression \"" << constraint_expr << "\" " << std::endl;
1992      }
1993    }
1994    catch(CosNF::InvalidConstraint& _exobj1) {
1995 -    cerr << obj_name << ": Exception thrown : Invalid constraint given "
1996 -        << (const char *)constraint_expr << endl;
1997 +    std::cerr << obj_name << ": Exception thrown : Invalid constraint given "
1998 +        << (const char *)constraint_expr << std::endl;
1999      res = 1; // error
2000    }
2001    catch (...) {
2002 -    cerr << obj_name << ": Exception thrown while adding constraint " 
2003 -        << (const char *)constraint_expr << endl; 
2004 +    std::cerr << obj_name << ": Exception thrown while adding constraint " 
2005 +        << (const char *)constraint_expr << std::endl; 
2006      res = 1; // error
2007    }
2008    if (res == 1) { // error so destroy filter
2009 @@ -306,17 +306,17 @@
2010    CosNF::FilterFactory_ptr ffp;
2011    filter = CosNF::Filter::_nil();
2012    try {
2013 -    if (verbose) cout << obj_name << ": Obtaining default filter factory" << endl;
2014 +    if (verbose) std::cout << obj_name << ": Obtaining default filter factory" << std::endl;
2015      ffp    = channel->default_filter_factory();  
2016      filter = ffp->create_filter("EXTENDED_TCL");
2017    } catch (CORBA::COMM_FAILURE& ex) {
2018 -    cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << endl;
2019 +    std::cerr << obj_name << ": Caught COMM_FAILURE obtaining filter object" << std::endl;
2020      return 1; // error
2021    } catch (...) {
2022 -    cerr << obj_name << ": Caught exception obtaining filter object" << endl;
2023 +    std::cerr << obj_name << ": Caught exception obtaining filter object" << std::endl;
2024      return 1; // error
2025    }
2026 -  if (verbose) cout << obj_name << ": Obtained filter from default filter factory" << endl;
2027 +  if (verbose) std::cout << obj_name << ": Obtained filter from default filter factory" << std::endl;
2028  
2029    // Construct a simple constraint expression; add it to fadmin
2030    CosNF::ConstraintExpSeq   exp;
2031 @@ -327,29 +327,29 @@
2032    exp[0].constraint_expr = CORBA::string_dup("true");
2033    CORBA::Boolean res = 0; // OK
2034    try {
2035 -    if (verbose) cout << obj_name << ": Adding initial dummy constraint to filter" << endl;
2036 +    if (verbose) std::cout << obj_name << ": Adding initial dummy constraint to filter" << std::endl;
2037      if (verbose) {
2038 -      cout << obj_name << ": Adding constraint with dummy type Type_XXX and constraint \"true\" to filter" << endl;
2039 +      std::cout << obj_name << ": Adding constraint with dummy type Type_XXX and constraint \"true\" to filter" << std::endl;
2040      }
2041      filter->add_constraints(exp);
2042 -    if (verbose) cout << obj_name << ": Adding filter to target" << endl;
2043 +    if (verbose) std::cout << obj_name << ": Adding filter to target" << std::endl;
2044      fadmin->add_filter(filter);
2045      for (int i = 0; i < 512; i++) {
2046        char buf[1024];
2047        sprintf(buf, "Type_%03d", i);
2048        exp[0].event_types[0].type_name = CORBA::string_dup(buf);
2049        if (verbose) {
2050 -       cout << obj_name << ": Adding constraint with type " << buf << " and constraint \"true\" to filter" << endl;
2051 +       std::cout << obj_name << ": Adding constraint with type " << buf << " and constraint \"true\" to filter" << std::endl;
2052        }
2053        filter->add_constraints(exp);
2054      }
2055    }
2056    catch(CosNF::InvalidConstraint& _exobj1) {
2057 -    cerr << obj_name << ": Exception thrown : Invalid constraint given" << endl;
2058 +    std::cerr << obj_name << ": Exception thrown : Invalid constraint given" << std::endl;
2059      res = 1; // error
2060    }
2061    catch (...) {
2062 -    cerr << obj_name << ": Exception thrown while adding constraint/filter" << endl; 
2063 +    std::cerr << obj_name << ": Exception thrown while adding constraint/filter" << std::endl; 
2064      res = 1; // error
2065    }
2066  
2067 @@ -445,16 +445,16 @@
2068        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2069      }
2070    } catch (CORBA::BAD_PARAM& ex) {
2071 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2072 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2073      return 1; // error
2074    } catch (CosEvCA::AlreadyConnected& ex) {
2075 -    cerr << _obj_name << ": Already connected" << endl;
2076 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2077      return 1; // error
2078    } catch (...) {
2079 -    cerr << _obj_name << ": Failed to connect" << endl;
2080 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2081      return 1; // error
2082    }
2083 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl;
2084 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl;
2085    // if _millisecs is set, spawn a thread to ping the proxy
2086    if (_millisecs)
2087      _worker = new GenericBoundWorkerThread(this);
2088 @@ -466,11 +466,11 @@
2089    { // introduce lock scope
2090      TW_SCOPE_LOCK(lock, _oplock, "PushConsumer", "PushConsumer_i::cleanup");
2091      if (_worker || (!_done)) {
2092 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2093 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2094        return;
2095      }
2096      if (CORBA::is_nil(_my_proxy)) {
2097 -      cerr << "Coding error: cleanup already called?" << endl;
2098 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2099        return;
2100      }
2101      // this method takes sole ownership of _my_proxy
2102 @@ -496,7 +496,7 @@
2103  
2104    { // introduce lock scope
2105      TW_SCOPE_LOCK(lock, _oplock, "PushConsumer", "PushConsumer_i::start_working");
2106 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
2107 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
2108      while ( 1 ) {
2109        if (_done || (_millisecs == 0)) break;
2110        unsigned long t_secs = 0, t_nanosecs = 0;
2111 @@ -518,7 +518,7 @@
2112        continue; // continue ping loop
2113      com_fail:
2114        if (_done) break;
2115 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
2116 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
2117        _done = 1;
2118        _finish.broadcast();
2119        _com_err = 1;
2120 @@ -538,16 +538,16 @@
2121    _num_events++;
2122    if (_consume_fn)
2123      (*_consume_fn)(data, _obj_name, _num_events, _verbose);
2124 -  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
2125 +  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
2126    if (_max_events && (_num_events >= _max_events)) {
2127 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2128 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2129      _done = 1;
2130      _finish.broadcast();
2131    }
2132    if (!_done && _delay_millisecs) {
2133      unsigned long d_secs     =  _delay_millisecs / 1000;
2134      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2135 -    if (_verbose) cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << endl;
2136 +    if (_verbose) std::cout << _obj_name << ": delaying push response for " << _delay_millisecs << " millisecs" << std::endl;
2137      unsigned long t_secs, t_nanosecs;
2138      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2139      _finish.timedwait(t_secs, t_nanosecs);
2140 @@ -560,7 +560,7 @@
2141  
2142    TW_SCOPE_LOCK(lock, _oplock, "PushConsumer", "PushConsumer_i::disconnect_push_consumer");
2143    if (_done) return;
2144 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2145 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2146    _done = 1;
2147    _finish.broadcast();
2148  }
2149 @@ -590,11 +590,11 @@
2150    if (_done) return;
2151    _num_changes++;
2152    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2153 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2154 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2155    if (!_done && _delay_millisecs) {
2156      unsigned long d_secs     =  _delay_millisecs / 1000;
2157      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2158 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2159 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2160      unsigned long t_secs, t_nanosecs;
2161      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2162      _finish.timedwait(t_secs, t_nanosecs);
2163 @@ -678,16 +678,16 @@
2164        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2165      }
2166    } catch (CORBA::BAD_PARAM& ex) {
2167 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2168 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2169      return 1; // error
2170    } catch (CosEvCA::AlreadyConnected& ex) {
2171 -    cerr << _obj_name << ": Already connected" << endl;
2172 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2173      return 1; // error
2174    } catch (...) {
2175 -    cerr << _obj_name << ": Failed to connect" << endl;
2176 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2177      return 1; // error
2178    }
2179 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
2180 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
2181    // if _millisecs is set, spawn a thread to ping the proxy
2182    if (_millisecs) 
2183      _worker = new GenericBoundWorkerThread(this);
2184 @@ -699,11 +699,11 @@
2185    { // introduce lock scope
2186      TW_SCOPE_LOCK(lock, _oplock, "StructuredPushConsumer", "StructuredPushConsumer_i::cleanup");
2187      if (_worker || (!_done)) {
2188 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2189 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2190        return;
2191      }
2192      if (CORBA::is_nil(_my_proxy)) {
2193 -      cerr << "Coding error: cleanup already called?" << endl;
2194 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2195        return;
2196      }
2197      // this method takes sole ownership of _my_proxy ref
2198 @@ -730,7 +730,7 @@
2199    { // introduce lock scope
2200      TW_SCOPE_LOCK(lock, _oplock, "StructuredPushConsumer", "StructuredPushConsumer_i::start_working");
2201  
2202 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
2203 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
2204      while ( 1 ) {
2205        if (_done || (_millisecs == 0)) break;
2206        unsigned long t_secs = 0, t_nanosecs = 0;
2207 @@ -752,7 +752,7 @@
2208        continue; // continue ping loop
2209      com_fail:
2210        if (_done) break;
2211 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
2212 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
2213        _done = 1;
2214        _finish.broadcast();
2215        _com_err = 1;
2216 @@ -771,16 +771,16 @@
2217    _num_events++;
2218    if (_consume_fn)
2219      (*_consume_fn)(data, _obj_name, _num_events, _verbose);
2220 -  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
2221 +  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
2222    if (_max_events && (_num_events >= _max_events)) {
2223 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2224 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2225      _done = 1;
2226      _finish.broadcast();
2227    }
2228    if (!_done && _delay_millisecs) {
2229      unsigned long d_secs     =  _delay_millisecs / 1000;
2230      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2231 -    if (_verbose) cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << endl;
2232 +    if (_verbose) std::cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
2233      unsigned long t_secs, t_nanosecs;
2234      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2235      _finish.timedwait(t_secs, t_nanosecs);
2236 @@ -793,7 +793,7 @@
2237  
2238    TW_SCOPE_LOCK(lock, _oplock, "StructuredPushConsumer", "StructuredPushConsumer_i::disconnect_structured_push_consumer");
2239    if (_done) return;
2240 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2241 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2242    _done = 1;
2243    _finish.broadcast();
2244  }
2245 @@ -823,11 +823,11 @@
2246    if (_done) return;
2247    _num_changes++;
2248    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2249 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2250 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2251    if (!_done && _delay_millisecs) {
2252      unsigned long d_secs     =  _delay_millisecs / 1000;
2253      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2254 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2255 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2256      unsigned long t_secs, t_nanosecs;
2257      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2258      _finish.timedwait(t_secs, t_nanosecs);
2259 @@ -922,16 +922,16 @@
2260        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2261      }
2262    } catch (CORBA::BAD_PARAM& ex) {
2263 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2264 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2265      return 1; // error
2266    } catch (CosEvCA::AlreadyConnected& ex) {
2267 -    cerr << _obj_name << ": Already connected" << endl;
2268 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2269      return 1; // error
2270    } catch (...) {
2271 -    cerr << _obj_name << ": Failed to connect" << endl;
2272 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2273      return 1; // error
2274    }
2275 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
2276 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
2277    // if _millisecs is set, spawn a thread to ping the proxy
2278    if (_millisecs) 
2279      _worker = new GenericBoundWorkerThread(this);
2280 @@ -943,11 +943,11 @@
2281    { // introduce lock scope
2282      TW_SCOPE_LOCK(lock, _oplock, "Structured512PushConsumer", "Structured512PushConsumer_i::cleanup");
2283      if (_worker || (!_done)) {
2284 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2285 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2286        return;
2287      }
2288      if (CORBA::is_nil(_my_proxy)) {
2289 -      cerr << "Coding error: cleanup already called?" << endl;
2290 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2291        return;
2292      }
2293      // this method takes sole ownership of _my_proxy ref
2294 @@ -974,7 +974,7 @@
2295    { // introduce lock scope
2296      TW_SCOPE_LOCK(lock, _oplock, "Structured512PushConsumer", "Structured512PushConsumer_i::start_working");
2297  
2298 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
2299 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
2300      // invariant: _oplock held at top of loop
2301      while ( 1 ) {
2302        if (_done || (_millisecs == 0)) break;
2303 @@ -997,7 +997,7 @@
2304        continue; // continue ping loop
2305      com_fail:
2306        if (_done) break;
2307 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
2308 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
2309        _done = 1;
2310        _finish.broadcast();
2311        _com_err = 1;
2312 @@ -1016,16 +1016,16 @@
2313    _num_events++;
2314    if (_consume_fn)
2315      (*_consume_fn)(data, _obj_name, _num_events, _verbose);
2316 -  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
2317 +  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
2318    if (_max_events && (_num_events >= _max_events)) {
2319 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2320 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2321      _done = 1;
2322      _finish.broadcast();
2323    }
2324    if (!_done && _delay_millisecs) {
2325      unsigned long d_secs     =  _delay_millisecs / 1000;
2326      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2327 -    if (_verbose) cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << endl;
2328 +    if (_verbose) std::cout << _obj_name << ": delaying push_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
2329      unsigned long t_secs, t_nanosecs;
2330      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2331      _finish.timedwait(t_secs, t_nanosecs);
2332 @@ -1038,7 +1038,7 @@
2333  
2334    TW_SCOPE_LOCK(lock, _oplock, "Structured512PushConsumer", "Structured512PushConsumer_i::disconnect_structured_push_consumer");
2335    if (_done) return;
2336 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2337 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2338    _done = 1;
2339    _finish.broadcast();
2340  }
2341 @@ -1068,11 +1068,11 @@
2342    if (_done) return;
2343    _num_changes++;
2344    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2345 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2346 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2347    if (!_done && _delay_millisecs) {
2348      unsigned long d_secs     =  _delay_millisecs / 1000;
2349      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2350 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2351 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2352      unsigned long t_secs, t_nanosecs;
2353      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2354      _finish.timedwait(t_secs, t_nanosecs);
2355 @@ -1155,16 +1155,16 @@
2356        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2357      }
2358    } catch (CORBA::BAD_PARAM& ex) {
2359 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2360 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2361      return 1; // error
2362    } catch (CosEvCA::AlreadyConnected& ex) {
2363 -    cerr << _obj_name << ": Already connected" << endl;
2364 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2365      return 1; // error
2366    } catch (...) {
2367 -    cerr << _obj_name << ": Failed to connect" << endl;
2368 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2369      return 1; // error
2370    }
2371 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
2372 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
2373    // if _millisecs is set, spawn a thread to ping the proxy
2374    if (_millisecs)
2375      _worker = new GenericBoundWorkerThread(this);
2376 @@ -1176,11 +1176,11 @@
2377    { // introduce lock scope
2378      TW_SCOPE_LOCK(lock, _oplock, "SequencePushConsumer", "SequencePushConsumer_i::cleanup");
2379      if (_worker || (!_done)) {
2380 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2381 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2382        return;
2383      }
2384      if (CORBA::is_nil(_my_proxy)) {
2385 -      cerr << "Coding error: cleanup already called?" << endl;
2386 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2387        return;
2388      }
2389      // this method takes sole ownership of _my_proxy ref
2390 @@ -1207,7 +1207,7 @@
2391    { // introduce lock scope
2392      TW_SCOPE_LOCK(lock, _oplock, "SequencePushConsumer", "SequencePushConsumer_i::start_working");
2393  
2394 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
2395 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
2396      // invariant: _oplock held at top of loop
2397      while ( 1 ) {
2398        if (_done || (_millisecs == 0)) break;
2399 @@ -1230,7 +1230,7 @@
2400        continue; // continue ping loop
2401      com_fail:
2402         if (_done) break;
2403 -       if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
2404 +       if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
2405         _done = 1;
2406         _finish.broadcast();
2407         _com_err = 1;
2408 @@ -1250,16 +1250,16 @@
2409    _num_events += data.length();
2410    if (_consume_fn)
2411      (*_consume_fn)(data, _obj_name, _num_events, _num_batches, _verbose);
2412 -  else if (_verbose) cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << endl;
2413 +  else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << std::endl;
2414    if (_max_events && (_num_events >= _max_events)) {
2415 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2416 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2417      _done = 1;
2418      _finish.broadcast();
2419    }
2420    if (!_done && _delay_millisecs) {
2421      unsigned long d_secs     =  _delay_millisecs / 1000;
2422      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2423 -    if (_verbose) cout << _obj_name << ": delaying push_structured_events response for " << _delay_millisecs << " millisecs" << endl;
2424 +    if (_verbose) std::cout << _obj_name << ": delaying push_structured_events response for " << _delay_millisecs << " millisecs" << std::endl;
2425      unsigned long t_secs, t_nanosecs;
2426      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2427      _finish.timedwait(t_secs, t_nanosecs);
2428 @@ -1272,7 +1272,7 @@
2429  
2430    TW_SCOPE_LOCK(lock, _oplock, "SequencePushConsumer", "SequencePushConsumer_i::disconnect_sequence_push_consumer");
2431    if (_done) return;
2432 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2433 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2434    _done = 1;
2435    _finish.broadcast();
2436  }
2437 @@ -1302,11 +1302,11 @@
2438    if (_done) return;
2439    _num_changes++;
2440    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2441 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2442 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2443    if (!_done && _delay_millisecs) {
2444      unsigned long d_secs     =  _delay_millisecs / 1000;
2445      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2446 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2447 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2448      unsigned long t_secs, t_nanosecs;
2449      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2450      _finish.timedwait(t_secs, t_nanosecs);
2451 @@ -1393,17 +1393,17 @@
2452        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2453      }
2454    } catch (CORBA::BAD_PARAM& ex) {
2455 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2456 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2457      return 1; // error
2458    } catch (CosEvCA::AlreadyConnected& ex) {
2459 -    cerr << _obj_name << ": Already connected" << endl;
2460 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2461      return 1; // error
2462    } catch (...) {
2463 -    cerr << _obj_name << ": Failed to connect" << endl;
2464 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2465      return 1; // error
2466    }
2467    // spawn a thread to do pulling
2468 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
2469 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
2470    _worker = new GenericBoundWorkerThread(this);
2471    return 0; // OK
2472  }
2473 @@ -1413,11 +1413,11 @@
2474    { // introduce lock scope
2475      TW_SCOPE_LOCK(lock, _oplock, "PullConsumer", "PullConsumer_i::cleanup");
2476      if (_worker || (!_done)) {
2477 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2478 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2479        return;
2480      }
2481      if (CORBA::is_nil(_my_proxy)) {
2482 -      cerr << "Coding error: cleanup already called?" << endl;
2483 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2484        return;
2485      }
2486      // this method takes sole ownership of _my_proxy ref
2487 @@ -1450,7 +1450,7 @@
2488    { // introduce lock scope
2489      TW_SCOPE_LOCK(lock, _oplock, "PullConsumer", "PullConsumer_i::start_working");
2490  
2491 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
2492 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
2493      while ( 1 ) {
2494        if (_done) break; // must have disconnected
2495        { // introduce temporary lock release scope; do not hold oplock across pull
2496 @@ -1463,7 +1463,7 @@
2497        } // end temporary lock release scope
2498        if (_done) break; // must have disconnected during pull
2499        if (!data) {
2500 -       if (_verbose) cout << _obj_name << ": strange failure: pull() returned nil" << endl;
2501 +       if (_verbose) std::cout << _obj_name << ": strange failure: pull() returned nil" << std::endl;
2502         _com_err = 1;
2503         break; // break from while loop -- done
2504        }
2505 @@ -1471,11 +1471,11 @@
2506        _num_events++;
2507        if (_consume_fn)
2508         (*_consume_fn)(*data, _obj_name, _num_events, _verbose);
2509 -      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
2510 +      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
2511        delete data;
2512        data = 0;
2513        if (_max_events && (_num_events >= _max_events)) {
2514 -       if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2515 +       if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2516         break; // done 
2517        }
2518        if (_millisecs) { // sleep for specified interval
2519 @@ -1490,7 +1490,7 @@
2520        continue; // continue pulling
2521      com_fail:
2522        if (_done) break;
2523 -      if (_verbose) cout << _obj_name << ": communication error while calling pull()" << endl;
2524 +      if (_verbose) std::cout << _obj_name << ": communication error while calling pull()" << std::endl;
2525        _com_err = 1;
2526        break;
2527      } // end while loop
2528 @@ -1510,7 +1510,7 @@
2529  
2530    TW_SCOPE_LOCK(lock, _oplock, "PullConsumer", "PullConsumer_i::disconnect_pull_consumer");
2531    if (_done) return;
2532 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2533 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2534    _done = 1;
2535    _finish.broadcast();
2536  }
2537 @@ -1540,11 +1540,11 @@
2538    if (_done) return;
2539    _num_changes++;
2540    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2541 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2542 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2543    if (!_done && _delay_millisecs) {
2544      unsigned long d_secs     =  _delay_millisecs / 1000;
2545      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2546 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2547 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2548      unsigned long t_secs, t_nanosecs;
2549      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2550      _finish.timedwait(t_secs, t_nanosecs);
2551 @@ -1629,17 +1629,17 @@
2552        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2553      }
2554    } catch (CORBA::BAD_PARAM& ex) {
2555 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2556 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2557      return 1; // error
2558    } catch (CosEvCA::AlreadyConnected& ex) {
2559 -    cerr << _obj_name << ": Already connected" << endl;
2560 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2561      return 1; // error
2562    } catch (...) {
2563 -    cerr << _obj_name << ": Failed to connect" << endl;
2564 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2565      return 1; // error
2566    }
2567    // spawn a thread to do pulling
2568 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
2569 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
2570    _worker = new GenericBoundWorkerThread(this);
2571    return 0; // OK
2572  }
2573 @@ -1649,11 +1649,11 @@
2574    { // introduce lock scope
2575      TW_SCOPE_LOCK(lock, _oplock, "StructuredPullConsumer", "StructuredPullConsumer_i::cleanup");
2576      if (_worker || (!_done)) {
2577 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2578 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2579        return;
2580      }
2581      if (CORBA::is_nil(_my_proxy)) {
2582 -      cerr << "Coding error: cleanup already called?" << endl;
2583 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2584        return;
2585      }
2586      // this method takes sole ownership of _my_proxy ref
2587 @@ -1686,7 +1686,7 @@
2588    { // introduce lock scope
2589      TW_SCOPE_LOCK(lock, _oplock, "StructuredPullConsumer", "StructuredPullConsumer_i::start_working");
2590  
2591 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
2592 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
2593      while ( 1 ) {
2594        if (_done) break; // must have disconnected
2595        { // introduce temporary lock release scope; do not hold oplock across pull
2596 @@ -1699,7 +1699,7 @@
2597        } // end temporary lock release scope
2598        if (_done) break; // must have disconnected during pull
2599        if (!data) {
2600 -       if (_verbose) cout << _obj_name << ": strange failure: pull_structured_event() returned nil" << endl;
2601 +       if (_verbose) std::cout << _obj_name << ": strange failure: pull_structured_event() returned nil" << std::endl;
2602         _com_err = 1;
2603         break; // break from while loop -- done
2604        }
2605 @@ -1707,11 +1707,11 @@
2606        _num_events++;
2607        if (_consume_fn)
2608         (*_consume_fn)(*data, _obj_name, _num_events, _verbose);
2609 -      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << endl;
2610 +      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << std::endl;
2611        delete data;
2612        data = 0;
2613        if (_max_events && (_num_events >= _max_events)) {
2614 -       if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2615 +       if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2616         break; // done
2617        }
2618        if (_millisecs) { // sleep for specified interval
2619 @@ -1726,7 +1726,7 @@
2620        continue; // continue pulling
2621      com_fail:
2622        if (_done) break; // must have disconnected during pull
2623 -      if (_verbose) cout << _obj_name << ": communication error while calling pull_structured_event()" << endl;
2624 +      if (_verbose) std::cout << _obj_name << ": communication error while calling pull_structured_event()" << std::endl;
2625        _com_err = 1;
2626        break; // break from while loop -- done
2627      } // end while loop
2628 @@ -1747,7 +1747,7 @@
2629  
2630    TW_SCOPE_LOCK(lock, _oplock, "StructuredPullConsumer", "StructuredPullConsumer_i::disconnect_structured_pull_consumer");
2631    if (_done) return;
2632 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2633 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2634    _done = 1;
2635    _finish.broadcast();
2636  }
2637 @@ -1777,11 +1777,11 @@
2638    if (_done) return;
2639    _num_changes++;
2640    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2641 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2642 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2643    if (!_done && _delay_millisecs) {
2644      unsigned long d_secs     =  _delay_millisecs / 1000;
2645      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2646 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2647 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2648      unsigned long t_secs, t_nanosecs;
2649      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2650      _finish.timedwait(t_secs, t_nanosecs);
2651 @@ -1865,17 +1865,17 @@
2652        _my_proxy->obtain_offered_types(CosNA::NONE_NOW_UPDATES_OFF);
2653      }
2654    } catch (CORBA::BAD_PARAM& ex) {
2655 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2656 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2657      return 1; // error
2658    } catch (CosEvCA::AlreadyConnected& ex) {
2659 -    cerr << _obj_name << ": Already connected" << endl;
2660 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2661      return 1; // error
2662    } catch (...) {
2663 -    cerr << _obj_name << ": Failed to connect" << endl;
2664 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2665      return 1; // error
2666    }
2667    // spawn a thread to do pulling
2668 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to consume events" << endl; 
2669 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to consume events" << std::endl; 
2670    _worker = new GenericBoundWorkerThread(this);
2671    return 0; // OK
2672  }
2673 @@ -1885,11 +1885,11 @@
2674    { // introduce lock scope
2675      TW_SCOPE_LOCK(lock, _oplock, "SequencePullConsumer", "SequencePullConsumer_i::connect");
2676      if (_worker || (!_done)) {
2677 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2678 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2679        return;
2680      }
2681      if (CORBA::is_nil(_my_proxy)) {
2682 -      cerr << "Coding error: cleanup already called?" << endl;
2683 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2684        return;
2685      }
2686      // this method takes sole ownership of _my_proxy ref
2687 @@ -1922,7 +1922,7 @@
2688    { // introduce lock scope
2689      TW_SCOPE_LOCK(lock, _oplock, "SequencePullConsumer", "SequencePullConsumer_i::start_working");
2690  
2691 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main pull loop" << endl;
2692 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main pull loop" << std::endl;
2693      while ( 1 ) {
2694        if (_done) break; // must have disconnected
2695        { // introduce temporary lock release scope; do not hold oplock across pull
2696 @@ -1935,7 +1935,7 @@
2697        } // end temporary lock release scope
2698        if (_done) break; // must have disconnected during pull
2699        if (!data) {
2700 -       if (_verbose) cout << _obj_name << ": strange failure: pull_structured_events() returned nil" << endl;
2701 +       if (_verbose) std::cout << _obj_name << ": strange failure: pull_structured_events() returned nil" << std::endl;
2702         _com_err = 1;
2703         break; // break from while loop -- done
2704        }
2705 @@ -1944,11 +1944,11 @@
2706        _num_events += data->length();
2707        if (_consume_fn)
2708         (*_consume_fn)(*data, _obj_name, _num_events, _num_batches, _verbose);
2709 -      else if (_verbose) cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << endl;
2710 +      else if (_verbose) std::cout << _obj_name << ": event count = " << _num_events << " batch count = " << _num_batches << std::endl;
2711        delete data;
2712        data = 0;
2713        if (_max_events && (_num_events >= _max_events)) {
2714 -       if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2715 +       if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2716         break; // done
2717        }
2718        if (_millisecs) { // sleep for specified interval
2719 @@ -1963,7 +1963,7 @@
2720        continue; // continue pulling
2721      com_fail:
2722        if (_done) break; // must have disconnected during pull
2723 -      if (_verbose) cout << _obj_name << ": communication error while calling pull_structured_events()" << endl;
2724 +      if (_verbose) std::cout << _obj_name << ": communication error while calling pull_structured_events()" << std::endl;
2725        _com_err = 1;
2726        break; // break from while loop -- done
2727      } // end while loop
2728 @@ -1983,7 +1983,7 @@
2729  
2730    TW_SCOPE_LOCK(lock, _oplock, "SequencePullConsumer", "SequencePullConsumer_i::disconnect_sequence_pull_consumer");
2731    if (_done) return;
2732 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2733 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2734    _done = 1;
2735    _finish.broadcast();
2736  }
2737 @@ -2013,11 +2013,11 @@
2738    if (_done) return;
2739    _num_changes++;
2740    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2741 -  else if (_verbose) cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << endl;
2742 +  else if (_verbose) std::cout << _obj_name << ": offer_change received [# " << _num_changes << "]" << std::endl;
2743    if (!_done && _delay_millisecs) {
2744      unsigned long d_secs     =  _delay_millisecs / 1000;
2745      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2746 -    if (_verbose) cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << endl;
2747 +    if (_verbose) std::cout << _obj_name << ": delaying offer_change response for " << _delay_millisecs << " millisecs" << std::endl;
2748      unsigned long t_secs, t_nanosecs;
2749      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2750      _finish.timedwait(t_secs, t_nanosecs);
2751 @@ -2115,19 +2115,19 @@
2752        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
2753      }
2754    } catch (CORBA::BAD_PARAM& ex) {
2755 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2756 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2757      return 1; // error
2758    } catch (CosEvCA::AlreadyConnected& ex) {
2759 -    cerr << _obj_name << ": Already connected" << endl;
2760 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2761      return 1; // error
2762    } catch (...) {
2763 -    cerr << _obj_name << ": Failed to connect" << endl;
2764 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2765      return 1; // error
2766    }
2767    // register the types to be supplied
2768    offer_any(_my_proxy, _obj_name, _verbose);
2769    // spawn a thread to do pushing
2770 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
2771 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
2772    _worker = new GenericBoundWorkerThread(this);
2773    return 0; // OK
2774  }
2775 @@ -2137,11 +2137,11 @@
2776    { // introduce lock scope
2777      TW_SCOPE_LOCK(lock, _oplock, "PushSupplier", "PushSupplier_i::cleanup");
2778      if (_worker || (!_done)) {
2779 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2780 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2781        return;
2782      }
2783      if (CORBA::is_nil(_my_proxy)) {
2784 -      cerr << "Coding error: cleanup already called?" << endl;
2785 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2786        return;
2787      }
2788      // this method takes sole ownership of _my_proxy ref
2789 @@ -2174,7 +2174,7 @@
2790    { // introduce lock scope
2791      TW_SCOPE_LOCK(lock, _oplock, "PushSupplier", "PushSupplier_i::start_working");
2792  
2793 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
2794 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
2795      while ( 1 ) {
2796        if (_done) break; // must have disconnected
2797        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
2798 @@ -2189,7 +2189,7 @@
2799         if (_done) break; // must have disconnected during push
2800         _num_events++;
2801         if (_max_events && (_num_events >= _max_events)) {
2802 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2803 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2804           break; // done
2805         }
2806        }
2807 @@ -2206,7 +2206,7 @@
2808        continue; // continue pushing
2809      com_fail:
2810        if (_done) break; // must have disconnected during push
2811 -      if (_verbose) cout << _obj_name << ": communication error while calling push()" << endl;
2812 +      if (_verbose) std::cout << _obj_name << ": communication error while calling push()" << std::endl;
2813        _com_err = 1;
2814        break; // break from while loop -- done
2815      } // end while loop
2816 @@ -2226,7 +2226,7 @@
2817  
2818    TW_SCOPE_LOCK(lock, _oplock, "PushSupplier", "PushSupplier_i::disconnect_push_supplier");
2819    if (_done) return;
2820 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2821 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2822    _done = 1;
2823    _finish.broadcast();
2824  }
2825 @@ -2256,11 +2256,11 @@
2826    if (_done) return;
2827    _num_changes++;
2828    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2829 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
2830 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
2831    if (!_done && _delay_millisecs) {
2832      unsigned long d_secs     =  _delay_millisecs / 1000;
2833      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2834 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
2835 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
2836      unsigned long t_secs, t_nanosecs;
2837      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2838      _finish.timedwait(t_secs, t_nanosecs);
2839 @@ -2345,19 +2345,19 @@
2840        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
2841      }
2842    } catch (CORBA::BAD_PARAM& ex) {
2843 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2844 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2845      return 1; // error
2846    } catch (CosEvCA::AlreadyConnected& ex) {
2847 -    cerr << _obj_name << ": Already connected" << endl;
2848 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2849      return 1; // error
2850    } catch (...) {
2851 -    cerr << _obj_name << ": Failed to connect" << endl;
2852 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2853      return 1; // error
2854    }
2855    // register the types to be supplied
2856    offer_ticker(_my_proxy, _obj_name, _verbose);
2857    // spawn a thread to do pushing
2858 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
2859 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
2860    _worker = new GenericBoundWorkerThread(this);
2861    return 0; // OK
2862  }
2863 @@ -2367,11 +2367,11 @@
2864    { // introduce lock scope
2865      TW_SCOPE_LOCK(lock, _oplock, "StructuredPushSupplier", "StructuredPushSupplier_i::connect");
2866      if (_worker || (!_done)) {
2867 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2868 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2869        return;
2870      }
2871      if (CORBA::is_nil(_my_proxy)) {
2872 -      cerr << "Coding error: cleanup already called?" << endl;
2873 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2874        return;
2875      }
2876      // this method takes sole ownership of _my_proxy ref
2877 @@ -2404,7 +2404,7 @@
2878    { // introduce lock scope
2879      TW_SCOPE_LOCK(lock, _oplock, "StructuredPushSupplier", "StructuredPushSupplier_i::start_working");
2880  
2881 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
2882 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
2883      while ( 1 ) {
2884        if (_done) break; // must have disconnected
2885        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
2886 @@ -2419,7 +2419,7 @@
2887         if (_done) break; // must have disconnected during push
2888         _num_events++;
2889         if (_max_events && (_num_events >= _max_events)) {
2890 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2891 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2892           break; // done
2893         }
2894        }
2895 @@ -2436,7 +2436,7 @@
2896        continue; // continue pushing
2897      com_fail:
2898        if (_done) break; // must have disconnected during push
2899 -      if (_verbose) cout << _obj_name << ": communication error while calling push_structured_event()" << endl;
2900 +      if (_verbose) std::cout << _obj_name << ": communication error while calling push_structured_event()" << std::endl;
2901        _com_err = 1;
2902        break; // break from while loop -- done
2903      } // end while loop
2904 @@ -2456,7 +2456,7 @@
2905  
2906    TW_SCOPE_LOCK(lock, _oplock, "StructuredPushSupplier", "StructuredPushSupplier_i::disconnect_structured_push_supplier");
2907    if (_done) return;
2908 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2909 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2910    _done = 1;
2911    _finish.broadcast();
2912  }
2913 @@ -2486,11 +2486,11 @@
2914    if (_done) return;
2915    _num_changes++;
2916    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
2917 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
2918 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
2919    if (!_done && _delay_millisecs) {
2920      unsigned long d_secs     =  _delay_millisecs / 1000;
2921      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
2922 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
2923 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
2924      unsigned long t_secs, t_nanosecs;
2925      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
2926      _finish.timedwait(t_secs, t_nanosecs);
2927 @@ -2575,17 +2575,17 @@
2928        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
2929      }
2930    } catch (CORBA::BAD_PARAM& ex) {
2931 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
2932 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
2933      return 1; // error
2934    } catch (CosEvCA::AlreadyConnected& ex) {
2935 -    cerr << _obj_name << ": Already connected" << endl;
2936 +    std::cerr << _obj_name << ": Already connected" << std::endl;
2937      return 1; // error
2938    } catch (...) {
2939 -    cerr << _obj_name << ": Failed to connect" << endl;
2940 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
2941      return 1; // error
2942    }
2943    // spawn a thread to do pushing
2944 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
2945 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
2946    _worker = new GenericBoundWorkerThread(this);
2947    return 0; // OK
2948  }
2949 @@ -2595,11 +2595,11 @@
2950    { // introduce lock scope
2951      TW_SCOPE_LOCK(lock, _oplock, "Structured512PushSupplier", "Structured512PushSupplier_i::cleanup");
2952      if (_worker || (!_done)) {
2953 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
2954 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
2955        return;
2956      }
2957      if (CORBA::is_nil(_my_proxy)) {
2958 -      cerr << "Coding error: cleanup already called?" << endl;
2959 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
2960        return;
2961      }
2962      // this method takes sole ownership of _my_proxy ref
2963 @@ -2631,7 +2631,7 @@
2964    CosN::StructuredEvent* data = new CosN::StructuredEvent;
2965    { // introduce lock scope
2966      TW_SCOPE_LOCK(lock, _oplock, "Structured512PushSupplier", "Structured512PushSupplier_i::start_working");
2967 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
2968 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
2969      while ( 1 ) {
2970        if (_done) break; // must have disconnected
2971        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
2972 @@ -2646,7 +2646,7 @@
2973         if (_done) break; // must have disconnected during push
2974         _num_events++;
2975         if (_max_events && (_num_events >= _max_events)) {
2976 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
2977 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
2978           break; // done
2979         }
2980        }
2981 @@ -2663,7 +2663,7 @@
2982        continue; // continue pushing
2983      com_fail:
2984        if (_done) break; // must have disconnected during push
2985 -      if (_verbose) cout << _obj_name << ": communication error while calling push_structured_event()" << endl;
2986 +      if (_verbose) std::cout << _obj_name << ": communication error while calling push_structured_event()" << std::endl;
2987        _com_err = 1;
2988        break; // break from while loop -- done
2989      } //end while loop
2990 @@ -2683,7 +2683,7 @@
2991  
2992    TW_SCOPE_LOCK(lock, _oplock, "Structured512PushSupplier", "Structured512PushSupplier_i::disconnect_structured_push_supplier");
2993    if (_done) return;
2994 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
2995 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
2996    _done = 1;
2997    _finish.broadcast();
2998  }
2999 @@ -2713,11 +2713,11 @@
3000    if (_done) return;
3001    _num_changes++;
3002    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
3003 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
3004 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
3005    if (!_done && _delay_millisecs) {
3006      unsigned long d_secs     =  _delay_millisecs / 1000;
3007      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3008 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
3009 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
3010      unsigned long t_secs, t_nanosecs;
3011      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3012      _finish.timedwait(t_secs, t_nanosecs);
3013 @@ -2807,19 +2807,19 @@
3014        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
3015      }
3016    } catch (CORBA::BAD_PARAM& ex) {
3017 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
3018 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
3019      return 1; // error
3020    } catch (CosEvCA::AlreadyConnected& ex) {
3021 -    cerr << _obj_name << ": Already connected" << endl;
3022 +    std::cerr << _obj_name << ": Already connected" << std::endl;
3023      return 1; // error
3024    } catch (...) {
3025 -    cerr << _obj_name << ": Failed to connect" << endl;
3026 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
3027      return 1; // error
3028    }
3029    // register the types to be supplied
3030    offer_ticker(_my_proxy, _obj_name, _verbose);
3031    // spawn a thread to do pushing
3032 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
3033 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
3034    _worker = new GenericBoundWorkerThread(this);
3035    return 0; // OK
3036  }
3037 @@ -2829,11 +2829,11 @@
3038    { // introduce lock scope
3039      TW_SCOPE_LOCK(lock, _oplock, "SequencePushSupplier", "SequencePushSupplier_i::cleanup");
3040      if (_worker || (!_done)) {
3041 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
3042 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
3043        return;
3044      }
3045      if (CORBA::is_nil(_my_proxy)) {
3046 -      cerr << "Coding error: cleanup already called?" << endl;
3047 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
3048        return;
3049      }
3050      // this method takes sole ownership of _my_proxy ref
3051 @@ -2867,7 +2867,7 @@
3052    { // introduce lock scope
3053      TW_SCOPE_LOCK(lock, _oplock, "SequencePushSupplier", "SequencePushSupplier_i::start_working");
3054  
3055 -    if (_verbose && (!_done)) cout << _obj_name << ": Spawned thread entering main push loop" << endl;
3056 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Spawned thread entering main push loop" << std::endl;
3057      while ( 1 ) {
3058        if (_done) break; // must have disconnected
3059        data->length(0);
3060 @@ -2884,7 +2884,7 @@
3061         _num_batches++;
3062         _num_events += data->length();
3063         if (_max_events && (_num_events >= _max_events)) {
3064 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
3065 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
3066           break; // done
3067         }
3068        }
3069 @@ -2901,7 +2901,7 @@
3070        continue; // continue pushing
3071      com_fail:
3072        if (_done) break; // must have disconnected during push
3073 -      if (_verbose) cout << _obj_name << ": communication error while calling push_structured_events()" << endl;
3074 +      if (_verbose) std::cout << _obj_name << ": communication error while calling push_structured_events()" << std::endl;
3075        _com_err = 1;
3076        break; // break from while loop -- done
3077      } // end while loop
3078 @@ -2921,7 +2921,7 @@
3079  
3080    TW_SCOPE_LOCK(lock, _oplock, "SequencePushSupplier", "SequencePushSupplier_i::disconnect_sequence_push_supplier");
3081    if (_done) return;
3082 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
3083 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
3084    _done = 1;
3085    _finish.broadcast();
3086  }
3087 @@ -2951,11 +2951,11 @@
3088    if (_done) return;
3089    _num_changes++;
3090    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
3091 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
3092 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
3093    if (!_done && _delay_millisecs) {
3094      unsigned long d_secs     =  _delay_millisecs / 1000;
3095      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3096 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
3097 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
3098      unsigned long t_secs, t_nanosecs;
3099      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3100      _finish.timedwait(t_secs, t_nanosecs);
3101 @@ -3053,16 +3053,16 @@
3102        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
3103      }
3104    } catch (CORBA::BAD_PARAM& ex) {
3105 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
3106 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
3107      return 1; // error
3108    } catch (CosEvCA::AlreadyConnected& ex) {
3109 -    cerr << _obj_name << ": Already connected" << endl;
3110 +    std::cerr << _obj_name << ": Already connected" << std::endl;
3111      return 1; // error
3112    } catch (...) {
3113 -    cerr << _obj_name << ": Failed to connect" << endl;
3114 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
3115      return 1; // error
3116    }
3117 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
3118 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
3119    // register the types to be supplied
3120    offer_any(_my_proxy, _obj_name, _verbose);
3121    // if _millisecs is set, spawn a thread to ping the proxy
3122 @@ -3076,11 +3076,11 @@
3123    { // introduce lock scope
3124      TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::cleanup");
3125      if (_worker || (!_done)) {
3126 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
3127 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
3128        return;
3129      }
3130      if (CORBA::is_nil(_my_proxy)) {
3131 -      cerr << "Coding error: cleanup already called?" << endl;
3132 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
3133        return;
3134      }
3135      // this method takes sole ownership of _my_proxy ref
3136 @@ -3107,7 +3107,7 @@
3137    { // introduce lock scope
3138      TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::start_working");
3139  
3140 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
3141 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
3142      while ( 1 ) {
3143        if (_done || (_millisecs == 0)) break;
3144        unsigned long t_secs = 0, t_nanosecs = 0;
3145 @@ -3129,7 +3129,7 @@
3146        continue; // continue ping loop
3147      com_fail:
3148        if (_done) break;
3149 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
3150 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
3151        _done = 1;
3152        _finish.broadcast();
3153        _com_err = 1;
3154 @@ -3148,7 +3148,7 @@
3155  
3156    TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::try_pull");
3157    if (_done) return data;
3158 -  if (_verbose) cout << _obj_name << ": Channel called try_pull" << endl;
3159 +  if (_verbose) std::cout << _obj_name << ": Channel called try_pull" << std::endl;
3160  
3161    // If we reached done point during last try_pull, it is broadcast now
3162    // and we return from this try_pull call without an event.
3163 @@ -3156,10 +3156,10 @@
3164    // processed the previous try_pull (the final supplied event) before
3165    // we disconnect this supplier.
3166    if (_max_events && (_num_events >= _max_events)) {
3167 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
3168 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
3169      _done = 1;
3170      _finish.broadcast();
3171 -    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
3172 +    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
3173      return data;
3174    }
3175  
3176 @@ -3167,12 +3167,12 @@
3177      has_event = 1;
3178      _num_events++;
3179    } else {
3180 -    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
3181 +    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
3182    }
3183    if (!_done && _delay_millisecs) {
3184      unsigned long d_secs     =  _delay_millisecs / 1000;
3185      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3186 -    if (_verbose) cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << endl;
3187 +    if (_verbose) std::cout << _obj_name << ": delaying try_pull response for " << _delay_millisecs << " millisecs" << std::endl;
3188      unsigned long t_secs, t_nanosecs;
3189      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3190      _finish.timedwait(t_secs, t_nanosecs);
3191 @@ -3194,7 +3194,7 @@
3192    { // introduce lock scope
3193      TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::pull");
3194  
3195 -    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull" << endl;
3196 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull" << std::endl;
3197      // invariants: _oplock is held entering top of loop and 
3198      // also whenever we break out of loop
3199      // (it is *not* held during yield() and timedwait() calls)
3200 @@ -3206,7 +3206,7 @@
3201        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
3202         _num_events++;
3203         if (_max_events && (_num_events >= _max_events)) {
3204 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
3205 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
3206           _done = 1;
3207           _finish.broadcast();
3208         }
3209 @@ -3227,7 +3227,7 @@
3210      if (!_done && _delay_millisecs) {
3211        unsigned long d_secs     =  _delay_millisecs / 1000;
3212        unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3213 -      if (_verbose) cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << endl;
3214 +      if (_verbose) std::cout << _obj_name << ": delaying pull response for " << _delay_millisecs << " millisecs" << std::endl;
3215        unsigned long t_secs, t_nanosecs;
3216        TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3217        _finish.timedwait(t_secs, t_nanosecs);
3218 @@ -3242,7 +3242,7 @@
3219  
3220    TW_SCOPE_LOCK(lock, _oplock, "PullSupplier", "PullSupplier_i::disconnect_pull_supplier");
3221    if (_done) return;
3222 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
3223 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
3224    _done = 1;
3225    _finish.broadcast();
3226  }
3227 @@ -3272,11 +3272,11 @@
3228    if (_done) return;
3229    _num_changes++;
3230    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
3231 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
3232 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
3233    if (!_done && _delay_millisecs) {
3234      unsigned long d_secs     =  _delay_millisecs / 1000;
3235      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3236 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
3237 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
3238      unsigned long t_secs, t_nanosecs;
3239      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3240      _finish.timedwait(t_secs, t_nanosecs);
3241 @@ -3361,16 +3361,16 @@
3242        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
3243      }
3244    } catch (CORBA::BAD_PARAM& ex) {
3245 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
3246 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
3247      return 1; // error
3248    } catch (CosEvCA::AlreadyConnected& ex) {
3249 -    cerr << _obj_name << ": Already connected" << endl;
3250 +    std::cerr << _obj_name << ": Already connected" << std::endl;
3251      return 1; // error
3252    } catch (...) {
3253 -    cerr << _obj_name << ": Failed to connect" << endl;
3254 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
3255      return 1; // error
3256    }
3257 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
3258 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
3259    // register the types to be supplied
3260    offer_ticker(_my_proxy, _obj_name, _verbose);
3261    // if _millisecs is set, spawn a thread to ping the proxy
3262 @@ -3384,11 +3384,11 @@
3263    { // introduce lock scope
3264      TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::cleanup");
3265      if (_worker || (!_done)) {
3266 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
3267 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
3268        return;
3269      }
3270      if (CORBA::is_nil(_my_proxy)) {
3271 -      cerr << "Coding error: cleanup already called?" << endl;
3272 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
3273        return;
3274      }
3275      // this method takes sole ownership of _my_proxy ref
3276 @@ -3416,7 +3416,7 @@
3277    { // introduce lock scope
3278      TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::start_working");
3279  
3280 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
3281 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
3282      while ( 1 ) {
3283        if (_done || (_millisecs == 0)) break;
3284        unsigned long t_secs = 0, t_nanosecs = 0;
3285 @@ -3438,7 +3438,7 @@
3286        continue; // continue ping loop
3287      com_fail:
3288        if (_done) break;
3289 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
3290 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
3291        _done = 1;
3292        _finish.broadcast();
3293        _com_err = 1;
3294 @@ -3457,7 +3457,7 @@
3295  
3296    TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::try_pull_structured_event");
3297    if (_done) return data;
3298 -  if (_verbose) cout << _obj_name << ": Channel called try_pull_structured_event" << endl;
3299 +  if (_verbose) std::cout << _obj_name << ": Channel called try_pull_structured_event" << std::endl;
3300  
3301    // If we reached done point during last try_pull, it is broadcast now
3302    // and we return from this try_pull call without an event.
3303 @@ -3465,10 +3465,10 @@
3304    // processed the previous try_pull (the final supplied event) before
3305    // we disconnect this supplier.
3306    if (_max_events && (_num_events >= _max_events)) {
3307 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
3308 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
3309      _done = 1;
3310      _finish.broadcast();
3311 -    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
3312 +    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
3313      return data;
3314    }
3315  
3316 @@ -3476,12 +3476,12 @@
3317      has_event = 1;
3318      _num_events++;
3319    } else {
3320 -    if (_verbose) cout << _obj_name << ": NOT returning an event" << endl;
3321 +    if (_verbose) std::cout << _obj_name << ": NOT returning an event" << std::endl;
3322    }
3323    if (!_done && _delay_millisecs) {
3324      unsigned long d_secs     =  _delay_millisecs / 1000;
3325      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3326 -    if (_verbose) cout << _obj_name << ": delaying try_pull_structured_event response for " << _delay_millisecs << " millisecs" << endl;
3327 +    if (_verbose) std::cout << _obj_name << ": delaying try_pull_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
3328      unsigned long t_secs, t_nanosecs;
3329      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3330      _finish.timedwait(t_secs, t_nanosecs);
3331 @@ -3503,7 +3503,7 @@
3332    { // introduce lock scope
3333      TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::pull_structured_event");
3334  
3335 -    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull_structured_event" << endl;
3336 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull_structured_event" << std::endl;
3337      // invariants: _oplock is held entering top of loop and 
3338      // also whenever we break out of loop
3339      // (it is *not* held during yield() and timedwait() calls)
3340 @@ -3515,7 +3515,7 @@
3341        if ((*_supply_fn)(*data, _obj_name, _num_events+1, _verbose)) {
3342         _num_events++;
3343         if (_max_events && (_num_events >= _max_events)) {
3344 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
3345 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
3346           _done = 1;
3347           _finish.broadcast();
3348         }
3349 @@ -3536,7 +3536,7 @@
3350      if (!_done && _delay_millisecs) {
3351        unsigned long d_secs     =  _delay_millisecs / 1000;
3352        unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3353 -      if (_verbose) cout << _obj_name << ": delaying pull_structured_event response for " << _delay_millisecs << " millisecs" << endl;
3354 +      if (_verbose) std::cout << _obj_name << ": delaying pull_structured_event response for " << _delay_millisecs << " millisecs" << std::endl;
3355        unsigned long t_secs, t_nanosecs;
3356        TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3357        _finish.timedwait(t_secs, t_nanosecs);
3358 @@ -3551,7 +3551,7 @@
3359  
3360    TW_SCOPE_LOCK(lock, _oplock, "StructuredPullSupplier", "StructuredPullSupplier_i::disconnect_structured_pull_supplier");
3361    if (_done) return;
3362 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
3363 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
3364    _done = 1;
3365    _finish.broadcast();
3366  }
3367 @@ -3581,11 +3581,11 @@
3368    if (_done) return;
3369    _num_changes++;
3370    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
3371 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
3372 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
3373    if (!_done && _delay_millisecs) {
3374      unsigned long d_secs     =  _delay_millisecs / 1000;
3375      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3376 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
3377 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
3378      unsigned long t_secs, t_nanosecs;
3379      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3380      _finish.timedwait(t_secs, t_nanosecs);
3381 @@ -3675,16 +3675,16 @@
3382        _my_proxy->obtain_subscription_types(CosNA::NONE_NOW_UPDATES_OFF);
3383      }
3384    } catch (CORBA::BAD_PARAM& ex) {
3385 -    cerr << _obj_name << ": BAD_PARAM Exception while connecting" << endl;
3386 +    std::cerr << _obj_name << ": BAD_PARAM Exception while connecting" << std::endl;
3387      return 1; // error
3388    } catch (CosEvCA::AlreadyConnected& ex) {
3389 -    cerr << _obj_name << ": Already connected" << endl;
3390 +    std::cerr << _obj_name << ": Already connected" << std::endl;
3391      return 1; // error
3392    } catch (...) {
3393 -    cerr << _obj_name << ": Failed to connect" << endl;
3394 +    std::cerr << _obj_name << ": Failed to connect" << std::endl;
3395      return 1; // error
3396    }
3397 -  if (_verbose) cout << _obj_name << ": Connected to proxy, ready to supply events" << endl; 
3398 +  if (_verbose) std::cout << _obj_name << ": Connected to proxy, ready to supply events" << std::endl; 
3399    // register the types to be supplied
3400    offer_ticker(_my_proxy, _obj_name, _verbose);
3401    // if _millisecs is set, spawn a thread to ping the proxy
3402 @@ -3698,11 +3698,11 @@
3403    { // introduce lock scope
3404      TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::cleanup");
3405      if (_worker || (!_done)) {
3406 -      cerr << "Coding error: only call c->cleanup() after c->wait_done()" << endl;
3407 +      std::cerr << "Coding error: only call c->cleanup() after c->wait_done()" << std::endl;
3408        return;
3409      }
3410      if (CORBA::is_nil(_my_proxy)) {
3411 -      cerr << "Coding error: cleanup already called?" << endl;
3412 +      std::cerr << "Coding error: cleanup already called?" << std::endl;
3413        return;
3414      }
3415      // this method takes sole ownership of _my_proxy ref
3416 @@ -3729,7 +3729,7 @@
3417    { // introduce lock scope
3418      TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::start_working");
3419  
3420 -    if (_verbose && (!_done) && _millisecs) cout << _obj_name << ": Spawned thread entering ping loop" << endl;
3421 +    if (_verbose && (!_done) && _millisecs) std::cout << _obj_name << ": Spawned thread entering ping loop" << std::endl;
3422      while ( 1 ) {
3423        if (_done || (_millisecs == 0)) break;
3424        unsigned long t_secs = 0, t_nanosecs = 0;
3425 @@ -3751,7 +3751,7 @@
3426        continue; // continue ping loop
3427      com_fail:
3428        if (_done) break;
3429 -      if (_verbose) cout << _obj_name << ": communication error while pinging proxy using MyType()" << endl;
3430 +      if (_verbose) std::cout << _obj_name << ": communication error while pinging proxy using MyType()" << std::endl;
3431        _done = 1;
3432        _finish.broadcast();
3433        _com_err = 1;
3434 @@ -3772,7 +3772,7 @@
3435  
3436    TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::try_pull_structured_events");
3437    if (_done) return data;
3438 -  if (_verbose) cout << _obj_name << ": Channel called try_pull_structured_events" << endl;
3439 +  if (_verbose) std::cout << _obj_name << ": Channel called try_pull_structured_events" << std::endl;
3440  
3441    // If we reached done point during last try_pull, it is broadcast now
3442    // and we return from this try_pull call without an event batch.
3443 @@ -3780,10 +3780,10 @@
3444    // processed the previous try_pull (the final supplied event batch) before
3445    // we disconnect this supplier.
3446    if (_max_events && (_num_events >= _max_events)) {
3447 -    if (_verbose) cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << endl;
3448 +    if (_verbose) std::cout << _obj_name << ": DONE [max_events reached; we waited for 1 extra try_pull]" << std::endl;
3449      _done = 1;
3450      _finish.broadcast();
3451 -    if (_verbose) cout << _obj_name << ": NOT returning a batch" << endl;
3452 +    if (_verbose) std::cout << _obj_name << ": NOT returning a batch" << std::endl;
3453      return data;
3454    }
3455  
3456 @@ -3792,12 +3792,12 @@
3457      _num_batches++;
3458      _num_events += data->length();
3459    } else {
3460 -    if (_verbose) cout << _obj_name << ": NOT returning a batch" << endl;
3461 +    if (_verbose) std::cout << _obj_name << ": NOT returning a batch" << std::endl;
3462    }
3463    if (!_done && _delay_millisecs) {
3464      unsigned long d_secs     =  _delay_millisecs / 1000;
3465      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3466 -    if (_verbose) cout << _obj_name << ": delaying try_pull_structured_events response for " << _delay_millisecs << " millisecs" << endl;
3467 +    if (_verbose) std::cout << _obj_name << ": delaying try_pull_structured_events response for " << _delay_millisecs << " millisecs" << std::endl;
3468      unsigned long t_secs, t_nanosecs;
3469      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3470      _finish.timedwait(t_secs, t_nanosecs);
3471 @@ -3820,7 +3820,7 @@
3472    { // introduce lock scope
3473      TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::pull_structured_events");
3474  
3475 -    if (_verbose && (!_done)) cout << _obj_name << ": Channel called pull_structured_events" << endl;
3476 +    if (_verbose && (!_done)) std::cout << _obj_name << ": Channel called pull_structured_events" << std::endl;
3477      // invariants: _oplock is held entering top of loop and 
3478      // also whenever we break out of loop
3479      // (it is *not* held during yield() and timedwait() calls)
3480 @@ -3834,7 +3834,7 @@
3481         _num_batches++;
3482         _num_events += data->length();
3483         if (_max_events && (_num_events >= _max_events)) {
3484 -         if (_verbose) cout << _obj_name << ": DONE [max_events reached]" << endl;
3485 +         if (_verbose) std::cout << _obj_name << ": DONE [max_events reached]" << std::endl;
3486           _done = 1;
3487           _finish.broadcast();
3488         }
3489 @@ -3855,7 +3855,7 @@
3490      if (!_done && _delay_millisecs) {
3491        unsigned long d_secs     =  _delay_millisecs / 1000;
3492        unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3493 -      if (_verbose) cout << _obj_name << ": delaying pull_structured_events response for " << _delay_millisecs << " millisecs" << endl;
3494 +      if (_verbose) std::cout << _obj_name << ": delaying pull_structured_events response for " << _delay_millisecs << " millisecs" << std::endl;
3495        unsigned long t_secs, t_nanosecs;
3496        TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3497        _finish.timedwait(t_secs, t_nanosecs);
3498 @@ -3870,7 +3870,7 @@
3499  
3500    TW_SCOPE_LOCK(lock, _oplock, "SequencePullSupplier", "SequencePullSupplier_i::disconnect_sequence_pull_supplier");
3501    if (_done) return;
3502 -  if (_verbose) cout << _obj_name << ": disconnected" << endl;
3503 +  if (_verbose) std::cout << _obj_name << ": disconnected" << std::endl;
3504    _done = 1;
3505    _finish.broadcast();
3506  }
3507 @@ -3900,11 +3900,11 @@
3508    if (_done) return;
3509    _num_changes++;
3510    if (_change_fn) (*_change_fn)(added, deled, _obj_name, _num_changes, _verbose);
3511 -  else if (_verbose) cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << endl;
3512 +  else if (_verbose) std::cout << _obj_name << ": subscription_change received [# " << _num_changes << "]" << std::endl;
3513    if (!_done && _delay_millisecs) {
3514      unsigned long d_secs     =  _delay_millisecs / 1000;
3515      unsigned long d_nanosecs = (_delay_millisecs % 1000) * 1000000;
3516 -    if (_verbose) cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << endl;
3517 +    if (_verbose) std::cout << _obj_name << ": delaying subscription_change response for " << _delay_millisecs << " millisecs" << std::endl;
3518      unsigned long t_secs, t_nanosecs;
3519      TW_GET_TIME(&t_secs, &t_nanosecs, d_secs, d_nanosecs);
3520      _finish.timedwait(t_secs, t_nanosecs);
3521 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/sample_functions.cc omniNotify-2.1.new/examples/sample_functions.cc
3522 --- omniNotify-2.1.orig/examples/sample_functions.cc    2003-10-23 08:39:11.000000000 +0400
3523 +++ omniNotify-2.1.new/examples/sample_functions.cc     2009-06-28 17:12:44.000000000 +0400
3524 @@ -2,8 +2,8 @@
3525  
3526  #include <stdio.h>
3527  #include <stdlib.h>
3528 -#include <iostream.h>
3529 -#include <iomanip.h>
3530 +#include <iostream>
3531 +#include <iomanip>
3532  #include "sample_functions.h"
3533  
3534  ///////////////////////////////////////////////////////////////////
3535 @@ -20,7 +20,7 @@
3536                       )
3537  {
3538    event <<= event_num;
3539 -  if (verbose) cout << "Supplied event # " << event_num << endl;
3540 +  if (verbose) std::cout << "Supplied event # " << event_num << std::endl;
3541    return 1; // OK
3542  }
3543  
3544 @@ -33,9 +33,9 @@
3545  {
3546    CORBA::ULong ul;
3547    if (event >>= ul) {
3548 -    if (verbose) cout << obj_name << ": event data = " << ul << ", event count = " << event_num << endl;
3549 +    if (verbose) std::cout << obj_name << ": event data = " << ul << ", event count = " << event_num << std::endl;
3550    } else {
3551 -    if (verbose) cout << obj_name << ": event data not known (not a ULong), event count = " << event_num << endl;
3552 +    if (verbose) std::cout << obj_name << ": event data not known (not a ULong), event count = " << event_num << std::endl;
3553    }
3554  }
3555  
3556 @@ -59,9 +59,9 @@
3557                               )
3558  {
3559    if (verbose) {
3560 -    cout << setw(10) << obj_name << " : " <<
3561 -      setw(4) << event_num << " : " <<
3562 -      setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
3563 +    std::cout << std::setw(10) << obj_name << " : " <<
3564 +      std::setw(4) << event_num << " : " <<
3565 +      std::setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
3566        event.header.fixed_header.event_type.type_name << " -- ";
3567      const char* stock_or_bond_name = "";
3568      CORBA::ULong value = 0;
3569 @@ -71,15 +71,15 @@
3570         (event.filterable_data.length() > 1) &&
3571         (event.filterable_data[0].value >>= stock_or_bond_name) &&
3572         (event.filterable_data[1].value >>= value)) {
3573 -      cout << "Name: " << stock_or_bond_name << " Value: " << setw(4) << value << " Quote# "; 
3574 +      std::cout << "Name: " << stock_or_bond_name << " Value: " << std::setw(4) << value << " Quote# "; 
3575        CORBA::ULong l = 0;
3576        if (event.remainder_of_body >>= l) {
3577 -       cout << setw(4) << l << endl;
3578 +       std::cout << std::setw(4) << l << std::endl;
3579        } else {
3580 -       cout << "????" << endl;
3581 +       std::cout << "????" << std::endl;
3582        }
3583      } else {
3584 -      cout << "(not a Stock or Bond quote -- ignoring)" << endl;
3585 +      std::cout << "(not a Stock or Bond quote -- ignoring)" << std::endl;
3586      }
3587    }
3588  }
3589 @@ -121,7 +121,7 @@
3590    event.filterable_data[1].name = (const char*) "Value";
3591    event.filterable_data[1].value <<= (CORBA::ULong) sample_stockbond_val[i];
3592    event.remainder_of_body <<= (CORBA::ULong) event_num;
3593 -  if (verbose) cout << "Supplied event # " << event_num << endl;
3594 +  if (verbose) std::cout << "Supplied event # " << event_num << std::endl;
3595    return 1;
3596  }
3597  
3598 @@ -141,8 +141,8 @@
3599  {
3600    CORBA::ULong evnum = event_num;
3601    // We re-use the singleton example function
3602 -  if (verbose) cout << "--------- " << obj_name << " Supplying Event Batch " <<
3603 -                batch_num << " -------------" << endl;
3604 +  if (verbose) std::cout << "--------- " << obj_name << " Supplying Event Batch " <<
3605 +                batch_num << " -------------" << std::endl;
3606    events.length(batch_size);
3607    for (unsigned int i = 0; i < batch_size; i++) {
3608      sample_supply_structured_fn(events[i], obj_name, evnum++, verbose);
3609 @@ -160,8 +160,8 @@
3610  {
3611    // We re-use the singleton example function
3612    CORBA::ULong evnum = (event_num - events.length()) + 1;
3613 -  if (verbose) cout << "--------- " << obj_name << " Got Event Batch " <<
3614 -                batch_num << " -------------" << endl;
3615 +  if (verbose) std::cout << "--------- " << obj_name << " Got Event Batch " <<
3616 +                batch_num << " -------------" << std::endl;
3617    for (unsigned int i = 0; i < events.length(); i++) {
3618      sample_consume_structured_fn(events[i], "", evnum++, verbose);
3619    }
3620 @@ -177,15 +177,15 @@
3621                           )
3622  {
3623    if (verbose) {
3624 -    cout << setw(10) << obj_name << " : " <<
3625 -      setw(4) << event_num << " : " <<
3626 -      setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
3627 +    std::cout << std::setw(10) << obj_name << " : " <<
3628 +      std::setw(4) << event_num << " : " <<
3629 +      std::setw(5) << event.header.fixed_header.event_type.domain_name << "::" <<
3630        event.header.fixed_header.event_type.type_name << " -- ";
3631      CORBA::ULong l = 0;
3632      if (event.remainder_of_body >>= l) {
3633 -      cout << setw(4) << l << endl;
3634 +      std::cout << std::setw(4) << l << std::endl;
3635      } else {
3636 -      cout << "????" << endl;
3637 +      std::cout << "????" << std::endl;
3638      }
3639    }
3640  }
3641 @@ -209,13 +209,13 @@
3642    event.filterable_data[0].name = (const char*) "TypeNum";
3643    event.filterable_data[0].value <<= (CORBA::ULong) i;
3644    event.remainder_of_body <<= (CORBA::ULong) event_num;
3645 -  if (verbose) cout << "Supplied event # " << event_num << endl;
3646 +  if (verbose) std::cout << "Supplied event # " << event_num << std::endl;
3647    return 1;
3648  }
3649  
3650  // Helper functions
3651  
3652 -ostream& operator<< (ostream& out, const CosN::EventType & t) {
3653 +std::ostream& operator<< (std::ostream& out, const CosN::EventType & t) {
3654    const char* dname = (t.domain_name ? (const char*)t.domain_name : "*");
3655    const char* tname = (t.type_name ? (const char*)t.type_name : "*");
3656    return out << dname << "::" << tname;
3657 @@ -228,10 +228,10 @@
3658    CORBA::ULong indx;
3659    CosN::EventType type;
3660    for (indx = 0; indx < added.length(); indx++) {
3661 -    cout << "\t+ " << added[indx] << endl;
3662 +    std::cout << "\t+ " << added[indx] << std::endl;
3663    }
3664    for (indx = 0; indx < deled.length(); indx++) {
3665 -    cout << "\t- " << deled[indx] << endl;
3666 +    std::cout << "\t- " << deled[indx] << std::endl;
3667    }
3668  }
3669  
3670 @@ -247,8 +247,8 @@
3671                        )
3672  {
3673    if (verbose) {
3674 -    cout << "Object " << obj_name <<
3675 -      " received offer_change msg [# " << num_changes << "]:" << endl;
3676 +    std::cout << "Object " << obj_name <<
3677 +      " received offer_change msg [# " << num_changes << "]:" << std::endl;
3678      sample_describe_change_fn(added, deled);
3679    }
3680  }
3681 @@ -262,8 +262,8 @@
3682                        )
3683  {
3684    if (verbose) {
3685 -    cout << "Object " << obj_name << 
3686 -      " received subscription_change msg [# " << num_changes << "]:" << endl;
3687 +    std::cout << "Object " << obj_name << 
3688 +      " received subscription_change msg [# " << num_changes << "]:" << std::endl;
3689      sample_describe_change_fn(added, deled);
3690    }
3691  }
3692 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/some_notify_clients.cc omniNotify-2.1.new/examples/some_notify_clients.cc
3693 --- omniNotify-2.1.orig/examples/some_notify_clients.cc 2003-10-12 22:51:18.000000000 +0400
3694 +++ omniNotify-2.1.new/examples/some_notify_clients.cc  2009-06-28 17:18:19.000000000 +0400
3695 @@ -4,7 +4,7 @@
3696  #endif
3697  
3698  #include <stdlib.h>
3699 -#include <iostream.h>
3700 +#include <iostream>
3701  
3702  #include "orb_init_name.h"
3703  #include "get_channel.h"
3704 @@ -23,58 +23,58 @@
3705  
3706  static void usage(const char* pname)
3707  {
3708 -  cout << "Usage: " << pname << " -u client_type [-u client_type ...] [-c #] [-s #] [-b #] [-m #] [-M #] [-n name] [-f file] [-v] [-t types] [-e expr]" << endl;
3709 -  cout << "  -u type  : use the specified client type (one client of that type is used)." << endl;
3710 -  cout << "             Specify as many as you like, one -u option for each.  Types:" << endl;
3711 -  cout << "                lpushc : legacy push consumer" << endl;   
3712 -  cout << "                apushc : any push consumer" << endl; 
3713 -  cout << "                spushc : structured push consumer" << endl; 
3714 -  cout << "                bpushc : batch push consumer" << endl; 
3715 -  cout << endl;
3716 -  cout << "                lpullc : legacy pull consumer" << endl;   
3717 -  cout << "                apullc : any pull consumer" << endl; 
3718 -  cout << "                spullc : structured pull consumer" << endl; 
3719 -  cout << "                bpullc : batch pull consumer" << endl; 
3720 -  cout << endl;
3721 -  cout << "                lpushs : legacy push supplier" << endl;   
3722 -  cout << "                apushs : any push supplier" << endl; 
3723 -  cout << "                spushs : structured push supplier" << endl; 
3724 -  cout << "                bpushs : batch push supplier" << endl; 
3725 -  cout << endl;
3726 -  cout << "                lpulls : legacy pull supplier" << endl;   
3727 -  cout << "                apulls : any pull supplier" << endl; 
3728 -  cout << "                spulls : structured pull supplier" << endl; 
3729 -  cout << "                bpulls : batch pull supplier" << endl; 
3730 -  cout << endl;
3731 -  cout << "  -s #     : for suppliers: disconnect after # events supplied [default 0 means never disconnect]" << endl;
3732 -  cout << "  -c #     : for consumers: disconnect after # events consumed [default 0 means never disconnect]" << endl;
3733 -  cout << "             **  N.B. You should take # of suppliers into account:" << endl;
3734 -  cout << "                 if 3 suppliers supply 30 events, each consumer should consume 90 events" << endl; 
3735 -  cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << endl;
3736 -  cout << "               => must be >= 1" << endl;
3737 -  cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << endl;
3738 -  cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << endl;
3739 -  cout << "             (-M only applies to push consumers and pull suppliers)" << endl;
3740 -  cout << "  -n name  : channel name" << endl;
3741 -  cout << "               => use event service to lookup this name" << endl;
3742 -  cout << "  -f file  : file containing channel IOR" << endl;
3743 -  cout << "               => use string_to_object on the IOR" << endl;
3744 -  cout << "  -v       : verbose output" << endl;
3745 -  cout << endl;
3746 -  cout << "Options for adding a filter **:" << endl;
3747 -  cout << "  -t types : add a filter for the specified types, which should be a" << endl;
3748 -  cout << "               comma-separated list of types of the form D::T" << endl;
3749 -  cout << "  -e expr  : add a filter with the specified boolean expression" << endl;
3750 -  cout << "** N.B. Only add filters that always evaluate to TRUE to get proper program termination" << endl;
3751 -  cout << endl;
3752 -  cout << "If only -t specified, the expression \"true\" is used for the filter" << endl;
3753 -  cout << "If only -e specified, the event type \"*::*\" is used for the filter" << endl;
3754 -  cout << endl;
3755 -  cout << "If both -n and -f are specified, the -n option is tried first" << endl;
3756 -  cout << endl;
3757 -  cout << "If neither -n or -f is specified, program first tries name service" << endl;
3758 -  cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << endl;
3759 -  cout << endl;
3760 +  std::cout << "Usage: " << pname << " -u client_type [-u client_type ...] [-c #] [-s #] [-b #] [-m #] [-M #] [-n name] [-f file] [-v] [-t types] [-e expr]" << std::endl;
3761 +  std::cout << "  -u type  : use the specified client type (one client of that type is used)." << std::endl;
3762 +  std::cout << "             Specify as many as you like, one -u option for each.  Types:" << std::endl;
3763 +  std::cout << "                lpushc : legacy push consumer" << std::endl;   
3764 +  std::cout << "                apushc : any push consumer" << std::endl; 
3765 +  std::cout << "                spushc : structured push consumer" << std::endl; 
3766 +  std::cout << "                bpushc : batch push consumer" << std::endl; 
3767 +  std::cout << std::endl;
3768 +  std::cout << "                lpullc : legacy pull consumer" << std::endl;   
3769 +  std::cout << "                apullc : any pull consumer" << std::endl; 
3770 +  std::cout << "                spullc : structured pull consumer" << std::endl; 
3771 +  std::cout << "                bpullc : batch pull consumer" << std::endl; 
3772 +  std::cout << std::endl;
3773 +  std::cout << "                lpushs : legacy push supplier" << std::endl;   
3774 +  std::cout << "                apushs : any push supplier" << std::endl; 
3775 +  std::cout << "                spushs : structured push supplier" << std::endl; 
3776 +  std::cout << "                bpushs : batch push supplier" << std::endl; 
3777 +  std::cout << std::endl;
3778 +  std::cout << "                lpulls : legacy pull supplier" << std::endl;   
3779 +  std::cout << "                apulls : any pull supplier" << std::endl; 
3780 +  std::cout << "                spulls : structured pull supplier" << std::endl; 
3781 +  std::cout << "                bpulls : batch pull supplier" << std::endl; 
3782 +  std::cout << std::endl;
3783 +  std::cout << "  -s #     : for suppliers: disconnect after # events supplied [default 0 means never disconnect]" << std::endl;
3784 +  std::cout << "  -c #     : for consumers: disconnect after # events consumed [default 0 means never disconnect]" << std::endl;
3785 +  std::cout << "             **  N.B. You should take # of suppliers into account:" << std::endl;
3786 +  std::cout << "                 if 3 suppliers supply 30 events, each consumer should consume 90 events" << std::endl; 
3787 +  std::cout << "  -b #     : batch size (only relevant for batch supplier programs) [default 5]" << std::endl;
3788 +  std::cout << "               => must be >= 1" << std::endl;
3789 +  std::cout << "  -m #     : # of milliseconds to pause between each push/pull [default 0]" << std::endl;
3790 +  std::cout << "  -M #     : # of milliseconds to pause during incoming push, pull, try_pull [default 0]" << std::endl;
3791 +  std::cout << "             (-M only applies to push consumers and pull suppliers)" << std::endl;
3792 +  std::cout << "  -n name  : channel name" << std::endl;
3793 +  std::cout << "               => use event service to lookup this name" << std::endl;
3794 +  std::cout << "  -f file  : file containing channel IOR" << std::endl;
3795 +  std::cout << "               => use string_to_object on the IOR" << std::endl;
3796 +  std::cout << "  -v       : verbose output" << std::endl;
3797 +  std::cout << std::endl;
3798 +  std::cout << "Options for adding a filter **:" << std::endl;
3799 +  std::cout << "  -t types : add a filter for the specified types, which should be a" << std::endl;
3800 +  std::cout << "               comma-separated list of types of the form D::T" << std::endl;
3801 +  std::cout << "  -e expr  : add a filter with the specified boolean expression" << std::endl;
3802 +  std::cout << "** N.B. Only add filters that always evaluate to TRUE to get proper program termination" << std::endl;
3803 +  std::cout << std::endl;
3804 +  std::cout << "If only -t specified, the expression \"true\" is used for the filter" << std::endl;
3805 +  std::cout << "If only -e specified, the event type \"*::*\" is used for the filter" << std::endl;
3806 +  std::cout << std::endl;
3807 +  std::cout << "If both -n and -f are specified, the -n option is tried first" << std::endl;
3808 +  std::cout << std::endl;
3809 +  std::cout << "If neither -n or -f is specified, program first tries name service" << std::endl;
3810 +  std::cout << "using name \"EventChannel\", then default IOR file /tmp/rdichan.ior" << std::endl;
3811 +  std::cout << std::endl;
3812  }
3813  
3814  // return 0 if etype_list is a valid comma-separated event type list
3815 @@ -195,7 +195,7 @@
3816         } else if (strcmp(optarg, "bpulls") == 0) {
3817           USE_B_PULL_S = 1; num_sup++;
3818         } else {
3819 -         cout << endl << "Bad client type (" << optarg << ") for -u option" << endl;
3820 +         std::cout << std::endl << "Bad client type (" << optarg << ") for -u option" << std::endl;
3821           usage(pname);
3822           goto error_return;
3823         }
3824 @@ -250,7 +250,7 @@
3825        ior_file = (char*)"/tmp/rdichan.ior";
3826      }
3827      if (strlen(etype_list) && parse_etype_list(etype_list, evs)) {
3828 -      cout << "Event type list for -t option must be comma-separated list of D::T" << endl << endl; 
3829 +      std::cout << "Event type list for -t option must be comma-separated list of D::T" << std::endl << std::endl; 
3830        usage(pname);
3831        goto error_return;
3832      }
3833 @@ -258,19 +258,19 @@
3834        constraint_expr = (char*)"true";
3835      }
3836      if (num_con + num_sup == 0) {
3837 -      cout << endl << "** You must use at least one -u option to specify a client **" << endl;
3838 +      std::cout << std::endl << "** You must use at least one -u option to specify a client **" << std::endl;
3839        usage(pname);
3840        goto error_return;
3841      }
3842      if (num_con && num_sup && num_con_events && num_sup_events && (num_con_events != (num_sup * num_sup_events))) {
3843 -      cout << endl << "** WARNING: Unless filtering or external clients change the count, your math is wrong" << endl;
3844 -      cout << "    num_con_events != num_sup * num_sup_events" << endl;
3845 -      cout << "    ( " << num_con_events << " != " << num_sup << " * " << num_sup_events << " )" << endl;
3846 -      cout << "Proceeding anyway" << endl;
3847 +      std::cout << std::endl << "** WARNING: Unless filtering or external clients change the count, your math is wrong" << std::endl;
3848 +      std::cout << "    num_con_events != num_sup * num_sup_events" << std::endl;
3849 +      std::cout << "    ( " << num_con_events << " != " << num_sup << " * " << num_sup_events << " )" << std::endl;
3850 +      std::cout << "Proceeding anyway" << std::endl;
3851      }
3852  
3853      // (2) Obtain reference to notification channel
3854 -    if (verbose) cout << "Obtaining reference to notification channel" << endl;
3855 +    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
3856      CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
3857      if (CORBA::is_nil(channel)) { // name service lookup failed
3858        channel = getchan_from_iorfile(orb, ior_file, verbose);
3859 @@ -323,12 +323,12 @@
3860  
3861      // (3.1) legacy_push_consumer
3862      if (USE_L_PUSH_C) {
3863 -      cout << "Constructing legacy_push_consumer, num_con_events = " << num_con_events << endl;
3864 +      std::cout << "Constructing legacy_push_consumer, num_con_events = " << num_con_events << std::endl;
3865        l_push_c =
3866         LegacyPushConsumer_i::create(channel, num_con_events, "legacy_push_consumer",
3867                                      sample_consume_any_fn, millisecs, delay_millisecs, verbose);
3868        if (! l_push_c) {
3869 -       cerr << "Constructing legacy_push_consumer failed" << endl;
3870 +       std::cerr << "Constructing legacy_push_consumer failed" << std::endl;
3871         goto error_return; // failed to create a client
3872        }
3873        my_l_push_c = l_push_c->_this();
3874 @@ -337,12 +337,12 @@
3875  
3876        // (3.2) legacy_pull_consumer
3877      if (USE_L_PULL_C) {
3878 -      cout << "Constructing legacy_pull_consumer, num_con_events = " << num_con_events << endl;
3879 +      std::cout << "Constructing legacy_pull_consumer, num_con_events = " << num_con_events << std::endl;
3880        l_pull_c =
3881         LegacyPullConsumer_i::create(channel, num_con_events, "legacy_pull_consumer",
3882                                      sample_consume_any_fn, millisecs, delay_millisecs, verbose);
3883        if (! l_pull_c) {
3884 -       cerr << "Constructing legacy_pull_consumer failed" << endl;
3885 +       std::cerr << "Constructing legacy_pull_consumer failed" << std::endl;
3886         goto error_return; // failed to create a client
3887        }
3888        my_l_pull_c = l_pull_c->_this();
3889 @@ -351,13 +351,13 @@
3890  
3891      // (3.3) any_push_consumer
3892      if (USE_A_PUSH_C) {
3893 -      cout << "Constructing any_push_consumer, num_con_events = " << num_con_events << endl;
3894 +      std::cout << "Constructing any_push_consumer, num_con_events = " << num_con_events << std::endl;
3895        a_push_c =
3896         PushConsumer_i::create(orb, channel, num_con_events, batch_size, "any_push_consumer",
3897                                "", "", sample_consume_any_fn, sample_offer_change_fn,
3898                                &evs, constraint_expr, millisecs, delay_millisecs, verbose);
3899        if (! a_push_c) {
3900 -       cerr << "Constructing any_push_consumer failed" << endl;
3901 +       std::cerr << "Constructing any_push_consumer failed" << std::endl;
3902         goto error_return; // failed to create a client
3903        }
3904        my_a_push_c = a_push_c->_this();
3905 @@ -366,13 +366,13 @@
3906  
3907      // (3.4) struct_push_consumer
3908      if (USE_S_PUSH_C) {
3909 -      cout << "Constructing struct_push_consumer, num_con_events = " << num_con_events << endl;
3910 +      std::cout << "Constructing struct_push_consumer, num_con_events = " << num_con_events << std::endl;
3911        s_push_c =
3912         StructuredPushConsumer_i::create(orb, channel, num_con_events, batch_size, "struct_push_consumer",
3913                                          "", "", sample_consume_structured_fn, sample_offer_change_fn,
3914                                          &evs, constraint_expr, millisecs, delay_millisecs, verbose);
3915        if (! s_push_c) {
3916 -       cerr << "Constructing struct_push_consumer failed" << endl;
3917 +       std::cerr << "Constructing struct_push_consumer failed" << std::endl;
3918         goto error_return; // failed to create a client
3919        }
3920        my_s_push_c = s_push_c->_this();
3921 @@ -381,13 +381,13 @@
3922  
3923      // (3.5) batch_push_consumer
3924      if (USE_B_PUSH_C) {
3925 -      cout << "Constructing batch_push_consumer, num_con_events = " << num_con_events << endl;
3926 +      std::cout << "Constructing batch_push_consumer, num_con_events = " << num_con_events << std::endl;
3927        b_push_c =
3928         SequencePushConsumer_i::create(orb, channel, num_con_events, batch_size, "batch_push_consumer",
3929                                        "", "", sample_consume_batch_fn, sample_offer_change_fn,
3930                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
3931        if (! b_push_c) {
3932 -       cerr << "Constructing batch_push_consumer failed" << endl;
3933 +       std::cerr << "Constructing batch_push_consumer failed" << std::endl;
3934         goto error_return; // failed to create a client
3935        }
3936        my_b_push_c = b_push_c->_this();
3937 @@ -396,13 +396,13 @@
3938  
3939      // (3.6) any_pull_consumer
3940      if (USE_A_PULL_C) {
3941 -      cout << "Constructing any_pull_consumer, num_con_events = " << num_con_events << endl;
3942 +      std::cout << "Constructing any_pull_consumer, num_con_events = " << num_con_events << std::endl;
3943        a_pull_c =
3944         PullConsumer_i::create(orb, channel, num_con_events, batch_size, "any_pull_consumer",
3945                                "", "", sample_consume_any_fn, sample_offer_change_fn,
3946                                &evs, constraint_expr, millisecs, delay_millisecs, verbose);
3947        if (! a_pull_c) {
3948 -       cerr << "Constructing any_pull_consumer failed" << endl;
3949 +       std::cerr << "Constructing any_pull_consumer failed" << std::endl;
3950         goto error_return; // failed to create a client
3951        }
3952        my_a_pull_c = a_pull_c->_this();
3953 @@ -411,13 +411,13 @@
3954  
3955      // (3.7) struct_pull_consumer
3956      if (USE_S_PULL_C) {
3957 -      cout << "Constructing struct_pull_consumer, num_con_events = " << num_con_events << endl;
3958 +      std::cout << "Constructing struct_pull_consumer, num_con_events = " << num_con_events << std::endl;
3959        s_pull_c =
3960         StructuredPullConsumer_i::create(orb, channel, num_con_events, batch_size, "struct_pull_consumer",
3961                                          "", "", sample_consume_structured_fn, sample_offer_change_fn,
3962                                          &evs, constraint_expr, millisecs, delay_millisecs, verbose);
3963        if (! s_pull_c) {
3964 -       cerr << "Constructing struct_pull_consumer failed" << endl;
3965 +       std::cerr << "Constructing struct_pull_consumer failed" << std::endl;
3966         goto error_return; // failed to create a client
3967        }
3968        my_s_pull_c = s_pull_c->_this();
3969 @@ -426,13 +426,13 @@
3970  
3971      // (3.8) batch_pull_consumer
3972      if (USE_B_PULL_C) {
3973 -      cout << "Constructing batch_pull_consumer, num_con_events = " << num_con_events << endl;
3974 +      std::cout << "Constructing batch_pull_consumer, num_con_events = " << num_con_events << std::endl;
3975        b_pull_c =
3976         SequencePullConsumer_i::create(orb, channel, num_con_events, batch_size, "batch_pull_consumer",
3977                                        "", "", sample_consume_batch_fn, sample_offer_change_fn,
3978                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
3979        if (! b_pull_c) {
3980 -       cerr << "Constructing batch_pull_consumer failed" << endl;
3981 +       std::cerr << "Constructing batch_pull_consumer failed" << std::endl;
3982         goto error_return; // failed to create a client
3983        }
3984        my_b_pull_c = b_pull_c->_this();
3985 @@ -441,12 +441,12 @@
3986  
3987      // (3.9) legacy_push_supplier
3988      if (USE_L_PUSH_S) {
3989 -      cout << "Constructing legacy_push_supplier, num_sup_events = " << num_sup_events << endl;
3990 +      std::cout << "Constructing legacy_push_supplier, num_sup_events = " << num_sup_events << std::endl;
3991        l_push_s =
3992         LegacyPushSupplier_i::create(channel, num_sup_events, "legacy_push_supplier",
3993                                      sample_supply_any_fn, millisecs, delay_millisecs, verbose);
3994        if (! l_push_s) {
3995 -       cerr << "Constructing legacy_push_supplier failed" << endl;
3996 +       std::cerr << "Constructing legacy_push_supplier failed" << std::endl;
3997         goto error_return; // failed to create a client
3998        }
3999        my_l_push_s = l_push_s->_this();
4000 @@ -455,12 +455,12 @@
4001  
4002      // (3.10) legacy_pull_supplier
4003      if (USE_L_PULL_S) {
4004 -      cout << "Constructing legacy_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
4005 +      std::cout << "Constructing legacy_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4006        l_pull_s =
4007         LegacyPullSupplier_i::create(channel, num_sup_events, "legacy_pull_supplier",
4008                                      sample_supply_any_fn, millisecs, delay_millisecs, verbose);
4009        if (! l_pull_s) {
4010 -       cerr << "Constructing legacy_pull_supplier failed" << endl;
4011 +       std::cerr << "Constructing legacy_pull_supplier failed" << std::endl;
4012         goto error_return; // failed to create a client
4013        }
4014        my_l_pull_s = l_pull_s->_this();
4015 @@ -469,13 +469,13 @@
4016  
4017      // (3.11) any_push_supplier
4018      if (USE_A_PUSH_S) {
4019 -      cout << "Constructing any_push_supplier, num_sup_events = " << num_sup_events <<  endl;
4020 +      std::cout << "Constructing any_push_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4021        a_push_s =
4022         PushSupplier_i::create(orb, channel, num_sup_events, batch_size, "any_push_supplier",
4023                                "", "", sample_supply_any_fn, sample_subscription_change_fn,
4024                                &evs, constraint_expr, millisecs, delay_millisecs, verbose);
4025        if (! a_push_s) {
4026 -       cerr << "Constructing any_push_supplier failed" << endl;
4027 +       std::cerr << "Constructing any_push_supplier failed" << std::endl;
4028         goto error_return; // failed to create a client
4029        }
4030        my_a_push_s = a_push_s->_this();
4031 @@ -484,13 +484,13 @@
4032  
4033      // (3.12) struct_push_supplier
4034      if (USE_S_PUSH_S) {
4035 -      cout << "Constructing struct_push_supplier, num_sup_events = " << num_sup_events <<  endl;
4036 +      std::cout << "Constructing struct_push_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4037        s_push_s =
4038         StructuredPushSupplier_i::create(orb, channel, num_sup_events, batch_size, "struct_push_supplier",
4039                                          "", "", sample_supply_structured_fn, sample_subscription_change_fn,
4040                                          &evs, constraint_expr, millisecs, delay_millisecs, verbose);
4041        if (! s_push_s) {
4042 -       cerr << "Constructing struct_push_supplier failed" << endl;
4043 +       std::cerr << "Constructing struct_push_supplier failed" << std::endl;
4044         goto error_return; // failed to create a client
4045        }
4046        my_s_push_s = s_push_s->_this();
4047 @@ -499,13 +499,13 @@
4048  
4049      // (3.13) batch_push_supplier
4050      if (USE_B_PUSH_S) {
4051 -      cout << "Constructing batch_push_supplier, num_sup_events = " << num_sup_events <<  endl;
4052 +      std::cout << "Constructing batch_push_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4053        b_push_s =
4054         SequencePushSupplier_i::create(orb, channel, num_sup_events, batch_size, "batch_push_supplier",
4055                                        "", "", sample_supply_batch_fn, sample_subscription_change_fn,
4056                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
4057        if (! b_push_s) {
4058 -       cerr << "Constructing batch_push_supplier failed" << endl;
4059 +       std::cerr << "Constructing batch_push_supplier failed" << std::endl;
4060         goto error_return; // failed to create a client
4061        }
4062        my_b_push_s = b_push_s->_this();
4063 @@ -514,13 +514,13 @@
4064  
4065      // (3.14) any_pull_supplier
4066      if (USE_A_PULL_S) {
4067 -      cout << "Constructing any_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
4068 +      std::cout << "Constructing any_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4069        a_pull_s =
4070         PullSupplier_i::create(orb, channel, num_sup_events, batch_size, "any_pull_supplier",
4071                                "", "", sample_supply_any_fn, sample_subscription_change_fn,
4072                                &evs, constraint_expr, millisecs, delay_millisecs, verbose);
4073        if (! a_pull_s) {
4074 -       cerr << "Constructing any_pull_supplier failed" << endl;
4075 +       std::cerr << "Constructing any_pull_supplier failed" << std::endl;
4076         goto error_return; // failed to create a client
4077        }
4078        my_a_pull_s = a_pull_s->_this();
4079 @@ -529,13 +529,13 @@
4080  
4081      // (3.15) struct_pull_supplier
4082      if (USE_S_PULL_S) {
4083 -      cout << "Constructing struct_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
4084 +      std::cout << "Constructing struct_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4085        s_pull_s =
4086         StructuredPullSupplier_i::create(orb, channel, num_sup_events, batch_size, "struct_pull_supplier",
4087                                          "", "", sample_supply_structured_fn, sample_subscription_change_fn,
4088                                          &evs, constraint_expr, millisecs, delay_millisecs, verbose);
4089        if (! s_pull_s) {
4090 -       cerr << "Constructing struct_pull_supplier failed" << endl;
4091 +       std::cerr << "Constructing struct_pull_supplier failed" << std::endl;
4092         goto error_return; // failed to create a client
4093        }
4094        my_s_pull_s = s_pull_s->_this();
4095 @@ -544,13 +544,13 @@
4096  
4097      // (3.16) batch_pull_supplier
4098      if (USE_B_PULL_S) {
4099 -      cout << "Constructing batch_pull_supplier, num_sup_events = " << num_sup_events <<  endl;
4100 +      std::cout << "Constructing batch_pull_supplier, num_sup_events = " << num_sup_events <<  std::endl;
4101        b_pull_s =
4102         SequencePullSupplier_i::create(orb, channel, num_sup_events, batch_size, "batch_pull_supplier",
4103                                        "", "", sample_supply_batch_fn, sample_subscription_change_fn,
4104                                        &evs, constraint_expr, millisecs, delay_millisecs, verbose);
4105        if (! b_pull_s) {
4106 -       cerr << "Constructing batch_pull_supplier failed" << endl;
4107 +       std::cerr << "Constructing batch_pull_supplier failed" << std::endl;
4108         goto error_return; // failed to create a client
4109        }
4110        my_b_pull_s = b_pull_s->_this();
4111 @@ -558,116 +558,116 @@
4112      }
4113  
4114      // (4) Tell POA we are ready to go
4115 -    if (verbose) cout << "Activating POA manager" << endl;
4116 +    if (verbose) std::cout << "Activating POA manager" << std::endl;
4117      PortableServer::POAManager_var pman = poa->the_POAManager();
4118      pman->activate();
4119  
4120      // (5) Connect clients to their proxies -- consumers first
4121 -    if (verbose) cout << "Connecting consumer clients to proxies" << endl;
4122 +    if (verbose) std::cout << "Connecting consumer clients to proxies" << std::endl;
4123  
4124      if (USE_L_PUSH_C) {
4125        if (l_push_c->connect()) {
4126 -       cerr << "Connecting legacy_push_consumer failed" << endl;
4127 +       std::cerr << "Connecting legacy_push_consumer failed" << std::endl;
4128         goto error_return;
4129        }
4130      }
4131      if (USE_A_PUSH_C) {
4132        if (a_push_c->connect()) {
4133 -       cerr << "Connecting any_push_consumer failed" << endl;
4134 +       std::cerr << "Connecting any_push_consumer failed" << std::endl;
4135         goto error_return;
4136        }
4137      }
4138      if (USE_S_PUSH_C) {
4139        if (s_push_c->connect()) {
4140 -       cerr << "Connecting struct_push_consumer failed" << endl;
4141 +       std::cerr << "Connecting struct_push_consumer failed" << std::endl;
4142         goto error_return;
4143        }
4144      }
4145      if (USE_B_PUSH_C) {
4146        if (b_push_c->connect()) {
4147 -       cerr << "Connecting batch_push_consumer failed" << endl;
4148 +       std::cerr << "Connecting batch_push_consumer failed" << std::endl;
4149         goto error_return;
4150        }
4151      }
4152  
4153      if (USE_L_PULL_C) {
4154        if (l_pull_c->connect()) {
4155 -       cerr << "Connecting legacy_pull_consumer failed" << endl;
4156 +       std::cerr << "Connecting legacy_pull_consumer failed" << std::endl;
4157         goto error_return;
4158        }
4159      }
4160      if (USE_A_PULL_C) {
4161        if (a_pull_c->connect()) {
4162 -       cerr << "Connecting any_pull_consumer failed" << endl;
4163 +       std::cerr << "Connecting any_pull_consumer failed" << std::endl;
4164         goto error_return;
4165        }
4166      }
4167      if (USE_S_PULL_C) {
4168        if (s_pull_c->connect()) {
4169 -       cerr << "Connecting struct_pull_consumer failed" << endl;
4170 +       std::cerr << "Connecting struct_pull_consumer failed" << std::endl;
4171         goto error_return;
4172        }
4173      }
4174      if (USE_B_PULL_C) {
4175        if (b_pull_c->connect()) {
4176 -       cerr << "Connecting batch_pull_consumer failed" << endl;
4177 +       std::cerr << "Connecting batch_pull_consumer failed" << std::endl;
4178         goto error_return;
4179        }
4180      }
4181  
4182 -    if (verbose) cout << "Connecting supplier clients to proxies" << endl;
4183 +    if (verbose) std::cout << "Connecting supplier clients to proxies" << std::endl;
4184  
4185      if (USE_L_PUSH_S) {
4186        if (l_push_s->connect()) {
4187 -       cerr << "Connecting legacy_push_supplier failed" << endl;
4188 +       std::cerr << "Connecting legacy_push_supplier failed" << std::endl;
4189         goto error_return;
4190        }
4191      }
4192      if (USE_A_PUSH_S) {
4193        if (a_push_s->connect()) {
4194 -       cerr << "Connecting any_push_supplier failed" << endl;
4195 +       std::cerr << "Connecting any_push_supplier failed" << std::endl;
4196         goto error_return;
4197        }
4198      }
4199      if (USE_S_PUSH_S) {
4200        if (s_push_s->connect()) {
4201 -       cerr << "Connecting struct_push_supplier failed" << endl;
4202 +       std::cerr << "Connecting struct_push_supplier failed" << std::endl;
4203         goto error_return;
4204        }
4205      }
4206      if (USE_B_PUSH_S) {
4207        if (b_push_s->connect()) {
4208 -       cerr << "Connecting batch_push_supplier failed" << endl;
4209 +       std::cerr << "Connecting batch_push_supplier failed" << std::endl;
4210         goto error_return;
4211        }
4212      }
4213  
4214      if (USE_L_PULL_S) {
4215        if (l_pull_s->connect()) {
4216 -       cerr << "Connecting legacy_pull_supplier failed" << endl;
4217 +       std::cerr << "Connecting legacy_pull_supplier failed" << std::endl;
4218         goto error_return;
4219        }
4220      }
4221      if (USE_A_PULL_S) {
4222        if (a_pull_s->connect()) {
4223 -       cerr << "Connecting any_pull_supplier failed" << endl;
4224 +       std::cerr << "Connecting any_pull_supplier failed" << std::endl;
4225         goto error_return;
4226        }
4227      }
4228      if (USE_S_PULL_S) {
4229        if (s_pull_s->connect()) {
4230 -       cerr << "Connecting struct_pull_supplier failed" << endl;
4231 +       std::cerr << "Connecting struct_pull_supplier failed" << std::endl;
4232         goto error_return;
4233        }
4234      }
4235      if (USE_B_PULL_S) {
4236        if (b_pull_s->connect()) {
4237 -       cerr << "Connecting batch_pull_supplier failed" << endl;
4238 +       std::cerr << "Connecting batch_pull_supplier failed" << std::endl;
4239         goto error_return;
4240        }
4241      }
4242  
4243 -    if (verbose) cout << "Waiting for all 16 clients to finish" << endl;
4244 +    if (verbose) std::cout << "Waiting for all 16 clients to finish" << std::endl;
4245  
4246      CORBA::Boolean l_push_c_err = 0, l_pull_c_err = 0, l_push_s_err = 0, l_pull_s_err = 0;
4247      CORBA::Boolean a_push_c_err = 0, a_pull_c_err = 0, a_push_s_err = 0, a_pull_s_err = 0;
4248 @@ -745,13 +745,13 @@
4249        s_pull_s_err ||
4250        b_pull_s_err;
4251      if (sup_com_err && (num_sup_events > 0)) {
4252 -      if (verbose) cout << "Supplier communication error -- probably did not supply desired # of events" << endl;
4253 +      if (verbose) std::cout << "Supplier communication error -- probably did not supply desired # of events" << std::endl;
4254      }
4255      if (con_com_err && (num_con_events > 0)) {
4256 -      if (verbose) cout << "Consumer communication error -- probably did not consume desired # of events" << endl;
4257 +      if (verbose) std::cout << "Consumer communication error -- probably did not consume desired # of events" << std::endl;
4258      }
4259  
4260 -    if (verbose) cout << "Cleaning up" << endl;
4261 +    if (verbose) std::cout << "Cleaning up" << std::endl;
4262  
4263      if (USE_L_PUSH_C) {
4264        if (!l_push_c_err) { l_push_c->cleanup(); }
4265 @@ -808,23 +808,23 @@
4266      goto normal_return;
4267    }
4268    catch(CORBA::SystemException&) {                     
4269 -    cerr << "main caught CORBA::SystemException." << endl;  
4270 +    std::cerr << "main caught CORBA::SystemException." << std::endl;  
4271    }                                                    
4272    catch(CORBA::Exception&) {                           
4273 -    cerr << "main caught CORBA::Exception." << endl;        
4274 +    std::cerr << "main caught CORBA::Exception." << std::endl;        
4275    }                                                    
4276    catch(omniORB::fatalException& fe) {                 
4277 -    cerr << "main caught omniORB::fatalException:" << endl; 
4278 -    cerr << "  file: " << fe.file() << endl;           
4279 -    cerr << "  line: " << fe.line() << endl;           
4280 -    cerr << "  mesg: " << fe.errmsg() << endl;         
4281 +    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
4282 +    std::cerr << "  file: " << fe.file() << std::endl;           
4283 +    std::cerr << "  line: " << fe.line() << std::endl;           
4284 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
4285    }                                                    
4286    catch(...) {                                         
4287      // nameclt comment says it is a bad idea to report an error here 
4288    }
4289 -  cerr << "main caught an exception." << endl;       
4290 +  std::cerr << "main caught an exception." << std::endl;       
4291   error_return:
4292 -  cerr << "QUITTING due to error" << endl;
4293 +  std::cerr << "QUITTING due to error" << std::endl;
4294    // orb->destroy();
4295    return -1;
4296   normal_return:
4297 diff -Naur --exclude=CVS omniNotify-2.1.orig/examples/ten_any_pull_consumers.cc omniNotify-2.1.new/examples/ten_any_pull_consumers.cc
4298 --- omniNotify-2.1.orig/examples/ten_any_pull_consumers.cc      2003-10-23 08:39:11.000000000 +0400
4299 +++ omniNotify-2.1.new/examples/ten_any_pull_consumers.cc       2009-06-28 17:14:26.000000000 +0400
4300 @@ -32,7 +32,7 @@
4301      PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
4302  
4303      // (1) Tell POA we are ready to go
4304 -    if (verbose) cout << "Activating POA manager" << endl;
4305 +    if (verbose) std::cout << "Activating POA manager" << std::endl;
4306      PortableServer::POAManager_var pman = poa->the_POAManager();
4307      pman->activate();
4308  
4309 @@ -46,7 +46,7 @@
4310      num_con_events = num_events;
4311  
4312      // (3) Obtain reference to notification channel
4313 -    if (verbose) cout << "Obtaining reference to notification channel" << endl;
4314 +    if (verbose) std::cout << "Obtaining reference to notification channel" << std::endl;
4315      CosNA::EventChannel_ptr channel = getchan_from_ns(orb, channel_name, verbose);
4316      if (CORBA::is_nil(channel)) { // name service lookup failed
4317        channel = getchan_from_iorfile(orb, ior_file, verbose);
4318 @@ -56,14 +56,14 @@
4319      }
4320  
4321      // (4) Create all 12 CosNotify-style clients
4322 -    if (verbose) cout << "Creating 10 any_pull_consumer clients" << endl;
4323 +    if (verbose) std::cout << "Creating 10 any_pull_consumer clients" << std::endl;
4324  
4325      PullConsumer_i* a_pull_c[10];
4326      CosNotifyComm::PullConsumer_var my_a_pull_c[10];
4327      char buf[100];
4328      for (i = 0; i < 10; i++) {
4329        sprintf(buf, "any_pull_consumer%d", i);
4330 -      if (verbose) cout << "Creating " << buf << endl;
4331 +      if (verbose) std::cout << "Creating " << buf << std::endl;
4332        a_pull_c[i] =
4333         PullConsumer_i::create(orb, channel, num_con_events, batch_size, CORBA::string_dup(buf),
4334                                "", "", sample_consume_any_fn, sample_offer_change_fn,
4335 @@ -76,14 +76,14 @@
4336      }
4337  
4338      // (5) Connect clients to their proxies -- consumers first
4339 -    if (verbose) cout << "Connecting consumer clients to proxies" << endl;
4340 +    if (verbose) std::cout << "Connecting consumer clients to proxies" << std::endl;
4341  
4342      for (i = 0; i < 10; i++) {
4343 -      if (verbose) cout << "Connecting Client # " << i+1 << endl;
4344 +      if (verbose) std::cout << "Connecting Client # " << i+1 << std::endl;
4345        if (a_pull_c[i]->connect()) { goto error_return; }
4346      }
4347  
4348 -    if (verbose) cout << "Waiting for all 10 clients to finish" << endl;
4349 +    if (verbose) std::cout << "Waiting for all 10 clients to finish" << std::endl;
4350  
4351      CORBA::Boolean a_com_err[10];
4352      CORBA::Boolean com_err = 0;
4353 @@ -95,10 +95,10 @@
4354      }
4355  
4356      if (com_err && (num_events > 0)) {
4357 -      if (verbose) cout << "Communication error -- probably did not process desired # of events" << endl;
4358 +      if (verbose) std::cout << "Communication error -- probably did not process desired # of events" << std::endl;
4359      }
4360  
4361 -    if (verbose) cout << "Cleaning up" << endl;
4362 +    if (verbose) std::cout << "Cleaning up" << std::endl;
4363  
4364      for (i = 0; i < 10; i++) {
4365        if (!a_com_err[i]) { a_pull_c[i]->cleanup(); }
4366 @@ -107,23 +107,23 @@
4367      goto normal_return;
4368    }
4369    catch(CORBA::SystemException&) {                     
4370 -    cerr << "main caught CORBA::SystemException." << endl;  
4371 +    std::cerr << "main caught CORBA::SystemException." << std::endl;  
4372    }                                                    
4373    catch(CORBA::Exception&) {                           
4374 -    cerr << "main caught CORBA::Exception." << endl;        
4375 +    std::cerr << "main caught CORBA::Exception." << std::endl;        
4376    }                                                    
4377  #if defined(__OMNIORB3__) || defined(__OMNIORB4__)
4378    catch(omniORB::fatalException& fe) {                 
4379 -    cerr << "main caught omniORB::fatalException:" << endl; 
4380 -    cerr << "  file: " << fe.file() << endl;           
4381 -    cerr << "  line: " << fe.line() << endl;           
4382 -    cerr << "  mesg: " << fe.errmsg() << endl;         
4383 +    std::cerr << "main caught omniORB::fatalException:" << std::endl; 
4384 +    std::cerr << "  file: " << fe.file() << std::endl;           
4385 +    std::cerr << "  line: " << fe.line() << std::endl;           
4386 +    std::cerr << "  mesg: " << fe.errmsg() << std::endl;         
4387    }                                                    
4388  #endif
4389    catch(...) {                                         
4390      // nameclt comment says it is a bad idea to report an error here 
4391    }
4392 -  cerr << "main caught an exception." << endl;       
4393 +  std::cerr << "main caught an exception." << std::endl;       
4394   error_return:
4395    // orb->destroy();
4396    return -1;
4397 diff -Naur --exclude=CVS omniNotify-2.1.orig/include/ModFlexLexer.h omniNotify-2.1.new/include/ModFlexLexer.h
4398 --- omniNotify-2.1.orig/include/ModFlexLexer.h  2003-10-23 08:39:11.000000000 +0400
4399 +++ omniNotify-2.1.new/include/ModFlexLexer.h   2009-06-28 17:03:57.000000000 +0400
4400 @@ -31,10 +31,10 @@
4401   
4402  // XXX ModFlexLexer overrides the 2 yylex decls, from
4403  // XXX        int yylex()
4404 -// XXX        int yylex( istream* new_in, ostream* new_out = 0 )
4405 +// XXX        int yylex( std::istream* new_in, std::ostream* new_out = 0 )
4406  // XXX to
4407  // XXX        int yylex(YYSTYPE* lvalp, RDI_PCState* ps)
4408 -// XXX        int yylex(YYSTYPE* lvalp, RDI_PCState* ps, istream* new_in, ostream* new_out = 0 )
4409 +// XXX        int yylex(YYSTYPE* lvalp, RDI_PCState* ps, std::istream* new_in, std::ostream* new_out = 0 )
4410  // XXX 
4411  // XXX It therefore requires these 2 lines:
4412  #include "RDIConstraint.h"
4413 @@ -88,7 +88,8 @@
4414  // Never included before - need to define base class.
4415  #define __FLEX_LEXER_H
4416  
4417 -#include <iostream.h>
4418 +#include <iostream>
4419 +
4420  
4421  extern "C++" {
4422  
4423 @@ -105,16 +106,16 @@
4424         virtual void
4425                 yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
4426         virtual struct yy_buffer_state*
4427 -               yy_create_buffer( istream* s, int size ) = 0;
4428 +               yy_create_buffer( std::istream* s, int size ) = 0;
4429         virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
4430 -       virtual void yyrestart( istream* s ) = 0;
4431 +       virtual void yyrestart( std::istream* s ) = 0;
4432  
4433         virtual int yylex(YYSTYPE* lvalp, RDI_PCState* ps) = 0;
4434         //      virtual int yylex() = 0;
4435  
4436         // Call yylex with new input/output sources.
4437 -       int yylex(YYSTYPE* lvalp, RDI_PCState* ps, istream* new_in, ostream* new_out = 0 )
4438 -       // int yylex( istream* new_in, ostream* new_out = 0 )
4439 +       int yylex(YYSTYPE* lvalp, RDI_PCState* ps, std::istream* new_in, std::ostream* new_out = 0 )
4440 +       // int yylex( std::istream* new_in, std::ostream* new_out = 0 )
4441                 {
4442                 switch_streams( new_in, new_out );
4443                 return yylex(lvalp, ps);
4444 @@ -122,8 +123,8 @@
4445  
4446         // Switch to new input/output streams.  A nil stream pointer
4447         // indicates "keep the current one".
4448 -       virtual void switch_streams( istream* new_in = 0,
4449 -                                       ostream* new_out = 0 ) = 0;
4450 +       virtual void switch_streams( std::istream* new_in = 0,
4451 +                                       std::ostream* new_out = 0 ) = 0;
4452  
4453         int lineno() const              { return yylineno; }
4454  
4455 @@ -150,17 +151,17 @@
4456  public:
4457         // arg_yyin and arg_yyout default to the cin and cout, but we
4458         // only make that assignment when initializing in yylex().
4459 -       yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
4460 +       yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
4461  
4462         virtual ~yyFlexLexer();
4463  
4464         void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
4465 -       struct yy_buffer_state* yy_create_buffer( istream* s, int size );
4466 +       struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
4467         void yy_delete_buffer( struct yy_buffer_state* b );
4468 -       void yyrestart( istream* s );
4469 +       void yyrestart( std::istream* s );
4470  
4471         virtual int yylex(YYSTYPE* lvalp, RDI_PCState* ps);
4472 -       virtual void switch_streams( istream* new_in, ostream* new_out );
4473 +       virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
4474  
4475  protected:
4476         virtual int LexerInput( char* buf, int max_size );
4477 @@ -171,7 +172,7 @@
4478         int yyinput();
4479  
4480         void yy_load_buffer_state();
4481 -       void yy_init_buffer( struct yy_buffer_state* b, istream* s );
4482 +       void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
4483         void yy_flush_buffer( struct yy_buffer_state* b );
4484  
4485         int yy_start_stack_ptr;
4486 @@ -186,8 +187,8 @@
4487         yy_state_type yy_try_NUL_trans( yy_state_type current_state );
4488         int yy_get_next_buffer();
4489  
4490 -       istream* yyin;  // input source for default LexerInput
4491 -       ostream* yyout; // output sink for default LexerOutput
4492 +       std::istream* yyin;     // input source for default LexerInput
4493 +       std::ostream* yyout;    // output sink for default LexerOutput
4494  
4495         struct yy_buffer_state* yy_current_buffer;
4496  
4497 diff -Naur --exclude=CVS omniNotify-2.1.orig/lib/RDIParser_l.cc omniNotify-2.1.new/lib/RDIParser_l.cc
4498 --- omniNotify-2.1.orig/lib/RDIParser_l.cc      2003-10-23 08:39:12.000000000 +0400
4499 +++ omniNotify-2.1.new/lib/RDIParser_l.cc       2009-06-28 17:06:28.000000000 +0400
4500 @@ -53,7 +53,7 @@
4501  #ifdef __cplusplus
4502  
4503  #include <stdlib.h>
4504 -#include <iostream.h>
4505 +#include <iostream>
4506  
4507  /* Use prototypes in function declarations. */
4508  #define YY_USE_PROTOS
4509 @@ -172,7 +172,7 @@
4510  
4511  struct yy_buffer_state
4512         {
4513 -       istream* yy_input_file;
4514 +       std::istream* yy_input_file;
4515  
4516         char *yy_ch_buf;                /* input buffer */
4517         char *yy_buf_pos;               /* current position in input buffer */
4518 @@ -1764,10 +1764,10 @@
4519                         yy_start = 1;   /* first start state */
4520  
4521                 if ( ! yyin )
4522 -                       yyin = &cin;
4523 +                       yyin = &std::cin;
4524  
4525                 if ( ! yyout )
4526 -                       yyout = &cout;
4527 +                       yyout = &std::cout;
4528  
4529                 if ( ! yy_current_buffer )
4530                         yy_current_buffer =
4531 @@ -2123,7 +2123,7 @@
4532                 } /* end of scanning one token */
4533         } /* end of yylex */
4534  
4535 -yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
4536 +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
4537         {
4538         yyin = arg_yyin;
4539         yyout = arg_yyout;
4540 @@ -2157,7 +2157,7 @@
4541         yy_delete_buffer( yy_current_buffer );
4542         }
4543  
4544 -void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
4545 +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
4546         {
4547         if ( new_in )
4548                 {
4549 @@ -2497,7 +2497,7 @@
4550         }
4551  
4552  
4553 -void yyFlexLexer::yyrestart( istream* input_file )
4554 +void yyFlexLexer::yyrestart( std::istream* input_file )
4555         {
4556         if ( ! yy_current_buffer )
4557                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
4558 @@ -2541,7 +2541,7 @@
4559         }
4560  
4561  
4562 -YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
4563 +YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
4564         {
4565         YY_BUFFER_STATE b;
4566  
4567 @@ -2582,7 +2582,7 @@
4568  
4569  
4570  extern "C" int isatty YY_PROTO(( int ));
4571 -void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
4572 +void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
4573  
4574         {
4575         yy_flush_buffer( b );
4576 @@ -2681,7 +2681,7 @@
4577  
4578  void yyFlexLexer::LexerError( yyconst char msg[] )
4579         {
4580 -       cerr << msg << '\n';
4581 +       std::cerr << msg << '\n';
4582         exit( YY_EXIT_FAILURE );
4583         }
4584