-"Notmuch is now configured, and the configuration settings are saved in\n"
-"a file in your home directory named .notmuch-config . If you'd like to\n"
-"change the configuration in the future, you can either edit that file\n"
-"directly or run \"notmuch setup\". To choose an alternate configuration\n"
-"location, set ${NOTMUCH_CONFIG}.\n\n"
-
-"The next step is to run \"notmuch new\" which will create a database\n"
-"that indexes all of your mail. Depending on the amount of mail you have\n"
-"the initial indexing process can take a long time, so expect that.\n"
-"Also, the resulting database will require roughly the same amount of\n"
-"storage space as your current collection of email. So please ensure you\n"
-"have sufficient storage space available now.\n\n");
+ "Notmuch is now configured, and the configuration settings are saved in\n"
+ "a file in your home directory named .notmuch-config . If you'd like to\n"
+ "change the configuration in the future, you can either edit that file\n"
+ "directly or run \"notmuch setup\". To choose an alternate configuration\n"
+ "location, set ${NOTMUCH_CONFIG}.\n\n"
+
+ "The next step is to run \"notmuch new\" which will create a database\n"
+ "that indexes all of your mail. Depending on the amount of mail you have\n"
+ "the initial indexing process can take a long time, so expect that.\n"
+ "Also, the resulting database will require roughly the same amount of\n"
+ "storage space as your current collection of email. So please ensure you\n"
+ "have sufficient storage space available now.\n\n");
+}
+
+static void
+print_tag_list (const char **tags, size_t tags_len)
+{
+ unsigned int i;
+
+ for (i = 0; i < tags_len; i++) {
+ if (i != 0)
+ printf (" ");
+ printf ("%s", tags[i]);
+ }
+}
+
+static GPtrArray *
+parse_tag_list (void *ctx, char *response)
+{
+ GPtrArray *tags = g_ptr_array_new ();
+ char *tag = response;
+ char *space;
+
+ while (tag && *tag) {
+ space = strchr (tag, ' ');
+ if (space)
+ g_ptr_array_add (tags, talloc_strndup (ctx, tag, space - tag));
+ else
+ g_ptr_array_add (tags, talloc_strdup (ctx, tag));
+ tag = space;
+ while (tag && *tag == ' ')
+ tag++;
+ }
+
+ return tags;