--- tuxeyes-0.0.3.orig/src/tuXeyes.cpp
+++ tuxeyes-0.0.3/src/tuXeyes.cpp
@@ -39,7 +39,7 @@
  *	  inTUXicated?
  *	  cpu expensive: draw eyes on eyeregion, then scale?
  */
-#include <iostream.h>
+#include <iostream>
 
 #include <qapplication.h>
 #include <qpainter.h>
@@ -182,7 +182,7 @@
 	myY = global.y();
 
 #ifdef DEBUG
-	cout << "Avg = " << avg << endl;
+	std::cout << "Avg = " << avg << std::endl;
 #endif
 	// get the X and Y differences and calculate the length
 	// of the hypotenuse
@@ -202,7 +202,7 @@
 	if(hypotenuse < tuxImg->getLeftPupilRadius()*avg)
 	{
 #ifdef DEBUG
-		cout << "In range" << endl;
+		std::cout << "In range" << std::endl;
 #endif
 		leftX = tuxImg->getLeftEyeX() - diffX;
 		leftY = tuxImg->getLeftEyeY() - diffY;
@@ -212,13 +212,15 @@
 	else
 #endif
 	{
-		leftX = tuxImg->getLeftEyeX() - diffX/ratio;
-		leftY = tuxImg->getLeftEyeY() - diffY/ratio;
-
-		// properly rescale these values as the image size
-		// may have changed
-		leftX *= xScale;
-		leftY *= yScale;
+		if(ratio != 0) {
+			leftX = tuxImg->getLeftEyeX() - diffX/ratio;
+			leftY = tuxImg->getLeftEyeY() - diffY/ratio;
+
+			// properly rescale these values as the image size
+			// may have changed
+			leftX *= xScale;
+			leftY *= yScale;
+		}
 	}
 
 	/*
@@ -235,7 +237,7 @@
 	if(hypotenuse < tuxImg->getRightPupilRadius()*avg)
 	{
 #ifdef DEBUG
-		cout << "In range" << endl;
+		std::cout << "In range" << std::endl;
 #endif
 		rightX = tuxImg->getRightEyeX() - diffX;
 		rightY = tuxImg->getRightEyeY() - diffY;
@@ -248,15 +250,17 @@
 	else
 #endif
 	{
-		rightX = tuxImg->getRightEyeX() - diffX/ratio;
-		rightY = tuxImg->getRightEyeY() - diffY/ratio;
-		rightX *= xScale;
-		rightY *= yScale;
+		if(ratio != 0) {
+			rightX = tuxImg->getRightEyeX() - diffX/ratio;
+			rightY = tuxImg->getRightEyeY() - diffY/ratio;
+			rightX *= xScale;
+			rightY *= yScale;
+		}
 	}
 
 #ifdef DEBUG
-	cout << "leftX : " << leftX << " leftY " << leftY << endl;
-	cout << "rightX : " << rightX << " rightY " << rightY << endl;
+	std::cout << "leftX : " << leftX << " leftY " << leftY << std::endl;
+	std::cout << "rightX : " << rightX << " rightY " << rightY << std::endl;
 #endif
 
 	paintEyes();
@@ -265,8 +269,8 @@
 void	tuxWidget::resizeEvent(QResizeEvent *size)
 {
 #ifdef DEBUG
-	cout << "Resize event: " << size->size().width() 
-	     << "x" << size->size().height() << endl;
+	std::cout << "Resize event: " << size->size().width() 
+	     << "x" << size->size().height() << std::endl;
 #endif
 
 	int newWidth = size->size().width();
@@ -285,7 +289,7 @@
 
 
 #ifdef DEBUG
-	cout << "xScale = " << xScale << " yScale = " << yScale << endl;
+	std::cout << "xScale = " << xScale << " yScale = " << yScale << std::endl;
 #endif
 	tuxImg->rescale(xScale, yScale);
 
@@ -298,7 +302,7 @@
 void	tuxWidget::keyPressEvent(QKeyEvent *e)
 {
 #ifdef DEBUG
-	cout << "Key pressed!" << (char)e->ascii() << endl;
+	std::cout << "Key pressed!" << (char)e->ascii() << std::endl;
 #endif
 	if(e->ascii() == 'q' || e->ascii() == 'Q')
 		QApplication::exit(0);
@@ -306,36 +310,37 @@
 
 void	print_license()
 {
-	cout << "Copyright (c) 1999 Ivo van der Wijk
-
-The tux image is (c) Larry Ewing (lewing@isc.tamu.edu)
-The dustpuppy image is (c) Illiad (http://www.userfriendly.org)
-The bsd daemon (\"Chuck\") is (c) Eric Green
-The luxus image is (c) Urs M. E. Streidl (http://www.gigaperls.org/linux/)
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
-derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." << endl;
+	std::cout
+		<< "Copyright (c) 1999 Ivo van der Wijk" << std::endl
+		<< std::endl
+		<< "The tux image is (c) Larry Ewing (lewing@isc.tamu.edu)" << std::endl
+		<< "The dustpuppy image is (c) Illiad (http://www.userfriendly.org)" << std::endl
+		<< "The bsd daemon (\"Chuck\") is (c) Eric Green" << std::endl
+		<< "The luxus image is (c) Urs M. E. Streidl (http://www.gigaperls.org/linux/)" << std::endl
+		<< std::endl
+		<< "All rights reserved." << std::endl
+		<< std::endl
+		<< "Redistribution and use in source and binary forms, with or without" << std::endl
+		<< "modification, are permitted provided that the following conditions" << std::endl
+		<< "are met:" << std::endl
+		<< "1. Redistributions of source code must retain the above copyright" << std::endl
+		<< "notice, this list of conditions and the following disclaimer." << std::endl
+		<< "2. Redistributions in binary form must reproduce the above copyright" << std::endl
+		<< "notice, this list of conditions and the following disclaimer in the" << std::endl
+		<< "documentation and/or other materials provided with the distribution." << std::endl
+		<< "3. The name of the author may not be used to endorse or promote products" << std::endl
+		<< "derived from this software without specific prior written permission." << std::endl
+		<< std::endl
+		<< "THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR" << std::endl
+		<< "IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES" << std::endl
+		<< "OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED." << std::endl
+		<< "IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT," << std::endl
+		<< "INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT" << std::endl
+		<< "NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE," << std::endl
+		<< "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY" << std::endl
+		<< "THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT" << std::endl
+		<< "(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF" << std::endl
+		<< "THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." << std::endl;
 	exit(0);
 }
 
@@ -347,11 +352,11 @@
 	tuxWidget *w = NULL;
 	int	result;
 
-	cout << "tuXeyes version " << VERSION << " is (c) 1999 Ivo van der Wijk"
-	     << " (tuxeyes@zero.xs4all.nl)" << endl
-	     << "Check http://zero.xs4all.nl/~ivo/tuXeyes/ for more info" 
-	     << " and updates." << endl
-	     << "Type tuXeyes --help for options and other figures!" << endl;
+	std::cout << "tuXeyes version " << VERSION << " is (c) 1999 Ivo van der Wijk"
+	     << " (tuxeyes@vanderwijk.info)" << std::endl
+	     << "Check http://vanderwijk.info/tuXeyes/ for more info" 
+	     << " and updates." << std::endl
+	     << "Type tuXeyes --help for options and other figures!" << std::endl;
 	
 	/*
 	 * So you can multiple -tux -luxus parameters..
@@ -372,24 +377,23 @@
 		else if(!strcasecmp(_argv[i], "--help") ||
 		        !strcasecmp(_argv[i], "-h"))
 		{
-			cout << " " << endl;
-			cout << "Available options:" << endl
-			  << "-h, --help  This help" << endl
-			  << "--license   Print tuXeyes' license and exit." << endl
-			  << "--tux       Start with standard tux figure"<<endl
-			  << "--luxus     Start with luxus figure" << endl
-			  << "--chuck     Start with Chuck, the bsd daemon figure" << endl
-			  << "--puppy     Start with dustpuppy figure" << endl
-			  << endl
-			  << "tuXeyes also accepts standard X options such"
-			  << " as -geometry, -display, -name, -title, etc." 
-			  << endl;
+			std::cout << " " << std::endl;
+			std::cout << "Available options:" << std::endl
+			  << "-h, --help  This help" << std::endl
+			  << "--license   Print tuXeyes' license and exit." << std::endl
+			  << "--tux       Start with standard tux figure" << std::endl
+			  << "--luxus     Start with luxus figure" << std::endl
+			  << "--chuck     Start with Chuck, the bsd daemon figure" << std::endl
+			  << "--puppy     Start with dustpuppy figure" << std::endl
+			  << std::endl
+			  << "tuXeyes also accepts standard X options such" << std::endl
+			  << " as -geometry, -display, -name, -title, etc." << std::endl;
 			exit(0);
 		}
 		else
 		{
-			cerr << " " << endl
-			     << "Unknown parameter " << _argv[i] << endl;
+			std::cerr << " " << std::endl
+			     << "Unknown parameter " << _argv[i] << std::endl;
 			exit(-1);
 		}
 	}
