summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-05-25 16:07:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-02 12:21:35 +1000
commit4508e29a47019a8aa33d9c08eddc55f81b76c17a (patch)
tree16ac0244ba0c5c165d3c307512c9f1a98a5c980c /tools
parent12a364a858ee602fdfa02f35f8396d29ae8f058d (diff)
tools: make the libinput tool usage static
This now makes the header obsolete too Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am4
-rw-r--r--tools/libinput-debug-events.c1
-rwxr-xr-xtools/libinput-list-devices.c1
-rw-r--r--tools/libinput-tool.c14
-rw-r--r--tools/libinput-tool.h33
-rw-r--r--tools/shared.c1
-rw-r--r--tools/shared.h2
7 files changed, 7 insertions, 49 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3f69d56..cc1ce19 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -21,9 +21,7 @@ ptraccel_debug_SOURCES = ptraccel-debug.c
ptraccel_debug_LDADD = ../src/libfilter.la ../src/libinput.la
ptraccel_debug_LDFLAGS = -no-install
-libinput_SOURCES = \
- libinput-tool.c \
- libinput-tool.h
+libinput_SOURCES = libinput-tool.c
libinput_LDADD = ../src/libinput.la libshared.la $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS)
libinput_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) $(LIBEVDEV_CFLAGS) \
-DLIBINPUT_TOOL_PATH="\"@libexecdir@/libinput\""
diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c
index abba707..25894b1 100644
--- a/tools/libinput-debug-events.c
+++ b/tools/libinput-debug-events.c
@@ -39,7 +39,6 @@
#include <libinput.h>
#include <libevdev/libevdev.h>
-#include "libinput-tool.h"
#include "shared.h"
uint32_t start_time;
diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c
index 9d6c70b..2e19c01 100755
--- a/tools/libinput-list-devices.c
+++ b/tools/libinput-list-devices.c
@@ -34,7 +34,6 @@
#include <libinput-util.h>
#include <libinput-version.h>
-#include "libinput-tool.h"
#include "shared.h"
static const char *
diff --git a/tools/libinput-tool.c b/tools/libinput-tool.c
index 3b7c87b..f37d961 100644
--- a/tools/libinput-tool.c
+++ b/tools/libinput-tool.c
@@ -35,10 +35,8 @@
#include <libinput-util.h>
#include <libinput-version.h>
-#include "libinput-tool.h"
-
-void
-libinput_tool_usage(void)
+static void
+usage(void)
{
printf("Usage: libinput [GLOBAL OPTIONS] [COMMAND] [ARGS]\n"
"\n"
@@ -99,7 +97,7 @@ exec_command(int real_argc, char **real_argv)
rc = snprintf(executable, sizeof(executable), "libinput-%s", command);
if (rc >= (int)sizeof(executable)) {
- libinput_tool_usage();
+ usage();
return EXIT_FAILURE;
}
@@ -137,19 +135,19 @@ main(int argc, char **argv)
switch(c) {
case 'h':
case GOPT_HELP:
- libinput_tool_usage();
+ usage();
return EXIT_SUCCESS;
case GOPT_VERSION:
printf("%s\n", LIBINPUT_VERSION);
return EXIT_SUCCESS;
default:
- libinput_tool_usage();
+ usage();
return EXIT_FAILURE;
}
}
if (optind >= argc) {
- libinput_tool_usage();
+ usage();
return EXIT_FAILURE;
}
diff --git a/tools/libinput-tool.h b/tools/libinput-tool.h
deleted file mode 100644
index d7e6f7a..0000000
--- a/tools/libinput-tool.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright © 2017 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef LIBINPUT_TOOL_H
-#define LIBINPUT_TOOL_H 1
-
-#include "config.h"
-
-#include <stdbool.h>
-
-void libinput_tool_usage(void);
-
-#endif
diff --git a/tools/shared.c b/tools/shared.c
index fef9747..51246ff 100644
--- a/tools/shared.c
+++ b/tools/shared.c
@@ -34,7 +34,6 @@
#include <libevdev/libevdev.h>
#include <libinput-util.h>
-#include "libinput-tool.h"
#include "shared.h"
enum options {
diff --git a/tools/shared.h b/tools/shared.h
index 4d6e700..0fb8c28 100644
--- a/tools/shared.h
+++ b/tools/shared.h
@@ -28,8 +28,6 @@
#include <libinput.h>
-#include "libinput-tool.h"
-
enum tools_backend {
BACKEND_DEVICE,
BACKEND_UDEV