puts was replaced by fputs to set stderr output. In version changed years and an e-mail address.

This commit is contained in:
Alexander Andreev 2023-09-17 22:48:18 +04:00
parent 69ff91861b
commit ca7859f8f8
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 5 additions and 5 deletions

View File

@ -70,13 +70,13 @@ inline price_t price_to_wattspersecond(const price_t price) {
}
inline void print_version() {
puts("kwh-cost Ver. " VERSION "\n"
"Copyright (C) 2021,2022 Alexander \"Arav\" Andreev <me@arav.top>. All rights reserved.\n"
"You can see a license for this program in /usr/share/licenses/kwh-cost/LICENSE.");
fputs("kwh-cost Ver. " VERSION "\n"
"Copyright (C) 2021-2023 Alexander \"Arav\" Andreev <me@arav.su>. All rights reserved.\n"
"You can see a license for this program in /usr/share/licenses/kwh-cost/LICENSE.\n", stderr);
}
inline void print_usage() {
puts("Usage: kwh-cost [OPTIONS] price wattage interval [interval ...]\n"
fputs("Usage: kwh-cost [OPTIONS] price wattage interval [interval ...]\n"
"Options:\n"
" --help, -h display this usage information.\n"
" --version, -v display program version.\n"
@ -87,5 +87,5 @@ inline void print_usage() {
" this much power to be constantly used.\n"
" You may specify other time units such as:\n"
" m'inute, h'our, d'ay. Example: 5d 3h.\n"
" All given intervals will be summed up.");
" All given intervals will be summed up.\n", stderr);
}