diff options
| -rw-r--r-- | version.c | 16 | ||||
| -rw-r--r-- | version.h | 5 |
2 files changed, 21 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +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 " + "<https://gnu.org/licenses/gpl.html>.\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); +} @@ -4,5 +4,10 @@ #define PROGRAM_NAME "sf" #define PROGRAM_LONG_NAME "Status & Files" #define PROGRAM_VERSION "0.0.1" +#define PROGRAM_AUTHOR "Verdant <im@verdant.ee>" +#define BUILD_DATE __DATE__ +#define GCC_VERSION __VERSION__ + +void version(); #endif /* SF_VERSION_H */ |
