unix, windows: fix typos in comments

Fix various typos and spelling mistakes in comments.
Does not affect any code, just changes comments.

PR-URL: https://github.com/libuv/libuv/pull/17
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Joey Geralnik 2014-11-28 23:15:17 +02:00 committed by Ben Noordhuis
parent 45c7ccce21
commit 3aeca36a1b
12 changed files with 23 additions and 23 deletions

View File

@ -151,7 +151,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
* Could maybe mod if we knew for sure no events are removed, but
* content of w->events is handled above as not reliable (falls back)
* so may require a pollset_query() which would have to be pretty cheap
* compared to a PS_DELETE to be worth optimising. Alternatively, could
* compared to a PS_DELETE to be worth optimizing. Alternatively, could
* lazily remove events, squelching them in the mean time. */
pc.cmd = PS_DELETE;
if (pollset_ctl(loop->backend_fd, &pc, 1)) {
@ -332,7 +332,7 @@ int uv_exepath(char* buffer, size_t* size) {
res = readlink(symlink, temp_buffer, PATH_MAX-1);
/* if readlink fails, it is a normal file just copy symlink to the
* outbut buffer.
* output buffer.
*/
if (res < 0) {
assert(*size > strlen(symlink));

View File

@ -325,7 +325,7 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
uv__run_closing_handles(loop);
if (mode == UV_RUN_ONCE) {
/* UV_RUN_ONCE implies forward progess: at least one callback must have
/* UV_RUN_ONCE implies forward progress: at least one callback must have
* been invoked when it returns. uv__io_poll() can return without doing
* I/O (meaning: no callbacks) when its timeout expires - which means we
* have pending timers that satisfy the forward progress constraint.

View File

@ -1319,7 +1319,7 @@ int uv_write2(uv_write_t* req,
/* It's legal for write_queue_size > 0 even when the write_queue is empty;
* it means there are error-state requests in the write_completed_queue that
* will touch up write_queue_size later, see also uv__write_req_finish().
* We chould check that write_queue is empty instead but that implies making
* We could check that write_queue is empty instead but that implies making
* a write() syscall when we know that the handle is in error mode.
*/
empty_queue = (stream->write_queue_size == 0);

View File

@ -39,7 +39,7 @@
static uv_loop_t default_loop_struct;
static uv_loop_t* default_loop_ptr;
/* uv_once intialization guards */
/* uv_once initialization guards */
static uv_once_t uv_init_guard_ = UV_ONCE_INIT;
@ -103,7 +103,7 @@ static void uv_init(void) {
#endif
/* Fetch winapi function pointers. This must be done first because other
* intialization code might need these function pointers to be loaded.
* initialization code might need these function pointers to be loaded.
*/
uv_winapi_init();
@ -133,7 +133,7 @@ int uv_loop_init(uv_loop_t* loop) {
if (loop->iocp == NULL)
return uv_translate_sys_error(GetLastError());
/* To prevent uninitialized memory access, loop->time must be intialized
/* To prevent uninitialized memory access, loop->time must be initialized
* to zero before calling uv_update_time for the first time.
*/
loop->time = 0;
@ -199,7 +199,7 @@ uv_loop_t* uv_default_loop(void) {
static void uv__loop_close(uv_loop_t* loop) {
size_t i;
/* close the async handle without needeing an extra loop iteration */
/* close the async handle without needing an extra loop iteration */
assert(!loop->wq_async.async_sent);
loop->wq_async.close_cb = NULL;
uv__handle_closing(&loop->wq_async);
@ -411,7 +411,7 @@ int uv_run(uv_loop_t *loop, uv_run_mode mode) {
uv_process_endgames(loop);
if (mode == UV_RUN_ONCE) {
/* UV_RUN_ONCE implies forward progess: at least one callback must have
/* UV_RUN_ONCE implies forward progress: at least one callback must have
* been invoked when it returns. uv__io_poll() can return without doing
* I/O (meaning: no callbacks) when its timeout expires - which means we
* have pending timers that satisfy the forward progress constraint.

View File

@ -947,7 +947,7 @@ INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf) {
*
* Currently it's based on whether the 'readonly' attribute is set, which
* makes little sense because the semantics are so different: the 'read-only'
* flag is just a way for a user to protect against accidental deleteion, and
* flag is just a way for a user to protect against accidental deletion, and
* serves no security purpose. Windows uses ACLs for that.
*
* Also people now use uv_fs_chmod() to take away the writable bit for good
@ -956,7 +956,7 @@ INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf) {
* deleted.
*
* IOW it's all just a clusterfuck and we should think of something that
* makes slighty more sense.
* makes slightly more sense.
*
* And uv_fs_chmod should probably just fail on windows or be a total no-op.
* There's nothing sensible it can do anyway.

View File

@ -296,7 +296,7 @@ int uv_getaddrinfo(uv_loop_t* loop,
req->alloc = (void*)alloc_ptr;
/* convert node string to UTF16 into allocated memory and save pointer in */
/* the reques. */
/* the request. */
if (node != NULL) {
req->node = (WCHAR*)alloc_ptr;
if (uv_utf8_to_utf16(node,

View File

@ -546,7 +546,7 @@ int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
handle->flags |= UV_HANDLE_POLL_SLOW;
}
/* Intialize 2 poll reqs. */
/* Initialize 2 poll reqs. */
handle->submitted_events_1 = 0;
uv_req_init(loop, (uv_req_t*) &(handle->poll_req_1));
handle->poll_req_1.type = UV_POLL_REQ;

View File

@ -1063,7 +1063,7 @@ int uv_spawn(uv_loop_t* loop,
if (options->flags & UV_PROCESS_DETACHED) {
/* Note that we're not setting the CREATE_BREAKAWAY_FROM_JOB flag. That
* means that libuv might not let you create a fully deamonized process
* means that libuv might not let you create a fully daemonized process
* when run under job control. However the type of job control that libuv
* itself creates doesn't trickle down to subprocesses so they can still
* daemonize.
@ -1141,7 +1141,7 @@ int uv_spawn(uv_loop_t* loop,
assert(!err);
/* Make the handle active. It will remain active until the exit callback */
/* iis made or the handle is closed, whichever happens first. */
/* is made or the handle is closed, whichever happens first. */
uv__handle_start(process);
/* Cleanup, whether we succeeded or failed. */
@ -1177,7 +1177,7 @@ static int uv__kill(HANDLE process_handle, int signum) {
return 0;
/* If the process already exited before TerminateProcess was called, */
/* TerminateProcess will fail with ERROR_ACESS_DENIED. */
/* TerminateProcess will fail with ERROR_ACCESS_DENIED. */
err = GetLastError();
if (err == ERROR_ACCESS_DENIED &&
GetExitCodeProcess(process_handle, &status) &&

View File

@ -241,7 +241,7 @@ void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle) {
* allow binding to addresses that are in use by sockets in TIME_WAIT, it
* effectively allows 'stealing' a port which is in use by another application.
*
* SO_EXCLUSIVEADDRUSE is also not good here because it does cehck all sockets,
* SO_EXCLUSIVEADDRUSE is also not good here because it does check all sockets,
* regardless of state, so we'd get an error even if the port is in use by a
* socket in TIME_WAIT state.
*
@ -590,7 +590,7 @@ int uv_tcp_listen(uv_tcp_t* handle, int backlog, uv_connection_cb cb) {
}
/* Initialize other unused requests too, because uv_tcp_endgame */
/* doesn't know how how many requests were intialized, so it will */
/* doesn't know how how many requests were initialized, so it will */
/* try to clean up {uv_simultaneous_server_accepts} requests. */
for (i = simultaneous_accepts; i < uv_simultaneous_server_accepts; i++) {
req = &handle->accept_reqs[i];
@ -1342,7 +1342,7 @@ void uv_tcp_close(uv_loop_t* loop, uv_tcp_t* tcp) {
if (uv_tcp_try_cancel_io(tcp) != 0) {
/* When cancellation is not possible, there is another option: we can */
/* close the incoming sockets, which will also cancel the accept */
/* operations. However this is not cool because we might inadvertedly */
/* operations. However this is not cool because we might inadvertently */
/* close a socket that just accepted a new connection, which will */
/* cause the connection to be aborted. */
unsigned int i;

View File

@ -100,7 +100,7 @@ static NOINLINE void uv__once_inner(uv_once_t* guard,
} else {
/* We lost the race. Destroy the event we created and wait for the */
/* existing one todv become signaled. */
/* existing one to become signaled. */
CloseHandle(created_event);
result = WaitForSingleObject(existing_event, INFINITE);
assert(result == WAIT_OBJECT_0);

View File

@ -83,7 +83,7 @@ static int uv_udp_set_socket(uv_loop_t* loop, uv_udp_t* handle, SOCKET socket,
}
if (pSetFileCompletionNotificationModes) {
/* All know windowses that support SetFileCompletionNotificationModes */
/* All known Windows that support SetFileCompletionNotificationModes */
/* have a bug that makes it impossible to use this function in */
/* conjunction with datagram sockets. We can work around that but only */
/* if the user is using the default UDP driver (AFD) and has no other */

View File

@ -44,7 +44,7 @@
* of the console title is that it is smaller than 64K. However in practice
* it is much smaller, and there is no way to figure out what the exact length
* of the title is or can be, at least not on XP. To make it even more
* annoying, GetConsoleTitle failes when the buffer to be read into is bigger
* annoying, GetConsoleTitle fails when the buffer to be read into is bigger
* than the actual maximum length. So we make a conservative guess here;
* just don't put the novel you're writing in the title, unless the plot
* survives truncation.
@ -64,7 +64,7 @@ static double hrtime_interval_ = 0;
/*
* One-time intialization code for functionality defined in util.c.
* One-time initialization code for functionality defined in util.c.
*/
void uv__util_init() {
LARGE_INTEGER perf_frequency;