From 7bc56921bb59fe4159bccff45f567f989cf3c999 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 31 Mar 2025 12:46:24 +0200 Subject: meta: rename to astdx, to avoid future confusions. --- ReadMe.md | 10 +++++----- examples/cgi/cgi.cc | 6 +++--- examples/must_pass/must_pass.cc | 4 ++-- lib/stdx/cgi.hpp | 6 +++--- lib/stdx/crc32.hpp | 4 ++-- lib/stdx/embdfs.hpp | 4 ++-- lib/stdx/opt.hpp | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index b3481ff..55c905f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,18 +1,18 @@ -# STDX (Standard eXtended) +# Amlal's Standard Extended [![License: GPL-2.0](https://img.shields.io/badge/license-GPL--2.0-blue.svg)](LICENSE) ## Getting Started: -Here is an example of how stdx::opt works. +Here is an example of how astdx::opt works. ```cpp -#include +#include int main(int argc, char** argv) { - auto opt = stdx::opt(stdx::eval_eq(50, 50)).expect("stdex::eval_eq, does not match!"); - opt = stdx::opt(stdx::eval_eq(50, 40)); + auto opt = astdx::opt(astdx::eval_eq(50, 50)).expect("stdex::eval_eq, does not match!"); + opt = astdx::opt(astdx::eval_eq(50, 40)); opt.expect("this time it doesn't."); return 0; diff --git a/examples/cgi/cgi.cc b/examples/cgi/cgi.cc index 4d9b0d8..6b45841 100644 --- a/examples/cgi/cgi.cc +++ b/examples/cgi/cgi.cc @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include @@ -63,7 +63,7 @@ const std::string g_not_found = R"(
-
stdx's Common Gateway Server.
+
astdx's Common Gateway Server.
)"; @@ -74,7 +74,7 @@ int main(int argc, char** argv) { // ... let's assume we serve data. - stdx::web::cgi_writer writer; + astdx::web::cgi_writer writer; std::stringstream ss_file; std::ifstream fp("index.html"); diff --git a/examples/must_pass/must_pass.cc b/examples/must_pass/must_pass.cc index a86cd14..ba927f0 100644 --- a/examples/must_pass/must_pass.cc +++ b/examples/must_pass/must_pass.cc @@ -4,7 +4,7 @@ licensed under GPL-2 license */ -#include +#include #include static const char do_hash(const std::string& in) @@ -24,7 +24,7 @@ static auto do_some(const std::string recv_data, const std::string check_data) const int hash_to_check = do_hash(check_data); /* here we assume this should match opt_hash */ const int opt_hash = do_hash(recv_data); /* we assume that the hash is correct */ - auto opt = stdx::opt(stdx::eval_eq(hash_to_check, opt_hash)); /* do the compute */ + auto opt = astdx::opt(astdx::eval_eq(hash_to_check, opt_hash)); /* do the compute */ return opt; } diff --git a/lib/stdx/cgi.hpp b/lib/stdx/cgi.hpp index 5213c15..ae2b650 100644 --- a/lib/stdx/cgi.hpp +++ b/lib/stdx/cgi.hpp @@ -11,7 +11,7 @@ #include #include -namespace stdx +namespace astdx { namespace web { @@ -21,7 +21,7 @@ namespace stdx cgi_writer& eval_(const std::string& mime, const std::stringstream& ss) noexcept { std::printf("Content-Type: %s\r\n", mime.c_str()); - std::printf("Server: %s\r\n", "stdx-cpp-library"); + std::printf("Server: %s\r\n", "astdx-cpp-library"); std::printf("Content-Length: %ld\r\n\r\n", ss.str().size()); std::printf("%s", ss.str().c_str()); @@ -57,6 +57,6 @@ namespace stdx } }; } // namespace web -} // namespace stdx +} // namespace astdx #endif // ifndef _STDX_CGI_HPP \ No newline at end of file diff --git a/lib/stdx/crc32.hpp b/lib/stdx/crc32.hpp index d41e251..b559aa9 100644 --- a/lib/stdx/crc32.hpp +++ b/lib/stdx/crc32.hpp @@ -13,7 +13,7 @@ /// @brief Crc32 implementation in C++ /// @author Amlal EL Mahrouss (amlal@nekernel.org) -namespace stdx +namespace astdx { namespace details { @@ -68,6 +68,6 @@ namespace stdx return ~crc; } } // namespace details -} // namespace stdx +} // namespace astdx #endif // !_STDX_CRC32_HPP \ No newline at end of file diff --git a/lib/stdx/embdfs.hpp b/lib/stdx/embdfs.hpp index baca491..f873b7d 100644 --- a/lib/stdx/embdfs.hpp +++ b/lib/stdx/embdfs.hpp @@ -15,7 +15,7 @@ /// @brief A Filesystem designed for tiny storage medias. /// @author Amlal EL Mahrouss (amlal@nekernel.org) -namespace stdx::freestanding +namespace astdx::freestanding { namespace details { @@ -44,6 +44,6 @@ namespace stdx::freestanding /// @brief Destroys the library context. /// @return Whether it suceeded or not. int32_t embdfs_destroy_context(); -} // namespace stdx::freestanding +} // namespace astdx::freestanding #endif // ifndef _STDX_EMBDFS_HPP \ No newline at end of file diff --git a/lib/stdx/opt.hpp b/lib/stdx/opt.hpp index 5624c0a..e8772c9 100644 --- a/lib/stdx/opt.hpp +++ b/lib/stdx/opt.hpp @@ -10,7 +10,7 @@ #include #include -namespace stdx +namespace astdx { enum class ret { @@ -40,9 +40,9 @@ namespace stdx }; template - inline stdx::ret eval(Teller tell, Lst&&... arg) + inline astdx::ret eval(Teller tell, Lst&&... arg) { - return tell(std::forward(arg)...) ? stdx::ret::okay : stdx::ret::err; + return tell(std::forward(arg)...) ? astdx::ret::okay : astdx::ret::err; } namespace traits @@ -105,6 +105,6 @@ namespace stdx return greater_than(std::forward(arg)...) ? ret::okay : ret::err; } -} /* namespace stdx */ +} /* namespace astdx */ #endif /* ifndef _STDX_OPT_HPP */ -- cgit v1.2.3