feat: implement version command handlers
This commit is contained in:
parent
257ff100e3
commit
52338017a6
1 changed files with 14 additions and 1 deletions
|
|
@ -1,9 +1,22 @@
|
||||||
#include "ft_ping.h"
|
#include "ft_ping.h"
|
||||||
|
#include "version_gen.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
cli_handle_version(const char *arg, t_ping_config *config)
|
cli_handle_version(const char *arg, t_ping_config *config)
|
||||||
{
|
{
|
||||||
(void)arg;
|
(void)arg;
|
||||||
(void)config;
|
(void)config;
|
||||||
return 1;
|
|
||||||
|
printf("%s version %s\n", g_prog_name.name, PING_VERSION);
|
||||||
|
printf("Copyright (C) 2026 lohhiicccc\n");
|
||||||
|
printf("License GPLv3+:");
|
||||||
|
printf("GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\n");
|
||||||
|
printf("This is free software: you are free to change and redistribute it.\n");
|
||||||
|
printf("There is NO WARRANTY, to the extent permitted by law.\n");
|
||||||
|
printf("\n");
|
||||||
|
printf("Build: %s (commit %s)\n", PING_BUILD_DATE, PING_GIT_COMMIT);
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue