Breaks out read_name()

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Breaks out bus, vendor, product and version retrieval

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Use getline and treat one line at a time for device descriptions

An unexpected input line of
I: 1 2 3 4 5 6\n
will be parsed with fscanf("I: %04x %04x %04x %04x\n",
&bustype, &vendor, &product, &version)

The next read to the file will point to "5" instead of the next line.
Treating each line independently fixes this kind of bad files.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Always build test programs

Building test programs on make check only is a good way to ensure they never
get updated...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: add test for reading in a device description

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tests-evemu-create: fix enum declaration

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
test-evemu-create: dumps some comments on current test

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Support comments anywhere in a description file

Previous support was only for comments at the top of the file. This adds
support to anywhere within that file.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Merge branch 'tests' into comments
Allow for comments in event descriptions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>