diff --git a/kernel/src/ELF.cpp b/kernel/src/ELF.cpp index fe4a1357..1e71682a 100644 --- a/kernel/src/ELF.cpp +++ b/kernel/src/ELF.cpp @@ -134,4 +134,4 @@ namespace ELFLoader return ELFData { segments, elf_header.e_entry }; } -} \ No newline at end of file +} diff --git a/kernel/src/ELF.h b/kernel/src/ELF.h index 1a3dce72..d81a9c6f 100644 --- a/kernel/src/ELF.h +++ b/kernel/src/ELF.h @@ -75,4 +75,4 @@ struct ELFData namespace ELFLoader { Result load(const TarStream::Entry& elf_entry, const TarStream& stream); -}; \ No newline at end of file +}; diff --git a/kernel/src/InitRD.cpp b/kernel/src/InitRD.cpp index c8d7d957..1fc592df 100644 --- a/kernel/src/InitRD.cpp +++ b/kernel/src/InitRD.cpp @@ -15,4 +15,4 @@ void InitRD::initialize() .expect_value("Unable to map the initial ramdisk into virtual memory"); g_initrd.initialize((void*)virtual_initrd_address, bootboot.initrd_size); -} \ No newline at end of file +} diff --git a/kernel/src/InitRD.h b/kernel/src/InitRD.h index 632a8e54..2eecf546 100644 --- a/kernel/src/InitRD.h +++ b/kernel/src/InitRD.h @@ -6,4 +6,4 @@ extern TarStream g_initrd; namespace InitRD { void initialize(); -} \ No newline at end of file +} diff --git a/kernel/src/Log.cpp b/kernel/src/Log.cpp index d8194fd1..deaad49d 100644 --- a/kernel/src/Log.cpp +++ b/kernel/src/Log.cpp @@ -127,4 +127,4 @@ static bool g_check_already_failed = false; CPU::print_stack_trace(); } CPU::efficient_halt(); -} \ No newline at end of file +} diff --git a/kernel/src/Log.h b/kernel/src/Log.h index 31dddd5c..97f2155d 100644 --- a/kernel/src/Log.h +++ b/kernel/src/Log.h @@ -22,4 +22,4 @@ bool log_text_console_enabled(); #define kdbgln(...) log(LogLevel::Debug, __VA_ARGS__) #define kinfoln(...) log(LogLevel::Info, __VA_ARGS__) #define kwarnln(...) log(LogLevel::Warn, __VA_ARGS__) -#define kerrorln(...) log(LogLevel::Error, __VA_ARGS__) \ No newline at end of file +#define kerrorln(...) log(LogLevel::Error, __VA_ARGS__) diff --git a/kernel/src/arch/CPU.h b/kernel/src/arch/CPU.h index 1701057f..54422463 100644 --- a/kernel/src/arch/CPU.h +++ b/kernel/src/arch/CPU.h @@ -27,4 +27,4 @@ namespace CPU void print_stack_trace_at(Registers* regs); void pause(); -} \ No newline at end of file +} diff --git a/kernel/src/arch/MMU.h b/kernel/src/arch/MMU.h index cc0b6b42..c0620071 100644 --- a/kernel/src/arch/MMU.h +++ b/kernel/src/arch/MMU.h @@ -34,4 +34,4 @@ namespace MMU void setup_initial_page_directory(); PageDirectory* kernel_page_directory(); -} \ No newline at end of file +} diff --git a/kernel/src/arch/Serial.cpp b/kernel/src/arch/Serial.cpp index 8bedd13c..c21c88e8 100644 --- a/kernel/src/arch/Serial.cpp +++ b/kernel/src/arch/Serial.cpp @@ -30,4 +30,4 @@ namespace Serial va_end(ap); return rc; } -} \ No newline at end of file +} diff --git a/kernel/src/arch/Serial.h b/kernel/src/arch/Serial.h index f74597c7..c8af2565 100644 --- a/kernel/src/arch/Serial.h +++ b/kernel/src/arch/Serial.h @@ -11,4 +11,4 @@ namespace Serial void print(const char* str); void println(const char* str); usize printf(const char* str, ...) _format(1, 2); -} \ No newline at end of file +} diff --git a/kernel/src/arch/Timer.cpp b/kernel/src/arch/Timer.cpp index 0bed7394..6314427b 100644 --- a/kernel/src/arch/Timer.cpp +++ b/kernel/src/arch/Timer.cpp @@ -137,4 +137,4 @@ bool should_invoke_scheduler() { // FIXME: Modulo is SLOW. We're calling this every tick. return (timer_ticks % ARCH_TIMER_FREQ) == 0; -} \ No newline at end of file +} diff --git a/kernel/src/arch/Timer.h b/kernel/src/arch/Timer.h index 2cd462d1..bcceb762 100644 --- a/kernel/src/arch/Timer.h +++ b/kernel/src/arch/Timer.h @@ -36,4 +36,4 @@ namespace Timer void init(); } -bool should_invoke_scheduler(); \ No newline at end of file +bool should_invoke_scheduler(); diff --git a/kernel/src/arch/x86_64/CPU.cpp b/kernel/src/arch/x86_64/CPU.cpp index 44c5a932..bb0455d8 100644 --- a/kernel/src/arch/x86_64/CPU.cpp +++ b/kernel/src/arch/x86_64/CPU.cpp @@ -284,4 +284,4 @@ namespace CPU extern "C" void switch_task(Registers* regs) { Scheduler::switch_task(regs); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/CPU.h b/kernel/src/arch/x86_64/CPU.h index c5747521..3d69c63d 100644 --- a/kernel/src/arch/x86_64/CPU.h +++ b/kernel/src/arch/x86_64/CPU.h @@ -22,4 +22,4 @@ struct [[gnu::packed]] TSS static_assert(sizeof(TSS) == 104UL); -extern TSS task_state_segment; \ No newline at end of file +extern TSS task_state_segment; diff --git a/kernel/src/arch/x86_64/IO.cpp b/kernel/src/arch/x86_64/IO.cpp index 8afa0a08..76f51cc3 100644 --- a/kernel/src/arch/x86_64/IO.cpp +++ b/kernel/src/arch/x86_64/IO.cpp @@ -37,4 +37,4 @@ namespace IO { asm volatile("outl %0, %1" : : "a"(value), "Nd"(port)); } -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/IO.h b/kernel/src/arch/x86_64/IO.h index 5f5a6fc2..d25513c5 100644 --- a/kernel/src/arch/x86_64/IO.h +++ b/kernel/src/arch/x86_64/IO.h @@ -10,4 +10,4 @@ namespace IO void outb(u16 port, u8 value); void outw(u16 port, u16 value); void outl(u16 port, u32 value); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/MMU.cpp b/kernel/src/arch/x86_64/MMU.cpp index a985df7b..a51dced4 100644 --- a/kernel/src/arch/x86_64/MMU.cpp +++ b/kernel/src/arch/x86_64/MMU.cpp @@ -274,4 +274,4 @@ namespace MMU { return g_kernel_directory; } -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/MMU.h b/kernel/src/arch/x86_64/MMU.h index 0ebc7978..198485f0 100644 --- a/kernel/src/arch/x86_64/MMU.h +++ b/kernel/src/arch/x86_64/MMU.h @@ -40,4 +40,4 @@ struct alignas(ARCH_PAGE_SIZE) PageDirectory }; static_assert(sizeof(PageTableEntry) == 8UL); -static_assert(sizeof(PageDirectory) == ARCH_PAGE_SIZE); \ No newline at end of file +static_assert(sizeof(PageDirectory) == ARCH_PAGE_SIZE); diff --git a/kernel/src/arch/x86_64/Serial.cpp b/kernel/src/arch/x86_64/Serial.cpp index 3dc26ec4..3d1dcc35 100644 --- a/kernel/src/arch/x86_64/Serial.cpp +++ b/kernel/src/arch/x86_64/Serial.cpp @@ -12,4 +12,4 @@ void Serial::putchar(u8 c) { serial_wait(); IO::outb(COM1, c); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/Thread.cpp b/kernel/src/arch/x86_64/Thread.cpp index 042ef119..f02fbaaf 100644 --- a/kernel/src/arch/x86_64/Thread.cpp +++ b/kernel/src/arch/x86_64/Thread.cpp @@ -55,4 +55,4 @@ void switch_context(Thread* old_thread, Thread* new_thread, Registers* regs) if (!old_thread->is_idle()) memcpy(&old_thread->regs, regs, sizeof(Registers)); memcpy(regs, &new_thread->regs, sizeof(Registers)); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/Timer.cpp b/kernel/src/arch/x86_64/Timer.cpp index c35a4cf5..26e441cc 100644 --- a/kernel/src/arch/x86_64/Timer.cpp +++ b/kernel/src/arch/x86_64/Timer.cpp @@ -12,4 +12,4 @@ void Timer::arch_init() IO::outb(PIT_CHANNEL_0, (u8)(divisor & 0xFF)); IO::outb(0x80, 0); // short delay IO::outb(PIT_CHANNEL_0, (u8)((divisor & 0xFF00) >> 8)); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/Timer.h b/kernel/src/arch/x86_64/Timer.h index 1a0e474b..6ab40002 100644 --- a/kernel/src/arch/x86_64/Timer.h +++ b/kernel/src/arch/x86_64/Timer.h @@ -1,4 +1,4 @@ #pragma once #include -const usize ARCH_TIMER_FREQ = 5; \ No newline at end of file +const usize ARCH_TIMER_FREQ = 5; diff --git a/kernel/src/arch/x86_64/init/GDT.cpp b/kernel/src/arch/x86_64/init/GDT.cpp index 77317c00..54480a0e 100644 --- a/kernel/src/arch/x86_64/init/GDT.cpp +++ b/kernel/src/arch/x86_64/init/GDT.cpp @@ -91,4 +91,4 @@ void setup_gdt() setup_tss(); load_gdt(&gdtr); load_tr(0x2b); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/init/IDT.cpp b/kernel/src/arch/x86_64/init/IDT.cpp index 00ad454b..e507613e 100644 --- a/kernel/src/arch/x86_64/init/IDT.cpp +++ b/kernel/src/arch/x86_64/init/IDT.cpp @@ -115,4 +115,4 @@ void setup_idt() idtr.limit = 0x0FFF; idtr.offset = (u64)idt; asm volatile("lidt %0" : : "m"(idtr)); -} \ No newline at end of file +} diff --git a/kernel/src/arch/x86_64/init/PIC.cpp b/kernel/src/arch/x86_64/init/PIC.cpp index 632c94a0..e24a23a1 100644 --- a/kernel/src/arch/x86_64/init/PIC.cpp +++ b/kernel/src/arch/x86_64/init/PIC.cpp @@ -50,4 +50,4 @@ void pic_eoi(unsigned char irq) void pic_eoi(Registers* regs) { pic_eoi((unsigned char)(regs->error)); // On IRQs, the error code is the IRQ number -} \ No newline at end of file +} diff --git a/kernel/src/boot/Init.cpp b/kernel/src/boot/Init.cpp index 69e40cb9..dad4e9ed 100644 --- a/kernel/src/boot/Init.cpp +++ b/kernel/src/boot/Init.cpp @@ -33,4 +33,4 @@ void Init::early_init() InitRD::initialize(); MemoryManager::protect_kernel_sections().expect_release_value("We should succeed to protect sections"); -} \ No newline at end of file +} diff --git a/kernel/src/boot/Init.h b/kernel/src/boot/Init.h index 5c5479c1..b7fb4422 100644 --- a/kernel/src/boot/Init.h +++ b/kernel/src/boot/Init.h @@ -4,4 +4,4 @@ namespace Init { void early_init(); void check_magic(); -} \ No newline at end of file +} diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index 521b3178..d46b731b 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -90,4 +90,4 @@ extern "C" [[noreturn]] void _start() auto rc = init(); if (rc.has_error()) kerrorln("Runtime error: %s", rc.error_string()); CPU::idle_loop(); -} \ No newline at end of file +} diff --git a/kernel/src/memory/Heap.cpp b/kernel/src/memory/Heap.cpp index a8ae9c08..52df9b96 100644 --- a/kernel/src/memory/Heap.cpp +++ b/kernel/src/memory/Heap.cpp @@ -419,4 +419,4 @@ void operator delete(void* p, usize) noexcept void operator delete[](void* p, usize) noexcept { kfree(p); -} \ No newline at end of file +} diff --git a/kernel/src/memory/Heap.h b/kernel/src/memory/Heap.h index 7d13d69a..d1b7ada9 100644 --- a/kernel/src/memory/Heap.h +++ b/kernel/src/memory/Heap.h @@ -7,4 +7,4 @@ Result kcalloc(usize nmemb, usize size); Result krealloc(void* ptr, usize size); Result kfree(void* ptr); -void dump_heap_usage(); \ No newline at end of file +void dump_heap_usage(); diff --git a/kernel/src/memory/KernelVM.cpp b/kernel/src/memory/KernelVM.cpp index 74bbfa37..0c403f8d 100644 --- a/kernel/src/memory/KernelVM.cpp +++ b/kernel/src/memory/KernelVM.cpp @@ -120,4 +120,4 @@ namespace KernelVM { return KERNEL_VM_RANGE_SIZE - g_used_vm; } -} \ No newline at end of file +} diff --git a/kernel/src/memory/KernelVM.h b/kernel/src/memory/KernelVM.h index 9a7f358b..60d5e28c 100644 --- a/kernel/src/memory/KernelVM.h +++ b/kernel/src/memory/KernelVM.h @@ -15,4 +15,4 @@ namespace KernelVM usize free(); usize used(); -} \ No newline at end of file +} diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index b410cc0d..93447a5d 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -357,4 +357,4 @@ namespace MemoryManager { return free_mem + used_mem + reserved_mem; } -} \ No newline at end of file +} diff --git a/kernel/src/memory/MemoryManager.h b/kernel/src/memory/MemoryManager.h index a5570157..13a02a8a 100644 --- a/kernel/src/memory/MemoryManager.h +++ b/kernel/src/memory/MemoryManager.h @@ -35,4 +35,4 @@ namespace MemoryManager usize used(); usize reserved(); usize total(); -} \ No newline at end of file +} diff --git a/kernel/src/memory/MemoryMap.cpp b/kernel/src/memory/MemoryMap.cpp index fa2d13e2..9d9cdca1 100644 --- a/kernel/src/memory/MemoryMap.cpp +++ b/kernel/src/memory/MemoryMap.cpp @@ -84,4 +84,4 @@ MemoryMapEntry MemoryMapIterator::highest() } return at(highest_index).value(); -} \ No newline at end of file +} diff --git a/kernel/src/memory/MemoryMap.h b/kernel/src/memory/MemoryMap.h index 669b07aa..d6f3687d 100644 --- a/kernel/src/memory/MemoryMap.h +++ b/kernel/src/memory/MemoryMap.h @@ -61,4 +61,4 @@ class MemoryMapIterator const usize m_mmap_entries; const MMapEnt* m_base_ent; usize m_cur_ent; -}; \ No newline at end of file +}; diff --git a/kernel/src/thread/Scheduler.cpp b/kernel/src/thread/Scheduler.cpp index f84c98c5..8b498cd0 100644 --- a/kernel/src/thread/Scheduler.cpp +++ b/kernel/src/thread/Scheduler.cpp @@ -206,4 +206,4 @@ void kernel_sleep(u64 ms) g_current->state = ThreadState::Dying; kernel_yield(); unreachable(); -} \ No newline at end of file +} diff --git a/kernel/src/thread/Scheduler.h b/kernel/src/thread/Scheduler.h index 10a47534..f818c731 100644 --- a/kernel/src/thread/Scheduler.h +++ b/kernel/src/thread/Scheduler.h @@ -25,4 +25,4 @@ namespace Scheduler extern "C" void kernel_yield(); void kernel_sleep(u64 ms); -[[noreturn]] void kernel_exit(); \ No newline at end of file +[[noreturn]] void kernel_exit(); diff --git a/kernel/src/thread/Spinlock.cpp b/kernel/src/thread/Spinlock.cpp index 45cde161..f1802b80 100644 --- a/kernel/src/thread/Spinlock.cpp +++ b/kernel/src/thread/Spinlock.cpp @@ -25,4 +25,4 @@ void Spinlock::unlock() { kwarnln("Spinlock::unlock() called on an unlocked lock with value %d", expected); } -} \ No newline at end of file +} diff --git a/kernel/src/thread/Spinlock.h b/kernel/src/thread/Spinlock.h index 453327d7..d54edd96 100644 --- a/kernel/src/thread/Spinlock.h +++ b/kernel/src/thread/Spinlock.h @@ -88,4 +88,4 @@ template class LockedValue private: T m_value; Spinlock m_lock; -}; \ No newline at end of file +}; diff --git a/kernel/src/thread/Thread.cpp b/kernel/src/thread/Thread.cpp index 22cdebac..fea866e3 100644 --- a/kernel/src/thread/Thread.cpp +++ b/kernel/src/thread/Thread.cpp @@ -18,4 +18,4 @@ Result new_thread() thread->id = g_next_id++; return thread; -} \ No newline at end of file +} diff --git a/kernel/src/thread/Thread.h b/kernel/src/thread/Thread.h index 6e8cc628..43a94e5d 100644 --- a/kernel/src/thread/Thread.h +++ b/kernel/src/thread/Thread.h @@ -60,4 +60,4 @@ bool is_in_kernel(Registers* regs); Result new_thread(); -extern LinkedList g_threads; \ No newline at end of file +extern LinkedList g_threads; diff --git a/kernel/src/video/BuiltinFont.h b/kernel/src/video/BuiltinFont.h index ee55a00a..ffe907a4 100644 --- a/kernel/src/video/BuiltinFont.h +++ b/kernel/src/video/BuiltinFont.h @@ -516,4 +516,4 @@ u8 font[] = { 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, 0x42, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x02, 0x3c, 0x00, /* 255 */ 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, - 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00 /* Special box character, 256 */ }; \ No newline at end of file + 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00 /* Special box character, 256 */ }; diff --git a/kernel/src/video/Framebuffer.cpp b/kernel/src/video/Framebuffer.cpp index 8b28dbba..2d379b59 100644 --- a/kernel/src/video/Framebuffer.cpp +++ b/kernel/src/video/Framebuffer.cpp @@ -80,4 +80,4 @@ namespace Framebuffer { return g_fb_scanline; } -} \ No newline at end of file +} diff --git a/kernel/src/video/Framebuffer.h b/kernel/src/video/Framebuffer.h index 033ac127..fb851cc7 100644 --- a/kernel/src/video/Framebuffer.h +++ b/kernel/src/video/Framebuffer.h @@ -15,4 +15,4 @@ namespace Framebuffer u32 width(); u32 height(); u32 scanline(); -} \ No newline at end of file +} diff --git a/kernel/src/video/TextConsole.cpp b/kernel/src/video/TextConsole.cpp index 8ccea5cf..86c7e4ec 100644 --- a/kernel/src/video/TextConsole.cpp +++ b/kernel/src/video/TextConsole.cpp @@ -199,4 +199,4 @@ namespace TextConsole va_end(ap); return rc; } -} \ No newline at end of file +} diff --git a/kernel/src/video/TextConsole.h b/kernel/src/video/TextConsole.h index 6614108e..c700b138 100644 --- a/kernel/src/video/TextConsole.h +++ b/kernel/src/video/TextConsole.h @@ -18,4 +18,4 @@ namespace TextConsole Result println(const char* str); void wprintln(const wchar_t* str); Result printf(const char* format, ...) _format(1, 2); -} \ No newline at end of file +} diff --git a/luna/include/luna/Alignment.h b/luna/include/luna/Alignment.h index f6f127dc..af572950 100644 --- a/luna/include/luna/Alignment.h +++ b/luna/include/luna/Alignment.h @@ -50,4 +50,4 @@ static_assert(get_blocks_from_size(0, 256) == 0); template constexpr T* offset_ptr(T* ptr, Offset offset) { return (T*)((char*)ptr + offset); -} \ No newline at end of file +} diff --git a/luna/include/luna/Alloc.h b/luna/include/luna/Alloc.h index 921dbe3d..96ef2b94 100644 --- a/luna/include/luna/Alloc.h +++ b/luna/include/luna/Alloc.h @@ -44,4 +44,4 @@ template void destroy(T* item) template void destroy_array(T* item) { delete[] item; -} \ No newline at end of file +} diff --git a/luna/include/luna/Atomic.h b/luna/include/luna/Atomic.h index 8f2dd9ff..f2c9cd79 100644 --- a/luna/include/luna/Atomic.h +++ b/luna/include/luna/Atomic.h @@ -115,4 +115,4 @@ template class Atomic private: T m_value; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/Attributes.h b/luna/include/luna/Attributes.h index 2f8edf7e..28d84975 100644 --- a/luna/include/luna/Attributes.h +++ b/luna/include/luna/Attributes.h @@ -2,4 +2,4 @@ #define _weak __attribute__((weak)) #define _format(n, m) __attribute__((format(printf, n, m))) -#define _align(x) __attribute__((aligned(x))) \ No newline at end of file +#define _align(x) __attribute__((aligned(x))) diff --git a/luna/include/luna/Badge.h b/luna/include/luna/Badge.h index c319b035..50cb5cbc 100644 --- a/luna/include/luna/Badge.h +++ b/luna/include/luna/Badge.h @@ -9,4 +9,4 @@ template struct Badge Badge(Badge&&) = delete; friend T; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/Bitmap.h b/luna/include/luna/Bitmap.h index b8ab0c40..5b062fd7 100644 --- a/luna/include/luna/Bitmap.h +++ b/luna/include/luna/Bitmap.h @@ -45,4 +45,4 @@ class Bitmap u8* m_location = nullptr; usize m_size_in_bytes = 0; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/CString.h b/luna/include/luna/CString.h index 8b606af7..df46497c 100644 --- a/luna/include/luna/CString.h +++ b/luna/include/luna/CString.h @@ -16,4 +16,4 @@ extern "C" // Copies len bytes from src into dest and adds a null terminator. void nullcpy(char* dest, const char* src, usize len); -} \ No newline at end of file +} diff --git a/luna/include/luna/CType.h b/luna/include/luna/CType.h index 79daf531..91994286 100644 --- a/luna/include/luna/CType.h +++ b/luna/include/luna/CType.h @@ -93,4 +93,4 @@ inline constexpr int _toupper(int c) #define isblank _isblank #define tolower _tolower #define toupper _toupper -#endif \ No newline at end of file +#endif diff --git a/luna/include/luna/DebugLog.h b/luna/include/luna/DebugLog.h index 5a32a7a4..0f78aa53 100644 --- a/luna/include/luna/DebugLog.h +++ b/luna/include/luna/DebugLog.h @@ -4,4 +4,4 @@ extern void debug_log_impl(const char* format, va_list ap); -void dbgln(const char* format, ...) _format(1, 2); \ No newline at end of file +void dbgln(const char* format, ...) _format(1, 2); diff --git a/luna/include/luna/Format.h b/luna/include/luna/Format.h index 6607e4d5..7fe3bcdc 100644 --- a/luna/include/luna/Format.h +++ b/luna/include/luna/Format.h @@ -16,4 +16,4 @@ usize pure_cstyle_format(const char* format, pure_callback_t callback, void* arg usize vstring_format(char* buf, usize max, const char* format, va_list ap); // Convenience function which outputs into a fixed-size buffer (not unlike snprintf) -usize string_format(char* buf, usize max, const char* format, ...) _format(3, 4); \ No newline at end of file +usize string_format(char* buf, usize max, const char* format, ...) _format(3, 4); diff --git a/luna/include/luna/LinkedList.h b/luna/include/luna/LinkedList.h index 442e0ecc..f1e6df08 100644 --- a/luna/include/luna/LinkedList.h +++ b/luna/include/luna/LinkedList.h @@ -220,4 +220,4 @@ template class LinkedList } usize m_count = 0; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/Move.h b/luna/include/luna/Move.h index 9006d68a..6a88f7b0 100644 --- a/luna/include/luna/Move.h +++ b/luna/include/luna/Move.h @@ -3,4 +3,4 @@ template inline T&& move(T& lvalue) { return (T &&) lvalue; -} \ No newline at end of file +} diff --git a/luna/include/luna/NumberParsing.h b/luna/include/luna/NumberParsing.h index e7c94bf5..ca00841c 100644 --- a/luna/include/luna/NumberParsing.h +++ b/luna/include/luna/NumberParsing.h @@ -11,4 +11,4 @@ isize scan_signed_integer(const char** str); usize parse_unsigned_integer(const char* str, const char** endptr, int base); // Parse a signed integer, similar to strtoll(). -isize parse_signed_integer(const char* str, const char** endptr, int base); \ No newline at end of file +isize parse_signed_integer(const char* str, const char** endptr, int base); diff --git a/luna/include/luna/Option.h b/luna/include/luna/Option.h index 6bbe8b5c..d8ca65f2 100644 --- a/luna/include/luna/Option.h +++ b/luna/include/luna/Option.h @@ -174,4 +174,4 @@ template inline Option nonnull_or_empty_option(T* ptr) if (ptr == nullptr) return {}; else return ptr; -} \ No newline at end of file +} diff --git a/luna/include/luna/OwnedPtr.h b/luna/include/luna/OwnedPtr.h index 0f76630d..01911ea8 100644 --- a/luna/include/luna/OwnedPtr.h +++ b/luna/include/luna/OwnedPtr.h @@ -62,4 +62,4 @@ template Result> adopt_owned_if_nonnull(T* ptr) if (ptr) return OwnedPtr { ptr }; else return err(ENOMEM); -} \ No newline at end of file +} diff --git a/luna/include/luna/OwnedStringView.h b/luna/include/luna/OwnedStringView.h index e9343e55..876e9c60 100644 --- a/luna/include/luna/OwnedStringView.h +++ b/luna/include/luna/OwnedStringView.h @@ -29,4 +29,4 @@ class OwnedStringView private: char* m_string { nullptr }; usize m_length { 0 }; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/PlacementNew.h b/luna/include/luna/PlacementNew.h index 91a20f39..554bde97 100644 --- a/luna/include/luna/PlacementNew.h +++ b/luna/include/luna/PlacementNew.h @@ -10,4 +10,4 @@ inline void* operator new[](usize, void* p) noexcept return p; } inline void operator delete(void*, void*) noexcept {}; -inline void operator delete[](void*, void*) noexcept {}; \ No newline at end of file +inline void operator delete[](void*, void*) noexcept {}; diff --git a/luna/include/luna/Result.h b/luna/include/luna/Result.h index f156b73c..1bfb1cf4 100644 --- a/luna/include/luna/Result.h +++ b/luna/include/luna/Result.h @@ -251,4 +251,4 @@ template inline Result nonnull_or_error(T* ptr, int error) if (ptr == nullptr) return err(error); else return ptr; -} \ No newline at end of file +} diff --git a/luna/include/luna/SafeArithmetic.h b/luna/include/luna/SafeArithmetic.h index 90cc3897..95f48ce4 100644 --- a/luna/include/luna/SafeArithmetic.h +++ b/luna/include/luna/SafeArithmetic.h @@ -53,4 +53,4 @@ template bool mul_will_overflow(T a, T b) #else return safe_mul(a, b).has_error(); #endif -} \ No newline at end of file +} diff --git a/luna/include/luna/ScopeGuard.h b/luna/include/luna/ScopeGuard.h index cc758f26..faded0ba 100644 --- a/luna/include/luna/ScopeGuard.h +++ b/luna/include/luna/ScopeGuard.h @@ -25,4 +25,4 @@ template class ScopeGuard template [[nodiscard]] ScopeGuard make_scope_guard(const Callback& callback) { return { callback }; -} \ No newline at end of file +} diff --git a/luna/include/luna/SharedPtr.h b/luna/include/luna/SharedPtr.h index 6a9caffd..304b906e 100644 --- a/luna/include/luna/SharedPtr.h +++ b/luna/include/luna/SharedPtr.h @@ -133,4 +133,4 @@ template Result> adopt_shared_from_owned(OwnedPtr&& guard.deactivate(); return shared_ptr; -} \ No newline at end of file +} diff --git a/luna/include/luna/Stack.h b/luna/include/luna/Stack.h index d1a73f0d..fbd3f64c 100644 --- a/luna/include/luna/Stack.h +++ b/luna/include/luna/Stack.h @@ -21,4 +21,4 @@ struct Stack private: u64 m_base; usize m_bytes; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/SystemError.h b/luna/include/luna/SystemError.h index a6aba0c3..45f4f921 100644 --- a/luna/include/luna/SystemError.h +++ b/luna/include/luna/SystemError.h @@ -60,4 +60,4 @@ const char* error_string(int error); -#endif \ No newline at end of file +#endif diff --git a/luna/include/luna/TarStream.h b/luna/include/luna/TarStream.h index 9c926331..e21a0aa3 100644 --- a/luna/include/luna/TarStream.h +++ b/luna/include/luna/TarStream.h @@ -67,4 +67,4 @@ class TarStream void* m_pos; usize m_size; usize m_offset = 0; -}; \ No newline at end of file +}; diff --git a/luna/include/luna/TypeTraits.h b/luna/include/luna/TypeTraits.h index e34e941d..4894ac1a 100644 --- a/luna/include/luna/TypeTraits.h +++ b/luna/include/luna/TypeTraits.h @@ -46,4 +46,4 @@ template struct __remove_ref_impl template using RemoveReference = __remove_ref_impl::type; -template using RemoveCVReference = RemoveCV>; \ No newline at end of file +template using RemoveCVReference = RemoveCV>; diff --git a/luna/include/luna/Types.h b/luna/include/luna/Types.h index f75bb652..e1924440 100644 --- a/luna/include/luna/Types.h +++ b/luna/include/luna/Types.h @@ -22,4 +22,4 @@ static_assert(sizeof(i32) == 4UL); static_assert(sizeof(i64) == 8UL); static_assert(sizeof(usize) == sizeof(void*)); -static_assert(sizeof(isize) == sizeof(void*)); \ No newline at end of file +static_assert(sizeof(isize) == sizeof(void*)); diff --git a/luna/include/luna/Units.h b/luna/include/luna/Units.h index 6b062f1a..edc22635 100644 --- a/luna/include/luna/Units.h +++ b/luna/include/luna/Units.h @@ -3,4 +3,4 @@ #include usize to_dynamic_unit_cstr(usize value, char* buffer, usize max); -Result to_dynamic_unit(usize value); \ No newline at end of file +Result to_dynamic_unit(usize value); diff --git a/luna/include/luna/Utf8.h b/luna/include/luna/Utf8.h index 25509b73..280d29ed 100644 --- a/luna/include/luna/Utf8.h +++ b/luna/include/luna/Utf8.h @@ -62,4 +62,4 @@ class Utf8Encoder public: // Does not null-terminate. Returns the number of bytes written. Result encode(wchar_t c, char buf[4]); -}; \ No newline at end of file +}; diff --git a/luna/src/Alloc.cpp b/luna/src/Alloc.cpp index d97a3434..23f80e6c 100644 --- a/luna/src/Alloc.cpp +++ b/luna/src/Alloc.cpp @@ -27,4 +27,4 @@ void raw_free(void* ptr) void operator delete(void* ptr, usize size, std::align_val_t) noexcept { operator delete(ptr, size); -} \ No newline at end of file +} diff --git a/luna/src/Bitmap.cpp b/luna/src/Bitmap.cpp index 35b2ea8d..5a3e5130 100644 --- a/luna/src/Bitmap.cpp +++ b/luna/src/Bitmap.cpp @@ -85,4 +85,4 @@ void Bitmap::clear_region(usize start, usize bits, bool value) set(start, value); start++; } -} \ No newline at end of file +} diff --git a/luna/src/CString.cpp b/luna/src/CString.cpp index 83d15661..ac048c3c 100644 --- a/luna/src/CString.cpp +++ b/luna/src/CString.cpp @@ -81,4 +81,4 @@ extern "C" memcpy(dest, src, len); dest[len] = 0; } -} \ No newline at end of file +} diff --git a/luna/src/Check.cpp b/luna/src/Check.cpp index f01fef8d..b57856e7 100644 --- a/luna/src/Check.cpp +++ b/luna/src/Check.cpp @@ -3,4 +3,4 @@ _weak [[noreturn]] bool __check_failed(const char*, const char*, const char*, const char*) { __builtin_trap(); -} \ No newline at end of file +} diff --git a/luna/src/DebugLog.cpp b/luna/src/DebugLog.cpp index b2639723..c926390c 100644 --- a/luna/src/DebugLog.cpp +++ b/luna/src/DebugLog.cpp @@ -6,4 +6,4 @@ void dbgln(const char* format, ...) va_start(ap, format); debug_log_impl(format, ap); va_end(ap); -} \ No newline at end of file +} diff --git a/luna/src/Format.cpp b/luna/src/Format.cpp index cd68ba8c..c06a51a9 100644 --- a/luna/src/Format.cpp +++ b/luna/src/Format.cpp @@ -693,4 +693,4 @@ usize string_format(char* buf, usize max, const char* format, ...) va_end(ap); return result; -} \ No newline at end of file +} diff --git a/luna/src/OwnedStringView.cpp b/luna/src/OwnedStringView.cpp index ba786cfe..90e0f549 100644 --- a/luna/src/OwnedStringView.cpp +++ b/luna/src/OwnedStringView.cpp @@ -46,4 +46,4 @@ Result OwnedStringView::from_string_literal(const char* str) char* dup = strdup(str); if (!dup) return err(ENOMEM); return OwnedStringView { dup }; -} \ No newline at end of file +} diff --git a/luna/src/Stack.cpp b/luna/src/Stack.cpp index 0c53e6f3..f323470b 100644 --- a/luna/src/Stack.cpp +++ b/luna/src/Stack.cpp @@ -7,4 +7,4 @@ Stack::Stack(u64 base, usize bytes) : m_base(base), m_bytes(bytes) u64 Stack::top() { return (m_base + m_bytes) - sizeof(void*); -} \ No newline at end of file +} diff --git a/luna/src/SystemError.cpp b/luna/src/SystemError.cpp index 79279044..74586781 100644 --- a/luna/src/SystemError.cpp +++ b/luna/src/SystemError.cpp @@ -59,4 +59,4 @@ const char* error_string(int error) case EFIXME: return "Functionality not yet implemented"; default: return "Unknown error"; } -} \ No newline at end of file +} diff --git a/luna/src/TarStream.cpp b/luna/src/TarStream.cpp index 0235881c..c4e4cced 100644 --- a/luna/src/TarStream.cpp +++ b/luna/src/TarStream.cpp @@ -106,4 +106,4 @@ Result TarStream::read_contents_as_string(const Entry& entry, u buf[nread] = 0; return OwnedStringView { buf }; -} \ No newline at end of file +} diff --git a/luna/src/Units.cpp b/luna/src/Units.cpp index 9c4a31f5..1476e637 100644 --- a/luna/src/Units.cpp +++ b/luna/src/Units.cpp @@ -25,4 +25,4 @@ Result to_dynamic_unit(usize value) to_dynamic_unit_cstr(value, buf, 64); return OwnedStringView { buf }; -} \ No newline at end of file +} diff --git a/luna/src/Utf8.cpp b/luna/src/Utf8.cpp index 96336ed3..3a84df36 100644 --- a/luna/src/Utf8.cpp +++ b/luna/src/Utf8.cpp @@ -241,4 +241,4 @@ Result Utf8Encoder::encode(wchar_t c, char buf[4]) TRY(encode_wide_char_as_utf8(c, buf, len)); return len; -} \ No newline at end of file +}