* cygcheck.cc: Reformat.

This commit is contained in:
Christopher Faylor 2002-03-07 03:13:17 +00:00
parent b9262dd919
commit b56dedef3e
2 changed files with 43 additions and 37 deletions

View File

@ -1,3 +1,7 @@
2002-03-06 Christopher Faylor <cgf@redhat.com>
* cygcheck.cc: Reformat.
2002-03-06 Christopher Faylor <cgf@redhat.com>
* cygcheck.cc (longopts): Use correct short option for --version.

View File

@ -65,8 +65,7 @@ struct
const char *name;
int missing_is_good;
}
static common_apps[] =
{
static common_apps[] = {
{"bash", 0},
{"cat", 0},
{"cpp", 1},
@ -382,7 +381,8 @@ cygwin_info (HANDLE h)
int maj = atoi (dll_major);
dll_major[1] = c;
int min = atoi (dll_major + 1);
sprintf (pbuf, "DLL version: %d.%d.%.*s", maj, min, len - 11, buf + 11);
sprintf (pbuf, "DLL version: %d.%d.%.*s", maj, min, len - 11,
buf + 11);
len = strlen (s = pbuf);
}
if (strncmp (s, "dll", 3) == 0)
@ -417,8 +417,8 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse)
return;
}
if (SetFilePointer (fh, opthdr_ofs + 40, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
if (SetFilePointer (fh, opthdr_ofs + 40, 0, FILE_BEGIN) ==
INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR)
keyeprint ("dll_info: SetFilePointer()");
if (!ReadFile (fh, &v, sizeof (v), &junk, 0))
@ -455,8 +455,8 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse)
if (expbase)
{
if (SetFilePointer (fh, expbase, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
if (SetFilePointer (fh, expbase, 0, FILE_BEGIN) ==
INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR)
keyeprint ("dll_info: SetFilePointer()");
unsigned char *exp = (unsigned char *) malloc (expsz);
@ -486,8 +486,8 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse)
int impbase = rva_to_offset (import_rva, sections, nsections, &impsz);
if (impbase)
{
if (SetFilePointer (fh, impbase, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
if (SetFilePointer (fh, impbase, 0, FILE_BEGIN) ==
INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR)
keyeprint ("dll_info: SetFilePointer()");
unsigned char *imp = (unsigned char *) malloc (impsz);
@ -810,7 +810,8 @@ dump_sysinfo ()
if (!more_info)
osname = (char *) "2000";
else if (osversionex.wProductType == VER_NT_SERVER
|| osversionex.wProductType == VER_NT_DOMAIN_CONTROLLER)
|| osversionex.wProductType ==
VER_NT_DOMAIN_CONTROLLER)
{
if (osversionex.wSuiteMask &VER_SUITE_DATACENTER)
osname = (char *) "2000 Datacenter Server";
@ -827,7 +828,8 @@ dump_sysinfo ()
if (!more_info)
osname = (char *) "XP";
else if (osversionex.wProductType == VER_NT_SERVER
|| osversionex.wProductType == VER_NT_DOMAIN_CONTROLLER)
|| osversionex.wProductType ==
VER_NT_DOMAIN_CONTROLLER)
{
if (osversionex.wSuiteMask & VER_SUITE_ENTERPRISE)
osname = (char *) ".NET Enterprise Server";
@ -971,9 +973,9 @@ dump_sysinfo ()
/* 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)
if (!GetVolumeInformation
(drive, name, sizeof (name), &serno, &maxnamelen, &flags, fsname,
sizeof (fsname)) && GetLastError () != ERROR_NOT_READY)
keyeprint ("dump_sysinfo: GetVolumeInformation()");
int dtype = GetDriveType (drive);