فهرست منبع

rename GRASS_TMPDIR_MAPSET to GRASS_VECTOR_TMPDIR_MAPSET

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65586 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 سال پیش
والد
کامیت
aa07db4c27
3فایلهای تغییر یافته به همراه22 افزوده شده و 21 حذف شده
  1. 6 5
      lib/gis/file_name.c
  2. 15 15
      lib/init/variables.html
  3. 1 1
      lib/vector/Vlib/map.c

+ 6 - 5
lib/gis/file_name.c

@@ -63,10 +63,11 @@ char *G_file_name_misc(char *path,
   \brief Builds full path names to GIS data files in temporary directory (for internal use only)
   \brief Builds full path names to GIS data files in temporary directory (for internal use only)
 
 
   By default temporary directory is located
   By default temporary directory is located
-  $LOCATION/$MAPSET/.tmp/$HOSTNAME. If GRASS_TMPDIR_MAPSET is set to
-  "0", the temporary directory is located in TMPDIR (environmental
-  variable defined by the user or GRASS initialization script if not
-  given).
+  $LOCATION/$MAPSET/.tmp/$HOSTNAME. If GRASS_VECTOR_TMPDIR_MAPSET is
+  set to "0", the temporary directory is located in TMPDIR
+  (environmental variable defined by the user or GRASS initialization
+  script if not given). Note that GRASS_VECTOR_TMPDIR_MAPSET variable
+  is currently used only by vector library.
 
 
   \param[out] path buffer to hold resultant full path to file
   \param[out] path buffer to hold resultant full path to file
   \param element database element (eg, "cell", "cellhd", "vector", etc)
   \param element database element (eg, "cell", "cellhd", "vector", etc)
@@ -82,7 +83,7 @@ char *G_file_name_tmp(char *path,
     const char *env, *tmp_path;
     const char *env, *tmp_path;
 
 
     tmp_path = NULL;
     tmp_path = NULL;
-    env = getenv("GRASS_TMPDIR_MAPSET");
+    env = getenv("GRASS_VECTOR_TMPDIR_MAPSET");
     if (env && strcmp(env, "0") == 0) {
     if (env && strcmp(env, "0") == 0) {
         tmp_path = getenv("TMPDIR");
         tmp_path = getenv("TMPDIR");
     }
     }

+ 15 - 15
lib/init/variables.html

@@ -278,7 +278,7 @@ PERMANENT
   <dd>[vectorlib]<br> If the environment variable
   <dd>[vectorlib]<br> If the environment variable
     GRASS_VECTOR_TEMPORARY exists, GRASS vector library will operate
     GRASS_VECTOR_TEMPORARY exists, GRASS vector library will operate
     on temporary vector maps. New vector maps will be created in
     on temporary vector maps. New vector maps will be created in
-    temporary directory (see GRASS_TMPDIR_MAPSET variable), existing
+    temporary directory (see GRASS_VECTOR_TMPDIR_MAPSET variable), existing
     vector maps will be read (if found) also from this directory. It
     vector maps will be read (if found) also from this directory. It
     may be set to either:
     may be set to either:
     <ul>
     <ul>
@@ -297,7 +297,20 @@ PERMANENT
     or <em><a href="wxGUI.html">wxGUI</a></em>. They are used
     or <em><a href="wxGUI.html">wxGUI</a></em>. They are used
     internally by the GRASS modules and deleted automatically when
     internally by the GRASS modules and deleted automatically when
     GRASS session is quited.</dd>
     GRASS session is quited.</dd>
-  
+
+  <dt>GRASS_VECTOR_TMPDIR_MAPSET</dt>
+  <dd> By default GRASS temporary directory is located in
+  <tt>$LOCATION/$MAPSET/.tmp/$HOSTNAME</tt>. If GRASS_VECTOR_TMPDIR_MAPSET is
+  set to '0', the temporary directory is located in TMPDIR
+  (environmental variable defined by the user or GRASS initialization
+  script if not given).
+
+  <p>
+  Important note: This variable is currently used only in vector
+  library. In other words the variable is ignored by raster or
+  raster3d library.
+  </dd>
+
   <dt>GRASS_VECTOR_TOPO_DEBUG</dt>
   <dt>GRASS_VECTOR_TOPO_DEBUG</dt>
   <dd>[vectorlib, v.generalize]<br> If the environment variable
   <dd>[vectorlib, v.generalize]<br> If the environment variable
   GRASS_VECTOR_TOPO_DEBUG
   GRASS_VECTOR_TOPO_DEBUG
@@ -347,19 +360,6 @@ PERMANENT
     The default is set to the number of CPUs on the system.
     The default is set to the number of CPUs on the system.
     Setting to '1' effectively disables parallel processing.</dd>
     Setting to '1' effectively disables parallel processing.</dd>
 
 
-  <dt>GRASS_TMPDIR_MAPSET</dt>
-  <dd> By default GRASS temporary directory is located in
-  <tt>$LOCATION/$MAPSET/.tmp/$HOSTNAME</tt>. If GRASS_TMPDIR_MAPSET is
-  set to '0', the temporary directory is located in TMPDIR
-  (environmental variable defined by the user or GRASS initialization
-  script if not given).
-
-  <p>
-  Important note: This variable is currently used only in vector
-  library. In other words the variable is ignored by raster or
-  raster3d library.
-  </dd>
-  
   <dt>TMPDIR, TEMP, TMP</dt>
   <dt>TMPDIR, TEMP, TMP</dt>
   <dd>[Various GRASS GIS commands and wxGUI]<br>
   <dd>[Various GRASS GIS commands and wxGUI]<br>
   <!-- what about Windows %TEMP% and http://trac.osgeo.org/grass/ticket/560#comment:21 ? -->
   <!-- what about Windows %TEMP% and http://trac.osgeo.org/grass/ticket/560#comment:21 ? -->

+ 1 - 1
lib/vector/Vlib/map.c

@@ -468,7 +468,7 @@ int Vect__delete(const char *map, int is_tmp)
     }
     }
     closedir(dir);
     closedir(dir);
     
     
-    env = getenv("GRASS_TMPDIR_MAPSET");
+    env = getenv("GRASS_VECTOR_TMPDIR_MAPSET");
     if (env && strcmp(env, "0") == 0) {
     if (env && strcmp(env, "0") == 0) {
 	tmp = path;
 	tmp = path;
     }
     }