aboutsummaryrefslogtreecommitdiffhomepage
path: root/util
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 talloc-extra.[ch]Gravatar David Bremner2012-12-30
| | | | | These are intended to be simple wrappers to provide slightly better debugging information than what talloc currently provides natively.
* 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).
* hex-escape: (en|de)code strings to/from restricted character setGravatar David Bremner2012-12-02
| | | | | | | The character set is chosen to be suitable for pathnames, and the same as that used by contrib/nmbug [With additions by Jani Nikula]
* Annotate internal_error with the attribute noreturnGravatar Justus Winter2012-09-27
| | | | | | | | | | | | | Annotating functions that do not return with the noreturn attribute (which is understood by both gcc and clang) prevents static analyzers from generating false positives (internal_error is used to terminate the process and is used extensively in error handling code paths). Remove the return statement that was placed there to appease the compiler. Functions annotated with noreturn are not supposed to return any values. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Fix dependency generation for compat, test, and utilGravatar Austin Clements2012-01-19
| | | | | This adds source files in compat, test, and util to SRCS so that the top-level Makefile.local will generate dependency files for them.
* build-system: clean $(libutil_modules) rather than listing them individually.Gravatar David Bremner2011-12-12
| | | | This matches the way the other 'Makefile.local's work.
* build system: clean up object files in ./test and ./utilGravatar David Bremner2011-11-26
|
* remove GCC visibility pragmasGravatar Tomi Ollila2011-10-31
| | | | | | | | libnotmuch.so.* linking fail on some environments. According to David Bremner on irc: "We jump through hoops with the linker script (notmuch.sym) so the pragmas are not needed. And they are a little bizarre in a library anyway..."
* xregcomp: don't consider every regex compilation failure an internal error.Gravatar David Bremner2011-10-30
| | | | | | This pushes the error handling up one step, but makes the function more flexible. Running out of memory still triggers an internal error, in the spirit of other xutils functions.
* xutil.c: remove duplicate copies, create new library libutil.a to contain xutil.Gravatar David Bremner2011-10-30
We keep the lib/xutil.c version. As a consequence, also factor out _internal_error and associated macros. It might be overkill to make a new file error_util.c for this, but _internal_error does not really belong in database.cc.