Index: /issm/trunk/src/c/modules/Ll2xyx/Ll2xyx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 8688)
+++ /issm/trunk/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 8689)
@@ -28,5 +28,5 @@
 
 	double  delta,slat;
-	bool    flag=false;
+	bool    flag=true;
 
 	/*  Get central_meridian and standard_parallel depending on hemisphere  */
@@ -34,16 +34,16 @@
 		delta = 45;
 		slat = 70;
-		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45)");
+		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");
 	}
 	else if (sgn == -1) {
 		delta = 0;
 		slat = 71;
-		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0)");
+		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
 	}
 	else
-		_error_("Sign should be either +1 or -1");
+		_error_("Sign should be either +1 or -1.\n");
 
-	return(Ll2xyx(lat,lon,
-				  x,y,ncoord,
+	return(Ll2xyx(x,y,
+				  lat,lon,ncoord,
 				  sgn,delta,slat));
 }
@@ -68,5 +68,5 @@
 */
 
-	int     i;
+	int     i,iret=0;
 	double  delta,slat;
 	double  cde,re,ex2,ex,pi;
@@ -75,5 +75,5 @@
 
 	if      ((sgn !=  1) && (sgn != -1))
-		_error_("Sign should be either +1 or -1");
+		_error_("Sign should be either +1 or -1.\n");
 
 	delta = central_meridian;
@@ -109,14 +109,15 @@
 		}
 
-		y[i] = -rho * sgn * cos(sgn*longitude);
-		x[i] =  rho * sgn * sin(sgn*longitude);
+		y[i] = -rho * (double)sgn * cos((double)sgn*longitude);
+		x[i] =  rho * (double)sgn * sin((double)sgn*longitude);
 
 		if (latitude >= pi / 2.) {
 			x[i] = 0.0;
 			y[i] = 0.0;
+			iret=1;
 		}
 	}
 
-	return(0);
+	return(iret);
 }
 
Index: /issm/trunk/src/c/modules/Xy2llx/Xy2llx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 8688)
+++ /issm/trunk/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 8689)
@@ -29,5 +29,5 @@
 
 	double  delta,slat;
-	bool    flag=false;
+	bool    flag=true;
 
 	/*  Get central_meridian and standard_parallel depending on hemisphere  */
@@ -35,13 +35,13 @@
 		delta = 45;
 		slat = 70;
-		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45)");
+		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");
 	}
 	else if (sgn == -1) {
 		delta = 0;
 		slat = 71;
-		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0)");
+		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
 	}
 	else
-		_error_("Sign should be either +1 or -1");
+		_error_("Sign should be either +1 or -1.\n");
 
 	return(Xy2llx(lat,lon,
@@ -70,5 +70,5 @@
 */
 
-	int     i;
+	int     i,iret=0;
 	double  delta,slat;
 	double  cde,re,ex2,ex,pi;
@@ -76,5 +76,5 @@
 
 	if      ((sgn !=  1) && (sgn != -1))
-		_error_("Sign should be either +1 or -1");
+		_error_("Sign should be either +1 or -1.\n");
 
 	delta = central_meridian;
@@ -117,4 +117,5 @@
 			lat[i] = 90. * (double)sgn;
 			lon[i] = 0.0;
+			iret=1;
 		}
 
@@ -124,5 +125,5 @@
 	}
 
-	return(0);
+	return(iret);
 }
 
Index: /issm/trunk/src/mex/Ll2xy/Ll2xy.cpp
===================================================================
--- /issm/trunk/src/mex/Ll2xy/Ll2xy.cpp	(revision 8688)
+++ /issm/trunk/src/mex/Ll2xy/Ll2xy.cpp	(revision 8689)
@@ -18,4 +18,5 @@
 	/* output: */
 	double  *x=NULL,*y=NULL;
+	int     iret=0;
 
 	/*Boot module: */
@@ -38,8 +39,10 @@
 		if   (nlat == 1) printf("  lat=%g\n",lat[0]);
 		else             printf("  lat=[%d values]\n",nlat);
+//	for (i=0; i<nlat; i++) printf("  lat[%d]=%g\n",i,lat[i]);
 	FetchData(&lon,&nlon,LON_IN);
 	if (verbose)
 		if   (nlon == 1) printf("  lon=%g\n",lon[0]);
 		else             printf("  lon=[%d values]\n",nlon);
+//	for (i=0; i<nlon; i++) printf("  lon[%d]=%g\n",i,lon[i]);
 	FetchData(&sgn,SGN_IN);
 	if (verbose) printf("  sgn=%d\n",sgn);
@@ -71,11 +74,12 @@
 	if (verbose) printf("Calling core:\n");
 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
-		Ll2xyx(x,y,
-			   lat,lon,ncoord,
-			   sgn,cm,sp);
+		iret=Ll2xyx(x,y,
+					lat,lon,ncoord,
+					sgn,cm,sp);
 	else
-		Ll2xyx(x,y,
-			   lat,lon,ncoord,
-			   sgn);
+		iret=Ll2xyx(x,y,
+					lat,lon,ncoord,
+					sgn);
+	if (verbose) printf("  iret=%d\n",iret);
 
 	/*Write data: */
Index: /issm/trunk/src/mex/Xy2ll/Xy2ll.cpp
===================================================================
--- /issm/trunk/src/mex/Xy2ll/Xy2ll.cpp	(revision 8688)
+++ /issm/trunk/src/mex/Xy2ll/Xy2ll.cpp	(revision 8689)
@@ -18,4 +18,5 @@
 	/* output: */
 	double  *lat=NULL,*lon=NULL;
+	int     iret=0;
 
 	/*Boot module: */
@@ -38,8 +39,10 @@
 		if   (nx == 1) printf("  x=%g\n",x[0]);
 		else           printf("  x=[%d values]\n",nx);
+//	for (i=0; i<nx; i++) printf("  x[%d]=%g\n",i,x[i]);
 	FetchData(&y,&ny,Y_IN);
 	if (verbose)
 		if   (ny == 1) printf("  y=%g\n",y[0]);
 		else           printf("  y=[%d values]\n",ny);
+//	for (i=0; i<ny; i++) printf("  y[%d]=%g\n",i,y[i]);
 	FetchData(&sgn,SGN_IN);
 	if (verbose) printf("  sgn=%d\n",sgn);
@@ -71,11 +74,12 @@
 	if (verbose) printf("Calling core:\n");
 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
-		Xy2llx(lat,lon,
-			   x,y,ncoord,
-			   sgn,cm,sp);
+		iret=Xy2llx(lat,lon,
+					x,y,ncoord,
+					sgn,cm,sp);
 	else
-		Xy2llx(lat,lon,
-			   x,y,ncoord,
-			   sgn);
+		iret=Xy2llx(lat,lon,
+					x,y,ncoord,
+					sgn);
+	if (verbose) printf("  iret=%d\n",iret);
 
 	/*Write data: */
