crypto: drop pretense of notmuch_crypto_context_t notmuch_crypto_context_t was introduced (i think) as some sort of abstraction layer to make notmuch somewhat independent of GMime. But it isn't even useful for GMime 3.0 or later -- we can drop the pretense that it's some sort of abstraction in this case, and just call it what it is, GMimeCryptoContext, which is useful for building against older versions of GMime. This also renames _notmuch_crypto_get_context() to _notmuch_crypto_get_gmime_context().
crypto: rename notmuch_crypto_t to _notmuch_crypto_t The notmuch_crypto_t struct isn't used externally, and we have no plans to explicitly export it. Prefix its name (and associated functions) with _ to make that intent clear.
lib: convert notmuch_bool_t to stdbool internally C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the lib internally to stdbool.
cli: convert notmuch_bool_t to stdbool C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the cli and test binaries to stdbool.
devel/check-out-of-tree-build.sh: consistent naming, consistent quoting Renamed from out-of-tree-build-check.sh to be consistent with other files in this directory. Fixed quoting in "$srcdir" usage for additional robustness, other quoting changes for consistency.
cli: use designated initializers for opt desc Several changes at once, just to not have to change the same lines several times over: - Use designated initializers to initialize opt desc arrays. - Only initialize the needed fields. - Remove arg_id (short options) as unused. - Replace opt_type and output_var with several type safe output variables, where the output variable being non-NULL determines the type. Introduce checks to ensure only one is set. The downside is some waste of const space per argument; this could be saved by retaining opt_type and using a union, but that's still pretty verbose. - Fix some variables due to the type safety. Mostly a good thing, but leads to some enums being changed to ints. This is pedantically correct, but somewhat annoying. We could also cast, but that defeats the purpose a bit. - Terminate the opt desc arrays using {}. The output variable type safety and the ability to add new fields for just some output types or arguments are the big wins. For example, if we wanted to add a variable to set when the argument is present, we could do so for just the arguments that need it. Beauty is in the eye of the beholder, but I think this looks nice when defining the arguments, and reduces some of the verbosity we have there.
cli: strip trailing "/" from the final maildir path in notmuch insert Several subtle interconnected changes here: - If the folder name passed as argument is the empty string "" or slash "/", the final maildir path would end up having "//" in it. We should strip the final maildir path, not folder. - The folder variable should really be const char *, another reason not to modify it. - The maildir variable is only const to let us point it at db_path directly. To be able to strip the maildir variable, always allocate it. Default folder to the empty string "", and don't treat folder not being present on the command line as anything special. As a side effect, we also create the cur/new/tmp in the top level directory if they're not there and --create-folder is given.