[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] remove some functions that are not used; #if0 out some file...



Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv27544/src/common

Modified Files:
	container.c container.h crypto.c crypto.h log.c log.h 
Log Message:
remove some functions that are not used; #if0 out some files that are not likely to be used.

Index: container.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/container.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- container.c	26 Nov 2005 00:42:25 -0000	1.51
+++ container.c	30 Nov 2005 06:27:58 -0000	1.52
@@ -77,17 +77,6 @@
   sl->num_used = 0;
 }
 
-/** Set the list's new length to <b>len</b> (which must be \<= the list's
- * current size). Remove the last smartlist_len(sl)-len elements from the
- * list.
- */
-void
-smartlist_truncate(smartlist_t *sl, int len)
-{
-  tor_assert(len <= sl->num_used);
-  sl->num_used = len;
-}
-
 /** Append element to the end of the list. */
 void
 smartlist_add(smartlist_t *sl, void *element)

Index: container.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/container.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- container.h	23 Nov 2005 07:48:13 -0000	1.25
+++ container.h	30 Nov 2005 06:27:58 -0000	1.26
@@ -25,7 +25,6 @@
 void smartlist_free(smartlist_t *sl);
 void smartlist_set_capacity(smartlist_t *sl, int n);
 void smartlist_clear(smartlist_t *sl);
-void smartlist_truncate(smartlist_t *sl, int n);
 void smartlist_add(smartlist_t *sl, void *element);
 void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2);
 void smartlist_remove(smartlist_t *sl, void *element);

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/crypto.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- crypto.c	21 Nov 2005 01:12:01 -0000	1.177
+++ crypto.c	30 Nov 2005 06:27:58 -0000	1.178
@@ -1205,15 +1205,6 @@
   return 0;
 }
 
-/** Move the position of the cipher stream backwards by <b>delta</b> bytes.
- * Return 0 on success, -1 on failure.
- */
-int
-crypto_cipher_rewind(crypto_cipher_env_t *env, long delta)
-{
-  return crypto_cipher_advance(env, -delta);
-}
-
 /** Move the position of the cipher stream forwards by <b>delta</b> bytes.
  * Return 0 on success, -1 on failure.
  */

Index: crypto.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/crypto.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- crypto.h	25 Oct 2005 19:01:48 -0000	1.69
+++ crypto.h	30 Nov 2005 06:27:58 -0000	1.70
@@ -120,7 +120,6 @@
                           const char *from, size_t fromlen);
 
 /* only implemented for CRYPTO_CIPHER_AES_CTR */
-int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta);
 int crypto_cipher_advance(crypto_cipher_env_t *env, long delta);
 
 /* SHA-1 */

Index: log.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/log.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- log.c	15 Nov 2005 03:05:15 -0000	1.106
+++ log.c	30 Nov 2005 06:27:58 -0000	1.107
@@ -324,7 +324,9 @@
   }
 }
 
+#if 0
 /** Close and re-open all log files; used to rotate logs on SIGHUP. */
+/* Nobody uses this. Remove it? XXXX */
 void
 reset_logs(void)
 {
@@ -340,6 +342,7 @@
     lf = lf->next;
   }
 }
+#endif
 
 /** Remove and free the log entry <b>victim</b> from the linked-list
  * logfiles (it must be present in the list when this function is

Index: log.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/log.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- log.h	15 Nov 2005 03:05:15 -0000	1.60
+++ log.h	30 Nov 2005 06:27:58 -0000	1.61
@@ -103,7 +103,6 @@
 int get_min_log_level(void);
 void switch_logs_debug(void);
 void close_logs(void);
-void reset_logs(void);
 void add_temp_log(void);
 void close_temp_logs(void);
 void mark_logs_temp(void);