diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-10-07 13:54:24 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-10-07 13:54:24 +0200 |
commit | 1fad07ce86fc2a506c59501d7fb7c7d7481525f6 (patch) | |
tree | 6ba41c514e2ddc692cb95a0fb2070dd222897c7c /lib/common/print_version.c | |
parent | 5597dca9c6053cd19104e18d88edb199b32e3743 (diff) |
Rename libsqfshelper to libcommon
That is IMO less confusing and express what it is (i.e. what it has
become) more clearly, i.e. common code shared by the utilities.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/common/print_version.c')
-rw-r--r-- | lib/common/print_version.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/common/print_version.c b/lib/common/print_version.c new file mode 100644 index 0000000..b23e2bd --- /dev/null +++ b/lib/common/print_version.c @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * print_version.c + * + * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> + */ +#include "config.h" + +#include "util.h" + +#include <stdio.h> + +#define LICENSE_SHORT "GPLv3+" +#define LICENSE_LONG "GNU GPL version 3 or later" +#define LICENSE_URL "https://gnu.org/licenses/gpl.html" + +extern char *__progname; + +static const char *version_string = +"%s (%s) %s\n" +"Copyright (c) 2019 David Oberhollenzer et al\n" +"License " LICENSE_SHORT ": " LICENSE_LONG " <" LICENSE_URL ">.\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"; + +void print_version(void) +{ + printf(version_string, __progname, PACKAGE_NAME, PACKAGE_VERSION); +} |