Browse Source

Rename the `torgzip` module to `compress`.

See https://bugs.torproject.org/21663
Alexander Færøy 7 years ago
parent
commit
04583df452

+ 1 - 1
src/common/Makefile.nmake

@@ -7,7 +7,7 @@ LIBOR_OBJECTS = address.obj backtrace.obj compat.obj container.obj di_ops.obj \
 	log.obj memarea.obj mempool.obj procmon.obj sandbox.obj util.obj \
 	util_codedigest.obj
 
-LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj crypto_format.obj torgzip.obj tortls.obj \
+LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj crypto_format.obj compress.obj tortls.obj \
 	crypto_curve25519.obj curve25519-donna.obj
 
 LIBOR_EVENT_OBJECTS = compat_libevent.obj

+ 3 - 3
src/common/torgzip.c → src/common/compress.c

@@ -4,8 +4,8 @@
 /* See LICENSE for licensing information */
 
 /**
- * \file torgzip.c
- * \brief A simple in-memory gzip implementation.
+ * \file compress.c
+ * \brief Common compression API.
  **/
 
 #include "orconfig.h"
@@ -22,7 +22,7 @@
 
 #include "util.h"
 #include "torlog.h"
-#include "torgzip.h"
+#include "compress.h"
 #include "compress_zlib.h"
 
 /** @{ */

+ 5 - 5
src/common/torgzip.h → src/common/compress.h

@@ -4,12 +4,12 @@
 /* See LICENSE for licensing information */
 
 /**
- * \file torgzip.h
- * \brief Headers for torgzip.h
+ * \file compress.h
+ * \brief Headers for compress.c
  **/
 
-#ifndef TOR_TORGZIP_H
-#define TOR_TORGZIP_H
+#ifndef TOR_COMPRESS_H
+#define TOR_COMPRESS_H
 
 /** Enumeration of what kind of compression to use.  Only ZLIB_METHOD and
  * GZIP_METHOD is guaranteed to be supported by the compress/uncompress
@@ -70,5 +70,5 @@ void tor_compress_free(tor_compress_state_t *state);
 
 size_t tor_compress_state_size(const tor_compress_state_t *state);
 
-#endif
+#endif // TOR_COMPRESS_H.
 

+ 1 - 1
src/common/compress_zlib.c

@@ -15,7 +15,7 @@
 
 #include "util.h"
 #include "torlog.h"
-#include "torgzip.h"
+#include "compress.h"
 #include "compress_zlib.h"
 
 /* zlib 1.2.4 and 1.2.5 do some "clever" things with macros.  Instead of

+ 2 - 2
src/common/include.am

@@ -105,12 +105,12 @@ src/common/src_common_libor_testing_a-log.$(OBJEXT) \
 
 LIBOR_CRYPTO_A_SRC = \
   src/common/aes.c		\
+  src/common/compress.c	\
   src/common/compress_zlib.c	\
   src/common/crypto.c		\
   src/common/crypto_pwbox.c     \
   src/common/crypto_s2k.c	\
   src/common/crypto_format.c	\
-  src/common/torgzip.c		\
   src/common/tortls.c		\
   src/common/crypto_curve25519.c \
   src/common/crypto_ed25519.c
@@ -146,6 +146,7 @@ COMMONHEADERS = \
   src/common/compat_openssl.h			\
   src/common/compat_threads.h			\
   src/common/compat_time.h			\
+  src/common/compress.h			\
   src/common/compress_zlib.h			\
   src/common/confline.h				\
   src/common/container.h			\
@@ -165,7 +166,6 @@ COMMONHEADERS = \
   src/common/storagedir.h			\
   src/common/testsupport.h			\
   src/common/timers.h				\
-  src/common/torgzip.h				\
   src/common/torint.h				\
   src/common/torlog.h				\
   src/common/tortls.h				\

+ 1 - 1
src/or/config.c

@@ -69,6 +69,7 @@
 #include "circuitmux.h"
 #include "circuitmux_ewma.h"
 #include "circuitstats.h"
+#include "compress.h"
 #include "compress_zlib.h"
 #include "config.h"
 #include "connection.h"
@@ -100,7 +101,6 @@
 #include "statefile.h"
 #include "transports.h"
 #include "ext_orport.h"
-#include "torgzip.h"
 #ifdef _WIN32
 #include <shlobj.h>
 #endif

+ 1 - 1
src/or/or.h

@@ -71,7 +71,7 @@
 #include "tortls.h"
 #include "torlog.h"
 #include "container.h"
-#include "torgzip.h"
+#include "compress.h"
 #include "address.h"
 #include "compat_libevent.h"
 #include "ht.h"

+ 1 - 1
src/test/test.c

@@ -44,13 +44,13 @@ double fabs(double x);
 #include "buffers.h"
 #include "circuitlist.h"
 #include "circuitstats.h"
+#include "compress.h"
 #include "config.h"
 #include "connection_edge.h"
 #include "geoip.h"
 #include "rendcommon.h"
 #include "rendcache.h"
 #include "test.h"
-#include "torgzip.h"
 #include "main.h"
 #include "memarea.h"
 #include "onion.h"

+ 1 - 1
src/test/test_dir_handle_get.c

@@ -14,6 +14,7 @@
 #include "connection.h"
 #include "directory.h"
 #include "test.h"
+#include "compress.h"
 #include "connection.h"
 #include "rendcommon.h"
 #include "rendcache.h"
@@ -28,7 +29,6 @@
 #include "networkstatus.h"
 #include "geoip.h"
 #include "dirserv.h"
-#include "torgzip.h"
 #include "dirvote.h"
 #include "log_test_helpers.h"