From 13519597d98c9271b7856242d5625896d18803c5 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 26 Jul 2022 16:53:13 +0200 Subject: tools: add tools/sort_includes.rb --- src/kernel/arch/amd64/sysenter.c | 2 +- src/kernel/arch/amd64/tty/tty.c | 2 +- src/kernel/vfs/path.c | 2 +- src/user/app/init/driver/ansiterm.c | 2 +- src/user/app/init/driver/ps2.c | 2 +- src/user/app/init/driver/termcook.c | 2 +- src/user/app/init/driver/tmpfs.c | 2 +- src/user/app/init/main.c | 6 +++--- src/user/app/init/shell.c | 2 +- src/user/app/init/tests/main.c | 2 +- src/user/app/init/tests/pipe.c | 4 ++-- src/user/app/init/tests/semaphore.c | 6 +++--- src/user/app/init/tests/stress.c | 4 ++-- src/user/lib/esemaphore.c | 4 ++-- src/user/lib/fs/misc.c | 4 ++-- src/user/lib/fs/misc.h | 2 +- src/user/lib/malloc.c | 2 +- src/user/lib/stdlib.c | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/kernel/arch/amd64/sysenter.c b/src/kernel/arch/amd64/sysenter.c index 7591d83..536ada9 100644 --- a/src/kernel/arch/amd64/sysenter.c +++ b/src/kernel/arch/amd64/sysenter.c @@ -1,5 +1,5 @@ -#include #include +#include #include #include diff --git a/src/kernel/arch/amd64/tty/tty.c b/src/kernel/arch/amd64/tty/tty.c index 6593ef6..fcd4675 100644 --- a/src/kernel/arch/amd64/tty/tty.c +++ b/src/kernel/arch/amd64/tty/tty.c @@ -1,6 +1,6 @@ -#include #include #include +#include #include void tty_init(void) { diff --git a/src/kernel/vfs/path.c b/src/kernel/vfs/path.c index df5f00f..e8ce49c 100644 --- a/src/kernel/vfs/path.c +++ b/src/kernel/vfs/path.c @@ -1,5 +1,5 @@ -#include #include +#include #include int path_simplify(const char *in, char *out, size_t len) { diff --git a/src/user/app/init/driver/ansiterm.c b/src/user/app/init/driver/ansiterm.c index df7fb23..8206e85 100644 --- a/src/user/app/init/driver/ansiterm.c +++ b/src/user/app/init/driver/ansiterm.c @@ -1,6 +1,6 @@ -#include #include #include +#include struct vga_cell { unsigned char c; diff --git a/src/user/app/init/driver/ps2.c b/src/user/app/init/driver/ps2.c index bc7f4f0..9bbab8e 100644 --- a/src/user/app/init/driver/ps2.c +++ b/src/user/app/init/driver/ps2.c @@ -1,7 +1,7 @@ -#include #include #include #include +#include static const char keymap_lower[] = { diff --git a/src/user/app/init/driver/termcook.c b/src/user/app/init/driver/termcook.c index 4142322..2ddd3f9 100644 --- a/src/user/app/init/driver/termcook.c +++ b/src/user/app/init/driver/termcook.c @@ -1,6 +1,6 @@ #include -#include #include +#include static void w_output(handle_t output, const char *buf, size_t len) { size_t pos = 0; diff --git a/src/user/app/init/driver/tmpfs.c b/src/user/app/init/driver/tmpfs.c index 6e5b45e..c6cc0f3 100644 --- a/src/user/app/init/driver/tmpfs.c +++ b/src/user/app/init/driver/tmpfs.c @@ -1,7 +1,7 @@ -#include #include #include #include +#include struct node { const char *name; diff --git a/src/user/app/init/main.c b/src/user/app/init/main.c index fe06fab..4c4bf4e 100644 --- a/src/user/app/init/main.c +++ b/src/user/app/init/main.c @@ -1,12 +1,12 @@ #include #include #include -#include #include -#include +#include +#include #include +#include #include -#include __attribute__((visibility("hidden"))) extern char _image_base[]; diff --git a/src/user/app/init/shell.c b/src/user/app/init/shell.c index cda8a65..f420208 100644 --- a/src/user/app/init/shell.c +++ b/src/user/app/init/shell.c @@ -1,9 +1,9 @@ #include #include #include +#include #include #include -#include static bool isspace(char c) { return c == ' ' || c == '\t' || c == '\n'; diff --git a/src/user/app/init/tests/main.c b/src/user/app/init/tests/main.c index 5db6324..015a3be 100644 --- a/src/user/app/init/tests/main.c +++ b/src/user/app/init/tests/main.c @@ -3,8 +3,8 @@ #include #include #include -#include #include +#include static void run_forked(void (*fn)()) { if (!fork()) { diff --git a/src/user/app/init/tests/pipe.c b/src/user/app/init/tests/pipe.c index e7724e9..54025d0 100644 --- a/src/user/app/init/tests/pipe.c +++ b/src/user/app/init/tests/pipe.c @@ -1,8 +1,8 @@ #define TEST_MACROS -#include -#include #include #include +#include +#include static const char *pipe_msgs[2] = {"hello", "world"}; diff --git a/src/user/app/init/tests/semaphore.c b/src/user/app/init/tests/semaphore.c index 0bfa979..66ea4ba 100644 --- a/src/user/app/init/tests/semaphore.c +++ b/src/user/app/init/tests/semaphore.c @@ -1,9 +1,9 @@ #define TEST_MACROS -#include -#include -#include #include #include +#include +#include +#include static void odd(handle_t out, struct evil_sem *sem1, struct evil_sem *sem2) { _syscall_write(out, "1", 1, -1); diff --git a/src/user/app/init/tests/stress.c b/src/user/app/init/tests/stress.c index 9223d01..9af1706 100644 --- a/src/user/app/init/tests/stress.c +++ b/src/user/app/init/tests/stress.c @@ -1,8 +1,8 @@ #define TEST_MACROS -#include -#include #include #include +#include +#include static void run_forked(void (*fn)()) { if (!fork()) { diff --git a/src/user/lib/esemaphore.c b/src/user/lib/esemaphore.c index 2fdd659..1230274 100644 --- a/src/user/lib/esemaphore.c +++ b/src/user/lib/esemaphore.c @@ -1,7 +1,7 @@ -#include -#include #include #include +#include +#include void esem_signal(struct evil_sem *sem) { _syscall_write(sem->signal, NULL, 0, 0); diff --git a/src/user/lib/fs/misc.c b/src/user/lib/fs/misc.c index 9522cfa..3631e35 100644 --- a/src/user/lib/fs/misc.c +++ b/src/user/lib/fs/misc.c @@ -1,9 +1,9 @@ -#include -#include #include #include #include #include +#include +#include bool fork2_n_mount(const char *path) { handle_t h; diff --git a/src/user/lib/fs/misc.h b/src/user/lib/fs/misc.h index 3a8b071..1e41956 100644 --- a/src/user/lib/fs/misc.h +++ b/src/user/lib/fs/misc.h @@ -1,6 +1,6 @@ #pragma once -#include #include +#include bool fork2_n_mount(const char *path); diff --git a/src/user/lib/malloc.c b/src/user/lib/malloc.c index 5157e91..40ae917 100644 --- a/src/user/lib/malloc.c +++ b/src/user/lib/malloc.c @@ -1,7 +1,7 @@ -#include #include #include #include +#include #include diff --git a/src/user/lib/stdlib.c b/src/user/lib/stdlib.c index 56b8bb4..e947486 100644 --- a/src/user/lib/stdlib.c +++ b/src/user/lib/stdlib.c @@ -1,6 +1,6 @@ -#include #include #include +#include // TODO oh god this garbage - malloc, actually open, [...] static libc_file _stdin_null = { .fd = 0 }; -- cgit v1.2.3