clang-format

This commit is contained in:
наб 2024-03-05 19:24:36 +01:00
parent 3d082a3efd
commit 7e4ea2c2da
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1
3 changed files with 9 additions and 8 deletions

View File

@ -80,28 +80,28 @@ msgid "usage: %s [-hV] %s%s%s\n"
msgstr "składnia: %s [-hV] %s%s%s\n"
#. as-in argument in a usage string
#: src/main.hpp:70
#: src/main.hpp:71
msgid "dataset"
msgstr "dataset"
#: src/main.hpp:74
#: src/main.hpp:75
#, c-format
msgid "No dataset to act on?\n"
"usage: %s [-hV] %s%sdataset\n"
msgstr "Nie podano datasetu?\n"
"składnia: %s [-hV] %s%sdataset\n"
#: src/main.hpp:79
#: src/main.hpp:80
#, c-format
msgid "usage: %s [-hV] %s%sdataset\n"
msgstr "składnia: %s [-hV] %s%sdataset\n"
#: src/main.hpp:89
#: src/main.hpp:90
#, c-format
msgid "Dataset %s not encrypted?\n"
msgstr "Dataset %s nie jest zaszyfrowany?\n"
#: src/main.hpp:91
#: src/main.hpp:92
#, c-format
msgid "Using dataset %s's encryption root %s instead.\n"
msgstr "Używam zamiast %s jego korzenia szyfrowania %s.\n"

View File

@ -127,7 +127,7 @@ int main(int argc, char ** argv) {
TRY_MAIN(lookup_userprop(dataset, PROPNAME_BACKEND, backend));
TRY_MAIN(lookup_userprop(dataset, PROPNAME_KEY, handle));
lines = TRY_PTR("allocate line buffer", reinterpret_cast<output_line *>(reallocarray(lines, ++lines_len, sizeof(output_line))));
lines = TRY_PTR("allocate line buffer", reinterpret_cast<output_line *>(reallocarray(lines, ++lines_len, sizeof(output_line))));
auto & cur_line = lines[lines_len - 1];
strncpy(cur_line.name, zfs_get_name(dataset), ZFS_MAX_DATASET_NAME_LEN);

View File

@ -25,7 +25,7 @@
template <class G, class M, class V = int (*)()>
static int do_bare_main(
int argc, char ** argv, const char * getoptions, const char * usage, const char * dataset_usage, G && getoptfn, M && main,
V && validate = []() { return 0; }) {
V && validate = [] { return 0; }) {
setlocale(LC_ALL, "");
bindtextdomain("tzpfms", "/usr/share/locale");
// bindtextdomain("tzpfms", "out/locale");
@ -64,7 +64,8 @@ static int do_bare_main(
}
template <class G, class M, class V = int (*)()>
static int do_main(int argc, char ** argv, const char * getoptions, const char * usage, G && getoptfn, M && main, V && validate = []() { return 0; }) {
static int do_main(
int argc, char ** argv, const char * getoptions, const char * usage, G && getoptfn, M && main, V && validate = [] { return 0; }) {
return do_bare_main(
// as-in argument in a usage string
argc, argv, getoptions, usage, gettext_noop("dataset"), getoptfn,