white space

This commit is contained in:
Christopher Faylor 2005-02-13 18:17:29 +00:00
parent ba8c69552f
commit 264f41f081
17 changed files with 42 additions and 42 deletions

View File

@ -213,7 +213,7 @@ public:
else
return strcpy (buf, name ());
}
const char *cygheap_user::test_uid (char *&, const char *, size_t)
__attribute__ ((regparm (3)));
};
@ -231,10 +231,10 @@ struct cwdstuff
muto *cwd_lock;
char *get (char *, int = 1, int = 0, unsigned = CYG_MAX_PATH);
DWORD get_hash ();
DWORD get_drive (char * dst)
DWORD get_drive (char * dst)
{
get_initial ();
memcpy (dst, win32, drive_length);
get_initial ();
memcpy (dst, win32, drive_length);
cwd_lock->release ();
return drive_length;
}

View File

@ -255,7 +255,7 @@ cygthread::terminate_thread ()
if (!inuse)
goto force_notterminated;
(void) TerminateThread (h, 0);
(void) WaitForSingleObject (h, INFINITE);
CloseHandle (h);
@ -285,7 +285,7 @@ cygthread::terminate_thread ()
#endif
release (true);
}
goto out;
force_notterminated:

View File

@ -88,7 +88,7 @@ class fhandler_base
beyond EOF, zero filling or making
file sparse if so. */
unsigned query_open : 2; /* open file without requesting either
read or write access */
read or write access */
unsigned close_on_exec : 1; /* close-on-exec */
unsigned need_fork_fixup : 1; /* Set if need to fixup after fork. */
unsigned has_changed : 1; /* Flag used to set ctime on close. */
@ -507,7 +507,7 @@ class fhandler_dev_raw: public fhandler_base
eom_detected (0), eof_detected (0), lastblk_to_read (0)
{}
} status;
IMPLEMENT_STATUS_FLAG (bool, eom_detected)
IMPLEMENT_STATUS_FLAG (bool, eof_detected)
IMPLEMENT_STATUS_FLAG (bool, lastblk_to_read)

View File

