Use proper namespace for iostream classes
authorarjen <arjen>
Mon, 4 Nov 2002 07:24:31 +0000 (07:24 +0000)
committerarjen <arjen>
Mon, 4 Nov 2002 07:24:31 +0000 (07:24 +0000)
demos/acltest.cpp
demos/testaxe.cpp
src/amount.cpp
src/display.h
src/font.cpp
src/font.h
src/integer.cpp
src/integer.h
src/money.h
src/pixmap.h

index 46743a9..c577a61 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : acltest.cpp
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.5 $
+**      VERSION NUMBER : $Revision: 1.6 $
 **
 **  DESCRIPTION      :  Test routine for non-X classes
 **
 
 /*****************************
    $Log: acltest.cpp,v $
-   Revision 1.5  2002-11-03 13:19:33  arjen
+   Revision 1.6  2002-11-04 07:25:00  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.5  2002/11/03 13:19:33  arjen
    New functions - String::escape() and String::unescape()
 
    Revision 1.4  2002/09/26 14:48:46  arjen
@@ -40,7 +43,7 @@
 
 *****************************/
 
-static const char *RCSID = "$Id: acltest.cpp,v 1.5 2002-11-03 13:19:33 arjen Exp $";
+static const char *RCSID = "$Id: acltest.cpp,v 1.6 2002-11-04 07:25:00 arjen Exp $";
 
 #include "String.h"
 #include "integer.h" 
@@ -96,10 +99,10 @@ int main()
    std::cout << x << " >> 3 = " << y << "\n";
 
    std::cout << "\nInput a string:\n";
-   cin >> hello;
+   std::cin >> hello;
    std::cout << hello << "\n\n";
    std::cout << "\nAnd another one:\n";
-   cin >> pattern;
+   std::cin >> pattern;
    std::cout << pattern << "\n\n";
    std::cout << "Second string found at position " << pattern.in(hello);
    std::cout << " of first string.\n";
@@ -142,7 +145,7 @@ int main()
    
    String datestring;
 
-   cin  >> datestring;
+   std::cin  >> datestring;
    d2 = date(datestring);
 
    std::cout << datestring << " parses into (DD-MM-YYYY): " << d2 << "\n";
@@ -177,7 +180,7 @@ int main()
    std::cout << "With 10,50,30: " << t1 << "\n";
    std::cout << "Enter a time: \n";
 
-   cin  >> datestring;
+   std::cin  >> datestring;
    t2 = hour(datestring);
 
    std::cout << datestring << " parses into (HH:MM:SS): " << t2 << "\n";
index 1bcefe4..b514d2a 100644 (file)
@@ -43,8 +43,8 @@ public:
 
    virtual int EV_Expose(XExposeEvent ev)
    {
-      DrawString(white_gc, 100, 30, "Andromeda X Windows Encapsulation");
-      DrawString(white_gc, 120, 90, "Version 0.2 - July 25, 2002");
+      DrawString(white_gc, 110, 30, "Andromeda X Windows Encapsulation");
+      DrawString(white_gc, 110, 95, "Version 0.3 - November 05, 2002");
       return 1;
    }
 
@@ -240,7 +240,7 @@ int xapp::DoCommand(int code)
       return 1;
 
    case FILE_OPEN:
-      cout << "Opening " << FileDialog->PathName() << "\n";
+      std::cout << "Opening " << FileDialog->PathName() << "\n";
       save_item->Enable(1);
       return 1;
 
index 834813f..af5e888 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : amount.cpp
 **      SYSTEM NAME    : Andromeda X-Windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  Financial classes : amount
 **
 
 /*****************************
    $Log: amount.cpp,v $
-   Revision 1.1  2002-07-25 08:01:26  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:26  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-static const char RCSID[] = "$Id: amount.cpp,v 1.1 2002-07-25 08:01:26 arjen Exp $";
+static const char RCSID[] = "$Id: amount.cpp,v 1.2 2002-11-04 07:24:31 arjen Exp $";
 
 #include "money.h"
 
-istream &operator>>(istream &s, amount &a)
+std::istream &operator>>(std::istream &s, amount &a)
 {
    long   hundreds;
    char   c;
@@ -43,7 +46,7 @@ istream &operator>>(istream &s, amount &a)
    return s;
 }
 
-ostream &operator<<(ostream &s, amount a)
+std::ostream &operator<<(std::ostream &s, amount a)
 {
    if (a == 0)
    {
index cc65b94..cd57035 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : display.h
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      : Definition of display class 
 **
 
 /*****************************
    $Log: display.h,v $
-   Revision 1.1  2002-07-25 08:01:26  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:26  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-/* static const char *RCSID = "$Id: display.h,v 1.1 2002-07-25 08:01:26 arjen Exp $"; */
+/* static const char *RCSID = "$Id: display.h,v 1.2 2002-11-04 07:24:31 arjen Exp $"; */
 
 #ifndef _DISPLAY_H
 #define _DISPLAY_H
 
