summaryrefslogtreecommitdiff
path: root/lib/utils
AgeCommit message (Collapse)Author
2022-02-16utils: update optional & expectedDirk-Jan C. Binnema
Use the latest upstream versions.
2022-02-16mu-str: Remove some dead codeDirk-Jan C. Binnema
2022-02-16mu-error: Better support for GErrorDirk-Jan C. Binnema
Allow filling a GError from a Mu::Error
2022-02-16utils: Improve Mu::ResultDirk-Jan C. Binnema
Ensure the Ok() and Err() actually work, and add support for Result<void>
2022-02-14utils: make MU_ENABLE_BITOPS more constexprDirk-Jan C. Binnema
2022-02-14update code for Mu::MessagePriorityDirk-Jan C. Binnema
Update dependent code
2022-02-07build: fix some scan-build warningsDirk-Jan C. Binnema
2022-02-06mu-utils: try g_autoptr/g_autofreeDirk-Jan C. Binnema
It's useful, but let's if it works for all targets.
2022-02-06utils: validate string before g_utf8_next_char()Zero King
2022-01-14mu-utils: Fix compiler warningDirk-Jan C. Binnema
2021-11-10utils: add Mu::time_to_stringDirk-Jan C. Binnema
Helper function to format strings (a-la strftime).
2021-11-08tests: move to subdir, move to mesonDirk-Jan C. Binnema
De-clutter the source directories a bit. Ensure tests build with meson, and remove from autotools in a few places (no need to do things twice).
2021-11-03mu: rework xapian dependencies a bitDirk-Jan C. Binnema
Reduce the places where we need to include Xapian, and add a few places where the (meson build) didn't explicitly have a Xapian dep where needed.
2021-11-02utils: add from_gcharsDirk-Jan C. Binnema
To copy into a std::string & free.
2021-11-02mu: remove some unneeded codeDirk-Jan C. Binnema
Dead code, and replace mu_canonicalize_filename with g_canonicalize_filename.
2021-10-22lib/server: send query results in batchesDirk-Jan C. Binnema
Instead of one message (header) at a time, send batches of them; this allows for much faster handling in mu4e.
2021-10-20clang-format: update c/cc coding styleDirk-Jan C. Binnema
Update all cc code using .clang-format; please do so as well for future PRs etc.; emacs has a handy 'clang-format' mode to make this automatic. For comparing old changes with git blame, we can disregard this one using --ignore-rev (see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
2021-10-18mu-options: avoid clang warningDirk-Jan C. Binnema
2021-10-18lib: replace CATCH_BLOCK macros with template magicDirk-Jan C. Binnema
2021-08-08utils: use _GNU_SOURCE for S_ISLINK on freebsdDirk-Jan C. Binnema
Unbreak FreeBSD build. Fixes: #2079.
2021-07-29mu: use g_strerror instead of strerrorDirk-Jan C. Binnema
Some #includes were missing for the latter (but only noticeable on some systems - e.g., build breaks on Cygwin). So let's replace with something that works equally everywhere. Fixes: #2060
2021-05-02mu-sexp: make lists printableDirk-Jan C. Binnema
And some typo fixes
2021-04-22seperate Mu::format and Mu::vformatDerek Zhou
2021-03-16utils: cleanup whitespaceDirk-Jan C. Binnema
2021-03-16utils: Add remove_ctrlDirk-Jan C. Binnema
Add a helper function to remove control characters / multi-spaces, and a test.
2021-02-12build: experimental support for the meson build systemDirk-Jan C. Binnema
2021-01-22remove some dead codeDirk-Jan C. Binnema
2021-01-22lib: Update for new querying machineryDirk-Jan C. Binnema
Port to c++ and use new APIs.
2020-11-28utils: Improve option/result typesDirk-Jan C. Binnema
And add the beginnings of unit tests.
2020-11-28utils: add RAII stopwatchDirk-Jan C. Binnema
For benchmarking
2020-11-15mu: remove obsolete MU_FEATURE_CRYPTODirk-Jan C. Binnema
2020-11-15utils: add Result / Option typesDirk-Jan C. Binnema
Add some Rust-style Result/Option types, based on TartanLlama's expected, optional classes. There's std::optional of course, but we can't depend on C++17 yet.
2020-11-07lib: convert threader/container to c++Dirk-Jan C. Binnema
Did change the code much, but it's now compiled as c++
2020-10-31lib: improve error handling, cleanupsDirk-Jan C. Binnema
2020-10-26mu: support json output directlyDirk-Jan C. Binnema
Allow for dumping json directly from the Sexp structures, so we don't need any external libs (i.e. json-glib) anymore.
2020-10-02Use g_stat() instead of stat() with GStatBufJuan Jose Garcia-Ripoll
2020-08-15mu-sexp: use std::vector instead of std::dequeDirk-Jan C. Binnema
Using deque gives compilation errors when compiling on MacOS/clang (where it defaults to libc++ rather than gcc's libstdc++) ``` #include <deque> struct Foo { std::deque<Foo> foos; }; int main() { Foo foo; } ``` So, let's use a vector instead; this is a drop-in replacement here, but unfortunately in some future code...
2020-07-26build: attempt to avoid some libc++ problemsDirk-Jan C. Binnema
Seems there are problems compiling mu with XCode 11.6 (see build tests); apparently because of libc++ being different from libstdc++. clang++ builds works fine as long as we're using libstdc++.
2020-07-25Fix typosJonas Bernoulli
2020-07-25fix compilation error / clang warningsDirk-Jan C. Binnema
2020-07-13Merge pull request #1759 from damon-kwok/fixed-missing-includesDirk-Jan C. Binnema
[MSYS2] Added missing include files
2020-07-13utils/sexp: Clean up API and implementationDirk-Jan C. Binnema
Also update the tests and command-parser.
2020-07-13Added missing include filesdamon-kwok
2020-07-01Don't declare mu_str_size_s() with the const attribute.Todd Carson
When this function is declared const or pure, clang at -O1 or higher optimizes away the call to mu_str_size_s() inside mu_str_size(), so that it ignores its argument and returns whatever is in mu_str_size_s()'s static buffer. Found when test-mu-str failed while testing an update of mu in OpenBSD's ports tree.
2020-06-27utils: Add async-queueDirk-Jan C. Binnema
Like GAsyncQueue, but for c++
2020-06-27utils: Add Mu::canonicalize_filenameDirk-Jan C. Binnema
We need it for unit-tests
2020-06-27utils: Clean up duration helpersDirk-Jan C. Binnema
2020-06-26utils: add async-queue, ansio-printerDirk-Jan C. Binnema
Add an async-queue (rougly, GAsyncQueue but in c++ using a deque) Add an ANSI color printer.
2020-06-13utils/command-parser: Make property key ":" prefix explicitDirk-Jan C. Binnema
Avoid a bit of 'magic' so we can catch missing ':' in property :keys easier.
2020-06-13mu: convert command-line tools to c++Dirk-Jan C. Binnema