Rewriting all project tree

This commit is contained in:
Adrien Bourmault 2020-02-19 22:19:58 +01:00
parent 3c3e64e133
commit 08d2b6bd76
62 changed files with 108 additions and 105 deletions

12
.github/FUNDING.yml vendored
View File

@ -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']

View File

@ -38,11 +38,13 @@ ASM=nasm
LD=x86_64-elf-ld LD=x86_64-elf-ld
OBJCOPY=x86_64-elf-objcopy OBJCOPY=x86_64-elf-objcopy
CCNAME=x86_64-elf-gcc CCNAME=x86_64-elf-gcc
# Flags
ASMFLAGS=-f elf64 ASMFLAGS=-f elf64
LDFLAGS=-melf_x86_64 LDFLAGS=-melf_x86_64
COPTIM=-O2 COPTIM=-O2
CWARNS=-Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror=implicit-function-declaration -Werror=return-type #-Wpadded 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 CFLAGS1=-nostdlib -ffreestanding -mcmodel=large -std=gnu11 -fstack-protector-all -fdump-rtl-expand
CFLAGS2= -c -mno-red-zone -mno-mmx -mno-sse -mno-sse2 CFLAGS2= -c -mno-red-zone -mno-mmx -mno-sse -mno-sse2
CFLAGS= $(CFLAGS1) $(CFLAGS2) CFLAGS= $(CFLAGS1) $(CFLAGS2)
@ -50,12 +52,15 @@ CFLAGS_MATHS= $(CFLAGS1) -c -mno-red-zone -mno-mmx
ifeq ($(mode), release) ifeq ($(mode), release)
CFLAGS += -D_NO_DEBUG CFLAGS += -D_NO_DEBUG
CFLAGS_MATHS += -D_NO_DEBUG
dep += dust dep += dust
endif endif
ifeq ($(mode), debug) ifeq ($(mode), debug)
CFLAGS += -g CFLAGS += -g
CFLAGS_MATHS += -g
endif endif
# GCC
KCC=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS) $(CINCLUDES) \ KCC=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS) $(CINCLUDES) \
-D_OSK_SOURCE -D_KALEID_KERNEL -D_OSK_SOURCE -D_KALEID_KERNEL
@ -66,7 +71,6 @@ KCC_MATHS=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS_MATHS) $(CINCLUDES) \
MBRDIR=boot/grub MBRDIR=boot/grub
LOADERDIR=boot/loader LOADERDIR=boot/loader
KALEIDDIR=kaleid KALEIDDIR=kaleid
INCLUDEDIR=include
OBJDIR=build/obj OBJDIR=build/obj
KOBJDIR=build/obj/kaleid KOBJDIR=build/obj/kaleid
LOBJDIR=build/obj/boot 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/ke/rtc.c kernel/io/keyb.c \
kernel/io/spkr.c kernel/po/shtdwn.c \ kernel/io/spkr.c kernel/po/shtdwn.c \
kernel/sh/shell.c kernel/sh/shcmds.c \ kernel/sh/shell.c kernel/sh/shcmds.c \
kernel/sh/musage.c kernel/io/ata.c \ kernel/sh/musage.c kernel/sh/argv.c \
kernel/sh/argv.c kernel/ke/pit.c \ kernel/ke/pit.c kernel/sh/testcmds.c \
kernel/sh/testcmds.c kernel/mm/palloc.c \ kernel/mm/palloc.c kernel/io/acpi.c \
kernel/io/acpi.c kernel/io/pci.c kernel/io/pci.c
KernObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(KernSources)) KernObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(KernSources))
KernDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(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 ------------------------------------------------------------- # ## MISC MAKEFILE ------------------------------------------------------------- #
./ProjectTree: ./.stylehlp_sh ./ProjectTree: ./.stylehlp_sh
@ -137,17 +152,14 @@ wc:
@cat $(shell find -name *.[ch]) $(shell find -name *.asm) $(shell find -name *.inc) | wc -l @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: 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 @find -name '*.expand' -o -name '*.expand' | xargs cat > rtl_exp.out
@egypt < rtl_exp.out | dot -Tps -o osk-graph.ps @egypt < rtl_exp.out | dot -Tps -o osk-graph.ps
@rm -f rtl_exp.out @rm -f rtl_exp.out
@evince osk-graph.ps & @evince osk-graph.ps &
## LIB C MAKEFILE ------------------------------------------------------------ # ## LIB C MAKEFILE ------------------------------------------------------------ #
-include $(LibCDep)
$(KOBJDIR)/libc/atoi.o: $(KALEIDDIR)/libc/atoi.c | $(KOBJDIR) $(KOBJDIR)/libc/atoi.o: $(KALEIDDIR)/libc/atoi.c | $(KOBJDIR)
@mkdir -p $(shell dirname $@) @mkdir -p $(shell dirname $@)
@$(KCC) -D_NEED_ATOI $< -o $@.1 @$(KCC) -D_NEED_ATOI $< -o $@.1
@ -174,9 +186,7 @@ $(KOBJDIR)/libc/mem.o: $(KALEIDDIR)/libc/mem.c | $(KOBJDIR)
@echo ${CL2}[$@] ${CL}Compiled.${CL3} @echo ${CL2}[$@] ${CL}Compiled.${CL3}
## KERNEL MAKEFILE ----------------------------------------------------------- # ## KERNEL SPECIAL RECIPES MAKEFILE ------------------------------------------- #
-include $(KernDep)
$(KOBJDIR)/kernel/ke/idt.o: $(KALEIDDIR)/kernel/ke/idt.c \ $(KOBJDIR)/kernel/ke/idt.o: $(KALEIDDIR)/kernel/ke/idt.c \
$(KALEIDDIR)/kernel/ke/isr.asm | $(KOBJDIR) $(KALEIDDIR)/kernel/ke/isr.asm | $(KOBJDIR)
@ -219,15 +229,17 @@ $(KOBJDIR)/kernel/mm/gdt.o: $(KALEIDDIR)/kernel/mm/gdt.c \
@rm -f $@.1 $@.2 @rm -f $@.1 $@.2
@echo ${CL2}[$@] ${CL}Compiled.${CL3} @echo ${CL2}[$@] ${CL}Compiled.${CL3}
$(KOBJDIR)/kernel/io/ata.o: $(KALEIDDIR)/kernel/io/ata.c \ ## DRIVERS SPECIAL RECIPES MAKEFILE ------------------------------------------ #
$(KALEIDDIR)/kernel/io/ata.asm | $(KOBJDIR)
$(KOBJDIR)/drivers/ata.o: $(KALEIDDIR)/drivers/ata.c $(KALEIDDIR)/drivers/ata.asm | $(KOBJDIR)
@mkdir -p $(shell dirname $@) @mkdir -p $(shell dirname $@)
@$(ASM) $(ASMFLAGS) $(KALEIDDIR)/kernel/io/ata.asm -o $@.1 @$(ASM) $(ASMFLAGS) $(KALEIDDIR)/drivers/ata.asm -o $@.1
@$(KCC) $< -o $@.2 @$(KCC) $< -o $@.2
@$(LD) $(LDFLAGS) -r $@.1 $@.2 -o $@ @$(LD) $(LDFLAGS) -r $@.1 $@.2 -o $@
@rm -f $@.1 $@.2 @rm -f $@.1 $@.2
@echo ${CL2}[$@] ${CL}Compiled.${CL3} @echo ${CL2}[$@] ${CL}Compiled.${CL3}
## DEPENDENCIES MAKEFILE ----------------------------------------------------- # ## DEPENDENCIES MAKEFILE ----------------------------------------------------- #
$(KOBJDIR)/%.d: %.c | $(KOBJDIR) $(KOBJDIR)/%.d: %.c | $(KOBJDIR)
@ -235,7 +247,6 @@ $(KOBJDIR)/%.d: %.c | $(KOBJDIR)
@$(KCC) -MM -MT $(@:%.d=%.o) -MF $@ $< @$(KCC) -MM -MT $(@:%.d=%.o) -MF $@ $<
@echo ${CL2}[$@] ${CL}Dependencies generated.${CL3} @echo ${CL2}[$@] ${CL}Dependencies generated.${CL3}
## MAIN MAKEFILE ------------------------------------------------------------- # ## MAIN MAKEFILE ------------------------------------------------------------- #
$(KOBJDIR)/%.o: %.c | $(KOBJDIR) $(KOBJDIR)/%.o: %.c | $(KOBJDIR)
@ -246,14 +257,16 @@ $(KOBJDIR)/%.o: %.c | $(KOBJDIR)
$(BINDIR)/kaleid: $(LOBJDIR)/kaleid.x86_64 $(BINDIR)/kaleid: $(LOBJDIR)/kaleid.x86_64
@echo ${CL2}[$@] ${NC}Objcopy...${CL3} @echo ${CL2}[$@] ${NC}Objcopy...${CL3}
@mkdir -p $(shell dirname $@) @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} @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} @echo ${CL2}[$@] ${NC}Linking kernel objects...${CL3}
@mkdir -p $(shell dirname $@) @mkdir -p $(shell dirname $@)
@$(LD) $(LDFLAGS) -T $(BUILDDIR)/kernel.ld \ @$(LD) $(LDFLAGS) -T $(BUILDDIR)/kernel.ld \
$(LOBJDIR)/loader.o $(KernObj) $(LibCObj) \ $(LOBJDIR)/loader.o $(KernObj) $(DriverObj) $(LibCObj) \
-o $(LOBJDIR)/kaleid.x86_64 -o $(LOBJDIR)/kaleid.x86_64
@echo ${CL2}[$@] ${CL}Success.${CL3} @echo ${CL2}[$@] ${CL}Success.${CL3}

