[GRASS-SVN] r55499 - in grass/trunk: db/drivers/mysql imagery/i.evapo.pm imagery/i.evapo.time imagery/i.landsat.toar include lib/arraystats lib/imagery lib/nviz lib/vector/neta lib/vector/rtree lib/vector/vedit raster3d/r3.out.netcdf vector/v.net.visibility vector/v.to.points
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 22 11:54:43 PDT 2013
Author: glynn
Date: 2013-03-22 11:54:43 -0700 (Fri, 22 Mar 2013)
New Revision: 55499
Modified:
grass/trunk/db/drivers/mysql/describe.c
grass/trunk/imagery/i.evapo.pm/functions.c
grass/trunk/imagery/i.evapo.pm/main.c
grass/trunk/imagery/i.evapo.time/main.c
grass/trunk/imagery/i.landsat.toar/landsat_met.c
grass/trunk/include/imagery.h
grass/trunk/lib/arraystats/class.c
grass/trunk/lib/imagery/iclass_local_proto.h
grass/trunk/lib/imagery/iclass_perimeter.c
grass/trunk/lib/imagery/iclass_signatures.c
grass/trunk/lib/nviz/draw.c
grass/trunk/lib/nviz/position.c
grass/trunk/lib/vector/neta/articulation_point.c
grass/trunk/lib/vector/neta/bridge.c
grass/trunk/lib/vector/rtree/indexf.c
grass/trunk/lib/vector/rtree/indexm.c
grass/trunk/lib/vector/vedit/render.c
grass/trunk/lib/vector/vedit/zbulk.c
grass/trunk/raster3d/r3.out.netcdf/main.c
grass/trunk/vector/v.net.visibility/data_structures.c
grass/trunk/vector/v.to.points/main.c
Log:
Don't use // comments (C89 compatibility)
Modified: grass/trunk/db/drivers/mysql/describe.c
===================================================================
--- grass/trunk/db/drivers/mysql/describe.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/db/drivers/mysql/describe.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -205,8 +205,8 @@
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;
Modified: grass/trunk/imagery/i.evapo.pm/functions.c
===================================================================
--- grass/trunk/imagery/i.evapo.pm/functions.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/imagery/i.evapo.pm/functions.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -9,22 +9,19 @@
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 @@
/* 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 @@
}
-/*
+#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
Modified: grass/trunk/imagery/i.evapo.pm/main.c
===================================================================
--- grass/trunk/imagery/i.evapo.pm/main.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/imagery/i.evapo.pm/main.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -163,15 +163,15 @@
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);
}
Modified: grass/trunk/imagery/i.evapo.time/main.c
===================================================================
--- grass/trunk/imagery/i.evapo.time/main.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/imagery/i.evapo.time/main.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -286,7 +286,7 @@
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 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
{
Modified: grass/trunk/imagery/i.landsat.toar/landsat_met.c
===================================================================
--- grass/trunk/imagery/i.landsat.toar/landsat_met.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/imagery/i.landsat.toar/landsat_met.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -186,7 +186,7 @@
}
/* 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" };
Modified: grass/trunk/include/imagery.h
===================================================================
--- grass/trunk/include/imagery.h 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/include/imagery.h 2013-03-22 18:54:43 UTC (rev 55499)
@@ -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 */
Modified: grass/trunk/lib/arraystats/class.c
===================================================================
--- grass/trunk/lib/arraystats/class.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/arraystats/class.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -246,7 +246,7 @@
{
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 @@
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)
Modified: grass/trunk/lib/imagery/iclass_local_proto.h
===================================================================
--- grass/trunk/lib/imagery/iclass_local_proto.h 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/imagery/iclass_local_proto.h 2013-03-22 18:54:43 UTC (rev 55499)
@@ -104,4 +104,4 @@
/* iclass.c */
int init_group(const char *group_name, struct Ref *refer);
-#endif // ICLASS_LOCAL_PROTO_H
+#endif /* ICLASS_LOCAL_PROTO_H */
Modified: grass/trunk/lib/imagery/iclass_perimeter.c
===================================================================
--- grass/trunk/lib/imagery/iclass_perimeter.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/imagery/iclass_perimeter.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -76,7 +76,7 @@
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 @@
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 @@
}
- //Vect_close(&Map);
+ /* Vect_close(&Map); */
return nareas_cat;
}
Modified: grass/trunk/lib/imagery/iclass_signatures.c
===================================================================
--- grass/trunk/lib/imagery/iclass_signatures.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/imagery/iclass_signatures.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -49,7 +49,7 @@
G_debug(3, "I_iclass_init_signatures()");
if (!I_init_signatures(sigs, refer->nfiles))
- return 1; // success
+ return 1; /* success */
return 0;
}
Modified: grass/trunk/lib/nviz/draw.c
===================================================================
--- grass/trunk/lib/nviz/draw.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/nviz/draw.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -120,7 +120,7 @@
*/
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 @@
GS_set_draw(GSD_BACK);
- // GS_set_cancel(0);
+ /* GS_set_cancel(0); */
return 1;
}
@@ -354,14 +354,14 @@
*/
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);
Modified: grass/trunk/lib/nviz/position.c
===================================================================
--- grass/trunk/lib/nviz/position.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/nviz/position.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -125,8 +125,8 @@
*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 @@
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;
Modified: grass/trunk/lib/vector/neta/articulation_point.c
===================================================================
--- grass/trunk/lib/vector/neta/articulation_point.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/vector/neta/articulation_point.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -100,7 +100,7 @@
min_tin[node_id] = min_tin[to];
current_edge[node_id] = dglEdgeset_T_Next(¤t[node_id]); /*proceed to the next edge */
}
- for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(¤t[node_id])) { //try next edges
+ for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(¤t[node_id])) { /* try next edges */
dglInt32_t *to =
dglEdgeGet_Tail(graph, current_edge[node_id]);
if (to == parent[node_id])
Modified: grass/trunk/lib/vector/neta/bridge.c
===================================================================
--- grass/trunk/lib/vector/neta/bridge.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/vector/neta/bridge.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -97,7 +97,7 @@
min_tin[node_id] = min_tin[to];
current_edge[node_id] = dglEdgeset_T_Next(¤t[node_id]); /*proceed to the next edge */
}
- for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(¤t[node_id])) { //try next edges
+ for (; current_edge[node_id]; current_edge[node_id] = dglEdgeset_T_Next(¤t[node_id])) { /*try next edges */
dglInt32_t *to =
dglEdgeGet_Tail(graph, current_edge[node_id]);
dglInt32_t edge_id =
Modified: grass/trunk/lib/vector/rtree/indexf.c
===================================================================
--- grass/trunk/lib/vector/rtree/indexf.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/vector/rtree/indexf.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -23,7 +23,6 @@
#include <assert.h>
#include <grass/gis.h>
#include "index.h"
-//#include "card.h"
int RTreeValidChildF(union RTree_Child *child)
{
Modified: grass/trunk/lib/vector/rtree/indexm.c
===================================================================
--- grass/trunk/lib/vector/rtree/indexm.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/vector/rtree/indexm.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -20,7 +20,6 @@
#include <assert.h>
#include <grass/gis.h>
#include "index.h"
-//#include "card.h"
int RTreeValidChildM(union RTree_Child *child)
{
Modified: grass/trunk/lib/vector/vedit/render.c
===================================================================
--- grass/trunk/lib/vector/vedit/render.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/vector/vedit/render.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -98,7 +98,7 @@
}
/* 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 @@
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 @@
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 @@
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,
Modified: grass/trunk/lib/vector/vedit/zbulk.c
===================================================================
--- grass/trunk/lib/vector/vedit/zbulk.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/lib/vector/vedit/zbulk.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -56,7 +56,6 @@
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;
Modified: grass/trunk/raster3d/r3.out.netcdf/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.netcdf/main.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/raster3d/r3.out.netcdf/main.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -505,7 +505,7 @@
}
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);
}
Modified: grass/trunk/vector/v.net.visibility/data_structures.c
===================================================================
--- grass/trunk/vector/v.net.visibility/data_structures.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/vector/v.net.visibility/data_structures.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -76,7 +76,7 @@
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);
Modified: grass/trunk/vector/v.to.points/main.c
===================================================================
--- grass/trunk/vector/v.to.points/main.c 2013-03-22 17:42:42 UTC (rev 55498)
+++ grass/trunk/vector/v.to.points/main.c 2013-03-22 18:54:43 UTC (rev 55499)
@@ -335,7 +335,7 @@
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;
More information about the grass-commit
mailing list