Fix build on -CURRENT.

Approved by:	mbr
This commit is contained in:
Alexander Kabaev 2002-10-21 21:26:57 +00:00
parent daa8493eeb
commit 865128706b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=68541
6 changed files with 127 additions and 1 deletions

View File

@ -70,5 +70,6 @@
+MKDEPEND=$(TCM_HOME)/bin/makedepend.sh
+MKDEPENDFLAGS := $(CPPFLAGS) -D__i386__ -I/usr/include/g++-3 \
+ -I/usr/include/g++-2 \
+ -I/usr/include/g++
+ -I/usr/include/g++ \
+ -I/usr/include/g++/backward
+

View File

@ -0,0 +1,65 @@
--- src/gl/inputfile.c.orig Sat Oct 19 21:37:26 2002
+++ src/gl/inputfile.c Sat Oct 19 21:37:53 2002
@@ -51,7 +51,7 @@
}
void InputFile::SkipLine() {
- unsigned char c;
+ char c;
while (!ifile->eof()) {
ifile->get(c);
if (c == '\n') {
@@ -62,7 +62,7 @@
}
int InputFile::ReadChar() {
- unsigned char c;
+ char c;
while (!ifile->eof()) {
ifile->get(c);
if (c == '\n')
@@ -78,7 +78,7 @@
}
bool InputFile::LookupChar(const char c) {
- unsigned char c2;
+ char c2;
while (!ifile->eof()) {
ifile->get(c2);
if (c2 == '\n')
@@ -100,7 +100,7 @@
bool InputFile::LookupWord(const string *word) {
string word2;
- unsigned char c;
+ char c;
// skip white space and comment.
do {
if (ifile->eof())
@@ -138,7 +138,7 @@
bool InputFile::LookupString(const string *s) {
string string2;
- unsigned char c;
+ char c;
bool escaped = False;
if (!LookupChar('"'))
return False;
@@ -179,7 +179,7 @@
}
bool InputFile::ReadWord(string *word) {
- unsigned char c;
+ char c;
*word = "";
// skip white space and comment.
do {
@@ -211,7 +211,7 @@
}
bool InputFile::ReadString(string *s) {
- unsigned char c;
+ char c;
*s = "";
bool escaped = False;
if (!LookupChar('"'))

View File

@ -0,0 +1,13 @@
--- src/gl/point.c.orig Sat Oct 19 21:32:33 2002
+++ src/gl/point.c Sat Oct 19 21:33:30 2002
@@ -41,8 +41,8 @@
bool operator!=(const Point &p1, const Point &p2) {
return (p1.x != p2.x || p1.y != p2.y); }
-ostream &operator<<(ostream &o, const Point p)
+std::ostream &operator<<(std::ostream &o, const Point p)
{o << p.x << " "; o << p.y; return o;}
-istream &operator>>(istream &i, Point &p)
+std::istream &operator>>(std::istream &i, Point &p)
{i >> p.x; i >> p.y; return i;}

View File

@ -0,0 +1,15 @@
--- src/gl/point.h.orig Sat Oct 19 21:32:28 2002
+++ src/gl/point.h Sat Oct 19 21:33:12 2002
@@ -74,10 +74,10 @@
void operator*(double c) {x = int(x*c); y = int(y*c);}
/// Write string representation to ostream.
- friend ostream &operator<<(ostream &o, const Point p);
+ friend std::ostream &operator<<(std::ostream &o, const Point p);
/// Read string representation from istream.
- friend istream &operator>>(istream &i, Point &p);
+ friend std::istream &operator>>(std::istream &i, Point &p);
/// the x-coordinate.
int x;

View File

@ -0,0 +1,17 @@
--- src/gl/rectangle.c.orig Sat Oct 19 21:33:51 2002
+++ src/gl/rectangle.c Sat Oct 19 21:34:21 2002
@@ -26,12 +26,12 @@
bool Rectangle::Inside(int a, int b) const
{return (a>x && b>y && a<(x+width) && b<(y+height));}
-ostream &operator<<(ostream &s, const Rectangle r)
+std::ostream &operator<<(std::ostream &s, const Rectangle r)
{s << r.x << " "; s << r.y << " ";
s << r.width << " "; s << r.height << " ";
return s;}
-istream &operator>>(istream &s, Rectangle &r)
+std::istream &operator>>(std::istream &s, Rectangle &r)
{s >> r.x; s >> r.y;
s >> r.width; s >> r.height;
return s;}

View File

@ -0,0 +1,15 @@
--- src/gl/rectangle.h.orig Sat Oct 19 21:33:45 2002
+++ src/gl/rectangle.h Sat Oct 19 21:34:44 2002
@@ -80,10 +80,10 @@
friend bool operator!=(const Rectangle &x, const Rectangle &y);
/// Write string representation to ostream.
- friend ostream &operator<<(ostream &s, const Rectangle r);
+ friend std::ostream &operator<<(std::ostream &s, const Rectangle r);
/// Read string representation from istream.
- friend istream &operator>>(istream &s, Rectangle &r);
+ friend std::istream &operator>>(std::istream &s, Rectangle &r);
/// the left x-coordinate of the rectangle
int x;