whitespace cleanup

This commit is contained in:
Christopher Faylor 2012-08-16 23:34:45 +00:00
parent 00caa48b91
commit 46f5dd5958
22 changed files with 71 additions and 71 deletions

View File

@ -1222,7 +1222,7 @@ fhandler_base_overlapped::close ()
else
{
/* Cancelling seems to be necessary for cases where a reader is
still executing when a signal handler performs a close. */
still executing when a signal handler performs a close. */
if (!writer)
CancelIo (get_io_handle ());
destroy_overlapped ();

View File

@ -591,7 +591,7 @@ fhandler_console::read (void *pv, size_t& buflen)
if (dev_state.ext_mouse_mode6 /* distinguish release */
&& mouse_event.dwButtonState < dev_state.dwLastButtonState)
mode6_term = 'm';
mode6_term = 'm';
dev_state.last_button_code = b;
@ -692,9 +692,9 @@ fhandler_console::read (void *pv, size_t& buflen)
if (dev_state.use_focus)
{
if (input_rec.Event.FocusEvent.bSetFocus)
__small_sprintf (tmp, "\033[I");
__small_sprintf (tmp, "\033[I");
else
__small_sprintf (tmp, "\033[O");
__small_sprintf (tmp, "\033[O");
toadd = tmp;
nread = 3;

View File

@ -250,7 +250,7 @@ class lockf_t
uint16_t lf_type; /* Lock type: F_RDLCK, F_WRLCK */
_off64_t lf_start; /* Byte # of the start of the lock */
_off64_t lf_end; /* Byte # of the end of the lock (-1=EOF) */
int64_t lf_id; /* Cygwin PID for POSIX locks, a unique id per
int64_t lf_id; /* Cygwin PID for POSIX locks, a unique id per
file table entry for BSD flock locks. */
DWORD lf_wid; /* Win PID of the resource holding the lock */
uint16_t lf_ver; /* Version number of the lock. If a released

View File

@ -329,7 +329,7 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h)
return NULL;
pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, map, importRVA - offset);
/* ... carefully check the required size to fit the string table into
the map as well. Allow NAME_MAX bytes for the DLL name, but don't
the map as well. Allow NAME_MAX bytes for the DLL name, but don't
go beyond the remainder of the section. */
if (importRVAMaxSize - importRVASize > wincap.allocation_granularity ())
{

View File

@ -516,33 +516,33 @@ thread_wrapper (VOID *arg)
}
__asm__ ("\n\
movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
movl (%%ebx), %%eax # Load thread func into eax \n\
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
subl $4, %%ebx # Subtract another 4 bytes \n\
movl %%ebx, %%esp # Set esp \n\
xorl %%ebp, %%ebp # Set ebp to 0 \n\
# Make gcc 3.x happy and align the stack so that it is \n\
# 16 byte aligned right before the final call opcode. \n\
andl $-16, %%esp # 16 byte align \n\
addl $-12, %%esp # 12 bytes + 4 byte arg = 16 \n\
# Now we moved to the new stack. Save thread func address\n\
# and thread arg on new stack \n\
pushl %%ecx # Push thread arg onto stack \n\
pushl %%eax # Push thread func onto stack \n\
# Now it's safe to release the OS stack. \n\
pushl $0x8000 # dwFreeType: MEM_RELEASE \n\
pushl $0x0 # dwSize: 0 \n\
pushl %%edx # lpAddress: stackaddr \n\
call _VirtualFree@12 # Shoot \n\
# All set. We can pop the thread function address from \n\
# the stack and call it. The thread arg is still on the \n\
# stack in the expected spot. \n\
popl %%eax # Pop thread_func address \n\
call *%%eax # Call thread func \n"
movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
movl (%%ebx), %%eax # Load thread func into eax \n\
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
subl $4, %%ebx # Subtract another 4 bytes \n\
movl %%ebx, %%esp # Set esp \n\
xorl %%ebp, %%ebp # Set ebp to 0 \n\
# Make gcc 3.x happy and align the stack so that it is \n\
# 16 byte aligned right before the final call opcode. \n\
andl $-16, %%esp # 16 byte align \n\
addl $-12, %%esp # 12 bytes + 4 byte arg = 16 \n\
# Now we moved to the new stack. Save thread func address \n\
# and thread arg on new stack \n\
pushl %%ecx # Push thread arg onto stack \n\
pushl %%eax # Push thread func onto stack \n\
# Now it's safe to release the OS stack. \n\
pushl $0x8000 # dwFreeType: MEM_RELEASE \n\
pushl $0x0 # dwSize: 0 \n\
pushl %%edx # lpAddress: stackaddr \n\
call _VirtualFree@12 # Shoot \n\
# All set. We can pop the thread function address from \n\
# the stack and call it. The thread arg is still on the \n\
# stack in the expected spot. \n\
popl %%eax # Pop thread_func address \n\
call *%%eax # Call thread func \n"
: : [WRAPPER_ARG] "r" (&wrapper_arg),
[CYGTLS] "i" (CYGTLS_PADSIZE));
/* Never return from here. */

View File

@ -97,11 +97,11 @@ win32_device_name (const char *src_path, char *win32_path, device& dev)
#define SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH 28
#pragma pack(push,4)
struct smb_extended_info {
DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
DWORD samba_version; /* Major/Minor/Release/Revision */
DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
DWORD samba_version; /* Major/Minor/Release/Revision */
DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
LARGE_INTEGER samba_gitcommitdate;
char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
};
#pragma pack(pop)

View File

@ -15,7 +15,7 @@ details. */
#define USE_SYS_TYPES_FD_SET
#define __WSA_ERR_MACROS_DEFINED
/* FIXME: Collision with different declarations of if_nametoindex and
if_indextoname functions in iphlpapi.h since Vista.
if_indextoname functions in iphlpapi.h since Vista.
TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
system functions on Vista and later. */
#define _INC_NETIOAPI

View File

@ -892,7 +892,7 @@ is_virtual_symlink:
else if (isdev_dev (dev))
{
/* If we're looking for a file below /dev, which doesn't exist,
make sure that the device type is converted to FH_FS, so that
make sure that the device type is converted to FH_FS, so that
subsequent code handles the file correctly.
Unless /dev itself doesn't exist on disk. In that case /dev
is handled as virtual filesystem, and virtual filesystems are
@ -3704,7 +3704,7 @@ find_fast_cwd_pointer ()
if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov edi,edi -> W8 */
{
/* Windows 8 CP 32 bit (after a Windows Update?) does not call
RtlEnterCriticalSection. For some reason the function manipulates
RtlEnterCriticalSection. For some reason the function manipulates
the FastPebLock manually, kind of like RtlEnterCriticalSection has
been converted to an inline function.

View File

@ -188,7 +188,7 @@ do_pseudo_reloc (void * start, void * end, void * base)
* 1) With a (v2-style) version header. In this case, the
* first entry in the list is a 3-DWORD structure, with
* value:
* { 0, 0, RP_VERSION_V1 }
* { 0, 0, RP_VERSION_V1 }
* In this case, we skip to the next entry in the list,
* knowing that all elements after the head item can
* be cast to runtime_pseudo_reloc_item_v1.

View File

@ -1,7 +1,7 @@
/* smallprint.cc: small print routines for WIN32
Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006,
2007, 2008, 2009, 2012
2007, 2008, 2009, 2012
Red Hat, Inc.
This file is part of Cygwin.
@ -151,11 +151,11 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
if (isprint (c) || pad != '0')
*dst++ = c;
else
{
*dst++ = '0';
*dst++ = 'x';
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
}
{
*dst++ = '0';
*dst++ = 'x';
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
}
}
break;
case 'C':

View File

@ -746,7 +746,7 @@ loop:
/* Reset handle inheritance to default when the execution of a non-Cygwin
process fails. Only need to do this for _P_OVERLAY since the handle will
be closed otherwise. Don't need to do this for 'parent' since it will
be closed in every case. See FIXME above. */
be closed in every case. See FIXME above. */
if (!iscygwin () && mode == _P_OVERLAY)
SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
if (wr_proc_pipe == my_wr_proc_pipe)

View File

@ -732,7 +732,7 @@ unlink_nt (path_conv &pc)
pc.get_nt_native_path ());
/* We never call try_to_bin on NFS and NetApp for the follwing reasons:
NFS implements its own mechanism to remove in-use files, which looks
NFS implements its own mechanism to remove in-use files, which looks
quite similar to what we do in try_to_bin for remote files.
Netapp filesystems don't understand the "move and delete" method

View File

@ -575,13 +575,13 @@ pthread::cancel ()
GetThreadContext (win32_obj_id, &context);
/* The OS is not foolproof in terms of asynchronous thread cancellation
and tends to hang infinitely if we change the instruction pointer.
So just don't cancel asynchronously if the thread is currently
So just don't cancel asynchronously if the thread is currently
executing Windows code. Rely on deferred cancellation in this case. */
if (!cygtls->inside_kernel (&context))
{
context.Eip = (DWORD) pthread::static_cancel_self;
SetThreadContext (win32_obj_id, &context);
}
{
context.Eip = (DWORD) pthread::static_cancel_self;
SetThreadContext (win32_obj_id, &context);
}
}
mutex.unlock ();
/* See above. For instance, a thread which waits for a semaphore in sem_wait