View File

@ -47,48 +47,52 @@
│   ├── install-os-k.sh │   ├── install-os-k.sh
│   └── kernel.ld │   └── kernel.ld
├── include ├── include
│   ├── ex │   ├── drivers
│   │   ├── lock.h │   │   └── ata.h
│   │   └── malloc.h │   ├── kernel
│   ├── init │   │   ├── ex
│   │   ├── boot.h │   │   │   ├── lock.h
│   │   └── mboot.h │   │   │   └── malloc.h
│   ├── io │   │   ├── init
│   │   ├── acpi.h │   │   │   ├── boot.h
│   │   ├── ata.h │   │   │   └── mboot.h
│   │   ├── cursor.h │   │   ├── io
│   │   ├── keyb.h │   │   │   ├── acpi.h
│   │   ├── pci.h │   │   │   ├── cursor.h
│   │   ├── spkr.h │   │   │   ├── keyb.h
│   │   └── vga.h │   │   │   ├── pci.h
│   ├── ke │   │   │   ├── spkr.h
│   │   ├── cpuid.h │   │   │   └── vga.h
│   │   ├── idt.h │   │   ├── ke
│   │   ├── proc.h │   │   │   ├── cpuid.h
│   │   ├── sched.h │   │   │   ├── idt.h
│   │   ├── spinlock.h │   │   │   ├── proc.h
│   │   └── time.h │   │   │   ├── sched.h
│   ├── lib │   │   │   ├── spinlock.h
│   │   ├── buf.h │   │   │   └── time.h
│   │   └── list.h │   │   ├── mm
│   ├── mm │   │   │   ├── gdt.h
│   │   ├── gdt.h │   │   │   ├── heap.h
│   │   ├── heap.h │   │   │   ├── malloc.h
│   │   ├── malloc.h │   │   │   ├── map.h
│   │   ├── map.h │   │   │   ├── paging.h
│   │   ├── paging.h │   │   │   └── palloc.h
│   │   └── palloc.h │   │   ├── po
│   ├── po │   │   │   └── shtdwn.h
│   │   └── shtdwn.h │   │   └── sh
│   ├── sh │   │   ├── argv.h
│   │   ├── argv.h │   │   └── shell.h
│   │   └── shell.h
│   ├── asm.h │   ├── asm.h
│   ├── errno.h │   ├── errno.h
│   ├── kernel.h │   ├── kernel.h
│   ├── libbuf.h
│   ├── libc.h │   ├── libc.h
│   ├── liblist.h
│   └── vers.h │   └── vers.h
├── kaleid ├── kaleid
│   ├── drivers
│   │   ├── ata.asm
│   │   └── ata.c
│   ├── kernel │   ├── kernel
│   │   ├── init │   │   ├── init
│   │   │   ├── info.c │   │   │   ├── info.c
@ -97,8 +101,6 @@
│   │   │   └── table.c │   │   │   └── table.c
│   │   ├── io │   │   ├── io
│   │   │   ├── acpi.c │   │   │   ├── acpi.c
│   │   │   ├── ata.asm
│   │   │   ├── ata.c
│   │   │   ├── cursor.c │   │   │   ├── cursor.c
│   │   │   ├── keyb.c │   │   │   ├── keyb.c
│   │   │   ├── pci.c │   │   │   ├── pci.c
@ -164,4 +166,4 @@
├── ProjectTree ├── ProjectTree
└── README.md └── README.md
28 directories, 111 files 30 directories, 111 files

