commit 47dedb0460b4ed8f8345d0bdc61df403c8502933
parent 505f1463eb4ea7593eece762e4818cd5fb572368
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Tue, 29 Jun 2021 19:41:03 -0700
Include some headers in aps.h
These specific headers are always needed by aps.h and won't be
included directly by other files (excepting their source files)
keeping it conflict and header guard free.
Diffstat:
4 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/aps/aps.c b/aps/aps.c
@@ -30,17 +30,11 @@
#include <string.h>
#include <unistd.h>
-#include <ap.h>
-
+#include "aps.h"
#include "command.h"
#include "config.h"
-#include "player.h"
-#include "queue.h"
-#include "response.h"
#include "util.h"
-#include "aps.h"
-
static struct aps aps;
void
diff --git a/aps/aps.h b/aps/aps.h
@@ -1,3 +1,9 @@
+#include <ap.h>
+
+#include "player.h"
+#include "queue.h"
+#include "response.h"
+
struct aps {
char *next[AP_ARGV_MAX];
int nextlen;
diff --git a/aps/command.c b/aps/command.c
@@ -28,16 +28,10 @@
#include <string.h>
#include <unistd.h>
-#include <ap.h>
-
-#include "player.h"
-#include "queue.h"
-#include "response.h"
+#include "aps.h"
#include "split.h"
#include "util.h"
-#include "aps.h"
-
static char *earg = "Invalid number of arguments";
static char *enotfound = "Not found";
static char *eposition = "No position in queue";
diff --git a/aps/response.c b/aps/response.c
@@ -25,14 +25,8 @@
#include <stdlib.h>
#include <string.h>
-#include <ap.h>
-
-#include "player.h"
-#include "queue.h"
-#include "response.h"
-#include "util.h"
-
#include "aps.h"
+#include "util.h"
int
resp_enlarge(struct aps *aps, int fd, unsigned int more)