* refactor: add tr_compare_3way()
This is a small templated utility function to make libtransmission's
sorting / comparison code more consistent and easier to read.
* chore: rename tr_strvContains to tr_strv_contains
* chore: rename tr_strvStartsWith to tr_strv_starts_with
* chore: rename tr_strvEndsWith to tr_strv_ends_with
* chore: rename tr_strvSep to tr_strv_sep
* chore: rename tr_strvStrip to tr_strv_strip
* chore: rename tr_strvToBuf to tr_strv_to_buf
* refactor: rename tr_saveFile() to tr_file_save()
rename tr_loadFile() to tr_file_read()
rename tr_moveFile() to tr_file_move()
* refactor: rename tr_parseNum() to tr_num_parse()
refactor: rename tr_parseNumRange() to tr_num_parse_range()
* chore: group related functions together in header
* Revert "perf: use libsmall in libtransmission, pt 3 (#5653)"
This reverts commit 3b03494580.
* Revert "perf: use small in libtransmission (#5650)"
This reverts commit 559f6f0332.
* refactor: use BufferReader, BufferWriter in peer-socket
* feat: expose GrowthFactor in tr-buffer
* perf: choose better defaults for the peer message buffers
* chore: sync tests
* refactor: use small::map in ActiveRequests::Impl
* refactor: reimplement Buffer using small
* refactor: use SmallBuffer in announcer-udp
* refactor: use SmallBuffer in variant-json
* refactor: use SmallBuffer in variant-benc
* refactor: use SmallBuffer in handshake
* refactor: use SmallBuffer in peer-msgs
* refactor: delete move semantics on stack-based buffers
* Expose files' begin and end pieces via RPC
This adds two arguments, `beginPiece` and `endPiece`, for each of the entries
in the `files` array of the RPC's `torrent-`get` method.
The point is to allow RPC clients to display a file's completion progress as
piece-based in addition to byte-based.
* Use user-preferred locale
Previous fix adding `L` format specifier was correct but only fixed half
of the problem, as C++ locale is set up to be "C" by default. GTK client
used to call `setlocale(LC_ALL, "")` to set up user-preferred locale
which only affected C functions and `std::locale` (used by libfmt) was
unaware of those changes.
Apply the fix to all the binaries since they're all doing some sort of
output to the user and calling libtransmission helpers, as well as using
libfmt directly.
* Improve libtransmission's json-test
Set the locale C++ way to avoid any sort of inconsistencies, and also
restore it to the old one once finished testing.
* Improve transmission-show test runner script
Quote outputs to avoid CMake error about `message()` being called with
no arguments. Capture stderr to the same output file. Fallback to `git
diff` if `diff` wasn't found. A few other minor changes.