Commit Graph

115 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 15decf6327 mu-utils: avoid compiler warning 2022-04-18 22:26:13 +03:00
Dirk-Jan C. Binnema 4ac66baccc mu-result: add assert_valid_result
Useful for unit tests
2022-04-18 22:26:04 +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 43c71c7698 error: Add crypto error code 2022-04-16 16:20:38 +03:00
Dirk-Jan C. Binnema e9fdf7f01d utils: add extra check for #2230 2022-04-16 16:20:38 +03:00
Dirk-Jan C. Binnema acbcbc0b43 utils: include unistd.h 2022-04-14 23:04:42 +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 55489cc0d1 mu-error: make fill_g_error const
And add some more error codes.
2022-03-28 22:53:05 +03:00
Dirk-Jan C. Binnema dc2be0b442 utils: add seq_some 2022-03-28 22:53:05 +03:00
Dirk-Jan C. Binnema 27ebfb3b3c lib+guile: use Mu::Option, not std::optional
We need the extensions, and/or let's use _one_ optional implementation everywhere.
2022-03-28 08:58:04 +03:00
Dirk-Jan C. Binnema 55402622b9 result: add Err which takes a GError
Convenience
2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema f7c84006d7 many: update for lib/message updates
Adapt to the new names / directory. Big commit, but mostly just very boring renaming.
2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema 33dbcbb25f mu-error: fix typo 2022-03-26 17:19:10 +02: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 2fb6356ab6 xapian-utils: xapian_try: also catch std::exception 2022-03-13 07:49:31 +02:00
Dirk-Jan C. Binnema 673929f169 logger: with MU_LOG_STDOUTERR, write logs to console
For debugging
2022-03-13 07:49:31 +02:00
Dirk-Jan C. Binnema 5b121352c2 utils: Handle failing g_date_time_new_...
Possibly, this caused a crashed under some scenarios (though couldn't reproduce).
2022-03-07 22:28:40 +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 273f84483a utils: some more convenience for error/result 2022-02-22 23:07:30 +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 af87cde217 utils/mu-date: remove
Remove mu-date.[ch] and convert its last users to use time_to_string instead.
2022-02-22 23:07:29 +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 ec826cd838 tests: update naming 2022-02-21 23:51:46 +02:00
Dirk-Jan C. Binnema 69a465d849 mu-sexp: add some small conveniences 2022-02-20 14:08:53 +02:00
Dirk-Jan C. Binnema 8cea933a51 mu-store: take mu_util_get_hash
mu-store is the only user left, move the implementation there.
2022-02-19 19:09:25 +02:00
Dirk-Jan C. Binnema c0da564bba lib: fix clang compatibility / warnings 2022-02-18 10:49:56 +02:00
Dirk-Jan C. Binnema 4eabf1a64a *: update for for mu-maildir changes
Update the dependencies.
2022-02-17 23:48:59 +02:00
Dirk-Jan C. Binnema 1db70c05e6 utils/async-queue: appease helgrind
We used notify_one _outside_ the lock; that should be just fine... but helgrind
doesn't like it, so let's appease it.
2022-02-17 23:48:59 +02:00
Dirk-Jan C. Binnema c5538d5b14 utils: update optional & expected
Use the latest upstream versions.
2022-02-16 23:18:16 +02:00
Dirk-Jan C. Binnema bc44666d88 mu-str: Remove some dead code 2022-02-16 21:55:02 +02:00
Dirk-Jan C. Binnema dce924da9c mu-error: Better support for GError
Allow filling a GError from a Mu::Error
2022-02-16 21:55:02 +02:00
Dirk-Jan C. Binnema 80cbf7c75b utils: Improve Mu::Result
Ensure the Ok() and Err() actually work, and add support for Result<void>
2022-02-16 21:55:02 +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 23fc8bdba8 update code for Mu::MessagePriority
Update dependent code
2022-02-14 11:12:26 +02:00
Dirk-Jan C. Binnema e818e94d0e build: fix some scan-build warnings 2022-02-07 17:36:34 +02:00
Dirk-Jan C. Binnema 8493e8649d mu-utils: try g_autoptr/g_autofree
It's useful, but let's if it works for all targets.
2022-02-06 14:18:23 +02:00
Zero King d0a3ca3453 utils: validate string before g_utf8_next_char() 2022-02-06 14:18:23 +02:00
Dirk-Jan C. Binnema 08dc66a525 mu-utils: Fix compiler warning 2022-01-14 17:10:16 +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 48d3f9cfab tests: move to subdir, move to meson
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-08 23:58:05 +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 4e6f2a3c26 mu: remove some unneeded code
Dead code, and replace mu_canonicalize_filename with g_canonicalize_filename.
2021-11-02 22:20:58 +02:00
Dirk-Jan C. Binnema f17995b113 lib/server: send query results in batches
Instead of one message (header) at a time, send batches of them; this allows for
much faster handling in mu4e.
2021-10-22 08:33:51 +03: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 3e4771ad1c mu-options: avoid clang warning 2021-10-18 22:32:46 +03:00