From 6ef3bfdf2f7e19cd74220a2c8c56250a7f13f0ce Mon Sep 17 00:00:00 2001 From: verdant Date: Thu, 23 Jul 2026 02:59:41 +0800 Subject: Add version function This function outputs program name, build date, author(s) and license --- version.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 version.c (limited to 'version.c') diff --git a/version.c b/version.c new file mode 100644 index 0000000..234a9f5 --- /dev/null +++ b/version.c @@ -0,0 +1,16 @@ +#include "./version.h" +#include +#include +void version() +{ + printf(PROGRAM_NAME + " " PROGRAM_VERSION " (built " BUILD_DATE + " with gcc " GCC_VERSION ")\n" + "Copyright (C) 2026 " PROGRAM_AUTHOR ".\n" + "License GPLv3+: GNU GPL version 3 or later " + ".\n" + "This is free software: you are free to change and redistribute " + "it.\n" + "There is NO WARRANTY, to the extent permitted by law.\n"); + exit(EXIT_SUCCESS); +} -- cgit v1.2.3