]> granicus.if.org Git - libevent/commitdiff
Spelling fixes in comments and strings.
authorNick Mathewson <nickm@torproject.org>
Fri, 16 Oct 2009 13:19:57 +0000 (13:19 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 16 Oct 2009 13:19:57 +0000 (13:19 +0000)
svn:r1445

17 files changed:
buffer.c
bufferevent-internal.h
bufferevent_filter.c
bufferevent_openssl.c
bufferevent_sock.c
epoll.c
evbuffer-internal.h
evdns.c
event.c
event.h
evport.c
evrpc.c
evthread-internal.h
http.c
include/event2/bufferevent_compat.h
ipv6-internal.h
kqueue.c

index 979bc7d08b422886b0e776422cc359537ddcb989..e42cead382ec10e17e7f2f648ee4b7a6e60ac7e3 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -1384,7 +1384,7 @@ evbuffer_expand(struct evbuffer *buf, size_t datlen)
        if (chain->buffer_len >= need)
                 goto ok;
 
-       /* If the misalignment plus the remaining space fulfils our
+       /* If the misalignment plus the remaining space fulfills our
         * data needs, we just force an alignment to happen.
         * Afterwards, we have enough space.
         */
@@ -1617,7 +1617,7 @@ evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch)
                 * reading.  We do not want to exhaust resources
                 * before the reader has a chance to do something
                 * about it.  If the reader does not tell us how much
-                * data we should read, we artifically limit it.
+                * data we should read, we artificially limit it.
                 */
                if (chain == NULL || n < EVBUFFER_MAX_READ)
                        n = EVBUFFER_MAX_READ;
@@ -1810,7 +1810,7 @@ evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t fd,
        /* TODO(niels): implement splice */
        res = sendfile(fd, info->fd, &offset, chain->off);
        if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) {
-               /* if this is EGAIN or EINTR return 0; otherwise, -1 */
+               /* if this is EAGAIN or EINTR return 0; otherwise, -1 */
                return (0);
        }
        return (res);
