[GRASS-SVN] r63823 - in grass/trunk: include/defs lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 29 08:45:55 PST 2014


Author: martinl
Date: 2014-12-29 08:45:55 -0800 (Mon, 29 Dec 2014)
New Revision: 63823

Modified:
   grass/trunk/include/defs/gis.h
   grass/trunk/lib/gis/get_window.c
Log:
libgis: G__get_window() renamed to G_get_element_window()


Modified: grass/trunk/include/defs/gis.h
===================================================================
--- grass/trunk/include/defs/gis.h	2014-12-29 13:41:25 UTC (rev 63822)
+++ grass/trunk/include/defs/gis.h	2014-12-29 16:45:55 UTC (rev 63823)
@@ -305,8 +305,8 @@
 /* get_window.c */
 void G_get_window(struct Cell_head *);
 void G_get_default_window(struct Cell_head *);
-void G__get_window(struct Cell_head *, const char *, const char *,
-		   const char *);
+void G_get_element_window(struct Cell_head *, const char *, const char *,
+                          const char *);
 
 /* getl.c */
 int G_getl(char *, int, FILE *);

Modified: grass/trunk/lib/gis/get_window.c
===================================================================
--- grass/trunk/lib/gis/get_window.c	2014-12-29 13:41:25 UTC (rev 63822)
+++ grass/trunk/lib/gis/get_window.c	2014-12-29 16:45:55 UTC (rev 63823)
@@ -26,10 +26,10 @@
 static struct state *st = &state;
 
 /*!
-  \brief Read the database region
+  \brief Get the current region
   
-  Reads the database region as stored in the WIND file in the user's
-  current mapset into region.
+  Reads the region as stored in the WIND file in the user's current
+  mapset into region.
   
   3D values are set to defaults if not available in WIND file.  An
   error message is printed and exit() is called if there is a problem
@@ -63,9 +63,9 @@
     else {
 	char *wind = getenv("WIND_OVERRIDE");
 	if (wind)
-	    G__get_window(&st->dbwindow, "windows", wind, G_mapset());
+	    G_get_element_window(&st->dbwindow, "windows", wind, G_mapset());
 	else
-	    G__get_window(&st->dbwindow, "", "WIND", G_mapset());
+	    G_get_element_window(&st->dbwindow, "", "WIND", G_mapset());
     }
 
     *window = st->dbwindow;
@@ -79,7 +79,7 @@
 }
 
 /*!
-  \brief Read the default region
+  \brief Get the default region
   
   Reads the default region for the location into <i>region.</i> 3D
   values are set to defaults if not available in WIND file.
@@ -91,21 +91,21 @@
 */
 void G_get_default_window(struct Cell_head *window)
 {
-    G__get_window(window, "", "DEFAULT_WIND", "PERMANENT");
+    G_get_element_window(window, "", "DEFAULT_WIND", "PERMANENT");
 }
 
 /*!
-  \brief Get window (region) of selected map
+  \brief Get region for selected element (raster, vector, window, etc.)
   
   G_fatal_error() is called on error
   
-  \param window pointer to Cell_head
+  \param[out] window pointer to Cell_head
   \param element element type
-  \param name map name
+  \param name element name
   \param mapset mapset name
 */
-void G__get_window(struct Cell_head *window,
-		   const char *element, const char *name, const char *mapset)
+void G_get_element_window(struct Cell_head *window,
+                          const char *element, const char *name, const char *mapset)
 {
     FILE *fp;
 
@@ -122,7 +122,7 @@
 }
 
 /*!
-  \brief Unset current window
+  \brief Unset current region
 */
 void G_unset_window()
 {



More information about the grass-commit mailing list