diff options
author | Michael Plante <michael.plante@gmail.com> | 2010-04-24 11:18:56 +0100 |
---|---|---|
committer | Michael Plante <michael.plante@gmail.com> | 2010-04-24 11:18:56 +0100 |
commit | 4226f9ee90d5f9307650d863a0799107836b8923 (patch) | |
tree | 74bf641c35314c28763cbb6f41d7f615963d33c3 /libusb | |
parent | 21bdd21e59bb01277a90a963adb3ba2ae9038855 (diff) | |
download | libusb-4226f9ee90d5f9307650d863a0799107836b8923.tar.gz |
general whitespace cleanup
Diffstat (limited to 'libusb')
-rw-r--r-- | libusb/libusb-1.0.rc | 56 | ||||
-rw-r--r-- | libusb/libusb-1.0.rc.in | 56 | ||||
-rw-r--r-- | libusb/libusbi.h | 18 | ||||
-rw-r--r-- | libusb/os/libusb_sources | 6 | ||||
-rw-r--r-- | libusb/os/poll_windows.h | 8 | ||||
-rw-r--r-- | libusb/os/threads_windows.c | 12 | ||||
-rw-r--r-- | libusb/os/threads_windows.h | 12 | ||||
-rw-r--r-- | libusb/os/windows_usb.c | 8 | ||||
-rw-r--r-- | libusb/os/windows_usb.h | 28 |
9 files changed, 102 insertions, 102 deletions
diff --git a/libusb/libusb-1.0.rc b/libusb/libusb-1.0.rc index 1a74c16..f94dfc8 100644 --- a/libusb/libusb-1.0.rc +++ b/libusb/libusb-1.0.rc @@ -32,16 +32,16 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN - "#include ""winresrc.h""\r\n" - "\0" + "#include ""winresrc.h""\r\n" + "\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" - "\0" + "\r\n" + "\0" END #endif // APSTUDIO_INVOKED @@ -66,28 +66,28 @@ VS_VERSION_INFO VERSIONINFO FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "libusb.org\0" - VALUE "FileDescription", "libusb-1\0" - VALUE "FileVersion", "1.0.6" - VALUE "InternalName", "libusb\0" - VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0" - VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0" - VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "libusb-1\0" - VALUE "ProductVersion", "1.0.6" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "libusb.org\0" + VALUE "FileDescription", "libusb-1\0" + VALUE "FileVersion", "1.0.6" + VALUE "InternalName", "libusb\0" + VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0" + VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0" + VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "libusb-1\0" + VALUE "ProductVersion", "1.0.6" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END END #endif // !_MAC diff --git a/libusb/libusb-1.0.rc.in b/libusb/libusb-1.0.rc.in index 306eaec..f9099de 100644 --- a/libusb/libusb-1.0.rc.in +++ b/libusb/libusb-1.0.rc.in @@ -32,16 +32,16 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE DISCARDABLE BEGIN - "#include ""winresrc.h""\r\n" - "\0" + "#include ""winresrc.h""\r\n" + "\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" - "\0" + "\r\n" + "\0" END #endif // APSTUDIO_INVOKED @@ -66,28 +66,28 @@ VS_VERSION_INFO VERSIONINFO FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "libusb.org\0" - VALUE "FileDescription", "libusb-1\0" - VALUE "FileVersion", "@PACKAGE_VERSION@" - VALUE "InternalName", "libusb\0" - VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0" - VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0" - VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "libusb-1\0" - VALUE "ProductVersion", "@PACKAGE_VERSION@" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "libusb.org\0" + VALUE "FileDescription", "libusb-1\0" + VALUE "FileVersion", "@PACKAGE_VERSION@" + VALUE "InternalName", "libusb\0" + VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0" + VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0" + VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "libusb-1\0" + VALUE "ProductVersion", "@PACKAGE_VERSION@" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END END #endif // !_MAC diff --git a/libusb/libusbi.h b/libusb/libusbi.h index 6f6b84b..262e163 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -54,15 +54,15 @@ struct list_head { * type - the type of the first parameter */ #define list_for_each_entry(pos, head, member, type) \ - for (pos = list_entry((head)->next, type, member); \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, type, member)) - -#define list_for_each_entry_safe(pos, n, head, member, type) \ - for (pos = list_entry((head)->next, type, member), \ - n = list_entry(pos->member.next, type, member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.next, type, member)) + for (pos = list_entry((head)->next, type, member); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, type, member)) + +#define list_for_each_entry_safe(pos, n, head, member, type) \ + for (pos = list_entry((head)->next, type, member), \ + n = list_entry(pos->member.next, type, member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, type, member)) #define list_empty(entry) ((entry)->next == (entry)) diff --git a/libusb/os/libusb_sources b/libusb/os/libusb_sources index ab1a2a1..467e1f8 100644 --- a/libusb/os/libusb_sources +++ b/libusb/os/libusb_sources @@ -13,9 +13,9 @@ INCLUDES=..;..\..;..\..\msvc;$(DDK_INC_PATH) C_DEFINES = $(C_DEFINES) $(LIBUSB_DEFINES) /DDDKBUILD TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\advapi32.lib \ - $(SDK_LIB_PATH)\setupapi.lib \ - $(SDK_LIB_PATH)\ole32.lib + $(SDK_LIB_PATH)\advapi32.lib \ + $(SDK_LIB_PATH)\setupapi.lib \ + $(SDK_LIB_PATH)\ole32.lib SOURCES=..\core.c \ ..\descriptor.c \ diff --git a/libusb/os/poll_windows.h b/libusb/os/poll_windows.h index 99f386f..2009b49 100644 --- a/libusb/os/poll_windows.h +++ b/libusb/os/poll_windows.h @@ -98,8 +98,8 @@ struct winfd overlapped_to_winfd(OVERLAPPED* overlapped); #if defined(DDKBUILD) #if !defined(timeval) struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ + long tv_sec; /* seconds */ + long tv_usec; /* and microseconds */ }; #endif @@ -109,8 +109,8 @@ struct timeval { #if !defined(timercmp) #define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) + ((tvp)->tv_sec cmp (uvp)->tv_sec || \ + (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) #endif #if !defined(timerclr) diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c index 6bc6d72..8a29920 100644 --- a/libusb/os/threads_windows.c +++ b/libusb/os/threads_windows.c @@ -27,7 +27,7 @@ int usbi_mutex_init(usbi_mutex_t *mutex, - const usbi_mutexattr_t *attr) { + const usbi_mutexattr_t *attr) { if(! mutex) return ((errno=EINVAL)); *mutex = CreateMutex(NULL, FALSE, NULL); if(!*mutex) return ((errno=ENOMEM)); @@ -49,7 +49,7 @@ int usbi_mutex_trylock(usbi_mutex_t *mutex) { if(result == WAIT_TIMEOUT) return ((errno=EBUSY)); return ((errno=EINVAL)); // don't know how this would happen - // so don't know proper errno + // so don't know proper errno } int usbi_mutex_lock(usbi_mutex_t *mutex) { DWORD result; @@ -58,7 +58,7 @@ int usbi_mutex_lock(usbi_mutex_t *mutex) { if(result == WAIT_OBJECT_0 || result == WAIT_ABANDONED) return 0; // acquired (ToDo: check that abandoned is ok) return ((errno=EINVAL)); // don't know how this would happen - // so don't know proper errno + // so don't know proper errno } int usbi_mutex_unlock(usbi_mutex_t *mutex) { if(!mutex) return ((errno=EINVAL)); @@ -82,7 +82,7 @@ int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex) { int usbi_cond_init(usbi_cond_t *cond, - const usbi_condattr_t *attr) { + const usbi_condattr_t *attr) { if(!cond) return ((errno=EINVAL)); list_init(&cond->waiters ); list_init(&cond->not_waiting); @@ -175,8 +175,8 @@ int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex) { return usbi_cond_intwait(cond, mutex, INFINITE); } int usbi_cond_timedwait(usbi_cond_t *cond, - usbi_mutex_t *mutex, - const struct timespec *abstime) { + usbi_mutex_t *mutex, + const struct timespec *abstime) { FILETIME filetime; ULARGE_INTEGER rtime; struct timeval targ_time, cur_time, delta_time; diff --git a/libusb/os/threads_windows.h b/libusb/os/threads_windows.h index 14fd662..2cd1867 100644 --- a/libusb/os/threads_windows.h +++ b/libusb/os/threads_windows.h @@ -45,8 +45,8 @@ typedef struct usbi_cond_t_ usbi_cond_t; #define HAVE_STRUCT_TIMESPEC 1 #define _TIMESPEC_DEFINED 1 struct timespec { - long tv_sec; - long tv_nsec; + long tv_sec; + long tv_nsec; }; #endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */ @@ -64,19 +64,19 @@ int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex); int usbi_mutex_init(usbi_mutex_t *mutex, - const usbi_mutexattr_t *attr); + const usbi_mutexattr_t *attr); int usbi_mutex_lock(usbi_mutex_t *mutex); int usbi_mutex_unlock(usbi_mutex_t *mutex); int usbi_mutex_trylock(usbi_mutex_t *mutex); int usbi_mutex_destroy(usbi_mutex_t *mutex); int usbi_cond_init(usbi_cond_t *cond, - const usbi_condattr_t *attr); + const usbi_condattr_t *attr); int usbi_cond_destroy(usbi_cond_t *cond); int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex); int usbi_cond_timedwait(usbi_cond_t *cond, - usbi_mutex_t *mutex, - const struct timespec *abstime); + usbi_mutex_t *mutex, + const struct timespec *abstime); int usbi_cond_broadcast(usbi_cond_t *cond); int usbi_cond_signal(usbi_cond_t *cond); diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 22a7481..2351305 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -547,7 +547,7 @@ init_exit: // Holds semaphore here. if (WAIT_OBJECT_0 != WaitForSingleObject(timer_thread, INFINITE)) { usbi_warn(ctx, "could not wait for timer thread to quit"); TerminateThread(timer_thread, 1); // shouldn't happen, but we're destroying - // all objects it might have held anyway. + // all objects it might have held anyway. } CloseHandle(timer_thread); timer_thread = NULL; @@ -2927,7 +2927,7 @@ static int _hid_get_config_descriptor(struct hid_device_priv* dev, void *data, s } static int _hid_get_string_descriptor(struct hid_device_priv* dev, int index, - void *data, size_t *size) + void *data, size_t *size) { void *tmp = NULL; size_t tmp_size = 0; @@ -3066,7 +3066,7 @@ static int _hid_get_report_descriptor(struct hid_device_priv* dev, void *data, s } static int _hid_get_descriptor(struct hid_device_priv* dev, HANDLE hid_handle, int recipient, - int type, int index, void *data, size_t *size) + int type, int index, void *data, size_t *size) { switch(type) { case LIBUSB_DT_DEVICE: @@ -3348,7 +3348,7 @@ static int _hid_set_feature(struct hid_device_priv* dev, HANDLE hid_handle, int } static int _hid_class_request(struct hid_device_priv* dev, HANDLE hid_handle, int request_type, - int request, int value, int index, void *data, struct windows_transfer_priv *tp, + int request, int value, int index, void *data, struct windows_transfer_priv *tp, size_t *size, OVERLAPPED* overlapped) { int report_type = (value >> 8) & 0xFF; diff --git a/libusb/os/windows_usb.h b/libusb/os/windows_usb.h index 0f5a163..fdd97ab 100644 --- a/libusb/os/windows_usb.h +++ b/libusb/os/windows_usb.h @@ -724,20 +724,20 @@ typedef struct _HIDP_VALUE_CAPS { ULONG Units; LONG LogicalMin, LogicalMax; LONG PhysicalMin, PhysicalMax; - union { - struct { - USAGE UsageMin, UsageMax; - USHORT StringMin, StringMax; - USHORT DesignatorMin, DesignatorMax; - USHORT DataIndexMin, DataIndexMax; - } Range; - struct { - USAGE Usage, Reserved1; - USHORT StringIndex, Reserved2; - USHORT DesignatorIndex, Reserved3; - USHORT DataIndex, Reserved4; - } NotRange; - }; + union { + struct { + USAGE UsageMin, UsageMax; + USHORT StringMin, StringMax; + USHORT DesignatorMin, DesignatorMax; + USHORT DataIndexMin, DataIndexMax; + } Range; + struct { + USAGE Usage, Reserved1; + USHORT StringIndex, Reserved2; + USHORT DesignatorIndex, Reserved3; + USHORT DataIndex, Reserved4; + } NotRange; + }; } HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS; DLL_DECLARE(WINAPI, BOOL, HidD_GetAttributes, (HANDLE, PHIDD_ATTRIBUTES)); |