Just refer to the dummy function directly, instead of using #define's.
---
generator/daemon.ml | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/generator/daemon.ml b/generator/daemon.ml
index 7ffea7b..d1689e1 100644
--- a/generator/daemon.ml
+++ b/generator/daemon.ml
@@ -732,19 +732,15 @@ and generate_daemon_optgroups_c () =
pr " return 1;\n";
pr "}\n";
pr "\n";
-
- List.iter (
- fun group ->
- pr "#define optgroup_%s_available dummy_available\n" group;
- ) optgroups_retired;
-
- pr "\n";
);
pr "struct optgroup optgroups[] = {\n";
List.iter (
fun group ->
- pr " { \"%s\", optgroup_%s_available },\n" group group
+ if List.mem group optgroups_retired then
+ pr " { \"%s\", dummy_available },\n" group
+ else
+ pr " { \"%s\", optgroup_%s_available },\n" group group
) optgroups_names_all;
pr " { NULL, NULL }\n";
pr "};\n"
--
2.5.0