refactor: clean includes

This commit is contained in:
2025-11-08 14:29:37 +01:00
parent c111bd0c74
commit 197c0c70da
14 changed files with 25 additions and 12 deletions
+2 -1
View File
@@ -5,10 +5,11 @@
#include <stdlib.h>
#include <string.h>
#include "types.h"
#include "args.h"
#include "config.h"
#include "string.h"
#include "types.h"
static void print_help(int status_code) {
puts(PACKAGE
+2
View File
@@ -1,3 +1,5 @@
#include "types.h"
#include "arr.h"
unsigned int arr_uint_index_of(UintArray array, unsigned int value) {
+2 -1
View File
@@ -3,11 +3,12 @@
#include <stdlib.h>
#include <string.h>
#include "types.h"
#include "config.h"
#include "config_file.h"
#include "file.h"
#include "string.h"
#include "types.h"
static int item_compare(const void *a, const void *b,
__attribute__((unused)) void *udata) {
+2 -1
View File
@@ -5,9 +5,10 @@
#include <sys/stat.h>
#include <time.h>
#include "types.h"
#include "file.h"
#include "string.h"
#include "types.h"
static time_t get_file_time(File file) {
struct stat attr;
+2 -1
View File
@@ -6,6 +6,8 @@
#include <string.h>
#include <sys/wait.h>
#include "types.h"
#include "config.h"
#include "config_file.h"
#include "file.h"
@@ -16,7 +18,6 @@
#include "state.h"
#include "tempo.h"
#include "timer.h"
#include "types.h"
#include "video.h"
#include "window.h"
+2 -1
View File
@@ -2,12 +2,13 @@
#include <stdlib.h>
#include <time.h>
#include "types.h"
#include "args.h"
#include "config.h"
#include "forge.h"
#include "main.h"
#include "rand.h"
#include "types.h"
int main(int argc, char **argv) {
Parameters params;
+2 -1
View File
@@ -1,9 +1,10 @@
#include <GLFW/glfw3.h>
#include <alsa/asoundlib.h>
#include "types.h"
#include "config.h"
#include "log.h"
#include "types.h"
MidiDevice midi_open(char *name) {
MidiDevice device;
-2
View File
@@ -5,12 +5,10 @@
#include "types.h"
#include "arr.h"
#include "config.h"
#include "config_file.h"
#include "constants.h"
#include "shaders.h"
#include "tempo.h"
#define GLAD_GL_IMPLEMENTATION
#include <glad/gl.h>
+2 -1
View File
@@ -3,9 +3,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include "shared.h"
#include "types.h"
#include "shared.h"
static void *open_shared(const char *key, size_t size, int *fd) {
*fd = shm_open(key, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
ftruncate(*fd, size);
+2 -1
View File
@@ -1,6 +1,8 @@
#include <log.h>
#include <stdio.h>
#include "types.h"
#include "arr.h"
#include "config.h"
#include "config_file.h"
@@ -9,7 +11,6 @@
#include "rand.h"
#include "state.h"
#include "tempo.h"
#include "types.h"
StateConfig state_parse_config(ConfigFile config) {
unsigned int i, j, offset, count;
+2
View File
@@ -2,6 +2,8 @@
#include <string.h>
#include <sys/time.h>
#include "types.h"
#include "config.h"
#include "tempo.h"
+2 -1
View File
@@ -1,8 +1,9 @@
#include <sys/time.h>
#include "timer.h"
#include "types.h"
#include "timer.h"
Timer timer_init(const unsigned int target) {
Timer output;
+2 -1
View File
@@ -8,9 +8,10 @@
#include <sys/ioctl.h>
#include <unistd.h>
#include "types.h"
#include "config.h"
#include "timer.h"
#include "types.h"
#include "video.h"
static void ioctl_error(VideoCapture *video_capture, const char *operation,
+1
View File
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include "types.h"
#include "window.h"
static void init_glfw(void (*error_callback)(int, const char *)) {