Browse Source

Add missing #include directives

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33137 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 năm trước cách đây
mục cha
commit
8e20b748a3

+ 1 - 0
display/d.vect.chart/pie.c

@@ -1,3 +1,4 @@
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
general/g.proj/datumtrans.c

@@ -16,6 +16,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
 #include <grass/gprojects.h>
 

+ 1 - 0
lib/vector/Vlib/remove_areas.c

@@ -17,6 +17,7 @@
    \date 2001
  */
 
+#include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>

+ 1 - 0
lib/vector/Vlib/rewind.c

@@ -19,6 +19,7 @@
  */
 
 #include <grass/Vect.h>
+#include <grass/glocale.h>
 
 
 /*  Rewind vector data file to cause reads to start at beginning */

+ 1 - 0
lib/vector/Vlib/snap.c

@@ -17,6 +17,7 @@
  * \date 2001
  */
 
+#include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>

+ 1 - 0
lib/vector/vedit/select.c

@@ -14,6 +14,7 @@
    \date 2007-2008
 */
 
+#include <math.h>
 #include <grass/glocale.h>
 #include <grass/vedit.h>
 

+ 1 - 0
raster/r.proj/readcell.c

@@ -5,6 +5,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>

+ 1 - 0
raster/r.to.vect/main.c

@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/Vect.h>

+ 1 - 0
vector/lidar/v.lidar.correction/correction.c

@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/lidar/v.lidar.correction/main.c

@@ -20,6 +20,7 @@
  /*INCLUDES*/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/config.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>

+ 1 - 0
vector/lidar/v.lidar.edgedetection/edgedetection.c

@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/lidar/v.lidar.edgedetection/main.c

@@ -25,6 +25,7 @@
  /*INCLUDES*/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/lidar/v.lidar.growing/main.c

@@ -22,6 +22,7 @@
  /*INCLUDES*/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/config.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>

+ 1 - 0
vector/lidar/v.outlier/main.c

@@ -20,6 +20,7 @@
  /*INCLUDES*/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/config.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>

+ 1 - 0
vector/lidar/v.outlier/outlier.c

@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/lidar/v.surf.bspline/crosscorr.c

@@ -20,6 +20,7 @@
  /*INCLUDES*/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/lidar/v.surf.bspline/main.c

@@ -20,6 +20,7 @@
  /*INCLUDES*/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/v.buffer/main.c

@@ -17,6 +17,7 @@
  **************************************************************/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/v.edit/global.h

@@ -3,6 +3,7 @@
 
 # include <stdio.h>
 # include <stdlib.h>
+# include <string.h>
 # include <grass/gis.h>
 # include <grass/Vect.h>
 # include <grass/glocale.h>

+ 1 - 0
vector/v.generalize/displacement.c

@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>

+ 1 - 0
vector/v.generalize/main.c

@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>

+ 1 - 0
vector/v.generalize/matrix.c

@@ -17,6 +17,7 @@
  *
  ****************************************************************/
 
+#include <string.h>
 #include "matrix.h"
 
 int matrix_init(int rows, int cols, MATRIX * res)

+ 1 - 0
vector/v.generalize/network.c

@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>

+ 2 - 6
vector/v.generalize/point.c

@@ -17,10 +17,11 @@
  *
  ****************************************************************/
 
-#include "point.h"
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>
+#include "point.h"
 
 inline void point_subtract(POINT a, POINT b, POINT * res)
 {
@@ -116,11 +117,6 @@ POINT_LIST *point_list_new(POINT p)
 
     pl = G_malloc(sizeof(POINT_LIST));
 
-    if (!pl) {
-	G_fatal_error(_("Out of memory"));
-	exit(1);
-    }
-
     pl->next = NULL;
     pl->p = p;
     return pl;

+ 1 - 0
vector/v.generalize/smoothing.c

@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/glocale.h>

+ 1 - 0
vector/v.lrs/v.lrs.create/main.c

@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/v.reclass/main.c

@@ -16,6 +16,7 @@
  *****************************************************************************/
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/v.to.db/main.c

@@ -15,6 +15,7 @@
  *
  *****************************************************************************/
 
+#include <stdlib.h>
 #include <grass/glocale.h>
 #include "global.h"
 

+ 1 - 0
vector/v.to.rast/main.c

@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/Vect.h>

+ 1 - 0
vector/v.univar/main.c

@@ -19,6 +19,7 @@
  **************************************************************/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/dbmi.h>

+ 1 - 0
vector/v.voronoi/dt_write.c

@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <math.h>
 #include <float.h>
 #include <grass/gis.h>