summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-02-12 20:41:04 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-02-12 20:41:04 +0100
commit89effd74d93b37025053c66bbbbd1deaea171321 (patch)
tree4db413296c8c1e00e4126b2d622402a474b62119
parente8cebdd573c584dc51c396b35810ca08cb350c82 (diff)
feat: add 'io.nhh' header.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--include/CompilerKit/Utilities/DLL.h2
-rw-r--r--include/GenericsLibrary/fstream.nhh3
-rw-r--r--include/GenericsLibrary/io.nhh16
-rw-r--r--src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc7
-rw-r--r--src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cc2
5 files changed, 23 insertions, 7 deletions
diff --git a/include/CompilerKit/Utilities/DLL.h b/include/CompilerKit/Utilities/DLL.h
index f57ec4f..26eacea 100644
--- a/include/CompilerKit/Utilities/DLL.h
+++ b/include/CompilerKit/Utilities/DLL.h
@@ -70,7 +70,7 @@ class ModuleLoader final {
};
using StrongDLLRef = StrongRef<ModuleLoader>;
-using WeakDLLRef = WeakRef<ModuleLoader>;
+using WeakDLLRef = WeakRef<ModuleLoader>;
#else
#error No ModuleLoader defined.
#endif
diff --git a/include/GenericsLibrary/fstream.nhh b/include/GenericsLibrary/fstream.nhh
index b7a0a2e..5c6b0d4 100644
--- a/include/GenericsLibrary/fstream.nhh
+++ b/include/GenericsLibrary/fstream.nhh
@@ -18,6 +18,7 @@ trait fstream_traits
let fd_ := 0;
};
+//@ Implementation of fstream traits.
impl fstream : fstream_traits
{
let init()
@@ -45,4 +46,4 @@ impl fstream : fstream_traits
}
};
-#endif //@ NECTAR_GL_FSTREAM_NHH \ No newline at end of file
+#endif //@ NECTAR_GL_FSTREAM_NHH
diff --git a/include/GenericsLibrary/io.nhh b/include/GenericsLibrary/io.nhh
new file mode 100644
index 0000000..d99ae83
--- /dev/null
+++ b/include/GenericsLibrary/io.nhh
@@ -0,0 +1,16 @@
+// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (See accompanying
+// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
+// Official repository: https://github.com/nekernel-org/nectar
+
+#ifndef NECTAR_GL_IO_NHH
+#define NECTAR_GL_IO_NHH
+
+import printf;
+
+const writefn(let fmt, let args)
+{
+ printf(fmt, {args});
+}
+
+#endif
diff --git a/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc b/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc
index 438bea0..05ca0d7 100644
--- a/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc
+++ b/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc
@@ -529,8 +529,7 @@ bool CompilerKit::EncoderPowerPC::WriteNumber(const std::size_t& pos, std::strin
}
if (kVerbose) {
- kStdOut << "POWER: found a base 16 number here: " << jump_label.substr(pos)
- << "\n";
+ kStdOut << "POWER: found a base 16 number here: " << jump_label.substr(pos) << "\n";
}
return true;
@@ -809,8 +808,8 @@ bool CompilerKit::EncoderPowerPC::WriteLine(std::string line, std::string file)
if (kVerbose) {
kStdOut << "POWER: Found register: " << register_syntax << "\n";
- kStdOut << "POWER: Amount of registers in instruction: "
- << found_some_count << "\n";
+ kStdOut << "POWER: Amount of registers in instruction: " << found_some_count
+ << "\n";
}
if (reg_index >= 10 && reg_index < 20)
diff --git a/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cc b/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cc
index 42baa58..544a06d 100644
--- a/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cc
+++ b/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cc
@@ -545,7 +545,7 @@ NECTAR_MODULE(DynamicLinker64MachO) {
}
// Write LC_LOAD_DYLINKER command
- constexpr Char* dyldPath = "/usr/lib/dyld";
+ constexpr Char* dyldPath = "/usr/lib/dyld";
std::vector<Char> dylinkerCmd(dylinkerCmdSize, 0);
dylinker_command* dylinker = reinterpret_cast<dylinker_command*>(dylinkerCmd.data());
dylinker->cmd = LC_LOAD_DYLINKER;