Skip to content

Commit

Permalink
Fixed whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 9, 2010
1 parent f1860d6 commit b05d388
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions windows_wminput.c
Expand Up @@ -85,11 +85,11 @@ static void (WINAPI *pInitializeCriticalSection)(LPCRITICAL_SECTION);
static void (WINAPI *pEnterCriticalSection)(LPCRITICAL_SECTION);
static void (WINAPI *pLeaveCriticalSection)(LPCRITICAL_SECTION);
static void (WINAPI *pDeleteCriticalSection)(LPCRITICAL_SECTION);
static DWORD (WINAPI *pGetLastError)(void);
static HDEVINFO (WINAPI *pSetupDiGetClassDevsA)(LPGUID, PCTSTR, HWND, DWORD);
static DWORD (WINAPI *pGetLastError)(void);
static HDEVINFO (WINAPI *pSetupDiGetClassDevsA)(LPGUID, PCTSTR, HWND, DWORD);
static BOOL (WINAPI *pSetupDiEnumDeviceInfo)(HDEVINFO, DWORD, PSP_DEVINFO_DATA);
static BOOL (WINAPI *pSetupDiGetDeviceInstanceIdA)(HDEVINFO, PSP_DEVINFO_DATA, PTSTR, DWORD, PDWORD);
static BOOL (WINAPI *pSetupDiGetDeviceRegistryPropertyA)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD);
static BOOL (WINAPI *pSetupDiGetDeviceInstanceIdA)(HDEVINFO, PSP_DEVINFO_DATA, PTSTR, DWORD, PDWORD);
static BOOL (WINAPI *pSetupDiGetDeviceRegistryPropertyA)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD);
static BOOL (WINAPI *pSetupDiDestroyDeviceInfoList)(HDEVINFO);

static int symlookup(HMODULE dll, void **addr, const char *sym)
Expand Down Expand Up @@ -146,10 +146,10 @@ static int find_api_symbols(void)
if (dll == NULL)
return(0);

LOOKUP(SetupDiGetClassDevsA);
LOOKUP(SetupDiGetClassDevsA);
LOOKUP(SetupDiEnumDeviceInfo);
LOOKUP(SetupDiGetDeviceInstanceIdA);
LOOKUP(SetupDiGetDeviceRegistryPropertyA);
LOOKUP(SetupDiGetDeviceInstanceIdA);
LOOKUP(SetupDiGetDeviceRegistryPropertyA);
LOOKUP(SetupDiDestroyDeviceInfoList);

#undef LOOKUP
Expand Down Expand Up @@ -471,10 +471,10 @@ static int get_devinfo_data(HDEVINFO devinfo, const char *devinstance,
SP_DEVINFO_DATA *data)
{
DWORD i = 0;
const DWORD bufsize = string_length(devinstance) + 1;
char *buf = (char *) alloca(bufsize);
if (buf == NULL)
return 0;
const DWORD bufsize = string_length(devinstance) + 1;
char *buf = (char *) alloca(bufsize);
if (buf == NULL)
return 0;

while (1)
{
Expand All @@ -484,12 +484,12 @@ static int get_devinfo_data(HDEVINFO devinfo, const char *devinstance,
{
if (pGetLastError() == ERROR_NO_MORE_ITEMS)
break;
else
continue;
} /* if */

if (!pSetupDiGetDeviceInstanceIdA(devinfo, data, buf, bufsize, NULL))
continue;
else
continue;
} /* if */

if (!pSetupDiGetDeviceInstanceIdA(devinfo, data, buf, bufsize, NULL))
continue;

make_string_upper(buf);
if (string_compare(devinstance, buf) == 0)
Expand All @@ -503,16 +503,16 @@ static int get_devinfo_data(HDEVINFO devinfo, const char *devinstance,
static void get_dev_name_by_instance(const char *devinstance, char *name,
size_t namesize)
{
SP_DEVINFO_DATA devdata;
/* !!! FIXME: use an enumerator */
HDEVINFO devinfo = pSetupDiGetClassDevsA(NULL, NULL, NULL,
DIGCF_ALLCLASSES | DIGCF_PRESENT);
SP_DEVINFO_DATA devdata;
/* !!! FIXME: use an enumerator */
HDEVINFO devinfo = pSetupDiGetClassDevsA(NULL, NULL, NULL,
DIGCF_ALLCLASSES | DIGCF_PRESENT);
if (devinfo == INVALID_HANDLE_VALUE)
return;

if (get_devinfo_data(devinfo, devinstance, &devdata))
{
pSetupDiGetDeviceRegistryPropertyA(devinfo, &devdata, SPDRP_DEVICEDESC,
{
pSetupDiGetDeviceRegistryPropertyA(devinfo, &devdata, SPDRP_DEVICEDESC,
NULL, (PBYTE) name, namesize, NULL);
} /* if */

Expand Down

0 comments on commit b05d388

Please sign in to comment.