From 1aed5c93f1e3968f9211deebada544850e4ba415 Mon Sep 17 00:00:00 2001 From: Sofia Date: Sat, 11 Apr 2026 19:15:21 +0300 Subject: [PATCH] Add comments --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 17356fd..6cdac88 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,6 +57,7 @@ struct CompileOutput { std::string obj_string; }; +/// @brief Compiles the contents from the given filename and returns output as strings std::optional compile(std::string_view in_filename) { std::string out{ read_file(in_filename) }; @@ -154,6 +155,7 @@ std::optional compile(std::string_view in_filename) { }; } +/// @brief Executes a given command and returns the output as std::string std::string exec(const char* cmd) { std::array buffer; std::string result; @@ -168,7 +170,6 @@ std::string exec(const char* cmd) { } /// @brief Discovers the path of a given library using POSIX-util "whereis" -/// @param libname /// @return path to the library, empty string if nothing was found std::string find_lib(std::string libname) { std::string cmd = "whereis " + libname;