aboutsummaryrefslogtreecommitdiff
path: root/util/zlib-extra.h
AgeCommit message (Collapse)Author
2021-03-13util: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h in the util directory
2020-04-28util/zlib-extra: de-inline gzerror_strDavid Bremner
It turns out that putting inline functions in C header files is not a good idea, and can cause linking problems if the compiler decides not to inline them. In principle this is solvable by using a "static inline" declaration, but this potentially makes a copy in every compilation unit. Since we don't actually care about the performance of this function, just use a non-inline function.
2020-04-13don't pass NULL as second parameter to gzerrorDavid Bremner
Although (as of 1.2.11) zlib checks this parameter before writing to it, the docs don't promise to keep doing so, so be safe.
2019-03-11util: make remaining headers includable from C++David Bremner
libnotmuch_util.a is supposed to be usable from the library and the CLI, but much the library is compiled as C++. Add in appropriate wrapping to prevent symbol mangling. These wrappers already existed in string-util.h; it seems better to be consistent.
2014-04-12util: add gz_readlineDavid Bremner
The idea is to provide a more or less drop in replacement for readline to read from zlib/gzip streams. Take the opportunity to replace malloc with talloc.