From 1355502e6c9e1bff1127387e177b561c1100d518 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 19 Mar 2018 11:38:11 +0900 Subject: [PATCH] Reorganize headers --- Makefile | 32 +++++++++---------- apps/background.c | 6 ++-- apps/bim.c | 2 +- apps/compositor.c | 20 ++++++------ apps/drawlines.c | 8 ++--- apps/font-server.c | 2 +- apps/ls.c | 2 +- apps/migrate.c | 4 +-- apps/ps.c | 2 +- apps/pstree.c | 4 +-- apps/sh.c | 6 ++-- apps/sysinfo.c | 4 +-- apps/terminal-vga.c | 8 ++--- apps/terminal.c | 20 ++++++------ apps/yutani-query.c | 2 +- apps/yutani-test.c | 6 ++-- apps/yutani_int.h | 10 +++--- .../usr/include/kernel}/args.h | 0 .../include => base/usr/include/kernel}/ata.h | 0 .../usr/include/kernel}/bitset.h | 2 +- .../usr/include/kernel}/boot.h | 4 +-- .../include => base/usr/include/kernel}/elf.h | 2 +- .../usr/include/kernel}/ext2.h | 4 +-- .../include => base/usr/include/kernel}/fs.h | 0 .../usr/include/kernel}/hashmap.h | 6 ++-- .../usr/include/kernel}/ipv4.h | 2 +- .../usr/include/kernel}/libc.h | 0 .../usr/include/kernel}/list.h | 2 +- .../usr/include/kernel}/logging.h | 0 .../include => base/usr/include/kernel}/mem.h | 2 +- .../usr/include/kernel}/mod/net.h | 0 .../usr/include/kernel}/mod/rtl.h | 0 .../usr/include/kernel}/mod/shell.h | 2 +- .../usr/include/kernel}/mod/snd.h | 6 ++-- .../usr/include/kernel}/mod/sound.h | 2 +- .../usr/include/kernel}/mod/tmpfs.h | 2 +- .../usr/include/kernel}/module.h | 4 +-- .../usr/include/kernel}/mouse.h | 0 .../usr/include/kernel}/multiboot.h | 2 +- .../include => base/usr/include/kernel}/pci.h | 0 .../usr/include/kernel}/pipe.h | 2 +- .../usr/include/kernel}/printf.h | 2 +- .../usr/include/kernel}/process.h | 7 ++-- .../usr/include/kernel}/ringbuffer.h | 0 .../include => base/usr/include/kernel}/shm.h | 4 +-- .../usr/include/kernel}/signal.h | 4 +-- .../usr/include/kernel}/system.h | 16 +++++----- .../usr/include/kernel}/task.h | 2 +- .../usr/include/kernel}/tokenize.h | 0 .../usr/include/kernel}/tree.h | 2 +- .../include => base/usr/include/kernel}/tss.h | 0 .../usr/include/kernel}/types.h | 2 +- .../usr/include/kernel}/ubsan.h | 2 +- .../usr/include/kernel}/va_list.h | 0 .../usr/include/kernel}/version.h | 0 .../usr/include/kernel}/video.h | 0 base/usr/include/sys/termios.h | 2 +- {lib => base/usr/include/toaru}/decorations.h | 4 +-- {lib => base/usr/include/toaru}/drawstring.h | 2 +- {lib => base/usr/include/toaru}/graphics.h | 0 {lib => base/usr/include/toaru}/hashmap.h | 5 +-- {lib => base/usr/include/toaru}/kbd.h | 0 {lib => base/usr/include/toaru}/list.h | 2 +- {lib => base/usr/include/toaru}/mouse.h | 0 {lib => base/usr/include/toaru}/pex.h | 0 {lib => base/usr/include/toaru}/pthread.h | 0 {lib => base/usr/include/toaru}/rline.h | 0 {lib => base/usr/include/toaru}/spinlock.h | 0 {lib => base/usr/include/toaru}/termemu.h | 4 +-- {lib => base/usr/include/toaru}/trace.h | 0 {lib => base/usr/include/toaru}/tree.h | 2 +- {lib => base/usr/include/toaru}/utf8decode.h | 0 {lib => base/usr/include/toaru}/yutani.h | 10 +++--- base/usr/include/video.h | 10 ------ decors/decor-fancy.c | 9 +++--- include | 1 - kernel/cpu/gdt.c | 6 ++-- kernel/cpu/idt.c | 4 +-- kernel/cpu/irq.c | 8 ++--- kernel/cpu/isr.c | 8 ++--- kernel/devices/cmos.c | 2 +- kernel/devices/fpu.c | 4 +-- kernel/devices/pci.c | 7 ++-- kernel/{include => devices}/pci_list.h | 0 kernel/devices/timer.c | 6 ++-- kernel/ds/bitset.c | 2 +- kernel/ds/hashmap.c | 4 +-- kernel/ds/list.c | 6 ++-- kernel/ds/ringbuffer.c | 6 ++-- kernel/ds/tree.c | 6 ++-- kernel/fs/pipe.c | 10 +++--- kernel/fs/ramdisk.c | 12 +++---- kernel/fs/tty.c | 16 +++++----- kernel/fs/unixpipe.c | 14 ++++---- kernel/fs/vfs.c | 14 ++++---- kernel/include/errno_defs.h | 1 - kernel/include/ioctl.h | 1 - kernel/include/signal_defs.h | 1 - kernel/include/syscall_nums.h | 1 - kernel/include/termemu.h | 1 - kernel/include/termios.h | 1 - kernel/include/utsname.h | 1 - kernel/libc.c | 2 +- kernel/main.c | 18 +++++------ kernel/mem/alloc.c | 2 +- kernel/mem/mem.c | 14 ++++---- kernel/mem/shm.c | 14 ++++---- kernel/misc/args.c | 10 +++--- kernel/misc/elf.c | 10 +++--- kernel/misc/kprintf.c | 8 ++--- kernel/misc/logging.c | 10 +++--- kernel/misc/multiboot.c | 6 ++-- kernel/misc/tokenize.c | 6 ++-- kernel/misc/ubsan.c | 12 +++---- kernel/spin.c | 2 +- kernel/sys/module.c | 12 +++---- kernel/sys/panic.c | 8 ++--- kernel/sys/process.c | 16 +++++----- kernel/sys/signal.c | 6 ++-- kernel/sys/syscall.c | 21 ++++++------ kernel/sys/system.c | 2 +- kernel/sys/task.c | 10 +++--- kernel/sys/version.c | 2 +- lib/decorations.c | 7 ++-- lib/drawstring.c | 4 +-- lib/graphics.c | 5 +-- lib/hashmap.c | 4 +-- lib/kbd.c | 2 +- lib/list.c | 3 +- lib/pex.c | 2 +- lib/pthread.c | 3 +- lib/rline.c | 4 +-- lib/termemu.c | 14 ++++---- lib/tree.c | 6 ++-- lib/yutani.c | 15 ++++----- linker/linker.c | 2 +- modules/ac97.c | 14 ++++---- modules/ata.c | 17 +++++----- modules/ataold.c | 12 +++---- modules/crash.c | 6 ++-- modules/debug_shell.c | 30 ++++++++--------- modules/dospart.c | 10 +++--- modules/e1000.c | 18 +++++------ modules/ext2.c | 18 +++++------ modules/hda.c | 8 ++--- modules/iso9660.c | 20 ++++++------ modules/lfbvideo.c | 22 ++++++------- modules/net.c | 14 ++++---- modules/packetfs.c | 13 ++++---- modules/pcnet.c | 18 +++++------ modules/pcspkr.c | 6 ++-- modules/procfs.c | 17 +++++----- modules/ps2kbd.c | 13 ++++---- modules/ps2mouse.c | 12 +++---- modules/random.c | 9 +++--- modules/rtl.c | 18 +++++------ modules/serial.c | 12 +++---- modules/snd.c | 12 +++---- modules/test-write.c | 10 +++--- modules/test.c | 13 ++++---- modules/testb.c | 8 ++--- modules/tmpfs.c | 17 +++++----- modules/usbuhci.c | 10 +++--- modules/vboxguest.c | 22 ++++++------- modules/vgadbg.c | 9 +++--- modules/vgalog.c | 9 +++--- modules/vidset.c | 15 ++++----- modules/vmware.c | 20 ++++++------ modules/xtest.c | 11 +++---- modules/zero.c | 6 ++-- 170 files changed, 559 insertions(+), 588 deletions(-) rename {kernel/include => base/usr/include/kernel}/args.h (100%) rename {kernel/include => base/usr/include/kernel}/ata.h (100%) rename {kernel/include => base/usr/include/kernel}/bitset.h (93%) rename {kernel/include => base/usr/include/kernel}/boot.h (86%) rename {kernel/include => base/usr/include/kernel}/elf.h (99%) rename {kernel/include => base/usr/include/kernel}/ext2.h (98%) rename {kernel/include => base/usr/include/kernel}/fs.h (100%) rename {kernel/include => base/usr/include/kernel}/hashmap.h (93%) rename {kernel/include => base/usr/include/kernel}/ipv4.h (99%) rename {kernel/include => base/usr/include/kernel}/libc.h (100%) rename {kernel/include => base/usr/include/kernel}/list.h (98%) rename {kernel/include => base/usr/include/kernel}/logging.h (100%) rename {kernel/include => base/usr/include/kernel}/mem.h (92%) rename {kernel/include => base/usr/include/kernel}/mod/net.h (100%) rename {kernel/include => base/usr/include/kernel}/mod/rtl.h (100%) rename {kernel/include => base/usr/include/kernel}/mod/shell.h (97%) rename {kernel/include => base/usr/include/kernel}/mod/snd.h (94%) rename {kernel/include => base/usr/include/kernel}/mod/sound.h (95%) rename {kernel/include => base/usr/include/kernel}/mod/tmpfs.h (96%) rename {kernel/include => base/usr/include/kernel}/module.h (94%) rename {kernel/include => base/usr/include/kernel}/mouse.h (100%) rename {kernel/include => base/usr/include/kernel}/multiboot.h (98%) rename {kernel/include => base/usr/include/kernel}/pci.h (100%) rename {kernel/include => base/usr/include/kernel}/pipe.h (94%) rename {kernel/include => base/usr/include/kernel}/printf.h (89%) rename {kernel/include => base/usr/include/kernel}/process.h (98%) rename {kernel/include => base/usr/include/kernel}/ringbuffer.h (100%) rename {kernel/include => base/usr/include/kernel}/shm.h (92%) rename {kernel/include => base/usr/include/kernel}/signal.h (70%) rename {kernel/include => base/usr/include/kernel}/system.h (97%) rename {kernel/include => base/usr/include/kernel}/task.h (95%) rename {kernel/include => base/usr/include/kernel}/tokenize.h (100%) rename {kernel/include => base/usr/include/kernel}/tree.h (97%) rename {kernel/include => base/usr/include/kernel}/tss.h (100%) rename {kernel/include => base/usr/include/kernel}/types.h (86%) rename {kernel/include => base/usr/include/kernel}/ubsan.h (97%) rename {kernel/include => base/usr/include/kernel}/va_list.h (100%) rename {kernel/include => base/usr/include/kernel}/version.h (100%) rename {kernel/include => base/usr/include/kernel}/video.h (100%) rename {lib => base/usr/include/toaru}/decorations.h (96%) rename {lib => base/usr/include/toaru}/drawstring.h (82%) rename {lib => base/usr/include/toaru}/graphics.h (100%) rename {lib => base/usr/include/toaru}/hashmap.h (93%) rename {lib => base/usr/include/toaru}/kbd.h (100%) rename {lib => base/usr/include/toaru}/list.h (98%) rename {lib => base/usr/include/toaru}/mouse.h (100%) rename {lib => base/usr/include/toaru}/pex.h (100%) rename {lib => base/usr/include/toaru}/pthread.h (100%) rename {lib => base/usr/include/toaru}/rline.h (100%) rename {lib => base/usr/include/toaru}/spinlock.h (100%) rename {lib => base/usr/include/toaru}/termemu.h (98%) rename {lib => base/usr/include/toaru}/trace.h (100%) rename {lib => base/usr/include/toaru}/tree.h (98%) rename {lib => base/usr/include/toaru}/utf8decode.h (100%) rename {lib => base/usr/include/toaru}/yutani.h (99%) delete mode 100644 base/usr/include/video.h delete mode 120000 include rename kernel/{include => devices}/pci_list.h (100%) delete mode 120000 kernel/include/errno_defs.h delete mode 120000 kernel/include/ioctl.h delete mode 120000 kernel/include/signal_defs.h delete mode 120000 kernel/include/syscall_nums.h delete mode 120000 kernel/include/termemu.h delete mode 120000 kernel/include/termios.h delete mode 120000 kernel/include/utsname.h diff --git a/Makefile b/Makefile index e47f8741..67a56d7b 100644 --- a/Makefile +++ b/Makefile @@ -50,10 +50,10 @@ cdrom/mod: MODULES = $(patsubst modules/%.c,cdrom/mod/%.ko,$(wildcard modules/*.c)) -HEADERS = $(shell find kernel/include/ -type f -name '*.h') +HEADERS = $(shell find base/usr/include/kernel -type f -name '*.h') cdrom/mod/%.ko: modules/%.c ${HEADERS} | cdrom/mod - ${KCC} -T modules/link.ld -I./kernel/include -nostdlib ${KCFLAGS} -c -o $@ $< + ${KCC} -T modules/link.ld -nostdlib ${KCFLAGS} -c -o $@ $< modules: ${MODULES} @@ -61,7 +61,7 @@ kernel/%.o: kernel/%.S ${KAS} ${ASFLAGS} $< -o $@ kernel/%.o: kernel/%.c ${HEADERS} - ${KCC} ${KCFLAGS} -nostdlib -g -I./kernel/include -c -o $@ $< + ${KCC} ${KCFLAGS} -nostdlib -g -c -o $@ $< # Root Filesystem @@ -102,48 +102,48 @@ base/lib/ld.so: linker/linker.c base/lib/libc.a | dirs # Shared Libraries -base/lib/libtoaru_graphics.so: lib/graphics.c lib/graphics.h +base/lib/libtoaru_graphics.so: lib/graphics.c base/usr/include/toaru/graphics.h $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -base/lib/libtoaru_list.so: lib/list.c lib/list.h +base/lib/libtoaru_list.so: lib/list.c base/usr/include/toaru/list.h $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -base/lib/libtoaru_tree.so: lib/tree.c lib/tree.h base/lib/libtoaru_list.so +base/lib/libtoaru_tree.so: lib/tree.c base/usr/include/toaru/tree.h base/lib/libtoaru_list.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_list -base/lib/libtoaru_hashmap.so: lib/hashmap.c lib/hashmap.h base/lib/libtoaru_list.so +base/lib/libtoaru_hashmap.so: lib/hashmap.c base/usr/include/toaru/hashmap.h base/lib/libtoaru_list.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_list -base/lib/libtoaru_kbd.so: lib/kbd.c lib/kbd.h +base/lib/libtoaru_kbd.so: lib/kbd.c base/usr/include/toaru/kbd.h $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -base/lib/libtoaru_pthread.so: lib/pthread.c lib/pthread.h +base/lib/libtoaru_pthread.so: lib/pthread.c base/usr/include/toaru/pthread.h $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -base/lib/libtoaru_pex.so: lib/pex.c lib/pex.h +base/lib/libtoaru_pex.so: lib/pex.c base/usr/include/toaru/pex.h $(CC) -o $@ $(CFLAGS) -shared -fPIC $< base/lib/libtoaru_dlfcn.so: lib/dlfcn.c $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -base/lib/libtoaru_yutani.so: lib/yutani.c lib/yutani.h base/lib/libtoaru_graphics.so +base/lib/libtoaru_yutani.so: lib/yutani.c base/usr/include/toaru/yutani.h base/lib/libtoaru_graphics.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics -base/lib/libtoaru_rline.so: lib/rline.c lib/rline.h base/lib/libtoaru_kbd.so +base/lib/libtoaru_rline.so: lib/rline.c base/usr/include/toaru/rline.h base/lib/libtoaru_kbd.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_kbd -base/lib/libtoaru_termemu.so: lib/termemu.c lib/termemu.h base/lib/libtoaru_graphics.so +base/lib/libtoaru_termemu.so: lib/termemu.c base/usr/include/toaru/termemu.h base/lib/libtoaru_graphics.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics -base/lib/libtoaru_drawstring.so: lib/drawstring.c lib/drawstring.h base/lib/libtoaru_graphics.so +base/lib/libtoaru_drawstring.so: lib/drawstring.c base/usr/include/toaru/drawstring.h base/lib/libtoaru_graphics.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics -base/lib/libtoaru_decorations.so: lib/decorations.c lib/decorations.h base/lib/libtoaru_graphics.so +base/lib/libtoaru_decorations.so: lib/decorations.c base/usr/include/toaru/decorations.h base/lib/libtoaru_graphics.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics # Decoration Themes -base/lib/libtoaru-decor-fancy.so: decors/decor-fancy.c lib/decorations.h base/lib/libtoaru_graphics.so base/lib/libtoaru_decorations.so base/lib/libtoaru_drawstring.so +base/lib/libtoaru-decor-fancy.so: decors/decor-fancy.c base/usr/include/toaru/decorations.h base/lib/libtoaru_graphics.so base/lib/libtoaru_decorations.so base/lib/libtoaru_drawstring.so $(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_decorations -ltoaru_drawstring -ltoaru_graphics # Init diff --git a/apps/background.c b/apps/background.c index f4e0b924..57fbec89 100644 --- a/apps/background.c +++ b/apps/background.c @@ -2,9 +2,9 @@ #include #include -#include "lib/yutani.h" -#include "lib/graphics.h" -#include "lib/drawstring.h" +#include +#include +#include #define PANEL_HEIGHT 24 diff --git a/apps/bim.c b/apps/bim.c index 1e5ffd2a..68093f56 100644 --- a/apps/bim.c +++ b/apps/bim.c @@ -31,7 +31,7 @@ #include -#include "lib/utf8decode.h" +#include #define BLOCK_SIZE 256 #define ENTER_KEY '\n' diff --git a/apps/compositor.c b/apps/compositor.c index 76b9b3fe..794977f3 100644 --- a/apps/compositor.c +++ b/apps/compositor.c @@ -30,19 +30,19 @@ #include #include -#include "lib/graphics.h" -#include "lib/pthread.h" -#include "lib/mouse.h" -#include "lib/kbd.h" -#include "lib/pex.h" -#include "lib/yutani.h" -#include "lib/hashmap.h" -#include "lib/list.h" -#include "lib/spinlock.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #define _DEBUG_YUTANI #ifdef _DEBUG_YUTANI -#include "lib/trace.h" +#include #define TRACE_APP_NAME "yutani" #else #define TRACE(msg,...) diff --git a/apps/drawlines.c b/apps/drawlines.c index 8a4df07c..646e81df 100644 --- a/apps/drawlines.c +++ b/apps/drawlines.c @@ -12,12 +12,12 @@ #include #include -#include "lib/yutani.h" -#include "lib/graphics.h" -#include "lib/pthread.h" +#include +#include +#include #define TRACE_APP_NAME "drawlines" -#include "lib/trace.h" +#include static int left, top, width, height; diff --git a/apps/font-server.c b/apps/font-server.c index 07de28be..d29e187f 100644 --- a/apps/font-server.c +++ b/apps/font-server.c @@ -4,7 +4,7 @@ #include #include -#include "lib/trace.h" +#include #define TRACE_APP_NAME "font-server" #define FONT_PATH "/usr/share/fonts/" diff --git a/apps/ls.c b/apps/ls.c index 4b259e16..3dfcc080 100644 --- a/apps/ls.c +++ b/apps/ls.c @@ -30,7 +30,7 @@ //#include "lib/trace.h" #define TRACE(...) -#include "lib/list.h" +#include #define MIN_COL_SPACING 2 diff --git a/apps/migrate.c b/apps/migrate.c index 91d78b68..4ba628fe 100644 --- a/apps/migrate.c +++ b/apps/migrate.c @@ -8,8 +8,8 @@ #include #include -#include "lib/trace.h" -#include "lib/hashmap.h" +#include +#include #define TRACE_APP_NAME "migrate" #define CHUNK_SIZE 4096 diff --git a/apps/ps.c b/apps/ps.c index 1f23b955..23bd16b2 100644 --- a/apps/ps.c +++ b/apps/ps.c @@ -20,7 +20,7 @@ #include #include -#include "lib/list.h" +#include #define LINE_LEN 4096 diff --git a/apps/pstree.c b/apps/pstree.c index 561035c7..a68955e0 100644 --- a/apps/pstree.c +++ b/apps/pstree.c @@ -19,8 +19,8 @@ #include #include -#include "lib/list.h" -#include "lib/tree.h" +#include +#include typedef struct process { int pid; diff --git a/apps/sh.c b/apps/sh.c index 6d156210..b6e2f88c 100644 --- a/apps/sh.c +++ b/apps/sh.c @@ -33,9 +33,9 @@ #include <_xlog.h> -#include "lib/list.h" -#include "lib/kbd.h" -#include "lib/rline.h" +#include +#include +#include #define PIPE_TOKEN "\xFF\xFFPIPE\xFF\xFF" #define STAR_TOKEN "\xFF\xFFSTAR\xFF\xFF" diff --git a/apps/sysinfo.c b/apps/sysinfo.c index e2714157..63a9eaa0 100644 --- a/apps/sysinfo.c +++ b/apps/sysinfo.c @@ -12,8 +12,8 @@ #include #include -#include "lib/graphics.h" -#include "lib/termemu.h" +#include +#include #include "toaru_logo.h" diff --git a/apps/terminal-vga.c b/apps/terminal-vga.c index d3567c12..2b0650fd 100644 --- a/apps/terminal-vga.c +++ b/apps/terminal-vga.c @@ -24,10 +24,10 @@ #include -#include "lib/utf8decode.h" -#include "lib/kbd.h" -#include "lib/graphics.h" -#include "lib/termemu.h" +#include +#include +#include +#include #include "vga-palette.h" diff --git a/apps/terminal.c b/apps/terminal.c index 7c48d8fe..411f4eb6 100644 --- a/apps/terminal.c +++ b/apps/terminal.c @@ -34,17 +34,15 @@ #include #define TRACE_APP_NAME "terminal" -#include "lib/trace.h" - -#include "lib/utf8decode.h" - -#include "lib/yutani.h" -#include "lib/decorations.h" -#include "lib/graphics.h" -#include "lib/kbd.h" -#include "lib/termemu.h" -#include "lib/spinlock.h" -#include "lib/list.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "terminal-palette.h" #include "terminal-font.h" diff --git a/apps/yutani-query.c b/apps/yutani-query.c index ee3e666c..574c2d4b 100644 --- a/apps/yutani-query.c +++ b/apps/yutani-query.c @@ -1,7 +1,7 @@ #include #include -#include "lib/yutani.h" +#include yutani_t * yctx; diff --git a/apps/yutani-test.c b/apps/yutani-test.c index d3c3dbd3..33c46463 100644 --- a/apps/yutani-test.c +++ b/apps/yutani-test.c @@ -13,9 +13,9 @@ #include #include -#include "lib/yutani.h" -#include "lib/graphics.h" -#include "lib/pthread.h" +#include +#include +#include static int left, top, width, height; diff --git a/apps/yutani_int.h b/apps/yutani_int.h index fb95dd7b..9369a791 100644 --- a/apps/yutani_int.h +++ b/apps/yutani_int.h @@ -1,10 +1,10 @@ #pragma once -#include "lib/yutani.h" -#include "lib/list.h" -#include "lib/hashmap.h" -#include "lib/graphics.h" -#include "lib/kbd.h" +#include +#include +#include +#include +#include #define MOUSE_SCALE 3 #define MOUSE_OFFSET_X 26 diff --git a/kernel/include/args.h b/base/usr/include/kernel/args.h similarity index 100% rename from kernel/include/args.h rename to base/usr/include/kernel/args.h diff --git a/kernel/include/ata.h b/base/usr/include/kernel/ata.h similarity index 100% rename from kernel/include/ata.h rename to base/usr/include/kernel/ata.h diff --git a/kernel/include/bitset.h b/base/usr/include/kernel/bitset.h similarity index 93% rename from kernel/include/bitset.h rename to base/usr/include/kernel/bitset.h index 3e4934d0..ccd3efb7 100644 --- a/kernel/include/bitset.h +++ b/base/usr/include/kernel/bitset.h @@ -2,7 +2,7 @@ */ #pragma once -#include +#include typedef struct { unsigned char *data; diff --git a/kernel/include/boot.h b/base/usr/include/kernel/boot.h similarity index 86% rename from kernel/include/boot.h rename to base/usr/include/kernel/boot.h index 1a01c826..34683981 100644 --- a/kernel/include/boot.h +++ b/base/usr/include/kernel/boot.h @@ -8,7 +8,7 @@ * information from that bootloader. * */ -#include +#include /* * Multiboot @@ -16,5 +16,5 @@ * Also supported natively by QEMU and a few * other emulators. */ -#include +#include diff --git a/kernel/include/elf.h b/base/usr/include/kernel/elf.h similarity index 99% rename from kernel/include/elf.h rename to base/usr/include/kernel/elf.h index 628e63d7..75204398 100644 --- a/kernel/include/elf.h +++ b/base/usr/include/kernel/elf.h @@ -11,7 +11,7 @@ * require different header files for definitions */ #ifdef _KERNEL_ -# include +# include #else # include #endif diff --git a/kernel/include/ext2.h b/base/usr/include/kernel/ext2.h similarity index 98% rename from kernel/include/ext2.h rename to base/usr/include/kernel/ext2.h index 5e8cbcb7..965af6cc 100644 --- a/kernel/include/ext2.h +++ b/base/usr/include/kernel/ext2.h @@ -3,10 +3,10 @@ #pragma once #ifdef _KERNEL_ -# include +# include #else # ifdef BOOTLOADER -# include +# include # else # include # endif diff --git a/kernel/include/fs.h b/base/usr/include/kernel/fs.h similarity index 100% rename from kernel/include/fs.h rename to base/usr/include/kernel/fs.h diff --git a/kernel/include/hashmap.h b/base/usr/include/kernel/hashmap.h similarity index 93% rename from kernel/include/hashmap.h rename to base/usr/include/kernel/hashmap.h index ccac4afd..43cf0538 100644 --- a/kernel/include/hashmap.h +++ b/base/usr/include/kernel/hashmap.h @@ -1,10 +1,10 @@ #pragma once -#include "list.h" - #ifdef _KERNEL_ -# include +# include +# include #else +# include # include # include # include diff --git a/kernel/include/ipv4.h b/base/usr/include/kernel/ipv4.h similarity index 99% rename from kernel/include/ipv4.h rename to base/usr/include/kernel/ipv4.h index 61de0c37..078f0b5b 100644 --- a/kernel/include/ipv4.h +++ b/base/usr/include/kernel/ipv4.h @@ -1,6 +1,6 @@ #pragma once -#include +#include struct ethernet_packet { uint8_t destination[6]; diff --git a/kernel/include/libc.h b/base/usr/include/kernel/libc.h similarity index 100% rename from kernel/include/libc.h rename to base/usr/include/kernel/libc.h diff --git a/kernel/include/list.h b/base/usr/include/kernel/list.h similarity index 98% rename from kernel/include/list.h rename to base/usr/include/kernel/list.h index c1840138..2e3bb634 100644 --- a/kernel/include/list.h +++ b/base/usr/include/kernel/list.h @@ -5,7 +5,7 @@ #pragma once #ifdef _KERNEL_ -# include +# include #else # include # include diff --git a/kernel/include/logging.h b/base/usr/include/kernel/logging.h similarity index 100% rename from kernel/include/logging.h rename to base/usr/include/kernel/logging.h diff --git a/kernel/include/mem.h b/base/usr/include/kernel/mem.h similarity index 92% rename from kernel/include/mem.h rename to base/usr/include/kernel/mem.h index cb7c9894..5e5ca4a9 100644 --- a/kernel/include/mem.h +++ b/base/usr/include/kernel/mem.h @@ -3,7 +3,7 @@ #pragma once -#include +#include extern uintptr_t heap_end; diff --git a/kernel/include/mod/net.h b/base/usr/include/kernel/mod/net.h similarity index 100% rename from kernel/include/mod/net.h rename to base/usr/include/kernel/mod/net.h diff --git a/kernel/include/mod/rtl.h b/base/usr/include/kernel/mod/rtl.h similarity index 100% rename from kernel/include/mod/rtl.h rename to base/usr/include/kernel/mod/rtl.h diff --git a/kernel/include/mod/shell.h b/base/usr/include/kernel/mod/shell.h similarity index 97% rename from kernel/include/mod/shell.h rename to base/usr/include/kernel/mod/shell.h index a83c795b..48ca5ed7 100644 --- a/kernel/include/mod/shell.h +++ b/base/usr/include/kernel/mod/shell.h @@ -1,7 +1,7 @@ #ifndef KERNEL_MOD_SHELL_H #define KERNEL_MOD_SHELL_H -#include +#include /* * We're going to have a list of shell commands. diff --git a/kernel/include/mod/snd.h b/base/usr/include/kernel/mod/snd.h similarity index 94% rename from kernel/include/mod/snd.h rename to base/usr/include/kernel/mod/snd.h index 11c86647..115314a5 100644 --- a/kernel/include/mod/snd.h +++ b/base/usr/include/kernel/mod/snd.h @@ -4,9 +4,9 @@ /* The format isn't really used for anything right now */ #define SND_FORMAT_L16SLE 0 /* Linear 16-bit signed little endian */ -#include -#include -#include +#include +#include +#include #define SND_KNOB_VENDOR 1024 diff --git a/kernel/include/mod/sound.h b/base/usr/include/kernel/mod/sound.h similarity index 95% rename from kernel/include/mod/sound.h rename to base/usr/include/kernel/mod/sound.h index c7231ca6..1fa8e8a2 100644 --- a/kernel/include/mod/sound.h +++ b/base/usr/include/kernel/mod/sound.h @@ -1,6 +1,6 @@ #pragma once -#include "../../../include/stdint.h" +#include #define SND_MAX_KNOBS 256 #define SND_KNOB_NAME_SIZE 256 diff --git a/kernel/include/mod/tmpfs.h b/base/usr/include/kernel/mod/tmpfs.h similarity index 96% rename from kernel/include/mod/tmpfs.h rename to base/usr/include/kernel/mod/tmpfs.h index ddd9aa74..ea606d66 100644 --- a/kernel/include/mod/tmpfs.h +++ b/base/usr/include/kernel/mod/tmpfs.h @@ -1,6 +1,6 @@ #ifndef _TMPFS_H__ #define _TMPFS_H__ -#include +#include fs_node_t * tmpfs_create(char * name); diff --git a/kernel/include/module.h b/base/usr/include/kernel/module.h similarity index 94% rename from kernel/include/module.h rename to base/usr/include/kernel/module.h index 4468bc8d..85884311 100644 --- a/kernel/include/module.h +++ b/base/usr/include/kernel/module.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include typedef struct { char * name; diff --git a/kernel/include/mouse.h b/base/usr/include/kernel/mouse.h similarity index 100% rename from kernel/include/mouse.h rename to base/usr/include/kernel/mouse.h diff --git a/kernel/include/multiboot.h b/base/usr/include/kernel/multiboot.h similarity index 98% rename from kernel/include/multiboot.h rename to base/usr/include/kernel/multiboot.h index 5cf26ec9..3647696b 100644 --- a/kernel/include/multiboot.h +++ b/base/usr/include/kernel/multiboot.h @@ -2,7 +2,7 @@ */ #pragma once -#include +#include #define MULTIBOOT_MAGIC 0x1BADB002 #define MULTIBOOT_EAX_MAGIC 0x2BADB002 diff --git a/kernel/include/pci.h b/base/usr/include/kernel/pci.h similarity index 100% rename from kernel/include/pci.h rename to base/usr/include/kernel/pci.h diff --git a/kernel/include/pipe.h b/base/usr/include/kernel/pipe.h similarity index 94% rename from kernel/include/pipe.h rename to base/usr/include/kernel/pipe.h index e2de45f7..1b7a1f87 100644 --- a/kernel/include/pipe.h +++ b/base/usr/include/kernel/pipe.h @@ -5,7 +5,7 @@ #pragma once -#include +#include typedef struct _pipe_device { uint8_t * buffer; diff --git a/kernel/include/printf.h b/base/usr/include/kernel/printf.h similarity index 89% rename from kernel/include/printf.h rename to base/usr/include/kernel/printf.h index 37ff085e..da7a9b23 100644 --- a/kernel/include/printf.h +++ b/base/usr/include/kernel/printf.h @@ -1,6 +1,6 @@ #pragma once -#include +#include extern size_t vasprintf(char * buf, const char *fmt, va_list args); extern int sprintf(char *buf, const char *fmt, ...); diff --git a/kernel/include/process.h b/base/usr/include/kernel/process.h similarity index 98% rename from kernel/include/process.h rename to base/usr/include/kernel/process.h index 322f88fc..702513af 100644 --- a/kernel/include/process.h +++ b/base/usr/include/kernel/process.h @@ -3,10 +3,9 @@ #pragma once -//#include -#include -#include -#include +#include +#include +#include #define KERNEL_STACK_SIZE 0x8000 diff --git a/kernel/include/ringbuffer.h b/base/usr/include/kernel/ringbuffer.h similarity index 100% rename from kernel/include/ringbuffer.h rename to base/usr/include/kernel/ringbuffer.h diff --git a/kernel/include/shm.h b/base/usr/include/kernel/shm.h similarity index 92% rename from kernel/include/shm.h rename to base/usr/include/kernel/shm.h index 46a36f7f..7c8f32f5 100644 --- a/kernel/include/shm.h +++ b/base/usr/include/kernel/shm.h @@ -2,8 +2,8 @@ */ #pragma once -#include -#include +#include +#include #define SHM_PATH_SEPARATOR "." diff --git a/kernel/include/signal.h b/base/usr/include/kernel/signal.h similarity index 70% rename from kernel/include/signal.h rename to base/usr/include/kernel/signal.h index fdd43cce..126100d3 100644 --- a/kernel/include/signal.h +++ b/base/usr/include/kernel/signal.h @@ -3,9 +3,9 @@ #pragma once -#include +#include void return_from_signal_handler(void); void fix_signal_stacks(void); -#include +#include diff --git a/kernel/include/system.h b/base/usr/include/kernel/system.h similarity index 97% rename from kernel/include/system.h rename to base/usr/include/kernel/system.h index 08ab5941..4ed54d64 100644 --- a/kernel/include/system.h +++ b/base/usr/include/kernel/system.h @@ -2,13 +2,13 @@ */ #pragma once -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #define ASSUME(cond) __extension__ ({ if (!(cond)) { __builtin_unreachable(); } }) @@ -230,5 +230,5 @@ extern int send_signal(pid_t process, uint32_t signal); extern void validate(void * ptr); extern int validate_safe(void * ptr); -#include +#include diff --git a/kernel/include/task.h b/base/usr/include/kernel/task.h similarity index 95% rename from kernel/include/task.h rename to base/usr/include/kernel/task.h index 1498a329..2b9001cc 100644 --- a/kernel/include/task.h +++ b/base/usr/include/kernel/task.h @@ -1,6 +1,6 @@ #pragma once -#include +#include typedef struct page { unsigned int present:1; diff --git a/kernel/include/tokenize.h b/base/usr/include/kernel/tokenize.h similarity index 100% rename from kernel/include/tokenize.h rename to base/usr/include/kernel/tokenize.h diff --git a/kernel/include/tree.h b/base/usr/include/kernel/tree.h similarity index 97% rename from kernel/include/tree.h rename to base/usr/include/kernel/tree.h index 0fa774d8..9692fa87 100644 --- a/kernel/include/tree.h +++ b/base/usr/include/kernel/tree.h @@ -4,7 +4,7 @@ */ #pragma once -#include "list.h" +#include typedef struct tree_node { void * value; diff --git a/kernel/include/tss.h b/base/usr/include/kernel/tss.h similarity index 100% rename from kernel/include/tss.h rename to base/usr/include/kernel/tss.h diff --git a/kernel/include/types.h b/base/usr/include/kernel/types.h similarity index 86% rename from kernel/include/types.h rename to base/usr/include/kernel/types.h index a57f2acb..9f6a2991 100644 --- a/kernel/include/types.h +++ b/base/usr/include/kernel/types.h @@ -6,7 +6,7 @@ #define NULL ((void *)0UL) -#include "../../include/stdint.h" +#include typedef unsigned long size_t; #define CHAR_BIT 8 diff --git a/kernel/include/ubsan.h b/base/usr/include/kernel/ubsan.h similarity index 97% rename from kernel/include/ubsan.h rename to base/usr/include/kernel/ubsan.h index 86d0014e..c8be5939 100644 --- a/kernel/include/ubsan.h +++ b/base/usr/include/kernel/ubsan.h @@ -1,6 +1,6 @@ #pragma once -#include +#include struct TypeDescriptor { uint16_t type_kind; diff --git a/kernel/include/va_list.h b/base/usr/include/kernel/va_list.h similarity index 100% rename from kernel/include/va_list.h rename to base/usr/include/kernel/va_list.h diff --git a/kernel/include/version.h b/base/usr/include/kernel/version.h similarity index 100% rename from kernel/include/version.h rename to base/usr/include/kernel/version.h diff --git a/kernel/include/video.h b/base/usr/include/kernel/video.h similarity index 100% rename from kernel/include/video.h rename to base/usr/include/kernel/video.h diff --git a/base/usr/include/sys/termios.h b/base/usr/include/sys/termios.h index 37d5e658..75ffba5d 100644 --- a/base/usr/include/sys/termios.h +++ b/base/usr/include/sys/termios.h @@ -3,7 +3,7 @@ #ifndef _KERNEL_ #include #else -#include +#include #endif /* Technically part of ioctl */ diff --git a/lib/decorations.h b/base/usr/include/toaru/decorations.h similarity index 96% rename from lib/decorations.h rename to base/usr/include/toaru/decorations.h index 0772cd66..a011bb85 100644 --- a/lib/decorations.h +++ b/base/usr/include/toaru/decorations.h @@ -6,8 +6,8 @@ #pragma once -#include "graphics.h" -#include "yutani.h" +#include +#include extern uint32_t decor_top_height; extern uint32_t decor_bottom_height; diff --git a/lib/drawstring.h b/base/usr/include/toaru/drawstring.h similarity index 82% rename from lib/drawstring.h rename to base/usr/include/toaru/drawstring.h index 83f3edca..f55129d3 100644 --- a/lib/drawstring.h +++ b/base/usr/include/toaru/drawstring.h @@ -1,5 +1,5 @@ #pragma once -#include "lib/graphics.h" +#include void draw_string(gfx_context_t * ctx, int x, int y, uint32_t _fg, char * str); int draw_string_width(char * str); diff --git a/lib/graphics.h b/base/usr/include/toaru/graphics.h similarity index 100% rename from lib/graphics.h rename to base/usr/include/toaru/graphics.h diff --git a/lib/hashmap.h b/base/usr/include/toaru/hashmap.h similarity index 93% rename from lib/hashmap.h rename to base/usr/include/toaru/hashmap.h index ccac4afd..6288695e 100644 --- a/lib/hashmap.h +++ b/base/usr/include/toaru/hashmap.h @@ -1,10 +1,11 @@ #pragma once -#include "list.h" #ifdef _KERNEL_ -# include +# include +# include #else +# include # include # include # include diff --git a/lib/kbd.h b/base/usr/include/toaru/kbd.h similarity index 100% rename from lib/kbd.h rename to base/usr/include/toaru/kbd.h diff --git a/lib/list.h b/base/usr/include/toaru/list.h similarity index 98% rename from lib/list.h rename to base/usr/include/toaru/list.h index 7cffc3cd..f0b8b380 100644 --- a/lib/list.h +++ b/base/usr/include/toaru/list.h @@ -5,7 +5,7 @@ #pragma once #ifdef _KERNEL_ -# include +# include #else # include # include diff --git a/lib/mouse.h b/base/usr/include/toaru/mouse.h similarity index 100% rename from lib/mouse.h rename to base/usr/include/toaru/mouse.h diff --git a/lib/pex.h b/base/usr/include/toaru/pex.h similarity index 100% rename from lib/pex.h rename to base/usr/include/toaru/pex.h diff --git a/lib/pthread.h b/base/usr/include/toaru/pthread.h similarity index 100% rename from lib/pthread.h rename to base/usr/include/toaru/pthread.h diff --git a/lib/rline.h b/base/usr/include/toaru/rline.h similarity index 100% rename from lib/rline.h rename to base/usr/include/toaru/rline.h diff --git a/lib/spinlock.h b/base/usr/include/toaru/spinlock.h similarity index 100% rename from lib/spinlock.h rename to base/usr/include/toaru/spinlock.h diff --git a/lib/termemu.h b/base/usr/include/toaru/termemu.h similarity index 98% rename from lib/termemu.h rename to base/usr/include/toaru/termemu.h index cf517fac..7e37469c 100644 --- a/lib/termemu.h +++ b/base/usr/include/toaru/termemu.h @@ -1,9 +1,9 @@ #pragma once #ifdef _KERNEL_ -# include +# include #else -#include +# include #endif #define TERM_BUF_LEN 128 diff --git a/lib/trace.h b/base/usr/include/toaru/trace.h similarity index 100% rename from lib/trace.h rename to base/usr/include/toaru/trace.h diff --git a/lib/tree.h b/base/usr/include/toaru/tree.h similarity index 98% rename from lib/tree.h rename to base/usr/include/toaru/tree.h index b2862443..06b60abf 100644 --- a/lib/tree.h +++ b/base/usr/include/toaru/tree.h @@ -4,7 +4,7 @@ */ #pragma once -#include "list.h" +#include typedef struct tree_node { void * value; diff --git a/lib/utf8decode.h b/base/usr/include/toaru/utf8decode.h similarity index 100% rename from lib/utf8decode.h rename to base/usr/include/toaru/utf8decode.h diff --git a/lib/yutani.h b/base/usr/include/toaru/yutani.h similarity index 99% rename from lib/yutani.h rename to base/usr/include/toaru/yutani.h index d60b4b99..2bb55bc6 100644 --- a/lib/yutani.h +++ b/base/usr/include/toaru/yutani.h @@ -3,11 +3,11 @@ #include #include -#include "hashmap.h" -#include "graphics.h" -#include "kbd.h" -#include "mouse.h" -#include "list.h" +#include +#include +#include +#include +#include #define YUTANI_SHMKEY(server_ident,buf,sz,win) sprintf(buf, "sys.%s.%d", server_ident, win->bufid); #define YUTANI_SHMKEY_EXP(server_ident,buf,sz,bufid) sprintf(buf, "sys.%s.%d", server_ident, bufid); diff --git a/base/usr/include/video.h b/base/usr/include/video.h deleted file mode 100644 index 5ca7dd76..00000000 --- a/base/usr/include/video.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#define IO_VID_WIDTH 0x5001 -#define IO_VID_HEIGHT 0x5002 -#define IO_VID_DEPTH 0x5003 -#define IO_VID_ADDR 0x5004 -#define IO_VID_SIGNAL 0x5005 -#define IO_VID_SET 0x5006 -#define IO_VID_STRIDE 0x5007 - diff --git a/decors/decor-fancy.c b/decors/decor-fancy.c index 5c47f5f9..f715ef53 100644 --- a/decors/decor-fancy.c +++ b/decors/decor-fancy.c @@ -1,10 +1,9 @@ #include -#include "lib/yutani.h" -#include "lib/graphics.h" -//#include "lib/shmemfonts.h" -#include "lib/decorations.h" -#include "lib/drawstring.h" +#include +#include +#include +#include #define INACTIVE 9 diff --git a/include b/include deleted file mode 120000 index 81ea6d53..00000000 --- a/include +++ /dev/null @@ -1 +0,0 @@ -base/usr/include \ No newline at end of file diff --git a/kernel/cpu/gdt.c b/kernel/cpu/gdt.c index f736f4d8..d162df1f 100644 --- a/kernel/cpu/gdt.c +++ b/kernel/cpu/gdt.c @@ -7,9 +7,9 @@ * Global Descriptor Tables module * */ -#include -#include -#include +#include +#include +#include typedef struct { /* Limits */ diff --git a/kernel/cpu/idt.c b/kernel/cpu/idt.c index 10bc4ee0..ae8726df 100644 --- a/kernel/cpu/idt.c +++ b/kernel/cpu/idt.c @@ -7,8 +7,8 @@ * Interrupt Descriptor Tables * */ -#include -#include +#include +#include typedef struct { uint16_t base_low; diff --git a/kernel/cpu/irq.c b/kernel/cpu/irq.c index 19057580..01b7302a 100644 --- a/kernel/cpu/irq.c +++ b/kernel/cpu/irq.c @@ -7,10 +7,10 @@ * Interrupt Requests * */ -#include -#include -#include -#include +#include +#include +#include +#include /* Programmable interrupt controller */ #define PIC1 0x20 diff --git a/kernel/cpu/isr.c b/kernel/cpu/isr.c index c3652277..60825e3f 100644 --- a/kernel/cpu/isr.c +++ b/kernel/cpu/isr.c @@ -6,10 +6,10 @@ * * Interrupt Service Requests */ -#include -#include -#include -#include +#include +#include +#include +#include /* The count is treated as is when setting up IDT gates. However there is an * additional ISR for the system call vector which is handled explicitly since diff --git a/kernel/devices/cmos.c b/kernel/devices/cmos.c index 6b5e2880..df34cb11 100644 --- a/kernel/devices/cmos.c +++ b/kernel/devices/cmos.c @@ -7,7 +7,7 @@ * */ -#include +#include /* CMOS values are stored like so: * Say it's 8:42 AM, then the values are stored as: diff --git a/kernel/devices/fpu.c b/kernel/devices/fpu.c index 4407805d..55c067c3 100644 --- a/kernel/devices/fpu.c +++ b/kernel/devices/fpu.c @@ -15,8 +15,8 @@ * FPU states are per kernel thread. * */ -#include -#include +#include +#include #define NO_LAZY_FPU diff --git a/kernel/devices/pci.c b/kernel/devices/pci.c index b398b024..8cd22882 100644 --- a/kernel/devices/pci.c +++ b/kernel/devices/pci.c @@ -6,9 +6,10 @@ * ToAruOS PCI Initialization */ -#include -#include -#include +#include +#include + +#include "pci_list.h" void pci_write_field(uint32_t device, int field, int size, uint32_t value) { diff --git a/kernel/include/pci_list.h b/kernel/devices/pci_list.h similarity index 100% rename from kernel/include/pci_list.h rename to kernel/devices/pci_list.h diff --git a/kernel/devices/timer.c b/kernel/devices/timer.c index a50f5578..1c4dd15e 100644 --- a/kernel/devices/timer.c +++ b/kernel/devices/timer.c @@ -5,9 +5,9 @@ * * Programmable Interrupt Timer */ -#include -#include -#include +#include +#include +#include #define PIT_A 0x40 #define PIT_B 0x41 diff --git a/kernel/ds/bitset.c b/kernel/ds/bitset.c index 503ef650..b9ab1333 100644 --- a/kernel/ds/bitset.c +++ b/kernel/ds/bitset.c @@ -4,7 +4,7 @@ * Copyright (C) 2015 Dale Weiler * 2015 Kevin Lange */ -#include "bitset.h" +#include #define CEIL(NUMBER, BASE) \ (((NUMBER) + (BASE) - 1) & ~((BASE) - 1)) diff --git a/kernel/ds/hashmap.c b/kernel/ds/hashmap.c index 34ed54b1..f3db9a55 100644 --- a/kernel/ds/hashmap.c +++ b/kernel/ds/hashmap.c @@ -3,8 +3,8 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2013-2014 Kevin Lange */ -#include "list.h" -#include "hashmap.h" +#include +#include unsigned int hashmap_string_hash(void * _key) { unsigned int hash = 0; diff --git a/kernel/ds/list.c b/kernel/ds/list.c index 37a0f477..fc64331b 100644 --- a/kernel/ds/list.c +++ b/kernel/ds/list.c @@ -6,13 +6,13 @@ * General-purpose list implementations. */ -#include "list.h" - #ifdef _KERNEL_ -# include +# include +# include #else # include # include +# include #endif void list_destroy(list_t * list) { diff --git a/kernel/ds/ringbuffer.c b/kernel/ds/ringbuffer.c index 632411d3..c6f0e20a 100644 --- a/kernel/ds/ringbuffer.c +++ b/kernel/ds/ringbuffer.c @@ -3,9 +3,9 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2013-2014 Kevin Lange */ -#include -#include -#include +#include +#include +#include size_t ring_buffer_unread(ring_buffer_t * ring_buffer) { if (ring_buffer->read_ptr == ring_buffer->write_ptr) { diff --git a/kernel/ds/tree.c b/kernel/ds/tree.c index 92225f8c..2542ba05 100644 --- a/kernel/ds/tree.c +++ b/kernel/ds/tree.c @@ -6,11 +6,11 @@ * General-purpose tree implementation */ -#include "tree.h" - #ifdef _KERNEL_ -# include +# include +# include #else +# include # include # include #endif diff --git a/kernel/fs/pipe.c b/kernel/fs/pipe.c index 1c24f9d9..d1ca65ce 100644 --- a/kernel/fs/pipe.c +++ b/kernel/fs/pipe.c @@ -7,11 +7,11 @@ * */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #define DEBUG_PIPES 0 diff --git a/kernel/fs/ramdisk.c b/kernel/fs/ramdisk.c index 6075913e..f117046f 100644 --- a/kernel/fs/ramdisk.c +++ b/kernel/fs/ramdisk.c @@ -8,12 +8,12 @@ * Provide raw block access to files loaded into kernel memory. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static uint32_t read_ramdisk(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); static uint32_t write_ramdisk(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); diff --git a/kernel/fs/tty.c b/kernel/fs/tty.c index 3918fe7b..a1607a2d 100644 --- a/kernel/fs/tty.c +++ b/kernel/fs/tty.c @@ -3,15 +3,15 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2013-2014 Kevin Lange */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include -#include -#include +#include +#include #define TTY_BUFFER_SIZE 4096 //4096 diff --git a/kernel/fs/unixpipe.c b/kernel/fs/unixpipe.c index 93c04567..ad4a57b3 100644 --- a/kernel/fs/unixpipe.c +++ b/kernel/fs/unixpipe.c @@ -3,14 +3,14 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include -#include +#include #define UNIX_PIPE_BUFFER 512 diff --git a/kernel/fs/vfs.c b/kernel/fs/vfs.c index 8ca64039..60185f73 100644 --- a/kernel/fs/vfs.c +++ b/kernel/fs/vfs.c @@ -8,13 +8,13 @@ * Virtual File System * */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #define MAX_SYMLINK_DEPTH 8 #define MAX_SYMLINK_SIZE 4096 diff --git a/kernel/include/errno_defs.h b/kernel/include/errno_defs.h deleted file mode 120000 index 3fd3b388..00000000 --- a/kernel/include/errno_defs.h +++ /dev/null @@ -1 +0,0 @@ -../../include/errno.h \ No newline at end of file diff --git a/kernel/include/ioctl.h b/kernel/include/ioctl.h deleted file mode 120000 index 4712af1b..00000000 --- a/kernel/include/ioctl.h +++ /dev/null @@ -1 +0,0 @@ -../../include/sys/ioctl.h \ No newline at end of file diff --git a/kernel/include/signal_defs.h b/kernel/include/signal_defs.h deleted file mode 120000 index c8d6f97b..00000000 --- a/kernel/include/signal_defs.h +++ /dev/null @@ -1 +0,0 @@ -../../include/sys/signal_defs.h \ No newline at end of file diff --git a/kernel/include/syscall_nums.h b/kernel/include/syscall_nums.h deleted file mode 120000 index 7a58c47d..00000000 --- a/kernel/include/syscall_nums.h +++ /dev/null @@ -1 +0,0 @@ -../../include/syscall_nums.h \ No newline at end of file diff --git a/kernel/include/termemu.h b/kernel/include/termemu.h deleted file mode 120000 index 53fc1eea..00000000 --- a/kernel/include/termemu.h +++ /dev/null @@ -1 +0,0 @@ -../../lib/termemu.h \ No newline at end of file diff --git a/kernel/include/termios.h b/kernel/include/termios.h deleted file mode 120000 index 7c1e56d7..00000000 --- a/kernel/include/termios.h +++ /dev/null @@ -1 +0,0 @@ -../../include/sys/termios.h \ No newline at end of file diff --git a/kernel/include/utsname.h b/kernel/include/utsname.h deleted file mode 120000 index 1da0f9fb..00000000 --- a/kernel/include/utsname.h +++ /dev/null @@ -1 +0,0 @@ -../../include/sys/utsname.h \ No newline at end of file diff --git a/kernel/libc.c b/kernel/libc.c index e3779ca6..c61652cd 100644 --- a/kernel/libc.c +++ b/kernel/libc.c @@ -7,7 +7,7 @@ * */ -#include +#include #include #define ALIGN (sizeof(size_t)) diff --git a/kernel/main.c b/kernel/main.c index 37a478e4..b24ca27a 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -39,15 +39,15 @@ * WITH THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include uintptr_t initial_esp = 0; diff --git a/kernel/mem/alloc.c b/kernel/mem/alloc.c index dc5ed4bc..d92c0d38 100644 --- a/kernel/mem/alloc.c +++ b/kernel/mem/alloc.c @@ -102,7 +102,7 @@ **/ /* Includes {{{ */ -#include +#include /* }}} */ /* Definitions {{{ */ diff --git a/kernel/mem/mem.c b/kernel/mem/mem.c index 7d344c91..a047746d 100644 --- a/kernel/mem/mem.c +++ b/kernel/mem/mem.c @@ -7,13 +7,13 @@ * Kernel Memory Manager */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #define KERNEL_HEAP_INIT 0x00800000 #define KERNEL_HEAP_END 0x20000000 diff --git a/kernel/mem/shm.c b/kernel/mem/shm.c index 89b63274..cc42bf49 100644 --- a/kernel/mem/shm.c +++ b/kernel/mem/shm.c @@ -6,13 +6,13 @@ * * Shared Memory */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include //static volatile uint8_t bsl; // big shm lock diff --git a/kernel/misc/args.c b/kernel/misc/args.c index 93f7567d..c683a0fc 100644 --- a/kernel/misc/args.c +++ b/kernel/misc/args.c @@ -11,11 +11,11 @@ * * This module provides access */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include char * cmdline = NULL; diff --git a/kernel/misc/elf.c b/kernel/misc/elf.c index 771861ae..f8092ea9 100644 --- a/kernel/misc/elf.c +++ b/kernel/misc/elf.c @@ -7,11 +7,11 @@ * */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include int exec_elf(char * path, fs_node_t * file, int argc, char ** argv, char ** env, int interp) { Elf32_Header header; diff --git a/kernel/misc/kprintf.c b/kernel/misc/kprintf.c index 25d5e92b..96421eec 100644 --- a/kernel/misc/kprintf.c +++ b/kernel/misc/kprintf.c @@ -8,10 +8,10 @@ * Simple, painfully lacking, implementation of printf(), * for the kernel of all things. */ -#include -#include -#include -#include +#include +#include +#include +#include /* * Integer to string diff --git a/kernel/misc/logging.c b/kernel/misc/logging.c index 7ea24068..9c9e9f89 100644 --- a/kernel/misc/logging.c +++ b/kernel/misc/logging.c @@ -9,11 +9,11 @@ * told not to). */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include log_type_t debug_level = NOTICE; void * debug_file = NULL; diff --git a/kernel/misc/multiboot.c b/kernel/misc/multiboot.c index 1a3770a5..537c99ea 100644 --- a/kernel/misc/multiboot.c +++ b/kernel/misc/multiboot.c @@ -5,9 +5,9 @@ * * Multiboot (GRUB) handler */ -#include -#include -#include +#include +#include +#include char * ramdisk = NULL; struct multiboot * mboot_ptr = NULL; diff --git a/kernel/misc/tokenize.c b/kernel/misc/tokenize.c index 1861197a..dadba674 100644 --- a/kernel/misc/tokenize.c +++ b/kernel/misc/tokenize.c @@ -3,9 +3,9 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2013 Kevin Lange */ -#include -#include -#include +#include +#include +#include int tokenize(char * str, char * sep, char **buf) { char * pch_i; diff --git a/kernel/misc/ubsan.c b/kernel/misc/ubsan.c index be8c9a08..ed273d61 100644 --- a/kernel/misc/ubsan.c +++ b/kernel/misc/ubsan.c @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #define EARLY_LOG_DEVICE 0x3F8 static uint32_t _ubsan_log_write(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer) { diff --git a/kernel/spin.c b/kernel/spin.c index 456ac2ad..102a9191 100644 --- a/kernel/spin.c +++ b/kernel/spin.c @@ -6,7 +6,7 @@ * Spin locks with waiters * */ -#include +#include static inline int arch_atomic_swap(volatile int * x, int v) { asm("xchg %0, %1" : "=r"(v), "=m"(*x) : "0"(v) : "memory"); diff --git a/kernel/sys/module.c b/kernel/sys/module.c index 5bb80165..9204a6d4 100644 --- a/kernel/sys/module.c +++ b/kernel/sys/module.c @@ -3,12 +3,12 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #define SYMBOLTABLE_HASHMAP_SIZE 10 #define MODULE_HASHMAP_SIZE 10 diff --git a/kernel/sys/panic.c b/kernel/sys/panic.c index c8ca91b8..2b7757a2 100644 --- a/kernel/sys/panic.c +++ b/kernel/sys/panic.c @@ -5,10 +5,10 @@ * * Panic functions */ -#include -#include -#include -#include +#include +#include +#include +#include void halt_and_catch_fire(char * error_message, const char * file, int line, struct regs * regs) { IRQ_OFF; diff --git a/kernel/sys/process.c b/kernel/sys/process.c index b38ed760..70cae60f 100644 --- a/kernel/sys/process.c +++ b/kernel/sys/process.c @@ -10,14 +10,14 @@ * Internal format format for a process and functions to spawn * new processes and manage the process tree. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include tree_t * process_tree; /* Parent->Children tree */ list_t * process_list; /* Flat storage */ diff --git a/kernel/sys/signal.c b/kernel/sys/signal.c index 3c39fe5e..cd5d8887 100644 --- a/kernel/sys/signal.c +++ b/kernel/sys/signal.c @@ -6,9 +6,9 @@ * Signal Handling */ -#include -#include -#include +#include +#include +#include void enter_signal_handler(uintptr_t location, int signum, uintptr_t stack) { IRQ_OFF; diff --git a/kernel/sys/syscall.c b/kernel/sys/syscall.c index b5e24e8b..77afc0a0 100644 --- a/kernel/sys/syscall.c +++ b/kernel/sys/syscall.c @@ -7,16 +7,17 @@ * Syscall Tables * */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include #include static char hostname[256]; diff --git a/kernel/sys/system.c b/kernel/sys/system.c index 124deeef..4d53bfc8 100644 --- a/kernel/sys/system.c +++ b/kernel/sys/system.c @@ -6,7 +6,7 @@ * System Functions * */ -#include +#include char * boot_arg = NULL; char * boot_arg_extra = NULL; diff --git a/kernel/sys/task.c b/kernel/sys/task.c index d3599306..b9d55955 100644 --- a/kernel/sys/task.c +++ b/kernel/sys/task.c @@ -7,11 +7,11 @@ * Task Switching and Management Functions * */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #define TASK_MAGIC 0xDEADBEEF diff --git a/kernel/sys/version.c b/kernel/sys/version.c index c13dd5f3..d5cf8d53 100644 --- a/kernel/sys/version.c +++ b/kernel/sys/version.c @@ -4,7 +4,7 @@ * Copyright (C) 2011-2017 Kevin Lange */ -#include +#include /* Kernel name. If you change this, you're not * my friend any more. */ diff --git a/lib/decorations.c b/lib/decorations.c index 961280d6..38252e63 100644 --- a/lib/decorations.c +++ b/lib/decorations.c @@ -9,11 +9,10 @@ #include #include #include -#include "lib/graphics.h" -#include "lib/yutani.h" -//#include "lib/shmemfonts.h" -#include "decorations.h" +#include +#include +#include uint32_t decor_top_height = 33; uint32_t decor_bottom_height = 6; diff --git a/lib/drawstring.c b/lib/drawstring.c index 77a98979..dd516b76 100644 --- a/lib/drawstring.c +++ b/lib/drawstring.c @@ -1,5 +1,5 @@ -#include "lib/utf8decode.h" -#include "lib/graphics.h" +#include +#include #include "terminal-font.h" diff --git a/lib/graphics.c b/lib/graphics.c index 99168470..82c20aa3 100644 --- a/lib/graphics.c +++ b/lib/graphics.c @@ -17,8 +17,9 @@ #include #include -#include -#include "graphics.h" +#include + +#include static inline int32_t min(int32_t a, int32_t b) { return (a < b) ? a : b; diff --git a/lib/hashmap.c b/lib/hashmap.c index 34ed54b1..7c4d7bcd 100644 --- a/lib/hashmap.c +++ b/lib/hashmap.c @@ -3,8 +3,8 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2013-2014 Kevin Lange */ -#include "list.h" -#include "hashmap.h" +#include +#include unsigned int hashmap_string_hash(void * _key) { unsigned int hash = 0; diff --git a/lib/kbd.c b/lib/kbd.c index e775b6bf..71837d14 100644 --- a/lib/kbd.c +++ b/lib/kbd.c @@ -11,7 +11,7 @@ * - It translates incoming keys to escape sequences */ -#include "kbd.h" +#include #define DEBUG_SCANCODES 0 diff --git a/lib/list.c b/lib/list.c index d35cb19d..1d4e39ba 100644 --- a/lib/list.c +++ b/lib/list.c @@ -6,9 +6,8 @@ * General-purpose list implementations. */ -#include "list.h" - #include +#include void list_destroy(list_t * list) { /* Free all of the contents of a list */ diff --git a/lib/pex.c b/lib/pex.c index 3efad792..e6869519 100644 --- a/lib/pex.c +++ b/lib/pex.c @@ -11,7 +11,7 @@ #include #include -#include "pex.h" +#include size_t pex_send(FILE * sock, unsigned int rcpt, size_t size, char * blob) { assert(size <= MAX_PACKET_SIZE); diff --git a/lib/pthread.c b/lib/pthread.c index f970b854..cfad021e 100644 --- a/lib/pthread.c +++ b/lib/pthread.c @@ -6,7 +6,8 @@ #include #include #include -#include "pthread.h" + +#include #define PTHREAD_STACK_SIZE 0x100000 diff --git a/lib/rline.c b/lib/rline.c index 813242ab..561a050a 100644 --- a/lib/rline.c +++ b/lib/rline.c @@ -10,8 +10,8 @@ #include <_xlog.h> -#include "kbd.h" -#include "rline.h" +#include +#include static struct termios old; diff --git a/lib/termemu.c b/lib/termemu.c index f66dc1d0..5c8a63f3 100644 --- a/lib/termemu.c +++ b/lib/termemu.c @@ -7,14 +7,14 @@ */ #ifdef _KERNEL_ -# include -# include -# include +# include +# include +# include static void _spin_lock(volatile int * foo) { return; } static void _spin_unlock(volatile int * foo) { return; } # define rgba(r,g,b,a) (((uint32_t)a * 0x1000000) + ((uint32_t)r * 0x10000) + ((uint32_t)g * 0x100) + ((uint32_t)b * 0x1)) # define rgb(r,g,b) rgba(r,g,b,0xFF) -#include "termemu.h" +#include #else #include @@ -24,11 +24,11 @@ static void _spin_unlock(volatile int * foo) { return; } #include -#include "lib/graphics.h" -#include "lib/termemu.h" +#include +#include -#include "lib/spinlock.h" +#include #define _spin_lock spin_lock #define _spin_unlock spin_unlock #endif diff --git a/lib/tree.c b/lib/tree.c index 92225f8c..3a98afbe 100644 --- a/lib/tree.c +++ b/lib/tree.c @@ -6,13 +6,13 @@ * General-purpose tree implementation */ -#include "tree.h" - #ifdef _KERNEL_ -# include +# include +# include #else # include # include +# include #endif tree_t * tree_create(void) { diff --git a/lib/yutani.c b/lib/yutani.c index c3c86ac6..4218535c 100644 --- a/lib/yutani.c +++ b/lib/yutani.c @@ -6,14 +6,13 @@ #include #include -#include "yutani.h" -#include "mouse.h" - -#include "lib/pex.h" -#include "lib/graphics.h" -#include "lib/kbd.h" -#include "lib/hashmap.h" -#include "lib/list.h" +#include +#include +#include +#include +#include +#include +#include yutani_msg_t * yutani_wait_for(yutani_t * y, uint32_t type) { do { diff --git a/linker/linker.c b/linker/linker.c index 0c57462b..414e88cc 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -22,7 +22,7 @@ extern char** environ; static int __trace_ld = 0; -#include "../lib/trace.h" +#include #include "../lib/list.c" #include "../lib/hashmap.c" diff --git a/modules/ac97.c b/modules/ac97.c index a5cf1256..c24a7655 100644 --- a/modules/ac97.c +++ b/modules/ac97.c @@ -9,13 +9,13 @@ * See . */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include /* Utility macros */ #define N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0])) diff --git a/modules/ata.c b/modules/ata.c index 131f43da..01c2927f 100644 --- a/modules/ata.c +++ b/modules/ata.c @@ -8,17 +8,16 @@ * Provides raw block access to an (Parallel) ATA drive. */ -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include /* TODO: Move this to mod/ata.h */ -#include +#include static char ata_drive_char = 'a'; static int cdrom_number = 0; diff --git a/modules/ataold.c b/modules/ataold.c index 05206f95..ba502b69 100644 --- a/modules/ataold.c +++ b/modules/ataold.c @@ -8,14 +8,14 @@ * Provides raw block access to an (Parallel) ATA drive. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* TODO: Move this to mod/ata.h */ -#include +#include static char ata_drive_char = 'a'; diff --git a/modules/crash.c b/modules/crash.c index 81bae5ed..f8075ef1 100644 --- a/modules/crash.c +++ b/modules/crash.c @@ -3,9 +3,9 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include +#include +#include +#include DEFINE_SHELL_FUNCTION(crash, "Dereference NULL.") { fprintf(tty, "*0x0 = %x\n", *((int *)0x00)); diff --git a/modules/debug_shell.c b/modules/debug_shell.c index 5d8bac25..fe35bb6e 100644 --- a/modules/debug_shell.c +++ b/modules/debug_shell.c @@ -5,22 +5,22 @@ * * Kernel Debug Shell */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include +#include /* * This is basically the same as a userspace buffered/unbuffered diff --git a/modules/dospart.c b/modules/dospart.c index d955326a..2b5ff8ea 100644 --- a/modules/dospart.c +++ b/modules/dospart.c @@ -3,11 +3,11 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #define SECTORSIZE 512 diff --git a/modules/e1000.c b/modules/e1000.c index 5bca0d60..004262bb 100644 --- a/modules/e1000.c +++ b/modules/e1000.c @@ -3,15 +3,15 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2017 Kevin Lange */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static uint32_t e1000_device_pci = 0x00000000; static int e1000_irq = 0; diff --git a/modules/ext2.c b/modules/ext2.c index 46ffbd3e..52af74b6 100644 --- a/modules/ext2.c +++ b/modules/ext2.c @@ -3,15 +3,15 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define EXT2_BGD_BLOCK 2 diff --git a/modules/hda.c b/modules/hda.c index eb79699c..83620b06 100644 --- a/modules/hda.c +++ b/modules/hda.c @@ -2,10 +2,10 @@ * Experimental Intel High-Definition Audio "driver" */ -#include -#include -#include -#include +#include +#include +#include +#include struct hda_device { uint32_t pci_device; diff --git a/modules/iso9660.c b/modules/iso9660.c index 2885f875..80fbaf30 100644 --- a/modules/iso9660.c +++ b/modules/iso9660.c @@ -5,16 +5,16 @@ * * ISO 9660 filesystem driver (for CDs) */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define ISO_SECTOR_SIZE 2048 diff --git a/modules/lfbvideo.c b/modules/lfbvideo.c index 422e6ec9..e6455909 100644 --- a/modules/lfbvideo.c +++ b/modules/lfbvideo.c @@ -6,17 +6,17 @@ * Bochs VBE / QEMU vga=std Graphics Driver */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "../apps/terminal-font.h" diff --git a/modules/net.c b/modules/net.c index 1c8e6d62..e7045c31 100644 --- a/modules/net.c +++ b/modules/net.c @@ -3,13 +3,13 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include static hashmap_t * dns_cache; static list_t * dns_waiters = NULL; diff --git a/modules/packetfs.c b/modules/packetfs.c index 86ed8215..4d18c710 100644 --- a/modules/packetfs.c +++ b/modules/packetfs.c @@ -3,12 +3,13 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include + +#include #define MAX_PACKET_SIZE 1024 diff --git a/modules/pcnet.c b/modules/pcnet.c index 86734625..77c3c52a 100644 --- a/modules/pcnet.c +++ b/modules/pcnet.c @@ -3,15 +3,15 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2016 Kevin Lange */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static list_t * net_queue = NULL; static spin_lock_t net_queue_lock = { 0 }; diff --git a/modules/pcspkr.c b/modules/pcspkr.c index 6a74b965..ef7ac306 100644 --- a/modules/pcspkr.c +++ b/modules/pcspkr.c @@ -3,9 +3,9 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include +#include +#include +#include static void note(int length, int freq) { diff --git a/modules/procfs.c b/modules/procfs.c index 8e42e824..5483d649 100644 --- a/modules/procfs.c +++ b/modules/procfs.c @@ -3,15 +3,14 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include #define PROCFS_STANDARD_ENTRIES (sizeof(std_entries) / sizeof(struct procfs_entry)) #define PROCFS_PROCDIR_ENTRIES (sizeof(procdir_entries) / sizeof(struct procfs_entry)) diff --git a/modules/ps2kbd.c b/modules/ps2kbd.c index 04f2e6d9..e0b09c15 100644 --- a/modules/ps2kbd.c +++ b/modules/ps2kbd.c @@ -10,13 +10,12 @@ * */ -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include #define KEY_DEVICE 0x60 #define KEY_PENDING 0x64 diff --git a/modules/ps2mouse.c b/modules/ps2mouse.c index 5e17f295..c049864d 100644 --- a/modules/ps2mouse.c +++ b/modules/ps2mouse.c @@ -6,12 +6,12 @@ * Mouse driver * */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static uint8_t mouse_cycle = 0; static uint8_t mouse_byte[4]; diff --git a/modules/random.c b/modules/random.c index f01c4172..6c7c55e9 100644 --- a/modules/random.c +++ b/modules/random.c @@ -7,11 +7,10 @@ * */ -#include -#include -#include - -#include +#include +#include +#include +#include static uint32_t read_random(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); static uint32_t write_random(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); diff --git a/modules/rtl.c b/modules/rtl.c index 4743371e..45ff36e6 100644 --- a/modules/rtl.c +++ b/modules/rtl.c @@ -3,15 +3,15 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* XXX move this to ipv4? */ extern size_t print_dns_name(fs_node_t * tty, struct dns_packet * dns, size_t offset); diff --git a/modules/serial.c b/modules/serial.c index 457c8e3d..70b4bd08 100644 --- a/modules/serial.c +++ b/modules/serial.c @@ -7,12 +7,12 @@ * */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #define SERIAL_PORT_A 0x3F8 #define SERIAL_PORT_B 0x2F8 diff --git a/modules/snd.c b/modules/snd.c index 29cd91a0..4e130094 100644 --- a/modules/snd.c +++ b/modules/snd.c @@ -11,13 +11,13 @@ * really support multiple devices despite the interface suggesting it might... */ -#include +#include +#include +#include +#include +#include -#include -#include -#include -#include -#include +#include /* Utility macros */ #define N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0])) diff --git a/modules/test-write.c b/modules/test-write.c index 51c8af21..8f48b0b1 100644 --- a/modules/test-write.c +++ b/modules/test-write.c @@ -3,11 +3,11 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include DEFINE_SHELL_FUNCTION(testwrite, "Test write") { diff --git a/modules/test.c b/modules/test.c index 52bfcc83..10cb17cb 100644 --- a/modules/test.c +++ b/modules/test.c @@ -3,13 +3,12 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include extern char * special_thing; diff --git a/modules/testb.c b/modules/testb.c index 3f8bb4af..625c4752 100644 --- a/modules/testb.c +++ b/modules/testb.c @@ -3,10 +3,10 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include +#include +#include +#include +#include extern int a_function(void); diff --git a/modules/tmpfs.c b/modules/tmpfs.c index 99d839dd..4ef59c8b 100644 --- a/modules/tmpfs.c +++ b/modules/tmpfs.c @@ -3,15 +3,14 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include -#include - -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include /* 4KB */ #define BLOCKSIZE 0x1000 diff --git a/modules/usbuhci.c b/modules/usbuhci.c index d9873224..0c166356 100644 --- a/modules/usbuhci.c +++ b/modules/usbuhci.c @@ -3,11 +3,11 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include static uint32_t hub_device = 0; diff --git a/modules/vboxguest.c b/modules/vboxguest.c index 4316fe27..a7fd5f37 100644 --- a/modules/vboxguest.c +++ b/modules/vboxguest.c @@ -6,17 +6,17 @@ * VirtualBox Guest Additions driver */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define VBOX_VENDOR_ID 0x80EE #define VBOX_DEVICE_ID 0xCAFE diff --git a/modules/vgadbg.c b/modules/vgadbg.c index ef5445cd..de08e767 100644 --- a/modules/vgadbg.c +++ b/modules/vgadbg.c @@ -1,8 +1,7 @@ -#include -#include -#include - -#include +#include +#include +#include +#include static unsigned short * textmemptr = (unsigned short *)0xB8000; static void placech(unsigned char c, int x, int y, int attr) { diff --git a/modules/vgalog.c b/modules/vgalog.c index ba56ff7d..13211610 100644 --- a/modules/vgalog.c +++ b/modules/vgalog.c @@ -1,8 +1,7 @@ -#include -#include -#include - -#include +#include +#include +#include +#include #include "../lib/termemu.c" diff --git a/modules/vidset.c b/modules/vidset.c index 5660998a..f55a122a 100644 --- a/modules/vidset.c +++ b/modules/vidset.c @@ -5,14 +5,13 @@ * * Module to provide a debug shell command to set display mode. */ -#include -#include -#include -#include -#include - -#include -#include +#include +#include +#include +#include +#include +#include +#include DEFINE_SHELL_FUNCTION(set_mode, "Set display mode") { if (argc < 3) { diff --git a/modules/vmware.c b/modules/vmware.c index e489b111..b362b0de 100644 --- a/modules/vmware.c +++ b/modules/vmware.c @@ -12,16 +12,16 @@ * Actually supports mouse buttons, unlike the one in VirtualBox. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define VMWARE_MAGIC 0x564D5868 #define VMWARE_PORT 0x5658 diff --git a/modules/xtest.c b/modules/xtest.c index ea66bb94..f9daeecc 100644 --- a/modules/xtest.c +++ b/modules/xtest.c @@ -3,12 +3,11 @@ * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2014 Kevin Lange */ -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include static void xtest_a(void * data, char * name) { fs_node_t * tty = data; diff --git a/modules/zero.c b/modules/zero.c index 1a7f4a77..53b26b9f 100644 --- a/modules/zero.c +++ b/modules/zero.c @@ -7,9 +7,9 @@ * */ -#include -#include -#include +#include +#include +#include static uint32_t read_null(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer); static uint32_t write_null(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer);