linux/hidraw: Fix compiler warning

hid.c: In function 'uses_numbered_reports':
hid.c:126:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
hid.c:143:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
README.txt: Improve sample code

- use hid_init()/hid_exit()
- include windows.h only on Windows
hidtest: Use hid_init()

Use hid_init() in hidtest/hidtest.cpp
mac: Use exclusivce device access

Use kIOHIDOptionsTypeSeizeDevice instead of kIOHIDOptionsTypeNone to
avoid interferences with other applications trying to use the HID device
at the same time.
mac: Fix string handling

There were errors regarding the length of strings in conversion from CFString
to wchar_t.

Thanks to github user nikolajsheller for pointing this out in pull request #80.
mac: Use Location ID in make_path instead of pointers

Using locations makes the path the same for each run of a HIDAPI based
program.  This is useful for opening devices which don't have a serial
number, and where multiple devices of the same type are attached to the
system at once.

This references pull request #78.
linux: check for EINPROGRESS from read()

Non-blocking I/O can cause read() to return EINPROGRESS in addition to
EAGAIN.  Handle this case.
linux: Fix memory leaks on serial number and product name

In get_device_string() serial_number_utf8 and product_name_utf8 could end
up not getting freed if certain errors occurred.
linux: fix gcc warnings when INVASIVE_GET_USAGE is defined.
All: Convert C99 comments (//) into C89 comments (/* */)
windows: mingw: minor gcc -pedantic warning fixes
libusb/mac: gcc -pedantic warning fixes
Merge branch 'master' of github.com:signal11/hidapi
windows: replace magic number 2 with sizeof(wchar_t)

Changed for readability, as I think this is what was intended by
the author.
testgui: Add fields for lengths of reports

Windows platforms return errors When you do not specify the proper buffer
size and length.
testgui: more robust handling of report length fields

Improve logic of report length field handling for empty fields.
Add column headers for data and length fields.
Add documentation statement about length fields.
Increase window size.
Add message boxes when invalid values are entered.
memset() buffers to zero.
all: make hid_enumerate() able to match any vendor or any product

Passing product_id=0 will match any product of a given vendor.  This patch
makes it also possible to use vendor_id=0 to match any vendor for a given
product id.

Windows code added to Ludovic's patch by Alan Ott.
libusb: remove extra spaces

Remove spaces and tabs at end of lines.
libusb: check for failure of hid_init()

Return NULL from hid_enumerate() and hid_open_path() if hid_init() fails.
linux/libusb: do not check bDeviceClass on enumeration

Some composite devices do not have bDeviceClass set to
LIBUSB_CLASS_PER_INTERFACE and were ignored when enumerating HID devices.

Ignore checking the bDeviceClass as we will be checking interface
bInterfaceClass later anyway.

Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>