argv[0]);
return 1;
}
-
+
+/* Handle the case of "notmuch" being invoked with no command
+ * argument. For now we just call notmuch_setup_command, but we plan
+ * to be more clever about this in the future.
+ */
+static int
+notmuch (void *ctx)
+{
+ return notmuch_setup_command (ctx, 0, NULL);
+}
+
int
main (int argc, char *argv[])
{
- void *local = talloc_new (NULL);
+ void *local;
command_t *command;
unsigned int i;
+ local = talloc_new (NULL);
+
+ g_mime_init (0);
+
if (argc == 1)
- return notmuch_setup_command (local, 0, NULL);
+ return notmuch (local);
for (i = 0; i < ARRAY_SIZE (commands); i++) {
command = &commands[i];