diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-12-01 03:48:14 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-12-01 03:48:14 +0000 |
commit | b457cfb5ebab5786beed8168b5b0ef1fc5b2797f (patch) | |
tree | 5d27ff71d1a130f4dd00efdc27f0b6ed8237ef10 | |
parent | 6e88abf418684ccaf4a1d7146b0129857a3864fe (diff) | |
download | tor-b457cfb5ebab5786beed8168b5b0ef1fc5b2797f.tar.gz tor-b457cfb5ebab5786beed8168b5b0ef1fc5b2797f.zip |
Spell-check strings and comments
svn:r3052
-rw-r--r-- | src/common/compat.c | 8 | ||||
-rw-r--r-- | src/common/container.c | 2 | ||||
-rw-r--r-- | src/common/crypto.c | 12 | ||||
-rw-r--r-- | src/common/util.c | 6 | ||||
-rw-r--r-- | src/or/buffers.c | 2 | ||||
-rw-r--r-- | src/or/circuituse.c | 2 | ||||
-rw-r--r-- | src/or/config.c | 10 | ||||
-rw-r--r-- | src/or/connection.c | 2 | ||||
-rw-r--r-- | src/or/dirserv.c | 2 | ||||
-rw-r--r-- | src/or/hibernate.c | 4 | ||||
-rw-r--r-- | src/or/main.c | 4 | ||||
-rw-r--r-- | src/or/rendclient.c | 2 | ||||
-rw-r--r-- | src/or/rendmid.c | 4 | ||||
-rw-r--r-- | src/or/rendservice.c | 4 | ||||
-rw-r--r-- | src/or/rephist.c | 4 | ||||
-rw-r--r-- | src/or/routerlist.c | 2 | ||||
-rw-r--r-- | src/or/routerparse.c | 4 |
17 files changed, 37 insertions, 37 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 16e1bee4b6..029622b4d2 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -112,7 +112,7 @@ int tor_vsnprintf(char *str, size_t size, const char *format, va_list args) #ifndef UNALIGNED_INT_ACCESS_OK /** - * Read a 16-bit value beginning at <b>cp</b>. Equaivalent to + * Read a 16-bit value beginning at <b>cp</b>. Equivalent to * *(uint16_t*)(cp), but will not cause segfaults on platforms that forbid * unaligned memory access. */ @@ -123,7 +123,7 @@ uint16_t get_uint16(const char *cp) return v; } /** - * Read a 32-bit value beginning at <b>cp</b>. Equaivalent to + * Read a 32-bit value beginning at <b>cp</b>. Equivalent to * *(uint32_t*)(cp), but will not cause segfaults on platforms that forbid * unaligned memory access. */ @@ -249,7 +249,7 @@ tor_socketpair(int family, int type, int protocol, int fd[2]) memset(&listen_addr, 0, sizeof(listen_addr)); listen_addr.sin_family = AF_INET; listen_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - listen_addr.sin_port = 0; /* kernel choses port. */ + listen_addr.sin_port = 0; /* kernel chooses port. */ if (bind(listener, (struct sockaddr *) &listen_addr, sizeof (listen_addr)) == -1) goto tidy_up_and_fail; @@ -646,7 +646,7 @@ struct { int code; const char *msg; } windows_socket_errors[] = { E(WSAENETRESET, "Network dropped connection on reset"), E(WSAECONNABORTED, "Software caused connection abort"), E(WSAECONNRESET, "Connection reset by peer"), - E(WSAENOBUFS, "No buffer space avaialable"), + E(WSAENOBUFS, "No buffer space available"), E(WSAEISCONN, "Socket is already connected"), E(WSAENOTCONN, "Socket is not connected"), E(WSAESHUTDOWN, "Cannot send after socket shutdown"), diff --git a/src/common/container.c b/src/common/container.c index a13b20b1ce..0ee53a0fba 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -242,7 +242,7 @@ void smartlist_insert(smartlist_t *sl, int idx, void *val) } /** - * Split a string <b>str</b> along all occurences of <b>sep</b>, + * Split a string <b>str</b> along all occurrences of <b>sep</b>, * adding the split strings, in order, to <b>sl</b>. If * <b>flags</b>&SPLIT_SKIP_SPACE is true, remove initial and * trailing space from each entry. If diff --git a/src/common/crypto.c b/src/common/crypto.c index 25366883ca..a299a0ea13 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1078,7 +1078,7 @@ crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *to, } /** Move the position of the cipher stream backwards by <b>delta</b> bytes. - * Return 0 on suuccess, -1 on failure. + * Return 0 on success, -1 on failure. */ int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta) @@ -1087,7 +1087,7 @@ crypto_cipher_rewind(crypto_cipher_env_t *env, long delta) } /** Move the position of the cipher stream forwards by <b>delta</b> bytes. - * Return 0 on suuccess, -1 on failure. + * Return 0 on success, -1 on failure. */ int crypto_cipher_advance(crypto_cipher_env_t *env, long delta) @@ -1100,7 +1100,7 @@ crypto_cipher_advance(crypto_cipher_env_t *env, long delta) /** Compute the SHA1 digest of <b>len</b> bytes in data stored in * <b>m</b>. Write the DIGEST_LEN byte result into <b>digest</b>. - * Return 0 on suuccess, -1 on failure. + * Return 0 on success, -1 on failure. */ int crypto_digest(unsigned char *digest, const unsigned char *m, int len) { @@ -1388,7 +1388,7 @@ void crypto_dh_free(crypto_dh_env_t *dh) /* random numbers */ /** Seed OpenSSL's random number generator with DIGEST_LEN bytes from the - * operating system. Return 0 on suuccess, -1 on failure. + * operating system. Return 0 on success, -1 on failure. */ int crypto_seed_rng(void) { @@ -1417,7 +1417,7 @@ int crypto_seed_rng(void) return -1; } RAND_seed(buf, DIGEST_LEN); - /* And add the current screen state to the entopy pool for + /* And add the current screen state to the entropy pool for * good measure. */ RAND_screen(); return 0; @@ -1474,7 +1474,7 @@ void crypto_pseudo_rand(unsigned char *to, unsigned int n) } } -/** Return a pseudorandom integer, choosen uniformly from the values +/** Return a pseudorandom integer, chosen uniformly from the values * between 0 and max-1. */ int crypto_pseudo_rand_int(unsigned int max) { unsigned int val; diff --git a/src/common/util.c b/src/common/util.c index 678ae3bd52..169dbf14bd 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -168,7 +168,7 @@ char *tor_strndup(const char *s, size_t n) { char *dup; tor_assert(s); dup = tor_malloc(n+1); - /* Performance note: Ordinarly we prefer strlcpy to strncpy. But + /* Performance note: Ordinarily we prefer strlcpy to strncpy. But * this function gets called a whole lot, and platform strncpy is * much faster than strlcpy when strlen(s) is much longer than n. */ @@ -256,7 +256,7 @@ int tor_strpartition(char *dest, size_t dest_len, return 0; } -/** Return a pointer to a NUL-terminated hexidecimal string encoding +/** Return a pointer to a NUL-terminated hexadecimal string encoding * the first <b>fromlen</b> bytes of <b>from</b>. (fromlen must be \<= 32.) The * result does not need to be deallocated, but repeated calls to * hex_str will trash old results. @@ -385,7 +385,7 @@ const char *find_whitespace(const char *s) { * are converted; or if there are unconverted characters and next is NULL; or * if the parsed value is not between min and max. When no error occurs, * return the parsed value and set *ok (if provided) to 1. When an error - * ocurs, return 0 and set *ok (if provided) to 0. + * occurs, return 0 and set *ok (if provided) to 0. */ long tor_parse_long(const char *s, int base, long min, long max, diff --git a/src/or/buffers.c b/src/or/buffers.c index 3bdd7982ed..db4d4c173b 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -70,7 +70,7 @@ static INLINE int buf_ensure_capacity(buf_t *buf, size_t capacity) static INLINE void buf_shrink_if_underfull(buf_t *buf) { size_t new_len; /* If the buffer is at least .25 full, or if shrinking the buffer would - * put it onder MIN_BUF_SHRINK_SIZE, don't do it. */ + * put it under MIN_BUF_SHRINK_SIZE, don't do it. */ if (buf->datalen >= buf->len/4 || buf->len < 2*MIN_BUF_SHRINK_SIZE) return; /* Shrink new_len by powers of 2 until: datalen is at least 1/4 of diff --git a/src/or/circuituse.c b/src/or/circuituse.c index ad5764fff9..c688be70b2 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -604,7 +604,7 @@ static int did_circs_fail_last_period = 0; circuit_t *circuit_launch_by_identity(uint8_t purpose, const char *exit_digest) { if (!has_fetched_directory) { - log_fn(LOG_DEBUG,"Haven't fetched directory yet; cancelling circuit launch."); + log_fn(LOG_DEBUG,"Haven't fetched directory yet; canceling circuit launch."); return NULL; } diff --git a/src/or/config.c b/src/or/config.c index c51da00a0a..f02f18cc3e 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -329,7 +329,7 @@ options_act(void) { /* Set up accounting */ if (accounting_parse_options(options, 0)<0) { - log_fn(LOG_ERR,"Error in accouting options"); + log_fn(LOG_ERR,"Error in accounting options"); return -1; } if (accounting_is_enabled(options)) @@ -499,7 +499,7 @@ static config_var_t *config_find_option(const char *key) return &config_vars[i]; } } - /* Okay, unrecogized options */ + /* Okay, unrecognized options */ return NULL; } @@ -1522,7 +1522,7 @@ static char *get_windows_conf_root(void) if (is_set) return path; - /* Find X:\documents and settings\username\applicatation data\ . + /* Find X:\documents and settings\username\application data\ . * We would use SHGetSpecialFolder path, but that wasn't added until IE4. */ if (!SUCCEEDED(SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, @@ -1909,7 +1909,7 @@ add_single_log_option(or_options_t *options, int minSeverity, int maxSeverity, } /** Convert all old-style logging options to new-style Log options. Return 0 - * on success, -1 on faulure. */ + * on success, -1 on failure. */ static int normalize_log_options(or_options_t *options) { @@ -2077,7 +2077,7 @@ parse_redirect_line(smartlist_t *result, struct config_line_t *line) /** Read the contents of a DirServer line from <b>line</b>. Return 0 * if the line is well-formed, and 0 if it isn't. If * <b>validate_only</b> is 0, and the line is well-formed, then add - * the dirserver desribed in the line as a valid server. */ + * the dirserver described in the line as a valid server. */ static int parse_dir_server_line(const char *line, int validate_only) { diff --git a/src/or/connection.c b/src/or/connection.c index fb7efdc24d..1f7529f086 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1005,7 +1005,7 @@ int connection_handle_write(connection_t *conn) { conn->timestamp_lastwritten = now; - /* Sometimes, "writeable" means "connected". */ + /* Sometimes, "writable" means "connected". */ if (connection_state_is_connecting(conn)) { if (getsockopt(conn->s, SOL_SOCKET, SO_ERROR, (void*)&e, &len) < 0) { log_fn(LOG_WARN,"getsockopt() syscall failed?! Please report to tor-ops."); diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c3aa0b9699..2156b52843 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -899,7 +899,7 @@ static int generate_runningrouters(crypto_pk_env_t *private_key) } runningrouters_is_dirty = 0; - /* We don't cache runnning-routers to disk, so there's no point in + /* We don't cache running-routers to disk, so there's no point in * authdirservers caching it. */ /* dirserv_set_cached_directory(the_runningrouters, time(NULL), 1); */ diff --git a/src/or/hibernate.c b/src/or/hibernate.c index c14db675e0..e957e4936d 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -64,7 +64,7 @@ typedef enum { * connections, but provide bandwidth until we run out. * 5. Then we hibernate until the end of the interval. * - * If the interval ends before we run out of bandwdith, we go back to + * If the interval ends before we run out of bandwidth, we go back to * step one. */ @@ -153,7 +153,7 @@ accounting_parse_options(or_options_t *options, int validate_only) case UNIT_MONTH: d = tor_parse_long(smartlist_get(items,1), 10, 1, 28, &ok, NULL); if (!ok) { - log_fn(LOG_WARN, "Monthy accounting must start begin on a day between 1 and 28"); + log_fn(LOG_WARN, "Monthly accounting must start begin on a day between 1 and 28"); goto err; } break; diff --git a/src/or/main.c b/src/or/main.c index d4983ce114..58d7efdb38 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1247,9 +1247,9 @@ int nt_service_install() * separate process (as now) or that can install and run itself * as an NT service. I have no idea how hard this is. * - * Notes about develiping NT services: + * Notes about developing NT services: * - * 1. Don't count on your CWD. If an abolute path is not given, the + * 1. Don't count on your CWD. If an absolute path is not given, the * fopen() function goes wrong. * 2. The parameters given to the nt_service_body() function differ * from those given to main() function. diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 53689ad037..48f60ee8c3 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -5,7 +5,7 @@ const char rendclient_c_id[] = "$Id$"; /** * \file rendclient.c - * \brief Client code to access location-hiddenn services. + * \brief Client code to access location-hidden services. **/ #include "or.h" diff --git a/src/or/rendmid.c b/src/or/rendmid.c index f8bc5005a5..a6f28a4b81 100644 --- a/src/or/rendmid.c +++ b/src/or/rendmid.c @@ -81,7 +81,7 @@ rend_mid_establish_intro(circuit_t *circ, const char *request, size_t request_le circuit_mark_for_close(c); } - /* Acknlowedge the request. */ + /* Acknowledge the request. */ if (connection_edge_send_command(NULL,circ, RELAY_COMMAND_INTRO_ESTABLISHED, "", 0, NULL)<0) { @@ -199,7 +199,7 @@ rend_mid_establish_rendezvous(circuit_t *circ, const char *request, size_t reque goto err; } - /* Acknlowedge the request. */ + /* Acknowledge the request. */ if (connection_edge_send_command(NULL,circ, RELAY_COMMAND_RENDEZVOUS_ESTABLISHED, "", 0, NULL)<0) { diff --git a/src/or/rendservice.c b/src/or/rendservice.c index d9ec3f5741..10bc3c6ea6 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -209,7 +209,7 @@ int rend_config_services(or_options_t *options, int validate_only) continue; } if (!service) { - log_fn(LOG_WARN, "HiddenServicePort with no preceeding HiddenServiceDir directive"); + log_fn(LOG_WARN, "HiddenServicePort with no preceding HiddenServiceDir directive"); rend_service_free(service); return -1; } @@ -925,7 +925,7 @@ rend_consider_services_upload(time_t now) { } /** Log the status of introduction points for all rendezvous services - * at log severity <b>serverity</b>. + * at log severity <b>severity</b>. */ void rend_service_dump_stats(int severity) diff --git a/src/or/rephist.c b/src/or/rephist.c index 7928256652..0cba10ec8a 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -18,7 +18,7 @@ typedef struct link_history_t { time_t since; /** When did we most recently note a change to this link */ time_t changed; - /** How many times did extending from OR1 to OR2 succeeed? */ + /** How many times did extending from OR1 to OR2 succeed? */ unsigned long n_extend_ok; /** How many times did extending from OR1 to OR2 fail? */ unsigned long n_extend_fail; @@ -599,7 +599,7 @@ rep_hist_get_bandwidth_lines(void) /* We haven't been through the circular array yet; time starts at i=0.*/ i = 0; else - /* We've been arround the array at least once. The next i to be + /* We've been around the array at least once. The next i to be overwritten is the oldest. */ i = b->next_max_idx; diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 4fdaaf51b9..1a879a5385 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -786,7 +786,7 @@ router_add_to_routerlist(routerinfo_t *router) { if (router->is_verified) { /* The new verified router replaces the old one; remove the * old one. And carry on to the end of the list, in case - * there are more old unverifed routers with this nickname + * there are more old unverified routers with this nickname */ /* mark-for-close connections using the old key, so we can * make new ones with the new key. diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 7e54f6ee9a..2387e4a47a 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1409,7 +1409,7 @@ int tor_version_as_new_as(const char *platform, const char *cutoff) { char tmp[128]; if (tor_version_parse(cutoff, &cutoff_version)<0) { - log_fn(LOG_WARN,"Bug: cutoff version '%s' unparsable.",cutoff); + log_fn(LOG_WARN,"Bug: cutoff version '%s' unparseable.",cutoff); return 0; } if (strcmpstart(platform,"Tor ")) /* nonstandard Tor; be safe and say yes */ @@ -1423,7 +1423,7 @@ int tor_version_as_new_as(const char *platform, const char *cutoff) { strlcpy(tmp, start, s-start+1); if (tor_version_parse(tmp, &router_version)<0) { - log_fn(LOG_INFO,"Router version '%s' unparsable.",tmp); + log_fn(LOG_INFO,"Router version '%s' unparseable.",tmp); return 1; /* be safe and say yes */ } |