瀏覽代碼

rename nearest() fn to avoid namespace conflict with libm on AIX 7.1

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56661 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 12 年之前
父節點
當前提交
7c8a996021
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      ps/ps.map/vect.c

+ 8 - 7
ps/ps.map/vect.c

@@ -1,9 +1,9 @@
 /* Functions: adjust_line 
- **
- ** Author: Radim Blazek Feb 2000
- ** 
- **
+ *
+ * Author: Radim Blazek Feb 2000
+ *
  */
+
 #include <stdlib.h>
 #include <math.h>
 #include <grass/vector.h>
@@ -13,7 +13,7 @@
 #define LENGTH(DX, DY)  (  sqrt( (DX*DX)+(DY*DY) )  )
 
 /* nearest returns nearest longitude coordinate, copy from src/libes */
-static double nearest(double e0, double e1)
+static double nearest_longitude(double e0, double e1)
 {
     while (e0 - e1 > 180)
 	e1 += 360.0;
@@ -23,7 +23,8 @@ static double nearest(double e0, double e1)
 }
 
 /* if projection is PROJECTION_LL adjust_line will change
- **   longitudes to nearest form previous point */
+ *   longitudes to nearest form previous point
+ */
 void adjust_line(struct line_pnts *Points)
 {
     int i, np;
@@ -31,7 +32,7 @@ void adjust_line(struct line_pnts *Points)
     if (G_projection() == PROJECTION_LL) {
 	np = Points->n_points;
 	for (i = 1; i < np; i++) {
-	    Points->x[i] = nearest(Points->x[i - 1], Points->x[i]);
+	    Points->x[i] = nearest_longitude(Points->x[i - 1], Points->x[i]);
 	}
     }
 }