-#include <iostream.h>
+#include <iostream>
 #include <X11/Xlib.h>
 
 /*
index 227e352..1a906f3 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : font.cpp
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  Implementation of font class
 **
 
 /*****************************
    $Log: font.cpp,v $
-   Revision 1.1  2002-07-25 08:01:26  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:26  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-static const char *RCSID = "$Id: font.cpp,v 1.1 2002-07-25 08:01:26 arjen Exp $";
+static const char *RCSID = "$Id: font.cpp,v 1.2 2002-11-04 07:24:31 arjen Exp $";
 
 #include <string.h>
 #include "font.h"
 
-int font::TextWidth(char *string, int length = 0)
+int font::TextWidth(char *string, int length)
 {
    if (length == 0)
    {
index 1a2510d..c4455d9 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : font.h
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      : Definition of font class 
 **
 
 /*****************************
    $Log: font.h,v $
-   Revision 1.1  2002-07-25 08:01:26  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:26  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-/* static const char *RCSID = "$Id: font.h,v 1.1 2002-07-25 08:01:26 arjen Exp $"; */
+/* static const char *RCSID = "$Id: font.h,v 1.2 2002-11-04 07:24:31 arjen Exp $"; */
 
 #include <iostream>
 #include <X11/Xlib.h>
@@ -67,7 +70,7 @@ public:
       fs = XLoadQueryFont(stddpy.Dpy(), name);
       if (fs == NULL)
       {
-         cerr << "Warnig: can not open font " << name << "\n";
+         std::cerr << "Warnig: can not open font " << name << "\n";
       }
    }
 
@@ -89,7 +92,7 @@ public:
       fs = XLoadQueryFont(stddpy.Dpy(), name);
       if (fs == NULL)
       {
-         cerr << "Warnig: can not open font " << name << "\n";
+         std::cerr << "Warnig: can not open font " << name << "\n";
       }
    }
 
index 131ac74..f3d5cbe 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : integer.cpp
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  
 **
 
 /*****************************
    $Log: integer.cpp,v $
-   Revision 1.1  2002-07-25 08:01:27  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:27  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-static const char *RCSID = "$Id: integer.cpp,v 1.1 2002-07-25 08:01:27 arjen Exp $";
+static const char *RCSID = "$Id: integer.cpp,v 1.2 2002-11-04 07:24:31 arjen Exp $";
 
 
 #include "integer.h"
@@ -53,7 +56,7 @@ integer integer::operator+(integer &a) // Add a to *this
    return r;
 }
 
-ostream& operator<<(ostream &s, integer &i)
+std::ostream& operator<<(std::ostream &s, integer &i)
 {
    int j;
 
@@ -64,7 +67,7 @@ ostream& operator<<(ostream &s, integer &i)
    return s;
 }
 
-istream& operator>>(istream &s, integer &i)
+std::istream& operator>>(std::istream &s, integer &i)
 {
    return s;
 }
index fa1f115..859079b 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : integer.h
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  Arbitrary length integer
 **
 
 /*****************************
    $Log: integer.h,v $
-   Revision 1.1  2002-07-25 08:01:27  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:27  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-/* static const char *RCSID = "$Id: integer.h,v 1.1 2002-07-25 08:01:27 arjen Exp $"; */
+/* static const char *RCSID = "$Id: integer.h,v 1.2 2002-11-04 07:24:31 arjen Exp $"; */
 
 
-#include <stream.h>
+#include <iostream>
 
 /*
  *  The integer class (not int !) implements an arbitrary length
@@ -81,6 +84,6 @@ public:
 //   operator<<()
 //   operator>>()
 
-   friend ostream& operator<<(ostream&, integer&);
-   friend istream& operator>>(istream&, integer&);
+   friend std::ostream& operator<<(std::ostream&, integer&);
+   friend std::istream& operator>>(std::istream&, integer&);
 };
index 44f7010..9689679 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : money.h
 **      SYSTEM NAME    : Andromeda X-Windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  Financial classes
 **
 
 /*****************************
    $Log: money.h,v $
-   Revision 1.1  2002-07-25 08:01:27  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:27  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-// static const char RCSID[] = "$Id: money.h,v 1.1 2002-07-25 08:01:27 arjen Exp $";
+// static const char RCSID[] = "$Id: money.h,v 1.2 2002-11-04 07:24:31 arjen Exp $";
 
 #ifndef MONEY_H
 #define MONEY_H
 
 #include <math.h>
-#include <iostream.h>
+#include <iostream>
 #include "String.h"
 
 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -114,8 +117,8 @@ public:
       return *this;
    }
 
-   friend istream &operator>>(istream&, amount &);
-   friend ostream &operator<<(ostream&, amount);
+   friend std::istream &operator>>(std::istream&, amount &);
+   friend std::ostream &operator<<(std::ostream&, amount);
 
 };
 
index 08f605f..a3f84cb 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : pixmap.h
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      : Definition of pixmap classes: pixmap, bitmap
 **
 
 /*****************************
    $Log: pixmap.h,v $
-   Revision 1.1  2002-07-25 08:01:27  arjen
+   Revision 1.2  2002-11-04 07:24:31  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/07/25 08:01:27  arjen
    First checkin, AXE release 0.2
 
 *****************************/
 
-/* static const char *RCSID = "$Id: pixmap.h,v 1.1 2002-07-25 08:01:27 arjen Exp $"; */
+/* static const char *RCSID = "$Id: pixmap.h,v 1.2 2002-11-04 07:24:31 arjen Exp $"; */
 
 #ifndef AXE_PIXMAP_H
 #define AXE_PIXMAP_H
@@ -114,7 +117,7 @@ extern pixmap nopicture;
       error = XpmReadFileToPixmap(stddpy, stddpy.Root(), filename, &pixm, NULL, &attr);
       if (error != XpmSuccess)
       {
-         cerr << "Error " << error << " reading XPM file " << filename << "\n";
+         std::cerr << "Error " << error << " reading XPM file " << filename << "\n";
          pixm = nopicture.pixm;
          w = nopicture.w;
          h = nopicture.h;