diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b7a7882..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: os-k-team -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/Makefile b/Makefile index ebe01ea..ef8b839 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,13 @@ ASM=nasm LD=x86_64-elf-ld OBJCOPY=x86_64-elf-objcopy CCNAME=x86_64-elf-gcc + +# Flags ASMFLAGS=-f elf64 LDFLAGS=-melf_x86_64 COPTIM=-O2 CWARNS=-Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror=implicit-function-declaration -Werror=return-type #-Wpadded -CINCLUDES=-Iinclude +CINCLUDES=-Iinclude -Iinclude/drivers -Iinclude/kernel CFLAGS1=-nostdlib -ffreestanding -mcmodel=large -std=gnu11 -fstack-protector-all -fdump-rtl-expand CFLAGS2= -c -mno-red-zone -mno-mmx -mno-sse -mno-sse2 CFLAGS= $(CFLAGS1) $(CFLAGS2) @@ -50,12 +52,15 @@ CFLAGS_MATHS= $(CFLAGS1) -c -mno-red-zone -mno-mmx ifeq ($(mode), release) CFLAGS += -D_NO_DEBUG +CFLAGS_MATHS += -D_NO_DEBUG dep += dust endif ifeq ($(mode), debug) CFLAGS += -g +CFLAGS_MATHS += -g endif +# GCC KCC=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS) $(CINCLUDES) \ -D_OSK_SOURCE -D_KALEID_KERNEL @@ -66,7 +71,6 @@ KCC_MATHS=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS_MATHS) $(CINCLUDES) \ MBRDIR=boot/grub LOADERDIR=boot/loader KALEIDDIR=kaleid -INCLUDEDIR=include OBJDIR=build/obj KOBJDIR=build/obj/kaleid LOBJDIR=build/obj/boot @@ -113,14 +117,25 @@ KernSources = kernel/ke/cpuid.c kernel/mm/paging.c \ kernel/ke/rtc.c kernel/io/keyb.c \ kernel/io/spkr.c kernel/po/shtdwn.c \ kernel/sh/shell.c kernel/sh/shcmds.c \ - kernel/sh/musage.c kernel/io/ata.c \ - kernel/sh/argv.c kernel/ke/pit.c \ - kernel/sh/testcmds.c kernel/mm/palloc.c \ - kernel/io/acpi.c kernel/io/pci.c + kernel/sh/musage.c kernel/sh/argv.c \ + kernel/ke/pit.c kernel/sh/testcmds.c \ + kernel/mm/palloc.c kernel/io/acpi.c \ + kernel/io/pci.c KernObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(KernSources)) KernDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(KernSources)) +# Drivers sources +DriverSources = drivers/ata.c + +DriverObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(DriverSources)) +DriverDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(DriverSources)) + +-include $(LibCDep) +-include $(KernDep) +-include $(DriverDep) + + ## MISC MAKEFILE ------------------------------------------------------------- # ./ProjectTree: ./.stylehlp_sh @@ -137,17 +152,14 @@ wc: @cat $(shell find -name *.[ch]) $(shell find -name *.asm) $(shell find -name *.inc) | wc -l egypt: CFLAGS := -DNDEBUG $(filter-out -fstack-protector-all,$(CFLAGS)) -egypt: dust $(LibCObj) $(KernObj) +egypt: dust $(LibCObj) $(KernObj) $(DriverObj) @find -name '*.expand' -o -name '*.expand' | xargs cat > rtl_exp.out @egypt < rtl_exp.out | dot -Tps -o osk-graph.ps @rm -f rtl_exp.out @evince osk-graph.ps & - ## LIB C MAKEFILE ------------------------------------------------------------ # --include $(LibCDep) - $(KOBJDIR)/libc/atoi.o: $(KALEIDDIR)/libc/atoi.c | $(KOBJDIR) @mkdir -p $(shell dirname $@) @$(KCC) -D_NEED_ATOI $< -o $@.1 @@ -174,9 +186,7 @@ $(KOBJDIR)/libc/mem.o: $(KALEIDDIR)/libc/mem.c | $(KOBJDIR) @echo ${CL2}[$@] ${CL}Compiled.${CL3} -## KERNEL MAKEFILE ----------------------------------------------------------- # - --include $(KernDep) +## KERNEL SPECIAL RECIPES MAKEFILE ------------------------------------------- # $(KOBJDIR)/kernel/ke/idt.o: $(KALEIDDIR)/kernel/ke/idt.c \ $(KALEIDDIR)/kernel/ke/isr.asm | $(KOBJDIR) @@ -219,15 +229,17 @@ $(KOBJDIR)/kernel/mm/gdt.o: $(KALEIDDIR)/kernel/mm/gdt.c \ @rm -f $@.1 $@.2 @echo ${CL2}[$@] ${CL}Compiled.${CL3} -$(KOBJDIR)/kernel/io/ata.o: $(KALEIDDIR)/kernel/io/ata.c \ - $(KALEIDDIR)/kernel/io/ata.asm | $(KOBJDIR) +## DRIVERS SPECIAL RECIPES MAKEFILE ------------------------------------------ # + +$(KOBJDIR)/drivers/ata.o: $(KALEIDDIR)/drivers/ata.c $(KALEIDDIR)/drivers/ata.asm | $(KOBJDIR) @mkdir -p $(shell dirname $@) - @$(ASM) $(ASMFLAGS) $(KALEIDDIR)/kernel/io/ata.asm -o $@.1 + @$(ASM) $(ASMFLAGS) $(KALEIDDIR)/drivers/ata.asm -o $@.1 @$(KCC) $< -o $@.2 @$(LD) $(LDFLAGS) -r $@.1 $@.2 -o $@ @rm -f $@.1 $@.2 @echo ${CL2}[$@] ${CL}Compiled.${CL3} + ## DEPENDENCIES MAKEFILE ----------------------------------------------------- # $(KOBJDIR)/%.d: %.c | $(KOBJDIR) @@ -235,7 +247,6 @@ $(KOBJDIR)/%.d: %.c | $(KOBJDIR) @$(KCC) -MM -MT $(@:%.d=%.o) -MF $@ $< @echo ${CL2}[$@] ${CL}Dependencies generated.${CL3} - ## MAIN MAKEFILE ------------------------------------------------------------- # $(KOBJDIR)/%.o: %.c | $(KOBJDIR) @@ -246,14 +257,16 @@ $(KOBJDIR)/%.o: %.c | $(KOBJDIR) $(BINDIR)/kaleid: $(LOBJDIR)/kaleid.x86_64 @echo ${CL2}[$@] ${NC}Objcopy...${CL3} @mkdir -p $(shell dirname $@) - @$(OBJCOPY) -I elf64-x86-64 -O elf32-i386 $(LOBJDIR)/kaleid.x86_64 $(BINDIR)/kaleid + @$(OBJCOPY) -I elf64-x86-64 -O elf32-i386 $(LOBJDIR)/kaleid.x86_64 \ + $(BINDIR)/kaleid @echo ${CL2}[$@] ${CL}Success.${CL3} -$(LOBJDIR)/kaleid.x86_64: $(LibCObj) $(KernObj) $(LOBJDIR)/loader.o $(BUILDDIR)/kernel.ld +$(LOBJDIR)/kaleid.x86_64: $(LibCObj) $(KernObj) $(DriverObj) \ + $(LOBJDIR)/loader.o $(BUILDDIR)/kernel.ld @echo ${CL2}[$@] ${NC}Linking kernel objects...${CL3} @mkdir -p $(shell dirname $@) @$(LD) $(LDFLAGS) -T $(BUILDDIR)/kernel.ld \ - $(LOBJDIR)/loader.o $(KernObj) $(LibCObj) \ + $(LOBJDIR)/loader.o $(KernObj) $(DriverObj) $(LibCObj) \ -o $(LOBJDIR)/kaleid.x86_64 @echo ${CL2}[$@] ${CL}Success.${CL3} diff --git a/ProjectTree b/ProjectTree index e668813..6e0b554 100644 --- a/ProjectTree +++ b/ProjectTree @@ -47,48 +47,52 @@ │   ├── install-os-k.sh │   └── kernel.ld ├── include -│   ├── ex -│   │   ├── lock.h -│   │   └── malloc.h -│   ├── init -│   │   ├── boot.h -│   │   └── mboot.h -│   ├── io -│   │   ├── acpi.h -│   │   ├── ata.h -│   │   ├── cursor.h -│   │   ├── keyb.h -│   │   ├── pci.h -│   │   ├── spkr.h -│   │   └── vga.h -│   ├── ke -│   │   ├── cpuid.h -│   │   ├── idt.h -│   │   ├── proc.h -│   │   ├── sched.h -│   │   ├── spinlock.h -│   │   └── time.h -│   ├── lib -│   │   ├── buf.h -│   │   └── list.h -│   ├── mm -│   │   ├── gdt.h -│   │   ├── heap.h -│   │   ├── malloc.h -│   │   ├── map.h -│   │   ├── paging.h -│   │   └── palloc.h -│   ├── po -│   │   └── shtdwn.h -│   ├── sh -│   │   ├── argv.h -│   │   └── shell.h +│   ├── drivers +│   │   └── ata.h +│   ├── kernel +│   │   ├── ex +│   │   │   ├── lock.h +│   │   │   └── malloc.h +│   │   ├── init +│   │   │   ├── boot.h +│   │   │   └── mboot.h +│   │   ├── io +│   │   │   ├── acpi.h +│   │   │   ├── cursor.h +│   │   │   ├── keyb.h +│   │   │   ├── pci.h +│   │   │   ├── spkr.h +│   │   │   └── vga.h +│   │   ├── ke +│   │   │   ├── cpuid.h +│   │   │   ├── idt.h +│   │   │   ├── proc.h +│   │   │   ├── sched.h +│   │   │   ├── spinlock.h +│   │   │   └── time.h +│   │   ├── mm +│   │   │   ├── gdt.h +│   │   │   ├── heap.h +│   │   │   ├── malloc.h +│   │   │   ├── map.h +│   │   │   ├── paging.h +│   │   │   └── palloc.h +│   │   ├── po +│   │   │   └── shtdwn.h +│   │   └── sh +│   │   ├── argv.h +│   │   └── shell.h │   ├── asm.h │   ├── errno.h │   ├── kernel.h +│   ├── libbuf.h │   ├── libc.h +│   ├── liblist.h │   └── vers.h ├── kaleid +│   ├── drivers +│   │   ├── ata.asm +│   │   └── ata.c │   ├── kernel │   │   ├── init │   │   │   ├── info.c @@ -97,8 +101,6 @@ │   │   │   └── table.c │   │   ├── io │   │   │   ├── acpi.c -│   │   │   ├── ata.asm -│   │   │   ├── ata.c │   │   │   ├── cursor.c │   │   │   ├── keyb.c │   │   │   ├── pci.c @@ -164,4 +166,4 @@ ├── ProjectTree └── README.md -28 directories, 111 files +30 directories, 111 files diff --git a/boot/grub/multiboot.pdf b/boot/grub/multiboot.pdf deleted file mode 100644 index 978ff78..0000000 Binary files a/boot/grub/multiboot.pdf and /dev/null differ diff --git a/include/io/ata.h b/include/drivers/ata.h similarity index 100% rename from include/io/ata.h rename to include/drivers/ata.h diff --git a/include/ex/lock.h b/include/kernel/ex/lock.h similarity index 100% rename from include/ex/lock.h rename to include/kernel/ex/lock.h diff --git a/include/ex/malloc.h b/include/kernel/ex/malloc.h similarity index 100% rename from include/ex/malloc.h rename to include/kernel/ex/malloc.h diff --git a/include/init/boot.h b/include/kernel/init/boot.h similarity index 100% rename from include/init/boot.h rename to include/kernel/init/boot.h diff --git a/include/init/mboot.h b/include/kernel/init/mboot.h similarity index 100% rename from include/init/mboot.h rename to include/kernel/init/mboot.h diff --git a/include/io/acpi.h b/include/kernel/io/acpi.h similarity index 100% rename from include/io/acpi.h rename to include/kernel/io/acpi.h diff --git a/include/io/cursor.h b/include/kernel/io/cursor.h similarity index 100% rename from include/io/cursor.h rename to include/kernel/io/cursor.h diff --git a/include/io/keyb.h b/include/kernel/io/keyb.h similarity index 100% rename from include/io/keyb.h rename to include/kernel/io/keyb.h diff --git a/include/io/pci.h b/include/kernel/io/pci.h similarity index 100% rename from include/io/pci.h rename to include/kernel/io/pci.h diff --git a/include/io/spkr.h b/include/kernel/io/spkr.h similarity index 100% rename from include/io/spkr.h rename to include/kernel/io/spkr.h diff --git a/include/io/vga.h b/include/kernel/io/vga.h similarity index 100% rename from include/io/vga.h rename to include/kernel/io/vga.h diff --git a/include/ke/cpuid.h b/include/kernel/ke/cpuid.h similarity index 100% rename from include/ke/cpuid.h rename to include/kernel/ke/cpuid.h diff --git a/include/ke/idt.h b/include/kernel/ke/idt.h similarity index 100% rename from include/ke/idt.h rename to include/kernel/ke/idt.h diff --git a/include/ke/proc.h b/include/kernel/ke/proc.h similarity index 99% rename from include/ke/proc.h rename to include/kernel/ke/proc.h index bb150a5..f40ccf2 100644 --- a/include/ke/proc.h +++ b/include/kernel/ke/proc.h @@ -27,7 +27,7 @@ #endif #ifndef _LIB_LIST_H -#include +#include #endif #ifndef _KALKERN_PROC_H diff --git a/include/ke/sched.h b/include/kernel/ke/sched.h similarity index 100% rename from include/ke/sched.h rename to include/kernel/ke/sched.h diff --git a/include/ke/spinlock.h b/include/kernel/ke/spinlock.h similarity index 100% rename from include/ke/spinlock.h rename to include/kernel/ke/spinlock.h diff --git a/include/ke/time.h b/include/kernel/ke/time.h similarity index 100% rename from include/ke/time.h rename to include/kernel/ke/time.h diff --git a/include/mm/gdt.h b/include/kernel/mm/gdt.h similarity index 100% rename from include/mm/gdt.h rename to include/kernel/mm/gdt.h diff --git a/include/mm/heap.h b/include/kernel/mm/heap.h similarity index 100% rename from include/mm/heap.h rename to include/kernel/mm/heap.h diff --git a/include/mm/malloc.h b/include/kernel/mm/malloc.h similarity index 99% rename from include/mm/malloc.h rename to include/kernel/mm/malloc.h index bb34b7d..fa92011 100644 --- a/include/mm/malloc.h +++ b/include/kernel/mm/malloc.h @@ -27,7 +27,7 @@ #endif #ifndef _LIB_LIST_H -#include +#include #endif #ifndef _MM_MALLOC_H diff --git a/include/mm/map.h b/include/kernel/mm/map.h similarity index 100% rename from include/mm/map.h rename to include/kernel/mm/map.h diff --git a/include/mm/paging.h b/include/kernel/mm/paging.h similarity index 100% rename from include/mm/paging.h rename to include/kernel/mm/paging.h diff --git a/include/mm/palloc.h b/include/kernel/mm/palloc.h similarity index 100% rename from include/mm/palloc.h rename to include/kernel/mm/palloc.h diff --git a/include/po/shtdwn.h b/include/kernel/po/shtdwn.h similarity index 100% rename from include/po/shtdwn.h rename to include/kernel/po/shtdwn.h diff --git a/include/sh/argv.h b/include/kernel/sh/argv.h similarity index 100% rename from include/sh/argv.h rename to include/kernel/sh/argv.h diff --git a/include/sh/shell.h b/include/kernel/sh/shell.h similarity index 100% rename from include/sh/shell.h rename to include/kernel/sh/shell.h diff --git a/include/lib/buf.h b/include/libbuf.h similarity index 100% rename from include/lib/buf.h rename to include/libbuf.h diff --git a/include/lib/list.h b/include/liblist.h similarity index 100% rename from include/lib/list.h rename to include/liblist.h diff --git a/kaleid/kernel/io/ata.asm b/kaleid/drivers/ata.asm similarity index 100% rename from kaleid/kernel/io/ata.asm rename to kaleid/drivers/ata.asm diff --git a/kaleid/kernel/io/ata.c b/kaleid/drivers/ata.c similarity index 98% rename from kaleid/kernel/io/ata.c rename to kaleid/drivers/ata.c index 3df1fae..ad9b095 100644 --- a/kaleid/kernel/io/ata.c +++ b/kaleid/drivers/ata.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include void IoDumpFirstSector(void) diff --git a/kaleid/kernel/io/keyb.c b/kaleid/kernel/io/keyb.c index 6a1e797..41cf22f 100644 --- a/kaleid/kernel/io/keyb.c +++ b/kaleid/kernel/io/keyb.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include diff --git a/kaleid/kernel/io/spkr.c b/kaleid/kernel/io/spkr.c index 66a7f5c..ebd80ec 100644 --- a/kaleid/kernel/io/spkr.c +++ b/kaleid/kernel/io/spkr.c @@ -24,7 +24,7 @@ #include #include -#include +#include extern bool KeIdtIsInitialized; diff --git a/kaleid/kernel/io/vga.c b/kaleid/kernel/io/vga.c index cfc7b9c..2e1e088 100644 --- a/kaleid/kernel/io/vga.c +++ b/kaleid/kernel/io/vga.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include #include diff --git a/kaleid/kernel/ke/idt.c b/kaleid/kernel/ke/idt.c index 16ecabb..04b9525 100644 --- a/kaleid/kernel/ke/idt.c +++ b/kaleid/kernel/ke/idt.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include #include diff --git a/kaleid/kernel/ke/log.c b/kaleid/kernel/ke/log.c index 64eaa1c..b874eab 100644 --- a/kaleid/kernel/ke/log.c +++ b/kaleid/kernel/ke/log.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include #include diff --git a/kaleid/kernel/ke/panic.c b/kaleid/kernel/ke/panic.c index 0a46373..e365d4c 100644 --- a/kaleid/kernel/ke/panic.c +++ b/kaleid/kernel/ke/panic.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include diff --git a/kaleid/kernel/ke/pit.c b/kaleid/kernel/ke/pit.c index e02852b..ad7a5d2 100644 --- a/kaleid/kernel/ke/pit.c +++ b/kaleid/kernel/ke/pit.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include #include diff --git a/kaleid/kernel/ke/rtc.c b/kaleid/kernel/ke/rtc.c index 337ff12..1d191ed 100644 --- a/kaleid/kernel/ke/rtc.c +++ b/kaleid/kernel/ke/rtc.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include #include diff --git a/kaleid/kernel/mm/paging.c b/kaleid/kernel/mm/paging.c index a1cf2e7..606c37a 100644 --- a/kaleid/kernel/mm/paging.c +++ b/kaleid/kernel/mm/paging.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/kaleid/kernel/mm/palloc.c b/kaleid/kernel/mm/palloc.c index 9fe053f..ea4a812 100644 --- a/kaleid/kernel/mm/palloc.c +++ b/kaleid/kernel/mm/palloc.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include //--------- diff --git a/kaleid/kernel/ps/sched.c b/kaleid/kernel/ps/sched.c index 737944e..bdcbdd8 100644 --- a/kaleid/kernel/ps/sched.c +++ b/kaleid/kernel/ps/sched.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include bool PsInitialized = false; diff --git a/kaleid/kernel/sh/shcmds.c b/kaleid/kernel/sh/shcmds.c index a8a5e72..4f9346e 100644 --- a/kaleid/kernel/sh/shcmds.c +++ b/kaleid/kernel/sh/shcmds.c @@ -25,11 +25,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include diff --git a/kaleid/kernel/sh/shell.c b/kaleid/kernel/sh/shell.c index 29a33de..f41682b 100644 --- a/kaleid/kernel/sh/shell.c +++ b/kaleid/kernel/sh/shell.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kaleid/kernel/sh/shell.h b/kaleid/kernel/sh/shell.h index 7362e4c..1bd08c0 100644 --- a/kaleid/kernel/sh/shell.h +++ b/kaleid/kernel/sh/shell.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -34,7 +34,7 @@ #include #include #include -#include +#include diff --git a/kaleid/kernel/sh/testcmds.c b/kaleid/kernel/sh/testcmds.c index 2cb2858..55acb11 100644 --- a/kaleid/kernel/sh/testcmds.c +++ b/kaleid/kernel/sh/testcmds.c @@ -26,11 +26,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include diff --git a/kaleid/libbuf/bclose.c b/kaleid/libbuf/bclose.c index a4d8446..6d69906 100644 --- a/kaleid/libbuf/bclose.c +++ b/kaleid/libbuf/bclose.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include // // Closes a buffer, not flushing unless the proper flag is set diff --git a/kaleid/libbuf/bflush.c b/kaleid/libbuf/bflush.c index c71efaf..391d2dd 100644 --- a/kaleid/libbuf/bflush.c +++ b/kaleid/libbuf/bflush.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include // // Erases buf's content diff --git a/kaleid/libbuf/bgetc.c b/kaleid/libbuf/bgetc.c index f4a8bd1..d7dfbeb 100644 --- a/kaleid/libbuf/bgetc.c +++ b/kaleid/libbuf/bgetc.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #ifdef _KALEID_KERNEL #include diff --git a/kaleid/libbuf/bmisc.c b/kaleid/libbuf/bmisc.c index eb34fcb..952a0ee 100644 --- a/kaleid/libbuf/bmisc.c +++ b/kaleid/libbuf/bmisc.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include // Straightforward functions int BGetFlags(Buffer_t *buf) { return buf->flags; } diff --git a/kaleid/libbuf/bopen.c b/kaleid/libbuf/bopen.c index cc37f1c..9e2875f 100644 --- a/kaleid/libbuf/bopen.c +++ b/kaleid/libbuf/bopen.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #include Buffer_t *BStdIn, *BStdOut, *BStdDbg; diff --git a/kaleid/libbuf/bprint.c b/kaleid/libbuf/bprint.c index b455b16..927506c 100644 --- a/kaleid/libbuf/bprint.c +++ b/kaleid/libbuf/bprint.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #ifdef _KALEID_KERNEL #include diff --git a/kaleid/libbuf/bputc.c b/kaleid/libbuf/bputc.c index 5136514..bf34bd2 100644 --- a/kaleid/libbuf/bputc.c +++ b/kaleid/libbuf/bputc.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include // // Writes a character on a buffer diff --git a/kaleid/libbuf/bread.c b/kaleid/libbuf/bread.c index d3305e6..333be8a 100644 --- a/kaleid/libbuf/bread.c +++ b/kaleid/libbuf/bread.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include #if 0 error_t BReadBuf(Buffer_t *buf, uchar *out, size_t n) diff --git a/kaleid/libbuf/bscan.c b/kaleid/libbuf/bscan.c index 5b5a260..f6bf405 100644 --- a/kaleid/libbuf/bscan.c +++ b/kaleid/libbuf/bscan.c @@ -23,7 +23,7 @@ //----------------------------------------------------------------------------// #if 0 -#include +#include // // Builds string reading from buf according to fmt diff --git a/kaleid/libbuf/bscroll.c b/kaleid/libbuf/bscroll.c index 1c1b8c4..5b2a6b8 100644 --- a/kaleid/libbuf/bscroll.c +++ b/kaleid/libbuf/bscroll.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include void BEnableAutoScroll(Buffer_t *buf) { buf->flags |= BF_AUTOSCROLL; } void BDisableAutoScroll(Buffer_t *buf) { buf->flags &= ~BF_AUTOSCROLL; } diff --git a/kaleid/libbuf/bwrite.c b/kaleid/libbuf/bwrite.c index f85037f..d82957f 100644 --- a/kaleid/libbuf/bwrite.c +++ b/kaleid/libbuf/bwrite.c @@ -22,5 +22,5 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include diff --git a/kaleid/libc/sprintf.c b/kaleid/libc/sprintf.c index 3aaf031..01342e0 100644 --- a/kaleid/libc/sprintf.c +++ b/kaleid/libc/sprintf.c @@ -22,7 +22,7 @@ // along with OS/K. If not, see . // //----------------------------------------------------------------------------// -#include +#include // // XXX diff --git a/kaleid/libc/strtol.c b/kaleid/libc/strtol.c index 03bdc8f..a3d67a0 100644 --- a/kaleid/libc/strtol.c +++ b/kaleid/libc/strtol.c @@ -23,7 +23,7 @@ //----------------------------------------------------------------------------// #include -#include +#include long strtol(const char *str, char **endp, int base) { ulong n;