Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-10-25 19:49:36 +0400
committerChristopher Faylor <me@cgf.cx>2004-10-25 19:49:36 +0400
commit4bfc614b42c52ed78f66abff92e9103a9ce549e1 (patch)
treef698a4d89c2508cb1763156b804ae5bf0c832602
parentbc4ab9927687b3b2c67cce6e88ce6b5c15bd81c5 (diff)
fix whitespace, update some copyrights
-rw-r--r--winsup/utils/ChangeLog2
-rw-r--r--winsup/utils/cygcheck.cc6
-rw-r--r--winsup/utils/dump_setup.cc50
-rw-r--r--winsup/utils/dumper.cc6
-rw-r--r--winsup/utils/mount.cc2
-rw-r--r--winsup/utils/parse_pe.cc2
-rw-r--r--winsup/utils/ps.cc96
-rw-r--r--winsup/utils/regtool.cc14
8 files changed, 89 insertions, 89 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 31a4bd3d3..10add83a9 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -8,7 +8,7 @@
* cygcheck.cc (dump_sysinfo): Allow for larger drives in drive-list.
Change ``Used'' to ``Free'' in helptext-title for drive-list.
-2004-10-18 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
+2004-10-18 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* cygcheck.cc (pretty_id): Don't let i become negative. Fix
printf-format.
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 7aca0db4f..c7caebd65 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1083,9 +1083,9 @@ dump_sysinfo ()
DWORD serno = 0, maxnamelen = 0, flags = 0;
name[0] = name[0] = fsname[0] = 0;
sprintf (drive, "%c:\\", i + 'a');
- /* Report all errors, except if the Volume is ERROR_NOT_READY.
- ERROR_NOT_READY is returned when removeable media drives are empty
- (CD, floppy, etc.) */
+ /* Report all errors, except if the Volume is ERROR_NOT_READY.
+ ERROR_NOT_READY is returned when removeable media drives are empty
+ (CD, floppy, etc.) */
if (!GetVolumeInformation
(drive, name, sizeof (name), &serno, &maxnamelen, &flags, fsname,
sizeof (fsname)) && GetLastError () != ERROR_NOT_READY)
diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc
index 67346ed0e..855fcf043 100644
--- a/winsup/utils/dump_setup.cc
+++ b/winsup/utils/dump_setup.cc
@@ -191,17 +191,17 @@ could_not_access (int verbose, char *filename, char *package, const char *type)
switch (errno)
{
case ENOTDIR:
- break;
+ break;
case ENOENT:
- if (verbose)
- printf ("Missing %s: /%s from package %s\n",
- type, filename, package);
- return true;
+ if (verbose)
+ printf ("Missing %s: /%s from package %s\n",
+ type, filename, package);
+ return true;
case EACCES:
- if (verbose)
- printf ("Unable to access %s /%s from package %s\n",
- type, filename, package);
- return true;
+ if (verbose)
+ printf ("Unable to access %s /%s from package %s\n",
+ type, filename, package);
+ return true;
}
return false;
}
@@ -213,12 +213,12 @@ directory_exists (int verbose, char *filename, char *package)
if (stat(cygpath("/", filename, ".", NULL), &status))
{
if (could_not_access (verbose, filename, package, "directory"))
- return false;
+ return false;
}
else if (!S_ISDIR(status.st_mode))
{
if (verbose)
- printf ("Directory/file mismatch: /%s from package %s\n", filename, package);
+ printf ("Directory/file mismatch: /%s from package %s\n", filename, package);
return false;
}
return true;
@@ -232,12 +232,12 @@ file_exists (int verbose, char *filename, const char *alt, char *package)
(!alt || stat(cygpath("/", filename, alt, NULL), &status)))
{
if (could_not_access (verbose, filename, package, "file"))
- return false;
+ return false;
}
else if (!S_ISREG(status.st_mode))
{
if (verbose)
- printf ("File type mismatch: /%s from package %s\n", filename, package);
+ printf ("File type mismatch: /%s from package %s\n", filename, package);
return false;
}
return true;
@@ -286,20 +286,20 @@ check_package_files (int verbose, char *package)
filename += 2;
if (filename[strlen (filename) - 1] == '/')
- {
- if (!directory_exists (verbose, filename, package))
- result = false;
- }
+ {
+ if (!directory_exists (verbose, filename, package))
+ result = false;
+ }
else if (!strncmp (filename, "etc/postinstall/", 16))
- {
- if (!file_exists (verbose, filename, ".done", package))
- result = false;
- }
+ {
+ if (!file_exists (verbose, filename, ".done", package))
+ result = false;
+ }
else
- {
- if (!file_exists (verbose, filename, ".lnk", package))
- result = false;
- }
+ {
+ if (!file_exists (verbose, filename, ".lnk", package))
+ result = false;
+ }
}
gzclose (fp);
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
index aec8b12a3..e5e91e2ef 100644
--- a/winsup/utils/dumper.cc
+++ b/winsup/utils/dumper.cc
@@ -411,8 +411,8 @@ dumper::dump_thread (asection * to, process_thread * thread)
if (tid == 0)
{
/* this is a special case. we don't know, which thread
- was active when exception occured, so let's blame
- the first one */
+ was active when exception occured, so let's blame
+ the first one */
thread_pstatus.data.thread_info.is_active_thread = TRUE;
tid = (DWORD) - 1;
}
@@ -795,7 +795,7 @@ struct option longopts[] = {
{0, no_argument, NULL, 0}
};
-static void
+static void
print_version ()
{
const char *v = strchr (version, ':');
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
index 5c84280f7..dcf4eb137 100644
--- a/winsup/utils/mount.cc
+++ b/winsup/utils/mount.cc
@@ -92,7 +92,7 @@ do_mount (const char *dev, const char *where, int flags)
if (c == '/' || c == '\\')
strcat (devtmp, ".");
/* Use a curious property of Windows which allows the use of \.. even
- on non-directory paths. */
+ on non-directory paths. */
for (const char *p = dev; (p = strpbrk (p, "/\\")); p++)
strcat (devtmp, "\\..");
strcat (devtmp, "\\");
diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc
index 48c71db7e..9b81fd98a 100644
--- a/winsup/utils/parse_pe.cc
+++ b/winsup/utils/parse_pe.cc
@@ -30,7 +30,7 @@ exclusion::add (LPBYTE mem_base, DWORD mem_size)
return 1;
};
-int
+int
cmp_regions (const void *r1, const void *r2)
{
if (((process_mem_region *) r1)->base < ((process_mem_region *) r2)->base)
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index b6307fd33..843693598 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -1,6 +1,6 @@
/* ps.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
This file is part of Cygwin.
@@ -271,45 +271,45 @@ main (int argc, char *argv[])
{
case 'a':
case 'e':
- aflag = 1;
- break;
+ aflag = 1;
+ break;
case 'f':
- fflag = 1;
- break;
+ fflag = 1;
+ break;
case 'h':
- usage (stdout, 0);
+ usage (stdout, 0);
case 'l':
- lflag = 1;
- break;
+ lflag = 1;
+ break;
case 's':
sflag = 1;
break;
case 'u':
- uid = atoi (optarg);
- if (uid == 0)
- {
- struct passwd *pw;
-
- if ((pw = getpwnam (optarg)))
- uid = pw->pw_uid;
- else
- {
- fprintf (stderr, "%s: user %s unknown\n", prog_name, optarg);
- exit (1);
- }
- }
- break;
+ uid = atoi (optarg);
+ if (uid == 0)
+ {
+ struct passwd *pw;
+
+ if ((pw = getpwnam (optarg)))
+ uid = pw->pw_uid;
+ else
+ {
+ fprintf (stderr, "%s: user %s unknown\n", prog_name, optarg);
+ exit (1);
+ }
+ }
+ break;
case 'v':
- print_version ();
- exit (0);
- break;
+ print_version ();
+ exit (0);
+ break;
case 'W':
query = CW_GETPINFO_FULL;
aflag = 1;
break;
default:
- usage (stderr, 1);
+ usage (stderr, 1);
}
if (sflag)
@@ -329,24 +329,24 @@ main (int argc, char *argv[])
pid = p->pid)
{
if (!aflag)
- if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT)
+ if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT)
{
if (p->uid32 != (__uid32_t) uid)
continue;
- }
+ }
else if (p->uid != uid)
continue;
char status = ' ';
if (p->process_state & PID_STOPPED)
- status = 'S';
+ status = 'S';
else if (p->process_state & PID_TTYIN)
- status = 'I';
+ status = 'I';
else if (p->process_state & PID_TTYOU)
- status = 'O';
+ status = 'O';
char pname[MAX_PATH];
if (p->process_state & (PID_ZOMBIE | PID_EXITED))
- strcpy (pname, "<defunct>");
+ strcpy (pname, "<defunct>");
else if (p->ppid)
{
char *s;
@@ -359,7 +359,7 @@ main (int argc, char *argv[])
else if (query == CW_GETPINFO_FULL)
{
HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
- FALSE, p->dwProcessId);
+ FALSE, p->dwProcessId);
if (!h)
continue;
HMODULE hm[1000];
@@ -377,26 +377,26 @@ main (int argc, char *argv[])
char uname[128];
if (fflag)
- {
- struct passwd *pw;
-
- if ((pw = getpwuid (p->version >= EXTERNAL_PINFO_VERSION_32_BIT ?
- p->uid32 : p->uid)))
- strcpy (uname, pw->pw_name);
- else
- sprintf (uname, "%u", (unsigned)
- (p->version >= EXTERNAL_PINFO_VERSION_32_BIT ?
+ {
+ struct passwd *pw;
+
+ if ((pw = getpwuid (p->version >= EXTERNAL_PINFO_VERSION_32_BIT ?
+ p->uid32 : p->uid)))
+ strcpy (uname, pw->pw_name);
+ else
+ sprintf (uname, "%u", (unsigned)
+ (p->version >= EXTERNAL_PINFO_VERSION_32_BIT ?
p->uid32 : p->uid));
- }
+ }
if (sflag)
- printf (dfmt, p->pid, ttynam (p->ctty), start_time (p), pname);
+ printf (dfmt, p->pid, ttynam (p->ctty), start_time (p), pname);
else if (fflag)
- printf (ffmt, uname, p->pid, p->ppid, ttynam (p->ctty), start_time (p),
- pname);
+ printf (ffmt, uname, p->pid, p->ppid, ttynam (p->ctty), start_time (p),
+ pname);
else if (lflag)
- printf (lfmt, status, p->pid, p->ppid, p->pgid,
- p->dwProcessId, ttynam (p->ctty),
+ printf (lfmt, status, p->pid, p->ppid, p->pgid,
+ p->dwProcessId, ttynam (p->ctty),
p->version >= EXTERNAL_PINFO_VERSION_32_BIT ? p->uid32 : p->uid,
start_time (p), pname);
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index 5f2396cd9..403923b2d 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -1,6 +1,6 @@
/* regtool.cc
- Copyright 2000, 2001, 2002 Red Hat Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Red Hat Inc.
This file is part of Cygwin.
@@ -278,21 +278,21 @@ find_key (int howmanyparts, REGSAM access)
{
/* expect host:/key/value format */
host = (char*) malloc (strlen (n) + 1);
- host[0] = host [1] = '\\';
+ host[0] = host [1] = '\\';
for (e = n, h = host + 2; *e && *e != ':'; e++, h++)
- *h = *e;
+ *h = *e;
*h = 0;
n = e + 1;
if (*n == '/')
- translate (n);
+ translate (n);
}
else if (n[0] == '\\' && n[1] == '\\')
{
/* expect //host/key/value format */
host = (char*) malloc (strlen (n) + 1);
- host[0] = host[1] = '\\';
+ host[0] = host[1] = '\\';
for (e = n + 2, h = host + 2; *e && *e != '\\'; e++, h++)
- *h = *e;
+ *h = *e;
*h = 0;
n = e;
}
@@ -329,7 +329,7 @@ find_key (int howmanyparts, REGSAM access)
return;
}
else
- {
+ {
*e = 0;
value = e + 1;
}