Commit Graph

47 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 201fe45edc server: add a few stopwatches
For measuring performance.
2023-01-19 22:37:50 +02:00
Dirk-Jan C. Binnema 6979a66630 utils: get rid of mu-util.[ch]
It was getting old...
Remove the unused parts, refactor the few parts still in use.
2023-01-14 20:02:05 +02:00
Dirk-Jan C. Binnema 27ecbbdd65 many: use Mu::Regex instead of std::regex
The former is PCRE-compatible, and faster than std::regex.
2022-12-30 11:15:03 +02:00
Dirk-Jan C. Binnema 27ffaba817 mu-utils: use const char* from for time_to_string
To avoid lifetime problems with some(?) compilers.
2022-12-10 19:22:00 +02:00
Dirk-Jan C. Binnema 64f08149bc lib: remove mu-runtime
Remove runtime; update the logger for that, and move the runtime-paths
stuff to utils.
2022-11-16 23:31:51 +02:00
Dirk-Jan C. Binnema 9e60ebb683 utils: add helpers for assoc-pairs
Add some unit-test, too.
2022-10-02 18:24:23 +03:00
Dirk-Jan C. Binnema 317fe53ff7 tests: update test helpers and users
Move test-mu-common to mu-test-utils. Use mu_test_init as a wrapper for
g_test_init. Update users.
2022-08-11 22:55:10 +03:00
Dirk-Jan C. Binnema f69ad37e7a utils: add regex-split 2022-06-16 22:49:46 +03:00
Dirk-Jan C. Binnema b03590cca8 tests: skip missing timezones in queries, too 2022-05-18 01:08:40 +03:00
Dirk-Jan C. Binnema c4cc9795dc utils: add locale_workaround
Attempt to work around some locale handling throwing in some systems.

   "locale::facet::_S_create_c_locale name not valid"

Ugly, but maybe it helps.
2022-05-17 22:31:03 +03:00
Dirk-Jan C. Binnema 9e78d3d13f utils: insist on semicolon after MU_ENABLE_BITOPS 2022-05-14 12:47:26 +03:00
Dirk-Jan C. Binnema b7a30c0a36 utils: update date/size parsing, factor out format
And update tests
2022-04-30 10:40:45 +03:00
Dirk-Jan C. Binnema 9e9e16a7ec lib/tests: rework in terms of Mu::Message 2022-04-30 10:40:45 +03:00
Dirk-Jan C. Binnema 7c51bc68d4 option: rename to to_string_opt and to_string_view_opt
to_option_string -> to_string_opt
to_string_view   -> to_string_view_opt
2022-04-18 22:04:33 +03:00
Dirk-Jan C. Binnema 4f9c154d1a utils: add deletable_unique_ptr 2022-04-16 16:20:38 +03:00
Dirk-Jan C. Binnema a7e6d57286 utils: add TempDir RAII class
For tests
2022-04-14 17:06:33 +03:00
Dirk-Jan C. Binnema dc2be0b442 utils: add seq_some 2022-03-28 22:53:05 +03:00
Dirk-Jan C. Binnema a23c99ff7e utils: add some handy STL conveniences 2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema e0096c3dee utils: improve split / join 2022-03-19 10:58:13 +02:00
Dirk-Jan C. Binnema 00d9fb121f utils: add rename has_flag into one_if in BITOPS 2022-03-07 06:50:18 +02:00
Dirk-Jan C. Binnema 5417928c1e utils: add has_flag to MU_ENABLE_BITOPS 2022-02-26 10:09:31 +02:00
Dirk-Jan C. Binnema 38d08bad85 utils: add STR_V macro for printing string_view 2022-02-26 10:09:31 +02:00
Dirk-Jan C. Binnema 4990792f02 utils: rework Mu::split
And add some tests, cleanups.
2022-02-22 23:07:30 +02:00
Dirk-Jan C. Binnema 0e117fd6ab utils: improve assert_equal macro
make it a macro so we get line numbers etc
2022-02-21 23:51:46 +02:00
Dirk-Jan C. Binnema c0da564bba lib: fix clang compatibility / warnings 2022-02-18 10:49:56 +02:00
Dirk-Jan C. Binnema 6ff1831200 utils: make MU_ENABLE_BITOPS more constexpr 2022-02-14 11:12:38 +02:00
Dirk-Jan C. Binnema c9e958d65c utils: add Mu::time_to_string
Helper function to format strings (a-la strftime).
2021-11-10 22:32:28 +02:00
Dirk-Jan C. Binnema 8028f88a51 mu: rework xapian dependencies a bit
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-03 12:34:08 +02:00
Dirk-Jan C. Binnema 388f18a278 utils: add from_gchars
To copy into a std::string & free.
2021-11-02 22:24:17 +02:00
Dirk-Jan C. Binnema 3dd721d5a3 clang-format: update c/cc coding style
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-20 12:26:16 +03:00
Dirk-Jan C. Binnema 49637dbc3a lib: replace CATCH_BLOCK macros with template magic 2021-10-18 21:52:37 +03:00
Derek Zhou dc6f76d74d seperate Mu::format and Mu::vformat 2021-04-22 18:32:38 +00:00
Dirk-Jan C. Binnema 15aca5e396 utils: cleanup whitespace 2021-03-16 17:07:39 +02:00
Dirk-Jan C. Binnema 4b6d9a0ce8 utils: add RAII stopwatch
For benchmarking
2020-11-28 10:46:38 +02:00
Dirk-Jan C. Binnema 1b056f4c51 utils: Add Mu::canonicalize_filename
We need it for unit-tests
2020-06-27 17:07:00 +03:00
Dirk-Jan C. Binnema 6061898c2b utils: Clean up duration helpers 2020-06-27 17:07:00 +03:00
Dirk-Jan C. Binnema 73f4c49364 utils: add async-queue, ansio-printer
Add an async-queue (rougly, GAsyncQueue but in c++ using a deque)

Add an ANSI color printer.
2020-06-26 19:21:04 +03:00
Dirk-Jan C. Binnema a9fab4abcc mu: convert command-line tools to c++ 2020-06-13 16:56:41 +03:00
Jonas Bernoulli 564d892701 Fix typos 2020-05-12 23:56:55 +02:00
Dirk-Jan C. Binnema aa10da0a63 store: rework to allow for 'init'
Rework the error handling / exception for read-only / writable and new
database.
2020-02-08 14:28:55 +02:00
Dirk-Jan C. Binnema 38779cfade mu: no need to pass 'maildir' when we can deduce it
Only needed when setting up the database.
2020-02-04 01:05:35 +02:00
Dirk-Jan C. Binnema f21ceea421 sexp-parser: improve error message 2020-01-25 19:31:20 +02:00
Dirk-Jan C. Binnema e119ac919b mu: fix clang compilation 2020-01-24 00:21:53 +02:00
Dirk-Jan C. Binnema d2ec85f01c mu4e: use the new command-parser
Update mu4e-proc to use the new mu4e <-> mu protocol
2020-01-22 11:42:15 +02:00
Dirk-Jan C. Binnema a3d71dab91 utils: Update error exception, utils. 2020-01-18 13:40:15 +02:00
Dirk-Jan C. Binnema f4874cd7e1 lib/utils: Update 2020-01-05 17:46:21 +02:00
Dirk-Jan C. Binnema 9f93526884 move parser/utils to utils, Mux->Mu
Move the parser utils to utils/ and rename the Mux namespace into Mu.
2019-12-22 15:26:45 +02:00