From cf61b4b0e8e6af414102b61ea8ff4a58d615e07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81ris=20Narti=C5=A1s?= Date: Sat, 1 Jul 2023 04:39:45 +0300 Subject: [PATCH] doc: Document that lists in parser must be NULL terminated Created by @marisn --- lib/gis/parser_dependencies.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/gis/parser_dependencies.c b/lib/gis/parser_dependencies.c index d7f49a01b2a..256b44bafa7 100644 --- a/lib/gis/parser_dependencies.c +++ b/lib/gis/parser_dependencies.c @@ -207,6 +207,8 @@ static void append_error(const char *msg) When running the module, at most one option from a set can be provided. + The last item of the list must be NULL. + \param first first given option */ void G_option_exclusive(void *first, ...) @@ -233,6 +235,8 @@ static void check_exclusive(const struct rule *rule) At least one option from a set must be given. + The last item of the list must be NULL. + \param first first given option */ void G_option_required(void *first, ...) @@ -262,6 +266,8 @@ static void check_required(const struct rule *rule) If the first option is present, at least one of the other options must also be present. + The last item of the list must be NULL. + If you want all options to be provided use G_option_requires_all() function. If you want more than one option to be present but not all, @@ -300,6 +306,8 @@ static void check_requires(const struct rule *rule) If the first option is present, all the other options must also be present. + The last item of the list must be NULL. + If it is enough if only one option from a set is present, use G_option_requires() function. @@ -334,6 +342,8 @@ static void check_requires_all(const struct rule *rule) If the first option is present, none of the other options may also (should?) be present. + The last item of the list must be NULL. + \param first first given option */ void G_option_excludes(void *first, ...) @@ -363,6 +373,8 @@ static void check_excludes(const struct rule *rule) If any option is present, all the other options must also be present all or nothing from a set. + The last item of the list must be NULL. + \param first first given option */ void G_option_collective(void *first, ...)