From 0be66c2f14812f192e139f6d24bddc4f574c059d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 27 Jun 2025 14:46:26 +0200 Subject: feat: SNU C++ Library (v1.0.0) Signed-off-by: Amlal El Mahrouss --- examples/cgi/cgi.cc | 6 +- examples/equiv/Makefile | 181 ---------------------------------------- examples/equiv/equiv.cc | 8 +- examples/must_pass/must_pass.cc | 4 +- 4 files changed, 9 insertions(+), 190 deletions(-) delete mode 100644 examples/equiv/Makefile (limited to 'examples') diff --git a/examples/cgi/cgi.cc b/examples/cgi/cgi.cc index 6b45841..f850c9f 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"(
-
astdx's Common Gateway Server.
+
snu's Common Gateway Server.
)"; @@ -74,7 +74,7 @@ int main(int argc, char** argv) { // ... let's assume we serve data. - astdx::web::cgi_writer writer; + snu::web::cgi_writer writer; std::stringstream ss_file; std::ifstream fp("index.html"); diff --git a/examples/equiv/Makefile b/examples/equiv/Makefile deleted file mode 100644 index 9243de2..0000000 --- a/examples/equiv/Makefile +++ /dev/null @@ -1,181 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.28 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/amlal/amlal-el-mahrouss/astdx/examples/equiv - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/amlal/amlal-el-mahrouss/astdx/examples/equiv - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..." - /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start /home/amlal/amlal-el-mahrouss/astdx/examples/equiv/CMakeFiles /home/amlal/amlal-el-mahrouss/astdx/examples/equiv//CMakeFiles/progress.marks - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all - $(CMAKE_COMMAND) -E cmake_progress_start /home/amlal/amlal-el-mahrouss/astdx/examples/equiv/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -#============================================================================= -# Target rules for targets named Equiv - -# Build rule for target. -Equiv: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Equiv -.PHONY : Equiv - -# fast build rule for target. -Equiv/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Equiv.dir/build.make CMakeFiles/Equiv.dir/build -.PHONY : Equiv/fast - -equiv.o: equiv.cc.o -.PHONY : equiv.o - -# target to build an object file -equiv.cc.o: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Equiv.dir/build.make CMakeFiles/Equiv.dir/equiv.cc.o -.PHONY : equiv.cc.o - -equiv.i: equiv.cc.i -.PHONY : equiv.i - -# target to preprocess a source file -equiv.cc.i: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Equiv.dir/build.make CMakeFiles/Equiv.dir/equiv.cc.i -.PHONY : equiv.cc.i - -equiv.s: equiv.cc.s -.PHONY : equiv.s - -# target to generate assembly for a file -equiv.cc.s: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Equiv.dir/build.make CMakeFiles/Equiv.dir/equiv.cc.s -.PHONY : equiv.cc.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... rebuild_cache" - @echo "... Equiv" - @echo "... equiv.o" - @echo "... equiv.i" - @echo "... equiv.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/examples/equiv/equiv.cc b/examples/equiv/equiv.cc index 01674c6..482266a 100644 --- a/examples/equiv/equiv.cc +++ b/examples/equiv/equiv.cc @@ -4,16 +4,16 @@ licensed under GPL-2 license */ -#include +#include #include /* finally test it */ int main(int argc, char** argv) { std::cout << std::boolalpha; - std::cout << astdx::is_same::value << std::endl; - std::cout << astdx::is_same::value << std::endl; - std::cout << astdx::is_same::value << std::endl; + std::cout << snu::is_same::value << std::endl; + std::cout << snu::is_same::value << std::endl; + std::cout << snu::is_same::value << std::endl; return 0; } diff --git a/examples/must_pass/must_pass.cc b/examples/must_pass/must_pass.cc index ba927f0..eac3130 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 = astdx::opt(astdx::eval_eq(hash_to_check, opt_hash)); /* do the compute */ + auto opt = snu::opt(snu::eval_eq(hash_to_check, opt_hash)); /* do the compute */ return opt; } -- cgit v1.2.3