* refactor: use fmt::print in log.cc
https://github.com/fmtlib/fmt/issues/428#issuecomment-395442159
> You can use fmt::print("...\n") on Windows as well.
Use this mechanism instead of tr_sys_file_write_line()
* refactor: use FILE* in daemon
* refactor: remove unused tr_sys_file_flush_possible()
* refactor: remove unused tr_sys_file_write_line()
* refactor: remove unused tr_sys_file_get_std()
* refactor: remove unused tr_std_sys_file_t
* refactor: remove the tr_error** idiom
* fix: tr_error::message() is only constexpr in c++20 and up
* chore: silence a couple of g++-12 Wshadow warnings
* 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
* refactor: do not use goto in file-win32.cc
* refactor: do not use goto in subprocess-posix.cc
* refactor: do not use goto in peer-io.cc
* build: add cppcoreguidelines-avoid-goto to libtransmission/.clang-tidy
* refactor: tr_torrentGetMetadataPiece() returns an optional vector
* refactor: use tr_pathbuf in create_temp_path()
* refactor: use tr_pathbuf in win32 create_temp_path()
* refactor: use std::vector in isPeerInteresting()
* refactor: remove tr_new0 from tr_peerMgrPeerStats()
* refactor: remove tr_new0 from rechokeUploads()
* refactor: silence clang nullptr dereference warning
* refactor: make tr_natpmp a C++ class
* refactor: use std::string in tr_log_message
This avoids ERROR_INVALID_NAME ("The filename, directory name, or volume
label syntax is incorrect") errors since such normalization doesn't
happen automatically for "\\?\"-prefixed paths.
Fixes: #1791
* refactor: [[maybe_unused]] iff arg _might_ be used
If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization
patches!
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Renamed from libtransmission/file-win32.c (Browse further)