- return (MX_COMMAND(ctx->magic-1,mx_acl_check)(ctx,flag));
-}
-
-void mx_init (void) {
-#ifdef DEBUG
- int i = 0;
-#endif
- list_push_back (&MailboxFormats, (void*) mbox_reg_mx ());
- list_push_back (&MailboxFormats, (void*) mmdf_reg_mx ());
- list_push_back (&MailboxFormats, (void*) mh_reg_mx ());
- list_push_back (&MailboxFormats, (void*) maildir_reg_mx ());
-#ifdef USE_IMAP
- list_push_back (&MailboxFormats, (void*) imap_reg_mx ());
-#endif
-#ifdef USE_POP
- list_push_back (&MailboxFormats, (void*) pop_reg_mx ());
-#endif
-#ifdef USE_NNTP
- list_push_back (&MailboxFormats, (void*) nntp_reg_mx ());
-#endif
-#ifdef USE_COMPRESSED
- list_push_back (&MailboxFormats, (void*) compress_reg_mx ());
-#endif
-#ifdef DEBUG
- /* check module registration for completeness with debug versions */
-#define EXITWITHERR(m) do { fprintf(stderr, "error: incomplete mx module: %s is missing for type %i\n",m,i);exit(1); } while (0)
- for (i = 0; i < MailboxFormats->length; i++) {
- if (MX_COMMAND(i,type) < 1) EXITWITHERR("type");
- if (!MX_COMMAND(i,mx_is_magic)) EXITWITHERR("mx_is_magic");
- if (!MX_COMMAND(i,mx_open_mailbox)) EXITWITHERR("mx_open_mailbox");
-/* if (!MX_COMMAND(i,mx_sync_mailbox)) EXITWITHERR("mx_sync_mailbox");*/
- }
-#undef EXITWITHERR
-#endif /* DEBUG */