diff --git a/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/crt0.c b/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/crt0.c index 70e5bcd71..110d8a123 100644 --- a/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/crt0.c +++ b/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/crt0.c @@ -1,7 +1,7 @@ #include - + extern void exit(int code); -extern int main (); +extern int main(); extern void __libc_init_array(); extern void __libc_fini_array(); diff --git a/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/dirent.h b/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/dirent.h index c56ecc5e6..4ee8e4251 100644 --- a/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/dirent.h +++ b/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/dirent.h @@ -33,8 +33,8 @@ * @(#)dirent.h 8.1 (Berkeley) 6/2/93 */ -#ifndef _SYS_DIRENT_H_ -#define _SYS_DIRENT_H_ +#ifndef _SYS_DIRENT_H_ +#define _SYS_DIRENT_H_ #ifdef __cplusplus extern "C" { @@ -55,47 +55,47 @@ extern "C" { */ struct dirent { - unsigned long d_fileno; /* file number of entry */ - unsigned short d_reclen; /* length of this record */ - unsigned char d_type; /* file type, see below */ - unsigned char d_namlen; /* length of string in d_name */ - char d_name[NAME_MAX + 1]; /* name must be no longer than this */ + unsigned long d_fileno; /* file number of entry */ + unsigned short d_reclen; /* length of this record */ + unsigned char d_type; /* file type, see below */ + unsigned char d_namlen; /* length of string in d_name */ + char d_name[NAME_MAX + 1]; /* name must be no longer than this */ }; /* * File types */ -#define DT_UNKNOWN 0 -#define DT_FIFO 1 -#define DT_CHR 2 -#define DT_DIR 4 -#define DT_BLK 6 -#define DT_REG 8 -#define DT_LNK 10 -#define DT_SOCK 12 +#define DT_UNKNOWN 0 +#define DT_FIFO 1 +#define DT_CHR 2 +#define DT_DIR 4 +#define DT_BLK 6 +#define DT_REG 8 +#define DT_LNK 10 +#define DT_SOCK 12 /* * Convert between stat structure types and directory types. */ -#define IFTODT(mode) (((mode) & 0170000) >> 12) -#define DTTOIF(dirtype) ((dirtype) << 12) +#define IFTODT(mode) (((mode) & 0170000) >> 12) +#define DTTOIF(dirtype) ((dirtype) << 12) /* * The kernel defines the format of directory entries returned by * the getdirentries(2) system call. */ -#define d_ino d_fileno /* backward compatibility */ +#define d_ino d_fileno /* backward compatibility */ /* structure describing an open directory. */ typedef struct _dirdesc { - int dd_fd; /* file descriptor associated with directory */ - long dd_loc; /* offset in current buffer */ - long dd_size; /* amount of data returned by getdirentries */ + int dd_fd; /* file descriptor associated with directory */ + long dd_loc; /* offset in current buffer */ + long dd_size; /* amount of data returned by getdirentries */ char *dd_buf; /* data buffer */ - int dd_len; /* size of data buffer */ - long dd_seek; /* magic cookie returned by getdirentries */ - long dd_rewind; /* magic cookie for rewinding */ + int dd_len; /* size of data buffer */ + long dd_seek; /* magic cookie returned by getdirentries */ + long dd_rewind; /* magic cookie for rewinding */ } DIR; //#define dirfd(dirp) ((dirp)->dd_fd) diff --git a/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/syscalls.h b/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/syscalls.h index 6f8b954cb..b74f3ec40 100644 --- a/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/syscalls.h +++ b/ficus-toolchain/newlib/newlib-4.4.0.20231231/newlib/libc/sys/ficus/sys/syscalls.h @@ -9,18 +9,18 @@ extern "C" { #endif -#define SYSCALL_EXIT_ID 0 +#define SYSCALL_EXIT_ID 0 #define SYSCALL_PUTCHAR_ID 1 #define SYSCALL_SLEEP_ID 2 #define SYSCALL_READCHAR_ID 3 -#define SYSCALL_OPEN_ID 4 -#define SYSCALL_CLOSE_ID 5 +#define SYSCALL_OPEN_ID 4 +#define SYSCALL_CLOSE_ID 5 -#define SYSCALL_READ_ID 6 -#define SYSCALL_WRITE_ID 7 -#define SYSCALL_LSEEK_ID 8 +#define SYSCALL_READ_ID 6 +#define SYSCALL_WRITE_ID 7 +#define SYSCALL_LSEEK_ID 8 #define SYSCALL_OPENDIR_ID 9 #define SYSCALL_READDIR_ID 10 @@ -28,16 +28,16 @@ extern "C" { #define SYSCALL_MKDIR_ID 12 #define SYSCALL_UNLINK_ID 13 -#define SYSCALL_EXECVE_ID 50 -#define SYSCALL_FORK_ID 51 -#define SYSCALL_WAITPID_ID 52 -#define SYSCALL_SBRK_ID 100 +#define SYSCALL_EXECVE_ID 50 +#define SYSCALL_FORK_ID 51 +#define SYSCALL_WAITPID_ID 52 +#define SYSCALL_SBRK_ID 100 #define SYSCALL_PRINT_MEM 1000 #define SYSCALL_PRINT_TASKS 1001 -void print_mem(); -void print_tasks(); +void print_mem(); +void print_tasks(); #ifdef __cplusplus } diff --git a/src/arch/x86/LimineFramebuffer.hpp b/src/arch/x86/LimineFramebuffer.hpp index d80df3c0d..dfef5b009 100644 --- a/src/arch/x86/LimineFramebuffer.hpp +++ b/src/arch/x86/LimineFramebuffer.hpp @@ -15,7 +15,7 @@ class LimineFramebuffer : public Framebuffer { public: - LimineFramebuffer(limine_framebuffer *limine_framebuffer); + LimineFramebuffer(limine_framebuffer *limine_framebuffer); virtual ~LimineFramebuffer() = default; void set(size_t x, size_t y, uint32_t color) override; diff --git a/src/arch/x86/PS2Keyboard.hpp b/src/arch/x86/PS2Keyboard.hpp index 3dc129a0b..b50268ab8 100644 --- a/src/arch/x86/PS2Keyboard.hpp +++ b/src/arch/x86/PS2Keyboard.hpp @@ -24,7 +24,7 @@ class PS2Keyboard { CircularBuffer buf; public: - PS2Keyboard(); + PS2Keyboard(); char readchar(); }; diff --git a/src/arch/x86/idt.cpp b/src/arch/x86/idt.cpp index a82721e5d..5de4f338f 100644 --- a/src/arch/x86/idt.cpp +++ b/src/arch/x86/idt.cpp @@ -173,7 +173,7 @@ namespace Arch::IDT { Scheduler::switch_task(frame); PIC_sendEOI(0); } - extern "C" __attribute__((force_align_arg_pointer)) void pic1_irq_real_1() { + extern "C" __attribute__((force_align_arg_pointer)) void pic1_irq_real_1() { if (handlers[1] != nullptr) { handlers[1](handlers_args[1]); } diff --git a/src/kernel/FbTty.hpp b/src/kernel/FbTty.hpp index a95847ff5..617a65736 100644 --- a/src/kernel/FbTty.hpp +++ b/src/kernel/FbTty.hpp @@ -11,7 +11,7 @@ class Framebuffer; class FbTty : public Tty { public: - FbTty(Framebuffer *fb); + FbTty(Framebuffer *fb); virtual ~FbTty() = default; void putchar(char c) override; diff --git a/src/kernel/Fonts.hpp b/src/kernel/Fonts.hpp index 078288bf6..277bed862 100644 --- a/src/kernel/Fonts.hpp +++ b/src/kernel/Fonts.hpp @@ -4871,8 +4871,7 @@ static constexpr std::array, 256> fonts_Terminess_Powerl 0b00000000, 0b00000000, 0b00000000, - } -}; + }}; #endif //FONTS_HPP diff --git a/src/kernel/Framebuffer.hpp b/src/kernel/Framebuffer.hpp index 0d9fbf6d3..30f4c5aa8 100644 --- a/src/kernel/Framebuffer.hpp +++ b/src/kernel/Framebuffer.hpp @@ -6,9 +6,9 @@ #define FRAMEBUFFER_HPP -#include #include #include +#include class Framebuffer { @@ -21,7 +21,7 @@ public: dimensions_t dimensions() { return _dimensions; } virtual void set(size_t x, size_t y, uint32_t color) = 0; - virtual int get(size_t x, size_t y) = 0; + virtual int get(size_t x, size_t y) = 0; protected: dimensions_t _dimensions; diff --git a/src/kernel/VMA.hpp b/src/kernel/VMA.hpp index 473cd1f27..500d6c630 100644 --- a/src/kernel/VMA.hpp +++ b/src/kernel/VMA.hpp @@ -16,11 +16,11 @@ class AddressSpace; class VMA { public: - VMA(AddressSpace *space); + VMA(AddressSpace *space); ~VMA(); - VMA(const VMA &) = delete; - VMA(VMA &&) = delete; + VMA(const VMA &) = delete; + VMA(VMA &&) = delete; VMA &operator=(const VMA &) = delete; VMA &operator=(VMA &&) = delete; @@ -32,7 +32,7 @@ public: void *mmap_mem(void *v_addr, size_t length, int prot, int flags); int munmap(void *addr, size_t length); - static constexpr size_t kBrkSize = 4096ULL * 20ULL; + static constexpr size_t kBrkSize = 4096ULL * 20ULL; std::optional brk_start; std::optional brk_end_fake; std::optional brk_end_real; diff --git a/src/kernel/templates/SkipList.hpp b/src/kernel/templates/SkipList.hpp index 865e5e627..a15a194e9 100644 --- a/src/kernel/templates/SkipList.hpp +++ b/src/kernel/templates/SkipList.hpp @@ -220,7 +220,7 @@ protected: using pointer = value_type *; using reference = value_type &; - explicit SkipListBaseIteratorBase(Node *n) : n(std::move(n)){}; + explicit SkipListBaseIteratorBase(Node *n) : n(std::move(n)) {}; reference operator*() const { return n->get(); } diff --git a/src/kernel/vfs/Filesystem.hpp b/src/kernel/vfs/Filesystem.hpp index ec0e3919f..f2e390bbc 100644 --- a/src/kernel/vfs/Filesystem.hpp +++ b/src/kernel/vfs/Filesystem.hpp @@ -11,7 +11,7 @@ class Filesystem { public: - Filesystem(NodeDir *mounted_on); + Filesystem(NodeDir *mounted_on); virtual ~Filesystem() = 0; virtual SharedPtr root() = 0; diff --git a/src/kernel/vfs/Node.cpp b/src/kernel/vfs/Node.cpp index d1ffc5720..cb408e239 100644 --- a/src/kernel/vfs/Node.cpp +++ b/src/kernel/vfs/Node.cpp @@ -7,7 +7,7 @@ #include "Filesystem.hpp" -Node::~ Node() = default; +Node::~Node() = default; SharedPtr Node::traverse(const Path &path) { Filesystem *mnt; diff --git a/src/kernel/vfs/Node.hpp b/src/kernel/vfs/Node.hpp index e9ec3567d..4a3b3f217 100644 --- a/src/kernel/vfs/Node.hpp +++ b/src/kernel/vfs/Node.hpp @@ -53,10 +53,10 @@ struct DirEntry { class NodeDir : public Node { public: - virtual Vector children() = 0; - virtual ino_t mkdir(const String &name) = 0; - virtual ino_t mkfile(const String &name) = 0; - virtual void set_mounted(Filesystem *mount); + virtual Vector children() = 0; + virtual ino_t mkdir(const String &name) = 0; + virtual ino_t mkfile(const String &name) = 0; + virtual void set_mounted(Filesystem *mount); protected: NodeDir(Filesystem *fs, ino_t ino) : Node(Type::DIR, fs, ino) {} diff --git a/src/kernel/vfs/TarFs.hpp b/src/kernel/vfs/TarFs.hpp index 503b77d16..7ba42319d 100644 --- a/src/kernel/vfs/TarFs.hpp +++ b/src/kernel/vfs/TarFs.hpp @@ -9,7 +9,7 @@ class TarFs : public Filesystem { public: - TarFs(char *backing, size_t backing_size, NodeDir *mounted_on); + TarFs(char *backing, size_t backing_size, NodeDir *mounted_on); ~TarFs() override = default; SharedPtr root() override; diff --git a/src/kernel/vfs/VFSGlobals.hpp b/src/kernel/vfs/VFSGlobals.hpp index 714697ded..456e8f78f 100644 --- a/src/kernel/vfs/VFSGlobals.hpp +++ b/src/kernel/vfs/VFSGlobals.hpp @@ -21,7 +21,7 @@ public: namespace VFSGlobals { extern RootNode root; extern MountTable mounts; -}; // namespace VFSGlobals +} // namespace VFSGlobals #endif //FICUS_VFSGLOBALS_HPP diff --git a/src/unit-tests/templates/SkipListDetailedTest.cpp b/src/unit-tests/templates/SkipListDetailedTest.cpp index eefc4fc04..044b01af8 100644 --- a/src/unit-tests/templates/SkipListDetailedTest.cpp +++ b/src/unit-tests/templates/SkipListDetailedTest.cpp @@ -232,7 +232,7 @@ public: using pointer = value_type *; using reference = value_type &; - CRangeListIterator(CRangeListIterator const &it) : it(it.it){}; + CRangeListIterator(CRangeListIterator const &it) : it(it.it) {}; CRangeListIterator(decltype(data)::const_iterator it, decltype(data)::const_iterator end) : it(it), end(end) { if (it != end && !it->second.second)