๐Ÿ A very simple static Gemini server, now with Titan support!
cpp gemini titan gemini-protocol titan-protocol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: explicit auto

Fuwn 047e83da 1014982c

+4 -4
+4 -4
maple/maple.cc
··· 39 39 std::vector<std::string> gemini_files; 40 40 41 41 // Try a graceful shutdown when a SIGINT is detected 42 - signal(SIGINT, [](int signal_){ 42 + signal(SIGINT, [](int signal_) -> void { 43 43 std::cout << "shutdown(" << signal_ << ")" << std::endl; 44 44 45 45 close(maple_socket); ··· 47 47 }); 48 48 49 49 // Find and keep track of all Gemini files to serve 50 - for (const auto &entry : 50 + for (const std::filesystem::directory_entry &entry : 51 51 std::filesystem::recursive_directory_iterator(".maple/gmi")) { 52 52 53 53 std::string file_extension = entry.path().string().substr( ··· 61 61 file_extension.end(), 62 62 gemini_file_extension.begin(), 63 63 gemini_file_extension.end(), 64 - [](auto a, auto b) { 64 + [](auto a, auto b) -> bool { 65 65 return std::tolower(a) == std::tolower(b); 66 66 } 67 67 )) { ··· 70 70 } 71 71 72 72 // Inform user of which files will be served 73 - for (const auto &file : gemini_files) { 73 + for (const std::string &file : gemini_files) { 74 74 std::cout << "serving " << file << std::endl; 75 75 } 76 76