diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-31 12:46:24 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-31 12:46:24 +0200 |
| commit | 7bc56921bb59fe4159bccff45f567f989cf3c999 (patch) | |
| tree | 6b65bd0acf8729780afaf40168a92f1f22653cc7 | |
| parent | 7be6771d2fe24d53524ea17aec139d547a63a3c0 (diff) | |
meta: rename to astdx, to avoid future confusions.
| -rw-r--r-- | ReadMe.md | 10 | ||||
| -rw-r--r-- | examples/cgi/cgi.cc | 6 | ||||
| -rw-r--r-- | examples/must_pass/must_pass.cc | 4 | ||||
| -rw-r--r-- | lib/stdx/cgi.hpp | 6 | ||||
| -rw-r--r-- | lib/stdx/crc32.hpp | 4 | ||||
| -rw-r--r-- | lib/stdx/embdfs.hpp | 4 | ||||
| -rw-r--r-- | lib/stdx/opt.hpp | 8 |
7 files changed, 21 insertions, 21 deletions
@@ -1,18 +1,18 @@ -# STDX (Standard eXtended) +# Amlal's Standard Extended [](LICENSE) ## Getting Started: -Here is an example of how stdx::opt works. +Here is an example of how astdx::opt works. ```cpp -#include <stdx.hpp> +#include <astdx.hpp> 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 <fstream> #include <sstream> -#include <stdx/cgi.hpp> +#include <astdx/cgi.hpp> #include <string> #include <filesystem> @@ -63,7 +63,7 @@ const std::string g_not_found = R"( <tr><td colspan="3"><hr></td></tr> </table> - <address>stdx's Common Gateway Server.</address> + <address>astdx's Common Gateway Server.</address> </body> </html> )"; @@ -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 <stdx/opt.hpp> +#include <astdx/opt.hpp> #include <string> 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 <string> #include <sstream> -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 <stdexcept> #include <utility> -namespace stdx +namespace astdx { enum class ret { @@ -40,9 +40,9 @@ namespace stdx }; template <typename Teller, typename... Lst> - inline stdx::ret eval(Teller tell, Lst&&... arg) + inline astdx::ret eval(Teller tell, Lst&&... arg) { - return tell(std::forward<Lst>(arg)...) ? stdx::ret::okay : stdx::ret::err; + return tell(std::forward<Lst>(arg)...) ? astdx::ret::okay : astdx::ret::err; } namespace traits @@ -105,6 +105,6 @@ namespace stdx return greater_than(std::forward<Lst>(arg)...) ? ret::okay : ret::err; } -} /* namespace stdx */ +} /* namespace astdx */ #endif /* ifndef _STDX_OPT_HPP */ |
