* cygcheck.cc (get_dword): Fix errormessage.

(cygwin_info): Ditto.
(track_down): Ditto.
(check_keys): Ditto.
This commit is contained in:
Bas van Gompel 2004-10-31 18:46:31 +00:00
parent 60152eb403
commit fe5cd1608b
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2004-10-31 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* cygcheck.cc (get_dword): Fix errormessage.
(cygwin_info): Ditto.
(track_down): Ditto.
(check_keys): Ditto.
2004-10-27 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl> 2004-10-27 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1 * cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1

View File

@ -276,7 +276,7 @@ get_dword (HANDLE fh, int offset)
if (SetFilePointer (fh, offset, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER if (SetFilePointer (fh, offset, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR) && GetLastError () != NO_ERROR)
keyeprint ("get_word: SetFilePointer()"); keyeprint ("get_dword: SetFilePointer()");
if (!ReadFile (fh, &rv, 4, (DWORD *) &r, 0)) if (!ReadFile (fh, &rv, 4, (DWORD *) &r, 0))
keyeprint ("get_dword: Readfile()"); keyeprint ("get_dword: Readfile()");
@ -359,7 +359,7 @@ cygwin_info (HANDLE h)
buf_start = buf = (char *) calloc (1, size + 1); buf_start = buf = (char *) calloc (1, size + 1);
if (buf == NULL) if (buf == NULL)
{ {
keyeprint ("cygwin_info: malloc()"); keyeprint ("cygwin_info: calloc()");
return; return;
} }
@ -537,13 +537,13 @@ track_down (char *file, char *suffix, int lvl)
{ {
if (file == NULL) if (file == NULL)
{ {
keyeprint ("track_down: malloc()"); keyeprint ("track_down: NULL passed for file");
return; return;
} }
if (suffix == NULL) if (suffix == NULL)
{ {
keyeprint ("track_down: malloc()"); keyeprint ("track_down: NULL passed for suffix");
return; return;
} }
@ -1271,7 +1271,7 @@ check_keys ()
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE || h == NULL) if (h == INVALID_HANDLE_VALUE || h == NULL)
return (keyeprint ("check_key: Opening CONIN$")); return (keyeprint ("check_keys: Opening CONIN$"));
DWORD mode; DWORD mode;
@ -1281,7 +1281,7 @@ check_keys ()
{ {
mode &= ~ENABLE_PROCESSED_INPUT; mode &= ~ENABLE_PROCESSED_INPUT;
if (!SetConsoleMode (h, mode)) if (!SetConsoleMode (h, mode))
keyeprint ("check_keys: GetConsoleMode()"); keyeprint ("check_keys: SetConsoleMode()");
} }
fputs ("\nThis key check works only in a console window,", stderr); fputs ("\nThis key check works only in a console window,", stderr);
@ -1300,7 +1300,7 @@ check_keys ()
{ {
prev_in = in; prev_in = in;
if (!ReadConsoleInput (h, &in, 1, &mode)) if (!ReadConsoleInput (h, &in, 1, &mode))
keyeprint ("ReadConsoleInput"); keyeprint ("check_keys: ReadConsoleInput()");
if (!memcmp (&in, &prev_in, sizeof in)) if (!memcmp (&in, &prev_in, sizeof in))
continue; continue;