hermes

HTTP GET/HEAD-only web server for static content.
git clone git://git.francescosaccone.com/hermes
Log | Files | Refs | README | LICENSE

commit d976e94ac4fa7a609b075e6489f9f1da431f0be2
parent 9ca924d2e00b8a6f28bc60baa8c4ecc7340f8479
Author: Francesco Saccone <francesco@francescosaccone.com>
Date:   Tue,  1 Apr 2025 14:49:16 +0200

feat: add print_program_info function and VERSION macro

Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>

Diffstat:
Mmain.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -12,6 +12,8 @@ #include "socket.h" #include "utils.h" +#define VERSION "0.1.0" + #define REQUEST_BUFFER_MAX_LENGTH 104857600 * sizeof(char) /* 100 MiB */ #define DIRECTORY_MAX_LENGTH 1024 @@ -26,6 +28,11 @@ print_usage(char *program_name) { program_name); } +void +print_program_info() { + printf("Hermes v%s (c) Francesco Saccone\n", VERSION); +} + void handle_signal(int signal) { printf("\nTerminating Hermes...\n");