Dirk-Jan C. Binnema
015a7ee0cb
utils: improve locale_workaround
...
Fixes : #2270 .
2022-06-04 00:41:28 +03:00
Dirk-Jan C. Binnema
13f0e24241
lib: improve test coverage
...
Add a bunch of tests
2022-06-02 21:07:41 +03:00
Dirk-Jan C. Binnema
ffcb59bfd3
utils: add fallback for time_to_string
...
Still don't understand issue #2230
2022-05-28 00:51:08 +03:00
Dirk-Jan C. Binnema
046398b1ae
utils: avoid compiler warning
2022-05-24 19:36:21 +03:00
Dirk-Jan C. Binnema
cea3167f3e
lib: remove some dead code (mu-str/utils)
...
Remove unused library code; recycle some electrons.
2022-05-19 23:38:49 +03:00
Dirk-Jan C. Binnema
2fd133761f
utils: fix unsetting timezone
2022-05-18 01:12:20 +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
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
15decf6327
mu-utils: avoid compiler warning
2022-04-18 22:26:13 +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
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
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
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
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
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
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
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
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
725826231f
utils: Add remove_ctrl
...
Add a helper function to remove control characters / multi-spaces, and a
test.
2021-03-16 16:51:01 +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
a9fab4abcc
mu: convert command-line tools to c++
2020-06-13 16:56:41 +03: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
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
b2014fe93e
use g_snprintf instead of snprintf
...
Seems the latter cannot be found on some platforms; perhaps a
c++/namespace thing?
Use g_snprintf instead.
2020-01-07 23:17:15 +02:00
Dirk-Jan C. Binnema
f4874cd7e1
lib/utils: Update
2020-01-05 17:46:21 +02:00
Dirk-Jan C. Binnema
dfafecaf0c
utils: add Mu::Error (runtime exception)
2020-01-01 13:25:07 +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