diff options
author | teor <teor@torproject.org> | 2019-12-20 13:27:58 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-12-20 13:27:58 +1000 |
commit | 8c23ac4ae713f7cce7cd7541d2ae635c50c7c062 (patch) | |
tree | 37b14c286cb74987ca9261922135bc4ac8cdd64a | |
parent | cd160291a755ac830855e3226e6c470a5b2ecede (diff) | |
download | tor-8c23ac4ae713f7cce7cd7541d2ae635c50c7c062.tar.gz tor-8c23ac4ae713f7cce7cd7541d2ae635c50c7c062.zip |
Replace several C identifiers.
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \
TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \
CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \
EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \
SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
31 files changed, 45 insertions, 45 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c index 3693e1d715..50fd12319e 100644 --- a/src/core/mainloop/connection.c +++ b/src/core/mainloop/connection.c @@ -65,7 +65,7 @@ * Define this so we get channel internal functions, since we're implementing * part of a subclass (channel_tls_t). */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "app/config/config.h" #include "core/mainloop/connection.h" #include "core/mainloop/mainloop.h" diff --git a/src/core/or/channel.c b/src/core/or/channel.c index 1641a96800..2faf638756 100644 --- a/src/core/or/channel.c +++ b/src/core/or/channel.c @@ -52,10 +52,10 @@ * Define this so channel.h gives us things only channel_t subclasses * should touch. */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE /* This one's for stuff only channel.c and the test suite should see */ -#define CHANNEL_PRIVATE_ +#define CHANNEL_FILE_PRIVATE #include "core/or/or.h" #include "app/config/config.h" diff --git a/src/core/or/channel.h b/src/core/or/channel.h index 7f5bd9bf2f..0f6fa228dd 100644 --- a/src/core/or/channel.h +++ b/src/core/or/channel.h @@ -563,13 +563,13 @@ void channel_free_all(void); void channel_dumpstats(int severity); void channel_listener_dumpstats(int severity); -#ifdef TOR_CHANNEL_INTERNAL_ +#ifdef CHANNEL_OBJECT_PRIVATE -#ifdef CHANNEL_PRIVATE_ +#ifdef CHANNEL_FILE_PRIVATE STATIC void channel_add_to_digest_map(channel_t *chan); -#endif /* defined(CHANNEL_PRIVATE_) */ +#endif /* defined(CHANNEL_FILE_PRIVATE) */ /* Channel operations for subclasses and internal use only */ @@ -648,7 +648,7 @@ void channel_notify_flushed(channel_t *chan); /* Handle stuff we need to do on open like notifying circuits */ void channel_do_open_actions(channel_t *chan); -#endif /* defined(TOR_CHANNEL_INTERNAL_) */ +#endif /* defined(CHANNEL_OBJECT_PRIVATE) */ /* Helper functions to perform operations on channels */ diff --git a/src/core/or/channelpadding.c b/src/core/or/channelpadding.c index 2b8314db89..9c95858bb3 100644 --- a/src/core/or/channelpadding.c +++ b/src/core/or/channelpadding.c @@ -9,9 +9,9 @@ * @brief Link-level padding code. **/ -/* TOR_CHANNEL_INTERNAL_ define needed for an O(1) implementation of +/* CHANNEL_OBJECT_PRIVATE define needed for an O(1) implementation of * channelpadding_channel_to_channelinfo() */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "core/or/or.h" #include "core/or/channel.h" diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index e9497651ef..a5710c7f40 100644 --- a/src/core/or/channeltls.c +++ b/src/core/or/channeltls.c @@ -34,7 +34,7 @@ * Define this so channel.h gives us things only channel_t subclasses * should touch. */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CHANNELTLS_PRIVATE diff --git a/src/core/or/channeltls.h b/src/core/or/channeltls.h index ff703a4979..720adbdd25 100644 --- a/src/core/or/channeltls.h +++ b/src/core/or/channeltls.h @@ -22,7 +22,7 @@ struct curve25519_public_key_t; #define TLS_CHAN_MAGIC 0x8a192427U -#ifdef TOR_CHANNEL_INTERNAL_ +#ifdef CHANNEL_OBJECT_PRIVATE struct channel_tls_t { /* Base channel_t struct */ @@ -31,7 +31,7 @@ struct channel_tls_t { or_connection_t *conn; }; -#endif /* defined(TOR_CHANNEL_INTERNAL_) */ +#endif /* defined(CHANNEL_OBJECT_PRIVATE) */ channel_t * channel_tls_connect(const tor_addr_t *addr, uint16_t port, const char *id_digest, diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c index 4c93351e31..24a4af045e 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -27,7 +27,7 @@ * Define this so we get channel internal functions, since we're implementing * part of a subclass (channel_tls_t). */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CONNECTION_OR_PRIVATE #define ORCONN_EVENT_PRIVATE #include "core/or/channel.h" diff --git a/src/core/or/scheduler.c b/src/core/or/scheduler.c index 5b1cd90ae5..023e9bf1b9 100644 --- a/src/core/or/scheduler.c +++ b/src/core/or/scheduler.c @@ -5,12 +5,12 @@ #include "app/config/config.h" #include "lib/evloop/compat_libevent.h" -#define SCHEDULER_PRIVATE_ +#define SCHEDULER_PRIVATE #define SCHEDULER_KIST_PRIVATE #include "core/or/scheduler.h" #include "core/mainloop/mainloop.h" #include "lib/buf/buffers.h" -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "core/or/channeltls.h" #include "core/or/or_connection_st.h" diff --git a/src/core/or/scheduler.h b/src/core/or/scheduler.h index b82f8730b0..8b3995e61d 100644 --- a/src/core/or/scheduler.h +++ b/src/core/or/scheduler.h @@ -136,7 +136,7 @@ MOCK_DECL(void, scheduler_channel_has_waiting_cells, (channel_t *chan)); * These functions are only visible to the scheduling system, the current * scheduler implementation, and tests. *****************************************************************************/ -#ifdef SCHEDULER_PRIVATE_ +#ifdef SCHEDULER_PRIVATE /********************************* * Defined in scheduler.c @@ -212,7 +212,7 @@ extern int32_t sched_run_interval; scheduler_t *get_vanilla_scheduler(void); -#endif /* defined(SCHEDULER_PRIVATE_) */ +#endif /* defined(SCHEDULER_PRIVATE) */ #endif /* !defined(TOR_SCHEDULER_H) */ diff --git a/src/core/or/scheduler_kist.c b/src/core/or/scheduler_kist.c index 660c222a31..a074b66ae4 100644 --- a/src/core/or/scheduler_kist.c +++ b/src/core/or/scheduler_kist.c @@ -13,10 +13,10 @@ #include "app/config/config.h" #include "core/mainloop/connection.h" #include "feature/nodelist/networkstatus.h" -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "core/or/channel.h" #include "core/or/channeltls.h" -#define SCHEDULER_PRIVATE_ +#define SCHEDULER_PRIVATE #include "core/or/scheduler.h" #include "lib/math/fp.h" diff --git a/src/core/or/scheduler_vanilla.c b/src/core/or/scheduler_vanilla.c index bd84a4e4ef..fb8cd65a86 100644 --- a/src/core/or/scheduler_vanilla.c +++ b/src/core/or/scheduler_vanilla.c @@ -8,9 +8,9 @@ #include "core/or/or.h" #include "app/config/config.h" -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "core/or/channel.h" -#define SCHEDULER_PRIVATE_ +#define SCHEDULER_PRIVATE #include "core/or/scheduler.h" /***************************************************************************** diff --git a/src/feature/dirparse/policy_parse.c b/src/feature/dirparse/policy_parse.c index 7562ae409b..cad623d560 100644 --- a/src/feature/dirparse/policy_parse.c +++ b/src/feature/dirparse/policy_parse.c @@ -9,7 +9,7 @@ * \brief Code to parse address policies. **/ -#define EXPOSE_ROUTERDESC_TOKEN_TABLE +#define ROUTERDESC_TOKEN_TABLE_PRIVATE #include "core/or/or.h" diff --git a/src/feature/dirparse/routerparse.c b/src/feature/dirparse/routerparse.c index f78c46f186..d4c0a11f14 100644 --- a/src/feature/dirparse/routerparse.c +++ b/src/feature/dirparse/routerparse.c @@ -50,7 +50,7 @@ * </ul> **/ -#define EXPOSE_ROUTERDESC_TOKEN_TABLE +#define ROUTERDESC_TOKEN_TABLE_PRIVATE #include "core/or/or.h" #include "app/config/config.h" diff --git a/src/feature/dirparse/routerparse.h b/src/feature/dirparse/routerparse.h index f9a13f2168..f2e59f0f24 100644 --- a/src/feature/dirparse/routerparse.h +++ b/src/feature/dirparse/routerparse.h @@ -40,7 +40,7 @@ int find_single_ipv6_orport(const smartlist_t *list, void routerparse_init(void); void routerparse_free_all(void); -#ifdef EXPOSE_ROUTERDESC_TOKEN_TABLE +#ifdef ROUTERDESC_TOKEN_TABLE_PRIVATE extern const struct token_rule_t routerdesc_token_table[]; #endif diff --git a/src/lib/err/backtrace.c b/src/lib/err/backtrace.c index ce8ddcd7c0..62088c1f46 100644 --- a/src/lib/err/backtrace.c +++ b/src/lib/err/backtrace.c @@ -54,7 +54,7 @@ #include "lib/cc/ctassert.h" -#define EXPOSE_CLEAN_BACKTRACE +#define BACKTRACE_PRIVATE #include "lib/err/backtrace.h" #if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \ diff --git a/src/lib/err/backtrace.h b/src/lib/err/backtrace.h index 7e09a0a5a7..21303105e2 100644 --- a/src/lib/err/backtrace.h +++ b/src/lib/err/backtrace.h @@ -29,11 +29,11 @@ const char *get_tor_backtrace_version(void); #define log_backtrace(sev, dom, msg) \ log_backtrace_impl((sev), (dom), (msg), tor_log) -#ifdef EXPOSE_CLEAN_BACKTRACE +#ifdef BACKTRACE_PRIVATE #if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \ defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION) void clean_backtrace(void **stack, size_t depth, const ucontext_t *ctx); #endif -#endif /* defined(EXPOSE_CLEAN_BACKTRACE) */ +#endif /* defined(BACKTRACE_PRIVATE) */ #endif /* !defined(TOR_BACKTRACE_H) */ diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c index 0b316e9c6a..2429f30beb 100644 --- a/src/lib/sandbox/sandbox.c +++ b/src/lib/sandbox/sandbox.c @@ -82,7 +82,7 @@ #if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \ defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION) #define USE_BACKTRACE -#define EXPOSE_CLEAN_BACKTRACE +#define BACKTRACE_PRIVATE #include "lib/err/backtrace.h" #endif /* defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && ... */ diff --git a/src/test/test_channel.c b/src/test/test_channel.c index 6a6bc9d810..0353032796 100644 --- a/src/test/test_channel.c +++ b/src/test/test_channel.c @@ -1,8 +1,8 @@ /* Copyright (c) 2013-2019, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#define TOR_CHANNEL_INTERNAL_ -#define CHANNEL_PRIVATE_ +#define CHANNEL_OBJECT_PRIVATE +#define CHANNEL_FILE_PRIVATE #include "core/or/or.h" #include "core/or/channel.h" /* For channel_note_destroy_not_pending */ diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c index 885246628e..0c610efd97 100644 --- a/src/test/test_channelpadding.c +++ b/src/test/test_channelpadding.c @@ -1,7 +1,7 @@ /* Copyright (c) 2016-2019, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define MAINLOOP_PRIVATE #define NETWORKSTATUS_PRIVATE #define TOR_TIMERS_PRIVATE diff --git a/src/test/test_channeltls.c b/src/test/test_channeltls.c index 054d3910e4..f41a58e0a1 100644 --- a/src/test/test_channeltls.c +++ b/src/test/test_channeltls.c @@ -5,7 +5,7 @@ #include <math.h> -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "core/or/or.h" #include "lib/net/address.h" #include "lib/buf/buffers.h" diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c index 5cebdbeda0..d9a5927fd9 100644 --- a/src/test/test_circuitlist.c +++ b/src/test/test_circuitlist.c @@ -1,7 +1,7 @@ /* Copyright (c) 2013-2019, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CIRCUITBUILD_PRIVATE #define CIRCUITLIST_PRIVATE #define HS_CIRCUITMAP_PRIVATE diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c index f0b0465579..8ff1f9c9e5 100644 --- a/src/test/test_circuitmux.c +++ b/src/test/test_circuitmux.c @@ -1,7 +1,7 @@ /* Copyright (c) 2013-2019, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CIRCUITMUX_PRIVATE #define CIRCUITMUX_EWMA_PRIVATE #define RELAY_PRIVATE diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c index 78a019de84..cfb24c032c 100644 --- a/src/test/test_circuitpadding.c +++ b/src/test/test_circuitpadding.c @@ -1,4 +1,4 @@ -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define TOR_TIMERS_PRIVATE #define CIRCUITPADDING_PRIVATE #define CIRCUITPADDING_MACHINES_PRIVATE diff --git a/src/test/test_circuitstats.c b/src/test/test_circuitstats.c index 9bfaabeb2f..f554a781d2 100644 --- a/src/test/test_circuitstats.c +++ b/src/test/test_circuitstats.c @@ -4,7 +4,7 @@ #define CIRCUITBUILD_PRIVATE #define CIRCUITSTATS_PRIVATE #define CIRCUITLIST_PRIVATE -#define CHANNEL_PRIVATE_ +#define CHANNEL_FILE_PRIVATE #include "core/or/or.h" #include "test/test.h" diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c index 9267aa0e43..db4530ef41 100644 --- a/src/test/test_controller_events.c +++ b/src/test/test_controller_events.c @@ -2,7 +2,7 @@ /* See LICENSE for licensing information */ #define CONNECTION_PRIVATE -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CONTROL_PRIVATE #define CONTROL_EVENTS_PRIVATE #define OCIRC_EVENT_PRIVATE diff --git a/src/test/test_dos.c b/src/test/test_dos.c index bda9908e6c..7472da2af1 100644 --- a/src/test/test_dos.c +++ b/src/test/test_dos.c @@ -2,7 +2,7 @@ /* See LICENSE for licensing information */ #define DOS_PRIVATE -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CIRCUITLIST_PRIVATE #include "core/or/or.h" diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c index c39a4b644d..fd673c9990 100644 --- a/src/test/test_hs_cache.c +++ b/src/test/test_hs_cache.c @@ -10,7 +10,7 @@ #define DIRCACHE_PRIVATE #define DIRCLIENT_PRIVATE #define HS_CACHE_PRIVATE -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #include "trunnel/ed25519_cert.h" #include "feature/hs/hs_cache.h" diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c index 515462e4b7..b3cf79848c 100644 --- a/src/test/test_hs_client.c +++ b/src/test/test_hs_client.c @@ -10,7 +10,7 @@ #define CRYPTO_PRIVATE #define MAINLOOP_PRIVATE #define HS_CLIENT_PRIVATE -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define CIRCUITBUILD_PRIVATE #define CIRCUITLIST_PRIVATE #define CONNECTION_PRIVATE diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c index daed1cda84..8bf0405f74 100644 --- a/src/test/test_hs_service.c +++ b/src/test/test_hs_service.c @@ -19,7 +19,7 @@ #define MAINLOOP_PRIVATE #define NETWORKSTATUS_PRIVATE #define STATEFILE_PRIVATE -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define HS_CLIENT_PRIVATE #define CRYPT_PATH_PRIVATE diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c index 7d79eb1edb..f22b9920be 100644 --- a/src/test/test_link_handshake.c +++ b/src/test/test_link_handshake.c @@ -5,7 +5,7 @@ #define CHANNELTLS_PRIVATE #define CONNECTION_PRIVATE -#define TOR_CHANNEL_INTERNAL_ +#define CHANNEL_OBJECT_PRIVATE #define TORTLS_PRIVATE #include "core/or/or.h" diff --git a/src/test/test_scheduler.c b/src/test/test_scheduler.c index 39c4963fce..3d37cc837f 100644 --- a/src/test/test_scheduler.c +++ b/src/test/test_scheduler.c @@ -6,8 +6,8 @@ #include <math.h> #define SCHEDULER_KIST_PRIVATE -#define TOR_CHANNEL_INTERNAL_ -#define CHANNEL_PRIVATE_ +#define CHANNEL_OBJECT_PRIVATE +#define CHANNEL_FILE_PRIVATE #include "core/or/or.h" #include "app/config/config.h" #include "lib/evloop/compat_libevent.h" @@ -15,7 +15,7 @@ #include "core/or/channeltls.h" #include "core/mainloop/connection.h" #include "feature/nodelist/networkstatus.h" -#define SCHEDULER_PRIVATE_ +#define SCHEDULER_PRIVATE #include "core/or/scheduler.h" /* Test suite stuff */ |