]> git.draconx.ca Git - cdecl99.git/blob - src/version.h
Release 1.3.
[cdecl99.git] / src / version.h
1 /*
2  * Copyright © 2023-2024 Nick Bowler
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16  */
17
18 #ifndef CDECL99_VERSION_H_
19 #define CDECL99_VERSION_H_
20
21 #define version_blurb(s, copyright) \
22         s "\n" \
23         copyright "2024 Nick Bowler\n" \
24         "License GPLv3+: GNU GPL version 3 or any later version.\n" \
25         "This is free software: you are free to change and redistribute it.\n" \
26         "There is NO WARRANTY, to the extent permitted by law." \
27
28 #if ENABLE_NLS && !VERSION_NO_COPYRIGHT_SYMBOL
29 #include <localcharset.h>
30 #include "copysym.h"
31
32 #define do_print_version(s) do { \
33         printf(version_blurb(s, "Copyright %s ")"\n", \
34                copyright_symbol(locale_charset())); \
35 } while (0)
36 #else
37 #define do_print_version(s) do { \
38         puts(version_blurb(s, "Copyright (C) ")); \
39 } while (0)
40 #endif
41
42 #endif