Browse Source

Don't use // comments (C89 compatibility)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55499 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 12 years ago
parent
commit
08a91ed99f

+ 2 - 2
db/drivers/mysql/describe.c

@@ -205,8 +205,8 @@ void field_info(MYSQL_FIELD * field, int *sqltype, int *length)
 	break;
 
     case MYSQL_TYPE_DATETIME:
-	//*sqltype = DB_SQL_TYPE_DATETIME;
-	//*sqltype |= DB_DATETIME_MASK;
+	/* *sqltype = DB_SQL_TYPE_DATETIME; */
+	/* *sqltype |= DB_DATETIME_MASK; */
 	*sqltype = DB_SQL_TYPE_TIMESTAMP;
 	break;
 

+ 23 - 28
imagery/i.evapo.pm/functions.c

@@ -9,22 +9,19 @@ extern CELL f_c(CELL);
 extern FCELL f_f(FCELL);
 extern DCELL f_d(DCELL);
 
-//#define TRUE 0
-//#define FALSE 1
-
 /* constant definition */
-//#define k_sb 4.903    //[MJ/m2*h]             Stefan Bolzman constant 
-#define cp 1.013		//[kJ/kg*°C]    specific heat of moist air
-#define epsilon 0.622		//[-]                   ratio of molecular weigth of water to dry air
-#define Po 101.3		//[kPa]                 atmospheric pressure at sea level
-#define Tko 293.16		//[K]                   reference temperature at sea level
-#define eta 0.0065		//[K/m]                 constant lapse rate
-#define Ao 0			//[m]                   altitude at sea level
-#define g 9.81			//[m/s]                 gravitational accelleration
-#define R 287			//[J/kg*K]              specific gas constant
-#define Zw 2			//[m]                   height of  wind measurements
-#define Zh 2			//[m]                   height of  humidity measurements
-#define k 0.41			//[-]                   Von Karman constant
+/* #define k_sb 4.903    //[MJ/m2*h]             Stefan Bolzman constant  */
+#define cp 1.013		/* [kJ/kg*°C]    specific heat of moist air */
+#define epsilon 0.622		/* [-]                   ratio of molecular weigth of water to dry air */
+#define Po 101.3		/* [kPa]                 atmospheric pressure at sea level */
+#define Tko 293.16		/* [K]                   reference temperature at sea level */
+#define eta 0.0065		/* [K/m]                 constant lapse rate */
+#define Ao 0			/* [m]                   altitude at sea level */
+#define g 9.81			/* [m/s]                 gravitational accelleration */
+#define R 287			/* [J/kg*K]              specific gas constant */
+#define Zw 2			/* [m]                   height of  wind measurements */
+#define Zh 2			/* [m]                   height of  humidity measurements */
+#define k 0.41			/* [-]                   Von Karman constant */
 
 
 