Binary file not shown.

View File

@ -27,7 +27,7 @@
#endif #endif
#ifndef _LIB_LIST_H #ifndef _LIB_LIST_H
#include <lib/list.h> #include <liblist.h>
#endif #endif
#ifndef _KALKERN_PROC_H #ifndef _KALKERN_PROC_H

View File

@ -27,7 +27,7 @@
#endif #endif
#ifndef _LIB_LIST_H #ifndef _LIB_LIST_H
#include <lib/list.h> #include <liblist.h>
#endif #endif
#ifndef _MM_MALLOC_H #ifndef _MM_MALLOC_H

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <io/ata.h> #include <drivers/ata.h>
#include <io/vga.h> #include <io/vga.h>
void IoDumpFirstSector(void) void IoDumpFirstSector(void)

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <io/keyb.h> #include <io/keyb.h>
#include <ke/idt.h> #include <ke/idt.h>

View File

@ -24,7 +24,7 @@
#include <io/spkr.h> #include <io/spkr.h>
#include <ke/time.h> #include <ke/time.h>
#include <lib/buf.h> #include <libbuf.h>
extern bool KeIdtIsInitialized; extern bool KeIdtIsInitialized;

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <init/boot.h> #include <init/boot.h>
#include <io/cursor.h> #include <io/cursor.h>
#include <io/vga.h> #include <io/vga.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <init/boot.h> #include <init/boot.h>
#include <ke/idt.h> #include <ke/idt.h>
#include <io/vga.h> #include <io/vga.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <kernel.h> #include <kernel.h>
#include <ke/time.h> #include <ke/time.h>
#include <io/vga.h> #include <io/vga.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <ke/proc.h> #include <ke/proc.h>
#include <io/vga.h> #include <io/vga.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <ke/time.h> #include <ke/time.h>
#include <ke/idt.h> #include <ke/idt.h>
#include <ke/sched.h> #include <ke/sched.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <ke/time.h> #include <ke/time.h>
#include <ke/idt.h> #include <ke/idt.h>

