# HG changeset patch # User Matti Hamalainen # Date 1528070866 -10800 # Node ID 02a2a46f54855d1c1272715b931194cfcfd8c284 # Parent 167b66942c24402dae02296e4ccf6bc4363de4c9 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. diff -r 167b66942c24 -r 02a2a46f5485 th_util.c --- 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; }