refactor: review format and imports

This commit is contained in:
2026-05-11 07:53:28 +02:00
parent 8f0da378b0
commit cdc7df3e56
29 changed files with 30 additions and 37 deletions
-1
View File
@@ -1,4 +1,3 @@
#include <bsd/string.h>
#include <limits.h> #include <limits.h>
#include <log.h> #include <log.h>
#include <stdbool.h> #include <stdbool.h>
-1
View File
@@ -1,4 +1,3 @@
#include <bsd/string.h>
#include <hashmap.h> #include <hashmap.h>
#include <log.h> #include <log.h>
#include <stdlib.h> #include <stdlib.h>
-2
View File
@@ -1,4 +1,3 @@
#include <bsd/string.h>
#include <log.h> #include <log.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@@ -10,7 +9,6 @@
#include "types.h" #include "types.h"
#include "file.h" #include "file.h"
#include "string.h"
static time_t get_file_time(const File *file) { static time_t get_file_time(const File *file) {
struct stat attr; struct stat attr;
+1 -1
View File
@@ -17,7 +17,7 @@ int main(int argc, char **argv) {
puts(PACKAGE " " VERSION); puts(PACKAGE " " VERSION);
set_seed((unsigned long)time(NULL)); rand_set_seed((unsigned long)time(NULL));
forge_run(&params); forge_run(&params);
+1 -1
View File
@@ -1,10 +1,10 @@
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
#include <log.h>
#include <stdlib.h> #include <stdlib.h>
#include "types.h" #include "types.h"
#include "config.h" #include "config.h"
#include "log.h"
void midi_open(MidiDevice *device, const char *name) { void midi_open(MidiDevice *device, const char *name) {
strlcpy(device->name, name, STR_LEN); strlcpy(device->name, name, STR_LEN);
+1 -2
View File
@@ -1,4 +1,4 @@
#include <bsd/string.h> #include <log.h>
#include <string.h> #include <string.h>
#include "types.h" #include "types.h"
@@ -6,7 +6,6 @@
#include "config.h" #include "config.h"
#include "config_file.h" #include "config_file.h"
#include "file.h" #include "file.h"
#include "log.h"
#include "project.h" #include "project.h"
#include "state.h" #include "state.h"
#include "string.h" #include "string.h"
+1 -1
View File
@@ -13,7 +13,7 @@ static unsigned long rand(void) {
return (unsigned long)(x >> (22 + count)); return (unsigned long)(x >> (22 + count));
} }
void set_seed(unsigned long long seed) { void rand_set_seed(unsigned long long seed) {
mcg_state = 2 * seed + 1; mcg_state = 2 * seed + 1;
(void)rand(); (void)rand();
} }
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef RAND_H #ifndef RAND_H
#define RAND_H #define RAND_H
void set_seed(unsigned long long seed); void rand_set_seed(unsigned long long seed);
unsigned int rand_uint(unsigned int max); unsigned int rand_uint(unsigned int max);
#endif #endif
-1
View File
@@ -1,4 +1,3 @@
#include <bsd/string.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
-1
View File
@@ -8,7 +8,6 @@
#include <hashmap.h> #include <hashmap.h>
#include <linmath.h> #include <linmath.h>
#include <stdbool.h> #include <stdbool.h>
#include <sys/time.h>
#include <time.h> #include <time.h>
#include "config.h" #include "config.h"