Use timerfd instead of signals on Linux

The timerfd interface is a Linux-specific set of functions that present
POSIX timers as file descriptors (hence the fd) rather than signals thus
avoiding all that tedious messing about with signal handlers.
It was first implemented in GNU libc 2.8 and kernel 2.6.25.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Merge pull request #43 from austriancoder/master

Use timerfd if available
adding the "no-timeout" parameter to avoid the calibrator to timeout and exit
Merge pull request #44 from felipelerena/master

no-timeout parameter
--no-timeout for X11 gui
document --no-timeout in man (and shorten descr in stdout)
Document /usr/share/X11/xorg.conf.d as location for conf.d snippet

This is the correct location for debian based distro's.
Requested by Christian Kießling
Add parameter --output-filename and store in output_filename

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
CalibratorEvdev: do write calibration results if --output-filename was set

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
CalibratorXorgPrint: do write calibration results if --output-filename was set

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
CalibratorUsbtouchscreen: overridde default file name when setting --output-filename

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Make all Calibrator* destructors virtual to fix warning

warning was:

main_x11.cpp: In function 'int main(int, char**)':
main_x11.cpp:42:12: warning: deleting object of abstract class type 'Calibrator' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]calibrator/Usbtouchscreen.cpp: In member function 'void CalibratorUsbtouchscreen::read_int_parameter(const char*, int&)':

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Set up buffer size for max line length only once in calibrator.hh

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Merge pull request #47 from schnitzeltony/write-file-param

Add a new parameter --output-filename
Prevent timeout exit when --no-timeout is used

Submitted https://github.com/tias/xinput_calibrator/pull/45

Signed-off-by: Jeff Lasslett <jeff.lasslett@gmail.com>
show the name of the device on screen

* this is intended for a better handling of multiple devices
* while being here the common settings for both GUIs are shared

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Merge pull request #49 from schnitzeltony/gui-enhancements

Gui enhancements
Handle sysfs name for --device parameter

This makes life much easier for systemd/udev hotplug invocation

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Merge pull request #50 from schnitzeltony/sysfs-event-param

Handle sysfs name for --device parameter