***********************
** 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
*****************************/
-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"
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";
String datestring;
- cin >> datestring;
+ std::cin >> datestring;
d2 = date(datestring);
std::cout << datestring << " parses into (DD-MM-YYYY): " << d2 << "\n";
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";
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;
}
return 1;
case FILE_OPEN:
- cout << "Opening " << FileDialog->PathName() << "\n";
+ std::cout << "Opening " << FileDialog->PathName() << "\n";
save_item->Enable(1);
return 1;
***********************
** 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;
return s;
}
-ostream &operator<<(ostream &s, amount a)
+std::ostream &operator<<(std::ostream &s, amount a)
{
if (a == 0)
{
***********************
** 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>
/*
***********************
** 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)
{
***********************
** 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>
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";
}
}
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";
}
}
***********************
** 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"
return r;
}
-ostream& operator<<(ostream &s, integer &i)
+std::ostream& operator<<(std::ostream &s, integer &i)
{
int j;
return s;
}
-istream& operator>>(istream &s, integer &i)
+std::istream& operator>>(std::istream &s, integer &i)
{
return s;
}
***********************
** 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
// 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&);
};
***********************
** 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"
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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);
};
***********************
** 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
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;