aboutsummaryrefslogtreecommitdiffhomepage
path: root/util/string-util.c
Commit message (Collapse)AuthorAge
* string-util: Disallow empty prefixes in parse_boolean_termGravatar Austin Clements2013-01-07
| | | | | Xapian doesn't consider ":abc" to be a prefixed term. This makes parse_boolean_term similarly reject queries with an empty prefix.
* util: Function to parse boolean term queriesGravatar Austin Clements2013-01-06
| | | | | | | This parses the subset of Xapian's boolean term quoting rules that are used by make_boolean_term. This is provided as a generic string utility, but will be used shortly in notmuch restore to parse and optimize for ID queries.
* util: Factor out boolean term quoting routineGravatar Austin Clements2013-01-06
| | | | | | | | | | | | | | | | | This is now a generic boolean term quoting function. It performs minimal quoting to produce user-friendly queries. This could live in tag-util as well, but it is really nothing specific to tags (although the conventions are specific to Xapian). The API is changed from "caller-allocates" to "readline-like". The scan for max tag length is pushed down into the quoting routine. Furthermore, this now combines the term prefix with the quoted term; arguably this is just as easy to do in the caller, but this will nicely parallel the boolean term parsing function to be introduced shortly. This is an amalgamation of code written by David Bremner and myself.
* util: add string-util.[ch]Gravatar David Bremner2012-12-08
This is to give a home to strtok_len. It's a bit silly to add a header for one routine, but it needs to be shared between several compilation units (or at least that's the most natural design).