View File

@ -29,7 +29,7 @@
#include <mm/heap.h> #include <mm/heap.h>
#include <mm/paging.h> #include <mm/paging.h>
#include <mm/map.h> #include <mm/map.h>
#include <lib/buf.h> #include <libbuf.h>
#include <io/vga.h> #include <io/vga.h>
#include <ke/time.h> #include <ke/time.h>

View File

@ -29,7 +29,7 @@
#include <mm/palloc.h> #include <mm/palloc.h>
#include <mm/map.h> #include <mm/map.h>
#include <io/vga.h> #include <io/vga.h>
#include <lib/buf.h> #include <libbuf.h>
#include <ke/time.h> #include <ke/time.h>
//--------- //---------

View File

@ -25,7 +25,7 @@
#include <asm.h> #include <asm.h>
#include <ke/proc.h> #include <ke/proc.h>
#include <ke/sched.h> #include <ke/sched.h>
#include <lib/list.h> #include <liblist.h>
#include <ke/time.h> #include <ke/time.h>
bool PsInitialized = false; bool PsInitialized = false;

View File

@ -25,11 +25,11 @@
#include <vers.h> #include <vers.h>
#include <mm/paging.h> #include <mm/paging.h>
#include <mm/map.h> #include <mm/map.h>
#include <io/ata.h> #include <drivers/ata.h>
#include <io/vga.h> #include <io/vga.h>
#include <io/spkr.h> #include <io/spkr.h>
#include <ke/time.h> #include <ke/time.h>
#include <lib/buf.h> #include <libbuf.h>
#include <sh/shell.h> #include <sh/shell.h>
#include <po/shtdwn.h> #include <po/shtdwn.h>

