Skip to content

Commit

Permalink
Clean up the remnant USE_INPUT_API bits, as noted by Wolfram Sang
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Larson <clarson@kergoth.com>
  • Loading branch information
kergoth committed Nov 20, 2008
1 parent 87da12f commit fd5c1c6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 47 deletions.
4 changes: 0 additions & 4 deletions src/ts_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
#endif
#include <sys/fcntl.h>

#ifdef USE_INPUT_API
#include <linux/input.h>
#endif /* USE_INPUT_API */

#include "tslib-private.h"

extern struct tslib_module_info __ts_raw;
Expand Down
7 changes: 2 additions & 5 deletions tests/ts_calibrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,8 @@ int main()
if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
#ifdef USE_INPUT_API
ts = ts_open("/dev/input/event0", 0);
#else
ts = ts_open("/dev/touchscreen/ucb1x00", 0);
#endif /* USE_INPUT_API */
if (!(ts = ts_open("/dev/input/event0", 0)))
ts = ts_open("/dev/touchscreen/ucb1x00", 0)
}

if (!ts) {
Expand Down
17 changes: 7 additions & 10 deletions tests/ts_harvest.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,15 @@ int main()
signal(SIGINT, sig);
signal(SIGTERM, sig);

if ((tsdevice = getenv("TSLIB_TSDEVICE")) == NULL) {
#ifdef USE_INPUT_API
tsdevice = strdup ("/dev/input/event0");
#else
tsdevice = strdup ("/dev/touchscreen/ucb1x00");
#endif /* USE_INPUT_API */
}

ts = ts_open (tsdevice, 0);
if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
if (!(ts = ts_open("/dev/input/event0", 0)))
ts = ts_open("/dev/touchscreen/ucb1x00", 0)
}

if (!ts) {
perror (tsdevice);
perror("ts_open");
exit(1);
}

Expand Down
15 changes: 6 additions & 9 deletions tests/ts_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ int main()
struct tsdev *ts;
char *tsdevice=NULL;

if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
#ifdef USE_INPUT_API
ts = ts_open("/dev/input/event0", 0);
#else
ts = ts_open("/dev/touchscreen/ucb1x00", 0);
#endif /* USE_INPUT_API */
}
if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
if (!(ts = ts_open("/dev/input/event0", 0)))
ts = ts_open("/dev/touchscreen/ucb1x00", 0)
}

if (!ts) {
perror("ts_open");
Expand Down
15 changes: 6 additions & 9 deletions tests/ts_print_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ int main()
struct tsdev *ts;
char *tsdevice=NULL;

if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
#ifdef USE_INPUT_API
ts = ts_open("/dev/input/event0", 0);
#else
ts = ts_open("/dev/touchscreen/ucb1x00", 0);
#endif /* USE_INPUT_API */
}
if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
if (!(ts = ts_open("/dev/input/event0", 0)))
ts = ts_open("/dev/touchscreen/ucb1x00", 0)
}

if (!ts) {
perror("ts_open");
Expand Down
17 changes: 7 additions & 10 deletions tests/ts_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,15 @@ int main()
signal(SIGINT, sig);
signal(SIGTERM, sig);

if ((tsdevice = getenv("TSLIB_TSDEVICE")) == NULL) {
#ifdef USE_INPUT_API
tsdevice = strdup ("/dev/input/event0");
#else
tsdevice = strdup ("/dev/touchscreen/ucb1x00");
#endif /* USE_INPUT_API */
}

ts = ts_open (tsdevice, 0);
if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
ts = ts_open(tsdevice,0);
} else {
if (!(ts = ts_open("/dev/input/event0", 0)))
ts = ts_open("/dev/touchscreen/ucb1x00", 0)
}

if (!ts) {
perror (tsdevice);
perror("ts_open");
exit(1);
}

Expand Down

0 comments on commit fd5c1c6

Please sign in to comment.