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

[or-cvs] Spell-check strings and comments



Update of /home/or/cvsroot/tor/src/common
In directory moria.mit.edu:/tmp/cvs-serv16403/src/common

Modified Files:
	compat.c container.c crypto.c util.c 
Log Message:
Spell-check strings and comments

Index: compat.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- compat.c	1 Dec 2004 03:15:59 -0000	1.18
+++ compat.c	1 Dec 2004 03:48:12 -0000	1.19
@@ -112,7 +112,7 @@
 
 #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 @@
   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 @@
     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 @@
   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"),

Index: container.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/container.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- container.c	29 Nov 2004 22:25:28 -0000	1.10
+++ container.c	1 Dec 2004 03:48:12 -0000	1.11
@@ -242,7 +242,7 @@
 }
 
 /**
- * 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>&amp;SPLIT_SKIP_SPACE is true, remove initial and
  * trailing space from each entry.  If

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/crypto.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- crypto.c	29 Nov 2004 22:25:28 -0000	1.125
+++ crypto.c	1 Dec 2004 03:48:12 -0000	1.126
@@ -1078,7 +1078,7 @@
 }
 
 /** 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 @@
 }
 
 /** 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 @@
 
 /** 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 @@
 /* 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 @@
     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 @@
   }
 }
 
-/** 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;

Index: util.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/util.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- util.c	30 Nov 2004 08:54:06 -0000	1.191
+++ util.c	1 Dec 2004 03:48:12 -0000	1.192
@@ -168,7 +168,7 @@
   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 @@
   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 @@
  * 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,