Ver código fonte

libgis: G__get_window() renamed to G_get_element_window()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63823 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 anos atrás
pai
commit
fd2711bc51
2 arquivos alterados com 15 adições e 15 exclusões
  1. 2 2
      include/defs/gis.h
  2. 13 13
      lib/gis/get_window.c

+ 2 - 2
include/defs/gis.h

@@ -305,8 +305,8 @@ struct Key_Value *G_get_projepsg(void);
 /* get_window.c */
 /* get_window.c */
 void G_get_window(struct Cell_head *);
 void G_get_window(struct Cell_head *);
 void G_get_default_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 */
 /* getl.c */
 int G_getl(char *, int, FILE *);
 int G_getl(char *, int, FILE *);

+ 13 - 13
lib/gis/get_window.c

@@ -26,10 +26,10 @@ static struct state {
 static struct state *st = &state;
 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
   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
   error message is printed and exit() is called if there is a problem
@@ -63,9 +63,9 @@ void G_get_window(struct Cell_head *window)
     else {
     else {
 	char *wind = getenv("WIND_OVERRIDE");
 	char *wind = getenv("WIND_OVERRIDE");
 	if (wind)
 	if (wind)
-	    G__get_window(&st->dbwindow, "windows", wind, G_mapset());
+	    G_get_element_window(&st->dbwindow, "windows", wind, G_mapset());
 	else
 	else
-	    G__get_window(&st->dbwindow, "", "WIND", G_mapset());
+	    G_get_element_window(&st->dbwindow, "", "WIND", G_mapset());
     }
     }
 
 
     *window = st->dbwindow;
     *window = st->dbwindow;
@@ -79,7 +79,7 @@ void G_get_window(struct Cell_head *window)
 }
 }
 
 
 /*!
 /*!
-  \brief Read the default region
+  \brief Get the default region
   
   
   Reads the default region for the location into <i>region.</i> 3D
   Reads the default region for the location into <i>region.</i> 3D
   values are set to defaults if not available in WIND file.
   values are set to defaults if not available in WIND file.
@@ -91,21 +91,21 @@ void G_get_window(struct Cell_head *window)
 */
 */
 void G_get_default_window(struct Cell_head *window)
 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
   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 element element type
-  \param name map name
+  \param name element name
   \param mapset mapset 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;
     FILE *fp;
 
 
@@ -122,7 +122,7 @@ void G__get_window(struct Cell_head *window,
 }
 }
 
 
 /*!
 /*!
-  \brief Unset current window
+  \brief Unset current region
 */
 */
 void G_unset_window()
 void G_unset_window()
 {
 {