@ -343,7 +343,7 @@ fhandler_process::fill_filebuf ()
{
case PROCESS_FD:
{
size_t fs;
size_t fs;
char *fdp = strrchr (path, '/');
if (!fdp || *++fdp == 'f') /* The "fd" directory itself. */
{
@ -414,7 +414,7 @@ fhandler_process::fill_filebuf ()
{
if (filebuf)
free (filebuf);
size_t fs;
size_t fs;
switch (fileid)
{
case PROCESS_ROOT:
@ -582,7 +582,7 @@ format_process_maps (_pinfo *p, char *&destbuf, size_t maxsize)
st.st_ino);
while (written < 62)
destbuf[len + written++] = ' ';
len += written;
len += written;
len += __small_sprintf (destbuf + len, "%s\n", posix_modname);
}
out:

View File

@ -119,7 +119,7 @@ sub generate {
$rest = "$fh, $rest" if $rest =~ /^"/o;
$rest = fixup($rest, $vars);
if ($rest =~ /^(.*), ([a-z_]*_dev)/) {
$pointers{$2} ||= "const device *$2 = $storage_loc;\n";
$pointers{$2} ||= "const device *$2 = $storage_loc;\n";
$rest = $1;
}
push(@storage, " {\"$dev\", " . $rest . "},\n");

View File

@ -22,7 +22,7 @@ foreach ($tls =~ /^.*\n/mg) {
if (!s/;.*$//o) {
if (!$struct && /^\s*(?:struct|class)\s*([a-z_0-9]+)/o) {
$def .= $_;
$struct = $1
$struct = $1
}
next;
}

View File

@ -383,7 +383,7 @@ winprio_to_nice (DWORD prio)
/* Get a Win32 priority matching the incoming nice factor. The incoming
nice is limited to the interval [-NZERO,NZERO-1]. */
DWORD
DWORD
nice_to_winprio (int &nice)
{
static const DWORD priority[] NO_COPY =

View File

@ -731,7 +731,7 @@ is_virtual_symlink:
{
error = ENOTDIR;
goto out;
}
}
if (pcheck_case == PCHECK_RELAXED)
goto out; // file found
/* Avoid further symlink evaluation. Only case checks are
@ -1938,7 +1938,7 @@ mount_info::read_cygdrive_info_from_registry ()
for (int i = 0; i < 2; i++)
{
if (i)
cygheap->user.deimpersonate ();
cygheap->user.deimpersonate ();
reg_key r (i, KEY_READ, CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, NULL);
if (i)
cygheap->user.reimpersonate ();
@ -1954,7 +1954,7 @@ mount_info::read_cygdrive_info_from_registry ()
if (i == 0)
cygdrive_flags &= ~MOUNT_SYSTEM;
else
cygdrive_flags |= MOUNT_SYSTEM;
cygdrive_flags |= MOUNT_SYSTEM;
slashify (cygdrive, cygdrive, 1);
cygdrive_len = strlen (cygdrive);
}

View File

@ -221,7 +221,7 @@ class path_conv
void set_normalized_path (const char *, bool) __attribute__ ((regparm (3)));
DWORD get_symlink_length () { return symlink_length; };
private:
DWORD symlink_length;
DWORD symlink_length;
char path[CYG_MAX_PATH];
};

View File

@ -160,7 +160,7 @@ pinfo::exit (DWORD n)
}
int exitcode = self->exitcode;
release ();
_my_tls.stacklock = 0;
_my_tls.stackptr = _my_tls.stack;
sigproc_printf ("Calling ExitProcess hProcess %p, n %p, exitcode %p",

View File

@ -30,7 +30,7 @@ reg_key::reg_key (HKEY top, REGSAM access, ...)
/* Opens a key under the appropriate Cygwin key.
Do not use HKCU per MS KB 199190 */
reg_key::reg_key (bool isHKLM, REGSAM access, ...)
{
va_list av;
@ -40,8 +40,8 @@ reg_key::reg_key (bool isHKLM, REGSAM access, ...)
top = HKEY_LOCAL_MACHINE;
else
{
char name[128];
const char *names[2] = {cygheap->user.get_windows_id (name), ".DEFAULT"};
char name[128];
const char *names[2] = {cygheap->user.get_windows_id (name), ".DEFAULT"};
for (int i = 0; i < 2; i++)
{
key_is_invalid = RegOpenKeyEx (HKEY_USERS, names[i], 0, access, &top);
@ -52,14 +52,14 @@ reg_key::reg_key (bool isHKLM, REGSAM access, ...)
return;
}
OK:
new (this) reg_key (top, access, "SOFTWARE",
new (this) reg_key (top, access, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME, NULL);
if (top != HKEY_LOCAL_MACHINE)
RegCloseKey (top);
if (key_is_invalid)
return;
top = key;
va_start (av, access);
build_reg (top, access, av);
@ -215,7 +215,7 @@ get_registry_hive_path (const char *name, char *path)
if (!name || !path)
return NULL;
__small_sprintf (key, "SOFTWARE\\Microsoft\\Windows%s\\CurrentVersion\\ProfileList\\",
wincap.is_winnt ()?" NT":"");
wincap.is_winnt ()?" NT":"");
strcat (key, name);
if (!RegOpenKeyExA (HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hkey))
{
@ -257,7 +257,7 @@ load_registry_hive (const char * name)
if (wincap.is_winnt ())
strcat (path, "\\NTUSER.DAT");
else
strcat (path, "\\USER.DAT");
strcat (path, "\\USER.DAT");
if ((ret = RegLoadKeyA (HKEY_USERS, name, path)) != ERROR_SUCCESS)
debug_printf ("Loading user registry hive for %s failed: %d", name, ret);
}

View File

@ -300,10 +300,10 @@ SECURITY_DESCRIPTOR *__stdcall get_null_sd (void);
/* Various types of security attributes for use in Create* functions. */
extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID sa_buf, PSID sid1, PSID sid2,
extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID sa_buf, PSID sid1, PSID sid2,
DWORD access2, BOOL inherit)
__attribute__ ((regparm (3)));
extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID,
extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID,
PSID sid2 = NO_SID, DWORD access2 = 0);
int __stdcall NTReadEA (const char *file, const char *attrname, char *buf, int len);

View File

@ -1346,7 +1346,7 @@ start_thread_socket (select_record *me, select_stuff *stuff)
if (_my_tls.locals.exitsock != INVALID_SOCKET)
si->exitsock = _my_tls.locals.exitsock;
else
else
{
si->exitsock = _my_tls.locals.exitsock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (_my_tls.locals.exitsock == INVALID_SOCKET)

View File

@ -162,7 +162,7 @@ class shared_info
};
extern shared_info *cygwin_shared;
extern user_info *user_shared;
extern user_info *user_shared;
#define mount_table (&(user_shared->mountinfo))
extern HANDLE cygwin_user_h;
@ -193,7 +193,7 @@ struct console_state
#endif
char *__stdcall shared_name (char *, const char *, int);
void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size,
void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size,
shared_locations, PSECURITY_ATTRIBUTES psa = &sec_all);
extern void user_shared_initialize (bool reinit);

View File

@ -872,10 +872,10 @@ remove_proc (int ci)
}
/* Check status of child process vs. waitq member.
parent_w is the pointer to the parent of the waitq member in question.
child is the subprocess being considered.
Returns non-zero if waiting thread released. */
static bool __stdcall
stopped_or_terminated (waitq *parent_w, _pinfo *child)

View File

@ -181,12 +181,12 @@ unlink (const char *ourname)
have open handles on a file and one of them calls unlink, then it
happens that the file is remove from the remote share even though the
other process still has an open handle. This other process than gets
Win32 error 59, ERROR_UNEXP_NET_ERR when trying to access the file.
Win32 error 59, ERROR_UNEXP_NET_ERR when trying to access the file.
For some reason, that does not happen when using DeleteFile, which
nicely succeeds but still, the file is available for the other process.
nicely succeeds but still, the file is available for the other process.
To reproduce, mount /tmp on a remote share and call
bash -c "cat << EOF"
Microsoft KB 837665 describes this problem as a bug in 2K3, but I have
@ -1284,12 +1284,12 @@ rename (const char *oldpath, const char *newpath)
existing file or directory real_new. Otherwise we end up with a
non-moved directory *and* a deleted read_new path. Also this case
has to generate an EINVAL in all circumstances,
NB: We could test this also before calling MoveFile but the idea is
that this is a somewhat seldom case and we like to avoid expensive
string comparison. So we allow MoveFile to fail and test the error
code instead.
code instead.
The order in the condition is (hopefully) trimmed for doing the least
expensive stuff first. Nevertheless it would be nice if 9x could
generate the same error codes as NT.

View File

@ -70,12 +70,12 @@ extern unsigned long cygwin_inet_addr (const char *cp);
Thou shalt use CYG_MAX_PATH throughout. It avoids the NUL vs no-NUL
issue and is neither of the Unixy ones [so we can punt on which
one is the right one to use].
one is the right one to use].
Windows ANSI calls are limited to MAX_PATH in length. Cygwin calls that
thunk through to Windows Wide calls are limited to 32K. We define
CYG_MAX_PATH as a convenient, not to short, not too long 'happy medium'.
*/
#define CYG_MAX_PATH (MAX_PATH)