Mercurial > hg > th-libs
changeset 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 | 8d31605c2f0f |
files | th_util.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/th_util.c Mon Jun 04 02:54:31 2018 +0300 +++ b/th_util.c Mon Jun 04 03:07:46 2018 +0300 @@ -29,8 +29,18 @@ th_prog_name = name; th_prog_desc = desc; th_prog_version = version; - th_prog_author = author; - th_prog_license = license; + +#ifdef TH_PROG_AUTHOR + th_prog_author = author == NULL ? TH_PROG_AUTHOR : NULL; +#else + th_prog_author = author; +#endif + +#ifdef TH_PROG_LICENSE + th_prog_license = license == NULL ? TH_PROG_LICENSE : NULL; +#else + th_prog_license = license; +#endif th_initialized = TRUE; }