Browse Source

revert https://trac.osgeo.org/grass/changeset/61794 due to .po file mixup

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61795 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 10 years ago
parent
commit
25c85c4666
7 changed files with 567 additions and 709 deletions
  1. 0 1
      lib/gis/G.h
  2. 3 7
      lib/gis/flate.c
  3. 0 6
      lib/gis/gisinit.c
  4. 2 14
      lib/init/variables.html
  5. 1 5
      lib/raster/init.c
  6. 558 673
      locale/po/grasslibs_de.po
  7. 3 3
      raster/r.compress/r.compress.html

+ 0 - 1
lib/gis/G.h

@@ -6,7 +6,6 @@ struct G__			/*  Structure of library globals */
     struct Cell_head window;	/* Contains the current window          */
     int window_set;		/* Flag: window set?                    */
     int little_endian;          /* Flag denoting little-endian architecture */
-    int compression_level;	/* zlib compression level               */
 };
 
 extern struct G__ G__;		/* allocated in gisinit */

+ 3 - 7
lib/gis/flate.c

@@ -123,8 +123,6 @@
 #include <unistd.h>
 #include <grass/gis.h>
 
-#include "G.h"
-
 #define G_ZLIB_COMPRESSED_NO (unsigned char)'0'
 #define G_ZLIB_COMPRESSED_YES (unsigned char)'1'
 
@@ -329,12 +327,10 @@ G_zlib_compress(const unsigned char *src, int src_sz, unsigned char *dst,
     c_stream.next_out = buf;
 
     /* Initialize */
-    /* Valid zlib compression levels -1 - 9 */
-    /* zlib default: Z_DEFAULT_COMPRESSION = -1, equivalent to 6 
+    /* Compression levels 0 - 9 */
+    /* zlib default: Z_DEFAULT_COMPRESSION (-1), equivalent to 6 
      * as used here, 1 gives the best compromise between speed and compression */
-    err = deflateInit(&c_stream,
-                      (G__.compression_level < -1 || G__.compression_level > 9) 
-		      ? 1 : G__.compression_level);
+    err = deflateInit(&c_stream, 1);
 
     /* If there was an error initializing, return -1 */
     if (err != Z_OK) {

+ 0 - 6
lib/gis/gisinit.c

@@ -14,7 +14,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -106,8 +105,6 @@ void G__check_gisinit(void)
 
 static int gisinit(void)
 {
-    char *zlib;
-
 #ifdef __MINGW32__
     _fmode = O_BINARY;
 #endif
@@ -117,9 +114,6 @@ static int gisinit(void)
     /* byte order */
     G__.little_endian = G_is_little_endian();
 
-    zlib = getenv("GRASS_ZLIB_LEVEL");
-    G__.compression_level = (zlib && *zlib && isdigit(*zlib)) ? atoi(zlib) : -2;
-
     initialized = 1;
 
     setlocale(LC_NUMERIC, "C");

+ 2 - 14
lib/init/variables.html

@@ -161,25 +161,13 @@ PERMANENT
     &lt;key&gt;, without the bracketing &lt;string&gt; tags.</dd>
 
   <dt>GRASS_INT_ZLIB</dt>
-  <dd>[libraster]<br> if the environment variable GRASS_INT_ZLIB exists and has the value 0,
+  <dd>[libgis]<br> if the environment variable GRASS_INT_ZLIB exists,
     new compressed <i>integer</i> (CELL type) raster maps will be compressed
-    using RLE compression.
-    <br><br>
-    If the variable doesn't exist, or the value is non-zero, zlib compression
-    will be used instead. Such rasters will have a <tt>compressed</tt>
+    using zlib instead of RLE compression. Such rasters will have a <tt>compressed</tt>
     value of 2 in the cellhd file.
     <br><br>
     Obviously, decompression is controlled by the
     raster's <tt>compressed</tt> value, not the environment variable.</dd>
-
-  <dt>GRASS_ZLIB_LEVEL</dt>
-  <dd>[libgis]<br> if the environment variable GRASS_ZLIB_LEVEL exists and its value can
-    be parsed as an integer, it determines the compression level used when new compressed
-    raster maps are compressed using zlib compression. This applies to all 
-    raster map types (CELL, FCELL, DCELL).
-    <br><br>
-    If the variable doesn't exist, or the value cannot be parsed as an
-    integer, zlib's default compression level will be used.</dd>
   
   <dt>GRASS_MESSAGE_FORMAT</dt>
   <dd>[various modules, wxGUI]<br>

+ 1 - 5
lib/raster/init.c

@@ -77,8 +77,6 @@ void Rast__error_handler(void *p)
 
 static int init(void)
 {
-    char *zlib;
-
     Rast__init_window();
 
     /* no histograms */
@@ -92,9 +90,7 @@ static int init(void)
     R__.mask_fd = -1;
 
     R__.nbytes = sizeof(CELL);
-
-    zlib = getenv("GRASS_INT_ZLIB");
-    R__.compression_type = (!zlib || atoi(zlib)) ? 2 : 1;
+    R__.compression_type = getenv("GRASS_INT_ZLIB") ? 2 : 1;
 
     G_add_error_handler(Rast__error_handler, NULL);
 

File diff suppressed because it is too large
+ 558 - 673
locale/po/grasslibs_de.po


+ 3 - 3
raster/r.compress/r.compress.html

@@ -49,10 +49,10 @@ the user the map is already (de)compressed and exits.
 Floating point (FCELL, DCELL) raster maps never use RLE compression;
 they are either compressed with ZLIB or uncompressed.
 <p>
-Integer (CELL) raster maps are by default ZLIB compressed or may remain
+Integer (CELL) raster maps by default RLE compressed or may remain
 uncompressed. If the environment variable <tt>GRASS_INT_ZLIB</tt>
-exists and has the value 0, newly generated compressed integer (CELL type) raster maps will
-be compressed using RLE compression instead of ZLIB. In the internal
+exists, newly generated compressed integer (CELL type) raster maps will
+be compressed using ZLIB instead of RLE compression. In the internal
 cellhd file, the value for "compressed" is 1 for RLE and 2 for ZLIB.
 <p>
 Obviously, decompression is controlled by the raster map's compression,