瀏覽代碼

libgis: G__put_window() -> G_put_element_window()
update modules
(merge r63827-8 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63829 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 年之前
父節點
當前提交
ecc918a79d

+ 2 - 2
general/g.proj/create.c

@@ -57,8 +57,8 @@ void modify_projinfo()
 	(old_cellhd.proj != cellhd.proj)) {
 	/* Recreate the default, and current window files if projection
 	 * number or zone have changed */
-	G__put_window(&cellhd, "", "DEFAULT_WIND");
-	G__put_window(&cellhd, "", "WIND");
+	G_put_element_window(&cellhd, "", "DEFAULT_WIND");
+	G_put_element_window(&cellhd, "", "WIND");
 	G_message(_("Default region was updated to the new projection, but if you have "
 		    "multiple mapsets `g.region -d` should be run in each to update the "
 		    "region from the default"));

+ 2 - 2
general/g.region/main.c

@@ -756,7 +756,7 @@ int main(int argc, char *argv[])
     if ((name = parm.save->answer)) {
 	temp_window = window;
 	G_adjust_Cell_head3(&temp_window, 0, 0, 0);
-	if (G__put_window(&temp_window, "windows", name) < 0)
+	if (G_put_element_window(&temp_window, "windows", name) < 0)
 	    G_fatal_error(_("Unable to set region <%s>"), name);
     }
 
@@ -768,7 +768,7 @@ int main(int argc, char *argv[])
 
     if (flag.savedefault->answer) {
 	if (strcmp(G_mapset(), "PERMANENT") == 0) {
-	    G__put_window(&window, "", "DEFAULT_WIND");
+	    G_put_element_window(&window, "", "DEFAULT_WIND");
 	}
 	else {
 	    G_fatal_error(_("Unable to change default region. "

+ 1 - 1
general/g.setproj/main.c

@@ -639,7 +639,7 @@ int main(int argc, char *argv[])
 	G_free_key_value(in_unit_keys);
     }				/* if */
 
-    if (G__put_window(&cellhd, "", "DEFAULT_WIND") < 0)
+    if (G_put_element_window(&cellhd, "", "DEFAULT_WIND") < 0)
 	G_fatal_error(_("Unable to write to DEFAULT_WIND region file"));
     fprintf(stderr,
 	    _("\nProjection information has been recorded for this location\n\n"));

+ 1 - 1
include/defs/gis.h

@@ -588,7 +588,7 @@ const char *G_database_epsg_code(void);
 
 /* put_window.c */
 int G_put_window(const struct Cell_head *);
-int G__put_window(const struct Cell_head *, const char *, const char *);
+int G_put_element_window(const struct Cell_head *, const char *, const char *);
 
 /* putenv.c */
 void G_putenv(const char *, const char *);

+ 2 - 2
lib/gis/make_loc.c

@@ -75,8 +75,8 @@ int G_make_location(const char *location_name,
     G__setenv("MAPSET", "PERMANENT");
 
     /* Create the default, and current window files */
-    G__put_window(wind, "", "DEFAULT_WIND");
-    G__put_window(wind, "", "WIND");
+    G_put_element_window(wind, "", "DEFAULT_WIND");
+    G_put_element_window(wind, "", "WIND");
 
     /* Write out the PROJ_INFO, and PROJ_UNITS if available. */
     if (proj_info != NULL) {

+ 1 - 1
lib/gis/make_mapset.c

@@ -83,7 +83,7 @@ int G_make_mapset(const char *gisdbase_name, const char *location_name,
     G__setenv("MAPSET", mapset_name);
 
     /* Copy default window/regions to new mapset */
-    G__put_window(&default_window, "", "WIND");
+    G_put_element_window(&default_window, "", "WIND");
 
     /* And switch back to original environment */
     G_switch_env();

+ 9 - 9
lib/gis/put_window.c

@@ -15,9 +15,9 @@
 #include <grass/gis.h>
 
 /*!
- * \brief Writes the database region (window)
+ * \brief Writes the region (window)
  *
- * Writes the database region file (WIND) in the user's current mapset
+ * Writes the region file (WIND) in the user's current mapset
  * or when environmental variable \c WIND_OVERRIDE is set,
  * it writes the region to file specified by \c WIND_OVERRIDE variable.
  *
@@ -26,7 +26,7 @@
  * Otherwise the whole GRASS session is affected.
  *
  * \warning When environmental variable \c WIND_OVERRIDE is not set,
- * this routine actually changes the database region.
+ * this routine actually changes the region.
  * So in this case it should only be called by modules which the user knows
  * will change the region. It is probably fair to say that only the
  * \gmod{g.region} should call this routine unless \c WIND_OVERRIDE is set.
@@ -45,17 +45,17 @@ int G_put_window(const struct Cell_head *window)
 {
     char *wind = getenv("WIND_OVERRIDE");
 
-    return wind ? G__put_window(window, "windows", wind)
-	: G__put_window(window, "", "WIND");
+    return wind ? G_put_element_window(window, "windows", wind)
+	: G_put_element_window(window, "", "WIND");
 }
 
 /*!
- * \brief Write the database region
+ * \brief Write the region
  *
- * Writes the database region file (WIND) in the user's current mapset
+ * Writes the region file (WIND) in the user's current mapset
  * from region. 
 
- * <b>Warning:</b> Since this routine actually changes the database
+ * <b>Warning:</b> Since this routine actually changes the 
  * region, it should only be called by modules which the user knows
  * will change the region. It is probably fair to say that only the
  * <tt>g.region</tt> should call this routine.
@@ -69,7 +69,7 @@ int G_put_window(const struct Cell_head *window)
  *
  * \sa G_put_window()
  */
-int G__put_window(const struct Cell_head *window, const char *dir, const char *name)
+int G_put_element_window(const struct Cell_head *window, const char *dir, const char *name)
 {
     FILE *fd;
 

+ 1 - 1
raster/r.external/window.c

@@ -89,7 +89,7 @@ void update_default_window(struct Cell_head *cellhd)
     cur_wind.east = cur_wind.west + cur_wind.cols * cur_wind.ew_res;
 
     if (strcmp(G_mapset(), "PERMANENT") == 0) {
-	G__put_window(&cur_wind, "", "DEFAULT_WIND");
+	G_put_element_window(&cur_wind, "", "DEFAULT_WIND");
 	G_message(_("Default region for this location updated")); 
     }
     G_put_window(&cur_wind);

+ 1 - 1
raster/r.in.gdal/main.c

@@ -780,7 +780,7 @@ int main(int argc, char *argv[])
 	cur_wind.east = cur_wind.west + cur_wind.cols * cur_wind.ew_res;
 
 	if (strcmp(G_mapset(), "PERMANENT") == 0) {
-	    G__put_window(&cur_wind, "", "DEFAULT_WIND");
+	    G_put_element_window(&cur_wind, "", "DEFAULT_WIND");
 	    G_message(_("Default region for this location updated"));
 	}
 	G_put_window(&cur_wind);

+ 1 - 1
vector/v.in.ogr/main.c

@@ -1632,7 +1632,7 @@ int main(int argc, char *argv[])
 	cur_wind.east = cur_wind.west + cur_wind.cols * cur_wind.ew_res;
 
 	if (strcmp(G_mapset(), "PERMANENT") == 0) {
-	    G__put_window(&cur_wind, "", "DEFAULT_WIND");
+	    G_put_element_window(&cur_wind, "", "DEFAULT_WIND");
 	    G_message(_("Default region for this location updated"));
 	}
 	G_put_window(&cur_wind);