Spelling fixes in comments and strings.

svn:r1445
This commit is contained in:
Nick Mathewson 2009-10-16 13:19:57 +00:00
parent 25af695441
commit e3fd294a6d
17 changed files with 38 additions and 38 deletions

View File

@ -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.

View 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)) \

View 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;

View 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)
{

View 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)
{

View File

@ -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);

View 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,

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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) {

View File

@ -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);

View 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); \

6
http.c
View File

@ -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

View 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

View 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.
*/

View File

@ -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 :-\