@@ -122,10 +119,10 @@ DCELL calc_openwaterETp(DCELL T, DCELL Z, DCELL u2, DCELL Rn, int day,
     /* calculus: di psichiometric constant [kPa/°C] */
     gamma = ((cp * P) / (epsilon * lambda)) * 0.001;
 
-    /*calculus: net radiation [MJ/m2*h] */
-    /*Rn derived from r.sun
+    /* calculus: net radiation [MJ/m2*h] */
+    /* Rn derived from r.sun */
 
-       /*calculus: actual vapoure pressure [kPa] */
+    /*calculus: actual vapoure pressure [kPa] */
     ed = Rh * ea / 100;
 
     /*calculus: aerodynamic term [mm/h] */
@@ -141,25 +138,23 @@ DCELL calc_openwaterETp(DCELL T, DCELL Z, DCELL u2, DCELL Rn, int day,
 
 }
 
-/*
+#if 0
    DCELL calc_ETp_WaSiM(){
 
 
-   //calculus of saturation vapour pressure at the temperature T: es[hPa] 
-   //with T[°C]
+   /* calculus of saturation vapour pressure at the temperature T: es[hPa]  */
+   /* with T[°C] */
    es   =       6.1078*exp((17.27*T)/(237.3+T);
 
-   //tangent of the saturated vapour pressure curve: D[hPa/K] with T[°C]
+   /* tangent of the saturated vapour pressure curve: D[hPa/K] with T[°C] */
    D    =       (25029/pow((273.3+T),2))*exp((17.27*T)/(237.3+T);
 
-   //air pressure at level hM
+   /* air pressure at level hM */
    P    =       1013*exp(-hM/(7991+29.33*Tv));
 
-   //calculus of lambda [KJ/Kg] with T[°C]
+   /* calculus of lambda [KJ/Kg] with T[°C] */
    lambda       =       2500.8 - 2.372*T;
 
-   //calculus psichiometric constant gamma [hPa/°C] with cp=1.005[KJ/(Kg*K)]
+   /* calculus psichiometric constant gamma [hPa/°C] with cp=1.005[KJ/(Kg*K)] */
    gamma        = ((1.005*P)/(0.622*lambda))*0.001; 
-
-   //
- */
+#endif

+ 3 - 3
imagery/i.evapo.pm/main.c

@@ -163,15 +163,15 @@ int main(int argc, char *argv[])
 	    d_Z = ((DCELL *) inrast_DEM)[col];
 	    d_hc = ((DCELL *) inrast_hc)[col];
 
-	    //calculate evapotranspiration
+	    /* calculate evapotranspiration */
 	    if (d_hc < 0) {
-		//calculate evaporation
+		/* calculate evaporation */
 		d_EPo =
 		    calc_openwaterETp(d_T, d_Z, d_u2, d_Rn, d_night, d_RH,
 				      d_hc);
 	    }
 	    else {
-		//calculate evapotranspiration
+		/* calculate evapotranspiration */
 		d_EPo = calc_ETp(d_T, d_Z, d_u2, d_Rn, d_night, d_RH, d_hc);
 	    }
 

+ 2 - 2
imagery/i.evapo.time/main.c

@@ -286,7 +286,7 @@ int main(int argc, char *argv[])
  				int k=i-1;
 				while (d1[k]>=startperiod )
 				{
-					if (d1[k]<0)	 // case were d1[k] is null
+					if (d1[k]<0)	 /* case were d1[k] is null */
 						k=k-1;					
 					else
 					{
@@ -304,7 +304,7 @@ int main(int argc, char *argv[])
 				int k=i+1;
 				while (d1[k]<=endperiod)
 				{
-					if (d1[k]<0)   // case were d1[k] is null
+					if (d1[k]<0)   /* case were d1[k] is null */
 						k=k+1;
 					else
 					{

+ 1 - 1
imagery/i.landsat.toar/landsat_met.c

@@ -186,7 +186,7 @@ void lsat_metadata( char * metafile, lsat_data * lsat)
     }
 
     /* Update the information from metadata file, if infile */
-//     if( format == NEW_FORMAT )
+    /* if( format == NEW_FORMAT ) */
     if( get_mtldata == get_newformat )
     {
         char * fmt_lmax[]     = { "LMAX_BAND%d",    "RADIANCE_MAXIMUM_BAND_%d" };

+ 0 - 1
include/imagery.h

@@ -3,7 +3,6 @@
 
 #include <grass/gis.h>
 #include <grass/raster.h>
-//#include <grass/vector.h>
 
 /* File/directory name lengths */
 #define INAME_LEN GNAME_MAX	/* coupled to raster map name length */

+ 3 - 3
lib/arraystats/class.c

@@ -246,7 +246,7 @@ double class_discont(double *data, int count, int nbreaks,
 {
     int *num, nbclass;
     double *no, *zz, *nz, *xn, *co;
-    double *x;			//Vecteur des observations standardisées
+    double *x;			/* Vecteur des observations standardisées */
     int i, j, k;
     double min = 0, max = 0, rangemax = 0;
     int n = 0;
@@ -337,12 +337,12 @@ double class_discont(double *data, int count, int nbreaks,
 		dmax = d;
 		nmax = k;
 	    }
-	    nd--;		//A VERIFIER!
+	    nd--;		/* A VERIFIER! */
 	    if (x[nf] != x[nd]) {
 		if (nd != 0)
 		    co[j] = (xn[nf] - xn[nd]) / (x[nf] - x[nd]);
 		else
-		    co[j] = (xn[nf]) / (x[nf]);	//A VERIFIER!
+		    co[j] = (xn[nf]) / (x[nf]);	/* A VERIFIER! */
 	    }
 	}
 	if (i == 1)

+ 1 - 1
lib/imagery/iclass_local_proto.h

@@ -104,4 +104,4 @@ void free_perimeters(IClass_perimeter_list * perimeters);
 /* iclass.c */
 int init_group(const char *group_name, struct Ref *refer);
 
-#endif // ICLASS_LOCAL_PROTO_H
+#endif /* ICLASS_LOCAL_PROTO_H */

+ 5 - 5
lib/imagery/iclass_perimeter.c

@@ -76,7 +76,7 @@ int vector2perimeters(struct Map_info *Map, const char *layer_name,
 	    continue;
 	cat = Vect_get_area_cat(Map, i, layer);
 	if (cat < 0) {
-	    // no centroid, no category
+	    /* no centroid, no category */
 	}
 	else if (cat == category) {
 	    nareas_cat++;
@@ -89,18 +89,18 @@ int vector2perimeters(struct Map_info *Map, const char *layer_name,
     perimeters->perimeters =
 	(IClass_perimeter *) G_calloc(nareas_cat, sizeof(IClass_perimeter));
 
-    j = 0;			// area with cat
+    j = 0;			/* area with cat */
     for (i = 1; i <= nareas; i++) {
 	if (!Vect_area_alive(Map, i))
 	    continue;
 	cat = Vect_get_area_cat(Map, i, layer);
 	if (cat < 0) {
-	    // no centroid, no category
+	    /* no centroid, no category */
 	}
 	else if (cat == category) {
 	    j++;
 
-	    points = Vect_new_line_struct();	// Vect_destroy_line_struct
+	    points = Vect_new_line_struct();	/* Vect_destroy_line_struct */
 	    ret = Vect_get_area_points(Map, i, points);
 
 	    if (ret <= 0) {
@@ -121,7 +121,7 @@ int vector2perimeters(struct Map_info *Map, const char *layer_name,
 
     }
 
-    //Vect_close(&Map);
+    /* Vect_close(&Map); */
 
     return nareas_cat;
 }

+ 1 - 1
lib/imagery/iclass_signatures.c

@@ -49,7 +49,7 @@ int I_iclass_init_signatures(struct Signature *sigs, struct Ref *refer)
     G_debug(3, "I_iclass_init_signatures()");
 
     if (!I_init_signatures(sigs, refer->nfiles))
-	return 1;		// success
+	return 1;		/* success */
 
     return 0;
 }

+ 4 - 4
lib/nviz/draw.c

@@ -120,7 +120,7 @@ int sort_surfs_max(int *surf, int *id_sort, int *indices, int num)
  */
 int Nviz_draw_all_vect()
 {
-    // GS_set_cancel(0);
+    /* GS_set_cancel(0); */
 
     /* in case transparency is set */
     GS_set_draw(GSD_BOTH);
@@ -133,7 +133,7 @@ int Nviz_draw_all_vect()
 
     GS_set_draw(GSD_BACK);
 
-    // GS_set_cancel(0);
+    /* GS_set_cancel(0); */
 
     return 1;
 }
@@ -354,14 +354,14 @@ int Nviz_load_image(GLubyte *image_data, int width, int height, int alpha)
 */
 void Nviz_set_2D(int width, int height)
 {
-    glEnable(GL_BLEND); // images are transparent
+    glEnable(GL_BLEND); /* images are transparent */
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
         
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     glOrtho(0, width, 0, height, -1, 1);
     
-    // set coordinate system from upper left corner
+    /* set coordinate system from upper left corner */
     glScalef(1, -1, 1);
     glTranslatef(0, -height, 0);
 

+ 4 - 4
lib/nviz/position.c

@@ -125,8 +125,8 @@ int Nviz_get_focus(nv_data * data, float *x, float *y, float *z)
     *x = realto[0];
     *y = realto[1];
     *z = realto[2];
-    // old nviz code is more complicated and it doesn't work properly,
-    // no idea why
+    /* old nviz code is more complicated and it doesn't work properly, */
+    /* no idea why */
 
     return 1;
 
@@ -146,8 +146,8 @@ int Nviz_set_focus(nv_data * data, float x, float y, float z)
     realto[1] = y;
     realto[2] = z;
     GS_set_focus(realto);
-    // old nviz code is more complicated and it doesn't work properly,
-    // no idea why
+    /* old nviz code is more complicated and it doesn't work properly, */
+    /* no idea why */
 
     return 1;
 

+ 1 - 1
lib/vector/neta/articulation_point.c

@@ -100,7 +100,7 @@ int NetA_articulation_points(dglGraph_s * graph,
 			min_tin[node_id] = min_tin[to];
 		    current_edge[node_id] = dglEdgeset_T_Next(&current[node_id]);	/*proceed to the next edge */
 		}
-		for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(&current[node_id])) {	//try next edges
+		for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(&current[node_id])) {	/* try next edges */
 		    dglInt32_t *to =
 			dglEdgeGet_Tail(graph, current_edge[node_id]);
 		    if (to == parent[node_id])

+ 1 - 1
lib/vector/neta/bridge.c

@@ -97,7 +97,7 @@ int NetA_compute_bridges(dglGraph_s * graph, struct ilist *bridge_list)
 			min_tin[node_id] = min_tin[to];
 		    current_edge[node_id] = dglEdgeset_T_Next(&current[node_id]);	/*proceed to the next edge */
 		}
-		for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(&current[node_id])) {	//try next edges
+		for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(&current[node_id])) {	/*try next edges */
 		    dglInt32_t *to =
 			dglEdgeGet_Tail(graph, current_edge[node_id]);
 		    dglInt32_t edge_id =

+ 0 - 1
lib/vector/rtree/indexf.c

@@ -23,7 +23,6 @@
 #include <assert.h>
 #include <grass/gis.h>
 #include "index.h"
-//#include "card.h"
 
 int RTreeValidChildF(union RTree_Child *child)
 {

+ 0 - 1
lib/vector/rtree/indexm.c

@@ -20,7 +20,6 @@
 #include <assert.h>
 #include <grass/gis.h>
 #include "index.h"
-//#include "card.h"
 
 int RTreeValidChildM(union RTree_Child *child)
 {

+ 5 - 5
lib/vector/vedit/render.c

@@ -98,7 +98,7 @@ struct robject_list *Vedit_render_map(struct Map_info *Map,
     }
 
     /* draw lines inside of current display region */
-    nfeat = Vect_select_lines_by_box(Map, box, GV_POINTS | GV_LINES,	// fixme
+    nfeat = Vect_select_lines_by_box(Map, box, GV_POINTS | GV_LINES,	/* fixme */
 				     list);
     G_debug(1, "Vedit_render_map(): region: w=%f, e=%f, s=%f, n=%f nlines=%d",
 	    box->W, box->E, box->S, box->N, nfeat);
@@ -193,7 +193,7 @@ struct robject *draw_line(struct Map_info *Map, int line, int draw_flag)
 	else if (state.type == GV_CENTROID) {
 	    int cret = Vect_get_centroid_area(Map, line);
 
-	    if (cret > 0) {	// -> area
+	    if (cret > 0) {	/* -> area */
 		obj->type = TYPE_CENTROIDIN;
 		draw = draw_flag & DRAW_CENTROIDIN;
 	    }
@@ -348,7 +348,7 @@ int draw_line_dir(struct robject_list *list, int line)
 
     narrows = 0;
     size = 5;
-    limit = 5;			// 5px for line segment
+    limit = 5;			/* 5px for line segment */
 
     dist = Vect_line_length(state.Points);
     G_debug(5, "  draw_line_dir() line=%d", line);
@@ -374,13 +374,13 @@ int draw_line_dir(struct robject_list *list, int line)
 
 	    draw_arrow(x0, y0, x1, y1, angle, size, line, list);
 
-	    if (narrows > 1e2)	// low resolution, break
+	    if (narrows > 1e2)	/* low resolution, break */
 		break;
 
 	    narrows++;
 	}
 
-	// draw at least one arrow in the middle of line
+	/* draw at least one arrow in the middle of line */
 	if (narrows < 1) {
 	    dist /= 2.;
 	    if (Vect_point_on_line(state.Points, dist,

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

@@ -56,7 +56,6 @@ int Vedit_bulk_labeling(struct Map_info *Map, struct ilist *List,
     Points_se = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
 
-    //cv = (dbCatValArray *) G_malloc (sizeof (dbCatValArray));
     db_CatValArray_alloc(&cv, List->n_values);
     cv.ctype = DB_C_TYPE_DOUBLE;
     cv.n_values = 0;

+ 1 - 1
raster3d/r3.out.netcdf/main.c

@@ -505,7 +505,7 @@ static void write_netcdf_header(int ncid, RASTER3D_Region * region,
     }
 
     for (i = 0; i < region->rows; i++) {
-	//c = region->south + i * region->ns_res + 0.5 * region->ns_res;
+	/* c = region->south + i * region->ns_res + 0.5 * region->ns_res; */
 	c = region->north - i * region->ns_res - 0.5 * region->ns_res;
 	nc_put_var1_float(ncid, lat_varid, &i, &c);
     }

+ 1 - 1
vector/v.net.visibility/data_structures.c

@@ -76,7 +76,7 @@ void quickSort(struct Point a[], int l, int r)
     int j;
 
     if (l < r) {
-	// divide and conquer
+	/* divide and conquer */
 	j = partition(a, l, r);
 	quickSort(a, l, j - 1);
 	quickSort(a, j + 1, r);

+ 1 - 1
vector/v.to.points/main.c

@@ -335,7 +335,7 @@ int main(int argc, char **argv)
 		continue;
             if (!Vect_cat_get(LCats, field, &cat) && field != -1)
 		continue;
-            // Assign CAT for layer 0 objects (i.e. boundaries)
+            /* Assign CAT for layer 0 objects (i.e. boundaries) */
             if (field == -1)
                 cat = -1;