View File

@ -25,7 +25,7 @@
#include <io/vga.h> #include <io/vga.h>
#include <io/keyb.h> #include <io/keyb.h>
#include <io/spkr.h> #include <io/spkr.h>
#include <lib/buf.h> #include <libbuf.h>
#include <sh/argv.h> #include <sh/argv.h>
#include <sh/shell.h> #include <sh/shell.h>
#include <po/shtdwn.h> #include <po/shtdwn.h>

View File

@ -24,7 +24,7 @@
#include <asm.h> #include <asm.h>
#include <vers.h> #include <vers.h>
#include <lib/buf.h> #include <libbuf.h>
#include <ex/argv.h> #include <ex/argv.h>
#include <init/boot.h> #include <init/boot.h>
#include <ke/time.h> #include <ke/time.h>
@ -34,7 +34,7 @@
#include <io/keyb.h> #include <io/keyb.h>
#include <po/shtdwn.h> #include <po/shtdwn.h>
#include <ke/cpuid.h> #include <ke/cpuid.h>
#include <io/ata.h> #include <drivers/ata.h>

View File

@ -26,11 +26,11 @@
#include <mm/paging.h> #include <mm/paging.h>
#include <mm/palloc.h> #include <mm/palloc.h>
#include <mm/map.h> #include <mm/map.h>
#include <io/ata.h> #include <drivers/ata.h>
#include <io/vga.h> #include <io/vga.h>
#include <io/spkr.h> #include <io/spkr.h>
#include <ke/time.h> #include <ke/time.h>
#include <lib/buf.h> #include <libbuf.h>
#include <sh/shell.h> #include <sh/shell.h>
#include <po/shtdwn.h> #include <po/shtdwn.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
// //
// Closes a buffer, not flushing unless the proper flag is set // Closes a buffer, not flushing unless the proper flag is set

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
// //
// Erases buf's content // Erases buf's content

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#ifdef _KALEID_KERNEL #ifdef _KALEID_KERNEL
#include <ke/time.h> #include <ke/time.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
// Straightforward functions // Straightforward functions
int BGetFlags(Buffer_t *buf) { return buf->flags; } int BGetFlags(Buffer_t *buf) { return buf->flags; }

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#include <ex/malloc.h> #include <ex/malloc.h>
Buffer_t *BStdIn, *BStdOut, *BStdDbg; Buffer_t *BStdIn, *BStdOut, *BStdDbg;

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#ifdef _KALEID_KERNEL #ifdef _KALEID_KERNEL
#include <io/vga.h> #include <io/vga.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
// //
// Writes a character on a buffer // Writes a character on a buffer

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
#if 0 #if 0
error_t BReadBuf(Buffer_t *buf, uchar *out, size_t n) error_t BReadBuf(Buffer_t *buf, uchar *out, size_t n)

View File

@ -23,7 +23,7 @@
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#if 0 #if 0
#include <lib/buf.h> #include <libbuf.h>
// //
// Builds string reading from buf according to fmt // Builds string reading from buf according to fmt

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
void BEnableAutoScroll(Buffer_t *buf) { buf->flags |= BF_AUTOSCROLL; } void BEnableAutoScroll(Buffer_t *buf) { buf->flags |= BF_AUTOSCROLL; }
void BDisableAutoScroll(Buffer_t *buf) { buf->flags &= ~BF_AUTOSCROLL; } void BDisableAutoScroll(Buffer_t *buf) { buf->flags &= ~BF_AUTOSCROLL; }

View File

@ -22,5 +22,5 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>

View File

@ -22,7 +22,7 @@
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. // // along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <lib/buf.h> #include <libbuf.h>
// //
// XXX // XXX

View File

@ -23,7 +23,7 @@
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
#include <libc.h> #include <libc.h>
#include <lib/buf.h> #include <libbuf.h>
long strtol(const char *str, char **endp, int base) { long strtol(const char *str, char **endp, int base) {
ulong n; ulong n;