refactor show-supported coding
[exim.git] / src / src / drtables.c
index 1d81557983dd7dc5d8ff4769b0792f85e3a532cb..d8904ac4fb1a7a4c81df618062efd299d84c8258 100644 (file)
@@ -171,9 +171,19 @@ auth_info auths_available[] = {
   },
 #endif
 
-{ .driver_name = US"" }                /* end marker */
+  { .driver_name = US"" }              /* end marker */
 };
 
+void
+auth_show_supported(FILE * f)
+{
+auth_info * ai;
+fprintf(f, "Authenticators:");
+for (ai = auths_available; ai->driver_name[0]; ai++)
+               fprintf(f, " %s", ai->driver_name);
+fprintf(f, "\n");
+}
+
 
 /* Tables of information about which routers and transports are included in the
 exim binary. */
@@ -329,10 +339,22 @@ router_info routers_available[] = {
   .ri_flags =          ri_notransport
   },
 #endif
-{ US"" }
+  { US"" }
 };
 
 
+void
+route_show_supported(FILE * f)
+{
+router_info * rr;
+fprintf(f, "Routers:");
+for (rr = routers_available; rr->driver_name[0]; rr++)
+               fprintf(f, " %s", rr->driver_name);
+fprintf(f, "\n");
+}
+
+
+
 
 transport_info transports_available[] = {
 #ifdef TRANSPORT_APPENDFILE
@@ -419,9 +441,43 @@ transport_info transports_available[] = {
   .local =             FALSE
   },
 #endif
-{ US"" }
+  { US"" }
 };
 
+void
+transport_show_supported(FILE * f)
+{
+fprintf(f, "Transports:");
+#ifdef TRANSPORT_APPENDFILE
+  fprintf(f, " appendfile");
+  #ifdef SUPPORT_MAILDIR
+    fprintf(f, "/maildir");    /* damn these subclasses */
+  #endif
+  #ifdef SUPPORT_MAILSTORE
+    fprintf(f, "/mailstore");
+  #endif
+  #ifdef SUPPORT_MBX
+    fprintf(f, "/mbx");
+  #endif
+#endif
+#ifdef TRANSPORT_AUTOREPLY
+  fprintf(f, " autoreply");
+#endif
+#ifdef TRANSPORT_LMTP
+  fprintf(f, " lmtp");
+#endif
+#ifdef TRANSPORT_PIPE
+  fprintf(f, " pipe");
+#endif
+#ifdef EXPERIMENTAL_QUEUEFILE
+  fprintf(f, " queuefile");
+#endif
+#ifdef TRANSPORT_SMTP
+  fprintf(f, " smtp");
+#endif
+fprintf(f, "\n");
+}
+
 
 #ifndef MACRO_PREDEF