LILAC
Language to language Interop LAyer Compiler
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 Yeong-won Seo
3 *
4 * This file is part of LILAC.
5 *
6 * LILAC is free software: you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 3, or (at your option) any later
9 * version.
10 *
11 * LILAC is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#define __IS_MONTH(month) \
23 ((__DATE__[0]==#month[0]) && \
24 (__DATE__[1]==#month[1]) && \
25 (__DATE__[2]==#month[2]))
26
27#define __DATE_MONTH \
28 (__IS_MONTH(Jan) ? 0x1 : \
29 __IS_MONTH(Feb) ? 0x2 : \
30 __IS_MONTH(Mar) ? 0x3 : \
31 __IS_MONTH(Apr) ? 0x4 : \
32 __IS_MONTH(May) ? 0x5 : \
33 __IS_MONTH(Jun) ? 0x6 : \
34 __IS_MONTH(Jul) ? 0x7 : \
35 __IS_MONTH(Aug) ? 0x8 : \
36 __IS_MONTH(Sep) ? 0x9 : \
37 __IS_MONTH(Oct) ? 0xA : \
38 __IS_MONTH(Nov) ? 0xB : \
39 __IS_MONTH(Dec) ? 0xC : 0)
40
41#define __DATE_YEAR \
42 ((__DATE__[7]-'0')*1000 + \
43 (__DATE__[8]-'0')*100 + \
44 (__DATE__[9]-'0')*10 + \
45 (__DATE__[10]-'0'))
46
47#define __DATE_DAY \
48 ((__DATE__[4]-'0')*10 +\
49 (__DATE__[5]-'0'))
50
51#define LILAC_DATE (__DATE_YEAR * 10000 + __DATE_MONTH * 100 + __DATE_DAY)
52
53#define LILAC_SHORT_LICENSE \
54 "Copyright (C) 2024 Yeong-Won Seo \n" \
55 "This is free software; see the source for copying conditions. There is NO \n" \
56 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."