Commit 9cec3a13 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

remove some functions that are not used; #if0 out some files that are not likely to be used.


svn:r5471
parent a6eb8cd2
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -77,17 +77,6 @@ smartlist_clear(smartlist_t *sl)
  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)
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ smartlist_t *smartlist_create(void);
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);
+0 −9
Original line number Diff line number Diff line
@@ -1205,15 +1205,6 @@ crypto_cipher_decrypt(crypto_cipher_env_t *env, char *to,
  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.
 */
+0 −1
Original line number Diff line number Diff line
@@ -120,7 +120,6 @@ int crypto_cipher_decrypt(crypto_cipher_env_t *env, char *to,
                          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 */
+3 −0
Original line number Diff line number Diff line
@@ -324,7 +324,9 @@ close_logs(void)
  }
}

#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 @@ reset_logs(void)
    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
Loading