@@ -2200,7 +2200,7 @@ done:
 
 /* TODO(niels): maybe we don't want to own the fd, however, in that
  * case, we should dup it - dup is cheap.  Perhaps, we should use a
- * callback insead?
+ * callback instead?
  */
 /* TODO(niels): we may want to add to automagically convert to mmap, in
  * case evbuffer_remove() or evbuffer_pullup() are being used.
index a074700270f94e5b304fa46123ca03b4494bd6af..4c881316d4faee32c952cd79249ed5d60dea806f 100644 (file)
@@ -183,10 +183,10 @@ int _bufferevent_add_event(struct event *ev, const struct timeval *tv);
  * ========= */
 /** Internal use: Set up the ev_read and ev_write callbacks so that
  * the other "generic_timeout" functions will work on it.  Call this from
- * the constuctor function. */
+ * the constructor function. */
 void _bufferevent_init_generic_timeout_cbs(struct bufferevent *bev);
 /** Internal use: Delete the ev_read and ev_write callbacks if they're pending.
- * Call thiss from the destructor function. */
+ * Call this from the destructor function. */
 void _bufferevent_del_generic_timeout_cbs(struct bufferevent *bev);
 /** Internal use: Add or delete the generic timeout events as appropriate.
  * (If an event is enabled and a timeout is set, we add the event.  Otherwise
@@ -195,14 +195,14 @@ void _bufferevent_del_generic_timeout_cbs(struct bufferevent *bev);
 void _bufferevent_generic_adj_timeouts(struct bufferevent *bev);
 
 /** Internal use: We have just successfully read data into an inbuf, so
- * reset the read timout (if any). */
+ * reset the read timeout (if any). */
 #define BEV_RESET_GENERIC_READ_TIMEOUT(bev)                            \
        do {                                                            \
                if (evutil_timerisset(&(bev)->timeout_read))            \
                        event_add(&(bev)->ev_read, &(bev)->timeout_read); \
        } while (0)
 /** Internal use: We have just successfully written data from an inbuf, so
- * reset the read timout (if any). */
+ * reset the read timeout (if any). */
 #define BEV_RESET_GENERIC_WRITE_TIMEOUT(bev)                           \
        do {                                                            \
                if (evutil_timerisset(&(bev)->timeout_write))           \
index 5da8aaf6b9368b8c4712671929e2dcef6d16328c..9e5bb34572b0d4854eb573f49c8746e390023729 100644 (file)
@@ -77,7 +77,7 @@ static void bufferevent_filtered_outbuf_cb(struct evbuffer *buf,
 struct bufferevent_filtered {
        struct bufferevent_private bev;
 
-        /** The bufferevent that we read/write filterd data from/to. */
+        /** The bufferevent that we read/write filtered data from/to. */
        struct bufferevent *underlying;
         /** A callback on our outbuf to notice when somebody adds data */
        struct evbuffer_cb_entry *outbuf_cb;
index cdd627c143bc76508858b608976a70b19da8f70e..dd6f973add8295377af232a31d4e872aa8f685fa 100644 (file)
@@ -75,7 +75,7 @@
 
    Here we define a BIO implementation that directs its output to a
    bufferevent.  We'll want to use this only when none of OpenSSL's built-in
-   IO mechinsms work for us.
+   IO mechanisms work for us.
    -------------------- */
 
 /* every BIO type needs its own integer type value. */
@@ -264,7 +264,7 @@ BIO_new_bufferevent(struct bufferevent *bufferevent, int close_flag)
 }
 
 /* --------------------
-   Now, here's the openssl-based implementation of bufferevent.
+   Now, here's the OpenSSL-based implementation of bufferevent.
 
    The implementation comes in two flavors: one that connects its SSL object
    to an underlying bufferevent using a BIO_bufferevent, and one that has the
@@ -277,7 +277,7 @@ BIO_new_bufferevent(struct bufferevent *bufferevent, int close_flag)
    -------------------- */
 
 struct bufferevent_openssl {
-       /* Shared fields with common bufferevet implementation code.
+       /* Shared fields with common bufferevent implementation code.
           If we were set up with an underlying bufferevent, we use the
           events here as timers only.  If we have an SSL, then we use
           the events as socket events.
@@ -332,7 +332,7 @@ const struct bufferevent_ops bufferevent_ops_openssl = {
 };
 
 /* Given a bufferevent, return a pointer to the bufferevent_openssl that
- * countains it, if any. */
+ * contains it, if any. */
 static inline struct bufferevent_openssl *
 upcast(struct bufferevent *bev)
 {
index b2d0175a19f058fd1215a36a48410414ae620576..5ffed2fce4a080c9436ecf3c23d8ea6032335cd5 100644 (file)
@@ -453,7 +453,7 @@ be_socket_setfd(struct bufferevent *bufev, evutil_socket_t fd)
        BEV_UNLOCK(bufev);
 }
 
-/* XXXX Should non-socket buffferevents support this? */
+/* XXXX Should non-socket bufferevents support this? */
 int
 bufferevent_priority_set(struct bufferevent *bufev, int priority)
 {
@@ -474,7 +474,7 @@ done:
        return r;
 }
 
-/* XXXX Should non-socket buffferevents support this? */
+/* XXXX Should non-socket bufferevents support this? */
 int
 bufferevent_base_set(struct event_base *base, struct bufferevent *bufev)
 {
diff --git a/epoll.c b/epoll.c
index c3d85ebf2b109fcaa48a6dade7225fb656eac47b..b6fa28ede935f4cb960cb929f30925141d255d4d 100644 (file)
--- a/epoll.c
+++ b/epoll.c
@@ -104,7 +104,7 @@ epoll_init(struct event_base *base)
        int epfd;
        struct epollop *epollop;
 
-       /* Initalize the kernel queue.  (The size field is ignored since
+       /* Initialize the kernel queue.  (The size field is ignored since
         * 2.6.8.) */
        if ((epfd = epoll_create(32000)) == -1) {
                if (errno != ENOSYS)
@@ -119,7 +119,7 @@ epoll_init(struct event_base *base)
 
        epollop->epfd = epfd;
 
-       /* Initalize fields */
+       /* Initialize fields */
        epollop->events = mm_malloc(INITIAL_NEVENT * sizeof(struct epoll_event));
        if (epollop->events == NULL) {
                mm_free(epollop);
index 063777e2cab760cc87e717d61dcc6dc3c5c44c4a..36c4deaa096003020865c2341122fdb984c14970 100644 (file)
@@ -259,7 +259,7 @@ int _evbuffer_expand_fast(struct evbuffer *, size_t);
 /** Helper: prepares for a readv/WSARecv call by expanding the buffer to
  * hold enough memory to read 'howmuch' bytes in possibly noncontiguous memory.
  * Sets up the one or two iovecs in 'vecs' to point to the free memory and its
- * extent, and *chainp to poitn to the first chain that we'll try to read into.
+ * extent, and *chainp to point to the first chain that we'll try to read into.
  * Returns the number of vecs used.
  */
 int _evbuffer_read_setup_vecs(struct evbuffer *buf, ev_ssize_t howmuch,
diff --git a/evdns.c b/evdns.c
index 31cccdfbe93a074adc2287d0ba3a2a8e6bff8563..636259c6b99ef336a178b845d9f4f07b1e37bc7c 100644 (file)
--- a/evdns.c
+++ b/evdns.c
@@ -9,7 +9,7 @@
  * TODO:
  *   - Support IPv6 and PTR records.
  *   - Replace all externally visible magic numbers with #defined constants.
- *   - Write doccumentation for APIs of all external functions.
+ *   - Write documentation for APIs of all external functions.
  */
 
 /* Async DNS Library
@@ -3448,7 +3448,7 @@ load_nameservers_with_getnetworkparams(struct evdns_base *base)
                        status = r;
                } else {
                        ++added_any;
-                       log(EVDNS_LOG_DEBUG,"Succesfully added %s as nameserver",ns->IpAddress.String);
+                       log(EVDNS_LOG_DEBUG,"Successfully added %s as nameserver",ns->IpAddress.String);
                }
 
                ns = ns->Next;
diff --git a/event.c b/event.c
index 5fb943aecbde04b52412db07c7fc61e71dae2f25..5f1cd909509bf221c3a81bf8bb41f220bb03ac27 100644 (file)
--- a/event.c
+++ b/event.c
@@ -763,7 +763,7 @@ unlock:
 }
 
 /*
- * Wait continously for events.  We exit only if no events are left.
+ * Wait continuously for events.  We exit only if no events are left.
  */
 
 int
@@ -1259,7 +1259,7 @@ event_add_internal(struct event *ev, const struct timeval *tv)
        }
 
        /*
-        * we should change the timout state only if the previous event
+        * we should change the timeout state only if the previous event
         * addition succeeded.
         */
        if (res != -1 && tv != NULL) {
@@ -1274,7 +1274,7 @@ event_add_internal(struct event *ev, const struct timeval *tv)
 
                /*
                 * we already reserved memory above for the case where we
-                * are not replacing an exisiting timeout.
+                * are not replacing an existing timeout.
                 */
                if (ev->ev_flags & EVLIST_TIMEOUT) {
                        if (min_heap_elt_is_top(ev))
@@ -1563,7 +1563,7 @@ timeout_correct(struct event_base *base, struct timeval *tv)
 
        /*
         * We can modify the key element of the node without destroying
-        * the key, beause we apply it to all in the right order.
+        * the key, because we apply it to all in the right order.
         */
        pev = base->timeheap.p;
        size = base->timeheap.n;
diff --git a/event.h b/event.h
index 03c1394fe13dd3be2fb00471cbc4656b135e08af..cef2608b311d5c781e229ba7c288a09ae9b2c1ed 100644 (file)
--- a/event.h
+++ b/event.h
@@ -48,7 +48,7 @@
   to redesign the applications. As a result, Libevent allows for portable
   application development and provides the most scalable event notification
   mechanism available on an operating system. Libevent can also be used for
-  multi-threaded aplications; see Steven Grimm's explanation. Libevent should
+  multi-threaded applications; see Steven Grimm's explanation. Libevent should
   compile on Linux, *BSD, Mac OS X, Solaris and Windows.
 
   @section usage Standard usage
 
   @section evrpc A framework for RPC servers and clients
 
-  libevents provides a framework for creating RPC servers and clients.  It
+  libevent provides a framework for creating RPC servers and clients.  It
   takes care of marshaling and unmarshaling all data structures.
 
   @section api API Reference
index 79ab2380bf6bb9ea54802664c1c0c809bfb50123..55bbe800ee9b398d432d4669a2c5680915d0f36c 100644 (file)
--- a/evport.c
+++ b/evport.c
@@ -423,7 +423,7 @@ evport_del(struct event_base *base, int fd, short old, short events, void *p)
                if (!FDI_HAS_EVENTS(fdi) &&
                    port_dissociate(evpd->ed_port, PORT_SOURCE_FD, fd) == -1) {
                        /*
-                        * Ignre EBADFD error the fd could have been closed
+                        * Ignore EBADFD error the fd could have been closed
                         * before event_del() was called.
                         */
                        if (errno != EBADFD) {
diff --git a/evrpc.c b/evrpc.c
index 971465aa3e201ae15104a7466e44356d934cf78a..19db149a8f2efea5235c5aca4ea95787112da564 100644 (file)
--- a/evrpc.c
+++ b/evrpc.c
@@ -915,7 +915,7 @@ evrpc_reply_done_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
 
        evrpc_request_wrapper_free(ctx);
 
-       /* the http layer owned the orignal request structure, but if we
+       /* the http layer owned the original request structure, but if we
         * got paused, we asked for ownership and need to free it here. */
        if (req != NULL && evhttp_request_is_owned(req))
                evhttp_request_free(req);
index 9de795fa2b2717134e99d35bd8c938a893a3a07f..7022e0d61b7010e96d070a57379683816a402104 100644 (file)
@@ -106,7 +106,7 @@ extern void (*_evthread_lock_free_fn)(void *);
                         EVLOCK_LOCK(_lock2_tmplock,mode2);              \
        } while (0)
 
-/** Releaes both lock1 and lock2.  */
+/** Release both lock1 and lock2.  */
 #define EVLOCK_UNLOCK2(lock1,lock2,mode1,mode2)                                \
        do {                                                            \
                void *_lock1_tmplock = (lock1);                         \
diff --git a/http.c b/http.c
index aa631983c9096c21e47c64d1160f0c45e3c9c410..125b9dd57c50ea2d03e0ef0d51e7a3e242386115 100644 (file)
--- a/http.c
+++ b/http.c
@@ -727,7 +727,7 @@ evhttp_connection_done(struct evhttp_connection *evcon)
  *     more data is expected
  *   return DATA_CORRUPTED:
  *     data is corrupted
- *   return REQUEST_CANCLED:
+ *   return REQUEST_CANCELED:
  *     request was canceled by the user calling evhttp_cancel_request
  */
 
@@ -1402,7 +1402,7 @@ evhttp_add_header(struct evkeyvalq *headers,
        }
        
        if (!evhttp_header_is_valid_value(value)) {
-               event_debug(("%s: dropping illegal header vakye\n", __func__));
+               event_debug(("%s: dropping illegal header value\n", __func__));
                return (-1);
        }
 
@@ -1683,7 +1683,7 @@ evhttp_read_header(struct evhttp_connection *evcon,
 
 /*
  * Creates a TCP connection to the specified port and executes a callback
- * when finished.  Failure or sucess is indicate by the passed connection
+ * when finished.  Failure or success is indicate by the passed connection
  * object.
  *
  * Although this interface accepts a hostname, it is intended to take
index 798ef0ea00336911437cc436a8c2c924ff9432e2..1592baa7ba8e10de9d3d8ba8657ba9c4bd02700c 100644 (file)
@@ -37,7 +37,7 @@
   This function is deprecated.  Use bufferevent_socket_new and
   bufferevent_set_callbacks instead.
 
-  libevent provides an abstraction on top of the regular event callbacks.
+  Libevent provides an abstraction on top of the regular event callbacks.
   This abstraction is called a buffered event.  A buffered event provides
   input and output buffers that get filled and drained automatically.  The
   user of a buffered event no longer deals directly with the I/O, but
index 3cdcea6254d180b870869b376b5ebaf587072129..4a1572b59a8ca700ffcc386aa9b6dba386cad40f 100644 (file)
@@ -43,7 +43,7 @@ extern "C" {
 
 /** @file ipv6-internal.h
  *
- * Replacement types and functions for platfoms that don't support ipv6
+ * Replacement types and functions for platforms that don't support ipv6
  * properly.
  */
 
index b6632d9ef8b1f7b8fca6f80edd7b4844cebb18cb..be10dd6997c6c0ed117358703dcd5235ed718aca 100644 (file)
--- a/kqueue.c
+++ b/kqueue.c
@@ -115,7 +115,7 @@ kq_init(struct event_base *base)
        if (!(kqueueop = mm_calloc(1, sizeof(struct kqop))))
                return (NULL);
 
-       /* Initalize the kernel queue */
+       /* Initialize the kernel queue */
 
        if ((kq = kqueue()) == -1) {
                event_warn("kqueue");
@@ -127,7 +127,7 @@ kq_init(struct event_base *base)
 
        kqueueop->pid = getpid();
 
-       /* Initalize fields */
+       /* Initialize fields */
        kqueueop->changes = mm_malloc(NEVENT * sizeof(struct kevent));
        if (kqueueop->changes == NULL) {
                mm_free (kqueueop);
@@ -253,9 +253,9 @@ kq_dispatch(struct event_base *base, struct timeval *tv)
                if (events[i].flags & EV_ERROR) {
                        /*
                         * Error messages that can happen, when a delete fails.
-                        *   EBADF happens when the file discriptor has been
+                        *   EBADF happens when the file descriptor has been
                         *   closed,
-                        *   ENOENT when the file discriptor was closed and
+                        *   ENOENT when the file descriptor was closed and
                         *   then reopened.
                         *   EINVAL for some reasons not understood; EINVAL
                         *   should not be returned ever; but FreeBSD does :-\