|
@@ -15,20 +15,31 @@
|
|
|
#include <grass/gis.h>
|
|
|
|
|
|
/*!
|
|
|
- * \brief Write the database region
|
|
|
+ * \brief Writes the database region (window)
|
|
|
*
|
|
|
* Writes the database region file (WIND) in the user's current mapset
|
|
|
- * from region.
|
|
|
-
|
|
|
- * <b>Warning:</b> Since this routine actually changes the database
|
|
|
- * region, it should only be called by modules which the user knows
|
|
|
+ * or when environmental variable \c WIND_OVERRIDE is set,
|
|
|
+ * it writes the region to file specified by \c WIND_OVERRIDE variable.
|
|
|
+ *
|
|
|
+ * When \c WIND_OVERRIDE is set the current process and child processes
|
|
|
+ * are affected.
|
|
|
+ * Otherwise the whole GRASS session is affected.
|
|
|
+ *
|
|
|
+ * \warning When environmental variable \c WIND_OVERRIDE is not set,
|
|
|
+ * this routine actually changes the database 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
|
|
|
- * <tt>g.region</tt>.
|
|
|
+ * \gmod{g.region} should call this routine unless \c WIND_OVERRIDE is set.
|
|
|
+ *
|
|
|
+ * This function does not adjust the \p window before setting the region
|
|
|
+ * so you should call G_adjust_Cell_head() before calling this function.
|
|
|
*
|
|
|
* \param[in,out] window pointer to Cell_head
|
|
|
*
|
|
|
* \return 1 on success
|
|
|
* \return -1 on error (no diagnostic message is printed)
|
|
|
+ *
|
|
|
+ * \sa G_get_window(), G_set_window(), python.core.use_temp_region()
|
|
|
*/
|
|
|
int G_put_window(const struct Cell_head *window)
|
|
|
{
|
|
@@ -47,7 +58,7 @@ int G_put_window(const struct Cell_head *window)
|
|
|
* <b>Warning:</b> Since this routine actually changes the database
|
|
|
* 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>.
|
|
|
+ * <tt>g.region</tt> should call this routine.
|
|
|
*
|
|
|
* \param[in,out] window pointer to Cell_head
|
|
|
* \param dir directory name
|
|
@@ -55,6 +66,8 @@ int G_put_window(const struct Cell_head *window)
|
|
|
*
|
|
|
* \return 1 on success
|
|
|
* \return -1 on error (no diagnostic message is printed)
|
|
|
+ *
|
|
|
+ * \sa G_put_window()
|
|
|
*/
|
|
|
int G__put_window(const struct Cell_head *window, const char *dir, const char *name)
|
|
|
{
|