From: Nick Mathewson Date: Fri, 16 Oct 2009 13:19:57 +0000 (+0000) Subject: Spelling fixes in comments and strings. X-Git-Tag: release-2.0.3-alpha~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3fd294a6d2f498aa72e92fe4b005a28a1b312f1;p=libevent Spelling fixes in comments and strings. svn:r1445 --- diff --git a/buffer.c b/buffer.c index 979bc7d0..e42cead3 100644 --- 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. diff --git a/bufferevent-internal.h b/bufferevent-internal.h index a0747002..4c881316 100644 --- a/bufferevent-internal.h +++ b/bufferevent-internal.h @@ -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)) \ diff --git a/bufferevent_filter.c b/bufferevent_filter.c index 5da8aaf6..9e5bb345 100644 --- a/bufferevent_filter.c +++ b/bufferevent_filter.c @@ -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; diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index cdd627c1..dd6f973a 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -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) { diff --git a/bufferevent_sock.c b/bufferevent_sock.c index b2d0175a..5ffed2fc 100644 --- a/bufferevent_sock.c +++ b/bufferevent_sock.c @@ -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 c3d85ebf..b6fa28ed 100644 --- 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); diff --git a/evbuffer-internal.h b/evbuffer-internal.h index 063777e2..36c4deaa 100644 --- a/evbuffer-internal.h +++ b/evbuffer-internal.h @@ -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 31cccdfb..636259c6 100644 --- 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 5fb943ae..5f1cd909 100644 --- 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 03c1394f..cef2608b 100644 --- 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 @@ -127,7 +127,7 @@ @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 diff --git a/evport.c b/evport.c index 79ab2380..55bbe800 100644 --- 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 971465aa..19db149a 100644 --- 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); diff --git a/evthread-internal.h b/evthread-internal.h index 9de795fa..7022e0d6 100644 --- a/evthread-internal.h +++ b/evthread-internal.h @@ -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 aa631983..125b9dd5 100644 --- 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 diff --git a/include/event2/bufferevent_compat.h b/include/event2/bufferevent_compat.h index 798ef0ea..1592baa7 100644 --- a/include/event2/bufferevent_compat.h +++ b/include/event2/bufferevent_compat.h @@ -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 diff --git a/ipv6-internal.h b/ipv6-internal.h index 3cdcea62..4a1572b5 100644 --- a/ipv6-internal.h +++ b/ipv6-internal.h @@ -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. */ diff --git a/kqueue.c b/kqueue.c index b6632d9e..be10dd69 100644 --- 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 :-\