Mercurial > hg > th-libs
comparison th_util.c @ 471:02a2a46f5485
Allow TH_PROG_AUTHOR and TH_PROG_LICENSE to be defined to override
th_prog_author and th_prog_license variables if the provided values are NULL.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 04 Jun 2018 03:07:46 +0300 |
parents | 167b66942c24 |
children | 41c1d786ff08 |
comparison
equal
deleted
inserted
replaced
470:167b66942c24 | 471:02a2a46f5485 |
---|---|
27 char *author, char *license) | 27 char *author, char *license) |
28 { | 28 { |
29 th_prog_name = name; | 29 th_prog_name = name; |
30 th_prog_desc = desc; | 30 th_prog_desc = desc; |
31 th_prog_version = version; | 31 th_prog_version = version; |
32 th_prog_author = author; | 32 |
33 th_prog_license = license; | 33 #ifdef TH_PROG_AUTHOR |
34 th_prog_author = author == NULL ? TH_PROG_AUTHOR : NULL; | |
35 #else | |
36 th_prog_author = author; | |
37 #endif | |
38 | |
39 #ifdef TH_PROG_LICENSE | |
40 th_prog_license = license == NULL ? TH_PROG_LICENSE : NULL; | |
41 #else | |
42 th_prog_license = license; | |
43 #endif | |
34 | 44 |
35 th_initialized = TRUE; | 45 th_initialized = TRUE; |
36 } | 46 } |
37 | 47 |
38 | 48 |