diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-29 14:41:51 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-29 14:45:50 +0200 |
| commit | 9158f48048eb8d56f4e9e6281d0c0b497690b4ee (patch) | |
| tree | ef72be3044a7464f0606216ddf17c5c38bb9e964 | |
| parent | 5cd5d2bbad9976a1068cb610b10d80f6267f575f (diff) | |
feat: io/print.hpp: new print include header.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | MailMap | 1 | ||||
| -rw-r--r-- | examples/cgi/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/equiv/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/must_pass/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/must_pass/must_pass.cc | 4 | ||||
| -rw-r--r-- | lib/crc32.hpp | 2 | ||||
| -rw-r--r-- | lib/embdfs.hpp | 4 | ||||
| -rw-r--r-- | lib/equiv.hpp | 2 | ||||
| -rw-r--r-- | lib/fix.hpp | 2 | ||||
| -rw-r--r-- | lib/io/print.hpp | 29 | ||||
| -rw-r--r-- | lib/math.hpp | 4 | ||||
| -rw-r--r-- | lib/opt.hpp | 7 | ||||
| -rw-r--r-- | meta/tex/embdfs.tex | 2 |
13 files changed, 49 insertions, 14 deletions
@@ -0,0 +1 @@ +@amlel-el-mahrouss - founder@snu.systems - Library Author and Chief Architect diff --git a/examples/cgi/CMakeLists.txt b/examples/cgi/CMakeLists.txt index 6a93acf..391899f 100644 --- a/examples/cgi/CMakeLists.txt +++ b/examples/cgi/CMakeLists.txt @@ -9,4 +9,4 @@ project( add_executable(CGI cgi.cc) set_property(TARGET CGI PROPERTY CXX_STANDARD 20) -target_include_directories(CGI PUBLIC ../../lib) +target_include_directories(CGI PUBLIC ../../) diff --git a/examples/equiv/CMakeLists.txt b/examples/equiv/CMakeLists.txt index a8ed6d3..8b29e23 100644 --- a/examples/equiv/CMakeLists.txt +++ b/examples/equiv/CMakeLists.txt @@ -9,4 +9,4 @@ project( add_executable(Equiv equiv.cc) set_property(TARGET Equiv PROPERTY CXX_STANDARD 20) -target_include_directories(Equiv PUBLIC ../../lib) +target_include_directories(Equiv PUBLIC ../../) diff --git a/examples/must_pass/CMakeLists.txt b/examples/must_pass/CMakeLists.txt index 6fcd411..8ef683b 100644 --- a/examples/must_pass/CMakeLists.txt +++ b/examples/must_pass/CMakeLists.txt @@ -9,4 +9,4 @@ project( add_executable(MustPass must_pass.cc) set_property(TARGET MustPass PROPERTY CXX_STANDARD 20) -target_include_directories(MustPass PUBLIC ../../lib) +target_include_directories(MustPass PUBLIC ../../) diff --git a/examples/must_pass/must_pass.cc b/examples/must_pass/must_pass.cc index 47c01b8..dbe5bb4 100644 --- a/examples/must_pass/must_pass.cc +++ b/examples/must_pass/must_pass.cc @@ -5,6 +5,7 @@ */ #include <lib/opt.hpp> +#include <lib/io/print.hpp> #include <string> static const char do_hash(const std::string& in) @@ -33,8 +34,11 @@ int main(int argc, char** argv) { // ... let's assume we fetch data from network... + snu::println("Testing data..."); + auto opt = do_some("Ohio", "Ohio"); opt.expect("Checksum failed, Ohio isn't Ohio!"); + return 0; } diff --git a/lib/crc32.hpp b/lib/crc32.hpp index 12dfbd1..726626e 100644 --- a/lib/crc32.hpp +++ b/lib/crc32.hpp @@ -12,7 +12,7 @@ #include <cstddef> /// @brief Crc32 implementation in C++ -/// @author Amlal EL Mahrouss (amlal@nekernel.org) +/// @author Amlal EL Mahrouss (founder@snu.systems) namespace snu { diff --git a/lib/embdfs.hpp b/lib/embdfs.hpp index 179cec2..af6118a 100644 --- a/lib/embdfs.hpp +++ b/lib/embdfs.hpp @@ -1,7 +1,7 @@ /* * File: embfs.hpp * Purpose: Embedded File System. - * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Author: Amlal El Mahrouss (founder@snu.systems) * Copyright 2025, Amlal El Mahrouss all rights reserved. */ @@ -12,7 +12,7 @@ #include <cstddef> /// @brief A Filesystem designed for tiny storage medias. -/// @author Amlal EL Mahrouss (amlal@nekernel.org) +/// @author Amlal EL Mahrouss (founder@snu.systems) namespace snu::embdfs { diff --git a/lib/equiv.hpp b/lib/equiv.hpp index 45534df..15512f4 100644 --- a/lib/equiv.hpp +++ b/lib/equiv.hpp @@ -1,7 +1,7 @@ /* * File: equiv.hpp * Purpose: equivalence runtime c++ header. - * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Author: Amlal El Mahrouss (founder@snu.systems) * Copyright 2025, Amlal El Mahrouss all rights reserved. */ diff --git a/lib/fix.hpp b/lib/fix.hpp index d4c95b4..1939979 100644 --- a/lib/fix.hpp +++ b/lib/fix.hpp @@ -1,7 +1,7 @@ /* * File: fix.hpp * Purpose: Financial Information Protocol implementation in C++. - * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Author: Amlal El Mahrouss (founder@snu.systems) * Copyright 2025, Amlal El Mahrouss all rights reserved. */ diff --git a/lib/io/print.hpp b/lib/io/print.hpp new file mode 100644 index 0000000..73b7663 --- /dev/null +++ b/lib/io/print.hpp @@ -0,0 +1,29 @@ +/* + * File: print.hpp + * Purpose: SNU Print library + * Author: Amlal El Mahrouss. (founder@snu.systems) + * Copyright 2025, SNU Systems Corp all rights reserved. + */ + +#ifndef _STDX_PRINT_HPP +#define _STDX_PRINT_HPP + +#include <iostream> + +namespace snu +{ + template <typename... T> + inline void print(const T&... fmt) + { + std::cout << std::forward(fmt...); + } + + template <typename... T> + inline void println(T... fmt) + { + std::cout << std::move(fmt...); + std::cout << std::endl; + } +} // namespace snu + +#endif // ifndef _STDX_PRINT_HPP
\ No newline at end of file diff --git a/lib/math.hpp b/lib/math.hpp index c6ae939..2613799 100644 --- a/lib/math.hpp +++ b/lib/math.hpp @@ -1,7 +1,7 @@ /* * File: math.hpp * Purpose: Mathematics c++ header. - * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Author: Amlal El Mahrouss (founder@snu.systems) * Copyright 2025, Amlal El Mahrouss all rights reserved. */ @@ -29,7 +29,7 @@ namespace snu::math static constexpr const bool value = false; }; - constexpr inline auto not_a_number = NAN; + constexpr inline auto not_a_number = NAN; constexpr inline auto positive_infinity = INFINITY; constexpr inline auto negative_infinity = -positive_infinity; } // namespace snu::math
\ No newline at end of file diff --git a/lib/opt.hpp b/lib/opt.hpp index b43b608..2c9405d 100644 --- a/lib/opt.hpp +++ b/lib/opt.hpp @@ -1,7 +1,7 @@ /* * File: opt.hpp * Author: Amlal El Mahrouss, - * Copyright 2023-2025, Amlal El Mahrouss all rights reserved. + * Copyright 2023-2025, Amlal El Mahrouss/SNU Systems Corp all rights reserved. */ #ifndef _STDX_OPT_HPP @@ -14,8 +14,9 @@ namespace snu { enum class ret { - okay, - err + invalid, + okay = 100, + err, }; struct opt final diff --git a/meta/tex/embdfs.tex b/meta/tex/embdfs.tex index 8171d36..d6e6e99 100644 --- a/meta/tex/embdfs.tex +++ b/meta/tex/embdfs.tex @@ -135,7 +135,7 @@ Represents a fixed-size array of 12 inodes within a given partition. \begin{itemize} \item Copyright © 2025 Amlal El Mahrouss \item All rights reserved. - \item For questions or licensing requests, contact: \texttt{amlal@nekernel.org} + \item For questions or licensing requests, contact: \texttt{founder@snu.systems} \end{itemize} \end{document}
\ No newline at end of file |
