]> git.notmuchmail.org Git - notmuch/commitdiff
cli: export function for illegal tag checking
authorJani Nikula <jani@nikula.org>
Sun, 23 Feb 2014 16:55:21 +0000 (18:55 +0200)
committerDavid Bremner <david@tethera.net>
Thu, 6 Mar 2014 11:41:38 +0000 (07:41 -0400)
This lets us check for forbidden tags consistently across the cli. No
functional changes.

tag-util.c
tag-util.h

index 3bde4097372ab827e91e23ff963f6c5413652f9b..e2d5b795acc30c35afb2c6ac62e750165ed8f128 100644 (file)
@@ -31,14 +31,7 @@ line_error (tag_parse_status_t status,
     return status;
 }
 
-/*
- * Test tags for some forbidden cases.
- *
- * return: NULL if OK,
- *        explanatory message otherwise.
- */
-
-static const char *
+const char *
 illegal_tag (const char *tag, notmuch_bool_t remove)
 {
 
index 4628f1630ad6263951b8672d5d43a6699281306a..8a4074ce168feb22a5d0ae93d0849b6861e171a7 100644 (file)
@@ -89,6 +89,18 @@ tag_parse_status_t
 parse_tag_command_line (void *ctx, int argc, char **argv,
                        char **query_str, tag_op_list_t *ops);
 
+/*
+ * Test tags for some forbidden cases.
+ *
+ * Relax the checks if 'remove' is true to allow removal of previously
+ * added forbidden tags.
+ *
+ * return: NULL if OK,
+ *        explanatory message otherwise.
+ */
+const char *
+illegal_tag (const char *tag, notmuch_bool_t remove);
+
 /*
  * Create an empty list of tag operations
  *