1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
$NetBSD: patch-aq,v 1.2 2003/10/01 01:14:35 christos Exp $
--- xwin.cc.orig 1999-02-16 09:08:34.000000000 -0500
+++ xwin.cc 2003-09-30 20:47:37.000000000 -0400
@@ -5,2 +5,3 @@
#include <X11/Xatom.h>
+#include <iostream>
#include <stdlib.h>
@@ -24,4 +25,4 @@
XWin::XWin( int argc, char *argv[], int x, int y, int width, int height ){
- cerr << "This constructor call is not supported! (" << __FILE__
- << ":" << __LINE__ << ")" << endl;
+ std::cerr << "This constructor call is not supported! (" << __FILE__
+ << ":" << __LINE__ << ")" << std::endl;
exit (-1);
@@ -136,3 +137,3 @@
if(XGetWindowAttributes(display_, window_, &attr_) == 0){
- cerr <<"Error getting attributes of Main." <<endl;
+ std::cerr <<"Error getting attributes of Main." <<std::endl;
exit(2);
@@ -156,4 +157,4 @@
if ((font_ = XLoadQueryFont(display_, fontName)) == NULL){
- cerr <<name_ <<": display " <<DisplayString(display_)
- <<" cannot load font " << fontName << endl;
+ std::cerr <<name_ <<": display " <<DisplayString(display_)
+ <<" cannot load font " << fontName << std::endl;
exit(1);
@@ -166,3 +167,3 @@
if((classhints_ = XAllocClassHint()) == NULL){
- cerr <<"Error allocating class hint!" <<endl;
+ std::cerr <<"Error allocating class hint!" <<std::endl;
exit(1);
@@ -175,3 +176,3 @@
if((wmhints_ = XAllocWMHints()) == NULL){
- cerr <<"Error allocating Window Manager hints!" <<endl;
+ std::cerr <<"Error allocating Window Manager hints!" <<std::endl;
exit(1);
@@ -184,3 +185,3 @@
if(XStringListToTextProperty(&name_, 1, &title_) == 0){
- cerr <<"Error creating XTextProperty!" <<endl;
+ std::cerr <<"Error creating XTextProperty!" <<std::endl;
exit(1);
@@ -188,3 +189,3 @@
if(XStringListToTextProperty(&name_, 1, &iconname_) == 0){
- cerr <<"Error creating XTextProperty!" <<endl;
+ std::cerr <<"Error creating XTextProperty!" <<std::endl;
exit(1);
@@ -206,3 +207,3 @@
if ((display_ = XOpenDisplay (display_name_)) == NULL) {
- cerr <<"Can't open display named " << display_name_ <<endl;
+ std::cerr <<"Can't open display named " << display_name_ <<std::endl;
exit(1);
@@ -253,4 +254,4 @@
{
- cerr << "Pixmap " << pixmap_file << " not found" << endl;
- cerr << "Defaulting to blank" << endl;
+ std::cerr << "Pixmap " << pixmap_file << " not found" << std::endl;
+ std::cerr << "Defaulting to blank" << std::endl;
pixmap=NULL;
@@ -263,3 +264,3 @@
(void) pixmap;
- cerr << "Error: getPixmap called, when Xpm is not enabled!\n" ;
+ std::cerr << "Error: getPixmap called, when Xpm is not enabled!\n" ;
return 0;
@@ -275,3 +276,3 @@
if((sizehints_ = XAllocSizeHints()) == NULL){
- cerr <<"Error allocating size hints!" <<endl;
+ std::cerr <<"Error allocating size hints!" <<std::endl;
exit(1);
@@ -352,3 +353,3 @@
// FIXME We need to update this. BCG
- cerr <<name_ <<" [-display name] [-geometry geom]" <<endl;
+ std::cerr <<name_ <<" [-display name] [-geometry geom]" <<std::endl;
// exit (1);
@@ -388,3 +389,3 @@
{
- cerr << "Error: Couldn't find '" << name << "' resource in the resource database!\n";
+ std::cerr << "Error: Couldn't find '" << name << "' resource in the resource database!\n";
exit (-1);
@@ -397,4 +398,4 @@
-void XWin::dumpResources( ostream &os ){
-cerr << "Function not implemented!\n"; // BCG FIXME Need to make this.
+void XWin::dumpResources( std::ostream &os ){
+std::cerr << "Function not implemented!\n"; // BCG FIXME Need to make this.
(void) os; // Keep gcc happy.
@@ -407,3 +408,3 @@
if ( XAllocNamedColor( display_, colormap(), name, &closest, &exact ) == 0 )
- cerr <<"XWin::allocColor() : failed to alloc : " <<name <<endl;
+ std::cerr <<"XWin::allocColor() : failed to alloc : " <<name <<std::endl;
@@ -506,3 +507,3 @@
default:
- cerr <<"XWin::Event::Event() : unknown event type : " <<event_ <<endl;
+ std::cerr <<"XWin::Event::Event() : unknown event type : " <<event_ <<std::endl;
mask_ = NoEventMask;
--- xwin.h.orig 1999-02-16 09:08:35.000000000 -0500
+++ xwin.h 2003-09-30 20:41:12.000000000 -0400
@@ -11,3 +11,3 @@
#endif
-#include <iostream.h>
+#include <iostream>
#include <string.h>
@@ -99,3 +99,3 @@
return (!strncasecmp(getResource(name),"True", 5)); }
- void dumpResources( ostream &os );
+ void dumpResources(std::ostream &os );
@@ -107,3 +107,3 @@
- friend XWin;
+ friend class XWin;
|