summaryrefslogtreecommitdiffhomepage
path: root/dev/lib/utility
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-17 10:31:30 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-17 10:31:30 +0100
commit3827ae4e821ff3758d1eaf2dbacc55a22f802731 (patch)
tree0768b1a509bd104627675127f1e9785c702e7621 /dev/lib/utility
parent5c5a101c9618f8edea5038e94df64508b0f0a70e (diff)
feat: fixing merge conflicts.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/lib/utility')
-rw-r--r--dev/lib/utility/cgi_writer.hpp26
-rw-r--r--dev/lib/utility/chunk_string.hpp12
-rw-r--r--dev/lib/utility/crc32.hpp10
-rw-r--r--dev/lib/utility/embfs.hpp10
4 files changed, 29 insertions, 29 deletions
diff --git a/dev/lib/utility/cgi_writer.hpp b/dev/lib/utility/cgi_writer.hpp
index 87354ac..d54d9de 100644
--- a/dev/lib/utility/cgi_writer.hpp
+++ b/dev/lib/utility/cgi_writer.hpp
@@ -4,15 +4,15 @@
* Copyright 2023-2025, Amlal El Mahrouss.
*/
-#ifndef _SCL_CGI_WRITER_HPP
-#define _SCL_CGI_WRITER_HPP
+#ifndef _OCL_CGI_WRITER_HPP
+#define _OCL_CGI_WRITER_HPP
#include <lib/io/print.hpp>
#include <lib/utility/chunk_string.hpp>
#include <sstream>
#include <format>
-namespace scl
+namespace ocl
{
namespace cgi
{
@@ -21,7 +21,7 @@ namespace scl
class basic_writer
{
private:
- basic_writer& eval_(const scl::basic_chunk_string<char_type>& mime, const scl::basic_chunk_string<char_type>& ss) noexcept
+ basic_writer& eval_(const ocl::basic_chunk_string<char_type>& mime, const ocl::basic_chunk_string<char_type>& ss) noexcept
{
std::basic_stringstream<char_type> ss_out;
@@ -30,7 +30,7 @@ namespace scl
ss_out << std::format("Content-Length: {}\r\n\r\n", ss.str().size());
ss_out << ss.str();
- scl::io::print(ss_out.str());
+ ocl::io::print(ss_out.str());
return *this;
}
@@ -43,37 +43,37 @@ namespace scl
basic_writer(const basic_writer&) = default;
public:
- friend void operator<<(basic_writer& self, const scl::basic_chunk_string<char_type>& ss_in)
+ friend void operator<<(basic_writer& self, const ocl::basic_chunk_string<char_type>& ss_in)
{
self = self.eval_("text/plain", ss_in);
}
- basic_writer& binary(const scl::basic_chunk_string<char_type>& ss_in)
+ basic_writer& binary(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("application/octet-stream", ss_in);
}
- basic_writer& html(const scl::basic_chunk_string<char_type>& ss_in)
+ basic_writer& html(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("text/html", ss_in);
}
- basic_writer& xml(const scl::basic_chunk_string<char_type>& ss_in)
+ basic_writer& xml(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("application/xml", ss_in);
}
- basic_writer& json(const scl::basic_chunk_string<char_type>& ss_in)
+ basic_writer& json(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("application/json", ss_in);
}
- basic_writer& js(const scl::basic_chunk_string<char_type>& ss_in)
+ basic_writer& js(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("text/javascript", ss_in);
}
};
} // namespace cgi
-} // namespace scl
+} // namespace ocl
-#endif // ifndef _SCL_CGI_WRITER_HPP
+#endif // ifndef _OCL_CGI_WRITER_HPP
diff --git a/dev/lib/utility/chunk_string.hpp b/dev/lib/utility/chunk_string.hpp
index 6778173..4fe5cc2 100644
--- a/dev/lib/utility/chunk_string.hpp
+++ b/dev/lib/utility/chunk_string.hpp
@@ -5,12 +5,12 @@
* Copyright 2025, Amlal El Mahrouss
*/
-#ifndef SCL_UTILITY_CHUNK_STRING_HPP
-#define SCL_UTILITY_CHUNK_STRING_HPP
+#ifndef OCL_UTILITY_CHUNK_STRING_HPP
+#define OCL_UTILITY_CHUNK_STRING_HPP
#include <lib/core/includes.hpp>
-namespace scl
+namespace ocl
{
template <typename char_type, std::size_t max_chunk_size = 8196>
class basic_chunk_string;
@@ -89,7 +89,7 @@ namespace scl
void print() noexcept
{
- scl::io::print(packed_chunks_);
+ ocl::io::print(packed_chunks_);
}
};
@@ -98,5 +98,5 @@ namespace scl
{
fmt.print();
}
-} // namespace scl
-#endif // ifndef SCL_UTILITY_CHUNK_STRING_HPP
+} // namespace ocl
+#endif // ifndef OCL_UTILITY_CHUNK_STRING_HPP
diff --git a/dev/lib/utility/crc32.hpp b/dev/lib/utility/crc32.hpp
index 93347a8..ea09b94 100644
--- a/dev/lib/utility/crc32.hpp
+++ b/dev/lib/utility/crc32.hpp
@@ -5,8 +5,8 @@
* Copyright 2025, Amlal El Mahrouss.
*/
-#ifndef _SCL_CRC32_HPP
-#define _SCL_CRC32_HPP
+#ifndef _OCL_CRC32_HPP
+#define _OCL_CRC32_HPP
#include <cstdint>
#include <string>
@@ -15,7 +15,7 @@
/// @brief Crc32 implementation in C++
/// @author Amlal EL Mahrouss (amlal@nekernel.org)
-namespace scl::crc32
+namespace ocl::crc32
{
namespace detail
{
@@ -76,6 +76,6 @@ namespace scl::crc32
{
return detail::crc32(in.c_str(), in.size());
}
-} // namespace scl::crc32
+} // namespace ocl::crc32
-#endif // !_SCL_CRC32_HPP \ No newline at end of file
+#endif // !_OCL_CRC32_HPP \ No newline at end of file
diff --git a/dev/lib/utility/embfs.hpp b/dev/lib/utility/embfs.hpp
index 2738ae7..6da8874 100644
--- a/dev/lib/utility/embfs.hpp
+++ b/dev/lib/utility/embfs.hpp
@@ -5,8 +5,8 @@
* Copyright 2025, Amlal El Mahrouss.
*/
-#ifndef _SCL_EMBFS_HPP
-#define _SCL_EMBFS_HPP
+#ifndef _OCL_EMBFS_HPP
+#define _OCL_EMBFS_HPP
#include <cstdint>
#include <cstddef>
@@ -14,7 +14,7 @@
/// @brief A filesystem designed for tiny storage medias.
/// @author Amlal EL Mahrouss (amlal@nekernel.org)
-namespace scl::embfs
+namespace ocl::embfs
{
namespace traits
{
@@ -76,6 +76,6 @@ namespace scl::embfs
/// @brief Indexed node linear array.
typedef embfs_inode embfs_inode_arr_t[_inode_arr_len];
} // namespace traits
-} // namespace scl::embfs
+} // namespace ocl::embfs
-#endif // ifndef _SCL_EMBFS_HPP \ No newline at end of file
+#endif // ifndef _OCL_EMBFS_HPP \ No newline at end of file