aboutsummaryrefslogtreecommitdiff
path: root/lib/common/src/print_version.c
blob: 0c7fe5cedb8e204066a5a18aa4044fca7f7e48c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
 * print_version.c
 *
 * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
 */
#include "common.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"

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(const char *progname)
{
	printf(version_string, progname, PACKAGE_NAME, PACKAGE_VERSION);
}