Skip to content

Commit

Permalink
Remove some usage of libinput-util.h
Browse files Browse the repository at this point in the history
Positive side-effect - this exposed a bunch of missing #includes that got
pulled in by other headers before.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Sep 11, 2019
1 parent c84366e commit 1e6802b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/builddir.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

#pragma once

#include <unistd.h>
#include "util-strings.h"

/**
* Try to figure out the directory we're executing from and if it matches
* the builddir, return that directory. Otherwise, return NULL.
Expand Down
1 change: 1 addition & 0 deletions src/util-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "config.h"

#include <stdbool.h>
#include <stddef.h>

/*
* This list data structure is a verbatim copy from wayland-util.h from the
Expand Down
5 changes: 4 additions & 1 deletion tools/libinput-debug-gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <linux/input.h>

#include <assert.h>
#include <cairo.h>
#include <errno.h>
#include <fcntl.h>
Expand All @@ -41,7 +42,9 @@
#include <libevdev/libevdev.h>

#include <libinput.h>
#include <libinput-util.h>
#include "util-strings.h"
#include "util-macros.h"
#include "util-list.h"

#include "shared.h"

Expand Down
2 changes: 1 addition & 1 deletion tools/libinput-list-devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include <libudev.h>

#include <libinput.h>
#include <libinput-util.h>
#include <libinput-version.h>
#include "util-strings.h"

#include "shared.h"

Expand Down
2 changes: 0 additions & 2 deletions tools/libinput-measure.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include <unistd.h>
#include <libudev.h>

#include <libinput-util.h>

#include "shared.h"

static inline void
Expand Down
1 change: 0 additions & 1 deletion tools/libinput-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <getopt.h>
#include <sys/stat.h>

#include "libinput-util.h"
#include "quirks.h"
#include "shared.h"
#include "builddir.h"
Expand Down
5 changes: 4 additions & 1 deletion tools/libinput-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@
#include <unistd.h>
#include <signal.h>
#include <stdbool.h>
#include <time.h>

#include "libinput-versionsort.h"
#include "libinput-util.h"
#include "libinput-version.h"
#include "libinput-git-version.h"
#include "shared.h"
#include "builddir.h"
#include "util-list.h"
#include "util-time.h"
#include "util-macros.h"

static const int FILE_VERSION_NUMBER = 1;

Expand Down
2 changes: 1 addition & 1 deletion tools/libinput-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
#include <libudev.h>

#include <libinput.h>
#include <libinput-util.h>
#include <libinput-version.h>

#include "shared.h"

static void
usage(void)
{
Expand Down
6 changes: 5 additions & 1 deletion tools/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,25 @@

#include <config.h>

#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <getopt.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <libudev.h>
#include <unistd.h>

#include <libevdev/libevdev.h>
#include <libinput-util.h>

#include "builddir.h"
#include "shared.h"
#include "util-macros.h"
#include "util-strings.h"

LIBINPUT_ATTRIBUTE_PRINTF(3, 0)
static void
Expand Down

0 comments on commit 1e6802b

Please sign in to comment.